hexsha stringlengths 40 40 | size int64 6 782k | ext stringclasses 7
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 237 | max_stars_repo_name stringlengths 6 72 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses list | max_stars_count int64 1 53k ⌀ | 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 4 184 | max_issues_repo_name stringlengths 6 72 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses list | max_issues_count int64 1 27.1k ⌀ | 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 4 184 | max_forks_repo_name stringlengths 6 72 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses list | max_forks_count int64 1 12.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 6 782k | avg_line_length float64 2.75 664k | max_line_length int64 5 782k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
462db8b7ec6713e21e218e6872f14108b226ac8f | 20,825 | py | Python | Packs/DigitalGuardian/Integrations/DigitalGuardian/DigitalGuardian.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DigitalGuardian/Integrations/DigitalGuardian/DigitalGuardian.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DigitalGuardian/Integrations/DigitalGuardian/DigitalGuardian.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
import json
import requests
from typing import List, Dict, Any, Union
# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
'''Constants'''
CATEGORY = 'alarm' # only focus on alarms
AUTH_SERVER = demisto.getParam('auth_url')
AUTH_URL = AUTH_SERVER + '/as/token.oau... | 38.49353 | 120 | 0.61623 |
318b3b98fe2e9462c4531473777215fe578e8189 | 13,284 | py | Python | YY.py | gamegrd/YY | 39fca68d11956508fdbc094c9c319b7a7082722f | [
"Apache-2.0"
] | 9 | 2016-10-17T04:57:47.000Z | 2021-03-08T15:50:03.000Z | YY.py | SkyblueMr/YY | 39fca68d11956508fdbc094c9c319b7a7082722f | [
"Apache-2.0"
] | 1 | 2017-10-13T09:27:34.000Z | 2017-10-13T09:27:34.000Z | YY.py | SkyblueMr/YY | 39fca68d11956508fdbc094c9c319b7a7082722f | [
"Apache-2.0"
] | 6 | 2017-06-07T01:27:42.000Z | 2020-02-10T04:08:51.000Z | #!/usr/bin/env python
import tornado.ioloop
import tornado.iostream
import tornado.netutil
import tornado.web
import hexdump
import time
from hashlib import md5
import socket
import rsa
import YYProto_pb2
import struct
import hashlib
from rc4 import *
from urlparse import urlparse
from ctypes import *
import os
import... | 30.821346 | 128 | 0.571364 |
81ed2ee94e57c0c1efea89244fb26e9b75152758 | 2,487 | py | Python | src/nfz_module/examples/read_gps_example_1.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/examples/read_gps_example_1.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/examples/read_gps_example_1.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os
import sys
# import pygame, sys
# from pygame.locals import *
import serial
#initialise serial port on /ttyUSB0
ser = serial.Serial('/dev/ttyUSB0',4800,timeout = None)
# set font size MAX 100
# fontsize = 50
# calculate window size
# width = fontsize * 17
# height = fontsize + 10
# initil... | 29.607143 | 79 | 0.659429 |
c3080f4b0f0012364d7140c95f93eb6effbd4a42 | 757 | py | Python | Project Euler Qusetions 41 - 50/Project Euler Question 42.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Qusetions 41 - 50/Project Euler Question 42.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Qusetions 41 - 50/Project Euler Question 42.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 42
#Coded triangle numbers
names_file = open(r"C:\Users\Clayton\Documents\Python Other Files\p042_words.txt")
content = names_file.read()
content = content.replace("\"", "")
content = content.split(",")
content.sort()
def triangle_number(x):
if x == 1:
return True
else:
... | 23.65625 | 82 | 0.589168 |
d29fb841e3d2f38cec114aba614303b88c340e5f | 3,051 | py | Python | tests/test_restful.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 17 | 2021-01-18T07:27:01.000Z | 2022-03-10T12:26:21.000Z | tests/test_restful.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 4 | 2021-04-29T11:20:44.000Z | 2021-12-06T10:19:17.000Z | tests/test_restful.py | CsabaWirnhardt/cbm | 1822addd72881057af34ac6a7c2a1f02ea511225 | [
"BSD-3-Clause"
] | 47 | 2021-01-21T08:25:22.000Z | 2022-03-21T14:28:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of CbM (https://github.com/ec-jrc/cbm).
# Author : Guido Lemoine
# Credits : GTCAP Team
# Copyright : 2021 European Commission, Joint Research Centre
# License : 3-Clause BSD
import sys
import json
import requests
import pandas as pd
import m... | 29.336538 | 107 | 0.684366 |
827229c76521c8d354f7db92cd144a9f4ddf5b8f | 1,412 | py | Python | c++basic/DATA_STRUCTURES/pool_thread.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | c++basic/DATA_STRUCTURES/pool_thread.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | c++basic/DATA_STRUCTURES/pool_thread.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from multiprocessing import Pool
import datetime
et = datetime.datetime.now()
# def f(x):
# return x*x
# if __name__ == '__main__':
# p = Pool(5)
# print(p.map(f, [1, 2, 3]))
#from __future__ import print_function
# from multiprocessing import Process
# import os
# def info(title):
# print (title)
#... | 21.393939 | 75 | 0.553824 |
7d7d2dfd2ab5b71133efb8653dbb3932b4c0fb82 | 798 | py | Python | deutschland/mudab/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/mudab/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/mudab/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
"""
Umweltbundesamt: Meeresumweltdatenbank (MUDAB)
Meeres-Monitoringdaten von Küstenbundesländern und Forschungseinrichtungen # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
__version__ = "1.0.0"
# import ApiClient
from deut... | 28.5 | 93 | 0.820802 |
7db29424aee5c08bcf0bb51b9ba8d06741d98f5b | 7,534 | py | Python | project/dateutils.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/dateutils.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/dateutils.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
import icalendar
import pytz
from dateutil.relativedelta import relativedelta
from dateutil.rrule import rrulestr
berlin_tz = pytz.timezone("Europe/Berlin")
gmt_tz = pytz.timezone("GMT")
def get_now():
return datetime.now(tz=berlin_tz)
def get_today():
now = get_no... | 29.315175 | 83 | 0.614415 |
81450f445b2c809ff173e99396517c5aaf5abcbf | 455 | py | Python | gestionTomaDatos/migrations/0011_auto_20210120_2052.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T01:20:45.000Z | 2021-01-09T01:20:45.000Z | gestionTomaDatos/migrations/0011_auto_20210120_2052.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T00:53:55.000Z | 2021-01-09T00:53:55.000Z | gestionTomaDatos/migrations/0011_auto_20210120_2052.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-07T23:57:28.000Z | 2021-01-07T23:57:28.000Z | # Generated by Django 2.2.17 on 2021-01-20 20:52
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gestionTomaDatos', '0010_auto_20210120_2051'),
]
operations = [
migrations.AlterField(
model_name='adqdata_eeg_protocolo',
... | 23.947368 | 86 | 0.63956 |
86054b3a50e7fea451641eebd8aa02ed6309950c | 721 | py | Python | algorithm/code/algorithm-py/com/ngsky/greedy.py | daxiongsun/ngsky-cloud | 7a550b984fb8ec57aa85e55122b7c760b2c87a58 | [
"MIT"
] | null | null | null | algorithm/code/algorithm-py/com/ngsky/greedy.py | daxiongsun/ngsky-cloud | 7a550b984fb8ec57aa85e55122b7c760b2c87a58 | [
"MIT"
] | 5 | 2020-03-04T22:24:39.000Z | 2021-12-09T20:45:08.000Z | algorithm/code/algorithm-py/com/ngsky/greedy.py | daxiongsun/ngsky-cloud | 7a550b984fb8ec57aa85e55122b7c760b2c87a58 | [
"MIT"
] | null | null | null | """
算法1:贪心算法
"""
"""
题目1:给定总金额N元,求最少有多少张人民币可换取N元。[100,50,20,10,5,2,1]
时间复杂度:7 * N/100
1 2 5 7 10 20 50 100
1 1
2 1 + 1
5 2 + 2 + 1
7 5 + 2 + 1
10 5 + 5
20 10 + 10
50 20 + 20 + 10
100 50 + 50
"""
class Solution:
def findLess(self, N):
m = [100,50,20,10,5,2,1]
mLen = len(m)
count = 0
... | 15.020833 | 48 | 0.466019 |
548b368151f3f59b75c22dbb07a7cef882c5538c | 17,428 | py | Python | Integrations/python/deephaven/__init__.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | Integrations/python/deephaven/__init__.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | Integrations/python/deephaven/__init__.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2016-2021 Deephaven Data Labs and Patent Pending
#
"""
Main Deephaven python module.
For convenient usage in the python console, the main sub-packages of deephaven have been imported here with aliases:
* Calendars imported as cals
* ComboAggregateFactory imported as caf
* DBTimeUtils imported as ... | 42.096618 | 421 | 0.728024 |
b737c3115f33a4491b465ce94d5f057190cc376a | 1,678 | py | Python | research/cv/siamRPN/export_mindir.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/siamRPN/export_mindir.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/siamRPN/export_mindir.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.702128 | 90 | 0.691299 |
3fbc94cb24ee34398ae575e76325f421b7116fc5 | 5,043 | py | Python | ENV/tensorforce-master/mazerunner/player.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | ENV/tensorforce-master/mazerunner/player.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | ENV/tensorforce-master/mazerunner/player.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | 1 | 2019-11-29T12:28:33.000Z | 2019-11-29T12:28:33.000Z | import math
import random
import cocos
import cocos.euclid as eu
from collidable import Collidable
import config
class Sensor():
def __init__(self, fov, angle, max_range):
self.fov = fov
self.angle = angle
self.max_range = max_range
self.proximity = self.max_range
self.se... | 30.563636 | 97 | 0.559389 |
b78868873b83481b286217ba114b25149269313d | 3,025 | py | Python | official/nlp/mass/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/nlp/mass/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/nlp/mass/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 38.291139 | 98 | 0.623471 |
c459e223ec1b0abee739761a3ae8b9095831e824 | 3,834 | py | Python | events/models.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | events/models.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | events/models.py | rocky-roll-call/rrc-backend | 02e8e11c3dab7661e48650e2e861a4a97788a4ce | [
"MIT"
] | null | null | null | """
Models to manage calendar events
"""
# stdlib
from datetime import timedelta
# django
from django.db import models
from rest_framework.exceptions import ValidationError
from django.utils import timezone
EXPIRES_AFTER = 365 * 2 # days
class Event(models.Model):
"""
A calendar event
"""
name = ... | 24.896104 | 88 | 0.582942 |
67032bb9f8e574c844ff08b11614f33d81bb7077 | 734 | py | Python | Raspberry Pi Pico/Pi_Pico_I2CScan.py | ckuehnel/MicroPython | c57d0df744fe5301e755bd139b6cc56d69c442fd | [
"MIT"
] | 1 | 2021-03-22T18:38:43.000Z | 2021-03-22T18:38:43.000Z | Raspberry Pi Pico/Pi_Pico_I2CScan.py | ckuehnel/MicroPython | c57d0df744fe5301e755bd139b6cc56d69c442fd | [
"MIT"
] | null | null | null | Raspberry Pi Pico/Pi_Pico_I2CScan.py | ckuehnel/MicroPython | c57d0df744fe5301e755bd139b6cc56d69c442fd | [
"MIT"
] | 1 | 2021-02-06T10:07:36.000Z | 2021-02-06T10:07:36.000Z | # Pi_Pico_I2CScan.py
# Scan both I2C-Busses for connected devices
# I2C0: SDA = GPIO0, SCL = GPIO1
# I2C1: SDA = GPIO14, SCL = GPIO15
# 2021-03-11 Claus Kühnel info@ckuehnel.ch
from machine import Pin, I2C
sda0=Pin(0)
scl0=Pin(1)
i2c0=I2C(0,sda=sda0, scl=scl0, freq=400000)
sda1=Pin(14)
scl1=Pin(15)
i2c1=I2C(1,sda=s... | 23.677419 | 84 | 0.667575 |
c02340b84f190c24a476f3cb488c25b9207771b0 | 192 | py | Python | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/test1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/test1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/test1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | def reverse_string(s):
"""Returns the reversal of the given string."""
result = ""
for char in s:
result = char + result
return result
print (reverse_string("hello"))
| 21.333333 | 51 | 0.625 |
22270fd35100c4f3221033011a503a4d00f3b05c | 1,718 | py | Python | brick/exception.py | xsank/bottle | 4c228043ea31811fffd8eb30914d025c1fd43dc0 | [
"MIT"
] | 9 | 2015-01-06T01:32:43.000Z | 2017-03-01T18:34:54.000Z | brick/exception.py | jude90/bottle | 4c228043ea31811fffd8eb30914d025c1fd43dc0 | [
"MIT"
] | null | null | null | brick/exception.py | jude90/bottle | 4c228043ea31811fffd8eb30914d025c1fd43dc0 | [
"MIT"
] | 4 | 2015-02-05T09:48:43.000Z | 2016-02-22T15:04:35.000Z | '''
Created on 2013-4-21
@author: Xsank
'''
from structure import HeaderDict
from config import ERROR_PAGE_TEMPLATE
class BrickException(Exception):
'''base class of all exception'''
pass
class RouteError(BrickException):
'''base class route_error'''
class RouteSyntaxError(RouteError):
'... | 25.641791 | 102 | 0.667055 |
bed24ac33d54d9e1e78fc544407723462f3297f2 | 125 | py | Python | examples/miniportal/portal/actors/system/usermanager/addUser.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | 1 | 2015-10-26T10:38:32.000Z | 2015-10-26T10:38:32.000Z | examples/miniportal/portal/actors/system/usermanager/addUser.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | examples/miniportal/portal/actors/system/usermanager/addUser.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null |
def addUser(actors):
x = 10
for i in range(100):
z = x * i
return "{'name':'Hello add', 'z':'%s'}" % z
| 15.625 | 47 | 0.456 |
55dd1fa4bb530ebfa8035a677d22470ff898d791 | 2,509 | py | Python | wx.py | v1w/OEMT-wechat | 395dd1d44e5581452581247c7a4a4bbc17c9ab36 | [
"Apache-2.0"
] | 2 | 2017-01-21T16:57:45.000Z | 2017-09-29T07:04:45.000Z | wx.py | v1w/OEMT-wechat | 395dd1d44e5581452581247c7a4a4bbc17c9ab36 | [
"Apache-2.0"
] | null | null | null | wx.py | v1w/OEMT-wechat | 395dd1d44e5581452581247c7a4a4bbc17c9ab36 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
from flask import Flask, request
import receive, reply
import requests
import json
HELP_MSG = \
"""Usage:
sem <stats>
coater <stats>"""
OEMT_HOST = 'http://127.0.0.1:11934'
SYNTAX_ERR_MSG = "Syntax Error\n Use [help] to list available commands."
EQUIP_ID = {
'sem': '536e62ab-3... | 28.511364 | 105 | 0.603029 |
55f7990bcc68fa6dbfcb24aeb2fafc51e428f5d8 | 6,714 | py | Python | Packs/PaloAltoNetworks_IoT3rdParty/Scripts/SendAllPANWIoTDevicesToServiceNow/SendAllPANWIoTDevicesToServiceNow.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/PaloAltoNetworks_IoT3rdParty/Scripts/SendAllPANWIoTDevicesToServiceNow/SendAllPANWIoTDevicesToServiceNow.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/PaloAltoNetworks_IoT3rdParty/Scripts/SendAllPANWIoTDevicesToServiceNow/SendAllPANWIoTDevicesToServiceNow.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
PANW_IOT_INSTANCE = "PANW IoT 3rd Party Integration Instance"
SERVICENOW_INSTANCE = "PANW IoT 3rd Party ServiceNow Integration Instance"
PAGE_SIZE = 100
SERVICENOW_TABLE_NAME = "u_zingbox_discovered_devices"
def send_status_to_panw_iot_cloud(status=None, ... | 35.712766 | 106 | 0.644325 |
e9fff7069cdf7e7e947dfca5c4d215b785ee7f20 | 6,383 | py | Python | easyp2p/p2p_worker.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 4 | 2019-07-18T10:58:28.000Z | 2021-11-18T16:57:45.000Z | easyp2p/p2p_worker.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 1 | 2019-07-05T09:21:47.000Z | 2019-07-05T09:21:47.000Z | easyp2p/p2p_worker.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 2 | 2019-07-05T08:56:34.000Z | 2020-06-09T10:03:42.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2018-2020 Niko Sandschneider
"""Module implementing WorkerThread."""
import logging
import os
from typing import Optional
import pandas as pd
from PyQt5.QtCore import QCoreApplication, QThread
from easyp2p.excel_writer import write_results
from easyp2p.p2p_credentials import... | 34.317204 | 80 | 0.624628 |
a1f5a9820ae73654c80a59832e69cf1795e799ff | 427 | py | Python | data_tests/saved__backend__/cython/methods.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | data_tests/saved__backend__/cython/methods.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | data_tests/saved__backend__/cython/methods.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | try:
import cython
except ImportError:
from transonic_cl import cython
import numpy as np
def __for_method__Transmitter____call__(self_arr, self_freq, inp):
"My docstring"
return ((inp * np.exp(((np.arange(len(inp)) * self_freq) * 1j))), self_arr)
__code_new_method__Transmitter____call__ = """
def... | 19.409091 | 79 | 0.709602 |
c5612525349fa2fa40b60fc5fcf3ca98058b3913 | 661 | py | Python | engine/Player.py | StefanSchmelz/whoGetsTheMillion | 99a42b6a2e99def4faa05787b4869387d7827f86 | [
"MIT"
] | null | null | null | engine/Player.py | StefanSchmelz/whoGetsTheMillion | 99a42b6a2e99def4faa05787b4869387d7827f86 | [
"MIT"
] | null | null | null | engine/Player.py | StefanSchmelz/whoGetsTheMillion | 99a42b6a2e99def4faa05787b4869387d7827f86 | [
"MIT"
] | null | null | null | from engine.jsonCollection import Collection
from engine.Question import Question
class Player:
def __init__(self, name="", path="test.json"):
self.name = name
self.level = 0
self.collection = Collection(path)
self.fiftyFiftyJoker = True
self.publikumJoker = True
def g... | 27.541667 | 62 | 0.65053 |
3db70ee060e786e9f7282e43479525101081331c | 2,093 | py | Python | 05_String/AdasInput/scripts/data.py | franneck94/UdemyCppExercises | 862d3e3df198ef8f3c7b850bbeead6161700f9d1 | [
"MIT"
] | null | null | null | 05_String/AdasInput/scripts/data.py | franneck94/UdemyCppExercises | 862d3e3df198ef8f3c7b850bbeead6161700f9d1 | [
"MIT"
] | null | null | null | 05_String/AdasInput/scripts/data.py | franneck94/UdemyCppExercises | 862d3e3df198ef8f3c7b850bbeead6161700f9d1 | [
"MIT"
] | 5 | 2022-02-06T20:05:07.000Z | 2022-03-10T12:48:58.000Z | import os
import json
import enum
import numpy as np
class LaneAssociation(enum.Enum):
LEFT = 0
CENTER = 1
RIGHT = 2
UNKNOWN = 3
NUM_VEHICLES = 6
NUM_ITERATIONS = 1_000
FPS = 25
VEHICLE_FILENAME = "vehicle_data.json"
VEHICLE_FILEPATH = os.path.join(
os.path.dirname(os.path.dirname(__file__)), ... | 23.516854 | 82 | 0.646441 |
62655d803a0ef856179d6be97e132dbe4a634f49 | 481 | py | Python | 2-resources/Lambda-weeks/m6/63c1/Algorithms-master/eating_cookies/eating_cookies.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/Lambda-weeks/m6/63c1/Algorithms-master/eating_cookies/eating_cookies.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/Lambda-weeks/m6/63c1/Algorithms-master/eating_cookies/eating_cookies.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys
# The cache parameter is here for if you want to implement
# a solution that is more efficient than the naive
# recursive solution
def eating_cookies(n, cache=None):
pass
if __name__ == "__main__":
if len(sys.argv) > 1:
num_cookies = int(sys.argv[1])
print("There are {ways} ... | 30.0625 | 129 | 0.719335 |
657e3d8dd1d968e197bfcc0588067492db7c744e | 58 | py | Python | python_gui_tkinter/KALU/GARBAGE/VERSION 0.01/SAFE1AUG/some.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/KALU/GARBAGE/VERSION 0.01/SAFE1AUG/some.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/KALU/GARBAGE/VERSION 0.01/SAFE1AUG/some.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | lista = [1,2,3,4,5,6,7,8]
print(lista[0])
print(lista[1:]) | 19.333333 | 25 | 0.603448 |
b88e42a5468b8ff8833b4a138784f4f61d0a633e | 2,950 | py | Python | nordapi/NordApi.py | joshRooz/NordApi | c0d34ed81a0014da5fb96a3409d1ccc0addcc01e | [
"MIT"
] | null | null | null | nordapi/NordApi.py | joshRooz/NordApi | c0d34ed81a0014da5fb96a3409d1ccc0addcc01e | [
"MIT"
] | null | null | null | nordapi/NordApi.py | joshRooz/NordApi | c0d34ed81a0014da5fb96a3409d1ccc0addcc01e | [
"MIT"
] | null | null | null | from requests import get
# from iso3166 import countries_by_alpha2
class NordApi(object):
"""nordapi - Fetch VPN Endpoints
Interact with the undocumented, but publicly exposed API from NordVPN
"""
def __init__(self, limit=10, cap=30):
"""[initialization]
Args:
cap (int, o... | 32.777778 | 76 | 0.577627 |
b8b159f70873d28df2ad60d2b5460a54965d043b | 1,017 | py | Python | INBa/2015/Cherniy_F_Y/task_4_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Cherniy_F_Y/task_4_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Cherniy_F_Y/task_4_28.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 4. Вариант 28.
# Напишите программу, которая выводит имя,
# под которым скрывается Эдуард Георгиевич Зюбин.
# Дополнительно необходимо вывести область интересов указанной личности,
# место рождения, годы рождения и смерти (если человек умер),
# вычислить возраст на данный момент (или момент смерти).
# Для хран... | 36.321429 | 104 | 0.768928 |
a24e367db42cd0e7f0abcfaf2a1d9fde13cb619b | 334 | py | Python | Fibonacci number.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | Fibonacci number.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | Fibonacci number.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | # Function for nth Fibonacci number
def Fibonacci(n):
if n<= 0:
print("Incorrect input")
# First Fibonacci number is 0
elif n == 1:
return 0
# Second Fibonacci number is 1
elif n == 2:
return 1
else:
return Fibonacci(n-1)+Fibonacci(n-2)
# Driver Program
print(Fibonacci(10))
# This code is contributed ... | 16.7 | 40 | 0.691617 |
a2f2df54f07d95534a513a4d7f10831310975c19 | 1,447 | py | Python | elements/python/8/17/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/8/17/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/8/17/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | import random
class Node(object):
def __init__(self, x, nxt):
self.x = x
self.next = nxt
def pivot(n, k):
heads = [None]*3
tails = [None]*3
# build sections independently
while n is not None:
i = 1+cmp(n.x, k)
if heads[i] is None:
heads[i] = n
... | 17.433735 | 55 | 0.498272 |
0253831d47aa46ebab96f158f664e0e0d454a614 | 2,043 | py | Python | yolov5-coreml-tflite-converter/tflite/tf_metadata/metadata_utils.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_metadata/metadata_utils.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/tflite/tf_metadata/metadata_utils.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | from tflite_support import metadata_schema_py_generated as _metadata_fb
class MetadataHelper:
def _add_content_image(self, meta):
# Image RGB
meta.content = _metadata_fb.ContentT()
meta.content.contentProperties = _metadata_fb.ImagePropertiesT()
meta.content.contentProperties.color... | 44.413043 | 99 | 0.714146 |
027454a33ee753e425bbf3485cf015bc47a88035 | 677 | py | Python | Fastir_Collector/_analyzemft/bitparse.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/_analyzemft/bitparse.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/_analyzemft/bitparse.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python
# This is all Willi Ballenthin's. Saved me a lot of headaches
def parse_little_endian_signed_positive(buf):
ret = 0
for i, b in enumerate(buf):
ret += ord(b) * (1 << (i * 8))
return ret
def parse_little_endian_signed_negative(buf):
ret = 0
for i, b in enumerate(buf):
... | 22.566667 | 61 | 0.601182 |
5a77fb90af9742fa328bfd021f9cb073ab684ca5 | 4,663 | py | Python | tests/test_energiemix.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_energiemix.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_energiemix.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.com.energieherkunft import Energieherkunft
from bo4e.com.energiemix import Energiemix, EnergiemixSchema
from bo4e.enum.erzeugungsart import Erzeugungsart
from bo4e.enum.oekolabel import Oekolabel
from bo4e.enum.oekozertifikat import Oekozertif... | 35.59542 | 92 | 0.465795 |
f0432eea3eb76dad30f728d94e4ca9b2df559e00 | 57 | py | Python | python/python_package/geometry/point.py | daoxuewu/cheat_sheet | 4a164f7eccb85ca39b9a9ad58fe5d495862ecf44 | [
"MIT"
] | null | null | null | python/python_package/geometry/point.py | daoxuewu/cheat_sheet | 4a164f7eccb85ca39b9a9ad58fe5d495862ecf44 | [
"MIT"
] | null | null | null | python/python_package/geometry/point.py | daoxuewu/cheat_sheet | 4a164f7eccb85ca39b9a9ad58fe5d495862ecf44 | [
"MIT"
] | null | null | null | # 計算點的距離
def distance(x,y):
return (x**2+y**2)**0.5 | 19 | 27 | 0.54386 |
b2b62b5538b2d68773b0575ae3f8f792628d8470 | 354 | py | Python | Python/Exercícios_Python/050_tabuada_v2.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/050_tabuada_v2.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/050_tabuada_v2.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""050 - Tabuada v2
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1Axg4g9Vay8MaSv4VpfVeibGeO4g5KM1y
"""
n= int (input ('Digite um numero para calcular a sua tabuada: '))
for tabu in range (0,11):
res=n*tabu
print ( '{}... | 27.230769 | 77 | 0.672316 |
6531d76546910ae524a8f4981b3fa1233952e8ff | 525 | py | Python | lat/time.py | Omaam/lat | bb72c43fc870a36e26a32b05000d091871e07ad5 | [
"MIT"
] | null | null | null | lat/time.py | Omaam/lat | bb72c43fc870a36e26a32b05000d091871e07ad5 | [
"MIT"
] | null | null | null | lat/time.py | Omaam/lat | bb72c43fc870a36e26a32b05000d091871e07ad5 | [
"MIT"
] | null | null | null | """Module for handling time.
"""
def grego2mjd(y, m, d):
if m <= 2:
m += 12
y -= 1
y_term = int(365.25*y) + (y//400) - (y//100)
md_term = int(30.59*(m-2)) + d - 678912
return y_term+md_term
def mjd2grego(mjd):
"""Modified Julian Date -> Gregorian Calendar Date
"""
n = mjd... | 21 | 54 | 0.453333 |
d7b6fba650fa2a4667247e33222e3cc75fcb4724 | 1,181 | py | Python | Packs/CommonScripts/Scripts/HTTPListRedirects/HTTPListRedirects.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/HTTPListRedirects/HTTPListRedirects.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/HTTPListRedirects/HTTPListRedirects.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
import requests
import os
requests.packages.urllib3.disable_warnings()
if demisto.args().get('use_system_proxy') == 'false':
del os.environ['HTTP_PROXY']
del os.environ['HTTPS_PROXY']
del os.environ['http_proxy']
del os.environ['https_prox... | 36.90625 | 105 | 0.672312 |
045dca04ec721f09edcb5484c2f2a4ac9df4b103 | 15,336 | py | Python | frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/operations/install_fixtures.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
default_lead_sources = ["Existing Customer", "Reference", "Advertisement",
"Cold Calling", "Exhibition", "Supplie... | 52.520548 | 160 | 0.647692 |
acd76d3e1cfaf4bad5e578fc1204b489ae861f07 | 3,637 | py | Python | new-docs/examples/inheritance/python/test_example.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 1 | 2021-07-08T17:36:08.000Z | 2021-07-08T17:36:08.000Z | new-docs/examples/inheritance/python/test_example.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 2 | 2021-03-24T19:24:40.000Z | 2021-03-24T19:54:46.000Z | new-docs/examples/inheritance/python/test_example.py | saschajullmann/oso | 85d07c6a1825acba5ec043c917bff6e0f5c7128f | [
"Apache-2.0"
] | 1 | 2021-03-24T19:51:45.000Z | 2021-03-24T19:51:45.000Z | from pathlib import Path
import pytest
from oso import Oso
from . import inheritance_external
@pytest.fixture
def oso():
return Oso()
@pytest.fixture
def patient():
return "Bob"
@pytest.fixture
def med_staff(patient):
return inheritance_external.Actor(role="medical_staff", treated=[patient])
@pyt... | 26.742647 | 84 | 0.676932 |
4fa3c64d9f491f786f250a3a4d4bf4243eab5011 | 3,835 | py | Python | src/processing/DataItem.py | Phrosten/CodeCompetition_07-2017_BigData | 3d9cb8da2164ea2687471375966d77ff7b129a93 | [
"Apache-2.0"
] | null | null | null | src/processing/DataItem.py | Phrosten/CodeCompetition_07-2017_BigData | 3d9cb8da2164ea2687471375966d77ff7b129a93 | [
"Apache-2.0"
] | null | null | null | src/processing/DataItem.py | Phrosten/CodeCompetition_07-2017_BigData | 3d9cb8da2164ea2687471375966d77ff7b129a93 | [
"Apache-2.0"
] | null | null | null | import sys
class DataItem:
def __init__(self, line):
data = self.ParseLine(line) # Get the line as an array
if(len(data) != 12): # Check if line was correct
print("Unexpected Input Width")
sys.exit()
self.Weathers = ["sunny", "rainy", "thundery", "snowy"] # All weath... | 38.35 | 110 | 0.598435 |
50aa518c382c3dfae218aa34c71ea38956506d0d | 2,711 | py | Python | data.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | data.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | data.py | matthewmercuri/mdbacktestv2 | 2525113458cdf71e7d99ac208ad35aea92169b99 | [
"MIT"
] | null | null | null | import os
import pandas as pd
import requests
'''
-Put helper functions and variables in class?
-donwload required data (benchmark and tradeables)
-load required data
-clean data
-save locally
'''
def _read_api_key(file):
try:
with open(file, 'r') as f:
return f.read().strip()
except Fil... | 31.523256 | 87 | 0.601623 |
50c20aa502bfdd4019e39f8ff411e38db3331c95 | 478 | py | Python | Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P09_Moving.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P09_Moving.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L05_WhileLoop/Lab/Solutions/P09_Moving.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | width = int(input())
length = int(input())
height = int(input())
free_space = width * length * height
space_needed = 0
diff = 0
while True:
line = input()
if line == "Done":
break
boxes = int(line)
space_needed += boxes
if space_needed > free_space:
break
diff = abs(free_space - s... | 20.782609 | 68 | 0.640167 |
50c244f73614f98c15265c0f695facdf24f80ffc | 2,533 | py | Python | plugins/actions/kubectl.py | ssube/k8s-shards | 8ce3464f4a7e96289c9b5f2b259de21d5d873815 | [
"MIT"
] | 1 | 2019-08-29T19:45:01.000Z | 2019-08-29T19:45:01.000Z | plugins/actions/kubectl.py | ssube/k8s-shards | 8ce3464f4a7e96289c9b5f2b259de21d5d873815 | [
"MIT"
] | null | null | null | plugins/actions/kubectl.py | ssube/k8s-shards | 8ce3464f4a7e96289c9b5f2b259de21d5d873815 | [
"MIT"
] | null | null | null |
from ansible.plugins.action import ActionBase
import os
import tempfile
try:
from __main__ import display
except ImportError:
from ansible.utils.display import Display
display = Display()
class ActionModule(ActionBase):
def run(self, tmp=None, task_vars=None):
if task_vars is None:
... | 28.144444 | 84 | 0.57047 |
2cf26278552e404678d7cd69606a2ec2e3567823 | 1,205 | py | Python | python/flask/jinja/run.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/flask/jinja/run.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/flask/jinja/run.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from flask import Flask, render_template
import datetime
app = Flask(__name__)
@app.template_filter()
def datetimefilter(value, format='%Y/%m/%d %H:%M'):
'''Convert a datetime to a different format'''
return value.strftime(format)
app.jinja_env.filters['datetimefilter'] = datetimefilter
@app.route('/')
... | 23.627451 | 61 | 0.637344 |
7e3571e0b55c6b78c49a08dbb64d6312c03b7d9a | 284 | pyde | Python | sketches/text01/text01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/text01/text01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/text01/text01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | font = None
tt = u"Zwölf Boxkämpfer jagen Eva quer über den großen Sylter Deich."
def setup():
# frame.setTitle("Hallo UTF-8")
size(800, 100)
font = createFont("American Typewriter", 20)
textFont(font)
def draw():
background(255)
fill(0)
text(tt, 25, 50) | 21.846154 | 69 | 0.644366 |
0e6622007dfb4430eef851a5c54fed042a1144d0 | 2,502 | py | Python | official/cv/unet3d/src/convert_nifti.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | official/cv/unet3d/src/convert_nifti.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/unet3d/src/convert_nifti.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.714286 | 94 | 0.683453 |
7d1a6cd7b07ea4abc1a903662feae4e522f26b11 | 6,269 | py | Python | asteroid/scripts/asteroid_cli.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | 1 | 2020-12-18T02:42:23.000Z | 2020-12-18T02:42:23.000Z | asteroid/scripts/asteroid_cli.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | null | null | null | asteroid/scripts/asteroid_cli.py | groadabike/asteroid | 276d98346ab791d904fbfe79b9b8e374392dd128 | [
"MIT"
] | null | null | null | import os
import yaml
import itertools
import glob
import warnings
from typing import List
import asteroid
from asteroid.models.publisher import upload_publishable
from asteroid.models.base_models import BaseModel
SUPPORTED_EXTENSIONS = [
".wav",
".flac",
".ogg",
]
def upload():
"""CLI function to ... | 33.524064 | 103 | 0.639336 |
2a4d3257d4d699e79d29ed4a931bbeb1b100806d | 342 | py | Python | pocketthrone/managers/pipe.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | 4 | 2016-06-05T16:48:04.000Z | 2020-03-23T20:06:06.000Z | pocketthrone/managers/pipe.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | pocketthrone/managers/pipe.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | # class to cache all game manager singletons
# this will be done in core/app.py
class L:
ModManager = None
InputManager = None
PlayerManager = None
GameLoopManager = None
MapManager = None
ModManager = None
UnitManager = None
CityManager = None
WidgetManager = None
TileMap = None
Screen = None
Grid = None
... | 19 | 44 | 0.74269 |
aadeab3291e8251ffd89676badb41e1c50377b82 | 854 | py | Python | DHParser/versionnumber.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | DHParser/versionnumber.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | DHParser/versionnumber.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | # versionnumber.py - contains the version number of DHParser
#
# Copyright 2016 by Eckhart Arnold (arnold@badw.de)
# Bavarian Academy of Sciences an Humanities (badw.de)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License... | 42.7 | 70 | 0.741218 |
630a20308d6773943d29e7d3558c570d542d4cbb | 2,772 | py | Python | backend/models/entry.py | methodpark/digitaleswarten | 024c0b88df54e9727925b202e139b3c5b2ce73d6 | [
"Apache-2.0"
] | 10 | 2020-03-20T19:14:43.000Z | 2020-10-29T21:31:40.000Z | backend/models/entry.py | methodpark/digitaleswarten | 024c0b88df54e9727925b202e139b3c5b2ce73d6 | [
"Apache-2.0"
] | 41 | 2020-03-20T20:27:55.000Z | 2020-03-24T21:49:37.000Z | backend/models/entry.py | methodpark/digitaleswarten | 024c0b88df54e9727925b202e139b3c5b2ce73d6 | [
"Apache-2.0"
] | 1 | 2020-03-21T09:31:51.000Z | 2020-03-21T09:31:51.000Z | from flask import abort
from sqlalchemy import desc
from sqlalchemy.exc import IntegrityError
from app import db
from models.queue import Queue
from utils.id_generator import generate_entry_id
class Entry(db.Model):
id = db.Column(db.String, primary_key=True)
queue_id = db.Column(db.String, db.ForeignKey('que... | 33 | 97 | 0.58153 |
932c28bbf1b8caaa72bb4246531555b23851ffbc | 1,014 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/03_subfunctions_german_or_not.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/03_subfunctions_german_or_not.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/03_subfunctions_german_or_not.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 03_subfunctions_german_or_not.py
# Project: Kapitel_06_Funktionen
# Created Date: Sunday 24.02.2019, 12:10
# Author: Apop85
# -----
# Last Modified: Sunday 24.02.2019, 12:19
# -----
# Copyright (c) 2019 Apop85
# This software is published under the MIT license.
... | 30.727273 | 118 | 0.677515 |
934f2b6687351ee034413100f7051c36d15d8331 | 86 | py | Python | rawio/__init__.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | rawio/__init__.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | rawio/__init__.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | #
# RawIO
# Copyright (c) 2021 Yusuf Olokoba.
#
from .version import __version__ | 14.333333 | 37 | 0.686047 |
87fe96734c3c2a940cdfc29e0057d259e034fea3 | 627 | py | Python | angstrom/2018/crypto/gmx/gm.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2018/crypto/gmx/gm.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2018/crypto/gmx/gm.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | from Crypto.Util.number import *
from gmpy2 import legendre
def generate():
p = getStrongPrime(1024)
q = getStrongPrime(1024)
n = p*q
x = getRandomRange(0, n)
while legendre(x, p) != -1 or legendre(x, q) != -1:
x = getRandomRange(0, n)
return (n, x), (p, q)
def encrypt(m, pk):
n, x = pk
for b in format(int(... | 22.392857 | 66 | 0.566188 |
17cf4229aadfc491abce59c5b2fd2c2cf8493dd3 | 4,052 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/utils_print.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/utils_print.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/commonapi/utils_print.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# 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 2
# of the License, or (at your option) any later version.
#!/usr/bin... | 30.931298 | 104 | 0.490869 |
1033c6e2ebaa9b72fd9da1a4c349a1b006e3cdf5 | 553 | py | Python | zypher_backtester/main.py | SebastianOderland/zypher_backtest | 3c16d0832f53e12eb1f2699676793e7c2b7c8ab7 | [
"MIT"
] | null | null | null | zypher_backtester/main.py | SebastianOderland/zypher_backtest | 3c16d0832f53e12eb1f2699676793e7c2b7c8ab7 | [
"MIT"
] | null | null | null | zypher_backtester/main.py | SebastianOderland/zypher_backtest | 3c16d0832f53e12eb1f2699676793e7c2b7c8ab7 | [
"MIT"
] | null | null | null | import os
import backtrader as bt
def run(data_filepath, output_filepath, strategy):
if not os.path.exists(f"{output_filepath}"):
os.mkdir(f"{output_filepath}")
filename = os.path.basename(data_filepath)
data0 = bt.feeds.BacktraderCSVData(dataname=data_filepath)
cerebro = bt.Cereb... | 26.333333 | 70 | 0.654611 |
10847b00b744bc835ceb1de164bfb0de789e618f | 388 | py | Python | ISTp/2013/IVANOV_S_E/task_5_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2013/IVANOV_S_E/task_5_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | ISTp/2013/IVANOV_S_E/task_5_6.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5. Вариант 6.
# Напишите программу, которая бы при запуске случайным образом отображала название одного из двух спутников Марса.
# Ivanov S. E.
# 19.09.2016
import random
SATELLITE_LIST = ("Фобос", "Деймос")
print("Программа случайным образом отображает название одного из двух спутников Марса.\n")
print(... | 24.25 | 114 | 0.765464 |
dc337379179a01213484dbdf84a2d81ebae3850a | 4,212 | py | Python | geol/geometry/squaregrid.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 8 | 2018-03-09T16:44:38.000Z | 2021-04-07T11:33:30.000Z | geol/geometry/squaregrid.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 4 | 2020-03-24T15:34:54.000Z | 2021-06-01T21:54:33.000Z | geol/geometry/squaregrid.py | PyGeoL/GeoL | 67a5bd2f63091e19041094c14d419055fa5ce6f0 | [
"MIT"
] | 1 | 2020-05-13T14:30:55.000Z | 2020-05-13T14:30:55.000Z | """
File description
"""
# Authors: Gianni Barlacchi <gianni.barlacchi@gmail.com>
from geol.geometry.grid import Grid
from geol.utils import utils, constants
import geopandas as gpd
import math
from shapely.geometry import Polygon
import os
from geol.geol_logger.geol_logger import logger
class SquareGrid(Grid):
... | 33.696 | 127 | 0.593542 |
f4b8e64c2fe68e1e9e51aa9ef6af42e795cc8aa8 | 360 | py | Python | models/hr_employee_branche.py | aroodooteam/aro_hr | bf26f026593493486b4b5c13b26b9b47b9fe3825 | [
"BSD-2-Clause"
] | null | null | null | models/hr_employee_branche.py | aroodooteam/aro_hr | bf26f026593493486b4b5c13b26b9b47b9fe3825 | [
"BSD-2-Clause"
] | null | null | null | models/hr_employee_branche.py | aroodooteam/aro_hr | bf26f026593493486b4b5c13b26b9b47b9fe3825 | [
"BSD-2-Clause"
] | 3 | 2017-09-11T08:02:11.000Z | 2020-04-04T08:13:23.000Z | # -*- coding: utf-8 -*-
from openerp import api, exceptions, fields, models, _
class HrEmployeeBranche(models.Model):
"""gestion des branches des qualifications"""
_name = 'hr.employee.branche'
code = fields.Char(string='Code Branche', size=16)
name = fields.Char(string='Nom Branche', size=64)
n... | 27.692308 | 54 | 0.686111 |
5ec06a8665560185fce7540649e865849e146e45 | 416 | py | Python | project_euler/p002.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | project_euler/p002.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | project_euler/p002.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Dec 21 00:31:41 2018
Problem 2
- Even Fibonacci numbers
@author: zeroam
"""
def fibonacci(limit):
first = 1
second = 2
cur = 0
total = 2
while cur < limit:
if(cur%2 == 0):
total += cur
cur = first + second
first = second... | 18.086957 | 35 | 0.550481 |
2175493b64129a500b2fabb965536a396d587452 | 489 | py | Python | INBa/2015/Primov_G_S/task_3_19.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Primov_G_S/task_3_19.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Primov_G_S/task_3_19.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 1. Вариант 19
#Напишите программу, которая выводит имя "Михаил Николаевич Румянцев", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире.
#Primov G. S.
#08.03.2016
print("Сегодня речь пойдёт про Михаила Николаевича Румянцев... | 54.333333 | 211 | 0.783231 |
1d66296d76ce3a91990c66fc81ee7f8ba8f1bd57 | 4,464 | py | Python | main.py | no-ora/solitadds | 18c5868af00441a8e67311679a0b848c836975d2 | [
"MIT"
] | null | null | null | main.py | no-ora/solitadds | 18c5868af00441a8e67311679a0b848c836975d2 | [
"MIT"
] | null | null | null | main.py | no-ora/solitadds | 18c5868af00441a8e67311679a0b848c836975d2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import sys, re, pdb, os
import logging
import argparse
import numpy as np
import pandas as pd
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.backends.backend_agg import FigureCanvasAgg
import datetime
import utils, data_helper
import analyze
def parse_ar... | 53.783133 | 279 | 0.755152 |
63b0606c8a530c1221732ea3c45a36d20199d61d | 924 | py | Python | connector.py | frederic-loui/RARE-web | 8ee13e292777579725cc1e0288653fc76dbe3aa3 | [
"Apache-2.0"
] | 1 | 2022-02-22T07:14:53.000Z | 2022-02-22T07:14:53.000Z | connector.py | frederic-loui/RARE-web | 8ee13e292777579725cc1e0288653fc76dbe3aa3 | [
"Apache-2.0"
] | null | null | null | connector.py | frederic-loui/RARE-web | 8ee13e292777579725cc1e0288653fc76dbe3aa3 | [
"Apache-2.0"
] | 1 | 2019-11-06T20:21:12.000Z | 2019-11-06T20:21:12.000Z | #!/usr/bin/python3
from ipaddress import *
from enum import Enum
class ConnType(Enum):
NONE = 0
ROUTED = 1
BRIDGED = 2
class Connector:
id = None
node = None
intf = None
type = ConnType.NONE
ipv4 = None
hostmask4 = None
ipv6 = None
hostmask6 = None
bridge_id = None
def __init_... | 23.1 | 76 | 0.571429 |
986f5f097c0b4016a69e6c336f9b00107ca1a724 | 92,240 | py | Python | DarkRise/DarkRise.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | DarkRise/DarkRise.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | DarkRise/DarkRise.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | #!/usr/bin/python2
#-*- coding:utf-8 -*-
import os
import subprocess
import logging
import readline
import platform
import requests
import json
import sys
import random
import shlex
import requests
import json
class SimpleCompleter(object):
def __init__(self, options):
self.options = sorted(options)
... | 68.325926 | 216 | 0.299859 |
61b81372e84146238b9a223441e39bdc61f3dcd1 | 1,585 | py | Python | apps/RobotController/app.py | critterandguitari/Organelle_Web | eb8692930127b0fa980722e3f1870893a4fbed7f | [
"BSD-3-Clause"
] | 1 | 2017-09-22T21:16:32.000Z | 2017-09-22T21:16:32.000Z | apps/RobotController/app.py | critterandguitari/Organelle_Web | eb8692930127b0fa980722e3f1870893a4fbed7f | [
"BSD-3-Clause"
] | null | null | null | apps/RobotController/app.py | critterandguitari/Organelle_Web | eb8692930127b0fa980722e3f1870893a4fbed7f | [
"BSD-3-Clause"
] | 1 | 2019-10-20T17:28:47.000Z | 2019-10-20T17:28:47.000Z | import os.path
import time
import glob
import json
import cherrypy
import urllib
import time
import socket
from cherrypy.lib import static
import imp
current_dir = os.path.dirname(os.path.abspath(__file__))
Robot = imp.load_source('Robot', current_dir + '/Robot.py')
LEFT_TRIM = 0
RIGHT_TRIM = 0
robot = Robot.Robot(... | 24.384615 | 74 | 0.562776 |
9cf493869f4b888f70fcd586c32665613ba294a4 | 3,802 | py | Python | Termux-Gui-master/Gui.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Termux-Gui-master/Gui.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Termux-Gui-master/Gui.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z |
import os, sys, subprocess,time
import os, sys, json, urllib, re
from time import sleep
os.system("clear")
reload(sys)
sys.setdefaultencoding("utf-8")
def logo():
print("""
@@@@@@@ @@@@@@@@ @@@ @@@ @@@
@@@@@@@ @@@@@@@@@ @@@ @@@ @@@ ... | 27.751825 | 189 | 0.540768 |
14600e80f5783cd4b17923abd975ba4651b8bea4 | 4,194 | py | Python | pretrain/mobilenet_person.py | ahangchen/Rasp-Person-Sensor | 77d0e41b1a80cf9012f66c7bd44f062edbc6825d | [
"MIT"
] | 2 | 2018-02-26T10:00:29.000Z | 2018-03-16T11:39:34.000Z | pretrain/mobilenet_person.py | ahangchen/Rasp-Person-Sensor | 77d0e41b1a80cf9012f66c7bd44f062edbc6825d | [
"MIT"
] | null | null | null | pretrain/mobilenet_person.py | ahangchen/Rasp-Person-Sensor | 77d0e41b1a80cf9012f66c7bd44f062edbc6825d | [
"MIT"
] | null | null | null | from random import shuffle
import keras
from keras import Input
import numpy as np
import os
import cv2
from keras.applications.mobilenet import preprocess_input, relu6, DepthwiseConv2D
from keras.callbacks import EarlyStopping, ReduceLROnPlateau
from keras.engine import Model
from keras.layers import Dropout, Dense
f... | 36.155172 | 110 | 0.643777 |
1aeea8af249a86ec78f3a9f6d6fb4f29013a4524 | 31,677 | py | Python | etl/load/pipelines/epic2op.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | etl/load/pipelines/epic2op.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | etl/load/pipelines/epic2op.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | import etl.load.primitives.tbl.load_table as primitives
from etl.core.task import Task
import datetime as dt
import asyncpg
import asyncio
from sqlalchemy import create_engine
from etl.load.pipelines.derive_main import derive_feature, get_derive_seq
import pandas as pd
import os
import logging
from etl.load.primitives.... | 43.692414 | 306 | 0.679389 |
0d00559d0c7973e4551aebabfd172da93c178285 | 3,971 | py | Python | pgnize.py | Lukasel/chessStuff | ced62c23c60be573150791ca00f854a2e4f4e836 | [
"CC0-1.0"
] | null | null | null | pgnize.py | Lukasel/chessStuff | ced62c23c60be573150791ca00f854a2e4f4e836 | [
"CC0-1.0"
] | null | null | null | pgnize.py | Lukasel/chessStuff | ced62c23c60be573150791ca00f854a2e4f4e836 | [
"CC0-1.0"
] | null | null | null | '''
This python script accepts a file with FEN-strings (Forsyth-Edwards Notation)
and additional metadata and transforms it into a PGN file (Portable Game Notation).
FEN data has to be in the form:
{ ( FEN \n Metadata ) | ( Metadata \n FEN ) \n (solution)? \n }*
with - FEN being a valid FEN string that desrcibes a ch... | 34.232759 | 106 | 0.601864 |
0d54807288bad717f1438afb1e533169a8cd546d | 1,892 | py | Python | src/onegov/fsi/app.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/fsi/app.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/fsi/app.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core import utils
from onegov.fsi.initial_content import create_new_organisation
from onegov.fsi.models.course_attendee import CourseAttendee
from onegov.fsi.request import FsiRequest
from onegov.fsi.theme import FsiTheme
from onegov.org import OrgApp
from onegov.org.app import get_common_asset as default_c... | 25.917808 | 73 | 0.75 |
b4d59105dc3c065004ca403f42e9041b185083e7 | 740 | py | Python | guessNumbers.py | wukids/sandbox | 8df917785ea866cd362f95fe444378cf82979328 | [
"Unlicense"
] | 1 | 2017-03-20T08:06:22.000Z | 2017-03-20T08:06:22.000Z | guessNumbers.py | wukids/sandbox | 8df917785ea866cd362f95fe444378cf82979328 | [
"Unlicense"
] | null | null | null | guessNumbers.py | wukids/sandbox | 8df917785ea866cd362f95fe444378cf82979328 | [
"Unlicense"
] | null | null | null | import random
print("hello, what's your name?")
name = input()
upperlimit = 50
number = random.randint(1,upperlimit)
print("well, " + name + ", I'm thinking of a number between 1 and " + str(upperlimit) + ".")
for guessesTaken in range(6):
print("take a guess.")
guess = input()
guess = int(guess)
if... | 25.517241 | 108 | 0.610811 |
d300d46d1d685bf1abb38c0591f5fd485178d760 | 889 | py | Python | checks/load_favicons.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 19 | 2018-04-20T11:03:41.000Z | 2022-01-12T20:58:56.000Z | checks/load_favicons.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 160 | 2018-04-05T16:12:59.000Z | 2022-03-01T13:01:27.000Z | checks/load_favicons.py | thegreenwebfoundation/green-spider | 68f22886178bbe5b476a4591a6812ee25cb5651b | [
"Apache-2.0"
] | 8 | 2018-11-05T13:07:57.000Z | 2021-06-11T11:46:43.000Z | """
Loads /favicon if no icon has been found otherwise
"""
import logging
from time import mktime
from datetime import datetime
from urllib.parse import urlparse
import requests
from checks.abstract_checker import AbstractChecker
class Checker(AbstractChecker):
def __init__(self, config, previous_results=None):... | 24.694444 | 74 | 0.619798 |
6cbdcbcc417237393d3cc719fdc6f83c2ad9282d | 1,143 | py | Python | software/supervisor/reporter.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | software/supervisor/reporter.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | null | null | null | software/supervisor/reporter.py | ghsecuritylab/project-powerline | 6c0ec13bbfc11c3790c506f644db4fe45021440a | [
"MIT"
] | 1 | 2020-03-08T01:50:58.000Z | 2020-03-08T01:50:58.000Z | # todo imports
# todo GUI ankicken um Meldung auf Display darstellen
# todo Relaiskontakt auslösen
# todo SMS-Nachricht auslösen
import threading
import socket
import json
class Reporter(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
TCP_IP = '127.0.0.1'
TCP_PORT... | 24.847826 | 71 | 0.590551 |
9f93ee5511627f9569026a306c9bf3e16aef4938 | 105 | py | Python | runners/great_expectations/tests/test_main.py | omio-labs/richterin | c4165fe4910a556f5bba3c7224fed6d35c3fea57 | [
"MIT"
] | null | null | null | runners/great_expectations/tests/test_main.py | omio-labs/richterin | c4165fe4910a556f5bba3c7224fed6d35c3fea57 | [
"MIT"
] | null | null | null | runners/great_expectations/tests/test_main.py | omio-labs/richterin | c4165fe4910a556f5bba3c7224fed6d35c3fea57 | [
"MIT"
] | null | null | null | from main import validate
def test_validate_always_returns_true():
assert validate("A Dataset") == True | 26.25 | 40 | 0.8 |
4cfb7e15a99fc28afd80c70f1595e1a8dd5bfa10 | 4,212 | py | Python | src/workflows/testdask/testdask.py | ska-telescope/sdp-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 2 | 2019-07-15T09:49:34.000Z | 2019-10-14T16:04:17.000Z | src/workflows/testdask/testdask.py | ska-telescope/sdp-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 17 | 2019-07-15T14:51:50.000Z | 2021-06-02T00:29:43.000Z | src/workflows/testdask/testdask.py | ska-telescope/sdp-configuration-prototype | 8c6cbda04a83b0e16987019406ed6ec7e1058a31 | [
"BSD-3-Clause"
] | 1 | 2019-10-10T08:16:48.000Z | 2019-10-10T08:16:48.000Z | """
Example Dask workflow
"""
# pylint: disable=C0103
import os
import logging
import ska_sdp_config
import distributed
import sys
# Initialise logging
logging.basicConfig()
log = logging.getLogger('testdask')
log.setLevel(logging.INFO)
# Obtain connection to configuration database. This is the main way to
# both o... | 36.310345 | 74 | 0.653134 |
e233c27e2d5a81ffd454bdf09939b73b527abc29 | 2,774 | py | Python | Utils/py/TeamCommGenerator/utils/CommandParser.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/TeamCommGenerator/utils/CommandParser.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/TeamCommGenerator/utils/CommandParser.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import cmd
import json
class CommandParser(cmd.Cmd):
intro = 'TeamComm message generator.\n------------------------------\nType help or ? to list commands and use »tab« for completion.\n'
prompt = '>>> '
def __init__(self, tcg):
super(CommandParser, self).__init__()
self.thread = tcg
... | 37.486486 | 138 | 0.597693 |
1a9219b3f35e4f5ed1d438ad7b877bad41b82e24 | 315 | py | Python | exercises/zh/solution_01_08_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/solution_01_08_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/solution_01_08_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("zh_core_web_sm")
text = "写入历史了:苹果是美国第一家市值超过一万亿美元的上市公司。"
# 处理文本
doc = nlp(text)
for token in doc:
# 获取词符文本、词性标注及依存关系标签
token_text = token.text
token_pos = token.pos_
token_dep = token.dep_
# 规范化打印的格式
print(f"{token_text:<12}{token_pos:<10}{token_dep:<10}")
| 18.529412 | 60 | 0.68254 |
1ab6d3321169c34e420039b2ad0cdae2d2e495e6 | 688 | py | Python | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_soma.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_soma.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_soma.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício Processa Números
# --------------------------
# Classe responsável por calcular a soma dos números de uma lista.
from view.paineis.painel_abstrato import PainelAbstrato
from model.processa_numeros import soma as soma_numeros
class PainelSoma(Painel... | 29.913043 | 66 | 0.609012 |
37866e2c26907e0b4bff69df1befb7b528454e2c | 64 | py | Python | dcapy/wiener/__init__.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | 4 | 2021-05-21T13:26:10.000Z | 2021-11-15T17:17:01.000Z | dcapy/wiener/__init__.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | dcapy/wiener/__init__.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | from .brownian import Brownian, MeanReversion, GeometricBrownian | 64 | 64 | 0.875 |
80bd161107c46caae0acf45f1e4412fa93166fd8 | 1,208 | py | Python | volley/config.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | volley/config.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | volley/config.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | # Copyright (c) Shipt, Inc.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import importlib
from pathlib import Path
from typing import Any, Dict, Union
from yaml import Loader, load
GLOBALS = Path(__file__).parent.resolve().joinpath("globa... | 27.454545 | 65 | 0.679636 |
03bc4a9e6ed53535998465604f4ccb750278ffec | 16,563 | py | Python | Packs/IdentityRecordedFuture/Integrations/IdentityRecordedFuture/IdentityRecordedFuture.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | Packs/IdentityRecordedFuture/Integrations/IdentityRecordedFuture/IdentityRecordedFuture.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 60 | 2022-02-24T14:54:47.000Z | 2022-03-31T10:38:41.000Z | Packs/IdentityRecordedFuture/Integrations/IdentityRecordedFuture/IdentityRecordedFuture.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | null | null | null | """Recorded Future Identity Integration for Demisto."""
from typing import Dict, Any, List, Union, Optional
import requests
import json
import re
import dateparser
# flake8: noqa: F402,F405 lgtm
import demistomock as demisto
from CommonServerPython import *
STATUS_TO_RETRY = [500, 501, 502, 503, 504]
LIMIT_IDENTITIES... | 38.880282 | 108 | 0.4952 |
20d347c97045bd3b02940b7f71a327cfa6ff65ea | 4,670 | py | Python | Streaming.py | Aquaware/RakutenRSS | 5072412d18b7d24a38a059915753d844f7931f15 | [
"MIT"
] | null | null | null | Streaming.py | Aquaware/RakutenRSS | 5072412d18b7d24a38a059915753d844f7931f15 | [
"MIT"
] | null | null | null | Streaming.py | Aquaware/RakutenRSS | 5072412d18b7d24a38a059915753d844f7931f15 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pandas as pd
#from lib.ddeclient import DDEClient
from datetime import datetime, timedelta
import time
from RakutenRSS import RakutenRSS, optionCode
from PriceDatabase import PriceDatabase, TickTable
from TickBuffer import TickBuffer
NK225F = 'N225.FUT01.OS'
TABLE_NAME = 'NK225F'
class ... | 27.151163 | 72 | 0.51606 |
20e70423b1eb29787f03e1c4ec6a5876c7e5e8b7 | 315 | py | Python | python/en/archive/dropbox/miscellaneous_python_files/python-class-ex04-simple example for class.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/python-class-ex04-simple example for class.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/python-class-ex04-simple example for class.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # 점프 투 파이썬, 박응용, 이지스 퍼블리싱
# 05-1. 파이썬 프로그래밍의 핵심, 클래스
# 이야기 형식으로 클래스 기초 쌓기
# pp.177-179
class Service:
# 클래스 변수
secret = "오늘 영화 보헤미안 랩소디를 보러간다."
# 클래스 함수
def sum( self, a, b ):
result = a + b
print( "%s + %s = %s" % (a,b,result))
pey = Service()
print( pey.secret )
pey.sum(1, 1) | 19.6875 | 40 | 0.530159 |
45ca39a78e4061f7af7c606b4ab0964f190406fe | 5,755 | py | Python | project/api/place/resources.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | project/api/place/resources.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | 35 | 2022-01-24T22:15:59.000Z | 2022-03-31T15:01:35.000Z | project/api/place/resources.py | DanielGrams/cityservice | c487c34b5ba6541dcb441fe903ab2012c2256893 | [
"MIT"
] | null | null | null | from flask import make_response
from flask_apispec import doc, marshal_with, use_kwargs
from project import db
from project.api import add_api_resource
from project.api.news_item.schemas import (
NewsItemListRequestSchema,
NewsItemListResponseSchema,
)
from project.api.place.schemas import (
PlaceIdSchema,... | 29.362245 | 85 | 0.676455 |
2fbe8e351e5a77de1798c529b0c7be4f87a2b46e | 760 | py | Python | minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | minimum-absolute-difference-in-bst/minimum-absolute-difference-in-bst.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def getMinimumDifference(self, root: Optional[TreeNode]) -> int:
output =[]
stack=[root]
... | 31.666667 | 68 | 0.525 |
448cea8a0e74cc6bb89b9d9f8f4408875b3153ac | 604 | py | Python | generator/setup.py | pratik-ingle/asprilo | 597854307d3e87e71942294b6cdf7cc10185f4a9 | [
"MIT"
] | 29 | 2017-06-21T19:29:07.000Z | 2022-02-17T12:26:24.000Z | generator/setup.py | pratik-ingle/asprilo | 597854307d3e87e71942294b6cdf7cc10185f4a9 | [
"MIT"
] | 34 | 2017-06-26T14:31:02.000Z | 2022-02-03T16:40:41.000Z | generator/setup.py | pratik-ingle/asprilo | 597854307d3e87e71942294b6cdf7cc10185f4a9 | [
"MIT"
] | 22 | 2017-06-29T11:08:42.000Z | 2022-02-03T16:16:49.000Z | #!/usr/bin/env python
from setuptools import setup, find_packages
from generator import release
setup(name='generator',
version=release.__version__,
description='Asprilo generator package',
author='Philipp Obermeier, Thomas Otto',
url='https://github.com/potassco/asprilo/tree/develop/generato... | 31.789474 | 74 | 0.650662 |
a6077552bd54093467afc166dcff3c908749a26d | 510 | py | Python | Webpage/member/migrations/0002_profile_sailorid.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | Webpage/member/migrations/0002_profile_sailorid.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | 46 | 2022-01-08T12:03:24.000Z | 2022-03-30T08:51:05.000Z | Webpage/member/migrations/0002_profile_sailorid.py | ASV-Aachen/Website | bbfc02d71dde67fdf89a4b819b795a73435da7cf | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.10 on 2022-01-10 08:30
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('cruises', '0001_initial'),
('member', '0001_initial'),
]
operations = [
migrations.AddField(
... | 24.285714 | 114 | 0.62549 |
a6e52ae39ad4ca403f95159e047ee52895a5e940 | 3,137 | py | Python | Projects/Adventure/game.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | Projects/Adventure/game.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | Projects/Adventure/game.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
instructions = """
Welcome young time traveller!
###################(((((((#(((((((((((//////////////////////////(((////////////(((((################
####################(((((((((((((((((((((((///////////////////(((///////***////((((((##(######((((((
(((((((((((((((((((#(((((////(((((((((((((((... | 54.086207 | 100 | 0.160982 |
5b27ed19e261c47694b44c78553bd5a8a034a196 | 382 | py | Python | setup.py | colormotor/sandbox | b0f86c33fc3e27e87009508de93e79e14bb6241d | [
"MIT"
] | 2 | 2019-01-23T19:39:17.000Z | 2020-10-26T11:55:44.000Z | setup.py | colormotor/sandbox | b0f86c33fc3e27e87009508de93e79e14bb6241d | [
"MIT"
] | null | null | null | setup.py | colormotor/sandbox | b0f86c33fc3e27e87009508de93e79e14bb6241d | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import sys
setup(name='sandbox',
version='0.1',
description='Colormotor sandbox utilities',
url='',
author='Daniel Berio',
author_email='drand48@gmail.com',
license='MIT',
packages=find_packages(),
install_requi... | 27.285714 | 58 | 0.617801 |
5be3b1b80d8a951367358ec9886d73f10cfaefb5 | 1,646 | py | Python | 2020-09-04-1158-gma_filialleiter.py | gmaubach/OOP-with-Python | 9b059e911d55d616e756324564f1f2cc524aa53d | [
"MIT"
] | null | null | null | 2020-09-04-1158-gma_filialleiter.py | gmaubach/OOP-with-Python | 9b059e911d55d616e756324564f1f2cc524aa53d | [
"MIT"
] | null | null | null | 2020-09-04-1158-gma_filialleiter.py | gmaubach/OOP-with-Python | 9b059e911d55d616e756324564f1f2cc524aa53d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
os.chdir("D:\Selfcoding\WillmsBis040920\scara64anaconda\Klassen")
from angestellter import *
"""
Schreiben Sie ein von "Angestellter" abgeleitete Klasse
"Filialleiter", deren Objekte zusätzlich noch Weihnachtsgeld
bekommen. Ein Filialleiter iste ein Angebstellter mit
zusä... | 32.92 | 80 | 0.669502 |
5be5fb7430c94c519b87df46805c8f93215fa919 | 332 | py | Python | IVTp/2014/Shcherbakov_R_A/task_02_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Shcherbakov_R_A/task_02_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Shcherbakov_R_A/task_02_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 22.
# Напишите программу, которая будет выводить на экран наиболее понравившееся
# вам высказывание, автором которого является Демокрит. Не забудьте о том, что
# автор должен быть упомянут на отдельной строке.
# Щербаков Р.А.
# 22.05.2016
input("Истина в глубине.\n\nДемокрит\n\n\nНажмите Enter для... | 33.2 | 78 | 0.768072 |
f3b08bd0929f37a7c9a234559726f3ebfd22a85c | 3,263 | py | Python | official/nlp/q8bert/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-07-03T06:52:20.000Z | 2021-07-03T06:52:20.000Z | official/nlp/q8bert/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/nlp/q8bert/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.283951 | 112 | 0.71376 |
343948e83f614a83f105d35e99d4662c2516c4b4 | 328 | py | Python | Scripts/binary_recursive.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 8 | 2020-10-26T06:51:06.000Z | 2021-04-02T13:01:27.000Z | Scripts/binary_recursive.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 71 | 2020-10-25T22:46:02.000Z | 2021-10-14T06:47:39.000Z | Scripts/binary_recursive.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 77 | 2020-10-24T01:53:46.000Z | 2021-10-01T06:25:27.000Z | # print out all possible binary numbers given
# length l
# oh god please don't judge my code
def binary(length, current):
if len(current) == length:
print(current)
return
else:
binary(length, current + "0")
binary(length, current + "1")
l = int(input("Enter length: "))
binary... | 19.294118 | 45 | 0.606707 |
1703115d646f8e443c63911cc6d93894a9b683e6 | 6,803 | py | Python | frappe-bench/env/lib/python2.7/site-packages/github/tests/Exceptions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/github/tests/Exceptions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/env/lib/python2.7/site-packages/github/tests/Exceptions.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | 46.59589 | 153 | 0.517566 |
ca891b2be109a61f55f25f0a3e2742114289db8a | 5,801 | py | Python | abfahrt/Linelist.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | 1 | 2022-01-30T14:30:02.000Z | 2022-01-30T14:30:02.000Z | abfahrt/Linelist.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | abfahrt/Linelist.py | Team-Zugig-zum-Erfolg/InformatiCup | 788076ac38bf6d8f462465b7fb96db14d13bed30 | [
"MIT"
] | null | null | null | """
This is Linelist for managing the lines
"""
from typing import List
# This module provides runtime support for type hints. The most fundamental support consists of the types Any, Union, Callable, TypeVar, and Generic. For a full specification, please see PEP 484. For a simplified introduction to type hints, see... | 39.462585 | 301 | 0.596794 |
b678a8d5c56ee361c2c7bfc5c84f21a59c566aab | 3,086 | py | Python | analysis/pca.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | 1 | 2018-08-31T07:16:40.000Z | 2018-08-31T07:16:40.000Z | analysis/pca.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | null | null | null | analysis/pca.py | yashpatel5400/anonychain | 921804832839f3639477cfc441f138bc2f5ad685 | [
"MIT"
] | 1 | 2018-07-01T18:03:01.000Z | 2018-07-01T18:03:01.000Z | """
__author__ = Yash Patel
__name__ = pca.py
__description__ = Functions to plot PCA results (for 2, 3 dimensions)
"""
from sklearn.decomposition import PCA
import networkx as nx
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
# import plotly
# from plotly.... | 32.145833 | 88 | 0.594621 |
fce8cab88edade92cd818b2eff07ea840d8ed5ce | 76 | py | Python | sentinel/helpers/__init__.py | allagog0x01/sentwg | 52285ecf2b03c30a78901a29a7af96c8ab5764c8 | [
"Apache-2.0"
] | 342 | 2017-08-21T20:12:56.000Z | 2022-03-19T17:58:25.000Z | sentinel/helpers/__init__.py | allagog0x01/sentwg | 52285ecf2b03c30a78901a29a7af96c8ab5764c8 | [
"Apache-2.0"
] | 57 | 2017-11-13T11:16:47.000Z | 2022-03-01T13:54:31.000Z | vpn-node-cosmos/sentinel/helpers/__init__.py | smtcrms/sentinel | ff65bc9200f6c940aa184c0ec0872fdcfef25363 | [
"MIT"
] | 72 | 2017-11-23T05:13:24.000Z | 2022-02-25T14:18:33.000Z | from .session import end_session
from .session import update_session_status
| 25.333333 | 42 | 0.868421 |
bfa7f0235f1b2d1c91fd4f5073433dae8a759d51 | 13,277 | py | Python | train.py | saliAlavi/SegAN | 2b1ec5003e523a883ea9ae123765da1a529676f9 | [
"MIT"
] | 1 | 2022-01-17T18:08:01.000Z | 2022-01-17T18:08:01.000Z | train.py | saliAlavi/SegAN | 2b1ec5003e523a883ea9ae123765da1a529676f9 | [
"MIT"
] | null | null | null | train.py | saliAlavi/SegAN | 2b1ec5003e523a883ea9ae123765da1a529676f9 | [
"MIT"
] | 2 | 2020-07-31T07:15:40.000Z | 2022-02-27T11:09:12.000Z | from model import *
from create_dataloader import *
import torch.optim as optim
from utils import *
from torch.utils.tensorboard import SummaryWriter
from tqdm import tqdm
from loss import *
if __name__ == "__main__":
args = None
dl_BraT_train = None
dl_BraT_val = None
d_in = 3
d_out = 1
learn... | 44.553691 | 150 | 0.60006 |
ecb6e59f4db06638611e1436547ee87254e581aa | 261 | py | Python | python/type_checking/headlines.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/type_checking/headlines.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/type_checking/headlines.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | def headline(text: str, align: bool = True) -> str:
if align:
return f"{text.title()}\n{'-' * len(text)}"
else:
return f" {text.title()} ".center(50, "o")
print(headline("python type checking"))
print(headline("use mypy", align=True))
| 26.1 | 51 | 0.590038 |
f925e2d31e9b3965f0617e9dcc93811dc4e91be1 | 1,390 | py | Python | 8_DeepLearning-Autoencoder/Autoencoder.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 8_DeepLearning-Autoencoder/Autoencoder.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 8_DeepLearning-Autoencoder/Autoencoder.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | '''
Autoencoder - Decoding -> Encoding wobei das Bild "runtergebrochen/komprimiert" wird
auf seine wichtigen Features zur Darstellung - ähnlich PCA Dimensionsreduktion
'''
import matplotlib.pyplot as plt
from tensorflow.keras.layers import *
from tensorflow.keras.models import *
from tensorflow.keras.optimizers impor... | 29.574468 | 94 | 0.738129 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.