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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
de89a8ed33c27573e35fedc3048aac3ba34aa9fd | 16,764 | py | Python | .config/qtile/config.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | .config/qtile/config.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | .config/qtile/config.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | # _ _ __ _
# __| | ___ _ __ ___ __ _ __ _( )___ ___ ___ _ __ / _(_) __ _
# / _` |/ __| '_ ` _ \ / _` |/ _` |// __| / __/ _ \| '_ \| |_| |/ _` |
# | (_| | (__| | | | | | (_| | (_| | \__ \ | (_| (_) | | | | _| | (_| |
# \__,_|\___|_| |_| |_|\__,_|\__, |... | 28.754717 | 106 | 0.548497 |
dea2c0950380675c2113c803e878940a5b50fcee | 745 | py | Python | imgtl/validator.py | reviforks/imgtl | b2141f9f0d7f2d318661f6ff6ab9594cff5b80f3 | [
"MIT"
] | null | null | null | imgtl/validator.py | reviforks/imgtl | b2141f9f0d7f2d318661f6ff6ab9594cff5b80f3 | [
"MIT"
] | null | null | null | imgtl/validator.py | reviforks/imgtl | b2141f9f0d7f2d318661f6ff6ab9594cff5b80f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from .const import USERNAME_BLACKLIST
REGEX_EMAIL = re.compile(r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$')
REGEX_USERNAME = re.compile(r'^[A-Za-z0... | 24.032258 | 182 | 0.539597 |
9d135fb32c9d6e1b430d46d11c914ae0a50b4ade | 12,707 | py | Python | templates/default_template.py | lucapost/martignilas.it | d4049dfc23fe5c7f7fcb49fa90eb7dcd0372e91f | [
"MIT"
] | null | null | null | templates/default_template.py | lucapost/martignilas.it | d4049dfc23fe5c7f7fcb49fa90eb7dcd0372e91f | [
"MIT"
] | null | null | null | templates/default_template.py | lucapost/martignilas.it | d4049dfc23fe5c7f7fcb49fa90eb7dcd0372e91f | [
"MIT"
] | null | null | null | import time
import datetime
SITE_NAME = "martignilas"
AUTHOR = "lucapost"
SRC = "/home/lucapost/repo/martignilas.it/src_"
DST = "./dst/"
SITEMAP = "sitemap_orig.xml"
URL = "http://martignilas.it"
PREFIX = "/"
HOME = "home"
PATH_SEPARATOR = '/'
SRC_EXT = {"markdown": "md", "textile": "tt"}
DST_EXT = "html"
HIDDEN = set... | 47.237918 | 432 | 0.611553 |
c22ced4399b4c6653f1c5e459c659493b445255d | 1,427 | py | Python | Scripts/CORS/cors-test/common/logger.py | bbhunter/Security-Guide | 139cfba3b30a4ca6a32d11aa025638d0a9c5c541 | [
"MIT"
] | 767 | 2018-05-13T03:42:20.000Z | 2022-03-28T02:18:54.000Z | Scripts/CORS/cors-test/common/logger.py | bbhunter/Security-Guide | 139cfba3b30a4ca6a32d11aa025638d0a9c5c541 | [
"MIT"
] | 27 | 2018-08-19T05:33:21.000Z | 2021-11-23T20:32:36.000Z | Scripts/CORS/cors-test/common/logger.py | bbhunter/Security-Guide | 139cfba3b30a4ca6a32d11aa025638d0a9c5c541 | [
"MIT"
] | 159 | 2018-05-13T09:54:56.000Z | 2022-02-17T19:47:47.000Z | import time
import json
import sys
class Log:
"""Class Log for logging CORS misconfiguration message"""
print_level = 0
msg_level = {0: 'DEBUG', 1: 'INFO', 2: 'WARNING', 3: 'ALERT'}
auto_timestamp = 1
def __init__(self, filename, print_level, auto_timestamp=1):
self.filename = filename
... | 29.729167 | 76 | 0.507358 |
dfbac661ca393e551cd9d63bbc64d25890812c2f | 904 | py | Python | PINp/2014/Cheraneva A.S/task_4_24.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Cheraneva A.S/task_4_24.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Cheraneva A.S/task_4_24.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 4. Вариант 24.
#Напишите программу, которая выводит имя, под которым скрывается Ефим Алексеевич Придворов. Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), вычислить возраст на данный момент (или момент смерти). Для хранения все... | 47.578947 | 445 | 0.778761 |
5f0ed86d56d553cec7efa9a34f1e2c5781526bf8 | 292 | py | Python | jumeaux/addons/did_challenge/__init__.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 11 | 2017-10-02T01:29:12.000Z | 2022-03-31T08:37:22.000Z | jumeaux/addons/did_challenge/__init__.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 79 | 2017-07-16T14:47:17.000Z | 2022-03-31T08:49:14.000Z | jumeaux/addons/did_challenge/__init__.py | ihatov08/jumeaux | 7d983474df4b6dcfa57ea1a66901fbc99ebababa | [
"MIT"
] | 2 | 2019-01-28T06:11:58.000Z | 2021-01-25T07:21:21.000Z | # -*- coding:utf-8 -*-
from jumeaux.models import DidChallengeAddOnPayload, DidChallengeAddOnReference
class DidChallengeExecutor:
def exec(self, payload: DidChallengeAddOnPayload, referenece: DidChallengeAddOnReference) -> DidChallengeAddOnPayload:
raise NotImplementedError()
| 36.5 | 122 | 0.80137 |
cd099ede29044a4427fbbbdccc5203029e303228 | 436 | py | Python | ebenezer/atencion/migrations/0005_auto_20181005_1315.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | ebenezer/atencion/migrations/0005_auto_20181005_1315.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | 3 | 2020-02-11T23:15:00.000Z | 2021-06-10T20:52:17.000Z | ebenezer/atencion/migrations/0005_auto_20181005_1315.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.2 on 2018-10-05 13:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('atencion', '0004_taxonomia'),
]
operations = [
migrations.AlterField(
model_name='taxonomia',
name='codigo',
... | 22.947368 | 105 | 0.584862 |
cd675afe004faab8d0aed255a04053cd280e6901 | 1,088 | py | Python | todomanager/__init__.py | neoinal/ToDoManager | c9832f52e021799ec2b793458a81ef34968f4688 | [
"MIT"
] | null | null | null | todomanager/__init__.py | neoinal/ToDoManager | c9832f52e021799ec2b793458a81ef34968f4688 | [
"MIT"
] | null | null | null | todomanager/__init__.py | neoinal/ToDoManager | c9832f52e021799ec2b793458a81ef34968f4688 | [
"MIT"
] | null | null | null | import hashlib
from pyramid.config import Configurator
from pyramid.session import SignedCookieSessionFactory
from sqlalchemy import engine_from_config
from .models import (
DBSession,
Base,
)
def main(global_config, **settings):
""" This function returns a Pyramid WSGI application.
"""
secre... | 35.096774 | 96 | 0.722426 |
26c37dccc322e54104fae9efa8465f7425c143d8 | 1,595 | py | Python | Packs/Expanse/Scripts/ExpanseParseRawIncident/ExpanseParseRawIncident_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Expanse/Scripts/ExpanseParseRawIncident/ExpanseParseRawIncident_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Expanse/Scripts/ExpanseParseRawIncident/ExpanseParseRawIncident_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from ExpanseParseRawIncident import parse_raw
import json
def test_parse_raw():
readable_output, parsed, raw = parse_raw(json.dumps(MOCK_RAW_JSON))
raw_json = MOCK_RAW_JSON
assert parsed['expanse_raw_json_event']['eventType'] == raw_json['eventType']
MOCK_RAW_JSON = {
"eventType": "ON_PREM_EXPOSURE... | 33.229167 | 81 | 0.573041 |
e4a90634bc1dd37c9c041d462c90951d41509a63 | 137 | py | Python | Python1/aula4.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | Python1/aula4.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | Python1/aula4.py | Belaschich/SoulON | 9f908b025b34fc79187b4efd5ea93a78dca0ef7e | [
"MIT"
] | null | null | null | '''
1-Crie um laço com for in range que imprima os múltiplos de 3 no intervalo entre 0 e 15.
'''
for i in range (0, 18, 3):
print(i) | 22.833333 | 88 | 0.649635 |
e4b972f5f6b35edbb9355c0ca891cda1d6221159 | 2,029 | py | Python | Common/MQTT/mainWifiEnigma_version_test_mqtt.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | Common/MQTT/mainWifiEnigma_version_test_mqtt.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null | Common/MQTT/mainWifiEnigma_version_test_mqtt.py | Puzzlebox-IMT/Puzzlebox | 6b80e22a4aee3228140692bd6352de18b2f6a96d | [
"MIT"
] | null | null | null |
import time
import paho.mqtt.client as mqtt
import sys
#sys.path.append('WifiUnhacking')
#sys.path.append('ZeldaAutomation')
#sys.path.append('BattleAI')
#IMPORTS OF THE WIFI UNHACKING ENIGMA
#from wifi_Puzzlebox import *
#from wifiUnhackingSolved import *
#IMPORTS OF THE WIFI BATTLE AI
#from zelda_home_public impo... | 20.29 | 102 | 0.688517 |
90168bd4536514026f7c4daa40dab9c210ba11d3 | 21,719 | py | Python | forge/db.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 31 | 2015-07-13T15:36:50.000Z | 2022-02-07T21:37:51.000Z | forge/db.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 109 | 2015-04-24T10:03:24.000Z | 2019-04-12T13:34:01.000Z | forge/db.py | Pandinosaurus/3d-forge | d631e14a9351911c3e5612c73c1608d97ed547d2 | [
"BSD-3-Clause"
] | 16 | 2015-10-03T06:03:22.000Z | 2022-03-31T08:24:37.000Z | # -*- coding: utf-8 -*-
import os
import datetime
import time
import math
import subprocess
import sys
import ConfigParser
import sqlalchemy
import multiprocessing
from sqlalchemy.sql import exists, select, text
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.exc import ProgrammingError
from sq... | 38.103509 | 81 | 0.540541 |
9017a0f5d19f182f788538f444b90b5c36055f68 | 577 | py | Python | 1_DeepLearning-Basics/06_Boston_Dataset_Regression/linearRegression.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/06_Boston_Dataset_Regression/linearRegression.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | 1_DeepLearning-Basics/06_Boston_Dataset_Regression/linearRegression.py | felixdittrich92/DeepLearning-tensorflow-keras | 2880d8ed28ba87f28851affa92b6fa99d2e47be9 | [
"Apache-2.0"
] | null | null | null | import os
import numpy as np
import matplotlib.pyplot as plt
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error
import tensorflow as tf
from tensorflow.keras.datasets import boston_housing
# Dataset
(x_train, y_train), (x_test, y_test) = boston_housing.load_data()
train... | 24.041667 | 65 | 0.785095 |
5f6e5f0cb9da8fb349e35211ed56f77bb9cf95da | 804 | py | Python | mobile/tools/python/modeltools/tools/model_reader.py | jameswu2014/Paddle-Lite | 827e349ac8eb769a873fe9b3aa961af8b8b20a96 | [
"Apache-2.0"
] | 3 | 2018-08-01T09:45:48.000Z | 2021-01-06T14:55:10.000Z | mobile/tools/python/modeltools/tools/model_reader.py | tao8687/Paddle-Lite | ebc0e39c7e8c09ad2d1b6a2923a420b2c1727635 | [
"Apache-2.0"
] | null | null | null | mobile/tools/python/modeltools/tools/model_reader.py | tao8687/Paddle-Lite | ebc0e39c7e8c09ad2d1b6a2923a420b2c1727635 | [
"Apache-2.0"
] | 5 | 2020-10-13T09:30:16.000Z | 2021-06-08T02:46:17.000Z | import os
from core import framework_pb2 as framework_pb2
def read_model(model_path):
print('read_model.')
path_8 = unicode(model_path, 'utf8')
try:
with open(path_8, "rb") as f_model:
print get_file_size(model_path)
desc = framework_pb2.ProgramDesc()
desc.Par... | 25.935484 | 145 | 0.676617 |
5f84a12139fcbbf69a139d4d1a4024aa022fea13 | 12,348 | py | Python | tests/onegov/wtfs/test_collections.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/wtfs/test_collections.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/wtfs/test_collections.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from datetime import date
from onegov.wtfs.collections import MunicipalityCollection
from onegov.wtfs.collections import NotificationCollection
from onegov.wtfs.collections import PaymentTypeCollection
from onegov.wtfs.collections import ScanJobCollection
from uuid import uuid4
def test_payment_types(session):
pa... | 34.395543 | 76 | 0.65128 |
ffcea5bfe9ee2c8ae7e95db4503d6b835bc1dee9 | 223 | py | Python | PYTHON/Introduction/if_else.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Introduction/if_else.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | PYTHON/Introduction/if_else.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
if __name__ == '__main__':
n = int(input())
if n & 1: # odd
print('Weird')
else:
if 6 < n <= 20:
print('Weird')
else:
print('Not Weird')
| 18.583333 | 30 | 0.434978 |
0856d4d0b68a9bb60e9e6ea21b63e073f1bd986a | 574 | py | Python | rabbitmq/tutorial/emit_log_direct.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | rabbitmq/tutorial/emit_log_direct.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | rabbitmq/tutorial/emit_log_direct.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import pika
import sys
credentials = pika.PlainCredentials('admin', '1q2w3e')
parameters = pika.ConnectionParameters('192.168.1.197', 5672, '/', credentials)
connection = pika.BlockingConnection(parameters)
channel = connection.channel()
channel.exchange_declare(exchange='direct_logs', exchange_type='direct')
severi... | 31.888889 | 79 | 0.74216 |
29ed37b303027458cdb3e6065d57e6cb602c4c81 | 623 | py | Python | recebendo_dados_user.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 1 | 2021-12-18T15:29:24.000Z | 2021-12-18T15:29:24.000Z | recebendo_dados_user.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | null | null | null | recebendo_dados_user.py | lcarlin/guppe | a0ee7b85e8687e8fb8243fbb509119a94bc6460f | [
"Apache-2.0"
] | 3 | 2021-08-23T22:45:20.000Z | 2022-02-17T13:17:09.000Z | """
recebendo dados via consolo
"""
# print("Qual é vossa Graça ? :-> ")
# nome = input()
#
# print("Qual a Vossa idade ? ")
# idade = input()
#
# print("Olá :-> %s , você tem %s anus " % (nome, idade))
# print("A pessoa {0} tem {1} anos de idade ".format(nome, idade))
# print(f"Seje Bem-vindo {nome} que tem a idade... | 20.766667 | 66 | 0.592295 |
8a8eb377365d95f3ded5bdc39ae227f96868161b | 141 | py | Python | personal-files/python-test/int_sort.py | lyf0327/PycharmProjects | ce6507f04a33156a0d6c3f732856dcb655bc2351 | [
"Apache-2.0"
] | null | null | null | personal-files/python-test/int_sort.py | lyf0327/PycharmProjects | ce6507f04a33156a0d6c3f732856dcb655bc2351 | [
"Apache-2.0"
] | null | null | null | personal-files/python-test/int_sort.py | lyf0327/PycharmProjects | ce6507f04a33156a0d6c3f732856dcb655bc2351 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
l = []
for i in range(3):
x = int(raw_input('number:\n'))
l.append(x)
l.sort()
print l
| 15.666667 | 35 | 0.546099 |
6aeeb1892035a0894faeef2f361c0e95deeb97ab | 65 | py | Python | pythonProj/FZPython/demo/test_crontab.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | null | null | null | pythonProj/FZPython/demo/test_crontab.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | null | null | null | pythonProj/FZPython/demo/test_crontab.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | 2 | 2019-04-10T10:05:00.000Z | 2021-11-24T17:17:23.000Z | #!/usr/bin/env python
# coding: utf8
print('abc')
print('def')
| 9.285714 | 21 | 0.630769 |
0ad3a1008f0ae5a1f27c4ea970ab0064e0dced28 | 72 | py | Python | .vscode/extensions/ms-python.vscode-pylance-2021.7.4/dist/bundled/stubs/openpyxl/utils/escape.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | .vscode/extensions/ms-python.vscode-pylance-2021.7.4/dist/bundled/stubs/openpyxl/utils/escape.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | .vscode/extensions/ms-python.vscode-pylance-2021.7.4/dist/bundled/stubs/openpyxl/utils/escape.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | def escape(value: str) -> str: ...
def unescape(value: str) -> str: ...
| 24 | 36 | 0.583333 |
e40c11cd497f927e7a1e64e6bf2352e7d1f7342a | 725 | py | Python | 20-hs-redez-sem/groups/05-decentGames/src/SyncFeeds.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/05-decentGames/src/SyncFeeds.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/05-decentGames/src/SyncFeeds.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | import udp_connection
import argparse
from logSync import database_sync
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Tool for synchronisation')
parser.add_argument('--sync', metavar='DIR', nargs=2)
parser.add_argument('--dump', metavar='DIR')
parser.add_argument('--server'... | 38.157895 | 116 | 0.725517 |
7cab2b1d4286ceed2d4dafaf3881abbca71e5ec9 | 5,366 | py | Python | python_experiments/data_analysis/vldbj_data_parsing/generate_speedup_over_sling_markdown.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 8 | 2020-04-14T23:17:00.000Z | 2021-06-21T12:34:04.000Z | python_experiments/data_analysis/vldbj_data_parsing/generate_speedup_over_sling_markdown.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | null | null | null | python_experiments/data_analysis/vldbj_data_parsing/generate_speedup_over_sling_markdown.py | RapidsAtHKUST/SimRank | 3a601b08f9a3c281e2b36b914e06aba3a3a36118 | [
"MIT"
] | 1 | 2021-01-17T16:26:50.000Z | 2021-01-17T16:26:50.000Z | import decimal
from data_analysis.vldbj_data_parsing.querying_time_accuracy_statistics import *
from data_analysis.vldbj_data_parsing.reads_indexing_statistics import reads_tag, reads_d_tag, reads_rq_tag
def format_str(float_num):
return str(decimal.Decimal.from_float(float_num).quantize(decimal.Decimal('0.000')... | 42.251969 | 122 | 0.655982 |
7cad6f2496ec5180647039f286c2fd029d9fec53 | 174 | py | Python | bot/filters/__init__.py | YoshlikMedia/STT-uzbek-bot | fec5d6a7bec4135aeb35a86970193654637194f5 | [
"MIT"
] | null | null | null | bot/filters/__init__.py | YoshlikMedia/STT-uzbek-bot | fec5d6a7bec4135aeb35a86970193654637194f5 | [
"MIT"
] | null | null | null | bot/filters/__init__.py | YoshlikMedia/STT-uzbek-bot | fec5d6a7bec4135aeb35a86970193654637194f5 | [
"MIT"
] | null | null | null | from aiogram import Dispatcher
from bot.loader import dp
# from .is_admin import AdminFilter
if __name__ == "filters":
# dp.filters_factory.bind(AdminFilter)
pass
| 17.4 | 42 | 0.747126 |
6b12047741589f49dcb91250be0175702789f1f0 | 25,360 | py | Python | official/nlp/pangu_alpha/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/nlp/pangu_alpha/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | official/nlp/pangu_alpha/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 50.31746 | 119 | 0.679574 |
86a897c3a6dc8d698bc2ed4d376fe9f8dee5c575 | 2,295 | py | Python | research/cv/tgcn/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/tgcn/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/tgcn/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... | 40.982143 | 115 | 0.688453 |
86df37997b1aac5b8de41549c45e62257231afd8 | 309 | py | Python | DeepRTS/contrib/agents/classic/random_agent.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | null | null | null | DeepRTS/contrib/agents/classic/random_agent.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | null | null | null | DeepRTS/contrib/agents/classic/random_agent.py | Yigit-Arisoy/deep-rts | a5ed2c29b76789830df9f7075480c7229ccf0f4d | [
"MIT"
] | null | null | null | from DeepRTS.contrib.agents import Agent
from DeepRTS.Engine import Random
class RandomAgent(Agent):
def get_action(self, state, eps=0):
return Random.action() - 1
def update(self, state, next_state, action, reward, terminal):
return
def save(self, file_name):
return
| 20.6 | 66 | 0.679612 |
86fd74f343e294b32a04911733aec5e43bf5e462 | 5,761 | py | Python | examples/v1beta1/trial-images/darts-cnn-cifar10/operations.py | d-gol/katib | 2c8758b26ffd543e08b70464f8ac7b286f3ca2ea | [
"Apache-2.0"
] | 17 | 2018-04-04T08:44:06.000Z | 2018-04-19T18:02:05.000Z | examples/v1beta1/trial-images/darts-cnn-cifar10/operations.py | d-gol/katib | 2c8758b26ffd543e08b70464f8ac7b286f3ca2ea | [
"Apache-2.0"
] | 58 | 2018-04-03T19:05:50.000Z | 2018-04-19T16:14:04.000Z | examples/v1beta1/trial-images/darts-cnn-cifar10/operations.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 ... | 31.828729 | 120 | 0.61465 |
81416170d3ec61d643abd04b11498605988f598e | 2,481 | py | Python | python/oneflow/nn/modules/expand.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/expand.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/expand.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"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... | 29.188235 | 112 | 0.67231 |
be0e50c486d92813b807f9259a9e6c40b70cfaec | 14,610 | py | Python | examples/text_to_sql/IGSQL/data_util/sql_util.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/IGSQL/data_util/sql_util.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/text_to_sql/IGSQL/data_util/sql_util.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... | 32.323009 | 99 | 0.562081 |
6af71f3fc49a011f8e64c2844f60dc261a963e40 | 647 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v5_0/repost_requested_qty.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v5_0/repost_requested_qty.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_0/repost_requested_qty.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
from erpnext.stock.stock_balance import update_bin_qty, get_indented_qty
count=0
for item_code, warehouse in frappe... | 29.409091 | 83 | 0.72643 |
130a07e5dd5fd3d31f554502d5666f1d7d0f2feb | 466 | py | Python | aecb/api/management/commands/defaultsuperuser.py | snvc00/aecb-backend | 96847008d7b8d986099c0ce08e1026926ef3c68d | [
"MIT"
] | null | null | null | aecb/api/management/commands/defaultsuperuser.py | snvc00/aecb-backend | 96847008d7b8d986099c0ce08e1026926ef3c68d | [
"MIT"
] | null | null | null | aecb/api/management/commands/defaultsuperuser.py | snvc00/aecb-backend | 96847008d7b8d986099c0ce08e1026926ef3c68d | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
from django.contrib.auth.models import User
import os
class Command(BaseCommand):
"""
"""
def handle(self, *args, **kwargs):
DJANGO_SU_PASSWORD = os.environ.get("DJANGO_SU_PASSWORD")
try:
User.objects.create_superuser("aecb-ad... | 29.125 | 93 | 0.654506 |
138bd9044f7f5598f51d1fa8a54e7d8facb52754 | 10,163 | py | Python | fhirclient/r4models/observationdefinition.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/observationdefinition.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | fhirclient/r4models/observationdefinition.py | Healthedata1/Flask-PL | 88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated from FHIR 4.0.0-a53ec6ee1b (http://hl7.org/fhir/StructureDefinition/ObservationDefinition) on 2019-05-07.
# 2019, SMART Health IT.
from . import domainresource
class ObservationDefinition(domainresource.DomainResource):
""" Definition of an ... | 43.063559 | 122 | 0.628456 |
b97cf833e558faafef8eba4404b08ea7d6db9166 | 13,872 | py | Python | Packs/CiscoESAIronPortEmailAPI/Integrations/CiscoIronPortEMailAPI/CiscoIronPortEMailAPI.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CiscoESAIronPortEmailAPI/Integrations/CiscoIronPortEMailAPI/CiscoIronPortEMailAPI.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CiscoESAIronPortEmailAPI/Integrations/CiscoIronPortEMailAPI/CiscoIronPortEMailAPI.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from base64 import b64encode
from datetime import datetime, timedelta
import demistomock as demisto # noqa: F401
import requests
from CommonServerPython import * # noqa: F401
requests.packages.urllib3.disable_warnings()
quarantineName = demisto.params()['quarantineName']
userName = demisto.params()['userName']
pa... | 38.640669 | 172 | 0.639706 |
b99da2f4657d60e32a6e81ebe0d28d6139432f34 | 11,780 | py | Python | research/cv/SE_ResNeXt50/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/SE_ResNeXt50/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/SE_ResNeXt50/train.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... | 39.530201 | 114 | 0.647199 |
dbe449553ec66fe1fbdbc0036a74f69982f5258a | 376 | py | Python | spotjuk/src/schemas/create_database.py | EliasJuk/SpotJuk | 51ff417f1509d9ace96799e7d1be02c818c0abeb | [
"MIT"
] | null | null | null | spotjuk/src/schemas/create_database.py | EliasJuk/SpotJuk | 51ff417f1509d9ace96799e7d1be02c818c0abeb | [
"MIT"
] | null | null | null | spotjuk/src/schemas/create_database.py | EliasJuk/SpotJuk | 51ff417f1509d9ace96799e7d1be02c818c0abeb | [
"MIT"
] | null | null | null | import os
os.remove('../database.db')
import sqlite3
conn = sqlite3.connect('../database.db')
cursor = conn.cursor()
cursor.execute("""
CREATE TABLE categories (
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
categorie VARCHAR(20) NOT NULL,
cover VARCHAR(50) NOT NULL
);
""")
print("Tabela criada com ... | 19.789474 | 50 | 0.699468 |
0ebe320d79d54fbbd326b080c91b590f13c9cf8b | 87 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.6-global-variable-a.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.6-global-variable-a.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-007/pg-7.6-global-variable-a.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | def myfnc(y):
print("y =", y)
print("x =", x)
x = 20
myfnc(x)
print("y:", y)
| 9.666667 | 19 | 0.448276 |
16326366b23e076f89483ec2ddff3f68d3f87d49 | 5,178 | py | Python | tests/onegov/event/test_cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/event/test_cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/event/test_cli.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from click.testing import CliRunner
from onegov.core.utils import module_path
from onegov.event.cli import cli
from os import path
from pytest import mark
from unittest.mock import MagicMock
from unittest.mock import patch
def test_import_ical(cfg_path, temporary_directory):
runner = CliRunner()
text = '\n'.... | 32.3625 | 78 | 0.608729 |
fc30f36e11b849303c692970aae36c1e65bcfe9e | 5,482 | py | Python | src/Sephrasto/UI/MainWindow.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/UI/MainWindow.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/UI/MainWindow.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'MainWindow.ui'
#
# Created by: PyQt5 UI code generator 5.15.6
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, Q... | 49.387387 | 115 | 0.699562 |
539ed969cc1cb5f7daa614bf25f621ea55b6e0f8 | 203 | py | Python | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/cache/cache_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/cache/cache_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-pipeline-kernel/src/watchmen_pipeline_kernel/cache/cache_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .compiled_pipeline_cache import compiled_pipeline_cache, CompilePipelineCache
class CacheService:
@staticmethod
def compiled_pipeline() -> CompilePipelineCache:
return compiled_pipeline_cache
| 25.375 | 82 | 0.857143 |
53b3268850e862b5a316081322e6737dd5f78db8 | 393 | py | Python | INBa/2015/KURCHATOV_N_V/z2_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KURCHATOV_N_V/z2_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/KURCHATOV_N_V/z2_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 11
# Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Анвари. Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Курчатов Н.В
# 14.03.2016
print("Каждый доллар в чужом кармане он воспринимал как личное для се... | 49.125 | 199 | 0.783715 |
ab5819e14ba60acf3c6f1f7af63b286d2cb43284 | 971 | py | Python | src/onegov/election_day/formats/election/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/formats/election/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/formats/election/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.election_day.formats.election.internal_majorz \
import import_election_internal_majorz
from onegov.election_day.formats.election.internal_proporz \
import import_election_internal_proporz
from onegov.election_day.formats.election.parties \
import import_party_results
from onegov.election_day.for... | 37.346154 | 60 | 0.832132 |
ab58cde91ede373bd4e38aef7c5e382229f2355a | 10,308 | py | Python | server/app.py | JungleState/ksr_junglestate | 99e86458b5056507bd36906f295bef11f2c734f5 | [
"MIT"
] | 1 | 2022-01-25T07:53:12.000Z | 2022-01-25T07:53:12.000Z | server/app.py | JungleState/ksr_junglestate | 99e86458b5056507bd36906f295bef11f2c734f5 | [
"MIT"
] | 14 | 2022-01-03T13:19:11.000Z | 2022-01-12T15:36:42.000Z | server/app.py | JungleState/ksr_junglestate | 99e86458b5056507bd36906f295bef11f2c734f5 | [
"MIT"
] | null | null | null | import os
from flask import Flask, jsonify, session, abort, render_template, redirect, url_for, request
from game_logic import Game
import threading
import uuid
import logging
NAME_LENGTH_MAX = 30
MAX_PLAYER_TIMEOUT = 10
app = Flask(__name__, template_folder='templates')
app.logger.setLevel("DEBUG")
app.secret_key = ... | 28.713092 | 139 | 0.549573 |
915e79622afe732124b94e6a9f335b74f37ecc67 | 2,441 | py | Python | BruteForce/Drupal.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | BruteForce/Drupal.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | BruteForce/Drupal.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | # uncompyle6 version 2.11.5
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.18 (default, Apr 20 2020, 20:30:41)
# [GCC 9.3.0]
# Embedded file name: BruteForce\Drupal.py
import requests
import re
import threading
import time
from Exploits import printModule
r = '\x1b[31m'
g = '\x1b[32m'
y = '\x1b[33m'
b = '... | 36.984848 | 166 | 0.541172 |
f40a85df85ce55223d7cff17b499e0ac3de94557 | 376 | py | Python | train_inference/MNIST Dataset Recognition/mnist_pic/make_your_mnist.py | hellfire0831/ModelArts-Lab | 3e826a5b388244c0588b7bb916184750997ab272 | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | train_inference/MNIST Dataset Recognition/mnist_pic/make_your_mnist.py | hellfire0831/ModelArts-Lab | 3e826a5b388244c0588b7bb916184750997ab272 | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | train_inference/MNIST Dataset Recognition/mnist_pic/make_your_mnist.py | hellfire0831/ModelArts-Lab | 3e826a5b388244c0588b7bb916184750997ab272 | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | # -*- coding: utf-8 -*-
"""
Make mnist data set.
Ensure that the PIL module is installed before using the code below.
"""
from PIL import Image
cache = '/your/path/'
# source pic
sr = cache + '0.jpg'
# target pic
tg = cache + '00.jpg'
I = Image.open(sr)
# resize to 28 * 28
I = I.resize((28, 28))
# translating a color ... | 19.789474 | 68 | 0.648936 |
fe22af66bae2cf5357afac07ee5843d1f1583232 | 26,909 | py | Python | pandemie/tester/strategies/alex1.py | marvinsxtr/informaticup-2020-pandemie | 0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89 | [
"MIT"
] | null | null | null | pandemie/tester/strategies/alex1.py | marvinsxtr/informaticup-2020-pandemie | 0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89 | [
"MIT"
] | null | null | null | pandemie/tester/strategies/alex1.py | marvinsxtr/informaticup-2020-pandemie | 0d37d5236eadfe7bb3cbd7cbfd0e1b7afca74c89 | [
"MIT"
] | 1 | 2020-03-28T00:02:41.000Z | 2020-03-28T00:02:41.000Z | """
This is the strategy our team continuously improves to compete in the InformatiCup. Its basic principle is ranking
each possible operation and thereby picking the best choice.
Observations:
- a city can only be affected by one pathogen at a time
- it might be sufficient to sort by operation and afterwards sort the... | 48.310592 | 132 | 0.598647 |
fe044285df67b096c5020031abd01018fbeaae3b | 2,286 | py | Python | python/type_checking/game_oop.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/type_checking/game_oop.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/type_checking/game_oop.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # game.py
import random
import sys
from typing import List
class Card:
SUITS = "♠ ♡ ♢ ♣".split()
RANKS = "2 3 4 5 6 7 8 9 10 J Q K A".split()
def __init__(self, suit, rank):
self.suit = suit
self.rank = rank
def __repr__(self):
return f"{self.suit}{self.rank}"
class Deck:
... | 28.222222 | 80 | 0.590114 |
fe065dedbbe593726992541270f0cc48c53c8e8e | 14,670 | py | Python | AP_SS16/702/PythonSkript.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 3 | 2016-04-27T17:07:00.000Z | 2022-02-02T15:43:15.000Z | AP_SS16/702/PythonSkript.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | 5 | 2016-04-27T17:10:03.000Z | 2017-06-20T14:54:20.000Z | AP_SS16/702/PythonSkript.py | DimensionalScoop/kautschuk | 90403f97cd60b9716cb6a06668196891d5d96578 | [
"MIT"
] | null | null | null | ##################################################### Import system libraries ######################################################
import matplotlib as mpl
mpl.rcdefaults()
mpl.rcParams.update(mpl.rc_params_from_file('meine-matplotlibrc'))
import matplotlib.pyplot as plt
import numpy as np
import scipy.constants as c... | 41.558074 | 174 | 0.602113 |
a3cb44ab5cba8954ca0ab7a78df9a7901e446793 | 13,985 | py | Python | crypto/ECC/elliptic.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 987 | 2021-12-19T09:57:18.000Z | 2022-03-31T15:39:45.000Z | crypto/ECC/elliptic.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 409 | 2018-09-18T01:02:29.000Z | 2022-01-24T20:51:58.000Z | crypto/ECC/elliptic.py | yingjingyang/Dapp-Learning | 5bf10a02932926e429c1a61704d9a9dfee3a13ea | [
"MIT"
] | 263 | 2021-06-28T15:26:56.000Z | 2021-12-19T08:14:37.000Z | """
By Willem Hengeveld <itsme@xs4all.nl>
ecdsa implementation in python
demonstrating several 'unconventional' calculations,
like finding a public key from a signature,
and finding a private key from 2 signatures with identical 'r'
"""
def GCD(a, b):
"""
(gcd,c,d)= GCD(a, b) ===> a*c+b*d!=gcd:
"""
i... | 27.421569 | 87 | 0.538148 |
4ac658ca25c8f5b359cc3e7d159bf0a40ccacf00 | 2,146 | py | Python | Aggregator/agg_fahrrad.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 29 | 2020-03-21T00:47:51.000Z | 2021-07-17T15:50:33.000Z | Aggregator/agg_fahrrad.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 7 | 2020-03-21T14:04:26.000Z | 2022-03-02T08:05:40.000Z | Aggregator/agg_fahrrad.py | socialdistancingdashboard/virushack | 6ef69d26c5719d0bf257f4594ed2488dd73cdc40 | [
"Apache-2.0"
] | 13 | 2020-03-21T01:08:08.000Z | 2020-04-08T17:21:11.000Z | import json
import boto3
from coords_to_kreis import coords_convert
import datetime
import pandas as pd
import settings
#date = datetime.date.today() - datetime.timedelta(days = 3)
def aggregate(date):
s3_client = boto3.client('s3')
response = s3_client.get_object(Bucket=settings.BUCKET, Key='fahrrad/{}/{}/{}... | 42.92 | 198 | 0.662628 |
434bfedd1e04757a626830cebc5c90641f4803d1 | 82 | py | Python | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.10-Printing-Pattern.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.10-Printing-Pattern.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/00.Fundamentals/07.10-Printing-Pattern.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | for _ in range(4):
for _ in range(4):
print("#", end=" ")
print()
| 16.4 | 27 | 0.45122 |
439ac8d08f12a6e166045ed0235f1abe7c8ded57 | 47,090 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/net_tools/test_hetzner_firewall.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/net_tools/test_hetzner_firewall.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/net_tools/test_hetzner_firewall.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # (c) 2019 Felix Fontein <felix@fontein.de>
# 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__ = type
import pytest
from ansible_collections.community.general.plugins.module_utils.hetzner impor... | 33.492176 | 135 | 0.485029 |
8811b00d3afa9583d77014b3adcdbb8326ede6a0 | 590 | py | Python | exercises/de/test_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert Token.has_extension(
"is_country"
), "Hast du die Token-Erweiterung korrekt registriert?"
ext = Token.get_extension("is_country")
assert ext[0] == False, "Hast du den default-Wert korrekt angegeben?"
country_values = [False, False, False, True, False]
assert [
... | 36.875 | 77 | 0.664407 |
716fd8cc58c0666ec1ca0b058f6b570b399d12f6 | 434 | py | Python | source/tests/gen_lens_anim.py | neyustudies/programmiersprachen-raytracer | 220a979fb67c6179ceffc4172c721c4338f5e90e | [
"MIT"
] | null | null | null | source/tests/gen_lens_anim.py | neyustudies/programmiersprachen-raytracer | 220a979fb67c6179ceffc4172c721c4338f5e90e | [
"MIT"
] | null | null | null | source/tests/gen_lens_anim.py | neyustudies/programmiersprachen-raytracer | 220a979fb67c6179ceffc4172c721c4338f5e90e | [
"MIT"
] | 1 | 2022-01-05T13:55:17.000Z | 2022-01-05T13:55:17.000Z | #!/usr/bin/env python
import re
from numpy import arange
def main():
with open("lens.sdf", "r") as f:
content = f.read()
i = 0
for x in arange(-30, 30, 0.2):
frame = re.sub("{{LENS_X}}", "%s" % x, content)
frame = re.sub("{{IDX}}", "%04d" % i, frame)
i += 1
with op... | 20.666667 | 61 | 0.502304 |
71bea69977dcbc357ffc1fbf9622e581ecfc88a4 | 2,485 | py | Python | azext_keyvault/keyvault/models/sas_definition_create_parameters_py3.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 2 | 2019-06-12T13:44:34.000Z | 2020-06-01T13:24:04.000Z | azext_keyvault/keyvault/models/sas_definition_create_parameters_py3.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 5 | 2018-04-26T01:14:29.000Z | 2021-01-05T00:45:39.000Z | azext_keyvault/keyvault/models/sas_definition_create_parameters_py3.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 8 | 2018-04-24T22:52:48.000Z | 2021-11-16T06:29:28.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 42.844828 | 138 | 0.655936 |
e0deaaf2a49119c38b80df8e4456415f776e63fc | 1,031 | py | Python | caesar-cipher.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | caesar-cipher.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | caesar-cipher.py | kautuk-desai/HackerRank | 6c0b22800ea2e40d118d6a0a5c0ece067a0a69bf | [
"MIT"
] | null | null | null | #!/bin/python3
import sys
def caesarCipher(s, k):
# Complete this function
if(k % 26 == 0):
return s
characters = set()
for i in range(26):
characters.add(chr(65 + i))
characters.add(chr(97 + i))
s_len = len(s)
new_str = [0]*s_len
ascii_code = 0
f... | 25.775 | 84 | 0.489816 |
1cc12f1df00ecdbaa34ad648b26b9175d8fbdbea | 2,289 | py | Python | official_examples/Reinforcement_Learning_GameSolution_Examples/vizdoom/pve/game_interface.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | official_examples/Reinforcement_Learning_GameSolution_Examples/vizdoom/pve/game_interface.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | official_examples/Reinforcement_Learning_GameSolution_Examples/vizdoom/pve/game_interface.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | import copy
import os
import shutil
import time
import itertools as it
import numpy as np
from vizdoom import *
class GameInterface():
def __init__(self, *args):
# Create Doom instance
print("Initializing doom...")
config_file_path = os.path.join(os.path.dirname(__file__),
... | 30.932432 | 90 | 0.60201 |
1cd119a6b7839ded65f72c7111a2fedeaac3ca83 | 676 | py | Python | Git2020/tests/Aufgabe3_test.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Git2020/tests/Aufgabe3_test.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Git2020/tests/Aufgabe3_test.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | import os
import sys
import re
from os.path import dirname
cwd = dirname(os.getcwd())
directory = './index.md'
def check_if_string_in_file(file_name):
heading = False
count = 0
f = open(file_name, 'r')
Lines = f.readlines()
for line in Lines:
if re.match('## ([A-Z]|[a-z]|[\u00c4-\u02AF]|[0-9])+', line):
he... | 21.806452 | 103 | 0.616864 |
1c1600fa1b50321fce093d01ff211af94ae7fcee | 468 | py | Python | bildungslogin-plugin/tests/unittests/test_plugin.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | bildungslogin-plugin/tests/unittests/test_plugin.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | bildungslogin-plugin/tests/unittests/test_plugin.py | univention/bildungslogin | 29bebe858a5445dd5566aad594b33b9dd716eca4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from unittest.mock import patch
import pytest
import bildungslogin_plugin.plugin
from bildungslogin_plugin.backend_udm_rest_api import UdmRestApiBackend
from bildungslogin_plugin.routes.v1.users import get_backend
@patch("bildungslogin_plugin.plugin.ldap_auth")
@pytest.mark.asyncio
async de... | 26 | 71 | 0.811966 |
1c88dc5ae84313cc35ba7ef5b510daebf6054267 | 3,472 | py | Python | Packs/ImageOCR/Integrations/ImageOCR/ImageOCR.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ImageOCR/Integrations/ImageOCR/ImageOCR.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ImageOCR/Integrations/ImageOCR/ImageOCR.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
import subprocess
import traceback
from typing import List
TESSERACT_EXE = 'tesseract'
def list_languages() -> List[str]:
lang_out = subprocess.check_output([TESSERACT_EXE, '--list-langs'], universal_newlines=True)
if not lang_out: # something w... | 36.93617 | 119 | 0.675403 |
98cf7bb93cb9f721de2a3d4f1234dbb787f845ab | 506 | py | Python | Chapter12_Multiprocessing/multi_process_pool.py | kernbeisser/UdemyPythonPro | 000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9 | [
"MIT"
] | null | null | null | Chapter12_Multiprocessing/multi_process_pool.py | kernbeisser/UdemyPythonPro | 000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9 | [
"MIT"
] | null | null | null | Chapter12_Multiprocessing/multi_process_pool.py | kernbeisser/UdemyPythonPro | 000d5e66031bcc22b2d8f115edfbd5ef0e80d5b9 | [
"MIT"
] | null | null | null | import itertools
import math
import time
from multiprocessing import Pool
NUM_PROCESSES = 4
def calc(num_elements):
res = 0
for i in range(num_elements):
res += math.sqrt(i)
print(res)
def main():
start_time = time.perf_counter()
with Pool(processes=NUM_PROCESSES) as pool:
poo... | 17.448276 | 66 | 0.673913 |
c778ca622270d9003f2e559ba8c5866b63200190 | 2,802 | py | Python | bigbench/benchmark_tasks/cycled_letters/task.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | 460 | 2021-01-26T21:23:37.000Z | 2022-03-31T15:55:10.000Z | bigbench/benchmark_tasks/cycled_letters/task.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | 475 | 2021-01-27T01:29:01.000Z | 2022-03-30T20:23:56.000Z | bigbench/benchmark_tasks/cycled_letters/task.py | dimmollo/BIG-bench | f0dffeb4f16ef5489686a81e2d63362d251cda3e | [
"Apache-2.0"
] | 305 | 2021-01-26T23:28:11.000Z | 2022-03-31T14:51:26.000Z | # Copyright 2021 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, so... | 34.170732 | 115 | 0.635617 |
c7b7b12eb53db93aa3d727f60687a7ec968ff9ee | 2,599 | pyde | Python | sketches/graphingtoolmaster2/graphingtoolmaster2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/graphingtoolmaster2/graphingtoolmaster2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/graphingtoolmaster2/graphingtoolmaster2.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | # Processing(.py) Graphing Tool
# Inspired from »Visualizing Data« (Ben Fry) and
# »Math Adventures with Python« (Peter Farrell)
import math
WIDTH = 720
HEIGHT = 450
dt = 0.05
# Zeichenbereich
plot_x1 = 120
plot_x2 = WIDTH - 80 # WIDTH - plot_x1
label_x = 50
plot_y1 = 60
plot_y2 = HEIGHT - plot_y1
label_y = HEIGHT ... | 24.752381 | 63 | 0.597922 |
c7ce1486329dc8c73deb6612c97c669c8b70e6e5 | 605 | py | Python | nachmittags/blatt1_primes.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | 1 | 2019-09-27T13:47:20.000Z | 2019-09-27T13:47:20.000Z | nachmittags/blatt1_primes.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | nachmittags/blatt1_primes.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | correctNumber = False
while not correctNumber:
try:
userNumber = int(input("Geb mir eine Zahl:\n"))
correctNumber = True
except ValueError:
print("Gib das nächste Mal bitte eine Zahl ein.")
if userNumber > 1:
for number in range(2, userNumber):
isPrim = True
for sma... | 28.809524 | 64 | 0.606612 |
40f4c3913b09593a26c18f8935df2d5b8e340767 | 1,084 | py | Python | tests/onegov/onboarding/test_assistant.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/onboarding/test_assistant.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | tests/onegov/onboarding/test_assistant.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.onboarding.models import Assistant
def test_assistant():
class FooAssistant(Assistant):
@Assistant.step()
def first_step(self, request):
return {'step': 1}
@Assistant.step()
def second_step(self, request):
return {'step': 2}
@Assistan... | 29.297297 | 66 | 0.641144 |
90fdb539f81ffc9cacf38d06d8e3393fdeb42ac6 | 12,274 | py | Python | Templates/Integrations/DataEnrichmentThreatIntelligence/DataEnrichmentThreatIntelligence.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Templates/Integrations/DataEnrichmentThreatIntelligence/DataEnrichmentThreatIntelligence.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Templates/Integrations/DataEnrichmentThreatIntelligence/DataEnrichmentThreatIntelligence.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
from CommonServerUserPython import *
import demistomock as demisto
''' IMPORTS '''
from typing import Dict, Tuple, Optional, List, Union
import urllib3
# Disable insecure warnings
urllib3.disable_warnings()
"""GLOBALS/PARAMS
Attributes:
INTEGRATION_NAME:
Name of the integ... | 32.470899 | 104 | 0.621232 |
468c02d46d1763744796ab9b79ec2c31e7a76552 | 5,248 | py | Python | Lab_02/List.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | Lab_02/List.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | Lab_02/List.py | SadequrRahman/advance-SoC | 35da93adfcdb1b4ec740cb44ffc54d9c8cc7adc4 | [
"BSD-4-Clause-UC"
] | null | null | null | #
# Copyright (C) 2019 Mohammad Sadequr Rahman <mohammad.rahman@tuhh.de>
#
# This file is part of Advance SoC Design Lab Soultion.
#
# SoC Design Lab Soultion can not be copied and/or distributed without the express
# permission of Mohammad Sadequr Rahman
#
# File: List.py
#
from pymtl3 import *
from math import ce... | 26.77551 | 82 | 0.536204 |
315d2ccf5283446d14f2f358cb1e8f332c9b4be7 | 2,008 | py | Python | tests/test_rq/test_golden_cross_M.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | null | null | null | tests/test_rq/test_golden_cross_M.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | null | null | null | tests/test_rq/test_golden_cross_M.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | 1 | 2021-11-24T18:59:12.000Z | 2021-11-24T18:59:12.000Z | import talib
from rqalpha import run
from rqalpha.api import *
# 在这个方法中编写任何的初始化逻辑。context对象将会在你的算法策略的任何方法之间做传递。
def init(context):
context.s1 = "000001.SZ"
# 设置这个策略当中会用到的参数,在策略中可以随时调用,这个策略使用长短均线,我们在这里设定长线和短线的区间,在调试寻找最佳区间的时候只需要在这里进行数值改动
# context.SHORTPERIOD = 20
# context.LONGPERIOD = 120
context... | 32.387097 | 109 | 0.703187 |
7323c64ea5a8444189745fe4279249ba7ee3d5e0 | 2,806 | py | Python | examples/time_series/tcn/train.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/time_series/tcn/train.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/time_series/tcn/train.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 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... | 35.974359 | 168 | 0.685674 |
733f1a916460e4c207e718d41ef747c72b6346e2 | 1,447 | py | Python | CodeChef_problems/REPLESX/Solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | CodeChef_problems/REPLESX/Solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | CodeChef_problems/REPLESX/Solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z |
# cook your dish here
try:
t=int(input())
for _ in range(t):
n,x,p,k=list(map(int,input().split()))
arr=list(map(int,input().split()))
arr.sort() #Sorting the list in ascending order as given in question that, k-th smallest number in an array is the k-th number from the left when the... | 49.896552 | 201 | 0.572909 |
81fe6d2ed904bdfab181e565317adc4399ef956b | 224 | py | Python | exercises/en/solution_03_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/en/solution_03_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/en/solution_03_03.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# Load the en_core_web_sm model
nlp = spacy.load("en_core_web_sm")
# Print the names of the pipeline components
print(nlp.pipe_names)
# Print the full pipeline of (name, component) tuples
print(nlp.pipeline)
| 20.363636 | 53 | 0.776786 |
c3254c3d9733844316af1cc3b6ab7ba29cd5faea | 906 | pyde | Python | sketches/ifs01/ifs01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/ifs01/ifs01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/ifs01/ifs01.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | # Parameter
a = [0.0, 0.197, -0.155, 0.849]
b = [0.0, -0.226, 0.283, 0.037]
c = [0.0, 0.226, 0.26, -0.037]
d = [0.16, 0.197, 0.237, 0.849]
e = [0.0, 0.0, 0.0, 0.0]
# f = [0.0, 1.6, 0.14, 1.6]
f = [0.0, 1.6, 0.44, 1.6]
# Zufallsverteilung
# p = [0.03, 0.14, 0.27, 1.0]
p = [0.074, 0.08, 0.09, 1.0]
def setup():
globa... | 19.276596 | 35 | 0.426049 |
6f143adb8270868058f31c4b795c47f5283a3df5 | 1,067 | py | Python | tag_1/p_2_6_handlungsanweisung.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_1/p_2_6_handlungsanweisung.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | tag_1/p_2_6_handlungsanweisung.py | techrabbit58/uebung_informatik_vorkurs | e99312ae66ccccd6bfe45bfd3c3f43c01690659c | [
"Unlicense"
] | null | null | null | """
2 If-Abfragen (Tag 1)
2.6 Die Firma "It Wasn't Me" hat folgende Anweisung an ihre Mitarbeiter ausgegeben:
(vgl. das Diagramm p_2_6_handlungsanweisung.puml/.png)
Erstelle ein Computerprogramm anhand des Ablaufplans.
"""
from hilfprogramme import yes_no_input
if __name__ == '__main__':
print('H A N D L U... | 39.518519 | 90 | 0.582006 |
d2bda86f834793b354c1039153957ff36e6b6092 | 6,151 | py | Python | parkhaeuser/parkhaeuser.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | parkhaeuser/parkhaeuser.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | parkhaeuser/parkhaeuser.py | cfleschhut/virushack | 2fe7ded0be8672b066edef7fed52573794db2ba5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 21 15:58:56 2020
@author: Peter
"""
import requests
import re
import json
import time
import boto3
from datetime import datetime
from bs4 import BeautifulSoup
from selenium import webdriver
date = datetime.now()
s3_client = boto3.client('s3')
results =... | 38.204969 | 158 | 0.622988 |
961f00995038b289287a831e8ad9fa59b8629ca7 | 734 | py | Python | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/InstancesCheck_FailedCategories/InstancesCheck_FailedCategories_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/InstancesCheck_FailedCategories/InstancesCheck_FailedCategories_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/IntegrationsAndIncidentsHealthCheck/Scripts/InstancesCheck_FailedCategories/InstancesCheck_FailedCategories_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
import demistomock as demisto
from InstancesCheck_FailedCategories import main, random
from test_data.constants import INCIDENTS_RESULTS, INCIDENTS_RESULTS_EXPECTED, INCIDENTS_RESULTS_NO_FAILED, \
INCIDENTS_RESULTS_NO_FAILED_EXPECTED
@pytest.mark.parametrize('list_, expected', [
(INCIDENTS_RESUL... | 34.952381 | 109 | 0.792916 |
82e330ae13a8f85c18c5b164635c01576c42c54e | 573 | py | Python | exercises/pt/test_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/pt/test_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/pt/test_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert "spacy.load" in __solution__, "Você está usando spacy.load?"
assert nlp.meta["lang"] == "en", "Você está carregando o modelo correto?"
assert nlp.meta["name"] == "core_web_sm", "Você está carregando o modelo correto?"
assert "nlp(text)" in __solution__, "Você está processando o texto ... | 47.75 | 94 | 0.687609 |
7d64bb59d79307ca4a5c125954fc7f78bdb1f8c6 | 18,475 | py | Python | Projects/ATM machine.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 5 | 2020-10-02T00:24:37.000Z | 2020-10-07T04:37:34.000Z | Projects/ATM machine.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 61 | 2020-10-02T04:11:29.000Z | 2021-03-05T10:09:50.000Z | Projects/ATM machine.py | ankita080208/Hacktoberfest | 2be849e89285260e7b6672f42979943ad6bbec78 | [
"MIT"
] | 52 | 2020-10-02T04:45:45.000Z | 2021-01-20T21:34:38.000Z | print("""
* * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * *
* * * * * * * ... | 43.470588 | 163 | 0.537537 |
c4c0c19b6fc8aa2c860d1f4d2264e40e8959de25 | 12,009 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/onyx_snmp_users.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/onyx_snmp_users.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/onyx_snmp_users.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Copyright: Ansible Project
# 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__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | 43.197842 | 138 | 0.519277 |
f217661b947ef8085a4adc79b03468dfd82adf93 | 1,756 | py | Python | ciphey/basemods/Decoders/baudot.py | Marnick39/Ciphey | fc854ecf37b688832f25cdec094bcada739bfae3 | [
"MIT"
] | 2 | 2020-09-28T23:27:22.000Z | 2021-09-09T17:24:26.000Z | ciphey/basemods/Decoders/baudot.py | drpacket/Ciphey | b46e00c611ee4b5f5795e967a50b05a63cbb5ef0 | [
"MIT"
] | null | null | null | ciphey/basemods/Decoders/baudot.py | drpacket/Ciphey | b46e00c611ee4b5f5795e967a50b05a63cbb5ef0 | [
"MIT"
] | 1 | 2020-09-29T17:48:23.000Z | 2020-09-29T17:48:23.000Z | import re
from typing import Optional, Dict, List
from ciphey.iface import ParamSpec, Config, T, U, Decoder, registry, Translation
@registry.register_multi((str, str), (bytes, bytes))
class Baudot(Decoder[str, str]):
def decode(self, ctext: T) -> Optional[U]:
"""Write the code that decodes here
ct... | 30.275862 | 83 | 0.514237 |
b5000dd43fa7be0440358fbf9c883d7b6134caf9 | 99 | py | Python | Python/fibonacci series.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 81 | 2021-10-01T13:19:13.000Z | 2021-10-06T08:43:35.000Z | Python/fibonacci series.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 67 | 2021-10-01T13:43:46.000Z | 2021-10-06T13:55:49.000Z | Python/fibonacci series.py | saurabhpal007/hacktoberfest2021-1 | 5abad37ab426a7b34fc7bcd98ded885fd6ce02ef | [
"CC0-1.0"
] | 394 | 2021-10-01T11:55:24.000Z | 2021-10-06T13:45:57.000Z | f=open("country.txt",'r')
r=f.readlines()
n=len(r)
if r[0]=='W':
print("w or W:",n)
| 14.142857 | 26 | 0.474747 |
d241f6191139f4aaa6f57909909fa30a6e72acca | 2,279 | py | Python | minify.py | thahnen/labelbox-export-minifier | df83effaa8923d4f75997b76898e8b34ebea55ce | [
"MIT"
] | null | null | null | minify.py | thahnen/labelbox-export-minifier | df83effaa8923d4f75997b76898e8b34ebea55ce | [
"MIT"
] | null | null | null | minify.py | thahnen/labelbox-export-minifier | df83effaa8923d4f75997b76898e8b34ebea55ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import sys
import json
def minify(path :str) -> int:
# Die Elemente, die wir behalten wollen:
labels = ["Label", "Project Name", "External ID"]
if os.path.isdir(path):
files = [
path+n for n in os.listdir(path) if (
... | 30.386667 | 120 | 0.519526 |
d279994ddfdc4501c1aaa350b145b58cf34e2cc6 | 13,552 | py | Python | Contrib-Inspur/openbmc/poky/meta/lib/oeqa/selftest/context.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 5 | 2019-11-11T07:57:26.000Z | 2022-03-28T08:26:53.000Z | Contrib-Inspur/openbmc/poky/meta/lib/oeqa/selftest/context.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 3 | 2019-09-05T21:47:07.000Z | 2019-09-17T18:10:45.000Z | Contrib-Inspur/openbmc/poky/meta/lib/oeqa/selftest/context.py | opencomputeproject/Rack-Manager | e1a61d3eeeba0ff655fe9c1301e8b510d9b2122a | [
"MIT"
] | 11 | 2019-07-20T00:16:32.000Z | 2022-01-11T14:17:48.000Z | #
# Copyright (C) 2017 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
import os
import time
import glob
import sys
import importlib
import signal
from shutil import copyfile
from random import choice
import oeqa
import oe
from oeqa.core.context import OETestContext, OETestContextExecutor
from oeqa.core.excepti... | 41.956656 | 148 | 0.591942 |
fb4463198a1c92afac0c41f1b56a6c3577670a28 | 19,558 | py | Python | GetAksesToken.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | GetAksesToken.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | GetAksesToken.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import marshal
#Udah Gw Bilang Jangan DiUnConpile Kontol
#facebook.com/lontong991 By Risky
exec(marshal.loads(b'\xe3\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00@\x00\x00\x00s\xb2\x00\x00\x00d\x00d\x01l\x00Z\x00d\x00d\x01l\x01Z\x01d\x00d\x01l\x02Z\x02d\x00d\x01l\x03Z\x03d\x00d\x01l\x0... | 3,911.6 | 19,466 | 0.720984 |
7908280647d27b78811c8534d7906da5a4299fad | 2,312 | py | Python | official/gnn/gat/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/gnn/gat/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/gnn/gat/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 44.461538 | 103 | 0.645329 |
e3f1f30027f2a5b98bb249a186643071f08a627c | 1,685 | py | Python | python/oneflow/nn/modules/permute.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/permute.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/permute.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"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.083333 | 80 | 0.661721 |
5411ff70a14d7e5d17d0247444bc1bff2a96bea3 | 824 | py | Python | chapter_four/fib_calc_package/tests/flitton_fib_py/fib_calcs/test_fib_numbers.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | 21 | 2021-09-10T12:46:26.000Z | 2022-03-23T02:50:39.000Z | chapter_four/fib_calc_package/tests/flitton_fib_py/fib_calcs/test_fib_numbers.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | null | null | null | chapter_four/fib_calc_package/tests/flitton_fib_py/fib_calcs/test_fib_numbers.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | 6 | 2021-09-02T08:32:37.000Z | 2022-03-17T21:15:25.000Z | from unittest import main, TestCase
from unittest.mock import patch, MagicMock, PropertyMock
from flitton_fib_py.fib_calcs.fib_numbers import calculate_numbers
class Test(TestCase):
def setUp(self) -> None:
pass
def tearDown(self) -> None:
pass
@patch("flitton_fib_py.fib_calcs.fib_numb... | 30.518519 | 83 | 0.726942 |
58a50b4a4ce3b7656d685a731b8e10cfd2e21ac6 | 2,479 | py | Python | app/recipe/tests/test_tags_api.py | Sahinovic/Kuhar | b01cef5f6f0013196d96c8b71f3cf39a8cc149de | [
"MIT"
] | null | null | null | app/recipe/tests/test_tags_api.py | Sahinovic/Kuhar | b01cef5f6f0013196d96c8b71f3cf39a8cc149de | [
"MIT"
] | null | null | null | app/recipe/tests/test_tags_api.py | Sahinovic/Kuhar | b01cef5f6f0013196d96c8b71f3cf39a8cc149de | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag
from recipe.serializers import TagSerializer
TAGS_URL = reverse('recipe:tag-list')
class PublicTagAPiTe... | 34.915493 | 73 | 0.646228 |
49e4a39a58a282e39e766b3593249c9dedb8a347 | 2,950 | py | Python | backend/cctalk/holder.py | bytebang/ppvm | 07a0650c618b9dd6abc7563070a80c132034f532 | [
"MIT"
] | null | null | null | backend/cctalk/holder.py | bytebang/ppvm | 07a0650c618b9dd6abc7563070a80c132034f532 | [
"MIT"
] | null | null | null | backend/cctalk/holder.py | bytebang/ppvm | 07a0650c618b9dd6abc7563070a80c132034f532 | [
"MIT"
] | null | null | null | """ Provides Holder class defintion for general use.
Module content
--------------
"""
# The python-cctalk package allows one to send ccTalk messages and decode replies from a coin validator.
license_text = "(C) 2011 David Schryer GNU GPLv3 or later."
__copyright__ = license_text
__autodoc__ = ['Holder']
__all__ = _... | 25.652174 | 105 | 0.551864 |
3fdcfefc7619cac7976ce5abb5d6745e8170a4db | 10,069 | py | Python | Integrations/python/deephaven/TableManagementTools/__init__.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | Integrations/python/deephaven/TableManagementTools/__init__.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null | Integrations/python/deephaven/TableManagementTools/__init__.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | null | null | null |
"""
Tools for managing and manipulating tables on disk.
Most users will need TableTools and not TableManagementTools.
"""
#
# Copyright (c) 2016-2021 Deephaven Data Labs and Patent Pending
#
##############################################################################
# This code is auto generated.... | 37.154982 | 143 | 0.702652 |
b7509c6c018afd5f91d7e7a5853e5cd8e4505043 | 597 | py | Python | Interview Preparation Kits/Interview Preparation Kit/Dictionaries and Hashmaps/Sherlock and Anagrams/sherlock_anagrams2.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | 1 | 2021-02-22T17:37:45.000Z | 2021-02-22T17:37:45.000Z | Interview Preparation Kits/Interview Preparation Kit/Dictionaries and Hashmaps/Sherlock and Anagrams/sherlock_anagrams2.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | Interview Preparation Kits/Interview Preparation Kit/Dictionaries and Hashmaps/Sherlock and Anagrams/sherlock_anagrams2.py | xuedong/hacker-rank | ce8a60f80c2c6935b427f9409d7e826ee0d26a89 | [
"MIT"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
from collections import Counter
# Complete the sherlockAndAnagrams function below.
def sherlockAndAnagrams(s):
count = Counter(("".join(sorted(s[j:j+i])) for i in range(1,len(s)) for j in range(0,len(s)-i+1)))
return sum(sum(range(i)) for... | 19.9 | 102 | 0.633166 |
4d5b80cb39053d31370f052dcc59ba473d3d80a6 | 251 | py | Python | PRA/posprocess.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 10 | 2020-12-08T20:18:15.000Z | 2021-06-07T20:00:07.000Z | PRA/posprocess.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-06-28T03:42:13.000Z | 2021-06-28T16:53:13.000Z | PRA/posprocess.py | joao-frohlich/BCC | 9ed74eb6d921d1280f48680677a2140c5383368d | [
"Apache-2.0"
] | 2 | 2021-01-14T19:59:20.000Z | 2021-06-15T11:53:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
arq = open("data_sorted.txt", "r")
fim = open("data.txt", "w+")
t = []
sep = ";"
cont = 1
for line in arq:
t = line.split(";")
t[0] = str(cont).zfill(18)
cont += 69
fim.write(sep.join(t))
| 17.928571 | 34 | 0.521912 |
35fa583eea33d596c232c398c8c1fd90a9530d81 | 1,847 | py | Python | marsyas-vamp/marsyas/src/apps/openmir/omTrainClassifier.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/apps/openmir/omTrainClassifier.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/apps/openmir/omTrainClassifier.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
#
#
import sys
import os
import datetime
import commands
import re
import time
import simplejson as json
from optparse import OptionParser
def run(inJsonFilename):
inJson = open(inJsonFilename).read()
data = json.loads(inJson)
# Add a name for the output file that will be generated
... | 26.014085 | 103 | 0.619383 |
676480fa0554a4b781f0bfcb8d07c4a4880ad889 | 682 | py | Python | backend/apps/iamstudent/urls.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/iamstudent/urls.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/iamstudent/urls.py | match4healthcare/match4healthcare | acf69e3b781d715f0a947c2a9df6646e94f1ca6b | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
# path('student_registration', views.get_student, name='student_registration'),
path("thanks", views.thx, name="thanks"),
# path('send_mail_student', views.send_mail_student, name='send_mail_student'),
path("successful_mail", views.succe... | 37.888889 | 117 | 0.709677 |
db1a2182b6d3c348e850200503e1520f87fce336 | 2,394 | py | Python | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/comments/__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/python/pyplugs/comments/__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/python/pyplugs/comments/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | import os
from functools import partial
from lcdoc.mkdocs.lp.plugs import python
from lcdoc.mkdocs.tools import add_post_page_func, script
config, page, Session = (python.config, python.page, python.Session)
dflts_comments = {
# :docs:comments_defaults
'theme': 'github-dark', # "github-light" "github-dark"... | 32.351351 | 155 | 0.645781 |
db21c1db7c52d8761681bf6041feb99b8746654d | 6,083 | py | Python | apps/projects/models.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 2 | 2018-05-18T08:38:29.000Z | 2018-05-22T08:26:09.000Z | apps/projects/models.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 118 | 2017-10-31T13:45:09.000Z | 2018-02-24T20:51:42.000Z | apps/projects/models.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | null | null | null | import os
from django.db import models
from django.conf import settings
from django.utils.translation import gettext_lazy as _
from django.shortcuts import reverse
from django.utils.encoding import iri_to_uri
from enum import Enum
from django.db.models.signals import post_save
from django.dispatch import receiver
from ... | 40.019737 | 120 | 0.709847 |
c000f1bd3f8a24e8d0211ceeacb4537af51b348c | 458 | py | Python | UAS/UAS 9/Main.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 9/Main.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | UAS/UAS 9/Main.py | Archedar/UAS | 3237d9304026340acc93c8f36b358578dc0ae66f | [
"BSD-Source-Code"
] | null | null | null | #Main program
from Class import Mahasiswa
mahasiswa = list()
jumlah = int(input('Jumlah Mahasiswa: '))
for i in range(jumlah):
nama = input('Nama: ')
kehadiran = int(input('Nilai Kehadiran: '))
tugas = int(input('Nilai Tugas: '))
uts = int(input('Nilai UTS: '))
uas = int(input('Nilai UAS: '))
maha... | 25.444444 | 63 | 0.659389 |
fbec516e6b9ea13ca2c2e31babccb40cce9b41f9 | 8,050 | py | Python | Properties/API/O.O/objectO/ClassMetrics.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/API/O.O/objectO/ClassMetrics.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | Properties/API/O.O/objectO/ClassMetrics.py | NazaninBayati/SCA | 74e670462dd0da5e24147aab86df393b38405176 | [
"MIT"
] | null | null | null | import understand
import MainMetrics
lis={}
class_dependency={}
class_dependentby={}
db = MainMetrics.Metrics.DBlodb("/home/nazanin/cephDB.udb")
class classMetrics(MainMetrics.Metrics):
def used_classes(self,db):
self.db = db
for cls in sorted(db.ents("Class")):
if str(cls.name()) not ... | 43.75 | 740 | 0.550062 |
58e02bce5e1edc95049728a3aded04fea368be6e | 3,696 | py | Python | scrapers/scrape_lu.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_lu.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | null | null | null | scrapers/scrape_lu.py | AryaVashisht/covid_19 | 0c734615a1190a5b2fff4697f47731ef2b8b6918 | [
"CC-BY-4.0"
] | 1 | 2020-08-25T06:45:56.000Z | 2020-08-25T06:45:56.000Z | #!/usr/bin/env python3
import re
import datetime
from bs4 import BeautifulSoup
import scrape_common as sc
url = 'https://gesundheit.lu.ch/themen/Humanmedizin/Infektionskrankheiten/Coronavirus'
d = sc.download(url, silent=True)
d = d.replace(' ', ' ')
# 2020-04-01
"""
<p><strong>Aktuelle Fallzahlen im Kanton Luz... | 30.8 | 112 | 0.52895 |
36aa588a2eb27d9f54843bc86ad1796c4df183cc | 1,307 | py | Python | StoryTellingGame/util/oop.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | StoryTellingGame/util/oop.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | StoryTellingGame/util/oop.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | from typing import Type, Callable, Any, Dict, Tuple, Union
from util.flask_utils_types import Function
T = Type['CtorArgs'] # class type
R = Type['R'] # return type
Extender = Union[Callable[[T, Any], R], callable]
Overrider = Union[Callable[[Callable[[Any], R], T, Any], R], callable]
def extend(klass):... | 30.395349 | 97 | 0.627391 |
3d15bbc7317733f90614a674780107165a56ff78 | 1,708 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v10_0/migrate_daily_work_summary_settings_to_daily_work_summary_group.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/migrate_daily_work_summary_settings_to_daily_work_summary_group.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v10_0/migrate_daily_work_summary_settings_to_daily_work_summary_group.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2018, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("hr", "doctype", "daily_work_summary_group")
frappe.reload_doc("hr", "doctype", "daily_work_summary_group_user")
# check i... | 34.16 | 93 | 0.744145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.