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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f5b9b53d84e9b9a8414f396e64da86efca250abf | 297 | py | Python | AP_SS16/402/python/old/live-berechnungen.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 3 | 2016-04-27T17:07:00.000Z | 2022-02-02T15:43:15.000Z | AP_SS16/402/python/old/live-berechnungen.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 5 | 2016-04-27T17:10:03.000Z | 2017-06-20T14:54:20.000Z | AP_SS16/402/python/old/live-berechnungen.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | null | null | null | import numpy as np
L = 1.75e-3
C = 22e-9
C2 = 9.4e-9
Eigenfreq = 5058
def Z(omega):
return np.sqrt(L / C) * 1 / np.sqrt(1 - 1 / 4 * omega**2 * L * C)
def Z_C1C2():
return np.sqrt(2 * L / (C + C2))
print("Z(0)=", Z(0))
print("Z_C1C2=", Z_C1C2())
print("Z(Eigenfreq)=", Z(Eigenfreq))
| 14.85 | 69 | 0.548822 |
eb44ba37ba95b815f33ff52f1131958585f86735 | 8,755 | py | Python | test/test_npu/test_network_ops/test_bitwise_and.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_bitwise_and.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_bitwise_and.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 42.707317 | 88 | 0.631411 |
eb45545b5d8d6506fd74da11f004c1a9b2350bee | 392 | py | Python | 412-fizz-buzz/412-fizz-buzz.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | 2 | 2021-12-05T14:29:06.000Z | 2022-01-01T05:46:13.000Z | 412-fizz-buzz/412-fizz-buzz.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | 412-fizz-buzz/412-fizz-buzz.py | hyeseonko/LeetCode | 48dfc93f1638e13041d8ce1420517a886abbdc77 | [
"MIT"
] | null | null | null | class Solution:
def fizzBuzz(self, n: int) -> List[str]:
output = []
for num in range(1, n+1):
if num%15==0:
output.append("FizzBuzz")
elif num%5==0:
output.append("Buzz")
elif num%3==0:
output.append("Fizz")
... | 30.153846 | 44 | 0.441327 |
a0322f24ea3a537b54ebc488129591599ae82d7c | 1,621 | py | Python | test-python/test_noten.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | test-python/test_noten.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | test-python/test_noten.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | """ Teste note.py"""
import unittest
import tempfile
import bewerte.note as note
class Testschriftlich(unittest.TestCase):
""" Teste die Funktionen schriftlich.mittelwert """
def test_read_config_file(self):
""" Teste die Instanz read_config_files """
# Erstelle 3 configfiles
with te... | 39.536585 | 80 | 0.529303 |
f81630bfffbe98088706cb23fad6fedbdd73b205 | 10,592 | py | Python | quant/brokers/_bithumb.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 7 | 2017-10-22T15:00:09.000Z | 2019-09-19T11:45:43.000Z | quant/brokers/_bithumb.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 1 | 2018-01-19T16:19:40.000Z | 2018-01-19T16:19:40.000Z | quant/brokers/_bithumb.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 5 | 2017-12-11T15:10:29.000Z | 2018-12-21T17:40:58.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from __future__ import division
import logging
from quant import config
from quant.common import constant
from .broker import Broker
from quant.api.bithumb import PrivateClient as BtbClient
class Bithumb(Broker):
"""
cancel_all方法未实现,因为在observer里保存订单id和type,更容易实... | 34.167742 | 140 | 0.545128 |
fff58b5d153023c8cdf5dc48ef1e086e78ca784a | 938 | py | Python | Packs/CommonScripts/Scripts/CalculateTimeDifference/CalculateTimeDifference.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/CalculateTimeDifference/CalculateTimeDifference.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/CalculateTimeDifference/CalculateTimeDifference.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 *
from CommonServerUserPython import *
start_time = demisto.args()['start_time'].replace('"', '')
end_time = demisto.args()['end_time'].replace('"', '')
try:
# Strip microseconds and convert to datetime object
start_time_obj = datetime.strptime(star... | 33.5 | 97 | 0.671642 |
29eb90c669b83f3689bb369cdab435ba91e0a022 | 702 | py | Python | day26/exercise_list.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day26/exercise_list.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day26/exercise_list.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | #Exercise 1
numbers = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
# 🚨 Do Not Change the code above 👆
#Write your 1 line code 👇 below:
squared_numbers = [num**2 for num in numbers]
#Write your code 👆 above:
print(squared_numbers)
#Exercise 2
numbers = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55]
# 🚨 Do Not Change the code abov... | 17.121951 | 60 | 0.652422 |
d9ee9fcaabbb8fab3f9e73089e425cd35e255271 | 1,799 | py | Python | pocketthrone/entities/player.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | 4 | 2016-06-05T16:48:04.000Z | 2020-03-23T20:06:06.000Z | pocketthrone/entities/player.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | pocketthrone/entities/player.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | from pocketthrone.entities.notification import Notification
from pocketthrone.entities.fraction import Fraction
class Player(object):
def __init__(self):
# engine properties
self.num = -1
# static player properties
self.name = "Anonymous"
self.color = (255, 0, 0)
self._fraction_name = None
self.fraction... | 26.455882 | 133 | 0.710951 |
8a7cc59fdcbf9b5c4b36652b328cae90e74a495d | 12,687 | py | Python | Packs/CommonScripts/Scripts/AddKeyToList/AddKeyToList_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/AddKeyToList/AddKeyToList_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/AddKeyToList/AddKeyToList_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from AddKeyToList import add_key_to_list_command
import demistomock as demisto # noqa # pylint: disable=unused-wildcard-import
from typing import List, Dict, Any
import json
MOCK_LIST_NAME = "TestList"
MOCK_KEY_NAME = "TestKey"
MOCK_VALUE = "TestValue"
def test_add_new_key_in_empty_list(mocker):
"""
Given:
... | 36.66763 | 127 | 0.648617 |
0a017568207072b6ebd93da9b4785be4ff031fe4 | 2,283 | py | Python | justCTF/2021/pwn/PainterHell/web/icypis/settings.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | justCTF/2021/pwn/PainterHell/web/icypis/settings.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | justCTF/2021/pwn/PainterHell/web/icypis/settings.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | import os
import sys
BASE_DIR = os.path.abspath(os.path.join(os.path.abspath(os.path.dirname(__file__)), '..'))
SECRET_KEY = '@^77ppr3^qy@9r-ym^$(mvpj+=p!7ki3+2bt&32kgt-15a)(_@'
DEBUG = False
ALLOWED_HOSTS = [
'app'
]
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.c... | 22.60396 | 96 | 0.605344 |
6ad4df38a8c7425476bffef4d5007f9d95b6b862 | 3,705 | py | Python | INBa/2015/Sarocvashin_M/task_13_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Sarocvashin_M/task_13_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Sarocvashin_M/task_13_23.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 13. Вариант 23.
# 1-50. Разработайте собственную стратегию ходов компьютера для игры "Крестики-нолики" (Задача 12). Перепишите функцию computer_move() в соответствии с этой стратегией.
# Сароквашин Максим
# 29.05.2016
def display_instruct():
print("""
Добро пожаловать в игру "Крестики-Нолики!"
Сегодня К... | 26.091549 | 168 | 0.672335 |
6ae408e809e96c995c095809bb52063207cf5c23 | 12,756 | py | Python | examples/text_generation/ernie-gen/decode.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_generation/ernie-gen/decode.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_generation/ernie-gen/decode.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 38.191617 | 80 | 0.540922 |
0ae2e1a9f1e171852592827da97a4ef1c9682b45 | 1,726 | py | Python | official/audio/melgan/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/audio/melgan/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/audio/melgan/export.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... | 43.15 | 104 | 0.710892 |
e4088d82dda33134e5f3a4892c2699f48521dcf7 | 755 | py | Python | setsolver/properties.py | vidagy/setsolver | 1d69dc33768ddb5b2110b6321106947de87cb7ac | [
"Apache-2.0"
] | null | null | null | setsolver/properties.py | vidagy/setsolver | 1d69dc33768ddb5b2110b6321106947de87cb7ac | [
"Apache-2.0"
] | null | null | null | setsolver/properties.py | vidagy/setsolver | 1d69dc33768ddb5b2110b6321106947de87cb7ac | [
"Apache-2.0"
] | null | null | null | from enum import Enum
class Fill(str, Enum):
"""
Filling of a Card.
"""
EMPTY = "empty"
STRIPED = "striped"
FULL = "full"
def __repr__(self) -> str:
return str(self.value)
class Count(str, Enum):
"""
Count of a Card.
"""
ONE = "1"
TWO = "2"
THREE = "3"
... | 13.981481 | 30 | 0.507285 |
7c23e290e4557483d2a95c60415c9abad1d993d1 | 363 | py | Python | src/bo4e/enum/zaehlerauspraegung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/zaehlerauspraegung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/zaehlerauspraegung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint:disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Zaehlerauspraegung(StrEnum):
"""
Gibt an, ob es sich um einen Einrichtungs- oder Zweirichtungszähler handelt.
"""
EINRICHTUNGSZAEHLER = "EINRICHTUNGSZAEHLER" #: Einrichtungszaehler
ZWEIRICHTUNGSZAEHLER = "ZWEI... | 27.923077 | 80 | 0.763085 |
7c7735347a4cdce79d3b0f511a3739dd119a9448 | 1,417 | py | Python | INBa/2014/Mamedov_R_A/Mamedov 9_12.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/Mamedov_R_A/Mamedov 9_12.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/Mamedov_R_A/Mamedov 9_12.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 9, Вариант 12
# Создайте игру, в которой компьютер выбирает какое-либо слово, а игрок должен его отгадать.
# Компьютер сообщает игроку, сколько букв в слове, и дает пять попыток узнать, есть ли какая-либо
# буква в слове, причем программа может отвечать только "Да" и "Нет". Вслед за тем игрок должен попроб... | 30.804348 | 123 | 0.622442 |
7c7aaf9f334a433fcf6820599c9265d7fb40a258 | 516 | py | Python | solution/backtracking/15656/main.py | gkgg123/baekjoon | 4ff8a1238a5809e4958258b5f2eeab7b22105ce9 | [
"MIT"
] | 2,236 | 2019-08-05T00:36:59.000Z | 2022-03-31T16:03:53.000Z | solution/backtracking/15656/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 225 | 2020-12-17T10:20:45.000Z | 2022-01-05T17:44:16.000Z | solution/backtracking/15656/main.py | juy4556/baekjoon | bc0b0a0ebaa45a5bbd32751f84c458a9cfdd9f92 | [
"MIT"
] | 602 | 2019-08-05T00:46:25.000Z | 2022-03-31T13:38:23.000Z | # Authored by : tony9402
# Co-authored by : -
# Link : http://boj.kr/dd28c9dd06a54efeb12b4f72e82e8c77
import sys
def input():
return sys.stdin.readline().strip()
N, M = map(int, input().split())
arr = sorted(list(map(int, input().split())))
choose = [ 0 for _ in range(10) ]
def dfs(cnt):
global N, M
if ... | 19.846154 | 55 | 0.562016 |
6b41540d9df5ab12323c56cc3ac0adf61b9e4995 | 283 | py | Python | Curso-Em-Video-Python/2Exercicios/011_Pintando_Parede.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/011_Pintando_Parede.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/011_Pintando_Parede.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | larg = float(input('largura da parede: '))
alt= float(input('Altura da parede: '))
area = larg* alt
tinta = area/2
print('Sua parede tem a dimenção de {} x {} e sua área é de {}'.format(larg, alt, area))
print('Para pintar essa parede, você precisará de {} L de tinta'.format(tinta)) | 47.166667 | 88 | 0.681979 |
6af46ac8459c87e881a7cd396e7c73946ab633d9 | 3,142 | py | Python | extraction/links_in_context/manage_encoding.py | dbmdz/webarchiv-dh-bestandsausbau | 98c271a09cdb026d1d58133f49dcb3e1c9fcf9b6 | [
"MIT"
] | null | null | null | extraction/links_in_context/manage_encoding.py | dbmdz/webarchiv-dh-bestandsausbau | 98c271a09cdb026d1d58133f49dcb3e1c9fcf9b6 | [
"MIT"
] | null | null | null | extraction/links_in_context/manage_encoding.py | dbmdz/webarchiv-dh-bestandsausbau | 98c271a09cdb026d1d58133f49dcb3e1c9fcf9b6 | [
"MIT"
] | null | null | null | import codecs
from typing import Dict
from bs4 import BeautifulSoup, SoupStrainer
from pyspark.sql.functions import udf
from pyspark.sql.types import StringType, BooleanType
def parse_headers(response: str) -> Dict:
lines = response.split("\n")
headers = {}
for line in lines[1:]:
try:
... | 31.737374 | 94 | 0.653724 |
ed164aedd6b4db58622844e44151112e65c5ff99 | 2,143 | py | Python | 2018/finals/pwn-mojo/exploit/server.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/finals/pwn-mojo/exploit/server.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/finals/pwn-mojo/exploit/server.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #! /usr/bin/python
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 29.763889 | 74 | 0.697154 |
13371951f8bdd2c1301d5c27fcc8e9ec61419a42 | 5,843 | py | Python | .github/scripts/generate_pytorch_test_matrix.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 5 | 2018-04-24T13:41:12.000Z | 2019-07-09T07:32:09.000Z | .github/scripts/generate_pytorch_test_matrix.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | .github/scripts/generate_pytorch_test_matrix.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 7 | 2020-08-31T22:49:59.000Z | 2020-09-15T14:29:07.000Z | #!/usr/bin/env python3
"""Generates a matrix to be utilized through github actions
Will output a matrix to represent our testing configurations, which is currently
dictated by just sharding.
"""
import json
import os
import re
from typing import Dict
from typing_extensions import TypedDict
BUILD_ENVIRONMENT = os... | 43.281481 | 107 | 0.669006 |
6a06709579ee8edf6fe6ee965d0ca950485cc1b5 | 1,785 | py | Python | src/onegov/election_day/theme/election_day_theme.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/theme/election_day_theme.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/theme/election_day_theme.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.foundation import BaseTheme
from onegov.core.utils import module_path
class ElectionDayTheme(BaseTheme):
name = 'onegov.election_day.foundation'
@property
def post_imports(self):
return [
'election_day'
]
@property
def default_options(self):
# Leav... | 35 | 75 | 0.580392 |
6a33aa382518605a96a5027bc18818f00d0c75fc | 774 | py | Python | src/python3_learn_video/recursion.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/recursion.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/python3_learn_video/recursion.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | def recursion():
return recursion()
import sys
# 设置递归层数
sys.setrecursionlimit(10)
"""
递归求阶乘:
——写一个求阶乘的函数
——正整数阶乘指从1乘以2乘以3乘以4一直乘到所要求的数
——例如所给的数是5,则阶乘式是1*2*3*4*5,得到的积是120,所以120就是4的阶乘
print('---------------------------------------------')
def factorial(n):
result = n
for i in range(1,... | 18.878049 | 54 | 0.498708 |
e01ac780cc4ab589865bf559ad1334d237c407b0 | 6,066 | py | Python | Packs/ServiceNow/Scripts/ServiceNowCreateIncident/ServiceNowCreateIncident.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ServiceNow/Scripts/ServiceNowCreateIncident/ServiceNowCreateIncident.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ServiceNow/Scripts/ServiceNowCreateIncident/ServiceNowCreateIncident.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
"""
This script is used to wrap the generic create-record command in ServiceNow.
You can add fields that you want to create the record with as script arguments or in the
code and work with the records easily.
Mandatory fields in your ServiceNow table settings should be changed to be ... | 31.926316 | 110 | 0.661062 |
160645f2a6cf83e1f3d9d362afc6afcc3a76e34d | 746 | py | Python | Queues/MovingAverage.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Queues/MovingAverage.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | null | null | null | Queues/MovingAverage.py | dileeppandey/hello-interview | 78f6cf4e2da4106fd07f4bd86247026396075c69 | [
"MIT"
] | 1 | 2020-02-12T16:57:46.000Z | 2020-02-12T16:57:46.000Z | """
https://leetcode.com/problems/moving-average-from-data-stream/
Given a stream of integers and a window size, calculate the moving average of
all integers in the sliding window.
"""
from collections import deque
class MovingAverage:
def __init__(self, size):
"""
Initialize your data structur... | 25.724138 | 78 | 0.605898 |
16b1f5d1d78cf9f503d8c3e24707c183a17af123 | 2,667 | py | Python | dash/migrations/0010_auto_20210331_1451.py | bdioui/DashboardFeder | 455737c828f1c04651af495f60d6637131b911f5 | [
"MIT"
] | null | null | null | dash/migrations/0010_auto_20210331_1451.py | bdioui/DashboardFeder | 455737c828f1c04651af495f60d6637131b911f5 | [
"MIT"
] | null | null | null | dash/migrations/0010_auto_20210331_1451.py | bdioui/DashboardFeder | 455737c828f1c04651af495f60d6637131b911f5 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-31 14:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('dash', '0009_auto_20210331_1256'),
]
operations = [
migrations.AddField(
model_name='enveloppe',
name='Axe_1',
... | 31.75 | 70 | 0.544807 |
9115d3261ad427085ff1277d2559b9d7ec45aac1 | 6,716 | py | Python | addition_module/HSST/train_dataset.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 1,329 | 2021-01-13T07:06:30.000Z | 2022-03-31T07:23:39.000Z | addition_module/HSST/train_dataset.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | addition_module/HSST/train_dataset.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | """
@author: Hang Du, Jun Wang
@date: 20201101
@contact: jun21wangustc@gmail.com
"""
import os
import random
import cv2
import torch
import numpy as np
from torch.utils.data import Dataset
def transform(image):
""" Transform a image by cv2.
"""
img_size = image.shape[0]
# random crop
... | 39.739645 | 118 | 0.60676 |
911613b7bd7e8990cf3a089356ce8a0c966f557a | 6,002 | py | Python | oneflow/python/framework/unittest.py | caishenghang/oneflow | db239cc9f98e551823bf6ce2d4395bd5c339b1c5 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/framework/unittest.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/framework/unittest.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | 1 | 2021-11-10T07:57:01.000Z | 2021-11-10T07:57:01.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 28.855769 | 88 | 0.69027 |
e6f06f148e09f3e56fb389bf1a52b475a038f604 | 4,656 | py | Python | StateTracing/cdkt.py | junchenfeng/diagnosis_tracing | 4e26e2ad0c7abc547f22774b6c9c299999a152c3 | [
"MIT"
] | null | null | null | StateTracing/cdkt.py | junchenfeng/diagnosis_tracing | 4e26e2ad0c7abc547f22774b6c9c299999a152c3 | [
"MIT"
] | null | null | null | StateTracing/cdkt.py | junchenfeng/diagnosis_tracing | 4e26e2ad0c7abc547f22774b6c9c299999a152c3 | [
"MIT"
] | 1 | 2020-09-08T13:42:16.000Z | 2020-09-08T13:42:16.000Z | # -*- coding: utf-8 -*-
from torch import nn
from torch.nn import functional as F
from torch.nn.utils.rnn import pad_packed_sequence,pack_padded_sequence
from torch import where,ne,cat,no_grad,eq
num_items = 5
hidden_size= 64
width = 6
height = 6
max_num = 7
class CDKT(nn.Module):
def _... | 39.457627 | 108 | 0.540808 |
5d0b35221e2f907d2b869b9bcd8e535686be2b24 | 1,744 | py | Python | set_basisdaten.py | MaliziaGrimm/Lohnvorerfassung-50a-fuer-DATEV | 41b99deacc5bfee6562907de109a8ad5af917d01 | [
"MIT"
] | null | null | null | set_basisdaten.py | MaliziaGrimm/Lohnvorerfassung-50a-fuer-DATEV | 41b99deacc5bfee6562907de109a8ad5af917d01 | [
"MIT"
] | null | null | null | set_basisdaten.py | MaliziaGrimm/Lohnvorerfassung-50a-fuer-DATEV | 41b99deacc5bfee6562907de109a8ad5af917d01 | [
"MIT"
] | null | null | null | import setting
from flask import Flask
from flask import request
#import os, webbrowser, time
from flask import render_template
import setting
def basisdaten(var_beraternummer):
fileziel=open("daten/basisdaten.txt","w")
# schreiben in Datei für Basisdaten
fileziel.write(request.form['form_berat... | 37.106383 | 126 | 0.681193 |
5d73110ab515316ccd6da2103fe0ae5bf0a271ec | 2,887 | py | Python | experiment/exp_voc/test.py | Wangyf46/deeplabv3plus-pytorch | dbbbe88d7774d6e02f7ea13e770ee4278dc528fd | [
"MIT"
] | 2 | 2019-08-03T12:02:12.000Z | 2019-08-03T12:35:46.000Z | experiment/exp_voc/test.py | Wangyf46/deeplabv3plus-pytorch | dbbbe88d7774d6e02f7ea13e770ee4278dc528fd | [
"MIT"
] | null | null | null | experiment/exp_voc/test.py | Wangyf46/deeplabv3plus-pytorch | dbbbe88d7774d6e02f7ea13e770ee4278dc528fd | [
"MIT"
] | null | null | null | # ----------------------------------------
# Written by Yude Wang
# ----------------------------------------
import torch
import torch.nn as nn
import torch.nn.functional as F
import torchvision
import numpy as np
import cv2
import ipdb
import time
from config import cfg
from lib.datasets.generateData import generate... | 30.389474 | 123 | 0.71389 |
07233bf136418d70e6c736221d17699a1f89b49a | 1,329 | py | Python | config/spider_count.py | zhouhongf/spider_news | 6ea4a80d050bf3ab70724f45312c5a2580e714a6 | [
"MIT"
] | 2 | 2021-11-27T06:40:44.000Z | 2022-02-23T11:19:11.000Z | config/spider_count.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | config/spider_count.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | 1 | 2021-12-15T09:11:16.000Z | 2021-12-15T09:11:16.000Z | import time
from datetime import datetime
class SpiderCount:
def __init__(
self,
name: str,
time_start: datetime,
time_end: datetime,
success: int = 0,
failure: int = 0
):
self._name = name
self._time_start = time_start.s... | 25.557692 | 123 | 0.567344 |
db921eaa669902aea0e683ddfd6ec06e9a26814c | 1,608 | py | Python | challenge14/challenge14-bruteforce.py | dobin/yookiterm-challenges-files | 81daab38d83bdc083bd9a66e90eea1397c5e30ed | [
"MIT"
] | 17 | 2017-05-03T22:00:30.000Z | 2021-12-07T10:15:41.000Z | challenge/14/src/challenge14-bruteforce.py | roo7vijos1/exploit-courses | a13c95726d330081ca4db77aa8391dcd4c6fcb00 | [
"MIT"
] | 2 | 2017-06-16T02:09:05.000Z | 2018-03-01T08:58:24.000Z | challenge/14/src/challenge14-bruteforce.py | roo7vijos1/exploit-courses | a13c95726d330081ca4db77aa8391dcd4c6fcb00 | [
"MIT"
] | 11 | 2017-05-04T13:04:21.000Z | 2020-12-15T23:00:02.000Z | #!/usr/bin/python
import sys
import signal
from socket import *
from struct import *
import base64
import time
import string
bfBytes = []
def signal_handler(signal, frame):
print ""
print "Bytes: "
for byte in bfBytes:
sys.stdout.write( hex(byte) + " " )
print ""
sys.exit(0)
signal.signal(signal.SI... | 14.888889 | 47 | 0.621891 |
918bff2490784149a15b8ae7c6a55eeff84b3ad7 | 19,094 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/fortimanager/fmgr_secprof_appctrl.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/fortimanager/fmgr_secprof_appctrl.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/fortimanager/fmgr_secprof_appctrl.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... | 36.648752 | 123 | 0.662093 |
91b5e797f96e8144718cf880c656f9ee22cbbece | 2,197 | py | Python | tests/rbac/common/task/task_helper.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | tests/rbac/common/task/task_helper.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 1 | 2019-07-08T22:32:43.000Z | 2019-07-08T22:32:43.000Z | tests/rbac/common/task/task_helper.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 30.943662 | 82 | 0.677742 |
7268c8b6886abe39b5c215c20dec8049abc227b5 | 2,170 | py | Python | listings/chapter07/linear-regression-gradient-descent-log.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter07/linear-regression-gradient-descent-log.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter07/linear-regression-gradient-descent-log.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | import matplotlib.pyplot as plt
import csv
import numpy as np
from random import random
from sys import argv, exit
if len(argv) < 2:
print(f"Verwendung: python3 {argv[0]} CSV-Datei [p]")
exit(1)
# Daten importieren
filename = argv[1]
data = []
with open(filename, 'r', newline='') as data_file:
reader = cs... | 27.820513 | 73 | 0.618433 |
f44afef3c71c6bb8975805e16bf4c8977982b6e4 | 5,135 | py | Python | STIX/bundle_creator.py | EnjoyFitness92/Praxisseminar-SS2020 | b5baba5d1512a5fad3391efc42f3ab232d79c4e2 | [
"MIT"
] | null | null | null | STIX/bundle_creator.py | EnjoyFitness92/Praxisseminar-SS2020 | b5baba5d1512a5fad3391efc42f3ab232d79c4e2 | [
"MIT"
] | 2 | 2020-06-24T13:01:22.000Z | 2020-06-24T13:10:07.000Z | STIX/bundle_creator.py | EnjoyFitness92/Praxisseminar-SS2020 | b5baba5d1512a5fad3391efc42f3ab232d79c4e2 | [
"MIT"
] | null | null | null | # erstellt ein Bundle eines Stix Vorfalls
from stix2.v21 import (ThreatActor, Identity, Relationship, Bundle, AttackPattern, ExternalReference, Infrastructure, Tool, Vulnerability, IPv4Address, MACAddress, NetworkTraffic)
from json_parser import getCon, getTime
import uuid
import json
# Bekommt den ersten Zeitstempel... | 29.854651 | 291 | 0.715677 |
4a496562a5bd7c12618f846c681cfde4bda0f2fa | 1,820 | py | Python | archives/codelibraries/CompetitiveProgramming-master/preprocess.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | 549 | 2015-02-13T00:46:04.000Z | 2022-03-10T07:35:32.000Z | archives/codelibraries/CompetitiveProgramming-master/preprocess.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | 6 | 2016-12-02T10:51:31.000Z | 2022-02-22T16:47:42.000Z | archives/codelibraries/CompetitiveProgramming-master/preprocess.py | cbarnson/UVa | 0dd73fae656613e28b5aaf5880c5dad529316270 | [
"Unlicense",
"MIT"
] | 143 | 2015-06-14T17:59:20.000Z | 2022-01-07T19:47:49.000Z | import os
import hashlib
import re
MARGIN = 100 - 40 - 8 + 7
def mkhash(dat):
conc = ""
for i in dat:
conc += re.sub('\s*', '', i) + "\n"
yield hashlib.md5(conc.decode('utf8')).hexdigest()[:2]
for path, dirs, files in os.walk('./code'):
for f in files:
if (f.endswith(".cpp") or f... | 30.847458 | 136 | 0.393956 |
4aaef181e41ff753d4f4766866e23510b4efe4ae | 46 | py | Python | python_lessons/Textastic_Files/Python SQLite Tutorial - MtMk/database2.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/Textastic_Files/Python SQLite Tutorial - MtMk/database2.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/Textastic_Files/Python SQLite Tutorial - MtMk/database2.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | import sqlite3
CREATE_TRADE_TABLE = (""" """) | 15.333333 | 30 | 0.673913 |
437a97078ed0c3ddf1a7f742573d5cb3c1f96840 | 5,813 | py | Python | Packs/FreshDesk/Integrations/FreshDesk/FreshDesk_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FreshDesk/Integrations/FreshDesk/FreshDesk_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FreshDesk/Integrations/FreshDesk/FreshDesk_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
import io
import json
MOCK_PARAMS = {
'credentials': {
'identifier': 'TEST',
'password': 'TEST'
},
'url': 'https://MOCK_URL',
}
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
# The uni... | 42.742647 | 111 | 0.677791 |
78f32ae440ec1b31bfa34d6d6c5af042702ab656 | 28,125 | py | Python | Tests/Marketplace/search_and_install_packs.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | null | null | null | Tests/Marketplace/search_and_install_packs.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | 2 | 2021-12-26T07:34:37.000Z | 2021-12-26T07:49:34.000Z | Tests/Marketplace/search_and_install_packs.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | null | null | null | from __future__ import print_function
import os
import ast
import json
import glob
import re
import sys
import demisto_client
from threading import Thread, Lock
from demisto_sdk.commands.common.tools import run_threads_list
from google.cloud.storage import Bucket
from distutils.version import LooseVersion
from typing ... | 44.928115 | 129 | 0.622471 |
60c029e71df67fdf4ed56e3be174ccdee71a2b18 | 1,378 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/topic/topic_helper.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/topic/topic_helper.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/topic/topic_helper.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Dict
from watchmen_auth import PrincipalService
from watchmen_data_kernel.meta import DataSourceService
from watchmen_data_kernel.service import ask_topic_storage
from watchmen_data_kernel.topic_schema import TopicSchema
from watchmen_model.common import DataSourceId
from watchmen_pipeline_kernel.co... | 36.263158 | 86 | 0.83672 |
e0fe7593a1db1995373239d680fe02cd69e0edde | 1,336 | py | Python | oldp/api/__init__.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | 3 | 2020-06-27T08:19:35.000Z | 2020-12-27T17:46:02.000Z | oldp/api/__init__.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | oldp/api/__init__.py | ImgBotApp/oldp | 575dc6f711dde3470d910e21c9440ee9b79a69ed | [
"MIT"
] | null | null | null | from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import routers, permissions
from oldp.api.views import CourtViewSet, CityViewSet, StateViewSet, CountryViewSet, LawViewSet, LawBookViewSet, \
CaseViewSet
# Routers provide an easy way of automatically determining the URL c... | 38.171429 | 117 | 0.74476 |
c74012cee4741f1f9637e469ee3c4d0015840bf5 | 2,160 | py | Python | Packs/CommonScripts/Scripts/GetDomainDNSDetails/GetDomainDNSDetails_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/GetDomainDNSDetails/GetDomainDNSDetails_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/GetDomainDNSDetails/GetDomainDNSDetails_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from GetDomainDNSDetails import make_query, get_domain_dns_details_command
from typing import cast, List, TYPE_CHECKING
import dns.rdatatype
if TYPE_CHECKING:
import dns.resolver
class MockRData:
def __init__(self, name, rdtype, rdclass):
self.rdtype = rdtype
self.rdclass = rdclass
s... | 26.341463 | 120 | 0.618056 |
c787b842392c2f27df9c7d289631f28dbff3e121 | 1,058 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v9_2/rename_translated_domains_in_en.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v9_2/rename_translated_domains_in_en.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v9_2/rename_translated_domains_in_en.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe
from frappe import _
def execute():
language = frappe.get_single("System Settings").language
if language and language.startswith('en'): return
frappe.local.lang = language
all_domains = frappe.get_hooks("domains")
for domain in all_domains:
translated_domain = _(domain, lang=language)
if fra... | 29.388889 | 95 | 0.758979 |
c7b129460d62c38d6c4ab2d525a8039aa3c12658 | 1,147 | pyde | Python | sketches/sonntagsfrage/sonntagsfrage.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/sonntagsfrage/sonntagsfrage.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/sonntagsfrage/sonntagsfrage.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | parteien = ["CDU/CSU", "SPD", u"Grüne", "FDP", "Linke", "AfD", "Sonstige"]
prozente = [34, 32, 7, 5, 8, 9, 5]
farben = [color(0, 0, 0), color(255, 48, 48), color(240, 230, 140),
color(238, 238, 0), color(238, 18, 37),
color(65, 105, 225), color(190, 190, 190)]
titel = "Die Sonntagsfrage"
def setup... | 26.068182 | 74 | 0.519616 |
40ad9a23dadc7fbb2897a14ff3788376127b456a | 4,920 | py | Python | 2018/finals/crypto-hrefin/chall/main.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/finals/crypto-hrefin/chall/main.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/finals/crypto-hrefin/chall/main.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 30.184049 | 120 | 0.694715 |
9073f9b665934fca5dc833b2bde82d0785bcbd62 | 7,668 | py | Python | finbyz_dashboard/finbyz_dashboard/dashboard_overrides/db_query.py | finbyz/finbyz_dashboard | 9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0 | [
"MIT"
] | 1 | 2021-11-19T05:27:11.000Z | 2021-11-19T05:27:11.000Z | finbyz_dashboard/finbyz_dashboard/dashboard_overrides/db_query.py | finbyz/finbyz_dashboard | 9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0 | [
"MIT"
] | null | null | null | finbyz_dashboard/finbyz_dashboard/dashboard_overrides/db_query.py | finbyz/finbyz_dashboard | 9c58ab7bccf589bc010d0e5bf95b20cadd4d71f0 | [
"MIT"
] | 2 | 2021-08-21T10:41:38.000Z | 2021-11-19T05:27:13.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
from six import iteritems, string_types
"""build query for doclistview and return results"""
import frappe.defaults
import frappe.share
from frappe import _
import frappe.permi... | 37.223301 | 117 | 0.58855 |
90c031c9acf5df1d259052068e2c2ee9571226ce | 122 | py | Python | ___Python/Carsten/p10_weather_API/m02_zufallszahlen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Carsten/p10_weather_API/m02_zufallszahlen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Carsten/p10_weather_API/m02_zufallszahlen.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from rdoclient import RandomOrgClient
r = RandomOrgClient(YOUR_API_KEY_HERE)
r.generate_integers(5, 0, 10)
print(r)
| 20.333333 | 39 | 0.778689 |
90c81e26715423d687ce4dc72230b0decb3cd1a3 | 3,628 | py | Python | official/cv/unet/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/unet/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/unet/preprocess.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.595745 | 105 | 0.638644 |
463cea15ae49962375ccd92e5d71ee18ae8eed13 | 1,351 | py | Python | setup.py | xuwei13253838782/hn_test_sum | c91f0fbfcbb7fe571ceff7710eae5e99d2ec428f | [
"MIT"
] | null | null | null | setup.py | xuwei13253838782/hn_test_sum | c91f0fbfcbb7fe571ceff7710eae5e99d2ec428f | [
"MIT"
] | null | null | null | setup.py | xuwei13253838782/hn_test_sum | c91f0fbfcbb7fe571ceff7710eae5e99d2ec428f | [
"MIT"
] | null | null | null | #from distutils.core import setup
from setuptools import setup, find_packages
# http://guide.python-distribute.org/quickstart.html
# python setup.py sdist
# python setup.py register
# python setup.py sdist upload
# pip install django-dynamic-fixture
# pip install django-dynamic-fixture --upgrade --no-deps
# Manual upl... | 30.022222 | 89 | 0.686899 |
466d8a281769031363bfe71e0ecc06c239f08c55 | 9,451 | py | Python | service/tensorflowJS/webcamJS.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/tensorflowJS/webcamJS.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | service/tensorflowJS/webcamJS.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | webcam 的数据 训练神经网络模型来预测
作者:黑胡桃实验室 / 公众号:blackwalnutlabs 发布时间:2019-02-08
作者:TensorFlow.js 团队
在 TensorFlow.js 的核心概念 中,我们学会了使用 Tensor(张量)和 Ops(操作)去执行基本的线性代数运算。
在 图像训练:用卷积神经网络识别手写数字 中,我们学会了如何构建一个卷积图像分类器去识别 MNIST 数据集中的手写数字图片。
在 导入 Keras 模型教程 中,我们学会了如何将预训练好的 Keras 模型移植到浏览器中使用。
在本教程中,我们将使用迁移学习来玩 Pacman。从 webcam 读取数据(姿势、对象、面部表... | 42.381166 | 235 | 0.785208 |
b41dbe886c8c8e408f34812bab57d089110d0a43 | 17,055 | py | Python | src/onegov/org/forms/event.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/event.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/forms/event.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import json
import transaction
from cached_property import cached_property
from datetime import date, datetime, timedelta
from dateutil import rrule
from dateutil.parser import parse
from dateutil.rrule import rrulestr
from onegov.core.csv import convert_excel_to_csv
from onegov.core.csv import CSVFile
from onegov.eve... | 30.455357 | 79 | 0.540193 |
b480011b23840ae81329135ac53503d6487fe939 | 541 | py | Python | exercises/en/solution_03_10_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/en/solution_03_10_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/en/solution_03_10_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
from spacy.tokens import Doc
nlp = spacy.blank("en")
# Define the getter function
def get_has_number(doc):
# Return if any of the tokens in the doc return True for token.like_num
return any(token.like_num for token in doc)
# Register the Doc property extension "has_number" with the getter get_h... | 30.055556 | 81 | 0.768946 |
c36f108198167768c175a2ccaa464e3a31c76350 | 12,062 | py | Python | src/onegov/core/i18n.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/i18n.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/i18n.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ Provides tools and methods for internationalization (i18n).
Applications wishing to use i18n need to define two settings:
:i18n.localedirs:
A list of gettext locale directories. The first directory is considered
to be the main directory, all other directories are added to the
translation object as fal... | 31.994695 | 79 | 0.651136 |
8273851ae05b2287c19a6c033b9d7a009f2f6c66 | 82 | py | Python | lbry/lbry/__init__.py | Nykseli/lbry-sdk | 07afc0aa0a1e6c0ef6aa284fb47513af940440c1 | [
"MIT"
] | null | null | null | lbry/lbry/__init__.py | Nykseli/lbry-sdk | 07afc0aa0a1e6c0ef6aa284fb47513af940440c1 | [
"MIT"
] | 4 | 2020-10-27T21:53:05.000Z | 2022-02-11T03:10:54.000Z | lbry/lbry/__init__.py | braveheart12/lbry-sdk | dc709b468f9dce60d206161785def5c7ace2b763 | [
"MIT"
] | null | null | null | __name__ = "lbry"
__version__ = "0.38.0"
version = tuple(__version__.split('.'))
| 16.4 | 39 | 0.670732 |
7dbcdf549f4812c852c9100243740b65edfd9d3f | 1,206 | py | Python | dtdocker/containers/RedisContainers.py | oxsoftdev/dt-docker | 8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5 | [
"MIT"
] | null | null | null | dtdocker/containers/RedisContainers.py | oxsoftdev/dt-docker | 8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5 | [
"MIT"
] | null | null | null | dtdocker/containers/RedisContainers.py | oxsoftdev/dt-docker | 8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5 | [
"MIT"
] | null | null | null | import logging
from ._ContainerMixin import ContainerMixin
from ..metaclasses import Singleton
logger = logging.getLogger('dt-docker')
class RedisContainer(ContainerMixin):
def __init__(self, client, name):
self.client = client
self.name = name
def run(self, port, environment=None):
... | 26.217391 | 73 | 0.549751 |
81bfb3cc976f4dfb4a3a85b052c17abc13eece6d | 2,634 | py | Python | Textadventure/items/equipment_properties.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | Textadventure/items/equipment_properties.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | Textadventure/items/equipment_properties.py | clemens2107/textadventure | 870f3ff98accdadad386a2cae4bd4328341f7eb9 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# name, min, max, classe_speziefisch, item vergleich, item speziefische stats
main_properties_item_stats = ["helm", "chest_armor", "belt",
"boot", "glove", "pant","shield",
"shoulder","amulet", "ring", "sword", "axe", "mace",
... | 67.538462 | 216 | 0.542521 |
82f04d8a9be712440228d571c2d2143c154e80fd | 384 | py | Python | PMIa/2015/ANDROS_D_A/task_1_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/ANDROS_D_A/task_1_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/ANDROS_D_A/task_1_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 1. Вариант 2.
# Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Мартин Андерсен. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
#Andros D.A.
#17.03.2016
print("Мартин Андерсен носит псевдоним Нексё, известный дат... | 42.666667 | 208 | 0.802083 |
d205a0d3730c2ad7a73ef54f2639fbfaa68c22a1 | 1,785 | py | Python | NeuralNet/Oli/libs/Preprocessor.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | 6 | 2017-04-12T14:05:19.000Z | 2021-01-29T11:23:50.000Z | NeuralNet/Oli/libs/Preprocessor.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | null | null | null | NeuralNet/Oli/libs/Preprocessor.py | alex-ta/Fontinator | 7ca9effe3b61ded032176557520127e1d4b7a5ef | [
"Apache-2.0"
] | null | null | null | import numpy as np
from PIL import Image
from numpy.core.multiarray import ndarray
from abc import ABC, abstractmethod
class IPreprocessor(ABC):
"""
An abstract baseclass for a image preprocessing class
"""
@abstractmethod
def prepare_image(self, img_name: str) -> ndarray:
pass
class Si... | 28.333333 | 106 | 0.654902 |
966b8e2a7d2b0d17fbf487e85ba26e863376d31c | 14,851 | py | Python | sdks/pysdk/pyevtsdk/unit_test.py | harrywong/evt | 95985384619e0f5ff4021e8838d421ac4b4b946d | [
"BSD-3-Clause"
] | 1,411 | 2018-04-23T03:57:30.000Z | 2022-02-13T10:34:22.000Z | sdks/pysdk/pyevtsdk/unit_test.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 27 | 2018-06-11T10:34:42.000Z | 2019-07-27T08:50:02.000Z | sdks/pysdk/pyevtsdk/unit_test.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 364 | 2018-06-09T12:11:53.000Z | 2020-12-15T03:26:48.000Z | import datetime
import json
import random
import string
import sys
import time
import unittest
import click
from pyevt import abi, ecc, libevt
from . import action, api, base, transaction
def fake_name(prefix='test'):
return prefix + ''.join(random.choice(string.hexdigits) for _ in range(8)) + str(int(datetime... | 34.377315 | 131 | 0.613898 |
83a7d2ad98e00f7406b0ee7dbfbf7badd7fa142d | 915 | py | Python | loesung/blatt1b_3b.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | 1 | 2019-09-27T13:47:20.000Z | 2019-09-27T13:47:20.000Z | loesung/blatt1b_3b.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | loesung/blatt1b_3b.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | # Hier soll nun ein Programm geschrieben werden, was die verschlüsselten Texte
# der vorherigen Aufgabe entschlüsseln kann. Hier zu wird empfohlen sich den
# vorherigen Code anzuschauen.
# Impotiere die Anzahl an verschiedenen Charcodes.
from blatt1b_3_hilfe import CHAR_CODE_COUNT
correct_key = False
while not corre... | 31.551724 | 80 | 0.75847 |
54475aa5bceefff7cc4e349f38b284ec3c805f86 | 2,668 | py | Python | src/onegov/intranet/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/intranet/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/intranet/security.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.metadata import PublicMetadata
from onegov.core.security import Public, Private, Personal, Secret
from onegov.core.static import StaticFile
from onegov.core.theme import ThemeFile
from onegov.intranet.app import IntranetApp
from onegov.user import Auth
@IntranetApp.setting_section(section="roles")
de... | 26.415842 | 77 | 0.664543 |
3f93cb3d367d89db5f4235d2fc48cef0f29acc84 | 5,157 | py | Python | 2019/quals/hardware-remotecontrol/attachments/client.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2019/quals/hardware-remotecontrol/attachments/client.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2019/quals/hardware-remotecontrol/attachments/client.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 33.487013 | 78 | 0.618383 |
b7a3b29ad81761b8326ffc9de8415017d2a36cab | 568 | py | Python | car/car/car_control.py | cdxxiaoge/StreetRoller | 3bb9b4ee8ddad9c1582f1aaf572591a09e5d3400 | [
"Apache-2.0"
] | null | null | null | car/car/car_control.py | cdxxiaoge/StreetRoller | 3bb9b4ee8ddad9c1582f1aaf572591a09e5d3400 | [
"Apache-2.0"
] | null | null | null | car/car/car_control.py | cdxxiaoge/StreetRoller | 3bb9b4ee8ddad9c1582f1aaf572591a09e5d3400 | [
"Apache-2.0"
] | null | null | null | import json
import paho.mqtt.client as mqtt
from trail import Coordinate_trans
# 这个程序可以用来单独发送数据给小车,使小车动起来
# 如果和郭定的轨迹控制程序联调的话,这个程序就没用
def on_connect(client, userdata, flags, rc):
print("Connected with result code: " + str(rc))
def on_message(client, userdata, msg):
print(msg.topic + " " + str(msg.payload))
... | 24.695652 | 57 | 0.739437 |
b7fd601873a7715811333ae2d2aee168e2522591 | 775 | py | Python | p01/setup.py | JoseIbanez/fastapi | ac4b74f23315021042efd88e192aa39d8481de53 | [
"MIT"
] | null | null | null | p01/setup.py | JoseIbanez/fastapi | ac4b74f23315021042efd88e192aa39d8481de53 | [
"MIT"
] | null | null | null | p01/setup.py | JoseIbanez/fastapi | ac4b74f23315021042efd88e192aa39d8481de53 | [
"MIT"
] | null | null | null | import setuptools
with open("Readme.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
with open("./cifastapi/VERSION_FULL", "r", encoding="utf-8") as fh:
version = fh.read()
setuptools.setup(
name="cifastapi", # Replace with your own username
version=version,
author="Jose Ibanez",
... | 28.703704 | 67 | 0.665806 |
4d9f4da9ee12aa408bdb85ce075c921bfe96ee31 | 3,229 | py | Python | tests/test_ausschreibung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_ausschreibung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_ausschreibung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from datetime import datetime, timezone
import pytest # type:ignore[import]
from bo4e.bo.ausschreibung import Ausschreibung, AusschreibungSchema
from bo4e.bo.geschaeftspartner import Geschaeftspartner
from bo4e.enum.ausschreibungsportal import Ausschreibungsportal
from bo4e.enum.ausschreibungsstatus import Ausschrei... | 45.478873 | 99 | 0.625271 |
4db833850a37ca54eb769ef9601f4d175bb43a39 | 2,144 | py | Python | src/visuanalytics/analytics/storing/storing.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | null | null | null | src/visuanalytics/analytics/storing/storing.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | null | null | null | src/visuanalytics/analytics/storing/storing.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | null | null | null | """
Modul, welches Dictionaries in JSON-Dateien schreibt.
"""
import copy
import json
from visuanalytics.analytics.control.procedures.step_data import StepData
from visuanalytics.analytics.util.step_errors import raise_step_error, StoringError, StepKeyError
from visuanalytics.analytics.util.step_pattern import data_r... | 39.703704 | 98 | 0.621735 |
12d41cdfd681cc1b51bbaaf34a312ea9288ce7f4 | 334 | py | Python | Curso-Em-Video-Python/1Materias/10_Condicoes_Parte-1/#10-Condições (Parte 1).py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/1Materias/10_Condicoes_Parte-1/#10-Condições (Parte 1).py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/1Materias/10_Condicoes_Parte-1/#10-Condições (Parte 1).py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | nome = str(input('Digite seu nome: '))
if nome == 'Pedro':
print('Que nome lindo!!')
else:
print('Que nome fudido!!')
nota1 = int(input('Nota 1: '))
nota2 = int(input('Nota 2: '))
media = (nota1 + nota2)/2
print('Sua media é {:.2}'.format(media))
if media < 6:
print('Abaixo da media.')
else:
print('Aci... | 23.857143 | 40 | 0.598802 |
6719869f78d9096fb259665740f5b074dad10ca3 | 3,190 | py | Python | gateway/desktop/python/light.py | mikebarkmin/smartlights | 8551f8ec06391f65ec075d2fcd2f0dd958c51a90 | [
"Unlicense"
] | null | null | null | gateway/desktop/python/light.py | mikebarkmin/smartlights | 8551f8ec06391f65ec075d2fcd2f0dd958c51a90 | [
"Unlicense"
] | 2 | 2021-05-10T14:10:34.000Z | 2021-09-01T22:32:45.000Z | gateway/desktop/python/light.py | mikebarkmin/smartlights | 8551f8ec06391f65ec075d2fcd2f0dd958c51a90 | [
"Unlicense"
] | null | null | null | import requests
from device import NetworkDevice
import sqlite3
db_path = "gateway.db"
class Light(NetworkDevice):
def __init__(self, id: int, name: str, ip_address: str, port: int,
r: int = 0, g: int = 0, b: int = 0):
super().__init__(ip_address, port=port)
self.id = id
... | 26.806723 | 130 | 0.434169 |
7a101c386c28dc95655e7580215070c9832939e8 | 1,621 | py | Python | marsyas-vamp/marsyas/scripts/timeline-test-wrapper.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/timeline-test-wrapper.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/timeline-test-wrapper.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import subprocess
import shutil
try:
working_dir = sys.argv[1]
env_vars = sys.argv[2]
bin_cmd_args = sys.argv[3:-1]
good_filename = sys.argv[-1]
except:
print "Syntax: cmake-test-wrapper.py WORKING_DIR ENV_VARS CMD ARG1 ARG2 ... ARGn "
sys.exit(0)
d... | 27.948276 | 87 | 0.634793 |
3d626a126ca73a81422681cabb158166e0371397 | 2,043 | py | Python | dbc_generator/server.py | WURacing/dbc_generator | aae3c8ddb20bf22f6ac3667b8e05aa2b66b74b68 | [
"Apache-2.0"
] | 1 | 2021-01-14T23:24:13.000Z | 2021-01-14T23:24:13.000Z | dbc_generator/server.py | WURacing/dbc_generator | aae3c8ddb20bf22f6ac3667b8e05aa2b66b74b68 | [
"Apache-2.0"
] | null | null | null | dbc_generator/server.py | WURacing/dbc_generator | aae3c8ddb20bf22f6ac3667b8e05aa2b66b74b68 | [
"Apache-2.0"
] | 1 | 2019-10-19T19:25:09.000Z | 2019-10-19T19:25:09.000Z | from bottle import Bottle, run, get, post, request, response, template, static_file
import toml
from pathlib import Path
from dbc import DBC
from parser import parse
import json
import requests
import logging
CONFIG_PATH = f"{Path(__file__).parent}/../agent_config.toml"
LOG = logging.getLogger("dbc_generator.server")... | 24.614458 | 91 | 0.660793 |
e9eda424fc43f3755beaace3d9a27e5de646c221 | 97 | py | Python | Python/arithmethic.py | aja512/HackerRank | 5ddf3c03447732922f2075bca2690a1591163f7b | [
"MIT"
] | null | null | null | Python/arithmethic.py | aja512/HackerRank | 5ddf3c03447732922f2075bca2690a1591163f7b | [
"MIT"
] | null | null | null | Python/arithmethic.py | aja512/HackerRank | 5ddf3c03447732922f2075bca2690a1591163f7b | [
"MIT"
] | null | null | null | a = int(input())
b = int(input())
if a >1 and b>1:
print(a+b)
print(a-b)
print(a*b)
| 13.857143 | 17 | 0.494845 |
a13b2a81dd035a0e8fb41906f1d43739be210dce | 575 | py | Python | exercises/de/exc_03_06.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/de/exc_03_06.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/de/exc_03_06.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
from spacy.language import Language
# Definiere die benutzerdefinierte Komponente
@Language.component("length_component")
def length_component_function(doc):
# Berechne die Länge des Dokuments
doc_length = ____
print(f"Dieses Dokument ist {doc_length} Tokens lang.")
# Gib das Doc zurück
... | 25 | 87 | 0.768696 |
a1517f57eaef59361341787dd50301046a99cce1 | 1,852 | py | Python | Learnify/__init__.py | kevlie/StarterHacks | 38b62d385d8a498515b09351cbd7b47171a2bef8 | [
"MIT"
] | null | null | null | Learnify/__init__.py | kevlie/StarterHacks | 38b62d385d8a498515b09351cbd7b47171a2bef8 | [
"MIT"
] | null | null | null | Learnify/__init__.py | kevlie/StarterHacks | 38b62d385d8a498515b09351cbd7b47171a2bef8 | [
"MIT"
] | null | null | null | import os
from flask import Flask, render_template, url_for
from flask_sqlalchemy import SQLAlchemy
from Learnify.forms import RegistrationForm, LoginForm
def create_app(test_config=None):
# create and configure the app
app = Flask(__name__, instance_relative_config=True)
# Setting up database for playli... | 26.084507 | 76 | 0.659287 |
a173ca162ab6df5c26e609d0cf309e825f3b4649 | 44,461 | py | Python | src/MARC21Codes.py | sonar-idh/Transformer | bbfde9d19ad4a4917257483ba66eb30a8294244d | [
"MIT"
] | null | null | null | src/MARC21Codes.py | sonar-idh/Transformer | bbfde9d19ad4a4917257483ba66eb30a8294244d | [
"MIT"
] | null | null | null | src/MARC21Codes.py | sonar-idh/Transformer | bbfde9d19ad4a4917257483ba66eb30a8294244d | [
"MIT"
] | null | null | null | relationTypeListAut = {'500': 'RelationToPerName',
'510': 'RelationToCorpName',
'511': 'RelationToMeetName',
'530': 'RelationToUniTitle',
'548': 'RelationToChronTerm',
'550': 'RelationToTopicTerm',
... | 43.503914 | 159 | 0.364679 |
a1e61ac291359b027d8cc0b7af701c74c5e65e19 | 16,934 | py | Python | examples/multimodal/layoutxlm/xfun.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/multimodal/layoutxlm/xfun.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/multimodal/layoutxlm/xfun.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | import json
import os
import cv2
import numpy as np
import paddle
import copy
from paddle.io import Dataset
__all__ = ["XFUN"]
class XFUN(Dataset):
"""
Example:
print("=====begin to build dataset=====")
from paddlenlp.transformers import LayoutXLMTokenizer
tokenizer = LayoutXLMTokeniz... | 38.13964 | 108 | 0.524684 |
c55057f241d95049c76281d5e3e6dc6716ed9938 | 403 | py | Python | breakingRecords.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | breakingRecords.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | breakingRecords.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# https://www.hackerrank.com/challenges/breaking-best-and-worst-records/problem
n = int(input())
scores = list(map(int, input().rstrip().split()))
best = scores[0]
worst = scores[0]
x = 0
y = 0
for i in scores:
if i > best:
best = ... | 14.392857 | 79 | 0.598015 |
9aba07903344f0a0f197e3adefe8393f63f43786 | 3,700 | py | Python | Packs/CommonScripts/Scripts/NumberOfPhishingAttemptPerUser/NumberOfPhishingAttemptPerUser.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/NumberOfPhishingAttemptPerUser/NumberOfPhishingAttemptPerUser.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/NumberOfPhishingAttemptPerUser/NumberOfPhishingAttemptPerUser.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from typing import Tuple
from CommonServerPython import *
def get_default_from_date(date_range: str) -> str:
"""
Gets a range string (eg. 30 days) and return a date string in the relevant Demisto query format.
:param date_range: string
Range (eg. 2 months) to create the date string from
:retu... | 33.333333 | 110 | 0.572162 |
4916c226609da8772e35f0e49e536a76ee899588 | 1,274 | py | Python | src/aijack/defense/ckks/random.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 24 | 2021-11-17T02:16:47.000Z | 2022-03-27T01:04:08.000Z | src/aijack/defense/ckks/random.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 9 | 2021-12-03T06:09:27.000Z | 2022-03-29T06:33:53.000Z | src/aijack/defense/ckks/random.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 5 | 2022-01-12T09:58:04.000Z | 2022-03-17T09:29:04.000Z | import numpy as np
from numpy.polynomial import Polynomial
def gen_binary_poly(size):
"""Generates a polynomial with coeffecients in [0, 1]
Args:
size: number of coeffcients, size-1 being the degree of the
polynomial.
Returns:
array of coefficients with the coeff[i] being
... | 31.85 | 75 | 0.66248 |
b8e6364704b10a6e3c3e90274c52027dac14e06a | 358 | py | Python | exercises/zh/test_01_02_04.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/zh/test_01_02_04.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/zh/test_01_02_04.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
import spacy.tokens
import spacy.lang.es
assert isinstance(
nlp, spacy.lang.zh.Chinese
), "nlp应该是中文类的一个实例。"
assert isinstance(
doc, spacy.tokens.Doc
), "你用nlp实例处理过文本并且创建了一个doc吗?"
assert "print(doc.text)" in __solution__, "你打印doc.text了吗?"
__msg__.good("Perfec... | 25.571429 | 62 | 0.670391 |
7739faeb2a89920c43b546f41d4a53e6cde56aad | 10,976 | py | Python | gui/plotting.py | lhalb/gfmanager | 449f071b3239faa672b7f06122dfc9bc23e68d79 | [
"MIT"
] | 1 | 2022-01-18T12:53:17.000Z | 2022-01-18T12:53:17.000Z | gui/plotting.py | lhalb/gfmanager | 449f071b3239faa672b7f06122dfc9bc23e68d79 | [
"MIT"
] | null | null | null | gui/plotting.py | lhalb/gfmanager | 449f071b3239faa672b7f06122dfc9bc23e68d79 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file './gui/plotting.ui'
#
# Created by: PyQt5 UI code generator 5.15.4
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCor... | 55.155779 | 238 | 0.726312 |
629011628180984a82351264c17e3ee86ad0178b | 1,238 | py | Python | Packs/CommonScripts/Scripts/IsUrlPartOfDomain/IsUrlPartOfDomain.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/IsUrlPartOfDomain/IsUrlPartOfDomain.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/IsUrlPartOfDomain/IsUrlPartOfDomain.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from typing import List, Dict
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
def main(domains: str, urls: str) -> CommandResults:
"""Checks that the urls are in the domain in the domain name.
Args:
domains: A comma separated list of domains.
... | 31.74359 | 119 | 0.636511 |
65b8531969939fa3f9d9eefd4c7d751349212f88 | 1,285 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Dictionaries and Hashmaps/Sherlock and Anagrams/sherlock_anagrams1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Dictionaries and Hashmaps/Sherlock and Anagrams/sherlock_anagrams1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Dictionaries and Hashmaps/Sherlock and Anagrams/sherlock_anagrams1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the sherlockAndAnagrams function below.
def is_anagram(s1, s2):
if len(s1) != len(s2):
return False
s1 = sorted(s1)
s2 = sorted(s2)
for i in range(len(s1)):
if s1[i] != s2[i]:
return False
... | 21.416667 | 62 | 0.515175 |
65df1f1522b1a4fb1a285557e360222f3008c2c3 | 6,733 | py | Python | xiaohongshu/xiaohs.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 5 | 2020-08-17T08:37:16.000Z | 2021-06-07T05:02:05.000Z | xiaohongshu/xiaohs.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | null | null | null | xiaohongshu/xiaohs.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 1 | 2021-06-07T05:02:10.000Z | 2021-06-07T05:02:10.000Z | import requests
import hashlib
import json
import time
import CralwerSet.tb_toutiao as tb_toutiao
import random
import traceback
from CralwerSet.xiaohongshu import xiaohs_user as user
types = {
"推荐": "homefeed_recommend",
"时尚": "homefeed.fashion_v2",
"护肤": "homefeed.skincare_v2",
"彩妆": "homefeed.cosmet... | 40.077381 | 293 | 0.543591 |
b2840e9dbd94dfdddff2882224a0869f521d6755 | 84 | py | Python | python/en/archive/dropbox/miscellaneous_python_files/Extract_Loudest_Section.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/Extract_Loudest_Section.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/miscellaneous_python_files/Extract_Loudest_Section.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
filename = 'KT_4CH_3cha_dist_A_1M-0151_M2CWJ-001.wav'
| 16.8 | 54 | 0.654762 |
a75d6136faf290e4151555ed3ab05e31eaf57787 | 509 | py | Python | packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/sort_build.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/sort_build.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-storage-mongodb/src/watchmen_storage_mongodb/sort_build.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Dict, Optional, Union # noqa
from watchmen_storage import EntityColumnName, EntitySort, EntitySortMethod
def build_sort_for_statement(sort: EntitySort) -> Optional[Dict[EntityColumnName, int]]:
"""
int: 1: asc; -1: desc
"""
if sort is None or len(sort) == 0:
return None
built = {}
for el... | 22.130435 | 88 | 0.697446 |
ac3feb6cb432575af5138ead9a2e979bf2be6d99 | 1,757 | py | Python | 2018/finals/re-journey/src/journey.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/finals/re-journey/src/journey.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/finals/re-journey/src/journey.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 24.068493 | 81 | 0.662493 |
3bb6c5540009f69035e4aa8fc7d3ca7d59031850 | 1,243 | py | Python | Python-Fundamentals/mu_online.py | dechevh/SoftwareUniversity | 8be1c0c096cf385a84093265a31767afd4454476 | [
"MIT"
] | null | null | null | Python-Fundamentals/mu_online.py | dechevh/SoftwareUniversity | 8be1c0c096cf385a84093265a31767afd4454476 | [
"MIT"
] | null | null | null | Python-Fundamentals/mu_online.py | dechevh/SoftwareUniversity | 8be1c0c096cf385a84093265a31767afd4454476 | [
"MIT"
] | null | null | null | sting_rooms = input().split("|")
health = 100
bitcoins = 0
dead = False
best_room = 0
latest_monster = ""
counter = len(sting_rooms)
while not dead:
if counter == 0:
break
for x in sting_rooms:
each_room = x.split(" ")
command = each_room[0]
number = int(each_room[1])
... | 23.903846 | 63 | 0.489944 |
f080d3ce74b5438ff7aff830f62179f12f4526e8 | 1,383 | py | Python | beispielanwendungen/webkit1/main.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/webkit1/main.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/webkit1/main.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z | #!/usr/bin/env python
import sys, os
import re
from PyQt4 import QtCore, QtGui
from ui_main import Ui_MainWindow
def main(argv):
app = QtGui.QApplication(argv)
MainWindow = BrowserWindow()
MainWindow.show()
sys.exit(app.exec_())
class BrowserWindow(QtGui.QWidget):
"""Das Hauptfenste... | 30.733333 | 71 | 0.645698 |
e8e06f29dec4dc81b88610f21b3346be47d83eac | 179 | py | Python | src/d2py/utils/file.py | xinetzone/d2py | 657362a0451921ef5a7b05b4a8378f7379063cdf | [
"Apache-2.0"
] | 3 | 2022-03-09T14:08:42.000Z | 2022-03-10T04:17:17.000Z | src/d2py/utils/file.py | xinetzone/d2py | 657362a0451921ef5a7b05b4a8378f7379063cdf | [
"Apache-2.0"
] | 3 | 2021-11-07T13:11:26.000Z | 2022-03-19T03:28:48.000Z | src/d2py/utils/file.py | xinetzone/d2py | 657362a0451921ef5a7b05b4a8378f7379063cdf | [
"Apache-2.0"
] | 1 | 2022-03-15T14:18:32.000Z | 2022-03-15T14:18:32.000Z | '''File Processing Tools
'''
from pathlib import Path
def mkdir(root):
root = Path(root)
if not root.exists():
root.mkdir(mode=511, parents=True, exist_ok=True) | 17.9 | 57 | 0.659218 |
688f9957b6572f23e79f626115d6f1fac6710ca2 | 4,859 | py | Python | pocketthrone/tools/maploader.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | 4 | 2016-06-05T16:48:04.000Z | 2020-03-23T20:06:06.000Z | pocketthrone/tools/maploader.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | pocketthrone/tools/maploader.py | herrschr/pocket-throne | 819ebae250f45b0a4b15a8320e2836c0b5113528 | [
"BSD-2-Clause"
] | null | null | null | import json
import os
from random import seed, choice
from kivy.core.image import Image
from pocketthrone.managers.locator import Locator
from pocketthrone.managers.filemanager import FileManager
from pocketthrone.entities.tile import Tile
from pocketthrone.entities.tilemap import TileMap
from pocketthrone.entities.... | 30.949045 | 87 | 0.727104 |
a875f8380c6be05071b983d3f1ac8570894f9bde | 15,739 | py | Python | lib/market.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | 1 | 2022-03-09T20:44:33.000Z | 2022-03-09T20:44:33.000Z | lib/market.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | lib/market.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | import requests
import json
import time
import os
import pandas as pd
import numpy as np
import random
import datetime
from . import config
from . import api
from . import wallet
def get_markets():
rj_ticker = api.get_all("ticker/24hr")
rj_market = api.get_all("markets")
dft = pd.DataFrame(rj_ticker, d... | 36.34873 | 127 | 0.59216 |
769fd047dec2d1123f8a0eabbb2835383c5c30c6 | 8,441 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_18_Maus_und_Tastatur_steuern/01_grundlagen_pyautogui/01_grundlagen_pyautogui.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_18_Maus_und_Tastatur_steuern/01_grundlagen_pyautogui/01_grundlagen_pyautogui.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_18_Maus_und_Tastatur_steuern/01_grundlagen_pyautogui/01_grundlagen_pyautogui.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 01_grundlagen_pyautogui.py
import re, pyautogui, os
from time import sleep as pause
from subprocess import Popen
os.chdir(os.path.dirname(__file__))
max_text_length=70
max_text_delta=24
def output(title, string):
print('╔'+''.center(max_text_length+8, '═')+'╗')
print('║ '+title.center(max_text_length+7).u... | 87.020619 | 546 | 0.77479 |
76ad40aa53e88c8bc5650f064ba563c2a9063847 | 3,866 | py | Python | test/test_wiener.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | 4 | 2021-05-21T13:26:10.000Z | 2021-11-15T17:17:01.000Z | test/test_wiener.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | test/test_wiener.py | scuervo91/dcapy | 46c9277e607baff437e5707167476d5f7e2cf80c | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from datetime import date
from pandas.testing import assert_frame_equal
import pandas as pd
from dcapy.wiener import Brownian, GeometricBrownian,MeanReversion
from dcapy.dca import ProbVar
class TestWiener(unittest.TestCase):
def test_brownian1(self):
rw = Brownian()
... | 30.440945 | 82 | 0.52328 |
4f631a9ad65178269c56e03819570be8d953cb34 | 2,469 | py | Python | Packs/CommonScripts/Scripts/PositiveDetectionsVSDetectionEngines/PositiveDetectionsVSDetectionEngines.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/PositiveDetectionsVSDetectionEngines/PositiveDetectionsVSDetectionEngines.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/PositiveDetectionsVSDetectionEngines/PositiveDetectionsVSDetectionEngines.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 *
from CommonServerUserPython import *
def extract_engines_data_from_indicator(indicator_data):
if not indicator_data:
raise DemistoException("No indicator found")
cstm_fields = indicator_data.get("CustomFields")
if not cstm_fields:
... | 31.653846 | 87 | 0.596193 |
4ff183da165d68868bea4a3e2310921e4d167c17 | 566 | py | Python | script_5_check_clim.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | 1 | 2021-04-23T19:47:51.000Z | 2021-04-23T19:47:51.000Z | script_5_check_clim.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | null | null | null | script_5_check_clim.py | melioristic/FANPY | 2d68d222de4f1e6d6d802268253ce446cd924914 | [
"MIT"
] | null | null | null | import pandas as pd
import matplotlib.pylab as plt
fname_1 = 'Projects/Project_Beech/formind_parameters/Climate/weatherGermany_100_ori.txt'
fname_2 = 'Projects/Project_Beech/formind_parameters/Climate/weatherGermany_era5_adjusted.txt'
data_1 = pd.read_csv(fname_1, delimiter=' ')
data_2 = pd.read_csv(fname_1, delimit... | 23.583333 | 94 | 0.763251 |
0fa63f246786e64b5bbafa8d889feba5111b1be0 | 3,559 | py | Python | lib/qunit/qunit_runner.py | marshcode/bezier_visualizer | 46ba2241e929ca40962610523c7ec800aa08ca8a | [
"MIT"
] | null | null | null | lib/qunit/qunit_runner.py | marshcode/bezier_visualizer | 46ba2241e929ca40962610523c7ec800aa08ca8a | [
"MIT"
] | 3 | 2015-01-05T16:12:33.000Z | 2015-01-05T16:15:04.000Z | lib/qunit/qunit_runner.py | marshcode/bezier_visualizer | 46ba2241e929ca40962610523c7ec800aa08ca8a | [
"MIT"
] | null | null | null | #!/usr/bin/python
import time
import BaseHTTPServer
import SimpleHTTPServer
import os
import fnmatch
import sys
HOST_NAME = '' # !!!REMEMBER TO CHANGE THIS!!!
PORT_NUMBER = 8080 # Maybe set this to 9000.
FILE_DIR = os.path.dirname( os.path.abspath(__file__) )
class MyHandler(SimpleHTTPServer.SimpleHTTPRequestHan... | 28.934959 | 93 | 0.590615 |
e842137b703d47042dd2231db7fb22c10c3fe13a | 7,172 | py | Python | tests/rbac/common/crypto/test_keys.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | tests/rbac/common/crypto/test_keys.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 1 | 2019-07-08T22:32:43.000Z | 2019-07-08T22:32:43.000Z | tests/rbac/common/crypto/test_keys.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# 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 ... | 46.875817 | 86 | 0.725321 |
e851cc69d06b66af3f30ee2468832d6a4ff27c65 | 336 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/77Try_except_tratando_exessoes/try_except.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/77Try_except_tratando_exessoes/try_except.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/77Try_except_tratando_exessoes/try_except.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | a = {}
a = []
try:
print(a[1])
except NameError as erro:
print('error do desenvolvedor, fale com ele.')
except (IndexError, KeyError) as erro:
print('Erro de index ou chave.')
except Exception as erro:
print('Ocorreu um erro inesperado.')
else:
print('Seu codigo foi executado com sucesso')
print('B... | 22.4 | 50 | 0.678571 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.