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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d05dc05c355506eb06c63becc424e78f5ce03408 | 882 | py | Python | SoSe-21/Uebung-8/A1-Wordcount.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Uebung-8/A1-Wordcount.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Uebung-8/A1-Wordcount.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Initialisieren der Variablen
word_count = 0
char_count = 0
# Eingabe des Nutzers empfangen
nutzereingabe = input("Bitte geben Sie einen Satz ein: ")
# Aufteilen der Nutzereingabe mithilfe von split()
split_string = nutzereingabe.split(" ")
# Zählen der Wörter mithilfe von len()
word_count = len(split_string)
# Zä... | 36.75 | 119 | 0.780045 |
ef3ed827adc5f860aa02495dfba75c868dac8225 | 699 | py | Python | Uebung3/Uebung3_Aufgabe9.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-18T19:10:06.000Z | 2018-04-18T19:10:06.000Z | Uebung3/Uebung3_Aufgabe9.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | null | null | null | Uebung3/Uebung3_Aufgabe9.py | B0mM3L6000/EiP | f68718f95a2d3cde8ead62b6134ac1b5068881a5 | [
"MIT"
] | 1 | 2018-04-29T08:48:00.000Z | 2018-04-29T08:48:00.000Z | n = int(input("Welche Zahl soll zerlegt werden?"))
p = 2
ende = False
if n == 1:
ende = True
print("1", end='')
while ende == False:
if (n-p) == 0:
ende = True
print("*",p)
break
if n%p == 0:
print("*",p, end='')
n = n//p
else:
p = p+1
"""
Aufgabe... | 16.642857 | 81 | 0.570815 |
ef67c46b84e50947b4d1bf30ecb52e66f1877253 | 2,451 | py | Python | project/api/organization/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/api/organization/schemas.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/api/organization/schemas.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from marshmallow import fields, post_dump
from project.access import has_access, login_api_user
from project.api import marshmallow
from project.api.image.schemas import ImageDumpSchema, ImageSchema
from project.api.location.schemas import LocationDumpSchema, LocationSchema
from project.api.schemas import (
IdSche... | 29.53012 | 78 | 0.762546 |
328da6c8720d7e26f36ab0f35e3cbf0753a1a35a | 1,884 | py | Python | SOP/06/uebung.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | SOP/06/uebung.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | SOP/06/uebung.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | import random
from collections import defaultdict
print()
# Uebung 1
spielkugeln = frozenset(range(1,50))
# Uebung 2
kugeln_in_trommel = set(spielkugeln)
kugeln_in_ablage = set(())
# Uebung 3
for i in random.sample(range(1,50),6):
kugeln_in_trommel.remove(i)
kugeln_in_ablage.add(i)
# print("Verbleibende Kugeln"... | 26.166667 | 76 | 0.658174 |
32b860f8a35b6facbcaa960e726f510478c176c8 | 810 | py | Python | python/DeepLearning/lesson1/week4/mytest/get_data.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 1 | 2019-05-22T07:12:34.000Z | 2019-05-22T07:12:34.000Z | python/DeepLearning/lesson1/week4/mytest/get_data.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | 3 | 2021-12-10T01:13:54.000Z | 2021-12-14T21:18:42.000Z | python/DeepLearning/lesson1/week4/mytest/get_data.py | TimVan1596/ACM-ICPC | 07f7d728db1ecd09c5a3d0f05521930b14eb9883 | [
"Apache-2.0"
] | null | null | null | # 用于获取数据
import random
import math
# 获得数据
# num = 样本数量
def get_number(num):
X = [
[],
[],
[]
]
Y = []
i = 0
for i in range(num):
x = random.randint(0, 50)
y = random.randint(0, 100)
z = random.randint(0, 100)
temp = math.pow(x, 2) + y - 10 * ... | 19.285714 | 42 | 0.419753 |
de5ca491a6193427d4a7d51cdac27be71d2b5770 | 321 | py | Python | A1/app.py | gucervus/Flask | 6b7fcdbdf2787a7fe7bf063fc252e4f336afd806 | [
"MIT"
] | null | null | null | A1/app.py | gucervus/Flask | 6b7fcdbdf2787a7fe7bf063fc252e4f336afd806 | [
"MIT"
] | null | null | null | A1/app.py | gucervus/Flask | 6b7fcdbdf2787a7fe7bf063fc252e4f336afd806 | [
"MIT"
] | null | null | null | # Import padrão do flask
from flask import Flask
# Inicializador padrão do Flask
app = Flask(__name__)
#Criação da rota, metodo de requisã via postman
@app.route("/<number>", methods = ['GET','POST'])
def Hellow(number):
return 'Hellow Flask. {}'.format(number)
if __name__ == "__main__":
app.run(debug = True... | 29.181818 | 49 | 0.697819 |
a0ad9b78594cac872a3ac06cf546b8fafbaad128 | 303 | py | Python | moviemon/classes/players.test.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | null | null | null | moviemon/classes/players.test.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | null | null | null | moviemon/classes/players.test.py | 42bbichero/MovieMon | 4fee28e0449429ffcd3e0a284365a7f3e7c64e3d | [
"MIT"
] | 1 | 2019-01-12T10:42:25.000Z | 2019-01-12T10:42:25.000Z |
from players import Players
test = Players()
print(test.get_strength())
print(test.get_movieball())
test.strength_up()
test.strength_up()
test.strength_up()
test.movieballs_up()
test.movieballs_up()
test.movieballs_up()
test.movieballs_down()
print(test.get_strength())
print(test.get_movieball())
| 15.947368 | 27 | 0.778878 |
f8282625cca96ae64585995ebde15861e8b2c80d | 2,307 | py | Python | velocity-master/velocity/velocity.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | velocity-master/velocity/velocity.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | velocity-master/velocity/velocity.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 sys
import json
import socket
import _socket
dns_cache = {} # contains {hostname : ip} entries
addr_cache = {} # contains socket.getaddrinfo's cached responses
cwd = sys.path[0]
dns_path = cwd + '/dns_cache.json'
addr_path = cwd + '/addr_cache.json'
def read_file(path):
"""Reads a given file, returns st... | 26.215909 | 65 | 0.656264 |
3e81992eb5f089d4f13903f06a2b73ce6f20c15e | 404 | py | Python | src/onegov/gazette/collections/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/collections/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/gazette/collections/__init__.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.gazette.collections.categories import CategoryCollection
from onegov.gazette.collections.issues import IssueCollection
from onegov.gazette.collections.notices import GazetteNoticeCollection
from onegov.gazette.collections.organizations import OrganizationCollection
__all__ = [
'CategoryCollection',
... | 31.076923 | 75 | 0.829208 |
842e92a81d344b2773b9e09a6c1a72079945c10b | 204 | py | Python | main.py | rich-frost/nflex-widget | 53ce4c930fa50efef80cc5ff134dbc7cad07abb8 | [
"MIT"
] | null | null | null | main.py | rich-frost/nflex-widget | 53ce4c930fa50efef80cc5ff134dbc7cad07abb8 | [
"MIT"
] | null | null | null | main.py | rich-frost/nflex-widget | 53ce4c930fa50efef80cc5ff134dbc7cad07abb8 | [
"MIT"
] | null | null | null | def get(event, context):
print 'hello test'
return {
'html': '<img class="max-width" src="https://www.headforwards.com/wp-content/themes/head-forwards/images/bg/looe-1.jpg"/>'
};
pass
| 29.142857 | 126 | 0.642157 |
f2b28c89ea6867d17e31c5ec8a7c0620a2d6d570 | 1,074 | py | Python | main.py | ryuzakyl/tf_idf | 48adffa994516df6b6321641915252e3bc2e2dfe | [
"MIT"
] | null | null | null | main.py | ryuzakyl/tf_idf | 48adffa994516df6b6321641915252e3bc2e2dfe | [
"MIT"
] | null | null | null | main.py | ryuzakyl/tf_idf | 48adffa994516df6b6321641915252e3bc2e2dfe | [
"MIT"
] | null | null | null | import os
import pickle
from tf_idf.managers import MoviesDatasetManager
# ------------------------------------------------------------
DATASET_REL_PATH = f"{os.path.dirname(__file__)}/rs-cour-dataset"
DATASET_ABS_PATH = os.path.abspath(DATASET_REL_PATH)
DATASET_OUTPUT_PATH = f"{os.path.dirname(__file__)}/model/tfi... | 32.545455 | 76 | 0.615456 |
d9fa45d49bb7ced641b8cb9253d58ca27b96b0b7 | 7,023 | py | Python | src/Sephrasto/CharakterAttributeWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/CharakterAttributeWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | src/Sephrasto/CharakterAttributeWrapper.py | qeqar/Sephrasto | ce46d46299b2c793f015e25c98908773c39b1dee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Mar 10 17:21:49 2017
@author: Lennart
"""
from Wolke import Wolke
import UI.CharakterAttribute
from PyQt5 import QtWidgets, QtCore
import logging
import copy
class AttrWrapper(QtCore.QObject):
'''
Wrapper class for the Attribute setting GUI. Contains methods for upd... | 43.621118 | 125 | 0.647444 |
0a8b24b640abbd39ce33653ac26f8d00a0b9dc99 | 1,080 | py | Python | exercises/de/test_04_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/de/test_04_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/de/test_04_11.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | def test():
assert [(ent.text, ent.label_) for ent in doc1.ents] == [
("amsterdem", "LOC")
], "Überprüfe nochmal die Enitäten im ersten Beispiel."
assert [(ent.text, ent.label_) for ent in doc2.ents] == [
("Paris", "LOC")
], "Überprüfe nochmal die Enitäten im zweiten Beispiel."
asser... | 45 | 79 | 0.637963 |
7c55229d52856408ec8fc2381471e790c2e88802 | 727 | py | Python | Get Retroativo/2016_03_2.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 6 | 2019-10-18T17:47:30.000Z | 2021-03-18T06:04:06.000Z | Get Retroativo/2016_03_2.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 1 | 2020-09-24T08:17:29.000Z | 2020-09-28T08:16:39.000Z | Get Retroativo/2016_03_2.py | paulowiz/AiesecBot | ac77cc5426ed6382772603afa8015208020c0fba | [
"MIT"
] | 3 | 2019-10-20T18:40:20.000Z | 2021-04-15T01:27:59.000Z | import psycopg2.extras
from controller import RobotRotine as rr
from api import graphqlconsume, querygraphql
import time
import datetime
import numpy as np
"""
current = np.datetime64(datetime.datetime.now())
currentab = np.datetime64(current) + np.timedelta64(5, 'h')
lastdate = np.datetime64(currentab) - np.timedelta6... | 25.964286 | 61 | 0.69326 |
7cfc2f719195f981719244ba478e2ac5b340dccd | 3,928 | py | Python | tests/rbac/common/task/propose_owner_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 75 | 2018-04-06T09:13:34.000Z | 2020-05-18T18:59:47.000Z | tests/rbac/common/task/propose_owner_tests.py | fthornton67/sawtooth-next-directory | 79479afb8d234911c56379bb1d8abf11f28ef86d | [
"Apache-2.0"
] | 989 | 2018-04-18T21:01:56.000Z | 2019-10-23T15:37:09.000Z | tests/rbac/common/task/propose_owner_tests.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 ... | 32.46281 | 88 | 0.701884 |
8130aa4b86b0db01183a3bbd8cbfd6651260a9e0 | 4,010 | py | Python | Packs/CommonScripts/Scripts/ExtractDomainFromUrlFormat/ExtractDomainFromUrlFormat.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/ExtractDomainFromUrlFormat/ExtractDomainFromUrlFormat.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/ExtractDomainFromUrlFormat/ExtractDomainFromUrlFormat.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from tld import get_fld
from validate_email import validate_email
from urllib.parse import urlparse, parse_qs, unquote
import re
# ============================================================================================================== #
# This scrip... | 38.932039 | 116 | 0.633416 |
be0f3dfcc633f4edfa395073e2b41c9c8ae2a17f | 6,913 | py | Python | official/cv/cnn_direction_model/modelarts/train_modelart.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/cnn_direction_model/modelarts/train_modelart.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/cnn_direction_model/modelarts/train_modelart.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... | 37.166667 | 114 | 0.649935 |
71ed083490220ef3553af0841fc67198a8294892 | 918 | py | Python | {{ cookiecutter.project_slug }}/{{ cookiecutter.package_name }}/main.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 14 | 2021-03-27T22:18:56.000Z | 2022-03-21T19:04:48.000Z | {{ cookiecutter.project_slug }}/{{ cookiecutter.package_name }}/main.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | 33 | 2021-03-28T21:06:22.000Z | 2022-03-07T14:18:26.000Z | {{ cookiecutter.project_slug }}/{{ cookiecutter.package_name }}/main.py | Kludex/fastapi-template | 47256eb8f8c7439a4d669172d94ce84c62cdb25a | [
"MIT"
] | null | null | null | from fastapi import FastAPI
{%- if cookiecutter.add_cors == 'True' %}
from fastapi.middleware.cors import CORSMiddleware
{% endif %}
from {{cookiecutter.package_name}}.api import router
from {{cookiecutter.package_name}}.core.config import settings
def create_application() -> FastAPI:
{%- if cookiecutter.docstring =... | 27.818182 | 80 | 0.689542 |
13119da40230c943cc7811c3902ea7e595528b01 | 31,873 | py | Python | Packs/DevSecOps/Integrations/GitLab/GitLab.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/DevSecOps/Integrations/GitLab/GitLab.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/DevSecOps/Integrations/GitLab/GitLab.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import demistomock as demisto
import urllib3
from CommonServerPython import *
JOB_FIELDS_TO_EXTRACT = {'created_at', 'started_at', 'finished_at', 'duration', 'id', 'name', 'pipeline', 'ref',
'stage', 'web_url', 'status'}
PIPELINE_SCHEDULE_FIELDS_TO_EXTRACT = {'id', 'description', 'ref', 'next_... | 41.126452 | 123 | 0.666489 |
b913353196f9839f15f8e5f996426f9da72d5c0e | 426 | py | Python | IVTa/2014/GOLUBEV_A_S/task_1_44.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/GOLUBEV_A_S/task_1_44.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/GOLUBEV_A_S/task_1_44.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null |
# Задача 1. Вариант 44.
# Напишите программу, которая будет сообщать род деятельности и псевдоним под которым
# скрывается Александр Михайлович Гликберг. После вывода информации программа должна дожидаться
# пока пользователь нажмет Enter для выхода.
# Golubev A. S.
# 31.03.2016
print("Александр Михайлович Гликберг б... | 35.5 | 103 | 0.788732 |
b9c896a2704a3871555b3a9954aae9eb7af63534 | 7,040 | py | Python | Packs/CIRCL/Integrations/CIRCL/CIRCL.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CIRCL/Integrations/CIRCL/CIRCL.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CIRCL/Integrations/CIRCL/CIRCL.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
import requests
import json
# disable insecure warnings
requests.packages.urllib3.disable_warnings()
''' GLOBAL VARS '''
BASE_URL = demisto.getParam('url')
USERNAME = demisto.getParam('credentials')['identifier']
PASSW... | 25.507246 | 113 | 0.63267 |
6a08e682bc35e7cc57826c1a57ee824f1f0622c7 | 4,610 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/output/netdumpmean.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/output/netdumpmean.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/output/netdumpmean.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2008-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 36.587302 | 99 | 0.61128 |
6a1a8b3c3d4ff3cfcdaaf74e63d6f7873189dda2 | 133 | py | Python | src/assets/experiences/sortierroboter/Demo/solution.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | 1 | 2022-03-28T17:23:03.000Z | 2022-03-28T17:23:03.000Z | src/assets/experiences/sortierroboter/Demo/solution.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | null | null | null | src/assets/experiences/sortierroboter/Demo/solution.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | null | null | null | from sklearn import linear_model
# Erstellt eine Instanz von einem LinearRegression-Objekt.
model = linear_model.LinearRegression()
| 26.6 | 58 | 0.834586 |
163dd9bb14938cea14dd54870ac832b48cb69ee3 | 1,414 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/search.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/search.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch09_search_and_sort/intro/search.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
print([1, 2, 3, 2].index(2)) # => 1
print([i for i, value in enumerate([1, 2, 3, 2, 4, 2]) if value == 2]) # => [1, 3, 5]
print([1, 2, 3, 2, 4, 2].count(2)) # => 3
programmers = {"Michael": "Python",
"Tim": "C+... | 23.966102 | 86 | 0.570721 |
16ca8f2d3f9f64392c88c57758d5b15e06810085 | 1,865 | py | Python | rnn_2.py | charliezjw/Neural-Signal-Decoder | fb0df09ba0314724c7c90141bd47cc8fb0201b7a | [
"MIT"
] | null | null | null | rnn_2.py | charliezjw/Neural-Signal-Decoder | fb0df09ba0314724c7c90141bd47cc8fb0201b7a | [
"MIT"
] | null | null | null | rnn_2.py | charliezjw/Neural-Signal-Decoder | fb0df09ba0314724c7c90141bd47cc8fb0201b7a | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorflow.contrib import rnn
from pre_processing import *
X_test, y_test, X_train, y_train = get_all_data()
# TF input
x_in = tf.placeholder(tf.float32, [None, 22, 1000], name="input_x")
y_real = tf.placeholder(tf.int32, [None], name="real_y")
y_temp = tf.one_hot(y_re... | 37.3 | 95 | 0.691689 |
bcbdd4a3438d59ccf8eabd28421efc48245d7106 | 988 | py | Python | listings/chapter05/quicksort_with_counter.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | 2 | 2021-09-20T06:16:41.000Z | 2022-01-17T14:24:43.000Z | listings/chapter05/quicksort_with_counter.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | listings/chapter05/quicksort_with_counter.py | SaschaKersken/Daten-Prozessanalyse | 370f07a75b9465329deb3671adbfbef8483f76f6 | [
"Apache-2.0"
] | null | null | null | class Quicksorter:
def __init__(self):
self.counter = 0
def quicksort(self, unsorted):
# Teillisten
less = []
equal = []
greater = []
if len(unsorted) > 1:
# Vergleichselement (willkürlich)
pivot = unsorted[0]
for element in u... | 29.058824 | 73 | 0.510121 |
9137c8a35ef355b6293776c0b970f149832895da | 477 | py | Python | extension/excel/excel_config.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 1 | 2022-01-06T17:44:07.000Z | 2022-01-06T17:44:07.000Z | extension/excel/excel_config.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | 32 | 2021-09-24T23:50:09.000Z | 2022-03-29T09:37:26.000Z | extension/excel/excel_config.py | AldoMyrtaj/duckdb | 3aa4978a2ceab8df25e4b20c388bcd7629de73ed | [
"MIT"
] | null | null | null | import os
# list all include directories
include_directories = [os.path.sep.join(x.split('/')) for x in ['extension/excel/include', 'extension/excel/numformat/include']]
# source files
source_files = [os.path.sep.join(x.split('/')) for x in ['extension/excel/excel-extension.cpp']]
source_files += [os.path.sep.join(x.sp... | 68.142857 | 194 | 0.746331 |
e6f99f32b8c4367b78879422b8e6e852dd480770 | 4,704 | py | Python | haas_lib_bundles/python/docs/examples/auto_control_door/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/auto_control_door/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | haas_lib_bundles/python/docs/examples/auto_control_door/esp32/code/main.py | wstong999/AliOS-Things | 6554769cb5b797e28a30a4aa89b3f4cb2ef2f5d9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
'''
@File : main.py
@Author : zhangheng
@version : 1.0
@Description: 通过红外检测是否有人靠近,有人靠近则启动舵机执行开门操作,没人,则进行关门操作
board.json - 硬件资源配置文件,详情请参考:https://haas.iot.aliyun.com/haasapi/index.html#/Python/docs/zh-CN/haas_extended_api/driver/d... | 23.878173 | 142 | 0.582483 |
5dd228804e25fa3c43e42338e8cf7b0e6d3ee753 | 1,658 | py | Python | leetcode/065-Valid-Number/ValNum_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2017-05-18T06:11:02.000Z | 2017-05-18T06:11:02.000Z | leetcode/065-Valid-Number/ValNum_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/065-Valid-Number/ValNum_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
# @param s, a string
# @return a boolean
# @finite automation
def isNumber(self, s):
INVALID = 0;
SPACE = 1;
SIGN = 2;
DIGIT = 3;
DOT = 4;
EXPONENT = 5;
# 0invalid,1space,2sign,3digit,4dot,5exponent,6num_inputs
transitionTab... | 38.55814 | 86 | 0.379373 |
5dfaf9ad821509076a863cb215c0353c9423460b | 3,286 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/game/setup.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/game/setup.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/game/setup.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2008-2020 German Aerospace Center (DLR) and others.
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License 2.0 which is available at
# https://www.ec... | 35.717391 | 83 | 0.669203 |
b909f1313fc79b6c6f07b0827cc55b335b0601ab | 1,235 | py | Python | jiuzhang/Nine Chapters/4 Dynamic Programming I/py/WordBreak_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2017-05-18T06:11:02.000Z | 2017-05-18T06:11:02.000Z | jiuzhang/Nine Chapters/4 Dynamic Programming I/py/WordBreak_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | jiuzhang/Nine Chapters/4 Dynamic Programming I/py/WordBreak_002.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Faster than 001
# {Leetcode : AC, Lintcode : Runtime Error}
# Runtime Error due to limitation of Python Recursive Depth
class Solution(object):
def wordBreak(self, s, wordDict):
"""
:type s: str
:type wordDict: Set[str]
:rtype: bool
"""
if s == '' and wordDict == {... | 29.404762 | 72 | 0.452632 |
f8dc103b8b2096c5f6ab1b88793b8d8f048ce388 | 784 | py | Python | Plugins/CharakterAssistent/__init__.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 15 | 2017-11-09T12:49:52.000Z | 2022-03-06T12:18:48.000Z | Plugins/CharakterAssistent/__init__.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 40 | 2018-02-01T21:32:01.000Z | 2022-03-22T11:35:28.000Z | Plugins/CharakterAssistent/__init__.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 13 | 2018-03-12T17:50:42.000Z | 2022-03-06T12:21:41.000Z | from PyQt5 import QtWidgets, QtCore, QtGui
from EventBus import EventBus
from Wolke import Wolke
import tempfile
import pdf
import os
import re
import math
from Hilfsmethoden import Hilfsmethoden, WaffeneigenschaftException
import Objekte
from CharakterAssistent import Wizard
from CharakterAssistent import WizardWrappe... | 29.037037 | 82 | 0.737245 |
54d97e4ca4485f1cc966ca79ada9c2cacdb42f23 | 260 | py | Python | 0-notes/job-search/Cracking the Coding Interview/C07ObjectOrientedDesign/questions/7.6-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C07ObjectOrientedDesign/questions/7.6-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Cracking the Coding Interview/C07ObjectOrientedDesign/questions/7.6-question.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # 7.6 Jigsaw
# Implement an NxN jigsaw puzzle.
# Design the data structures and explain an algorithm to solve the puzzle.
# You can assume that you have a fitsWith method which, when passed 2 puzzle edges,
# returns true if the 2 edges belong together.
| 37.142857 | 84 | 0.75 |
0731d8aafa26643f34058a581cec4deeefa7ed3a | 507 | py | Python | Packs/DynamicSectionReports/Scripts/DisplayIndicatorReputationContent/DisplayIndicatorReputationContent.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/DynamicSectionReports/Scripts/DisplayIndicatorReputationContent/DisplayIndicatorReputationContent.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/DynamicSectionReports/Scripts/DisplayIndicatorReputationContent/DisplayIndicatorReputationContent.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
try:
scores = demisto.args()["cache"]["scores"]
except Exception:
demisto.results("No scores cached")
sys.exit(0)
md = ""
for k, v in scores.items():
md += v["content"]
md += "\r\n\r\n"
entry = {
'Type... | 20.28 | 49 | 0.633136 |
db8cfaf0c3b5900cb20d29225cbbdcf2dd74c005 | 171 | py | Python | Python/Sets/check_strict_superset.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Sets/check_strict_superset.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | Python/Sets/check_strict_superset.py | rho2/HackerRank | 4d9cdfcabeb20212db308d8e4f2ac1b8ebf7d266 | [
"MIT"
] | null | null | null | A = set(input().split())
for _ in range(int(input())):
B = set(input().split())
if(not A.issuperset(B)):
print(False)
break
else:
print(True) | 19 | 29 | 0.538012 |
531abecfc6a06833f91eb4dffc4873134feb17d9 | 22,330 | py | Python | tests/data/test_indexed_file.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 31 | 2018-01-05T22:49:33.000Z | 2022-02-02T10:30:23.000Z | tests/data/test_indexed_file.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 737 | 2017-12-11T17:42:11.000Z | 2022-03-29T22:42:52.000Z | tests/data/test_indexed_file.py | scottyellis/fence | 012ba76a58853169e9ee8e3f44a0dc510f4b2543 | [
"Apache-2.0"
] | 46 | 2018-02-23T09:04:23.000Z | 2022-02-09T18:29:51.000Z | """
Test fence.blueprints.data.indexd.IndexedFile
"""
from mock import patch
import pytest
from fence.blueprints.data.indexd import IndexedFile
from fence.errors import (
InternalError,
Unauthorized,
UnavailableError,
NotFound,
NotSupported,
)
def test_indexed_file_index_document_request_not_av... | 33.833333 | 108 | 0.58343 |
72c5d582e5d55724abb422a9532291ca68c43b7f | 473 | py | Python | sys/1/htparser.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | sys/1/htparser.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | sys/1/htparser.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | from html.parser import HTMLParser
class Parser(HTMLParser):
nais=False
def handle_starttag(self, tag, attrs):
if tag == 'h2':
self.nais = True
def handle_data(self, data):
if self.nais:
self.data = data
def handle_endtag(self, tag):
self.nais = False
i... | 22.52381 | 42 | 0.59408 |
72cb898c27e024ccc39bfc0abcd1093250cccc77 | 7,537 | py | Python | research/cv/AttGAN/src/data.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/AttGAN/src/data.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/AttGAN/src/data.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... | 38.258883 | 118 | 0.646809 |
be42a90c006c7042e48bb38ce5f3ae44789d923e | 11,084 | py | Python | tensorflow/basic-rl/tutorial5/tests/dq-learning-gym.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/basic-rl/tutorial5/tests/dq-learning-gym.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/basic-rl/tutorial5/tests/dq-learning-gym.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z | '''
DQN approach for different RL problems
as part of the basic series on reinforcement learning @
https://github.com/vmayoral/basic_reinforcement_learning
FIXME:
- ANN not performing at all
Inspired by
- https://gym.openai.com/evaluations/eval_kWknKOkPQ7izrixdhriurA
- http://outlace.com/Rei... | 38.089347 | 109 | 0.574251 |
60669672eb900de163f4b496d79b3f8574514483 | 181 | py | Python | ListenUp/util/annotations.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | ListenUp/util/annotations.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | ListenUp/util/annotations.py | kkysen/Soft-Dev | b19881b1fcc9c7daefc817e6b975ff6bce545d81 | [
"Apache-2.0"
] | null | null | null | from util.types import Function
def override(method):
# type: (Function) -> Function
"""Annotates that this method is overriding a super method."""
return method | 25.857143 | 67 | 0.679558 |
60b6fb1dfaed6396398246aae5e92af9bb348c8a | 606 | py | Python | BITs/2014/Baybulatova_Karina_V/task_5_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Baybulatova_Karina_V/task_5_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Baybulatova_Karina_V/task_5_3.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 5, Вариант 3
#Напишите программу, которая бы при запуске случайным образом отображала название одного из цветов радуги.
#Байбулатова К.В.
#19.03.2016
import random
a="Красный"
b="Оранжевый"
c="Желтый"
d="Зеленый"
e="Голубой"
f="Сигий"
g="Фиолетовый"
color=random.randint(1,7)
print("Программа ... | 18.363636 | 107 | 0.689769 |
60e08f124e40f586cf5259062815a401ee436554 | 2,219 | py | Python | resources/mechanics_lib/MovingLegs.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/MovingLegs.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/MovingLegs.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 3 | 2016-10-05T07:20:30.000Z | 2017-11-20T10:36:50.000Z | from api.component import Component
from connector import Tab
from api.edge import Flex, Flat
class MovingLegs(Component):
def defComponents(self):
self.addSubcomponent("servo", "Servo")
self.addSubcomponent("move", "FourBarLegs")
def defParameters(self):
### beam parameters inherited by default
s... | 33.621212 | 97 | 0.652546 |
7145b7f250be30e6506dbb416cec3ca7dbfd0329 | 875 | py | Python | doc/precursers/2019_09-Sneakernet/MontagsTests/ReadAppend_Messages.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | doc/precursers/2019_09-Sneakernet/MontagsTests/ReadAppend_Messages.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | doc/precursers/2019_09-Sneakernet/MontagsTests/ReadAppend_Messages.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | from nacl.public import Box
import nacl.encoding
def append_messages(message, box, file="Messages.txt"):
encrypted_message = box.encrypt(bytes(message, 'utf-8'), encoder=nacl.encoding.Base64Encoder)
with open(file, "a") as f:
f.write(str(nacl.encoding.Base64Encoder.encode(encrypted_message), 'utf-8')... | 29.166667 | 97 | 0.569143 |
7169fc050d13bbebdab360b6786cb288d257edb8 | 5,016 | py | Python | Documentation/dump.py | jonaes/ds100bot | 79a646114400c5c8d21ff21376276a8d380b031f | [
"Apache-2.0"
] | 15 | 2019-12-20T08:24:31.000Z | 2022-03-18T09:24:25.000Z | Documentation/dump.py | jonaes/ds100bot | 79a646114400c5c8d21ff21376276a8d380b031f | [
"Apache-2.0"
] | 124 | 2020-04-20T04:36:49.000Z | 2022-01-29T11:08:09.000Z | Documentation/dump.py | jonaes/ds100bot | 79a646114400c5c8d21ff21376276a8d380b031f | [
"Apache-2.0"
] | 12 | 2020-07-08T22:19:39.000Z | 2022-03-19T09:13:11.000Z | """Creates a source dump HTML file"""
from xml.etree import ElementTree as ET
from .generator import Generator
def add_source(target, source):
source_link = source.get('url', None)
source_element = ET.SubElement(target, 'span')
if source_link is not None:
source_element.tag = 'a'
source_el... | 39.496063 | 93 | 0.572368 |
e0846044d406b230ec9a2c507000aacae60ded79 | 1,838 | py | Python | Hackergame_2020/超精巧的数字论证器/fuck.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 22 | 2018-08-07T06:55:10.000Z | 2021-06-12T02:12:19.000Z | Hackergame_2020/超精巧的数字论证器/fuck.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 28 | 2020-03-04T23:47:22.000Z | 2022-02-26T18:50:00.000Z | Hackergame_2020/超精巧的数字论证器/fuck.py | Wycers/Codelib | 86d83787aa577b8f2d66b5410e73102411c45e46 | [
"MIT"
] | 4 | 2019-11-09T15:41:26.000Z | 2021-10-10T08:56:57.000Z | from pathlib import Path
import websocket
res = {}
try:
import thread
except ImportError:
import _thread as thread
def on_message(ws, message: str):
print(message)
print("====")
if message == "Please input your token: ":
ws.send(
"1716:MEUCIAj3vUnhyiI2u58LzU4HZehjHjIKg+dco+t... | 24.506667 | 118 | 0.49728 |
c74148dbc4f6d664cd0c6c752d38c383df153c28 | 277 | py | Python | 009 Optimierung2 Break-out.py | Gravitar64/KESS | 174bf9ee853f7bfb0c2e652b83150045197b6425 | [
"MIT"
] | null | null | null | 009 Optimierung2 Break-out.py | Gravitar64/KESS | 174bf9ee853f7bfb0c2e652b83150045197b6425 | [
"MIT"
] | null | null | null | 009 Optimierung2 Break-out.py | Gravitar64/KESS | 174bf9ee853f7bfb0c2e652b83150045197b6425 | [
"MIT"
] | null | null | null | # Aufgabe:
# Wir haben einen 18cm langen Draht, den wir zu einem Rechteck biegen können.
# Bei welchen Maßen (Breite x Höhe) haben wir den größten Flacheninhalt?
b = 9
h = 0
while b > 0:
f = b * h
u = b*2 + h*2
print(f'{b} cm x {h} cm = {f} cm²')
b -= 0.5
h += 0.5
| 19.785714 | 77 | 0.602888 |
c7b40016df8de42e98ed6cdfb52971e22315ddd8 | 1,660 | py | Python | apps/erianet/erianet_util.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 2 | 2017-11-30T21:12:11.000Z | 2017-12-01T07:52:43.000Z | apps/erianet/erianet_util.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 14 | 2017-11-14T18:12:53.000Z | 2018-06-03T16:07:57.000Z | apps/erianet/erianet_util.py | Obyoxar/RobolabStatistics | 08343ca3ac49df7efdac33692d7cc4b783e851f5 | [
"MIT"
] | 3 | 2018-02-05T10:40:03.000Z | 2018-02-09T09:29:19.000Z | from keras import backend
from keras.models import Sequential, Model, load_model
from keras.layers import Input, Dense, Dropout, Lambda
import os
def get_3bhif_names():
return next(os.walk("3BHIF"))[1]
def load_erianet_model(name):
return load_model(name, custom_objects={'contrastive_loss': contrastive_loss,... | 32.54902 | 125 | 0.716867 |
404ca089d1a47de4eba004fe75c3cfba90f605db | 6,249 | py | Python | tools/legacy/veh-parser/intMountsInfo.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/legacy/veh-parser/intMountsInfo.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/legacy/veh-parser/intMountsInfo.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z |
import sharedInfo
from functools import partial
def createExecContext():
result = {
"internalMounts": [],
"currentMount": {},
"f": False,
"t": True,
"Computer": "computer",
"ECM": "ecm",
"Cloak": "cloak",
"ThermalDiffuser": "thermalDiffuser",
... | 33.596774 | 159 | 0.643143 |
909b2e3bedab5ab6ca2342a9f924dbf56ebc3b3e | 8,445 | py | Python | Liter_Client/TMessageLabel.py | Drelf2018/Liter | e12ffdd22ee7b2724722c38e852fc9c1b2f180ad | [
"MIT"
] | null | null | null | Liter_Client/TMessageLabel.py | Drelf2018/Liter | e12ffdd22ee7b2724722c38e852fc9c1b2f180ad | [
"MIT"
] | null | null | null | Liter_Client/TMessageLabel.py | Drelf2018/Liter | e12ffdd22ee7b2724722c38e852fc9c1b2f180ad | [
"MIT"
] | null | null | null | from PyQt5.QtWidgets import (QLabel)
from PyQt5.QtCore import (Qt, QRect, QThread)
from PyQt5.QtGui import (QPen, QColor, QFont, QBrush, QPainter, QFontMetricsF)
from .PicWindow import PicWindow
from PIL import Image, ImageQt
from io import BytesIO
import requests
import re
import time
class TMessageLabel(QLabel):
... | 41.195122 | 167 | 0.487626 |
2979f763cf8330c1fa2c6952a54c83bda58009bb | 3,708 | py | Python | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/dependency_injection.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/dependency_injection.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/_External-learning-resources/02-pyth/python-patterns-master/patterns/dependency_injection.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-11-05T07:48:26.000Z | 2021-11-05T07:48:26.000Z | """
Dependency Injection (DI) is a technique whereby one object supplies the dependencies (services)
to another object (client).
It allows to decouple objects: no need to change client code simply because an object it depends on
needs to be changed to a different one. (Open/Closed principle)
Port of the Java example o... | 31.692308 | 101 | 0.718177 |
d3cf8c7d4aded9ba73cb8cdf672f3cadbad732e6 | 8,513 | py | Python | official/cv/cnn_direction_model/src/cnn_direction_model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/cnn_direction_model/src/cnn_direction_model.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/cnn_direction_model/src/cnn_direction_model.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... | 32.368821 | 118 | 0.592858 |
3110d7542e860db282e02221d53496077ea02ef0 | 244 | py | Python | 2-resources/__DATA-Structures/Data-Structures-Algos-Codebase-master/ALGO/__PYTHON/Jumping_on_the_Clouds.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/__DATA-Structures/Data-Structures-Algos-Codebase-master/ALGO/__PYTHON/Jumping_on_the_Clouds.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 2-resources/__DATA-Structures/Data-Structures-Algos-Codebase-master/ALGO/__PYTHON/Jumping_on_the_Clouds.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | def jumpingOnClouds(c):
i = counter = 0
length = len(c)
while i<length-1:
if c[i+2]==0:
i+=2
else:
i+=1
counter+=1
return counter
arr=[0,0,0,0,1,0]
print(jumpingOnClouds(arr))
| 14.352941 | 27 | 0.483607 |
3160293fbb4b07b2c0e5e6821477a4d04d15d22d | 7,066 | py | Python | src/onegov/org/views/occurrence.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/occurrence.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/views/occurrence.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ The onegov org collection of images uploaded to the site. """
from datetime import date
from morepath import redirect
from morepath.request import Response
from onegov.core.security import Public, Private
from onegov.core.utils import linkify, normalize_for_url
from onegov.event import Occurrence, OccurrenceCollec... | 30.588745 | 75 | 0.607274 |
9ee6d22a99038928ce33360f188aa028d570c132 | 1,436 | py | Python | Machine Learning/TF Model Serving/client_grpc.py | sarojjethva/Learning-Resources | 17da7dd5e39c28fb1e363b9f0643d624ab047274 | [
"MIT"
] | 639 | 2016-03-17T10:54:05.000Z | 2021-07-22T10:17:36.000Z | Machine Learning/TF Model Serving/client_grpc.py | sarojjethva/Learning-Resources | 17da7dd5e39c28fb1e363b9f0643d624ab047274 | [
"MIT"
] | 210 | 2016-03-19T15:18:28.000Z | 2020-10-01T06:36:47.000Z | Machine Learning/TF Model Serving/client_grpc.py | sarojjethva/Learning-Resources | 17da7dd5e39c28fb1e363b9f0643d624ab047274 | [
"MIT"
] | 376 | 2016-03-17T10:54:09.000Z | 2021-08-19T18:22:29.000Z | from __future__ import print_function
# This is a placeholder for a Google-internal import.
import grpc
import requests
import tensorflow as tf
from tensorflow_serving.apis import predict_pb2
from tensorflow_serving.apis import prediction_service_pb2_grpc
# The image URL is the location of the image we should send ... | 31.217391 | 73 | 0.739554 |
73278091e4e906395d680a98635be1ce91649a95 | 1,370 | py | Python | src/mitglieder/urls.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 1 | 2021-12-20T20:15:26.000Z | 2021-12-20T20:15:26.000Z | src/mitglieder/urls.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | null | null | null | src/mitglieder/urls.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'mitglieder' # here for namespacing of urls.
urlpatterns = [
path("", views.main_screen, name="homepage"),
path("erstellen", views.mitgliedErstellenView, name="erstellenView"),
path("erstellen/speichern", views.erstellen, name="erstellen"),
... | 57.083333 | 155 | 0.748905 |
b48561b0b0526954f3a103ea29a7aeb07d1bea9c | 432 | py | Python | examples/07 message response/ResponseBot.py | Killerhaschen/marvin-telegram-bot | c65e890a00450ed6ed4312d93e259db0c080ef6d | [
"MIT"
] | 1 | 2020-01-16T08:40:00.000Z | 2020-01-16T08:40:00.000Z | examples/07 message response/ResponseBot.py | Killerhaschen/marvin-telegram-bot | c65e890a00450ed6ed4312d93e259db0c080ef6d | [
"MIT"
] | null | null | null | examples/07 message response/ResponseBot.py | Killerhaschen/marvin-telegram-bot | c65e890a00450ed6ed4312d93e259db0c080ef6d | [
"MIT"
] | 1 | 2019-10-16T08:11:51.000Z | 2019-10-16T08:11:51.000Z | import asyncio
from samt import Bot, Answer, Context, Mode
marv = Bot()
@marv.default_answer
def default():
return 'unknown', Context.get('message').text
@marv.answer("/talk")
async def talk():
x= yield Answer("Was willst du?\n"
"/stop zum Abbrechen\n")
if x == "/stop":
yield A... | 16.615385 | 49 | 0.604167 |
c357a2f264afd01e6c5997e82a62d89ede6cd232 | 815 | py | Python | RDS/circle3_central_services/token_storage/src/server.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 10 | 2020-06-24T08:22:24.000Z | 2022-01-13T16:17:36.000Z | RDS/circle3_central_services/token_storage/src/server.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 78 | 2020-01-23T14:32:06.000Z | 2022-03-07T14:11:16.000Z | RDS/circle3_central_services/token_storage/src/server.py | Sciebo-RDS/Sciebo-RDS | d71cf449ed045a2a7a049e2cb77c99fd5a9195bd | [
"MIT"
] | 1 | 2020-06-24T08:33:48.000Z | 2020-06-24T08:33:48.000Z | #!/usr/bin/env python
from __init__ import bootstrap, ServerUtil
# set the WSGI application callable to allow using uWSGI:
# uwsgi --http :8080 -w app
app = bootstrap("CentralServiceTokenStorage", all=True)
@app.tracing.trace()
def fn():
with app.tracing.tracer.start_active_span("Refresh tokens for services") a... | 25.46875 | 100 | 0.706748 |
c35e9179eab0879eb1cac71f8e50c6da95b94fc8 | 3,312 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/agilepy/lib_wx/modulegui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/agilepy/lib_wx/modulegui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/sumopy/agilepy/lib_wx/modulegui.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | # Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2016-2020 German Aerospace Center (DLR) and others.
# SUMOPy module
# Copyright (C) 2012-2017 University of Bologna - DICAM
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public ... | 30.385321 | 87 | 0.661232 |
6f4fbb8c17fbe64d06b2db0910ecdc489d0ab02c | 787 | py | Python | setup.py | sirboldilox/hrsdb | 1f8373081e4cceb77892581fb5a3fe1f53bf984d | [
"MIT"
] | null | null | null | setup.py | sirboldilox/hrsdb | 1f8373081e4cceb77892581fb5a3fe1f53bf984d | [
"MIT"
] | null | null | null | setup.py | sirboldilox/hrsdb | 1f8373081e4cceb77892581fb5a3fe1f53bf984d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from setuptools import setup, find_packages
setup(
name='HRSDB',
version='0.2',
author='Matt Parker',
author_email='m.parker-12@student.lboro.ac.uk',
description='Health Record System Database',
license = "MIT",
classifiers = [
"Development Status :: 3 - Alp... | 21.27027 | 51 | 0.575604 |
81d6cba749055d5975fc148d177001468980c430 | 3,483 | py | Python | src/test/tests/hybrid/locktime.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/hybrid/locktime.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/hybrid/locktime.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# MODES: serial
# CLASSES: nightly
#
# Test Case: multiwindowcorrelation.py
#
# Tests: Tests database correlations when there are multiple windows.
#
# Programmer: Brad Whitlock
# Date: Mon Mar 22 15:59:24 PST 2004
#
# Mo... | 27.864 | 78 | 0.701981 |
1eea4a65aac308f18ffbf786f0dc6ae4620cad0a | 686 | py | Python | rabbitmq/tutorial/receive_logs.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | rabbitmq/tutorial/receive_logs.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | rabbitmq/tutorial/receive_logs.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import pika
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='logs', exchange_type='fanout')
result = channel.queue_d... | 28.583333 | 79 | 0.759475 |
6f8bce572dd928845cd2a4059e766b55bc2a0874 | 6,264 | py | Python | examples/information_extraction/DuEE/duee_1_data_prepare.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/information_extraction/DuEE/duee_1_data_prepare.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/information_extraction/DuEE/duee_1_data_prepare.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 Baidu.com, Inc. 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 l... | 45.064748 | 78 | 0.549968 |
82fe185679e8114afb475876f3715e94f5dca36c | 94,135 | py | Python | research/cvtmodel/resnet_ipl/src/resnetrs200.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cvtmodel/resnet_ipl/src/resnetrs200.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cvtmodel/resnet_ipl/src/resnetrs200.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | import mindspore.ops as P
from mindspore import nn
class Module11(nn.Cell):
def __init__(self, conv2d_0_in_channels, conv2d_0_out_channels, conv2d_0_stride):
super(Module11, self).__init__()
self.conv2d_0 = nn.Conv2d(in_channels=conv2d_0_in_channels,
out_channels=... | 69.523634 | 119 | 0.540171 |
73e7ac1a94cba1fc05c4b5e58ec038c023267ad4 | 619 | py | Python | controller/tick.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | 1 | 2021-06-15T08:59:02.000Z | 2021-06-15T08:59:02.000Z | controller/tick.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | controller/tick.py | huberthoegl/tsgrain | 405d0ba8b98c2afa950d27294e55cd1e07506db4 | [
"Apache-2.0"
] | null | null | null | ''' A 1 second ticker which can be subsribed. It is timed by the low-level
clock1s module.
'''
import clock1s
class Tick:
def __init__(self):
self.ticks = 0
self.cblist = []
self.timer = clock1s.PeriodicTimer(1, self._sec1)
def _sec1(self):
# called by threading.Timer
... | 18.205882 | 74 | 0.560582 |
f70c0476b617936a3fedaa107dd5a21cbd494991 | 4,387 | py | Python | research/cv/Neighbor2Neighbor/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/Neighbor2Neighbor/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/Neighbor2Neighbor/src/dataset.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... | 40.62037 | 99 | 0.605197 |
f7575b26f8d8c9b9ee566a8e14b492ca1e602018 | 4,672 | py | Python | scripts/unification/can_i_move_out.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/unification/can_i_move_out.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/unification/can_i_move_out.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python2.7
# Copyright 2019 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import argparse
import os
import subprocess
import sys
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
FUCHSIA_ROOT = os.pa... | 32 | 78 | 0.5625 |
f758bf18673d40754d773cb1a2d9ff6569047826 | 969 | py | Python | python/en/_matplotlib/gallery/text_labels_and_annotations/auto-wrapping_text.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_matplotlib/gallery/text_labels_and_annotations/auto-wrapping_text.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_matplotlib/gallery/text_labels_and_annotations/auto-wrapping_text.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
text_labels_and_annotations/auto-wrapping_text.py
Matplotlib > Gallery > Text, labels and annotations> Auto-wrapping text
https://matplotlib.org/3.1.1/gallery/text_labels_and_annotations/autowrap.html#sphx-glr-gallery-text-labels-and-annotations-autowrap-py
"""
import... | 38.76 | 135 | 0.686275 |
5859ed9fc1f7ddde97b61fa0949ed212e06e4a3e | 1,008 | py | Python | PINp/2014/Zabolotnova_D.K/task_9_44..py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Zabolotnova_D.K/task_9_44..py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/Zabolotnova_D.K/task_9_44..py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 9. Вариант 44.
#Создайте игру, в которой компьютер выбирает какое-либо слово, а игрок должен его отгадать.Компьютер сообщает игроку, сколько букв в слове, и дает пять попыток узнать, есть ли какая-либо
#буква в слове, причем программа может отвечать только "Да" и "Нет". Вслед за тем игрок должен попробовать от... | 29.647059 | 186 | 0.712302 |
b7316671611250cc4b845047f00f4825fda60034 | 2,619 | py | Python | test/test_npu/test_network_ops/test_sum_to_size.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_network_ops/test_sum_to_size.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_network_ops/test_sum_to_size.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable... | 38.514706 | 75 | 0.694158 |
3ff98001265e79ef54629fec78eb803a56f5d809 | 1,383 | py | Python | 02 Hardwaredesign/Grundschaltungen/src/spi_display_st7735.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 02 Hardwaredesign/Grundschaltungen/src/spi_display_st7735.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 02 Hardwaredesign/Grundschaltungen/src/spi_display_st7735.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | #! ./env/bin/python3
#encoding=utf-8
# Copyright (C) 2019 Dennis Schulmeister-Zimolong
#
# E-Mail: dhbw@windows3.de
# Webseite: https://www.wpvs.de
#
# Dieser Quellcode ist lizenziert unter einer
# Creative Commons Namensnennung 4.0 International Lizenz
"""
Beispiel zur Ansteuerung eines LCD-Displays via SPI. Da das ... | 23.05 | 78 | 0.64859 |
151abc3a3878dd52387115091cd6782b2060c1cf | 53 | py | Python | examples/miniportal/portal/actors/system/usermanager/getUser.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | 1 | 2015-10-26T10:38:32.000Z | 2015-10-26T10:38:32.000Z | examples/miniportal/portal/actors/system/usermanager/getUser.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | examples/miniportal/portal/actors/system/usermanager/getUser.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null |
def getUser(name):
raise NotImplementedError()
| 13.25 | 32 | 0.716981 |
c402a60c5601e6e4a4714ff1e61d6707459d8cc1 | 5,700 | py | Python | src/onegov/election_day/views/manage/votes.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/manage/votes.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/views/manage/votes.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from morepath import redirect
from onegov.ballot import Vote
from onegov.ballot import VoteCollection
from onegov.core.utils import groupbylist
from onegov.election_day import _
from onegov.election_day import ElectionDayApp
from onegov.election_day.collections import ArchivedResultCollection
from onegov.election_day.c... | 27.941176 | 73 | 0.635263 |
672c72f1a06655caed3fa0ab2b43e430f03b14f9 | 33,723 | py | Python | Packs/Vectra/Integrations/Vectra_v2/Vectra_v2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Vectra/Integrations/Vectra_v2/Vectra_v2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Vectra/Integrations/Vectra_v2/Vectra_v2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from Vectra_v2 import *
GET_DETECTIONS_RAW_RES = {
"count": 2,
"next": "demisto.com/api/v2.1/detections?page=2",
"previous": None,
"results": [
{
"assigned_date": None,
"assigned_to": None,
"c_score": 60,
"category": "COMMAND \u0026 CONTROL",
... | 35.460568 | 120 | 0.377843 |
6745c08fe0bfec221acd58aeb106ab0f058ba971 | 3,760 | py | Python | tests/test_volume_openstack.py | cloudmesh/cloudmesh-volume | a7502d077f2fb7c6b1b7986da9595a36591b06cd | [
"Apache-2.0"
] | 1 | 2020-03-12T09:49:53.000Z | 2020-03-12T09:49:53.000Z | tests/test_volume_openstack.py | cloudmesh/cloudmesh-volume | a7502d077f2fb7c6b1b7986da9595a36591b06cd | [
"Apache-2.0"
] | 1 | 2020-03-25T00:47:12.000Z | 2020-03-30T23:32:00.000Z | tests/test_volume_openstack.py | cloudmesh/cloudmesh-volume | a7502d077f2fb7c6b1b7986da9595a36591b06cd | [
"Apache-2.0"
] | 5 | 2020-02-20T01:04:24.000Z | 2020-05-05T14:36:30.000Z | ###############################################################
# pytest -v --capture=no tests/test_volume_openstack.py
###############################################################
# TODO: start this with cloud init, e.g, empty mongodb
# TODO: assertions need to be added
import pytest
import os
from time import sl... | 27.445255 | 71 | 0.585106 |
67843c5853e3ad0337c86627f5c3dbdd696504eb | 80 | py | Python | Fastir_Collector/hooks/hook-distorm3.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/hooks/hook-distorm3.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/hooks/hook-distorm3.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | datas = [("C:\python27\Lib\site-packages\distorm3\distorm3.dll", 'distorm3'), ]
| 40 | 79 | 0.7 |
67d6af6d21901c6306ba0512346e6663e9ff15c1 | 2,231 | py | Python | scratch/OUTDATED/setup_stringview.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | scratch/OUTDATED/setup_stringview.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | scratch/OUTDATED/setup_stringview.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | import os
import setuptools
import sys
try:
from Cython.Build import cythonize
except ImportError:
def cythonize(filename, **options):
return []
from DHParser.versionnumber import __version__
cythonize_modules = [
'DHParser/stringview.py',
# 'DHParser/toolkit.py',
# 'DHParser/preprocess.p... | 33.298507 | 105 | 0.643209 |
c03434a70d53effb9b33e4987aa3221ec8136930 | 2,339 | py | Python | python/advanced_sw/GITHUB/follow.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/advanced_sw/GITHUB/follow.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/advanced_sw/GITHUB/follow.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import time
import sys
import os
from selenium import webdriver
driver = webdriver.Chrome("/usr/bin/firefox") #This will open a new Firefox window
username = sys.argv[1]
passw = sys.argv[2]
profilename = sys.argv[3]
driver.get('https://www.quora.com/profile/{}/followers'.format(profilename)) #This will open Sean's foll... | 40.327586 | 169 | 0.70372 |
3f3d04569f9fe32819aaef393937f7c798854ea5 | 430 | py | Python | Python/pyside2/start_app.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/pyside2/start_app.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/pyside2/start_app.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | from PySide2 import QtWidgets
import sys
from Python.pyside2.main import Ui_Form
class MainWidget(QtWidgets.QWidget):
def __init__(self, parent=None):
super().__init__(parent)
self.ui = Ui_Form()
self.ui.setupUi(self)
self.setWindowTitle("Learning")
if __name__ == '__main__':
... | 20.47619 | 42 | 0.669767 |
4519b2da91fb306bb0aa118861679906c04ffbb1 | 1,814 | py | Python | python_gui_tkinter/Tkinter/TkinterCourse/40_dialogue_1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/Tkinter/TkinterCourse/40_dialogue_1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/Tkinter/TkinterCourse/40_dialogue_1.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | '''
Tkinter (and TK of course) provides a set of dialogues (dialogs in American English spelling), which can be used to display message boxes, showing warning or errors, or widgets to select files and colours. There are also simple dialogues, asking the user to enter string, integers or float numbers.
Let's look at a ... | 40.311111 | 298 | 0.729327 |
18f32a73177c03a3bf07a317cfc433d03ee1faf6 | 9,227 | py | Python | wz/ui_modules/tab_subjects.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui_modules/tab_subjects.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/ui_modules/tab_subjects.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
ui/tab_subjects.py
Last updated: 2021-05-04
Subject table management.
=+LICENCE=============================
Copyright 2021 Michael Towers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may o... | 31.491468 | 78 | 0.634442 |
e15250caaaa2146062075ce313fbe52361ddbf91 | 7,496 | py | Python | webinterface/tests/unit_tests/test_model_CleaningWeek.py | monoclecat/Cleaning-Schedule-generator | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 2 | 2021-11-28T23:04:00.000Z | 2022-01-13T19:47:45.000Z | webinterface/tests/unit_tests/test_model_CleaningWeek.py | monoclecat/Cleaning-Schedule-generator | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 25 | 2020-03-29T14:40:46.000Z | 2021-09-22T17:37:15.000Z | webinterface/tests/unit_tests/test_model_CleaningWeek.py | monoclecat/cleaning-schedule-management-system | b12fa8a6f834a89b805bf062a0df45279a7a8796 | [
"MIT"
] | 1 | 2020-07-04T11:42:17.000Z | 2020-07-04T11:42:17.000Z | from django.test import TestCase
from webinterface.models import *
import logging
from unittest.mock import *
class CleaningWeekQuerySetTest(TestCase):
@classmethod
def setUpTestData(cls):
cls.start_week = 2500
cls.schedule = Schedule.objects.create(name="schedule")
cls.cw1 = Cleaning... | 48.36129 | 117 | 0.712914 |
835cb7ca1a2e98650532aeab3d1c7fc87654e7b8 | 311 | py | Python | python/generator_tricks_for_systemprogrammer/largefiles.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/largefiles.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/largefiles.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # largsfiles.py
#
# Find all transfer over a megabyte
from linesdir import lines_from_dir
from apachelog import apache_log
lines = lines_from_dir("access-log*", "www")
log = apache_log(lines)
largs = (r for r in log if r["bytes"] > 1000000)
for r in largs:
print(r["request"], r["bytes"])
| 20.733333 | 49 | 0.675241 |
55e5e88da0938067eccf026a4b6ca3ebb17ab4dc | 193 | py | Python | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_2/ex3.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_2/ex3.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao3-Python-Intermediario-Programacao-Procedural/46_47_ 48_49_50_51_funcoes_2/ex3.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | def porcento(n1, n2):
return f'R$ {(n1 * n2 / 100) + n1:.2f}'
#numero1 = int(input('Quantos investir? '))
#numero2 = int(input('Quantos por cento de aumento? '))
print(porcento(50, 100))
| 24.125 | 55 | 0.626943 |
36e650a1fdff9a14accc591aa5f6ea846f44b904 | 9,858 | py | Python | pymongo/thread_util.py | dxmahata/TwitterSentimentAnalysis | b228747dfa74266853d4f8e6d4bc4eb29c080dd3 | [
"MIT"
] | 12 | 2017-12-15T06:50:16.000Z | 2020-02-02T12:22:09.000Z | pymongo/thread_util.py | dxmahata/TwitterSentimentAnalysis | b228747dfa74266853d4f8e6d4bc4eb29c080dd3 | [
"MIT"
] | 7 | 2015-02-24T18:20:36.000Z | 2015-03-04T14:26:48.000Z | venv/lib/python2.6/site-packages/pymongo/thread_util.py | mrghen/groupfit | e966bbc51c8126b00dfc0c611fcec6f15b9749ee | [
"Apache-2.0"
] | 4 | 2018-01-16T01:26:22.000Z | 2019-04-30T13:42:38.000Z | # Copyright 2012-2014 MongoDB, Inc.
#
# 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 writin... | 28.740525 | 78 | 0.625685 |
3d03d9d4569634c59094d5c69c8f8cc422f2d843 | 11,011 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/account.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/account.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/account.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, cstr
from frappe import throw, _
from frappe.utils.nestedset import NestedSet
class RootNotEditable(frappe... | 39.325 | 123 | 0.734266 |
a10b5e98c0fc87426b28935bbc077281142603fb | 656 | py | Python | Pwn2Win/2021/crypto/t00_rare/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Pwn2Win/2021/crypto/t00_rare/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Pwn2Win/2021/crypto/t00_rare/run.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | #!/usr/bin/python3 -u
import random
import string
import subprocess
def random_string(n):
return ''.join(random.choice(string.ascii_lowercase) for _ in range(n))
def check_pow(bits):
r = random_string(10)
print(f"hashcash -mb{bits} {r}")
solution = input("Solution: \n").strip()
if subprocess.call(... | 24.296296 | 75 | 0.602134 |
b8f090f9f3dca7ec19a50ddc6b0722aeb0e3554e | 260 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v4_0/reload_sales_print_format.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/v4_0/reload_sales_print_format.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v4_0/reload_sales_print_format.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc('accounts', 'Print Format', 'POS Invoice')
| 28.888889 | 68 | 0.773077 |
7707da8d934fd0f8b0e82f91d5cd368b5c727b80 | 2,199 | py | Python | Packs/CommonScripts/Scripts/GetStringsDistance/GetStringsDistance.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/GetStringsDistance/GetStringsDistance.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/GetStringsDistance/GetStringsDistance.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def levenshtein(s1, s2):
l1 = len(s1)
l2 = len(s2)
matrix = [range(l1 + 1)] * (l2 + 1)
for zz in range(l2 + 1):
matrix[zz] = range(zz, zz + l1 + 1)
for zz in range(0, l2):
for sz in range(0, ... | 36.04918 | 124 | 0.548886 |
6572726ac99cb86e024b8e18a53cbb89c8edf917 | 60 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/pg-6.2-for-loop.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/pg-6.2-for-loop.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-006/pg-6.2-for-loop.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | for print_100 in range(100):
print("I love Bangladesh")
| 20 | 30 | 0.7 |
02912648fea2d924516b5784a765ca5b3bb8eda6 | 274 | py | Python | rmpflow_using_class/neural.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | rmpflow_using_class/neural.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | rmpflow_using_class/neural.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | import torch
def tanh(x):
return (torch.exp(x) - torch.exp(-x)) / (torch.exp(x) + torch.exp(-x))
x = torch.tensor(1.0, requires_grad=True)
y = tanh(x)
y.backward()
print(x.grad)
x_grad = x.grad
z = x_grad.to('cpu').detach().numpy().copy()
print(z) | 16.117647 | 75 | 0.587591 |
b24cd4900cad6637dd291aa6984c3f20eb0ea8c8 | 1,474 | py | Python | CodeStatistics/files/7b04e56a-40bb-4ea1-bd3e-58e10ae40e39/django_page/app02/views.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | CodeStatistics/files/7b04e56a-40bb-4ea1-bd3e-58e10ae40e39/django_page/app02/views.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | CodeStatistics/files/7b04e56a-40bb-4ea1-bd3e-58e10ae40e39/django_page/app02/views.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | from django.shortcuts import render,HttpResponse,redirect
from django import forms
from django.forms import fields
class F1Form(forms.Form):
username = fields.CharField(max_length=18,min_length=6,required=True,
error_messages={'required':'用户名不能为空','max_length':'太长了','min_length':'... | 37.794872 | 109 | 0.58616 |
b2a3ac460f1b51bf80b7245212ca62901992afdf | 1,381 | py | Python | resources/mechanics_lib/FourBar.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/FourBar.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/FourBar.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 3 | 2016-10-05T07:20:30.000Z | 2017-11-20T10:36:50.000Z | from api.component import Component
from api.shapes import Rectangle
from api.edge import Fold
class FourBar(Component):
def defParameters(self):
self.newParameter("flexlengthx")
self.newParameter("flexlengthy")
self.newParameter("flexwidth", 5)
self.newParameter("depth")
def a... | 30.021739 | 61 | 0.617668 |
b2a3fabe0a85186de1ec319b0e1ac9ff6a0064b3 | 2,889 | py | Python | pyetl/etl_teomposition.py | febridev/portfoliode | ef2cea76c92b9676102cb76ca476f663a920b659 | [
"MIT"
] | null | null | null | pyetl/etl_teomposition.py | febridev/portfoliode | ef2cea76c92b9676102cb76ca476f663a920b659 | [
"MIT"
] | null | null | null | pyetl/etl_teomposition.py | febridev/portfoliode | ef2cea76c92b9676102cb76ca476f663a920b659 | [
"MIT"
] | null | null | null | import os
import sqlalchemy
#library for handle exception
from sqlalchemy.exc import InterfaceError, OperationalError, ProgrammingError
import pandas as pd
from dotenv import load_dotenv
#load .env file
load_dotenv()
#Credential DB Demo
hostdbdemo = os.getenv('hostdbdemo')
portdbdemo = os.getenv('portdbdemo')
userdbd... | 35.666667 | 117 | 0.678089 |
a2f10f654a46a0390ddf1553e1f3e6e06219be06 | 1,769 | py | Python | src/aijack/defense/dp/manager/utils.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 24 | 2021-11-17T02:16:47.000Z | 2022-03-27T01:04:08.000Z | src/aijack/defense/dp/manager/utils.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 9 | 2021-12-03T06:09:27.000Z | 2022-03-29T06:33:53.000Z | src/aijack/defense/dp/manager/utils.py | luoshenseeker/AIJack | 4e871a5b3beb4b7c976d38060d6956efcebf880d | [
"MIT"
] | 5 | 2022-01-12T09:58:04.000Z | 2022-03-17T09:29:04.000Z | import math
import numpy as np
from scipy import special
def _log_add(logx, logy):
"""Add two numbers in the log space."""
a, b = min(logx, logy), max(logx, logy)
if a == -np.inf: # adding 0
return b
# Use exp(a) + exp(b) = (exp(a - b) + 1) * exp(b)
return math.log1p(math.exp(a - b)) + b... | 32.163636 | 85 | 0.506501 |
a76d9657521803f6f76550a2d7e797fa9197a699 | 8,262 | py | Python | Python/Sonstige_Uebungen/lz78-codierung.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Sonstige_Uebungen/lz78-codierung.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Sonstige_Uebungen/lz78-codierung.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
####
# File: lz78-codierung.py
# Project: Sonstige_Uebungen
# -----
# Created Date: Wednesday 06.11.2019, 12:40
# Author: Apop85
# -----
# Last Modified: Wed Nov 06 2019
# -----
# Copyright (c) 2019 Apop85
# This software is published under the MIT license.
# Check http://... | 32.273438 | 130 | 0.567659 |
38f673f66ac4aa3fd06d6f0d57310539aa16818c | 136 | py | Python | python/pathlib/origin/relative_path.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pathlib/origin/relative_path.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pathlib/origin/relative_path.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | from pathlib import Path
path = Path('C:/Users/imdff/Downloads')
home = Path.home()
relative = path.relative_to(home)
print(relative) | 17 | 39 | 0.742647 |
ac6b329d02cc799be474733df4767d2f804b5c76 | 1,611 | py | Python | projects/samples.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | projects/samples.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | projects/samples.py | Matheus158257/projects | 26a6148046533476e625a872a2950c383aa975a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from json import load
from werkzeug.exceptions import BadRequest
from .controllers.components import create_component
def init_components(config_path):
"""Installs the components from a config file. Avoids duplicates.
Args:
config_path (str): the path to the config file.
... | 28.767857 | 84 | 0.564867 |
ac6cb2225c5e3c11a0f24e561e459f2efc98407a | 513 | py | Python | books/PythonAutomate/google_spreadsheets/create_delete_sheets.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/google_spreadsheets/create_delete_sheets.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/google_spreadsheets/create_delete_sheets.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """create_delete_sheets.py
구글 스프레드시트 문서 시트 생성 및 삭제
"""
import ezsheets
ss = ezsheets.createSpreadsheet("Multiple Sheets")
print(ss.sheetTitles) # ("시트1",)
# 시트 생성
ss.createSheet("Spam")
ss.createSheet("Eggs")
print(ss.sheetTitles) # ("시트1", "Spam", "Eggs")
ss.createSheet("Bacon", 0)
print(ss.sheetTitles) # ("Baco... | 21.375 | 57 | 0.651072 |
0c8f264f1c4aa66e021ac3f6241179292c6eb830 | 418 | py | Python | src/bo4e/enum/geschaeftspartnerrolle.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/geschaeftspartnerrolle.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/geschaeftspartnerrolle.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint:disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Geschaeftspartnerrolle(StrEnum):
"""
Diese Rollen kann ein Geschäftspartner einnehmen.
"""
LIEFERANT = "LIEFERANT" #: Lieferant
DIENSTLEISTER = "DIENSTLEISTER" #: Dienstleister
KUNDE = "KUNDE" #: Kunde
... | 26.125 | 53 | 0.703349 |
f05383facde28d31ad227712e93ee63aef621d6d | 342 | py | Python | Grundlagen/TigerJython/06.1-Perlenkette.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 2 | 2020-09-24T12:11:16.000Z | 2022-03-31T04:47:24.000Z | Grundlagen/TigerJython/06.1-Perlenkette.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-27T15:06:27.000Z | 2021-03-01T16:32:48.000Z | Grundlagen/TigerJython/06.1-Perlenkette.py | jneug/schule-projekte | 4f1d56d6bb74a47ca019cf96d2d6cc89779803c9 | [
"MIT"
] | 1 | 2021-02-24T05:12:35.000Z | 2021-02-24T05:12:35.000Z | from gturtle import *
makeTurtle() # die Turtle guckt nach oben
right(90)
durchmesser = 5
repeat 5:
forward(30)
dot(durchmesser)
durchmesser = durchmesser + 3
durchmesser = durchmesser - 3
repeat 4:
forward(30)
durchmesser = durchmesser - 3
dot(durchmesser)
forward... | 16.285714 | 44 | 0.631579 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.