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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5da19f97f45e4a50e738641d49b879a4290fa15b | 5,828 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/pn_vrouter_ospf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/pn_vrouter_ospf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/pn_vrouter_ospf.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright: (c) 2018, Pluribus Networks
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['... | 28.851485 | 111 | 0.659746 |
5de8c86e4e142639acfa33cb64930a1fe97e36ae | 2,511 | py | Python | ce.py | matt-biss/forensics-evidence | 3484498eb2ca17e72cbfdad0178a837e92ec96b9 | [
"MIT"
] | null | null | null | ce.py | matt-biss/forensics-evidence | 3484498eb2ca17e72cbfdad0178a837e92ec96b9 | [
"MIT"
] | null | null | null | ce.py | matt-biss/forensics-evidence | 3484498eb2ca17e72cbfdad0178a837e92ec96b9 | [
"MIT"
] | null | null | null | import os
import glob
from misc.libs import helper
# Pfade zu den notwendigen Dateien
ce_dir = 'ce/'
me_dir = 'me/'
# ce-Ordner erstellen, falls noch nicht vorhanden
if not os.path.exists(ce_dir):
os.mkdir(ce_dir)
# Ordner leeren, um nicht irgendwo zufällig etwas anzuhängen
files = os.listdir(ce_dir)
for file in... | 37.477612 | 116 | 0.626444 |
5dfd60a6bd649308dbf1b2ac2462bc2a87e30a48 | 977 | py | Python | aoc2020/day_24/path_parser.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_24/path_parser.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | aoc2020/day_24/path_parser.py | en0/aoc2020 | a2f41b909dffe1f366682b3d03fd5fbdbc924ec0 | [
"MIT"
] | null | null | null | class DiagonalParser:
def __init__(self, p: "PathParser"):
self._p = p
self._v = None
def set_ns(self, ns: str):
self._v = ns
def __call__(self, v: str):
self._p.parse = self._p.default_parser
self._p.parse(self._v + v)
class DefaultParser:
def __init__(self, ... | 22.204545 | 51 | 0.561924 |
b910172982d97a2e4a0b827f8ad5b6d529cf7477 | 2,488 | py | Python | kts/ui/plotting.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 18 | 2019-02-14T13:10:07.000Z | 2021-11-26T07:10:13.000Z | kts/ui/plotting.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-02-17T14:06:42.000Z | 2019-09-15T18:05:54.000Z | kts/ui/plotting.py | konodyuk/kts | 3af5ccbf1d2089cb41d171626fcde4b0ba5aa8a7 | [
"MIT"
] | 2 | 2019-09-15T13:12:42.000Z | 2020-04-15T14:05:54.000Z | from typing import Collection
from kts.ui.components import HTMLRepr
class Line(HTMLRepr):
def __init__(self, x: Collection, y: Collection, color: str, width: int = 3, dash: int = 0, desc: str = ''):
self.xs = x
self.ys = y
self.color = color
self.width = width
self.dash =... | 36.588235 | 112 | 0.551447 |
5d08f7155b32bfb595bb7b67b2e3a1107382f0ec | 4,951 | py | Python | Bruteforce-gmail-main/enc_gmail.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Bruteforce-gmail-main/enc_gmail.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Bruteforce-gmail-main/enc_gmail.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | #code by Aldi Bachtiar rifai
#ricod ajh gpp ya'
import base64
exec(base64.b64decode("IyEvdXNyL2Jpbi9weXRob24KZnJvbSBfX2Z1dHVyZV9fIGltcG9ydCBhYnNvbHV0ZV9pbXBvcnQKZnJvbSBfX2Z1dHVyZV9fIGltcG9ydCBwcmludF9mdW5jdGlvbgpmcm9tIHNpeC5tb3ZlcyBpbXBvcnQgaW5wdXQKaW1wb3J0IHNtdHBsaWIKaW1wb3J0IG9zCmltcG9ydCBzeXMKaW1wb3J0IHRpbWUKZnJvb... | 825.166667 | 4,886 | 0.994345 |
538a204ad46ed47693cf4af861a67b0c10162a61 | 666 | py | Python | 7-assets/past-student-repos/Graphs-master/python/guided-demo/graphs-1/src/graph_list.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Graphs-master/python/guided-demo/graphs-1/src/graph_list.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | 7-assets/past-student-repos/Graphs-master/python/guided-demo/graphs-1/src/graph_list.py | eengineergz/Lambda | 1fe511f7ef550aed998b75c18a432abf6ab41c5f | [
"MIT"
] | null | null | null | """Graph representation using adjacency list."""
class Edge:
"""Edges in the adjacency list are just a destination."""
# Using simple classes for illustrative purposes
# pylint: disable=too-few-public-methods
def __init__(self, destination):
self.destination = destination
class Vertex:
""... | 27.75 | 61 | 0.663664 |
53d4172452a2fd3e75bb33e10d7828178e1e8350 | 440 | py | Python | INBa/2015/Shirlin_V_V/task_1_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shirlin_V_V/task_1_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | INBa/2015/Shirlin_V_V/task_1_32.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | #Задание 1. Вариант 32
#Напишите программу, которая будет сообщать род деятельности и псевдоним под которым скрывается Уильям Сидни Портер. После вывода информации программа должна дожидаться пока пользователь нажмет Enter для выхода.
#Ширлин Вячеслав Викторович
#10.03.2016
print("Уильям Сидни Портер-литературный псевд... | 73.333333 | 211 | 0.827273 |
54d31a664c026adacb6f6ad1a2be847badb95df8 | 19,393 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_mtu.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_mtu.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_mtu.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 33.093857 | 123 | 0.570825 |
0763ec4c96954c3624a6232993d88f5f7a359904 | 1,592 | py | Python | ___Python/Angela/PyKurs/p03_lambda/m06_anwendung.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Angela/PyKurs/p03_lambda/m06_anwendung.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Angela/PyKurs/p03_lambda/m06_anwendung.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from datetime import date
from p01_kennenlernen import meinebibliothek
from p01_kennenlernen.meinebibliothek import alter, celsius_to_fahrenheit
torsten = ["Torsten", "Aachen", date(1967, 1, 1), ["C"]]
michael = ["Michael", "Moormerland", date(1981, 1, 10), ["Javascript"]]
karpoo = ["Karpoo", "Düsseldorf", dat... | 41.894737 | 141 | 0.666457 |
ab137f2b7c7668e4e0f0145b4cfc2eefc39c6502 | 3,145 | py | Python | paddlenlp/datasets/nlpcc14_sc.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | paddlenlp/datasets/nlpcc14_sc.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | paddlenlp/datasets/nlpcc14_sc.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.569767 | 80 | 0.599046 |
dbb89f10a96dfbda490d4c93fd15c39642b56035 | 92 | py | Python | 2014/07/kentucky-100-million-income/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/07/kentucky-100-million-baseball/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/07/kentucky-100-million-baseball/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '1vaatgMHVlnEvC0G6-ZIHizGuFUrdEpMHoRpMkBucjiI'
| 23 | 68 | 0.836957 |
91bf619c4593ab576601bd72130465c822b7fac2 | 636 | py | Python | src/using_tips/decorator/dec7.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/using_tips/decorator/dec7.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | src/using_tips/decorator/dec7.py | HuangHuaBingZiGe/GitHub-Demo | f3710f73b0828ef500343932d46c61d3b1e04ba9 | [
"Apache-2.0"
] | null | null | null | def log(text):
def decorator(func):
def wrapper():
print
'%s %s():' % (text, func.__name__)
return func()
return wrapper
return decorator
def now():
print
'2016-01-23'
now = log('Hello')(now) # now is equal to a special wrapper, havi... | 24.461538 | 119 | 0.628931 |
91db086f1bf86932130779f63d1a5323f47fb40d | 990 | py | Python | books/PythonCleanCode/ch10_clean_architecture/service/libs/storage/src/storage/converters.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch10_clean_architecture/service/libs/storage/src/storage/converters.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch10_clean_architecture/service/libs/storage/src/storage/converters.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Convert the row resulting from a query to the Entities object."""
from .status import DeliveryOrder, DispatchedOrder, OrderDelivered, OrderInTransit
def build_dispatched(row):
return DispatchedOrder(row.dispatched_at)
def build_in_transit(row):
return OrderInTransit(row.location)
def build_delivered(r... | 22 | 82 | 0.722222 |
91ea66f0edf2d8cff225d1d06a641b129631e8d7 | 135 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.04-dictionary/ph-36-dict-is-mutable.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.04-dictionary/ph-36-dict-is-mutable.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.04-dictionary/ph-36-dict-is-mutable.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | dt = {"a": "A", "b": "B", "c": "C"}
dt[(1, 2, 3)] = "tuple"
print(dt)
li = [1, 2, 3]
dt[li] = "list"
s = {1, 2, 3, 4}
dt[s] = "set"
| 12.272727 | 35 | 0.362963 |
37d6381767052188eda66cca7a60330fb9e3b437 | 3,889 | py | Python | test/synthetic_test_continuous_1.py | saeyoung/tslb | 5f52646260e14f44c61a670cfc75509951e5e794 | [
"MIT"
] | null | null | null | test/synthetic_test_continuous_1.py | saeyoung/tslb | 5f52646260e14f44c61a670cfc75509951e5e794 | [
"MIT"
] | 3 | 2020-03-24T18:18:21.000Z | 2021-08-23T20:37:09.000Z | test/synthetic_test_continuous_1.py | saeyoung/tslb | 5f52646260e14f44c61a670cfc75509951e5e794 | [
"MIT"
] | null | null | null | #############################################################
#
# Test 2-1. Continuous Distribution, i.i.d. Beta
#
#############################################################
import sys, os
sys.path.append("../..")
sys.path.append("..")
sys.path.append(os.getcwd())
import numpy as np
import pandas as pd
import copy
... | 27.195804 | 96 | 0.536899 |
37d86196475d4838f760a744c55a155b946fb70a | 1,281 | py | Python | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/circle_changer.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/circle_changer.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/coursera_python/FUND_OF_COMP_RICE/FUND_OF_COMPUTING_RICE/circle_changer.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | #####################
# Example of event-driven code, buggy version
import simplegui
size = 10
radius = 10
# Define event handlers.
def incr_button_handler():
"""Increment the size."""
global size
size += 1
label.set_text("Value: " + str(size))
def decr_button_handler():
"""Decrement the si... | 26.142857 | 64 | 0.687744 |
7273baae1e1233028327ee914734f5b528a41bbe | 254 | py | Python | src/fizzBuzz.py | PaulB99/FizzBuzz | 9e2254be359aca447395632d280d459550817b9e | [
"MIT"
] | null | null | null | src/fizzBuzz.py | PaulB99/FizzBuzz | 9e2254be359aca447395632d280d459550817b9e | [
"MIT"
] | null | null | null | src/fizzBuzz.py | PaulB99/FizzBuzz | 9e2254be359aca447395632d280d459550817b9e | [
"MIT"
] | null | null | null | #Python FizzBuzz
for x in range (1, 101):
fizz = (x % 3 == 0)
buzz = (x % 5 == 0)
if fizz & buzz:
print ('FizzBuzz')
elif fizz:
print ('Fizz')
elif buzz:
print ('Buzz')
else:
print (x)
| 19.538462 | 27 | 0.433071 |
72f827024f068b606928cfda283350786a0567ab | 361 | py | Python | exercises/ja/exc_03_10_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/ja/exc_03_10_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/ja/exc_03_10_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | import spacy
from spacy.tokens import Doc
nlp = spacy.blank("ja")
# ゲッターを定義
def get_has_number(doc):
# 少なくとも1つのトークンについて、token.like_numがTrueとなるかどうかを返す
return any(____ for token in doc)
# Docにget_has_number関数を「has_number」拡張プロパティとして登録
____.____(____, ____=____)
# テキストを処理し、has_number属性を表示
doc = nlp("この博物館は2012... | 20.055556 | 52 | 0.764543 |
be37efad12737c6d7da1cb555599c9a1de9adc41 | 7,937 | py | Python | 3rdparty/webkit/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | null | null | null | 3rdparty/webkit/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py | mchiasson/PhaserNative | f867454602c395484bf730a7c43b9c586c102ac2 | [
"MIT"
] | 9 | 2020-04-18T18:47:18.000Z | 2020-04-18T18:52:41.000Z | Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py | ijsf/DeniseEmbeddableWebKit | 57dfc6783d60f8f59b7129874e60f84d8c8556c9 | [
"BSD-3-Clause"
] | 1 | 2019-01-25T13:55:25.000Z | 2019-01-25T13:55:25.000Z | #!/usr/bin/env python
#
# Copyright (c) 2014-2016 Apple Inc. All rights reserved.
# Copyright (c) 2014 University of Washington. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistribution... | 51.206452 | 173 | 0.691571 |
fe6dde50489ad6f58361d9f440fcf669decf9901 | 1,592 | py | Python | frappe-bench/apps/erpnext/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.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/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/buying/doctype/supplier_scorecard_variable/test_supplier_scorecard_variable.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) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from erpnext.buying.doctype.supplier_scorecard_variable.supplier_scorecard_variable import VariablePathNotFound
class TestSupplierScore... | 27.929825 | 111 | 0.743719 |
228161ae6c66e8be446961568ccde3059c8cf736 | 12,251 | py | Python | Packs/Base/Scripts/DBotSuggestClassifierMapping/dbot_suggest_classifier_mapping_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2021-12-06T21:38:24.000Z | 2022-01-13T08:23:36.000Z | Packs/Base/Scripts/DBotSuggestClassifierMapping/dbot_suggest_classifier_mapping_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 87 | 2022-02-23T12:10:53.000Z | 2022-03-31T11:29:05.000Z | Packs/Base/Scripts/DBotSuggestClassifierMapping/dbot_suggest_classifier_mapping_test.py | cstone112/content | 7f039931b8cfc20e89df52d895440b7321149a0d | [
"MIT"
] | 2 | 2022-01-05T15:27:01.000Z | 2022-02-01T19:27:43.000Z | import pytest
import DBotSuggestClassifierMapping
from DBotSuggestClassifierMapping import *
all_incident_fields = []
@pytest.fixture(autouse=True)
def setup(mocker):
global all_incident_fields
DBotSuggestClassifierMapping.ALIASING_MAP, DBotSuggestClassifierMapping.ALIASING_TERMS_MAP = get_aliasing(
... | 42.391003 | 117 | 0.686311 |
4a29d4efe94e6fc062ea4a877fdf75507c00e56b | 1,335 | py | Python | 2020-09-02-1553-gma_klassen-main.py | gmaubach/OOP-with-Python | 9b059e911d55d616e756324564f1f2cc524aa53d | [
"MIT"
] | null | null | null | 2020-09-02-1553-gma_klassen-main.py | gmaubach/OOP-with-Python | 9b059e911d55d616e756324564f1f2cc524aa53d | [
"MIT"
] | null | null | null | 2020-09-02-1553-gma_klassen-main.py | gmaubach/OOP-with-Python | 9b059e911d55d616e756324564f1f2cc524aa53d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 2 13:25:10 2020
@author: Georg Maubach
"""
from bruch import *
b = Bruch(22, 7)
# print(b._zaehler, "/", b._nenner)
# man sollte nicht auf die Attribute direkt zugreifen.
b.ausgabe();
# Hier greife ich auf die Attribute ueber die Methode ausgabe() zu.
# ... | 17.565789 | 76 | 0.627715 |
43b38dbe081be6823dd6bb4dc22b43d4297c7140 | 501 | py | Python | Algorithms/Implementation/Beautiful_Days_atThe_Movies.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Beautiful_Days_atThe_Movies.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | Algorithms/Implementation/Beautiful_Days_atThe_Movies.py | vinayvinu500/Hackerrank | e185ae9d3c7dc5cd661761142e436f5df6a3f0f1 | [
"MIT"
] | null | null | null | #beautiful day
# https://www.hackerrank.com/challenges/beautiful-days-at-the-movies/problem?h_r=internal-search
def swap(n):
rev = 0
while n > 0:
d = n % 10
rev = rev * 10 + d
n = n // 10
return rev
def bd(i,j,k):
arr = [(abs(i-swap(i)))/k for i in range(i,j+1)]
temp = lis... | 20.875 | 96 | 0.578842 |
43d392df834f20d71da2025372b1efd82d87a2a1 | 2,942 | py | Python | setup.py | AI-Mart/PaddleNLP | 0ababea960427e8b70220ea06d908ed58cbed0ed | [
"Apache-2.0"
] | null | null | null | setup.py | AI-Mart/PaddleNLP | 0ababea960427e8b70220ea06d908ed58cbed0ed | [
"Apache-2.0"
] | null | null | null | setup.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 by appli... | 38.207792 | 154 | 0.670632 |
98fa05bdfc47dcc5ca7dc8e1e1afc9385e8a468f | 15,684 | py | Python | rbac/common/protobuf/proposal_state_pb2.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | rbac/common/protobuf/proposal_state_pb2.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | 1 | 2019-07-08T22:32:43.000Z | 2019-07-08T22:32:43.000Z | rbac/common/protobuf/proposal_state_pb2.py | akgunkel/sawtooth-next-directory | a88833033ab30e9091479a38947f04c5e396ca46 | [
"Apache-2.0"
] | null | null | null | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: proposal_state.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as... | 39.112219 | 1,711 | 0.732402 |
c750ca2b33959fa967f65d6a6fd147ecd6ad8fbe | 3,383 | py | Python | nodes/ue08_sonar_gazebo/sonar_obstacle_avoidance.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | nodes/ue08_sonar_gazebo/sonar_obstacle_avoidance.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | nodes/ue08_sonar_gazebo/sonar_obstacle_avoidance.py | ProfJust/Ruhr-TurtleBot-Competition-RTC- | 5c2425bee331b4d5033757a9425676932d111775 | [
"Unlicense",
"MIT"
] | null | null | null | #!/usr/bin/env python3
# sonar_obstacle_avoidance.py
# ################################################################################
# edited WHS, OJ , 17.12.2020 #
# usage
# copy content of turtlebot3.burger.gazebo_sonar.xacro
# to turtlebot3.burger.gazebo_sonar.xacro
# copy content of turtlebot3.burge... | 39.337209 | 92 | 0.538575 |
1be72f4170f79af57abfcea1067d2bc74d59bda6 | 1,745 | py | Python | 03 Python/Einparkhilfe/loesung/src/main.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Einparkhilfe/loesung/src/main.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | null | null | null | 03 Python/Einparkhilfe/loesung/src/main.py | DennisSchulmeister/dhbwka-wwi-iottech-quellcodes | 58f86907af31187f267a9ea476f061cc59098ebd | [
"CC-BY-4.0"
] | 1 | 2020-10-10T20:24:05.000Z | 2020-10-10T20:24:05.000Z | #! /usr/bin/env python3
# Beispiel für die Gliederung des Quellcodes eíner in Python geschriebenen Anwendung
# zur Ansteuerung von externen Hardwarekomponenten. Die Anwendung realisiert dabei
# eine einfache Einparkhilfe, auf Knopfdruck beginnt, mit einem Ultraschallsensor so
# lange den Abstand zu messen, bis der Kno... | 34.9 | 84 | 0.720917 |
2969d7f7c3353e3060e6b7d3d71b362b8ebc865f | 1,572 | py | Python | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch07_recursion_advanced/ex03_math_operator_v1_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch07_recursion_advanced/ex03_math_operator_v1_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/zzz_training_challenge/Python_Challenge/solutions/tests/ch07_recursion_advanced/ex03_math_operator_v1_test.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | # Beispielprogramm für das Buch "Python Challenge"
#
# Copyright 2020 by Michael Inden
import pytest
from ch07_recursion_advanced.solutions.ex06_math_operations_v1 import find_all_combinations, all_combinations_with_value
@pytest.mark.parametrize("digits, expected",
[([1, 2, 3],
... | 35.727273 | 120 | 0.402036 |
468992109f696fd688711ca665a0c1f72798824d | 5,949 | py | Python | backend/app/core/solver/solver.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-11-04T17:06:07.000Z | 2021-11-04T17:06:07.000Z | backend/app/core/solver/solver.py | JamesNeumann/learning-by-annotations | c2b5e4b653eeb1c973aa5a7dad35ac8be18cb1ad | [
"MIT"
] | 21 | 2021-11-01T10:13:56.000Z | 2021-12-02T10:02:13.000Z | backend/app/core/solver/solver.py | jinnn-dev/patholearn | b4e6a18cfbf963e71640ed6cac3fc3a618a7ae15 | [
"MIT"
] | 1 | 2021-12-16T18:20:55.000Z | 2021-12-16T18:20:55.000Z | from typing import List, Union
from pydantic import parse_obj_as
from app.core.solver.annotation_analysis import AnnotationAnalysis
from app.core.solver.feeback_generator import FeedbackGenerator
from app.core.solver.select_images_analysis import SelectImagesAnalysis
from app.schemas.polygon_data import (
... | 41.3125 | 110 | 0.596739 |
311ca4b4de8334a039908251a5289f1065edfcae | 388 | py | Python | demo/HelloPython/DFS.py | muhlenXi/enjoy-algorithm | a2e2edca96dc5706c494415f9e2e96f62d045fb3 | [
"Apache-2.0"
] | null | null | null | demo/HelloPython/DFS.py | muhlenXi/enjoy-algorithm | a2e2edca96dc5706c494415f9e2e96f62d045fb3 | [
"Apache-2.0"
] | null | null | null | demo/HelloPython/DFS.py | muhlenXi/enjoy-algorithm | a2e2edca96dc5706c494415f9e2e96f62d045fb3 | [
"Apache-2.0"
] | null | null | null | graph = {
"A" : ["B", "C"],
"B": ["A", "E"],
"C": ["A", "D", "F"],
"D": ["C", "E"],
"E": ["B", "D", "F", "G"],
"F": ["C", "E"],
"G": ["E"]
}
def dfs(graph, s):
stack = []
seen = set()
stack.append(s)
seen.add(s)
while len(stack) > 0:
vertex = stack.pop()
nodes = graph[vertex]
for n in nodes:
if ... | 14.37037 | 27 | 0.438144 |
9ed933e0c27a47443f5309de05872ba773238d39 | 529 | py | Python | gener/BinaryTreeDFS/template/InorderPreorderTraversalInterative.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2015-12-16T04:01:03.000Z | 2015-12-16T04:01:03.000Z | gener/BinaryTreeDFS/template/InorderPreorderTraversalInterative.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 1 | 2016-02-09T06:00:07.000Z | 2016-02-09T07:20:13.000Z | gener/BinaryTreeDFS/template/InorderPreorderTraversalInterative.py | cc13ny/all-in | bc0b01e44e121ea68724da16f25f7e24386c53de | [
"MIT"
] | 2 | 2019-06-27T09:07:26.000Z | 2019-07-01T04:40:13.000Z | class Tree:
def __init__(self, val):
self.val = val
self.left = None
self.right = None
def inorderPreorderTraversal(root):
inorder, preorder, stack = [], [], [root]
while stack != [] and stack[0] is not None:
node = stack.pop()
while node is not None:
pr... | 23 | 47 | 0.559546 |
731f4ac93c4df39c5653166d43402055520b0379 | 10,724 | py | Python | src/sft/protocol/receiver.py | huykingsofm/FileTransmitter | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | 1 | 2020-08-28T19:06:13.000Z | 2020-08-28T19:06:13.000Z | src/sft/protocol/receiver.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | src/sft/protocol/receiver.py | huykingsofm/sft | f0f8cd0d6f941903bb8c42291a81b711055fcb1a | [
"MIT"
] | null | null | null | import os
import time
from typing import Callable
import csbuilder
from hks_pylib.done import Done
from hks_pylib.hksenum import HKSEnum
from csbuilder.cspacket import CSPacket
from csbuilder.scheme import Scheme, SchemeResult
from sft.file import FileWriter
from sft.protocol import DEFAULT_INT_SIZE
from sft.protoc... | 33.936709 | 93 | 0.556043 |
734049603a18c7cebf31074e00f0d44c2c38fd50 | 973 | py | Python | python/prix.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2017-12-12T13:58:08.000Z | 2017-12-12T13:58:08.000Z | python/prix.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | null | null | null | python/prix.py | wittrup/crap | a77474588fd54a5a998e24df7b1e6e2ab473ded1 | [
"MIT"
] | 1 | 2019-11-03T10:16:35.000Z | 2019-11-03T10:16:35.000Z | """prix polynomial reversed init-value xor-out finder"""
from crcmod import mkCrcFun
from faulhaber_const import commands
import time
match = open('prix.txt', 'w+')
start = time.clock()
lastpos = 0
for possibility in range(0x2000000):
polynomial = (possibility & 0xff) | 0x100
init_value = (possibility & 0xff00... | 30.40625 | 69 | 0.633094 |
b46e9cb8249abb0bd11c664591de16d18d9410f6 | 307 | py | Python | algorithms/ar-lscsa/python3/max_sum_array.py | NuclearCactus/FOSSALGO | eb66f3bdcd6c42c66e8fc7110a32ac021596ca66 | [
"MIT"
] | 59 | 2018-09-11T17:40:25.000Z | 2022-03-03T14:40:39.000Z | algorithms/ar-lscsa/python3/max_sum_array.py | RitvikDayal/FOSSALGO | ae225a5fffbd78d0dff83fd7b178ba47bfd7a769 | [
"MIT"
] | 468 | 2018-08-28T17:04:29.000Z | 2021-12-03T15:16:34.000Z | algorithms/ar-lscsa/python3/max_sum_array.py | RitvikDayal/FOSSALGO | ae225a5fffbd78d0dff83fd7b178ba47bfd7a769 | [
"MIT"
] | 253 | 2018-08-28T17:08:51.000Z | 2021-11-01T12:30:39.000Z | def maxSubArray(nums):
num_array = [0 for i in range(len(nums))]
num_array[0] = nums[0]
for i in range(1,len(nums)):
num_array[i] = max(num_array[i-1]+nums[i],nums[i])
return max(num_array)
nums = [-13,-3,-25,-20,2,1,-3,7,-2,2,1,-5,-3,-16]
print(maxSubArray(nums))
| 34.111111 | 64 | 0.566775 |
b477c7e028cb6a14a82b8cfd0db585a954840495 | 5,465 | py | Python | translation/translate_by_idai_vocab.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | translation/translate_by_idai_vocab.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | translation/translate_by_idai_vocab.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import furl
import json
import Levenshtein
import requests
class IdaiVocab(object):
@classmethod
def _evaluate_response(cls, response: requests.Response):
result = {}
if response.status_code != 200:
print(f"WARN: Bad r... | 40.783582 | 105 | 0.627264 |
7d5b0fb1c30a70f1b2614e3ed62f40d865665157 | 61 | py | Python | Versuch2/grayscale.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch2/grayscale.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | null | null | null | Versuch2/grayscale.py | Tobias-Schoch/SSS | f8b078ca7f6482fc7c89d5f9e784a549459eefb7 | [
"MIT"
] | 1 | 2022-01-06T12:47:53.000Z | 2022-01-06T12:47:53.000Z | grey = cv2.imread('data/Versuch1a.png', cv2.IMREAD_GRAYSCALE) | 61 | 61 | 0.786885 |
81762bebe4b1e21647a34365ff0e2ef2607fcd8a | 177 | py | Python | x/genxls/main.py | miku/lc-extra | afeb3cb5f532069be17c54d6508aa7c0c8373c2a | [
"MIT"
] | null | null | null | x/genxls/main.py | miku/lc-extra | afeb3cb5f532069be17c54d6508aa7c0c8373c2a | [
"MIT"
] | null | null | null | x/genxls/main.py | miku/lc-extra | afeb3cb5f532069be17c54d6508aa7c0c8373c2a | [
"MIT"
] | 1 | 2020-02-04T08:09:01.000Z | 2020-02-04T08:09:01.000Z | import pandas as pd
data = [
["0-6", 34],
["6-12", 54],
["13-16", 34],
["17-18", 134],
["18-80", 34],
]
df = pd.DataFrame(data)
df.to_excel("output.xlsx")
| 13.615385 | 26 | 0.480226 |
81af426e300e5ba4a03d83746c17114e0d0ba2df | 2,128 | py | Python | myspiders/spider_hr/bankofbeijing_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | 2 | 2021-11-27T06:40:47.000Z | 2022-01-06T03:12:46.000Z | myspiders/spider_hr/bankofbeijing_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | myspiders/spider_hr/bankofbeijing_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | from myspiders.ruia import JsonField, Item, Spider, Bs4HtmlField, Bs4AttrField, Bs4TextField
import json
from config import Target
from urllib.parse import quote, urljoin
import re
from bs4 import BeautifulSoup
# 每次爬取前5页
class BankofbeijingWorker(Spider):
name = 'BankofbeijingWorker'
bank_name = '北京银行'
st... | 43.428571 | 136 | 0.648966 |
c4c8b42a405a6b8f0f70bb3104465dd0c5a39012 | 489 | py | Python | Curso-Em-Video-Python/2Exercicios/036-Aprovando-emprestimo.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/036-Aprovando-emprestimo.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | Curso-Em-Video-Python/2Exercicios/036-Aprovando-emprestimo.py | pedrohd21/Cursos-Feitos | b223aad83867bfa45ad161d133e33c2c200d42bd | [
"MIT"
] | null | null | null | print('Simulador de Casa')
print('-' * 50)
ValorCasa = float(input('Qual o valor da casa? R$ '))
salario = float(input('Qual o seu salario? R$ '))
ano = int(input('Quantos anos prentende pagar a casa? '))
meses = ValorCasa / (ano * 12)
total = (salario * 30)/100
print('-' * 50)
if total > meses:
print('Aprovado!!')... | 32.6 | 57 | 0.648262 |
c4cb0bb11b1d53ec26753f912487061fe22fb619 | 91 | py | Python | IdeaWall/apps.py | NAL0/nalbt | c411ead60fac8923e960e67f4bbad5c7aeffc614 | [
"MIT"
] | null | null | null | IdeaWall/apps.py | NAL0/nalbt | c411ead60fac8923e960e67f4bbad5c7aeffc614 | [
"MIT"
] | null | null | null | IdeaWall/apps.py | NAL0/nalbt | c411ead60fac8923e960e67f4bbad5c7aeffc614 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class IdeawallConfig(AppConfig):
name = 'IdeaWall'
| 15.166667 | 33 | 0.758242 |
c4df476b0a56071a9e40a39b0bfbc77860b46a8a | 4,731 | py | Python | tests/shared/nlu/training_data/test_entities_parser.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 30 | 2020-11-30T12:55:45.000Z | 2022-01-20T02:53:03.000Z | tests/shared/nlu/training_data/test_entities_parser.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 209 | 2020-03-18T18:28:12.000Z | 2022-03-01T13:42:29.000Z | tests/shared/nlu/training_data/test_entities_parser.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 10 | 2021-01-11T02:08:43.000Z | 2021-11-19T09:12:46.000Z | from typing import Text, List, Dict, Any
import pytest
import rasa.shared.nlu.training_data.entities_parser as entities_parser
from rasa.shared.nlu.constants import TEXT
@pytest.mark.parametrize(
"example, expected_entities, expected_text",
[
(
"I need an [economy class](travel_flight_cl... | 33.792857 | 88 | 0.445995 |
82f867425d4f91a49a59186f60015e0665a1baf1 | 393 | py | Python | Visual Studio Product Team/Visual Studio 2010 SDK Samples/[C++]-Visual Studio 2010 SDK Samples/IronPython Studio VS Shell Isolated/C#,C++/studioisolated/IronPython/src/IronPython.Project/Templates/Items/Web/WebClass/Class.py | zzgchina888/msdn-code-gallery-microsoft | 21cb9b6bc0da3b234c5854ecac449cb3bd261f29 | [
"MIT"
] | 2 | 2022-01-21T01:40:58.000Z | 2022-01-21T01:41:10.000Z | Common7/IDE/src/IronPython.Project/Templates/Items/Web/WebClass/Class.py | jdm7dv/visual-studio | 16cff89cee98f3c5e1c3e6134d1658c271a5902f | [
"Apache-2.0"
] | 1 | 2022-03-15T04:21:41.000Z | 2022-03-15T04:21:41.000Z | Common7/IDE/src/IronPython.Project/Templates/Items/Web/WebClass/Class.py | jdm7dv/visual-studio | 16cff89cee98f3c5e1c3e6134d1658c271a5902f | [
"Apache-2.0"
] | null | null | null | import System
from System.Data import *
from System.Configuration import *
from System.Web import *
from System.Web.Security import *
from System.Web.UI import *
from System.Web.UI.WebControls import *
from System.Web.UI.WebControls.WebParts import *
from System.Web.UI.HtmlControls import *
class $rootnamespace$: #nam... | 26.2 | 48 | 0.760814 |
d27cbe51f3794dc5add1606fd4daae8bde92547d | 2,196 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/remote_management/oneview/oneview_module_loader.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/remote_management/oneview/oneview_module_loader.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/remote_management/oneview/oneview_module_loader.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import sys
from ansible_collections.community.general.tests.unit.compat.mock import Mock
# FIXME: These should be done inside of a fixture so that they're on... | 78.428571 | 147 | 0.834244 |
73e0607951e8eed10e2b3b06fa9224651a75a497 | 223 | py | Python | chapter_eleven/give_the_interface_a_native_feel_with_objects/run.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | 21 | 2021-09-10T12:46:26.000Z | 2022-03-23T02:50:39.000Z | chapter_eleven/give_the_interface_a_native_feel_with_objects/run.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | null | null | null | chapter_eleven/give_the_interface_a_native_feel_with_objects/run.py | PacktPublishing/Speed-up-your-Python-with-Rust | 1fce5fb59ea966015768e7eca51c0e31d69531ec | [
"MIT"
] | 6 | 2021-09-02T08:32:37.000Z | 2022-03-17T21:15:25.000Z | from .calculate_coordinates import Particle
particle = Particle(20, 30)
x_positions = []
y_positions = []
for t in particle.times:
x, y = particle.get_position(t)
x_positions.append(x)
y_positions.append(y)
| 17.153846 | 43 | 0.713004 |
83b8e20b186c7ef6f57e9812508517947e477eca | 1,218 | py | Python | SOP/07/uebung-a.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | SOP/07/uebung-a.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | SOP/07/uebung-a.py | chfrank-cgn/FOM | 72ada98bb287b00807911a070a390964b681f099 | [
"CC-BY-4.0"
] | null | null | null | # Uebung 1
def quadrat(x):
return x**2
x = 10
print quadrat(x)
# Uebung 2
def quadrat(x=None):
if x == None:
return None
else:
return x**2
print(quadrat(x))
print(quadrat())
# Uebung 3
def addition(*many):
print("Adding", many)
ret = 0
for i in many:
ret += i
return ret
print("3+4", addit... | 16.684932 | 45 | 0.582923 |
83ddf2bb585adc33317839530e90d715f4fc335d | 400 | py | Python | src/mkdir.py | misogil0116/Biscotti | 010ef0f29fbd5d33c9870ce249f1a9824f3471c4 | [
"Apache-2.0"
] | 10 | 2018-01-11T01:15:15.000Z | 2020-06-22T15:03:31.000Z | src/mkdir.py | misogil0116/Biscotti | 010ef0f29fbd5d33c9870ce249f1a9824f3471c4 | [
"Apache-2.0"
] | null | null | null | src/mkdir.py | misogil0116/Biscotti | 010ef0f29fbd5d33c9870ce249f1a9824f3471c4 | [
"Apache-2.0"
] | null | null | null | import os
def mkdir(dirname):
if not os.path.exists(dirname):
print("make ", dirname, " directory")
os.mkdir(dirname)
def make_directory():
print("=== make directory for dataset ===")
mkdir("resized_images/")
mkdir("opt_images/")
mkdir("qopt_images/")
mkdir("csv/")
mkdir("t... | 22.222222 | 47 | 0.6 |
e39cdc154d592a572c4811a6483d5235b1364610 | 1,137 | py | Python | Code/Labs/replace.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | Code/Labs/replace.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null | Code/Labs/replace.py | miku/haw-di-bim-lv22 | 5e3dd1f7a1eb02ebbe5cc801bd8094618d6525e3 | [
"MIT"
] | null | null | null |
text = """
Ueber einen kurzen Aufenthalt in Berlin, wohin er 1778 den Herzog von
Weimar begleitete, schrieb Goethe an Merk: "Ich war nur wenige Tage in
Berlin, und guckte nur drein, wie das Kind in den Schön-Raritäten-Kasten.
Aber du weißt, wie ich im Anschauen lebe; es sind mir tausend Lichter
aufgegangen. Und dem al... | 42.111111 | 73 | 0.754617 |
584cab329da6e15871164e2722f6a7550556f07c | 30 | py | Python | py/jpy-integration/src/javaToPython/python/io/deephaven/jpy/integration/plus42.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 55 | 2021-05-11T16:01:59.000Z | 2022-03-30T14:30:33.000Z | py/jpy-integration/src/javaToPython/python/io/deephaven/jpy/integration/plus42.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 943 | 2021-05-10T14:00:02.000Z | 2022-03-31T21:28:15.000Z | py/jpy-integration/src/javaToPython/python/io/deephaven/jpy/integration/plus42.py | devinrsmith/deephaven-core | 3a6930046faf1cd556f62a914ce1cfd7860147b9 | [
"MIT"
] | 29 | 2021-05-10T11:33:16.000Z | 2022-03-30T21:01:54.000Z | def plus42(x):
return x + 42 | 15 | 15 | 0.633333 |
542fbd2c749e81e021b56ab2b3ccc0588020580e | 1,565 | py | Python | Problems/Dynamic Programming/Hard/EditDistance/edit_distance.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Dynamic Programming/Hard/EditDistance/edit_distance.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Dynamic Programming/Hard/EditDistance/edit_distance.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from functools import lru_cache
# Top-down (Memoization)
# TC: O(M*N); SC: O(M*N)
def minDistance(self, word1: str, word2: str) -> int:
l1, l2 = len(word1), len(word2)
@lru_cache(None)
def dp(i: int, j: int) -> int:
if j == l2:
return l1 - i
if i == l1:
return l2 ... | 26.982759 | 80 | 0.45623 |
544d1a1220c3428cffe1f4568ddfa853e3c970c9 | 92 | py | Python | 2014/05/table-gallup-positive-scores/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 14 | 2015-05-08T13:41:51.000Z | 2021-02-24T12:34:55.000Z | 2014/05/table-gallup-positive-scores/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | null | null | null | 2014/05/table-gallup-positive-scores/graphic_config.py | nprapps/graphics-archive | 97b0ef326b46a959df930f5522d325e537f7a655 | [
"FSFAP"
] | 7 | 2015-04-04T04:45:54.000Z | 2021-02-18T11:12:48.000Z | #!/usr/bin/env python
COPY_GOOGLE_DOC_KEY = '1o6rLEuOXuQ8_Asw4I-Rghw6x3aJoUaK9GsItP5fJUZ8'
| 23 | 68 | 0.836957 |
b7339536fc1eaa527e4ae2f545ce018b47bd9991 | 1,698 | py | Python | language/functions.py | dr-bigfatnoob/quirk | f5025d7139adaf06380c429b436ccbf1e7611a16 | [
"Unlicense"
] | 1 | 2021-03-05T07:44:05.000Z | 2021-03-05T07:44:05.000Z | language/functions.py | dr-bigfatnoob/quirk | f5025d7139adaf06380c429b436ccbf1e7611a16 | [
"Unlicense"
] | 3 | 2017-06-04T03:01:31.000Z | 2017-08-04T04:04:37.000Z | language/functions.py | dr-bigfatnoob/quirk | f5025d7139adaf06380c429b436ccbf1e7611a16 | [
"Unlicense"
] | null | null | null | from __future__ import print_function, division
import sys
import os
sys.path.append(os.path.abspath("."))
sys.dont_write_bytecode = True
from distribution import *
import operator as o
from utils.lib import gt, lt, gte, lte, neq, eq
__author__ = "bigfatnoob"
def sample(values, size=100):
return np.random.choice(v... | 19.078652 | 64 | 0.645465 |
3fb652ce3c4bb31e44fa0f61ecea3cd5507c4d5c | 1,030 | py | Python | config.py | Lonero-Team/OpenExchange-Config | 3dcbe83fff3bd5a841d779755e9411a62c1643d7 | [
"MIT"
] | null | null | null | config.py | Lonero-Team/OpenExchange-Config | 3dcbe83fff3bd5a841d779755e9411a62c1643d7 | [
"MIT"
] | null | null | null | config.py | Lonero-Team/OpenExchange-Config | 3dcbe83fff3bd5a841d779755e9411a62c1643d7 | [
"MIT"
] | null | null | null | instruments = ["lnr_btc"]
currencies = {
"lnr": {
"daemon": "142.93.171.115:34415@127.0.0.1:34414",
"multiplier": 100000000,
"name": "Lonero"},
"btc": {
"daemon": "http://bitcoinrpc:94CpFcoCgO@127.0.0.1:8332",
"multiplier": 100000000,
"name": "Bitcoin"}}
dbfile = ... | 27.105263 | 64 | 0.640777 |
3feddb292fc70a5a250ab3de30cb01eb17a77403 | 14,727 | py | Python | Openharmony v1.0/vendor/hisi/hi35xx/third_party/uboot/tools/patman/tools.py | clkbit123/TheOpenHarmony | 0e6bcd9dee9f1a2481d762966b8bbd24baad6159 | [
"MIT"
] | 1 | 2022-02-15T08:51:55.000Z | 2022-02-15T08:51:55.000Z | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/patman/tools.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | hihope_neptune-oh_hid/00_src/v0.1/device/hisilicon/third_party/uboot/u-boot-2020.01/tools/patman/tools.py | dawmlight/vendor_oh_fun | bc9fb50920f06cd4c27399f60076f5793043c77d | [
"Apache-2.0"
] | null | null | null | # SPDX-License-Identifier: GPL-2.0+
#
# Copyright (c) 2016 Google, Inc
#
from __future__ import print_function
import command
import glob
import os
import shutil
import struct
import sys
import tempfile
import tout
# Output directly (generally this is temporary)
outdir = None
# True to keep the output directory ar... | 28.375723 | 79 | 0.620493 |
4d55bde15a19d9cb205d780f5ddf9e5e53670afd | 2,445 | py | Python | tutorials/numerical_computation/scratch/model/parts/system.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 56 | 2020-07-08T23:23:15.000Z | 2022-03-11T20:43:09.000Z | tutorials/numerical_computation/scratch/model/parts/system.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 41 | 2020-07-11T23:24:06.000Z | 2022-01-28T13:28:07.000Z | tutorials/numerical_computation/scratch/model/parts/system.py | w-ghub/demos | 6382676fae89bd5a190626612712fcedf17bca6d | [
"MIT"
] | 39 | 2020-07-15T11:35:04.000Z | 2022-02-01T16:02:51.000Z | import numpy as np
import scipy.stats as sps
import datetime as dt
import pandas as pd
# Behaviors
def event(params, step, sL, s):
error =s['price']-s['target']
delta_time = sps.expon.rvs(loc = params['minimum_period'], scale = params['expected_lag'])
return({'error':error, 'delta_time': delta_time})
... | 21.077586 | 101 | 0.619223 |
4d93fce845c1e87a588050c66a84d6afb18a9138 | 782 | py | Python | Server/client/recommend.py | TateYdq/DietRegimen | 66c88e84b7c4d9226db1d9567d300b1c6f7344b7 | [
"MIT"
] | null | null | null | Server/client/recommend.py | TateYdq/DietRegimen | 66c88e84b7c4d9226db1d9567d300b1c6f7344b7 | [
"MIT"
] | null | null | null | Server/client/recommend.py | TateYdq/DietRegimen | 66c88e84b7c4d9226db1d9567d300b1c6f7344b7 | [
"MIT"
] | null | null | null | import requests
import json
from utils.config import *
ss = requests.session()
def getQuestionnaire():
data = {
}
url = URL.format(env=cur_url, term=client_url, action="/recommend/getQuestionnaire")
getReq(url, ss, data=data,token=user_token)
def submitQuestionnaire():
data =json.dumps({
"... | 23.69697 | 91 | 0.563939 |
42970d878fcbfd7ea1a9f7180ff0c6587d23de09 | 1,478 | py | Python | py_projects/gui english dictionary/dict.py | Anwesha-dash811/hacktober-1 | 188c859864f06f94a94cb91e63979366db62b9ac | [
"MIT"
] | 1 | 2020-10-04T12:36:45.000Z | 2020-10-04T12:36:45.000Z | py_projects/gui english dictionary/dict.py | Anwesha-dash811/hacktober-1 | 188c859864f06f94a94cb91e63979366db62b9ac | [
"MIT"
] | 1 | 2021-09-30T16:20:57.000Z | 2021-09-30T16:20:57.000Z | py_projects/gui english dictionary/dict.py | Anwesha-dash811/hacktober-1 | 188c859864f06f94a94cb91e63979366db62b9ac | [
"MIT"
] | 3 | 2020-10-04T09:49:36.000Z | 2020-10-25T15:26:56.000Z | import json
from difflib import get_close_matches
import tkinter as tk
from tkinter import messagebox
from tkinter import StringVar
import tkinter.font as TkFont
data = json.load(open("data.json"))
def translate(w):
# converts to lower case
w = w.lower()
if w in data:
#return d... | 36.95 | 117 | 0.612314 |
676f51db43849e7052fff127ce86f2a71f6784f5 | 3,912 | py | Python | DatenbankEditManoeverWrapper.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 15 | 2017-11-09T12:49:52.000Z | 2022-03-06T12:18:48.000Z | DatenbankEditManoeverWrapper.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 40 | 2018-02-01T21:32:01.000Z | 2022-03-22T11:35:28.000Z | DatenbankEditManoeverWrapper.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 13 | 2018-03-12T17:50:42.000Z | 2022-03-06T12:21:41.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 19 22:33:21 2018
@author: Aeolitus
"""
import Fertigkeiten
from Hilfsmethoden import Hilfsmethoden, VoraussetzungException
import DatenbankEditManoever
from PyQt5 import QtWidgets, QtCore
class DatenbankEditManoeverWrapper(object):
def __init__(self, datenbank, man=N... | 40.75 | 144 | 0.643916 |
6770aeec00a113b7452e148d6d9d9b63b0647ef3 | 592 | py | Python | Imaginary/2021/crypto/neatX2-rsa/main.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | 1 | 2021-11-02T20:53:58.000Z | 2021-11-02T20:53:58.000Z | Imaginary/2021/crypto/neatX2-rsa/main.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | Imaginary/2021/crypto/neatX2-rsa/main.py | ruhan-islam/ctf-archives | 8c2bf6a608c821314d1a1cfaa05a6cccef8e3103 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from Crypto.Util.number import getPrime, bytes_to_long
from os import urandom
with open('flag.txt', 'r') as f:
flag = f.read()
l = len(flag)
f1, f2 = flag[:l//2], flag[l//2:]
p, q, r = [getPrime(512) for _ in range(3)]
n1, n2 = p * q, q * r
e = 65537
elusive = bytes_to_long(urandom(4))
pt1 = ... | 19.733333 | 54 | 0.606419 |
2213ff31d5e9a8ebfc5d15141e8836e40a7b6b85 | 3,417 | py | Python | myspiders/spider_hr/czbank_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | 2 | 2021-11-27T06:40:47.000Z | 2022-01-06T03:12:46.000Z | myspiders/spider_hr/czbank_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | myspiders/spider_hr/czbank_spider.py | zhouhongf/bank_hr | a42e5e18f3ec36b1ec65931415fe476c9690e0a0 | [
"MIT"
] | null | null | null | from myspiders.ruia import Spider, JsonField, Item
from config import Target
import re
from bs4 import BeautifulSoup
from urllib.parse import urljoin
import time
from myspiders.tools.tools_spider import fetch_bank_cookies
'''
baseCond: "(一)遵纪守法,诚信负责,勤奋务实;
↵(二)身体健康,品貌端正,具有良好的心理素质和抗压能力;
↵(三)大学本科及以上学历;
↵(四)年龄在38周岁及以下;
↵(... | 31.063636 | 165 | 0.701493 |
3f187b0236275afd2ab876f373d25d9d342ab8d2 | 9,479 | py | Python | research/audio/deepspeech2/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/audio/deepspeech2/src/dataset.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/audio/deepspeech2/src/dataset.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.995781 | 120 | 0.617681 |
4501fd7dc839701ac38750ab9193645aff3378ed | 702 | py | Python | Classes/Powerup.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-04-30T15:46:47.000Z | 2018-04-30T15:46:47.000Z | Classes/Powerup.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-06-03T13:20:19.000Z | 2018-06-03T20:19:25.000Z | Classes/Powerup.py | EKaczmarek/BomberMan | a232d00ff0fe9be0a1276fba22c3f120e2bb4e5d | [
"MIT"
] | 1 | 2018-06-03T12:59:11.000Z | 2018-06-03T12:59:11.000Z | import pygame
class Powerup(object):
x, y = '', ''
desc = "powerup"
# kind of powerups:
# speed of moving player ==> player_speed ==> S
# number of bombs ==> bombs_no ==> N
# range of bomb ==> bombs_range ==> R
kind = ''
... | 24.206897 | 93 | 0.518519 |
e181a4ebc257886819b9464ad352474a8bfccde2 | 1,444 | py | Python | project/api/fields.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/api/fields.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/api/fields.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | from marshmallow import ValidationError, fields
from marshmallow_sqlalchemy import fields as msfields
from project.dateutils import berlin_tz
class NumericStr(fields.String):
def _serialize(self, value, attr, obj, **kwargs):
if value is None:
return None
return str(value)
def _d... | 30.083333 | 79 | 0.635042 |
bef3508772fe97bcd215dc48a092895d63f8ea9d | 349 | py | Python | scripts/WQUtil.py | walty19950301/MovieRecommend | b86e773b4c27159d8819c5bae1c87192ce47953a | [
"MIT"
] | null | null | null | scripts/WQUtil.py | walty19950301/MovieRecommend | b86e773b4c27159d8819c5bae1c87192ce47953a | [
"MIT"
] | null | null | null | scripts/WQUtil.py | walty19950301/MovieRecommend | b86e773b4c27159d8819c5bae1c87192ce47953a | [
"MIT"
] | null | null | null | import time
def log(tag='',msg=''):
print(time.strftime("[%Y-%m-%d %H:%M:%S]",time.localtime()) + '{' + tag + '}' + msg)
class Log(object):
def __init__(self,filename):
self.savefile = open(filename,'w')
def write_line(self,str=''):
self.savefile.writelines(str)
def __del__(self):
... | 21.8125 | 88 | 0.578797 |
3d2d9c071ac8ceee918967db1f8f373811d92ede | 317 | py | Python | components/amp-utility/python/uheapq.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 4,538 | 2017-10-20T05:19:03.000Z | 2022-03-30T02:29:30.000Z | components/amp-utility/python/uheapq.py | ekmixon/AliOS-Things | 00334295af8aa474d818724149726ca93da4645d | [
"Apache-2.0"
] | 1,088 | 2017-10-21T07:57:22.000Z | 2022-03-31T08:15:49.000Z | components/amp-utility/python/uheapq.py | willianchanlovegithub/AliOS-Things | 637c0802cab667b872d3b97a121e18c66f256eab | [
"Apache-2.0"
] | 1,860 | 2017-10-20T05:22:35.000Z | 2022-03-27T10:54:14.000Z | # * coding: UTF8 *
"""
该模块实现相应 CPython 模块的子集,如下所示。
堆队列即为以一定方式储存其所有项的列表。
函数
------------------------------
"""
def heappush(heap, item):
"""
将item载入heap中
"""
pass
def heappop(heap):
"""
从 heap 中提取首项,并返回,若堆为空,则引发Index错误
"""
pass
def heapify(x):
"""
将列表 x 转换为一个堆
"""
pass | 9.90625 | 35 | 0.501577 |
180475b2ace5decb996f60b4c81846a1ff248de5 | 3,214 | py | Python | couverture_vaccinale_par_age.py | EliasOrphelin/Analysis | 2f1a0ddb8d4a7ed13fc419bc063e6205fef9f9af | [
"MIT"
] | null | null | null | couverture_vaccinale_par_age.py | EliasOrphelin/Analysis | 2f1a0ddb8d4a7ed13fc419bc063e6205fef9f9af | [
"MIT"
] | null | null | null | couverture_vaccinale_par_age.py | EliasOrphelin/Analysis | 2f1a0ddb8d4a7ed13fc419bc063e6205fef9f9af | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Couverture vaccinale par age
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1hzx9aSz9HYVmo8LClypElPvc0mfGQXzx
"""
#data et bibliothèques
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
source_data_age... | 34.55914 | 198 | 0.750778 |
9abd6aec41c275881f93155906b2e4d0b7e2b229 | 1,029 | py | Python | packages/watchmen-data-kernel/src/watchmen_data_kernel/external_writer/external_writer_builder_registry.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/external_writer/external_writer_builder_registry.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | packages/watchmen-data-kernel/src/watchmen_data_kernel/external_writer/external_writer_builder_registry.py | Indexical-Metrics-Measure-Advisory/watchmen | c54ec54d9f91034a38e51fd339ba66453d2c7a6d | [
"MIT"
] | null | null | null | from typing import Callable, Dict, Optional
from watchmen_model.system import ExternalWriterType
from .external_writer_registry import BuildExternalWriter
CreateExternalWriterBuilder = Callable[[], BuildExternalWriter]
class ExternalWriterBuilderRegistry:
creators: Dict[ExternalWriterType, CreateExternalWriterBuil... | 35.482759 | 106 | 0.847425 |
491082310301bfa8626ff0b264fdabc0a3eb1612 | 1,042 | py | Python | warp/globals.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/globals.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | warp/globals.py | j-helland/warp | 2a71346f0ec4d4e6fd45ed3b5e972b683724287c | [
"Unlicense"
] | null | null | null | # std
import os
import time
# warp
import warp.constants as constants
# logging
import logging
from rich.logging import RichHandler
# types
from typing import Dict
from types import FunctionType
FORMAT = '%(message)s'
logging.basicConfig(
level='NOTSET', format=FORMAT, datefmt='[%Y-%m-%d %H:%M:%S]', handlers=... | 22.170213 | 92 | 0.716891 |
4996bd11219ce886ab9f0b6d1c26ec1c38759fc3 | 755 | py | Python | hardware/rider_device/tid_creator.py | BlueHC/TTHack-2018--Easy-Rider-1 | 8cd8f66de88ff80751a1083350c38985ac26914d | [
"Apache-2.0"
] | null | null | null | hardware/rider_device/tid_creator.py | BlueHC/TTHack-2018--Easy-Rider-1 | 8cd8f66de88ff80751a1083350c38985ac26914d | [
"Apache-2.0"
] | null | null | null | hardware/rider_device/tid_creator.py | BlueHC/TTHack-2018--Easy-Rider-1 | 8cd8f66de88ff80751a1083350c38985ac26914d | [
"Apache-2.0"
] | null | null | null | import time
import datetime
import random
def create_tid(secret):
time_now = datetime.datetime.now()
random.seed(time_now.year * secret)
tid_parts = []
random.seed(time_now.minute * secret)
tid_min_part = random.randint(0, 999)
tid_parts.append(random.randint(0, 999) * tid_min_part )
random... | 32.826087 | 60 | 0.695364 |
b8ec48a12fcce57740bc770cfd8a4b5006802994 | 2,483 | py | Python | official/cv/yolov3_resnet18/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/yolov3_resnet18/postprocess.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/yolov3_resnet18/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... | 40.704918 | 114 | 0.63673 |
77480d07bfb9f9c2ccfbfc932dc332a184e71061 | 2,024 | py | Python | extender/darkstar/music/conanfile.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 2 | 2020-03-18T18:23:27.000Z | 2020-08-02T15:59:16.000Z | extender/darkstar/music/conanfile.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 5 | 2019-07-07T16:47:47.000Z | 2020-08-10T16:20:00.000Z | extender/darkstar/music/conanfile.py | gifted-nguvu/darkstar-dts-converter | aa17a751a9f3361ca9bbb400ee4c9516908d1297 | [
"MIT"
] | 1 | 2020-03-18T18:23:30.000Z | 2020-03-18T18:23:30.000Z | from conans import ConanFile, CMake, tools
import glob
import os.path
class HelloWxWidgetsConanFile(ConanFile):
build_requires = "cmake/3.22.0"
requires = "wxwidgets/3.1.5@bincrafters/stable", "mio/cci.20201220", "sfml/2.5.1"
settings = "os", "compiler", "build_type", "arch"
generators = "cmake_find_pa... | 39.686275 | 98 | 0.639328 |
65d2ec7c254955500fa0e0e8c7c1fbb09a4e8e76 | 496 | py | Python | PINp/2014/TsivunchikDVnew/task_3_25.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/TsivunchikDVnew/task_3_25.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | PINp/2014/TsivunchikDVnew/task_3_25.py | YukkaSarasti/pythonintask | eadf4245abb65f4400a3bae30a4256b4658e009c | [
"Apache-2.0"
] | null | null | null | # Задача 3. Вариант 25.
# Напишите программу, которая выводит имя "Алессандро Филипели", и запрашивает
# его псевдоним. Программа должна сцеплять две эти строки и выводить полученную
# строку, разделяя имя и псевдоним с помощью тире.
# Цивунчик Денис Владимирович
# 27.05.2012
name=input("Герой нашей программы - Алесса... | 41.333333 | 104 | 0.768145 |
a2f26550967b8135c47da681269d2517a9fa5b2f | 326 | py | Python | python/generator_tricks_for_systemprogrammer/query404.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/query404.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/generator_tricks_for_systemprogrammer/query404.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | # query404.py
#
# Find the set of all documents that 404 in a log file
from linesdir import lines_from_dir
from apachelog import apache_log
lines = lines_from_dir("access-log*", "www")
log = apache_log(lines)
stat404 = {r["request"] for r in log if r["status"] == 404}
for r in sorted(stat404):
prin... | 21.733333 | 60 | 0.680982 |
022c95be5aca3e924c21f7959b7546fb0ae1af8d | 182 | py | Python | Algorithms/Greedy/JimAndTheOthers.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Greedy/JimAndTheOthers.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | Algorithms/Greedy/JimAndTheOthers.py | baby5/HackerRank | 1e68a85f40499adb9b52a4da16936f85ac231233 | [
"MIT"
] | null | null | null | #coding:utf-8
n = int(raw_input())
ar = [(i, sum(map(int, raw_input().split()))) for i in xrange(1, n+1)]
ar.sort(key=lambda x: x[1])
print ' '.join(map(str, [a[0] for a in ar]))
| 20.222222 | 70 | 0.587912 |
ce6ee73110ec4324014b02de91a8210f885620a6 | 974 | py | Python | src/lecture3_new/hog/utils.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 1 | 2020-08-17T07:09:09.000Z | 2020-08-17T07:09:09.000Z | src/lecture2/hog/utils.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | null | null | null | src/lecture2/hog/utils.py | Fassial/zju-intern | f421f9c97d3c567e9b97121c5bf5c675c9e2c721 | [
"MIT"
] | 2 | 2020-07-26T07:27:57.000Z | 2020-08-17T07:09:15.000Z | """
Created on July 22 01:38, 2020
@author: fassial
"""
"""
line:
get the coordinate point between the two points
@params:
r0(int) : the row-value(y) of the first point
c0(int) : the col-value(x) of the first point
r1(int) : the row-value(y) of the second point
c1(int) : the co... | 29.515152 | 85 | 0.582136 |
ce9470cd35094f95b37e17fcbf59c4d3772b31c9 | 1,684 | py | Python | python_lessons/Textastic_Files/Python SQLite Tutorial - teclado/app.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/Textastic_Files/Python SQLite Tutorial - teclado/app.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | python_lessons/Textastic_Files/Python SQLite Tutorial - teclado/app.py | 1986MMartin/coding-sections-markus | e13be32e5d83e69250ecfb3c76a04ee48a320607 | [
"Apache-2.0"
] | null | null | null | import database
MENU_PROMPT = """-- Coffee Bean App --
Please chose one of these options:
1) Add new bean.
2) See all beans.
3) Find a bean by name.
4) See wich preparation method is best for a bean.
5) Exit
6) Test_String_Case
Your selection:"""
def menu():
connection = database.connect()
database.create_table... | 27.16129 | 71 | 0.711995 |
f08325e9e74fc4d8a04e0f3df7c8d83cef081f08 | 1,425 | py | Python | us2/python/scan.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 2 | 2019-12-10T10:25:11.000Z | 2021-01-26T13:59:40.000Z | us2/python/scan.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | null | null | null | us2/python/scan.py | chrbeckm/anfaenger-praktikum | 51764ff23901de1bc3d16dc935acfdc66bb2b2b7 | [
"MIT"
] | 1 | 2020-12-06T21:24:58.000Z | 2020-12-06T21:24:58.000Z | import numpy as np
nummer, durchmesser, schieboben, schiebunten, amessoben, amessunten, bmessoben, bmessunten = np.genfromtxt('python/daten/bohrungen.txt', unpack=True)
durchmesser *= 10**(-2)
schieboben *= 10**(-2)
schiebunten *= 10**(-2)
amessoben *= 10**(-3)
amessunten *= 10**(-3)
bmessoben *= 10**(-3)
bmessunten *... | 49.137931 | 236 | 0.792281 |
683f64da4505756765940a03b6813cf2fad58175 | 913 | py | Python | keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py | fzf/qmk_toolbox | 10d6b425bd24b45002555022baf16fb11254118b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import re
class KeymapConverter:
def __init__(self, filename):
self.filename = filename
def read_keymaps(self):
with open(self.filename) as f:
lines = f.readlines()
mode = 0
for line in lines:
line = line[:-1]
if mode == 0:
if "KC_KEYMAP" in line:... | 22.825 | 54 | 0.481928 |
6863711a02006624f0c691918e953adcc5a4582f | 1,783 | py | Python | manager.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 4 | 2016-08-16T07:47:15.000Z | 2017-12-11T10:08:47.000Z | manager.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | null | null | null | manager.py | yusukemurayama/ppytrading | 9804d0de870d77bf8a1c847736a636b1342d4600 | [
"MIT"
] | 2 | 2018-06-15T04:43:15.000Z | 2020-05-02T07:47:15.000Z | #!/usr/bin/env python
# coding: utf-8
import os
import sys
import argparse
import importlib
from ppyt.const import BASE_DIR
# locale.setlocale(locale.LC_ALL, 'en_US')
SCRIPT_DIR = os.path.join(BASE_DIR, 'commands')
def main():
# パスを追加します。
sys.path.append(BASE_DIR)
# 実行するコマンドを決定します。
if len(sys.argv) ... | 28.301587 | 81 | 0.639372 |
68730689e79359904915b793d0d6e131508b80e1 | 4,427 | py | Python | test/test_npu/test_cudnn_rnn_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-12-02T03:07:35.000Z | 2021-12-02T03:07:35.000Z | test/test_npu/test_cudnn_rnn_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | 1 | 2021-11-12T07:23:03.000Z | 2021-11-12T08:28:13.000Z | test/test_npu/test_cudnn_rnn_backward.py | Ascend/pytorch | 39849cf72dafe8d2fb68bd1679d8fd54ad60fcfc | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2020, Huawei Technologies.All rights reserved.
#
# Licensed under the BSD 3-Clause License (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://opensource.org/licenses/BSD-3-Clause
#
# Unless required by applicable law... | 46.114583 | 134 | 0.688954 |
cc01006f9964f9edb5159d14190e8f2ebf9ac7f4 | 5,777 | py | Python | EX8/autoCoding.py | CSUpengyuyan/DLExperiment | 4b4d8384215da85cca1915b5630dbf3fbb381b38 | [
"MIT"
] | null | null | null | EX8/autoCoding.py | CSUpengyuyan/DLExperiment | 4b4d8384215da85cca1915b5630dbf3fbb381b38 | [
"MIT"
] | null | null | null | EX8/autoCoding.py | CSUpengyuyan/DLExperiment | 4b4d8384215da85cca1915b5630dbf3fbb381b38 | [
"MIT"
] | 1 | 2021-05-11T09:29:28.000Z | 2021-05-11T09:29:28.000Z |
import numpy as np
def load_data(path='EX4/mnist.npz'):
f = np.load(path)
x_train, y_train = f['x_train'], f['y_train']
x_test, y_test = f['x_test'], f['y_test']
f.close()
return (x_train, y_train), (x_test, y_test)
# 将数据读入
(x_train, y_train), (x_test, y_test) = load_data()
# (x_train, _), (x_test... | 30.088542 | 97 | 0.637528 |
cc150fd12885e44d5e182c469fee089bcea7225b | 1,491 | py | Python | ecg stuff/old/physioecg.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 2 | 2020-06-08T19:17:10.000Z | 2020-06-08T20:45:07.000Z | ecg stuff/old/physioecg.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | 14 | 2015-10-07T09:31:50.000Z | 2022-02-23T07:34:10.000Z | ecg stuff/old/physioecg.py | easyCZ/SLIP-A-2015 | ad386df9c438d93ec89f68c63d3deda12d27d1ed | [
"MIT"
] | null | null | null | # ECG processing
# Initializations
# Output of initializations is a list containing tuples. Each tuple is a list with a timestamp and volt signal.
# Initializations will need to be altered when I see the format of inputs.
f = open("ECG_data.csv")
data_import = f.read()
f.close()
data1 = data_import.split("\n")
dat... | 29.82 | 112 | 0.707579 |
c5f7b504148783252f5d47eb809db09f93036d24 | 7,219 | py | Python | Python/00_little_helper/copy_files/copy_binaries.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/00_little_helper/copy_files/copy_binaries.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | Python/00_little_helper/copy_files/copy_binaries.py | Kreijeck/learning | eaffee08e61f2a34e01eb8f9f04519aac633f48c | [
"MIT"
] | null | null | null | import os
import shutil
import py7zr
import tarfile
import zipfile
import logging
def add_logger():
# create logger
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
# create console handler and set level to debug
ch = logging.StreamHandler()
fh = logging.FileHandler("copy_fi... | 34.21327 | 123 | 0.625987 |
4f1570c1e8be04042a78a8fc05ea21bbe72491ab | 1,137 | py | Python | frappe-bench/apps/erpnext/erpnext/accounts/doctype/accounts_settings/accounts_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/accounts_settings/accounts_settings.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/accounts/doctype/accounts_settings/accounts_settings.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
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cint
from frappe.model.document import Document
from frappe.cu... | 36.677419 | 103 | 0.781882 |
8c6b96d5fb08ad45690f811f44dcb784ad483180 | 114 | py | Python | deprecated/examples/local_sgd/resnet/models/__init__.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/examples/local_sgd/resnet/models/__init__.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/examples/local_sgd/resnet/models/__init__.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | from .vgg import VGG11, VGG13, VGG16, VGG19
from .resnet import ResNet18, ResNet34, ResNet50, ResNet101, ResNet152 | 57 | 70 | 0.798246 |
8cdf8fc08a80bf044e1ca7b3e9fa5ade3fe9cf87 | 1,446 | py | Python | watchlist_app/api/urls.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | watchlist_app/api/urls.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | watchlist_app/api/urls.py | attachemd/moviedb | c2e3b7bc3c1537c64834c2ee94492122dafdfcd4 | [
"MIT"
] | null | null | null | from django.urls import path, include
from rest_framework.routers import DefaultRouter
from watchlist_app.api import views
from watchlist_app.api.views import StreamPlatformView
router = DefaultRouter()
router.register('stream', StreamPlatformView, basename='stream_platform')
urlpatterns = [
# path('list/', view... | 23.322581 | 73 | 0.587828 |
50f8064ed7695fa37a2d56b05d1894eb81038f4c | 614 | py | Python | ___Python/Torsten/Python-Kurs/p11_excel/m01_xlrd.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Torsten/Python-Kurs/p11_excel/m01_xlrd.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/Torsten/Python-Kurs/p11_excel/m01_xlrd.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | import statistics
from xlrd import open_workbook, xldate_as_datetime
from p01_kennenlernen.meinebibliothek import alter
book = open_workbook('O:/___Python/personen.xlsx')
sheet = book.sheet_by_index(0)
nrows = sheet.nrows
ncols = sheet.ncols
for i in range(1, nrows):
row_slice = sheet.row_slice(... | 24.56 | 105 | 0.742671 |
e83e1bebec5a7c798dc3a0791a0c953dd2afdb03 | 893 | py | Python | Xmas/python/XmasProgramer.py | Lian0123/TextArt | 26a2378a48fb1e49df067240fcb1dbd50e346a8e | [
"MIT"
] | 2 | 2018-07-29T05:02:53.000Z | 2021-08-16T10:52:59.000Z | Xmas/python/XmasProgramer.py | Lian0123/TextArt | 26a2378a48fb1e49df067240fcb1dbd50e346a8e | [
"MIT"
] | null | null | null | Xmas/python/XmasProgramer.py | Lian0123/TextArt | 26a2378a48fb1e49df067240fcb1dbd50e346a8e | [
"MIT"
] | null | null | null | ################################################################
# . . . << 聖誕節快樂 >> . . #
#. M . . . . C . #
# . / \ . . _\||/_ . . / \ #
# . E Y . . _\| || | . H M . #
... | 59.533333 | 64 | 0.044793 |
fa1fc6ba954edb562cd9cc6dfa3cae9ecc1a2ab5 | 1,357 | py | Python | Definitionen.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 15 | 2017-11-09T12:49:52.000Z | 2022-03-06T12:18:48.000Z | Definitionen.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 40 | 2018-02-01T21:32:01.000Z | 2022-03-22T11:35:28.000Z | Definitionen.py | klnrdknt/Sephrasto | 591224fe01825a169c21ebc6136533f282ce9a0b | [
"MIT"
] | 13 | 2018-03-12T17:50:42.000Z | 2022-03-06T12:21:41.000Z | '''
Allgemeine Definitionen, die von allen Skripten verwendet werden
'''
Attribute = {
'KO': 'Konstitution',
'MU': 'Mut',
'GE': 'Gewandheit',
'KK': 'Körperkraft',
'IN': 'Intution',
'KL': 'Klugheit',
'CH': 'Charisma',
'FF': 'Fingerfertigkeit'
}
FreieFe... | 37.694444 | 128 | 0.627119 |
ad36ed562e945ef346387ba2c7397ddf82a0a1fa | 3,135 | py | Python | research/cv/AVA_cifar/src/callbacks.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/AVA_cifar/src/callbacks.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/AVA_cifar/src/callbacks.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... | 36.453488 | 111 | 0.611802 |
ad490dfe83adbab8f92ecbe60686ce679d459642 | 1,311 | py | Python | web_blog/src/models/post.py | jcromerohdz/FlaskDev | 29539259cba3a0e18c205fb439ee916fb12e5318 | [
"MIT"
] | null | null | null | web_blog/src/models/post.py | jcromerohdz/FlaskDev | 29539259cba3a0e18c205fb439ee916fb12e5318 | [
"MIT"
] | null | null | null | web_blog/src/models/post.py | jcromerohdz/FlaskDev | 29539259cba3a0e18c205fb439ee916fb12e5318 | [
"MIT"
] | null | null | null |
import uuid
import datetime
from common.database import Database
now = datetime.datetime.utcnow()
# print(now)
class Post(object):
def __init__(self, blog_id, title, content, author, date=now, _id=None):
self.blog_id = blog_id
self.title = title
self.content = content
self.author... | 29.133333 | 90 | 0.578185 |
0f155534d0eb0de26cc35d7ec424aa0faceca8d5 | 282 | py | Python | HackerP/introduction/Arithmetic_Operators.py | JKChang2015/hackerrank | 5e5bd6892d2e4754e73f73eecfa8f4b9f266c3bd | [
"MIT"
] | null | null | null | HackerP/introduction/Arithmetic_Operators.py | JKChang2015/hackerrank | 5e5bd6892d2e4754e73f73eecfa8f4b9f266c3bd | [
"MIT"
] | null | null | null | HackerP/introduction/Arithmetic_Operators.py | JKChang2015/hackerrank | 5e5bd6892d2e4754e73f73eecfa8f4b9f266c3bd | [
"MIT"
] | null | null | null | # Arithmetic_Operators
# Created by JKChang
# 14/08/2018, 10:54
# Tag:
# Description: https://www.hackerrank.com/challenges/python-arithmetic-operators/problem
if __name__ == '__main__':
a = int(input())
b = int(input())
print(a + b)
print(b - a)
print(a * b)
| 20.142857 | 88 | 0.64539 |
cb4260db2c6e17dcf635a672ba4a7e54dc051b4c | 669 | py | Python | euler-38.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-38.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | euler-38.py | TFabijo/euler | 58dc07b9adb236890556ccd5d75ca9dbd2b50df9 | [
"MIT"
] | null | null | null | from itertools import permutations
def pandigitalni_zmozek():
najvecje = 0
l = list(permutations(range(1, 10)))
p = []
for x in l:
stevilo = 0
i = 100000000
for y in x:
stevilo += y * i
i //= 10
p.append(stevilo)
for n in range(... | 22.3 | 41 | 0.41704 |
cb43fa0866aa82ed94d422fbd6475d9c013a5210 | 3,312 | py | Python | src/onegov/core/mail.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/mail.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/mail.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import mailthon.headers as headers
import os.path
from email.mime.multipart import MIMEMultipart
from mailbox import Maildir, MaildirMessage
from mailthon.enclosure import HTML, PlainText, Attachment, Enclosure
from mailthon.envelope import Envelope as BaseEnvelope
from mailthon.postman import Postman
from onegov.core... | 30.666667 | 78 | 0.660326 |
69e5619b9ca0732b41a0034d1a20475d61333c96 | 677 | py | Python | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/10_virtueller_programmierer.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | null | null | null | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/10_virtueller_programmierer.py | Apop85/Scripts | e71e1c18539e67543e3509c424c7f2d6528da654 | [
"MIT"
] | 6 | 2020-12-24T15:15:09.000Z | 2022-01-13T01:58:35.000Z | Python/Buch_ATBS/Teil_2/Kapitel_11_Webscraping/10_virtueller_programmierer.py | Apop85/Scripts | 1d8dad316c55e1f1343526eac9e4b3d0909e4873 | [
"MIT"
] | null | null | null | # 10_virtueller_programmierer.py
# Kleines Script zur Entspannung welches ein Code einer Webseite in das Terminal ausgibt als
# würde es ein Mensch schreiben
from random import randint as rng
from time import sleep
import requests, bs4
print('Webseite angeben:')
website=input()
website_content=requests.get(website)
w... | 37.611111 | 112 | 0.71935 |
385c6f67d8d0375178c421dfc5da166cf1ef3ae0 | 6,905 | py | Python | read_mf_api.py | gshikhri/nse-fund-analysis | c9a51047aad8772148c8b8a5b8c94fe3a3b78901 | [
"MIT"
] | null | null | null | read_mf_api.py | gshikhri/nse-fund-analysis | c9a51047aad8772148c8b8a5b8c94fe3a3b78901 | [
"MIT"
] | null | null | null | read_mf_api.py | gshikhri/nse-fund-analysis | c9a51047aad8772148c8b8a5b8c94fe3a3b78901 | [
"MIT"
] | null | null | null | import pandas as pd
import json
import requests
import datetime as dt
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import numpy as np
import yfinance as yf
def prepare_date_fig(interval=180):
fig, ax = plt.subplots()
ax.xaxis.set_major_formatter(mdates.DateFormatter('%m-%Y')... | 35.050761 | 105 | 0.686894 |
2aa4645ec49dec897d58e79f132218a2458b6403 | 5,192 | py | Python | source/pkgsrc/lang/python27/patches/patch-Lib_urlparse.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/lang/python27/patches/patch-Lib_urlparse.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/lang/python27/patches/patch-Lib_urlparse.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-Lib_urlparse.py,v 1.1.2.2 2021/10/13 21:04:01 tm Exp $
Fix CVE-2021-23336: Add `separator` argument to parse_qs; warn with default
Via Fedora:
https://src.fedoraproject.org/rpms/python2.7/blob/rawhide/f/00359-CVE-2021-23336.patch
--- Lib/urlparse.py.orig 2020-04-19 21:13:39.000000000 +0000
+++ Lib/urlp... | 40.5625 | 95 | 0.591872 |
faf3daa81c038998f8243d321ddfdb00b2e3c0b2 | 115 | py | Python | Findusername-main/Example/example.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Findusername-main/Example/example.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Findusername-main/Example/example.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | from username import *
name=str(input("Enter Uername"))
instagram(name)
time.sleep(10)
print("Now Terminating") | 23 | 32 | 0.73913 |
35c9cdad8f705aabb43530c991c496a96b26c12a | 1,246 | py | Python | dumpSprites.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | null | null | null | dumpSprites.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 5 | 2020-01-18T21:10:46.000Z | 2020-01-25T20:58:19.000Z | dumpSprites.py | Berserker66/ALttPEntranceRandomizer | 9c681cc65d7281ccded03484b050e8f80ea65dc6 | [
"MIT"
] | 2 | 2020-01-18T17:36:50.000Z | 2020-01-22T16:52:08.000Z | from Gui import *
import threading
# Target directories
input_dir = local_path("data", "sprites", "alttpr")
output_dir = local_path("WebHostLib", "static", "static")
os.makedirs(os.path.join(output_dir, "sprites"), exist_ok=True)
# update sprites through gui.py's functions
done = threading.Event()
top = Tk()
top.with... | 34.611111 | 108 | 0.682986 |
52a3d36b2b39bbd32e0fa7cbde5489b4cd9e5c7a | 2,444 | py | Python | applications/neural_search/recall/in_batch_negative/deploy/C++/rpc_client.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/neural_search/recall/in_batch_negative/deploy/C++/rpc_client.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | applications/neural_search/recall/in_batch_negative/deploy/C++/rpc_client.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
# pylint: disable=doc-string-missing
# 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.o... | 31.74026 | 80 | 0.727496 |
eadf2ef34d89a2fa120efd22bba10f81bc4ebe07 | 2,190 | py | Python | ml.py | bluemurder/mlfl | b895b2f1d01b0f6418a5bcee2f204dd7916062f0 | [
"MIT"
] | 1 | 2021-03-22T22:25:54.000Z | 2021-03-22T22:25:54.000Z | ml.py | bluemurder/mlfl | b895b2f1d01b0f6418a5bcee2f204dd7916062f0 | [
"MIT"
] | 6 | 2017-01-16T09:53:21.000Z | 2017-01-18T12:20:09.000Z | ml.py | bluemurder/mlfl | b895b2f1d01b0f6418a5bcee2f204dd7916062f0 | [
"MIT"
] | null | null | null | from sklearn.linear_model import LinearRegression
from sklearn.neighbors import KNeighborsRegressor
from sklearn.tree import DecisionTreeRegressor
from sklearn.tree import ExtraTreeRegressor
from sklearn.ensemble import ExtraTreesRegressor
from sklearn.ensemble import RandomForestRegressor
import numpy as np
class Lin... | 22.346939 | 100 | 0.634703 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.