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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6ff79f0349f01ad1d3d8f7f73d4580b5054f232a | 2,227 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch06_arrays/ex06_erase_chains_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch06_arrays/ex06_erase_chains_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch06_arrays/ex06_erase_chains_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
from ch06_arrays.solutions.ex06_erase_and_fall_down import erase_chains, fall_down
def test_erase_chains_initial_show_case():
values2dim = [[1, 1, 1, 2, 4, 4, 3],
[1, 1, 3, 4, 2, 4, 3],
[1, ... | 28.551282 | 82 | 0.407274 |
962a3fb02db49f50868113b675fe3929db1f85f3 | 3,271 | py | Python | 2019/finals/reversing-elisp2/solution/checker.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2019/finals/reversing-elisp2/solution/checker.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2019/finals/reversing-elisp2/solution/checker.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | # Copyright 2019 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... | 31.757282 | 243 | 0.620605 |
f7b8600a9ab3a62f3e289706400b5ba232ea3dd0 | 6,208 | py | Python | oneflow/python/framework/distribute.py | caishenghang/oneflow | db239cc9f98e551823bf6ce2d4395bd5c339b1c5 | [
"Apache-2.0"
] | 1 | 2020-10-13T03:03:40.000Z | 2020-10-13T03:03:40.000Z | oneflow/python/framework/distribute.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/framework/distribute.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 28.874419 | 184 | 0.71279 |
5496aafb5d03c1425ed85e4a13334625a46a7292 | 2,091 | py | Python | python/oneflow/compatible/single_client/test/ops/test_function_config.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/test/ops/test_function_config.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/test/ops/test_function_config.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 33.190476 | 82 | 0.693926 |
b7100bc03d52e3b4645adb31853dba063b529afe | 97 | py | Python | hist_find/__init__.py | szopu/hist-find | c594c81896223b5e0a15953b3756e9433ae1204d | [
"MIT"
] | 1 | 2017-07-09T17:26:29.000Z | 2017-07-09T17:26:29.000Z | hist_db/__init__.py | apragacz/hist-db | a2631a7eab004499dae98a0495bc17ee78c6be8a | [
"MIT"
] | null | null | null | hist_db/__init__.py | apragacz/hist-db | a2631a7eab004499dae98a0495bc17ee78c6be8a | [
"MIT"
] | null | null | null | from __future__ import absolute_import, print_function, unicode_literals
__version__ = '0.0.1'
| 19.4 | 72 | 0.814433 |
b7cf6d2380777be4350fec657708e29d6caba4bb | 82 | py | Python | app/mip/__init__.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | null | null | null | app/mip/__init__.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | 4 | 2020-08-29T16:11:12.000Z | 2022-03-12T00:47:03.000Z | app/mip/__init__.py | IoTServ/FlaskSimpleCMS | db0fc4464c6d514db14972156ca3e002a60a4876 | [
"MIT"
] | null | null | null | from flask import Blueprint
mip = Blueprint('mip', __name__)
from . import views | 16.4 | 32 | 0.756098 |
b7da249c74ba850cb91a022d1528328acdea892b | 1,441 | py | Python | Algorithms/Constructive/NewYearChaos.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Constructive/NewYearChaos.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Constructive/NewYearChaos.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
#T = int(raw_input())
#for _ in xrange(T):
# n = int(raw_input())
# array = map(lambda x: [int(x), 0], raw_input().split())
with open('data', 'r') as fIn:
n = 99928
array = map(lambda x: [int(x), 0], fIn.read().strip().split())
is_chaos = False
count = 0
for i in xrange(n):
... | 24.423729 | 66 | 0.401804 |
b7e28dbfc9d69cafcda0a3ea5cf4b142ceffdb47 | 2,454 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/digital_ocean_account_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/digital_ocean_account_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/digital_ocean_account_info.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = ty... | 27.886364 | 133 | 0.714751 |
b7e40393bbcfb1000c88c9026ece3baba1643bcb | 1,677 | py | Python | src/experiment/data.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 2 | 2018-04-27T09:02:15.000Z | 2019-04-19T19:12:13.000Z | src/experiment/data.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | 1 | 2019-04-19T19:13:08.000Z | 2021-02-22T21:29:55.000Z | src/experiment/data.py | kaphka/imi-master-thesis | 2331a3534dc32e30a1333bb21c68c1e1b07ec9e4 | [
"MIT"
] | null | null | null | from pathlib import Path
import json
import time
import enum
import networkx as nx
class Datasets(enum.Enum):
diva = 'DIVA-HisDB'
processd = 'DIVA_Chen2017_processed'
balanced = 'Chen2017_np_tiles_balanced'
class Environment(object):
def __init__(self, conf="~/.thesis.conf", name=None):
conv... | 25.8 | 82 | 0.63387 |
4de64dccef92c8ff63ee2fa57851dbf83a719afa | 4,998 | py | Python | frds/mktstructure/trth.py | mgao6767/wrds | 7dca2651a181bf38c61ebde675c9f64d6c96f608 | [
"MIT"
] | 1 | 2022-03-06T20:36:06.000Z | 2022-03-06T20:36:06.000Z | mktstructure/trth.py | mgao6767/mktstructure | 5432c1bed163f838209d34b74c09629bea620ba8 | [
"MIT"
] | null | null | null | mktstructure/trth.py | mgao6767/mktstructure | 5432c1bed163f838209d34b74c09629bea620ba8 | [
"MIT"
] | null | null | null | import requests
import time
from .utils import make_request_index_components, make_request_tick_history
# URL_BASE = "https://hosted.datascopeapi.reuters.com/RestApi/v1"
URL_BASE = "https://selectapi.datascope.refinitiv.com/RestApi/v1"
AUTH_URL = f"{URL_BASE}/Authentication/RequestToken"
SEARCH_HIST_CHAIN_URL = f"{U... | 40.634146 | 102 | 0.617847 |
35f2aaf5a03494605e16f1bd63d663b8363d86b2 | 2,498 | py | Python | Curso-Em-Video-Python/2Exercicios/095_Apromorando_os_dicionarios.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/095_Apromorando_os_dicionarios.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/095_Apromorando_os_dicionarios.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null |
jogadores = dict()
gol = list()
dados = list()
while True:
gol.clear()
jogadores['nome'] = str(input('Nome do jogador: '))
jogadores['partidas'] = int(input(f'Quantas partidas {jogadores["nome"]} jogou? '))
for c in range(0, jogadores['partidas']):
gol.append(int(input(f' Quantos gols na par... | 29.738095 | 87 | 0.546837 |
e1f497e282a6159501b6b925be5d81074d792a9b | 1,187 | py | Python | extractTool/setup.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | null | null | null | extractTool/setup.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 47 | 2018-11-13T13:55:01.000Z | 2019-09-16T13:38:11.000Z | extractTool/setup.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 4 | 2018-11-27T12:36:51.000Z | 2020-10-14T18:07:04.000Z | import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="extractTool",
version="0.4.1",
author="Die Gruppe 1",
author_email="c_bron02@uni-muenster.de",
description="Tool for extracting spatial and temporal extent of Geodata",
long_descriptio... | 28.261905 | 77 | 0.565291 |
fbf8edb5adeb3febf1404fa008aec9bde57bce3f | 1,292 | py | Python | test/unit/v1beta1/suggestion/utils.py | d-gol/katib | 2c8758b26ffd543e08b70464f8ac7b286f3ca2ea | [
"Apache-2.0"
] | 17 | 2018-04-04T08:44:06.000Z | 2018-04-19T18:02:05.000Z | test/unit/v1beta1/suggestion/utils.py | d-gol/katib | 2c8758b26ffd543e08b70464f8ac7b286f3ca2ea | [
"Apache-2.0"
] | 58 | 2018-04-03T19:05:50.000Z | 2018-04-19T16:14:04.000Z | test/unit/v1beta1/suggestion/utils.py | d-gol/katib | 2c8758b26ffd543e08b70464f8ac7b286f3ca2ea | [
"Apache-2.0"
] | 10 | 2018-04-04T02:06:20.000Z | 2018-04-19T08:53:04.000Z | # Copyright 2022 The Kubeflow Authors.
#
# 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 in ... | 40.375 | 81 | 0.741486 |
225d94430d1240976e1e9e15fd45421aa9d4e7bf | 3,238 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/09_sammle_alle_links_einer_website/09_sammle_alle_links_einer_website.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/09_sammle_alle_links_einer_website/09_sammle_alle_links_einer_website.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/09_sammle_alle_links_einer_website/09_sammle_alle_links_einer_website.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 09_sammle_alle_links_einer_website.py
# Dieses Script soll eine beliebige Webseite nach links in allen Unterseiten der Webseite suchen
# und in einem File übersichtlich speichern
### Erst verzeichnis scannen dann erst einträge prüfen um so die links der ersten seite
### auf den folgenden seiten zu ignorieren um di... | 39.012048 | 126 | 0.612415 |
3f6ce5714d3d457c909920cecc14be022faf8377 | 1,047 | py | Python | src/Compiler.py | DrBumm/Minibyte-Engine | 833bf00ff86603419476c8755f551c0f6b4ac86b | [
"Unlicense"
] | 4 | 2019-08-16T20:48:33.000Z | 2021-05-23T20:10:08.000Z | src/Compiler.py | DrBumm/Minibyte-Engine | 833bf00ff86603419476c8755f551c0f6b4ac86b | [
"Unlicense"
] | 16 | 2019-08-21T19:06:15.000Z | 2020-06-02T11:31:32.000Z | src/Compiler.py | DrBumm/Minibyte-Engine | 833bf00ff86603419476c8755f551c0f6b4ac86b | [
"Unlicense"
] | null | null | null | import os
def compiler(pfad, icon_pfad, onefile=True, icon=False):
if onefile and bool(icon):
os.system("pyinstaller -y -F " + icon_pfad + " " + pfad)
elif onefile:
os.system("pyinstaller -y -F " + pfad)
elif not onefile and bool(icon):
os.system("pyinstaller -y -i " + ico... | 37.392857 | 92 | 0.625597 |
58ae01002c6d5103068db456dddae64f3c2d3568 | 1,897 | py | Python | spider/worker_dataset.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | spider/worker_dataset.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | 2 | 2021-03-31T18:54:16.000Z | 2021-12-13T19:49:08.000Z | spider/worker_dataset.py | iecasszyjy/tweet_search-master | e4978521a39964c22ae46bf35d6ff17710e8e6c6 | [
"MIT"
] | null | null | null | import time
import json
import multiprocessing
from multiprocessing import Pool
from Config import get_noau_config
got,db,r = get_noau_config()
def advance_search_dataset(q,f,num,event_id):
_,db,_ = get_config()
collection = db.dataset_
tweetCriteria = got.manager.TweetCriteria().setQuerySearch(q).setTwe... | 37.196078 | 106 | 0.625725 |
450e54ca182968f9aa7cc14078c87c7f7011a33d | 724 | py | Python | Python/Exercícios_Python/037_aprovando_empréstimos.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/037_aprovando_empréstimos.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/037_aprovando_empréstimos.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""037 - Aprovando Empréstimos
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/132attdgv4hYuRgsWDzPVkNRtrAQplDo3
"""
print('=' * 35)
print('Programa Meu Python, Minha vida')
print('=' * 35)
casa = float(input('Qua o valor da cas... | 34.47619 | 109 | 0.685083 |
18fa44638b2e2f02e3e225f7ea7c31e13cc4bcd1 | 5,256 | py | Python | 20-fs-ias-lec/groups/01-dev2dev/Code/application/connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/application/connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-fs-ias-lec/groups/01-dev2dev/Code/application/connection.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | #!/usr/bin/env python3
"""Connection Module
This module contains the function definitions used for
- the device discovery process
- establishing a connection
###NOTICE: Bluetooth Discovery can take quite a long time (up to 15 seconds)
It is important to check if the nearby devices are actually disco... | 34.807947 | 100 | 0.625 |
e148d229a3f74b6678ca551d7d9d0c22def152a7 | 3,829 | py | Python | next2018/amer/goldenrod/script.py | nutanix/hackathon | b9d47c4911036b6037c5d817cbe38af83b83de7a | [
"MIT"
] | 1 | 2018-05-15T21:25:17.000Z | 2018-05-15T21:25:17.000Z | next2018/amer/goldenrod/script.py | nutanix/hackathon | b9d47c4911036b6037c5d817cbe38af83b83de7a | [
"MIT"
] | 1 | 2021-06-01T22:18:54.000Z | 2021-06-01T22:18:54.000Z | next2018/amer/goldenrod/script.py | nutanix/hackathon | b9d47c4911036b6037c5d817cbe38af83b83de7a | [
"MIT"
] | 1 | 2018-05-15T23:59:11.000Z | 2018-05-15T23:59:11.000Z | #!/usr/bin/env python
# script.py -*-python-*-
import json
import requests
import sys
import time
sys.path.append("./automation/solution/")
from V3 import *
from config import *
from manageBlueprint import *
class Connector(object):
def __init__(self):
self.connection = Connection(User(USER, PASSWD),
... | 30.879032 | 105 | 0.58971 |
36757e23f1f1f798ac373fc873eb6ff1bcc5f171 | 2,442 | py | Python | packages/std/nodes/std___ReadFile0/std___ReadFile0.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | packages/std/nodes/std___ReadFile0/std___ReadFile0.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | packages/std/nodes/std___ReadFile0/std___ReadFile0.py | Shirazbello/Pyscriptining | 0f2c80a9bb10477d65966faeccc7783f20385c1b | [
"MIT"
] | null | null | null | from custom_src.NodeInstance import NodeInstance
from custom_src.Node import Node
# GENERAL
# self.input(index) <- access to input data
# self.outputs[index].set_val(val) <- set output data port value
# self.main_widget <- access to main widget
# self.exec_output(index) ... | 33.916667 | 110 | 0.64742 |
3d684799db2a39e2d7aea7b5bc18dc3bdd505484 | 587 | py | Python | bot/actions/action_get_date.py | cosibot/cosibot-germany-german | ed8917e0da7ebb1ce2140674cc63bc7f82628408 | [
"MIT"
] | null | null | null | bot/actions/action_get_date.py | cosibot/cosibot-germany-german | ed8917e0da7ebb1ce2140674cc63bc7f82628408 | [
"MIT"
] | null | null | null | bot/actions/action_get_date.py | cosibot/cosibot-germany-german | ed8917e0da7ebb1ce2140674cc63bc7f82628408 | [
"MIT"
] | null | null | null | from typing import Text, Any, Dict, List
from datetime import date
from rasa_sdk import Action, Tracker
from rasa_sdk.events import SlotSet, FollowupAction
from rasa_sdk.executor import CollectingDispatcher
class GetDateValue(Action):
def name(self):
return "action_get_date"
def run(self, dispatche... | 29.35 | 64 | 0.681431 |
9a97189353f1a0d3bb119730d29a202d16051c2e | 577 | py | Python | imgFilter/filter/util.py | xiang2002/Web | f12393c38ea3e88ceb67d270d707f3df0cf5e05a | [
"MIT"
] | 1 | 2020-10-21T07:18:00.000Z | 2020-10-21T07:18:00.000Z | imgFilter/filter/util.py | xiang2002/Web | f12393c38ea3e88ceb67d270d707f3df0cf5e05a | [
"MIT"
] | null | null | null | imgFilter/filter/util.py | xiang2002/Web | f12393c38ea3e88ceb67d270d707f3df0cf5e05a | [
"MIT"
] | null | null | null | import os, shutil
from filter.models import Queue
# def init_queue():
# # for i, img in enumerate(os.listdir('filter/data/')):
# # Queue.objects.create(name=img)
# # print(i)
# # return 0
def delete_img(name):
print(os.getcwd())
path = "filter/static/data/"+name
if ... | 21.37037 | 61 | 0.57539 |
9ab38c1382d9fa509fe956077035d724a8261536 | 2,094 | py | Python | rbac/common/logs/__init__.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | rbac/common/logs/__init__.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | rbac/common/logs/__init__.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 72 | 2018-04-13T18:29:12.000Z | 2020-05-29T06:00:33.000Z | # Copyright 2019 Contributors to Hyperledger Sawtooth
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 31.253731 | 79 | 0.713945 |
b128d67fc46a212a0b4d68da9cc04cb7e31fb5fe | 16,764 | py | Python | examples/text_to_sql/RAT-SQL/text2sql/models/sql_decoder/tree_traversal.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/RAT-SQL/text2sql/models/sql_decoder/tree_traversal.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/RAT-SQL/text2sql/models/sql_decoder/tree_traversal.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 37.927602 | 120 | 0.610952 |
b164d253f15b7603fd2df868de89d468d9507f88 | 3,315 | py | Python | python/oneflow/test/graph/test_multi_graph.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/test/graph/test_multi_graph.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/test/graph/test_multi_graph.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 33.484848 | 77 | 0.612971 |
774b8b944c0407b379d683286d5a1d4b9a5fa6f3 | 592 | py | Python | Nucleo/smain_Handler.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Nucleo/smain_Handler.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | Nucleo/smain_Handler.py | Jonatan966/SODA | 046d8c1e7b9bac3a555526c9fe2f365c2b338aca | [
"MIT"
] | null | null | null | import sys
sys.path.append('Nucleo/')
sys.path.append('Modulos/')
from Nucleo import *
from Modulos import *
'''
Aqui ficará todos os Handlers de todos os módulos
para deixar o sistema mais dinâmico, e mais fácil
para futuras alterações.
'''
class sMain_Handlers:
def matHandler(self, name):
na... | 23.68 | 53 | 0.640203 |
623bd0ba30c9b07d913b212508a4c9d5a4a84063 | 291 | py | Python | python/fileprs.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | python/fileprs.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | python/fileprs.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | # import pickle
# with open('filsrc.dmp', "wb") as output:
# pickle.dump(filedick, output)
import cPickle as pickle
from fileinfo import Fileinfo
# to deserialize the object
with open('filsrc.dmp', 'rb') as input:
filedick = pickle.load(input) # protocol version is auto detected
| 24.25 | 69 | 0.721649 |
02cd531573de29bda859b5eded36c9c94aac9282 | 3,115 | py | Python | project/forms/common.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/forms/common.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/forms/common.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from flask import url_for
from flask_babelex import lazy_gettext
from flask_wtf import FlaskForm
from markupsafe import Markup
from wtforms import HiddenField, StringField
from wtforms.validators import Optional
from project.imageutils import (
get_bytes_from_image,
get_data_uri_from_bytes,
get_image_from_... | 27.566372 | 120 | 0.617335 |
b2668580fbd82d4496d34dd77d505999ebd342b7 | 895 | py | Python | setup.py | Katamave/sonnen_api_v2 | a2ed19631162cd730c1c56a30c1597bbe28c4c04 | [
"MIT"
] | null | null | null | setup.py | Katamave/sonnen_api_v2 | a2ed19631162cd730c1c56a30c1597bbe28c4c04 | [
"MIT"
] | null | null | null | setup.py | Katamave/sonnen_api_v2 | a2ed19631162cd730c1c56a30c1597bbe28c4c04 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import os
def read_file(file):
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, file), mode='r', encoding='UTF-8') as file:
return file.read()
def get_version(file):
for line in read_file(file).splitlines():
if lin... | 27.121212 | 76 | 0.650279 |
b28bb7c32bdc0d5a326af024975eec334db38894 | 4,907 | py | Python | setGoePower.py | tgfuellner/venusGX | fda42e37d8f3521c543e96b9bead5cb978268026 | [
"MIT"
] | null | null | null | setGoePower.py | tgfuellner/venusGX | fda42e37d8f3521c543e96b9bead5cb978268026 | [
"MIT"
] | null | null | null | setGoePower.py | tgfuellner/venusGX | fda42e37d8f3521c543e96b9bead5cb978268026 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# See https://github.com/victronenergy/velib_python/blob/master/examples/vedbusitem_import_examples.py
from dbus.mainloop.glib import DBusGMainLoop
from goecharger import (GoeCharger)
from datetime import datetime, timedelta
import argparse
import signal
import atexit
import ... | 32.496689 | 152 | 0.654168 |
a23922f78e6850ab0c87aa9390f64f29c335f42d | 2,874 | py | Python | volley/connectors/zmq.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | volley/connectors/zmq.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | volley/connectors/zmq.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | import logging
import os
import time
from dataclasses import dataclass
from typing import Any, Optional, Union
import zmq
from prometheus_client import Summary
from volley.connectors.base import BaseConsumer, BaseProducer
from volley.data_models import QueueMessage
logger = logging.getLogger(__name__)
PROCESS_TIME ... | 29.030303 | 111 | 0.622825 |
a24cdffccdf3b6c4fcc9dbbb82da00758413c2f4 | 3,951 | py | Python | backend/Parsers/ncku_tainan.py | SeanGau/vaccinate | f3d7388c666ee466da570e8c17bbe1f2caee912f | [
"MIT"
] | 39 | 2021-05-01T03:36:44.000Z | 2021-11-16T13:29:21.000Z | backend/Parsers/ncku_tainan.py | SeanGau/vaccinate | f3d7388c666ee466da570e8c17bbe1f2caee912f | [
"MIT"
] | 50 | 2021-04-28T10:57:07.000Z | 2021-08-19T05:13:07.000Z | backend/Parsers/ncku_tainan.py | SeanGau/vaccinate | f3d7388c666ee466da570e8c17bbe1f2caee912f | [
"MIT"
] | 19 | 2021-05-02T04:25:02.000Z | 2021-07-11T04:34:16.000Z | import bs4, requests
from hospital_types import (
AppointmentAvailability,
HospitalAvailabilitySchema,
ScrapedData,
)
from Parsers.Scraper import Scraper
import aiohttp
import ssl
CERT: str = "../data/hosp-ncku-edu-tw-chain.pem"
URL_SELF_PAID = "https://service.hosp.ncku.edu.tw/Tandem/MainUI.aspx?Lang=&sk... | 38.359223 | 128 | 0.603645 |
3ba6e751dcb1b47206c4fa24e088aed42e369c9f | 1,301 | py | Python | helper/baselApi.py | dgnaegi/altpapierBot | 287d7e446eabf189189713067d8ac7405416d720 | [
"WTFPL"
] | 5 | 2019-07-17T04:36:14.000Z | 2020-05-04T12:48:10.000Z | helper/baselApi.py | dgnaegi/altpapierBot | 287d7e446eabf189189713067d8ac7405416d720 | [
"WTFPL"
] | 8 | 2019-08-04T19:16:00.000Z | 2021-09-10T10:11:47.000Z | helper/baselApi.py | dgnaegi/altpapierBot | 287d7e446eabf189189713067d8ac7405416d720 | [
"WTFPL"
] | 3 | 2019-07-17T06:37:56.000Z | 2021-09-06T19:59:18.000Z | from datetime import datetime
from datetime import date
from datetime import timedelta
from urllib.request import urlopen
import json
class baselApi:
@staticmethod
def GetTomorrowDisposalAreaCodes():
requestedDate = str((datetime.now() + timedelta(days=1)).strftime('%Y-%m-%d'))
url = "https://d... | 44.862069 | 235 | 0.663336 |
ce747494ca1e285b3ef70dfc6b24955473f4b472 | 1,162 | py | Python | source/pkgsrc/databases/mongodb/patches/patch-site__scons_mongo_platform.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/databases/mongodb/patches/patch-site__scons_mongo_platform.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/databases/mongodb/patches/patch-site__scons_mongo_platform.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-site__scons_mongo_platform.py,v 1.2 2020/02/01 20:00:08 adam Exp $
Add NetBSD and Dragonfly support.
--- site_scons/mongo/platform.py.orig 2019-12-04 23:29:59.000000000 +0000
+++ site_scons/mongo/platform.py
@@ -22,6 +22,10 @@ def get_running_os_name():
running_os = 'linux'
elif running_o... | 43.037037 | 124 | 0.664372 |
0c8309389411024f96445bd70cc26502224dd8f8 | 2,645 | py | Python | HackTon/HiddenEye/Defs/Send_Email/SendEmail.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | HackTon/HiddenEye/Defs/Send_Email/SendEmail.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | HackTon/HiddenEye/Defs/Send_Email/SendEmail.py | GitInitDev/ZohoUniv | 966704837e65f58b52492b56d08e7958df3d220a | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import os
import base64
import smtplib
import emailconfig
from os import system
from email.mime.text import MIMEText
from email import encoders
from email.mime.base import MIMEBase
from email.mime.multipart import MIMEMultipart
COMMASPACE = ', '
def main():
system('touch ... | 35.266667 | 209 | 0.63138 |
0c8d24ee3b3f74fbf20b7628d67ef604099df9b4 | 227 | py | Python | Tutorials/10 Days of Statistics/Day 5/poisson_distribution1.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/poisson_distribution1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Tutorials/10 Days of Statistics/Day 5/poisson_distribution1.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
from math import factorial as fac
from math import exp
def poisson_dist(lam, k):
return lam**k * exp(-lam) / fac(k)
lam = float(input())
k = int(input())
print(round(poisson_dist(lam, k), 3))
| 15.133333 | 38 | 0.669604 |
0cd1ac1d3ec09c8c3180f7c3701ed780bc387885 | 11,955 | py | Python | research/hpc/molecular_dynamics/src/network.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/hpc/molecular_dynamics/src/network.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/hpc/molecular_dynamics/src/network.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... | 48.795918 | 119 | 0.55023 |
e7ed21c10b3916931418c7ee905529e525c6a0a8 | 16,545 | py | Python | pupil_invisible_monitor/src/pupil_invisible_monitor/models.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | pupil_invisible_monitor/src/pupil_invisible_monitor/models.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | pupil_invisible_monitor/src/pupil_invisible_monitor/models.py | JuBepy/Gaze_Mouse | 4ddea30b4f53deb744dac3f370e7f48baa3b99c2 | [
"MIT"
] | null | null | null | import logging
import typing as T
import ndsi
from .observable import Observable
logger = logging.getLogger(__name__)
# _____ librairies additionnelles
from matplotlib import pyplot as plt
from PIL import Image
import cv2
import imutils
from shapely.geometry import Point
from shapely.geomet... | 40.255474 | 244 | 0.551526 |
f008d9984aa9624c874891f80c878b956b9ff807 | 2,107 | py | Python | research/cv/vgg19/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/vgg19/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/vgg19/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.711864 | 117 | 0.730422 |
f01f2f11f68b22800f3b8eed82a92fbdc1693aed | 4,616 | py | Python | RDS/circle2_use_cases/metadata/src/lib/Research.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 10 | 2020-06-24T08:22:24.000Z | 2022-01-13T16:17:36.000Z | RDS/circle2_use_cases/metadata/src/lib/Research.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 78 | 2020-01-23T14:32:06.000Z | 2022-03-07T14:11:16.000Z | RDS/circle2_use_cases/metadata/src/lib/Research.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 1 | 2020-06-24T08:33:48.000Z | 2020-06-24T08:33:48.000Z | import requests
import logging, os
logger = logging.getLogger()
class Research:
"""
This class enables metadataservice to reuse requests and let it easier to use.
*Currently* only for get requests.
"""
def __init__(
self,
userId: str = None,
researchIndex: int = None,
... | 32.27972 | 126 | 0.568241 |
6849b838c8da1afa539cb6afd81572eb29a225fe | 889 | py | Python | Cat/drf_project/filters.py | qq453388937/drf | 63ef7c5f89cf8f597fd09828f8ce94ce809ce287 | [
"MIT"
] | null | null | null | Cat/drf_project/filters.py | qq453388937/drf | 63ef7c5f89cf8f597fd09828f8ce94ce809ce287 | [
"MIT"
] | null | null | null | Cat/drf_project/filters.py | qq453388937/drf | 63ef7c5f89cf8f597fd09828f8ce94ce809ce287 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
from django_filters import rest_framework as filters
from django.db.models import Q
from .models import Goods
import django_filters
class GoodsFilter(filters.FilterSet):
min_price = django_filters.NumberFilter(field_name='price', lookup_expr="gt")
max_price = django_filters.NumberFilte... | 37.041667 | 98 | 0.727784 |
cc08eeee35dda569761d724088b6d233b0616ae1 | 2,658 | py | Python | web/controllers/upload/Upload.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 1 | 2020-03-24T04:26:34.000Z | 2020-03-24T04:26:34.000Z | web/controllers/upload/Upload.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | web/controllers/upload/Upload.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from flask import Blueprint,request,jsonify
from application import app
import re,json
from common.libs.UploadService import UploadService
from common.libs.UrlManager import UrlManager
from common.models.Image import Image
route_upload = Blueprint('upload_page', __name__)
'''
参考文章:https://segm... | 28.891304 | 117 | 0.674944 |
f0851e5aa7a90cde07287e438660e2e3c12abe3c | 175 | py | Python | bp-revok/python/bin/pilfile.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | null | null | null | bp-revok/python/bin/pilfile.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | null | null | null | bp-revok/python/bin/pilfile.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | 3 | 2017-04-07T12:02:22.000Z | 2020-03-23T12:11:55.000Z | #!/usr/bin/env python
# EASY-INSTALL-SCRIPT: 'Pillow==2.7.0','pilfile.py'
__requires__ = 'Pillow==2.7.0'
__import__('pkg_resources').run_script('Pillow==2.7.0', 'pilfile.py')
| 35 | 69 | 0.697143 |
4f83119c08b4ccdd6f53f2c63c68733720ec30ed | 3,287 | py | Python | pyventskalender/tag06.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag06.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | pyventskalender/tag06.py | kopp/pyventskalender | 6f6455f3c1db07f65a772b2716e4be95fbcd1804 | [
"MIT"
] | null | null | null | # Neben den einfachen Datenstrukturen, die wir bisher verwendet haben (`int`,
# `str`, `float`, `bool`), gibt es auch komplexere, zusammengesetzte
# Strukturen.
# Heute wollen wir uns die Liste, `list`, anschauen.
# Sie ist ein Beispiel für einen Container, also ein Objekt, das viele weitere
# Objekte enthält.
from ty... | 34.968085 | 120 | 0.721935 |
8c425c8e52e7edc10d9ddc017bb13f96d832cf73 | 1,097 | py | Python | scanport/com/aaron/scan_port.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | scanport/com/aaron/scan_port.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | 2 | 2021-03-25T22:00:07.000Z | 2022-01-20T15:51:48.000Z | scanport/com/aaron/scan_port.py | qsunny/python | ace8c3178a9a9619de2b60ca242c2079dd2f825e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import socket
import time
import threading
socket.setdefaulttimeout(3) #设置默认超时时间
lock = threading.Lock()
def socket_port(ip, port):
"""
输入IP和端口号,扫描判断端口是否占用
"""
try:
if port >=65535:
print(u'端口扫描结束')
s = socket.soc... | 25.511628 | 82 | 0.548769 |
a8df94cde312854e5ac402ebb306594230a0bac0 | 682 | py | Python | python/advanced_sw/test.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/advanced_sw/test.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/advanced_sw/test.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | from jimner import jimner
import json
import os
if __name__ == "__main__":
a = jimner()
with open(a.__get_dir__()+'/fonts/data.json') as f:
data = json.load(f)
total_font_present = []
for item in data:
#print(item)
total_font_present.append(item)
FONTS_FAULT = []
f... | 25.259259 | 55 | 0.57478 |
d17175a8e84fcf26b5b1ea6f71b687d0b26e6530 | 8,129 | py | Python | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/gto_plugin.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 3 | 2019-06-18T15:28:09.000Z | 2019-07-11T07:31:45.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/gto_plugin.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 2 | 2019-07-11T14:03:25.000Z | 2021-02-08T16:14:04.000Z | GZP_GTO_QGIS/INSTALLATION/GeoTaskOrganizer/gto_plugin.py | msgis/swwat-gzp-template | 080afbe9d49fb34ed60ba45654383d9cfca01e24 | [
"MIT"
] | 1 | 2019-06-12T11:07:37.000Z | 2019-06-12T11:07:37.000Z | # -*- coding: utf-8 -*-
from PyQt5.QtCore import Qt, QObject, QTranslator, qVersion, QCoreApplication
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QAction, QWidget, QDockWidget, QSizePolicy, QDockWidget
from PyQt5 import uic
from qgis.core import QgsApplication, QgsProject
from .gto_main import gtoMain
... | 36.290179 | 122 | 0.572026 |
0f60728a6d1252d77495bcb16eb7328d47a56163 | 451 | py | Python | INBa/2015/RotkinAM/Zadacha_1_21.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/RotkinAM/Zadacha_1_21.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/RotkinAM/Zadacha_1_21.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача №, Вариант 21
#Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Михаил Николаевич Румянцев. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
# Rotkin A.M.
#03.03.2016
name = "Михаил Николаевич Румянцев"
psevdoname = "Кар... | 45.1 | 218 | 0.776053 |
adf6f80279fbf370bca5e052050445ff5bdf1a12 | 11,548 | py | Python | tests/onegov/election_day/views/test_views_election_compound.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/views/test_views_election_compound.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/election_day/views/test_views_election_compound.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from freezegun import freeze_time
from onegov.election_day.layouts import ElectionCompoundLayout
from tests.onegov.election_day.common import create_election_compound
from tests.onegov.election_day.common import login
from tests.onegov.election_day.common import upload_election_compound
from tests.onegov.election_day.... | 35.641975 | 79 | 0.666176 |
bc3ccee3f97c81674d17e40c43fbaa30068837cb | 336 | py | Python | wtf/2021/crypto/Pr4nK/3ncrypt.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | wtf/2021/crypto/Pr4nK/3ncrypt.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | wtf/2021/crypto/Pr4nK/3ncrypt.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | import binascii
import random
flag = ""
fl = int(binascii.hexlify(flag), 16)
p = 1 << 1024
b = random.randint(0, p) | 1
s = random.randint(0, p)
x = pow(b, s, p)
print('p: {}'.format(p))
print('b: {}'.format(b))
print('x: {}'.format(x))
y = int(input('y: '))
z = pow(y, s, p)
Message = fl ^ z
print('Message: {}'.f... | 15.272727 | 36 | 0.574405 |
1dc4ab1110060de032c29fb6cd6d777306db33f4 | 6,320 | py | Python | haas_lib_bundles/python/docs/examples/detect_object/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/detect_object/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/detect_object/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : main.py
@Description: 物体识别案例
@Author : 杭漂
@version : 1.0
'''
from aliyunIoT import Device
import display # 显示库
import network # 网络库
import ucamera # 摄像头库
import utime # 延时函数在utime库中
import sntp # 网络时间同步库... | 29.53271 | 144 | 0.553639 |
87b3bd228f69d00364477eb44d05b61deafffc91 | 7,145 | py | Python | 07_Testing/network/project4/network/views.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 07_Testing/network/project4/network/views.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | 07_Testing/network/project4/network/views.py | DaviNakamuraCardoso/Harvard-CS50-Web-Programming | afec745eede41f7b294c3ee6ebaff9ac042e5e4c | [
"MIT"
] | null | null | null | from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.db import IntegrityError
from django.http import HttpResponse, HttpResponseRedirect, JsonResponse
from django.shortcuts import render
from django.urls import reverse
from django.views.decora... | 31.337719 | 89 | 0.626172 |
359df4000f323291928d0ef8caacf63c8965e74d | 1,013 | py | Python | Python2/Modulo_1.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | Python2/Modulo_1.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | Python2/Modulo_1.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | '''
Crie uma classe animal com atributos e métodos, posteriormente, crie uma classe que herde seus atributos,
e possua os seus atributos próprios.
Crie dois objetos da classe filha.
'''
class animal():
def __init__(self, especie, genero, familia, ordem, classe, filo):
self.especie = especie
self.... | 38.961538 | 109 | 0.675222 |
ea681737c481a442aa0d62190ff20694dc02af0f | 1,385 | py | Python | searcher.py | VNCompany/PyDafm | 9634f5428b9f3739dbf7c159daad34856b372165 | [
"Unlicense"
] | null | null | null | searcher.py | VNCompany/PyDafm | 9634f5428b9f3739dbf7c159daad34856b372165 | [
"Unlicense"
] | null | null | null | searcher.py | VNCompany/PyDafm | 9634f5428b9f3739dbf7c159daad34856b372165 | [
"Unlicense"
] | null | null | null | from PyQt5 import uic
from PyQt5.QtWidgets import QDialog, QMessageBox
class Searcher(QDialog):
def __init__(self):
super(Searcher, self).__init__()
uic.loadUi("designer/search.ui", self)
self.calendar.setVisible(False)
self.search_list.currentIndexChanged.connect(self.selected_in... | 34.625 | 85 | 0.644043 |
ea70ce4e03e9222b6f6da715c28f73c029b13bd9 | 1,165 | py | Python | testbed0/hmi_c.py | Benny93/HMI-Protocol | 5f98873129acebed1b2b3cf4376c2733907ead70 | [
"MIT"
] | null | null | null | testbed0/hmi_c.py | Benny93/HMI-Protocol | 5f98873129acebed1b2b3cf4376c2733907ead70 | [
"MIT"
] | null | null | null | testbed0/hmi_c.py | Benny93/HMI-Protocol | 5f98873129acebed1b2b3cf4376c2733907ead70 | [
"MIT"
] | 1 | 2019-10-20T20:35:23.000Z | 2019-10-20T20:35:23.000Z | #!/usr/bin/python3
import time
import can
from random import uniform
"""
hmi controller prototype that acts like a server
"""
bustype = 'socketcan_native'
channel = 'vcan0'
identifier = 0x0
bus = can.interface.Bus(channel=channel, bustype=bustype)
# TODO: Catch if instance fails
def send_response(data):
"""
... | 18.203125 | 78 | 0.649785 |
57a582bc7d57469430820dd1a0d8b36214fe82d6 | 1,082 | py | Python | python/en/_numpy/organize_this/test_numpy.hamming_example_02.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/organize_this/test_numpy.hamming_example_02.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/organize_this/test_numpy.hamming_example_02.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | """
test_numpy.hamming_example_02.py
This is an example code for numpy.hamming
https://docs.scipy.org/doc/numpy/reference/generated/numpy.hamming.html
"""
from numpy.fft import fft, fftshift
import numpy as np
import matplotlib.pyplot as plt
# Part 1: Hamming Window in Time
# Create and plot the Hamming Window (in... | 29.243243 | 71 | 0.733826 |
a4e0c7819951aa719d5b192c426ad514618bedcd | 1,758 | py | Python | app/models/abtms/Print.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/models/abtms/Print.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | null | null | null | app/models/abtms/Print.py | nucleo-de-telessaude-do-maranhao/abtms | 8d1b1df223d9f07fc4447836011f3e3678625d59 | [
"MIT"
] | 1 | 2019-03-13T14:34:24.000Z | 2019-03-13T14:34:24.000Z | import os
from werkzeug.security import generate_password_hash, check_password_hash
from datetime import date
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen.canvas import Canvas
from reportlab.lib.utils import ImageReader
from app import app
from flask import send_from_directory
UPLOAD_FOLDER = "/... | 25.852941 | 108 | 0.680319 |
5e10db6bfa5c5496ccc8e4dbf0202672d3400de1 | 1,417 | py | Python | elements/python/8/3/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 11 | 2019-02-08T06:54:34.000Z | 2021-08-07T18:57:39.000Z | elements/python/8/3/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | 1 | 2019-05-21T08:14:10.000Z | 2019-05-21T08:14:10.000Z | elements/python/8/3/soln.py | mmcloughlin/problems | 6095842ffe007a12ec8c2093850515aa4e046616 | [
"MIT"
] | null | null | null | class Node(object):
def __init__(self, x, nxt):
self.x = x
self.next = nxt
def reverse_sublist(n, s, f):
"""
Reverse the sublist between positions s and f in-place. Indicies are 1-up
and inclusive.
"""
start = n
# advance to the start of the sublist
# pre is the node b... | 17.072289 | 77 | 0.529993 |
eac56e219b39b10fafca132b11b883fac6be600f | 2,261 | py | Python | pages/extensions/amp_dependencies/__init__.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 300 | 2015-12-09T20:35:37.000Z | 2019-07-16T06:41:29.000Z | pages/extensions/amp_dependencies/__init__.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 2,099 | 2019-07-16T13:24:27.000Z | 2022-03-26T12:31:51.000Z | pages/extensions/amp_dependencies/__init__.py | ericandrewlewis/amp.dev | cf8e3d34a5582696ead97563c0809036804ab5c7 | [
"Apache-2.0"
] | 543 | 2019-07-18T09:06:14.000Z | 2022-03-31T02:43:10.000Z | # -*- coding: utf-8 -*-
from grow import extensions
from grow.documents import document, static_document
from grow.extensions import hooks
from .amp_dependencies import AmpDependencies
from .auto_dependency_injector import AutoDependencyInjector
# Used to determine where to print the script tags
PLACEHOLDER = '__AMP__... | 30.146667 | 74 | 0.734631 |
eacd82df0835933ec4469f1f625097d3b90a75e7 | 8,622 | py | Python | SM-Play-master/music.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | SM-Play-master/music.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | SM-Play-master/music.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #!/bin/python
# coding: utf-8
import os
import time
from random import *
import sys
import threading
import subprocess
playing=False
#Scan music from sdcard
#turn music off after kill process
#run python script in background
#add functionality to show previous commands entered
#Generates MP3 List
def genlist():
if ... | 26.127273 | 108 | 0.598701 |
87549c9fc33adb6cbf5fd322ff5f3380b6a91e7a | 1,221 | py | Python | statcell_torch.py | zgyr/StatCell | 7d5e0b07cda7d2b3ee1587e8e474db5a17ea1e56 | [
"MIT"
] | null | null | null | statcell_torch.py | zgyr/StatCell | 7d5e0b07cda7d2b3ee1587e8e474db5a17ea1e56 | [
"MIT"
] | null | null | null | statcell_torch.py | zgyr/StatCell | 7d5e0b07cda7d2b3ee1587e8e474db5a17ea1e56 | [
"MIT"
] | null | null | null | import torch
class Cell:
def __init__(self, inputs, size=32):
self.inputs = inputs
self.size = size
self.c_acc = 1
self.s_acc = torch.ones(self.inputs)
self.avg = torch.zeros(self.inputs)
self.var = torch.zeros(self.inputs)
self.weights = torch.rand(self.inp... | 27.133333 | 62 | 0.556921 |
5e68a03f5f2c5c01bd61b6604da29f9fb24c96e6 | 6,816 | py | Python | wz/tables/matrix.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/tables/matrix.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/tables/matrix.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | ### python >= 3.7
# -*- coding: utf-8 -*-
"""
tables/matrix.py - last updated 2021-05-03
Edit a table template (xlsx).
The base class is <Table>.
<KlassMatrix> handles pupil-subject matrices.
==============================
Copyright 2021 Michael Towers
Licensed under the Apache License, Version 2.0 (the "Licens... | 32.457143 | 87 | 0.557952 |
5ed5a65846b1a22055624d38f831d41b03607fa6 | 1,310 | py | Python | 020-C129-MergingDatasets/main.py | somePythonProgrammer/PythonCode | fb2b2245db631cefd916a960768f411969b0e78f | [
"MIT"
] | 2 | 2021-09-28T13:55:20.000Z | 2021-11-15T10:08:49.000Z | 020-C129-MergingDatasets/main.py | somePythonProgrammer/PythonCode | fb2b2245db631cefd916a960768f411969b0e78f | [
"MIT"
] | null | null | null | 020-C129-MergingDatasets/main.py | somePythonProgrammer/PythonCode | fb2b2245db631cefd916a960768f411969b0e78f | [
"MIT"
] | 1 | 2022-01-20T03:02:20.000Z | 2022-01-20T03:02:20.000Z | import pandas
import csv
df = pandas.read_csv("brightest_stars.csv")
df = df.dropna()
df = df.drop_duplicates()
for i in range(len(df)):
try:
df["radius"][i] *= 0.102763
df["mass"][i] *= 0.000954588
except:
continue
df.to_csv("brightest_stars_formatted.csv", index=False)
del df
df =... | 20.153846 | 55 | 0.654198 |
0d8780a126216c8e13405585b6a266751dbe6363 | 82 | py | Python | examples/myqueryset/get_/apps.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 5 | 2020-07-14T07:48:10.000Z | 2021-12-20T21:20:10.000Z | examples/myqueryset/get_/apps.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 7 | 2021-03-26T03:13:38.000Z | 2022-03-12T00:42:03.000Z | examples/myqueryset/get_/apps.py | zhengtong0898/django-decode | 69680853a4a5b07f6a9c4b65c7d86b2d401a92b1 | [
"MIT"
] | 1 | 2021-02-16T07:04:25.000Z | 2021-02-16T07:04:25.000Z | from django.apps import AppConfig
class GetConfig(AppConfig):
name = 'get_'
| 13.666667 | 33 | 0.731707 |
df17a49d7e618cc2b7907825cc74db347f306c20 | 3,330 | py | Python | Packs/PANOSPolicyOptimizer/Integrations/PANOSPolicyOptimizer/PANOSPolicyOptimizer_test.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | null | null | null | Packs/PANOSPolicyOptimizer/Integrations/PANOSPolicyOptimizer/PANOSPolicyOptimizer_test.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | 2 | 2021-12-26T07:34:37.000Z | 2021-12-26T07:49:34.000Z | Packs/PANOSPolicyOptimizer/Integrations/PANOSPolicyOptimizer/PANOSPolicyOptimizer_test.py | PAM360/content | 928aac9c586c6e593b2a452c402a37cb5df28dac | [
"MIT"
] | null | null | null | import pytest
import json
import io
from CommonServerPython import *
from PANOSPolicyOptimizer import Client, policy_optimizer_get_rules_command
BASE_URL = 'https://test.com'
def get_firewall_instance_client():
return Client(url=BASE_URL, username='test', password='test', vsys='test', device_group='', verify=Fa... | 29.210526 | 120 | 0.628228 |
8034ea2659b01ee99c91fd279027acc01a93b675 | 558 | py | Python | tests/test_mappers.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | tests/test_mappers.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | 16 | 2017-09-13T10:21:40.000Z | 2020-06-01T04:32:22.000Z | tests/test_mappers.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | import pytest
from benwaonline import mappers
from benwaonline.entities import Tag
@pytest.mark.parametrize('fct, uri', [
(mappers.collection_uri, '/api/tags'),
(mappers.instance_uri, '/api/tags/1'),
])
def test_entity_uri(fct, uri):
tag = Tag(id=1)
assert fct(tag) == uri
@pytest.mark.parametrize('fct... | 26.571429 | 66 | 0.677419 |
33a1e9a4d6241a2b4d14047d8f35fb3da1600266 | 4,131 | py | Python | torch/ao/quantization/qconfig_dict_utils.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 5 | 2018-04-24T13:41:12.000Z | 2019-07-09T07:32:09.000Z | torch/ao/quantization/qconfig_dict_utils.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | torch/ao/quantization/qconfig_dict_utils.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 7 | 2020-08-31T22:49:59.000Z | 2020-09-15T14:29:07.000Z | from collections import OrderedDict
import re
from typing import Any, Dict, Callable, Union
from .utils import (
get_combined_dict,
_parent_name,
)
from .quantization_mappings import (
get_default_qat_module_mappings,
)
from torch.ao.quantization.qconfig import QConfigAny
def get_object_type_qconfig(
... | 32.527559 | 105 | 0.708545 |
1d4d9a1a5acd4460ca9d7fa0d4bc10f071c33ca1 | 815 | py | Python | exercises/en/test_04_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/en/test_04_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/en/test_04_12_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert len(doc1.ents) == 2, "Expected two entities in the first example"
assert (
doc1.ents[0].label_ == "WEBSITE" and doc1.ents[0].text == "Reddit"
), "Check entity one in the first example"
assert (
doc1.ents[1].label_ == "WEBSITE" and doc1.ents[1].text == "Patreon"
), ... | 42.894737 | 76 | 0.628221 |
1d81614d5b0ccc7e357c7472ab2a145ef6bb5bf3 | 255 | py | Python | SBTK_League_Helper/manager/main_class.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/manager/main_class.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | SBTK_League_Helper/manager/main_class.py | juanchodepisa/sbtk | 7cba7748e75a02b491e551d6c1be9bd7987c5051 | [
"MIT"
] | null | null | null | from src.mvp_requirements import Controller
class Manager(Controller):
def __init__(self, UIClass, *args, **kwargs):
self.__user_interface = UIClass(self)
def main_loop(self):
self.__user_interface.main_loop()
| 21.25 | 49 | 0.662745 |
8931874dd04e6990bb2719d8f443259ca4bd9f91 | 5,254 | py | Python | T1/07_robotic_drawing_exercise/robotic_drawing/robotic_drawing.py | MAS-dfab/MAS-1920 | 93abb09b072b9a061496bc8a30bdce481a8735c5 | [
"MIT"
] | 3 | 2019-09-15T17:40:35.000Z | 2020-11-07T01:47:29.000Z | T1/07_robotic_drawing_exercise/robotic_drawing/robotic_drawing.py | MAS-dfab/MAS-1920 | 93abb09b072b9a061496bc8a30bdce481a8735c5 | [
"MIT"
] | 1 | 2019-09-17T22:59:19.000Z | 2019-09-17T22:59:19.000Z | T1/07_robotic_drawing_exercise/robotic_drawing/robotic_drawing.py | MAS-dfab/MAS-1920 | 93abb09b072b9a061496bc8a30bdce481a8735c5 | [
"MIT"
] | 8 | 2019-09-16T18:47:20.000Z | 2019-10-15T17:08:08.000Z | """
MAS ROBOTIC DRAWING
04.10.2017
Author: David Jenny
"""
import simple_ur_script as ur
import simple_comm as c
import math as m
import random as r
import rhinoscriptsyntax as rs
import Rhino.Geometry as rg
ROBOT_IP = '.xxx.xx.xx'
#how to move the robot to a vertical position
def move_robot_vertical(move_to):
... | 28.868132 | 99 | 0.669585 |
9875f0019d9d39d4b9973fe031ac635fcd1ceb07 | 21,712 | py | Python | Python/adventure/beta/game.py | SchickDominik/progprojects | 1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2 | [
"MIT"
] | null | null | null | Python/adventure/beta/game.py | SchickDominik/progprojects | 1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2 | [
"MIT"
] | null | null | null | Python/adventure/beta/game.py | SchickDominik/progprojects | 1eb9c5e3b9445f617b56bd9ceb02f2f182d730e2 | [
"MIT"
] | null | null | null | import math
import random
import sys
import time
from lib import game_object
from lib.map import zonemap, solved_places
from lib.npc import Bandit, Orc, Giant
from lib.player import myPlayer
from lib.static import clear, screen_width, speech_manipulation
def title_screen_selections():
option = input("> ")
if... | 40.133087 | 120 | 0.569777 |
d606bcd17fab64a8c613240fc3ccc23cb7ffe809 | 309 | py | Python | zencad/geom/project.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/geom/project.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/geom/project.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | from OCC.Core.GeomAPI import GeomAPI_ProjectPointOnCurve
from zencad.util import to_Pnt, point3
def project_point_on_curve(pnt, crv):
algo = GeomAPI_ProjectPointOnCurve(to_Pnt(pnt), crv.Curve())
return point3(algo.NearestPoint())
def project(pnt, tgt):
return project_point_on_curve(pnt, tgt)
| 25.75 | 64 | 0.776699 |
9caeccda41e2813ba1b2a63a62c2e228dc6dceed | 1,641 | py | Python | methods/transformers/examples/seq2seq/test_make_student.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | 3 | 2021-07-06T20:02:31.000Z | 2022-03-27T13:13:01.000Z | methods/transformers/examples/seq2seq/test_make_student.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | null | null | null | methods/transformers/examples/seq2seq/test_make_student.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | null | null | null | import tempfile
import unittest
from make_student import create_student_by_copying_alternating_layers
from transformers import AutoConfig
from transformers.file_utils import cached_property
from transformers.testing_utils import require_torch
TINY_BART = "sshleifer/bart-tiny-random"
TINY_T5 = "patrickvonpl... | 41.025 | 111 | 0.753809 |
14063257769e93df33ffad53cc12fa1a95dfbe54 | 1,494 | py | Python | tree.py | ligang945/pyMisc | 3107c80f7f53ffc797b289ec73d1ef4db80f0b63 | [
"MIT"
] | null | null | null | tree.py | ligang945/pyMisc | 3107c80f7f53ffc797b289ec73d1ef4db80f0b63 | [
"MIT"
] | null | null | null | tree.py | ligang945/pyMisc | 3107c80f7f53ffc797b289ec73d1ef4db80f0b63 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import os, sys, string
class XXTree:
def __init__(self):
pass
def printHelp(self, cmd):
print 'Please use the following cmd:'
print ' ' + cmd + ' dir'
print 'e.g.'
print ' ' + cmd + ' /home/fkong/tmp'
def getTree(self, dir):
list = self.getList(dir, 0)
treelist = ... | 23.34375 | 58 | 0.544177 |
1adfd2fd5e971004788fea27d5906e36eab11182 | 186 | py | Python | src/onegov/wtfs/fields/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/fields/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/wtfs/fields/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.wtfs.fields.hint import HintField
from onegov.wtfs.fields.municipality import MunicipalityDataUploadField
__all__ = (
'HintField',
'MunicipalityDataUploadField',
)
| 20.666667 | 71 | 0.790323 |
25adcd1d71cb50d8a3afc96801be16000ba4baa7 | 7,677 | py | Python | src/resources/clients/python_client/visitproxy.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/resources/clients/python_client/visitproxy.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/resources/clients/python_client/visitproxy.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | import time
import socket
if (sys.version_info > (3, 0)):
import _thread
else:
import thread as _thread
import threading
import visitstate
import atexit
import inspect
import json
import sys
from viewerstate import *
from viewermethods import *
# Event records reciept of last VisIt API call
LastEvent = False
... | 31.854772 | 80 | 0.571968 |
d3568ce46e96f7f49f07e5cd84244388795a74de | 2,768 | py | Python | .circleci/parse_VBFoffshell_grid_output.py | tmartini/JHUGen | 80da31668d7b7eb5b02bb4cac435562c45075d24 | [
"Apache-2.0"
] | 3 | 2015-06-08T13:09:28.000Z | 2020-09-04T19:59:36.000Z | .circleci/parse_VBFoffshell_grid_output.py | tmartini/JHUGen | 80da31668d7b7eb5b02bb4cac435562c45075d24 | [
"Apache-2.0"
] | 64 | 2015-06-24T15:08:17.000Z | 2022-01-25T04:59:32.000Z | .circleci/parse_VBFoffshell_grid_output.py | tmartini/JHUGen | 80da31668d7b7eb5b02bb4cac435562c45075d24 | [
"Apache-2.0"
] | 19 | 2015-05-04T22:15:41.000Z | 2021-07-06T10:04:40.000Z | #!/usr/bin/env python
__doc__ = """
Print the cross section and cross section error for each channel, from the output of ./JHUGen.py run in parallel.
The main intended use is for circleci output. Go to the VBF offshell grids job in the generator_reference or generator_syntax jobs.
Right click on "Download the full ou... | 33.756098 | 132 | 0.642341 |
2c930a72a481012f77910de5c2c07dc9221a7b02 | 17,656 | py | Python | 20-hs-redez-sem/groups/03-doubleRatchet/src/TCP_Chat.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/03-doubleRatchet/src/TCP_Chat.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/03-doubleRatchet/src/TCP_Chat.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from helper_functions.helpers import encapsulate_message_tcp, expose_message_tcp
from helper_functions.alice import Alice
from helper_functions.bob import Bob
import socket
import select
import sys
import os
# Requirements:
# apt install python3 python3-pip
# pip3 install cryptography==2.8 pycrypto
### On windows yo... | 45.040816 | 225 | 0.576405 |
20098146b93c3031bfb7479723eb1b8ef75a1d80 | 438 | py | Python | exercises/de/exc_04_11_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/exc_04_11_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/exc_04_11_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | TRAINING_DATA = [
(
"Reddit und Patreon helfen Kreativen beim Aufbau von Communities",
{"entities": [(____, ____, "WEBSITE"), (____, ____, "WEBSITE")]},
),
("PewDiePie knackt Rekord auf YouTube", {"entities": [(____, ____, "WEBSITE")]}),
(
"Mitgründer von Reddit, Alexis Ohanian, ... | 33.692308 | 85 | 0.584475 |
80c70065961ad84e275528d36cab97cb03d9939c | 621 | py | Python | IVTp/2014/Grigoriev_A_O/task_5_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Grigoriev_A_O/task_5_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTp/2014/Grigoriev_A_O/task_5_2.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача №5, Вариант 2
#Напишите программу, которая бы при запуске случайным образом отображала название одного из цветов радуги.
#Григорьев А.О.
#23.05.2016
import random
a="красный"
b="оранжевый"
с="желтый"
d="зеленый"
e="голубой"
q="синий"
w="фиолетовый"
country=random.randint(1,7)
print("Программа... | 20.032258 | 107 | 0.698873 |
03b0c4a4217245235349ccc75fc3ae0efa27af18 | 437 | py | Python | 11-se/python_call_c/_notested/03-swig/setup.py | al2698/sp | fceabadef49ffe6ed25dfef38e3dc418f309e128 | [
"MIT"
] | null | null | null | 11-se/python_call_c/_notested/03-swig/setup.py | al2698/sp | fceabadef49ffe6ed25dfef38e3dc418f309e128 | [
"MIT"
] | null | null | null | 11-se/python_call_c/_notested/03-swig/setup.py | al2698/sp | fceabadef49ffe6ed25dfef38e3dc418f309e128 | [
"MIT"
] | null | null | null | from distutils.core import setup, Extension
# Generated C file: <module>_wrap.c
# Note the underscore prefix in the extension name
speedup_performance_module = Extension('_speedup_performance',
sources=['speedup_performance_wrap.c'])
setup(name='SpeedupPerformance',
descri... | 36.416667 | 78 | 0.720824 |
b3434e6b6b35f1c3f3f8cea004e2182934b9962d | 2,784 | py | Python | official/cv/ssd/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-07-03T06:52:20.000Z | 2021-07-03T06:52:20.000Z | official/cv/ssd/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/cv/ssd/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.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... | 40.347826 | 116 | 0.722701 |
ff47363f167cd895152b031ea56a00de55ae5cb3 | 466 | py | Python | core/files.py | Pug234/BytesBump | d5ff3130bffae92e1c5c671db4ed8904c403e9dc | [
"MIT"
] | 11 | 2020-11-14T17:28:50.000Z | 2021-05-19T18:21:07.000Z | core/files.py | AnimeDyno/BytesBump | a0cf0bfc4c13592c7b10ad46faa46a2a98dc1443 | [
"MIT"
] | 3 | 2021-01-22T15:48:41.000Z | 2021-06-22T17:16:50.000Z | core/files.py | zImPinguin/Bump-Bot | 3f449a4e5581a35a5cff998e94a13ae33dbe2b04 | [
"MIT"
] | 13 | 2020-11-18T05:20:31.000Z | 2021-06-19T16:31:30.000Z | from yaml import load as yload, FullLoader
from json import load as jload
class Data:
def __init__(self, filename:str):
self.file = filename
def yaml_read(self):
with open(f"data/{self.file}.yml", "r") as f:
return yload(f, Loader=FullLoader)
def json_read(self):
with o... | 29.125 | 56 | 0.60515 |
ff5b8a5235a66fb25780e2839f9233a4953ed2c8 | 3,459 | py | Python | model/topoml_util/GaussianMixtureLoss.py | Empythy/geometry-learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 21 | 2018-10-09T08:15:29.000Z | 2022-03-16T08:23:08.000Z | model/topoml_util/GaussianMixtureLoss.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 31 | 2017-09-20T13:30:37.000Z | 2018-03-01T13:24:58.000Z | model/topoml_util/GaussianMixtureLoss.py | reinvantveer/Topology-Learning | 5300d421ef848c2748a2ba41ced5c6e2fba93200 | [
"MIT"
] | 7 | 2018-11-29T11:39:02.000Z | 2022-01-12T07:10:26.000Z | from keras import backend as K
from topoml_util.GeoVectorizer import RENDER_LEN, GEOM_TYPE_LEN, ONE_HOT_LEN
from topoml_util.gaussian_loss import bivariate_gaussian, univariate_gaussian
class GaussianMixtureLoss:
def __init__(self, num_components, num_points):
self.num_points = num_points
self.nu... | 46.743243 | 119 | 0.652212 |
a6e4b1c234c1ea636cf56efeb772181c1a69caeb | 48 | py | Python | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/06.2-Input-char.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/06.2-Input-char.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/06.2-Input-char.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | ch = input("Enter a character: ")
print(ch[0])
| 12 | 33 | 0.625 |
45f915b5f45919d778fa6fd08ec671c78fbafeba | 674 | py | Python | vorl3-ueb4.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | vorl3-ueb4.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | vorl3-ueb4.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | # 3. Vorlesung 09.10.2020
# Aufgabe 4 aus Skript Python 2 (05_Python_02.pdf):
# Eigene Moduldatei erzeugen, laden und nutzen
from vorl3ueb4modul import kreisFlaeche as krFl, kreisUmfang as krUm
while True:
try:
kreisRadius = input("\n\nBerechnung Kreisumfang und -fläche:\n --> Bitte Radius eines Kreises ... | 42.125 | 203 | 0.578635 |
59ffed115e7316deef10e86bbc17661bb194f472 | 494 | py | Python | example/external_data_consumer.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | example/external_data_consumer.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | example/external_data_consumer.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | import logging
from volley.data_models import GenericMessage
from volley.engine import Engine
from volley.logging import logger
logging.basicConfig(level=logging.INFO)
eng = Engine(input_queue="output-topic", output_queues=[], yaml_config_path="./example/volley_config.yml")
@eng.stream_app
def main(input_message: ... | 21.478261 | 106 | 0.757085 |
04f79f18c6ec35172197264a4999f797ecb1eb38 | 91 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.14-list-join-method.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.14-list-join-method.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/ph-9.14-list-join-method.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | li = ["a", "b", "c"]
str = "".join(li)
print(str)
str = ''.join(li)
print(str)
str = ","
| 10.111111 | 20 | 0.461538 |
b6ddd45a5ac538080df9053b02b3533cf4ba74cf | 530 | py | Python | 2020-11-24/prekladac.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | 2020-11-24/prekladac.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | 2020-11-24/prekladac.py | Bertik23/spg | f6449f1ca8f3a869f0f493f3988b3d84901c1be0 | [
"MIT"
] | null | null | null | with open("2020-11-24\encs.txt", encoding="utf-8") as f:
slovnik = list((i.split("|") for i in f.read().split("\n")[:-1]))
while True:
text = input("K překladu: ")
for znak in ".,?!":
text = text.replace(znak,"")
out = ""
for slovo in text.split():
translated = False
f... | 25.238095 | 69 | 0.460377 |
6d547ec6f8241d33b589bfbadd85e100bc3e1fa6 | 604 | py | Python | dtdocker/containers/_ContainerMixin.py | oxsoftdev/dt-docker | 8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5 | [
"MIT"
] | null | null | null | dtdocker/containers/_ContainerMixin.py | oxsoftdev/dt-docker | 8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5 | [
"MIT"
] | null | null | null | dtdocker/containers/_ContainerMixin.py | oxsoftdev/dt-docker | 8ba30bf5ca2a7b89f3c7658a7768b16dbf8514a5 | [
"MIT"
] | null | null | null | import io
import os
import tarfile
class ContainerMixin:
def get(self):
return self.client.containers.get(self.name)
def copy(self, content, path):
container = self.get()
stream = io.BytesIO()
tar = tarfile.TarFile(fileobj=stream, mode='w')
content = content.encode('u... | 25.166667 | 62 | 0.619205 |
b68ba1a5fc3f037fe5eab29874d26c27448fe930 | 1,019 | py | Python | test/unit/group_timestamp_test.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | test/unit/group_timestamp_test.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | test/unit/group_timestamp_test.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | #
# RawIO
# Copyright (c) 2021 Yusuf Olokoba.
#
from PIL import Image
from pytest import fixture, mark
from rawio.grouping import group_exposures, timestamp_similarity
from rawio.grouping.timestamp import exposure_timestamp
@mark.parametrize("image_path", [
"test/media/group/1.jpg"
])
def test_image_timesta... | 27.540541 | 68 | 0.690873 |
bfa944e1fe78ab9d6798f8f273eded13a440e6cf | 355 | py | Python | setup.py | Hofei90/telegram_api | 8e910e15d7147db4b3828fa6fd1cfe2f5d33c077 | [
"MIT"
] | null | null | null | setup.py | Hofei90/telegram_api | 8e910e15d7147db4b3828fa6fd1cfe2f5d33c077 | [
"MIT"
] | 4 | 2019-04-24T12:56:34.000Z | 2020-06-25T20:16:56.000Z | setup.py | Hofei90/telegram_api | 8e910e15d7147db4b3828fa6fd1cfe2f5d33c077 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='telegram_api',
version='1.0',
py_modules = ["telegram_bot_api"],
url='https://github.com/Hofei90/telegram_api/',
license='MIT',
author='Hofei90',
author_email='29521028+Hofei90@users.noreply.github.com',
description='Telegram Bot API',
insta... | 25.357143 | 61 | 0.678873 |
44f6fb27494b4f7975456333b64271dafcc510aa | 129 | py | Python | Utils/py/naoth/naoth/run_tests.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/naoth/naoth/run_tests.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | Utils/py/naoth/naoth/run_tests.py | tarsoly/NaoTH | dcd2b67ef6bf9953c81d3e1b26e543b5922b7d52 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import unittest
from test_m2d import TestMath2D
from test_m3d import TestMath3d
if __name__ == '__main__':
unittest.main()
| 16.125 | 31 | 0.775194 |
1564571b17d665292cb52ea6b94ebfdeb78cd951 | 587 | py | Python | PINp/2014/KOROTKOVA_D_S/task_3_39.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/KOROTKOVA_D_S/task_3_39.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/KOROTKOVA_D_S/task_3_39.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3 Вариант 39
# Напишите программу, которая выводит имя "Джон Гриффит Лондон", и запрашивает его псевдоним. Программа должна сцеплять две эти строки и выводить полученную строку, разделяя имя и псевдоним с помощью тире.
# Короткова Д.С.
# 05.03.2016
name="Джон Гриффит Лондон"
print("Известная личность моей про... | 36.6875 | 205 | 0.746167 |
15ae515da528ffea8fadca9aa59c69efdeaa136c | 703 | py | Python | Topics/Sorting/Compare-Sorting/06-string-sorting-lexicographical.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Topics/Sorting/Compare-Sorting/06-string-sorting-lexicographical.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Topics/Sorting/Compare-Sorting/06-string-sorting-lexicographical.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | # Sort Strings of Array in Lexicographical Order with Python
def cmp(a: str, b: str) -> bool:
len_a, len_b = len(a), len(b)
for i in range(min(len_a, len_b)):
if a[i] > b[i]:
return True
if a[i] < b[i]:
return False
return len_a > len_b
def insertion_sort(a: list) ... | 23.433333 | 60 | 0.500711 |
01b61e4800297f6b173cf8c70627740cf0a6254c | 1,019 | py | Python | Jude Omenai 032/PROJECT9.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | Jude Omenai 032/PROJECT9.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null | Jude Omenai 032/PROJECT9.py | cornelia247/cil-internship-cohort-01 | b8184337056d378eab16d26b40b26ed58cd177bb | [
"MIT"
] | null | null | null |
def resizeImage(path, width, height):
'''
This function take in three parameters
and stores a resized copy of the image within the path.
path - A string to the image filepath location.\n
width - an interger for the new image width.\n
height - an interger for new image height.
functi... | 26.815789 | 68 | 0.611384 |
1720fbb5165ca9ff6023227f307e2f70851e8feb | 2,638 | py | Python | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-python-containers_tuple.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-python-containers_tuple.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-python-containers_tuple.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
CS231n Convolutional Neural Networks for Visual Recognition
http://cs231n.github.io/
Python Numpy Tutorial
http://cs231n.github.io/python-numpy-tutorial/
 ̄
python_numpy_tutorial-python-containers_tuple.py
2019-07-03 (Wed)
"""
# Python Numpy Tutorial > Python > Contai... | 26.118812 | 81 | 0.619788 |
e5b5a19b51689401f6418f1a21f1bb2c112b54c4 | 848 | py | Python | exercises/fr/test_02_06.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/fr/test_02_06.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/fr/test_02_06.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert (
"import Doc, Span" in __solution__ or "import Span, Doc" in __solution__
), "As-tu correctement importé Doc et Span ?"
assert doc.text == "Elle aime David Bowie", "As-tu correctement créé le Doc ?"
assert span.text == "David Bowie", "As-tu correctement créé le span ?"
as... | 47.111111 | 82 | 0.642689 |
0065fda7c08d639592e3be8f8dff75b332864267 | 998 | py | Python | _includes/snippets/python/monkey-patching/method_reassignment.py | MarauderXtreme/justus | 229703abda2bd90d34232c97c64999c216d98239 | [
"CC-BY-4.0"
] | 1 | 2020-02-02T16:09:43.000Z | 2020-02-02T16:09:43.000Z | _includes/snippets/python/monkey-patching/method_reassignment.py | MarauderXtreme/justus | 229703abda2bd90d34232c97c64999c216d98239 | [
"CC-BY-4.0"
] | 1 | 2021-09-02T11:07:53.000Z | 2021-09-02T11:07:53.000Z | _includes/snippets/python/monkey-patching/method_reassignment.py | MarauderXtreme/justus | 229703abda2bd90d34232c97c64999c216d98239 | [
"CC-BY-4.0"
] | null | null | null | #! /usr/bin/env python3
class TestClass:
def foo(self):
print('foo is executing')
print('self is {}'.format(self))
def bar(param1):
print('bar is executing')
print('self is {}'.format(param1))
a = TestClass()
TestClass.foo('of wrong type') # <- notice we have to provide a 'self' para... | 19.568627 | 81 | 0.645291 |
979d8cc57f61a49e4e9f6b739ff9e6ff728f6e85 | 387 | py | Python | LifiEnigma/button_select.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | LifiEnigma/button_select.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | LifiEnigma/button_select.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import RPI.GPIO as GPIO
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(10, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
while True:
if(GPIO.input(8)==True):
print ("Voix 1 sélectionnée")
elif(GPIO.input(10)==True):
print ("Voix 2 sélectionné")
elif(GPIO.input(1... | 22.764706 | 51 | 0.614987 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.