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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9ac9b5a3d46177edc6cd72b3bfdd2b89d505e52d | 13,241 | py | Python | tests/transformers/bert/test_modeling.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/transformers/bert/test_modeling.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | tests/transformers/bert/test_modeling.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 appli... | 40.124242 | 141 | 0.626916 |
b135233345bb8716ffc17f40609fffc4a9ba9191 | 707 | py | Python | Licence 1/I23/TP 4/tp_4.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 1/I23/TP 4/tp_4.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 1/I23/TP 4/tp_4.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | def Lire():
chaine = input("Permutation = ")
return tuple([int(x)-1 for x in chaine.split()])
def Ecrire(s):
print(tuple(range(1, len(s) + 1)))
print(tuple(i + 1 for i in s))
"""
QUESTION 1
"""
def EstPermutation(s):
cool = sum(1 if c in range(len(s)) else 0 for c in s) == len(s)
fun = sum... | 12.403509 | 67 | 0.553041 |
b8cc9a590ab13694b2c1ab31c6f843930bb3dd62 | 633 | py | Python | python/unittest/mock/medium/01_patch_on_import/test_work.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/unittest/mock/medium/01_patch_on_import/test_work.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/unittest/mock/medium/01_patch_on_import/test_work.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from unittest import TestCase, mock
from work import work_on
class TestWorkMockingModule(TestCase):
def test_using_context_manager(self):
with mock.patch("work.os") as mocked_os:
work_on()
mocked_os.getcwd.assert_called_once()
@mock.patch("work.os")
def test_u... | 30.142857 | 67 | 0.64455 |
b8e2497e1ccf2abcb513639c7ed64cd16e3ba4e4 | 2,365 | py | Python | scripts/bibtex2json.py | stschiff/homepage-gatsby | e901472bcc5adba6611646067b8f49932ae86d22 | [
"MIT"
] | null | null | null | scripts/bibtex2json.py | stschiff/homepage-gatsby | e901472bcc5adba6611646067b8f49932ae86d22 | [
"MIT"
] | 2 | 2021-03-24T08:42:46.000Z | 2021-10-01T20:44:11.000Z | scripts/bibtex2json.py | stschiff/homepage-gatsby | e901472bcc5adba6611646067b8f49932ae86d22 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import bibtexparser
import sys
import json
month_names = "jan feb mar apr may jun jul aug sep oct nov dec".split()
def month_replace(s):
ret = s
for m in month_names:
search = " " + m
rep = " {" + m + "}"
ret = ret.replace(search, rep)
return ret
def month_t... | 33.309859 | 123 | 0.573362 |
b8f1e644ec897bd93c6be6da5e6a35b66c2b194c | 386 | py | Python | exercises/de/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/exc_01_09.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("de_core_news_sm")
text = "Apple: Modell IPhone SE kommt im Sommer"
# Verarbeite den Text
doc = ____
# Iteriere über die Entitäten
for ____ in ____.____:
# Drucke Text und Label der Entität
print(____.____, ____.____)
# Erstelle eine Span für "IPhone SE"
iphone_se = ____
# Dr... | 19.3 | 48 | 0.727979 |
6200eca86f26cf5b48542ca5df629a6c6185e4fb | 747 | py | Python | Versuch5/versuch5/task5.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch5/versuch5/task5.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch5/versuch5/task5.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | 1 | 2022-01-06T12:47:53.000Z | 2022-01-06T12:47:53.000Z | import redlab as rl
from time import sleep
import numpy as np
import matplotlib.pyplot as plt
print("-------einzelneWerte-------------------------")
print("16BitValue:" + str(rl.cbAIn(0, 0, 1)))
print("VoltageValue:" + str(rl.cbVIn(0, 0, 1)))
print("-------Messreihe-------------------------")
print("Messreihe:" + str... | 32.478261 | 62 | 0.564926 |
627891f355c1b83bb754a39db7a48571c3d9c430 | 189 | py | Python | superstructure/utils.py | fossabot/superstructure | f4ab5cac269fb3dedfbd3a54c441af23edf3840b | [
"MIT"
] | null | null | null | superstructure/utils.py | fossabot/superstructure | f4ab5cac269fb3dedfbd3a54c441af23edf3840b | [
"MIT"
] | null | null | null | superstructure/utils.py | fossabot/superstructure | f4ab5cac269fb3dedfbd3a54c441af23edf3840b | [
"MIT"
] | null | null | null | from .logik import Relation
def is_compatible(bewusstseins_inhalt, x):
if isinstance(x, Relation):
for begriff in bewusstseins_inhalt:
return isinstance(begriff,)
| 23.625 | 43 | 0.708995 |
65b16ed5d4ad08a561c3e78a54a6e6220670344e | 2,350 | py | Python | 2021/DEFCON 2021 quals/game.py | LeKSuS-04/Capture-The-Flag | 7cfe5b716566d4d2d58c53d4eedd647bc15a3328 | [
"WTFPL"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | DEFCON/2021/Quals/crypto/qoo-or-ooo/game.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | DEFCON/2021/Quals/crypto/qoo-or-ooo/game.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | """
This is a public file
"""
import random
from coin import Coin
GAME_DESCRIPTION = \
"zardus: Hey hacker! Shall we play a game against QOO?\n" \
" There are two competitors here and they each will bet on 0 or 1.\n" \
" Let's put our numbers there so that the sum of ours is same ... | 29.375 | 90 | 0.566809 |
65ee1cf179f448df647e0b890c8cf7c97f2d3391 | 1,362 | py | Python | Python/Regex_and_Parsing/Validating_And_Parsing_Email_Addresses.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Python/Regex_and_Parsing/Validating_And_Parsing_Email_Addresses.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Python/Regex_and_Parsing/Validating_And_Parsing_Email_Addresses.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/validating-named-email-addresses/problem?h_r=profile
#input
n = int(input())
e =[input() for _ in range(n)]
#name
name = [i.split()[0] for i in e]
#user
user = [i.split()[1].split('@')[0].replace('<','') for i in e]
#email
email = [i.split()[1].split('@')[1].split('.')[0] for i ... | 28.375 | 167 | 0.590308 |
a238c28f012998b8629160bdcf6d6c1f1495a5e6 | 515 | py | Python | BITs/2014/Shmireychik_S_V/task_5_17.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Shmireychik_S_V/task_5_17.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Shmireychik_S_V/task_5_17.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача №5, Вариант 17
#Программа программу, которая при запуске случайным образом выводит названиение одной из трех стран, входящих в военно-политический блок "Тройственный союз".
#Шмирейчик С.В.
#14.03.2016
import random
a="Германия"
b="Австро-Венгрия"
с="Италия"
country=random.randint(1,3)
print("прогр... | 27.105263 | 158 | 0.741748 |
a25e97a2a9ab483712a453cdb96d60015f4c2c4f | 2,022 | py | Python | applications/doc_vqa/Rerank/src/index_search.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/doc_vqa/Rerank/src/index_search.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/doc_vqa/Rerank/src/index_search.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | import sys
import time
import faiss
import math
import numpy as np
def read_embed(file_name, dim=768, bs=3000):
if file_name.endswith('npy'):
i = 0
emb_np = np.load(file_name)
while (i < len(emb_np)):
vec_list = emb_np[i:i + bs]
i += bs
yield vec_list
... | 28.083333 | 77 | 0.515826 |
a7b5cf83ec9be9727318993dc8b2e6e9c96ac9b5 | 34,517 | py | Python | Fastir_Collector/health/statemachine.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/health/statemachine.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/health/statemachine.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import subprocess
import traceback
import psutil
from settings import NETWORK_ADAPTATER
from utils.utils import write_to_output, get_csv_writer, write_to_json, close_json_writer, get_json_writer,\
write_list_to_json, write_to_csv, get_termi... | 58.109428 | 128 | 0.576093 |
a7ca7ddee6470aa236b8a59bf302fb56488e82a1 | 349 | py | Python | leetcode/089-Gray-Code/GrayCode_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/089-Gray-Code/GrayCode_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/089-Gray-Code/GrayCode_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Although it can't AC leetcode test, it's definitely right. However, its pattern may be not as obvious as the one that can AC
def grayCode(n):
res = [0]
seed = 1
for i in range(n - 1):
res += [seed, 3 * seed]
seed = seed << 1
for j in range((seed << 1) - len(res)):
res.append(r... | 29.083333 | 126 | 0.573066 |
ac5f0a01e73935083b77f3c8aecc94f726368e12 | 129 | py | Python | web/adminsite/__init__.py | ralfkret/hvz | 842c25d58fb3c30060080efcfa8b3d183b78e2ab | [
"MIT"
] | 1 | 2019-07-30T14:39:43.000Z | 2019-07-30T14:39:43.000Z | web/adminsite/__init__.py | ralfkret/hvz | 842c25d58fb3c30060080efcfa8b3d183b78e2ab | [
"MIT"
] | 11 | 2019-07-31T13:40:30.000Z | 2019-08-07T21:54:52.000Z | web/adminsite/__init__.py | ralfkret/hvz | 842c25d58fb3c30060080efcfa8b3d183b78e2ab | [
"MIT"
] | null | null | null | from flask import Blueprint
admin = Blueprint('adminsite', __name__, template_folder='adminsite_templates')
from . import views | 25.8 | 79 | 0.806202 |
3bd379e38ce5f491f72ee387b211228bc2d639d9 | 2,053 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex04_palindrome.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex04_palindrome.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex04_palindrome.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
from ch04_strings.solutions.ex03_reverse_string import reverse
def is_palindrome(input):
left = 0
right = len(input) - 1
lower_input = input.lower()
is_same_char = True
while left < right and is_same_char:
... | 23.329545 | 76 | 0.700925 |
0cee86124c433e02b1d51732c87e63917e0028f4 | 3,855 | py | Python | bind/pyevt/pyevt/evt_exception.py | harrywong/evt | 95985384619e0f5ff4021e8838d421ac4b4b946d | [
"BSD-3-Clause"
] | 1,411 | 2018-04-23T03:57:30.000Z | 2022-02-13T10:34:22.000Z | bind/pyevt/pyevt/evt_exception.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 27 | 2018-06-11T10:34:42.000Z | 2019-07-27T08:50:02.000Z | bind/pyevt/pyevt/evt_exception.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 364 | 2018-06-09T12:11:53.000Z | 2020-12-15T03:26:48.000Z | from . import libevt
class EVTErrCode:
EVT_OK = 0
EVT_INTERNAL_ERROR = -1
EVT_INVALID_ARGUMENT = -2
EVT_INVALID_PRIVATE_KEY = -3
EVT_INVALID_PUBLIC_KEY = -4
EVT_INVALID_SIGNATURE = -5
EVT_INVALID_HASH = -6
EVT_INVALID_ACTION = -7
EVT_INVALID_BINARY = -8
EVT_INVALID_JSON = -9
... | 27.147887 | 70 | 0.705318 |
0b46a3a030e1fbade37d159ae85d845b8f18e9b6 | 1,777 | py | Python | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logStore/appconn/connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logStore/appconn/connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/BTonly/lib/logMerge/logStore/appconn/connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from ..database.database_handler import DatabaseHandler
class Function:
"""To be used when there has not been a specific table implemented for a group:"""
def __init__(self):
self._handler = DatabaseHandler()
def insert_event(self, cbor):
""""Add a cbor event to the two databases.
... | 44.425 | 119 | 0.684862 |
0b6dd91d89263ff6b5d493421da73bb4c4763481 | 645 | py | Python | Python/EstruturaSequencial/Exercicios/Exrtcicio08.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicios/Exrtcicio08.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | Python/EstruturaSequencial/Exercicios/Exrtcicio08.py | ekballo/Back-End | b252e3b2a16ce36486344823f14afa6691fde9bc | [
"MIT"
] | null | null | null | #Faça um Programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês.
#Calcule e mostre o total do seu salário no referido mês.
valor = float(input('Digite o valor que ganha por hora: '))
horas = float(input('Digite quantas horas trabalhadas fez hoje: '))
dias = int(input('Quantos dias voc... | 43 | 98 | 0.728682 |
0ba1228e06eb3152b38fed31d83c38ea79d926b1 | 9,829 | py | Python | Topic3-TradingBot/RLbot.py | SimonScapan/AusarbeitungenAI | ef97bd76ae724e2ec76132bc5f4b81d0b751d882 | [
"MIT"
] | null | null | null | Topic3-TradingBot/RLbot.py | SimonScapan/AusarbeitungenAI | ef97bd76ae724e2ec76132bc5f4b81d0b751d882 | [
"MIT"
] | null | null | null | Topic3-TradingBot/RLbot.py | SimonScapan/AusarbeitungenAI | ef97bd76ae724e2ec76132bc5f4b81d0b751d882 | [
"MIT"
] | null | null | null | '''
Reinforcement Learning Trading bot for educational purposes.
The project is based on: https://www.analyticsvidhya.com/blog/2021/01/bear-run-or-bull-run-can-reinforcement-learning-help-in-automated-trading/
The aim is to find a model for trading with high level intelligence to compare later on with a "buy low sell ... | 47.254808 | 200 | 0.551836 |
0bd06b1e6acf8dfc1899810ecf27dada7181f20c | 2,465 | py | Python | Packs/IPQualityScore/Integrations/IPQualityScore/IPQualityScore_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/IPQualityScore/Integrations/IPQualityScore/IPQualityScore_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/IPQualityScore/Integrations/IPQualityScore/IPQualityScore_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import io
def util_load_json(path):
with io.open(path, mode='r', encoding='utf-8') as f:
return json.loads(f.read())
def test_ip_command(requests_mock):
from IPQualityScore import Client, ip_command
mock_response = util_load_json('test_data/ip_response.json')
requests_mock.get('h... | 39.758065 | 117 | 0.711968 |
f088bee9cfb101dae4e879cd928c5a2a01a0413c | 763 | py | Python | SoSe-21/Uebung-2/A2-MwStBerechnung.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Uebung-2/A2-MwStBerechnung.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Uebung-2/A2-MwStBerechnung.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Aufgabe 2 - Übung 2
#
# Erstellen Sie ein Python-Programm mit den folgenden Anforderungen:
# Es soll aus einem eingegebenen Nettobetrag die 19% Mehrwertsteuer und der Bruttobetrag errechnet und angezeigt werden.
# 1. Statische Variablen festlegen
mwst = 0.19
# 2. Nutzereingabe erfassen und in float umwandeln
netto... | 40.157895 | 120 | 0.782438 |
f0bea1ed57b8117cff99107664aa6e287d235e9f | 1,795 | py | Python | test/py/test_grpc.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | 2 | 2020-09-22T11:01:31.000Z | 2020-09-22T11:12:29.000Z | test/py/test_grpc.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | test/py/test_grpc.py | wybosys/nnt.logic.jvm | 249aedd7f8dd03d94dcb0780b91dadacd4b25270 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import argparse
import asyncio
import grpc
from google.protobuf.empty_pb2 import Empty
from google.protobuf.wrappers_pb2 import StringValue
from dubbo.test_pb2 import ReqTestEcho
from dubbo.test_pb2_grpc import TestStub, Test1Stub
# 当前启动的测试服务
host = "localhost:8093"
# 链接服务器
channel = grpc.ins... | 22.721519 | 63 | 0.645682 |
f0c345edda5e8d442134ca1a7a75fc99fe73a8f3 | 7,685 | py | Python | projects/controllers/operators.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | projects/controllers/operators.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | projects/controllers/operators.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Operator controller."""
from datetime import datetime
from sqlalchemy.exc import InvalidRequestError, ProgrammingError
from werkzeug.exceptions import BadRequest, NotFound
from ..database import db_session
from ..models import Operator
from .parameters import list_parameters
from .dependenc... | 30.74 | 98 | 0.708133 |
c5832c0bb540cabda8c7e8d4ca1400ad5ee8d81e | 1,196 | py | Python | src/visitpy/visit_utils/src/builtin/__init__.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_utils/src/builtin/__init__.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_utils/src/builtin/__init__.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: __init__.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 7/6/2020
description:
... | 27.181818 | 79 | 0.644649 |
7687548d795131d0cf62035310d06957afc97d8b | 207 | py | Python | Pythonskripte/ladeBildKeras.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Pythonskripte/ladeBildKeras.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Pythonskripte/ladeBildKeras.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | from keras.preprocessing.image import load_img
from keras.preprocessing.image import img_to_array
def ladeBild(pfad):
bild = load_img(pfad,grayscale=True)
array = img_to_array(bild)
return array
| 29.571429 | 50 | 0.782609 |
4f4e6ddd533e6bc19dfecc2da31d1ff1aaff5e22 | 1,423 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/test/test_len_leak.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/test/test_len_leak.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/test/test_len_leak.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | import pybedtools
fn = pybedtools.example_filename('a.bed')
def show_open_fds(func):
doc = func.__doc__
print()
print(doc)
print("." * len(doc))
orig_fds = pybedtools.helpers.n_open_fds()
obs = max(func(fn)) - orig_fds
assert obs == 0, obs
def func1(src):
"create bedtool in loop"
... | 23.327869 | 73 | 0.618412 |
4f98e0b9a19256dd90796a89491152b54c250289 | 2,206 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema/pipeline_context.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema/pipeline_context.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/pipeline_schema/pipeline_context.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Any, Callable, Dict, List, Optional
from watchmen_auth import PrincipalService
from watchmen_data_kernel.topic_schema import TopicSchema
from watchmen_model.admin import Pipeline
from watchmen_model.pipeline_kernel import PipelineMonitorLog, PipelineTriggerTraceId
from watchmen_pipeline_kernel.cache... | 38.034483 | 111 | 0.810063 |
96e4982fe079019360095d9e72b3758c2574834b | 1,058 | py | Python | doc/for_dev/scikit-image/setup.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | doc/for_dev/scikit-image/setup.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | doc/for_dev/scikit-image/setup.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | import os
import sys
from distutils.core import setup
from pathlib import Path
import numpy as np
from transonic.dist import make_backend_files, init_transonic_extensions
path_here = Path(__file__).parent.absolute()
include_dirs = [np.get_include()]
pack_name = "future"
paths = tuple((path_here / pack_name).glob("... | 24.045455 | 72 | 0.6862 |
fa004ae1897c15b09582bf92bb23ba8c65a0e28d | 3,033 | py | Python | research/cv/AVA_hpa/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/AVA_hpa/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/AVA_hpa/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... | 44.602941 | 101 | 0.695681 |
fa71190cf936a62d68d87a6d8cb4b216f3618a86 | 191 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_4/funcoes.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_4/funcoes.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_4/funcoes.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | variavel = 'Valor'
def func():
print(variavel)
def func2():
# global variavel // nn é boa pratica de programação
variavel = 'Outro valor'
print(variavel)
func()
func2()
| 11.9375 | 56 | 0.633508 |
ad8c43db18dd9d5563a7f2b24948f794b62ceaa7 | 7,883 | py | Python | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Common/Config.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 63 | 2018-02-04T03:31:22.000Z | 2022-03-07T08:27:39.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Common/Config.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 3 | 2020-06-15T03:41:03.000Z | 2020-06-15T03:41:04.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Common/Config.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 40 | 2018-01-22T16:31:16.000Z | 2022-03-08T04:40:42.000Z | import json
import mongodb_consistent_backup
import sys
from datetime import datetime
from argparse import Action
from pkgutil import walk_packages
from yconf import BaseConfiguration
from yconf.util import NestedDict
def parse_config_bool(item):
try:
if isinstance(item, bool):
return item
... | 46.64497 | 154 | 0.601674 |
0f369928c9ab0cab133f4a68378ba6e1b7117452 | 110 | py | Python | Shivani/ques 7.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/ques 7.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | Shivani/ques 7.py | 63Shivani/Python-BootCamp | 2ed0ef95af35d35c0602031670fecfc92d8cea0a | [
"MIT"
] | null | null | null | n=int(input("enter a number\n"))
if n%7==0:
print("Divisible by 7")
else:
print("Not Divisible by 7")
| 18.333333 | 32 | 0.618182 |
0f75ce3a9210a5be10331c3616a71310f8c3fa55 | 2,240 | py | Python | research/cv/StackedHourglass/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/StackedHourglass/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/StackedHourglass/eval.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... | 32.463768 | 105 | 0.662946 |
0e1ddc9e50051fdda82d76af3bfd3508c5f98cc5 | 364 | py | Python | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 86/86.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 86/86.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Exercises/Exercises/Exercise 86/86.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | #Create a script that checks a list against countries_clean.txt
#and creates a list with items that were in that file
checklist = ["Portugal", "Germany", "Munster", "Spain"]
with open("countries_clean.txt", "r") as file:
content = file.readlines()
content = [i.rstrip('\n') for i in content]
checked = [i for i in... | 28 | 63 | 0.711538 |
adac4f2c0f736271502537b4a0d2e317f0f6f4b2 | 1,299 | py | Python | python/tf_gpu.py | YA-androidapp/Python-cheatsheet-ML | eafa57d933a2bafd1e169c234acf987670ba790d | [
"Apache-2.0"
] | null | null | null | python/tf_gpu.py | YA-androidapp/Python-cheatsheet-ML | eafa57d933a2bafd1e169c234acf987670ba790d | [
"Apache-2.0"
] | null | null | null | python/tf_gpu.py | YA-androidapp/Python-cheatsheet-ML | eafa57d933a2bafd1e169c234acf987670ba790d | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
# GPU版Tensor Flowを、特定のGPUで実行する
GPU_INDEX = 2
tf.config.set_soft_device_placement(True)
tf.debugging.set_log_device_placement(True)
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
pr... | 28.866667 | 77 | 0.632794 |
2a2654d0ce2de2bd0820c91b45f5148096851e30 | 3,155 | py | Python | src/bo4e/bo/netznutzungsrechnung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/bo/netznutzungsrechnung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/bo/netznutzungsrechnung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Netznutzungsrechnung class and corresponding marshmallow schema for de-/serialization
"""
from typing import Optional
import attr
from marshmallow import fields
from marshmallow_enum import EnumField # type:ignore[import]
from bo4e.bo.rechnung import Rechnung, RechnungSchema
from bo4e.enum.botyp import ... | 40.448718 | 194 | 0.750872 |
aacc0d1d28f9c7a582c0a0dfc0dbd43b3058d58a | 1,422 | py | Python | src/setup.py | daimon99/santicms | 9b113b806cb43e94084ea474ba0aab51b32f9b3c | [
"MIT"
] | null | null | null | src/setup.py | daimon99/santicms | 9b113b806cb43e94084ea474ba0aab51b32f9b3c | [
"MIT"
] | null | null | null | src/setup.py | daimon99/santicms | 9b113b806cb43e94084ea474ba0aab51b32f9b3c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
def fread(filename):
with open(filename) as f:
return f.read()
setup(
name='santicms',
version='0.1',
author='Daimon',
author_email='daijian1@qq.com',
packages=find_packages(exclude=['tests', '... | 25.854545 | 71 | 0.563994 |
879c9d4d6448276aae2c134299887e7259cb38d1 | 1,096 | py | Python | data_log_sheet/migrations/0001_initial.py | antonnifo/DIT | 7c496f37bab70229cd84c4b33332708ea8cf278b | [
"MIT"
] | null | null | null | data_log_sheet/migrations/0001_initial.py | antonnifo/DIT | 7c496f37bab70229cd84c4b33332708ea8cf278b | [
"MIT"
] | null | null | null | data_log_sheet/migrations/0001_initial.py | antonnifo/DIT | 7c496f37bab70229cd84c4b33332708ea8cf278b | [
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-05-18 10:01
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='DataLogSheet',
fields=[
('id', models.BigAu... | 32.235294 | 117 | 0.531934 |
ea944c82bb12f999c40cd26c90c2a596a58bd720 | 1,020 | py | Python | src/crypt1.py | xiaonanln/python-usaco | 8f0fef19cb5f89232d985f79d955f0de5ef4e10d | [
"MIT"
] | null | null | null | src/crypt1.py | xiaonanln/python-usaco | 8f0fef19cb5f89232d985f79d955f0de5ef4e10d | [
"MIT"
] | null | null | null | src/crypt1.py | xiaonanln/python-usaco | 8f0fef19cb5f89232d985f79d955f0de5ef4e10d | [
"MIT"
] | null | null | null | """
ID: isaiahl1
LANG: PYTHON2
TASK: crypt1
"""
TASK = 'crypt1'
def readints(fin):
return tuple(int(x) for x in fin.readline().split())
def readint(fin):
return int(fin.readline())
def main(fin, fout):
N = readint(fin)
digits = readints(fin)
count = 0
print 'digits', digits
for a in digits:
if a == 0: cont... | 17 | 59 | 0.562745 |
17c3cc1f6ea3270b77093854c512d7f8473b2e7d | 5,949 | py | Python | Modell/CSV/diagramm_tf_genauigkeit.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Modell/CSV/diagramm_tf_genauigkeit.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | Modell/CSV/diagramm_tf_genauigkeit.py | NoahEmbedded/EmbeddedKWD | 2380d56b0b75bae4fedeb60885358332766f7319 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
#Input = Sprache
#output sprache
spIn_spOut = np.array([100,100,0.61,99.84,99.17,100,98.2,100,100,100,92.67,99.98,100,99.84,100,96.43,99.99,100,99.97,97.62,100,100,92.77,100,99.93,96.97,100,100,100,100,94.32,97.25,88.54,100,78.25,100,100,82.26,100,100,99.99,11.78,77.4... | 63.287234 | 1,510 | 0.598588 |
aa456aac60eda7b908eddcff08d55a6c001fb201 | 361 | py | Python | frappe-bench/apps/erpnext/erpnext/hr/utils.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/utils.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/hr/utils.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 _
def set_employee_name(doc):
if doc.employee and not doc.employee_name:
doc.employee_name = frappe.db.get_value("E... | 32.818182 | 84 | 0.792244 |
52c780264fc83fa227df87ffefd9844136e5e12a | 56 | py | Python | solutions/Textsys/Milvus-bert-server/src/const.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 1 | 2021-04-06T06:13:20.000Z | 2021-04-06T06:13:20.000Z | solutions/Textsys/Milvus-bert-server/src/const.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | null | null | null | solutions/Textsys/Milvus-bert-server/src/const.py | naetimus/bootcamp | 0182992df7c54012944b51fe9b70532ab6a0059b | [
"Apache-2.0"
] | 2 | 2021-06-14T23:50:25.000Z | 2021-06-21T10:30:34.000Z | UPLOAD_PATH="/tmp/result-mols"
default_cache_dir="./tmp" | 28 | 30 | 0.785714 |
dc98c0bc44c9e963e9caf14150d57ef48555a84a | 9,987 | py | Python | easyp2p/ui/main_window.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 4 | 2019-07-18T10:58:28.000Z | 2021-11-18T16:57:45.000Z | easyp2p/ui/main_window.py | Ceystyle/easyp2p | 99c32e3ec0ff5a34733f157dd1b53d1aa9bc9edc | [
"MIT"
] | 1 | 2019-07-05T09:21:47.000Z | 2019-07-05T09:21:47.000Z | easyp2p/ui/main_window.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
"""
Application for downloading and presenting investment results for
several people-to-people (P2P) lending platforms.
"""
from datetime import date, timedelta
import gc
import logging
import os
import sys
from typing import Set
from PyQt5.QtCor... | 36.054152 | 80 | 0.625713 |
bffc5e73043f9f440e068040f81bdf9b3a1d6010 | 4,299 | py | Python | web/controllers/user/User.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 1 | 2020-03-24T04:26:34.000Z | 2020-03-24T04:26:34.000Z | web/controllers/user/User.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | web/controllers/user/User.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Blueprint, request, jsonify, make_response, g, redirect
from common.models.User import (User)
from common.libs.user.UserService import (UserService)
from common.libs.Helper import (ops_render)
from common.libs.UrlManager import (UrlManager)
from application import app, db
impor... | 30.928058 | 96 | 0.619214 |
0dda58fa041b17a77b08b94ca9faf18663dfa17f | 125 | py | Python | historie/models.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 8 | 2019-11-26T13:34:46.000Z | 2021-06-21T13:41:57.000Z | historie/models.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 93 | 2019-12-16T09:29:10.000Z | 2021-04-24T12:03:33.000Z | historie/models.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 2 | 2020-12-03T12:43:19.000Z | 2020-12-22T21:48:47.000Z | from django.db import models
from django.contrib.auth.models import User
from simple_history import register
register(User)
| 20.833333 | 43 | 0.84 |
21a11cec17006998db2cd69cfb41b493e49eb088 | 203 | py | Python | savageml/models/__init__.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | savageml/models/__init__.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | savageml/models/__init__.py | savagewil/SavageML | d5aa9a5305b5de088e3bf32778252c877faec41d | [
"MIT"
] | null | null | null | from .base_model import BaseModel
from .matix_net_model import MatrixNetModel
from .layerless_dense_net_model import LayerlessDenseNetModel
from .layerless_sparse_net_model import LayerlessSparseNetModel | 50.75 | 63 | 0.906404 |
1d3104238a43acd1fab07c40823cb1f58af1e4a6 | 17,518 | py | Python | frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_plan/production_plan.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_plan/production_plan.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/manufacturing/doctype/production_plan/production_plan.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, json
from frappe import msgprint, _
from frappe.model.document import Document
from erpnext.manufacturing.doctype.bom.bom... | 34.966068 | 108 | 0.712296 |
1da64cb440ff66f51e1dd60e36c978a349c0eb78 | 4,406 | py | Python | app/problem/admin.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | 2 | 2019-06-24T08:34:39.000Z | 2019-06-27T12:23:47.000Z | app/problem/admin.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | app/problem/admin.py | pushyzheng/docker-oj-web | 119abae3763cd2e53c686a320af7f4f5af1f16ca | [
"MIT"
] | null | null | null | # encoding:utf-8
from app import app, db
from app.problem.models import Problem
from utils import logger, success
from app.auth.main import auth
from app.common.models import RoleName
from schemas.problem import *
import os
from flask import jsonify, g, abort
from flask_expects_json import expects_json
from sqlalchemy ... | 27.5375 | 90 | 0.688833 |
d53b0fcc700a8ea4071c41b5598165cb774021a1 | 191 | py | Python | weibo/test/testData.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/test/testData.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | weibo/test/testData.py | haiboz/weiboSpider | 517cae2ef3e7bccd9e1d328a40965406707f5362 | [
"Apache-2.0"
] | null | null | null | #coding:utf8
'''
Created on 2016年4月19日
@author: wb-zhaohaibo
'''
datas = []
weibo_data = {}
if weibo_data is None:
print "sss"
else:
print "---"
print len(weibo_data) | 14.692308 | 25 | 0.596859 |
63b753d6e11ef67e52bb5ca5c1df2f9489269cfa | 778 | py | Python | etc code/bodysize.py | gusghrlrl101/Dance-Helper | e9f5f6168f1dc6944c25cc8ff7eb829791fe484c | [
"MIT"
] | 11 | 2019-06-17T02:59:01.000Z | 2021-05-24T14:10:04.000Z | etc code/bodysize.py | RabbitG29/Dance-Helper | e9f5f6168f1dc6944c25cc8ff7eb829791fe484c | [
"MIT"
] | null | null | null | etc code/bodysize.py | RabbitG29/Dance-Helper | e9f5f6168f1dc6944c25cc8ff7eb829791fe484c | [
"MIT"
] | 3 | 2019-06-17T02:59:32.000Z | 2019-07-03T04:31:30.000Z | # -*- Encoding:UTF-8 -*- #
import pickle
import sys
import json
import os
# use -> python bodysize.py 0000
#file isn't exist
if(os.path.isfile('./'+str(sys.argv[1])+'body.txt')==False):
with open('./'+str(sys.argv[1])+'.pkl','rb') as f:
data = pickle.load(f)
print(1)
print(str(data))
# file 1 w... | 21.611111 | 60 | 0.604113 |
988b19bbdf15a5a8ae0c73a3429977fc96020f0b | 400 | py | Python | source/data.py | casulemarc/Job-Search-Engine | a86acd23a5e6f367706c978c25e39a4b65647da9 | [
"MIT"
] | null | null | null | source/data.py | casulemarc/Job-Search-Engine | a86acd23a5e6f367706c978c25e39a4b65647da9 | [
"MIT"
] | null | null | null | source/data.py | casulemarc/Job-Search-Engine | a86acd23a5e6f367706c978c25e39a4b65647da9 | [
"MIT"
] | null | null | null | import json
import requests
url = "https://aerodatabox.p.rapidapi.com/flights/%7BsearchBy%7D/KL1395/2020-06-10"
headers = {
'x-rapidapi-host': "aerodatabox.p.rapidapi.com",
'x-rapidapi-key': "eba13d5c36mshf3468974d77a55ep141171jsn483f22443c2d"
}
response = requests.get(url, headers)
print(response.stat... | 20 | 83 | 0.745 |
f695aefae34a2b259725eecfcb307a29a3c1ed7b | 367 | py | Python | pacman-arch/test/pacman/tests/fileconflict021.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/fileconflict021.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/fileconflict021.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "upgrade package overwriting existing unowned file with directory"
lp1 = pmpkg("pkg1")
self.addpkg2db("local", lp1)
self.filesystem = ["file"]
p = pmpkg("pkg1", "1.0-2")
p.files = ["file/"]
self.addpkg2db("sync", p)
self.args = "-S pkg1"
self.addrule("PACMAN_RETCODE=1")
self.addrule("PKG_VERSION... | 21.588235 | 85 | 0.697548 |
63de898b21d09598e67ceb8893ad2125a4918d24 | 8,412 | py | Python | ImageClassify/advanced CNN/Inseption_Network_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | 2 | 2021-08-25T01:13:29.000Z | 2021-10-10T14:49:59.000Z | ImageClassify/advanced CNN/Inseption_Network_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | ImageClassify/advanced CNN/Inseption_Network_xrh.py | Xinrihui/DeepLearningApp | 8d86b88251ee8d37358c642b1ec4a341767bfd17 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
# 适用于 tensorflow >= 2.0, keras 被直接集成到 tensorflow 的内部
# ref: https://keras.io/about/
from tensorflow.keras.layers import Input, Add, Dense, Activation, ZeroPadding2D, BatchNormalization, \
Flatten, Conv2D, AveragePooling2D, MaxPooling2D, Concatenate
from tensorflow.keras... | 29.006897 | 134 | 0.598431 |
d65b1c484963db8f2b62413fbf79cb491de541a5 | 4,444 | py | Python | tikz/histogram-symbols/process.py | RalfGuder/LaTeX-examples | a1bf9fe422969be1ca4674394ebd2170c07f7693 | [
"MIT"
] | 1,231 | 2015-01-07T04:04:25.000Z | 2022-03-31T17:43:29.000Z | tikz/histogram-symbols/process.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 5 | 2015-05-10T13:10:47.000Z | 2021-05-02T21:28:49.000Z | tikz/histogram-symbols/process.py | DoubleL61/LaTeX-examples | cd0d97f85fadb59b7c6e9062b37a8bf7d725ba0c | [
"MIT"
] | 400 | 2015-01-05T06:22:18.000Z | 2022-03-19T04:07:59.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import shutil
import fileinput
import math
def main(filename, bins, maximum, yticks_number):
with open(filename) as f:
content = f.read().split("\n")
numbers = []
for line in content:
line = line.strip()
... | 35.83871 | 74 | 0.550855 |
f67375b2c7330b24149920df54a5e5f1d0eacdd3 | 1,380 | py | Python | Import/sourceconfig.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 15 | 2019-12-20T08:24:31.000Z | 2022-03-18T09:24:25.000Z | Import/sourceconfig.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 124 | 2020-04-20T04:36:49.000Z | 2022-01-29T11:08:09.000Z | Import/sourceconfig.py | simonbredemeier/ds100bot | 1318b32b818891f4bc6d24f12fcf0ceae898f8bd | [
"Apache-2.0"
] | 12 | 2020-07-08T22:19:39.000Z | 2022-03-19T09:13:11.000Z | #!/usr/bin/python3
"""Read source configuation"""
import json
import Persistence.log as log
from .access import Access
from .datasource import DataSource
from .error import JsonError
log_ = log.getLogger(__name__, fmt='{name}:{levelname} {message}')
class SourceConfig:
# pylint: disable=R0903
# pylint: disab... | 33.658537 | 84 | 0.589855 |
148b206c3c6ca638a80a7e50cc4cd86151aedeec | 1,386 | py | Python | Openharmony v1.0/vendor/hisi/hi35xx/third_party/uboot/tools/binman/etype/intel_fit_ptr.py | clkbit123/TheOpenHarmony | 0e6bcd9dee9f1a2481d762966b8bbd24baad6159 | [
"MIT"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/intel_fit_ptr.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/binman/etype/intel_fit_ptr.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: GPL-2.0+
# Copyright (c) 2016 Google, Inc
# Written by Simon Glass <sjg@chromium.org>
#
# Entry-type module for a pointer to an Intel Firmware Image Table
#
import struct
from blob import Entry_blob
class Entry_intel_fit_ptr(Entry_blob):
"""Intel Firmware Image Table (FIT) pointer
... | 33 | 82 | 0.681818 |
1adae5a15574475e8bd20b0d1402f83b31784d12 | 5,639 | py | Python | deploy/deployctl/subcommands/reads_deployments.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | deploy/deployctl/subcommands/reads_deployments.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | deploy/deployctl/subcommands/reads_deployments.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import argparse
import datetime
import glob
import os
import string
import sys
import typing
from deployctl.config import config
from deployctl.shell import kubectl, get_most_recent_tag, image_exists, get_k8s_deployments
KUSTOMIZATION_TEMPLATE = """---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
... | 34.175758 | 113 | 0.705622 |
25bdfa008f2a95104a12531524f6faf12c54dfaa | 1,156 | py | Python | dme2sms-readserial.py | JanKl/dme2sms-readserial | 11f9185217a3172b2a3da042a9d4ab6208e66ca5 | [
"MIT"
] | 2 | 2020-10-05T21:09:51.000Z | 2021-05-02T20:37:55.000Z | dme2sms-readserial.py | JanKl/dme2sms-readserial | 11f9185217a3172b2a3da042a9d4ab6208e66ca5 | [
"MIT"
] | 1 | 2020-10-05T21:09:31.000Z | 2020-10-24T14:16:10.000Z | dme2sms-readserial.py | JanKl/dme2sms-readserial | 11f9185217a3172b2a3da042a9d4ab6208e66ca5 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import serial
import requests
import logging
import logging.handlers
from datetime import datetime
# Configuration
class Config:
def __init__(self):
self.port = '/dev/ttyUSB0'
self.baudRate = 9600
self.httpAddress = 'https://some.url/endpoint'
self.pagerEncoding = 'iso-8859-1'
# End of con... | 23.591837 | 76 | 0.742215 |
d3632e2704f2dc68dfa8e0c11f00eb6bf47d5229 | 854 | py | Python | migrations/versions/3ebd774ccac8_.py | nkxavis2907/aws-bank-backend | dc6b754b25d6ffe6f445cfac0f6c9bc745455c69 | [
"MIT"
] | 1 | 2021-09-13T21:05:44.000Z | 2021-09-13T21:05:44.000Z | migrations/versions/3ebd774ccac8_.py | nkxavis2907/aws-bank-backend | dc6b754b25d6ffe6f445cfac0f6c9bc745455c69 | [
"MIT"
] | null | null | null | migrations/versions/3ebd774ccac8_.py | nkxavis2907/aws-bank-backend | dc6b754b25d6ffe6f445cfac0f6c9bc745455c69 | [
"MIT"
] | null | null | null | """empty message
Revision ID: 3ebd774ccac8
Revises:
Create Date: 2021-09-08 10:58:39.971503
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3ebd774ccac8'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 24.4 | 66 | 0.679157 |
9fa16601331a4d15f932fd86f30221f5b9a102c0 | 531 | py | Python | Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/08_unsicherer_passwortsafe_cmd_argument.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/08_unsicherer_passwortsafe_cmd_argument.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_1/Kapitel_06_Stringbearbeitung/08_unsicherer_passwortsafe_cmd_argument.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Kopiert das Passwort des über das Kommandozeilenargument übergebenen Users
from pyperclip import copy, paste
import sys
if len(sys.argv[1]) < 3:
print('Eingabe Ungültig')
print('Ausführen mit: "file.py username"')
sys.exit()
PASS={'login' : 'User',
'passw' : 'helloworld123',
... | 25.285714 | 76 | 0.6629 |
4cc7c7dbf47998843ac4f588bf176345b7853efd | 135 | py | Python | python/python_new/Python 3/untitled2xx.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/untitled2xx.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/untitled2xx.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import numpy as np
a=np.array([[3,6],[7,5]])
b=np.array([[2,5],[3,9]])
c=a+b
d=a*b
e=a/b
print(c)
print(d)
print(e)
f=a.dot(b)
print(f) | 12.272727 | 25 | 0.577778 |
e23c199873b5109cb354456ae7445e719b05b8eb | 4,592 | py | Python | listings/chapter05/maze.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter05/maze.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter05/maze.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | import math
from node_search import get_path, dfs, bfs, a_star
# Das Beispiel-Labyrinth
maze_source = """+++++++++
+S +
+ +++++ +
+ +
+ ++ ++ +
+ +
+ +++++ +
+ G+
+++++++++"""
# Den String zu einem verschachtelten Array parsen, mit Fehlerbehandlung
def parse_maze(maze_str):
maze = []
lin... | 31.452055 | 78 | 0.649826 |
3950284be59a6034e25ef5f74d6f7dda95755788 | 2,885 | py | Python | quant/example/ex_bithumb.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 7 | 2017-10-22T15:00:09.000Z | 2019-09-19T11:45:43.000Z | quant/example/ex_bithumb.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 1 | 2018-01-19T16:19:40.000Z | 2018-01-19T16:19:40.000Z | quant/example/ex_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 quant import config
from quant.api.bithumb import PrivateClient
from quant.brokers._bithumb import Bithumb
"""test api client"""
# client = PrivateClient(config.Bithumb_API_KEY, config.Bithumb_SECRET_TOKEN)
# print(client.account())
# res = client.balances('bch')
#... | 26.227273 | 105 | 0.67591 |
ff066a26a64ad2687d5033abef542176438209dd | 678 | py | Python | user/migrations/0015_auto_20201214_1544.py | hhdMrLion/Product-System | e870225ab10c32688a87426d5943d922c47c4404 | [
"MIT"
] | 1 | 2021-06-18T03:03:42.000Z | 2021-06-18T03:03:42.000Z | user/migrations/0015_auto_20201214_1544.py | hhdMrLion/Product-System | e870225ab10c32688a87426d5943d922c47c4404 | [
"MIT"
] | null | null | null | user/migrations/0015_auto_20201214_1544.py | hhdMrLion/Product-System | e870225ab10c32688a87426d5943d922c47c4404 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.16 on 2020-12-14 07:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('user', '0014_auto_20201208_1402'),
]
operations = [
migrations.AddField(
model_name='user',
name='pro... | 28.25 | 128 | 0.551622 |
20d6255d4e75c908e9d39f8a6c64ba8b7d1b9907 | 1,091 | py | Python | Chapter10_Cython/2_CythonCode/tests/test_clipping.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter10_Cython/2_CythonCode/tests/test_clipping.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter10_Cython/2_CythonCode/tests/test_clipping.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | import random
from timeit import Timer
import numpy as np
import fastvector
v = fastvector.VectorND([random.random() for _ in range(100_000)])
a = np.array([random.random() for _ in range(100_000)])
# Timing test
import_string = \
'''from __main__ import v, a
import fastvector
import numpy as np'''
python_tim... | 25.372093 | 66 | 0.738772 |
45a4ddc78880b3450d4187d6ddca3f4938ef2639 | 305 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_6/rename_bom_update_tool.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_6/rename_bom_update_tool.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_6/rename_bom_update_tool.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe
def execute():
frappe.delete_doc_if_exists("DocType", "BOM Replace Tool")
frappe.reload_doctype("BOM")
frappe.db.sql("update tabBOM set conversion_rate=1 where conversion_rate is null or conversion_rate=0")
frappe.db.sql("update tabBOM set set_rate_of_sub_assembly_item_based_on_bom=1") | 43.571429 | 104 | 0.809836 |
b3035710e338b1926443a86f99d63286fcb58c3a | 1,801 | py | Python | Packs/ShiftManagement/Scripts/TimeToNextShift/TimeToNextShift.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ShiftManagement/Scripts/TimeToNextShift/TimeToNextShift.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ShiftManagement/Scripts/TimeToNextShift/TimeToNextShift.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
def get_time_to_next_shift(roles):
today_week_day = datetime.today().weekday()
# transform python weekday to demisto shift weekday(monday in python is 0 and in demisto is 1)
today_week_day = 0 if today_week_day == 6 else today_week_day + 1
for role in roles:
s... | 39.152174 | 117 | 0.618545 |
b35ea33bb31f5c99845d6bab422837444312204d | 1,368 | py | Python | readwriteexample/com/aaron/writeexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | readwriteexample/com/aaron/writeexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | readwriteexample/com/aaron/writeexample.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
"""write showcase"""
__author__ = "aaron.qiu"
import sys
import pprint
def write_file():
"""
r Open file for reading
w Open file for writing (will truncate file)
b binary more
r+ open file for reading and writing
a+ open file for reading and writing (appen... | 22.42623 | 59 | 0.605263 |
2fc403114f40114464ae167a39771c44bbaf3760 | 628 | py | Python | gestionNeuroLab_Panel_de_Control/migrations/0001_initial.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T01:20:45.000Z | 2021-01-09T01:20:45.000Z | gestionNeuroLab_Panel_de_Control/migrations/0001_initial.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | 1 | 2021-01-09T00:53:55.000Z | 2021-01-09T00:53:55.000Z | gestionNeuroLab_Panel_de_Control/migrations/0001_initial.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-21 20:06
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='APP_TableroControl',
fields=[
('id', model... | 27.304348 | 114 | 0.603503 |
2baf7459854f9574c18850fca7760e6475756b46 | 8,893 | py | Python | test/test_npu/test_network_ops/super_copy_contiguous_test.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/super_copy_contiguous_test.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/super_copy_contiguous_test.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... | 43.169903 | 116 | 0.583155 |
92019799eda54d4e67a9299deb5eb6c66639432b | 2,687 | py | Python | official/nlp/cpm/src/lr_schedule.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/nlp/cpm/src/lr_schedule.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/nlp/cpm/src/lr_schedule.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... | 36.310811 | 119 | 0.689617 |
5b3932f6acbb687ac535f9990ac5f392d8a35f5c | 1,572 | py | Python | 05 Hardwarenutzung/Fallbeispiele/src/hindernisdetektor.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 05 Hardwarenutzung/Fallbeispiele/src/hindernisdetektor.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 05 Hardwarenutzung/Fallbeispiele/src/hindernisdetektor.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | #! ./env/bin/python3
#encoding=utf-8
# Copyright (C) 2020 Dennis Schulmeister-Zimolong
#
# E-Mail: dhbw@windows3.de
# Webseite: https://www.wpvs.de
#
# Diese Quellcode ist lizenziert unter einer
# Creative Commons Namensnennung 4.0 International Lizenz
"""
Beispiel zur Ansteuerung des KY-032 Hindernisdetektors und de... | 27.578947 | 82 | 0.715013 |
45e7ff6920127c4e819acf0a4b9559fb39d7f357 | 23 | py | Python | scripts.py | Jerobeam/Mobile-Apps-Project | 1bae1b9ce9fd57442053e93695abcd2b85983673 | [
"Apache-2.0"
] | null | null | null | scripts.py | Jerobeam/Mobile-Apps-Project | 1bae1b9ce9fd57442053e93695abcd2b85983673 | [
"Apache-2.0"
] | null | null | null | scripts.py | Jerobeam/Mobile-Apps-Project | 1bae1b9ce9fd57442053e93695abcd2b85983673 | [
"Apache-2.0"
] | null | null | null | def int = 1
return int | 7.666667 | 11 | 0.695652 |
942bc93df4d24e12395912b80081ecf7fec24cc8 | 1,715 | py | Python | devices/relay.py | MiaranaDIY/Salamigal | 44ac98fa6463d46694e1f9343a0ebc788e7a88f8 | [
"MIT"
] | 3 | 2017-08-02T12:26:34.000Z | 2021-01-13T01:06:26.000Z | devices/relay.py | MiaranaDIY/Salamigal | 44ac98fa6463d46694e1f9343a0ebc788e7a88f8 | [
"MIT"
] | null | null | null | devices/relay.py | MiaranaDIY/Salamigal | 44ac98fa6463d46694e1f9343a0ebc788e7a88f8 | [
"MIT"
] | 3 | 2017-02-14T22:10:00.000Z | 2021-01-02T14:26:43.000Z | #Setup logging
import logging
import logging.config
logging.config.fileConfig('logging.conf')
# create logger
logger = logging.getLogger('root')
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM) # set board mode to Broadcom
GPIO.setwarnings(False)
import devices.device as device
import time
class Relay(device.Device):... | 30.087719 | 65 | 0.544606 |
04d943ca662fceb67e78226d43855550c4ea8eb7 | 768 | py | Python | backend/apps/iamstudent/migrations/0015_auto_20200409_1620.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/iamstudent/migrations/0015_auto_20200409_1620.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/iamstudent/migrations/0015_auto_20200409_1620.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-04-09 16:20
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('iamstudent', '0014_emailtohospital_send_date'),
]
operations = [
migrations.AlterField(
model_name='emailgroup',
nam... | 26.482759 | 65 | 0.583333 |
b6ce6d1d45e5895ee0b225fe6fcd9313721c5609 | 4,147 | py | Python | registry/migrations/0001_initial.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | null | null | null | registry/migrations/0001_initial.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | 5 | 2020-10-10T00:21:37.000Z | 2021-09-22T18:01:46.000Z | registry/migrations/0001_initial.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-10-19 21:22
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import registry.models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
... | 49.963855 | 170 | 0.588136 |
b6dcc4c9f5bc10c3024ca4c1131591fcb24ca28e | 3,394 | py | Python | src/onegov/activity/models/occasion_date.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/models/occasion_date.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/activity/models/occasion_date.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import sedate
from datetime import time
from enum import IntEnum
from onegov.core.orm import Base
from onegov.core.orm.mixins import TimestampMixin
from onegov.core.orm.types import UUID, UTCDateTime
from sqlalchemy import event
from sqlalchemy import CheckConstraint
from sqlalchemy import Column
from sqlalchemy impor... | 28.049587 | 76 | 0.659104 |
ed948d44bff9f65e30e8412b56d90950380640e4 | 103 | py | Python | gemtown/copyrights/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/copyrights/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/copyrights/apps.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class CopyrightsConfig(AppConfig):
name = 'gemtown.copyrights'
| 17.166667 | 34 | 0.776699 |
1e59890ebfcb2bc48c45d44f9e63ec7c95d78873 | 1,007 | py | Python | Data Analytics/Collecting Data on AWS/Querying Sales Data stream using Kinesis Analytics/data.py | djanshuman/Amazon-Web-Services-Learning-AWS- | d0c716f95e0d101705f29bca7b474e513fae8852 | [
"MIT"
] | null | null | null | Data Analytics/Collecting Data on AWS/Querying Sales Data stream using Kinesis Analytics/data.py | djanshuman/Amazon-Web-Services-Learning-AWS- | d0c716f95e0d101705f29bca7b474e513fae8852 | [
"MIT"
] | null | null | null | Data Analytics/Collecting Data on AWS/Querying Sales Data stream using Kinesis Analytics/data.py | djanshuman/Amazon-Web-Services-Learning-AWS- | d0c716f95e0d101705f29bca7b474e513fae8852 | [
"MIT"
] | null | null | null | import boto3
import json
import random
import time
import uuid
# Set a stream name for later
stream_name = 'sales'
# Create the Kinesis client
kinesis = boto3.client('kinesis', region_name='us-east-1')
# Create the Stream
kinesis.create_stream(
StreamName=stream_name,
ShardCount=1
)
def put_to_stream():
... | 21.891304 | 58 | 0.541212 |
1ee5b06c2f2649b8eb66f40fd0ca05f77bc99045 | 12,522 | py | Python | skil/jobs.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 23 | 2018-09-19T13:34:27.000Z | 2022-02-14T09:49:35.000Z | skil/jobs.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 33 | 2018-10-18T07:58:05.000Z | 2019-05-16T08:24:12.000Z | skil/jobs.py | pcrete/skil-python | 672a1aa9e8af020c960ab9ee280cbb6b194afc3f | [
"Apache-2.0"
] | 11 | 2018-10-21T18:58:57.000Z | 2022-02-14T09:49:36.000Z | import skil_client
class JobConfiguration(object):
"""JobConfiguration
A SKIL job configuration collects all data needed to set up and run a SKIL Job.
SKIL currently has inference and training jobs, each come with their respective
configuration.
# Arguments:
skil_model: a `skil.Model` in... | 39.752381 | 115 | 0.667785 |
7834500c6231c267611ee9eca3901b3236379dea | 1,842 | py | Python | db/ops/trews-model/deploy_model.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 6 | 2018-06-27T00:09:55.000Z | 2019-03-07T14:06:53.000Z | db/ops/trews-model/deploy_model.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2021-03-31T18:37:46.000Z | 2021-06-01T21:49:41.000Z | db/ops/trews-model/deploy_model.py | cloud-cds/cds-stack | d68a1654d4f604369a071f784cdb5c42fc855d6e | [
"Apache-2.0"
] | 3 | 2020-01-24T16:40:49.000Z | 2021-09-30T02:28:55.000Z | # deploy model parameters to opsdx
# please make sure the file names are correct before deployment
# please run this script on either dev or prod controller
import os, sys
from sqlalchemy import create_engine, types, text
import pandas as pd
DB_CONN_STR = 'postgresql://{}:{}@{}:{}/{}'
user = os.environ['db_user']
host... | 32.315789 | 98 | 0.775244 |
153f8bf6af9aedf1816bf59f9c152b6b9c4eb60e | 2,199 | py | Python | LifeMeter.py | VizStars7/LifeMeter | f67abf0a8f897788b4e1072685a0a74cd54d797d | [
"Apache-2.0"
] | null | null | null | LifeMeter.py | VizStars7/LifeMeter | f67abf0a8f897788b4e1072685a0a74cd54d797d | [
"Apache-2.0"
] | null | null | null | LifeMeter.py | VizStars7/LifeMeter | f67abf0a8f897788b4e1072685a0a74cd54d797d | [
"Apache-2.0"
] | null | null | null | import marshal
exec(marshal.loads(b'\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x00\x00\x00@\x00\x00\x00s\xd0\x00\x00\x00d\x00d\x01l\x00m\x01Z\x01\x01\x00d\x02Z\x02e\x01d\x03\x83\x01\x01\x00e\x03e\x02\x83\x01\x01\x00e\x04d\x04\x83\x01Z\x05e\x01d\x03\x83\x01\x01\x00e\x03d\x05e\x05\x83\x02\x01\x00e\x01d\x03\... | 1,099.5 | 2,184 | 0.606185 |
bf1842aa4e5062df138a77a5ea239b50705eed97 | 1,656 | py | Python | research/recommend/Fat-DeepFFM/src/lr_generator.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/recommend/Fat-DeepFFM/src/lr_generator.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/recommend/Fat-DeepFFM/src/lr_generator.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... | 36 | 103 | 0.65942 |
171f8c597f1eff7b890f85f7a9bf2e1f0e6d5e2d | 244 | py | Python | 7-assets/past-student-repos/data_struct_and_algo-master/rotateImage.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/data_struct_and_algo-master/rotateImage.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/data_struct_and_algo-master/rotateImage.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | def Rotate(arr):
temp=[]
for i in range(len(arr)):
for j in range(0,len(arr)):
if i != j and i < j :
arr[i][j],arr[j][i]=arr[j][i],arr[i][j]
for l in arr:
l.reverse()
print(l)
arr=[[1,2,3],
[4,5,6],
[7,8,9]]
Rotate(arr)
| 13.555556 | 43 | 0.508197 |
e55666b8fa21fb8ab12151e3051f46b0136aa931 | 352 | py | Python | ___Python/Marco/PythonProj/p06_persistence/m02_json.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Marco/PythonProj/p06_persistence/m02_json.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Marco/PythonProj/p06_persistence/m02_json.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import json
from p01.m_01 import teilnehmerliste
# "Pickling" / Serialization / Marshalling / Flattening
with open("teilnehmer.json", "w") as datei:
json.dump(teilnehmerliste, datei, default=str)
# "Unpickling" / Deserialization / Unmarshalling
with open("teilnehmer.json", "r") as datei:
liste = js... | 25.142857 | 56 | 0.704545 |
970549b5605ba7a5244d32d28d6a8baf0adecb24 | 5,192 | py | Python | src/onegov/town6/theme/town_theme.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/theme/town_theme.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/town6/theme/town_theme.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import os
from collections import OrderedDict
from onegov.foundation6 import BaseTheme
from onegov.core.utils import module_path
HELVETICA = '"Helvetica Neue", Helvetica, Roboto, Arial, sans-serif !default'
ARIAL = 'Arial, sans-serif !default'
VERDANA = 'Verdana, Geneva, sans-serif !default'
COURIER_NEW = '"Courier N... | 27.913978 | 77 | 0.52369 |
97510af780e47e47e693a532f22bce6b44b9d481 | 3,397 | py | Python | nomespoo.py | PedroPegado/POO | 3fbf36d77770b7c03d829b1eb0bd59eb4750a1cf | [
"MIT"
] | null | null | null | nomespoo.py | PedroPegado/POO | 3fbf36d77770b7c03d829b1eb0bd59eb4750a1cf | [
"MIT"
] | null | null | null | nomespoo.py | PedroPegado/POO | 3fbf36d77770b7c03d829b1eb0bd59eb4750a1cf | [
"MIT"
] | null | null | null | import turtle
import time
import random
class Name:
def __init__(self, nome):
self.nome = nome
self.t = turtle.Turtle()
self.shapes = ['arrow', 'turtle', 'circle',
'square', 'triangle', 'classic']
self.colors = ['red', 'blue', 'green',
... | 24.092199 | 58 | 0.516338 |
979b91d17c8eecbc0eb22eacbc64f25f5a05b9e0 | 6,809 | py | Python | official_examples/Reinforcement_Learning_Custom_Env_Example_Code/custom_env/snake_env.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | official_examples/Reinforcement_Learning_Custom_Env_Example_Code/custom_env/snake_env.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | official_examples/Reinforcement_Learning_Custom_Env_Example_Code/custom_env/snake_env.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | from collections import deque
import gym
import numpy as np
from gym import spaces, logger
from gym.utils import seeding
class SnakeAction(object):
LEFT = 0
RIGHT = 1
UP = 2
DOWN = 3
class BoardColor(object):
BODY_COLOR = np.array([0, 0, 0], dtype=np.uint8)
FOOD_COLOR = np.array([0, 255, 0]... | 29.995595 | 116 | 0.575562 |
979e9407221c95d45a3c9bd89de097c649dd4b1c | 76 | py | Python | Sketche/nature_of_code/chapter_1/random2d_test.py | kantel/p5 | 2ef14191c35fdb056b44624c6ff0ff764c88cc30 | [
"MIT"
] | null | null | null | Sketche/nature_of_code/chapter_1/random2d_test.py | kantel/p5 | 2ef14191c35fdb056b44624c6ff0ff764c88cc30 | [
"MIT"
] | null | null | null | Sketche/nature_of_code/chapter_1/random2d_test.py | kantel/p5 | 2ef14191c35fdb056b44624c6ff0ff764c88cc30 | [
"MIT"
] | null | null | null | from pvector import PVector
v = PVector.random2D()
print(v)
print(v.mag())
| 12.666667 | 27 | 0.723684 |
97abcbd448c8ebbaa7a913e2457fd4ba972704c3 | 1,724 | py | Python | IJCTF/2021/crypto/ECSign/problem.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | IJCTF/2021/crypto/ECSign/problem.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | IJCTF/2021/crypto/ECSign/problem.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | import hashlib
import random
from Crypto.Util.number import inverse, bytes_to_long, long_to_bytes
from Crypto.Random import get_random_bytes
from Crypto.Cipher import AES
from Crypto.Util.Padding import pad, unpad
from ecdsa import NIST256p
from flag import FLAG
message = b"ECDSA prevents forging messages"
curve = N... | 28.733333 | 74 | 0.643271 |
c151dea181eca56694482f171a716c1e6512656b | 2,022 | py | Python | research/cv/vnet/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/vnet/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/vnet/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... | 48.142857 | 115 | 0.698318 |
a9eb97ef7cc74832e2e53fba6df8ac730e91144b | 143 | py | Python | append_version_to_progname.py | slankes/HB-RF-ETH | e003aaa189f1fad8965da06b9e73734319d99093 | [
"Apache-2.0"
] | 21 | 2020-07-16T13:18:13.000Z | 2022-03-27T16:56:51.000Z | append_version_to_progname.py | slankes/HB-RF-ETH | e003aaa189f1fad8965da06b9e73734319d99093 | [
"Apache-2.0"
] | 29 | 2020-09-17T14:53:37.000Z | 2022-03-23T04:35:29.000Z | append_version_to_progname.py | slankes/HB-RF-ETH | e003aaa189f1fad8965da06b9e73734319d99093 | [
"Apache-2.0"
] | 6 | 2020-12-20T10:33:20.000Z | 2022-01-16T12:02:21.000Z | Import("env")
with open("version.txt") as fp:
version = fp.readline()
env.Replace(PROGNAME="firmware_%s" % version.replace(".", "_"))
| 23.833333 | 67 | 0.636364 |
e71086fd817817e3c98c5fea6f8b2efbf218f7d5 | 2,946 | py | Python | marsyas-vamp/marsyas/src/swig/python/modules/marsyas_util.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/swig/python/modules/marsyas_util.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/swig/python/modules/marsyas_util.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/evn python
from pylab import *
import marsyas
import string
msm = marsyas.MarSystemManager()
# create a MarSystem from a recursive list specification
def create(net):
composite = msm.create("Gain/id") # will be overwritten
if net.__class__ == marsyas.MarSystem:
composite = net
elif len... | 33.101124 | 108 | 0.631365 |
e778cca89246c70fd08a4c9b98e8d471a1c6c386 | 181 | py | Python | src/autograph/views.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | src/autograph/views.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | src/autograph/views.py | RobetSlovev39/AutoGraph | c8bdb358b95143ab0d8c6f7c475a6c21f7a76b95 | [
"MIT"
] | null | null | null | from .services.core import update_devices
from django.http import HttpResponse, HttpRequest
def index_view(request: HttpRequest) -> HttpResponse:
return HttpResponse('works')
| 25.857143 | 53 | 0.801105 |
82413fcb1d7e92b34a949ae2861531b9eac50322 | 1,045 | py | Python | tools/generate-csv.py | ndoell/owasp-masvs | 38caa79050b8669d0ed198158f8b767ff12d3c3b | [
"CC0-1.0"
] | 1,368 | 2016-09-14T02:34:05.000Z | 2022-03-31T10:10:36.000Z | tools/generate-csv.py | ndoell/owasp-masvs | 38caa79050b8669d0ed198158f8b767ff12d3c3b | [
"CC0-1.0"
] | 371 | 2016-09-14T12:07:14.000Z | 2022-03-08T23:43:04.000Z | tools/generate-csv.py | ndoell/owasp-masvs | 38caa79050b8669d0ed198158f8b767ff12d3c3b | [
"CC0-1.0"
] | 369 | 2016-09-15T20:05:12.000Z | 2022-03-28T11:25:31.000Z | #!/usr/bin/python
""" Quick and Dirty Roberto Martelloni's script to generate a CSV """
import os
def fromFilenameToArea(filename):
splittedFilename = filename.split("-")
id = splittedFilename[1]
name = splittedFilename[2].split(".")
name = name[0].replace("_", " ")
return id, name
def parse... | 23.222222 | 69 | 0.499522 |
4166c469b02e4268ab4202a5ca776d48e180f028 | 2,532 | py | Python | partner_ngos/programs_management/doctype/project_indicator_log/project_indicator_log.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | partner_ngos/programs_management/doctype/project_indicator_log/project_indicator_log.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | partner_ngos/programs_management/doctype/project_indicator_log/project_indicator_log.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, Akram Mutaher and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _, throw
from frappe.model.document import Document
from frappe.utils import (flt, getdate, get_last_day)
class Projec... | 37.791045 | 177 | 0.697077 |
d8dd2557068872ec19187051013dce2dc953ee23 | 381 | py | Python | RDS/circle3_central_services/research_manager/src/tests/test_enum_status.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 10 | 2020-06-24T08:22:24.000Z | 2022-01-13T16:17:36.000Z | RDS/circle3_central_services/research_manager/src/tests/test_enum_status.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 78 | 2020-01-23T14:32:06.000Z | 2022-03-07T14:11:16.000Z | RDS/circle3_central_services/research_manager/src/tests/test_enum_status.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 1 | 2020-06-24T08:33:48.000Z | 2020-06-24T08:33:48.000Z | import unittest
from lib.EnumStatus import Status
class Test_Enum_Status(unittest.TestCase):
def test_successor(self):
self.assertEqual(1, Status.CREATED.value)
self.assertEqual(Status.WORK, Status.CREATED.succ())
self.assertEqual(Status.DONE, Status.CREATED.succ().succ())
with sel... | 34.636364 | 67 | 0.708661 |
996cc5b136e26ff7439f20c1e4227fa072359291 | 1,802 | py | Python | pvs_suban/migrations/serializers.py | hackit90/django-invoices | 770d5cffe7831539b885c517b0a435cc764e0a8c | [
"MIT"
] | null | null | null | pvs_suban/migrations/serializers.py | hackit90/django-invoices | 770d5cffe7831539b885c517b0a435cc764e0a8c | [
"MIT"
] | null | null | null | pvs_suban/migrations/serializers.py | hackit90/django-invoices | 770d5cffe7831539b885c517b0a435cc764e0a8c | [
"MIT"
] | null | null | null | from rest_framework import serializers
from rest_framework.serializers import ModelSerializer
from .models import Contact, InvoicePosition, Address, Invoice, Country
#Adresse integrieren
class AddressNestedSerializer(ModelSerializer):
class Meta:
model = Address
fields = ['street', 'zip', 'city', '... | 36.04 | 105 | 0.699223 |
9986b0dfc370a29617c0d095335ce679cb492b4d | 284 | py | Python | Scripts/Leibniz'sFormulaForCalculatingPi.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 8 | 2020-10-26T06:51:06.000Z | 2021-04-02T13:01:27.000Z | Scripts/Leibniz'sFormulaForCalculatingPi.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 71 | 2020-10-25T22:46:02.000Z | 2021-10-14T06:47:39.000Z | Scripts/Leibniz'sFormulaForCalculatingPi.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 77 | 2020-10-24T01:53:46.000Z | 2021-10-01T06:25:27.000Z | def myPi(n):
denominator = 1
addto = 1
for i in range(n):
denominator = denominator + 2
addto = addto - (1/denominator)
denominator = denominator + 2
addto = addto + (1/denominator)
pi = addto * 4
return(pi)
print(myPi(1000000)) | 18.933333 | 39 | 0.56338 |
5120133cae90addfcec60d790951128203656f2d | 1,077 | py | Python | loesungen/chapter06/import-csv-semicolon.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | loesungen/chapter06/import-csv-semicolon.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | loesungen/chapter06/import-csv-semicolon.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | import csv
# Sniffer-Instanz erzeugen
sniffer = csv.Sniffer()
# Schleife über die zu prüfenden Dateien
csv_filename = 'iris-semicolon.csv'
print(csv_filename)
with open(csv_filename, 'r', newline = '') as csv_file:
# Die ersten 1024 Byte der Datei lesen
chunk = csv_file.read(1024)
# Prüfen, ob die Datei ei... | 34.741935 | 62 | 0.701021 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.