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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
601a40293f9f9a3bd70631a5e00e62832f269a18 | 4,265 | py | Python | CS303/lab4-6/work/algorithm_ncs/problem_setup.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | CS303_Artifical-Intelligence/NCS/algorithm_ncs/problem_setup.py | Eveneko/SUSTech-Courses | 0420873110e91e8d13e6e85a974f1856e01d28d6 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | CS303/lab4-6/work/algorithm_ncs/problem_setup.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | import pickle
import numpy as np
from algorithm_ncs import *
def save_parameter(para, file_name):
with open(file_name, 'wb') as file_saver:
data = pickle.dumps(para)
file_saver.write(data)
def load_parameter(file_name) :
with open(file_name, 'rb') as file:
para = pickle.loads(file.rea... | 29.413793 | 76 | 0.521923 |
71790b742f2c325fcf3cc7badd629e21ded55c5d | 48 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/00_hello.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/00_hello.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/00_hello.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | sHelloWorld = "Hello, World!"
print(sHelloWorld) | 24 | 29 | 0.770833 |
e0bb620a2414bc66bdf46c330f2da5b6e3d8c093 | 304 | py | Python | api/__init__.py | JarSaa/BootDemo2 | 3ad61e25026a26fbd5ed2f0e9cc9cdc56696e805 | [
"MIT"
] | null | null | null | api/__init__.py | JarSaa/BootDemo2 | 3ad61e25026a26fbd5ed2f0e9cc9cdc56696e805 | [
"MIT"
] | null | null | null | api/__init__.py | JarSaa/BootDemo2 | 3ad61e25026a26fbd5ed2f0e9cc9cdc56696e805 | [
"MIT"
] | 2 | 2022-03-22T12:38:59.000Z | 2022-03-23T07:33:29.000Z | from flask import jsonify, abort
def generate_json(taxes):
data = []
line = 0
for tax in taxes:
line += 1
data.insert(line, [tax.company, tax.tax_paid])
response = jsonify({'data': data})
response.headers.add('Access-Control-Allow-Origin', '*')
return response | 21.714286 | 60 | 0.621711 |
e0c9fed479a72a3d72bc98550b4a5bbca675cf6e | 1,192 | py | Python | ParsingAndScraping/wink/scrapper.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T13:06:11.000Z | 2021-06-23T13:06:11.000Z | ParsingAndScraping/wink/scrapper.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-23T21:21:52.000Z | 2021-06-23T21:21:52.000Z | ParsingAndScraping/wink/scrapper.py | KazuruK/FilmGetter | fd84bcaddf17d4b89ad6e5d27095535346c5f4a9 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T19:14:19.000Z | 2021-06-28T19:14:19.000Z | import requests
from ParsingAndScraping.assistants import substring_enter_count
def wink_search(film_name):
url = 'https://cnt-odcv-itv03.svc.iptv.rt.ru/api/v2/portal/group_search'
url_token = 'https://cnt-odcv-itv03.svc.iptv.rt.ru/api/v2/portal/session_tokens'
params = {
'query': film_name,
... | 29.8 | 84 | 0.619128 |
e0f00af22690a10122438b0a53a322b76bc63ded | 1,018 | py | Python | tests/test_geokoordinaten.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_geokoordinaten.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_geokoordinaten.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest # type:ignore[import]
from bo4e.com.geokoordinaten import Geokoordinaten, GeokoordinatenSchema
class TestGeokoordinaten:
def test_serialization(self):
geo = Geokoordinaten(
breitengrad=Decimal(52.52149200439453),
laengengrad=Decimal(13.4... | 30.848485 | 72 | 0.709234 |
1cf9ba3199477dfba1f42902ece8b3cc27b0e995 | 1,017 | py | Python | pyventskalender/tag18_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag18_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag18_loesung.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | MOEGLICHE_ADVERBIALE = [
"Beim Programmieren",
"Am PC",
"Im ICE",
"An der Kasse",
"Beim Schaukeln",
"Bei Vollmond",
"Auf dem Weihnachtsmarkt",
]
MOEGLICHE_VERBEN = [
"liebt",
"kontrolliert",
"sucht",
"springt",
"schenkt mir",
"vergisst",
"lobt",
]
MOEGLICHE_SUBJ... | 19.941176 | 57 | 0.617502 |
1c638d8d8e460582887a8f366b8106a0873ddde9 | 648 | py | Python | src/notif/migrations/0004_auto_20220513_1744.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | src/notif/migrations/0004_auto_20220513_1744.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | 1 | 2022-03-25T05:33:19.000Z | 2022-03-25T05:33:19.000Z | src/notif/migrations/0004_auto_20220513_1744.py | oguzhanakan0/covidlab-server | 68ea4e6cd3b1244117ae43275335896b911a9b2a | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2022-05-13 17:44
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('notif', '0003_auto_20220513_1656'),
]
operations = [
migrations.RemoveField(
model_name='notif',
name='read',
... | 23.142857 | 58 | 0.554012 |
c77454985c4cd10604b0ec61184abfa81c5bff7a | 1,074 | py | Python | Curso-Em-Video-Python/2Exercicios/059_criando_um_menu_de_opcoes.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/059_criando_um_menu_de_opcoes.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/059_criando_um_menu_de_opcoes.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from time import sleep
menu = 0
numero1 = int(input('Numero 1: '))
numero2 = int(input('Numero 2: '))
while menu != 5:
print('Menu')
print(''' [1] Somar
[2] Multiplicar
[3] Maior
[4] Novos numeros
[5] Sair do programa''')
menu = int(input('Selecione a opção: '))
if menu == 1:
... | 30.685714 | 87 | 0.538175 |
dc12059abd09e24573f1d331148443688a330883 | 7,179 | py | Python | Chapter10_Cython/1_VectorND/fastvector/vector.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter10_Cython/1_VectorND/fastvector/vector.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | Chapter10_Cython/1_VectorND/fastvector/vector.py | tomex74/UdemyPythonPro | b4b83483fa2d3337a2860d53ff38e68eb38b3ac4 | [
"MIT"
] | null | null | null | """Own implementation of a ND vector class.
"""
from __future__ import annotations
import array
import numbers
from functools import total_ordering
from math import sqrt
from typing import Any
from typing import SupportsFloat
from typing import Union
@total_ordering
class VectorND:
"""VectorND class to perform s... | 30.419492 | 110 | 0.580722 |
905f8302dc982a95491666ba76fc4c4d8bb5b9d1 | 11,461 | py | Python | .vscode/extensions/ms-python.python-2021.11.1422169775/pythonFiles/lib/jedilsp/pygls/lsp/__init__.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | 239 | 2018-12-21T18:56:12.000Z | 2022-03-30T20:20:16.000Z | .vscode/extensions/ms-python.python-2021.11.1422169775/pythonFiles/lib/jedilsp/pygls/lsp/__init__.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | 122 | 2018-12-28T17:35:37.000Z | 2022-03-17T14:02:44.000Z | .vscode/extensions/ms-python.python-2021.11.1422169775/pythonFiles/lib/jedilsp/pygls/lsp/__init__.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | 63 | 2018-12-22T11:33:14.000Z | 2022-03-29T05:34:29.000Z | ############################################################################
# Copyright(c) Open Law Library. All rights reserved. #
# See ThirdPartyNotices.txt in the project root for additional notices. #
# #
# Licensed u... | 34.21194 | 122 | 0.65893 |
90a0375d02a9b1735aad127795fe81af07e7b92c | 8,969 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/opx/test_opx_cps.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/opx/test_opx_cps.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/opx/test_opx_cps.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #
# (c) 2018 Red Hat Inc.
#
# (c) 2018 Dell Inc. or its subsidiaries. All Rights Reserved.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the L... | 48.744565 | 144 | 0.72182 |
90baf75dcd3b390ea94cb914a2abc6ad0fab41ea | 3,262 | py | Python | beispielanwendungen/sound/main3.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 5 | 2017-03-11T13:27:27.000Z | 2022-01-09T10:52:05.000Z | beispielanwendungen/sound/main3.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 2 | 2021-02-14T10:59:59.000Z | 2021-10-30T21:46:32.000Z | beispielanwendungen/sound/main3.py | pbouda/pyqt-und-pyside-buch | a4ec10663ccc8aeda075c9a06b9707ded52382c8 | [
"CC-BY-4.0"
] | 1 | 2019-08-07T03:08:18.000Z | 2019-08-07T03:08:18.000Z | from math import pi, sin
import struct, sys
from PyQt4.QtCore import QBuffer, QByteArray, QIODevice, Qt
from PyQt4.QtGui import QApplication, QFormLayout, QLineEdit, QHBoxLayout, \
QPushButton, QSlider, QVBoxLayout, QWidget
from PyQt4.QtMultimedia import QAudio, QAudioDeviceInfo, QAudioFo... | 32.949495 | 89 | 0.602085 |
319ea213b812555c8a9e8b1a02d468946d330f39 | 2,551 | py | Python | SmartMirror/distance_sensor/motion.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | null | null | null | SmartMirror/distance_sensor/motion.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | 3 | 2018-11-22T09:49:52.000Z | 2019-05-29T14:43:52.000Z | SmartMirror/distance_sensor/motion.py | beckstev/PiShop | ab990c3a787f1811ff0da650f79dbd8bb28c00f7 | [
"MIT"
] | null | null | null | import RPi.GPIO as GPIO
import time
def average_distance(TRIGGER_PIN, ECHO_PIN):
'''Measure distance 5 times and return average'''
distance = 0
for i in range(5):
# set trigger pin to HIGH
GPIO.output(TRIGGER_PIN, True)
# set trigger pin after 0.01ms to LOW
time.sleep(0.00001)
... | 23.62037 | 66 | 0.620933 |
9ec5df0004aa5b8c4b9aa76a6b4d9ba9a770bb8f | 12,360 | py | Python | Packs/Orca/Integrations/Orca/Orca.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Orca/Integrations/Orca/Orca.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Orca/Integrations/Orca/Orca.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import dateutil.parser
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
from typing import Any, Dict, Union, Optional, Tuple
DEMISTO_OCCURRED_FORMAT = '%Y-%m-%dT%H:%M:%SZ'
DEMISTO_INFORMATIONAL = 0.5
ORCA_API_TIMEOUT = 30 # Increase timeout for ORCA API
ORCA_API_LIMIT = 500... | 38.030769 | 129 | 0.604369 |
c310580887421baebf47f778d6a9a8149a6126ed | 80 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/84caminhos_modulos_e_pacotes/pacote_2/modulo2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/84caminhos_modulos_e_pacotes/pacote_2/modulo2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/84caminhos_modulos_e_pacotes/pacote_2/modulo2.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from pacote_1.modulo1 import variavel1
variavel2 = 'variavel2'
print(variavel1) | 20 | 38 | 0.825 |
6f33c87476416d375759c997dc89520cebb3b3de | 5,017 | py | Python | fuzzsvc/controller/Engine.py | ifoundthetao/FuzzFlow | 86559ac7f85fc89510c0d9647e02880edb95aa2a | [
"MIT"
] | 53 | 2016-08-26T02:51:45.000Z | 2021-05-24T21:05:44.000Z | controller/Engine.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | null | null | null | controller/Engine.py | FingerLeakers/FuzzFlow | 3f2de617c3658904f9640f53a05d5e4e90634e32 | [
"MIT"
] | 31 | 2016-08-26T04:08:31.000Z | 2021-05-24T21:05:54.000Z | from flask_restful import Resource, reqparse
from model.FuzzingEngine import FuzzingEngine
from model.FuzzingPlatform import FuzzingPlatform
from model.FuzzingOption import FuzzingOption
from model.FuzzingArch import FuzzingArch
from app import app
db = app.config['db']
class EngineCtrl(Resource):
def create(s... | 36.093525 | 88 | 0.583416 |
6f4ba4ddef1e74bed45da209ff751931f1e229b2 | 8,792 | py | Python | misc/sympy_play/openlab_kinema_sympy.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | misc/sympy_play/openlab_kinema_sympy.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | misc/sympy_play/openlab_kinema_sympy.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | """openlabのロボットのいろいろ"""
import sympy as sy
from sympy import pi
# # qを定数とするとき
# q1, q2, q3, q4, q5, q6 = sy.symbols("q1, q2, q3, q4, q5, q6")
# qvec = sy.Matrix([[q1, q2, q3, q4, q5, q6]]).T
# l0, l1, l2, l3, l4, l5, l6, h45 = sy.symbols("l0, l1, l2, l3, l4, l5, l6, h45")
# posi_1 = sy.Matrix([[0, 0, 0]]).T
# posi_... | 34.077519 | 109 | 0.4404 |
d2873e0f6abb316e12a60298f8738139ac4c33b8 | 741 | py | Python | setup.py | voidful/nlp2go | c83cd96a5618ef3f95f6c5174071cba711003761 | [
"Apache-2.0"
] | 25 | 2020-02-20T14:25:58.000Z | 2022-01-05T03:32:37.000Z | setup.py | voidful/nlp2go | c83cd96a5618ef3f95f6c5174071cba711003761 | [
"Apache-2.0"
] | 3 | 2020-10-21T15:03:39.000Z | 2020-10-21T15:03:48.000Z | setup.py | voidful/nlp2go | c83cd96a5618ef3f95f6c5174071cba711003761 | [
"Apache-2.0"
] | 1 | 2020-09-15T15:22:49.000Z | 2020-09-15T15:22:49.000Z | from setuptools import setup, find_packages
with open('requirements.txt') as f:
required = f.read().splitlines()
setup(
name='nlp2go',
version='0.4.14',
description='hosting nlp models for demo purpose',
url='https://github.com/voidful/nlp2go',
author='Voidful',
author_email='voidful.stac... | 30.875 | 92 | 0.704453 |
7dd54112b75c9d58fbf8a6e65eb6a89314650495 | 331 | py | Python | pages/themes/beginners/variousFormatsHandling/examples/data_serialization.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/variousFormatsHandling/examples/data_serialization.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/variousFormatsHandling/examples/data_serialization.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | import pickle
# let's serialize a simple dict
prices = { 'apples': 2.50, 'oranges': 1.90, 'bananas': 2.40 }
#convert the object to a serialized string
serialized_prices = pickle.dumps( prices )
print(serialized_prices)
#de-serialize (unpickle) an object
received_prices = pickle.loads( serialized_prices )
print(recei... | 27.583333 | 61 | 0.761329 |
c4fefa314ce0ada6e1e9bc2d20161811e045d1dc | 804 | py | Python | banking/urls.py | deepur99/Pocket-Bank- | 8d960a548cab992568c23086974031512611247f | [
"Apache-2.0"
] | null | null | null | banking/urls.py | deepur99/Pocket-Bank- | 8d960a548cab992568c23086974031512611247f | [
"Apache-2.0"
] | null | null | null | banking/urls.py | deepur99/Pocket-Bank- | 8d960a548cab992568c23086974031512611247f | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from . import views
from django.contrib.auth import views as auth_view
urlpatterns =[
path('',views.home,name='home'),
path('about/',views.about,name='about'),
path('contacts/',views.contacts,name='contacts'),
path('customers/',views.customers,name='customers'),
path('insert_data/',vi... | 42.315789 | 97 | 0.736318 |
4838b00dca3513c5378ca7dfb0e051139ffd1a1f | 521 | py | Python | source/pkgsrc/ham/chirp/patches/patch-chirp_ui_mainapp.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/ham/chirp/patches/patch-chirp_ui_mainapp.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/ham/chirp/patches/patch-chirp_ui_mainapp.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-chirp_ui_mainapp.py,v 1.1 2020/08/25 13:50:36 gdt Exp $
This software contains darwin specific tweaks which do not apply to pkgsrc
--- chirp/ui/mainapp.py.orig 2020-07-03 15:43:54.520195801 +1000
+++ chirp/ui/mainapp.py 2020-07-03 15:49:25.663278078 +1000
@@ -2087,8 +2087,6 @@
if os.name != ... | 32.5625 | 74 | 0.618042 |
73d09298d291ec4fe56b7b43bf53c746d2153877 | 3,842 | py | Python | tf/clasificador2/_et/lector_entrenador_2.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | tf/clasificador2/_et/lector_entrenador_2.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | tf/clasificador2/_et/lector_entrenador_2.py | alffore/lokroids-python | ac3bbc328140e53ab181034d2e3d5d5d17dc9203 | [
"MIT"
] | null | null | null | # coding=UTF-8
import numpy as np
import matplotlib.pyplot as plt
import os
import cv2
from tqdm import tqdm
import random
import filetype
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten
from tensorflow.keras.layers import Conv2D, MaxPooling2D
from ... | 30.251969 | 125 | 0.622853 |
fb6dcd9762fcaaf603a27f48755ac90bf76f3dcc | 137 | py | Python | day04/randomizer.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day04/randomizer.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | day04/randomizer.py | nurmatthias/100DaysOfCode | 22002e4b31d13e6b52e6b9222d2e91c2070c5744 | [
"Apache-2.0"
] | null | null | null | import random
value = random.randint(1, 10)
print(value)
value = random.random()
print(value)
value = random.random() * 5
print(value) | 13.7 | 29 | 0.715328 |
fbd9a3f705d9de560c6f1a794fa0bf2670bb1500 | 292 | py | Python | GateToggle.py | s9409552/PiOpener | 402762bbc81ed788cc83efee1c1f0ef8d7635be2 | [
"MIT"
] | null | null | null | GateToggle.py | s9409552/PiOpener | 402762bbc81ed788cc83efee1c1f0ef8d7635be2 | [
"MIT"
] | null | null | null | GateToggle.py | s9409552/PiOpener | 402762bbc81ed788cc83efee1c1f0ef8d7635be2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import pigpio
import time
gateGPIO = 26
pi = pigpio.pi()
pi.set_mode(gateGPIO, pigpio.OUTPUT)
pi.write(gateGPIO, 1)
print("Toggling gate GPIO on")
time.sleep(2)
print("Toggling gate GPIO off")
pi.write(gateGPIO, 0)
pi.stop()
print("Finished.")
quit()
| 17.176471 | 37 | 0.684932 |
83b71106fb742db2bf77a0d103b907316a9d9f39 | 3,645 | py | Python | src/model/tableDataFrame.py | wrthfl/pyopenms-tewb | f02ab0393df746846c26ed6c812964f9da355b99 | [
"Zlib",
"Apache-2.0"
] | 1 | 2020-05-26T16:16:14.000Z | 2020-05-26T16:16:14.000Z | src/model/tableDataFrame.py | wrthfl/pyopenms-tewb | f02ab0393df746846c26ed6c812964f9da355b99 | [
"Zlib",
"Apache-2.0"
] | null | null | null | src/model/tableDataFrame.py | wrthfl/pyopenms-tewb | f02ab0393df746846c26ed6c812964f9da355b99 | [
"Zlib",
"Apache-2.0"
] | 1 | 2020-05-16T20:09:17.000Z | 2020-05-16T20:09:17.000Z | import pandas as pd
class TableDataFrame():
def __init__(self, df: pd.DataFrame):
self.df = df
def getTable(self) -> pd.DataFrame:
"""
Returns the current dataframe
"""
return self.df
def setTable(self, df: pd.DataFrame):
"""
Sets ... | 35.048077 | 74 | 0.513032 |
f76579bc92054f8d86affb6ec4f30976849cb9cb | 755 | py | Python | multimeter/temperatur.py | tropi-frutti/facharbeit-fhg | e162014a9d12e60c616d78c14166c75414acda7b | [
"MIT"
] | null | null | null | multimeter/temperatur.py | tropi-frutti/facharbeit-fhg | e162014a9d12e60c616d78c14166c75414acda7b | [
"MIT"
] | null | null | null | multimeter/temperatur.py | tropi-frutti/facharbeit-fhg | e162014a9d12e60c616d78c14166c75414acda7b | [
"MIT"
] | null | null | null | import read_arduino
import math
import globvar
def temperatur():
read_arduino.read()
#Berechnung des Widerstandswert vom NTC
tempOhmREF =1100
Measure0=float(globvar.measure0)
tempSPAN =Measure0*4.86/1023 #umwandeln von 8 bit in spannungswert
#anwenden von u/(r1+r2)= u2/r2 umgewandelt zu r1=((u*... | 24.354839 | 71 | 0.74702 |
5829b9eef58af8cff1fc4c67b276bcc577e14990 | 401 | py | Python | pacman-arch/test/pacman/tests/sync-nodepversion01.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/sync-nodepversion01.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/sync-nodepversion01.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "nodepversion: -Sd works"
p1 = pmpkg("pkg1", "1.0-2")
p1.depends = ["provision>1.0-1"]
self.addpkg2db("sync", p1)
p2 = pmpkg("pkg2", "1.0-2")
p2.provides = ["provision=1.0-1"]
self.addpkg2db("sync", p2)
self.args = "-Sd %s" % p1.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_EXIST=pkg1")... | 23.588235 | 48 | 0.678304 |
58887a790798ef97433da8fdff8ba36f23ae7b51 | 2,846 | py | Python | src/onegov/election_day/forms/upload/wabsti_proporz.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/forms/upload/wabsti_proporz.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/forms/upload/wabsti_proporz.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.election_day.forms.upload.common import ALLOWED_MIME_TYPES
from onegov.election_day.forms.upload.common import MAX_FILE_SIZE
from onegov.form import Form
from onegov.form.fields import UploadField
from onegov.form.validators import FileSizeLimit
from onegov.form.validators import WhitelistedMimeType
from wt... | 27.365385 | 70 | 0.628602 |
544da9f3132ad3956117b5419fa16880c9cbcba2 | 87,837 | py | Python | Packs/MicrosoftDefenderAdvancedThreatProtection/Integrations/MicrosoftDefenderAdvancedThreatProtection/MicrosoftDefenderAdvancedThreatProtection_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 1 | 2021-11-02T05:36:38.000Z | 2021-11-02T05:36:38.000Z | Packs/MicrosoftDefenderAdvancedThreatProtection/Integrations/MicrosoftDefenderAdvancedThreatProtection/MicrosoftDefenderAdvancedThreatProtection_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | 61 | 2021-10-07T08:54:38.000Z | 2022-03-31T10:25:35.000Z | Packs/MicrosoftDefenderAdvancedThreatProtection/Integrations/MicrosoftDefenderAdvancedThreatProtection/MicrosoftDefenderAdvancedThreatProtection_test.py | jrauen/content | 81a92be1cbb053a5f26a6f325eff3afc0ca840e0 | [
"MIT"
] | null | null | null | import dateparser
from _pytest.python_api import raises
from freezegun import freeze_time
import demistomock as demisto
import json
import pytest
from CommonServerPython import DemistoException
from MicrosoftDefenderAdvancedThreatProtection import MsClient, get_future_time, build_std_output, parse_ip_addresses, \
... | 38.4407 | 136 | 0.600681 |
548cc5c16357b3383574084828550519ead514df | 285 | py | Python | Proj8/para.py | SnasiCze/ISJ | 2284cb0d53aad5dd0bfc6230224700628be9e454 | [
"MIT"
] | null | null | null | Proj8/para.py | SnasiCze/ISJ | 2284cb0d53aad5dd0bfc6230224700628be9e454 | [
"MIT"
] | null | null | null | Proj8/para.py | SnasiCze/ISJ | 2284cb0d53aad5dd0bfc6230224700628be9e454 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
''' DEKLARACE PROMNĚNÝCH '''
NULA=0
JEDNA=1
DVA=2
''' Konec deklarace '''
''' import knihoven '''
from multiprocessing import Pool
''' konec importu '''
def count(n):
while n > NULA:
n -= JENA
pol = Pool(processes=DVA)
pol.map(count, ((10**8), (10**8)))
| 15.833333 | 34 | 0.62807 |
b72daa6a65647b35e527b2770bc48c14999823b3 | 14,714 | py | Python | svm/basic_local_classifier.py | TensorVision/MediSeg | 222fcab98d82f48f09304eda3cfbfe4d6ac825b7 | [
"MIT"
] | 6 | 2016-08-15T17:57:45.000Z | 2019-03-19T05:08:29.000Z | svm/basic_local_classifier.py | TensorVision/MediSeg | 222fcab98d82f48f09304eda3cfbfe4d6ac825b7 | [
"MIT"
] | 10 | 2016-04-11T10:20:34.000Z | 2016-08-09T21:47:48.000Z | svm/basic_local_classifier.py | TensorVision/MediSeg | 222fcab98d82f48f09304eda3cfbfe4d6ac825b7 | [
"MIT"
] | 7 | 2016-06-21T04:08:58.000Z | 2018-09-01T14:02:40.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""A basic classifier which uses only local features."""
import os.path
from PIL import Image
import numpy
import scipy.misc
import scipy.ndimage
import logging
import sys
import time
import numpy as np
import json
logging.basicConfig(format='%(asctime)s %(levelname)s %... | 32.625277 | 78 | 0.550836 |
b7336ae685bcf4ff933c9d1fdf34cc4cca4e0c69 | 537 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/74_map-75_filter-76_reduce/76_reduce.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/74_map-75_filter-76_reduce/76_reduce.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/74_map-75_filter-76_reduce/76_reduce.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from dados import produtos, pessoas, lista
from functools import reduce
# Inicio Codigo -------------------------------
# sum_list = reduce(lambda acu, it: it + acu, lista, 0) # soma a lista
# print(sum_list)
# inicio codigo ---------------------
# sum_prices = reduce(lambda ac, p: p['preco'] + ac, produtos, 0)
# pri... | 35.8 | 91 | 0.616387 |
b7a3b3e6318cc5f35a2833e0e9708e298d564400 | 338 | py | Python | raw_code/pulson440/__init__.py | stevenruidigao/bwsiuassar2019 | 25e267d2c9d96c767f7f9ea168a27bcad56690b7 | [
"MIT"
] | null | null | null | raw_code/pulson440/__init__.py | stevenruidigao/bwsiuassar2019 | 25e267d2c9d96c767f7f9ea168a27bcad56690b7 | [
"MIT"
] | null | null | null | raw_code/pulson440/__init__.py | stevenruidigao/bwsiuassar2019 | 25e267d2c9d96c767f7f9ea168a27bcad56690b7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""pulson440 package initialization."""
# Expose modules to package
from pulson440 import pulson440
from pulson440 import constants
from pulson440 import control
from pulson440 import formats
from pulson440 import unpack
__all__ = ['pulson440', 'constants', 'control', 'fo... | 26 | 68 | 0.754438 |
b7ca9e66b83d3bba71b50afdb0113703dbd334db | 1,271 | py | Python | python/en/archive/books/jump2python/j2p-02_1-numbers.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_1-numbers.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-02_1-numbers.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
jump2python-02_1-numbers.py
jump2python-02_1-숫자형
정수 integer
실수 float
복소수 complex
8진수 octal
16진수 hex
"""
# Numbers
# Integer
a = 123
a = -178
a = 0
# Float
a = 1.2
a = -3.45
# Both E & e are fine.
a = 4.24E10
a = 4.24e-10
# Octal
# starts from 0o
# w... | 14.443182 | 81 | 0.574351 |
b7d9e8191831eae31205259052d7f3f9cb84bebd | 935 | py | Python | fbLogin/fbLogin/Main/views.py | wallamejorge/PepqaWebApp | 20896a1224d1a2cea3a137950c4f0306f0269db7 | [
"Apache-2.0"
] | null | null | null | fbLogin/fbLogin/Main/views.py | wallamejorge/PepqaWebApp | 20896a1224d1a2cea3a137950c4f0306f0269db7 | [
"Apache-2.0"
] | null | null | null | fbLogin/fbLogin/Main/views.py | wallamejorge/PepqaWebApp | 20896a1224d1a2cea3a137950c4f0306f0269db7 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse
from django.template import Template,Context
from django.template.loader import get_template
import datetime
# Create your views here.
PATH_SITE = "/home/wallamejorge/Escritorio/WebApps/"
PATH_SERVER = "PepqaWebApp/fbLogin/"
PATH_PAGES = "... | 33.392857 | 172 | 0.774332 |
c418c3171cd5218d68e70333e3cc9a0b85f778b5 | 703 | py | Python | leetcode/LongestCommonPrefix/py/LongestCommonPrefix_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/LongestCommonPrefix/py/LongestCommonPrefix_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/LongestCommonPrefix/py/LongestCommonPrefix_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param {string[]} strs
# @return {string}
def longestCommonPrefix(self, strs):
prefix = ''
if len(strs) == 0:
return prefix
if len(strs) == 1:
return strs[0]
num = len(strs)
mi = len(strs[0])
for i in xrange(num):
... | 22.677419 | 40 | 0.411095 |
c44fb052df6892828addc3be1cf8d2f4bbaf6eb8 | 1,503 | py | Python | utest/ops1d2d_test.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | utest/ops1d2d_test.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | utest/ops1d2d_test.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | import unittest
import zencad
class Ops1d2dProbe(unittest.TestCase):
def setUp(self):
zencad.lazy.encache = False
zencad.lazy.decache = False
zencad.lazy.fastdo = True
def test_fill(self):
zencad.fill(zencad.circle(5, wire=True)).unlazy()
zencad.circle(5, wire=True).fi... | 30.06 | 79 | 0.490353 |
67112b669f6a06bc91e7f2354099399d0e96d2b9 | 6,314 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/report/asset_depreciations_and_balances/asset_depreciations_and_balances.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import formatdate, getdate, flt, add_days
def execute(filters=None):
filters.day_before_from_date = add_d... | 33.585106 | 126 | 0.728065 |
67e19802d7567a2bc4eb3d81ef7024fd68678df6 | 1,825 | py | Python | src/onegov/election_day/views/election/lists_panachage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/election/lists_panachage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/election/lists_panachage.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot import Election
from onegov.core.security import Public
from onegov.election_day import ElectionDayApp
from onegov.election_day.layouts import DefaultLayout
from onegov.election_day.layouts import ElectionLayout
from onegov.election_day.utils import add_last_modified_header
from onegov.election_day.u... | 24.662162 | 74 | 0.713973 |
67faf7dc76f44eb4fc5d965a73cc658f9bb590d9 | 389 | py | Python | Tutorials/10 Days of Statistics/Day 5/normal_distribution2.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Tutorials/10 Days of Statistics/Day 5/normal_distribution2.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Tutorials/10 Days of Statistics/Day 5/normal_distribution2.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
from math import erf, sqrt
def phi(x, mu, std):
return (1.0 + erf((x-mu) / (std*sqrt(2.0)))) / 2.0
arr = [float(arr_i) for arr_i in input().strip().split(' ')]
mu = arr[0]
std = arr[1]
high = float(input())
low = float(input())
print(round(100*(1-phi(high, mu, std)), 2))
print(round(10... | 20.473684 | 60 | 0.598972 |
db2789de29aed04bd334e78d8788d1c03dd4df08 | 229 | py | Python | pages/themes/beginners/iteratorsGenerators/examples/making_generator.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/iteratorsGenerators/examples/making_generator.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | pages/themes/beginners/iteratorsGenerators/examples/making_generator.py | ProgressBG-Python-Course/ProgressBG-Python | 6429833696c2c50d9f902f62cc3a65ca62659c69 | [
"MIT"
] | null | null | null | def numbers_generator(start,end):
num = start
while num<=end:
# yield is almost like return, but it freezes the execution
yield num
num += 1
my_numbers = numbers_generator(1,10)
for i in my_numbers:
print(i)
| 15.266667 | 62 | 0.689956 |
db2e3f75bbc41b67b8d7c6288cbbe5a407a5819a | 569 | py | Python | 02_transcription/test_google/tts.py | Verena-Lemberger/masterarbeit | 2819f222b75b31bd2a44b45ee3417998c385eeab | [
"MIT"
] | null | null | null | 02_transcription/test_google/tts.py | Verena-Lemberger/masterarbeit | 2819f222b75b31bd2a44b45ee3417998c385eeab | [
"MIT"
] | 14 | 2021-06-21T19:41:33.000Z | 2021-06-21T19:41:35.000Z | 02_transcription/test_google/tts.py | Verena-Lemberger/masterarbeit | 2819f222b75b31bd2a44b45ee3417998c385eeab | [
"MIT"
] | null | null | null | import io
import os
import speech_recognition as sr
os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "Masterarbeit-3f2d3dbaa1e3.json"
r = sr.Recognizer()
audio_file = sr.AudioFile("C:\Users\veren\OneDrive\DSIA\Masterarbeit\STT_Interviews\Interviews\Interview_1.mp3")
with audio_file as source:
r.adjust_for_ambien... | 28.45 | 112 | 0.750439 |
227acc9d296a06013e3aa2702734886a0a29ccc8 | 1,598 | py | Python | src/lcdoc/mkdocs/lp/plugs/column/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 24 | 2021-10-04T22:11:59.000Z | 2022-02-02T21:51:43.000Z | src/lcdoc/mkdocs/lp/plugs/column/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 2 | 2021-10-04T21:51:30.000Z | 2021-10-05T14:15:31.000Z | src/lcdoc/mkdocs/lp/plugs/column/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | """
### `lightbox`
"""
from lcdoc.mkdocs.tools import style
nocache = True
formatted = True
nocache = True
sep = '<b>-col-</b>'
# :docs:lp_column_dflts
lp_column_dflts = {
'max_width': '1000px', # max width per column - determines the min total width
'padding': '0',
'margin': '2%',
'custom_style... | 22.828571 | 85 | 0.561952 |
97dd80bfe3c2ed16f52ce3df05eb4d949fac6f60 | 209 | py | Python | python/python_new/Python 3/list.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/list.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/list.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | x=[1,5,4,8,9,12]
#x[1]=41
x[1],x[5]=x[5],x[1]
print(x)
p=sum(x)
print(p)
p1=x[0:5:3]
print(p1)
s="1"
s1="2"
s2=(s+s1)
print(s2)
c=[7,8,9,6]
d=(7,8,9,6)
c[2]=14
print(c)
e=list(d)
e[2]=71
f=tuple(e)
print(f)
| 9.086957 | 19 | 0.526316 |
3650b900b1002f0a1e7a346e94cd232b018a2277 | 12,505 | py | Python | DarkFAST-main/saya_gans/Lock.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | DarkFAST-main/saya_gans/Lock.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | DarkFAST-main/saya_gans/Lock.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z |
from modul import *
class shielded:
def __init__(
self
,
url
,
cookie
,
main_menu
... | 8.576818 | 129 | 0.112995 |
3668c9214cef4bfa8d1c5da45b3f7783a5f8adc3 | 7,610 | py | Python | research/cv/autoaugment/src/dataset/autoaugment/ops/transform.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/autoaugment/src/dataset/autoaugment/ops/transform.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/autoaugment/src/dataset/autoaugment/ops/transform.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 30.079051 | 78 | 0.593167 |
1a28fb8d7d4df69a9f1d4026e6e15b3a1a78545a | 413 | py | Python | PMIa/2014/KUCHERYAVENKO_A_I/task_2_38.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/KUCHERYAVENKO_A_I/task_2_38.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2014/KUCHERYAVENKO_A_I/task_2_38.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 38.
# Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Гераклит. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Kucheryavenko A. I.
# 17.03.2016
print("Всё течет, всё меняется.Нельзя дважды войти в одну... | 31.769231 | 201 | 0.753027 |
3de4e3869636131e2cd465a8efe4c007198a563d | 31,115 | py | Python | model_zoo/bert/static_ipu/modeling.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/bert/static_ipu/modeling.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | model_zoo/bert/static_ipu/modeling.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 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... | 44.009901 | 129 | 0.556066 |
b13e7baf84bb9705ad99d9e9d093f5399e8392e1 | 8,402 | py | Python | Packs/Ironscales/Integrations/Ironscales/Ironscales.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Ironscales/Integrations/Ironscales/Ironscales.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Ironscales/Integrations/Ironscales/Ironscales.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z |
from typing import Dict
import demistomock as demisto # noqa: F401
import urllib3
from CommonServerPython import * # noqa: F401
# Disable insecure warnings
urllib3.disable_warnings()
class Client(BaseClient):
def __init__(self, company_id: str, base_url: str, verify_certificate: bool, proxy: bool, headers: d... | 32.692607 | 116 | 0.628303 |
4944e70fb4a0d443ad95957ce0d97930e4003dd7 | 6,363 | py | Python | data-pipeline/src/data_pipeline/pipeline.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 38 | 2018-02-24T02:33:52.000Z | 2020-03-03T23:17:04.000Z | data-pipeline/src/data_pipeline/pipeline.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 385 | 2018-02-21T16:53:13.000Z | 2020-03-04T00:52:40.000Z | data-pipeline/src/data_pipeline/pipeline.py | broadinstitute/gnomadjs | 00da72cdc2cb0753f822c51456ec15147c024a1d | [
"MIT"
] | 13 | 2020-05-01T13:03:54.000Z | 2022-02-28T13:12:57.000Z | import argparse
import datetime
import logging
import os
import shutil
import subprocess
import tempfile
import time
from collections import OrderedDict
import hail as hl
logger = logging.getLogger("gnomad_data_pipeline")
logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
handler.setFormatter(logging.Fo... | 32.630769 | 118 | 0.64215 |
622274807ac528e77ddf9b1be4ecac55a0cfa502 | 1,661 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v5_0/update_item_and_description_again.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_0/update_item_and_description_again.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_0/update_item_and_description_again.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
import frappe
from frappe.utils import cstr
import re
def execute():
item_details = frappe._dict()
for d in frappe.db.sql("select name, description from `tabItem`", as_dict=1):
descriptio... | 33.22 | 98 | 0.682721 |
0cbc5cb20a77bb6b98c29509f4c1470420b58246 | 167 | py | Python | scripts/hunt-shells.py | evildrummer/1337-observer | 621eb16711d9f70a59fb5524fc990dcab1004b14 | [
"MIT"
] | 1 | 2022-01-28T22:29:44.000Z | 2022-01-28T22:29:44.000Z | scripts/hunt-shells.py | evildrummer/1337-observer | 621eb16711d9f70a59fb5524fc990dcab1004b14 | [
"MIT"
] | null | null | null | scripts/hunt-shells.py | evildrummer/1337-observer | 621eb16711d9f70a59fb5524fc990dcab1004b14 | [
"MIT"
] | 1 | 2022-01-28T21:10:41.000Z | 2022-01-28T21:10:41.000Z | # TODO: ALLES!
shell_names = [
"tmp.aspx",
"temp.aspx",
"proxyshell.aspx",
"shell.aspx",
"aspx.aspx",
"help.aspx",
"backup.aspx",
""
] | 13.916667 | 22 | 0.502994 |
0ba72f6b06eae6b85df43262cf9c4d68c9550591 | 6,898 | py | Python | ENV/tensorforce-master/examples/viz_doom.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | ENV/tensorforce-master/examples/viz_doom.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | null | null | null | ENV/tensorforce-master/examples/viz_doom.py | gian1312/suchen | df863140fd8df1ac2e195cbdfa4756f09f962270 | [
"Apache-2.0"
] | 1 | 2019-11-29T12:28:33.000Z | 2019-11-29T12:28:33.000Z | # Copyright 2017 reinforce.io. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 35.374359 | 144 | 0.651928 |
0be67fc9f3348eeeadca61e5395f71033667e7ba | 18,632 | py | Python | wolf.py | vukvojta/wolf | 0831b706203f654c72a1c6cbb97d00988b07ccae | [
"MIT"
] | 1 | 2019-04-26T08:40:01.000Z | 2019-04-26T08:40:01.000Z | wolf.py | vukvojta/wolf | 0831b706203f654c72a1c6cbb97d00988b07ccae | [
"MIT"
] | null | null | null | wolf.py | vukvojta/wolf | 0831b706203f654c72a1c6cbb97d00988b07ccae | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# http://wsgi.tutorial.codepoint.net/
import os
import sys
import re
import inspect
from collections import defaultdict
from functools import wraps
from urlparse import parse_qs
from urllib import urlencode
from jinja2 import Environment, FileSystemLoader
from auth import checkUserSession
"""... | 32.403478 | 119 | 0.563708 |
f09a5cbf45aae5223c7ef48dde57c4b24c6a689b | 99 | py | Python | HackTon/HiddenEye/Defs/Send_Email/EmailConfigDefault.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | HackTon/HiddenEye/Defs/Send_Email/EmailConfigDefault.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | HackTon/HiddenEye/Defs/Send_Email/EmailConfigDefault.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | gmail_account = "GMAILACCOUNT"
gmail_password = "GMAILPASSWORD"
recipient_email = "RECIPIENTEMAIL"
| 24.75 | 34 | 0.818182 |
c5ee25b8379dbff8aead5cf8f419008679c2fabf | 502 | py | Python | source/pkgsrc/databases/py-barman/patches/patch-barman_utils.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/databases/py-barman/patches/patch-barman_utils.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/databases/py-barman/patches/patch-barman_utils.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-barman_utils.py,v 1.3 2018/08/14 14:47:55 adam Exp $
Make portable for non-glibc platforms too.
--- barman/utils.py.orig 2016-02-22 08:01:31.000000000 +0000
+++ barman/utils.py
@@ -253,7 +253,7 @@ def fsync_dir(dir_path):
:param str dir_path: The directory to sync
:raise OSError: If fail open... | 31.375 | 67 | 0.667331 |
a8519b6ddd2f2428e857570af17029496a5aa05f | 75 | py | Python | src/aijack/defense/dp/__init__.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 24 | 2021-11-17T02:16:47.000Z | 2022-03-27T01:04:08.000Z | src/aijack/defense/dp/__init__.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 9 | 2021-12-03T06:09:27.000Z | 2022-03-29T06:33:53.000Z | src/aijack/defense/dp/__init__.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 5 | 2022-01-12T09:58:04.000Z | 2022-03-17T09:29:04.000Z | from .manager import GeneralMomentAccountant, PrivacyManager # noqa: F401
| 37.5 | 74 | 0.826667 |
a86b0e9d183075dfe6ccad55de7ba535c375abce | 1,018 | py | Python | engine/Loader.py | StefanSchmelz/whoGetsTheMillion | 99a42b6a2e99def4faa05787b4869387d7827f86 | [
"MIT"
] | null | null | null | engine/Loader.py | StefanSchmelz/whoGetsTheMillion | 99a42b6a2e99def4faa05787b4869387d7827f86 | [
"MIT"
] | null | null | null | engine/Loader.py | StefanSchmelz/whoGetsTheMillion | 99a42b6a2e99def4faa05787b4869387d7827f86 | [
"MIT"
] | null | null | null | class Loader:
def __init__(self, path=""):
self.path = path
self.lines = []
self.debug = False
def setPath(self, path=""):
self.path = path
def load(self):
f = open(self.path, "r")
self.lines = f.readlines()
f.close()
def prepare(self):
... | 29.941176 | 94 | 0.455796 |
a8a30253097ffbbfec9ba996db2c1cb6255f14af | 322 | py | Python | Packs/CommonScripts/Scripts/CompareLists/CompareLists_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/CompareLists/CompareLists_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/CompareLists/CompareLists_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CompareLists import compare
def test_compare():
leftArg = [1, 2, 3]
rightArg = [2, 3, 4]
result = compare(leftArg, rightArg)
assert result == {
'ListCompare':
{
'LeftOnly': [1],
'RightOnly': [4],
'Both': [2, 3]
}
... | 20.125 | 39 | 0.437888 |
a8a68225ddb4329d18e2b61ed545eeed82656ac1 | 218 | py | Python | operator5U.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | 1 | 2022-03-09T20:44:33.000Z | 2022-03-09T20:44:33.000Z | operator5U.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | operator5U.py | jxtrbtk/bindex | 8feee8ff9db371d9e691e10ea70467446c0412b1 | [
"MIT"
] | null | null | null | import sys
import pandas as pd
from decimal import Decimal
import lib
import lib.features
import operatorQS
def main():
operatorQS.SAFETY_K = 0.9
operatorQS.main()
if __name__ == "__main__":
main() | 13.625 | 29 | 0.706422 |
763e76b159c7382bd1f5473231512e08830de173 | 110 | py | Python | backend/songwriter/apps.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | backend/songwriter/apps.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | 12 | 2017-09-25T20:13:29.000Z | 2020-02-12T00:12:41.000Z | backend/songwriter/apps.py | giliam/turbo-songwriter | 3d100b08dc19c60d7a1324120e06bd9f971eea5a | [
"MIT"
] | null | null | null | # coding:utf-8
from django.apps import AppConfig
class SongwriterConfig(AppConfig):
name = 'songwriter'
| 15.714286 | 34 | 0.754545 |
4fc621e1d7cd9247a5c68b9f5f268d389166a036 | 3,018 | py | Python | Yetiborg/Drive.py | Klark007/Selbstfahrendes-Auto-im-Modell | d7fe81392de2b29b7dbc7c9d929fa0031b89900b | [
"MIT"
] | null | null | null | Yetiborg/Drive.py | Klark007/Selbstfahrendes-Auto-im-Modell | d7fe81392de2b29b7dbc7c9d929fa0031b89900b | [
"MIT"
] | null | null | null | Yetiborg/Drive.py | Klark007/Selbstfahrendes-Auto-im-Modell | d7fe81392de2b29b7dbc7c9d929fa0031b89900b | [
"MIT"
] | null | null | null | """
Gets orders and has its own direction reactive to the image (later calibrated)
The car gets the concrete motor orders from here
for documentation on the functions of the zeroborg:
https://www.piborg.org/blog/zeroborg-examples
"""
import Yetiborg.ZeroBorg3 as Zeroborg
from time import sleep
# map ... | 25.15 | 82 | 0.561299 |
50686797abce295f87fc06f66a500d46ddfbd074 | 1,159 | py | Python | Star_list.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | Star_list.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | Star_list.py | aertoria/MiscCode | a2e94d0fe0890e6620972f84adcb7976ca9f1408 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys,os,csv
iFile=open('./file_copd.out','rU')
earth = [0,0]
##getDistance return distance given two stars
def getDistance(star1,star2):
return sqrt((star1[0]-star2[0])**2 +(star1[1]-star2[1])**2 )
##diction dict_galaxy looks like this {key,distance} key is the seq assign to each star,... | 28.975 | 132 | 0.712683 |
50b061ccb35d28d836d743f0f20d4dbcd6176cd5 | 458 | py | Python | profil/migrations/0007_kioskuser_activity_end_msg.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | profil/migrations/0007_kioskuser_activity_end_msg.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | profil/migrations/0007_kioskuser_activity_end_msg.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-05-31 19:53
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profil', '0006_auto_20180328_2223'),
]
operations = [
migrations.AddField(
... | 21.809524 | 49 | 0.624454 |
0fd711d9e6900e65fb41e0c1097a2cb5f68129ff | 1,194 | py | Python | PyStellar/stellar/psguser/resources/psguser_sql.py | psgstellar/Stellar | 947d4b3d9d6b9c74d4c9ebd29683793a8d86fad2 | [
"Apache-2.0"
] | 3 | 2021-01-24T17:07:55.000Z | 2021-02-20T20:11:13.000Z | PyStellar/stellar/psguser/resources/psguser_sql.py | psgstellar/Stellar | 947d4b3d9d6b9c74d4c9ebd29683793a8d86fad2 | [
"Apache-2.0"
] | 61 | 2021-01-10T12:59:01.000Z | 2021-06-24T09:19:20.000Z | PyStellar/stellar/psguser/resources/psguser_sql.py | psgstellar/Stellar | 947d4b3d9d6b9c74d4c9ebd29683793a8d86fad2 | [
"Apache-2.0"
] | 1 | 2021-01-14T05:23:32.000Z | 2021-01-14T05:23:32.000Z | def psgusersql():
sql = """
SELECT user_info.id,user_info.slack_name, user_info.slack_nickname, user_info.kakao_name,
user_info.kakao_nickname, user_info.content, user_git.git_name
FROM user_info, user_git WHERE user_info.id = user_git.id
"""
return sql
def psgusergitsql():
sql = """
... | 32.27027 | 89 | 0.596315 |
3afa1c01797d50fc4995c9213818b5ba519b0d75 | 1,253 | py | Python | tensorflow/basic-rl/tutorial11/code/train_cartpole_dqn.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/basic-rl/tutorial11/code/train_cartpole_dqn.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/basic-rl/tutorial11/code/train_cartpole_dqn.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z | import gym
from baselines import deepq
import tensorflow as tf
# from baselines import bench, logger
# import os
def callback(lcl, glb):
# stop training if reward exceeds 199
is_solved = lcl['t'] > 100 and sum(lcl['episode_rewards'][-101:-1]) / 100 >= 199
return is_solved
# Define the environment
env = g... | 28.477273 | 84 | 0.613727 |
ad36c83b07eadcc0cef5834a44fe0ece4fe15bf2 | 7,653 | py | Python | Packs/Hey/Scripts/Hey/Hey.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/Hey/Scripts/Hey/Hey.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/Hey/Scripts/Hey/Hey.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import re
import subprocess
from typing import Tuple
import urllib3
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
# disable insecure warnings
urllib3.disable_warnings()
# ---------- CONSTANTS ---------- #
FLOAT_RE = r'\d+\.\d+'
INT_RE = r'\d+'
BYTES_RE = r'\d+ bytes'
... | 37.886139 | 120 | 0.519665 |
ad43ae2bf1ee26bcb01881f168793ca5bfacee87 | 4,273 | py | Python | ActorCritic/A2C_ver2/A2C.py | pickxiguapi/rl-algorithm | a57991acd178077fd7f51bcd4ae2ee58492475c2 | [
"MIT"
] | 2 | 2021-01-06T09:45:23.000Z | 2021-04-21T09:39:14.000Z | ActorCritic/A2C_ver2/A2C.py | pickxiguapi/rl-algorithm | a57991acd178077fd7f51bcd4ae2ee58492475c2 | [
"MIT"
] | null | null | null | ActorCritic/A2C_ver2/A2C.py | pickxiguapi/rl-algorithm | a57991acd178077fd7f51bcd4ae2ee58492475c2 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Advantage Actor Critic(A2C)
AC policy loss: -log_prob(a) * Q(s, a)
A2C policy loss: -log_prob(a) * (Q(s, a) - V(s)) V(s') replaced by R(s')
@File : A2C.py
@Time : 2020/12/8
@Author : Yuan Yifu
"""
import math
import random
import gym
import numpy as np
import torch
import torch.n... | 33.912698 | 113 | 0.590686 |
0f8164037a320a3ae0fe581c2f072cdff808c755 | 279 | py | Python | BITs/2014/KOSTAREV_A_I/task_1_13.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/KOSTAREV_A_I/task_1_13.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/KOSTAREV_A_I/task_1_13.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача №1 , Вариант 13
#Компьютер выводит род деятельности и псевдоним под которым скрывается известный человек
#Костарев А. И.
#29.02.16
print ("Влади Марина — французская актриса (настоящее имя Мария Луиза Полякова - Байдарова).")
input ("Нажмите Enter для выхода.") | 34.875 | 95 | 0.74552 |
7ef54809ed2c1e2c23cb5c45a4f5cc2942676fbe | 4,872 | py | Python | src/onegov/form/display.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/display.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/form/display.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ Contains renderers to display form fields. """
import humanize
from html import escape
from onegov.core.markdown import render_untrusted_markdown
from onegov.form import log
from translationstring import TranslationString
__all__ = ['render_field']
class Registry(object):
""" Keeps track of all the render... | 26.769231 | 79 | 0.652094 |
7d33a22a1e7ac16561177c50d0044c869c870378 | 9,213 | py | Python | api/utils/update_nina.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 2 | 2021-03-23T20:32:38.000Z | 2021-04-21T11:20:12.000Z | api/utils/update_nina.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | 4 | 2021-04-19T11:00:55.000Z | 2021-04-20T08:21:48.000Z | api/utils/update_nina.py | healthIMIS/aha-kompass | 7b7cae24502c0c0e5635c587cfef797a93ae02b5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Corona-Info-App
# Update Measures from NINA-App
# © 2020 Tobias Höpp
# Include utilities
import json
import traceback
from sqlalchemy import and_
import bs4
from utils.markdownify import markdownify
# Include db connection
from main import db
# Include models
from models.districts import dis... | 56.87037 | 527 | 0.611527 |
adb4cb7283f5215f184264594f1a8001665772e0 | 41 | py | Python | Scripts/Hello_world.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 8 | 2020-10-26T06:51:06.000Z | 2021-04-02T13:01:27.000Z | Scripts/Hello_world.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 71 | 2020-10-25T22:46:02.000Z | 2021-10-14T06:47:39.000Z | Scripts/Hello_world.py | kenanchristian/hacktoberfest | b55750bf4facb77abd532b66ed37101e2895c4d7 | [
"MIT"
] | 77 | 2020-10-24T01:53:46.000Z | 2021-10-01T06:25:27.000Z | def hw():
print("Hello World!")
hw() | 10.25 | 25 | 0.536585 |
cbb4493c411fed6c4d3d8724f11e27a466651676 | 1,804 | py | Python | script/pyscripts/tag_gen.py | agarrharr/fronzbot.github.io | 702f5a9d5ab15046f0dad539e57766a24f583d1d | [
"MIT"
] | 3 | 2020-04-08T03:01:05.000Z | 2021-11-04T11:10:52.000Z | script/pyscripts/tag_gen.py | agarrharr/fronzbot.github.io | 702f5a9d5ab15046f0dad539e57766a24f583d1d | [
"MIT"
] | 20 | 2017-07-28T02:54:39.000Z | 2022-02-26T03:34:48.000Z | script/pyscripts/tag_gen.py | agarrharr/fronzbot.github.io | 702f5a9d5ab15046f0dad539e57766a24f583d1d | [
"MIT"
] | 4 | 2019-03-04T19:56:13.000Z | 2020-04-09T00:31:09.000Z | #!/usr/bin/env python
"""
tag_gen.py
Author: Kevin Fronczak
Date: Dec 23, 2017
"""
import sys
import os
import glob
from helpers import VALID_TAGS, COLOR
from helpers import print_errors as ERRPRINT
BASEDIR = '/home/kevin/Projects/fronzbot.github.io'
POSTDIR = '_posts/'
TAGDIR = 'tag/'
post_dir = os.path.join(BASEDI... | 28.1875 | 118 | 0.595344 |
cbb90192efc926eefac22ae1e6a4fc978f07af34 | 439 | py | Python | Backend/tests/test_prognosis.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 15 | 2020-04-24T20:18:11.000Z | 2022-01-31T21:05:05.000Z | Backend/tests/test_prognosis.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 2 | 2021-05-19T07:15:09.000Z | 2022-03-07T08:29:34.000Z | Backend/tests/test_prognosis.py | dbvis-ukon/coronavis | f00374ac655c9d68541183d28ede6fe5536581dc | [
"Apache-2.0"
] | 4 | 2020-04-27T16:20:13.000Z | 2021-02-23T10:39:42.000Z | from tests.base_case import BaseCase
class PrognosisTest(BaseCase):
def test_successful_prognosis_fetch(self):
# When
response = self.app.get('/cases-risklayer/prognosis', headers={"Content-Type": "application/json"})
# Then
self.assertEqual(float, type(response.json['prognosis']... | 31.357143 | 107 | 0.690205 |
3806c84488c42344139e22150cce8c7cffb7a2c6 | 404 | py | Python | bindings/python/pytests/pytests/test_tree.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/pytests/pytests/test_tree.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/pytests/pytests/test_tree.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | from ensmallen import Graph # pylint: disable=no-name-in-module
from tqdm.auto import tqdm
import numpy as np
from ensmallen.datasets.linqs import Cora
from ensmallen.datasets.string import HomoSapiens
def test_tree():
"""Test execution of spanning arborescence."""
for graph in tqdm((Cora(), HomoSapiens()), ... | 33.666667 | 88 | 0.75 |
380c1b32b4621e802b0fb5cf56503183dff9d563 | 1,885 | py | Python | tests/test_preisblattnetznutzung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | tests/test_preisblattnetznutzung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | tests/test_preisblattnetznutzung.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | import pytest # type:ignore[import]
from bo4e.bo.preisblattnetznutzung import PreisblattNetznutzung, PreisblattNetznutzungSchema
from bo4e.enum.bilanzierungsmethode import Bilanzierungsmethode
from bo4e.enum.kundengruppe import Kundengruppe
from bo4e.enum.netzebene import Netzebene
from bo4e.enum.preisstatus import P... | 42.840909 | 110 | 0.697613 |
389bfcbde19e69d8729ea7d937520d006d6ba7fa | 12,814 | py | Python | benchmarks/matbench_v0.1_alignn/run.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | 15 | 2021-11-01T09:02:19.000Z | 2022-03-19T10:59:41.000Z | benchmarks/matbench_v0.1_alignn/run.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | 62 | 2021-09-20T14:09:59.000Z | 2022-03-30T19:03:22.000Z | benchmarks/matbench_v0.1_alignn/run.py | sparks-baird/matbench | 4424609454286e32fff2bcc724379b2a316c5a76 | [
"MIT"
] | 3 | 2021-11-26T10:13:48.000Z | 2022-01-08T06:56:03.000Z | """Train ALIGNN model on MatBench dataset."""
# Ref: https://www.nature.com/articles/s41524-021-00650-1
# conda create --name matbench_test python=3.8
# conda activate matbench_test
# pip install alignn matbench dgl-cu111
from matbench.bench import MatbenchBenchmark
from matbench.constants import CLF_KEY
import os
im... | 37.577713 | 77 | 0.468316 |
2ad4d8d2d2ef72e049317fa4b2525ee664712c3d | 195 | pyde | Python | sketches/maze01/maze01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/maze01/maze01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/maze01/maze01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from maze import Maze
num_rows = 20
num_cols = 20
grid_size = 32
maze = Maze(num_rows, num_cols, grid_size)
def setup():
size(640, 640)
maze.connect_grid_default()
maze.print_me()
| 15 | 42 | 0.697436 |
2dcbb9a7e286efd0e060b8595b34be987e70e1e9 | 1,234 | py | Python | Redenanalyse.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | Redenanalyse.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | Redenanalyse.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | import tweepy
import wordcloud
from Credentialstwitter import *
from wordcloud import WordCloud, STOPWORDS
import matplotlib.pyplot as plt
auth = tweepy.OAuthHandler(ConsumerKey, ConsumerSecret)
api = tweepy.API(auth)
text = " "
tweets = api.user_timeline(screen_name ="maiconkusterkkk", count=1000, include_rts = Fals... | 49.36 | 186 | 0.611021 |
3599998e03cea9e821942be06be4598516a7ec26 | 6,780 | py | Python | profil/forms.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | profil/forms.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | 14 | 2018-09-12T06:59:55.000Z | 2020-02-26T07:17:48.000Z | profil/forms.py | AndiBr/ffksk | ff4bc4ad26d4571eaa1a6ff815b2e6a876f8ba99 | [
"MIT"
] | null | null | null | from django import forms
from django.core.exceptions import ValidationError
from django.contrib.auth.forms import UserCreationForm
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.tokens import default_token_generator
from kiosk.bot import slack_SendMsg
from django.contrib.sites.shortcu... | 43.184713 | 317 | 0.689823 |
35ce3b50772f91df072a1c79305b4217f0f63a22 | 3,037 | py | Python | Enigma 2 - Local Bouquet to Remote Converter/E2WebIFBouquetReader.py | gianmarcov/public | e9cda1c8afc10a183c0951bd737c3c5ecbe78fe2 | [
"MIT"
] | 1 | 2015-04-07T18:35:43.000Z | 2015-04-07T18:35:43.000Z | Enigma 2 - Local Bouquet to Remote Converter/E2WebIFBouquetReader.py | gianmarcov/public | e9cda1c8afc10a183c0951bd737c3c5ecbe78fe2 | [
"MIT"
] | null | null | null | Enigma 2 - Local Bouquet to Remote Converter/E2WebIFBouquetReader.py | gianmarcov/public | e9cda1c8afc10a183c0951bd737c3c5ecbe78fe2 | [
"MIT"
] | null | null | null | '''
* The MIT License (MIT)
*
* Copyright (c) 2015 Vitelli Gianmarco
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* t... | 32.308511 | 81 | 0.610142 |
35d0d3537701d2bce57fca6acc387ac6dd5f7320 | 494 | py | Python | src/onegov/winterthur/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/winterthur/models/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.winterthur.models.address import WinterthurAddress
from onegov.winterthur.models.mission_report import MissionReport
from onegov.winterthur.models.mission_report import MissionReportFile
from onegov.winterthur.models.mission_report import MissionReportVehicle
from onegov.winterthur.models.mission_report imp... | 32.933333 | 75 | 0.82996 |
a4dc14e498736827e4c602f03069d405c9c81004 | 6,291 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_mismatch_type.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_mismatch_type.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/monitor/rule/factor_mismatch_type.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from datetime import datetime
from typing import Optional, Tuple
from watchmen_data_kernel.storage import TopicDataService
from watchmen_model.admin import Factor, FactorType
from watchmen_model.dqc import MonitorRule
from watchmen_storage import EntityCriteria
from watchmen_utilities import DateTimeConstants
from .da... | 36.155172 | 118 | 0.782864 |
3514add092d69932a74b4be5f41782ab8582ea00 | 951 | py | Python | Python/Strings/Alphabet_Rangoli.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Python/Strings/Alphabet_Rangoli.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Python/Strings/Alphabet_Rangoli.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null |
# https://www.hackerrank.com/challenges/alphabet-rangoli/problem?h_r=internal-search
import string
def print_rangoli(n):
# formulae
a = string.ascii_lowercase #alpha
f = (n+n-1)*2 - 1 #width
#shape
if n == 1:
print(a[n-f].center(f,'-'))
else:
for i in range(n):
... | 21.613636 | 84 | 0.415352 |
dc5b77851e08099c0459891e9c8b22b6390976bb | 407 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v6_2/remove_newsletter_duplicates.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v6_2/remove_newsletter_duplicates.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v6_2/remove_newsletter_duplicates.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | import frappe
def execute():
duplicates = frappe.db.sql("""select email_group, email, count(name)
from `tabEmail Group Member`
group by email_group, email
having count(name) > 1""")
# delete all duplicates except 1
for email_group, email, count in duplicates:
frappe.db.sql("""delete from `tabEmail Group Me... | 31.307692 | 80 | 0.717445 |
f4927dbc6dd97930c032e5502d62f0f772dcada6 | 331 | py | Python | TestBot/test_cogs/poketcgFunctions/__init__.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/poketcgFunctions/__init__.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | TestBot/test_cogs/poketcgFunctions/__init__.py | austinmh12/DiscordBots | 55550b68a7ad6423de55e62dbbff93fd88f08ff2 | [
"MIT"
] | null | null | null | import requests as r
# Constants
with open('../.env') as f:
ENV = {l.strip().split('=')[0]: l.strip().split('=')[1] for l in f.readlines()}
# Functions
def api_call(endpoint, params={}):
return r.get(
f'https://api.pokemontcg.io/v2/{endpoint}',
headers={'X-Api-Key': ENV.get('POKETCGAPIKEY')},
params=params
)... | 19.470588 | 80 | 0.625378 |
5e42c84f240dc2714c3d2824adad3fe51aa775aa | 1,938 | py | Python | erc/urls.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | null | null | null | erc/urls.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | 5 | 2020-10-10T00:21:37.000Z | 2021-09-22T18:01:46.000Z | erc/urls.py | KSIUJ/erc-backend | a78a6ee85c2865c8d25c15f40dc72fe32ba4bfd3 | [
"MIT"
] | null | null | null | """erc URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 38 | 105 | 0.750774 |
801eb905941ab20c8310fedf75cac5486a154f66 | 262 | py | Python | exercises/fr/solution_02_02_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/fr/solution_02_02_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/fr/solution_02_02_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
nlp = spacy.blank("fr")
doc = nlp("J'ai un chat")
# Recherche le hash pour le mot "chat"
cat_hash = nlp.vocab.strings["chat"]
print(cat_hash)
# Recherche chat_hash pour obtenir la chaine
cat_string = nlp.vocab.strings[cat_hash]
print(cat_string)
| 20.153846 | 44 | 0.740458 |
1d6a6abd023956c00c22858049b0c5c03ba4415f | 1,133 | py | Python | apps/views/main.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | apps/views/main.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | apps/views/main.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | from flask import Blueprint,render_template,flash,redirect,url_for,request
from apps.forms import PostsForm
from flask_login import current_user
from apps.models import Posts
from apps.extensions import db
#实例化蓝本对象
main = Blueprint('main',__name__)
@main.route('/',methods=['GET','POST'])
def index():
form = PostsF... | 36.548387 | 119 | 0.675199 |
d5191f39be30da114302c69ea62ecbd2eb7af52a | 1,803 | py | Python | hardware/bus/BusDoor.py | BlueHC/TTHack-2018--Easy-Rider-1 | 8cd8f66de88ff80751a1083350c38985ac26914d | [
"Apache-2.0"
] | null | null | null | hardware/bus/BusDoor.py | BlueHC/TTHack-2018--Easy-Rider-1 | 8cd8f66de88ff80751a1083350c38985ac26914d | [
"Apache-2.0"
] | null | null | null | hardware/bus/BusDoor.py | BlueHC/TTHack-2018--Easy-Rider-1 | 8cd8f66de88ff80751a1083350c38985ac26914d | [
"Apache-2.0"
] | null | null | null | import time
import requests
from datetime import datetime, timedelta
from beacontools import BeaconScanner, EddystoneURLFrame
url = "http://easyriderbackend.eu-gb.mybluemix.net/ride"
rssiLimit = -40
scanTime = 5
disconnectTime = 20
lastSeen = {}
passengers = []
def send(deviceID, station, mediumID, b): #string, st... | 26.514706 | 111 | 0.651137 |
89a4b09f382b1232137822cf3c1f74298e1d9b3e | 726 | py | Python | datadog/pyhton-api/dashboards/src/main/python/main.py | NovaOrdis/playground | 6fe076b5d246ac5b492ab8d5de04eef43d797b62 | [
"Apache-2.0"
] | 5 | 2016-11-16T02:18:45.000Z | 2018-03-14T19:57:11.000Z | datadog/pyhton-api/dashboards/src/main/python/main.py | NovaOrdis/playground | 6fe076b5d246ac5b492ab8d5de04eef43d797b62 | [
"Apache-2.0"
] | null | null | null | datadog/pyhton-api/dashboards/src/main/python/main.py | NovaOrdis/playground | 6fe076b5d246ac5b492ab8d5de04eef43d797b62 | [
"Apache-2.0"
] | 10 | 2016-06-06T18:28:13.000Z | 2018-07-01T18:20:06.000Z | from datadog_api_client.v1 import ApiClient, Configuration
from datadog_api_client.v1.api.dashboards_api import DashboardsApi
configuration = Configuration()
#
# Get all dashboards
#
with ApiClient(configuration) as api_client:
api_instance = DashboardsApi(api_client)
#
# all dashboards
#
dashboar... | 22.6875 | 75 | 0.655647 |
98b7d6b37bbc60de1f2c33c41f98b95695b4c9df | 302 | py | Python | PYTHON/temp.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/temp.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/temp.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import re
arr = [ 'lara@hackerrank.com', 'brian-23@hackerrank.com', 'britts_54@hackerrank.comzxc','jak?989@hackerrank.com',]
for a in arr:
print(a, re.match('[a-zA-Z0-9-_]+@[a-zA-Z0-9]+\.[a-zA-Z0-9]{1,3}$', a))
# print(a, re.match('(^[a-zA-Z-_])@(\w{3})\.(\w{3})', a))
| 33.555556 | 114 | 0.57947 |
7f7bfd2382583924fc9c5a8367b49669c9691e54 | 256 | py | Python | Pythonjunior2020/Woche1/Aufgabe_1_7_1.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche1/Aufgabe_1_7_1.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche1/Aufgabe_1_7_1.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | # 1.7.1. Woche 1, Block 7, Aufgabe 1
# Imports
from turtle import *
from time import sleep
# Farben
bgcolor("blue")
fillcolor("yellow")
begin_fill()
# Quadrat
for i in range(0, 4):
forward(200)
left(90)
# End Farben
end_fill()
# Pause
sleep(5) | 12.190476 | 36 | 0.667969 |
f6d6ad86f52412c7601460225157799ea1ea6b46 | 17,746 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/coremodules/demand/publictransportservices_wxgui.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/contributed/sumopy/coremodules/demand/publictransportservices_wxgui.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/contributed/sumopy/coremodules/demand/publictransportservices_wxgui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
# SUMOPy module
# Copyright (C) 2012-2017 University of Bologna - DICAM
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public ... | 41.078704 | 197 | 0.542376 |
614d06eede09bc20b295f514181a10ba4d770733 | 752 | py | Python | Fastir_Collector/filecatcher/archives.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/filecatcher/archives.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/filecatcher/archives.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | from zipfile import ZipFile
class _Archives(ZipFile):
def __init__(self, path_archive, logger):
self.logger = logger
self.logger.info("Archive creating: %s " % path_archive)
super(_Archives, self).__init__(path_archive, 'a', allowZip64=True)
self.logger.info("Archive created: %s " ... | 32.695652 | 76 | 0.605053 |
615435eb5b89e6aa6ab0c2caf4fe1a9930c23d5f | 377 | py | Python | HackerP/Basic Data Types/Lists.py | JKChang2015/hackerrank | 5e5bd6892d2e4754e73f73eecfa8f4b9f266c3bd | [
"MIT"
] | null | null | null | HackerP/Basic Data Types/Lists.py | JKChang2015/hackerrank | 5e5bd6892d2e4754e73f73eecfa8f4b9f266c3bd | [
"MIT"
] | null | null | null | HackerP/Basic Data Types/Lists.py | JKChang2015/hackerrank | 5e5bd6892d2e4754e73f73eecfa8f4b9f266c3bd | [
"MIT"
] | null | null | null | # Lists
# Created by JKChang
# 14/08/2018, 14:17
# Tag:
# Description:
if __name__ == '__main__':
cmd_count = int(input())
l = []
for _ in range(cmd_count):
s = input().split()
cmd = s[0]
args = s[1:]
if cmd != 'print':
cmd += "(" + ",".join(args) + ")"
... | 18.85 | 45 | 0.435013 |
f60c5d0c8b02ffbed7878d0ccd1ff6953331fb12 | 2,685 | py | Python | Python/Sonstige_Uebungen/shuffle_sequence.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Sonstige_Uebungen/shuffle_sequence.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Sonstige_Uebungen/shuffle_sequence.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: shuffle_sequence.py
# Project: Sonstige_Uebungen
# Created Date: Saturday 02.03.2019, 06:01
# Author: Apop85
# -----
# Last Modified: Wednesday 06.03.2019, 16:13
# -----
# Copyright (c) 2019 Apop85
# This software is published under the MIT license.
# Check http... | 36.283784 | 229 | 0.597393 |
dcd2bdb5f8d9985e2e3d560982127cb18b662c14 | 2,707 | py | Python | research/nlp/gpt2/src/GPT2ForReadComprehension.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/nlp/gpt2/src/GPT2ForReadComprehension.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/nlp/gpt2/src/GPT2ForReadComprehension.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... | 41.015152 | 116 | 0.653122 |
d36a61db10c25f53c5d20fe5f0c6650da76c387b | 434 | py | Python | source/pkgsrc/converters/py-arabic-reshaper/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/converters/py-arabic-reshaper/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/converters/py-arabic-reshaper/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.1 2021/04/28 09:52:18 adam Exp $
Fix building with Python 2.7.
--- setup.py.orig 2021-04-28 09:49:06.000000000 +0000
+++ setup.py
@@ -5,8 +5,8 @@ from setuptools import setup
import os
-with open("README.md", "r", encoding="utf-8") as fh:
- long_description = fh.read()
+with open("... | 24.111111 | 60 | 0.645161 |
9facc82540116b9019e0ef9a735ac9670e823ecc | 14,558 | py | Python | projects/001-geburtstag/Kuna42_calendar.py | gaylordmartin179/start-projects | 094c7b3ab379bea39eabb31174e479307f9a3af0 | [
"MIT"
] | null | null | null | projects/001-geburtstag/Kuna42_calendar.py | gaylordmartin179/start-projects | 094c7b3ab379bea39eabb31174e479307f9a3af0 | [
"MIT"
] | 2 | 2021-04-04T09:16:43.000Z | 2021-04-07T08:53:53.000Z | projects/001-geburtstag/Kuna42_calendar.py | gaylordmartin179/start-projects | 094c7b3ab379bea39eabb31174e479307f9a3af0 | [
"MIT"
] | 2 | 2021-04-04T09:19:31.000Z | 2021-05-02T15:06:50.000Z | # this is an example
#
# Dieses Beispiel enthält vorschläge für Formatierung
# (und geht über das Niveau des start-projects hinaus).
# Dieser Code kann als inspiration dienen um sich den
# Aufbau eines Programms in Python vorzustellen.
#
# Nutzt bitte Methoden und führt dann zum Schluss diese
# in dieser if Abfrage au... | 34.995192 | 92 | 0.516761 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.