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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
20c19209b095276b07a15056bf310639f65d3eb4 | 5,166 | py | Python | research/cv/E-NET/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/E-NET/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/E-NET/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.435115 | 91 | 0.680604 |
45c5d96405da968a5d5bf3284f3fcd16f2670cf8 | 22,072 | py | Python | src/main/python/supervolt/supervoltbatterybleak.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/supervolt/supervoltbatterybleak.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/supervolt/supervoltbatterybleak.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
'''
connect to: 84:28:D7:8F:54:70
notificationhandler installed
services:
Service <uuid=Generic Attribute handleStart=1 handleEnd=4>
Service <uuid=Generic Access handleStart=5 handleEnd=13>
Service <uuid=6e400001-b5a3-f393-e0a9-e50e24dcca9e handleStart=14 handleEnd=65535>
characteristics:
Cha... | 45.697723 | 144 | 0.484052 |
b30a989f69be5139d101f877b771780c49549dab | 2,544 | py | Python | Compile-pyc-main/compile-v7.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Compile-pyc-main/compile-v7.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Compile-pyc-main/compile-v7.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # ENCYPT BY ALDI
# YOUTUBE MR.1557
exec((lambda _ : (__import__('base64').b85decode(_)))(b'BOxz!b8;_YX>KoYd30!RZVDqHEh;S_V{c?>Zf80mb#!JeI3O)5Eed9GZ*3rOd0%61ZE$I9Wguy7aBp&SAY*TBaA|C13TbU{Z*p`XZ*wdlb9r+tAarSMWeN%-EiElAEiElAEiElAEiElAEh7pFBOq#JZfSEMcVTjFVIVOyARr?O3TS5_Js=`nFf%h-Fgr6cZ6Y8e3TSj7Js=`nFf%h-F*`FdZ6Y8e3S(y=Js=`... | 115.636364 | 2,112 | 0.786164 |
2bba088d6e23391acaccb371f7f5c14dae4e9928 | 847 | py | Python | INBa/2015/SHEMYAKIN_A_V/task_7_31.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/SHEMYAKIN_A_V/task_7_31.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/SHEMYAKIN_A_V/task_7_31.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 7. Вариант 31.
# Разработайте систему начисления очков для задачи 6, в соответствии с которой игрок получал бы большее количество баллов за меньшее количество попыток.
# Шемякин А.В.
# 23.5.16
planeti = ["Земля", "Марс", "Юпитер", "Венера", "Сатурн", "Нептун", "Уран", "Меркурий"] #список планет
import random... | 40.333333 | 153 | 0.720189 |
5b4c18152d361a631c860630605c1bc6a6517a54 | 12,491 | py | Python | import.py | BackInBash/cov19-ki | 793239f5ed2de985f367c590316fe0b710724d82 | [
"MIT"
] | null | null | null | import.py | BackInBash/cov19-ki | 793239f5ed2de985f367c590316fe0b710724d82 | [
"MIT"
] | null | null | null | import.py | BackInBash/cov19-ki | 793239f5ed2de985f367c590316fe0b710724d82 | [
"MIT"
] | null | null | null | # Import Data from intensivregister.de to SQLite DB
import threading
from db import create_struct, add_kh, add_fallzahl, write_to_file, execute_sql
from kreisid import kreisid
from sqlParser import Parser
from dataclasses import dataclass
from uuid import UUID
import requests
import csv
from io import StringIO
import ... | 64.720207 | 2,541 | 0.664078 |
5bb3df04ebdb3e11ed2d52ac837405d999926e68 | 2,958 | py | Python | tspdb/src/algorithms/svdWrapper.py | swipswaps/tspdb | 9c085cef7164c114bb0952519b9715dcfa072b34 | [
"Apache-2.0"
] | 43 | 2019-12-10T00:05:51.000Z | 2022-03-31T21:21:20.000Z | tspdb/src/algorithms/svdWrapper.py | swipswaps/tspdb | 9c085cef7164c114bb0952519b9715dcfa072b34 | [
"Apache-2.0"
] | 5 | 2021-05-09T01:12:31.000Z | 2022-03-29T17:34:15.000Z | tspdb/src/algorithms/svdWrapper.py | swipswaps/tspdb | 9c085cef7164c114bb0952519b9715dcfa072b34 | [
"Apache-2.0"
] | 14 | 2020-01-13T21:20:07.000Z | 2022-03-31T02:11:26.000Z | ######################################################
#
# A wrapper for the SVD implementation of choice
#
######################################################
import numpy as np
from tspdb.src import tsUtils
class SVDWrapper:
def __init__(self, matrix, method='numpy', threshold = 0.90):
if ... | 34 | 110 | 0.534483 |
1b9cae401189724fcef7c771f1a61d5aaf9c7fdd | 127 | py | Python | torch/utils/data/communication/__init__.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 183 | 2018-04-06T21:10:36.000Z | 2022-03-30T15:05:24.000Z | torch/utils/data/communication/__init__.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 631 | 2018-06-05T16:59:11.000Z | 2022-03-31T16:26:57.000Z | torch/utils/data/communication/__init__.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 58 | 2018-06-05T16:40:18.000Z | 2022-03-16T15:37:29.000Z | from . import eventloop
from . import iter
from . import map
from . import messages
from . import protocol
from . import queue
| 18.142857 | 23 | 0.76378 |
6d0e87f22b203baa00f9978e2cbcd6589e15071b | 883 | py | Python | source/pkgsrc/devel/py-gitinspector/patches/patch-gitinspector_localization.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/py-gitinspector/patches/patch-gitinspector_localization.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/py-gitinspector/patches/patch-gitinspector_localization.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-gitinspector_localization.py,v 1.1 2021/02/25 02:03:47 markd Exp $
Build fix for python >=3.8
https://github.com/ejwa/gitinspector/issues/216
--- gitinspector/localization.py.orig 2016-02-03 13:25:05.000000000 +0000
+++ gitinspector/localization.py
@@ -73,7 +73,7 @@ def init():
__enabled__ = True
... | 27.59375 | 81 | 0.728199 |
eddafb563416ef76aeb84a15563bb19580b584af | 3,071 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_10/change_default_customer_credit_days.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_10/change_default_customer_credit_days.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_10/change_default_customer_credit_days.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("selling", "doctype", "customer")
frappe.reload_doc("buying", "doctype", "supplier")
frappe.reload_doc("setup", "doctype", "supplier_type")
frappe.reload_doc("accounts", "doctype", "payment_term")
frappe.reload_doc("accounts",... | 34.122222 | 110 | 0.734289 |
1e2174ba4ee6aed23eb0369b22683ecb763d7106 | 7,115 | py | Python | main.py | grishatop1/vordl | 24b81e96cf2ceb1064592082f966d539f2017b1c | [
"MIT"
] | null | null | null | main.py | grishatop1/vordl | 24b81e96cf2ceb1064592082f966d539f2017b1c | [
"MIT"
] | null | null | null | main.py | grishatop1/vordl | 24b81e96cf2ceb1064592082f966d539f2017b1c | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template
from flask import request
from flask_login import UserMixin
from flask_login import LoginManager
from flask_login import login_required
from flask_login import login_user
from flask_login import current_user
from flask_sqlalchemy import SQLAlchemy
import os
i... | 31.20614 | 204 | 0.631342 |
783d53f64bab23bd58dd615c9f9ff8fd69b92a02 | 1,958 | py | Python | RedPitayaUltraschall/sr04TriggerSamp.py | StefanMack/RedPitaya | f1de620e2f2f8d8bd239863386a79087705dd9d0 | [
"CC0-1.0"
] | null | null | null | RedPitayaUltraschall/sr04TriggerSamp.py | StefanMack/RedPitaya | f1de620e2f2f8d8bd239863386a79087705dd9d0 | [
"CC0-1.0"
] | null | null | null | RedPitayaUltraschall/sr04TriggerSamp.py | StefanMack/RedPitaya | f1de620e2f2f8d8bd239863386a79087705dd9d0 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#Auslesen anloges Echosignal eines HC-SR04 Ultraschallsensors.
#Der Sensor wird am Eingang Trig über ein 100 µs langen Puls (3,3 V)
#über GPIO DIO0_N getriggert.
#Der Pin DIO0_p (EXT.FRIG.) wird als externer Trigger verwendet und nach
#einem 1:1 Spannungsteiler (Sensor ha... | 28.376812 | 79 | 0.716037 |
78965ad8ae8f2ad03fc9bd5971a061c7a17c99c0 | 1,843 | py | Python | StoryTellingGame/util/db.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | StoryTellingGame/util/db.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | 2 | 2017-10-26T16:52:58.000Z | 2017-11-01T16:58:52.000Z | StoryTellingGame/util/db.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | import sqlite3
import threading
class Database(object):
"""Database wrapper."""
def __init__(self, path, debug=False):
# type: (str) -> None
self.path = path
self.conn = sqlite3.connect(path, check_same_thread=False)
# mulithreading is only safe when Database.lock()... | 27.102941 | 95 | 0.53554 |
789db4e7ccde181a1e731a29b873de0d20c61008 | 1,242 | py | Python | 03 Python/Smart Home Dashboard/loesung/logfile/csv_data_logger.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/loesung/logfile/csv_data_logger.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/loesung/logfile/csv_data_logger.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | import csv, os
from datetime import datetime
from .data_logger import DataLogger
class CSVDataLogger(DataLogger):
"""
Ein einfacher Datenlogger, der die gemessenen Werte in einer immer
länger werdenden CSV-Datei fortschreibt.
"""
def __init__(self, filename):
"""
Konstruktor.
... | 32.684211 | 84 | 0.600644 |
78d6a66042291924f944347eb89f8e66d0374dec | 6,697 | py | Python | python/csv_duplicate_resolver.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 89 | 2015-02-13T13:46:06.000Z | 2022-03-13T16:42:44.000Z | python/csv_duplicate_resolver.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 91 | 2015-03-12T13:31:36.000Z | 2022-01-14T07:37:37.000Z | python/csv_duplicate_resolver.py | sma-h/openapc-de | 0ec2d42d525219d801f71538f5b30ca6fecd9d3a | [
"Cube"
] | 138 | 2015-03-04T15:23:43.000Z | 2022-03-09T15:11:52.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import argparse
import os
import sys
import json
import openapc_toolkit as oat
UD_FILE = "../data/unresolved_duplicates.csv"
EMPTY_LINE = ["NA","","NA","NA","NA","NA","NA","NA","NA","NA","NA","NA","FALSE","NA","NA","NA","NA","NA"]
QUOTE_MASK = [True, False, False, Tru... | 45.557823 | 192 | 0.64611 |
15287cd6e2e2348a0752ab7289cecccfd917d9ba | 114 | py | Python | game/entities/entity.py | Strange-Penguins/Stython | f4f96383681f311dd0ecceddf15417c78c974830 | [
"MIT"
] | 1 | 2021-03-13T21:50:12.000Z | 2021-03-13T21:50:12.000Z | game/entities/entity.py | Strange-Penguins/Stython | f4f96383681f311dd0ecceddf15417c78c974830 | [
"MIT"
] | 4 | 2021-03-13T22:22:11.000Z | 2021-03-14T22:17:49.000Z | game/entities/entity.py | Strange-Penguins/Stython | f4f96383681f311dd0ecceddf15417c78c974830 | [
"MIT"
] | null | null | null | # Spear fighter
# Swordsman
# Axeman
# Scout
# Light cavalry
# Heavy cavalry
# Ram
# Catapult
# Paladin
# Nobleman | 11.4 | 15 | 0.719298 |
da86e26100ff489e45d9dfca4f12356685230dfb | 340 | py | Python | WD/Cwiczenia/LosujeIWyswietlam.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | 1 | 2020-02-29T14:38:33.000Z | 2020-02-29T14:38:33.000Z | WD/Cwiczenia/LosujeIWyswietlam.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | WD/Cwiczenia/LosujeIWyswietlam.py | galursa/UWM | b7ab4a275662764a91af6c5bc79da0d98177d0ac | [
"MIT"
] | null | null | null | #pobieramy od użytkownika liczbę
#losujemy liczby tyle razy ile użytkownik podał
#każdą liczbe dodajemy na listę
import random
ileLosuj=input("Proszę podać ile liczb ma być wylosowanych")
ileLosuj=int(ileLosuj)
lista=[]
for i in range(ileLosuj):
z=random.random()
#print(str(z)+" ")
lista.appen... | 22.666667 | 61 | 0.711765 |
da8c3807b9e39b858316624c372cc5af08b5fc54 | 1,163 | py | Python | source/pkgsrc/lang/nodejs/patches/patch-tools_gyp_pylib_gyp_xcode__emulation.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/nodejs/patches/patch-tools_gyp_pylib_gyp_xcode__emulation.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/nodejs/patches/patch-tools_gyp_pylib_gyp_xcode__emulation.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-tools_gyp_pylib_gyp_xcode__emulation.py,v 1.2 2020/10/08 10:58:35 adam Exp $
Do not generate debugging symbols (uses lots of disk space).
--- tools/gyp/pylib/gyp/xcode_emulation.py.orig 2020-10-07 17:47:43.000000000 +0000
+++ tools/gyp/pylib/gyp/xcode_emulation.py
@@ -610,7 +610,7 @@ class XcodeSetting... | 46.52 | 91 | 0.635426 |
e556e5b4a5aa07cac5090841694c87a6d0d547b5 | 12,224 | py | Python | Packs/GoogleVisionAPI/Integrations/GoogleVisionAPI/GoogleVisionAPI.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/GoogleVisionAPI/Integrations/GoogleVisionAPI/GoogleVisionAPI.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/GoogleVisionAPI/Integrations/GoogleVisionAPI/GoogleVisionAPI.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 *
''' IMPORTS '''
import requests
import json
import base64
import httplib2
import urllib.parse
from apiclient import discovery
from oauth2client import service_account
from typing import Dict, List
# Disable insecure ... | 46.30303 | 116 | 0.648478 |
e55a6d0cffad45ea6cfdd6e2894a56ea8416e0e2 | 3,999 | py | Python | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/ocs_serial_action.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/ocs_serial_action.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Microsoft/Olympus_rack_manager/python-ocs/ocscli/ocs_serial_action.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | # Copyright (C) Microsoft Corporation. All rights reserved.
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#!/usr/bin... | 37.027778 | 134 | 0.64041 |
dad5b41752a58fc12027e1ea7141b73570fb7429 | 198 | py | Python | registry/apps.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | null | null | null | registry/apps.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | 5 | 2020-10-10T00:21:37.000Z | 2021-09-22T18:01:46.000Z | registry/apps.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class RegistryConfig(AppConfig):
name = 'registry'
def ready(self):
# noinspection unused,PyUnresolvedReferences
import registry.signals
| 19.8 | 52 | 0.717172 |
c11a9ba02214e959223f9295598ba606bb130ed1 | 1,177 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_09_Ein_und_Ausgabe/03_chapter_09_repetition_task_1_race_time/03_chapter_09_repetition_task_1_race_time.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_09_Ein_und_Ausgabe/03_chapter_09_repetition_task_1_race_time/03_chapter_09_repetition_task_1_race_time.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_09_Ein_und_Ausgabe/03_chapter_09_repetition_task_1_race_time/03_chapter_09_repetition_task_1_race_time.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 03_chapter_09_repetition_task_1.py
# Project: Kapitel_09_Ein_und_Ausgabe
# Created Date: Sunday 10.03.2019, 14:45
# Author: Apop85
# -----
# Last Modified: Sunday 10.03.2019, 15:02
# -----
# Copyright (c) 2019 Apop85
# This software is published under the MIT li... | 28.707317 | 87 | 0.697536 |
a9fadb5257bfb8401eb4b5112d20dc660460c0da | 415 | py | Python | tarefas-poo/lista-03/balde/view/paineis/painel_destroi_baldes.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/balde/view/paineis/painel_destroi_baldes.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-03/balde/view/paineis/painel_destroi_baldes.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5663
# Exercício do Balde
# --------------------------
# Classe que destroi os baldes criados.
#
from model.balde import Balde
class PainelDestroiBaldes:
def destrua(self, iu):
print('--- Destruir os Dois Baldes ---')
destruir = 's' == input('Qu... | 25.9375 | 76 | 0.542169 |
9914e2269a5c46ccbb3e13f51864066b039fb2cc | 843 | py | Python | pyntcloud/io/ascii.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 1,142 | 2016-10-10T08:55:30.000Z | 2022-03-30T04:46:16.000Z | pyntcloud/io/ascii.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 195 | 2016-10-10T08:30:37.000Z | 2022-02-17T12:51:17.000Z | pyntcloud/io/ascii.py | bernssolg/pyntcloud-master | 84cf000b7a7f69a2c1b36f9624f05f65160bf992 | [
"MIT"
] | 215 | 2017-02-28T00:50:29.000Z | 2022-03-22T17:01:31.000Z | import pandas as pd
def read_ascii(filename, **kwargs):
"""Read an ascii file and store elements in pandas DataFrame.
Parameters
----------
filename: str
Path to the filename
kwargs: pandas.read_csv supported kwargs
Check pandas documentation for all possibilities.
Returns
... | 18.733333 | 65 | 0.590747 |
9932f9c224ac3d5bb614a2843aa77b6a65fc4b5b | 1,577 | py | Python | python_reference/useful_scripts/large_csv_to_sqlite.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | python_reference/useful_scripts/large_csv_to_sqlite.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | python_reference/useful_scripts/large_csv_to_sqlite.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-10-14T07:30:18.000Z | 2019-10-14T07:30:18.000Z | # This is a workaround snippet for reading very large CSV that exceed the
# machine's memory and dump it into an SQLite database using pandas.
#
# Sebastian Raschka, 2015
#
# Tested in Python 3.4.2 and pandas 0.15.2
import pandas as pd
import sqlite3
from pandas.io import sql
import subprocess
# In and output file p... | 32.183673 | 96 | 0.663919 |
514cb021cc486c1c849471ce2a57eac677afd4c6 | 234 | py | Python | exercises/es/exc_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/es/exc_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/es/exc_01_02_02.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | # Importa spaCy
import ____
# Crea el objeto nlp para procesar alemán
nlp = ____
# Procesa un texto (aquí dice "Saludos cordiales!" en alemán)
doc = nlp("Liebe Grüße!")
# Imprime en pantalla el texto del documento
print(____.text)
| 19.5 | 61 | 0.739316 |
5ab0e04341405a44c19042d95259cc78fb519d25 | 4,024 | py | Python | Packs/JARM/Integrations/JARM/JARM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/JARM/Integrations/JARM/JARM.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/JARM/Integrations/JARM/JARM.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 * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
import asyncio
import requests
import traceback
from urllib.parse import urlparse
from ipaddress import ip_address
from typing import Dict, Tuple, Any
from jarm.sc... | 27.189189 | 88 | 0.627485 |
51785ef6e3b323533c52b33ac4000d6ca9abdb25 | 5,925 | py | Python | haas_lib_bundles/python/docs/examples/ws2812_matrix/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/ws2812_matrix/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/ws2812_matrix/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | # -*- coding:gbk -*-
import random # 随机数生成库
import ujson # json字串解析库
import utime # 延时API所在组件
import network # Wi-Fi功能所在库
from aliyunIoT import Device # 连接阿里云物联网平台的组件
from machine import Pin # 引脚控制
from neoPixelMatrix import NeoPixelMa... | 26.450893 | 110 | 0.552405 |
74263cf63ad75c355e4b53f5c62e05d719b240f6 | 933 | py | Python | rattler/auth/mixins.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 2 | 2017-12-17T21:28:22.000Z | 2018-02-02T14:44:58.000Z | rattler/auth/mixins.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 118 | 2017-10-31T13:45:09.000Z | 2018-02-24T20:51:42.000Z | rattler/auth/mixins.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | null | null | null | from django.shortcuts import HttpResponseRedirect
from django.utils.encoding import force_text
class NoLoginRequiredMixin(object):
redirect_url=None
def get_redirect_url(self):
"""
Override this method to override the redirect attribute.
"""
redirect_url = self.redirect_url or ... | 28.272727 | 83 | 0.655949 |
24f2e63c45122d10229e485234b8b0ad8c2b5648 | 4,346 | py | Python | tests/onegov/reservation/test_resource.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/reservation/test_resource.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/reservation/test_resource.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import pytest
import transaction
from datetime import datetime
from freezegun import freeze_time
from onegov.reservation.models import Resource
from pytz import utc
from uuid import uuid4
def test_libres_context_fixture(session_manager, libres_context):
assert session_manager is libres_context.get_service('sessi... | 28.03871 | 76 | 0.69098 |
8e64a17c9a76a4b508c43bbea9a22899e51c662a | 1,529 | py | Python | addition_module/DMUE/pretrain/utils/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/DMUE/pretrain/utils/dataset.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 115 | 2021-01-13T10:42:57.000Z | 2022-03-28T03:57:52.000Z | addition_module/DMUE/pretrain/utils/dataset.py | weihaoxie/FaceX-Zoo | db0b087e4f4d28152e172d6c8d3767a8870733b4 | [
"Apache-2.0"
] | 351 | 2021-01-13T07:21:00.000Z | 2022-03-29T14:11:39.000Z | import os
import random
import cv2
import torch
import numpy as np
from torch.utils.data import Dataset
from PIL import Image, ImageFile
def read_image(img_path):
"""Keep reading image until succeed.
This can avoid IOError incurred by heavy IO process."""
got_img = False
if not os.path.... | 30.58 | 110 | 0.620013 |
308b1df127e90bc511e7f849d4b7d8110f6a769a | 683 | py | Python | src/aijack/defense/ckks/utils.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 24 | 2021-11-17T02:16:47.000Z | 2022-03-27T01:04:08.000Z | src/aijack/defense/ckks/utils.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 9 | 2021-12-03T06:09:27.000Z | 2022-03-29T06:33:53.000Z | src/aijack/defense/ckks/utils.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 round_coordinates(coordinates):
"""Gives the integral rest."""
coordinates = coordinates - np.floor(coordinates)
return coordinates
def coordinate_wise_random_rounding(coordinates):
"""Rounds coordinates randonmly."""
r = round_coord... | 29.695652 | 88 | 0.714495 |
30c39a8d01ba7560ce8974a402a5b86053175864 | 4,942 | py | Python | scripts/component_graph/far/far_reader.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/component_graph/far/far_reader.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/far/far_reader.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python3
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Far Reader allows converting far files python dictionaries.
This package provides a simple way to convert binary based Far files int... | 37.157895 | 97 | 0.713274 |
eb91e1ee0610d45f734128c2f4f3a7f6f487c43e | 264 | py | Python | 1000 A+B/main.py | SLAPaper/hihoCoder | 3f64d678c5dd46db36345736eb56880fb2d2c5fe | [
"MIT"
] | null | null | null | 1000 A+B/main.py | SLAPaper/hihoCoder | 3f64d678c5dd46db36345736eb56880fb2d2c5fe | [
"MIT"
] | null | null | null | 1000 A+B/main.py | SLAPaper/hihoCoder | 3f64d678c5dd46db36345736eb56880fb2d2c5fe | [
"MIT"
] | null | null | null | from __future__ import print_function, division, absolute_import, unicode_literals
while True:
try:
# get raw_input and do all the calculation
m, n = (int(x) for x in raw_input().split())
print(m + n)
except EOFError:
break | 29.333333 | 82 | 0.647727 |
2461bab1ed8228c962a0dd7348b88c1dad1d7e25 | 1,026 | py | Python | src/balldetection/MinimalBall.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | 7 | 2015-11-27T09:53:32.000Z | 2021-01-13T17:35:54.000Z | src/balldetection/MinimalBall.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | null | null | null | src/balldetection/MinimalBall.py | florianletsch/kinect-juggling | f320cc0b55adf65d338d25986a03106a7e3f46ef | [
"Unlicense",
"MIT"
] | null | null | null | """
MinimalBall.py
---
A minimal ball detection. This is very plain and just there to
show an example of how the interface of the Ball Detection
should look like.
"""
# tmp
import cv
import numpy as np
import random
from src.Util import getcolour
from src.balldetection.Ball import Ball
class MinimalBallFilter(object)... | 25.02439 | 84 | 0.61306 |
cee4789a2e95cf3b7cb2ecfc637b92f271693bfa | 4,448 | py | Python | transonic/test_justintime.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 88 | 2019-01-08T16:39:08.000Z | 2022-02-06T14:19:23.000Z | transonic/test_justintime.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 13 | 2019-06-20T15:53:10.000Z | 2021-02-09T11:03:29.000Z | transonic/test_justintime.py | fluiddyn/transonic | a460e9f6d1139f79b668cb3306d1e8a7e190b72d | [
"BSD-3-Clause"
] | 1 | 2019-11-05T03:03:14.000Z | 2019-11-05T03:03:14.000Z | import sys
import os
from time import sleep
from shutil import rmtree
import numpy as np
import pytest
from transonic.backends import backends
from transonic.compiler import scheduler, wait_for_all_extensions
from transonic.justintime import modules
from transonic import mpi
from transonic.util import can_import_acce... | 22.351759 | 80 | 0.697842 |
3005173942c83371938ef192a7ea7f1507767684 | 1,270 | py | Python | src/training_main.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/training_main.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | null | null | null | src/training_main.py | msei/insectcounter | 1e9356e5639789b70c614da6c74307ec2b8c8304 | [
"MIT"
] | 2 | 2020-02-05T05:19:18.000Z | 2020-02-05T15:04:32.000Z | """
This is the main training module.
Args in cmd:
--data_dir: directory of the data. the subfolders in the top level
of this directory will be assumed to correspond to the classes
(species) and their names that will be learned. Subsequently,
all subfolders for each species will be crawled ... | 35.277778 | 105 | 0.722835 |
06aaa7ff16eaa80a14d2abfaba50372766339a20 | 453 | py | Python | 1-projects/Intro-Python-I-master/src/04_printing.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 1-projects/Intro-Python-I-master/src/04_printing.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 1-projects/Intro-Python-I-master/src/04_printing.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | """
Python provides a number of ways to perform printing. Research
how to print using the printf operator, the `format` string
method, and by using f-strings.
"""
x = 10
y = 2.24552
z = "I like turtles!"
# Using the printf operator (%), print the following feeding in the values of x,
# y, and z:
# x is 10, y is 2.25... | 26.647059 | 80 | 0.701987 |
88cb12d706aaa134f15b2bab5cf436218237343c | 4,179 | py | Python | Incremental/incremental/resource.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | Incremental/incremental/resource.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | Incremental/incremental/resource.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | from datetime import datetime as dt, timedelta as td
from discord import Embed, Colour
from discord.ext import commands
import asyncio
import logging
import sys
from . import *
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
stream_handler = logging.StreamHandler()
stream_format = logging.Formatter('[%(as... | 39.8 | 191 | 0.7296 |
aed4cabf8dbcffd6d86bc413272f971f47ea1092 | 65 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/pg-3.8-print-function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/pg-3.8-print-function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-003/pg-3.8-print-function.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | a = 1
b = 1.2
c = 'hello'
print(a, b, c)
print(a, b, c, 'world')
| 10.833333 | 23 | 0.492308 |
4e24d847b95a775ccaf11d3d788211d7f5d81359 | 887 | py | Python | ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/server.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/server.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | ais3-pre-exam-2022-writeup/Misc/JeetQode/chall/server.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | from problem import Problem
from problems.palindrome import IsPalindrome
from problems.invert_binary_tree import InvertBinaryTree
from problems.astmath import ASTMath
from typing import List
problems: List[Problem] = [IsPalindrome(), InvertBinaryTree(), ASTMath()]
print(
"Welcome to JeetQode, a place where you ca... | 29.566667 | 117 | 0.664036 |
9dfc5c62d8b1d0c6ce0497553f59f3e21bdaa602 | 2,346 | py | Python | old/info.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 2 | 2018-10-16T08:09:13.000Z | 2019-02-18T13:33:11.000Z | old/info.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 7 | 2019-02-28T18:10:44.000Z | 2019-03-04T21:09:03.000Z | old/info.py | Haus4/studienarbeit-stau | 10921f8850df67c797cf174b42fbc5dcec257251 | [
"MIT"
] | 1 | 2020-04-05T08:53:13.000Z | 2020-04-05T08:53:13.000Z | jam_info = {
"KA091": {
"1542291592000.jpg": [ True, False ],
"1542292095000.jpg": [ True, False ],
"1542292155000.jpg": [ True, True ],
"1542292214000.jpg": [ True, False ],
"1542292274000.jpg": [ True, False ],
"1542292334000.jpg": [ False, False ],
"1542292... | 42.654545 | 46 | 0.542626 |
c9cf7d89da02013075ac33f9fa19e4df2955e515 | 229 | py | Python | fastapi/tutorial-1-3-router/routers/users.py | pisitj/practice-python-web-framework | 5f7f60737b1cf9618e73ad8047b6c4f556d1feb0 | [
"MIT"
] | null | null | null | fastapi/tutorial-1-3-router/routers/users.py | pisitj/practice-python-web-framework | 5f7f60737b1cf9618e73ad8047b6c4f556d1feb0 | [
"MIT"
] | null | null | null | fastapi/tutorial-1-3-router/routers/users.py | pisitj/practice-python-web-framework | 5f7f60737b1cf9618e73ad8047b6c4f556d1feb0 | [
"MIT"
] | null | null | null | from fastapi import APIRouter
router = APIRouter(prefix="/users")
@router.get("/")
def get_user_list():
return {"message": "Get List of Users."}
@router.post("/")
def create_user():
return {"message": "Create a User."} | 20.818182 | 44 | 0.663755 |
a01dcfced216d2da79d9f293551a9e95b4f02ebb | 2,516 | py | Python | api/utils/measure_update_utils.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | api/utils/measure_update_utils.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | api/utils/measure_update_utils.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Corona-Info-App
# Helpers for Measure Updates
# © 2020 Tobias Höpp
# Include db connection
from main import db
# Include models
from models.measures import regionHasGroup, display, createSource, districtHasGroup
from utils.measure_utils import createDefaultGroup
def getOrmakeCategory(title... | 35.43662 | 138 | 0.653816 |
4eb67a827940973ec56414c4624637ddeef90985 | 611 | py | Python | scripts/save_consumer.py | FabianBell/24h-dezember-2021 | 139c5996479db0cdcb96189a2c89ee34c45a9d37 | [
"Apache-2.0"
] | null | null | null | scripts/save_consumer.py | FabianBell/24h-dezember-2021 | 139c5996479db0cdcb96189a2c89ee34c45a9d37 | [
"Apache-2.0"
] | 5 | 2021-12-17T09:52:50.000Z | 2021-12-17T10:50:05.000Z | scripts/save_consumer.py | FabianBell/24h-dezember-2021 | 139c5996479db0cdcb96189a2c89ee34c45a9d37 | [
"Apache-2.0"
] | null | null | null | import pika
import json
import base64
#INPUT_NAME = "FACE_RESTORE_RESPONSE"
INPUT_NAME = "ARCANE_RESPONSE"
def save(output_channel, method, properties, body):
body = json.loads(body)
img = base64.b64decode(body['image'])
with open('out.jpg', 'wb') as fout:
fout.write(img)
connection = pika.Block... | 24.44 | 78 | 0.756137 |
4eced3668dcb669ab36fc0c3760c6cefd43a519d | 755 | py | Python | ntpDenialService.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | ntpDenialService.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | ntpDenialService.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -*- coding: utf-8 -*-
# @Author: lock
# @Date: 2016-11-28 22:26:42
# @Last Modified by: lock
# @Last Modified time: 2016-11-28 22:26:47
import sys
import socket
if len(sys.argv) != 3:
print "usage: " + sys.argv[0] + " <host> <port>"
sys.exit(-1)
payload = "\x16\x0a\x00\x10\x00\x00\x00\x00\x00\x00\x0... | 39.736842 | 284 | 0.651656 |
118754a623b40e860bded5e593db22948c64b17a | 879 | py | Python | examples/nowcoder/SQL1/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | examples/nowcoder/SQL1/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | examples/nowcoder/SQL2/models.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | from django.db import models
# 该模型在执行migrate时, 会转换成一条建表语句
# CREATE TABLE `sql1_employees` (
# `emp_no` int(11) NOT NULL,
# `birth_date` date NOT NULL,
# `first_name` varchar(14) NOT NULL,
# `last_name` varchar(16) NOT NULL,
# `gender` varchar(1) NOT NULL,
# `hire_date` date NOT NULL,
# PRIMARY KEY (`emp... | 39.954545 | 81 | 0.698521 |
11a36af895a30c7d6a9998cf2fff6619eb62f395 | 819 | py | Python | python/p026.py | tlming16/Projec_Euler | 797824c5159fae67493de9eba24c22cc7512d95d | [
"MIT"
] | 4 | 2018-11-14T12:03:05.000Z | 2019-09-03T14:33:28.000Z | python/p026.py | tlming16/Projec_Euler | 797824c5159fae67493de9eba24c22cc7512d95d | [
"MIT"
] | null | null | null | python/p026.py | tlming16/Projec_Euler | 797824c5159fae67493de9eba24c22cc7512d95d | [
"MIT"
] | 1 | 2018-11-17T14:39:22.000Z | 2018-11-17T14:39:22.000Z | #!/usr/bin/python3
#-*- coding:utf-8 -*-
class solution:
def __init__(self,n):
self.n=n
def len(self,num):
if num>self.n:
return -1
digit=set()
digit.add(1)
res=1
while True:
while res<num:
res*=10
... | 19.046512 | 46 | 0.434676 |
eeff47a722da3ae5ba0c34896a1673c629570447 | 2,482 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/util/data_frame.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/util/data_frame.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/util/data_frame.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Any, Dict, List
from pandas import DataFrame
from watchmen_model.admin import Factor, FactorType, Topic
from watchmen_model.pipeline_kernel import TopicDataColumnNames
from watchmen_utilities import ArrayHelper
def build_data_frame(rows: List[List[Any]], columns: List[str]) -> DataFrame:
import ... | 39.396825 | 112 | 0.794118 |
0178fdad95ec54c64f487916043300e1863f149f | 7,924 | py | Python | scripts/RA.py | walty19950301/MovieRecommend | b86e773b4c27159d8819c5bae1c87192ce47953a | [
"MIT"
] | null | null | null | scripts/RA.py | walty19950301/MovieRecommend | b86e773b4c27159d8819c5bae1c87192ce47953a | [
"MIT"
] | null | null | null | scripts/RA.py | walty19950301/MovieRecommend | b86e773b4c27159d8819c5bae1c87192ce47953a | [
"MIT"
] | null | null | null | import numpy as np
import math
import WQUtil as util
import os
import copy
class RA(object):
def __init__(self, movies=None, ratings=None):
# threshold
self.alpha = 1.2
self.N = 20
self.log = util.Log(os.path.join('../','result.txt'))
self.userEvents = {} # {uid:[events_idx... | 40.845361 | 158 | 0.586194 |
6df353ed1986cfdd80127c2f8b54ef1714e4f5d8 | 1,313 | py | Python | NaiveBayes/src/test.py | quqixun/MLAlgorithms | 1ad46a899a6280a08c196fb4eb0931408c8636c7 | [
"MIT"
] | 2 | 2018-04-25T18:00:28.000Z | 2018-08-08T09:39:18.000Z | NaiveBayes/src/test.py | quqixun/MLAlgorithms | 1ad46a899a6280a08c196fb4eb0931408c8636c7 | [
"MIT"
] | null | null | null | NaiveBayes/src/test.py | quqixun/MLAlgorithms | 1ad46a899a6280a08c196fb4eb0931408c8636c7 | [
"MIT"
] | 2 | 2019-03-03T02:55:48.000Z | 2021-01-21T04:50:46.000Z | # Conventional Machine Learning Algorithms
# Test Script for Class of "NaiveBayes".
# Author: Qixun Qu
# Create on: 2018/04/24
# Modify on: 2018/04/25
# ,,, ,,,
# ;" '; ;' ",
# ; @.ss$$$$$$s.@ ;
# `s$$$$$$$$$$$$$$$'
# $$$$$$$$$$$$$$$$$$
# $$$$P""Y$$$Y""W$$$$$
# $$$$ p"$$$"q $$$$$
# $... | 24.314815 | 65 | 0.603199 |
0965d46c9eafc76879381bdbbdc82e89963c6a13 | 105 | py | Python | views.py | half2me/gst-web | 1418d4fa3c11aab91296ce28a17dabcdd29b76c1 | [
"MIT"
] | 1 | 2020-11-17T09:08:24.000Z | 2020-11-17T09:08:24.000Z | views.py | half2me/gst-web | 1418d4fa3c11aab91296ce28a17dabcdd29b76c1 | [
"MIT"
] | null | null | null | views.py | half2me/gst-web | 1418d4fa3c11aab91296ce28a17dabcdd29b76c1 | [
"MIT"
] | 1 | 2020-11-17T09:08:26.000Z | 2020-11-17T09:08:26.000Z | from aiohttp import web
from aiohttp.web import Application
def setup_view(app: Application):
pass
| 15 | 35 | 0.780952 |
3a07a0eada314f2d74b49bcf45ad84a46a40fce8 | 1,472 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/turn-defs/collectinghandler.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/turn-defs/collectinghandler.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/turn-defs/collectinghandler.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # -*- coding: utf-8 -*-
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2011-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.... | 35.047619 | 79 | 0.711957 |
3a733c84752f2b9e6f479ebf461917e61f99492f | 1,223 | py | Python | yolov5-coreml-tflite-converter/inference-python/test_model.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/inference-python/test_model.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | yolov5-coreml-tflite-converter/inference-python/test_model.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | import argparse
from test_utils.comparison_test import ComparisonTest
class ModelTest:
def __init__(self, model_path, reference_model_paths, data_path):
self.model_path = model_path
self.reference_model_paths = reference_model_paths
self.data_path = data_path
def run(self, verbose=Tr... | 42.172414 | 119 | 0.686836 |
3a7d287616c64060942328ec0137c563ec22db3f | 122 | py | Python | src/webapp/__init__.py | Somsubhra/Enrich | cf1e69b86ceb64c8b09c98b442e09c1196b50125 | [
"MIT"
] | 1 | 2015-11-30T09:27:51.000Z | 2015-11-30T09:27:51.000Z | src/webapp/__init__.py | Somsubhra/Enrich | cf1e69b86ceb64c8b09c98b442e09c1196b50125 | [
"MIT"
] | null | null | null | src/webapp/__init__.py | Somsubhra/Enrich | cf1e69b86ceb64c8b09c98b442e09c1196b50125 | [
"MIT"
] | null | null | null | # Headers
__author__ = 'Somsubhra Bairi'
__email__ = 'somsubhra.bairi@gmail.com'
# All imports
from webapp import WebApp
| 17.428571 | 39 | 0.770492 |
3aaee9308bd5fb65d2a9ef8e9c845e67a0c0462d | 2,697 | py | Python | src/assets/util/classifiers/dummy.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | 1 | 2022-03-28T17:23:03.000Z | 2022-03-28T17:23:03.000Z | src/assets/util/classifiers/dummy.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | null | null | null | src/assets/util/classifiers/dummy.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | null | null | null | import os
import js
import numpy as np
import pandas as pd
import plotly.graph_objects as go
from skimage import io
from sklearn import metrics
from sklearn.dummy import DummyClassifier
# TODO
path = "path_to_files"
def load_images(path):
# load images and their labels
samples = []
labels = []
# os... | 25.932692 | 84 | 0.649981 |
aaef083066f71c83bebeeed8f7b9315e114af879 | 1,036 | py | Python | TerKey-master/TerKey.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | TerKey-master/TerKey.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | TerKey-master/TerKey.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # -*- coding: utf-8 -*-
import os
from time import sleep
a ='\033[92m'
b ='\033[91m'
c ='\033[0m'
os.system('clear')
print(a+'\t ╔══════════════════════════════════════╗')
print(a+'\t ║ Author : King Mr_Z17 ║')
print(a+'\t ║ YouTube : Mr_Z17 ║')
print(a+'\t ║ WhatsApp : 08786676600... | 25.9 | 113 | 0.531853 |
6e1d34cece0a6c84e4131af145cc44ce36d72009 | 881 | py | Python | setup.py | rpowle/NeuronNew | a180e1170c44222633e384672907c68ee6bf3e54 | [
"MIT"
] | null | null | null | setup.py | rpowle/NeuronNew | a180e1170c44222633e384672907c68ee6bf3e54 | [
"MIT"
] | null | null | null | setup.py | rpowle/NeuronNew | a180e1170c44222633e384672907c68ee6bf3e54 | [
"MIT"
] | null | null | null |
import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
Project_name="NeuronNew_pypi"
USERNAME="rpowle"
setuptools.setup(
name=f"{project_name}-{USERNAME}",
version="0.0.1",
author="USERNAME",
author_email="rajpowle12@gmail.com",
description="its a... | 29.366667 | 78 | 0.659478 |
285e3555f9f6b09250a939f5e56353b58258fd86 | 338 | py | Python | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/09.FileIO.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/09.FileIO.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Zulkarnine-Mahmud/00.Fundamentals/09.FileIO.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | with open("text_file.txt", mode="r") as in_file:
words = []
for line in in_file.readlines():
words += line.strip().split(" ")
unique_words = set(words)
with open("unique_words.txt", mode="w") as out_file:
for item in sorted(unique_words):
out_file.write(item)
out... | 30.727273 | 56 | 0.588757 |
28708dd36b38fcf2002319492ea16d0b86853401 | 2,709 | py | Python | v601/python/EZimm.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | v601/python/EZimm.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | v601/python/EZimm.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
import matplotlib.pyplot as plt
from uncertainties import ufloat
import uncertainties.unumpy as unp
from scipy import optimize
import scipy.constants as const
from scipy import stats
from scipy.stats import sem
from pylab import fill
h = const.Planck
c = const.speed_of_light
q = const.elementary_cha... | 28.819149 | 168 | 0.705795 |
252d3226c66b7b49957f768adc835dc1f43d86a9 | 1,391 | py | Python | src/network/conversations/initial_peer_discovery.py | TimHabeck/blockchain-lab | 3cd050ee43f26cf0a1f70869100f0b40a6abae07 | [
"RSA-MD"
] | null | null | null | src/network/conversations/initial_peer_discovery.py | TimHabeck/blockchain-lab | 3cd050ee43f26cf0a1f70869100f0b40a6abae07 | [
"RSA-MD"
] | null | null | null | src/network/conversations/initial_peer_discovery.py | TimHabeck/blockchain-lab | 3cd050ee43f26cf0a1f70869100f0b40a6abae07 | [
"RSA-MD"
] | null | null | null | import logging
from network.bo.peer import Peer
from network.bo.messages.addr import Addr
from network.bo.messages.connection_accepted import Connection_accepted
class Initial_Peer_Discovery():
def __init__(self, node) -> None:
self.node = node
# node that refuses connection
def send_addr(self, n... | 33.926829 | 78 | 0.681524 |
c2824477ff4cb3345682aefcec1239242f400582 | 2,013 | py | Python | zencad/examples/3.Animation/pacman.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/3.Animation/pacman.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/3.Animation/pacman.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
from zencad import *
import zencad.assemble
import time
class Pacman(zencad.assemble.unit):
def __init__(self):
super().__init__()
self.rot0 = zencad.assemble.rotator(axis=(0, 1, 0), parent=self)
self.rot1 = zencad.assemble.rotator(axis=(0, 1, 0), pa... | 23.137931 | 83 | 0.582712 |
c2d198d9a4b4373d03fdd2f3ccec8257c9ecca14 | 71 | py | Python | bots/__init__.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | 1 | 2021-01-20T18:33:01.000Z | 2021-01-20T18:33:01.000Z | bots/__init__.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | null | null | null | bots/__init__.py | jorgeparavicini/FourWins | 1c5e8a23b4464ef6b71d70c9ff040aa004b9ca83 | [
"MIT"
] | 2 | 2019-09-04T08:27:14.000Z | 2019-09-06T20:32:30.000Z | from .basebot import BaseBot, CellState
from .DummyBot import DummyBot
| 23.666667 | 39 | 0.830986 |
66e5b36120267b66c880c07a4e0aa20a6e7bbdb6 | 2,058 | py | Python | partner_ngos/fund_management/doctype/work_plan/work_plan.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | partner_ngos/fund_management/doctype/work_plan/work_plan.py | AkramMutaher/partner_ngos | 4a345fb6989ff5a21db7fca07aa4e5174dca8f59 | [
"MIT"
] | null | null | null | partner_ngos/fund_management/doctype/work_plan/work_plan.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 _
from frappe.model.document import Document
class WorkPlan(Document):
def validate(self):
self.sort_details()
de... | 39.576923 | 163 | 0.749757 |
dd268f95afd3310a66361340d1af1da4861471f9 | 3,259 | py | Python | plugins/tff_backend/bizz/iyo/utils.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | null | null | null | plugins/tff_backend/bizz/iyo/utils.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 178 | 2017-08-02T12:58:06.000Z | 2017-12-20T15:01:12.000Z | plugins/tff_backend/bizz/iyo/utils.py | threefoldfoundation/app_backend | b3cea2a3ff9e10efcc90d3d6e5e8e46b9e84312a | [
"Apache-2.0"
] | 2 | 2018-01-10T10:43:12.000Z | 2018-03-18T10:42:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 GIG Technology NV
#
# 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... | 35.043011 | 108 | 0.789506 |
c6f84ed64b311abe72aacef28f152379fee1bf9d | 1,932 | py | Python | GUI Project/GUI.py | PiecePaperCode/Projekt | 524996cdb9fa08e6e83c289dd124c49e35886820 | [
"MIT"
] | null | null | null | GUI Project/GUI.py | PiecePaperCode/Projekt | 524996cdb9fa08e6e83c289dd124c49e35886820 | [
"MIT"
] | null | null | null | GUI Project/GUI.py | PiecePaperCode/Projekt | 524996cdb9fa08e6e83c289dd124c49e35886820 | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import messagebox
from functools import partial
from Filehandler import write_Basisroutine, read_Basisroutine
# Messagebox with custom Message text
def msgbox(text):
messagebox.showinfo('message', text)
# Messagebox that is created with the read_Basisroutine as text
def routin... | 30.1875 | 92 | 0.680642 |
3c80bbcc31c70eabb1a60e8a969cd54e29505a38 | 320 | py | Python | pacman-termux/test/pacman/tests/fileconflict015.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/fileconflict015.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/fileconflict015.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "conflict between a directory and a file"
p1 = pmpkg("pkg1")
p1.files = ["foo/"]
self.addpkg2db("sync", p1)
p2 = pmpkg("pkg2")
p2.files = ["foo"]
self.addpkg2db("sync", p2)
self.args = "-S pkg1 pkg2"
self.addrule("PACMAN_RETCODE=1")
self.addrule("!PKG_EXIST=pkg1")
self.addrule("!PKG_EXIST=pkg2")
| 20 | 60 | 0.684375 |
a71fb890a97b26b90e96380b0a31682b7007b79a | 4,260 | py | Python | research/cv/SiamFC/src/create_dataset_ILSVRC.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/SiamFC/src/create_dataset_ILSVRC.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/SiamFC/src/create_dataset_ILSVRC.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.030303 | 99 | 0.613146 |
058007f207c5865a7e45c3d77ab8b9443e0ac7f6 | 486 | py | Python | DEFCON/2021/Quals/crypto/back-to-qoo/coin.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | DEFCON/2021/Quals/crypto/back-to-qoo/coin.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | DEFCON/2021/Quals/crypto/back-to-qoo/coin.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | """
This is a public file
"""
import math
from secret_coin import secret
# from qunetsim.objects import Qubit
class Coin(object):
def __init__(self, id):
self.id = id
self.qubit = secret(id)
def rotate_left(self):
self.qubit.ry(-2.0 * math.pi / 8.0)
def rotate_right(self):
... | 20.25 | 54 | 0.615226 |
559c6111c172144b7af35b8c54c8aa287f20d32d | 386 | py | Python | Packs/AlphaVantage/Integrations/AlphaVantage/AlphaVantage_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AlphaVantage/Integrations/AlphaVantage/AlphaVantage_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AlphaVantage/Integrations/AlphaVantage/AlphaVantage_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
from AlphaVantage import remove_indexing_from_dictionary_keys
@pytest.mark.parametrize('key, transformed', [
('01.This', 'This'),
('01. This', 'This')
])
def test_remove_indexing_from_dictionary_keys(key: str, transformed: str):
value = 'value'
test_dict = {key: value}
assert remove... | 27.571429 | 82 | 0.733161 |
7578c625f90a22a588ef5c40cea73f2fcb5e9b88 | 132 | py | Python | tests/api/test_dump.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | tests/api/test_dump.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | tests/api/test_dump.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | def test_read(client, seeder, utils):
response = utils.get_endpoint("api_v1_dump")
utils.assert_response_notFound(response)
| 33 | 48 | 0.772727 |
f98256326feb229d9dea4b52744524ee90125087 | 9,102 | py | Python | docker/api/api/utils/cron_utils.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | docker/api/api/utils/cron_utils.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | docker/api/api/utils/cron_utils.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Corona-Info-App
# Cron-Script for LK Marburg-Bidenkopf
# © 2020 Johannes Kreutz.
# Include utilities
import feedparser
from datetime import datetime
import time
from bs4 import BeautifulSoup, element as bs4element
import requests
import re
import difflib
#definitions
keywords =["corona", "co... | 48.673797 | 206 | 0.537245 |
ddef65799b07afa05cdc925968e278562c643436 | 6,607 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/doctype/tax_rule/tax_rule.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/tax_rule/tax_rule.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/tax_rule/tax_rule.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
from past.builtins import cmp
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import cst... | 37.754286 | 146 | 0.736038 |
349570e4a884de7f2f334415b28138fbfc3bc88e | 1,066 | py | Python | data_helper.py | no-ora/solitadds | 18c5868af00441a8e67311679a0b848c836975d2 | [
"MIT"
] | null | null | null | data_helper.py | no-ora/solitadds | 18c5868af00441a8e67311679a0b848c836975d2 | [
"MIT"
] | null | null | null | data_helper.py | no-ora/solitadds | 18c5868af00441a8e67311679a0b848c836975d2 | [
"MIT"
] | null | null | null | import pandas as pd
import logging
import pdb
def import_operative_data(file_name):
df = pd.read_csv(file_name, parse_dates=['createdDate', 'submittedDate', 'sentDate', 'verdictGivenDate', 'canceledDate'], sep = ';')
df = df.sort_values(['applicationId'])
return df
def import_usage_data(file_name):
df... | 36.758621 | 136 | 0.683865 |
32e304f2fa68a21b64e7e099d6e9f9f00fe85515 | 132 | py | Python | benwaonline/front/__init__.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | benwaonline/front/__init__.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | 16 | 2017-09-13T10:21:40.000Z | 2020-06-01T04:32:22.000Z | benwaonline/front/__init__.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | from flask import Blueprint
front = Blueprint('front', __name__, template_folder='templates')
from benwaonline.front import views
| 22 | 65 | 0.80303 |
1ff9f70d09448d4e04e0841ff98bbe4ec4497ceb | 2,296 | py | Python | tests/onegov/core/test_theme.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/core/test_theme.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/core/test_theme.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import morepath
from onegov.core.framework import Framework
from onegov.core.theme import get_filename
from webtest import TestApp as Client
class MockTheme(object):
def __init__(self, name, version, result=''):
self.name = name
self.version = version
self.result = result
self.de... | 26.390805 | 75 | 0.643293 |
c84401a0a9a47d99bd65521ba3d9da62131f8662 | 7,654 | py | Python | source/pkgsrc/lang/python39/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/python39/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/python39/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.4 2020/12/08 14:30:40 adam Exp $
Disable certain modules, so they can be built as separate packages.
Do not look for ncursesw.
Assume panel_library is correct; this is a fix for ncurses' gnupanel
which will get transformed to panel in buildlink.
Also look for uuid/uuid.h.
--- setup.py.orig... | 44.760234 | 137 | 0.567808 |
c8b83a1800f98b83daec0fb087127c09e23b2d37 | 9,863 | py | Python | tb_toutiao.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 5 | 2020-08-17T08:37:16.000Z | 2021-06-07T05:02:05.000Z | tb_toutiao.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | null | null | null | tb_toutiao.py | sambabypapapa/CralwerSet | a76e0660c42ce7aac20b8d07ccc454b6636a8a2a | [
"Apache-2.0"
] | 1 | 2021-06-07T05:02:10.000Z | 2021-06-07T05:02:10.000Z | import time
import datetime
import json
import requests
import random
import CralwerSet.connect_mysql as connect_mysql
import re
from urllib import parse
import easygui as g
import hashlib
from requests.packages import urllib3
import traceback
import pickle
import pymysql
class touTiao():
def __init__(self):
... | 48.112195 | 1,142 | 0.555916 |
a80a57a98f42456b1dcf509cde712756f1fd3e67 | 2,168 | py | Python | tools/pythonpkg/tests/fast/api/test_config.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 2,816 | 2018-06-26T18:52:52.000Z | 2021-04-06T10:39:15.000Z | tools/pythonpkg/tests/fast/api/test_config.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1,310 | 2021-04-06T16:04:52.000Z | 2022-03-31T13:52:53.000Z | tools/pythonpkg/tests/fast/api/test_config.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 270 | 2021-04-09T06:18:28.000Z | 2022-03-31T11:55:37.000Z | # simple DB API testcase
import duckdb
import numpy
import pandas
class TestDBConfig(object):
def test_default_order(self, duckdb_cursor):
df = pandas.DataFrame({'a': [1,2,3]})
con = duckdb.connect(':memory:', config={'default_order': 'desc'})
result = con.execute('select * from df order b... | 37.37931 | 110 | 0.601476 |
b5b0fab1ee95f80f60f525100061503ef75e03ee | 931 | py | Python | site/public/courses/BEW-1.1/Lessons/06-Testing-RESTful-Routes/demo/tests.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/BEW-1.1/Lessons/06-Testing-RESTful-Routes/demo/tests.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/BEW-1.1/Lessons/06-Testing-RESTful-Routes/demo/tests.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | from app import app
import unittest
class AppTests(unittest.TestCase):
def setUp(self):
self.app = app.test_client()
self.app.testing = True
def test_home_status_code(self):
result = self.app.get('/')
self.assertEqual(result.status_code, 200)
def test_fort... | 32.103448 | 73 | 0.658432 |
a910fecca5428053e0b66cbfe1d20eebeecf30f2 | 76 | py | Python | scripts/playback_movie.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | scripts/playback_movie.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | scripts/playback_movie.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | #!/usr/bin/env python
from retro.scripts.playback_movie import main
main()
| 15.2 | 45 | 0.776316 |
277f2c1fd491ccdca96527b8da56aa0a31d256be | 1,883 | py | Python | src/bot.py | blitzher/Starbot | 90da81f3beac74cd4394c2d8e18d9c67d6819b16 | [
"MIT"
] | null | null | null | src/bot.py | blitzher/Starbot | 90da81f3beac74cd4394c2d8e18d9c67d6819b16 | [
"MIT"
] | null | null | null | src/bot.py | blitzher/Starbot | 90da81f3beac74cd4394c2d8e18d9c67d6819b16 | [
"MIT"
] | null | null | null | import math, numpy as np
import behaviour.strategy
from rlbot.agents.base_agent import BaseAgent, SimpleControllerState
from rlbot.utils.structures.game_data_struct import GameTickPacket
from gamestate import GameState
from util.pipe import RenderPipe
from util.constants import consts
from actiomatic.action import *... | 34.236364 | 123 | 0.707913 |
e330b678e36347fc1111a76daee67e13ed34de9e | 8,844 | py | Python | experimental/OUTDATED/ts2dataclass/veraltet/old_typed_interface.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | experimental/OUTDATED/ts2dataclass/veraltet/old_typed_interface.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | experimental/OUTDATED/ts2dataclass/veraltet/old_typed_interface.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | class TSICheckLevel(IntEnum):
NO_CHECK = 0 # No checks when instantiating a Type Script Interface
ARG_CHECK = 1 # Check whether the named arguments match the given arguments
TYPE_CHECK = 2 # In addition, check the types of the given arguments as well
TSI_DYNAMIC_CHECK = TSICheckLevel.TYP... | 42.519231 | 108 | 0.613863 |
e342a20190d1ec1477634eeee5e6eb169883ae8d | 68 | py | Python | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/dict_test.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/dict_test.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE2/week1/dict_test.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | d = {1: 2, 4: 8, 7: 9}
s = 0
for x in d:
s = s + d[x]
print (s)
| 11.333333 | 22 | 0.382353 |
8b62758f9e11a700b29e8c4b2c53f8eb000d22ff | 10,869 | py | Python | official/cv/squeezenet/modelarts/start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/squeezenet/modelarts/start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/squeezenet/modelarts/start.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 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.003497 | 98 | 0.657558 |
d07590663d388ce739b115fe67f349ef207d3d06 | 7,525 | py | Python | src/main/python/ble_temperature_sensor/migui.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/ble_temperature_sensor/migui.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | src/main/python/ble_temperature_sensor/migui.py | BikeAtor/WoMoAtor | 700cc8b970dcfdd5af2f471df1a223d2a38cb1bf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
sys.path.append('..')
sys.path.append('C:/msys64/mingw64/bin')
import os
os.environ['PATH'] = 'C:/msys64/mingw64/bin' + os.pathsep + os.environ['PATH']
import os
import logging
import threading
import time
import ble_temperature_sensor
import atorlib
# GUI
import tkinter as tk
impor... | 38.19797 | 135 | 0.519203 |
d0ef5d1f9122350fa1ce42ff1442b579b852b264 | 279 | py | Python | exercises/de/exc_02_02_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/de/exc_02_02_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/de/exc_02_02_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
nlp = spacy.blank("de")
doc = nlp("Ich habe eine Katze")
# Schlage den Hash für das Wort "Katze" nach
katze_hash = ____.____.____[____]
print(katze_hash)
# Schlage katze_hash nach, um den String zu erhalten
katze_string = ____.____.____[____]
print(katze_string)
| 21.461538 | 52 | 0.749104 |
190419e258f39e8b82f825142c90c99cdc82643d | 1,216 | py | Python | xiSnipsTools.py | TnT1130/snipsSmallTalk_GER | c2ebccc3f7053e59bc0363adc7219604e447483d | [
"MIT"
] | 1 | 2019-08-02T03:06:44.000Z | 2019-08-02T03:06:44.000Z | xiSnipsTools.py | TnT1130/snipsSmallTalk_GER | c2ebccc3f7053e59bc0363adc7219604e447483d | [
"MIT"
] | 1 | 2019-08-06T07:30:15.000Z | 2019-08-19T08:33:41.000Z | xiSnipsTools.py | TnT1130/snipsSmallTalk_GER | c2ebccc3f7053e59bc0363adc7219604e447483d | [
"MIT"
] | 1 | 2019-10-06T15:09:54.000Z | 2019-10-06T15:09:54.000Z | import random
class Personality:
def __init__(self, language, intent):
self.language = language
self.answerDict = {}
self.load_Answers(intent)
self.getSoundNames()
def load_Answers(self, intent):
#with open(lang + '/' + slotname + '/dict.txt') as fileobj:
with o... | 34.742857 | 142 | 0.60773 |
efb326d8666c04c60c40a61b8613f66cc51ddc5b | 11,546 | py | Python | webinterface/tests/unit_tests/test_model_Schedule.py | monoclecat/Cleaning-Schedule-generator | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 2 | 2021-11-28T23:04:00.000Z | 2022-01-13T19:47:45.000Z | webinterface/tests/unit_tests/test_model_Schedule.py | monoclecat/Cleaning-Schedule-generator | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 25 | 2020-03-29T14:40:46.000Z | 2021-09-22T17:37:15.000Z | webinterface/tests/unit_tests/test_model_Schedule.py | monoclecat/cleaning-schedule-management-system | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 1 | 2020-07-04T11:42:17.000Z | 2020-07-04T11:42:17.000Z | from django.test import TestCase
from webinterface.models import *
from unittest.mock import *
import logging
from webinterface.tests.unit_tests.fixtures import BaseFixture
class ScheduleQuerySetTest(TestCase):
@classmethod
def setUpTestData(cls):
# Schedule
cls.enabled = Schedule.objects.cre... | 54.462264 | 113 | 0.71869 |
de800ed79cab1ea11a2feebfdcd0524d90effd39 | 978 | py | Python | model/Reminder.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | model/Reminder.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | model/Reminder.py | wchming1987/Tumbler | e309771779c8eb44e685adbb691a428d29009e05 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding=utf-8 -*-
from tornado_swagger import swagger
@swagger.model
class Reminder:
"""
@description:
This is an example of a model class that has parameters in its constructor
and the fields in the swagger spec are derived from the parameters to __init... | 33.724138 | 129 | 0.668712 |
7219c8a4e95872dbe93df58d875a75c2113e71c4 | 4,649 | py | Python | g4conv_model.py | patrikkaura/g4-tree-finder | c977a503f40743f651facc3c2f3b1e94d0cc7c55 | [
"MIT"
] | null | null | null | g4conv_model.py | patrikkaura/g4-tree-finder | c977a503f40743f651facc3c2f3b1e94d0cc7c55 | [
"MIT"
] | 1 | 2022-01-22T18:16:15.000Z | 2022-01-29T19:27:22.000Z | g4conv_model.py | patrikkaura/g4-tree-finder | c977a503f40743f651facc3c2f3b1e94d0cc7c55 | [
"MIT"
] | 1 | 2021-11-23T20:23:56.000Z | 2021-11-23T20:23:56.000Z | # -*- coding: utf-8 -*-
"""
This python script uses XGBoost classifier to detect guanine quadruplexes in DNA sequences.
"""
!pip install xgboost==1.5.1
from typing import List, Dict, Tuple
from dataclasses import dataclass, asdict
import requests
import pandas as pd
import numpy as np
from time import sleep
from xg... | 34.437037 | 131 | 0.617122 |
df9c82462fd1463b6b95e95782039a6349f43d78 | 1,126 | py | Python | INBa/2014/Mamedov_R_A/Mamedov 5_12.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/Mamedov_R_A/Mamedov 5_12.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2014/Mamedov_R_A/Mamedov 5_12.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 5, Вариант 12
# Напишите программу, которая бы при запуске случайным образом отображала название одного из двенадцати подвигов Геракла.
# Мамедов Р.А.
# 16.03.2016
import random
print('Программа случайным образом отображает название одного из двенадцати подвигов Геракла')
feat = random.randint(1,12)
print('... | 32.171429 | 121 | 0.706039 |
a0b7a2ba557b8bf64fc0cca9ab090c7f5a6801ed | 5,467 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/osmGet.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/osmGet.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/osmGet.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2009-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 39.05 | 110 | 0.625389 |
26ac013bbe1df328041297aa83b0774c5e13a385 | 744 | py | Python | deutschland/dwd/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/dwd/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | deutschland/dwd/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
"""
Deutscher Wetterdienst: API
Aktuelle Wetterdaten von allen Deutschen Wetterstationen # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
__version__ = "1.0.0"
# import ApiClient
from deutschland.dwd.api_client import ApiClien... | 26.571429 | 74 | 0.811828 |
e4f683154746aef0a08d7785be3913c87e390faf | 2,325 | py | Python | proxy_crawl/get_proxy.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | proxy_crawl/get_proxy.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | proxy_crawl/get_proxy.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/usr/bin/env python
# encoding: utf-8
# author: Lock
# time: 2018/1/18 23:21
"""
Have fun, It's Lock
"""
from selenium import webdriver
import time
# 抓取的起始URL
CRAWL_URL = 'http://www.goubanjia.com/free/index.shtml'
# 最多抓取多少页
CRAWL_MAX_PAGE = 1000
# use proxy ,proxy type is http, No proxy please set '' ,
PROXY = ''... | 32.746479 | 152 | 0.63871 |
5f8acd0ce61ba64277943e3e505a4a05f0b48e33 | 1,048 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/external_writer_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/external_writer_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/cache/external_writer_cache.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import List, Optional
from watchmen_model.common import ExternalWriterId
from watchmen_model.system import ExternalWriter
from .cache_manager import get_external_writer_by_id_cache
from .internal_cache import InternalCache
# noinspection DuplicatedCode
class ExternalWriterCache:
"""
external writer cac... | 29.942857 | 84 | 0.810115 |
39a95183318d971a3345e373dfaa53d9d2f03a11 | 2,089 | py | Python | main.py | 1486342897/Wasserstein-GAN | 1cf756b6143b01cc0180f4086cb2c4e126b97de6 | [
"MIT"
] | null | null | null | main.py | 1486342897/Wasserstein-GAN | 1cf756b6143b01cc0180f4086cb2c4e126b97de6 | [
"MIT"
] | null | null | null | main.py | 1486342897/Wasserstein-GAN | 1cf756b6143b01cc0180f4086cb2c4e126b97de6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 9 15:37:19 2017
@author: liuy
"""
from __future__ import print_function
from DCWGAN import DCWGAN
import argparse
import os
parser = argparse.ArgumentParser()
parser.add_argument('--dataset', required=True, help='path to dataset')
parser.add_argum... | 45.413043 | 117 | 0.738152 |
084f5fcc90dca2f8a31a2c90f0cdfd63af6ec187 | 8,768 | py | Python | marsyas-vamp/marsyas/src/marsyas_python/osc_tests.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/osc_tests.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/marsyas_python/osc_tests.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | from marsyas import *
from marsyas_util import create
from synth_util import *
def main():
additive()
aliasing()
allpass()
blit()
dpw()
plucked()
waveguid()
def waveguide():
gen = ["Series/fmnet", ["ADSR/pitch","WaveguideOsc/waveguide","ADSR/adsr","Gain/gain","SoundFileSink/dest2"]]
... | 49.536723 | 113 | 0.733006 |
f2ad0743245317bc39825504e0305322541acd2e | 802 | py | Python | INBa/2015/ORSHONOVA_E_G/task_7_17.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/ORSHONOVA_E_G/task_7_17.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/ORSHONOVA_E_G/task_7_17.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача №7. Вариант 17
#Программа в которой компьютер загадывает название одного из пяти космических челноков проекта Спейс шаттл, а игрок должен его угадать.
#Если он угадывает,то получает баллы. Если не угадывает,то отномаются.
#Оршонова Е.Г.
#12.04.2016
import random
SpaceShuttles=('Колумбия','Челленджер','Дискав... | 32.08 | 135 | 0.76808 |
0a3ce8357e05cb6ec89f6702151a22b916a12068 | 462 | py | Python | pacman-termux/test/pacman/tests/fileconflict010.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/fileconflict010.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/fileconflict010.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "dir->file change during package upgrade (directory conflict)"
lp1 = pmpkg("pkg1")
lp1.files = ["dir/"]
self.addpkg2db("local", lp1)
lp2 = pmpkg("pkg2")
lp2.files = ["dir/"]
self.addpkg2db("local", lp2)
p = pmpkg("pkg1", "1.0-2")
p.files = ["dir"]
self.addpkg2db("sync", p)
self.args = "-S pkg1"
... | 22 | 81 | 0.677489 |
6ab2beb1cc881d274fad0c1d40cc2f65a2547829 | 1,022 | py | Python | src/onegov/feriennet/models/message.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/models/message.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/feriennet/models/message.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.activity import Period
from onegov.chat import Message
from onegov.org.models.message import TicketMessageMixin
class PeriodMessage(Message):
__mapper_args__ = {
'polymorphic_identity': 'period'
}
def link(self, request):
return request.class_link(Period, {'id': self.channel_... | 26.205128 | 71 | 0.643836 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.