hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
086cc04c9a62e2ff1bedaaac23c04ca27ca1b7b4 | 2,264 | py | Python | schedule/tests/scheduler_latest_test.py | conzty01/RA_Scheduler | 6bf4931871aef4058d93917e62ceb31766e06b3a | [
"MIT"
] | 1 | 2021-03-31T05:26:17.000Z | 2021-03-31T05:26:17.000Z | schedule/tests/scheduler_latest_test.py | conzty01/RA_Scheduler | 6bf4931871aef4058d93917e62ceb31766e06b3a | [
"MIT"
] | 83 | 2018-03-19T18:32:34.000Z | 2022-02-01T02:15:01.000Z | schedule/tests/scheduler_latest_test.py | conzty01/RA_Scheduler | 6bf4931871aef4058d93917e62ceb31766e06b3a | [
"MIT"
] | 2 | 2021-01-15T22:16:00.000Z | 2021-02-10T01:03:32.000Z | from schedule.scheduler4_0 import schedule
from schedule.ra_sched import Schedule, RA
from unittest.mock import MagicMock, patch
from datetime import date
import unittest
import random
class TestScheduler(unittest.TestCase):
def setUp(self):
# -- Create a patchers for the logging --
self.patcher_... | 31.444444 | 79 | 0.651502 | 2,027 | 0.895318 | 0 | 0 | 0 | 0 | 0 | 0 | 405 | 0.178887 |
086ccdd01316fbb3c32c9928ed64ba2001cd4f5d | 2,583 | py | Python | main.py | brpaz/ulauncher-dockerhub | 22e646bda40328373a4d90fa0aece2cac0187a42 | [
"MIT"
] | 3 | 2020-09-04T07:56:47.000Z | 2022-01-05T13:19:25.000Z | main.py | brpaz/ulauncher-dockerhub | 22e646bda40328373a4d90fa0aece2cac0187a42 | [
"MIT"
] | null | null | null | main.py | brpaz/ulauncher-dockerhub | 22e646bda40328373a4d90fa0aece2cac0187a42 | [
"MIT"
] | null | null | null | """ Main Module """
import logging
from ulauncher.api.client.Extension import Extension
from ulauncher.api.client.EventListener import EventListener
from ulauncher.api.shared.event import KeywordQueryEvent
from ulauncher.api.shared.item.ExtensionResultItem import ExtensionResultItem
from ulauncher.api.shared.action.R... | 34.905405 | 85 | 0.622145 | 1,859 | 0.718871 | 0 | 0 | 0 | 0 | 0 | 0 | 433 | 0.16744 |
086fc0967062337eeb0ecb19108dc1ab0e1d65e3 | 957 | py | Python | geeklist_examples.py | juliengrenier/python-geeklist | 52528b099e94e539c3451bfd2e741e563f0924e9 | [
"MIT"
] | 1 | 2015-02-28T10:22:02.000Z | 2015-02-28T10:22:02.000Z | geeklist_examples.py | juliengrenier/python-geeklist | 52528b099e94e539c3451bfd2e741e563f0924e9 | [
"MIT"
] | null | null | null | geeklist_examples.py | juliengrenier/python-geeklist | 52528b099e94e539c3451bfd2e741e563f0924e9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from geeklist.api import BaseGeeklistApi, GeekListOauthApi, GeekListUserApi
from access import consumer_info #please access.py which contains consumer_info = { 'key': YOUR_KEY, 'secret': secret}
BaseGeeklistApi.BASE_URL ='http://sandbox-api.geekli.st/v1'
oauth_api = GeekListOauthApi(consumer_i... | 41.608696 | 118 | 0.797283 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 353 | 0.368861 |
0871266d4d435da659b3d90a1e0729b53c28c39c | 2,448 | py | Python | game/gamesrc/objects/character.py | ranka47/battle-of-hogwarts | e7b2265ebe5661249dd28e472c49b74c1bbcdf23 | [
"BSD-3-Clause"
] | 2 | 2019-02-24T00:20:47.000Z | 2020-04-24T15:50:31.000Z | game/gamesrc/objects/character.py | ranka47/battle-of-hogwarts | e7b2265ebe5661249dd28e472c49b74c1bbcdf23 | [
"BSD-3-Clause"
] | null | null | null | game/gamesrc/objects/character.py | ranka47/battle-of-hogwarts | e7b2265ebe5661249dd28e472c49b74c1bbcdf23 | [
"BSD-3-Clause"
] | 1 | 2019-01-05T15:51:37.000Z | 2019-01-05T15:51:37.000Z | """
Template for Characters
Copy this module up one level and name it as you like, then
use it as a template to create your own Character class.
To make new logins default to creating characters
of your new type, change settings.BASE_CHARACTER_TYPECLASS to point to
your new class, e.g.
settings.BASE_CHARACTER_TYPEC... | 38.25 | 79 | 0.663807 | 1,849 | 0.75531 | 0 | 0 | 0 | 0 | 0 | 0 | 1,674 | 0.683824 |
0873053669c5a9be614101baec79eda2eb276cb9 | 3,170 | py | Python | lesson5/lesson5_task4.py | nekdfl/GB-python-developer | ca3f34bac2a92a930779f89357941bfa9634b3d4 | [
"MIT"
] | null | null | null | lesson5/lesson5_task4.py | nekdfl/GB-python-developer | ca3f34bac2a92a930779f89357941bfa9634b3d4 | [
"MIT"
] | null | null | null | lesson5/lesson5_task4.py | nekdfl/GB-python-developer | ca3f34bac2a92a930779f89357941bfa9634b3d4 | [
"MIT"
] | null | null | null | """
Создать (не программно) текстовый файл со следующим содержимым:
One — 1
Two — 2
Three — 3
Four — 4
Необходимо написать программу, открывающую файл на чтение и считывающую построчно данные.
При этом английские числительные должны заменяться на русские.
Новый блок строк должен записываться в новый текстовый файл.
""... | 26.864407 | 111 | 0.582334 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,528 | 0.414767 |
087388739eebaad50c966ec02ed0312b37726c72 | 1,203 | py | Python | w_cutscenes_test.py | wholetonegames/panda3d-ness-rpg | 8d81e8418c1bc20706b5b3f4c0631fe9bd76a65e | [
"MIT"
] | 1 | 2021-02-01T03:09:28.000Z | 2021-02-01T03:09:28.000Z | w_cutscenes_test.py | wholetonegames/panda3d-ness-rpg | 8d81e8418c1bc20706b5b3f4c0631fe9bd76a65e | [
"MIT"
] | null | null | null | w_cutscenes_test.py | wholetonegames/panda3d-ness-rpg | 8d81e8418c1bc20706b5b3f4c0631fe9bd76a65e | [
"MIT"
] | null | null | null | from w_i_stage import IStage
from direct.interval.IntervalGlobal import Sequence, Func, Wait
class CutsceneTest(IStage):
def __init__(self):
IStage.__init__(self)
def setup(self):
self.previousMap = base.gameData.currentMap
base.gameData.currentMap = 'city'
self.previousPos = ... | 25.0625 | 63 | 0.596841 | 1,107 | 0.9202 | 0 | 0 | 0 | 0 | 0 | 0 | 54 | 0.044888 |
0874abf4b1ea7884b6edfbac6a754d49e5cc5678 | 154 | py | Python | lichee/utils/__init__.py | Tencent/Lichee | 7653becd6fbf8b0715f788af3c0507c012be08b4 | [
"Apache-2.0"
] | 91 | 2021-10-30T02:25:05.000Z | 2022-03-28T06:51:52.000Z | lichee/utils/__init__.py | zhaijunyu/Lichee | 7653becd6fbf8b0715f788af3c0507c012be08b4 | [
"Apache-2.0"
] | 1 | 2021-12-17T09:30:25.000Z | 2022-03-05T12:30:13.000Z | lichee/utils/__init__.py | zhaijunyu/Lichee | 7653becd6fbf8b0715f788af3c0507c012be08b4 | [
"Apache-2.0"
] | 17 | 2021-11-04T07:50:23.000Z | 2022-03-24T14:24:11.000Z | # -*- coding: utf-8 -*-
"""
工具包
"""
from . import convertor
from . import model_loader
from . import storage
from . import parallel
from . import logging
| 15.4 | 26 | 0.688312 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.25 |
08757365d19fb16259355c3f4a0bc7a45ccc8fde | 1,808 | py | Python | networkunit/models/backends/network_model.py | russelljjarvis/NetworkUnit | 32179371d3a0ba354e6637cf4f97ba70522d4054 | [
"BSD-3-Clause"
] | null | null | null | networkunit/models/backends/network_model.py | russelljjarvis/NetworkUnit | 32179371d3a0ba354e6637cf4f97ba70522d4054 | [
"BSD-3-Clause"
] | 1 | 2019-11-15T22:56:20.000Z | 2019-11-15T22:56:20.000Z | networkunit/models/backends/network_model.py | russelljjarvis/NetworkUnit | 32179371d3a0ba354e6637cf4f97ba70522d4054 | [
"BSD-3-Clause"
] | null | null | null | """NeuronUnit model class for reduced neuron models"""
import numpy as np
from neo.core import AnalogSignal
import quantities as pq
import neuronunit.capabilities as cap
import neuronunit.models as mod
import neuronunit.capabilities.spike_functions as sf
from neuronunit.models import backends
from generic_network imp... | 35.45098 | 131 | 0.68031 | 1,446 | 0.799779 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.128319 |
0876136eb46ef1d30f09dbd0eff572dd1e4a0144 | 28,812 | py | Python | generator.py | jimstorch/DGGen | cdecbc4bfa491a634aac370de05b21bb6f6cf8e1 | [
"Apache-2.0"
] | 19 | 2016-12-04T12:43:43.000Z | 2022-01-25T01:00:24.000Z | generator.py | jimstorch/DGGen | cdecbc4bfa491a634aac370de05b21bb6f6cf8e1 | [
"Apache-2.0"
] | 9 | 2017-01-04T16:33:00.000Z | 2021-11-16T06:02:16.000Z | generator.py | jimstorch/DGGen | cdecbc4bfa491a634aac370de05b21bb6f6cf8e1 | [
"Apache-2.0"
] | 7 | 2016-12-04T12:43:47.000Z | 2022-02-04T13:10:58.000Z | #!/usr/bin/env python3
import argparse
import csv
import datetime
import json
import logging
import os
import sys
import warnings
from collections import defaultdict
from copy import copy
from dataclasses import dataclass
from itertools import islice, cycle, chain
from random import randint, shuffle, choice, sample
fro... | 34.797101 | 103 | 0.530508 | 22,858 | 0.792387 | 0 | 0 | 386 | 0.013381 | 0 | 0 | 7,603 | 0.263563 |
087670710e46b9499b04f22d8a01fa0767bf4b47 | 9,093 | py | Python | tests/test_remote.py | bcyran/philipstv | 6037724d5fab0b72265c2de2c0441a64f6e00c00 | [
"MIT"
] | null | null | null | tests/test_remote.py | bcyran/philipstv | 6037724d5fab0b72265c2de2c0441a64f6e00c00 | [
"MIT"
] | null | null | null | tests/test_remote.py | bcyran/philipstv | 6037724d5fab0b72265c2de2c0441a64f6e00c00 | [
"MIT"
] | null | null | null | from typing import Union
from unittest.mock import Mock, create_autospec
import pytest
from pytest import MonkeyPatch
from philipstv import PhilipsTVAPI, PhilipsTVPairer, PhilipsTVRemote, PhilipsTVRemoteError
from philipstv.model import (
AllChannels,
AmbilightColor,
AmbilightColors,
AmbilightLayer,
... | 29.144231 | 94 | 0.698119 | 0 | 0 | 0 | 0 | 1,298 | 0.142747 | 0 | 0 | 721 | 0.079292 |
0879ba08e89fa5f242f50ddb01acf847e7896d29 | 9,612 | py | Python | a2t/src/test_runner.py | syeda-khurrath/fabric8-analytics-common | 421f7e27869c5695ed73b51e6422e097aba00108 | [
"Apache-2.0"
] | null | null | null | a2t/src/test_runner.py | syeda-khurrath/fabric8-analytics-common | 421f7e27869c5695ed73b51e6422e097aba00108 | [
"Apache-2.0"
] | 4 | 2019-05-20T08:27:47.000Z | 2019-05-20T08:29:57.000Z | a2t/src/test_runner.py | codeready-analytics/fabric8-analytics-common | a763c5534d601f2f40a0f02c02914c49ea23669d | [
"Apache-2.0"
] | 1 | 2020-10-05T21:12:44.000Z | 2020-10-05T21:12:44.000Z | """Implementation of benchmarks.
Copyright (c) 2019 Red Hat Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program... | 37.546875 | 99 | 0.634415 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,660 | 0.380774 |
087dd6bb53dc8a5a49168182e90d10a64dea2f64 | 159 | py | Python | bus_system/apps/bus/admin.py | pygabo/bus_system | ffb76d3414e058286799f3df1cb551b26286e7c3 | [
"MIT"
] | null | null | null | bus_system/apps/bus/admin.py | pygabo/bus_system | ffb76d3414e058286799f3df1cb551b26286e7c3 | [
"MIT"
] | null | null | null | bus_system/apps/bus/admin.py | pygabo/bus_system | ffb76d3414e058286799f3df1cb551b26286e7c3 | [
"MIT"
] | null | null | null | # Core Django imports
from django.contrib import admin
# Imports from my apps
from bus_system.apps.bus.models import BusModel
admin.site.register(BusModel)
| 19.875 | 47 | 0.805031 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.27673 |
087e3e81767ebb79be98cf41ccb71262d3691e12 | 2,454 | py | Python | jocular/calcs.py | MartinCooke/jocular | 635816d4ef6aa6ea75187137e25386dad2d551e9 | [
"MIT"
] | 6 | 2021-03-21T16:46:44.000Z | 2021-11-27T14:07:06.000Z | jocular/calcs.py | MartinCooke/jocular | 635816d4ef6aa6ea75187137e25386dad2d551e9 | [
"MIT"
] | null | null | null | jocular/calcs.py | MartinCooke/jocular | 635816d4ef6aa6ea75187137e25386dad2d551e9 | [
"MIT"
] | null | null | null | ''' Various astro calcs mainly based on Meuss.
'''
import numpy as np
import math
import time
from datetime import datetime
def julian_date(when):
# from Meuss p 61; 'when' is a datetime object
y = when.year
m = when.month
d = when.day + when.hour/24 + when.minute/(24*60) + when.second/(24*3600)
if m < 3:
y... | 26.106383 | 104 | 0.600652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 447 | 0.181855 |
087e86827c6cc73f03d6554fcf8f36b2777a11b4 | 1,221 | py | Python | win/python/CAO/calcClient.py | kioto/ORiN2Sample | a7a9007b696fdd3ab29f1ec5cededc59b232fae2 | [
"MIT"
] | null | null | null | win/python/CAO/calcClient.py | kioto/ORiN2Sample | a7a9007b696fdd3ab29f1ec5cededc59b232fae2 | [
"MIT"
] | null | null | null | win/python/CAO/calcClient.py | kioto/ORiN2Sample | a7a9007b696fdd3ab29f1ec5cededc59b232fae2 | [
"MIT"
] | null | null | null | import win32com.client
import time
class CalcClient(object):
def __init__(self):
# CAOエンジンの作成
self._eng = win32com.client.Dispatch('CAO.CaoEngine')
self._ws = self._eng.Workspaces(0)
self._ctrl = self._ws.AddController('bb1', 'CaoProv.Blackboard')
# 変数の追加
... | 29.780488 | 73 | 0.564292 | 1,061 | 0.832157 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.181961 |
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 | '''
Faça um programa que leia um número 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 número {} é {} e seu sucessor é {}'.format(n, antecessor, sucessor)
print(msg) | 23.5 | 93 | 0.673759 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 181 | 0.630662 |
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
def test_simple_insert_is_parsed():
raw_sql = '''
INSERT DELAYED INTO table (col1, col2, col3) VALUES (100, 200, 300)
'''
ast = parse(raw_sql)
assert len(ast) > 0
ast = ast[0]
assert ast.type == 'i... | 26.353383 | 77 | 0.650499 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 522 | 0.14893 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.47619 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 352 | 0.454194 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 839 | 0.710415 |
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-lib计算MACD
'''
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("60060... | 24.666667 | 107 | 0.722008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 150 | 0.287356 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.047619 |
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
def get_info(name, age, height, weight):
year_birth = year_current_date - age
imc = round(weight / (height ** 2), 2)
print(f"{name} tem {age} anos, {height} de altura e pesa {weight} KG.")
print(f"O IMC do {name} é: {imc}")
print(f"{... | 28.222222 | 83 | 0.687008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 254 | 0.496094 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 0.34375 |
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
async def test_setup_with_config(opp):... | 28.825 | 82 | 0.717259 | 0 | 0 | 0 | 0 | 0 | 0 | 2,014 | 0.873374 | 421 | 0.182567 |
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 syötteen lukeminen käyttäjältä
nimi = input("Anna nimesi: ")
kengännumero = input("Mikä on kengännumerosi: ")
print("Moi vaan, " + nimi + "! Kengännumerosi on " + kengännumero + ".")
# F-merkkijono
print(f"Moi vaan, {nimi}! Kengännumerosi on {kengännumero}.")
# Numerot
# Ikälaskuri... | 21.689655 | 99 | 0.683625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 699 | 0.544817 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 234 | 0.37987 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
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
def test_eq(jelm_pair_case: NetwokCaseTemplate):
jelm_pair_case.evaluate_fun(non_altering_function=lambda x: x)
assert not (10 == Jelm())
assert not ("fing" == Jelm())
def test_jelm_repr(... | 25.034146 | 77 | 0.639517 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 447 | 0.087101 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,524 | 0.231541 |
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 | 1,924 | 0.751269 | 0 | 0 | 0 | 0 | 0 | 0 | 488 | 0.190551 |
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 | 8,345 | 0.920675 | 0 | 0 | 0 | 0 | 0 | 0 | 2,039 | 0.224956 |
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
class RoleProxy(Proxy):
NAME = 'RoleProxy'
def __init__(self, proxyName=None, data=[]):
super(RoleProxy, self).__init__(proxyName, data)
self.data = data
def addItem(self, role):
... | 27.808511 | 72 | 0.61974 | 1,204 | 0.921194 | 0 | 0 | 0 | 0 | 0 | 0 | 34 | 0.026014 |
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
class Radio:
def __init__(self, settings):
"""
Method that initiates the object Radio for game sounds
Input = (Dict)
"""
pygame.mixer.init()
self.file_die_sound = pygame.mixer.Sound('Assets/Sounds/die.mp3')
self.file_hit_sound = ... | 25.148148 | 77 | 0.611193 | 1,331 | 0.980118 | 0 | 0 | 0 | 0 | 0 | 0 | 443 | 0.326215 |
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 | 2,447 | 0.555505 | 0 | 0 | 557 | 0.126447 | 0 | 0 | 758 | 0.172077 |
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 | 195 | 0.35009 | 0 | 0 | 0 | 0 | 0 | 0 | 99 | 0.177738 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 632 | 0.417713 |
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__)
def handle_dispatcher(dispatcher):
dispatcher.add_handler(ping())
dispatcher.add_error_handler(error)
def error(a, b, c):
logger.error('Error %s %s "%s"' % a, b, c)
def ping():
def handle(bot, update):
... | 18.041667 | 69 | 0.699769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.069284 |
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 données.
"""
import os
def get_data_folder():
"""
Retourne le répertoire de données 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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.535484 |
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
class Coupon(models.Model):
coupon = models.CharField(max_length=20)
discount = models.IntegerField()
valid_from = models.DateTimeField()
valid_to = models.DateTimeField()
active = models.BooleanField(default=True)
def __str__(self):
return self.coupon
... | 24.421053 | 46 | 0.661638 | 432 | 0.931034 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.071121 |
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
class AdvancedLogging(Plugin):
name = "advanced-logging"
enabled = False
capture_screen = True
score = 1
_log_path = join(os.getcwd(), 'test_output')
_script_path = None
def... | 30.956938 | 75 | 0.52813 | 6,352 | 0.981762 | 0 | 0 | 0 | 0 | 0 | 0 | 1,452 | 0.22442 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 613 | 0.613614 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
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 | 12,144 | 0.959848 | 0 | 0 | 1,302 | 0.102909 | 0 | 0 | 5,613 | 0.443645 |
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
def get_readme():
with open('README.md') as f:
return f.read()
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 = 'Facilitate... | 33.108108 | 96 | 0.625306 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 699 | 0.570612 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 220 | 0.474138 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,518 | 0.092782 |
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
class TensorflowPredictor(CategoryPredictor):
def __init__(self):
... | 39.173913 | 116 | 0.751387 | 659 | 0.73141 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.032186 |
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
class Migration(migrations.Migration):
dependencies = [
('eo_sensors', '0004_coveragemask'),
]
operations = [
migrations.AlterUniqueTogether(
name='raster',
unique_together={('date',... | 19.888889 | 57 | 0.592179 | 273 | 0.76257 | 0 | 0 | 0 | 0 | 0 | 0 | 106 | 0.296089 |
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()))
def custcmp(x, y):
_x = x[0]/x[1]
_y = y[0]/y[1]
if _x < _y:
return 1
if _x == _y:
return 0
if _x > _y:
return -1
items = sorted(items, cm... | 14.371429 | 46 | 0.600398 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
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 número entre 0 e 10, quer tentar adivinhar?')
print('-=-' * 20)
print('\n[ 1 ] Sim [ 0 ] Não')
opcao = int(input('Escolha uma das opções acima\n>'))
if opcao == 1:... | 35.34375 | 78 | 0.535809 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 454 | 0.3972 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,071 | 0.564873 |
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
def pparse_command_line (parent_parser):
parser = argparse.ArgumentParser (
parents=[... | 37.514124 | 181 | 0.613253 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,526 | 0.380422 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 668 | 0.849873 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,996 | 0.520605 |
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
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Country'
db.create_table('django_geoip_country', (
('code', self.gf('django.db... | 53.420561 | 147 | 0.601645 | 5,590 | 0.977957 | 0 | 0 | 0 | 0 | 0 | 0 | 3,301 | 0.577502 |
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 | 488 | 0.555809 | 0 | 0 | 466 | 0.530752 | 0 | 0 | 155 | 0.176538 |
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
class Migration(migrations.Migration):
dependencies = [
('envdaq', '0005_controller_alias_name'),
]
operations = [
migrations.AddField(
model_name='controllerdef',
name='comp... | 22.578947 | 79 | 0.615385 | 336 | 0.783217 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.307692 |
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 | 1,809 | 0.704165 | 0 | 0 | 0 | 0 | 0 | 0 | 961 | 0.374076 |
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
def buildPat(row,key):
if key == "extension.valueAddress.city":
return row.A01_DESC_LUOGO_NASCITA
elif key == "identifier.value":
return row.A01_ID_PERSONA
elif key == "name.family":
return row.A01_COGNOME
elif key == "name.given... | 34.893617 | 78 | 0.576524 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 797 | 0.242988 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.220779 |
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
def main(argv):
dump_only = False
if len(argv) > 1:
if argv.pop() == '--dump':
dump_only = True
else:
print('Error: Unrecognized option.', file=sys.stderr)
... | 31.477612 | 98 | 0.543385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 533 | 0.244608 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 609 | 0.407631 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 433 | 0.164451 |
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
class GoldenMasterTest(unittest.TestCase):
def test_golden_master(self):
output_file = None
try:
output_file = open("output.txt", 'r')
golden_master_lines = [output_file.readlines()]
finally:
outp... | 31.355932 | 87 | 0.617838 | 437 | 0.236216 | 0 | 0 | 0 | 0 | 0 | 0 | 372 | 0.201081 |
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
class RandomData:
def __init__(self):
pass
@staticmethod
def get_random_bool():
i = random.randrange(2)
if i == 0:
return True
else:
return False
@staticmethod
def get_random_list_value(list):
i = rando... | 22.948718 | 107 | 0.61676 | 864 | 0.965363 | 0 | 0 | 745 | 0.832402 | 0 | 0 | 45 | 0.050279 |
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 | 0 | 0 | 803 | 0.706866 | 0 | 0 | 0 | 0 | 236 | 0.207746 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.503472 |
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
class Bookmark(models.Model):
title = models.CharField(max_length=200, blank=T... | 28.897959 | 74 | 0.631356 | 510 | 0.360169 | 0 | 0 | 664 | 0.468927 | 0 | 0 | 173 | 0.122175 |
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
"""
def vernam(key,message):
message = str(message)
m = message.upper().replace(" ","") # Convert to upper case, remove whitespace
encrypt = ""
try:
key = int(key) # if the key... | 27.482759 | 91 | 0.567127 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 359 | 0.450439 |
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
def stringify_date(date):
try:
return '{0}-{1}-{2}-{3}-{4}'.format(date.year, date.month, date.day, date.hour, date.minute)
except ValueError:
raise ValueError('Invalid date format', date)
def parse_date(date):
try:
return d.strptime(date, '%Y-%m-... | 30.071429 | 100 | 0.64133 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 92 | 0.218527 |
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
class Office(FineractObject):
"""
This class represent an Office
"""
def _init_attrib... | 36.574257 | 117 | 0.647266 | 3,466 | 0.938278 | 0 | 0 | 0 | 0 | 0 | 0 | 472 | 0.127775 |
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
class Solution:
def minimumEffortPath(self, heights):
# get the max rows and cols
m, n = len(heights), len(heights[0])
# make a heap to store the current min cost, x, and y
heap = [(0, 0, 0)]
# keep track of current cost
cu... | 36.166667 | 123 | 0.506336 | 1,452 | 0.836406 | 0 | 0 | 0 | 0 | 0 | 0 | 600 | 0.345622 |
08c9794f0bd47ea3dffb38ca1c36f7471259ea64 | 62 | py | Python | car_acc_graphs.py | EricMbuthia/car_acc | 11c1d32400279f462861793ad393f00861445b64 | [
"MIT"
] | null | null | null | car_acc_graphs.py | EricMbuthia/car_acc | 11c1d32400279f462861793ad393f00861445b64 | [
"MIT"
] | null | null | null | car_acc_graphs.py | EricMbuthia/car_acc | 11c1d32400279f462861793ad393f00861445b64 | [
"MIT"
] | null | null | null | def example_plotting_functions():
#Sort then plot
pass | 20.666667 | 33 | 0.725806 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.241935 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 603 | 0.422565 |
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
class HorizontalTests(unittest.TestCase):
@parameterized.expand([
(None, {'... | 34.395833 | 125 | 0.472 | 17,928 | 0.98717 | 0 | 0 | 15,810 | 0.870547 | 0 | 0 | 5,312 | 0.292495 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.518519 |
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
@app.route('/')
def index():
return redirect(url_for('submit'))
def allowed_file(filename):
... | 30.859649 | 106 | 0.704377 | 0 | 0 | 0 | 0 | 931 | 0.529278 | 0 | 0 | 210 | 0.119386 |
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 | 3,532 | 0.862515 | 0 | 0 | 2,573 | 0.628327 | 0 | 0 | 710 | 0.173382 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,211 | 0.294016 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 373 | 0.372255 |
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
def test_find_git_directories(repo: Repo):
generator = find_git_directories(search_paths=[repo.working_dir])
assert next(generator) == repo.working_dir
| 19.5 | 69 | 0.794872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
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
def div_by_zero(exp, inputs, assigns, consts):
qu... | 23.355705 | 67 | 0.611207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 396 | 0.113793 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,292 | 0.60093 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,091 | 0.411201 |
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
... | 14.628571 | 43 | 0.59375 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 497 | 0.750755 |
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
class GenerateArgsABC(GenerateABC, ABC):
"""Generate docstring for Model."""
def __init__(self, typ... | 33.264151 | 89 | 0.574022 | 3,313 | 0.939592 | 0 | 0 | 444 | 0.125922 | 0 | 0 | 838 | 0.237663 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.311518 |
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("복수 선택 시 --> 예) 사이다,우유 ")
def pItems(*args1,**args2) :
price = 0
for i in args1:
price = price + args2[i.strip()]
return price
# 선택목록 item, 가격 pr... | 22.4 | 58 | 0.564732 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 279 | 0.486063 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,472 | 0.562047 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 874 | 0.282939 |
08da7e9d21e70b892d492b272992e48bff8c4a03 | 162 | py | Python | November/Poor Pigs.py | parikshitgupta1/leetcode | eba6c11740dc7597204af127c0f4c2163376294f | [
"MIT"
] | null | null | null | November/Poor Pigs.py | parikshitgupta1/leetcode | eba6c11740dc7597204af127c0f4c2163376294f | [
"MIT"
] | null | null | null | November/Poor Pigs.py | parikshitgupta1/leetcode | eba6c11740dc7597204af127c0f4c2163376294f | [
"MIT"
] | null | null | null | class Solution:
def poorPigs(self, buckets: int, minutesToDie: int, minutesToTest: int) -> int:
return ceil(log(buckets)/log(minutesToTest//minutesToDie + 1))
| 40.5 | 80 | 0.746914 | 161 | 0.993827 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.083975 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 0.342874 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.277372 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,020 | 0.89317 |
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
class Migration(migrations.Migration):
dependencies = [
('micro_admin', '0009_page'),
]
operations = [
migrations.AlterModelOptions(
... | 25.8 | 162 | 0.629845 | 367 | 0.71124 | 0 | 0 | 0 | 0 | 0 | 0 | 225 | 0.436047 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,888 | 0.493853 |
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 | 0 | 0 | 570 | 0.069284 | 0 | 0 | 0 | 0 | 3,275 | 0.398079 |
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
def check_length(file):
len... | 31.040214 | 241 | 0.501324 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,538 | 0.188187 |
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 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |