hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e9f2022d8957402e8b079abe1da08f467caf510b | 2,431 | py | Python | lmnet/lmnet/datasets/cifar100_distribute.py | toohsk/blueoil | 596922caa939db9c5ecbac3286fbf6f703865ee6 | [
"Apache-2.0"
] | null | null | null | lmnet/lmnet/datasets/cifar100_distribute.py | toohsk/blueoil | 596922caa939db9c5ecbac3286fbf6f703865ee6 | [
"Apache-2.0"
] | 1 | 2018-11-21T07:06:17.000Z | 2018-11-21T07:06:17.000Z | lmnet/lmnet/datasets/cifar100_distribute.py | toohsk/blueoil | 596922caa939db9c5ecbac3286fbf6f703865ee6 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018 The Blueoil 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
#
# Unles... | 31.571429 | 106 | 0.626903 |
e9f22bb1ea67ab94d6fe17f1e1dc1a68f58ceef8 | 3,149 | py | Python | gridengine/functional.py | MiqG/gridengine | 457c34b16f2c43b9be985cd822f30305d68afd91 | [
"BSD-3-Clause"
] | 20 | 2015-01-31T16:52:15.000Z | 2019-03-22T20:09:50.000Z | gridengine/functional.py | MiqG/gridengine | 457c34b16f2c43b9be985cd822f30305d68afd91 | [
"BSD-3-Clause"
] | 1 | 2021-11-27T16:33:59.000Z | 2021-11-27T16:33:59.000Z | gridengine/functional.py | MiqG/gridengine | 457c34b16f2c43b9be985cd822f30305d68afd91 | [
"BSD-3-Clause"
] | 7 | 2015-10-27T16:49:52.000Z | 2021-09-22T10:16:25.000Z | import inspect
import functools
from gridengine import job, dispatch, schedulers
# ----------------------------------------------------------------------------
# Partial
# ----------------------------------------------------------------------------
def isexception(x):
"""Test whether the value is an Exception instan... | 32.463918 | 97 | 0.64719 |
e9f24ec99f076ba98908603ffa1d50f5644d6aa7 | 31,441 | py | Python | Bio/Prosite/__init__.py | nuin/biopython | 045d57b08799ef52c64bd4fa807629b8a7e9715a | [
"PostgreSQL"
] | 2 | 2016-05-09T04:20:06.000Z | 2017-03-07T10:25:53.000Z | Bio/Prosite/__init__.py | nuin/biopython | 045d57b08799ef52c64bd4fa807629b8a7e9715a | [
"PostgreSQL"
] | null | null | null | Bio/Prosite/__init__.py | nuin/biopython | 045d57b08799ef52c64bd4fa807629b8a7e9715a | [
"PostgreSQL"
] | 1 | 2019-08-19T22:05:14.000Z | 2019-08-19T22:05:14.000Z | # Copyright 1999 by Jeffrey Chang. All rights reserved.
# Copyright 2000 by Jeffrey Chang. All rights reserved.
# Revisions Copyright 2007 by Peter Cock. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
#... | 35.326966 | 256 | 0.580675 |
e9f29e0f95ccd2b1945aff6967594472289887d8 | 21,120 | py | Python | build/lib/mrgaze/pupilometry.py | jmtyszka/mrgaze | 29217eab9ea431686fd200f08bddd6615c45d0d3 | [
"MIT"
] | 18 | 2016-01-22T02:47:45.000Z | 2021-09-23T18:37:51.000Z | build/lib/mrgaze/pupilometry.py | jmtyszka/mrgaze | 29217eab9ea431686fd200f08bddd6615c45d0d3 | [
"MIT"
] | 7 | 2015-05-26T21:33:16.000Z | 2020-05-26T11:47:54.000Z | build/lib/mrgaze/pupilometry.py | jmtyszka/mrgaze | 29217eab9ea431686fd200f08bddd6615c45d0d3 | [
"MIT"
] | 7 | 2016-02-06T00:17:52.000Z | 2021-02-22T03:51:55.000Z | #!/usr/bin/env python
#
# Video pupilometry functions
# - takes calibration and gaze video filenames as input
# - controls calibration and gaze estimation workflow
#
# USAGE : mrgaze.py <Calibration Video> <Gaze Video>
#
# AUTHOR : Mike Tyszka
# PLACE : Caltech
# DATES : 2014-05-07 JMT From scratch
# 2016-02... | 33.051643 | 112 | 0.550284 |
e9f462dbb1b4b480ae079d20eb179ca06f53f704 | 1,927 | py | Python | aws_glue/combine_csv_files/combine_csv_files.py | veben/aws_python_snippets | 39fa3cda8290fb097a5b9e8168829b62ab1af41e | [
"MIT"
] | 1 | 2020-09-08T09:22:25.000Z | 2020-09-08T09:22:25.000Z | aws_glue/combine_csv_files/combine_csv_files.py | veben/aws_python_snippets | 39fa3cda8290fb097a5b9e8168829b62ab1af41e | [
"MIT"
] | null | null | null | aws_glue/combine_csv_files/combine_csv_files.py | veben/aws_python_snippets | 39fa3cda8290fb097a5b9e8168829b62ab1af41e | [
"MIT"
] | 1 | 2020-09-08T09:26:58.000Z | 2020-09-08T09:26:58.000Z | from lib_combination.aws_client.aws_client import get_session_for_profile, run_job, get_job, create_job
from lib_combination.aws_client.aws_client import upload_file_to_s3_bucket
from lib_combination.conf_utils.conf_utils import get_job_name, get_profile_name, get_bucket_name, get_database_name
from lib_combination.fil... | 41.891304 | 116 | 0.70576 |
e9f4dc1139fdd0b79eb9f6a5670984a538e5b297 | 1,062 | py | Python | p850h/rectangle_area.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | 1 | 2020-02-20T12:04:46.000Z | 2020-02-20T12:04:46.000Z | p850h/rectangle_area.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | p850h/rectangle_area.py | l33tdaima/l33tdaima | 0a7a9573dc6b79e22dcb54357493ebaaf5e0aa90 | [
"MIT"
] | null | null | null | from typing import List
# TESTS
for rectangles, expected in [
([[0, 0, 2, 2], [1, 0, 2, 3], [1, 0, 3, 1]], 6),
([[0, 0, 1000000000, 1000000000]], 49),
]:
sol = Solution()
actual = sol.rectangleArea(rectangles)
print("Total area covered by rectangles", rectangles, "->", actual)
assert actual =... | 32.181818 | 88 | 0.508475 |
e9f668b9ca060060d4949971143a55425febaef0 | 1,323 | py | Python | hack/examples/python/sentiments/sentiments.py | margarytaSadovets/nuclio | 37bf21900d543a6340edf9374475b104ea963459 | [
"Apache-2.0"
] | 1 | 2018-01-02T18:48:27.000Z | 2018-01-02T18:48:27.000Z | hack/examples/python/sentiments/sentiments.py | ilaykav/nuclio | 23a65b9f5c9e00afccbfbc62cd2a4dd2cc8a75dd | [
"Apache-2.0"
] | null | null | null | hack/examples/python/sentiments/sentiments.py | ilaykav/nuclio | 23a65b9f5c9e00afccbfbc62cd2a4dd2cc8a75dd | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The Nuclio Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | 30.767442 | 111 | 0.721844 |
e9f7cea197f517cec2cbd809a57d3dcde8bc48fa | 1,636 | py | Python | crawler/src/map_client/kakao_map_client.py | HVHO/holiday-pharmacy | e641dca93ed0cc0e3ffa28f54a1da6a86c1cfe22 | [
"MIT"
] | null | null | null | crawler/src/map_client/kakao_map_client.py | HVHO/holiday-pharmacy | e641dca93ed0cc0e3ffa28f54a1da6a86c1cfe22 | [
"MIT"
] | null | null | null | crawler/src/map_client/kakao_map_client.py | HVHO/holiday-pharmacy | e641dca93ed0cc0e3ffa28f54a1da6a86c1cfe22 | [
"MIT"
] | null | null | null | import requests
| 33.387755 | 94 | 0.590465 |
e9f9eaf439178a9738f5c3bed675e41c46a5be64 | 404 | py | Python | main.py | Alenx58/python-mysql-elasticsearch | a5deb16dcfce6d37c9c4a076f7ec6ff84ca967c3 | [
"MIT"
] | 1 | 2021-04-27T06:32:18.000Z | 2021-04-27T06:32:18.000Z | main.py | Alenx58/python-mysql-elasticsearch | a5deb16dcfce6d37c9c4a076f7ec6ff84ca967c3 | [
"MIT"
] | null | null | null | main.py | Alenx58/python-mysql-elasticsearch | a5deb16dcfce6d37c9c4a076f7ec6ff84ca967c3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Author : Alenx.Hai <alenx.hai@gmail.com>
# created time: 2020/12/21-10:49
import asyncio
from src.mysql_elastic import MySQLElasticSearch
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(asyncio.wait([main()]))
| 21.263158 | 51 | 0.707921 |
e9fbb4ffd34a72b02bcdf9fee23d69719622bfd4 | 397 | py | Python | PythonDesafios/d107/teste.py | adaatii/Python-Curso-em-Video- | 30b37713b3685469558babb93b557b53210f010c | [
"MIT"
] | null | null | null | PythonDesafios/d107/teste.py | adaatii/Python-Curso-em-Video- | 30b37713b3685469558babb93b557b53210f010c | [
"MIT"
] | null | null | null | PythonDesafios/d107/teste.py | adaatii/Python-Curso-em-Video- | 30b37713b3685469558babb93b557b53210f010c | [
"MIT"
] | null | null | null | # Crie um mdulo chamado moeda.py que tenha as funes incorporadas aumentar(), diminuir(), dobro() e metade(). Faa
# tambm um programa que importe esse mdulo e use algumas dessas funes.
import moeda
p = float(input('Digite o preo: '))
print(f'A metade do {p} R${moeda.metade(p)}')
print(f'O dobro de {p} R${moeda.dobro... | 36.090909 | 116 | 0.702771 |
e9fc3b08d76230c48ce220e58abe719b3c7d3fe9 | 3,024 | py | Python | homeassistant/components/homekit/covers.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/homekit/covers.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/homekit/covers.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | """Class to hold all cover accessories."""
import logging
from homeassistant.components.cover import ATTR_CURRENT_POSITION
from homeassistant.helpers.event import async_track_state_change
from . import TYPES
from .accessories import HomeAccessory, add_preload_service
from .const import (
SERV_WINDOW_COVERING, CHA... | 36.878049 | 75 | 0.67791 |
e9fce1f0a0567c478c06135a1b26bb39e2c00202 | 5,888 | py | Python | plotter/hysplit_reader_long.py | yosukefk/plotter | 16127ee7fc3105c717e92875ee3d61477bd41533 | [
"MIT"
] | null | null | null | plotter/hysplit_reader_long.py | yosukefk/plotter | 16127ee7fc3105c717e92875ee3d61477bd41533 | [
"MIT"
] | 6 | 2021-05-25T15:51:27.000Z | 2021-08-18T20:39:41.000Z | plotter/hysplit_reader_long.py | yosukefk/plotter | 16127ee7fc3105c717e92875ee3d61477bd41533 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import datetime
import pytz
from pathlib import Path
import warnings
from io import IOBase
from . import calpost_reader
calpost_cat = calpost_reader.calpost_cat
def hysplit_reader_long(f, tslice=slice(None, None), x=None, y=None, z=None,
rdx_map=None):
... | 33.078652 | 112 | 0.529552 |
e9fce58b8db982ac1059efc2000a44b8a6f0d6b6 | 1,094 | py | Python | tests/UserTest/test_user_db.py | brijeshb42/flask-web | a859fb68fe0eedf5ee872767d107f95a4e6f4856 | [
"MIT"
] | 14 | 2015-02-20T18:31:33.000Z | 2020-12-23T02:33:05.000Z | tests/UserTest/test_user_db.py | brijeshb42/flask-web | a859fb68fe0eedf5ee872767d107f95a4e6f4856 | [
"MIT"
] | 2 | 2015-02-21T18:49:12.000Z | 2015-10-06T18:10:30.000Z | tests/UserTest/test_user_db.py | brijeshb42/yapper | a859fb68fe0eedf5ee872767d107f95a4e6f4856 | [
"MIT"
] | 10 | 2015-02-21T11:06:57.000Z | 2022-02-21T01:25:34.000Z | import unittest
from yapper import create_app, db
from yapper.blueprints.user.models import User, Role
| 30.388889 | 69 | 0.637112 |
e9fd5e9401ba6d04c5d4bf4d42d343bc34357a32 | 2,880 | py | Python | CIM16/IEC61970/Generation/Production/StartIgnFuelCurve.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM16/IEC61970/Generation/Production/StartIgnFuelCurve.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | null | null | null | CIM16/IEC61970/Generation/Production/StartIgnFuelCurve.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 1 | 2021-04-02T18:04:49.000Z | 2021-04-02T18:04:49.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 45 | 309 | 0.720833 |
e9fe99f79d22866cd1c3d457b72379bf7128ed8c | 122,030 | py | Python | Line/beijing_aqi.py | Hansz00/pyecharts-gallery | a0a16d980e9d4f7d355c5ada938614579ee8d461 | [
"MIT"
] | 1 | 2020-08-25T07:41:10.000Z | 2020-08-25T07:41:10.000Z | Line/beijing_aqi.py | Hansz00/pyecharts-gallery | a0a16d980e9d4f7d355c5ada938614579ee8d461 | [
"MIT"
] | null | null | null | Line/beijing_aqi.py | Hansz00/pyecharts-gallery | a0a16d980e9d4f7d355c5ada938614579ee8d461 | [
"MIT"
] | 1 | 2022-03-10T09:05:44.000Z | 2022-03-10T09:05:44.000Z | import pyecharts.options as opts
from pyecharts.charts import Line
"""
Gallery pyecharts 1.1.0
: https://echarts.baidu.com/examples/editor.html?c=line-aqi
:
1dataZoom Y
"""
all_data = [
["2000-06-05", 116],
["2000-06-06", 129],
["2000-06-07", 135],
["2000-06-08", 86],
["2000-06-09", 73],
... | 24.410882 | 63 | 0.426575 |
e9ff12848b4786dd9b5181f046c3b8596891ad5d | 1,416 | py | Python | test_scripts/test_stack_and_visualize.py | jakevdp/spheredb | e5e5ff8b8902459b3f38a1a413a712ac1695accc | [
"BSD-3-Clause"
] | 1 | 2021-08-29T06:01:28.000Z | 2021-08-29T06:01:28.000Z | test_scripts/test_stack_and_visualize.py | jakevdp/spheredb | e5e5ff8b8902459b3f38a1a413a712ac1695accc | [
"BSD-3-Clause"
] | null | null | null | test_scripts/test_stack_and_visualize.py | jakevdp/spheredb | e5e5ff8b8902459b3f38a1a413a712ac1695accc | [
"BSD-3-Clause"
] | 2 | 2018-08-03T20:27:35.000Z | 2021-08-29T06:01:30.000Z | """
Stacking and Visualizing
------------------------
This script does the following:
1. Input LSST images, warp to sparse matrix, store as scidb arrays.
This tests the warping of a single LSST exposure into a sparse matrix
representation of a HEALPix grid.
"""
import os
import sys
import glob
import matplotlib.pyplo... | 27.230769 | 70 | 0.664548 |
18007f3ffa7e153ffa5c57f5301a0d773f024cb8 | 307 | py | Python | Problem/PeopleFund/concatenate.py | yeojin-dev/coding-test | 30ce8507838beaa9232c6fc6c62a7dcb62d51464 | [
"MIT"
] | 2 | 2018-07-11T08:13:06.000Z | 2018-07-11T08:47:12.000Z | Problem/PeopleFund/concatenate.py | yeojin-dev/coding-test | 30ce8507838beaa9232c6fc6c62a7dcb62d51464 | [
"MIT"
] | null | null | null | Problem/PeopleFund/concatenate.py | yeojin-dev/coding-test | 30ce8507838beaa9232c6fc6c62a7dcb62d51464 | [
"MIT"
] | null | null | null | import numpy as np
sizes = list(map(int, input().split()))
arr1 = list()
arr2 = list()
for _ in range(sizes[0]):
arr1.append(list(map(int, input().split())))
for _ in range(sizes[1]):
arr2.append(list(map(int, input().split())))
print(np.concatenate((np.array(arr1), np.array(arr2)), axis=0))
| 19.1875 | 63 | 0.635179 |
18012d97d113307f75b71fea1cea0948b4e7a4b1 | 28,941 | py | Python | tests/test_splitname.py | goerz/bibdeskparser | 4f60f9960f6f0156c2f3c89033065c4e121800ab | [
"BSD-3-Clause"
] | null | null | null | tests/test_splitname.py | goerz/bibdeskparser | 4f60f9960f6f0156c2f3c89033065c4e121800ab | [
"BSD-3-Clause"
] | null | null | null | tests/test_splitname.py | goerz/bibdeskparser | 4f60f9960f6f0156c2f3c89033065c4e121800ab | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from bibdeskparser.customization import InvalidName, splitname
splitname_test_cases = (
(
r'Per Brinch Hansen',
{'first': ['Per', 'Brinch'], 'von': [], 'last': ['Hansen'], 'jr': []},
),
(
r'Brinch Hansen, Per',
... | 27.174648 | 98 | 0.338171 |
1801df02ecd58a8f78ca27f271870b89690c5eb0 | 1,349 | py | Python | db_model.py | Build-Week-Saltiest-Hacker/machine-learning | 1822e2ecdca8279bc49095f6da527152e298b95d | [
"MIT"
] | null | null | null | db_model.py | Build-Week-Saltiest-Hacker/machine-learning | 1822e2ecdca8279bc49095f6da527152e298b95d | [
"MIT"
] | null | null | null | db_model.py | Build-Week-Saltiest-Hacker/machine-learning | 1822e2ecdca8279bc49095f6da527152e298b95d | [
"MIT"
] | null | null | null | # schema for SQL database
from data import app, db
| 31.372093 | 74 | 0.604151 |
1804da1fa980c8e71b8a65bd6282db015d7cd076 | 2,608 | py | Python | acl/utils.py | stjordanis/aspect-document-similarity | ca17e0a8730caa224b0efe8909b1e5a87bb456ea | [
"MIT"
] | 47 | 2020-10-14T09:28:39.000Z | 2022-03-01T01:54:32.000Z | acl/utils.py | stjordanis/aspect-document-similarity | ca17e0a8730caa224b0efe8909b1e5a87bb456ea | [
"MIT"
] | 2 | 2021-11-21T20:07:10.000Z | 2022-02-10T09:25:40.000Z | acl/utils.py | stjordanis/aspect-document-similarity | ca17e0a8730caa224b0efe8909b1e5a87bb456ea | [
"MIT"
] | 8 | 2020-11-07T08:43:01.000Z | 2022-02-15T05:45:13.000Z | import re
import logging
logger = logging.getLogger(__name__)
def get_text_from_doc(doc) -> str:
"""
Build document text from title + abstract
:param doc: S2 paper
:return: Document text
"""
text = ''
if 'title' in doc:
text += doc['title']
if doc['abstract']:
... | 26.612245 | 84 | 0.536426 |
1805a8be23b715a568fd9d510dee5510be26a4d2 | 995 | py | Python | build-a-django-content-aggregator/source_code_step_2/podcasts/tests.py | syberflea/materials | 54f44725b40edf00c1b523d7a85b34a85014d7eb | [
"MIT"
] | 3,682 | 2018-05-07T19:45:24.000Z | 2022-03-31T15:19:10.000Z | build-a-django-content-aggregator/source_code_step_2/podcasts/tests.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 148 | 2018-05-15T21:18:49.000Z | 2022-03-21T11:25:39.000Z | build-a-django-content-aggregator/source_code_step_2/podcasts/tests.py | sribarrow/materials | c17c4a4d6f8487e59eac1df8c88ca92b73d6d2a5 | [
"MIT"
] | 5,535 | 2018-05-25T23:36:08.000Z | 2022-03-31T16:55:52.000Z | from django.test import TestCase
from django.utils import timezone
from .models import Episode
| 34.310345 | 78 | 0.639196 |
18062b275cb72a752756840a4bbb8ef63a17377e | 4,114 | py | Python | superset/migrations/versions/070c043f2fdb_add_granularity_to_charts_where_missing.py | razzius/superset | 93f59e055e8312fb28687bc9fc22342b4be68d0e | [
"Apache-2.0"
] | 18,621 | 2017-06-19T09:57:44.000Z | 2021-01-05T06:28:21.000Z | superset/migrations/versions/070c043f2fdb_add_granularity_to_charts_where_missing.py | changeiot/superset | 299b5dc64448d04abe6b35ee85fbd2b938c781bc | [
"Apache-2.0"
] | 9,043 | 2017-07-05T16:10:48.000Z | 2021-01-05T17:58:01.000Z | superset/migrations/versions/070c043f2fdb_add_granularity_to_charts_where_missing.py | changeiot/superset | 299b5dc64448d04abe6b35ee85fbd2b938c781bc | [
"Apache-2.0"
] | 5,527 | 2017-07-06T01:39:43.000Z | 2021-01-05T06:01:11.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... | 30.474074 | 91 | 0.645357 |
1806f8b39a3aeab210ed874956e25e9bd4d01444 | 325 | py | Python | AtCoder/ABC/B/page-13/090B.py | Nishi05/Competitive-programming | e59a6755b706d9d5c1f359f4511d92c114e6a94e | [
"MIT"
] | null | null | null | AtCoder/ABC/B/page-13/090B.py | Nishi05/Competitive-programming | e59a6755b706d9d5c1f359f4511d92c114e6a94e | [
"MIT"
] | null | null | null | AtCoder/ABC/B/page-13/090B.py | Nishi05/Competitive-programming | e59a6755b706d9d5c1f359f4511d92c114e6a94e | [
"MIT"
] | null | null | null | # A B
# 0 10
#
#
a, b = map(int, input().split())
cnt = 0
for i in range(a, b+1):
s = str(i)
s_r = s[::-1]
n = int(len(str(s))/2)
if s[: n] == s_r[:n]:
cnt += 1
print(cnt)
| 23.214286 | 42 | 0.609231 |
18070effada07af1c287eb2501ebc5c7848149ff | 2,499 | py | Python | __init__.py | kotn3l/blender-flver | 3476d720337a6d7a28bd55f9b112524c0f61581d | [
"MIT"
] | 11 | 2020-04-28T03:21:13.000Z | 2022-03-23T13:18:33.000Z | __init__.py | kotn3l/blender-flver | 3476d720337a6d7a28bd55f9b112524c0f61581d | [
"MIT"
] | 2 | 2021-06-28T07:44:42.000Z | 2022-03-18T00:47:42.000Z | __init__.py | elizagamedev/blender-flver | 25cc152de19acb4028035d3ed389706df25e094a | [
"MIT"
] | 2 | 2021-12-23T13:31:57.000Z | 2022-03-16T06:30:13.000Z | bl_info = {
"name": "Import Fromsoft FLVER models",
"description":
"Import models from various Fromsoft games such as Dark Souls",
"author": "Eliza Velasquez",
"version": (0, 1, 0),
"blender": (2, 80, 0),
"category": "Import-Export",
"location": "File > Import",
"warning": "... | 30.47561 | 74 | 0.620648 |
1809819c2d6283b15f8fc4c9f611ea65d6e320d3 | 32,193 | py | Python | plugin.video.vstream/resources/lib/gui/gui.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 2 | 2018-11-02T19:55:30.000Z | 2020-08-14T02:22:20.000Z | plugin.video.vstream/resources/lib/gui/gui.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | null | null | null | plugin.video.vstream/resources/lib/gui/gui.py | akuala/REPO.KUALA | ea9a157025530d2ce8fa0d88431c46c5352e89d4 | [
"Apache-2.0"
] | 3 | 2019-12-17T20:47:00.000Z | 2021-02-11T19:03:59.000Z | # -*- coding: utf-8 -*-
# https://github.com/Kodi-vStream/venom-xbmc-addons
from resources.lib.gui.contextElement import cContextElement
from resources.lib.gui.guiElement import cGuiElement
from resources.lib.db import cDb
from resources.lib.handler.outputParameterHandler import cOutputParameterHandler
from resources.l... | 42.192661 | 178 | 0.671916 |
1809e4f7973197265ce5a6a201169c2856659885 | 1,555 | py | Python | src/jt/rubicon/java/_typemanager.py | karpierz/jtypes.rubicon | 8f8196e47de93183eb9728fec0d08725fc368ee0 | [
"BSD-3-Clause"
] | 2 | 2018-11-29T06:19:05.000Z | 2018-12-09T09:47:55.000Z | src/jt/rubicon/java/_typemanager.py | karpierz/jtypes.rubicon | 8f8196e47de93183eb9728fec0d08725fc368ee0 | [
"BSD-3-Clause"
] | null | null | null | src/jt/rubicon/java/_typemanager.py | karpierz/jtypes.rubicon | 8f8196e47de93183eb9728fec0d08725fc368ee0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016-2019, Adam Karpierz
# Licensed under the BSD license
# http://opensource.org/licenses/BSD-3-Clause
from ...jvm.lib.compat import *
from ...jvm.lib import annotate
from ...jvm.lib import public
from ._typehandler import * # noqa
| 28.272727 | 82 | 0.652733 |
180ba7fe8e58c4e3cae590b1f061d367ca5c9d22 | 63,592 | py | Python | rest/models.py | istarnes/restit | 24d2805ab68696cab7718cc1164b7f716582ffb7 | [
"0BSD"
] | null | null | null | rest/models.py | istarnes/restit | 24d2805ab68696cab7718cc1164b7f716582ffb7 | [
"0BSD"
] | null | null | null | rest/models.py | istarnes/restit | 24d2805ab68696cab7718cc1164b7f716582ffb7 | [
"0BSD"
] | null | null | null | import os
from django.conf import settings
from django.core.exceptions import FieldDoesNotExist
from hashids import Hashids
import hashlib
import string
from datetime import datetime, date, timedelta
from decimal import Decimal
TWOPLACES = Decimal(10) ** -2
from django.db import models
from django.apps import apps
ge... | 40.146465 | 152 | 0.544754 |
180d1820c70ce1e075a46251cae4f2ab29f2929f | 803 | py | Python | examples/rp_analytics.py | eirrgang/radical.pilot | ceccd1867dd172935d602ff4c33a5ed4467e0dc8 | [
"MIT"
] | 47 | 2015-03-16T01:08:11.000Z | 2022-02-02T10:36:39.000Z | examples/rp_analytics.py | eirrgang/radical.pilot | ceccd1867dd172935d602ff4c33a5ed4467e0dc8 | [
"MIT"
] | 1,856 | 2015-01-02T09:32:20.000Z | 2022-03-31T21:45:06.000Z | examples/rp_analytics.py | eirrgang/radical.pilot | ceccd1867dd172935d602ff4c33a5ed4467e0dc8 | [
"MIT"
] | 28 | 2015-06-10T18:15:14.000Z | 2021-11-07T04:36:45.000Z | #!/usr/bin/env python3
__copyright__ = 'Copyright 2013-2016, http://radical.rutgers.edu'
__license__ = 'MIT'
import sys
import radical.utils as ru
import radical.pilot as rp
rpu = rp.utils
# ------------------------------------------------------------------------------
#
if __name__ == '__main__':
if len(sy... | 18.25 | 80 | 0.495641 |
180d3a3f60ca987d84a73cb66042ea85d5cffea9 | 758 | py | Python | tests/contrib/django/testapp/middleware.py | mvas/apm-agent-python | f4582e90eb5308b915ca51e2e98620fc22af09ec | [
"BSD-3-Clause"
] | null | null | null | tests/contrib/django/testapp/middleware.py | mvas/apm-agent-python | f4582e90eb5308b915ca51e2e98620fc22af09ec | [
"BSD-3-Clause"
] | null | null | null | tests/contrib/django/testapp/middleware.py | mvas/apm-agent-python | f4582e90eb5308b915ca51e2e98620fc22af09ec | [
"BSD-3-Clause"
] | null | null | null | try:
from django.utils.deprecation import MiddlewareMixin
except ImportError:
# no-op class for Django < 1.10
| 27.071429 | 56 | 0.740106 |
180dd0f316d9175e1decc0de1732de58c97bdcf4 | 3,874 | py | Python | run.py | Yvonne-Ouma/Password-Locker | b16f8e9ee36d3cb70eefb58bf7be2de1bb1948fc | [
"MIT"
] | null | null | null | run.py | Yvonne-Ouma/Password-Locker | b16f8e9ee36d3cb70eefb58bf7be2de1bb1948fc | [
"MIT"
] | null | null | null | run.py | Yvonne-Ouma/Password-Locker | b16f8e9ee36d3cb70eefb58bf7be2de1bb1948fc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.6
from user import User
from credential import Credential
def createUser(userName,password):
'''
Function to create a new user
'''
newUser = User(userName,password)
return newUser
def saveUsers(user):
'''
Function to save users
'''
user.saveUser()
def save... | 27.28169 | 177 | 0.558596 |
180e054f46ac36903917c85a5ca1fbddc3d6ad0b | 844 | py | Python | soundrts/constants.py | ctoth/soundrts | 1a1271182d53c16d3e29f5dc8f8e987415a9467b | [
"BSD-3-Clause"
] | null | null | null | soundrts/constants.py | ctoth/soundrts | 1a1271182d53c16d3e29f5dc8f8e987415a9467b | [
"BSD-3-Clause"
] | null | null | null | soundrts/constants.py | ctoth/soundrts | 1a1271182d53c16d3e29f5dc8f8e987415a9467b | [
"BSD-3-Clause"
] | null | null | null | # constants used in more than one module
# Some of them might find a better home later.
from lib.nofloat import PRECISION
MAIN_METASERVER_URL = open("cfg/metaserver.txt").read().strip()
# old value used by some features (stats, ...)
METASERVER_URL = "http://jlpo.free.fr/soundrts/metaserver/"
# simulation
VIRTUAL_T... | 25.575758 | 63 | 0.755924 |
180efba78897c0fa073f01ffc1050d72acb958e1 | 9,104 | py | Python | Modules/Attention/Steps.py | ishine/GST_Tacotron | 0c3d8e51042dc5d49abc842b59a13ea70f927f9d | [
"MIT"
] | 21 | 2020-02-23T03:35:27.000Z | 2021-11-01T11:08:18.000Z | Modules/Attention/Steps.py | ishine/GST_Tacotron | 0c3d8e51042dc5d49abc842b59a13ea70f927f9d | [
"MIT"
] | 6 | 2020-03-14T15:43:38.000Z | 2021-07-06T09:06:57.000Z | Modules/Attention/Steps.py | ishine/GST_Tacotron | 0c3d8e51042dc5d49abc842b59a13ea70f927f9d | [
"MIT"
] | 7 | 2020-03-07T11:33:09.000Z | 2021-11-28T16:19:01.000Z | import tensorflow as tf
import numpy as np
'''
TF 2.0's basic attention layers(Attention and AdditiveAttention) calculate parallelly.
TO USE MONOTONIC FUNCTION, ATTENTION MUST KNOW 'n-1 ALIGNMENT'.
Thus, this parallel versions do not support the monotonic function.
''' | 39.755459 | 161 | 0.611819 |
180f8229eeb538cba11111f51d0cfaabcfe979dc | 14,002 | py | Python | test.py | gmberton/deep-visual-geo-localization-benchmark | 7ac395411b7eeff99da66675dedc5372839e5632 | [
"MIT"
] | 1 | 2022-03-25T06:48:16.000Z | 2022-03-25T06:48:16.000Z | test.py | gmberton/deep-visual-geo-localization-benchmark | 7ac395411b7eeff99da66675dedc5372839e5632 | [
"MIT"
] | null | null | null | test.py | gmberton/deep-visual-geo-localization-benchmark | 7ac395411b7eeff99da66675dedc5372839e5632 | [
"MIT"
] | null | null | null |
import faiss
import torch
import logging
import numpy as np
from tqdm import tqdm
from torch.utils.data import DataLoader
from torch.utils.data.dataset import Subset
def test_efficient_ram_usage(args, eval_ds, model, test_method="hard_resize"):
"""This function gives the same output as test(), but uses much less... | 54.909804 | 121 | 0.644337 |
18107664baf7404f0465f06470c192a8803624ac | 355 | py | Python | insertionsort.py | emcd123/Matroids | f1ab7a5164a60b753ba429ef7ba9ce36517d4439 | [
"MIT"
] | null | null | null | insertionsort.py | emcd123/Matroids | f1ab7a5164a60b753ba429ef7ba9ce36517d4439 | [
"MIT"
] | null | null | null | insertionsort.py | emcd123/Matroids | f1ab7a5164a60b753ba429ef7ba9ce36517d4439 | [
"MIT"
] | 1 | 2021-11-21T18:03:07.000Z | 2021-11-21T18:03:07.000Z | import random
li=[]
for i in range(10):#creating a random list using code from blackboard
li=li+[random.randrange(0,50)]
print(li)
print(insertionSort(li))
#print(li)
| 18.684211 | 69 | 0.630986 |
1810948fff7ddb4956a7253f2de040223223f990 | 1,442 | py | Python | python-packages/hyperopt-0.0.2/hyperopt/tests/test_fmin.py | rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | ee45bee6f96cdb6d91184abc16f41bba1546c943 | [
"BSD-3-Clause"
] | 2 | 2017-08-13T14:09:32.000Z | 2018-07-16T23:39:00.000Z | python-packages/hyperopt-0.0.2/hyperopt/tests/test_fmin.py | rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | ee45bee6f96cdb6d91184abc16f41bba1546c943 | [
"BSD-3-Clause"
] | null | null | null | python-packages/hyperopt-0.0.2/hyperopt/tests/test_fmin.py | rajegannathan/grasp-lift-eeg-cat-dog-solution-updated | ee45bee6f96cdb6d91184abc16f41bba1546c943 | [
"BSD-3-Clause"
] | 2 | 2018-04-02T06:45:11.000Z | 2018-07-16T23:39:02.000Z | import nose.tools
from hyperopt import fmin, rand, tpe, hp, Trials, exceptions, space_eval
| 23.258065 | 72 | 0.489598 |
1810ed3f25b77f5724cfa46b09080dd25d3ba89c | 737 | py | Python | aaweb/__init__.py | cpelite/astorian-airways | 55498f308de7a4b8159519e191b492675ec5612a | [
"CC0-1.0"
] | null | null | null | aaweb/__init__.py | cpelite/astorian-airways | 55498f308de7a4b8159519e191b492675ec5612a | [
"CC0-1.0"
] | null | null | null | aaweb/__init__.py | cpelite/astorian-airways | 55498f308de7a4b8159519e191b492675ec5612a | [
"CC0-1.0"
] | 3 | 2020-04-14T20:46:50.000Z | 2021-03-11T19:07:20.000Z | # -*- coding: utf-8 -*-
import os
from datetime import timedelta
from flask import Flask, session
default_timezone = 'Europe/Berlin'
app = Flask(__name__, static_folder='../static', static_url_path='/static', template_folder="../templates/")
app.permanent_session_lifetime = timedelta(minutes=60)
app.config.update(... | 20.472222 | 108 | 0.738128 |
1812cc808e8b51d1262a39abd3b6e4c2337c6ac5 | 1,528 | py | Python | Examples/Segmentation/WatershedSegmentation1.py | nalinimsingh/ITK_4D | 95a2eacaeaffe572889832ef0894239f89e3f303 | [
"Apache-2.0"
] | 3 | 2018-10-01T20:46:17.000Z | 2019-12-17T19:39:50.000Z | Examples/Segmentation/WatershedSegmentation1.py | nalinimsingh/ITK_4D | 95a2eacaeaffe572889832ef0894239f89e3f303 | [
"Apache-2.0"
] | null | null | null | Examples/Segmentation/WatershedSegmentation1.py | nalinimsingh/ITK_4D | 95a2eacaeaffe572889832ef0894239f89e3f303 | [
"Apache-2.0"
] | 4 | 2018-05-17T16:34:54.000Z | 2020-09-24T02:12:40.000Z | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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
#
# ... | 33.217391 | 78 | 0.676702 |
1815ed2b6c358f6414fe0404d22b0c279e749b59 | 1,520 | py | Python | study_roadmaps/python_sample_examples/gluon/3_aux_functions/train.py | Shreyashwaghe/monk_v1 | 4ee4d9483e8ffac9b73a41f3c378e5abf5fc799b | [
"Apache-2.0"
] | 7 | 2020-07-26T08:37:29.000Z | 2020-10-30T10:23:11.000Z | study_roadmaps/python_sample_examples/gluon/3_aux_functions/train.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | 9 | 2020-01-28T21:40:39.000Z | 2022-02-10T01:24:06.000Z | study_roadmaps/python_sample_examples/gluon/3_aux_functions/train.py | mursalfk/monk_v1 | 62f34a52f242772186ffff7e56764e958fbcd920 | [
"Apache-2.0"
] | 1 | 2020-10-07T12:57:44.000Z | 2020-10-07T12:57:44.000Z | import os
import sys
sys.path.append("../../../monk/");
import psutil
from gluon_prototype import prototype
gtf = prototype(verbose=1);
gtf.Prototype("sample-project-1", "sample-experiment-1");
gtf.Default(dataset_path="../../../monk/system_check_tests/datasets/dataset_cats_dogs_train",
model_name="resnet... | 33.043478 | 131 | 0.309211 |
18173f17dd015c09e3b1cfc44c736b20bfea7170 | 126 | py | Python | ppa-mirror/config.py | elprup/ppa-mirror | 29e8a5027bbb698fcb36a250484b08ea945f65cf | [
"MIT"
] | null | null | null | ppa-mirror/config.py | elprup/ppa-mirror | 29e8a5027bbb698fcb36a250484b08ea945f65cf | [
"MIT"
] | null | null | null | ppa-mirror/config.py | elprup/ppa-mirror | 29e8a5027bbb698fcb36a250484b08ea945f65cf | [
"MIT"
] | 1 | 2021-03-04T13:43:34.000Z | 2021-03-04T13:43:34.000Z | cache_root = '/home/ubuntu/ppa-mirror/cache/'
mirror_root = '/home/ubuntu/ppa-mirror/repo'
http_proxy = "188.112.194.222:8080" | 42 | 45 | 0.746032 |
181aa4e686c7e2eb75b68979882bfaab2af06de9 | 3,031 | py | Python | downloader.py | tuxetuxe/downloader | 76a1ac01189a6946b15ac6f58661931551dfc0ef | [
"Apache-2.0"
] | 3 | 2016-11-09T13:02:46.000Z | 2020-06-04T10:38:11.000Z | downloader.py | tuxetuxe/downloader | 76a1ac01189a6946b15ac6f58661931551dfc0ef | [
"Apache-2.0"
] | null | null | null | downloader.py | tuxetuxe/downloader | 76a1ac01189a6946b15ac6f58661931551dfc0ef | [
"Apache-2.0"
] | null | null | null | import sys, getopt
import sched
import time
import csv
from pprint import pprint
import urllib, urllib2
from random import randint
import threading
proxies_file = ""
targets_file = ""
proxies = []
targets = []
scheduler = sched.scheduler(time.time, time.sleep)
if __name__ == "__main__":
main(sys.argv[1... | 25.470588 | 88 | 0.626856 |
181b018a34f9e83a9ca0468d516a71155390ba8b | 1,799 | py | Python | backend/api/views/utils.py | pm5/Disfactory | 2cceec2544b1bd5bb624882be626494d54a08119 | [
"MIT"
] | null | null | null | backend/api/views/utils.py | pm5/Disfactory | 2cceec2544b1bd5bb624882be626494d54a08119 | [
"MIT"
] | null | null | null | backend/api/views/utils.py | pm5/Disfactory | 2cceec2544b1bd5bb624882be626494d54a08119 | [
"MIT"
] | null | null | null | import random
from django.conf import settings
from django.db.models import Prefetch
from django.db.models.functions.math import Radians, Cos, ACos, Sin
from ..models import Factory, ReportRecord, Image, Document
def _get_nearby_factories(latitude, longitude, radius):
"""Return nearby factories based on positi... | 36.714286 | 125 | 0.692051 |
181cfdf188f95cef8715790def585eab0fdb4f44 | 886 | py | Python | tests/test_pyros_schemas/test_decorators.py | pyros-dev/pyros-schemas | a460920260ee77a1b5b6d5c0b97df52f1572ff79 | [
"MIT"
] | 3 | 2018-01-01T17:10:16.000Z | 2018-11-15T15:41:46.000Z | tests/test_pyros_schemas/test_decorators.py | pyros-dev/pyros-schemas | a460920260ee77a1b5b6d5c0b97df52f1572ff79 | [
"MIT"
] | 7 | 2018-02-02T10:05:55.000Z | 2018-02-17T15:15:46.000Z | tests/test_pyros_schemas/test_decorators.py | pyros-dev/pyros-schemas | a460920260ee77a1b5b6d5c0b97df52f1572ff79 | [
"MIT"
] | 2 | 2017-09-27T09:46:31.000Z | 2018-02-02T09:37:13.000Z | from __future__ import absolute_import
from __future__ import print_function
import pytest
import std_srvs.srv as std_srvs
# public decorators
from pyros_schemas.ros import with_service_schemas
#
# Testing with_service_schemas decorator
#
# Just in case we run this directly
if __name__ == '__main__':
pytest... | 22.717949 | 70 | 0.72912 |
181dd4525734f8cc34fa28f835971bb355463f95 | 516 | py | Python | src/removeElement.py | ianxin/algorithm | 22214b6c81bee926f5a1c74c9417b2e7edd3ceed | [
"MIT"
] | 2 | 2018-03-13T08:59:14.000Z | 2018-03-13T08:59:25.000Z | src/removeElement.py | ianxin/Algorithm | 22214b6c81bee926f5a1c74c9417b2e7edd3ceed | [
"MIT"
] | null | null | null | src/removeElement.py | ianxin/Algorithm | 22214b6c81bee926f5a1c74c9417b2e7edd3ceed | [
"MIT"
] | null | null | null | """
@param: A: A list of integers
@param: elem: An integer
@return: The new length after remove
"""
#list
#list list
| 23.454545 | 40 | 0.484496 |
181e8052c8ceced20aed0b9306fa76476c4461fb | 2,057 | py | Python | setup.py | codespider/flagon | d94a50844025ea88fd67dc7651c4a860c3be6d1a | [
"MIT"
] | 3 | 2018-08-29T19:01:10.000Z | 2018-09-14T16:07:30.000Z | setup.py | codespider/flagon | d94a50844025ea88fd67dc7651c4a860c3be6d1a | [
"MIT"
] | 8 | 2018-08-24T08:56:09.000Z | 2018-09-15T11:13:27.000Z | setup.py | codespider/flagon | d94a50844025ea88fd67dc7651c4a860c3be6d1a | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import io
from collections import OrderedDict
with io.open('README.rst', 'rt', encoding='utf8') as f:
readme = f.read()
setup(
name='Flask-Wired',
version=get_version(),
license='MIT',
author='Karthikkannan Maruthamuthu',
author_email='karthikkanna... | 31.646154 | 80 | 0.616918 |
181ed57e3eb39153ad141aa8f03aeb15ee7f7127 | 510 | py | Python | idManager/view/authentication_view.py | lgarciasbr/idm-api | 3517d29d55eb2a06fb5b4b21359b6cf6d11529a0 | [
"Apache-2.0"
] | 2 | 2018-01-14T22:43:43.000Z | 2018-01-14T22:43:48.000Z | idManager/view/authentication_view.py | lgarciasbr/idm-api | 3517d29d55eb2a06fb5b4b21359b6cf6d11529a0 | [
"Apache-2.0"
] | null | null | null | idManager/view/authentication_view.py | lgarciasbr/idm-api | 3517d29d55eb2a06fb5b4b21359b6cf6d11529a0 | [
"Apache-2.0"
] | null | null | null | from flask import jsonify
| 25.5 | 90 | 0.721569 |
181efed1a7997edb4c8e051cadb0058f5afd1105 | 604 | py | Python | setup.py | TheSriram/deuce | 9e8a7a342275aa02d0a59953b5a8c96ffb760b51 | [
"Apache-2.0"
] | null | null | null | setup.py | TheSriram/deuce | 9e8a7a342275aa02d0a59953b5a8c96ffb760b51 | [
"Apache-2.0"
] | null | null | null | setup.py | TheSriram/deuce | 9e8a7a342275aa02d0a59953b5a8c96ffb760b51 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
REQUIRES = ['six', 'pecan', 'setuptools >= 1.1.6',
'cassandra-driver', 'pymongo']
setup(
name='deuce',
... | 25.166667 | 66 | 0.680464 |
1820ae4e6fd68c69f37f4266bffb6793e643a89a | 6,580 | py | Python | script.py | rahulkmr1/heroku-python-script | 053be38dc8c6c6ab9929ca5af772d19c57f5e498 | [
"MIT"
] | null | null | null | script.py | rahulkmr1/heroku-python-script | 053be38dc8c6c6ab9929ca5af772d19c57f5e498 | [
"MIT"
] | null | null | null | script.py | rahulkmr1/heroku-python-script | 053be38dc8c6c6ab9929ca5af772d19c57f5e498 | [
"MIT"
] | null | null | null | import telepot
import time
import requests
from bs4 import BeautifulSoup as bs
import cPickle
import csv
RAHUL_ID = 931906767
# You can leave this bit out if you're using a paid PythonAnywhere account
# proxy_url = "http://proxy.server:3128"
# telepot.api._pools = {
# 'default': urllib3.ProxyManager(proxy_url=pro... | 25.019011 | 173 | 0.655623 |
1824cd98e77d7661e6eb7f082d5655ec1a45fa19 | 1,607 | py | Python | examples/4-tensorflow-mnist/tensorflow_mnist/train.py | awcchungster/baklava | ad301afd7aa163ccf662efe08d00eeff68cdb667 | [
"Apache-2.0"
] | 3 | 2021-08-24T03:10:14.000Z | 2022-01-07T20:53:37.000Z | examples/4-tensorflow-mnist/tensorflow_mnist/train.py | awcchungster/baklava | ad301afd7aa163ccf662efe08d00eeff68cdb667 | [
"Apache-2.0"
] | 5 | 2021-07-15T20:19:26.000Z | 2021-08-18T23:26:46.000Z | examples/4-tensorflow-mnist/tensorflow_mnist/train.py | LaudateCorpus1/baklava | 0e029097983db6cea00a7d779b887b149975fbc4 | [
"Apache-2.0"
] | 5 | 2021-07-03T17:46:15.000Z | 2022-02-24T08:05:39.000Z | """
Train
=====
Defines functions which train models and write model artifacts to disk.
"""
from __future__ import print_function
import os
import tempfile
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
from tensorflow_mnist import model, paths
def train(path):
"""
Train... | 26.344262 | 79 | 0.653391 |
18257b1e23725fb3440c7a7dd07da911552a0f1a | 16,942 | py | Python | google/cloud/binaryauthorization/v1/binaryauthorization-v1-py/google/cloud/binaryauthorization_v1/types/resources.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/cloud/binaryauthorization/v1/binaryauthorization-v1-py/google/cloud/binaryauthorization_v1/types/resources.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/cloud/binaryauthorization/v1/binaryauthorization-v1-py/google/cloud/binaryauthorization_v1/types/resources.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 37.986547 | 156 | 0.656416 |
1825d71ce3841cab87835439bc5331f28ba2643a | 4,841 | py | Python | builtinPlugins/plugin_spending.py | jscherer26/Icarra | 5bc8b298ae21dcde7e8e2253b9ed9db95fd0d164 | [
"BSD-3-Clause"
] | 1 | 2021-11-09T04:36:57.000Z | 2021-11-09T04:36:57.000Z | builtinPlugins/plugin_spending.py | jscherer26/Icarra | 5bc8b298ae21dcde7e8e2253b9ed9db95fd0d164 | [
"BSD-3-Clause"
] | null | null | null | builtinPlugins/plugin_spending.py | jscherer26/Icarra | 5bc8b298ae21dcde7e8e2253b9ed9db95fd0d164 | [
"BSD-3-Clause"
] | 2 | 2020-03-28T02:55:19.000Z | 2021-11-09T04:37:08.000Z | # Copyright (c) 2006-2010, Jesse Liesch
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditi... | 33.157534 | 148 | 0.736625 |
18299c6187e63ee39b775b8ca8e59d659c576c75 | 5,913 | py | Python | pyro_examples/dpgmm_full.py | hanyas/pyro_examples | 7c8784bd9ac498cfaf2983da158a8209db21966e | [
"MIT"
] | 1 | 2021-01-05T04:58:10.000Z | 2021-01-05T04:58:10.000Z | pyro_examples/dpgmm_full.py | hanyas/pyro_examples | 7c8784bd9ac498cfaf2983da158a8209db21966e | [
"MIT"
] | null | null | null | pyro_examples/dpgmm_full.py | hanyas/pyro_examples | 7c8784bd9ac498cfaf2983da158a8209db21966e | [
"MIT"
] | null | null | null | import torch
from torch.distributions import Gamma
import torch.nn.functional as F
import matplotlib.pyplot as plt
from tqdm import tqdm
from pyro.distributions import *
import pyro
from pyro.optim import Adam
from pyro.infer import SVI, Trace_ELBO, Predictive
assert pyro.__version__.startswith('1')
pyro.enable_va... | 33.596591 | 121 | 0.641468 |
1829f18c9a4a6999de1f057e3d27520859bfe66b | 539 | py | Python | calplus/tests/unit/v1/test_utils.py | nghiadt16/CALplus | 68c108e6abf7eeac4937b870dc7462dd6ee2fcc3 | [
"Apache-2.0"
] | null | null | null | calplus/tests/unit/v1/test_utils.py | nghiadt16/CALplus | 68c108e6abf7eeac4937b870dc7462dd6ee2fcc3 | [
"Apache-2.0"
] | 4 | 2017-04-05T16:14:07.000Z | 2018-12-14T14:19:15.000Z | calplus/tests/unit/v1/test_utils.py | nghiadt16/CALplus | 68c108e6abf7eeac4937b870dc7462dd6ee2fcc3 | [
"Apache-2.0"
] | 2 | 2017-04-18T16:53:58.000Z | 2018-12-04T05:42:51.000Z | from calplus.tests import base
from calplus.v1 import utils
| 22.458333 | 44 | 0.641929 |
182a6b769a1cd6d38014902642d94977a040e698 | 4,213 | py | Python | luna_pathology/cli/load_slide.py | msk-mind-apps/luna-pathology | f0e17ccfeb3dc93de150aed5bbef9fcd7443d6d0 | [
"Apache-2.0"
] | null | null | null | luna_pathology/cli/load_slide.py | msk-mind-apps/luna-pathology | f0e17ccfeb3dc93de150aed5bbef9fcd7443d6d0 | [
"Apache-2.0"
] | 3 | 2021-07-21T20:28:37.000Z | 2021-08-02T18:52:32.000Z | luna_pathology/cli/load_slide.py | msk-mind-apps/luna-pathology | f0e17ccfeb3dc93de150aed5bbef9fcd7443d6d0 | [
"Apache-2.0"
] | null | null | null |
# General imports
import os, json, logging
import click
from pathlib import Path
import yaml
# From common
from luna_core.common.custom_logger import init_logger
from luna_core.common.DataStore import DataStore_v2
from luna_core.common.Node import Node
from luna_core.common.config import C... | 36.318966 | 137 | 0.657963 |
182ab8edcc4ae73b49deea3cf51426229fb8e5ad | 442 | py | Python | classifiers/CornerDetector.py | Vivek2018/OSM_Building-Detection-Custom-Repo | 278b1f5a46e49cb547162d495979056c36945e43 | [
"MIT"
] | null | null | null | classifiers/CornerDetector.py | Vivek2018/OSM_Building-Detection-Custom-Repo | 278b1f5a46e49cb547162d495979056c36945e43 | [
"MIT"
] | null | null | null | classifiers/CornerDetector.py | Vivek2018/OSM_Building-Detection-Custom-Repo | 278b1f5a46e49cb547162d495979056c36945e43 | [
"MIT"
] | null | null | null | import numpy as np
import cv2
from matplotlib import pyplot as plt
image = cv2.imread('champaigneditedcompressed.png')
kernel = np.ones((20, 20), np.float32) / 25
img = cv2.filter2D(image, -1, kernel)
gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
corners = cv2.goodFeaturesToTrack(gray,10,0.01,10)
corners = np.int0(cor... | 23.263158 | 51 | 0.714932 |
182bb85b10503c8fb7bd8a2c09551b2160fe497c | 25,581 | py | Python | ECUSimulation/io_processing/surveillance_handler.py | arturmrowca/IVNS | 8915142d16debe4af780a9eb6859e44dea2ca7e6 | [
"MIT"
] | null | null | null | ECUSimulation/io_processing/surveillance_handler.py | arturmrowca/IVNS | 8915142d16debe4af780a9eb6859e44dea2ca7e6 | [
"MIT"
] | null | null | null | ECUSimulation/io_processing/surveillance_handler.py | arturmrowca/IVNS | 8915142d16debe4af780a9eb6859e44dea2ca7e6 | [
"MIT"
] | 2 | 2018-08-04T07:43:51.000Z | 2018-12-14T14:59:46.000Z | '''
Created on 12 Jun, 2015
@author: artur.mrowca
'''
from enum import Enum
from PyQt5.Qt import QObject
from PyQt5 import QtCore
from tools.ecu_logging import ECULogger
import copy
| 46.008993 | 176 | 0.692741 |
182bd0de90019e26f6a862933d6591b76c148320 | 1,994 | py | Python | breadp/checks/pid.py | tgweber/breadp | 12b97b9d2d997b1345a8e026690d57b3286a04d0 | [
"Apache-2.0"
] | null | null | null | breadp/checks/pid.py | tgweber/breadp | 12b97b9d2d997b1345a8e026690d57b3286a04d0 | [
"Apache-2.0"
] | null | null | null | breadp/checks/pid.py | tgweber/breadp | 12b97b9d2d997b1345a8e026690d57b3286a04d0 | [
"Apache-2.0"
] | null | null | null | ################################################################################
# Copyright: Tobias Weber 2019
#
# Apache 2.0 License
#
# This file contains all code related to pid check objects
#
################################################################################
import re
import requests
from breadp.c... | 28.898551 | 80 | 0.533099 |
182cba7e9952331f563ef145511a6c92d1f0f8eb | 495 | py | Python | tests/infrastructure/persistence/test_holiday_dynamo_repository.py | gabrielleandro0801/holidays-importer | 4a698ded80048ee37161b1f1ff4b4af64f085ab7 | [
"MIT"
] | null | null | null | tests/infrastructure/persistence/test_holiday_dynamo_repository.py | gabrielleandro0801/holidays-importer | 4a698ded80048ee37161b1f1ff4b4af64f085ab7 | [
"MIT"
] | null | null | null | tests/infrastructure/persistence/test_holiday_dynamo_repository.py | gabrielleandro0801/holidays-importer | 4a698ded80048ee37161b1f1ff4b4af64f085ab7 | [
"MIT"
] | null | null | null | from unittest import TestCase
from src.domain.holiday import Holiday
import src.infrastructure.persistence.holiday_dynamo_repository as repository
HOLIDAY = Holiday(
date='2021-12-25',
name='Natal',
category='NATIONAL'
)
| 29.117647 | 83 | 0.779798 |
182e6f7b7c70dcc5da411a03395acac1d83ee9e9 | 3,136 | py | Python | src/models/Models.py | nbrutti/uol-export | c79a1a6b5c68e61a85952a60b935943aec27cdda | [
"MIT"
] | null | null | null | src/models/Models.py | nbrutti/uol-export | c79a1a6b5c68e61a85952a60b935943aec27cdda | [
"MIT"
] | null | null | null | src/models/Models.py | nbrutti/uol-export | c79a1a6b5c68e61a85952a60b935943aec27cdda | [
"MIT"
] | null | null | null | from config.defs import *
import peewee
db = peewee.SqliteDatabase(DATABASE_NAME)
### Relacionamentos ###
db.create_tables([Partida, Substituicao, Penalti, CartaoAmarelo, CartaoVermelho, GolContra, Gol, Time])
db.create_tables([PartidasSubstituicoes, PartidasPenaltis, PartidasCartoesAmarelos, PartidasCartoesVermelho... | 24.888889 | 144 | 0.748724 |
182eadd7acbf4364e0c9b88cd120533f1ae8e1e3 | 1,165 | py | Python | quantnn/__init__.py | simonpf/qrnn | 1de11ce8cede6b4b3de0734bcc8c198c10226188 | [
"MIT"
] | null | null | null | quantnn/__init__.py | simonpf/qrnn | 1de11ce8cede6b4b3de0734bcc8c198c10226188 | [
"MIT"
] | 3 | 2022-01-11T08:41:03.000Z | 2022-02-11T14:25:09.000Z | quantnn/__init__.py | simonpf/qrnn | 1de11ce8cede6b4b3de0734bcc8c198c10226188 | [
"MIT"
] | 5 | 2020-12-11T03:18:32.000Z | 2022-02-14T10:32:09.000Z | r"""
=======
quantnn
=======
The quantnn package provides functionality for probabilistic modeling and prediction
using deep neural networks.
The two main features of the quantnn package are implemented by the
:py:class:`~quantnn.qrnn.QRNN` and :py:class:`~quantnn.qrnn.DRNN` classes, which implement
quantile regressi... | 29.871795 | 91 | 0.775107 |
182f0fecd4c6abc4561282446bbffe0f48f4cc60 | 805 | py | Python | habitat_baselines/motion_planning/robot_target.py | srama2512/habitat-api | bc85d0961cef3b4a08bc9263869606109fb6ff0a | [
"MIT"
] | 355 | 2020-08-18T03:48:26.000Z | 2022-03-30T00:22:50.000Z | habitat_baselines/motion_planning/robot_target.py | srama2512/habitat-api | bc85d0961cef3b4a08bc9263869606109fb6ff0a | [
"MIT"
] | 328 | 2020-08-12T21:25:09.000Z | 2022-03-31T10:39:21.000Z | habitat_baselines/motion_planning/robot_target.py | srama2512/habitat-api | bc85d0961cef3b4a08bc9263869606109fb6ff0a | [
"MIT"
] | 159 | 2020-08-12T22:23:36.000Z | 2022-03-30T22:56:52.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import attr
import magnum as mn
import numpy as np
| 23.676471 | 75 | 0.70559 |
18323906f8da6c858e162af77f828aa7dc3d5141 | 1,314 | py | Python | leetcode/445.Add_Two_Numbers_II/python/add_two_numbers_v1.py | realXuJiang/research_algorithms | 8f2876288cb607b9eddb2aa75f51a1d574b51ec4 | [
"Apache-2.0"
] | 1 | 2019-08-12T09:32:30.000Z | 2019-08-12T09:32:30.000Z | leetcode/445.Add_Two_Numbers_II/python/add_two_numbers_v1.py | realXuJiang/research_algorithms | 8f2876288cb607b9eddb2aa75f51a1d574b51ec4 | [
"Apache-2.0"
] | null | null | null | leetcode/445.Add_Two_Numbers_II/python/add_two_numbers_v1.py | realXuJiang/research_algorithms | 8f2876288cb607b9eddb2aa75f51a1d574b51ec4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#-*- coding: utf-8 -*-
if __name__ == "__main__":
tn = TwoNumbers()
l1 = tn.builderListNode(1234)
l2 = tn.builderListNode(34)
tn.printLS(tn.addTwoNumbers(l1, l2))
| 22.655172 | 42 | 0.47793 |
1833d1d97b94601d7c7672bd7240b57d03e2cddf | 3,961 | py | Python | recsys/util/feature_helper.py | manazhao/tf_recsys | 6053712d11165c068e5d618989f716b2a0f60186 | [
"Apache-2.0"
] | 1 | 2019-04-20T15:05:37.000Z | 2019-04-20T15:05:37.000Z | recsys/util/feature_helper.py | manazhao/tf_recsys | 6053712d11165c068e5d618989f716b2a0f60186 | [
"Apache-2.0"
] | null | null | null | recsys/util/feature_helper.py | manazhao/tf_recsys | 6053712d11165c068e5d618989f716b2a0f60186 | [
"Apache-2.0"
] | null | null | null | import logging
import tensorflow as tf
import recsys.util.proto.config_pb2 as config
# Constructs a tf.Example with feature dictionary where key is feature name and
# value is tf.train.Feature
# Reads batched features and labels from given files, and consumes them through
# callback function "consum_batch_fn".
# fea... | 39.61 | 124 | 0.789447 |
18343ff0759e4173734193d8fad780c280807cc1 | 1,894 | py | Python | components/handlers/star_modules.py | nus-mtp/another-cs-study-planner | 02b52871a34f580b779ede08750f2d4e887bcf65 | [
"MIT"
] | 1 | 2017-04-30T17:59:08.000Z | 2017-04-30T17:59:08.000Z | components/handlers/star_modules.py | nus-mtp/another-cs-study-planner | 02b52871a34f580b779ede08750f2d4e887bcf65 | [
"MIT"
] | 87 | 2017-02-13T09:06:13.000Z | 2017-04-14T09:23:08.000Z | components/handlers/star_modules.py | nus-mtp/another-cs-study-planner | 02b52871a34f580b779ede08750f2d4e887bcf65 | [
"MIT"
] | 1 | 2017-04-11T05:26:00.000Z | 2017-04-11T05:26:00.000Z | '''
This module handles starring of modules.
'''
import web
from app import RENDER
from components import model, session
| 33.22807 | 90 | 0.594509 |
183882e7bff2e8589b66d5bada377b9d753cd440 | 27,362 | py | Python | src/features/smarterdb.py | cnr-ibba/SMARTER-database | 837f7d514c33e458ad0e39e26784c761df29e004 | [
"MIT"
] | null | null | null | src/features/smarterdb.py | cnr-ibba/SMARTER-database | 837f7d514c33e458ad0e39e26784c761df29e004 | [
"MIT"
] | 44 | 2021-05-25T16:00:34.000Z | 2022-03-12T01:12:45.000Z | src/features/smarterdb.py | cnr-ibba/SMARTER-database | 837f7d514c33e458ad0e39e26784c761df29e004 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Feb 23 16:21:35 2021
@author: Paolo Cozzi <paolo.cozzi@ibba.cnr.it>
"""
import os
import logging
import pathlib
import pycountry
import mongoengine
from enum import Enum
from typing import Union
from pymongo import database, ReturnDocument
from doten... | 28.472425 | 121 | 0.604853 |
1838c0e9c32271122443074ccc035f2557452781 | 6,143 | py | Python | test/utils/multi_objective/test_box_decomposition.py | SamuelMarks/botorch | 7801e2f56dc447322b2b6c92cab683d8900e4c7f | [
"MIT"
] | 2 | 2021-01-11T18:16:27.000Z | 2021-11-30T09:34:44.000Z | test/utils/multi_objective/test_box_decomposition.py | SamuelMarks/botorch | 7801e2f56dc447322b2b6c92cab683d8900e4c7f | [
"MIT"
] | 17 | 2020-12-11T20:07:22.000Z | 2022-03-27T16:46:42.000Z | test/utils/multi_objective/test_box_decomposition.py | SamuelMarks/botorch | 7801e2f56dc447322b2b6c92cab683d8900e4c7f | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations
import torch
from botorch.exceptions.errors import BotorchError, BotorchTensorDime... | 40.414474 | 86 | 0.453524 |
183903f43cbf11f71276277d26afb62e4bb54ab6 | 34,139 | py | Python | tests/pyupgrade_test.py | sloria/pyupgrade | 18c625150c7118d05e6f15facf77a0423b764230 | [
"MIT"
] | null | null | null | tests/pyupgrade_test.py | sloria/pyupgrade | 18c625150c7118d05e6f15facf77a0423b764230 | [
"MIT"
] | null | null | null | tests/pyupgrade_test.py | sloria/pyupgrade | 18c625150c7118d05e6f15facf77a0423b764230 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import unicode_literals
import ast
import sys
import pytest
from pyupgrade import _fix_dict_set
from pyupgrade import _fix_escape_sequences
from pyupgrade import _fix_format_literals
from pyupgrade import _fix_fstrings
from pyupgrade impo... | 27.982787 | 79 | 0.42365 |
1839ffd1101b5584269c5f29639d17cc7d6a6e7c | 194 | py | Python | Preprocessing/preprocessing.py | nadineazhalia/CSH4H3-TEXT-MINING | 77b2ffb862314d664f575757a40038cc69f86c60 | [
"Apache-2.0"
] | null | null | null | Preprocessing/preprocessing.py | nadineazhalia/CSH4H3-TEXT-MINING | 77b2ffb862314d664f575757a40038cc69f86c60 | [
"Apache-2.0"
] | null | null | null | Preprocessing/preprocessing.py | nadineazhalia/CSH4H3-TEXT-MINING | 77b2ffb862314d664f575757a40038cc69f86c60 | [
"Apache-2.0"
] | null | null | null | file_berita = open("berita.txt", "r")
berita = file_berita.read()
berita = berita.split()
berita = [x.lower() for x in berita]
berita = list(set(berita))
berita = sorted(berita)
print (berita) | 21.555556 | 37 | 0.695876 |
183a36737605defc576589d45932fdf08d365a08 | 2,139 | py | Python | demo_scripts/charts/bar_chart_index_translator_demo.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 198 | 2019-08-16T15:09:23.000Z | 2022-03-30T12:44:00.000Z | demo_scripts/charts/bar_chart_index_translator_demo.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 13 | 2021-01-07T10:15:19.000Z | 2022-03-29T13:01:47.000Z | demo_scripts/charts/bar_chart_index_translator_demo.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 29 | 2019-08-16T15:21:28.000Z | 2022-02-23T09:53:49.000Z | # Copyright 2016-present CERN European Organization for Nuclear Research
#
# 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.... | 38.196429 | 120 | 0.71482 |
183c49112552415248f084e0c358b6ea11192708 | 2,771 | py | Python | tests/request/test_parameter_invalid.py | Colin-b/pyxelrest | 5c8db40d1537d0f9c29acd928ec9519b6bb557ec | [
"MIT"
] | 7 | 2018-12-07T10:08:53.000Z | 2021-03-24T07:52:36.000Z | tests/request/test_parameter_invalid.py | Colin-b/pyxelrest | 5c8db40d1537d0f9c29acd928ec9519b6bb557ec | [
"MIT"
] | 76 | 2018-12-07T10:29:48.000Z | 2021-11-17T00:54:24.000Z | tests/request/test_parameter_invalid.py | Colin-b/pyxelrest | 5c8db40d1537d0f9c29acd928ec9519b6bb557ec | [
"MIT"
] | null | null | null | import pytest
from responses import RequestsMock
from tests import loader
| 30.119565 | 123 | 0.339589 |
183cd22d8adcd570cdd6c5eceb4ba00ee9152282 | 61 | py | Python | src/yookassa_payout/domain/response/__init__.py | yoomoney/yookassa-payout-sdk-python | f6953e97573bb4a4ee6f830f726a6fcfdf504e2a | [
"MIT"
] | 5 | 2021-03-11T14:38:25.000Z | 2021-08-13T10:41:50.000Z | src/yookassa_payout/domain/common/__init__.py | yoomoney/yookassa-payout-sdk-python | f6953e97573bb4a4ee6f830f726a6fcfdf504e2a | [
"MIT"
] | 2 | 2021-02-15T18:18:34.000Z | 2021-08-13T13:49:46.000Z | src/yookassa_payout/domain/request/__init__.py | yoomoney/yookassa-payout-sdk-python | f6953e97573bb4a4ee6f830f726a6fcfdf504e2a | [
"MIT"
] | 1 | 2022-01-29T08:47:02.000Z | 2022-01-29T08:47:02.000Z | """Package for YooKassa Payout API Python Client Library."""
| 30.5 | 60 | 0.754098 |
183d4dac8cfc4c8ac345fb08043e4248c6a0257b | 467 | py | Python | tests/integration/test_entry_point.py | jacksmith15/delfino | 38972e0e0e610c2694462306250a51537a04b1e9 | [
"MIT"
] | null | null | null | tests/integration/test_entry_point.py | jacksmith15/delfino | 38972e0e0e610c2694462306250a51537a04b1e9 | [
"MIT"
] | null | null | null | tests/integration/test_entry_point.py | jacksmith15/delfino | 38972e0e0e610c2694462306250a51537a04b1e9 | [
"MIT"
] | null | null | null | import toml
from delfino.constants import ENTRY_POINT, PYPROJECT_TOML_FILENAME
from delfino.models.pyproject_toml import PyprojectToml
from tests.constants import PROJECT_ROOT
| 33.357143 | 66 | 0.807281 |
183ecccecd1a87d9ecdaf239b0b8acab5f9e8ed2 | 6,888 | py | Python | gamble/gamble.py | lookma/simple-coin-gamble | 8f1684e62b62f28a176458606ed193c812d97bc7 | [
"MIT"
] | null | null | null | gamble/gamble.py | lookma/simple-coin-gamble | 8f1684e62b62f28a176458606ed193c812d97bc7 | [
"MIT"
] | null | null | null | gamble/gamble.py | lookma/simple-coin-gamble | 8f1684e62b62f28a176458606ed193c812d97bc7 | [
"MIT"
] | null | null | null | from random import randint
from typing import Callable, List, Optional
class RoundResults:
def __init__(self, players: List[Player]) -> None:
self.__total_amounts: List[float] = []
self.__number_of_winners: List[int] = []
self.__number_of_losers: List[int] = []
self.__number_of_t... | 30.477876 | 99 | 0.620499 |
18412368254bcf43c33a2c706aa24bebe16b5a08 | 16 | py | Python | roomai/games/__init__.py | tonyxxq/RoomAI | 5f28e31e659dd7808127c3c3cc386e6892a93982 | [
"MIT"
] | 1 | 2018-11-29T01:57:18.000Z | 2018-11-29T01:57:18.000Z | roomai/models/texasholdem/__init__.py | tonyxxq/RoomAI | 5f28e31e659dd7808127c3c3cc386e6892a93982 | [
"MIT"
] | null | null | null | roomai/models/texasholdem/__init__.py | tonyxxq/RoomAI | 5f28e31e659dd7808127c3c3cc386e6892a93982 | [
"MIT"
] | null | null | null | #!/bin/python
| 4 | 13 | 0.5625 |
1842a50616fbef1cfe0cb3f52da633c9ff6caecd | 1,285 | py | Python | config.py | SevenMoGod/movenet.pytorch | 95ec8535245228aa4335243e68722810e50bcaf8 | [
"MIT"
] | 87 | 2021-11-13T11:05:55.000Z | 2022-03-30T11:00:45.000Z | config.py | Dyian-snow/movenet.pytorch | 95ec8535245228aa4335243e68722810e50bcaf8 | [
"MIT"
] | 18 | 2021-11-16T01:13:19.000Z | 2022-03-31T16:04:31.000Z | config.py | Dyian-snow/movenet.pytorch | 95ec8535245228aa4335243e68722810e50bcaf8 | [
"MIT"
] | 28 | 2021-11-13T11:22:05.000Z | 2022-03-29T10:02:09.000Z | """
@Fire
https://github.com/fire717
"""
cfg = {
##### Global Setting
'GPU_ID': '0',
"num_workers":8,
"random_seed":42,
"cfg_verbose":True,
"save_dir": "output/",
"num_classes": 17,
"width_mult":1.0,
"img_size": 192,
##### Train Setting
'img_path':"./data/croped/img... | 21.416667 | 91 | 0.568872 |
18433079856714742d377305353f6075edaf8a57 | 11,038 | py | Python | uart.py | WRansohoff/nmigen_uart_test | d520d3b72698a901f63e3485aadca620f1444350 | [
"MIT"
] | null | null | null | uart.py | WRansohoff/nmigen_uart_test | d520d3b72698a901f63e3485aadca620f1444350 | [
"MIT"
] | null | null | null | uart.py | WRansohoff/nmigen_uart_test | d520d3b72698a901f63e3485aadca620f1444350 | [
"MIT"
] | null | null | null | from nmigen import *
from nmigen.back.pysim import *
# Function to calculate a clock divider which creates the
# desired output frequency from a given input frequency.
# Verifies that the divider is a positive integer, and that
# the resulting signal doesn't deviate more than expected.
# Basic work-in-progress UART m... | 34.820189 | 74 | 0.603642 |
184359b6c6261d67915a09440ec8b6d1a0cc0927 | 5,853 | py | Python | edk2basetools/FMMT/core/GuidTools.py | YuweiChen1110/edk2-basetools | cfd05c928492b7ffd1329634cfcb089db995eeca | [
"BSD-2-Clause-Patent"
] | null | null | null | edk2basetools/FMMT/core/GuidTools.py | YuweiChen1110/edk2-basetools | cfd05c928492b7ffd1329634cfcb089db995eeca | [
"BSD-2-Clause-Patent"
] | null | null | null | edk2basetools/FMMT/core/GuidTools.py | YuweiChen1110/edk2-basetools | cfd05c928492b7ffd1329634cfcb089db995eeca | [
"BSD-2-Clause-Patent"
] | null | null | null | ## @file
# This file is used to define the FMMT dependent external tool management class.
#
# Copyright (c) 2021-, Intel Corporation. All rights reserved.<BR>
# SPDX-License-Identifier: BSD-2-Clause-Patent
##
import glob
import logging
import os
import shutil
import sys
import tempfile
import uuid
from edk2basetools.FM... | 38.254902 | 160 | 0.571843 |
18444ea5a0cd3e04e2706a71502de539bb9fa0dc | 1,709 | py | Python | python/tests/test_tree_intersection.py | Yonatan1P/data-structures-and-algorithms | ddd647d52a3182ca01032bfdb72f94ea22a0e76b | [
"MIT"
] | 1 | 2020-12-16T22:38:12.000Z | 2020-12-16T22:38:12.000Z | python/tests/test_tree_intersection.py | Yonatan1P/data-structures-and-algorithms | ddd647d52a3182ca01032bfdb72f94ea22a0e76b | [
"MIT"
] | 1 | 2020-11-14T05:37:48.000Z | 2020-11-14T05:37:48.000Z | python/tests/test_tree_intersection.py | Yonatan1P/data-structures-and-algorithms | ddd647d52a3182ca01032bfdb72f94ea22a0e76b | [
"MIT"
] | null | null | null | from challenges.tree_intersection.tree_intersection import find_intersection
from challenges.tree.tree import BinarySearchTree
| 21.632911 | 76 | 0.627853 |
1847f0a48843e1e83cb2f45be72c476d66e2ca39 | 562 | py | Python | setup.py | rif/imgdup | fe59c6b4b8c06699d48f887bc7a90acea48aa8f2 | [
"MIT"
] | 14 | 2016-02-10T04:53:42.000Z | 2021-08-08T17:39:55.000Z | setup.py | rif/imgdup | fe59c6b4b8c06699d48f887bc7a90acea48aa8f2 | [
"MIT"
] | null | null | null | setup.py | rif/imgdup | fe59c6b4b8c06699d48f887bc7a90acea48aa8f2 | [
"MIT"
] | 2 | 2017-11-01T14:02:46.000Z | 2019-02-20T10:55:52.000Z | from setuptools import setup, find_packages
setup(
name = "imgdup",
version = "1.3",
packages = find_packages(),
scripts = ['imgdup.py'],
install_requires = ['pillow>=2.8.1'],
# metadata for upload to PyPI
author = "Radu Ioan Fericean",
author_email = "radu@fericean.ro",
description... | 31.222222 | 90 | 0.663701 |
184a025720245d69fec4505befed933cb56ea1a7 | 178 | py | Python | exercicio13.py | LuizHps18/infosatc-lp-avaliativo-01 | 0b891d74a98705182175a53e023b6cbbe8cc880a | [
"MIT"
] | null | null | null | exercicio13.py | LuizHps18/infosatc-lp-avaliativo-01 | 0b891d74a98705182175a53e023b6cbbe8cc880a | [
"MIT"
] | null | null | null | exercicio13.py | LuizHps18/infosatc-lp-avaliativo-01 | 0b891d74a98705182175a53e023b6cbbe8cc880a | [
"MIT"
] | null | null | null | k = float(input("Digite uma distncia em quilometros: "))
m = k / 1.61
print("A distncia digitada de {} quilometros, essa distncia convertida {:.2f} milhas" .format(k,m)) | 35.6 | 105 | 0.696629 |
184a7377a4969ebcc47ccb33cd2b9fb82e77a11d | 660 | py | Python | rcs/wiki/urls.py | ShuffleBox/django-rcsfield | dd8b5b22635bcdae9825e00b65887bb51171e76f | [
"BSD-3-Clause"
] | null | null | null | rcs/wiki/urls.py | ShuffleBox/django-rcsfield | dd8b5b22635bcdae9825e00b65887bb51171e76f | [
"BSD-3-Clause"
] | null | null | null | rcs/wiki/urls.py | ShuffleBox/django-rcsfield | dd8b5b22635bcdae9825e00b65887bb51171e76f | [
"BSD-3-Clause"
] | null | null | null | from django.conf.urls.defaults import *
urlpatterns = patterns('rcs.wiki.views',
url(r'^((?:[A-Z]+[a-z]+){2,})/$', 'page', {}, name="wiki_page"),
url(r'^((?:[A-Z]+[a-z]+){2,})/edit/$', 'edit', {}, name="wiki_edit"),
url(r'^((?:[A-Z]+[a-z]+){2,})/attachments/$', 'attachments', {}, name="wiki_attachments"),
... | 55 | 94 | 0.487879 |
184a8a8a53eaf08a2a13054389bb04e1b3d15e28 | 3,359 | py | Python | sample 1/main.py | RezaFirouzii/multi-choice_correction_opencv | 31c777d6714216e0811947a1ceadc893c2c1d7c0 | [
"MIT"
] | 1 | 2022-03-04T15:55:20.000Z | 2022-03-04T15:55:20.000Z | sample 1/main.py | RezaFirouzii/multi-choice_correction_opencv | 31c777d6714216e0811947a1ceadc893c2c1d7c0 | [
"MIT"
] | null | null | null | sample 1/main.py | RezaFirouzii/multi-choice_correction_opencv | 31c777d6714216e0811947a1ceadc893c2c1d7c0 | [
"MIT"
] | null | null | null | import cv2 as cv
import numpy as np
import pandas as pd
import heapq
if __name__ == "__main__":
img = cv.imread('sample1_2.jpg')
cop = img.copy()
img = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
img = cv.adaptiveThreshold(img, 255, cv.ADAPTIVE_THRESH_MEAN_C, cv.THRESH_BINARY_INV, 15, 10)
k... | 28.709402 | 101 | 0.567133 |
184b18ea17717fde23e6a6b62fed9b2b61f17cb3 | 704 | py | Python | a-practical-introduction-to-python-programming-brian-heinold/chapter-08/exercise-07.py | elarabyelaidy19/awesome-reading | 5c01a4272ba58e4f7ea665aab14b4c0aa252ea89 | [
"MIT"
] | 31 | 2021-11-02T19:51:13.000Z | 2022-02-17T10:55:26.000Z | a-practical-introduction-to-python-programming-brian-heinold/chapter-08/exercise-07.py | MosTafaHoSamm/awesome-reading | 469408fefc049d78ed53a2b2331b5d5cecdc6c06 | [
"MIT"
] | 1 | 2022-01-18T12:27:54.000Z | 2022-01-18T12:27:54.000Z | a-practical-introduction-to-python-programming-brian-heinold/chapter-08/exercise-07.py | MosTafaHoSamm/awesome-reading | 469408fefc049d78ed53a2b2331b5d5cecdc6c06 | [
"MIT"
] | 3 | 2022-01-11T05:01:34.000Z | 2022-02-05T14:36:29.000Z | # 7. Write a program that estimates the average number of drawings it takes before the users
# numbers are picked in a lottery that consists of correctly picking six different numbers that
# are between 1 and 10. To do this, run a loop 1000 times that randomly generates a set of
# user numbers and simulates drawings un... | 37.052632 | 95 | 0.728693 |
184bf76e800fcea4dae223c4ac96db64613fb1ae | 709 | py | Python | humfrey/update/utils.py | ox-it/humfrey | c92e46a24a9bf28aa9638a612f166d209315e76b | [
"BSD-3-Clause"
] | 6 | 2015-01-09T15:53:07.000Z | 2020-02-13T14:00:53.000Z | humfrey/update/utils.py | ox-it/humfrey | c92e46a24a9bf28aa9638a612f166d209315e76b | [
"BSD-3-Clause"
] | null | null | null | humfrey/update/utils.py | ox-it/humfrey | c92e46a24a9bf28aa9638a612f166d209315e76b | [
"BSD-3-Clause"
] | 1 | 2017-05-12T20:46:15.000Z | 2017-05-12T20:46:15.000Z | from django.conf import settings
from django.utils.importlib import import_module
from humfrey.update.transform.base import Transform
| 29.541667 | 67 | 0.723554 |
184dce967a4de0cb71723aecd6ec63f6783befa6 | 2,448 | py | Python | flask/model/device_model.py | Dev-Jahn/cms | 84ea115bdb865daff83d069502f6f0dd105fc4f0 | [
"RSA-MD"
] | null | null | null | flask/model/device_model.py | Dev-Jahn/cms | 84ea115bdb865daff83d069502f6f0dd105fc4f0 | [
"RSA-MD"
] | 9 | 2021-01-05T07:48:28.000Z | 2021-05-14T06:38:27.000Z | flask/model/device_model.py | Dev-Jahn/cms | 84ea115bdb865daff83d069502f6f0dd105fc4f0 | [
"RSA-MD"
] | 4 | 2021-01-05T06:46:09.000Z | 2021-05-06T01:44:28.000Z | from .db_base import db, env
| 48 | 112 | 0.624183 |
184e8888d3aeff144a6fa7390d4e574c4fcd9c17 | 18,542 | py | Python | pytests/tuqquery/tuq_tokens.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | pytests/tuqquery/tuq_tokens.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | pytests/tuqquery/tuq_tokens.py | ramalingam-cb/testrunner | 81cea7a5a493cf0c67fca7f97c667cd3c6ad2142 | [
"Apache-2.0"
] | null | null | null | from lib.remote.remote_util import RemoteMachineShellConnection
from pytests.tuqquery.tuq import QueryTests
| 65.059649 | 367 | 0.642595 |
184fa55d99eb6ba4a36992ee508941f13328275f | 1,074 | py | Python | src/python/autotransform/input/empty.py | nathro/AutoTransform | 04ef5458bc8401121e33370ceda6ef638e535e9a | [
"MIT"
] | 11 | 2022-01-02T00:50:24.000Z | 2022-02-22T00:30:09.000Z | src/python/autotransform/input/empty.py | nathro/AutoTransform | 04ef5458bc8401121e33370ceda6ef638e535e9a | [
"MIT"
] | 6 | 2022-01-06T01:45:34.000Z | 2022-02-03T21:49:52.000Z | src/python/autotransform/input/empty.py | nathro/AutoTransform | 04ef5458bc8401121e33370ceda6ef638e535e9a | [
"MIT"
] | null | null | null | # AutoTransform
# Large scale, component based code modification library
#
# Licensed under the MIT License <http://opensource.org/licenses/MIT>
# SPDX-License-Identifier: MIT
# Copyright (c) 2022-present Nathan Rockenbach <http://github.com/nathro>
# @black_format
"""The implementation for the DirectoryInput."""
fr... | 28.263158 | 83 | 0.712291 |
1851692534eb7b89ed5ce5f0fcea30358bb3c381 | 27,790 | py | Python | snowplow_tracker/tracker.py | jackwilliamson/snowplow-python-tracker | b4ee5192bde044f406182bef848b51bd21646f12 | [
"Apache-2.0"
] | null | null | null | snowplow_tracker/tracker.py | jackwilliamson/snowplow-python-tracker | b4ee5192bde044f406182bef848b51bd21646f12 | [
"Apache-2.0"
] | 1 | 2019-01-08T17:09:11.000Z | 2019-01-08T17:09:11.000Z | snowplow_tracker/tracker.py | jackwilliamson/snowplow-python-tracker | b4ee5192bde044f406182bef848b51bd21646f12 | [
"Apache-2.0"
] | 1 | 2017-05-30T20:49:24.000Z | 2017-05-30T20:49:24.000Z | """
tracker.py
Copyright (c) 2013-2014 Snowplow Analytics Ltd. All rights reserved.
This program is licensed to you under the Apache License Version 2.0,
and you may not use this file except in compliance with the Apache License
Version 2.0. You may obtain a copy of the Apache License Version 2.0 ... | 40.688141 | 147 | 0.556747 |
185308de027ac2681bc3f8d490477023a29fcb44 | 6,597 | py | Python | src/oic/oauth2/util.py | alanbuxey/pyoidc | 5f2d9ac468aaad599260f70481062c9d31273da2 | [
"Apache-2.0"
] | 290 | 2015-01-02T20:14:53.000Z | 2022-01-24T11:39:10.000Z | src/oic/oauth2/util.py | peppelinux/pyoidc | 2e751ed84039259a2b138148eae204c877518950 | [
"Apache-2.0"
] | 103 | 2015-02-03T13:20:59.000Z | 2017-09-19T20:01:08.000Z | src/oic/oauth2/util.py | peppelinux/pyoidc | 2e751ed84039259a2b138148eae204c877518950 | [
"Apache-2.0"
] | 128 | 2015-01-02T20:14:19.000Z | 2021-11-07T14:28:03.000Z | import logging
from http import cookiejar as http_cookiejar
from http.cookiejar import http2time # type: ignore
from typing import Any # noqa
from typing import Dict # noqa
from urllib.parse import parse_qs
from urllib.parse import urlsplit
from urllib.parse import urlunsplit
from oic.exception import UnSupported
f... | 30.123288 | 97 | 0.555404 |
1853550d01976a79c3f2f5631cb3c4c7ae9f5fcf | 5,890 | py | Python | main.py | aditya02acharya/TypingAgent | 34c5230be72c3878942457a6e44b7078fbd08ea0 | [
"MIT"
] | 5 | 2020-09-07T16:40:34.000Z | 2022-01-18T15:50:57.000Z | main.py | aditya02acharya/TypingAgent | 34c5230be72c3878942457a6e44b7078fbd08ea0 | [
"MIT"
] | 1 | 2020-10-06T13:14:46.000Z | 2020-10-06T13:14:46.000Z | main.py | aditya02acharya/TypingAgent | 34c5230be72c3878942457a6e44b7078fbd08ea0 | [
"MIT"
] | null | null | null | import sys
import yaml
import numpy
import random
import logging
import argparse
from os import path, makedirs
from datetime import datetime
from src.finger_proxy.proxy_agent import ProxyAgent
from src.utilities.logging_config_manager import setup_logging
from src.display.touchscreendevice import TouchScreenDevice
fr... | 47.5 | 117 | 0.720204 |
185491bbcdadc1f460e3cbb3e31ce90f8c3eb65e | 1,854 | py | Python | examples/chain.py | yeeliu01/pyrfa | 536c94f1bcff232415495cbe04b8897ad91e0c76 | [
"MIT"
] | 33 | 2016-11-29T08:18:28.000Z | 2021-11-11T15:40:19.000Z | examples/chain.py | yeeliu01/pyrfa | 536c94f1bcff232415495cbe04b8897ad91e0c76 | [
"MIT"
] | 41 | 2016-09-20T10:15:11.000Z | 2021-10-20T01:14:22.000Z | examples/chain.py | devcartel/thomsonreuters | 536c94f1bcff232415495cbe04b8897ad91e0c76 | [
"MIT"
] | 9 | 2016-10-19T00:09:22.000Z | 2020-08-03T03:02:15.000Z | #!/usr/bin/python
#
# Decoding a legacy chain ric
#
import pyrfa
p = pyrfa.Pyrfa()
p.createConfigDb("./pyrfa.cfg")
p.acquireSession("Session1")
p.createOMMConsumer()
p.login()
p.directoryRequest()
p.dictionaryRequest()
p.setInteractionType("snapshot")
fids = ['LINK_1', 'LINK_2', 'LINK_3', 'LINK_4', 'LINK_5', 'LINK_6'... | 34.981132 | 103 | 0.635922 |
185637d8cc3eb01cc46a55e5e9f5b84f8e7f9e79 | 1,746 | py | Python | hard-gists/749857/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/749857/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/749857/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# launchctl unload /System/Library/LaunchDaemons/com.apple.syslogd.plist
# launchctl load /System/Library/LaunchDaemons/com.apple.syslogd.plist
from twisted.internet import reactor, stdio, defer
from twisted.internet.protocol import Protocol, Factory
from twisted.protocols.ba... | 31.178571 | 87 | 0.605956 |
185646f6d47cb9be2bd7e09abafec85a18497f07 | 11,371 | py | Python | research/Issue2/utils.py | johnklee/ff_crawler | 53b056bd94ccf55388d12c7f70460d280964f45f | [
"MIT"
] | null | null | null | research/Issue2/utils.py | johnklee/ff_crawler | 53b056bd94ccf55388d12c7f70460d280964f45f | [
"MIT"
] | 4 | 2021-04-09T02:05:42.000Z | 2021-07-04T07:42:15.000Z | research/Issue2/utils.py | johnklee/ff_crawler | 53b056bd94ccf55388d12c7f70460d280964f45f | [
"MIT"
] | null | null | null | import requests as reqlib
import os
import re
import random
import time
import pickle
import abc
import hashlib
import threading
from urllib.parse import urlparse
from purifier import TEAgent
from purifier.logb import getLogger
from enum import IntEnum
from typing import Tuple, List, Dict, Optional
... | 38.157718 | 141 | 0.540322 |
1856d318d47ce3e4786a9a38b7674ba6814094a5 | 1,554 | py | Python | Python-CPU/monitor.py | cwd0204/Python | 35413d0cfab0d659d710fd3f752dacef00f4a713 | [
"MIT"
] | 1 | 2022-01-05T05:49:59.000Z | 2022-01-05T05:49:59.000Z | Python-CPU/monitor.py | cwd0204/Python | 35413d0cfab0d659d710fd3f752dacef00f4a713 | [
"MIT"
] | null | null | null | Python-CPU/monitor.py | cwd0204/Python | 35413d0cfab0d659d710fd3f752dacef00f4a713 | [
"MIT"
] | null | null | null | # CPU
# Charles
# Charles
import matplotlib.pyplot as plt
import matplotlib.font_manager as font_manager
import psutil as p
POINTS = 300
fig, ax = plt.subplots()
ax.set_ylim([0, 100])
ax.set_xlim([0, POINTS])
ax.set_autoscale_on(False)
ax.set_xticks([])
ax.set_yticks(range(0, 101, 10))
ax.grid(True)
#
user = [None] ... | 20.72 | 80 | 0.689189 |
185a8ab47b8d277c20020394a96aac3365fae3e8 | 8,128 | py | Python | leaderboards/api_views.py | bfrederix/django-improv | 23ae4b2cc3b7d38aa2a4d6872ea084247a1e34f6 | [
"Apache-2.0"
] | 1 | 2020-08-07T18:46:19.000Z | 2020-08-07T18:46:19.000Z | leaderboards/api_views.py | bfrederix/django-improv | 23ae4b2cc3b7d38aa2a4d6872ea084247a1e34f6 | [
"Apache-2.0"
] | null | null | null | leaderboards/api_views.py | bfrederix/django-improv | 23ae4b2cc3b7d38aa2a4d6872ea084247a1e34f6 | [
"Apache-2.0"
] | null | null | null | import datetime
from rest_framework import viewsets
from rest_framework.response import Response
from leaderboards import LEADERBOARD_MAX_PER_PAGE
from leaderboards.models import LeaderboardEntry, Medal, LeaderboardSpan
from leaderboards.serializers import (LeaderboardEntrySerializer, MedalSerializer,
... | 42.333333 | 118 | 0.664001 |
185ab66623ac277ebae7a53438dfbee88f107a07 | 4,450 | py | Python | pyaz/sql/instance_pool/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/sql/instance_pool/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | null | null | null | pyaz/sql/instance_pool/__init__.py | py-az-cli/py-az-cli | 9a7dc44e360c096a5a2f15595353e9dad88a9792 | [
"MIT"
] | 1 | 2022-02-03T09:12:01.000Z | 2022-02-03T09:12:01.000Z | from ... pyaz_utils import _call_az
def show(name, resource_group):
'''
Get the details for an instance pool.
Required Parameters:
- name -- Instance Pool Name
- resource_group -- Name of resource group. You can configure the default group using `az configure --defaults group=<name>`
'''
r... | 45.408163 | 164 | 0.702472 |
185b8c2212dd3b144fbc0efeca4d07970b4b5805 | 316 | py | Python | exercicios/ex090.py | Siqueira-Vinicius/Python | bd1f7e2bcdfd5481724d32db387f51636bb4ad60 | [
"MIT"
] | null | null | null | exercicios/ex090.py | Siqueira-Vinicius/Python | bd1f7e2bcdfd5481724d32db387f51636bb4ad60 | [
"MIT"
] | null | null | null | exercicios/ex090.py | Siqueira-Vinicius/Python | bd1f7e2bcdfd5481724d32db387f51636bb4ad60 | [
"MIT"
] | null | null | null | aluno = {}
aluno['nome'] = str(input('Digite o nome do aluno: '))
aluno['media'] = float(input('Digite a mdia desse aluno: '))
if aluno['media'] >= 5:
aluno['situao'] = '\033[32mAprovado\033[m'
else:
aluno['situao'] = '\033[31mReprovado\033[m'
for k, v in aluno.items():
print(f'{k} do aluno {v}') | 35.111111 | 61 | 0.617089 |
185c355337e2e9938d29808ca0f7b31c79694a3f | 813 | py | Python | cntr_div_train_test_images.py | globalgood-ag/treecover | ecab0ac2cef622b5f72054d5a234237a34c0bd4d | [
"MIT"
] | null | null | null | cntr_div_train_test_images.py | globalgood-ag/treecover | ecab0ac2cef622b5f72054d5a234237a34c0bd4d | [
"MIT"
] | null | null | null | cntr_div_train_test_images.py | globalgood-ag/treecover | ecab0ac2cef622b5f72054d5a234237a34c0bd4d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Aug 6 10:57:41 2019
Creates train and test splits at the IMAGE LEVEL to prep for thumbnail extraction in countr_cnn_1
@author: smcguire
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
## read dataframe of unique images with annotati... | 26.225806 | 98 | 0.710947 |
185c491ee371d020cd3b4bc449367e92f4f7af90 | 1,144 | py | Python | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Attributes/Propellants/Aviation_Gasoline.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Attributes/Propellants/Aviation_Gasoline.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Attributes/Propellants/Aviation_Gasoline.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | ## @ingroup Attributes-Propellants
# Aviation_Gasoline.py
#
# Created: Unk 2013, SUAVE TEAM
# Modified: Apr 2015, SUAVE TEAM
# ----------------------------------------------------------------------
# Imports
# ----------------------------------------------------------------------
from .Propellant import Propellant... | 23.346939 | 72 | 0.436189 |
185eea51530d25c06bcb22494c22d6c4640df3ce | 4,108 | py | Python | write_grok/write_grok.py | namedyangfan/Python_practice | 7f7394d82bb5afc13b039eec286b9485a775ae39 | [
"MIT"
] | null | null | null | write_grok/write_grok.py | namedyangfan/Python_practice | 7f7394d82bb5afc13b039eec286b9485a775ae39 | [
"MIT"
] | null | null | null | write_grok/write_grok.py | namedyangfan/Python_practice | 7f7394d82bb5afc13b039eec286b9485a775ae39 | [
"MIT"
] | null | null | null | import os, glob, shutil | 45.644444 | 96 | 0.529211 |
185f0bca3ed3085aa387bfdbe9104d5218249f4a | 5,752 | py | Python | src/tfi/publish.py | ajbouh/tfi | 6e89e8c8f1ca3b285c788cc6b802fc44f9001290 | [
"MIT"
] | 160 | 2017-09-13T00:32:05.000Z | 2018-05-21T18:17:32.000Z | src/tfi/publish.py | tesserai/tfi | 6e89e8c8f1ca3b285c788cc6b802fc44f9001290 | [
"MIT"
] | 6 | 2017-09-14T17:54:21.000Z | 2018-01-27T19:31:18.000Z | src/tfi/publish.py | ajbouh/tfi | 6e89e8c8f1ca3b285c788cc6b802fc44f9001290 | [
"MIT"
] | 11 | 2017-09-13T00:37:08.000Z | 2018-03-05T08:03:34.000Z | import decimal
import hashlib
import json
import requests
import tempfile
import uuid
import os
from tqdm import tqdm
from requests_toolbelt import MultipartEncoder, MultipartEncoderMonitor
namespace = "default"
fission_url = os.environ["FISSION_URL"]
| 30.433862 | 96 | 0.577712 |