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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
08804de9d3324b167c6447b69cc226552d4b7bbe | 282 | py | Python | Mundo-1/exercicio-05.py | FRafaelPA/Praticando-Python | d8a46beceeae2ac20acf4c63f86a32cba537c896 | [
"MIT"
] | null | null | null | Mundo-1/exercicio-05.py | FRafaelPA/Praticando-Python | d8a46beceeae2ac20acf4c63f86a32cba537c896 | [
"MIT"
] | null | null | null | Mundo-1/exercicio-05.py | FRafaelPA/Praticando-Python | d8a46beceeae2ac20acf4c63f86a32cba537c896 | [
"MIT"
] | null | null | null | '''
Faa um programa que leia um nmero inteiro e mostre na tela o seu sucessor e seu antecessor.
'''
n = int(input('Entre com um valor: '))
antecessor = n - 1
sucessor = n + 1
msg = 'o antecessor do nmero {} {} e seu sucessor {}'.format(n, antecessor, sucessor)
print(msg) | 23.5 | 93 | 0.673759 |
0880a4f7dffdc5894d94be459ed45b4d22287a7c | 3,505 | py | Python | tests/sql_parser/ast/test_insert_statement_is_parsed.py | vladbalmos/mitzasql | 06c2a96eb4494095b2b72bc1454199a4940b0700 | [
"MIT"
] | 69 | 2019-05-16T06:40:18.000Z | 2022-03-24T06:23:49.000Z | tests/sql_parser/ast/test_insert_statement_is_parsed.py | vladbalmos/mitzasql | 06c2a96eb4494095b2b72bc1454199a4940b0700 | [
"MIT"
] | 36 | 2019-05-15T19:55:24.000Z | 2021-07-22T07:07:14.000Z | tests/sql_parser/ast/test_insert_statement_is_parsed.py | vladbalmos/mitzasql | 06c2a96eb4494095b2b72bc1454199a4940b0700 | [
"MIT"
] | 8 | 2019-05-16T06:56:28.000Z | 2022-02-11T02:24:12.000Z | import pytest
from mitzasql.sql_parser.parser import parse
from mitzasql.utils import dfs
| 26.353383 | 77 | 0.650499 |
088195a1ba4520a7f098f9cb7902e66481e7e187 | 21 | py | Python | checkov/version.py | pmalkki/checkov | b6cdf386dd976fe27c16fed6d550756a678a5d7b | [
"Apache-2.0"
] | null | null | null | checkov/version.py | pmalkki/checkov | b6cdf386dd976fe27c16fed6d550756a678a5d7b | [
"Apache-2.0"
] | null | null | null | checkov/version.py | pmalkki/checkov | b6cdf386dd976fe27c16fed6d550756a678a5d7b | [
"Apache-2.0"
] | null | null | null | version = '2.0.1048'
| 10.5 | 20 | 0.619048 |
0881a63860af8a2c6c4f14401c7170b38015ba3a | 775 | py | Python | ArraysAndSorting/MakeItAnagram.py | tejasnikumbh/Algorithms | 2a2983a522be295ce95bd970a0ee8a617866992f | [
"BSD-2-Clause"
] | 8 | 2015-04-16T03:43:49.000Z | 2018-08-14T22:47:03.000Z | ArraysAndSorting/MakeItAnagram.py | tejasnikumbh/Algorithms | 2a2983a522be295ce95bd970a0ee8a617866992f | [
"BSD-2-Clause"
] | null | null | null | ArraysAndSorting/MakeItAnagram.py | tejasnikumbh/Algorithms | 2a2983a522be295ce95bd970a0ee8a617866992f | [
"BSD-2-Clause"
] | 7 | 2016-03-22T20:29:27.000Z | 2018-09-29T18:55:47.000Z | # Importing standard libraires
import sys
'''
Main Function for the program. Logic is as follows
Make two frequency tables for two strings
Take overlap of both and add up the non overlapping regions (absolute values)
'''
if __name__ == "__main__":
# Parsing in the input
s1 = list(sys.stdin.readline... | 31 | 81 | 0.636129 |
08826307649d95fd1f1fa357479507c8385245c7 | 1,181 | py | Python | tests/test_get_schedule.py | j-muller/pypuregym | 396862047f8b5c0b1138b5c562ddb6958aaa6817 | [
"MIT"
] | 1 | 2020-12-31T01:42:14.000Z | 2020-12-31T01:42:14.000Z | tests/test_get_schedule.py | j-muller/pypuregym | 396862047f8b5c0b1138b5c562ddb6958aaa6817 | [
"MIT"
] | null | null | null | tests/test_get_schedule.py | j-muller/pypuregym | 396862047f8b5c0b1138b5c562ddb6958aaa6817 | [
"MIT"
] | null | null | null | from .utilities import Response
SCHEDULE_RESPONSE = b"""
{"error":{"code":200,"message":"Success"},"data":{"classes":[{
"id":113209,"sector":"F","class_type_id":48,"start_date":"2020-06-07",
"end_date":"2020-06-07","start_time":"09:00:00","end_time":"09:45:00",
"duration":"2700000","teacher_id":782,"location_id":10,"l... | 36.90625 | 76 | 0.663844 |
0883af2fe80ecab9fbfc1b7be524e037979d920a | 518 | py | Python | testing/examples/talib-macd.py | pchaos/quanttesting | 98331670547e8a45ba93b49f3e9c660495645114 | [
"MIT"
] | 5 | 2020-04-08T14:14:05.000Z | 2021-06-29T03:42:01.000Z | testing/examples/talib-macd.py | pchaos/quanttesting | 98331670547e8a45ba93b49f3e9c660495645114 | [
"MIT"
] | null | null | null | testing/examples/talib-macd.py | pchaos/quanttesting | 98331670547e8a45ba93b49f3e9c660495645114 | [
"MIT"
] | 7 | 2020-04-15T15:07:39.000Z | 2022-03-23T05:44:02.000Z | '''
Ta-libMACD
'''
import pandas as pd
import numpy as np
import talib as ta
import tushare as ts
from matplotlib import rc
import matplotlib.pyplot as plt
import seaborn as sns
rc('mathtext', default='regular')
sns.set_style('white')
# %matplotlib
plt.rcParams["figure.figsize"] = (20, 10)
dw = ts.get_k_data("600600"... | 24.666667 | 107 | 0.722008 |
0883de75e3222b2bd0245697a6613a014446c4c7 | 252 | py | Python | packages/regression_model/regression_model/__init__.py | abdurrehman11/deploying-machine-learning-models | 93872e4c197df2543e492af3df718bdad1817752 | [
"BSD-3-Clause"
] | null | null | null | packages/regression_model/regression_model/__init__.py | abdurrehman11/deploying-machine-learning-models | 93872e4c197df2543e492af3df718bdad1817752 | [
"BSD-3-Clause"
] | null | null | null | packages/regression_model/regression_model/__init__.py | abdurrehman11/deploying-machine-learning-models | 93872e4c197df2543e492af3df718bdad1817752 | [
"BSD-3-Clause"
] | null | null | null | import logging
from regression_model.config import config
from regression_model.config import logging_config
VERSION_PATH = config.PACKAGE_ROOT / 'VERSION'
with open(VERSION_PATH, 'r') as version_file:
__version__ = version_file.read().strip() | 25.2 | 50 | 0.797619 |
0886c3adb37d4bb2d284b34954bef308daf23bd3 | 508 | py | Python | 001-Python-basico/008-desafio-pratico.py | clebertonf/Python-course | a57f405cbd27f96e0cb61128df31e9249c79a962 | [
"MIT"
] | null | null | null | 001-Python-basico/008-desafio-pratico.py | clebertonf/Python-course | a57f405cbd27f96e0cb61128df31e9249c79a962 | [
"MIT"
] | null | null | null | 001-Python-basico/008-desafio-pratico.py | clebertonf/Python-course | a57f405cbd27f96e0cb61128df31e9249c79a962 | [
"MIT"
] | null | null | null | from datetime import date
year_current_date = date.today().year
get_info("Cleberton", 28, 1.69, 75)
# Funo recebe algumas informaoes por parametro, e retorna ano de nascimento, imc
# com algumas frases customizadas
| 28.222222 | 83 | 0.687008 |
0887199a887a1fbf59285a7c42522a561d36fdf6 | 160 | py | Python | jsons.py | tebeka/py2go-cheatsheet | 14c83850876ef80c36af326ab4fc6f56344781c7 | [
"BSD-3-Clause"
] | 13 | 2017-09-09T08:32:34.000Z | 2022-02-28T04:32:43.000Z | jsons.py | tebeka/py2go-cheatsheet | 14c83850876ef80c36af326ab4fc6f56344781c7 | [
"BSD-3-Clause"
] | 3 | 2017-11-25T18:48:11.000Z | 2017-12-30T13:00:04.000Z | jsons.py | tebeka/py2go-cheatsheet | 14c83850876ef80c36af326ab4fc6f56344781c7 | [
"BSD-3-Clause"
] | 2 | 2019-11-03T19:58:17.000Z | 2020-04-28T01:14:17.000Z | import json
from sys import stdout
# START
data = '''{
"name": "bugs",
"age": 76
}'''
obj = json.loads(data)
json.dump(obj, stdout)
# END
print(obj)
| 10.666667 | 22 | 0.59375 |
08873554c1a8d8174ca6425485bfe2a0d0880e6a | 2,306 | py | Python | tests/components/speedtestdotnet/test_init.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | tests/components/speedtestdotnet/test_init.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | tests/components/speedtestdotnet/test_init.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """Tests for SpeedTest integration."""
from unittest.mock import patch
import speedtest
from openpeerpower import config_entries
from openpeerpower.components import speedtestdotnet
from openpeerpower.setup import async_setup_component
from tests.common import MockConfigEntry
| 28.825 | 82 | 0.717259 |
088834b65e8fc3335e7c944aeb1e307017ece6c9 | 1,258 | py | Python | opetuskoodi/2021_10_18/2_kerta_kertaus.py | mikkokotola/pythonkoodaus | 5415b3d87dfcb65b72edb916967824304d155d9a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | opetuskoodi/2021_10_18/2_kerta_kertaus.py | mikkokotola/pythonkoodaus | 5415b3d87dfcb65b72edb916967824304d155d9a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | opetuskoodi/2021_10_18/2_kerta_kertaus.py | mikkokotola/pythonkoodaus | 5415b3d87dfcb65b72edb916967824304d155d9a | [
"CC-BY-4.0",
"MIT"
] | null | null | null | # Kertaus, kerta 3
# Muuttujat ja sytteen lukeminen kyttjlt
nimi = input("Anna nimesi: ")
kengnnumero = input("Mik on kengnnumerosi: ")
print("Moi vaan, " + nimi + "! Kengnnumerosi on " + kengnnumero + ".")
# F-merkkijono
print(f"Moi vaan, {nimi}! Kengnnumerosi on {kengnnumero}.")
# Numerot
# Iklaskuri
syntymvuosi ... | 21.689655 | 99 | 0.683625 |
0888b580bb9eb1968da656fe5efb329d6602a748 | 616 | py | Python | case/xpath.py | xierensong/learnPython | 33f9891d8a8ed39772ff9bcbeb1e5cff6f3b5455 | [
"MIT"
] | null | null | null | case/xpath.py | xierensong/learnPython | 33f9891d8a8ed39772ff9bcbeb1e5cff6f3b5455 | [
"MIT"
] | null | null | null | case/xpath.py | xierensong/learnPython | 33f9891d8a8ed39772ff9bcbeb1e5cff6f3b5455 | [
"MIT"
] | 1 | 2018-10-11T08:20:44.000Z | 2018-10-11T08:20:44.000Z | import requests
from lxml import etree
if __name__ == '__main__':
headers = {"User-Agent":'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36'}
url = 'https://www.apache.org/dist/ant/'
sourceHTML = requests.get(url, headers = headers)
selec... | 41.066667 | 144 | 0.63474 |
088c4b3ec59271d9af6031e07d4cb3e300f061c4 | 62 | py | Python | hermes1d/__init__.py | certik/hermes1d-llnl | 8e3b76fd3022af90e5c4c3923337a422d79604d5 | [
"BSD-3-Clause"
] | 1 | 2016-08-18T23:21:55.000Z | 2016-08-18T23:21:55.000Z | hermes1d/__init__.py | certik/hermes1d-llnl | 8e3b76fd3022af90e5c4c3923337a422d79604d5 | [
"BSD-3-Clause"
] | null | null | null | hermes1d/__init__.py | certik/hermes1d-llnl | 8e3b76fd3022af90e5c4c3923337a422d79604d5 | [
"BSD-3-Clause"
] | null | null | null | from h1d_wrapper.h1d_wrapper import Element, Mesh, Linearizer
| 31 | 61 | 0.854839 |
088ddea79b72540b919336ee600c90b0505ded86 | 5,132 | py | Python | jelm/tests/unit/test_jelm_class.py | endremborza/jelm | 6916bbd4ceb909ad3350c56d3a149bdb97671489 | [
"MIT"
] | null | null | null | jelm/tests/unit/test_jelm_class.py | endremborza/jelm | 6916bbd4ceb909ad3350c56d3a149bdb97671489 | [
"MIT"
] | null | null | null | jelm/tests/unit/test_jelm_class.py | endremborza/jelm | 6916bbd4ceb909ad3350c56d3a149bdb97671489 | [
"MIT"
] | null | null | null | import pytest
from jelm import Jelm, Node, Edge
from jelm.tests.network_case_set_class import NetwokCaseTemplate
| 25.034146 | 77 | 0.639517 |
088f0e150b58a95dbcc3bacf169c6bdc57e4eedc | 6,582 | py | Python | trajectory_prediction/evaluation.py | libai2019/dataset-api | 2f793821864f32bd210c17060a70682488bb74e0 | [
"Apache-2.0"
] | 385 | 2018-07-02T22:21:25.000Z | 2022-03-28T13:12:47.000Z | trajectory_prediction/evaluation.py | libai2019/dataset-api | 2f793821864f32bd210c17060a70682488bb74e0 | [
"Apache-2.0"
] | 102 | 2018-08-01T10:40:40.000Z | 2022-03-16T10:32:44.000Z | trajectory_prediction/evaluation.py | libai2019/dataset-api | 2f793821864f32bd210c17060a70682488bb74e0 | [
"Apache-2.0"
] | 98 | 2018-07-12T18:36:42.000Z | 2022-03-20T04:38:03.000Z | '''
Evaluation code for trajectory prediction.
We record the objects in the last frame of every sequence in test dataset as considered objects, which is stored in considered_objects.txt.
We compare the error between your predicted locations in the next 3s(six positions) and the ground truth for these considered object... | 36.364641 | 139 | 0.628836 |
0891695cf058c07ea805662895cf40325fd7ce37 | 2,561 | py | Python | shellfoundry/commands/install_command.py | p-sherratt/shellfoundry | d1f35a31123b9e701c801345fb633b6fda5420b7 | [
"Apache-2.0"
] | null | null | null | shellfoundry/commands/install_command.py | p-sherratt/shellfoundry | d1f35a31123b9e701c801345fb633b6fda5420b7 | [
"Apache-2.0"
] | 1 | 2021-03-25T23:21:02.000Z | 2021-03-25T23:21:02.000Z | shellfoundry/commands/install_command.py | p-sherratt/shellfoundry | d1f35a31123b9e701c801345fb633b6fda5420b7 | [
"Apache-2.0"
] | null | null | null | # !/usr/bin/python
# -*- coding: utf-8 -*-
import click
import os
try:
# Python 2.x version
from urllib2 import HTTPError, URLError
except:
# Python 3.x version
from urllib.error import HTTPError, URLError
from shellfoundry.exceptions import FatalError
from shellfoundry.utilities.config_reader import ... | 43.40678 | 119 | 0.705193 |
0893025cc2e6d02ad0cc2a38ee4b17db36c8a68d | 9,064 | py | Python | sam_actions/scripts/gps_fix_server.py | Jollerprutt/sam_common | dd8b43b3c69eee76fe0c35a98db9dfb67f2b79f2 | [
"BSD-3-Clause"
] | 1 | 2020-06-09T18:23:53.000Z | 2020-06-09T18:23:53.000Z | sam_actions/scripts/gps_fix_server.py | Jollerprutt/sam_common | dd8b43b3c69eee76fe0c35a98db9dfb67f2b79f2 | [
"BSD-3-Clause"
] | 3 | 2020-10-06T09:46:03.000Z | 2021-03-10T13:40:44.000Z | sam_actions/scripts/gps_fix_server.py | Jollerprutt/sam_common | dd8b43b3c69eee76fe0c35a98db9dfb67f2b79f2 | [
"BSD-3-Clause"
] | 5 | 2020-01-20T18:33:55.000Z | 2020-12-29T12:34:22.000Z | #!/usr/bin/python
import rospy
from rospy import ROSException
from std_msgs.msg import Header, Bool
from std_srvs.srv import SetBool
from geometry_msgs.msg import PoseWithCovarianceStamped, Point, Quaternion
from sensor_msgs.msg import NavSatFix, NavSatStatus
from sam_msgs.msg import GetGPSFixAction, GetGPSFixFeedback... | 42.553991 | 143 | 0.645521 |
08967bfbf25d6987de9933fc65d4f932dbcd6e60 | 1,307 | py | Python | src/model/RoleProxy.py | JulienGrv/puremvc-python-demo-PySide-employeeadmin | b076493ac34254e665b485259b0a7122fa9cfde4 | [
"BSD-3-Clause"
] | 4 | 2017-08-26T10:18:10.000Z | 2020-07-28T19:50:54.000Z | src/model/RoleProxy.py | JulienGrv/puremvc-python-demo-PySide-employeeadmin | b076493ac34254e665b485259b0a7122fa9cfde4 | [
"BSD-3-Clause"
] | null | null | null | src/model/RoleProxy.py | JulienGrv/puremvc-python-demo-PySide-employeeadmin | b076493ac34254e665b485259b0a7122fa9cfde4 | [
"BSD-3-Clause"
] | 3 | 2020-09-22T12:17:14.000Z | 2021-07-16T12:28:18.000Z | # -*- coding: utf-8 -*-
from puremvc.patterns.proxy import Proxy
from .. import ApplicationFacade
| 27.808511 | 72 | 0.61974 |
0896a00f400830a8eb41593559f65d607a6a09c6 | 1,358 | py | Python | flappy-brird/utils/radio.py | victorathanasio/Personal-projects | 94c870179cec32aa733a612a6faeb047df16d977 | [
"MIT"
] | null | null | null | flappy-brird/utils/radio.py | victorathanasio/Personal-projects | 94c870179cec32aa733a612a6faeb047df16d977 | [
"MIT"
] | null | null | null | flappy-brird/utils/radio.py | victorathanasio/Personal-projects | 94c870179cec32aa733a612a6faeb047df16d977 | [
"MIT"
] | null | null | null | import pygame
import os
| 25.148148 | 77 | 0.611193 |
0896e29401ea1989cb26ef01107f5729035c11a7 | 4,405 | py | Python | app/__main__.py | pablohawz/tfg-Scan-Paint-clone | 056cd50d9e4274620cf085a41ed9d326e16dd47b | [
"MIT"
] | null | null | null | app/__main__.py | pablohawz/tfg-Scan-Paint-clone | 056cd50d9e4274620cf085a41ed9d326e16dd47b | [
"MIT"
] | null | null | null | app/__main__.py | pablohawz/tfg-Scan-Paint-clone | 056cd50d9e4274620cf085a41ed9d326e16dd47b | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
from app.package.views.Calibrate_view import CalibrateView
from app.package.controllers.Calibrate_controller import CalibrateController
from app.package.models.Calibrate_model import CalibrateModel
import sys
import matplotlib
from PySide2.QtWidgets import QApplica... | 33.120301 | 76 | 0.711691 |
0897118d6f2834e2b8c74ba12247412406dbd2c7 | 557 | py | Python | Trakttv.bundle/Contents/Libraries/Shared/playhouse/berkeleydb.py | disrupted/Trakttv.bundle | 24712216c71f3b22fd58cb5dd89dad5bb798ed60 | [
"RSA-MD"
] | 1,346 | 2015-01-01T14:52:24.000Z | 2022-03-28T12:50:48.000Z | Trakttv.bundle/Contents/Libraries/Shared/playhouse/berkeleydb.py | alcroito/Plex-Trakt-Scrobbler | 4f83fb0860dcb91f860d7c11bc7df568913c82a6 | [
"RSA-MD"
] | 474 | 2015-01-01T10:27:46.000Z | 2022-03-21T12:26:16.000Z | Trakttv.bundle/Contents/Libraries/Shared/playhouse/berkeleydb.py | alcroito/Plex-Trakt-Scrobbler | 4f83fb0860dcb91f860d7c11bc7df568913c82a6 | [
"RSA-MD"
] | 191 | 2015-01-02T18:27:22.000Z | 2022-03-29T10:49:48.000Z | import datetime
import decimal
from playhouse.sqlite_ext import *
# Peewee assumes that the `pysqlite2` module was compiled against the
# BerkeleyDB SQLite libraries.
from pysqlite2 import dbapi2 as berkeleydb
berkeleydb.register_adapter(decimal.Decimal, str)
berkeleydb.register_adapter(datetime.date, str)
berkeleyd... | 27.85 | 69 | 0.779174 |
089a04fda175104b7a74e5689381760d2e0c8310 | 1,513 | py | Python | PyEEA/analysis/SimulationAnalysisEngine.py | ThomasJFR/PyEEA | 7927ee5ff1de8d3cf9e9654899ea4c2c0284519c | [
"MIT"
] | 1 | 2020-06-15T03:16:06.000Z | 2020-06-15T03:16:06.000Z | PyEEA/analysis/SimulationAnalysisEngine.py | ThomasJFR/PyEEA | 7927ee5ff1de8d3cf9e9654899ea4c2c0284519c | [
"MIT"
] | 1 | 2020-06-19T04:56:21.000Z | 2020-06-19T04:56:21.000Z | PyEEA/analysis/SimulationAnalysisEngine.py | ThomasJFR/PyEEA | 7927ee5ff1de8d3cf9e9654899ea4c2c0284519c | [
"MIT"
] | null | null | null | from numpy.random import standard_normal
from numbers import Number
def simulation_analysis(project, sim_dict, iterations=250, valuator=None):
"""
Purpose:
Analyses the effects of uncertainty of a system by performing a Monte Carlo simulation.
Args:
project: An instance of Project to pe... | 35.186047 | 110 | 0.61996 |
089bce5935bf86ce3e21aaf4f16ec72196bcf521 | 433 | py | Python | bot/handlers/common.py | slawiko/remindmelater_bot | 76e46f7a42ee2eb02d0b06eea1eb2b8c6f76cb9e | [
"Apache-2.0"
] | null | null | null | bot/handlers/common.py | slawiko/remindmelater_bot | 76e46f7a42ee2eb02d0b06eea1eb2b8c6f76cb9e | [
"Apache-2.0"
] | 2 | 2017-06-11T11:07:30.000Z | 2017-06-24T05:37:34.000Z | bot/handlers/common.py | slawiko/remindmelater_bot | 76e46f7a42ee2eb02d0b06eea1eb2b8c6f76cb9e | [
"Apache-2.0"
] | null | null | null | import logging
from telegram.ext import CommandHandler
logger = logging.getLogger(__name__)
| 18.041667 | 69 | 0.699769 |
089c7e0aea70b01bb6426d16f39e585a80906239 | 307 | py | Python | src/papierstat/datasets/data_helper.py | sdpython/papierstat | f69de884c59ada30b58224dca39f2a44d92122c1 | [
"MIT"
] | 7 | 2019-03-21T09:52:31.000Z | 2021-01-17T16:56:27.000Z | src/papierstat/datasets/data_helper.py | sdpython/papierstat | f69de884c59ada30b58224dca39f2a44d92122c1 | [
"MIT"
] | 33 | 2018-02-08T23:56:57.000Z | 2021-02-10T23:55:43.000Z | src/papierstat/datasets/data_helper.py | sdpython/papierstat | f69de884c59ada30b58224dca39f2a44d92122c1 | [
"MIT"
] | 1 | 2021-02-11T09:16:33.000Z | 2021-02-11T09:16:33.000Z | # -*- coding: utf-8 -*-
"""
@file
@brief Fonctions retournant des jeux de donnes.
"""
import os
def get_data_folder():
"""
Retourne le rpertoire de donnes inclus dans ce module.
"""
this = os.path.dirname(__file__)
data = os.path.join(this, "data")
return os.path.abspath(data)
| 19.1875 | 60 | 0.641694 |
089f58dcbc654f5aa5c0245f1cc3a918e10ba168 | 464 | py | Python | ollivanders/offer/models.py | paradox-particle/diagon-alley | 184a58da34046319c96b6d5535646497d80c4970 | [
"MIT"
] | null | null | null | ollivanders/offer/models.py | paradox-particle/diagon-alley | 184a58da34046319c96b6d5535646497d80c4970 | [
"MIT"
] | null | null | null | ollivanders/offer/models.py | paradox-particle/diagon-alley | 184a58da34046319c96b6d5535646497d80c4970 | [
"MIT"
] | null | null | null | from django.db import models
| 24.421053 | 46 | 0.661638 |
089fb8ac7ea2e682cd5404a50c0fbd9b93f873d7 | 6,470 | py | Python | qa/advancedloggingplugin/advancedlogging.py | robertstarmer/aurora | ae98329c8dc466dea2c8040203624f0bfc1c7cfe | [
"Apache-2.0"
] | 23 | 2015-01-22T22:23:35.000Z | 2021-10-21T23:08:29.000Z | qa/advancedloggingplugin/advancedlogging.py | sysbot/aurora | 9e319d4eb8c760cf84cb80ed2959cd52976af11c | [
"Apache-2.0"
] | 2 | 2015-10-13T00:47:45.000Z | 2019-05-06T14:52:33.000Z | qa/advancedloggingplugin/advancedlogging.py | sysbot/aurora | 9e319d4eb8c760cf84cb80ed2959cd52976af11c | [
"Apache-2.0"
] | 27 | 2015-03-18T19:39:30.000Z | 2022-03-11T00:58:09.000Z | import os
from os.path import join
import traceback
from bs4 import BeautifulSoup
from nose.plugins import Plugin
| 30.956938 | 75 | 0.52813 |
08a0d32c04f17aef2a43162c106a80b10c85518c | 999 | py | Python | setup.py | sunghyunzz/aiohttp-toolbox | 1948a1962b3bd4071f234719b6683b55cd03d6f0 | [
"MIT"
] | 6 | 2016-11-21T08:38:34.000Z | 2019-02-20T12:56:16.000Z | setup.py | sunghyunzz/aiohttp-toolbox | 1948a1962b3bd4071f234719b6683b55cd03d6f0 | [
"MIT"
] | 1 | 2017-07-20T02:20:03.000Z | 2017-07-20T02:20:03.000Z | setup.py | sunghyunzz/aiohttp-toolbox | 1948a1962b3bd4071f234719b6683b55cd03d6f0 | [
"MIT"
] | 2 | 2017-07-20T02:20:44.000Z | 2019-02-21T13:37:37.000Z | """
aiohttp-ultrajson
-----------------
Integrates UltraJSON with your aiohttp application.
"""
from setuptools import setup
setup(
name='aiohttp-ultrajson',
version='0.1.0',
url='https://github.com/sunghyunzz/aiohttp-ultrajson',
license='MIT',
author='sunghyunzz',
author_email='me@sunghyunzz.... | 27 | 70 | 0.608609 |
08a23fb05230d43cddbfc2a0b66eda446175157f | 322 | py | Python | PTA/PAT_B/Python3/B1061_AC.py | StrayDragon/OJ-Solutions | b31b11c01507544aded2302923da080b39cf2ba8 | [
"MIT"
] | 1 | 2019-05-13T10:09:55.000Z | 2019-05-13T10:09:55.000Z | PTA/PAT_B/Python3/B1061_AC.py | StrayDragon/OJ-Solutions | b31b11c01507544aded2302923da080b39cf2ba8 | [
"MIT"
] | null | null | null | PTA/PAT_B/Python3/B1061_AC.py | StrayDragon/OJ-Solutions | b31b11c01507544aded2302923da080b39cf2ba8 | [
"MIT"
] | null | null | null | n, m = map(int, input().split())
scores = list(map(int, input().split()))
answers = list(map(int, input().split()))
for i in range(n):
actuals = list(map(int, input().split()))
result = 0
for i, score in enumerate(scores):
if actuals[i] == answers[i]:
result += score
print(result... | 21.466667 | 45 | 0.568323 |
08a37f1f4c2faa26bde495db95f37f4816d7caf0 | 12,652 | py | Python | dh/network/__init__.py | dhaase-de/dh-python-dh | 40b04407e5f67ec261f559263718ec2b2588dabb | [
"MIT"
] | null | null | null | dh/network/__init__.py | dhaase-de/dh-python-dh | 40b04407e5f67ec261f559263718ec2b2588dabb | [
"MIT"
] | null | null | null | dh/network/__init__.py | dhaase-de/dh-python-dh | 40b04407e5f67ec261f559263718ec2b2588dabb | [
"MIT"
] | null | null | null | """
Tools for network communication.
"""
import abc
import io
import json
import socket
import struct
import sys
import time
import zlib
import dh.ejson
import dh.utils
# NumPy is only needed for some parts and is optional
try:
import numpy as np
except ImportError as e:
_NUMPY_ERROR = e
else:
_NUMPY_ERR... | 30.858537 | 163 | 0.641084 |
08a4afc96f7c56b3ec32526d5ad975c5272d1d27 | 1,225 | py | Python | setup.py | danizen/apache-replay | 5e5cc8d0df693f2367d188d71099041c6a65317f | [
"MIT"
] | null | null | null | setup.py | danizen/apache-replay | 5e5cc8d0df693f2367d188d71099041c6a65317f | [
"MIT"
] | null | null | null | setup.py | danizen/apache-replay | 5e5cc8d0df693f2367d188d71099041c6a65317f | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name = 'apache-replay',
version = '0.0.3',
url = 'https://github.com/danizen/apache-replay.git',
author = 'Daniel Davis',
author_email = 'dan@danizen.net',
description = 'Facilitates replaying of Apache files in Common Log and Combined Log format',
long... | 33.108108 | 96 | 0.625306 |
08a6713846bc912e38363c64df0ddb98d1d40470 | 464 | py | Python | setup.py | duytintruong/do_more | 3a306da78ca302d2963cc7bae5f17e668168b595 | [
"MIT"
] | null | null | null | setup.py | duytintruong/do_more | 3a306da78ca302d2963cc7bae5f17e668168b595 | [
"MIT"
] | null | null | null | setup.py | duytintruong/do_more | 3a306da78ca302d2963cc7bae5f17e668168b595 | [
"MIT"
] | null | null | null | from distutils.core import setup
setup(
name='do_more',
packages=['do_more'],
version='0.1.0',
description='A library enhancing pydoit features.',
author='Duy Tin Truong',
author_email='',
url='https://github.com/duytintruong/do_more',
download_url='https://github.com/duytintruong/do_mor... | 27.294118 | 80 | 0.637931 |
08a7afeb8a1abc10ec91968f8b8eddea6a7e071a | 16,361 | py | Python | qtable/engine.py | ihgazni2/qtable | 269bb1052d7c7aeeae4d0b1024746fae38870c40 | [
"MIT"
] | null | null | null | qtable/engine.py | ihgazni2/qtable | 269bb1052d7c7aeeae4d0b1024746fae38870c40 | [
"MIT"
] | null | null | null | qtable/engine.py | ihgazni2/qtable | 269bb1052d7c7aeeae4d0b1024746fae38870c40 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import elist.elist as elel
import edict.edict as eded
import tlist.tlist as tltl
import copy
__all__ = [
'_append_col',
'_append_cols',
'_append_row',
'_append_rows',
'_cn2clocs',
'_col',
'_cols',
'_columns_map',
'_crop',
'_get_clocs',
'_get_rlocs',
'_getitem',
'_ind... | 27.40536 | 110 | 0.603753 |
08a840735e2065bf6687b54ab836fe21b29363da | 901 | py | Python | src/npgru/predictor/tensorflow_predictor.py | grainpowder/gru-forward-numpy-app | efd24f9f397d51e7e18bdad5cba12451ad69d3de | [
"MIT"
] | null | null | null | src/npgru/predictor/tensorflow_predictor.py | grainpowder/gru-forward-numpy-app | efd24f9f397d51e7e18bdad5cba12451ad69d3de | [
"MIT"
] | null | null | null | src/npgru/predictor/tensorflow_predictor.py | grainpowder/gru-forward-numpy-app | efd24f9f397d51e7e18bdad5cba12451ad69d3de | [
"MIT"
] | null | null | null | from typing import List, Tuple
import sentencepiece as spm
import tensorflow as tf
import tensorflow.keras as keras
from npgru.predictor.category_predictor import CategoryPredictor
from npgru.preprocessor.model_file import get_model_dir
| 39.173913 | 116 | 0.751387 |
08a9c217d15d92822c4d608156162c3fb67806ee | 358 | py | Python | eo_sensors/migrations/0005_auto_20210425_1946.py | dymaxionlabs/satlomas-back | f4568f6535755fd4a2432ecc661a264872206c6c | [
"Apache-2.0"
] | 1 | 2021-02-18T20:11:25.000Z | 2021-02-18T20:11:25.000Z | eo_sensors/migrations/0005_auto_20210425_1946.py | dymaxionlabs/satlomas-back | f4568f6535755fd4a2432ecc661a264872206c6c | [
"Apache-2.0"
] | 7 | 2020-06-09T14:54:43.000Z | 2021-09-22T21:00:13.000Z | eo_sensors/migrations/0005_auto_20210425_1946.py | dymaxionlabs/satlomas-back | f4568f6535755fd4a2432ecc661a264872206c6c | [
"Apache-2.0"
] | 1 | 2020-05-08T20:42:49.000Z | 2020-05-08T20:42:49.000Z | # Generated by Django 3.1.6 on 2021-04-25 19:46
from django.db import migrations
| 19.888889 | 57 | 0.592179 |
08ab2b8e0ae8691b40dba63be074cd70a395c8c1 | 503 | py | Python | algorithms/course_1/assignments/frac_knapsack/code.py | ideahitme/coursera | af44c8d817481d4f9025205284f109d95a9bb45d | [
"MIT"
] | null | null | null | algorithms/course_1/assignments/frac_knapsack/code.py | ideahitme/coursera | af44c8d817481d4f9025205284f109d95a9bb45d | [
"MIT"
] | null | null | null | algorithms/course_1/assignments/frac_knapsack/code.py | ideahitme/coursera | af44c8d817481d4f9025205284f109d95a9bb45d | [
"MIT"
] | null | null | null | import math
line = raw_input().strip().split()
N = int(line[0])
cap = float(line[1])
items = []
for _ in xrange(N):
items.append(map(float, raw_input().split()))
items = sorted(items, cmp=custcmp)
answer = 0.0
index = 0
while cap > 0 and index < N:
cur = items[index]
to_add = min(cur[1], cap)
answer += to_add... | 14.371429 | 46 | 0.600398 |
08ab2c42e46cc085323887951f27802509bc2c01 | 1,131 | py | Python | pythonDesafios/desafio058.py | mateusdev7/desafios-python | 6160ddc84548c7af7f5775f9acabe58238f83008 | [
"MIT"
] | null | null | null | pythonDesafios/desafio058.py | mateusdev7/desafios-python | 6160ddc84548c7af7f5775f9acabe58238f83008 | [
"MIT"
] | null | null | null | pythonDesafios/desafio058.py | mateusdev7/desafios-python | 6160ddc84548c7af7f5775f9acabe58238f83008 | [
"MIT"
] | null | null | null | from random import randint
from time import sleep
opcao = 123
cont = 0
while opcao != 0:
print('-=-' * 20)
print('Vou pensar em um nmero entre 0 e 10, quer tentar adivinhar?')
print('-=-' * 20)
print('\n[ 1 ] Sim [ 0 ] No')
opcao = int(input('Escolha uma das opes acima\n>'))
if opcao == 1:
... | 35.34375 | 78 | 0.535809 |
08ab8c8ec2777c51be6f0455ab77ed9f159c8995 | 1,896 | py | Python | FeatureEngineeringPy_DataScience/demo153_rarecategories.py | mahnooranjum/Programming_DataScience | f7a4215d4615b3f8460c3a1944a585628cf6930d | [
"MIT"
] | null | null | null | FeatureEngineeringPy_DataScience/demo153_rarecategories.py | mahnooranjum/Programming_DataScience | f7a4215d4615b3f8460c3a1944a585628cf6930d | [
"MIT"
] | null | null | null | FeatureEngineeringPy_DataScience/demo153_rarecategories.py | mahnooranjum/Programming_DataScience | f7a4215d4615b3f8460c3a1944a585628cf6930d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Demo153_RareCategories.ipynb
## Rare Categories
- Labels
- The number of labels in the dataset are different
- __high cardinality__ refers to uniqueness of data values
- The lower the cardinality, the more duplicated elements in a column
- A column with the lowest possible cardinali... | 26.704225 | 88 | 0.728903 |
08ac25798ceabd59a9de5ca3ae55d5d23549ad85 | 6,640 | py | Python | adios-1.9.0/utils/skel/lib/skel_params.py | swatisgupta/Adaptive-compression | b97a1d3d3e0e968f59c7023c7367a7efa9f672d0 | [
"BSD-2-Clause"
] | null | null | null | adios-1.9.0/utils/skel/lib/skel_params.py | swatisgupta/Adaptive-compression | b97a1d3d3e0e968f59c7023c7367a7efa9f672d0 | [
"BSD-2-Clause"
] | null | null | null | adios-1.9.0/utils/skel/lib/skel_params.py | swatisgupta/Adaptive-compression | b97a1d3d3e0e968f59c7023c7367a7efa9f672d0 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
import sys
import os
import argparse
import adios
import skel_settings
import skel_bpls
# Command line parsing is chained together. This is stage two. The first stage happens in ../bin/skel
# TODO: Get rid of this in favor of chained version, above.
if __name__ == "__main__":
... | 37.514124 | 181 | 0.613253 |
08ac337e36cbf17a299188a90d4c593630ec7136 | 786 | py | Python | centraldogma/util.py | line/centraldogma-python | 2248e8d7d660c0535aa747a70742ddd2bb0a5268 | [
"Apache-2.0"
] | 8 | 2021-12-02T00:51:35.000Z | 2022-01-07T09:49:08.000Z | centraldogma/util.py | line/centraldogma-python | 2248e8d7d660c0535aa747a70742ddd2bb0a5268 | [
"Apache-2.0"
] | 8 | 2021-11-22T03:37:17.000Z | 2022-02-14T10:02:31.000Z | centraldogma/util.py | line/centraldogma-python | 2248e8d7d660c0535aa747a70742ddd2bb0a5268 | [
"Apache-2.0"
] | 4 | 2021-11-22T03:48:39.000Z | 2021-12-31T05:42:43.000Z | # Copyright 2021 LINE Corporation
#
# LINE Corporation licenses this file to you 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:
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 39.3 | 78 | 0.720102 |
08ad2e5befe9beab57f5cfbb4752e8b8f6f82193 | 3,834 | py | Python | Build/site_scons/msvs_preprocessed.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Build/site_scons/msvs_preprocessed.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | Build/site_scons/msvs_preprocessed.py | Syeberman/nohtyP | 59d7214a5a5474a03c54f45d79ad4fd037989a79 | [
"CNRI-Python-GPL-Compatible"
] | null | null | null | """Provides a Preprocessed action for the Microsoft Visual Studio compilers.
"""
import os
import SCons.Action
import SCons.Util
import preprocessed_builder
# XXX These are internal to SCons and may change in the future...but it's unlikely
from SCons.Tool.msvc import CSuffixes, CXXSuffixes, msvc_batch_key
# TODO Con... | 41.673913 | 139 | 0.684142 |
08af1415b9293340224b8360402e471dbf0548c7 | 5,716 | py | Python | django_geoip/south_migrations/0001_initial.py | mandalay-rp/django-geoip | 2608cb15cdd7678c2ff923aff2437b1a861b8e6b | [
"MIT"
] | 38 | 2015-01-10T06:44:12.000Z | 2021-11-16T10:53:43.000Z | django_geoip/south_migrations/0001_initial.py | mandalay-rp/django-geoip | 2608cb15cdd7678c2ff923aff2437b1a861b8e6b | [
"MIT"
] | 28 | 2015-01-11T08:44:06.000Z | 2019-07-25T19:04:10.000Z | django_geoip/south_migrations/0001_initial.py | mandalay-rp/django-geoip | 2608cb15cdd7678c2ff923aff2437b1a861b8e6b | [
"MIT"
] | 56 | 2015-01-11T08:30:57.000Z | 2021-10-01T05:57:00.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
| 53.420561 | 147 | 0.601645 |
08af904e7f82a923beed7c2fa65793eb9bf02793 | 878 | py | Python | popbl_servicesapp/flask_app/order/application/api_client.py | xetxezarreta/master-popbl1 | 253880b9ba358f63f666893cdbbffe7391fcd096 | [
"MIT"
] | null | null | null | popbl_servicesapp/flask_app/order/application/api_client.py | xetxezarreta/master-popbl1 | 253880b9ba358f63f666893cdbbffe7391fcd096 | [
"MIT"
] | 1 | 2021-06-02T00:57:11.000Z | 2021-06-02T00:57:11.000Z | popbl_servicesapp/flask_app/order/application/api_client.py | xetxezarreta/master-popbl1 | 253880b9ba358f63f666893cdbbffe7391fcd096 | [
"MIT"
] | null | null | null | import requests
import json
from os import environ
from .models import Order, Piece
from .BLConsul import BLConsul
GATEWAY_PORT = environ.get("HAPROXY_PORT")
GATEWAY_ADDRESS = environ.get("HAPROXY_IP")
MACHINE_SERVICE = "machine"
PAYMENT_SERVICE = "payment"
DELIVERY_SERVICE = "delivery"
AUTH_SERVICE = "auth"
CA_CERT ... | 29.266667 | 100 | 0.693622 |
08b0009d58869628b97762ea4dfa9d97bd3f4777 | 429 | py | Python | envdsys/envdaq/migrations/0006_controllerdef_component_map.py | NOAA-PMEL/envDataSystem | 4db4a3569d2329658799a3eef06ce36dd5c0597d | [
"Unlicense"
] | 1 | 2021-11-06T19:22:53.000Z | 2021-11-06T19:22:53.000Z | envdsys/envdaq/migrations/0006_controllerdef_component_map.py | NOAA-PMEL/envDataSystem | 4db4a3569d2329658799a3eef06ce36dd5c0597d | [
"Unlicense"
] | 25 | 2019-06-18T20:40:36.000Z | 2021-07-23T20:56:48.000Z | envdsys/envdaq/migrations/0006_controllerdef_component_map.py | NOAA-PMEL/envDataSystem | 4db4a3569d2329658799a3eef06ce36dd5c0597d | [
"Unlicense"
] | null | null | null | # Generated by Django 3.1.7 on 2021-02-26 21:54
from django.db import migrations, models
| 22.578947 | 79 | 0.615385 |
08b08e4c091db6970d8bd9b3e8f858f92dfeb9ac | 2,569 | py | Python | polya/modules/congruence_closure_module.py | holtzermann17/polya | 6d611bf47185249a96f4cf7ee9b3884bc70a15ac | [
"Apache-2.0"
] | 24 | 2015-01-01T18:21:40.000Z | 2021-08-29T01:56:14.000Z | polya/modules/congruence_closure_module.py | holtzermann17/polya | 6d611bf47185249a96f4cf7ee9b3884bc70a15ac | [
"Apache-2.0"
] | 1 | 2018-09-06T17:53:13.000Z | 2018-09-07T13:57:39.000Z | polya/modules/congruence_closure_module.py | holtzermann17/polya | 6d611bf47185249a96f4cf7ee9b3884bc70a15ac | [
"Apache-2.0"
] | 4 | 2017-02-08T15:04:09.000Z | 2021-05-02T15:13:05.000Z | ####################################################################################################
#
# congruence_closure_module.py
#
# Authors:
# Jeremy Avigad
# Rob Lewis
#
# This module maintains a union-find structure for terms in Blackboard, which is currently only used
# for congruence closure. It should perhap... | 36.7 | 100 | 0.54963 |
08b3ea49c776eba1ca9a6e036f7a93721ad3e46b | 3,280 | py | Python | build.py | Jackcava/mappingToFHIR | 3189b55121a50ee1c4734227cde6da58ed6cb576 | [
"MIT"
] | null | null | null | build.py | Jackcava/mappingToFHIR | 3189b55121a50ee1c4734227cde6da58ed6cb576 | [
"MIT"
] | null | null | null | build.py | Jackcava/mappingToFHIR | 3189b55121a50ee1c4734227cde6da58ed6cb576 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import csv
| 34.893617 | 78 | 0.576524 |
08b53292c5c752e44fcf8b466dc5d84fa3ed0ec7 | 231 | py | Python | server.py | LuisAlbizo/luisalbizo.github.io | 823cac2c184686eb5056f9e1d3d0790f9a2233e1 | [
"MIT"
] | null | null | null | server.py | LuisAlbizo/luisalbizo.github.io | 823cac2c184686eb5056f9e1d3d0790f9a2233e1 | [
"MIT"
] | null | null | null | server.py | LuisAlbizo/luisalbizo.github.io | 823cac2c184686eb5056f9e1d3d0790f9a2233e1 | [
"MIT"
] | null | null | null | import http.server
import os
import socketserver
Handler = http.server.SimpleHTTPRequestHandler
httpd = socketserver.TCPServer(("127.0.0.1", 8080), Handler)
print("server:\thttp://127.0.0.1:8080\n\nlog:")
httpd.serve_forever()
| 19.25 | 60 | 0.757576 |
08b53ae263a1ae583483ba9e1d84efca2906ad4a | 2,109 | py | Python | sources-filter-list.py | kerberizer/wikimedia-scripts | 18b78d5cc0042d5efcb355a65f4309fb4ae97eaf | [
"CC0-1.0"
] | null | null | null | sources-filter-list.py | kerberizer/wikimedia-scripts | 18b78d5cc0042d5efcb355a65f4309fb4ae97eaf | [
"CC0-1.0"
] | null | null | null | sources-filter-list.py | kerberizer/wikimedia-scripts | 18b78d5cc0042d5efcb355a65f4309fb4ae97eaf | [
"CC0-1.0"
] | 1 | 2016-07-31T07:26:33.000Z | 2016-07-31T07:26:33.000Z | #!/usr/bin/env python3
import locale
import sys
from datetime import datetime as dt
import pywikibot as pwb
if __name__ == '__main__':
main(sys.argv)
# vim: set ts=4 sts=4 sw=4 tw=100 et:
| 31.477612 | 98 | 0.543385 |
08b87f9a1caf36c7bc295170c1ae9c29a566dd2b | 1,494 | py | Python | Python scripts/Mail/search-and-modify-inbox-mail.py | shartrooper/My-python-scripts | 5c3a8db4ed9a75bd9ab4b29153a788d9e6c5d28c | [
"MIT"
] | null | null | null | Python scripts/Mail/search-and-modify-inbox-mail.py | shartrooper/My-python-scripts | 5c3a8db4ed9a75bd9ab4b29153a788d9e6c5d28c | [
"MIT"
] | null | null | null | Python scripts/Mail/search-and-modify-inbox-mail.py | shartrooper/My-python-scripts | 5c3a8db4ed9a75bd9ab4b29153a788d9e6c5d28c | [
"MIT"
] | null | null | null | Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> # pip install imapclient // pip install pyzmail
>>> import imapclient
>>> conn= imapclient.IMAPClient('imap.gmail.com', ssl=True) #True to use S... | 33.954545 | 101 | 0.680054 |
08bc79ee80be4534b8a825bbd1af9247d2662a71 | 2,633 | py | Python | diagnosis/system_diagnosis/inference.py | opengauss-mirror/openGauss-AI | 449ce3cac81ced74dd56edf76709553411b0814a | [
"MulanPSL-1.0"
] | 1 | 2021-12-22T08:31:07.000Z | 2021-12-22T08:31:07.000Z | diagnosis/system_diagnosis/inference.py | opengauss-mirror/openGauss-AI | 449ce3cac81ced74dd56edf76709553411b0814a | [
"MulanPSL-1.0"
] | null | null | null | diagnosis/system_diagnosis/inference.py | opengauss-mirror/openGauss-AI | 449ce3cac81ced74dd56edf76709553411b0814a | [
"MulanPSL-1.0"
] | 3 | 2021-12-16T13:55:57.000Z | 2022-02-24T09:53:49.000Z | /*
* Copyright (c) 2020 Huawei Technologies Co.,Ltd.
*
* openGauss is licensed under Mulan PSL v2.
* You can use this software according to the terms and conditions of the Mulan PSL v2.
* You may obtain a copy of Mulan PSL v2 at:
*
* http://license.coscl.org.cn/MulanPSL2
*
* THIS SOFTWARE IS PROVIDED ... | 28.010638 | 87 | 0.689708 |
08bd8918199d2e5006f69cc8ccd6b3fde0ba16d8 | 1,850 | py | Python | python/test_golden_master.py | AEGISoft/GildedRose-Refactoring-Kata | a81452de5b6831fa6c4f42b15f827ecf6ef29807 | [
"MIT"
] | null | null | null | python/test_golden_master.py | AEGISoft/GildedRose-Refactoring-Kata | a81452de5b6831fa6c4f42b15f827ecf6ef29807 | [
"MIT"
] | null | null | null | python/test_golden_master.py | AEGISoft/GildedRose-Refactoring-Kata | a81452de5b6831fa6c4f42b15f827ecf6ef29807 | [
"MIT"
] | null | null | null | import unittest
from gilded_rose import Item, GildedRose
if __name__ == '__main__':
unittest.main()
| 31.355932 | 87 | 0.617838 |
08bee3076eef6096e40c84d40b43d0ef450a6e30 | 895 | py | Python | utils/randomdata.py | M1d0r1/py_mantis | 8d2b05601b9240e76e2e07b50770e39df5bcade9 | [
"Apache-2.0"
] | null | null | null | utils/randomdata.py | M1d0r1/py_mantis | 8d2b05601b9240e76e2e07b50770e39df5bcade9 | [
"Apache-2.0"
] | null | null | null | utils/randomdata.py | M1d0r1/py_mantis | 8d2b05601b9240e76e2e07b50770e39df5bcade9 | [
"Apache-2.0"
] | null | null | null | import random
import string
| 22.948718 | 107 | 0.61676 |
08c039eccfb3500006401f61d37873f932777364 | 1,120 | py | Python | douyin/hot/trend.py | miaotiaotech/DouYin | e996ad99ce27e0d13f2856c497fd4b4f05f95b56 | [
"MIT"
] | 657 | 2018-10-24T16:58:04.000Z | 2022-03-15T03:58:04.000Z | douyin/hot/trend.py | 1997lw/DouYin | 5859f4db5258ad10926fddaa2b4074c85581d419 | [
"MIT"
] | 15 | 2018-10-30T09:40:11.000Z | 2020-08-09T13:58:31.000Z | douyin/hot/trend.py | 1997lw/DouYin | 5859f4db5258ad10926fddaa2b4074c85581d419 | [
"MIT"
] | 249 | 2018-10-25T07:12:14.000Z | 2022-02-21T07:49:58.000Z | from douyin.utils import fetch
from douyin.config import hot_trend_url, common_headers
from douyin.utils.tranform import data_to_music, data_to_topic
from douyin.structures.hot import HotTrend
from douyin.utils.common import parse_datetime
# define trend query params
query = {
'version_code': '2.9.1',
'count'... | 32 | 99 | 0.633036 |
08c1a85992031481a6829f933c45c2206c709fa4 | 288 | py | Python | hashing/hashing.py | subhamsagar524/Learn-Blockchain | 316f30ed9d43f6ab806ca87b9b83c0237ef69828 | [
"MIT"
] | null | null | null | hashing/hashing.py | subhamsagar524/Learn-Blockchain | 316f30ed9d43f6ab806ca87b9b83c0237ef69828 | [
"MIT"
] | null | null | null | hashing/hashing.py | subhamsagar524/Learn-Blockchain | 316f30ed9d43f6ab806ca87b9b83c0237ef69828 | [
"MIT"
] | 1 | 2020-03-13T06:32:46.000Z | 2020-03-13T06:32:46.000Z | # Import the hashing Library
import hashlib
# Get the string as input
word = input("Enter the word for Hashing: ")
# Get the hashing
hashed_code = hashlib.sha256(word.encode())
final = hashed_code.hexdigest()
# Print the result
print("Hashed with 256 bit: ")
print(final)
| 20.571429 | 45 | 0.704861 |
08c3c73fb071c563aa6c6cb9106af9a4e78d2bdf | 1,416 | py | Python | bookmarks/bookmarks/models.py | tom-henderson/bookmarks | 5515bedf1008da3e97caf0ed5867bcf983b375b1 | [
"MIT"
] | 6 | 2017-01-09T22:59:31.000Z | 2022-01-06T01:40:57.000Z | bookmarks/bookmarks/models.py | tom-henderson/bookmarks | 5515bedf1008da3e97caf0ed5867bcf983b375b1 | [
"MIT"
] | 30 | 2016-09-13T07:30:26.000Z | 2022-02-07T22:49:03.000Z | bookmarks/bookmarks/models.py | tom-henderson/bookmarks | 5515bedf1008da3e97caf0ed5867bcf983b375b1 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.utils import timezone
from django.dispatch import receiver
from django.conf import settings
from taggit.managers import TaggableManager
import requests
| 28.897959 | 74 | 0.631356 |
08c3ea3ed3c0d6241f479fa852ed05c431f46706 | 797 | py | Python | vernam cipher.py | BenMiller3/Vernam-Cipher | 19f7a447bc8080c8e275b96a85d359f4e187a4d3 | [
"MIT"
] | null | null | null | vernam cipher.py | BenMiller3/Vernam-Cipher | 19f7a447bc8080c8e275b96a85d359f4e187a4d3 | [
"MIT"
] | null | null | null | vernam cipher.py | BenMiller3/Vernam-Cipher | 19f7a447bc8080c8e275b96a85d359f4e187a4d3 | [
"MIT"
] | null | null | null | """
Vernam Cipher
Benjamin D. Miller
Takes a key, and a message
Encripts the message using the key
"""
""" * TEST CASES * """
vernam(9,"hello world")
vernam(14,"TEST_CASE 34!")
vernam("test","test")
| 27.482759 | 91 | 0.567127 |
08c47e02acc3cf4c516e8edc1336ab1be1430cd8 | 421 | py | Python | utils.py | c0derabbit/talk | 26673fde934ef51e76002ea6ddc65bdb42720865 | [
"MIT"
] | null | null | null | utils.py | c0derabbit/talk | 26673fde934ef51e76002ea6ddc65bdb42720865 | [
"MIT"
] | 1 | 2017-05-25T20:37:54.000Z | 2017-05-26T07:33:00.000Z | utils.py | c0derabbit/talk | 26673fde934ef51e76002ea6ddc65bdb42720865 | [
"MIT"
] | null | null | null | from datetime import datetime as d
| 30.071429 | 100 | 0.64133 |
08c693a49ad9f776684155a7c2f26843f0a00070 | 3,694 | py | Python | fineract/objects/org.py | mobidevke/py-fineract | 712b0c20686accd7d7e0a2356ccaf59c5fe4f7dd | [
"Apache-2.0"
] | 7 | 2019-03-11T16:17:33.000Z | 2020-10-22T21:57:51.000Z | fineract/objects/org.py | mobidevke/py-fineract | 712b0c20686accd7d7e0a2356ccaf59c5fe4f7dd | [
"Apache-2.0"
] | 3 | 2019-11-05T20:22:16.000Z | 2019-12-11T17:09:04.000Z | fineract/objects/org.py | mobidevke/py-fineract | 712b0c20686accd7d7e0a2356ccaf59c5fe4f7dd | [
"Apache-2.0"
] | 2 | 2020-11-19T16:00:36.000Z | 2021-11-19T09:36:13.000Z | from fineract.objects.currency import Currency
from fineract.objects.fineract_object import FineractObject
from fineract.objects.types import ChargeTimeType, ChargeAppliesTo, ChargeCalculationType, ChargePaymentMode
| 36.574257 | 117 | 0.647266 |
08c6e61cafacb0416494f10178b2d50c3d4b7ef8 | 1,736 | py | Python | Heap/PathWithMinEffort.py | karan2808/Python-Data-Structures-and-Algorithms | a4b39ddf7297541d90dc4efcaab883f928281abd | [
"MIT"
] | 2 | 2021-01-31T03:42:01.000Z | 2021-01-31T03:43:08.000Z | Heap/PathWithMinEffort.py | karan2808/Python-Data-Structures-and-Algorithms | a4b39ddf7297541d90dc4efcaab883f928281abd | [
"MIT"
] | null | null | null | Heap/PathWithMinEffort.py | karan2808/Python-Data-Structures-and-Algorithms | a4b39ddf7297541d90dc4efcaab883f928281abd | [
"MIT"
] | 1 | 2021-01-31T03:42:02.000Z | 2021-01-31T03:42:02.000Z | from heapq import heapify, heappop, heappush
if __name__ == "__main__":
main() | 36.166667 | 123 | 0.506336 |
08c9e9c176a984ea5d15821ab3616cd2313fc432 | 1,427 | wsgi | Python | vagrant/catalog/StuffMart.wsgi | cpwhidden/StuffMart | a192b8cad8942d0bfddb3af861f1e48c460e28cf | [
"MIT"
] | null | null | null | vagrant/catalog/StuffMart.wsgi | cpwhidden/StuffMart | a192b8cad8942d0bfddb3af861f1e48c460e28cf | [
"MIT"
] | null | null | null | vagrant/catalog/StuffMart.wsgi | cpwhidden/StuffMart | a192b8cad8942d0bfddb3af861f1e48c460e28cf | [
"MIT"
] | null | null | null | activate_this = '/var/www/html/venv/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
import sys, os, logging
from flask_apscheduler import APScheduler
sys.path.insert(0, 'var/www/html/StuffMart/vagrant/catalog')
logging.basicConfig(stream=sys.stderr)
from server import flask as application
... | 34.804878 | 93 | 0.658725 |
08cc589cc9423942aa94cc3bb343109a1f7cba67 | 18,161 | py | Python | tests/strategies/test_horizontal.py | rohith-bs/dgraphpandas | 29e91e2e7bb1d5d991ab94709a2d7e27f7dd7316 | [
"MIT"
] | 1 | 2022-02-28T17:34:11.000Z | 2022-02-28T17:34:11.000Z | tests/strategies/test_horizontal.py | rohith-bs/dgraphpandas | 29e91e2e7bb1d5d991ab94709a2d7e27f7dd7316 | [
"MIT"
] | null | null | null | tests/strategies/test_horizontal.py | rohith-bs/dgraphpandas | 29e91e2e7bb1d5d991ab94709a2d7e27f7dd7316 | [
"MIT"
] | 1 | 2021-04-10T19:57:05.000Z | 2021-04-10T19:57:05.000Z | import unittest
from unittest.mock import patch, Mock
import pandas as pd
from pandas.testing import assert_frame_equal
from parameterized import parameterized
from dgraphpandas.strategies.horizontal import horizontal_transform
| 34.395833 | 125 | 0.472 |
08cedf482cda63c943ec43e8d04a65c278427e19 | 378 | py | Python | clienteTCP.py | planetacomputer/pythonsecurity | 5b808512afae5bc221715f37f91a0294f4800f19 | [
"MIT"
] | null | null | null | clienteTCP.py | planetacomputer/pythonsecurity | 5b808512afae5bc221715f37f91a0294f4800f19 | [
"MIT"
] | null | null | null | clienteTCP.py | planetacomputer/pythonsecurity | 5b808512afae5bc221715f37f91a0294f4800f19 | [
"MIT"
] | null | null | null | #!/usr/bin/python # This is client.py file
import socket # Import socket module
s = socket.socket() # Create a socket object
#host = socket.gethostname() # Get local machine name
host = socket.gethostbyname("localhost")
print host
port = 53 # Reserve a port for your serv... | 29.076923 | 59 | 0.637566 |
08ceeff12c2a6ee62212a18498cd6880997296e3 | 1,759 | py | Python | application/routes.py | N-A-Podgornov/CFT-MLC | ded9267c5b8053a15bdcc67be9f83097749cfb13 | [
"Apache-2.0"
] | null | null | null | application/routes.py | N-A-Podgornov/CFT-MLC | ded9267c5b8053a15bdcc67be9f83097749cfb13 | [
"Apache-2.0"
] | null | null | null | application/routes.py | N-A-Podgornov/CFT-MLC | ded9267c5b8053a15bdcc67be9f83097749cfb13 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
from flask import render_template, redirect, url_for, request
from werkzeug.utils import secure_filename
from config import Config
from application import app
from application.model import Model
| 30.859649 | 106 | 0.704377 |
08cfc63dc9bcf57b5303ab14c053f28fd612cafc | 4,095 | py | Python | tests/test_onnxml_imputer_converter.py | vumichien/hummingbird | 8981e11ce2536167c329a5d9d20e81125a792fe4 | [
"MIT"
] | 2,772 | 2020-05-04T21:03:40.000Z | 2022-03-30T11:00:03.000Z | tests/test_onnxml_imputer_converter.py | vumichien/hummingbird | 8981e11ce2536167c329a5d9d20e81125a792fe4 | [
"MIT"
] | 486 | 2020-05-05T00:45:44.000Z | 2022-03-15T01:02:31.000Z | tests/test_onnxml_imputer_converter.py | vumichien/hummingbird | 8981e11ce2536167c329a5d9d20e81125a792fe4 | [
"MIT"
] | 232 | 2019-11-02T22:06:38.000Z | 2022-03-25T07:36:17.000Z | """
Tests onnxml Imputer converter
"""
import unittest
import warnings
import numpy as np
import torch
from sklearn.impute import SimpleImputer
from hummingbird.ml._utils import onnx_ml_tools_installed, onnx_runtime_installed, lightgbm_installed
from hummingbird.ml import convert
if onnx_runtime_installed():
imp... | 40.147059 | 125 | 0.70696 |
08d1b0407331ee4e1921fc4b74a0794639337160 | 7,520 | py | Python | rs_etl.py | jlauman/data_engineering_project_03 | 722c0f5226ed29c00d6b33e64da5982fe0be69e0 | [
"MIT"
] | null | null | null | rs_etl.py | jlauman/data_engineering_project_03 | 722c0f5226ed29c00d6b33e64da5982fe0be69e0 | [
"MIT"
] | null | null | null | rs_etl.py | jlauman/data_engineering_project_03 | 722c0f5226ed29c00d6b33e64da5982fe0be69e0 | [
"MIT"
] | null | null | null | import configparser, os, glob, csv, json, hashlib, time
import pandas as pd
import psycopg2
from pprint import pprint
from rs_sql_queries import staging_events_insert, staging_songs_insert
from rs_sql_queries import insert_table_queries
import boto3
from botocore import UNSIGNED
from botocore.config import Config
DE... | 38.367347 | 173 | 0.529255 |
08d269d1ebc51a6ac75c04bc8fcc26f6ea8bd98e | 1,002 | py | Python | cron/weather.py | joedanz/flask-weather | fe35aa359da6f5d7f942d97837403e153b5c5ede | [
"Apache-2.0"
] | 1 | 2017-08-25T18:55:11.000Z | 2017-08-25T18:55:11.000Z | cron/weather.py | joedanz/flask-weather | fe35aa359da6f5d7f942d97837403e153b5c5ede | [
"Apache-2.0"
] | null | null | null | cron/weather.py | joedanz/flask-weather | fe35aa359da6f5d7f942d97837403e153b5c5ede | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import json, urllib2, datetime
from sqlite3 import dbapi2 as sqlite3
# zip codes to log
zipcodes = ['07740','11210','33139','90210']
# configuration
DATABASE = '../db/weather.db'
SECRET_KEY = 'hackerati'
DEBUG = True
# open database
db = sqlite3.connect(DATABASE)
for zipcode in zipcodes:
# pu... | 26.368421 | 102 | 0.673653 |
08d4af28a19751f94bb0827b79075eb4b7ae0ea7 | 234 | py | Python | tests/test_print_as_discovered.py | acardos/git_inspector | ee194a62606ddb882ce0736618bae053e6b8521d | [
"MIT"
] | 4 | 2021-12-06T15:35:19.000Z | 2022-01-23T23:17:38.000Z | tests/test_print_as_discovered.py | acardos/git_inspector | ee194a62606ddb882ce0736618bae053e6b8521d | [
"MIT"
] | 12 | 2021-03-31T09:14:40.000Z | 2022-01-31T10:01:25.000Z | tests/test_print_as_discovered.py | acardos/git_inspector | ee194a62606ddb882ce0736618bae053e6b8521d | [
"MIT"
] | 1 | 2022-01-22T11:37:08.000Z | 2022-01-22T11:37:08.000Z |
from git import Repo
from git_inspector import find_git_directories
| 19.5 | 69 | 0.794872 |
08d50632dbe42cde10ed75ee126dd035ddf3804a | 3,480 | py | Python | src/frontend/function_transforms/pass_div_zero.py | mfeliu/gelpia | 30c6c1030165b26bf5f84613316f6fc2ce3ebe8b | [
"MIT"
] | null | null | null | src/frontend/function_transforms/pass_div_zero.py | mfeliu/gelpia | 30c6c1030165b26bf5f84613316f6fc2ce3ebe8b | [
"MIT"
] | null | null | null | src/frontend/function_transforms/pass_div_zero.py | mfeliu/gelpia | 30c6c1030165b26bf5f84613316f6fc2ce3ebe8b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
try:
from gelpia import bin_dir
except:
print("gelpia not found, gaol_repl must be in your PATH\n")
bin_dir = ""
from pass_utils import *
from output_flatten import flatten
import re
import sys
import subprocess
import os.path as path
if __name__ == "__main__":
try:
runma... | 23.355705 | 67 | 0.611207 |
08d52a54cf446718a15b7b80b28b2ccd05586869 | 2,150 | py | Python | setup.py | bearroast/django-estimators | 5dd72694dab6725335214543a59104c4de504037 | [
"MIT"
] | 46 | 2016-09-13T06:33:30.000Z | 2022-01-08T00:55:37.000Z | setup.py | bearroast/django-estimators | 5dd72694dab6725335214543a59104c4de504037 | [
"MIT"
] | 14 | 2016-09-10T04:56:30.000Z | 2017-11-28T04:12:43.000Z | setup.py | bearroast/django-estimators | 5dd72694dab6725335214543a59104c4de504037 | [
"MIT"
] | 19 | 2016-09-20T23:53:26.000Z | 2022-01-08T00:55:39.000Z | import os
from pip.req import parse_requirements
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# parse_requirements() returns generator of pip.req.InstallRequirement objects
install_reqs = parse_requirements(
os.... | 40.566038 | 88 | 0.670698 |
08d5314ae1e6b39701c18dfc2466ee45cde74ef6 | 7,517 | py | Python | ip_group.py | vectranetworks/csv-to-ip-group | f8f53f979c62c3db161fcb7fdc3b7ebb26842055 | [
"MIT"
] | null | null | null | ip_group.py | vectranetworks/csv-to-ip-group | f8f53f979c62c3db161fcb7fdc3b7ebb26842055 | [
"MIT"
] | null | null | null | ip_group.py | vectranetworks/csv-to-ip-group | f8f53f979c62c3db161fcb7fdc3b7ebb26842055 | [
"MIT"
] | null | null | null | import csv
import ipaddress
import logging.handlers
import sys
import argparse
try:
import vat.vectra as vectra
import requests
except Exception as error:
print('\nMissing import requirements: {}\n'.format(str(error)))
sys.exit(0)
LOG = logging.getLogger(__name__)
INVALID_CHARS = ['~', '#', '$', '^'... | 39.151042 | 118 | 0.596648 |
08d5fc45e5a26919b46ae56fd9e3cb2d53ede3e7 | 512 | py | Python | BasicSyntax/DataType.py | Fjaxzhy/top.kagurayayoi.learn.Python | af2ad3b7da85fb0af1668d3751c0342b16d0966f | [
"MIT"
] | null | null | null | BasicSyntax/DataType.py | Fjaxzhy/top.kagurayayoi.learn.Python | af2ad3b7da85fb0af1668d3751c0342b16d0966f | [
"MIT"
] | 11 | 2021-03-29T08:50:16.000Z | 2021-03-31T08:46:55.000Z | BasicSyntax/DataType.py | Fjaxzhy/top.kagurayayoi.learn.Python | af2ad3b7da85fb0af1668d3751c0342b16d0966f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Python
#
#
# Number / String / Tuple
# List / Dictionary / Set
# Number
# Int
IntNum = 100
# Float
FloatNum = 100.10
# Boolean // True:1 False:0
BoolNum = True
# Complex
ComplexNum = 1.00j
# String
Str = ""
# List
List = ['a', 'b', 1, 2]
# Tu... | 14.628571 | 43 | 0.59375 |
08d5febbe68f3f78281ba4430f7b17df3067f244 | 3,526 | py | Python | tcex/api/tc/v3/_gen/_gen_args_abc.py | GShepherdTC/tcex | 70b1199b8bb9e63f53e2ba792489267108c909cd | [
"Apache-2.0"
] | null | null | null | tcex/api/tc/v3/_gen/_gen_args_abc.py | GShepherdTC/tcex | 70b1199b8bb9e63f53e2ba792489267108c909cd | [
"Apache-2.0"
] | null | null | null | tcex/api/tc/v3/_gen/_gen_args_abc.py | GShepherdTC/tcex | 70b1199b8bb9e63f53e2ba792489267108c909cd | [
"Apache-2.0"
] | null | null | null | """Generate Docs for ThreatConnect API"""
# standard library
import importlib
import sys
from abc import ABC
from typing import Any, Optional
# first-party
from tcex.api.tc.v3._gen._gen_abc import GenerateABC
| 33.264151 | 89 | 0.574022 |
08d6edb44ef1415e69d5e8564970749ce00f431c | 382 | py | Python | rename_smpls.py | Chartiza/bulls | e4e7895a37a0335572dea50f2cbaae2737b3cd5f | [
"MIT"
] | null | null | null | rename_smpls.py | Chartiza/bulls | e4e7895a37a0335572dea50f2cbaae2737b3cd5f | [
"MIT"
] | null | null | null | rename_smpls.py | Chartiza/bulls | e4e7895a37a0335572dea50f2cbaae2737b3cd5f | [
"MIT"
] | null | null | null | #!/usr/bin/python
sootv = {}
#Read file sootvetstviya
for l in open ("filesootv"):
data = l.strip().split("\t")
if data[0] not in sootv:
sootv[data[0]] = data[1]
#Read FinalReport file
for l in open('Ire30_GP'):
data = l.strip().split("\t")
if data[1] in sootv:
print(data[0]+"\t"+sootv[data[1]]... | 23.875 | 94 | 0.570681 |
08d8b9d0bef0b39a979fb0521f02328c098ccbd7 | 448 | py | Python | 3day/Quiz01_1.py | jsjang93/joony | 62f7a325094c887212b894932263bf84500e0f03 | [
"MIT"
] | null | null | null | 3day/Quiz01_1.py | jsjang93/joony | 62f7a325094c887212b894932263bf84500e0f03 | [
"MIT"
] | null | null | null | 3day/Quiz01_1.py | jsjang93/joony | 62f7a325094c887212b894932263bf84500e0f03 | [
"MIT"
] | null | null | null | # Quiz01_1.py
items = {"":1000,"":900,"":500,"":700,"":800}
print("=== ====")
print("[][][][][] ")
print(" --> ) , ")
# item, price
item = input() # ,
items2 = item.strip().split(',')
price = pItems(*items2,**items)
print(" : {0} ".format(price) ) | 22.4 | 58 | 0.564732 |
08d8e05ba83fd1eb90111af5408ae91ffdf11318 | 2,619 | py | Python | src/custom_arch/custom_alexnet.py | joeyseash/PruneTrain | 5adb367eb90b7e1e38251f8e3a8e7eb65b167aa0 | [
"Apache-2.0"
] | 1 | 2021-10-03T00:57:32.000Z | 2021-10-03T00:57:32.000Z | src/custom_arch/custom_alexnet.py | VictorSuciu/prunetrain | ef84a88ef8a34f8e79de783ffdb9d3b82545dc3b | [
"Apache-2.0"
] | null | null | null | src/custom_arch/custom_alexnet.py | VictorSuciu/prunetrain | ef84a88ef8a34f8e79de783ffdb9d3b82545dc3b | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019 Sangkug Lym
Copyright 2019 The University of Texas at Austin
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... | 34.012987 | 104 | 0.658267 |
08da6b4771c11626f2b1e4199314a129e0c7bb3d | 3,089 | py | Python | app/ml/train_data.py | curioswati/scrapy-tsa | 50556880125412e0b8d925fb46c41c44dd31fb37 | [
"MIT"
] | 2 | 2020-01-15T05:17:23.000Z | 2020-08-13T01:50:00.000Z | app/ml/train_data.py | curioswati/scrapy-tsa | 50556880125412e0b8d925fb46c41c44dd31fb37 | [
"MIT"
] | null | null | null | app/ml/train_data.py | curioswati/scrapy-tsa | 50556880125412e0b8d925fb46c41c44dd31fb37 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy
import csv
import re, nltk
from sklearn.feature_extraction.text import CountVectorizer
from nltk.stem.porter import PorterStemmer
from sklearn.linear_model import LogisticRegression
# from sklearn.cross_validation import train_test_split
from sklearn.externals import joblib... | 26.86087 | 94 | 0.717708 |
08dc052ecc3d96e2ef3efe41624a974268f5c7b0 | 2,596 | py | Python | DIP/exercises/ex10/pca.py | apeyrard/sjtu-work | ca98fec3c83b81ed9091bdc968cb5ad8a74d1d6a | [
"MIT"
] | 1 | 2022-03-26T10:04:05.000Z | 2022-03-26T10:04:05.000Z | DIP/exercises/ex10/pca.py | apeyrard/sjtu-work | ca98fec3c83b81ed9091bdc968cb5ad8a74d1d6a | [
"MIT"
] | null | null | null | DIP/exercises/ex10/pca.py | apeyrard/sjtu-work | ca98fec3c83b81ed9091bdc968cb5ad8a74d1d6a | [
"MIT"
] | 1 | 2022-03-26T10:04:06.000Z | 2022-03-26T10:04:06.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import sys
import os
from PIL import Image
import numpy as np
size = None
matrix_x = None
for image in os.listdir('./washington'):
try:
print(image)
with Image.open(os.path.join('./washington',image)) as im:
imgVector = np.array(list(im.get... | 23.6 | 68 | 0.573575 |
08dc36bae83be55acec0ed61f76a33d11f4bb8a1 | 1,677 | py | Python | organisations/migrate-entities/script.py | jbarnes/aws-python-script-collection | bf2accf60b8c14af89fab3a210c4df6a3b2e0ba9 | [
"MIT"
] | null | null | null | organisations/migrate-entities/script.py | jbarnes/aws-python-script-collection | bf2accf60b8c14af89fab3a210c4df6a3b2e0ba9 | [
"MIT"
] | null | null | null | organisations/migrate-entities/script.py | jbarnes/aws-python-script-collection | bf2accf60b8c14af89fab3a210c4df6a3b2e0ba9 | [
"MIT"
] | null | null | null | import boto3
import sys
if __name__ == "__main__":
if len(sys.argv) > 2:
print("[ERROR] You have passed in an invalid target-id, example target-id is ou-zhz0-prn5fmbc")
sys.exit()
else:
print("[INFO] Valid argument detected, proceeding with account migration")
destination_id = ... | 35.680851 | 103 | 0.556947 |
08dcaa11c309d6ad11738f4ba7bc30c87f71fe32 | 274 | py | Python | templates/python.py | limacat76/Polyglot-Study | ec71186d4dfbecebf372eb11affd9b5a2b76e47a | [
"MIT"
] | null | null | null | templates/python.py | limacat76/Polyglot-Study | ec71186d4dfbecebf372eb11affd9b5a2b76e47a | [
"MIT"
] | null | null | null | templates/python.py | limacat76/Polyglot-Study | ec71186d4dfbecebf372eb11affd9b5a2b76e47a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from sys import argv
from sys import stdin
from sys import stdout
alp = len(argv)
if alp > 1 and argv[1] == "--version":
print ('version 0.1')
quit()
if alp > 1 and argv[1] == "--help":
print ('ctrl+d to quit')
quit()
print('todo')
| 17.125 | 38 | 0.605839 |
08dfdc660c21f835d66e36e8817b005006f680b0 | 1,142 | py | Python | Transcribing_DNA_into_RNA.py | hedianeposselt/ROSALIND | 6d53167e1ec98fc22992da7cd74d385a97baa870 | [
"Apache-2.0"
] | 1 | 2022-03-29T10:17:56.000Z | 2022-03-29T10:17:56.000Z | Transcribing_DNA_into_RNA.py | hedianeposselt/ROSALIND | 6d53167e1ec98fc22992da7cd74d385a97baa870 | [
"Apache-2.0"
] | null | null | null | Transcribing_DNA_into_RNA.py | hedianeposselt/ROSALIND | 6d53167e1ec98fc22992da7cd74d385a97baa870 | [
"Apache-2.0"
] | null | null | null | # https://rosalind.info/problems/rna/
# Transcribing DNA into RNA exercise from ROSALIND
DNA = "ACAACAAAGGATCGGCGAGGAGCTGGTTAATCTCGATTCTAACAAAGGCCTCTTGAGTGACATAAAGTTGCTGTTCGGCCCCCGTTGCAGCCAAGCCTAGACTCGAGCGGGGTCTACCTCTGTAAACCCAAGTCGCAGGCCAAGGGCATTTTAACCCCCAAAGTTAGATACGTCGATTGAGTGCGCACTCCCTAACTTCAGACAGGATGGCGCTTAGCACTGG... | 81.571429 | 931 | 0.932574 |
08e02a9b4adc8aa43eb49a2fd41a870ebd71dbaa | 516 | py | Python | micro_admin/migrations/0010_auto_20160804_1044.py | lance0145/micro-finance | 1ba6339a9d05ff2f20b020b97a233c766b2ee6e0 | [
"MIT"
] | 72 | 2015-09-18T07:23:20.000Z | 2022-03-23T14:35:46.000Z | micro_admin/migrations/0010_auto_20160804_1044.py | mohbadar/micro-finance | 00fc9ad1e09cd6658aa5fa0dd991cf18fe2927a6 | [
"MIT"
] | 68 | 2015-01-03T13:44:40.000Z | 2021-06-10T20:00:23.000Z | micro_admin/migrations/0010_auto_20160804_1044.py | mohbadar/micro-finance | 00fc9ad1e09cd6658aa5fa0dd991cf18fe2927a6 | [
"MIT"
] | 73 | 2015-02-10T07:03:42.000Z | 2022-02-24T21:11:01.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-04 10:44
from __future__ import unicode_literals
from django.db import migrations
| 25.8 | 162 | 0.629845 |
08e07a97a9f3cede768ff174381cda6e3a2e9847 | 3,823 | py | Python | ProgrammersGuideExamples/provisioning.py | mrhorrible78/PyU4V | 5b9274fd6f5f80a4a6e7aa487e348fa91f6f315c | [
"MIT"
] | null | null | null | ProgrammersGuideExamples/provisioning.py | mrhorrible78/PyU4V | 5b9274fd6f5f80a4a6e7aa487e348fa91f6f315c | [
"MIT"
] | null | null | null | ProgrammersGuideExamples/provisioning.py | mrhorrible78/PyU4V | 5b9274fd6f5f80a4a6e7aa487e348fa91f6f315c | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2016 Dell Inc. or its subsidiaries.
# 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 ... | 43.443182 | 86 | 0.625948 |
08e17200183b1b4c4b38978e4c91346462570f54 | 8,227 | py | Python | quickdraw-doodle-recognition/gcloud/common.py | yasserglez/kaggle_titanic | 7a4857ec9a99c31eb53a91dda3ad9ecd5b647278 | [
"MIT"
] | 2 | 2019-09-29T02:26:58.000Z | 2020-03-06T07:38:58.000Z | quickdraw-doodle-recognition/gcloud/common.py | yasserglez/kaggle_titanic | 7a4857ec9a99c31eb53a91dda3ad9ecd5b647278 | [
"MIT"
] | 2 | 2018-12-17T04:32:09.000Z | 2019-10-22T00:31:06.000Z | quickdraw-doodle-recognition/gcloud/common.py | yasserglez/kaggle | 7a4857ec9a99c31eb53a91dda3ad9ecd5b647278 | [
"MIT"
] | null | null | null | import struct
import itertools
import numpy as np
from bitarray import bitarray
RANDOM_SEED = 2387613
IMAGE_SIZE = 128
BATCH_SIZE = 2048
# Assign an integer to each word to be predicted.
WORD2LABEL = {
'The Eiffel Tower': 0,
'The Great Wall of China': 1,
'The Mona Lisa': 2,
'airplane': 3,
'alar... | 20.880711 | 95 | 0.519874 |
08e17bfd02380a8da82eb6cb901cf80fe395ede2 | 34,734 | py | Python | feature.py | TimothyChen225/AFC-X | 901a0019b7c153804570c480c3da4825776dbf02 | [
"MIT"
] | null | null | null | feature.py | TimothyChen225/AFC-X | 901a0019b7c153804570c480c3da4825776dbf02 | [
"MIT"
] | null | null | null | feature.py | TimothyChen225/AFC-X | 901a0019b7c153804570c480c3da4825776dbf02 | [
"MIT"
] | null | null | null | from collections import Counter
from Bio import SeqIO
import numpy as np
import warnings
import math
warnings.filterwarnings(action='ignore', category=UserWarning, module='gensim')
from gensim.models import Word2Vec
Max_length = 100 # maximum length of used peptides
... | 31.040214 | 241 | 0.501324 |
08e364b287cb5954101aa31b3cb5304b7c80b252 | 35 | py | Python | excel4lib/macro/analysis/__init__.py | aaaddress1/boobsnail | c0c2067d7271ca76ee721998d28e8c3c81a48397 | [
"MIT"
] | 169 | 2021-05-26T13:35:16.000Z | 2021-09-06T08:04:19.000Z | excel4lib/macro/analysis/__init__.py | H4xl0r/boobsnail | c0c2067d7271ca76ee721998d28e8c3c81a48397 | [
"MIT"
] | 2 | 2021-06-01T13:46:37.000Z | 2021-07-12T19:06:37.000Z | excel4lib/macro/analysis/__init__.py | H4xl0r/boobsnail | c0c2067d7271ca76ee721998d28e8c3c81a48397 | [
"MIT"
] | 29 | 2021-05-27T17:28:29.000Z | 2021-09-04T19:24:50.000Z | from .excel4_anti_analysis import * | 35 | 35 | 0.857143 |
08e511f1a5de576d29d0f24338c61be5e0fb82ee | 2,250 | py | Python | multiband_melgan/dataset.py | AppleHolic/multiband_melgan | e0864d0fc205c3bdf5e19c77753e105e29a2641b | [
"MIT"
] | 41 | 2020-06-24T08:07:23.000Z | 2022-01-24T16:39:54.000Z | multiband_melgan/dataset.py | AppleHolic/multiband_melgan | e0864d0fc205c3bdf5e19c77753e105e29a2641b | [
"MIT"
] | 2 | 2020-06-24T08:02:15.000Z | 2020-11-23T02:56:42.000Z | multiband_melgan/dataset.py | AppleHolic/multiband_melgan | e0864d0fc205c3bdf5e19c77753e105e29a2641b | [
"MIT"
] | 5 | 2020-07-03T04:00:50.000Z | 2020-11-04T03:24:48.000Z | import numpy as np
import librosa
import os
from pytorch_sound.data.meta.ljspeech import LJSpeechMeta
from torch.utils.data import Dataset, DataLoader
from typing import Tuple
| 34.090909 | 106 | 0.679111 |
08e85c7f00798390cfd21fa3cd1b2758063f698c | 3,830 | py | Python | yasmss/sparkmapper/sparkmapper.py | AshirwadPradhan/yasmss | 8b8b7108a3a437f0c757f19225a0c2082dbbd488 | [
"MIT"
] | null | null | null | yasmss/sparkmapper/sparkmapper.py | AshirwadPradhan/yasmss | 8b8b7108a3a437f0c757f19225a0c2082dbbd488 | [
"MIT"
] | 2 | 2019-09-22T03:27:20.000Z | 2019-09-22T13:56:35.000Z | yasmss/sparkmapper/sparkmapper.py | AshirwadPradhan/yasmss | 8b8b7108a3a437f0c757f19225a0c2082dbbd488 | [
"MIT"
] | 2 | 2019-09-15T13:10:41.000Z | 2019-10-29T11:20:10.000Z | """Get the parsed query from the driver and apply transformation and action based on the
query template
"""
import time
import pyspark.sql.functions as f
from pyspark.sql import SparkSession
from pyspark.sql.types import IntegerType, StringType, StructField, StructType
import yaml
from schema import schema
with ... | 33.304348 | 91 | 0.621671 |
08ee02203bdf0fc6105effa49f09100d9294242e | 8,412 | py | Python | main_gui.py | vedymin/All_IPG_Move | b8b079fd471709731a7550cec3a5add3db409b81 | [
"MIT"
] | null | null | null | main_gui.py | vedymin/All_IPG_Move | b8b079fd471709731a7550cec3a5add3db409b81 | [
"MIT"
] | null | null | null | main_gui.py | vedymin/All_IPG_Move | b8b079fd471709731a7550cec3a5add3db409b81 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'main_gui.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
| 54.980392 | 116 | 0.714812 |
08f00026b0a8d4a6cccad1a88563ce7a5b83f749 | 1,522 | py | Python | src/config.py | DQiaole/ZITS | 5f7a060167790789d5e29a3d14d3c2ef8a34e765 | [
"Apache-2.0"
] | 40 | 2022-03-02T06:12:43.000Z | 2022-03-30T02:17:02.000Z | src/config.py | DQiaole/ZITS | 5f7a060167790789d5e29a3d14d3c2ef8a34e765 | [
"Apache-2.0"
] | 6 | 2022-03-06T03:53:14.000Z | 2022-03-31T06:36:34.000Z | src/config.py | DQiaole/ZITS | 5f7a060167790789d5e29a3d14d3c2ef8a34e765 | [
"Apache-2.0"
] | 5 | 2022-03-04T06:39:44.000Z | 2022-03-28T04:58:32.000Z | import os
import yaml
DEFAULT_CONFIG = {
'SEED': 10, # random seed
'BATCH_SIZE': 8, # input batch size for training
'INPUT_SIZE': 256, # input image size for training 0 for original size
'MAX_ITERS': 1e6, # maximum number of iterations to... | 35.395349 | 107 | 0.557819 |
08f0432c93f8f390bd7d7a71479785cb462167ba | 8,786 | py | Python | examples/acados_python/test/generate_c_code.py | besticka/acados | 32767a19aed01a15b5e7b83ebc6ddbd669a47954 | [
"BSD-2-Clause"
] | null | null | null | examples/acados_python/test/generate_c_code.py | besticka/acados | 32767a19aed01a15b5e7b83ebc6ddbd669a47954 | [
"BSD-2-Clause"
] | null | null | null | examples/acados_python/test/generate_c_code.py | besticka/acados | 32767a19aed01a15b5e7b83ebc6ddbd669a47954 | [
"BSD-2-Clause"
] | null | null | null | #
# Copyright 2019 Gianluca Frison, Dimitris Kouzoupis, Robin Verschueren,
# Andrea Zanelli, Niels van Duijkeren, Jonathan Frey, Tommaso Sartor,
# Branimir Novoselnik, Rien Quirynen, Rezart Qelibari, Dang Doan,
# Jonas Koenemann, Yutao Chen, Tobias Schls, Jonas Schlagenhauf, Moritz Diehl
#
# This file is part of acados... | 31.604317 | 178 | 0.669019 |
08f05b58d9116c10d8df8fa1c928dc1cf428e826 | 2,820 | py | Python | collectors/cpustats.py | vijayanant/kunai | 0dfe169731eaceb1bba66e12715b3968d2a3de20 | [
"MIT"
] | 1 | 2020-04-12T21:05:46.000Z | 2020-04-12T21:05:46.000Z | collectors/cpustats.py | vijayanant/kunai | 0dfe169731eaceb1bba66e12715b3968d2a3de20 | [
"MIT"
] | null | null | null | collectors/cpustats.py | vijayanant/kunai | 0dfe169731eaceb1bba66e12715b3968d2a3de20 | [
"MIT"
] | null | null | null | import httplib # Used only for handling httplib.HTTPException (case #26701)
import os
import sys
import platform
import re
import urllib
import urllib2
import traceback
import time
from StringIO import StringIO
from multiprocessing import subprocess
from kunai.log import logger
from kunai.collector import Collector
| 32.790698 | 114 | 0.510638 |
08f3eae9e91dde600e2781b52aa83909fff87587 | 1,560 | py | Python | prob_h.py | ShinjiKatoA16/icpc2017ucsy | de1954620036e8025b7b4c1b469e6b8c57af212e | [
"MIT"
] | null | null | null | prob_h.py | ShinjiKatoA16/icpc2017ucsy | de1954620036e8025b7b4c1b469e6b8c57af212e | [
"MIT"
] | null | null | null | prob_h.py | ShinjiKatoA16/icpc2017ucsy | de1954620036e8025b7b4c1b469e6b8c57af212e | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
'''
2017 ICPC at UCSY
Problem-H: Sum Square
'''
import sys
def parse_tc(tc):
'''
Input: Test Case
Update:
Return: None
'''
x = list(map(int,tc.infile.readline().split()))
tc.dataset = x[0]
tc.max_num = x[1]
tc.base ... | 16.956522 | 69 | 0.501923 |
08f52305d640784da8d8fb26cf618726da107b3a | 2,357 | py | Python | spark_mapinput.py | pw2393/spark-bitcoin-parser | 320eb30ffcc462b0607655d2f4002a82590fd120 | [
"MIT"
] | 11 | 2017-09-29T05:37:57.000Z | 2022-02-04T06:34:17.000Z | spark_mapinput.py | pw2393/spark-bitcoin-parser | 320eb30ffcc462b0607655d2f4002a82590fd120 | [
"MIT"
] | 2 | 2018-07-03T12:19:50.000Z | 2019-10-19T21:24:53.000Z | spark_mapinput.py | pw2393/spark-bitcoin-parser | 320eb30ffcc462b0607655d2f4002a82590fd120 | [
"MIT"
] | 3 | 2019-11-09T13:01:07.000Z | 2021-12-03T04:20:29.000Z | """
Author: Peng Wu
License: MIT
"""
# Initialize Spark Context: local multi-threads
from pyspark import SparkConf, SparkContext
output_folder = './csv/'
# with open(output_folder+'viz_txedge.csv', 'w') as f:
# pass
# def formatted_print_2(keyValue):
# with open(output_folder+'viz_txedge.csv', ... | 28.39759 | 117 | 0.602036 |
08f5c575bcbcd0ee74f875b6fd32a403f396576c | 6,819 | py | Python | neuralpredictors/layers/readouts/factorized.py | kellirestivo/neuralpredictors | 57205a90d2e3daa5f8746c6ef6170be9e35cb5f5 | [
"MIT"
] | 9 | 2020-11-26T18:22:32.000Z | 2022-01-22T15:51:52.000Z | neuralpredictors/layers/readouts/factorized.py | kellirestivo/neuralpredictors | 57205a90d2e3daa5f8746c6ef6170be9e35cb5f5 | [
"MIT"
] | 60 | 2020-10-21T15:32:28.000Z | 2022-02-25T10:38:16.000Z | neuralpredictors/layers/readouts/factorized.py | mohammadbashiri/neuralpredictors | 8e60c9ce91f83e3dcaa1b3dbe4422e1509ccbd5f | [
"MIT"
] | 21 | 2020-10-21T09:29:17.000Z | 2022-02-07T10:04:46.000Z | import torch
from torch import nn as nn
import numpy as np
from .base import Readout
def initialize(self, mean_activity=None):
"""
Initializes the mean, and sigma of the Gaussian readout along with the features weights
"""
if mean_activity is None:
mean_activity = self... | 35.889474 | 120 | 0.60698 |
08f7015d2835dcc1e926fd4acbcfff51249816e9 | 1,186 | py | Python | app/main/views.py | josphat-otieno/news-app | e6ff307230bd2cab787489fca4850004cd9bdbd0 | [
"MIT"
] | null | null | null | app/main/views.py | josphat-otieno/news-app | e6ff307230bd2cab787489fca4850004cd9bdbd0 | [
"MIT"
] | null | null | null | app/main/views.py | josphat-otieno/news-app | e6ff307230bd2cab787489fca4850004cd9bdbd0 | [
"MIT"
] | 1 | 2022-02-28T22:33:33.000Z | 2022-02-28T22:33:33.000Z | from flask import render_template,request, redirect, url_for
from . import main
from ..requests import get_articles, get_news_sources,get_top_headlines, get_news_category | 34.882353 | 120 | 0.729342 |
08f715599ebdccb7db7f9153cc150737106850d8 | 6,904 | py | Python | fabric_cf/actor/core/util/resource_count.py | fabric-testbed/ActorBase | 3c7dd040ee79fef0759e66996c93eeec57c790b2 | [
"MIT"
] | null | null | null | fabric_cf/actor/core/util/resource_count.py | fabric-testbed/ActorBase | 3c7dd040ee79fef0759e66996c93eeec57c790b2 | [
"MIT"
] | 67 | 2020-12-21T15:39:49.000Z | 2022-02-27T17:55:00.000Z | fabric_cf/actor/core/util/resource_count.py | fabric-testbed/ControlFramework | 95ab745e32f15c993bc7a017aa97a5a0f67f210f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
#
# Copyright (c) 2020 FABRIC Testbed
#
# 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 ... | 33.033493 | 119 | 0.637167 |
08f958d96728940d01ac948489adc3f2710db6d4 | 114 | py | Python | unweaver/graphs/digraphgpkg/nodes/__init__.py | jsbeckwith/unweaver | a4ba9e4e288c75e93bf7f9d67bc11680f09c3da0 | [
"Apache-2.0"
] | 4 | 2019-04-24T16:38:57.000Z | 2021-12-28T20:38:08.000Z | unweaver/graphs/digraphgpkg/nodes/__init__.py | jsbeckwith/unweaver | a4ba9e4e288c75e93bf7f9d67bc11680f09c3da0 | [
"Apache-2.0"
] | 3 | 2021-06-02T04:06:33.000Z | 2021-11-02T01:47:20.000Z | unweaver/graphs/digraphgpkg/nodes/__init__.py | jsbeckwith/unweaver | a4ba9e4e288c75e93bf7f9d67bc11680f09c3da0 | [
"Apache-2.0"
] | 1 | 2020-08-13T04:42:05.000Z | 2020-08-13T04:42:05.000Z | from .node_view import NodeView
from .node import Node
from .nodes_view import NodesView
from .nodes import Nodes
| 22.8 | 33 | 0.824561 |
08f98d32f073c8a759a51d5a1b5fc9a27ec1c07c | 1,927 | py | Python | python/http_request.py | MrVallentin/http_request | b21cb23ead1e3bc7176f09804f9cc9287b9f0168 | [
"MIT"
] | null | null | null | python/http_request.py | MrVallentin/http_request | b21cb23ead1e3bc7176f09804f9cc9287b9f0168 | [
"MIT"
] | null | null | null | python/http_request.py | MrVallentin/http_request | b21cb23ead1e3bc7176f09804f9cc9287b9f0168 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Author: Christian Vallentin <mail@vallentinsource.com>
# Website: http://vallentinsource.com
# Repository: https://github.com/MrVallentin/http_request
#
# Date Created: February 28, 2016
# Last Modified: February 29, 2016
#
# Developed and tested using Python 3.5.1
import http.client, urllib.... | 23.790123 | 65 | 0.694862 |
3e92c270410556137345bdc66663f957e85d9d78 | 937 | py | Python | notebook/pypdf2_merge_page.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 174 | 2018-05-30T21:14:50.000Z | 2022-03-25T07:59:37.000Z | notebook/pypdf2_merge_page.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 5 | 2019-08-10T03:22:02.000Z | 2021-07-12T20:31:17.000Z | notebook/pypdf2_merge_page.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 53 | 2018-04-27T05:26:35.000Z | 2022-03-25T07:59:37.000Z | import PyPDF2
merger = PyPDF2.PdfFileMerger()
merger.append('data/src/pdf/sample1.pdf', pages=(0, 1))
merger.append('data/src/pdf/sample2.pdf', pages=(2, 4))
merger.merge(2, 'data/src/pdf/sample3.pdf', pages=(0, 3, 2))
merger.write('data/temp/sample_merge_page.pdf')
merger.close()
merger = PyPDF2.PdfFileMerger()
m... | 30.225806 | 85 | 0.741729 |
3e93e3456bdf96692c3deeb42d3cc140eb248959 | 1,983 | py | Python | examples/nlp/bert_squad_pytorch/data.py | gh-determined-ai/determined | 9a1ab33a3a356b69681b3351629fef4ab98ddb56 | [
"Apache-2.0"
] | 1,729 | 2020-04-27T17:36:40.000Z | 2022-03-31T05:48:39.000Z | examples/nlp/bert_squad_pytorch/data.py | ChrisW09/determined | 5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0 | [
"Apache-2.0"
] | 1,940 | 2020-04-27T17:34:14.000Z | 2022-03-31T23:02:28.000Z | examples/nlp/bert_squad_pytorch/data.py | ChrisW09/determined | 5c37bfe9cfcc69174ba29a3f1a115c3e9e3632e0 | [
"Apache-2.0"
] | 214 | 2020-04-27T19:57:28.000Z | 2022-03-29T08:17:16.000Z | from transformers.data.processors.squad import SquadV1Processor, SquadV2Processor
from transformers import squad_convert_examples_to_features
import urllib.request
import os
| 44.066667 | 122 | 0.670701 |
3e946fdc0458e3cc6d05239b37f7f11a04a0d076 | 898 | py | Python | test_simplebuy.py | caoxuwen/bitgym | 0a6796a039290122430ebc13c8d7ad9ff741921a | [
"MIT"
] | 1 | 2018-09-07T10:10:29.000Z | 2018-09-07T10:10:29.000Z | test_simplebuy.py | caoxuwen/bitgym | 0a6796a039290122430ebc13c8d7ad9ff741921a | [
"MIT"
] | null | null | null | test_simplebuy.py | caoxuwen/bitgym | 0a6796a039290122430ebc13c8d7ad9ff741921a | [
"MIT"
] | null | null | null | import random
import numpy as np
import pandas as pd
import trading_env
# np.set_printoptions(threshold=np.nan)
#df = pd.read_hdf('dataset/SGXTW.h5', 'STW')
#df = pd.read_hdf('dataset/SGXTWsample.h5', 'STW')
df = pd.read_csv('dataset/btc_indexed2.csv')
print(df.describe())
env = trading_env.make(env_id='training_v1'... | 27.212121 | 77 | 0.587973 |