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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6536220c32cabc58a7f2e7b369fa1f3cae8972d1 | 2,948 | py | Python | tests/test_tokenization_pegasus.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 12 | 2021-06-05T03:51:23.000Z | 2022-03-05T05:09:41.000Z | tests/test_tokenization_pegasus.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 1 | 2021-03-21T03:28:23.000Z | 2021-03-21T06:06:39.000Z | tests/test_tokenization_pegasus.py | suliuzh/transformers | f34372a9ff99f6bc8619ac83dc07f7afe6b92141 | [
"Apache-2.0"
] | 2 | 2021-03-27T16:46:26.000Z | 2021-12-24T00:33:28.000Z | import unittest
from transformers import PegasusTokenizer, PegasusTokenizerFast
from transformers.file_utils import cached_property
from transformers.testing_utils import get_tests_dir, require_sentencepiece, require_tokenizers, require_torch
from .test_tokenization_common import TokenizerTesterMixin
SAMPLE_VOCAB =... | 42.114286 | 119 | 0.721506 |
333d6c1c4068ed5e30b3d846ccc94b46394db909 | 11,540 | py | Python | publ/index.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 6 | 2018-03-29T02:07:44.000Z | 2018-09-26T00:17:31.000Z | publ/index.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | 82 | 2018-04-01T08:53:59.000Z | 2018-09-28T23:45:05.000Z | publ/index.py | fluffy-critter/Publ | 868c5a17c605707dde4d1a95d79405301bd12f05 | [
"MIT"
] | null | null | null | # index.py
''' Content indexer '''
import concurrent.futures
import logging
import os
import threading
import time
import typing
import watchdog.events
import watchdog.observers
from pony import orm
from . import category, entry, model, utils
LOGGER = logging.getLogger(__name__)
ENTRY_TYPES = ['.md', '.htm', '.htm... | 35.075988 | 89 | 0.620191 |
681c5f0a130596696b70bd0474e3451a0c3a1428 | 98 | py | Python | packages/watchmen-rest/src/watchmen_rest/exceptions.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest/src/watchmen_rest/exceptions.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-rest/src/watchmen_rest/exceptions.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | class RestAppException(Exception):
pass
class InitialRestAppException(RestAppException):
pass
| 14 | 48 | 0.836735 |
685fe5ab575dbc0141c66e6dc495499d5feb8872 | 94 | py | Python | deutschland/presseportal/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | 445 | 2021-07-26T22:00:26.000Z | 2022-03-31T08:31:08.000Z | deutschland/presseportal/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | 30 | 2021-07-27T15:42:23.000Z | 2022-03-26T16:14:11.000Z | deutschland/presseportal/__init__.py | kiranmusze/deutschland | 86d8ead3f38ad88ad66bb338b9f5a8db06992344 | [
"Apache-2.0"
] | 28 | 2021-07-27T10:48:43.000Z | 2022-03-26T14:31:30.000Z | # Put pypresseportal stuff in deutschland.presseportal namespace
from pypresseportal import *
| 31.333333 | 64 | 0.851064 |
68afe8c72167b3429ea7378fd3b52b1163abbe8a | 268 | py | Python | Contests/DMOPC '17 Contest 4 P1 - Ribbon Colouring Fun.py | MastaCoder/Projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 5 | 2018-10-11T01:55:40.000Z | 2021-12-25T23:38:22.000Z | Contests/DMOPC '17 Contest 4 P1 - Ribbon Colouring Fun.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | null | null | null | Contests/DMOPC '17 Contest 4 P1 - Ribbon Colouring Fun.py | MastaCoder/mini_projects | ebb0a3134522b12f052fec8d753005f384adf1b1 | [
"MIT"
] | 1 | 2019-02-22T14:42:50.000Z | 2019-02-22T14:42:50.000Z | info = input().split(" ")
info = [int(i) for i in info]
strokes = [[0]*2 for n in range(info[1])]
strip = [0 for n in range(info[0])]
for a in range(info[1]):
strokes[a] = input().split(" ")
blue = strip.count(1)
print(str(info[0] - blue) + " " + str(blue)) | 24.363636 | 44 | 0.567164 |
f0d5bbce64b4f04a7c92fc3c619663bbd73880e1 | 4,589 | py | Python | bawwab/action.py | leibniz-psychology/bawwab | 2e7129bf59b33c0ee22a960e7b2835888068fd1a | [
"MIT"
] | 2 | 2021-07-06T06:00:22.000Z | 2022-01-15T09:29:44.000Z | bawwab/action.py | leibniz-psychology/bawwab | 2e7129bf59b33c0ee22a960e7b2835888068fd1a | [
"MIT"
] | 11 | 2020-11-26T10:53:44.000Z | 2022-03-31T09:42:51.000Z | bawwab/action.py | leibniz-psychology/bawwab | 2e7129bf59b33c0ee22a960e7b2835888068fd1a | [
"MIT"
] | 1 | 2022-01-15T09:30:46.000Z | 2022-01-15T09:30:46.000Z | # Copyright 2019–2020 Leibniz Institute for Psychology
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 32.546099 | 100 | 0.743517 |
7636a01c962e53d673771eb2f259355f16ddb637 | 586 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex09_wellformed_braces.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex09_wellformed_braces.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/ch04_strings/solutions/ex09_wellformed_braces.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
def check_braces(input):
opening_count = 0
for ch in input:
if ch == "(":
opening_count += 1
elif ch == ")":
opening_count -= 1
if opening_count < 0:
retu... | 19.533333 | 50 | 0.53413 |
76608c7cfcdbd543e709950636272f59e8b67d2e | 181 | py | Python | bp-revok/python/bin/pilconvert.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | null | null | null | bp-revok/python/bin/pilconvert.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | null | null | null | bp-revok/python/bin/pilconvert.py | fkolacek/FIT-VUT | bb6f7f6eb1fea1f13952e0ab463e5aa69a84084c | [
"Apache-2.0"
] | 3 | 2017-04-07T12:02:22.000Z | 2020-03-23T12:11:55.000Z | #!/usr/bin/env python
# EASY-INSTALL-SCRIPT: 'Pillow==2.7.0','pilconvert.py'
__requires__ = 'Pillow==2.7.0'
__import__('pkg_resources').run_script('Pillow==2.7.0', 'pilconvert.py')
| 36.2 | 72 | 0.707182 |
4f103da1aebf3b52bae71cee1057b2b9c2b95f20 | 2,434 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_15_Aufgaben_zeitlich_Planen_und_Programme_starten/06_kapitel_15_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_15_Aufgaben_zeitlich_Planen_und_Programme_starten/06_kapitel_15_repetitionsfragen.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_15_Aufgaben_zeitlich_Planen_und_Programme_starten/06_kapitel_15_repetitionsfragen.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 06_kapitel_15_repetitionsfragen.py
import re
max_text_length=70
max_text_delta=24
def output(title, string):
print('╔'+''.center(max_text_length+8, '═')+'╗')
print('║ '+title.center(max_text_length+7).upper()+'║')
print('╠'+''.center(max_text_length+8, '═')+'╣')
string=string+' '*max_text_length
... | 56.604651 | 253 | 0.737058 |
4f70a0316673b50a1ab16f5aa9864f04d9d33edc | 1,044 | py | Python | python/kmpuzzles.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | python/kmpuzzles.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | python/kmpuzzles.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | puzzles = ["Max vhlm hy max unl wkboxk ingva B nlxw mh ingva fr hpg mktglyxkl",
"Estd mzzv esle elfrse xp szh ez ncplep yph topyetetpd hspy T hld l acp-eppy",
"pbzfsobp dkfobtpkx lq pbkfi ppbkfpry aoxtolc iixz lq abpr bobt pbzfsba cl bmvq obail bpbeQ",
"gsvmznlugsvnzrmuiznvhrszxpvwzgf\r... | 69.6 | 104 | 0.706897 |
e842d738f7e16ba311e3b5339c8278727f96fe27 | 721 | py | Python | exercises/fr/test_03_10_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/test_03_10_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/test_03_10_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert Span.has_extension("to_html"), "As-tu déclaré l'extension du span ?"
ext = Span.get_extension("to_html")
assert ext[1] is not None, "As-tu défini la méthode correctement ?"
assert "method=to_html" in __solution__, "As-tu affecté to_html comme méthode ?"
assert (
'span._.to... | 42.411765 | 84 | 0.672677 |
fa0b82d384959e0e504b42d8d33542def3fadc70 | 342 | py | Python | pacman-arch/test/pacman/tests/sync040.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/sync040.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/sync040.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "Install two targets from a sync db with a conflict"
sp1 = pmpkg("pkg1")
sp1.conflicts = ["pkg2"]
sp2 = pmpkg("pkg2")
for p in sp1, sp2:
self.addpkg2db("sync", p);
self.args = "-S %s" % " ".join([p.name for p in (sp1, sp2)])
self.addrule("PACMAN_RETCODE=1")
for p in sp1, sp2:
self.addrule("!PK... | 21.375 | 71 | 0.646199 |
fa70456ae1c5f698b83200943928c40770fe9d50 | 4,935 | py | Python | src/bo4e/bo/vertrag.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 1 | 2022-03-02T12:49:44.000Z | 2022-03-02T12:49:44.000Z | src/bo4e/bo/vertrag.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | 21 | 2022-02-04T07:38:46.000Z | 2022-03-28T14:01:53.000Z | src/bo4e/bo/vertrag.py | bo4e/BO4E-python | 28b12f853c8a496d14b133759b7aa2d6661f79a0 | [
"MIT"
] | null | null | null | """
Contains Vertrag class
and corresponding marshmallow schema for de-/serialization
"""
from datetime import datetime
from typing import List, Optional
import attr
from marshmallow import fields
from marshmallow_enum import EnumField # type:ignore[import]
from bo4e.bo.geschaeftsobjekt import Geschaeftsobjekt, Gesc... | 43.289474 | 168 | 0.766768 |
d753c8b67a0c45160df885f0e8c7c1f454f5186c | 930 | py | Python | python/en/archive/code_snippets/read_wavfile.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/code_snippets/read_wavfile.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/code_snippets/read_wavfile.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | '''
Rev.2: 2020-01-14 (Tue)
Rev.1: 2019-12-03 (Tue)
Draft: Sometime ago
File name
* Note a function name read_wav already exists.
* Change file name from get_input_wav to read_wavfile.
TODO:
1. Check line to ensure file's file extension is .wav.
2. Complete if __name__ == '__main__':
'''
def read_wavfile( file, no... | 23.25 | 70 | 0.619355 |
ad58df9554dc71d9701ad1f6069d97c9b1a1f23d | 10,450 | py | Python | python/odml/test_scripts/inline_style.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/test_scripts/inline_style.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/test_scripts/inline_style.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | import odml
doc = odml.Document()
sec = doc.create_section(name="secname")
prop = sec.create_property(name="propname", value=["a", "b", "c"])
template = """<xsl:template match="odML">
<xsl:variable name="repository" select="repository"/>
<html>
<!-- <head> //-->
<style type="text/css">
... | 46.860987 | 136 | 0.489952 |
7e3eb660f60f374561de9e11c097a26f8cbceb1c | 736 | py | Python | VeterinerApp/VetApps/migrations/0003_auto_20211111_0105.py | icakmak/Veteriner | c6445008197f078fdc3f509a3d4b0323532c1df9 | [
"MIT"
] | null | null | null | VeterinerApp/VetApps/migrations/0003_auto_20211111_0105.py | icakmak/Veteriner | c6445008197f078fdc3f509a3d4b0323532c1df9 | [
"MIT"
] | null | null | null | VeterinerApp/VetApps/migrations/0003_auto_20211111_0105.py | icakmak/Veteriner | c6445008197f078fdc3f509a3d4b0323532c1df9 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-10 22:05
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('VetApps', '0002_auto_20211110_2331'),
]
operations = [
migrations.AlterField(
model_name='anima... | 29.44 | 128 | 0.639946 |
bc08a6b1990b952527a50a34b3e7545261bf7a36 | 693 | py | Python | python/en/_packages/nltk/test_stemming.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_packages/nltk/test_stemming.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/_packages/nltk/test_stemming.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # test_stemming.py
from nltk.stem import PorterStemmer
ps = PorterStemmer()
text = ["python","pythoner","pythoning","pythoned","pythonly"]
for word in text:
print( ps.stem(word) )
from nltk.tokenize import word_tokenize
sentence = "Stemming finds the origin of a word; writ is the stem of the forms wr... | 26.653846 | 101 | 0.645022 |
cb12f721b1ec4a19692e68904571d39bb254e553 | 1,169 | py | Python | research/recommend/Fat-DeepFFM/src/config.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/recommend/Fat-DeepFFM/src/config.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/recommend/Fat-DeepFFM/src/config.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... | 31.594595 | 77 | 0.641574 |
384ac46a529a1c709b62d2b35f09543c69e70e79 | 6,499 | py | Python | AI_Engine_Development/Design_Tutorials/08-n-body-simulator/Module_01_python_sims/test.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | 567 | 2019-10-01T16:31:26.000Z | 2022-03-31T18:43:30.000Z | AI_Engine_Development/Design_Tutorials/08-n-body-simulator/Module_01_python_sims/test.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | 142 | 2019-11-25T14:42:16.000Z | 2022-03-31T15:06:56.000Z | AI_Engine_Development/Design_Tutorials/08-n-body-simulator/Module_01_python_sims/test.py | jlamperez/Vitis-Tutorials | 9a5b611caabb5656bbb2879116e032227b164bfd | [
"Apache-2.0"
] | 387 | 2019-10-10T09:14:00.000Z | 2022-03-31T02:51:02.000Z | # Copyright 2021 Xilinx Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 42.477124 | 132 | 0.664256 |
69e7b00b4b82ce2e049f56afb01158c272623fab | 193 | py | Python | packages/watchmen-model/src/watchmen_model/system/tenant.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/system/tenant.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-model/src/watchmen_model/system/tenant.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from pydantic import BaseModel
from watchmen_model.common import OptimisticLock, TenantId, Tuple
class Tenant(Tuple, OptimisticLock, BaseModel):
tenantId: TenantId = None
name: str = None
| 21.444444 | 65 | 0.797927 |
2acf486c78183034f9e943502db3a473186e635f | 497 | py | Python | Split_Audio/split.py | g-ghosh/Final-Thesis | 3f49bbb43bb1f67f927ba4d9c8887f4e3ada8ff0 | [
"MIT"
] | 1 | 2021-08-21T06:19:44.000Z | 2021-08-21T06:19:44.000Z | Split_Audio/split.py | Swastik1993/Final-Thesis | 86b809c7ffea5b6d456a57f38ff278e45ea82d9a | [
"MIT"
] | null | null | null | Split_Audio/split.py | Swastik1993/Final-Thesis | 86b809c7ffea5b6d456a57f38ff278e45ea82d9a | [
"MIT"
] | 1 | 2019-03-13T15:12:50.000Z | 2019-03-13T15:12:50.000Z | from pydub import AudioSegment
from pydub.silence import split_on_silence
sound_file = AudioSegment.from_wav("small_audio.wav")
audio_chunks = split_on_silence(sound_file,
# must be silent for at least half a second
min_silence_len=100,
# consider it silent if quieter than -16 dBFS
silence_thresh=-20... | 27.611111 | 55 | 0.736419 |
2df7362811d793bbd1097b1c646b68dc464cd555 | 2,244 | py | Python | storage/emulated/0/qpython/scripts3/say_chat.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | storage/emulated/0/qpython/scripts3/say_chat.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | storage/emulated/0/qpython/scripts3/say_chat.py | wangkaibiao/SettlersFinancialData3 | 498249e14f24bfa3186f07e8f66ee624d08c6ff1 | [
"MIT"
] | null | null | null | __author__ = "Brian Lenihan <brian.lenihan@gmail.com"
__copyright__ = "Copyright (c) 2012 Python for Android Project"
__license__ = "Apache License, Version 2.0"
import logging
import androidhelper
from pyxmpp2.jid import JID
from pyxmpp2.client import Client
from pyxmpp2.settings import XMPPSettings
from p... | 30.324324 | 86 | 0.688503 |
9342775f8fa2e565120425aeafef53ff0febc670 | 309 | py | Python | exercises/de/exc_02_05_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/de/exc_02_05_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/de/exc_02_05_03.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
nlp = spacy.blank("de")
# Importiere die Klasse Doc
from ____ import ____
# Erwarteter Text: "Was, echt?!"
words = [____, ____, ____, ____, ____]
spaces = [____, ____, ____, ____, ____]
# Erstelle ein Doc mit den Wörtern und Leerzeichen
doc = ____(____, ____=____, ____=____)
print(doc.text)
| 20.6 | 50 | 0.705502 |
fad99d57dfe59f10dd7821529082fcbc959d5a26 | 2,367 | py | Python | nz_crawl_demo/day9/jianshu/jianshu/pipelines.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | null | null | null | nz_crawl_demo/day9/jianshu/jianshu/pipelines.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 27 | 2020-02-12T07:55:58.000Z | 2022-03-12T00:19:09.000Z | nz_crawl_demo/day9/jianshu/jianshu/pipelines.py | gaohj/nzflask_bbs | 36a94c380b78241ed5d1e07edab9618c3e8d477b | [
"Apache-2.0"
] | 2 | 2020-02-18T01:54:55.000Z | 2020-02-21T11:36:28.000Z | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: https://docs.scrapy.org/en/latest/topics/item-pipeline.html
import pymysql
from pymysql import cursors
class JianshuPipeline(object):
def __init__(self):
dbparams = {
... | 29.222222 | 91 | 0.575834 |
35b89aa34c8981e488710f13efba84b993620c94 | 849 | py | Python | 7-assets/past-student-repos/Data-Structures-master/python/binary_search_tree/test_binary_search_tree.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 29 | 2018-04-18T07:43:27.000Z | 2021-12-13T17:24:24.000Z | 7-assets/past-student-repos/Data-Structures-master/python/binary_search_tree/test_binary_search_tree.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Data-Structures-master/python/binary_search_tree/test_binary_search_tree.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | 46 | 2018-08-18T15:59:15.000Z | 2021-11-17T02:14:51.000Z | import unittest
from binary_search_tree import BinarySearchTree
class BinarySearchTreeTests(unittest.TestCase):
def setUp(self):
self.bst = BinarySearchTree(5)
def test_insert(self):
self.bst.insert(2)
self.bst.insert(3)
self.bst.insert(7)
self.bst.insert(6)
self.assertEqual(self.bst.left.... | 25.727273 | 50 | 0.699647 |
ea22e808d49c824698078f2b12b229d3d999a2b7 | 1,733 | py | Python | WiSe-2122/Uebung-8/U8-A2_Warteschlange.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | WiSe-2122/Uebung-8/U8-A2_Warteschlange.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | WiSe-2122/Uebung-8/U8-A2_Warteschlange.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Im Einwohnermeldeamt soll ein neues System implementiert werden.
# Ankommende Besucher müssen sich mit ihrem Namen anmelden. Jeder weitere Besucher stellt sich danach
# „hinten“ an. Es entsteht ein Warteschlange (Liste). Die Besucher werden der Reihe nach aufgerufen
# und verlassen die Warteschlange (First-In-First-O... | 32.698113 | 101 | 0.731102 |
a4e346900476fb996b48e1381755e7ef0989dbfb | 409 | py | Python | Licence 1/I11/TP3/tp3_4_5.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 8 | 2020-11-26T20:45:12.000Z | 2021-11-29T15:46:22.000Z | Licence 1/I11/TP3/tp3_4_5.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | null | null | null | Licence 1/I11/TP3/tp3_4_5.py | axelcoezard/licence | 1ed409c4572dea080169171beb7e8571159ba071 | [
"MIT"
] | 6 | 2020-10-23T15:29:24.000Z | 2021-05-05T19:10:45.000Z | # nombres : de 48 à 57
# lettres : de 92 à 122
text = input("entez une chaine de caracteres")
words = text.split(" ")
numbers = ""
for word in words:
i = 0
containsLetter = 92 <= ord(word[i]) <= 122
while i < len(word) and containsLetter:
containsLetter = 92 <= ord(word[i]) <= 122
i += 1... | 24.058824 | 51 | 0.596577 |
352876aeebfe81ebb14421b045af3458ae749518 | 358 | py | Python | s-mbf-master/src/Backdir.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 50 | 2019-03-07T16:33:01.000Z | 2022-01-05T11:13:47.000Z | s-mbf-master/src/Backdir.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 3 | 2019-03-11T08:26:38.000Z | 2019-08-08T17:39:42.000Z | s-mbf-master/src/Backdir.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 38 | 2019-03-28T16:03:38.000Z | 2021-04-01T10:40:26.000Z | import os
try:
os.mkdir('../s-mbf_backupdir')
except: pass
try:
print('[moving] result folder')
os.system('mv result ../s-mbf_backupdir')
except: pass
try:
print('[moving] checker folder')
os.system('mv checker ../s-mbf_backupdir')
except: pass
try:
print('[moving] toket folder')
os.system('mv to... | 21.058824 | 44 | 0.670391 |
10295b59b7ccce4504b73a9b315f836d6c07a777 | 400 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/utils/multigrid/__init__.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 883 | 2020-11-12T11:46:46.000Z | 2022-03-31T18:27:10.000Z | paddlevideo/utils/multigrid/__init__.py | arkofgalaxy/PaddleVideo | 64251233c83b7eb681061b454da198a9082309a6 | [
"Apache-2.0"
] | 233 | 2020-12-09T06:04:59.000Z | 2022-03-28T08:16:51.000Z | paddlevideo/utils/multigrid/__init__.py | arkofgalaxy/PaddleVideo | 64251233c83b7eb681061b454da198a9082309a6 | [
"Apache-2.0"
] | 225 | 2020-11-13T06:21:55.000Z | 2022-03-31T05:36:11.000Z | from .multigrid import MultigridSchedule
from .batchnorm_helper import get_norm, aggregate_sub_bn_stats
from .short_sampler import DistributedShortSampler
from .save_load_helper import subn_save, subn_load
from .interval_helper import is_eval_epoch
__all__ = [
'MultigridSchedule', 'get_norm', 'aggregate_sub_bn_sta... | 36.363636 | 72 | 0.82 |
52f4523b80f54e14090cdf64eaf918c6a6bf79a6 | 1,485 | py | Python | traiangle.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | traiangle.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | traiangle.py | mayur200/hacktoberfest2021 | 5f141fe6dc90916d65bef17a66f0db05649c41ef | [
"MIT"
] | null | null | null | # define a function for calculating
# the area of a shapes
def calculate_area(name):\
# converting all characters into lower cases
name = name.lower()
# check for the conditions
if name == "rectangle":
l = int(input("Enter rectangle's length: "))
b = int(input("Enter rectangle's breadth: "))
# calculate area of ... | 23.571429 | 75 | 0.683502 |
5e2893b0211530b51555c2a09cfd412b92ef193b | 3,229 | py | Python | roll20export/__init__.py | JoergRue/SephrastoRoll20Export | 47840bb550cabe817dcd67e73dd25f810ebd06b2 | [
"MIT"
] | null | null | null | roll20export/__init__.py | JoergRue/SephrastoRoll20Export | 47840bb550cabe817dcd67e73dd25f810ebd06b2 | [
"MIT"
] | null | null | null | roll20export/__init__.py | JoergRue/SephrastoRoll20Export | 47840bb550cabe817dcd67e73dd25f810ebd06b2 | [
"MIT"
] | 1 | 2022-02-04T10:04:22.000Z | 2022-02-04T10:04:22.000Z | from PyQt5 import QtWidgets, QtCore, QtGui
from EventBus import EventBus
from Wolke import Wolke
import os.path
from roll20export import roll20Exporter
import logging
import traceback
import Version
def doRoll20Export():
result = -1
if os.path.isdir(Wolke.Settings['Pfad-Chars']):
startDir = Wolke.Sett... | 40.873418 | 123 | 0.693713 |
d81fe2ef98a7b84610f26986eeb6865b9b47e4cb | 6,715 | py | Python | examples/benchmark/clue/grid_search_tools/draw_pic.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/benchmark/clue/grid_search_tools/draw_pic.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | examples/benchmark/clue/grid_search_tools/draw_pic.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 34.435897 | 99 | 0.495309 |
f4e7a670f472bd20b45a34e657b70ea924a760ed | 6,121 | py | Python | TikTok-Checker-main/TikTok-Checker-3v.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 52 | 2020-12-03T00:36:31.000Z | 2022-03-03T09:14:11.000Z | TikTok-Checker-main/TikTok-Checker-3v.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 14 | 2021-01-27T21:59:27.000Z | 2022-02-27T23:09:58.000Z | TikTok-Checker-main/TikTok-Checker-3v.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 30 | 2020-12-02T23:49:17.000Z | 2022-03-11T16:38:55.000Z | import requests
import json
import time
from colorama import Fore,init
from time import sleep
count=0
green_color = "\033[1;93m"
C = "\033[0m"
W = "\033[96m"
BRed="\033[1;31m"
Green="\033[0;36m"
Yellow="\033[0;33m"
print( green_color +'''
_______ _ _ _______ _ _____ _ ... | 39.237179 | 184 | 0.485542 |
521204dfd5f2da599b5ed75942d5777e5abe6cfa | 1,742 | py | Python | apps/projects/migrations/0002_add_categories.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 2 | 2018-05-18T08:38:29.000Z | 2018-05-22T08:26:09.000Z | apps/projects/migrations/0002_add_categories.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 118 | 2017-10-31T13:45:09.000Z | 2018-02-24T20:51:42.000Z | apps/projects/migrations/0002_add_categories.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | null | null | null | # Generated by Django 2.0 on 2018-01-24 13:28
from django.db import migrations
categories = [
{
'name': 'Spielzeuge',
'children': ['Drohne', 'RC-Car']
},
{
'name': 'Fahrzeuge',
'children': ['PKW', 'LKW', 'Schiff', 'Flugzeug']
},
{
'name': 'Hausgeräte',
... | 25.246377 | 66 | 0.566016 |
bff9b957bd5da7698a5e4fe338023aae2fa3d06a | 1,701 | py | Python | misc/3d_graph_iroiro.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | misc/3d_graph_iroiro.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | misc/3d_graph_iroiro.py | YoshimitsuMatsutaIe/hoge_flow_test | 22e2e2ce043a3107bd06449f6f9958641293e414 | [
"MIT"
] | null | null | null | """3dグラフ()"""
"""3dグラフ作って回してるだけ
https://stackoverflow.com/questions/10374930/matplotlib-annotating-a-3d-scatter-plot
"""
# import numpy as np
# from mpl_toolkits.mplot3d import axes3d
# import matplotlib.pyplot as plt
# from numpy.random import rand
# from matplotlib import animation
# m = rand(3,3) # m is an array... | 23.625 | 84 | 0.655497 |
21e22598f9dadbce78613852708f4bbde1679334 | 1,343 | py | Python | Prototype/main prototype/test/TestScript_031.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 4 | 2019-12-03T16:13:09.000Z | 2019-12-11T23:22:58.000Z | Prototype/main prototype/test/TestScript_031.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | 65 | 2019-12-08T17:43:59.000Z | 2020-08-14T15:26:21.000Z | Prototype/main prototype/test/TestScript_031.py | fowado/BauphysikSE1 | eb8805196c8fbf99a879c40c5e0725d740c5a0de | [
"CC-BY-4.0"
] | null | null | null | import unittest
import Calculation
from TabData import TabData
from LayerData import LayerData
class TestScript_031(unittest.TestCase):
"""
Temperaturverlaufs-Berechnung 2 Schichten
analog manuellem TestScript_019
"""
def setUp(self):
self.layer_1 = LayerData()
self.layer_1.r = 2.5... | 26.86 | 70 | 0.600149 |
1d995e66df72ffd9fcd553a0911ab864fa639b9d | 6,852 | py | Python | Packs/AlienVault_USM_Anywhere/Integrations/AlienVault_USM_Anywhere/AlienVault_USM_Anywhere_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AlienVault_USM_Anywhere/Integrations/AlienVault_USM_Anywhere/AlienVault_USM_Anywhere_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AlienVault_USM_Anywhere/Integrations/AlienVault_USM_Anywhere/AlienVault_USM_Anywhere_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import io
import json
import pytest
import demistomock as demisto
import dateparser
from datetime import datetime, timedelta
server_url = 'https://vigilant.alienvault.cloud/api/2.0/alarms?page=0&size=1' \
'&sort=timestamp_occured%2Casc×tamp_occured_gte=1547567249000'
def util_load_json(path):
w... | 41.780488 | 122 | 0.535464 |
d520b98b3ac3539e354d71e01565625bc787478a | 775 | py | Python | libs/langdetect/LangDetectModel.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | libs/langdetect/LangDetectModel.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | libs/langdetect/LangDetectModel.py | surfmachine/language-detection | b44fbb4c7b59fc70388197653060cee67b5a2ee7 | [
"MIT"
] | null | null | null | import os
import sys
sys.path.append(os.path.dirname(__file__))
from libs.AbstractLanguageDetectionModel import AbstractLanguageDetectionModel
from langdetect import detect
from langdetect import detect_langs
class LangDetectModel(AbstractLanguageDetectionModel):
def __init__(self):
AbstractLanguageDete... | 26.724138 | 78 | 0.665806 |
898bedb3507b605428b848ba4feb95ede84c7c3c | 1,110 | py | Python | Packs/CommonScripts/Scripts/HTMLtoMD/HTMLtoMD.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/CommonScripts/Scripts/HTMLtoMD/HTMLtoMD.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/CommonScripts/Scripts/HTMLtoMD/HTMLtoMD.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import demistomock as demisto
from CommonServerPython import *
from markdownify import markdownify as md
def html_to_md_command(args):
"""
Converts HTML to MD formatted string.
:type args: ``dict``
:param args: Demisto args object.
:rtype: ``tuple``
:return: Tuple of Demisto response parts.
... | 25.227273 | 78 | 0.599099 |
8998529b8a0003f473b1515de2a0534af5f6d7ca | 3,031 | py | Python | test/unit/group_cascade_test.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | test/unit/group_cascade_test.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | test/unit/group_cascade_test.py | hdkai/Raw-IO | f0fa928d7ef59a363c6f4c876d642af6dede6ae4 | [
"Apache-2.0"
] | null | null | null | #
# RawIO
# Copyright (c) 2021 Yusuf Olokoba.
#
from cv2 import drawMatches
from imageio import imwrite
from numpy import asarray
from pathlib import Path
from PIL import Image
from pytest import fixture, mark
from rawio.grouping import group_exposures, timestamp_similarity, wavelet_similarity
@fixture
def simi... | 33.307692 | 111 | 0.662818 |
f69ec8324b73ff10b3d9d32888c5811c878f94d1 | 394 | py | Python | 0-notes/job-search/Leetcode/13-MilkBottles.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Leetcode/13-MilkBottles.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 0-notes/job-search/Leetcode/13-MilkBottles.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | # Milk Bottles
# https://leetcode.com/discuss/interview-question/707939/Microsoft-or-Azure-or-Milk-Bottles
# If i can exchange 3 empty bottles for one full bottle, given that i have 18 full milk bottles
# initially, how many milk bottles can i drink?
# Generalize this for 'n' bottles
def bottles(n):
bottles... | 30.307692 | 96 | 0.738579 |
f6cbe0afc63b74ade88a58b6dd852ed12a8a673b | 280 | py | Python | Informationen_Allgemein/yaml_install_Dateien.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | null | null | null | Informationen_Allgemein/yaml_install_Dateien.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 47 | 2018-11-13T13:55:01.000Z | 2019-09-16T13:38:11.000Z | Informationen_Allgemein/yaml_install_Dateien.py | corneliazy/Geosoftware2 | 8604c79c58a61b84c602f16b5f1e74e30dfcbd0e | [
"MIT"
] | 4 | 2018-11-27T12:36:51.000Z | 2020-10-14T18:07:04.000Z | pip install click
pip install pyshp
pip install shapefile
pip install pandas
pip install PyGeoj
pip install numpy
pip install xarray
pip install sqlite3
pip install csv
pip install scipy
pip install geojson
pip install gdal
pip install pytest
pip install jsonlib
pip install -e .
| 17.5 | 21 | 0.828571 |
12166a18085fd596f8e56f957029c9c0caafef53 | 1,800 | py | Python | 2018/quals/crypto-perfect-secrecy/challenge.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2018/quals/crypto-perfect-secrecy/challenge.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2018/quals/crypto-perfect-secrecy/challenge.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/env python3
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 28.571429 | 76 | 0.709444 |
f6322c69df9677c2e107372efb91e4fb1202b0de | 590 | py | Python | Algorithms/2_Implementation/34.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | 1 | 2021-11-25T13:39:30.000Z | 2021-11-25T13:39:30.000Z | Algorithms/2_Implementation/34.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | Algorithms/2_Implementation/34.py | abphilip-codes/Hackerrank_DSA | bb9e233d9d45c5b14c138830602695ad4113fba4 | [
"MIT"
] | null | null | null | # https://www.hackerrank.com/challenges/jumping-on-the-clouds-revisited/problem
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the jumpingOnClouds function below.
def jumpingOnClouds(c, k):
return 100-sum(1+2*c[z] for z in range(0,len(c),k)) if(len(c)%k==0) else 80
if __name_... | 19.666667 | 79 | 0.642373 |
9cf3c18f0b50d80962e7c379f2b47cf9251cab76 | 6,679 | py | Python | tests/views/test_reference.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | tests/views/test_reference.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | tests/views/test_reference.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import pytest
def test_read(seeder, utils):
user_id, admin_unit_id = seeder.setup_base()
(
other_user_id,
other_admin_unit_id,
event_id,
reference_id,
) = seeder.create_any_reference(admin_unit_id)
url = utils.get_url("event_reference", id=reference_id)
utils.get_o... | 28.181435 | 86 | 0.691421 |
212bb51185d2c45cda82422df4dbb7b734964edc | 4,815 | py | Python | frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# ERPNext - web based ERP (http://erpnext.com)
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe, unittest
from frappe.utils import flt, ... | 37.617188 | 113 | 0.738525 |
2ef2b32f4722092b54cad285e9e84a47193b501d | 3,690 | py | Python | games/MineSweeper/MineSweeper.py | RT-Team/RT-Lib | 686c3632f4283c56b5983d2ddc20bd94f7ef2ba4 | [
"MIT"
] | null | null | null | games/MineSweeper/MineSweeper.py | RT-Team/RT-Lib | 686c3632f4283c56b5983d2ddc20bd94f7ef2ba4 | [
"MIT"
] | null | null | null | games/MineSweeper/MineSweeper.py | RT-Team/RT-Lib | 686c3632f4283c56b5983d2ddc20bd94f7ef2ba4 | [
"MIT"
] | null | null | null | # Mine Sweeper Game Engin
# by tasuren Version 1.4
from random import randrange
class Ms:
def __init__(self,mx,my,bomb,log=False):
self.reset(mx,my,bomb)
self.check = lambda x,y:(
(x-1,y+1),(x,y+1),(x+1,y+1),
(x-1,y ),(x,y ),(x+1,y ),
(x-1,y-1),(x... | 32.086957 | 122 | 0.454201 |
d367c281221be50ae84dd8e41d855c7d04469a07 | 7,186 | py | Python | baseimages/debian9-supervisor/conf/bin/provision.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 1,405 | 2015-10-29T08:41:40.000Z | 2022-03-31T12:43:24.000Z | baseimages/debian9-supervisor/conf/bin/provision.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 372 | 2015-10-27T09:29:31.000Z | 2022-03-28T15:10:19.000Z | baseimages/debian9-supervisor/conf/bin/provision.py | smthkissinger/docker-images | 35e868295d04fa780325ada4168381f1e80e8fe4 | [
"BSD-3-Clause"
] | 506 | 2015-12-02T11:53:05.000Z | 2022-03-28T06:37:17.000Z | #!/usr/bin/env python
import os
import argparse
import json
import sys
from string import Template
from subprocess import call
import tempfile
import time
STORAGE = '/opt/docker/etc/.registry/provision.json'
PROVISION_DIR = '/opt/docker/provision/'
PLAYBOOK_TAGS=['bootstrap', 'build', 'onbuild', 'entrypoint']
PLAYB... | 21.841945 | 114 | 0.544531 |
9fc03251ca7bfa420d0b7565b5f0fcc4887a701f | 705 | pyde | Python | noc/e_6_2_arriving_behavior/e_6_2_arriving_behavior.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 4 | 2018-06-03T02:11:46.000Z | 2021-08-18T19:55:15.000Z | noc/e_6_2_arriving_behavior/e_6_2_arriving_behavior.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | null | null | null | noc/e_6_2_arriving_behavior/e_6_2_arriving_behavior.pyde | kantel/processingpy | 74aae222e46f68d1c8f06307aaede3cdae65c8ec | [
"MIT"
] | 3 | 2019-12-23T19:12:51.000Z | 2021-04-30T14:00:31.000Z | from viehicle import Viehicle
d = 25
WIDTH = 960
HEIGHT = 540
def setup():
global v, debug
size(WIDTH, HEIGHT)
this.surface.setTitle("Viehicle Part 2")
v = Viehicle(width/2, height/2)
debug = False
def draw():
global v, debug
background(color(146, 82, 161))
if debug:
... | 18.076923 | 58 | 0.575887 |
e2989de9643c9f53a1733fe4767e3894df39b22d | 3,117 | py | Python | Packs/FeedOpenCTI/Integrations/FeedOpenCTI_v4/FeedOpenCTI_v4_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/FeedOpenCTI/Integrations/FeedOpenCTI_v4/FeedOpenCTI_v4_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/FeedOpenCTI/Integrations/FeedOpenCTI_v4/FeedOpenCTI_v4_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from FeedOpenCTI_v4 import *
from test_data.feed_data import RESPONSE_DATA, RESPONSE_DATA_WITHOUT_INDICATORS
from CommonServerPython import CommandResults
from pycti import StixCyberObservable
class Client:
temp = ''
stix_cyber_observable = StixCyberObservable
def test_get_indicators(mocker):
"""Tests g... | 37.554217 | 115 | 0.719281 |
46d025cd441c601ea5cc3115093014c20be5c71a | 1,499 | py | Python | Controller/control/WorkerQueue.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | Controller/control/WorkerQueue.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | 7 | 2020-07-19T03:29:21.000Z | 2022-03-02T06:46:12.000Z | Controller/control/WorkerQueue.py | th-nuernberg/ml-cloud | 6d7527cbf6cceb7062e74dbc43d51998381aa6c8 | [
"MIT"
] | null | null | null | import threading
import queue
class WorkerQueue:
waiting_worker_list = []
ready_worker_queue = queue.Queue()
waiting_list_lock = threading.Lock()
def enqueu_worker(self, worker_id):
self.waiting_list_lock.acquire()
self.waiting_worker_list.append(worker_id)
self.waiting_list_... | 29.98 | 66 | 0.638426 |
b383d18b08aabdc655007cbc26765373d4e1577b | 15,669 | py | Python | models/criterions/StructuredRandom.py | scott-mao/CroP | f1e0a25224e341683cf47e7ce451ce0fe996e950 | [
"MIT"
] | null | null | null | models/criterions/StructuredRandom.py | scott-mao/CroP | f1e0a25224e341683cf47e7ce451ce0fe996e950 | [
"MIT"
] | null | null | null | models/criterions/StructuredRandom.py | scott-mao/CroP | f1e0a25224e341683cf47e7ce451ce0fe996e950 | [
"MIT"
] | 1 | 2021-11-08T16:34:45.000Z | 2021-11-08T16:34:45.000Z | from random import randint
import numpy as np
import torch
import torch.nn as nn
import torch.nn.init as init
from models.criterions.General import General
from models.networks.ResNet18 import ResNet18
from models.networks.assisting_layers.GateDecoratorLayers import GatedBatchNorm
class StructuredRandom(General):
... | 50.221154 | 118 | 0.507116 |
03e0cb2bb2cf7519d35c200faa5e00e9b4a501a5 | 609 | py | Python | 01.DataStructure/Stack&Queue/HG/P64061.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 1 | 2021-11-21T06:03:06.000Z | 2021-11-21T06:03:06.000Z | 01.DataStructure/Stack&Queue/HG/P64061.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | 2 | 2021-10-13T07:21:09.000Z | 2021-11-14T13:53:08.000Z | 01.DataStructure/Stack&Queue/HG/P64061.py | SP2021-2/Algorithm | 2e629eb5234212fad8bbc11491aad068e5783780 | [
"MIT"
] | null | null | null | def solution(board, moves):
answer = 0
stack = []
# pprint(board)
for move in moves:
num=0
# num 뽑기
for j in range(len(board)):
if not board[j][move-1] == 0:
num = board[j][move-1]
board[j][move-1] = 0
break
# nu... | 24.36 | 51 | 0.430213 |
207bc395f1f7ccd0d32a0e2c642b647996157f72 | 1,133 | py | Python | warp/data/produces.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/data/produces.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/data/produces.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | # std
# extern
# warp
import warp
from warp.data.decorator import Decorator
# types
from typing import Dict
__all__ = ['produces']
def produces(**kwproducts :Dict[str, warp.Product]):
"""Declare the products of a pipe.
Products fed to this decorator will be automatically pickled after the wrapped funct... | 27.634146 | 202 | 0.654016 |
20f5c0b464e8dfad6f50b414f7f57709717fa1c8 | 638 | py | Python | loesung/blatt1b_4e.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | 1 | 2019-09-27T13:47:20.000Z | 2019-09-27T13:47:20.000Z | loesung/blatt1b_4e.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | loesung/blatt1b_4e.py | dotKuro/vorsemesterWISE19-20 | 436c6d1846b6c1bfb087652e8ca179bd1b12c28e | [
"CC0-1.0"
] | null | null | null | # Hier sollen wieder alle Kombinationen von 1 bis zu einer bestimmten Zahl
# paarweise multipliziert werden. Hier soll jedoch die Obergrenze vom User
# abgefragt werden.
correct_input = False
while not correct_input:
try:
user_number = int(input("Gib eine positive Zahl ein.\n"))
except ValueError:
... | 29 | 74 | 0.670846 |
45621d63cdf72a329e33af8bd4d51b990ba16b34 | 15,304 | py | Python | indl/model/lfads/complex_cell.py | SachsLab/indl | 531d2e0c2ee765004aedc553af40e258262f86cb | [
"Apache-2.0"
] | 1 | 2021-02-22T01:39:50.000Z | 2021-02-22T01:39:50.000Z | indl/model/lfads/complex_cell.py | SachsLab/indl | 531d2e0c2ee765004aedc553af40e258262f86cb | [
"Apache-2.0"
] | null | null | null | indl/model/lfads/complex_cell.py | SachsLab/indl | 531d2e0c2ee765004aedc553af40e258262f86cb | [
"Apache-2.0"
] | null | null | null | __all__ = ['ComplexCell', 'test_ComplexCell']
import numpy as np
import tensorflow as tf
import tensorflow.keras.layers as tfkl
from tensorflow.python.keras.utils import tf_utils
from tensorflow.python.util import nest
from tensorflow.keras import backend as K
import tensorflow_probability as tfp
tfd = tfp.distributi... | 47.52795 | 119 | 0.648915 |
45d6c07afdd19b523e541362d07918cae9f4f222 | 16,085 | py | Python | Zhihu/Python/Utils/Dictionary/GUI.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 1,107 | 2016-09-21T02:18:36.000Z | 2022-03-29T02:52:12.000Z | Zhihu/Python/Utils/Dictionary/GUI.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 18 | 2016-12-22T10:24:47.000Z | 2022-03-11T23:18:43.000Z | Zhihu/Python/Utils/Dictionary/GUI.py | leoatchina/MachineLearning | 071f2c0fc6f5af3d9550cfbeafe8d537c35a76d3 | [
"MIT"
] | 776 | 2016-12-21T12:08:08.000Z | 2022-03-21T06:12:08.000Z | import tkinter as tk
import tkinter.messagebox as tkm
from Zhihu.Python.Utils.Dictionary.Dictionary import *
DISPLAY_RECITE_NUM = 3
DATA_PATH = "Data/Song/"
# noinspection PyUnusedLocal
class GUI(tk.Frame):
@staticmethod
def show_help():
help_msg = "Shortcuts: \n\n" \
" Ctrl +... | 39.136253 | 120 | 0.559341 |
641811cc5baf345d2c8463a3cba4f6913968cbb7 | 124 | py | Python | dataloader/__init__.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | 2 | 2020-12-22T08:40:05.000Z | 2021-03-30T08:09:44.000Z | dataloader/__init__.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | dataloader/__init__.py | UESTC-Liuxin/SkmtSeg | 1251de57fae967aca395644d1c70a9ba0bb52271 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@description:
@author: LiuXin
@contact: xinliu1996@163.com
@Created on: 2020/11/1 下午9:23
"""
| 11.272727 | 29 | 0.620968 |
4426a43de1e6aa8b1e59ccba90f01d97b6550a7b | 501 | py | Python | resources/code/scripts/nyctaxi-csv-to-json.py | emrspecialistsamer/aws-lake-formation-workshop | 8ef294a3362657bafcbd8e1fd2afec4ec3e017e3 | [
"Apache-2.0"
] | 1 | 2021-03-15T15:59:11.000Z | 2021-03-15T15:59:11.000Z | resources/code/scripts/nyctaxi-csv-to-json.py | emrspecialistsamer/aws-lake-formation-workshop | 8ef294a3362657bafcbd8e1fd2afec4ec3e017e3 | [
"Apache-2.0"
] | 2 | 2020-03-24T21:27:51.000Z | 2020-04-14T06:02:05.000Z | resources/code/scripts/nyctaxi-csv-to-json.py | emrspecialistsamer/aws-lake-formation-workshop | 8ef294a3362657bafcbd8e1fd2afec4ec3e017e3 | [
"Apache-2.0"
] | 2 | 2020-02-14T19:22:56.000Z | 2020-04-09T16:55:25.000Z | import boto3
import io
import pandas as pd
import sys
from awsglue.utils import getResolvedOptions
args = getResolvedOptions(sys.argv, ['bucket'])
client = boto3.client('s3')
s3 = boto3.resource('s3')
bucket=args['bucket']
obj = client.get_object(Bucket=bucket, Key='glue/nyctaxi/tripdata.csv')
df = pd.read_csv(obj... | 22.772727 | 90 | 0.750499 |
92489c0e672b4348a6228a7b9b65887f174d90c8 | 4,893 | py | Python | 03 Python/Smart Home Dashboard/loesung/widgets/button.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/loesung/widgets/button.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Smart Home Dashboard/loesung/widgets/button.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | import pygame
from pygame.locals import *
from .widget import Widget
class ButtonWidget(Widget):
"""
Ein einfacher Button, den der Anwender anklicken kann, um eine
Aktion auszulösen.
"""
STATE_NORMAL = 0
STATE_HOVER = 1
STATE_BTNDOWN = 2
def __init__(self, x, y, w, h, label... | 36.244444 | 80 | 0.555692 |
a62c15b7d1907091245f36a8f7b4f3dcddd79f51 | 1,271 | py | Python | frappe-bench/apps/erpnext/erpnext/patches/v5_1/fix_against_account.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_1/fix_against_account.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/patches/v5_1/fix_against_account.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | from __future__ import unicode_literals
import frappe
from erpnext.accounts.doctype.gl_entry.gl_entry import update_against_account
def execute():
from_date = "2015-05-01"
for doc in frappe.get_all("Journal Entry",
filters={"creation": (">", from_date), "docstatus": "1"}):
# update in gl_en... | 33.447368 | 77 | 0.605035 |
a66a9779d9390869d91c23e9a177261301e33707 | 6,558 | py | Python | feedcrawler/flaresolverr.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 63 | 2016-03-21T21:35:07.000Z | 2021-03-20T22:50:34.000Z | feedcrawler/flaresolverr.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 200 | 2016-03-15T21:45:26.000Z | 2021-04-03T10:47:45.000Z | feedcrawler/flaresolverr.py | rix1337/RSScrawler | 5a1c067148310c03321329d3fa409a4e4144fce7 | [
"MIT"
] | 25 | 2016-03-15T20:44:33.000Z | 2020-10-25T09:43:48.000Z | # -*- coding: utf-8 -*-
# FeedCrawler
# Projekt von https://github.com/rix1337
import codecs
import functools
import hashlib
import pickle
from json import dumps, loads
from urllib.parse import urlencode
import requests
from requests import RequestException
from feedcrawler import internal
from feedcrawler.common im... | 36.433333 | 118 | 0.592559 |
472808636d95ea703c91c055d3a49db24a02fd7f | 2,556 | py | Python | 20-hs-redez-sem/groups/04-secureTeams/alias.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 8 | 2020-03-17T21:12:18.000Z | 2021-12-12T15:55:54.000Z | 20-hs-redez-sem/groups/04-secureTeams/alias.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 2 | 2021-07-19T06:18:43.000Z | 2022-02-10T12:17:58.000Z | 20-hs-redez-sem/groups/04-secureTeams/alias.py | Kyrus1999/BACnet | 5be8e1377252166041bcd0b066cce5b92b077d06 | [
"MIT"
] | 25 | 2020-03-20T09:32:45.000Z | 2021-07-18T18:12:59.000Z | """ Alias
This script allows the direct mapping of an alias against the id of an user and vice versa.
Therefore a user can be addressed by its alias (defined locally) and not only by its id.
An alias is a human readable name for an id.
The alias.txt has the following JSON format:
[
["alias", "id"],
...
]
Th... | 24.113208 | 92 | 0.548122 |
5ba0f514b4ac99d0c101d7031db9c9d77a84cac0 | 517 | py | Python | INBa/2015/PerevoshchikovVA/task1_18.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/PerevoshchikovVA/task1_18.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/PerevoshchikovVA/task1_18.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 1. Вариант 18.
# Текст задачи: Напишите программу, которая будет сообщать род деятельности и псевдоним под
# которым скрывается Мария Магдалена фон Лош.
# После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
# F I.O. Перевощиков Владислав... | 57.444444 | 118 | 0.760155 |
9468909b2096957a462389f533816b71cd091950 | 595 | py | Python | python_gui_tkinter/Tkinter/TkinterCourse/2_tk_label.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python_gui_tkinter/Tkinter/TkinterCourse/2_tk_label.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python_gui_tkinter/Tkinter/TkinterCourse/2_tk_label.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z |
import tkinter as tk
# As we have already mentioned, labels can contain text and images. The following example contains two labels, one with a text and the other one with an image
root = tk.Tk()
logo = tk.PhotoImage(file="python.png")
w1 = tk.Label(root, image=logo).pack(side="right")
explanation = """At present, o... | 29.75 | 158 | 0.687395 |
04a9e9434c6ab08dce879b60a4c506aa66e095f2 | 338 | py | Python | labs/lab-09/ownimage.py | LingCheng3273/OSS-Lab | e4ba3755aac3c30649180fdeb6f1da740b8eeb1c | [
"MIT"
] | null | null | null | labs/lab-09/ownimage.py | LingCheng3273/OSS-Lab | e4ba3755aac3c30649180fdeb6f1da740b8eeb1c | [
"MIT"
] | null | null | null | labs/lab-09/ownimage.py | LingCheng3273/OSS-Lab | e4ba3755aac3c30649180fdeb6f1da740b8eeb1c | [
"MIT"
] | null | null | null | from PIL import Image
import PIL.ImageOps
from numpy import array
import numpy
im = Image.open("part3.1.png")
np_im = numpy.array(im)
print(np_im.shape)
np_im = np_im - 18
new_im = im.convert("L")
new_im.save("gray1.png")
new_im = PIL.ImageOps.invert(new_im)
new_im.save("invert.png")
new_im = im.resize((28,28))
new_im.... | 24.142857 | 36 | 0.736686 |
8e3c849a67b8f03f46c4b0b6d6f95cc882469ef0 | 823 | py | Python | Python/Buch_ATBS/Teil_1/Kapitel_05_Dictionary_und_Datenstrukturen/02_dictionary_get.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_1/Kapitel_05_Dictionary_und_Datenstrukturen/02_dictionary_get.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_1/Kapitel_05_Dictionary_und_Datenstrukturen/02_dictionary_get.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # Verwenden von get() in Dictionarys
print('Die get() Anweisung auf ein Dictionary prüft ob ein\nentsprechender Eintrag vorhanden ist, \nfalls nicht wird ein zuvor angegebener Standardwert ausgegeben.')
dicti={'katze' : 13, 'hund' : 15, 'maus' : 5}
print('Nach welchem Tier soll gesucht werden?')
tier=input()
wert=25... | 35.782609 | 165 | 0.739976 |
8e4cf92eefb600b79ee82fd79299c55f37d91c34 | 1,314 | py | Python | python/en/archive/weather_python_code/download_a_file-urllib_request.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/weather_python_code/download_a_file-urllib_request.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | python/en/archive/weather_python_code/download_a_file-urllib_request.py | aimldl/coding | 70ddbfaa454ab92fd072ee8dc614ecc330b34a70 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Feb 27 23:09:05 2020
@author: aimldl
"""
import urllib.request
'''
Caution: Use a link obtained by "right-click > Copy Image Location".
The same image file at https://github.com/aimldl/book/blob/master/images/image.png
is downloaded, but it doesn't display with ... | 24.792453 | 83 | 0.690259 |
6d41323dc34c485b3a5b6d092e6940863f02bfb0 | 5,898 | py | Python | globals/get_browser_versions.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2016-01-29T18:05:29.000Z | 2021-10-06T04:21:55.000Z | globals/get_browser_versions.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 9 | 2015-04-06T19:03:32.000Z | 2019-05-28T13:34:55.000Z | globals/get_browser_versions.py | adblockplus/web.adblockplus.org | c2c570ce4f4296afc3577afe233c6b23b128f206 | [
"MIT"
] | 18 | 2015-04-06T17:42:31.000Z | 2021-10-06T04:26:29.000Z | import re
import os
import sys
import json
import urllib
import errno
import logging
import time
from xml.dom import minidom
from jinja2 import contextfunction
BROWSERS = {}
BASE_URL = 'https://product-details.mozilla.org/1.0'
FIREFOX_URL = BASE_URL + '/firefox_versions.json'
CHROME_URL = 'https://omahaproxy.appspot.... | 28.631068 | 127 | 0.606138 |
ed972e77e7fcda3997ea9a8737138dce35eb0259 | 593 | py | Python | tarefas-poo/lista-04/matriz_de_inteiros/view/paineis/painel_cria_matriz.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-04/matriz_de_inteiros/view/paineis/painel_cria_matriz.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | tarefas-poo/lista-04/matriz_de_inteiros/view/paineis/painel_cria_matriz.py | victoriaduarte/POO_UFSC | 0c65b4f26383d1e3038d8469bd91fd2c0cb98c1a | [
"MIT"
] | null | null | null | # -------------------------------
# UFSC - CTC - INE - INE5663
# Exercício da Matriz de Inteiros
# -------------------------------
# Classe que permite criar uma matriz.
#
from model.matriz_de_inteiros import MatrizDeInteiros
class PainelCriaMatriz:
def crie(self, iu, nome):
print('- - - Criar Matriz {} ... | 29.65 | 58 | 0.559865 |
1e89b7e38295267a4e48430cd54b19aabe81b440 | 208 | py | Python | packages/watchmen-dqc/src/watchmen_dqc/util/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/util/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-dqc/src/watchmen_dqc/util/__init__.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from .data_frame import build_data_frame, convert_data_frame_type_by_topic, convert_data_frame_type_by_types, \
convert_to_pandas_type
from .fake_principal_service import fake_super_admin, fake_tenant_admin
| 52 | 111 | 0.899038 |
1ec9a054fc9fff30ff3d0bba5e2f06769784ba03 | 468 | py | Python | comp/lifered/max_subseq.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | comp/lifered/max_subseq.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | comp/lifered/max_subseq.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | def max_subseq_sort(A):
A.sort()
l, m, res = 0, 0, 0
for r in range(len(A)):
if A[m] != A[r]:
m = r
if A[r] - A[l] > 1:
l = m
# print l, m, r
res = max(res, r - l + 1)
return res
def max_subseq_hash(A):
cnts = {}
for a in A:
cnts[... | 19.5 | 40 | 0.42094 |
94ca01d54d5f34aeaf1de64cd16d7dbe010b72ca | 982 | py | Python | quant/observers/t_bithumb_bch.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 7 | 2017-10-22T15:00:09.000Z | 2019-09-19T11:45:43.000Z | quant/observers/t_bithumb_bch.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 1 | 2018-01-19T16:19:40.000Z | 2018-01-19T16:19:40.000Z | quant/observers/t_bithumb_bch.py | doubleDragon/QuantBot | 53a1d6c62ecece47bf777da0c0754430b706b7fd | [
"MIT"
] | 5 | 2017-12-11T15:10:29.000Z | 2018-12-21T17:40:58.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from __future__ import division
from .t_bithumb import T_Bithumb
class T_Bithumb_BCH(T_Bithumb):
"""
bch:
./venv/bin/python -m quant.cli -mBithumb_BCH_KRW,Bitfinex_BCH_BTC,Bithumb_BTC_KRW -o=T_Bithumb_BCH -f=bithumb_bch -v
目前的限制:
bithumb: bch_krw=... | 25.842105 | 120 | 0.577393 |
a209e7597354d26a4ef43590b8552d7eae91c319 | 599 | py | Python | matplotlib/my_bar_chart/my_bar_chart.py | ptracton/ExperimentalPython | a3159226982ec9656bb0f81f6997687da22f4466 | [
"MIT"
] | null | null | null | matplotlib/my_bar_chart/my_bar_chart.py | ptracton/ExperimentalPython | a3159226982ec9656bb0f81f6997687da22f4466 | [
"MIT"
] | null | null | null | matplotlib/my_bar_chart/my_bar_chart.py | ptracton/ExperimentalPython | a3159226982ec9656bb0f81f6997687da22f4466 | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import logging
import sys
import PyQt5
import PyQt5.QtWidgets
import UI
if __name__ == "__main__":
# Start our log, now any module in this application
# can import logging and write out details
logging.basicConfig(filename="LOG_FILE_NAMEs.log",
level=logg... | 23.96 | 71 | 0.599332 |
1591a3af4406271379823dbb8615f7e452bd9b52 | 5,993 | py | Python | app/settings.py | scholaronroad/guts_2021_hackathon | 482b7b59317b67fc37f67f1ccfeaadbf811c00ca | [
"MIT"
] | null | null | null | app/settings.py | scholaronroad/guts_2021_hackathon | 482b7b59317b67fc37f67f1ccfeaadbf811c00ca | [
"MIT"
] | 2 | 2021-02-06T13:54:45.000Z | 2021-02-06T20:05:18.000Z | app/settings.py | scholaronroad/guts_2021_hackathon | 482b7b59317b67fc37f67f1ccfeaadbf811c00ca | [
"MIT"
] | null | null | null | from datetime import timedelta
import os
import environ
import sys
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
env = environ.Env(
ON_SERVER=(bool, True), LOGGING_LEVEL=(str, "INFO"), DEBUG=(bool, False)
)
IGNORE_DOT... | 27.874419 | 79 | 0.681795 |
ece297d28c012249bafbe66fbb6f08ef4a618147 | 221 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/statsmodels-0.5.0-py2.7-linux-x86_64.egg/statsmodels/version.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/statsmodels-0.5.0-py2.7-linux-x86_64.egg/statsmodels/version.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/statsmodels-0.5.0-py2.7-linux-x86_64.egg/statsmodels/version.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z |
# THIS FILE IS GENERATED FROM SETUP.PY
short_version = '0.5.0'
version = '0.5.0'
full_version = '0.5.0'
git_revision = '82e027e91cac47cfcfbcab754a244731cd726f06'
release = True
if not release:
version = full_version | 22.1 | 57 | 0.746606 |
17358236c37b19e7cfb2cbd0d0f631bcd2b28d0b | 650 | py | Python | suchalgorithmen/linear_search.py | InformatikNinja/algorithmen | 8d06188a4ecb306ade34a310c6a0908aad102cca | [
"Apache-2.0"
] | 1 | 2018-11-09T12:46:36.000Z | 2018-11-09T12:46:36.000Z | suchalgorithmen/linear_search.py | InformatikNinja/algorithmen | 8d06188a4ecb306ade34a310c6a0908aad102cca | [
"Apache-2.0"
] | null | null | null | suchalgorithmen/linear_search.py | InformatikNinja/algorithmen | 8d06188a4ecb306ade34a310c6a0908aad102cca | [
"Apache-2.0"
] | null | null | null | """Sortieralgorithmus: Lineare Suche (linear search).
Weitere Informationen findest du auf:
https://informatik-ninja.de/post/suchalgorithmen-min-max-suche-und-lineare-suche-linear-search
"""
def linear_search(A, key):
"""Lineare Suche.
Args:
A (list): Menge A.
key (object): Element das gefun... | 23.214286 | 94 | 0.6 |
bd82f3c5ce6872c5e5404ee5ffec147851c4c1da | 7,335 | py | Python | src/onegov/core/custom/custom_json.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/custom/custom_json.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/custom/custom_json.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | """ Sigh. Here we go again, *another* json implementation with support for:
- date
- datetime
- time
Because nobody else does all of these. And if they do (like standardjson), they
don't support decoding...
"""
import datetime
import isodate
import json
import re
import types
from decimal import Decimal
from itert... | 25.827465 | 79 | 0.642536 |
da37ed7cc0ba9a48165359bab19823b582c9fa5c | 4,900 | py | Python | py_script/result_check_base.py | skybluezx/GraphCompute | 95dc176147a7a16eb2176fd1f384de467e3daad6 | [
"MIT"
] | 4 | 2021-07-29T11:32:34.000Z | 2021-08-12T07:13:25.000Z | py_script/result_check_base.py | skybluezx/GraphCompute | 95dc176147a7a16eb2176fd1f384de467e3daad6 | [
"MIT"
] | null | null | null | py_script/result_check_base.py | skybluezx/GraphCompute | 95dc176147a7a16eb2176fd1f384de467e3daad6 | [
"MIT"
] | 1 | 2021-11-29T03:47:35.000Z | 2021-11-29T03:47:35.000Z | #-*- coding:utf-8 -*-
from __future__ import division
import os
import json
import pandas as pd
import argparse
parser = argparse.ArgumentParser(description='Simple file download script for Google Drive')
parser.add_argument(
'-file_path',
dest='file_path',
type=str,
help='kp_question_recall_result_dir... | 42.241379 | 182 | 0.667347 |
9729b65a3561ed2e2bfc96a7b193cabc653595ea | 146 | py | Python | python/python_new/Python 3/untitled3xxx.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_new/Python 3/untitled3xxx.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_new/Python 3/untitled3xxx.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | import numpy as np
a=np.array([7,5,8,2])
b=a[0:2]
#=b=a[-1]
print(b)
a=np.array([[1,2,7],[3,4,11],[5,8,14]])
b=a[1,2]
print(b)
c=a[0:2,2]
print(c) | 14.6 | 39 | 0.547945 |
8adb1924f78e70b10c8f34df5ce43ad1389d6ff5 | 405 | py | Python | CodeChef_problems/ANUSQU/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | CodeChef_problems/ANUSQU/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | CodeChef_problems/ANUSQU/solution.py | gbrls/CompetitiveCode | b6f1b817a655635c3c843d40bd05793406fea9c6 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | #Question Link
#https://www.codechef.com/problems/ANUSQU
import math
n=int(input()) #input number of squares
sqrtn=math.floor(math.sqrt(n)) #finding the numbers of squares that can be accomodated
sqr=sqrtn*sqrtn
t=n-sqr
if t==0:
print(int(4*sqrtn)) #square formations
elif t>0 and t<=n:
print(int(4*sqrtn+2)) #re... | 28.928571 | 86 | 0.723457 |
c1761afbe0f36fc69d123dd32f81be45bd6fd94a | 10,230 | py | Python | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/saga/generateParkingAreasFromOSM.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 4 | 2020-11-13T02:35:56.000Z | 2021-03-29T20:15:54.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/saga/generateParkingAreasFromOSM.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 9 | 2020-12-09T02:12:39.000Z | 2021-02-18T00:15:28.000Z | Co-Simulation/Sumo/sumo-1.7.0/tools/contributed/saga/generateParkingAreasFromOSM.py | uruzahe/carla | 940c2ab23cce1eda1ef66de35f66b42d40865fb1 | [
"MIT"
] | 1 | 2020-11-20T19:31:26.000Z | 2020-11-20T19:31:26.000Z | #!/usr/bin/env python3
""" Extract Parking Areas from OSM.
Author: Lara CODECA
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0.
"""
import argparse
import logging
import os
imp... | 39.805447 | 152 | 0.591007 |
de1289ac2929d31a39ed18a096480a7cbbba78e2 | 3,016 | py | Python | python/odml/test_scripts/term_load_test.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/test_scripts/term_load_test.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | python/odml/test_scripts/term_load_test.py | mpsonntag/snippets | fc3cc42ea49b885c1f29c0aef1379055a931a978 | [
"BSD-3-Clause"
] | null | null | null | """
Script testing odml cache refresh
"""
import os
import tempfile
from glob import glob
try:
from urllib.request import pathname2url
except ImportError:
from urllib import pathname2url
from odml import save, Document, Section
from odml import terminology
def cache_files_map(file_filter="*"):
"""
... | 29 | 89 | 0.694629 |
a9dced8eb8e55e7f91174d0beace73f173d3d0f6 | 10,610 | py | Python | deprecated/examples/dam/model.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/examples/dam/model.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/examples/dam/model.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 37.097902 | 96 | 0.547502 |
a9e2005b814fec4c23cf08cc4243ddd551121a6f | 5,952 | py | Python | marsyas-vamp/marsyas/scripts/chord-detection/scripts/extractTrainingData.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/chord-detection/scripts/extractTrainingData.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | marsyas-vamp/marsyas/scripts/chord-detection/scripts/extractTrainingData.py | jaouahbi/VampPlugins | 27c2248d1c717417fe4d448cdfb4cb882a8a336a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
import argparse, re
from marsyas import *
from math import sqrt
from os import path
################################################################################
# Parse Command-line Arguments
#
parser = argparse.ArgumentParser(description='Process .wav files to estimate tuning frequency re... | 39.417219 | 157 | 0.572581 |
99baa8bb2582477d0baf9064d0520a13ed926d81 | 503 | py | Python | testbed0/spam_can.py | Benny93/HMI-Protocol | 5f98873129acebed1b2b3cf4376c2733907ead70 | [
"MIT"
] | null | null | null | testbed0/spam_can.py | Benny93/HMI-Protocol | 5f98873129acebed1b2b3cf4376c2733907ead70 | [
"MIT"
] | null | null | null | testbed0/spam_can.py | Benny93/HMI-Protocol | 5f98873129acebed1b2b3cf4376c2733907ead70 | [
"MIT"
] | 1 | 2019-10-20T20:35:23.000Z | 2019-10-20T20:35:23.000Z | #!/usr/bin/python3
import time
import can
bustype = 'socketcan_native'
channel = 'vcan0'
def producer(id):
""":param id: Spam the bus with messages including the data id."""
bus = can.interface.Bus(channel=channel, bustype=bustype)
for i in range(30):
msg = can.Message(arbitration_id=0xc0ffee, dat... | 27.944444 | 101 | 0.66998 |
413cbbca08d544c710281d7baa8e6a87821b8930 | 4,989 | py | Python | Boot2Root/hackthebox/Canape/exploits/44913.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 21 | 2016-02-06T14:30:01.000Z | 2020-09-11T05:39:17.000Z | Boot2Root/hackthebox/Canape/exploits/44913.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 5 | 2019-10-21T19:59:01.000Z | 2020-05-27T21:42:04.000Z | Boot2Root/hackthebox/Canape/exploits/44913.py | Kan1shka9/CTFs | 33ab33e094ea8b52714d5dad020c25730e91c0b0 | [
"MIT"
] | 7 | 2017-02-02T16:27:02.000Z | 2021-04-30T17:14:53.000Z | # Title: Apache CouchDB < 2.1.0 - Remote Code Execution
# Author: Cody Zacharias
# Shodan Dork: port:5984
# Vendor Homepage: http://couchdb.apache.org/
# Software Link: http://archive.apache.org/dist/couchdb/source/1.6.0/
# Version: <= 1.7.0 and 2.x - 2.1.0
# Tested on: Debian
# CVE : CVE-2017-12636
# Reference... | 39.595238 | 118 | 0.547003 |
4190d2fe0f89c8c13965793cfe42a9cedba3e24b | 656 | py | Python | challenges/secondRightmostZeroBit/python3/secondRightmostZeroBit.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 5 | 2020-05-21T03:02:34.000Z | 2021-09-06T04:24:26.000Z | challenges/secondRightmostZeroBit/python3/secondRightmostZeroBit.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 6 | 2019-04-24T03:39:26.000Z | 2019-05-03T02:10:59.000Z | challenges/secondRightmostZeroBit/python3/secondRightmostZeroBit.py | jimmynguyen/codefights | f4924fcffdb4ff14930618bb1a781e4e02e9aa09 | [
"MIT"
] | 1 | 2021-09-06T04:24:27.000Z | 2021-09-06T04:24:27.000Z | def secondRightmostZeroBit(n):
s = '{0:b}'.format(n)
return 2**[len(s) - i - 1 for i, x in enumerate(s) if x == '0'][-2]
if __name__ == '__main__':
input0 = [37, 1073741824, 83748, 4, 728782938]
expectedOutput = [8, 2, 2, 2, 4]
assert len(input0) == len(expectedOutput), '# input0 = {}, # expectedOutput = {}'.form... | 54.666667 | 123 | 0.679878 |
2e86d3824c872589521dcb674c978e53b6ed97d9 | 1,937 | py | Python | gdp1/assignment_1/change_calculator.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | gdp1/assignment_1/change_calculator.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | gdp1/assignment_1/change_calculator.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | from collections import namedtuple
from gdp1.common.input_helpers import int_input
class Change(namedtuple("Change", "dollars quarters dimes nickels cents")):
"""A class representing change in US dollars."""
# To make instances of Change not require more memory than regular namedtuples.
__slots__ = ()
... | 43.044444 | 120 | 0.669592 |
2b0ea14ac373c7d850906826b029d468229aae8f | 582 | py | Python | python/coding_dojang/async_for.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/async_for.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/coding_dojang/async_for.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import asyncio
class AsyncCounter:
def __init__(self, stop):
self.current = 0
self.stop = stop
def __aiter__(self):
return self
async def __anext__(self):
if self.current < self.stop:
await asyncio.sleep(1.0)
r = self.current
self.curren... | 20.785714 | 58 | 0.57732 |
9960a331dcec0173d78a98092ed3902b8b577067 | 2,036 | py | Python | test/burster.py | HyechurnJang/genaci | aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3 | [
"Apache-2.0"
] | null | null | null | test/burster.py | HyechurnJang/genaci | aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3 | [
"Apache-2.0"
] | null | null | null | test/burster.py | HyechurnJang/genaci | aac26c8b59a5d8b3884aa6f588f40f2e741c1cc3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Created on 2018. 10. 5.
@author: Hyechurn Jang, <hyjang@cisco.com>
'''
import socket
import json
import struct
import requests
def generate(index):
base_ip_int = 1701143808
gen_ip_int = base_ip_int + index
gen_ip = socket.inet_ntoa(struct.pack('!I', gen_ip_int))
base_m... | 29.085714 | 83 | 0.571709 |
41e1817354d182c76f034d4bd2e6ded328f64db2 | 601 | py | Python | Hackerrank_problems/Modified Kaprekar Numbers/solution.py | KAHund/CompetitiveCode | 6ed211a2f795569f5c2f18c2f660520d99d41ca0 | [
"MIT"
] | 165 | 2020-10-03T08:01:11.000Z | 2022-03-31T02:42:08.000Z | Hackerrank_problems/Modified Kaprekar Numbers/solution.py | KAHund/CompetitiveCode | 6ed211a2f795569f5c2f18c2f660520d99d41ca0 | [
"MIT"
] | 383 | 2020-10-03T07:39:11.000Z | 2021-11-20T07:06:35.000Z | Hackerrank_problems/Modified Kaprekar Numbers/solution.py | KAHund/CompetitiveCode | 6ed211a2f795569f5c2f18c2f660520d99d41ca0 | [
"MIT"
] | 380 | 2020-10-03T08:05:04.000Z | 2022-03-19T06:56:59.000Z | def check(i):
sq = str(i**2) # squaring the input
le = len(str(i)) # calculating the length
r = sq[-le:] # extracting the right hand part
l = sq[:-le] or '0' # extracting the left hand part
return sum(map(int,(l,r)))==i ... | 46.230769 | 157 | 0.50416 |
513d0e717359af521632888f23d2941262d04032 | 37,896 | py | Python | PyHugeGraph/PyHugeGraphClient.py | WeiwenRen/PyHugeGraph | e09430da5a5b93fbafd1de02f8c4545bd1f0afd7 | [
"Apache-2.0"
] | null | null | null | PyHugeGraph/PyHugeGraphClient.py | WeiwenRen/PyHugeGraph | e09430da5a5b93fbafd1de02f8c4545bd1f0afd7 | [
"Apache-2.0"
] | null | null | null | PyHugeGraph/PyHugeGraphClient.py | WeiwenRen/PyHugeGraph | e09430da5a5b93fbafd1de02f8c4545bd1f0afd7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
-------------------------------------------------
File Name: HugeGraph.py
Description :
Author : tangjiawei
date: 2018/08/23
-------------------------------------------------
Change Activity:
2018/08/23: v1
--------------------------------... | 31.036855 | 141 | 0.504354 |
5aab27abbe895f3b63a54659ae20574b34e705b7 | 2,471 | py | Python | bin/generate_speaker_blog_post.py | scuerda/2021.djangocon.us | b213786898ff59ecb51c168cb27f1743cc813838 | [
"BSD-3-Clause"
] | 21 | 2020-06-06T17:21:55.000Z | 2022-03-09T01:17:19.000Z | bin/generate_speaker_blog_post.py | scuerda/2021.djangocon.us | b213786898ff59ecb51c168cb27f1743cc813838 | [
"BSD-3-Clause"
] | 122 | 2020-10-02T00:06:59.000Z | 2021-10-23T01:47:43.000Z | bin/generate_speaker_blog_post.py | scuerda/2021.djangocon.us | b213786898ff59ecb51c168cb27f1743cc813838 | [
"BSD-3-Clause"
] | 30 | 2021-06-04T15:28:55.000Z | 2021-10-20T21:14:12.000Z | import pathlib
import yaml
HEADER = """---
author: Drew Winstel
category: Program
date: 2021-08-26 12:00:00
layout: post
title: Announcing the 2021 DjangoCon US Talks
---
We're proud to announce the talks for this year's online DjangoCon US.
The Django community and beyond submitted an incredible number of talk
pro... | 30.134146 | 102 | 0.67503 |
5ab4e83603d5ba4a1ae3826d18da8e69482c09fa | 3,101 | py | Python | taskmanager/cli.py | pawelwalat/PWtaskmanager | bd14a0ebc28ae093ef02520627aabb435dd7935d | [
"MIT"
] | null | null | null | taskmanager/cli.py | pawelwalat/PWtaskmanager | bd14a0ebc28ae093ef02520627aabb435dd7935d | [
"MIT"
] | null | null | null | taskmanager/cli.py | pawelwalat/PWtaskmanager | bd14a0ebc28ae093ef02520627aabb435dd7935d | [
"MIT"
] | null | null | null | import argparse
import sys
import db
from contextlib import redirect_stdout
import io
import time
import os
import subprocess
import shlex
DB_FILENAME = 'taskmanager.sqlite'
parser = argparse.ArgumentParser(description='PW taskmanager')
def print_exit(message):
global parser
print('Error: '+message)
pars... | 36.05814 | 168 | 0.610448 |
51aa817e2b0fd6c05b7f1917fbe5074dfb51a342 | 590 | py | Python | src/utils/cv.py | JoseFilipeFerreira/StockManagement | 9d619e014d894f4a580abf7cda32431ddbe0783c | [
"MIT"
] | 1 | 2019-06-19T00:02:57.000Z | 2019-06-19T00:02:57.000Z | src/utils/cv.py | jtexeira/SO_1819 | 929ff2e87344f97cb1b604919d180438d97152c9 | [
"MIT"
] | null | null | null | src/utils/cv.py | jtexeira/SO_1819 | 929ff2e87344f97cb1b604919d180438d97152c9 | [
"MIT"
] | null | null | null | import sys
from string import ascii_lowercase
from random import randint, choice
def main():
n = 25000
if len(sys.argv) > 1:
n = int(sys.argv[1])
MAX_ID = 2500
if len(sys.argv) > 2:
MAX_ID = int(sys.argv[2])
for i in range(n):
c = randint(0,1)
v = [
lam... | 21.071429 | 39 | 0.491525 |
51ad52deefab82522a423a2231741b5926845316 | 1,445 | py | Python | demos/Multiscale/ThreeSidedBasic/model/partial_state_update_block.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 56 | 2020-07-08T23:23:15.000Z | 2022-03-11T20:43:09.000Z | demos/Multiscale/ThreeSidedBasic/model/partial_state_update_block.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 41 | 2020-07-11T23:24:06.000Z | 2022-01-28T13:28:07.000Z | demos/Multiscale/ThreeSidedBasic/model/partial_state_update_block.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 39 | 2020-07-15T11:35:04.000Z | 2022-02-01T16:02:51.000Z | from .parts.exogenous import *
from .parts.flows import *
from .parts.investors import *
from .parts.kpis import *
# The Partial State Update Blocks
partial_state_update_blocks = [
# exogenous.py:
{
'policies':
{
},
'variables':
{
'tx_volume': tx_volume_gene... | 19.013158 | 56 | 0.46436 |
51e3815ae9fd66c514e98a858422bd275dff19a0 | 1,422 | py | Python | DesignPatterns/StructuralPattern/Adapter/bus.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | DesignPatterns/StructuralPattern/Adapter/bus.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | DesignPatterns/StructuralPattern/Adapter/bus.py | BALAVIGNESHDOSTRIX/pyexpert | 300498f66a3a4f6b3060d51b3d6643d8e63cf746 | [
"CC0-1.0"
] | null | null | null | ####################################
# Author: "BALAVIGNESH" #
# Maintainer: "BALAVIGNESH" #
# License: "CC0 1.0 Universal" #
# Date: "25/04/2021" #
####################################
from library import VehicleInterface, Bus
'''
Adapter Pattern Design
The Adapter ... | 32.318182 | 145 | 0.637131 |
5c71b668fc911778ebfcecb08856eec9cb84486e | 572 | py | Python | Vid-Bok-main/info/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Vid-Bok-main/info/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Vid-Bok-main/info/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | print(f"""
{k}╦ ╦{p}┬┌┬┐{k} ╔╗ {p}┌─┐┬┌─
{k}╚╗╔╝{p}│ ││{m}───{k}╠╩╗{p}│ │├┴┐
{k} ╚╝ {p}┴─┴┘{k} ╚═╝{p}└─┘┴ ┴
{m}÷=====================================÷
{m}| {p}Author {m}: {h}Rizky {m}|
{m}| {p}Support{m}: {h}KangPacman {m}| {h}Main IT {m}|
{m}| {p}Github {m}: {... | 38.133333 | 60 | 0.356643 |
64eabae6e86251b01d79f03d9d4f8d455986e3a6 | 297 | py | Python | Packs/AcalvioShadowplex/Integrations/acalvioapp/test_data/api_request_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AcalvioShadowplex/Integrations/acalvioapp/test_data/api_request_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AcalvioShadowplex/Integrations/acalvioapp/test_data/api_request_data.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | # disable-secrets-detection-start
BASE_URL = "https://acalvio.com"
apikey = "<some api key>"
content_type = "application/json"
decoy_host = "10.10.5.10"
ep_host = "10.10.5.20"
decoy_filename = "DecoyFile.pdf"
decoy_user = "DecoyUser"
domain = "local.com"
# disable-secrets-detection-end
| 27 | 34 | 0.707071 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.