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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8fedc3aa027330425eb2bd378b46e576ab2cc10b | 3,719 | py | Python | research/cv/glore_res50/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/glore_res50/eval.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/glore_res50/eval.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.786517 | 114 | 0.709599 |
855e083539b61da7c44763b03979b3af9c659fe3 | 309 | py | Python | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/95MetodoEstatico/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/95MetodoEstatico/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso_Python/Secao4-Python-introducao-a-programacao-orientada-a-objetos-POO/95MetodoEstatico/main.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | from random import randint
class Pessoa: # metodo estatico, serve pra quando uma coisa serve pra todos
staticmethod
total = 2
staticmethod
def gera_id():
rand = randint(1000, 199999)
return f'Numero aleatorio: {rand}'
# print(Pessoa.gera_id())
print(Pessoa.total)
| 19.3125 | 75 | 0.660194 |
7432fa1528789f52b1e037cdcd710406de3e9d87 | 67 | py | Python | TrabTransHomo/main.py | GuilhermeMikin/TrabsRob | 13d9417900da3f2aece65d5d25f947c3ce95c90c | [
"MIT"
] | null | null | null | TrabTransHomo/main.py | GuilhermeMikin/TrabsRob | 13d9417900da3f2aece65d5d25f947c3ce95c90c | [
"MIT"
] | null | null | null | TrabTransHomo/main.py | GuilhermeMikin/TrabsRob | 13d9417900da3f2aece65d5d25f947c3ce95c90c | [
"MIT"
] | null | null | null | from transf_homogenea import Cliente
c = Cliente()
c.atendimento() | 16.75 | 36 | 0.791045 |
749163e7ac0d16a01188b9bfe40a0aeeb2d5f1a6 | 2,543 | py | Python | Cryptor2.py | Han-Lon/Steganosimple-Cryptor | 8fb10993d51250fdfe25f02311f7143af21e8085 | [
"MIT"
] | null | null | null | Cryptor2.py | Han-Lon/Steganosimple-Cryptor | 8fb10993d51250fdfe25f02311f7143af21e8085 | [
"MIT"
] | null | null | null | Cryptor2.py | Han-Lon/Steganosimple-Cryptor | 8fb10993d51250fdfe25f02311f7143af21e8085 | [
"MIT"
] | null | null | null | from cryptography.fernet import Fernet
import os
# A public and presentable version of cryptor.py, made for more general use cases
# Uses Fernet cryptography to encrypt and/or decrypt a message
# TODO Put tests and self.SOMETHING = SOMETHING here
def __init__(self):
print('Nothing')
# Encrypt a message!
def en... | 29.569767 | 94 | 0.614628 |
749e5a993fe12e9c4f83713e6f299468ecdf115d | 417 | py | Python | pacman-termux/test/pacman/tests/fileconflict003.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/fileconflict003.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/fileconflict003.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "FS#8156- conflict between directory and incoming symlink"
p1 = pmpkg("pkg1")
p1.files = ["test/",
"test/file"]
self.addpkg2db("local", p1)
p2 = pmpkg("pkg2")
p2.files = ["test2/",
"test2/file2",
"test -> test2"]
self.addpkg2db("sync", p2)
self.args = "-S pkg2"
... | 21.947368 | 77 | 0.625899 |
70658be46e98ac1d7fbfe562f4aa4ccafeef8811 | 14,047 | py | Python | experimental/OUTDATED/ts2dataclass/scripts/typeddict_test.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 2 | 2020-12-25T19:37:42.000Z | 2021-03-26T04:59:12.000Z | experimental/OUTDATED/ts2dataclass/scripts/typeddict_test.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | 6 | 2018-08-07T22:48:52.000Z | 2021-10-07T18:38:20.000Z | experimental/OUTDATED/ts2dataclass/scripts/typeddict_test.py | jecki/DHParser | c6c1bd7db2de85b5997a3640242f4f444532304e | [
"Apache-2.0"
] | null | null | null | import functools
import sys
try:
from typing import Generic, ClassVar, Final, Protocol, _GenericAlias, \
Any, NoReturn, _SpecialForm, TypeVar, ForwardRef, Optional, get_origin, \
Union, Dict, get_type_hints, List, Iterable, Tuple, Callable, TypedDict
except ImportError:
from typing_extensions im... | 38.590659 | 98 | 0.586389 |
564eda16295aadc41b5d35d9b84d496b0c4d300a | 2,777 | py | Python | tools/datasets_convert/augment.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | 2 | 2020-12-22T08:40:05.000Z | 2021-03-30T08:09:44.000Z | tools/datasets_convert/augment.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | tools/datasets_convert/augment.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import imageio
import numpy as np
import cv2
import imgaug as ia
import imgaug.augmenters as iaa
from imgaug.augmentables.segmaps import SegmentationMapsOnImage
from PIL import Image
dataset_root = '/media/E/liuxin/SKMT/Seg'
images_path = os.path.join(dataset_root, 'JPEGImages')
segma... | 38.041096 | 100 | 0.67771 |
3b08051680f477016347fe92efb7850fee3e89b4 | 21,722 | py | Python | event_detector/gttm/main.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | event_detector/gttm/main.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | event_detector/gttm/main.py | MahdiFarnaghi/gtm | adbec372786262607291f901a444a0ebe9e98b48 | [
"Apache-2.0"
] | null | null | null | # -*- coding: UTF8 -*-
import getopt
import os
import sys
import traceback
import warnings
from logging import warning
from gttm.ioie import reader
from gttm.ioie.writer import ResultWritter
from gttm.nlp.identify_topic import HDPTopicIdentification
from gttm.nlp.vectorize import VectorizerUtil
# os.environ["PROJ_LIB... | 42.928854 | 133 | 0.594144 |
d9902f0c4bc6f71f351b794dba07d6eb8536527f | 50 | py | Python | CredentialsGoogle.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | CredentialsGoogle.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | CredentialsGoogle.py | illy777/Python_uebungen | 0106ebd8885974c0e22549688e33c49ddbbff179 | [
"Unlicense"
] | null | null | null | APIKey = "AIzaSyCLWOe-DAVJyAzI7DNbaQqjouV1lJGqLFU" | 50 | 50 | 0.88 |
794871a0c5099f775a131f1f0e20f60da7a98e8f | 93 | py | Python | refex/errors.py | d-e-h-i-o/legal-reference-extraction | a9f7793124818d5710315f75e52b077a232acccf | [
"MIT"
] | null | null | null | refex/errors.py | d-e-h-i-o/legal-reference-extraction | a9f7793124818d5710315f75e52b077a232acccf | [
"MIT"
] | null | null | null | refex/errors.py | d-e-h-i-o/legal-reference-extraction | a9f7793124818d5710315f75e52b077a232acccf | [
"MIT"
] | null | null | null | class RefExError(ValueError):
pass
class AmbiguousReferenceError(RefExError):
pass
| 13.285714 | 42 | 0.763441 |
5c1d998831f20b4736faf154386ca9ab5c823a99 | 4,835 | py | Python | src/pfun/lens.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 126 | 2019-09-16T15:28:20.000Z | 2022-03-20T10:57:53.000Z | src/pfun/lens.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 54 | 2019-09-30T08:44:01.000Z | 2022-03-20T11:10:00.000Z | src/pfun/lens.py | suned/pfun | 46c460646487abfef897bd9627891f6cf7870774 | [
"MIT"
] | 11 | 2020-01-02T08:32:46.000Z | 2022-03-20T11:10:24.000Z | from __future__ import annotations
import copy
from typing import Any, Callable, Generic, Optional, Type, TypeVar, overload
from .dict import Dict
from .functions import curry
from .immutable import Immutable
from .list import List
A = TypeVar('A')
B = TypeVar('B')
@curry
def _transform(lens: Lens[A, B], value: B,... | 24.668367 | 76 | 0.566908 |
034a46f94c57605a3a9be4713b4a71c4b1b6a950 | 976 | py | Python | ebenezer/atencion/migrations/0007_class.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | ebenezer/atencion/migrations/0007_class.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | 3 | 2020-02-11T23:15:00.000Z | 2021-06-10T20:52:17.000Z | ebenezer/atencion/migrations/0007_class.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.2 on 2018-10-05 13:36
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('atencion', '0006_domain'),
]
operations = [
migrations.CreateModel(
name='Class',
... | 32.533333 | 170 | 0.584016 |
306c388c0f046e182f3fd2ec77d724de8189d80c | 732 | py | Python | BITs/2014/Kozlov_A_D/task_5_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_5_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | BITs/2014/Kozlov_A_D/task_5_11.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задача 5. Вариант 11.
#Напишите программу, которая бы при запуске случайным образом отображала имя одного из девяти оленей Санта Клауса.
#Козлов А.Д.
#14.03.2016
import random
first="Дэшер"
second="Дэнсер"
third="Прэнсер"
forth="Виксен"
fifth="Комет"
sixth="Кьюпид"
seventh="Дондер"
eight="Блитцен"
ninth... | 19.783784 | 115 | 0.678962 |
9db4c781177dd3ab6bcf2f00bc14325c4707765e | 10,235 | py | Python | src/data_science/data_science/plot/twoD.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/data_science/plot/twoD.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | src/data_science/data_science/plot/twoD.py | viclule/api_models_deployment_framework | 7595cf0b4f3e277925b968014102d7561547bcd4 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import pandas as pd
import collections
import numpy as np
from data_science.plot.color import set_color_cycle
def simple_df(df, x_column, y_column, start=0, end=1, fig_size=(6, 4),
color='blue', marker='o', label='', title='',
legend='upper left'):
"""
... | 33.016129 | 77 | 0.606546 |
d1eb6fb4f6c8f23dd7e37f456c29e30a422f276c | 15,745 | py | Python | bindings/python/build.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/build.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | bindings/python/build.py | LucaCappelletti94/EnsmallenGraph | 572532b6d3f4352bf58f9ccca955376acd95fd89 | [
"MIT"
] | null | null | null | #!/bin/python3
import os
import re
import sys
import json
import base64
import shutil
import logging
import zipfile
import hashlib
import argparse
import platform
import subprocess
import multiprocessing as mp
import glob
from json.decoder import JSONDecodeError
########################################################... | 35.066815 | 123 | 0.5765 |
ae580f3b7d7e4fb48809ae16b80fccdcff625448 | 1,128 | py | Python | worker/logfile_handler.py | greenorca/ECMan | 744cb2ec97d52a68d45cf40a967ac60b92dafbb4 | [
"MIT"
] | null | null | null | worker/logfile_handler.py | greenorca/ECMan | 744cb2ec97d52a68d45cf40a967ac60b92dafbb4 | [
"MIT"
] | 9 | 2019-05-11T19:53:01.000Z | 2020-11-10T07:24:14.000Z | worker/logfile_handler.py | greenorca/ECMan | 744cb2ec97d52a68d45cf40a967ac60b92dafbb4 | [
"MIT"
] | null | null | null | '''
Created on Mar 10, 2019
@author: sven
'''
import pdfkit
class LogfileHandler:
'''
class that reads plaintext logfiles from Computer class and dumps it into PDF logfiles
'''
def __init__(self, logfile, candidateName):
'''
Constructor
'''
self.logfile = logfile
... | 28.2 | 99 | 0.580674 |
c9998a04eec2665c11a7a70e33235fb6da884fc8 | 5,216 | py | Python | Subrake-master/subrake/pull.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Subrake-master/subrake/pull.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Subrake-master/subrake/pull.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 os
import random
__logo__ = """%s
_____ __ __
/ ___/__ __/ /_ _________ _/ /_____
\\__ \\/ / / / __ \\/ ___/ __ `/ //_/ _ \\
___/ / /_/ / /_/ / / / /_/ / ,< / __/
/____/\\__,_/_.___/_/ \\__,_/_/|_|\\___/
%s
%s@hash3liZer%s"""
__help__ ... | 26.612245 | 140 | 0.523006 |
a011eaecbce91c144efaf9f983b29d93624a0bf2 | 858 | py | Python | Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/41. convert the given string into Pig Latin.py | jaswinder9051998/Resources | fd468af37bf24ca57555d153ee64693c018e822e | [
"MIT"
] | 101 | 2021-12-20T11:57:11.000Z | 2022-03-23T09:49:13.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/41. convert the given string into Pig Latin.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 4 | 2022-01-12T11:55:56.000Z | 2022-02-12T04:53:33.000Z | Programming Languages/Python/Theory/100_Python_Challenges/Section_2_String/41. convert the given string into Pig Latin.py | Sid-1164/Resources | 3987dcaeddc8825f9bc79609ff26094282b8ece1 | [
"MIT"
] | 38 | 2022-01-12T11:56:16.000Z | 2022-03-23T10:07:52.000Z | """
Pig Latin is a language game formed from English by transferring the initial
consonant or consonant cluster of each word to the end of the word
and adding a vocalic syllable ('ay') to create a suffix.
Write a function that converts the given input string into Pig Latin.
input_string = 'scream'
Expected output ... | 26 | 77 | 0.624709 |
eed5a2e4b17830c5a783ef758da361db313cef82 | 418 | py | Python | packages/watchmen-meta/src/watchmen_meta/common/last_visit_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/common/last_visit_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-meta/src/watchmen_meta/common/last_visit_service.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from watchmen_model.common import LastVisit
from watchmen_storage import EntityRow
class LastVisitShaper:
@staticmethod
def serialize(last_visit: LastVisit, row: EntityRow) -> EntityRow:
row['last_visit_time'] = last_visit.lastVisitTime
return row
@staticmethod
def deserialize(row: EntityRow, last_visit: Las... | 27.866667 | 69 | 0.799043 |
0160e80906932f69797442f3ec022689c74648e4 | 685 | py | Python | luhn.py | Sahaj21/Luhn-algorithm | 2dc04a74ef36307a9bf40e7d64931349ee28be98 | [
"Apache-2.0"
] | null | null | null | luhn.py | Sahaj21/Luhn-algorithm | 2dc04a74ef36307a9bf40e7d64931349ee28be98 | [
"Apache-2.0"
] | null | null | null | luhn.py | Sahaj21/Luhn-algorithm | 2dc04a74ef36307a9bf40e7d64931349ee28be98 | [
"Apache-2.0"
] | null | null | null | def main():
cardNumber = input('Card Number: ').replace(' ', '')
digits = [int(char) for char in cardNumber]
digits = digits[::-1]
# step1: double alternating digits from RHS
doubledDigits = []
for (count,digit) in enumerate(digits):
if (count+1)%2==0:
doubledDigits.append(digit*2)
else:
doubledDigits.... | 23.62069 | 53 | 0.684672 |
e93f1637c197480bad460dd1cce15fcbac139b82 | 177 | py | Python | drawbot_test.py | kantel/drawbot | db5db08c75a235de4274198c2bb0c0553b14adfe | [
"MIT"
] | null | null | null | drawbot_test.py | kantel/drawbot | db5db08c75a235de4274198c2bb0c0553b14adfe | [
"MIT"
] | null | null | null | drawbot_test.py | kantel/drawbot | db5db08c75a235de4274198c2bb0c0553b14adfe | [
"MIT"
] | null | null | null | size(940, 315)
my_text = "🐍 Hallo DrawBöttchen! 🐍"
print(my_text)
fill(0.9, 0, 0)
font("American Typewriter", 68)
text(my_text, (40, 150))
saveImage("images/drawbottest.jpg") | 17.7 | 35 | 0.694915 |
3a6807562fafd5c216670e355b12a68d66c13a7e | 899 | py | Python | SoSe-21/Code-Vorlesungen/Wiederholung/Wiederholung-Listen-Strings-Dictionaries.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Code-Vorlesungen/Wiederholung/Wiederholung-Listen-Strings-Dictionaries.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Code-Vorlesungen/Wiederholung/Wiederholung-Listen-Strings-Dictionaries.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | a = "Das ist ein String"
b = ["Das", "ist", "eine", "Liste"]
c = ["Mehrere", "Datentypen", 5.3, True]
d = {"Berlin": 3_500_000,
"Kiel": 255_000}
print(d)
# Hinzufügen von Paris
d.update({"Paris": 2_161_000})
print(d)
# Ändern der Einwohnerzahl von Kiel
d.update({"Kiel": 375_000})
print(d)
# Löschen von Paris
d.po... | 24.297297 | 72 | 0.705228 |
3aa0be157bca650402bb2a4f4a833adf582a9867 | 2,396 | py | Python | frappe-bench/apps/erpnext/erpnext/education/doctype/academic_term/academic_term.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/education/doctype/academic_term/academic_term.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/education/doctype/academic_term/academic_term.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import getdate
from frappe.model.document import Document
class AcademicTerm(Document):
... | 58.439024 | 229 | 0.724958 |
c92f4e29601da13b419281e7afbb51e50cf61802 | 2,309 | py | Python | reports/ReportScorePerWord.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | reports/ReportScorePerWord.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | reports/ReportScorePerWord.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import os
import sys
import pandas as pd
from libs.ModelFactory import ModelFactory
from measure.ModelWordMeter import ModelWordMeter
from reports.AbstractReport import AbstractReport
# Add modules to system path, needed when starting the script from the shell
# Furter details see: https://stackoverflow.com/questions... | 36.650794 | 103 | 0.636639 |
95aad85dce290f5dace2bb1b92c4a189d9574799 | 113 | py | Python | tests/test_openvpnudp_meths.py | joshRooz/NordApi | c0d34ed81a0014da5fb96a3409d1ccc0addcc01e | [
"MIT"
] | null | null | null | tests/test_openvpnudp_meths.py | joshRooz/NordApi | c0d34ed81a0014da5fb96a3409d1ccc0addcc01e | [
"MIT"
] | null | null | null | tests/test_openvpnudp_meths.py | joshRooz/NordApi | c0d34ed81a0014da5fb96a3409d1ccc0addcc01e | [
"MIT"
] | null | null | null | # from pytest import unittest
# from nordapi.OpenVpnUdp import OpenVpnUdp
def test_get_file():
assert True
| 16.142857 | 43 | 0.769912 |
6c455cfb5938c55a01d8f4d3c51829ce3579f1e8 | 5,561 | py | Python | tos/search2.py | Bodia2cat/ToS | 1b8c19fd4ab5f8458f5dc1832b764430ac6e02d9 | [
"Unlicense"
] | null | null | null | tos/search2.py | Bodia2cat/ToS | 1b8c19fd4ab5f8458f5dc1832b764430ac6e02d9 | [
"Unlicense"
] | null | null | null | tos/search2.py | Bodia2cat/ToS | 1b8c19fd4ab5f8458f5dc1832b764430ac6e02d9 | [
"Unlicense"
] | null | null | null | #!!!!For start you must to start 'dep.sh'!!!!!
import colorama
import sys
from colorama import Fore, Back, Style
#BvCk-2045-ztTS
colorama.init()
import webbrowser
import subprocess
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
on = True #############
active = "BvCk-2045-ztTS" # your access key##
#------------... | 30.554945 | 345 | 0.598094 |
66b3052fcf90c72a891e6c617198ec2055f62058 | 1,356 | py | Python | leetcode/232-Implement-Queue-using-Stacks/ImpQueueByStacks_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/232-Implement-Queue-using-Stacks/ImpQueueByStacks_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/232-Implement-Queue-using-Stacks/ImpQueueByStacks_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Queue:
# initialize your data structure here.
def __init__(self):
self.instack = []
self.outstack = []
self.insize = 0
self.outsize = 0
# @param x, an integer
# @return nothing
def push(self, x):
self.instack.append(x)
self.insize += 1
# @r... | 27.12 | 42 | 0.478614 |
66be29bfb1af16e1cf0e8ae783f4d3bebce76d50 | 1,568 | py | Python | Hackerrank_problems/Solve_me_first/solution1_MultipleWays.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | Hackerrank_problems/Solve_me_first/solution1_MultipleWays.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | Hackerrank_problems/Solve_me_first/solution1_MultipleWays.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | #
# working
# uses arithmatic method to add 2 given numbers
def solveMeFirst(a, b):
return a + b
# working
# uses Logical operators to add 2 numbers
# for example considering the case a = 2, b = 4
# binary representation of 2 is 010 and binary representation of 4 is 100
# xor'in... | 38.243902 | 177 | 0.691327 |
dd575770e4e852484fad98ff73c8075a1dfb1f4b | 529 | py | Python | scripts/component_graph/server/query/__init__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 3 | 2020-08-02T04:46:18.000Z | 2020-08-07T10:10:53.000Z | scripts/component_graph/server/query/__init__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | null | null | null | scripts/component_graph/server/query/__init__.py | opensource-assist/fuschia | 66646c55b3d0b36aae90a4b6706b87f1a6261935 | [
"BSD-3-Clause"
] | 1 | 2020-08-07T10:11:49.000Z | 2020-08-07T10:11:49.000Z | #!/usr/bin/env python3
# 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.
"""The query module implements the core fuchsia query language.
The query modules acts as a coordination layer between the graph and th... | 40.692308 | 77 | 0.793951 |
afac80b50b2b63c0417b7efff03a637250f8b5f9 | 5,802 | py | Python | src/onegov/election_day/formats/vote/default.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/formats/vote/default.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/election_day/formats/vote/default.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot import BallotResult
from onegov.election_day import _
from onegov.election_day.formats.common import EXPATS, validate_integer
from onegov.election_day.formats.common import FileImportError
from onegov.election_day.formats.common import load_csv
from onegov.election_day.formats.common import BALLOT_TY... | 29.30303 | 77 | 0.564288 |
bbe431ce1f527c0da97e38b3d86696b451343b70 | 5,056 | py | Python | authApp/views/transactionsView.py | xlausae/Web-Service | fbc4b45f34fe5ac69d8da2ffe09e5c32046e27d5 | [
"MIT"
] | null | null | null | authApp/views/transactionsView.py | xlausae/Web-Service | fbc4b45f34fe5ac69d8da2ffe09e5c32046e27d5 | [
"MIT"
] | 1 | 2022-01-05T23:52:37.000Z | 2022-01-05T23:52:37.000Z | authApp/views/transactionsView.py | xlausae/Web-Service | fbc4b45f34fe5ac69d8da2ffe09e5c32046e27d5 | [
"MIT"
] | null | null | null | from django.conf import settings
from rest_framework import generics, status
from rest_framework.response import Response
from rest_framework.permissions import IsAuthenticated
from rest_framework_simplejwt.backends import TokenBackend
from authApp.models.... | 46.814815 | 101 | 0.684138 |
591975e5e2de228f09345e072dbd52defb201803 | 3,179 | py | Python | Theories/Algorithms/Recursion2/ValidateBST/validate_bst.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Theories/Algorithms/Recursion2/ValidateBST/validate_bst.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Theories/Algorithms/Recursion2/ValidateBST/validate_bst.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | import math
from typing import Optional
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
# Recursive - Top-down Approach - Most stupid way
# def isValidBST(root: Optional[TreeNode]) ->... | 29.435185 | 99 | 0.598301 |
ab684c50345c5d1f6ae8cd0432a5ea79ff76b958 | 5,008 | py | Python | view/aboutWindow.py | Limatationz/pandemiesimulator | 91d21fda2f9c77d616a9e9401271fc044b421007 | [
"MIT"
] | null | null | null | view/aboutWindow.py | Limatationz/pandemiesimulator | 91d21fda2f9c77d616a9e9401271fc044b421007 | [
"MIT"
] | null | null | null | view/aboutWindow.py | Limatationz/pandemiesimulator | 91d21fda2f9c77d616a9e9401271fc044b421007 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/about.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# 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 QtCo... | 51.628866 | 454 | 0.673323 |
059435c1ec3aa9f5e69474d936cc02c03ae78974 | 5,626 | py | Python | geocoder.py | ds-vologdin/geocoder | 152f461b3c030654f59619aa2c8b52df2f8b8326 | [
"MIT"
] | null | null | null | geocoder.py | ds-vologdin/geocoder | 152f461b3c030654f59619aa2c8b52df2f8b8326 | [
"MIT"
] | null | null | null | geocoder.py | ds-vologdin/geocoder | 152f461b3c030654f59619aa2c8b52df2f8b8326 | [
"MIT"
] | null | null | null | import argparse
import logging
import csv
from typing import List, Dict, Tuple
from geocode_yandex import fetch_geocode_yandex_json
from geocode_yandex import fetch_geocode_yandex_json_from_addresses
from geocode_yandex import parse_geocode_yandex_to_geo_objects
from logger import convert_str_to_logging_level, logger
... | 35.834395 | 108 | 0.663704 |
75b261438603414ebf970addb87143a182a6b55a | 6,128 | py | Python | src/onegov/newsletter/models.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/newsletter/models.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/newsletter/models.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.core.crypto import random_token
from onegov.core.orm import Base
from onegov.core.orm.mixins import ContentMixin, TimestampMixin
from onegov.core.orm.types import UTCDateTime, UUID
from onegov.core.utils import normalize_for_url
from onegov.search import SearchableContent
from sqlalchemy import and_
from sq... | 32.252632 | 78 | 0.681462 |
f9c6047dbd697bff47bd8064b42e9b66f355ec9e | 2,017 | py | Python | gemtown/gems/models.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | gemtown/gems/models.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | 5 | 2020-09-04T20:13:39.000Z | 2022-02-17T22:03:33.000Z | gemtown/gems/models.py | doramong0926/gemtown | 2c39284e3c68f0cc11994bed0ee2abaad0ea06b6 | [
"MIT"
] | null | null | null | from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.db.models import Sum
from gemtown.users import models as user_models
import os
@python_2_unicode_compatible
class TimeStampModel(models.Model):
created_at = models.DateTimeField(auto_now_add=True)
updated_at... | 31.515625 | 107 | 0.688647 |
fb32a67f4184e602df5cf11b66da50558c289354 | 1,836 | py | Python | web/interceptors/AuthInterceptor.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | 2 | 2019-06-10T08:57:47.000Z | 2021-06-12T16:22:15.000Z | web/interceptors/AuthInterceptor.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | web/interceptors/AuthInterceptor.py | yao6891/FlaskOrdering | cbd24bd8d95afaba91ce4d6b1b3548c4e82e3807 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from application import app
from flask import request, g, redirect
from common.models.User import (User)
from common.libs.user.UserService import (UserService)
from common.libs.UrlManager import (UrlManager)
from common.libs.LogService import LogService
import re
@app.before_request
def befor... | 23.240506 | 112 | 0.668845 |
85dd96289e81b005cee347354e80d321414ede9d | 244 | py | Python | Pythonjunior2020/Woche3/Aufgabe_3_3_3.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche3/Aufgabe_3_3_3.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | Pythonjunior2020/Woche3/Aufgabe_3_3_3.py | Zeyecx/HPI-Potsdam | ed45ca471cee204dde74dd2c3efae3877ee71036 | [
"MIT"
] | null | null | null | # 3.3.3, Woche 3, Block 3, Aufgabe 3
# Import
from daten import woerterbuch
# Funktionen
def spiegeln(w):
m = {}
for i in range(len(list(w))):
m[w[list(w)[i]]] = list(w)[i]
return m
# Main
print(spiegeln(woerterbuch))
| 13.555556 | 37 | 0.598361 |
b59d81831f173ed97215d331ac5e05a087633107 | 414 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v8_0/move_account_head_from_account_to_warehouse_for_inventory.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/v8_0/move_account_head_from_account_to_warehouse_for_inventory.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v8_0/move_account_head_from_account_to_warehouse_for_inventory.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2017, Frappe and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doctype("Warehouse")
frappe.db.sql("""
update
`tabWarehouse`
set
account = (select name from `tabAccount`
where... | 27.6 | 65 | 0.719807 |
b5abb8ebd7fe208679a62e6c8ab282d0eb9933ea | 1,779 | py | Python | tp1/source/Node.py | ha2398/ia-tps | 3696c92c8e2549aab6ac83da317cef8e15762eea | [
"MIT"
] | null | null | null | tp1/source/Node.py | ha2398/ia-tps | 3696c92c8e2549aab6ac83da317cef8e15762eea | [
"MIT"
] | null | null | null | tp1/source/Node.py | ha2398/ia-tps | 3696c92c8e2549aab6ac83da317cef8e15762eea | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
'''
Trabalho Pratico 1: Inteligência Artificial
Autor: Hugo Araujo de Sousa (2013007463)
Node.py: Graph search node.
'''
class Node():
def __init__(self, state, parent, action, cost):
'''
Initialize a Node of the graph search.
@state: The state in the state space to which the node ... | 21.962963 | 70 | 0.666667 |
a99c7bcc9d6d9dd19d4abc82ce71276ceb242e05 | 1,622 | py | Python | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/02_prime_numbers_sequence.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/02_prime_numbers_sequence.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_Python3_Das_umfassende_Praxisbuch/Kapitel_06_Funktionen/02_prime_numbers_sequence.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
###
# File: 02_prime_numbers_sequence.py
# Project: Kapitel_06_Funktionen
# Created Date: Sunday 24.02.2019, 11:29
# Author: Apop85
# -----
# Last Modified: Monday 04.03.2019, 12:21
# -----
# Copyright (c) 2019 Apop85
# This software is published under the MIT license.
# Ch... | 32.44 | 103 | 0.61344 |
8d4f863fde4b010b325a73bacd4bf00ac10e0bc5 | 241 | py | Python | numbers.py | turutle/rep | 7932c6889021fa0359ffe3931e731ef5b940f257 | [
"MIT"
] | null | null | null | numbers.py | turutle/rep | 7932c6889021fa0359ffe3931e731ef5b940f257 | [
"MIT"
] | null | null | null | numbers.py | turutle/rep | 7932c6889021fa0359ffe3931e731ef5b940f257 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Mar 13 14:23:47 2021
@author: turtl
"""
a = int (input( "Input 4 numbers --> "))
b = int (input( "--> "))
c = int (input( "--> "))
d = int (input( "--> "))
x = (a + b)/(c + d)
print( "%.2f" % (x)) | 18.538462 | 40 | 0.456432 |
8d6f08caa0bb7f631907f3e5479b177e19e43cfe | 1,333 | py | Python | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_das_posicoes.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_das_posicoes.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-02/processa-numeros/view/paineis/painel_das_posicoes.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício Processa Números
# --------------------------
# Classe responsável por obter os números em detereminadas posições.
from view.paineis.painel_abstrato import PainelAbstrato
from model.processa_numeros import das_posicoes
class PainelDasPosicoes(Paine... | 39.205882 | 115 | 0.627907 |
57429a7eb0cfd485656f6509d142ef4a8491713f | 10,059 | py | Python | examples/model_compression/ofa/run_msra_ner.py | AI-Mart/PaddleNLP | 0ababea960427e8b70220ea06d908ed58cbed0ed | [
"Apache-2.0"
] | null | null | null | examples/model_compression/ofa/run_msra_ner.py | AI-Mart/PaddleNLP | 0ababea960427e8b70220ea06d908ed58cbed0ed | [
"Apache-2.0"
] | null | null | null | examples/model_compression/ofa/run_msra_ner.py | AI-Mart/PaddleNLP | 0ababea960427e8b70220ea06d908ed58cbed0ed | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 35.419014 | 115 | 0.628691 |
2796b7900c81cc4e2094d6e3764ee8755e8d5bf5 | 416 | py | Python | 009 Optimierung.py | Gravitar64/KESS | 174bf9ee853f7bfb0c2e652b83150045197b6425 | [
"MIT"
] | null | null | null | 009 Optimierung.py | Gravitar64/KESS | 174bf9ee853f7bfb0c2e652b83150045197b6425 | [
"MIT"
] | null | null | null | 009 Optimierung.py | Gravitar64/KESS | 174bf9ee853f7bfb0c2e652b83150045197b6425 | [
"MIT"
] | null | null | null | # Aufgabe:
# Ein Theater hat durchschnittlich 200 Besucher, bei einem Eintrittspreis von 8,50€
# Wenn man den Eintrittspreis um 0,50€ senkt, erhöht sich die Besucherzahl um 20
# Bei welchem Eintrittspreis erreicht man das Maximum an Einnahmen?
besucher = 200
ticket = 8.50
for lauf in range(17):
besucher = besucher +... | 32 | 83 | 0.752404 |
fd812178aaa552710513bcf9d8235c4c22e61657 | 3,063 | py | Python | kts/core/feature_constructor/parallel.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/core/feature_constructor/parallel.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/core/feature_constructor/parallel.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | from typing import Tuple, Dict, Optional, List
import ray
from ray._raylet import ObjectID
from kts.core.backend.run_manager import run_cache
from kts.core.feature_constructor.base import BaseFeatureConstructor
from kts.core.frame import KTSFrame
from kts.core.run_id import RunID
from kts.core.types import AnyFrame
... | 33.293478 | 130 | 0.596474 |
474a8fec3d847caa1fc8c1fc33ebefe039ff508f | 8,910 | py | Python | SurveyManager/survey/views.py | javiervar/SurveyManager | bbe2ed356654c32586c587f58c609c8ce014e96b | [
"MIT"
] | null | null | null | SurveyManager/survey/views.py | javiervar/SurveyManager | bbe2ed356654c32586c587f58c609c8ce014e96b | [
"MIT"
] | null | null | null | SurveyManager/survey/views.py | javiervar/SurveyManager | bbe2ed356654c32586c587f58c609c8ce014e96b | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.contrib.auth.models import User, Group
from rest_framework import viewsets,generics
from rest_framework.decorators import api_view
from rest_framework.views import APIView
from rest_framework.response import Response
from django.conf import settings
from django.http impor... | 31.153846 | 160 | 0.767228 |
476f13f89a349b1097c82240d5153617dd08d346 | 8,171 | py | Python | official/cv/simple_pose/infer/sdk/main.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/simple_pose/infer/sdk/main.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/simple_pose/infer/sdk/main.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020-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 agre... | 41.267677 | 102 | 0.602007 |
d048b57017e8c06adab3d71fc2590e8417883fbc | 8,510 | py | Python | test/test_npu/test_add.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_add.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_add.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020 Huawei Technologies Co., Ltd
# Copyright (c) 2019, Facebook CORPORATION.
# 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/lice... | 40.331754 | 97 | 0.643243 |
efdea6c7dd2ba2905a996611d5f4758155d319ae | 1,050 | py | Python | login/taobao.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | login/taobao.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | login/taobao.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# encoding='utf-8'
# author:weibk
# @time:2021/10/26/026 下午 2:10:06
import selenium
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as ES
from selenium.webd... | 36.206897 | 76 | 0.750476 |
ef064b324f625c0e942e3e45fde0d746de2afb98 | 779 | py | Python | Controller/main.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | Controller/main.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | 7 | 2020-07-19T03:29:21.000Z | 2022-03-02T06:46:12.000Z | Controller/main.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Required packages
# - paho-mqtt
# - flask
# - flask-Restful
# - flask-Cors
# - requests
# - pymongo
# - jsonpatch
# - flask-HTTPAuth
VERSION = "1.10"
import time
from threading import Thread
from mqtt.CommandIO import CommandIO
from rest.RestIO import RestIO
from control.Injector import Inje... | 18.547619 | 55 | 0.756098 |
329107cb079ba216e0fb3d66c37f9bfd363b1ada | 162 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/service/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/service/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/service/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .service_helper import ask_topic_data_service
from .storage_helper import ask_topic_storage
from .topic_structure_helper import sync_topic_structure_storage
| 40.5 | 64 | 0.907407 |
dfb9fad6070005ad24e1235c1b5d5d431b6826a1 | 1,481 | py | Python | HackTheVote/2020/snap_election/server/server.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | HackTheVote/2020/snap_election/server/server.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | HackTheVote/2020/snap_election/server/server.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/env python3
import os
import json
import tempfile
import subprocess
from flask import Flask, request, abort, jsonify, send_file
from werkzeug.utils import secure_filename
DEVNULL = open(os.devnull,'w')
app = Flask(__name__)
# Set max file size
app.config['MAX_CONTENT_LENGTH'] = 8 * 1024 * 1024
# Create... | 22.104478 | 78 | 0.651587 |
2655047b9de80af6942fe09b68c18e8664010213 | 377 | py | Python | github_observer/main.py | dsc-sangmyung/2021GithubContest | d8fc93b2b50e98877a39cac8eafe814e5c18c4a6 | [
"MIT"
] | 12 | 2021-10-05T04:58:16.000Z | 2021-12-25T19:06:48.000Z | github_observer/main.py | dsc-sangmyung/2021GithubContest | d8fc93b2b50e98877a39cac8eafe814e5c18c4a6 | [
"MIT"
] | 9 | 2021-10-02T19:21:25.000Z | 2021-10-05T08:12:30.000Z | github_observer/main.py | dsc-sangmyung/2021GithubContest | d8fc93b2b50e98877a39cac8eafe814e5c18c4a6 | [
"MIT"
] | 1 | 2021-11-23T01:29:22.000Z | 2021-11-23T01:29:22.000Z | import asyncio
import sys
from services import calculate, io
async def main(token):
members = io.read_members()
githubs, repos = await calculate.calculate(members, token)
io.write_githubs(githubs)
io.write_markdown(githubs, repos)
if __name__ == "__main__":
loop = asyncio.get_event_loop()
loo... | 23.5625 | 62 | 0.721485 |
cd10c7d3cc3fd689f73e05265ce0159163e151a2 | 1,534 | py | Python | source/pkgsrc/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/graphics/MesaLib/patches/patch-src_mapi_glapi_gen_gl__XML.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-src_mapi_glapi_gen_gl__XML.py,v 1.1 2021/01/06 15:50:02 triaxx Exp $
Remove deprecated .getchildren() that are no longer supported in Python 3.9.
https://cgit.freedesktop.org/mesa/mesa/commit/src/mapi/glapi/gen/gl_XML.py?id=7a680
--- src/mapi/glapi/gen/gl_XML.py.orig 2021-01-06 15:17:59.922890000 +0100... | 34.863636 | 83 | 0.577575 |
3e1fe4eed920d76da5c9a1c0ff758ccbfdb56afa | 1,005 | py | Python | secret-sharing/secret-sharing-1-geheimnis.py | nicoboss/practical-MPC | 40833d58c0458049f902dd52aa63503ce116bd90 | [
"MIT"
] | null | null | null | secret-sharing/secret-sharing-1-geheimnis.py | nicoboss/practical-MPC | 40833d58c0458049f902dd52aa63503ce116bd90 | [
"MIT"
] | null | null | null | secret-sharing/secret-sharing-1-geheimnis.py | nicoboss/practical-MPC | 40833d58c0458049f902dd52aa63503ce116bd90 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
teilnehmer = int(input("Teilnehmer: "))
a = list()
x = np.arange(1, teilnehmer+1)
y = np.zeros(teilnehmer)
a.append(float(input("Geheimnis: ")))
for i in range(teilnehmer-1):
a.append(float(input(f"Koeffizient a{i+1}: ")))
for i in range(teilnehmer):
for j in ... | 28.714286 | 74 | 0.587065 |
e4f3d56ea962a1049d0ac8179f0b5dc5988f1042 | 3,593 | py | Python | src/Generate-Activations.py | B1T0/DeUs | 392f3bd3a97190cc2bc5dda9385b9728252cb975 | [
"MIT"
] | 2 | 2018-03-13T06:49:32.000Z | 2018-03-16T16:04:06.000Z | src/Generate-Activations.py | B1T0/DeUs | 392f3bd3a97190cc2bc5dda9385b9728252cb975 | [
"MIT"
] | null | null | null | src/Generate-Activations.py | B1T0/DeUs | 392f3bd3a97190cc2bc5dda9385b9728252cb975 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
import matplotlib.pyplot as plt
import matplotlib
import model_cnn
import preprocessing_classification as pre_c
import itertools as it
from scipy import signal
import scipy
from makedata_classification import sliding
import glob
from sklearn.cluster import MeanShift, estimate_... | 38.223404 | 225 | 0.668244 |
90274eba344c874f5f40193d6676236f87b01aac | 2,282 | py | Python | autojail/utils/report.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 6 | 2020-08-12T08:16:15.000Z | 2022-03-05T02:25:53.000Z | autojail/utils/report.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-03-30T10:34:51.000Z | 2021-06-09T11:24:00.000Z | autojail/utils/report.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-11-21T09:30:58.000Z | 2021-11-21T09:30:58.000Z | from typing import Any, List, Union
from dataclasses import dataclass, field
from rich import table, text
from rich.console import Console, ConsoleOptions, RenderResult
from rich.style import Style
from tabulate import tabulate
@dataclass
class Table:
headers: List[str] = field(default_factory=list)
content:... | 26.229885 | 78 | 0.606047 |
5f761b8118354234e948c8629ed24da16c20af0c | 563 | py | Python | leetcode/278-First-Bad-Version/FirstBadVersion_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | leetcode/278-First-Bad-Version/FirstBadVersion_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | leetcode/278-First-Bad-Version/FirstBadVersion_001.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | # The isBadVersion API is already defined for you.
# @param version, an integer
# @return a bool
# def isBadVersion(version):
# target = 3
# return version >= target
class Solution(object):
def firstBadVersion(self, n):
"""
:type n: int
:rtype: int
"""
l, r = 1, n #... | 25.590909 | 73 | 0.474245 |
39bea418127e541d08b4e200cd0edeaaec1a8091 | 1,705 | py | Python | file-management/multimedia/test_check_and_process_multimedia_file_no_process.py | gbesancon/projects | 7a9da629dddcf21fbe5c043d86b00036f80cbe14 | [
"MIT"
] | null | null | null | file-management/multimedia/test_check_and_process_multimedia_file_no_process.py | gbesancon/projects | 7a9da629dddcf21fbe5c043d86b00036f80cbe14 | [
"MIT"
] | 1 | 2022-03-02T10:43:58.000Z | 2022-03-02T10:43:58.000Z | file-management/multimedia/test_check_and_process_multimedia_file_no_process.py | gbesancon/projects | 7a9da629dddcf21fbe5c043d86b00036f80cbe14 | [
"MIT"
] | null | null | null | import unittest
import check_and_process_multimedia_file
class Test_CheckAndProcessMultimediaFile(unittest.TestCase):
TEST_FOLDER_PATH = "D:\\gbesancon\\00-temp\\Photos"
def test_main_no_args(self):
valid = check_and_process_multimedia_file.main(["-d", self.TEST_FOLDER_PATH])
self.asse... | 47.361111 | 156 | 0.704399 |
4b75fea252a446f07c5d8970d9c009b7626cce20 | 1,055 | py | Python | DataStructures/Stacks/Operation.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Stacks/Operation.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | DataStructures/Stacks/Operation.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
class Node():
def __init__(self, data=None, Max=None):
self.data = data
self.Max = Max
N = int(raw_input())
stacks = []
for _ in range(N):
input_str = raw_input()
if input_str.startswith('1'):
num, x = map(int, input_str.split())
else:
num = int(input_str... | 20.686275 | 45 | 0.453081 |
4bb77b164cd27f8d8c4f082a7a2def8875846520 | 889 | py | Python | zh-tw/10_Custom-Nodes/datasets/10-6/PythonTemplate.py | alfredo-pozo/DynamoPrimer | 46db2e9ff3401850788d479d1763224015fc0720 | [
"Apache-2.0"
] | null | null | null | zh-tw/10_Custom-Nodes/datasets/10-6/PythonTemplate.py | alfredo-pozo/DynamoPrimer | 46db2e9ff3401850788d479d1763224015fc0720 | [
"Apache-2.0"
] | null | null | null | zh-tw/10_Custom-Nodes/datasets/10-6/PythonTemplate.py | alfredo-pozo/DynamoPrimer | 46db2e9ff3401850788d479d1763224015fc0720 | [
"Apache-2.0"
] | null | null | null | import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Rev... | 26.147059 | 68 | 0.84252 |
76d2499f4d1004df3edb2be43dd6d5019f47bda0 | 2,214 | py | Python | research/cv/autoaugment/src/dataset/autoaugment/ops/effect.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/autoaugment/src/dataset/autoaugment/ops/effect.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/autoaugment/src/dataset/autoaugment/ops/effect.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... | 27.675 | 78 | 0.615628 |
0a027c472ec56bc23197e49e6fa73ba2f2d34812 | 14,070 | py | Python | Packs/Securonix/Integrations/Securonix/test_data/response_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/Securonix/Integrations/Securonix/test_data/response_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/Securonix/Integrations/Securonix/test_data/response_constants.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | RESPONSE_LIST_WORKFLOWS = {
"result": {
"workflows":
[
{
"workflow": "SOCTeamReview",
"type": "USER",
"value": "admin"
},
{
"workflow": "ActivityOutlierWorkflow",
... | 36.545455 | 97 | 0.419829 |
0a435b394768a4ef90b3d5e161a44ee4be60b49f | 2,922 | py | Python | ppyt/rules/conditions/__init__.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 4 | 2016-08-16T07:47:15.000Z | 2017-12-11T10:08:47.000Z | ppyt/rules/conditions/__init__.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | null | null | null | ppyt/rules/conditions/__init__.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 2 | 2018-06-15T04:43:15.000Z | 2020-05-02T07:47:15.000Z | # coding: utf-8
import logging
import abc
from ppyt import const
from ppyt.exceptions import OrderTypeError
from ppyt.rules import RuleBase
from ppyt.decorators import handle_nodataerror
logger = logging.getLogger(__name__)
class ConditionBase(RuleBase, metaclass=abc.ABCMeta):
"""conditions系の親クラスです。"""
_rule... | 22.828125 | 53 | 0.601643 |
0a700b0f3a83d8ce40c921c8eaf52a5e62f08be1 | 1,438 | py | Python | FCN/src/test_fcn16_vgg.py | JNingWei/Image_Segmentation | 4b1663c8b294cfa29da29a0f94dab066af69cd1e | [
"Python-2.0",
"OLDAP-2.7"
] | 13 | 2018-01-21T03:38:06.000Z | 2021-01-16T05:23:53.000Z | FCN/src/test_fcn16_vgg.py | JNingWei/Image-Segmentation | 4b1663c8b294cfa29da29a0f94dab066af69cd1e | [
"Python-2.0",
"OLDAP-2.7"
] | 11 | 2020-01-28T21:40:15.000Z | 2022-03-11T23:16:37.000Z | FCN/src/test_fcn16_vgg.py | JNingWei/Image_Segmentation | 4b1663c8b294cfa29da29a0f94dab066af69cd1e | [
"Python-2.0",
"OLDAP-2.7"
] | 6 | 2018-01-09T06:44:27.000Z | 2020-07-07T07:03:55.000Z | # coding=utf-8
"""
Image-Segmentation
Test fcn16_vgg.
__author__ = 'JNingWei'
"""
import os
import scipy as scp
import scipy.misc
import numpy as np
import logging
import tensorflow as tf
import sys
import fcn16_vgg
import utils
logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s',
... | 25.22807 | 91 | 0.698192 |
e400acfae69794f8bbfbf73b0bfa89608599d5ea | 716 | py | Python | back-end/src/analysis/run_query.py | akshah/iodb | 80fbad1cb639e2cad304d6565cf4918ee5b4e4c0 | [
"Apache-2.0"
] | null | null | null | back-end/src/analysis/run_query.py | akshah/iodb | 80fbad1cb639e2cad304d6565cf4918ee5b4e4c0 | [
"Apache-2.0"
] | null | null | null | back-end/src/analysis/run_query.py | akshah/iodb | 80fbad1cb639e2cad304d6565cf4918ee5b4e4c0 | [
"Apache-2.0"
] | null | null | null |
#!/usr/bin/python
import MySQLdb
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.mlab as mlab
from scipy.optimize import curve_fit
db = MySQLdb.connect(host="proton.netsec.colostate.edu", # your host, usually localhost
user="root", # your username
passwd="n3ts3cm5q1", # your p... | 20.457143 | 87 | 0.717877 |
7c3950c2adb6118939c817d22d334eb15afad236 | 4,337 | py | Python | mood_changing_items.py | I4-Projektseminar-HHU-2016/seminar-project-marionline03 | ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09 | [
"CC0-1.0"
] | null | null | null | mood_changing_items.py | I4-Projektseminar-HHU-2016/seminar-project-marionline03 | ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09 | [
"CC0-1.0"
] | null | null | null | mood_changing_items.py | I4-Projektseminar-HHU-2016/seminar-project-marionline03 | ec2b2d2b588baa647c7a5e542e1d20a39cd0fc09 | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Mood-Changing-Items
# Tabel to connect items and moods with effects
import logging
# for DB usage
import sqlite3
logging.basicConfig(filename='log.txt',level=logging.DEBUG)
#mood
def make_tabel_mood_changing_item():
try:
con = sqlite3.connect('game.db')
con.execute('''... | 33.10687 | 115 | 0.648374 |
7c60a0841be67e86adffa467846888e0407e73ed | 2,644 | py | Python | angstrom/2018/crypto/Randomized_Cipher/great_cipher.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2018/crypto/Randomized_Cipher/great_cipher.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2018/crypto/Randomized_Cipher/great_cipher.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/python3
#key = b"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
import random
def genPBox():
output = list(range(32))
while output == list(range(32)):
random.shuffle(output)
return output
def genSBox():
... | 29.054945 | 138 | 0.583585 |
7cfb98ca7cf19c446d4aa81604c6ed792bab35a7 | 2,315 | py | Python | GeM.py | henrique/jigsaw20 | 5d12de807667810ea9b9bdb9cbccebabea7ed21d | [
"Apache-2.0"
] | 8 | 2020-06-23T13:42:34.000Z | 2022-01-25T11:00:01.000Z | GeM.py | henrique/jigsaw20 | 5d12de807667810ea9b9bdb9cbccebabea7ed21d | [
"Apache-2.0"
] | null | null | null | GeM.py | henrique/jigsaw20 | 5d12de807667810ea9b9bdb9cbccebabea7ed21d | [
"Apache-2.0"
] | 3 | 2020-06-24T03:18:26.000Z | 2020-07-30T01:22:53.000Z | """ Generalized mean pooling layers """
import tensorflow as tf
class GeneralizedMeanPooling1D(tf.keras.layers.Layer):
def __init__(self, p=3, epsilon=1e-6, name='', **kwargs):
super().__init__(name, **kwargs)
self.init_p = p
self.epsilon = epsilon
def build(self, input_shape):
... | 40.614035 | 113 | 0.600864 |
d4bb74b0c16b9ca6ce190cd22ca3f6991fe01039 | 555 | py | Python | Sample/Python.py | I-am-4a/URLer | ef202e6879a966c862c8e5c24b0a959f06ff83a2 | [
"MIT"
] | null | null | null | Sample/Python.py | I-am-4a/URLer | ef202e6879a966c862c8e5c24b0a959f06ff83a2 | [
"MIT"
] | null | null | null | Sample/Python.py | I-am-4a/URLer | ef202e6879a966c862c8e5c24b0a959f06ff83a2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# [Python] URLer post request sample
# http://urler.cf/
# by I_am_4a
# http://www.iam4a.ml/
from requests import post
import json as j
# Request URL
url = "http://urler.cf/bin/urlgen2.php"
# Post Data
data = {"url": "YOUR LONG LONG URL"}
# Headers
headers = {"Content-Type":... | 16.818182 | 60 | 0.609009 |
d4dfc5f7cb42ec5dca9d900026da7f85930a443c | 541 | py | Python | listings/chapter08/euclid_gcd.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 6 | 2021-08-04T19:42:53.000Z | 2022-01-17T14:24:45.000Z | listings/chapter08/euclid_gcd.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 1 | 2021-08-30T06:32:08.000Z | 2021-08-30T06:42:46.000Z | listings/chapter08/euclid_gcd.py | rh0-me/ITHandbuch10 | 1582d6317e11cc958a14e157440dccf94d44583b | [
"Apache-2.0"
] | 1 | 2022-02-17T10:32:17.000Z | 2022-02-17T10:32:17.000Z | def gcd(m, n):
while n != 0:
print(f"{m}, {n}")
m, n = n, m % n
return m
if __name__ == '__main__':
while True:
m_input = input("Erste Zahl: ")
n_input = input("Zweite Zahl: ")
try:
m = int(m_input)
n = int(n_input)
except ValueError:
... | 25.761905 | 50 | 0.449168 |
ed50203307d8b7ef6a23b5b1164f22f14b83f836 | 2,620 | py | Python | methods/transformers/examples/movement-pruning/emmental/configuration_bert_masked.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | 3 | 2021-07-06T20:02:31.000Z | 2022-03-27T13:13:01.000Z | methods/transformers/examples/movement-pruning/emmental/configuration_bert_masked.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | null | null | null | methods/transformers/examples/movement-pruning/emmental/configuration_bert_masked.py | INK-USC/RiddleSense | a3d57eaf084da9cf6b77692c608e2cd2870fbd97 | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team.
# Copyright (c) 2018, NVIDIA CORPORATION. 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... | 36.388889 | 117 | 0.697328 |
9c09b4b98c4d2f2b120f87ecb27d76fde5e4e2ce | 2,118 | py | Python | backend/alembic/versions/e321bbcdb4ec_added_basic_task_hint.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2022-02-20T12:45:04.000Z | 2022-02-20T12:45:04.000Z | backend/alembic/versions/e321bbcdb4ec_added_basic_task_hint.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/alembic/versions/e321bbcdb4ec_added_basic_task_hint.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | """Added basic task hint
Revision ID: e321bbcdb4ec
Revises: 5adfbb5e4fd6
Create Date: 2021-09-22 16:18:03.848194
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
from sqlalchemy.engine import Inspector
revision = "e321bbcdb4ec"
down_revision = "5adfbb5e4fd6"
branch_labels ... | 32.090909 | 83 | 0.587347 |
92ce5084369290bd9c9bbe8258e00b22f702788d | 560 | py | Python | Implementation/vibrostudies-backend/db/admin.py | VibroStudies/vibrostudies | 24491d4dd193655e3036354174babc4ab17a8639 | [
"MIT"
] | null | null | null | Implementation/vibrostudies-backend/db/admin.py | VibroStudies/vibrostudies | 24491d4dd193655e3036354174babc4ab17a8639 | [
"MIT"
] | null | null | null | Implementation/vibrostudies-backend/db/admin.py | VibroStudies/vibrostudies | 24491d4dd193655e3036354174babc4ab17a8639 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import *
admin.site.register(User)
admin.site.register(Study)
admin.site.register(AbstractStudyObject)
admin.site.register(QualificationQuestion)
admin.site.register(DateQuestion)
admin.site.register(LinearScaleQuestion)
admin.site.register(MultipleChoiceQuestion)
admin.si... | 32.941176 | 44 | 0.855357 |
134350de52247c1b5bc1782ba828e02a2403a52c | 2,779 | py | Python | src/classifier/non_torch/non_torch_training.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 14 | 2021-08-24T12:36:37.000Z | 2022-03-18T12:14:36.000Z | src/classifier/non_torch/non_torch_training.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | null | null | null | src/classifier/non_torch/non_torch_training.py | krangelie/bias-in-german-nlg | 9fbaf50fde7d41d64692ae90c41beae61bc78d44 | [
"MIT"
] | 1 | 2021-10-21T20:22:55.000Z | 2021-10-21T20:22:55.000Z | import os
from datetime import datetime
import hydra.utils
import numpy as np
from sklearn.model_selection import StratifiedKFold
from src.classifier.utils import build_experiment_name
from src.classifier.classifier_training.classifier_utils import get_classifier
from src.classifier.non_torch.eval_non_torch import e... | 35.177215 | 92 | 0.589421 |
1392c245740668b86c3c47b4c8b14975f7532e20 | 13,476 | py | Python | graphs/graphs/Bayesian/BayVAE_graph.py | kkahloots/Generative-Models-03 | 5399fb8a504543b0a4196a81b182ead79ee247df | [
"MIT"
] | null | null | null | graphs/graphs/Bayesian/BayVAE_graph.py | kkahloots/Generative-Models-03 | 5399fb8a504543b0a4196a81b182ead79ee247df | [
"MIT"
] | null | null | null | graphs/graphs/Bayesian/BayVAE_graph.py | kkahloots/Generative-Models-03 | 5399fb8a504543b0a4196a81b182ead79ee247df | [
"MIT"
] | null | null | null | """
BayVAE_graph.py:
Tensorflow Graph for the Bayesian Variational Autoencoder
"""
__author__ = "Khalid M. Kahloot"
__copyright__ = "Copyright 2019, Only for professionals"
__paper__ = "https://arxiv.org/pdf/1606.05908.pdf"
import tensorflow as tf
from bases.base_graph import BaseGraph
import bases.... | 61.816514 | 163 | 0.508979 |
dbf80fa7b7b00f8aa579c7ac6ee61244cfd29325 | 567 | py | Python | angstrom/2021/crypto/Substitution/chall.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | angstrom/2021/crypto/Substitution/chall.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | angstrom/2021/crypto/Substitution/chall.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/python
from functools import reduce
with open("flag", "r") as f:
key = [ord(x) for x in f.read().strip()]
def substitute(value):
return (reduce(lambda x, y: x*value+y, key))%691
print("Enter a number and it will be returned with our super secret synthetic substitution technique")
while True:
... | 21 | 102 | 0.578483 |
e0344b9eb4601c7bfecc3ee3beaee7a810673e9c | 108 | py | Python | mumath/context/physics.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | mumath/context/physics.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | mumath/context/physics.py | fourpoints/mumath | f1c36c4a5b3c32a3e7f8e7a922eafea8b7a14fd4 | [
"MIT"
] | null | null | null | identifiers = {
r"\degree": "°", # °
r"\hbar": "ℏ", # ℏ
r"\h": "ℎ", # ℎ
}
| 18 | 30 | 0.398148 |
1625f30921028332deca386f3bca9bdf7397c340 | 173 | py | Python | 7-assets/past-student-repos/data_struct_and_algo-master/exists_in.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 4 | 2021-08-31T00:56:40.000Z | 2021-11-29T03:08:55.000Z | 7-assets/past-student-repos/data_struct_and_algo-master/exists_in.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 3 | 2022-02-14T18:48:11.000Z | 2022-03-30T05:26:26.000Z | 7-assets/past-student-repos/data_struct_and_algo-master/exists_in.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 1 | 2021-08-31T00:54:51.000Z | 2021-08-31T00:54:51.000Z | def find(arr,search,n):
for i in range(n):
if arr[i]== search:
return True
break
arr=[1,2,3,4,5,6]
search=4
print(find(arr,search,6))
| 14.416667 | 27 | 0.526012 |
bcc0135e5a58feb79e6204ae17c65e697ac39fd6 | 579 | py | Python | zencad/examples/1.GeomPrim/3.prim1d/rounded_polysegment.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/1.GeomPrim/3.prim1d/rounded_polysegment.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/1.GeomPrim/3.prim1d/rounded_polysegment.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
#coding: utf-8
from zencad import *
POINTS = [
(0,0,0),
(0,0,20),
(0,20,40),
(-90,20,40),
(-90,20,20),
(0,20,0),
]
POINTS2 = [(0,0), (20,0), (20,20)]
m0 = rounded_polysegment(POINTS, r=10)
m1 = rounded_polysegment(POINTS, r=10, closed=True)
m2 = rounded_polysegment(POINTS2, r=5, closed=... | 19.965517 | 58 | 0.658031 |
4c4d27f013403f3f7c5ed7b3cae5e95c65504182 | 1,366 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_16_Mails_und_SMS_senden/03_mails_empfangen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_16_Mails_und_SMS_senden/03_mails_empfangen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_16_Mails_und_SMS_senden/03_mails_empfangen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 03_mails_empfangen.py
# In dieser Übung geht es darum Mails von einem IMAP-Server auszulesen und den Inhalt auszugeben.
import imapclient, pyzmail
print('IMAP-Server angeben:')
imap_server=input()
print('Benutzername angeben:')
user_name=input()
print('Passwort angeben:')
password=input()
#Verbinde zu Server
imap... | 26.784314 | 97 | 0.784041 |
4c5b08f24bfb17870602afea32c072704394f1d8 | 10,063 | py | Python | mkdocs/nav.py | seth10/Seeed-WiKi | f384a440e2a900ba37ea8dd7945b65abbd380001 | [
"BSD-2-Clause"
] | 57 | 2016-09-28T01:19:35.000Z | 2022-01-07T13:59:21.000Z | mkdocs/nav.py | seth10/Seeed-WiKi | f384a440e2a900ba37ea8dd7945b65abbd380001 | [
"BSD-2-Clause"
] | 16 | 2017-02-06T15:48:03.000Z | 2018-02-28T21:40:10.000Z | mkdocs/nav.py | seth10/Seeed-WiKi | f384a440e2a900ba37ea8dd7945b65abbd380001 | [
"BSD-2-Clause"
] | 81 | 2016-09-06T04:21:06.000Z | 2022-03-10T06:32:45.000Z | # coding: utf-8
"""
Deals with generating the site-wide navigation.
This consists of building a set of interlinked page and header objects.
"""
from __future__ import unicode_literals
import datetime
import logging
import os
from mkdocs import utils, exceptions
log = logging.getLogger(__name__)
def filename_to_t... | 31.844937 | 100 | 0.639571 |
d5edc55545379765b8f613eeec5f3b3770f1fed0 | 3,989 | py | Python | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Archive/Tar/Tar.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 282 | 2016-06-16T14:41:44.000Z | 2022-03-02T03:43:02.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Archive/Tar/Tar.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 146 | 2016-06-16T08:55:45.000Z | 2020-09-08T10:37:32.000Z | mongodb/mongodb_consistent_backup/official/mongodb_consistent_backup/Archive/Tar/Tar.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 94 | 2016-06-16T10:49:07.000Z | 2022-03-28T09:14:03.000Z | import os
import logging
from copy_reg import pickle
from multiprocessing import Pool
from time import sleep
from types import MethodType
from TarThread import TarThread
from mongodb_consistent_backup.Errors import Error
from mongodb_consistent_backup.Pipeline import Task
# Allows pooled .apply_async()s to work on ... | 38.355769 | 117 | 0.587115 |
9147644da2ec141744e74956fa03f81b9e579fd1 | 503 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v5_4/set_root_and_report_type.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | frappe-bench/apps/erpnext/erpnext/patches/v5_4/set_root_and_report_type.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_4/set_root_and_report_type.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
roots = frappe.db.sql("""select lft, rgt, report_type, root_type
from `tabAccount` where ifnull(parent_account, '')... | 41.916667 | 100 | 0.719682 |
e68a2a94831db5e8538a7eaea9b640d6e2f99feb | 427 | py | Python | Licence 2/I33/TP 6/ex_6.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 2/I33/TP 6/ex_6.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 2/I33/TP 6/ex_6.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | def matmat(A, B):
if len(A[0]) != len(B):
return False
matrix = []
for i in range(len(A)):
ligne = []
for j in range(len(B[0])):
e = 0
for k in range(len(A[0])):
e += A[i][k] * B[k][j]
ligne.append(e)
matrix.append(ligne)
... | 23.722222 | 49 | 0.398126 |
e6cd4b82abe7b3f5a60509c8da76738b29c1cf21 | 556 | py | Python | tarefas-poo/lista-01/calculos/view/paineis/painel_multiplica.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-01/calculos/view/paineis/painel_multiplica.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-01/calculos/view/paineis/painel_multiplica.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # --------------------------
# UFSC - CTC - INE - INE5603
# Exercício calculos
# --------------------------
# Classe responsável por multiplicar dois números inteiros.
from view.paineis.painel_abstrato import PainelAbstrato
from model.calculos import multiplica
class PainelMultiplica(PainelAbstrato):
def __init__... | 29.263158 | 59 | 0.604317 |
5dabd1e9b3ddaafc44e5e9e7d801ba0e6b76f4e3 | 1,601 | py | Python | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/15_classes.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/15_classes.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/LambdaSchool-master/m6/61a1/src/15_classes.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # Make a class LatLon that can be passed parameters `lat` and `lon` to the
# constructor
class LatLon:
def __init__(self, lat, lon, **kwds):
self.lat = lat
self.lon = lon
super().__init__(**kwds)
def __str__(self):
return '%.2d, %.2d'%(self.lat, self.lon)
# Make a class W... | 32.02 | 97 | 0.658339 |
5de72a546d4beb6f5d6fbd0ca8efa8fc575b74d8 | 1,387 | py | Python | source/pkgsrc/lang/python39/patches/patch-Lib_distutils_unixccompiler.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/python39/patches/patch-Lib_distutils_unixccompiler.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/python39/patches/patch-Lib_distutils_unixccompiler.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-Lib_distutils_unixccompiler.py,v 1.1 2020/10/10 20:20:12 adam Exp $
Do not force RUNPATH vs RPATH, trust the compiler to know what the
platform wants.
--- Lib/distutils/unixccompiler.py.orig 2018-03-29 11:57:55.000000000 +0000
+++ Lib/distutils/unixccompiler.py
@@ -234,22 +234,7 @@ class UnixCCompiler(... | 43.34375 | 82 | 0.527758 |
5d4e4b341229a4c7f91b75360eac6b927158fc06 | 317 | py | Python | exercises/ja/exc_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/exc_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/exc_03_09_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | from spacy.lang.ja import Japanese
from spacy.tokens import Token
nlp = Japanese()
# デフォルト値がFalseである拡張属性「is_country」をトークンに追加
____.____(____, ____=____)
# テキストを処理し、「スペイン」のトークンについてis_country属性をTrueにする
doc = nlp("私はスペインに住んでいます。")
____ = True
# すべてのトークンについて、文字列とis_country属性を表示
print([(____, ____) for token in doc])
| 21.133333 | 46 | 0.782334 |
53ffc072b3b9abc72e1492fc2b099632ff63cf17 | 2,213 | py | Python | official/gnn/gat/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/gnn/gat/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/gnn/gat/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 35.693548 | 118 | 0.672842 |
0709123d330aaaa37f6ea1e480d9eac6df559f41 | 1,095 | py | Python | 6_ObjectOriented/own_list_class.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | 1 | 2022-03-02T07:16:30.000Z | 2022-03-02T07:16:30.000Z | 6_ObjectOriented/own_list_class.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | 6_ObjectOriented/own_list_class.py | felixdittrich92/Python3 | 16b767465e4bdf0adc652c195d15384bb9faa4cf | [
"MIT"
] | null | null | null | # eigene Listenklasse erstellen
# für eigene Listen/Sequenzen/etc. : https://docs.python.org/3/library/collections.abc.html
from collections.abc import MutableSequence
class MyOwnList(MutableSequence):
def __init__(self, values=None):
super().__init__() # erbt alles von Elternklasse
if values:
... | 26.071429 | 91 | 0.653881 |
ab252f53dc08760c07ebabeb47b173f2f8bfbfd8 | 10,872 | py | Python | .vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_tracing.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | 1 | 2020-08-07T16:09:57.000Z | 2020-08-07T16:09:57.000Z | .vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_tracing.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | .vscode/extensions/ms-python.python-2021.6.944021595/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_tracing.py | malbaker/dom_dotfiles | c452a9c8f86669f4f6289ddcd24e12690819991b | [
"MIT"
] | null | null | null | from _pydevd_bundle.pydevd_constants import get_frame, IS_CPYTHON, IS_64BIT_PROCESS, IS_WINDOWS, \
IS_LINUX, IS_MAC, IS_PY2, DebugInfoHolder, LOAD_NATIVE_LIB_FLAG, \
ENV_FALSE_LOWER_VALUES, GlobalDebuggerHolder, ForkSafeLock
from _pydev_imps._pydev_saved_modules import thread, threading
from _pydev_bundle i... | 38.690391 | 121 | 0.627391 |
db6b315df48129e4052f98e06a31083c75ed7d27 | 578 | py | Python | src/bo4e/enum/angebotsstatus.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/enum/angebotsstatus.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/enum/angebotsstatus.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
from bo4e.enum.strenum import StrEnum
class Angebotsstatus(StrEnum):
"""
Gibt den Status eines Angebotes an.
"""
KONZEPTION = "KONZEPTION" #: Konzeption
UNVERBINDLICH = "UNVERBINDLICH" #: unverbindlich
VERBINDLICH = "VERBINDLICH" #: verbindlich
... | 30.421053 | 53 | 0.681661 |
dbd16215fcbc7d3f0fff333e4d39eeb30b977ce6 | 2,360 | py | Python | Packs/CommonScripts/Scripts/ChangeContext/ChangeContext_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/ChangeContext/ChangeContext_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/ChangeContext/ChangeContext_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from ChangeContext import replace_context
from CommonServerPython import *
def test_capitalize_context_list_inplace(mocker):
context = [{'key': 'val', 'key2': 'val2'},
{'list2key1': 1, 'list2key2': 2}]
args = {'input': context, 'capitalize': 'True', 'inplace': 'Tru... | 49.166667 | 105 | 0.527542 |
91b57fb3d2385a420338846d21356b18f26333a0 | 2,074 | py | Python | official/cv/vit/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/vit/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/vit/postprocess.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... | 39.132075 | 107 | 0.668756 |
91b7ab83166337a0493b2fe5aa8c39a6d8d2be5d | 1,587 | py | Python | CodeStatistics/CodeStatistics/views/account.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | CodeStatistics/CodeStatistics/views/account.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | CodeStatistics/CodeStatistics/views/account.py | zhangyafeii/Flask | 9c9a5ea282f77aabcda838796dad2411af9b519f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@Datetime: 2018/12/25
@Author: Zhang Yafei
"""
from flask import Blueprint,redirect,render_template
from flask.globals import request,session
from CodeStatistics.utils.get_md5 import get_md5
from datetime import timedelta
from CodeStatistics.utils.MySQLHelper import fetchone
ac = Blueprin... | 35.266667 | 137 | 0.691871 |
5350d61b8dc995775e772e5abc6e1b0ccb378570 | 8,892 | py | Python | research/cv/StarGAN/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 1 | 2021-11-18T08:17:44.000Z | 2021-11-18T08:17:44.000Z | research/cv/StarGAN/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | null | null | null | research/cv/StarGAN/train.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 2 | 2019-09-01T06:17:04.000Z | 2019-10-04T08:39:45.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.418182 | 114 | 0.645974 |
f45f433b6f3ab0ed8c2adef789767f001cf95164 | 427 | py | Python | 1_basics/2_ersteUebung.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | 1_basics/2_ersteUebung.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | 1_basics/2_ersteUebung.py | Coding-for-the-Arts/drawbot-samples | e37994f3497aca252312431100b53548b4573f15 | [
"CC0-1.0"
] | null | null | null | """
Form und Fläche
"""
newPage(1000, 1000)
rect(200, 200, 600, 600)
"""
- Klicke auf «run» (cmd r)
- Ändere die Werte in den Klammern und klicke auf «run» (cmd r)
- Kannst du aus dem Quadrat ein Rechteck machen?
- Kannst du das Rechteck in die untere linke Ecke schieben?
- Wofür stehen die Zahlen in der Klammer nac... | 25.117647 | 92 | 0.725995 |
be65ef7ecd689ff63bb93ab401763108c5455b75 | 1,196 | py | Python | code/snake/Algorithms/SituationLukas.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 1 | 2020-03-30T09:25:53.000Z | 2020-03-30T09:25:53.000Z | code/snake/Algorithms/SituationLukas.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | 2 | 2020-02-05T14:00:23.000Z | 2020-03-30T19:57:19.000Z | code/snake/Algorithms/SituationLukas.py | BogyMitutoyoCTL/AI-Preparation | ef535741816b02e5e63d426a3232a688c9abd726 | [
"MIT"
] | null | null | null | from GameData import GameData
class maske:
def __init__(self, kantenlaenge, maskenbezeichnung: str):
self.bezeichnung = maskenbezeichnung
self.kantenlaenge = kantenlaenge
self.fields = []
self.vektoren = []
def maskenbezeichnungAuswerten(self):
self.bezeichnung = self.b... | 33.222222 | 94 | 0.571906 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.