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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aea7e1e9c2bcb3041996c925e0ad7326642e7b7e | 7,478 | py | Python | apps/projects/admin.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 2 | 2017-12-17T21:28:22.000Z | 2018-02-02T14:44:58.000Z | apps/projects/admin.py | IT-PM-OpenAdaptronik/Webapp | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | 118 | 2017-10-31T13:45:09.000Z | 2018-02-24T20:51:42.000Z | apps/projects/admin.py | OpenAdaptronik/Rattler | c3bdde0ca56b6d77f49bc830fa2b8bb41a26bae4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Project, Category,ProjectImage,Experiment,Datarow,Value
from django.utils import html
from django.utils.translation import gettext_lazy as _
from django.utils.encoding import force_text
from django.urls import reverse
class ProjectImagesInline (admin.TabularInline)... | 31.029046 | 106 | 0.562717 |
9d951ac88320574960769866278b4394267eea3d | 210 | py | Python | Online-Judges/DimikOJ/Python/32-multiplier-of-x.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | 3 | 2021-06-15T01:19:23.000Z | 2022-03-16T18:23:53.000Z | Online-Judges/DimikOJ/Python/32-multiplier-of-x.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | Online-Judges/DimikOJ/Python/32-multiplier-of-x.py | shihab4t/Competitive-Programming | e8eec7d4f7d86bfa1c00b7fbbedfd6a1518f19be | [
"Unlicense"
] | null | null | null | t = int(input())
for _ in range(t):
x, n = input().split()
x, n = int(x), int(n)
if x > n:
print("Invalid!")
else:
for i in range(x, n+1, x):
print(i)
print("")
| 17.5 | 34 | 0.42381 |
06163d4951e4230f52507c3243b52f87f029b1a8 | 1,830 | py | Python | crawlab/utils/file.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-08-20T14:26:39.000Z | 2019-08-20T14:26:39.000Z | crawlab/utils/file.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 9 | 2019-05-24T03:53:09.000Z | 2022-02-26T10:53:48.000Z | crawlab/utils/file.py | anhilo/crawlab | 363f4bf7a4ccc192a99850998c1bd0fc363832a1 | [
"BSD-3-Clause"
] | 1 | 2019-11-08T08:12:40.000Z | 2019-11-08T08:12:40.000Z | import os
import re
from collections import defaultdict
SUFFIX_PATTERN = r'\.([a-zA-Z]{,6})$'
suffix_regex = re.compile(SUFFIX_PATTERN, re.IGNORECASE)
SUFFIX_LANG_MAPPING = {
'py': 'python',
'js': 'javascript',
'sh': 'shell',
'java': 'java',
'c': 'c',
'go': 'go',
}
def get_file_suffix(file_n... | 22.875 | 56 | 0.584699 |
881bda694680a3d683d303053d32e59fff0a081a | 2,083 | py | Python | ___Python/KarPoo/po1_kennenlernen/p03_lambda/m06_anwendung.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/KarPoo/po1_kennenlernen/p03_lambda/m06_anwendung.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | ___Python/KarPoo/po1_kennenlernen/p03_lambda/m06_anwendung.py | uvenil/PythonKurs201806 | 85afa9c9515f5dd8bec0c546f077d8cc39568fe8 | [
"Apache-2.0"
] | null | null | null | from datetime import date
from p01_kennenlernen import meinebibliothek
torsten = ["Torsten", "Aachen", date(1967, 1, 1), ["C"]]
michael = ["Michael", "Moormerland", date(1981, 1, 10), ["Javascript"]]
karpoo = ["Karpoo", "Düsseldorf", date(1969, 1, 1), ["ABAP"]]
carsten = ["Carsten", "Aachen", date(1971, 2, 3), [... | 38.574074 | 158 | 0.699952 |
31fd8f9cc26dda79437fd28ac49fd3ef41bb91fc | 428 | py | Python | books/PythonAutomate/pdf_word_documents/decrypting_pdf.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/pdf_word_documents/decrypting_pdf.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/pdf_word_documents/decrypting_pdf.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """decrypting_pdf.py
암호 걸린 PDF 파일 열기
"""
import PyPDF2
pdf_reader = PyPDF2.PdfFileReader(open("encrypted.pdf", "rb"))
print(pdf_reader.isEncrypted) # 암호화 여부 확인
try:
pdf_reader.getPage(0) # 페이지 객체 얻기, 에러 발생
except PyPDF2.utils.PdfReadError as e:
print("ERROR:", e)
pdf_reader = PyPDF2.PdfFileReader(open("enc... | 23.777778 | 62 | 0.719626 |
4e575bc106bac40c45d1f9d1ab67415cfe99680b | 225 | py | Python | exercises/ja/solution_01_08_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/ja/solution_01_08_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/ja/solution_01_08_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
nlp = spacy.load("ja_core_news_sm")
text = "公式発表:Appleが米国の上場企業として初めて時価評価額1兆ドルに到達しました。"
# テキストを処理
doc = nlp(text)
# 予測された固有表現をイテレート
for ent in doc.ents:
# 固有表現の文字列とラベルをプリント
print(ent.text, ent.label_)
| 16.071429 | 50 | 0.737778 |
4eacb73b2b691b66ccdb8b8ac475c849e6d2b6e4 | 7,771 | py | Python | research/cv/ivpf/ivpf/coupling.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/ivpf/ivpf/coupling.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/ivpf/ivpf/coupling.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... | 28.569853 | 78 | 0.561446 |
118f9e9da1be2cd36659911c723aeb71369de0a1 | 612 | py | Python | pacman-arch/test/pacman/tests/sync404.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/sync404.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/sync404.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-09-26T08:44:40.000Z | 2021-09-26T08:44:40.000Z | self.description = "FS#9024"
sp = pmpkg("xorg-server")
sp.depends = [ "libgl" ]
self.addpkg2db("sync", sp)
sp1 = pmpkg("nvidia-utils")
sp1.provides = [ "libgl" ]
sp1.conflicts = [ "libgl", "libgl-dri" ]
self.addpkg2db("sync", sp1)
sp2 = pmpkg("libgl")
sp2.provides = [ "libgl-dri" ]
self.addpkg2db("sync", sp2)
sp3 =... | 22.666667 | 40 | 0.687908 |
010933325e71ed3d1771da2e90785bd005d28625 | 640 | py | Python | coco2yolov5-converter/src/converter/filesystem_util.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | coco2yolov5-converter/src/converter/filesystem_util.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | coco2yolov5-converter/src/converter/filesystem_util.py | SchweizerischeBundesbahnen/sbb-ml-models | 485356aeb0a277907c160d435f7f654154046a70 | [
"MIT"
] | null | null | null | # pylint: disable=C0114,C0115,C0116,R0201
from pathlib import Path
import kwcoco
class FileSystemUtil:
@staticmethod
def create_yolo_folder_structure(root_folder: Path):
""" create file structure for YoloV5 """
subfolders = ['images', 'labels']
splits = ['train', 'val']
for su... | 35.555556 | 177 | 0.659375 |
0164b9a27b97fa12976394a530301c74e82a5042 | 2,442 | py | Python | bolt/discord/permissions.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 9 | 2019-02-17T06:33:14.000Z | 2021-10-05T02:19:00.000Z | bolt/discord/permissions.py | ns-phennessy/Bolt | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 28 | 2019-02-10T07:48:05.000Z | 2021-12-20T00:15:37.000Z | bolt/discord/permissions.py | ph7vc/CL4M-B0T | e992cf63b1215ea7c241cab94edc251653dbaed7 | [
"MIT"
] | 4 | 2015-03-13T03:58:55.000Z | 2015-05-27T08:29:46.000Z | """
This module provides an enum containing permission flags as per discord API
This module provides a class for talking about permissions within the bot
Contributors:
- Patrick Hennessy
"""
from enum import Enum
class PermissionFlag(Enum):
CREATE_INSTANT_INVITE = 0x00000001
KICK_MEMBERS... | 28.729412 | 79 | 0.671171 |
fecf10013f7db8445ca5c653a5d53efbb463d52c | 1,465 | py | Python | turngen/main.py | amrohendawi/AlphaZero-implementation | 42103e63308ba256208b6dd6ddcbef2e797e9932 | [
"MIT"
] | null | null | null | turngen/main.py | amrohendawi/AlphaZero-implementation | 42103e63308ba256208b6dd6ddcbef2e797e9932 | [
"MIT"
] | null | null | null | turngen/main.py | amrohendawi/AlphaZero-implementation | 42103e63308ba256208b6dd6ddcbef2e797e9932 | [
"MIT"
] | null | null | null | # Usage main.py -ai1 dummy -ai2 human -notimeout -show
# ai can be dummy, human, alphazero, (alphazero_x)
# only dummy works in this branch for now
def getFloat(argv,key,defaultValue):
ret = defaultValue
if key in sys.argv:
ind = sys.argv.index(key)
if ind+1 < len(sys.argv):
ret = float(sys.argv[ind+1])
retu... | 23.253968 | 87 | 0.647782 |
fee6cc3f72d482e85e13d46bda4ba50836007529 | 1,370 | py | Python | Packs/RSS/Integrations/RSS/RSS.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/RSS/Integrations/RSS/RSS.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/RSS/Integrations/RSS/RSS.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import feedparser
from CommonServerPython import *
import email.utils
from time import mktime
from datetime import datetime
def fetch_incidents(url):
feed = feedparser.parse(url)
incidents = []
last_run = demisto.getLastRun()
last_fetch = last_run.get('last_fetch')
if last_fetch is None:
... | 25.37037 | 74 | 0.60219 |
aae8ad455db0afaf59213719c34999f93ce46e53 | 2,412 | py | Python | lib/SPControl.py | TechLabCommunity/SaintPeterTalent | eb80237de4d73f3a99e82e02edb714f5057bd559 | [
"MIT"
] | 1 | 2019-01-03T12:59:19.000Z | 2019-01-03T12:59:19.000Z | lib/SPControl.py | TechLabCommunity/SaintPeterTalent | eb80237de4d73f3a99e82e02edb714f5057bd559 | [
"MIT"
] | null | null | null | lib/SPControl.py | TechLabCommunity/SaintPeterTalent | eb80237de4d73f3a99e82e02edb714f5057bd559 | [
"MIT"
] | null | null | null | from lib.SPDbCall import SPDbCall
from lib.SPDbCall import TypeAlarmAction
from lib.SPDbCall import TypeEnter
from Global import *
class SPControl:
@staticmethod
def get_code_empty_jail():
return get_value_config('emptyjail', 'code')
def enter_code(self, access_code):
#retrieve user's dat... | 49.22449 | 128 | 0.658789 |
a39089ca85aea8f36eb101fa422e15774d4ec13b | 3,272 | py | Python | ialgotest/conf/generate_config.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | null | null | null | ialgotest/conf/generate_config.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | null | null | null | ialgotest/conf/generate_config.py | fs714/ialgotest | eae968cff963549af40ed34745b44c1b5e20efa7 | [
"Apache-2.0"
] | 1 | 2021-11-24T18:59:12.000Z | 2021-11-24T18:59:12.000Z | def gen_conf(strategy_file, freq='1d', start='2015-01-01', end='2016-01-01', plot=False, save_plot=False,
save_output=False, report_path=None, mongo_feed=True):
config = {
'version': '0.1.5',
# 白名单,设置可以直接在策略代码中指定哪些模块的配置项目
'whitelist': ['base', 'extra', 'validator', 'mod'],
... | 35.565217 | 105 | 0.472494 |
956777b861a21d5d17ed366ff24339cb62dc6b50 | 65 | py | Python | pghoard/rohmu/delta/__init__.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 731 | 2018-06-01T21:48:43.000Z | 2022-03-29T08:21:42.000Z | pghoard/rohmu/delta/__init__.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 124 | 2018-06-19T05:59:50.000Z | 2022-03-31T18:17:59.000Z | pghoard/rohmu/delta/__init__.py | st3fan/sphinx-automation-experiment | c92c8400770c6c604e2451e4f1e71957fc4c5ef8 | [
"Apache-2.0"
] | 64 | 2018-06-26T14:12:53.000Z | 2022-03-20T07:33:33.000Z | # Copyright (c) 2021 Aiven, Helsinki, Finland. https://aiven.io/
| 32.5 | 64 | 0.707692 |
254c6c201757f2c31276a395e0dd5300c6378cdb | 10,177 | py | Python | Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/NTT_Cyber_Threat_Sensor/Integrations/NTT_Cyber_Threat_Sensor/NTT_Cyber_Threat_Sensor.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import base64
from datetime import datetime
from datetime import timezone
from datetime import timedelta
import requests
import dateutil.parser
# Local imports
import demistomock as demisto
from CommonServerPython import *
from CommonServerUserPython import *
# Disable insecure warnings
requests.packages.... | 34.151007 | 100 | 0.572566 |
256a044b24803d153d468fa302af4c9486750258 | 14,457 | py | Python | test262/run_test262.py | openharmony-sig-ci/ark_ts2abc | 1d6fac6447760fce2e81c3738ac735b4424eed31 | [
"Apache-2.0"
] | null | null | null | test262/run_test262.py | openharmony-sig-ci/ark_ts2abc | 1d6fac6447760fce2e81c3738ac735b4424eed31 | [
"Apache-2.0"
] | null | null | null | test262/run_test262.py | openharmony-sig-ci/ark_ts2abc | 1d6fac6447760fce2e81c3738ac735b4424eed31 | [
"Apache-2.0"
] | 2 | 2021-09-13T11:32:30.000Z | 2021-09-13T12:12:06.000Z | # coding: utf-8
#!/usr/bin/python3
"""
Copyright (c) 2021 Huawei Device 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 ... | 31.292208 | 90 | 0.620253 |
c2b828a29050946e4fe49fa92c33460a7d6c9977 | 1,998 | py | Python | login/bili.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | login/bili.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | login/bili.py | weibk/webauto | f494f8043d05739935d1fc22b941bbc9a7ba75b7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# encoding='utf-8'
# author:weibk
# @time:2021/10/25/025 下午 8:02:35
import time
import selenium
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as ES
drive... | 33.864407 | 74 | 0.721722 |
6c53fc37f455cf6b11f9341a4951e76ca17f0557 | 47 | py | Python | velocity-master/velocity/__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 | velocity-master/velocity/__init__.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | velocity-master/velocity/__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 | from .velocity import *
__version__ = '0.0.1'
| 11.75 | 23 | 0.680851 |
6c8056ceaafcd4c01f50457f3389ecf86296cc36 | 9,083 | py | Python | postprocessing/docs_to_sentences_table.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | postprocessing/docs_to_sentences_table.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | postprocessing/docs_to_sentences_table.py | dainst/chronoi-corpus-processing | 7f508a7572e1022c4c88d1477db029e6619a1f0c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import bs4
import csv
import glob
import langdetect
import os
import sys
import treetaggerwrapper
from nltk.tokenize import word_tokenize
try:
from corpus_reading import Document
except ImportError:
# Import for pytest as that will have a differe... | 30.377926 | 136 | 0.633271 |
6c8dff624afd2ae4b2afab681035471f06667aad | 1,820 | py | Python | python/image-json-server.py | kanti-glarus/server-script | 4d8a9ce1aaa00258af1f787bd7a5a79820104fa0 | [
"MIT"
] | null | null | null | python/image-json-server.py | kanti-glarus/server-script | 4d8a9ce1aaa00258af1f787bd7a5a79820104fa0 | [
"MIT"
] | null | null | null | python/image-json-server.py | kanti-glarus/server-script | 4d8a9ce1aaa00258af1f787bd7a5a79820104fa0 | [
"MIT"
] | null | null | null | # Python 3 server
from http.server import BaseHTTPRequestHandler, HTTPServer
import json
hostName = "0.0.0.0"
serverPort = 8080
class MyServer(BaseHTTPRequestHandler):
def load_binary(self, filename):
with open(filename, 'rb') as file_handle:
return file_handle.read()
def response_image... | 29.836066 | 99 | 0.595055 |
666b31fd0877af0a6229caf426cd01ca2f3ef835 | 3,167 | py | Python | src/utils/xml_parser.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | src/utils/xml_parser.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | src/utils/xml_parser.py | ceofil/uni-python-project | 531e73218a3d53448f1fd39a0bf9404a6d6bb284 | [
"MIT"
] | null | null | null | import xml.etree.ElementTree as ET
from src.shapes.rect import Rect
from src.shapes.circle import Circle
from src.shapes.line import Line
from src.shapes.polyline import Polyline
from src.shapes.path import Path
from src.shapes.ellipse import Ellipse
import re
def convert_color(clr):
"""Converts color from svg st... | 29.324074 | 75 | 0.607199 |
669b3ff3e9e8001c94ef27305b40e9c4205e12ee | 2,714 | py | Python | main.py | SetoKayaba/OpenBank | b2ec2f6f3ca77510eeeedca5ef177de87133f7bd | [
"MIT"
] | 1 | 2022-02-14T01:12:35.000Z | 2022-02-14T01:12:35.000Z | main.py | WMB3/OpenBank | b2ec2f6f3ca77510eeeedca5ef177de87133f7bd | [
"MIT"
] | null | null | null | main.py | WMB3/OpenBank | b2ec2f6f3ca77510eeeedca5ef177de87133f7bd | [
"MIT"
] | 1 | 2022-02-14T00:44:57.000Z | 2022-02-14T00:44:57.000Z | # OPEN BANK's MAIN SCRIPT. SERVES AS A BACKBONE FOR BACK-END PROCESSING AND FLOW-EXECUTION CONTROL
# Setting up Imports and file system Dependencies
import bank_ops as bank
import Authenticator as auth
preferences = open("preferences").read()
class Session: # Session Class
session_status = -1 # Current Sess... | 33.925 | 116 | 0.62196 |
9fcf1ab7383e35900508124def0dca74a42d6ab5 | 848 | py | Python | Sorting/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | Sorting/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | null | null | null | Sorting/run.py | CandleStein/VAlg | 43aecdd351954d316f132793cf069b70bf2e5cc2 | [
"MIT"
] | 1 | 2020-09-25T18:31:34.000Z | 2020-09-25T18:31:34.000Z | from algos import bubble, insertion, merge, quick, radix, selection
import argparse
import matplotlib.pyplot as plt
import numpy as np
parser = argparse.ArgumentParser(description="Sorting Visualisation")
parser.add_argument(
"-a",
"--algorithm",
choices=["bubble", "insertion", "merge", "quick", "radix", "... | 24.941176 | 76 | 0.665094 |
c6ce778aeaaf7eed7a799483a45341baed5cc9f4 | 506 | py | Python | core/convert.py | littlecharacter/AutoWork | feebb8459f889b7a9165073be8fd44ba544cbb35 | [
"Apache-2.0"
] | null | null | null | core/convert.py | littlecharacter/AutoWork | feebb8459f889b7a9165073be8fd44ba544cbb35 | [
"Apache-2.0"
] | null | null | null | core/convert.py | littlecharacter/AutoWork | feebb8459f889b7a9165073be8fd44ba544cbb35 | [
"Apache-2.0"
] | null | null | null | import pypinyin
import datetime
# 不带声调
def pin_yin(word):
s = ''
for i in pypinyin.pinyin(word, style=pypinyin.NORMAL):
# s += i[0].title()
s += ''.join(i)
return f"{s}{datetime.datetime.now().strftime('%Y%m%d%H%M%S')}"
# 带声调
def yin_jie(word):
s = ''
for i in pypinyin.pinyin(wor... | 19.461538 | 67 | 0.573123 |
a53696aecd2bbb60d839e0c021b083bae69f5342 | 301 | py | Python | src/onegov/ballot/collections/candidates.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/ballot/collections/candidates.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/ballot/collections/candidates.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | from onegov.ballot.models import Candidate
class CandidateCollection(object):
def __init__(self, session):
self.session = session
def query(self):
return self.session.query(Candidate)
def by_id(self, id):
return self.query().filter(Candidate.id == id).first()
| 21.5 | 62 | 0.674419 |
a594a682303fca30de4fb043ad92fb991bd20695 | 883 | py | Python | retro/cores/gba/src/platform/python/mgba/arm.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 2,706 | 2018-04-05T18:28:50.000Z | 2022-03-29T16:56:59.000Z | retro/cores/gba/src/platform/python/mgba/arm.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 242 | 2018-04-05T22:30:42.000Z | 2022-03-19T01:55:11.000Z | retro/cores/gba/src/platform/python/mgba/arm.py | MatPoliquin/retro | c70c174a9818d1e97bc36e61abb4694d28fc68e1 | [
"MIT-0",
"MIT"
] | 464 | 2018-04-05T19:10:34.000Z | 2022-03-28T13:33:32.000Z | # Copyright (c) 2013-2016 Jeffrey Pfau
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from ._pylib import ffi, lib
class _ARMRegisters:
def __init__(self, cpu):
... | 30.448276 | 69 | 0.643262 |
3c9c9fe7e39b9863324cd791647c2adbc068802c | 1,256 | py | Python | quark_core_api/core/pipeline.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | quark_core_api/core/pipeline.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | quark_core_api/core/pipeline.py | arcticle/Quark | 17aa5b5869a9e9c7a04c1a371fef5998f33dc319 | [
"MIT"
] | null | null | null | import os, copy, itertools
from future.utils import viewitems
from quark_core_api.common import Cache
class Pipeline(object):
def __init__(self, *args, **kw):
self._params = {}
self._cache = Cache()
if args:
for script in args:
self._cache.add(script.name, scri... | 24.153846 | 69 | 0.574841 |
b1f5d673a48f84e5e829c5839a92e9f55101f972 | 1,994 | py | Python | tests/test_email.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | tests/test_email.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | tests/test_email.py | MZH-bust/genutil | f17190ec484d5844f8950908cc07556a5b1429e7 | [
"MIT"
] | null | null | null | import pytest
from pytest_socket import disable_socket, enable_socket
from smtplib import SMTPConnectError
from socket import error as socketerror
from genutil import email
from tests.config import config
class TestEmailConnection:
@pytest.fixture
def connection(self):
self.mailconfig = config.data.e... | 39.098039 | 95 | 0.638415 |
3ca11a2c9b1a0042b7e6bafeead4c5c5eb6ae5aa | 515 | py | Python | Packs/ZeroTrustAnalyticsPlatform/Scripts/ZTAPParseLinks/ZTAPParseLinks_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/ZeroTrustAnalyticsPlatform/Scripts/ZTAPParseLinks/ZTAPParseLinks_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/ZeroTrustAnalyticsPlatform/Scripts/ZTAPParseLinks/ZTAPParseLinks_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import io
def util_load_json(path):
with io.open(path, mode="r", encoding="utf-8") as f:
return json.loads(f.read())
def util_load_raw(path):
with io.open(path, mode="r", encoding="utf-8") as f:
return f.read()
def test_parse_links():
from ZTAPParseLinks import parse_links
... | 21.458333 | 63 | 0.691262 |
5962f18b7cb73d39801cbc7d963dff1bea1c4b7b | 5,130 | py | Python | SC101_Assignments/SC101_Assignment2/breakoutgraphics.py | JIllchen487/StanCode101 | 8025dd4e4cf0cb3d14d7314ef4ea6dfff3e5b5cc | [
"MIT"
] | null | null | null | SC101_Assignments/SC101_Assignment2/breakoutgraphics.py | JIllchen487/StanCode101 | 8025dd4e4cf0cb3d14d7314ef4ea6dfff3e5b5cc | [
"MIT"
] | null | null | null | SC101_Assignments/SC101_Assignment2/breakoutgraphics.py | JIllchen487/StanCode101 | 8025dd4e4cf0cb3d14d7314ef4ea6dfff3e5b5cc | [
"MIT"
] | null | null | null | """
stanCode Breakout Project
Adapted from Eric Roberts's Breakout by
Sonja Johnson-Yu, Kylie Jue, Nick Bowman,
and Jerry Liao.
YOUR DESCRIPTION HERE
"""
from campy.graphics.gwindow import GWindow
from campy.graphics.gobjects import GOval, GRect, GLabel
from campy.gui.events.mouse import onmouseclicked, onmousemoved
... | 45 | 117 | 0.633528 |
ab897a619f0e5873c9c75f48a756f18b70963890 | 24,169 | py | Python | Packs/SailPointIdentityNow/Integrations/SailPointIdentityNow/SailPointIdentityNow.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/SailPointIdentityNow/Integrations/SailPointIdentityNow/SailPointIdentityNow.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/SailPointIdentityNow/Integrations/SailPointIdentityNow/SailPointIdentityNow.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | from CommonServerPython import *
''' IMPORTS '''
import traceback
import requests
import urllib3
# Disable insecure warnings
urllib3.disable_warnings()
''' CONSTANTS '''
# IdentityNow OAuth token endpoint
IDN_OAUTH_EXT = '/oauth/token'
IDN_SEARCH_PREFIX = '/beta/search'
# Resource endpoints
IDN_SEARCH_IDENTITIES... | 38.608626 | 120 | 0.653358 |
abc80c646d7a79320af66a2ad6b3a59957797310 | 1,057 | py | Python | Projekte/Kopfrechnen/kopfrechnen.py | paintdog/Python.School | b0755f8e9ab20c3290edf02913ff79028bfb2b6e | [
"MIT"
] | null | null | null | Projekte/Kopfrechnen/kopfrechnen.py | paintdog/Python.School | b0755f8e9ab20c3290edf02913ff79028bfb2b6e | [
"MIT"
] | null | null | null | Projekte/Kopfrechnen/kopfrechnen.py | paintdog/Python.School | b0755f8e9ab20c3290edf02913ff79028bfb2b6e | [
"MIT"
] | null | null | null | import random
# Einstellungen
untere_grenze = 1
obere_grenze = 20
# Variablen
richtige_antworten = 0
falsche_antworten = 0
# Wir informieren den Benutzer über das Programm
print("Kopfrechenaufgaben")
print() # Leerzeile
print("Eingabe e zum Beenden!")
print() # Leerzeile
# Hauptschleife
while True:
zahl_1 = ra... | 24.581395 | 68 | 0.676443 |
5568ef3f2f7ba44895b3b48b46c6e96c80809fe2 | 920 | py | Python | nettests/server/simple-client.py | Laighno/evt | 90b94e831aebb62c6ad19ce59c9089e9f51cfd77 | [
"MIT"
] | 1,411 | 2018-04-23T03:57:30.000Z | 2022-02-13T10:34:22.000Z | nettests/server/simple-client.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 27 | 2018-06-11T10:34:42.000Z | 2019-07-27T08:50:02.000Z | nettests/server/simple-client.py | Zhang-Zexi/evt | e90fe4dbab4b9512d120c79f33ecc62791e088bd | [
"Apache-2.0"
] | 364 | 2018-06-09T12:11:53.000Z | 2020-12-15T03:26:48.000Z | import json
import time
import zmq
ctx = zmq.Context()
socket = ctx.socket(zmq.REQ)
socket.connect('tcp://localhost:6666')
def watches_config():
d = {}
d['func'] = 'watches'
d['nodes'] = ['http://127.0.0.1:8891','http://127.0.0.1:8892','http://127.0.0.1:8893']
return d
def everipay():
d = {}
... | 20 | 90 | 0.572826 |
55811dd21dca31b909b016bc628f9520c0de9d87 | 4,125 | py | Python | utils.py | 1486342897/Wasserstein-GAN | 1cf756b6143b01cc0180f4086cb2c4e126b97de6 | [
"MIT"
] | null | null | null | utils.py | 1486342897/Wasserstein-GAN | 1cf756b6143b01cc0180f4086cb2c4e126b97de6 | [
"MIT"
] | null | null | null | utils.py | 1486342897/Wasserstein-GAN | 1cf756b6143b01cc0180f4086cb2c4e126b97de6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Aug 7 16:17:01 2017
@author: liuy
"""
import tensorflow as tf
import numpy as np
import scipy.misc
def conv2d(input_, output_dim, k_h=4, k_w=4, d_h=2, d_w=2, stddev=0.02,
scope="conv2d"):
with tf.variable_scope(scope):
Weights... | 38.194444 | 115 | 0.602424 |
75c12ce3b66a6c6aaaef96ab6b207a89c868766d | 3,425 | py | Python | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/screenshot/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 24 | 2021-10-04T22:11:59.000Z | 2022-02-02T21:51:43.000Z | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/screenshot/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | 2 | 2021-10-04T21:51:30.000Z | 2021-10-05T14:15:31.000Z | src/lcdoc/mkdocs/lp/plugs/python/pyplugs/screenshot/__init__.py | axiros/docutools | f99874a64afba8f5bc740049d843151ccd9ceaf7 | [
"BSD-2-Clause"
] | null | null | null | """
https://dschnurr.medium.com/using-headless-chrome-as-an-automated-screenshot-tool-4b07dffba79a
"""
import shutil
import string
import subprocess as sp
from lcdoc.mkdocs.lp.plugs import python
from lcdoc.mkdocs.tools import page_dir
from lcdoc.tools import app, dirname, exists, os, project, sys, write_file, read_fi... | 31.422018 | 94 | 0.617226 |
85ced06650028773e81c99a89a569f5e1faf1be6 | 398 | py | Python | python/unittest/mock/medium/02_patching_classes/worker.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/unittest/mock/medium/02_patching_classes/worker.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/unittest/mock/medium/02_patching_classes/worker.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import os
class Helper:
def __init__(self, path):
self.path = path
def get_path(self):
base_path = os.getcwd()
return os.path.join(base_path, self.path)
class Worker:
def __init__(self):
self.helper = Helper("db")
def work(self):
path = self... | 18.952381 | 50 | 0.555276 |
c0f9080b67983774a70fdd0625ec7dfd4254629f | 13,293 | py | Python | year_3/databases_sem1/lab2/rdmslab2/api/views.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | year_3/databases_sem1/lab2/rdmslab2/api/views.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | 21 | 2020-03-24T16:26:04.000Z | 2022-02-18T15:56:16.000Z | year_3/databases_sem1/lab2/rdmslab2/api/views.py | honchardev/KPI | f8425681857c02a67127ffb05c0af0563a8473e1 | [
"MIT"
] | null | null | null | import datetime
import json
import MySQLdb
import simplexml
from django.http import HttpResponse, JsonResponse
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from api.dbmodels import Employees, Payments, Payrolls, Projects
from api.models import Employee, Mod... | 32.343066 | 110 | 0.652148 |
f196460e4d8186293b3f1b6fc6ebec69767082b7 | 1,235 | py | Python | spider_django/django_app/migrations/0002_auto_20200806_1022.py | Tiangewang0524/zzu_spider | eddd534f6a7bfb39eec5a7e240f830550b2285cb | [
"Apache-2.0"
] | null | null | null | spider_django/django_app/migrations/0002_auto_20200806_1022.py | Tiangewang0524/zzu_spider | eddd534f6a7bfb39eec5a7e240f830550b2285cb | [
"Apache-2.0"
] | null | null | null | spider_django/django_app/migrations/0002_auto_20200806_1022.py | Tiangewang0524/zzu_spider | eddd534f6a7bfb39eec5a7e240f830550b2285cb | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.0.8 on 2020-08-06 10:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_app', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='tspiderconf',
name='createtime',
... | 31.666667 | 111 | 0.603239 |
9e570dbed94623136d864506051a32fd51ceec00 | 744 | py | Python | ebenezer/atencion/models/class_.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | ebenezer/atencion/models/class_.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | 3 | 2020-02-11T23:15:00.000Z | 2021-06-10T20:52:17.000Z | ebenezer/atencion/models/class_.py | davrv93/ebenezer-backend | d3db4dafd9a8c35bea9f32afe2be1dd451f64298 | [
"Apache-2.0"
] | null | null | null | from uuid import uuid4
from django.db import models
from .domain import Domain
class Class(models.Model):
id = models.UUIDField(
primary_key=True,
default=uuid4, editable=False)
domain = models.ForeignKey(
Domain, related_name='class_dominio_set',
db_column='domain_id',
... | 21.882353 | 50 | 0.623656 |
a814c2d2e203a1e7cb11ae77f55c8c7c91ee66be | 8,586 | py | Python | Packs/AzureCompute/Integrations/AzureCompute_v2/AzureCompute_v2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AzureCompute/Integrations/AzureCompute_v2/AzureCompute_v2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AzureCompute/Integrations/AzureCompute_v2/AzureCompute_v2_test.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import pytest
from AzureCompute_v2 import MsGraphClient, screen_errors, assign_image_attributes, list_vms_command, create_vm_parameters
# test_create_vm_parameters data:
CREATE_VM_PARAMS_ARGS = {"resource_group": "compute-integration",
"nic_name": "test-compute-integration-nic",
... | 38.850679 | 121 | 0.461332 |
f55a93b3f03f46a106e93298b5c87cf59280ebaf | 649 | py | Python | python/abc/abc_concrete_method.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/abc/abc_concrete_method.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | python/abc/abc_concrete_method.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import abc
import io
class ABCWithConcreteImplementation(abc.ABC):
@abc.abstractmethod
def retrieve_values(self, input):
print("Base class reading data")
return input.read()
class ConcreteOverride(ABCWithConcreteImplementation):
def retrieve_values(self, input):
base... | 21.633333 | 73 | 0.676425 |
f576b70c39c8bbd70f855125d3bd6260451e39d7 | 1,324 | py | Python | SECCON/2020/Quals/YetAnotherPySandbox/run.py | mystickev/ctf-archives | 89e99a5cd5fb6b2923cad3fe1948d3ff78649b4e | [
"MIT"
] | 3 | 2020-11-02T06:53:39.000Z | 2021-12-10T00:59:01.000Z | sandbox/py-sandbox/dist/run.py | SECCON/SECCON2020_online_CTF | dd639d140ad61ea0fbfadb7827157ca53f7b88b2 | [
"Apache-2.0"
] | null | null | null | sandbox/py-sandbox/dist/run.py | SECCON/SECCON2020_online_CTF | dd639d140ad61ea0fbfadb7827157ca53f7b88b2 | [
"Apache-2.0"
] | 1 | 2021-12-19T11:06:24.000Z | 2021-12-19T11:06:24.000Z | #!/usr/bin/env python2.7
from sys import modules
del modules['os']
del modules['sys']
del modules
keys = list(__builtins__.__dict__.keys())
EVAL = eval
LEN = len
RAW_INPUT = raw_input
TRUE = True
FALSE = False
TYPE = type
INT = int
for k in keys:
if k not in ['False', 'None', 'True', 'bool', 'bytearray', 'bytes',... | 25.960784 | 264 | 0.604985 |
27562c13d1ba8446ef3176db53afe0078937735d | 5,125 | py | Python | Sploit-Payload-master/thesploit.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-17T03:35:03.000Z | 2021-12-08T06:00:31.000Z | Sploit-Payload-master/thesploit.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | null | null | null | Sploit-Payload-master/thesploit.py | Zusyaku/Termux-And-Lali-Linux-V2 | b1a1b0841d22d4bf2cc7932b72716d55f070871e | [
"Apache-2.0"
] | 2 | 2021-11-05T18:07:48.000Z | 2022-02-24T21:25:07.000Z | import marshal,zlib,base64
exec(marshal.loads(zlib.decompress(base64.b32decode("PCOO2W23O7N4MEK6KCSGQUUSFXFZP6HOOUNDSZCSBKJOYXHMCO5ZDYQ4FO7ETIL4RZRULDIKCEVREITOYGBKNWOQJ5UR76WUU47PLF7EF72D7NB7UF72DHMZAVAIVJBKKPXETTKUSS4DWO2YFR3L7GPZOZASYKRM7JSOB6ZZPSS2KMLGYK74M3GGGYJFSYY3LIWKPWCGRKETCZVGTAEWTGUZDFLE3MY7UFHJV5HDZTGLE2UK... | 2,562.5 | 5,098 | 0.996683 |
7e08304cc5525a44d8a6efb6551cbd3a3435b7b1 | 1,776 | py | Python | migrations/versions/091deace5f08_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | migrations/versions/091deace5f08_.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | migrations/versions/091deace5f08_.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | """empty message
Revision ID: 091deace5f08
Revises: 6b7016f73688
Create Date: 2020-10-02 09:29:12.932229
"""
import sqlalchemy as sa
from alembic import op
from geoalchemy2.types import Geometry
from sqlalchemy.sql import text
# revision identifiers, used by Alembic.
revision = "091deace5f08"
down_revision = "6b7016... | 28.645161 | 84 | 0.625563 |
476c30c81b206bc98a155548401ff0c8baf6dc64 | 237 | py | Python | Chapter2_Python/14-ListSlicing.py | olebause/TensorFlow2 | 70fcb7c85c7ead0dc4f88ffa35be5f2eb93e618e | [
"MIT"
] | 2 | 2021-02-13T19:18:00.000Z | 2021-11-10T09:54:49.000Z | Chapter4_Intermediate/ListSlicing.py | franneck94/UdemyPythonIntro | 4895a91a04eedce7d59b61bf12e5aa209fe60f85 | [
"MIT"
] | null | null | null | Chapter4_Intermediate/ListSlicing.py | franneck94/UdemyPythonIntro | 4895a91a04eedce7d59b61bf12e5aa209fe60f85 | [
"MIT"
] | null | null | null | list_a = [i for i in range(10)]
print(list_a)
list_b = [list_a[i] for i in range(3)]
print(list_b)
# List Slicing
# Start, Stop, Step
list_c = list_a[0:3:1]
print(list_c)
list_c[0] = -100
print(list_a)
print(list_c)
| 11.85 | 38 | 0.628692 |
d046f4c713a4de9e56e256df269e39358fa572c5 | 1,267 | py | Python | pythonProj/FZPython/demo/download_tickData.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | null | null | null | pythonProj/FZPython/demo/download_tickData.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | null | null | null | pythonProj/FZPython/demo/download_tickData.py | iHamburg/FZQuant | 86b750ec33d01badfd3f324d6f1599118b9bf8ff | [
"MIT"
] | 2 | 2019-04-10T10:05:00.000Z | 2021-11-24T17:17:23.000Z | #!/usr/bin/env python
# 定期往mongodb数据库写入信息
#=========== 实现脚本运行操作 ============
import os
import sys
module_path = os.path.abspath(os.getcwd())
if module_path not in sys.path:
sys.path.append(module_path)
#=========== 实现脚本运行操作 ============
import tushare as ts
import pyquant.libs.mongolib as mongolib
import pyquant.... | 23.462963 | 61 | 0.625099 |
0891f432ba71b3a05cc15a408bbd44c82878df34 | 281 | py | Python | docker/django/restaurant/restapps/urls.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 3 | 2019-08-29T10:14:40.000Z | 2021-03-05T09:50:15.000Z | docker/django/restaurant/restapps/urls.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | null | null | null | docker/django/restaurant/restapps/urls.py | gitmehedi/cloudtuts | 3008b1cf7fbf22728c9bb2c059c4bd196043a93e | [
"Unlicense"
] | 1 | 2021-03-05T09:50:29.000Z | 2021-03-05T09:50:29.000Z | from rest_framework import routers
from restapps import views
from django.urls import path,include,re_path
from .views import *
urlpatterns=[
path('restaurant/', api_restaurant_list_view, name='restaurant-objects'),
path('menu/', api_menu_list_view, name='menu-objects')
] | 31.222222 | 77 | 0.775801 |
deffb37b5128182e4f0da41a0b2c00415dbce868 | 1,900 | py | Python | site/public/courses/CS-2.1/Code/recursion.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | 1 | 2021-08-24T20:22:19.000Z | 2021-08-24T20:22:19.000Z | site/public/courses/CS-2.1/Code/recursion.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | site/public/courses/CS-2.1/Code/recursion.py | KitsuneNoctus/makeschool | 5eec1a18146abf70bb78b4ee3d301f6a43c9ede4 | [
"MIT"
] | null | null | null | #!python
def fibonacci(n):
"""fibonacci(n) returns the n-th number in the Fibonacci sequence,
which is defined with the recurrence relation:
fibonacci(0) = 0
fibonacci(1) = 1
fibonacci(n) = fibonacci(n - 1) + fibonacci(n - 2), for n > 1"""
# Check if n is negative or not an integer (inv... | 33.928571 | 76 | 0.652105 |
c243d47c12b057abbc43b41e554caac949e53ef6 | 744 | py | Python | Das_getupfte_Band.py | effjot/stiefogen | da149f22912fa3b31fc2660ff01e4e0ca08d5efe | [
"MIT"
] | 14 | 2015-04-30T08:50:53.000Z | 2021-08-23T13:58:12.000Z | Das_getupfte_Band.py | effjot/stiefogen | da149f22912fa3b31fc2660ff01e4e0ca08d5efe | [
"MIT"
] | 4 | 2020-08-28T20:45:47.000Z | 2021-04-06T21:56:25.000Z | Das_getupfte_Band.py | effjot/stiefogen | da149f22912fa3b31fc2660ff01e4e0ca08d5efe | [
"MIT"
] | 5 | 2015-05-01T06:40:40.000Z | 2019-12-12T22:17:29.000Z | import os
import stiefo
filenamebase = "Das_getupfte_Band"
wlist = stiefo.wordlist()
wlist.load("Wortlisten/wortliste.txt")
if os.path.isfile(filenamebase+'.wrd'):
wlist.load(filenamebase+'.wrd')
with open(filenamebase+'.txt', "r", encoding="utf-8") as f:
text = f.read()
abk = stiefo.word... | 20.666667 | 63 | 0.619624 |
5f10e88baa6ec01402cf0a326ed339af29f32dd0 | 3,748 | py | Python | official/cv/ssd/ascend310_quant_infer/post_quant.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/ssd/ascend310_quant_infer/post_quant.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/ssd/ascend310_quant_infer/post_quant.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 41.644444 | 116 | 0.712914 |
269c8184e46952292be4a849597afa9d24e723e7 | 3,252 | py | Python | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/heads/i3d_head.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 5 | 2022-01-30T07:35:58.000Z | 2022-02-08T05:45:20.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/heads/i3d_head.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-14T02:33:28.000Z | 2022-01-14T02:33:28.000Z | Paddle_Industry_Practice_Sample_Library/Football_Action/PaddleVideo/paddlevideo/modeling/heads/i3d_head.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-01-24T16:27:01.000Z | 2022-01-24T16:27:01.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 applic... | 33.875 | 78 | 0.610701 |
26f38bedecb24de52635c9a7edbb76a44e98c6e7 | 660 | py | Python | Algorithms/Implementation/electronics_shop.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/electronics_shop.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | Algorithms/Implementation/electronics_shop.py | byung-u/HackerRank | 4c02fefff7002b3af774b99ebf8d40f149f9d163 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
from itertools import product
def getMoneySpent(keyboards, drives, s):
res = -1
for p in product(keyboards, drives):
sp = sum(p)
if sp == s:
return s
if sp < s:
if res < sp:
res = sp
return res
s,n,m = input... | 27.5 | 112 | 0.6 |
f82cd1df7a3ac88335a400d9068c66f9c8e75454 | 638 | py | Python | algorithms/implementation/matrix_rotation.py | PlamenHristov/HackerRank | 2c875995f0d51d7026c5cf92348d9fb94fa509d6 | [
"MIT"
] | null | null | null | algorithms/implementation/matrix_rotation.py | PlamenHristov/HackerRank | 2c875995f0d51d7026c5cf92348d9fb94fa509d6 | [
"MIT"
] | null | null | null | algorithms/implementation/matrix_rotation.py | PlamenHristov/HackerRank | 2c875995f0d51d7026c5cf92348d9fb94fa509d6 | [
"MIT"
] | null | null | null | import sys
if __name__ == '__main__':
M, N, R = list(map(int, sys.stdin.readline().split()))
matrix = [list(map(int, sys.stdin.readline().split())) for row in range(M)]
for _ in range(R):
matrix = list(zip(*matrix[::-1]))
print(matrix)
def main():
matrix = [[1, 2, 3, 4],
[5,... | 24.538462 | 79 | 0.39185 |
3e4cd51140a440aa010b51dedff6b8c62ff447fa | 988 | py | Python | SoSe-21/Uebung-3/A3-Brutto-Netto-Rechner.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | 1 | 2022-03-23T09:40:39.000Z | 2022-03-23T09:40:39.000Z | SoSe-21/Uebung-3/A3-Brutto-Netto-Rechner.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | SoSe-21/Uebung-3/A3-Brutto-Netto-Rechner.py | jonasrdt/Wirtschaftsinformatik2 | 30d5d896808b98664c55cb6fbb3b30a7f1904d9f | [
"MIT"
] | null | null | null | # Aufgabe 3 - Übung 3
#
# Erstellen Sie ein Python-Programm mit den folgenden Anforderungen:
# • Der Anwender soll dazu aufgefordert werden, sein monatliches Bruttogehalt
# einzugeben.
# • Liegt das Gehalt über 2.500 €, sind 22% Steuern zu zahlen, ansonsten 18%.
# • Innerhalb des Programms soll anhand des Gehalts entsc... | 36.592593 | 88 | 0.748988 |
3e90201880c9acd47587614cf9b496e088a7e228 | 934 | py | Python | OxoCard/readSHT30.py | ckuehnel/MicroPython | c57d0df744fe5301e755bd139b6cc56d69c442fd | [
"MIT"
] | 1 | 2021-03-22T18:38:43.000Z | 2021-03-22T18:38:43.000Z | OxoCard/readSHT30.py | ckuehnel/MicroPython | c57d0df744fe5301e755bd139b6cc56d69c442fd | [
"MIT"
] | null | null | null | OxoCard/readSHT30.py | ckuehnel/MicroPython | c57d0df744fe5301e755bd139b6cc56d69c442fd | [
"MIT"
] | 1 | 2021-02-06T10:07:36.000Z | 2021-02-06T10:07:36.000Z | '''
File: readSHT30.py
needs: none
based on https://www.wemos.cc/en/latest/tutorials/w600/get_started_with_micropython_w600.html#i2c
Reads SHT30 sensor and prints temperature and humidity
2021-03-27 Claus Kühnel info@ckuehnel.ch
'''
from oxocard import *
from machine import Pin, I2C
import time
i2c = I2C(scl = Pin(... | 23.35 | 97 | 0.630621 |
5fd218458bbe35fa1e98b41c48957a370bcfc1cc | 2,730 | py | Python | project/cli/dump.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | project/cli/dump.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | project/cli/dump.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | import json
import os
import shutil
import click
from flask.cli import AppGroup
from sqlalchemy import and_
from sqlalchemy.orm import joinedload
from project import app, dump_path
from project.api.event.schemas import EventDumpSchema
from project.api.event_category.schemas import EventCategoryDumpSchema
from project... | 26.504854 | 83 | 0.696703 |
84446a521dbb3f95e9be193fe2cb687551f42800 | 122 | py | Python | 11-se/python_call_c/_notested/02-ctypes/main.py | al2698/sp | fceabadef49ffe6ed25dfef38e3dc418f309e128 | [
"MIT"
] | null | null | null | 11-se/python_call_c/_notested/02-ctypes/main.py | al2698/sp | fceabadef49ffe6ed25dfef38e3dc418f309e128 | [
"MIT"
] | null | null | null | 11-se/python_call_c/_notested/02-ctypes/main.py | al2698/sp | fceabadef49ffe6ed25dfef38e3dc418f309e128 | [
"MIT"
] | null | null | null | from ctypes import *
m = cdll.LoadLibrary('./speedup_performance.so')
print(m.slow_calc(c_int(3), c_int(2), c_int(4)))
| 17.428571 | 48 | 0.704918 |
f255c2ea916758eabea00b3dd7c8bd1f499b75f2 | 54,805 | py | Python | Library/OptionStrategy.py | rccannizzaro/QC-StrategyBacktest | 847dbd61680466bc60ce7893eced8a8f70d16b2e | [
"Apache-2.0"
] | 11 | 2021-12-02T15:41:47.000Z | 2022-03-14T03:49:22.000Z | Library/OptionStrategy.py | ikamanu/QC-StrategyBacktest | 847dbd61680466bc60ce7893eced8a8f70d16b2e | [
"Apache-2.0"
] | null | null | null | Library/OptionStrategy.py | ikamanu/QC-StrategyBacktest | 847dbd61680466bc60ce7893eced8a8f70d16b2e | [
"Apache-2.0"
] | 5 | 2022-02-02T12:07:51.000Z | 2022-02-13T02:24:19.000Z | ########################################################################################
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with... | 48.585993 | 187 | 0.60843 |
f26d43ad890a9dcc76627a294d2b60f5d439188f | 2,577 | py | Python | etl/data_extraction/scrape_data.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 7 | 2020-04-23T20:16:11.000Z | 2022-01-04T14:57:16.000Z | etl/data_extraction/scrape_data.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 361 | 2020-04-23T17:20:14.000Z | 2022-03-02T11:29:45.000Z | etl/data_extraction/scrape_data.py | Betadinho/einander-helfen | 272f11397d80ab5267f39a7b36734495f1c00b0c | [
"MIT"
] | 1 | 2021-11-29T06:02:52.000Z | 2021-11-29T06:02:52.000Z | import os
import threading
from importlib import import_module
from inspect import getmembers, isclass
from data_extraction.scraper import Scraper
from shared.logger_factory import LoggerFactory
# Root Directory (/etl)
ROOT_DIR = os.environ['ROOT_DIR']
logger = LoggerFactory.get_general_logger()
# Contains all runn... | 38.462687 | 118 | 0.718277 |
d9e82611d7b592ba105543878226d5b959638410 | 3,384 | py | Python | zencad/examples/MiniGames/tennis.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | 5 | 2018-04-11T14:11:40.000Z | 2018-09-12T19:03:36.000Z | zencad/examples/MiniGames/tennis.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | zencad/examples/MiniGames/tennis.py | Spiritdude/zencad | 4e63b1a6306dd235f4daa2791b10249f7546c95b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import time
import math
import random
from zencad import *
import zencad.assemble
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
CTRWIDGET = None
SLD0 = None
SLD1 = None
BALL_POSITION = [0, 0]
BALL_SPEED_NORMAL = math.sqrt(150**2 * 2)
BALL_SPEED = [
BA... | 22.864865 | 75 | 0.660461 |
8a6d03b3c3f33e9cce06c4695aee5d60147e5fcb | 578 | py | Python | Project Euler Qusetions 41 - 50/Project Euler Question 44.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | 1 | 2020-02-11T02:03:02.000Z | 2020-02-11T02:03:02.000Z | Project Euler Qusetions 41 - 50/Project Euler Question 44.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | Project Euler Qusetions 41 - 50/Project Euler Question 44.py | Clayton-Threm/Coding-Practice | 6671e8a15f9e797338caa617dae45093f4157bc1 | [
"MIT"
] | null | null | null | #Project Euler Question 44
#Pentagon numbers
def pentagon_finder():
pent_list = [1, 5, 12]
x = 3
while True:
x += 1
n = int(x * ((3 * x) - 1) / 2)
pent_list.append(n)
pent_index = -1
while True:
pent_index -= 1
nb = pent_list[pent_index]
... | 22.230769 | 38 | 0.435986 |
76d9e138901b0f6e488a73d0c45ece3bf970469f | 4,057 | py | Python | src/test/tests/hybrid/pos_cmfe.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 226 | 2018-12-29T01:13:49.000Z | 2022-03-30T19:16:31.000Z | src/test/tests/hybrid/pos_cmfe.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 5,100 | 2019-01-14T18:19:25.000Z | 2022-03-31T23:08:36.000Z | src/test/tests/hybrid/pos_cmfe.py | visit-dav/vis | c08bc6e538ecd7d30ddc6399ec3022b9e062127e | [
"BSD-3-Clause"
] | 84 | 2019-01-24T17:41:50.000Z | 2022-03-10T10:01:46.000Z | # ----------------------------------------------------------------------------
# CLASSES: nightly
#
# Test Case: pos_cmfe.py
#
# Defect ID: '5528, '5677
#
# Programmer: Hank Childs
# Date: January 9, 2006
#
# Modifications:
# Jeremy Meredith, Tue Jul 15 10:43:58 EDT 2008
# Changed number of vectors ... | 27.228188 | 114 | 0.709884 |
0a07cf100207bffe92cd15e87ac605b15631b274 | 1,419 | py | Python | example/zmq_server.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | example/zmq_server.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | example/zmq_server.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | import logging
import os
from typing import List, Tuple
from pydantic import BaseModel
from volley import Engine
from volley.connectors.zmq import ZMQConsumer, ZMQProducer
from volley.logging import logger
from volley.models import PydanticModelHandler
from volley.serializers import MsgPackSerialization
logging.basi... | 22.171875 | 81 | 0.669486 |
6a76d97bca808302afb9dc31b7db489d2e697c09 | 1,366 | py | Python | other/re-risky/split-version/task4/spoilers_and_source/src/gen_carbon.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | other/re-risky/split-version/task4/spoilers_and_source/src/gen_carbon.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | other/re-risky/split-version/task4/spoilers_and_source/src/gen_carbon.py | iicarus-bit/google-ctf | 4eb8742bca58ff071ff8f6814d41d9ec7eb1db4b | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python
# 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 or agree... | 23.964912 | 80 | 0.662518 |
0a9619a6641e14f334d86597007f5c2212170fe4 | 3,959 | py | Python | Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/bilstm_with_crf/evaluate.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | 1 | 2022-03-19T09:58:37.000Z | 2022-03-19T09:58:37.000Z | Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/bilstm_with_crf/evaluate.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"Apache-2.0"
] | null | null | null | Paddle_Industry_Practice_Sample_Library/nlp_projects/nlu/bilstm_with_crf/evaluate.py | linuxonly801/awesome-DeepLearning | b063757fa130c4d56aea5cce2e592610f1e169f9 | [
"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... | 42.117021 | 198 | 0.714574 |
7c48dd3513c5ab81fd869cc41985da0fbed398e1 | 308 | py | Python | DataStructure/U9/Analysis/analysis.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | 1 | 2019-10-29T08:21:41.000Z | 2019-10-29T08:21:41.000Z | DataStructure/U9/Analysis/analysis.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | DataStructure/U9/Analysis/analysis.py | qiaw99/Data-Structure | 3b1cdce96d4f35329ccfec29c03de57378ef0552 | [
"MIT"
] | null | null | null | import numpy as np
import math
from matplotlib import pyplot as plt
# n*d*logd(n)+(m+n)logd(n)
# m = n
x = np.arange(1,10,0.5)
n = 10
temp = np.log(n) / np.log(x)
y = temp * x * n + 2*n * temp
plt.title("m= Θ(n)")
plt.xlabel("x axis caption")
plt.ylabel("y axis caption, n = 10")
plt.plot(x, y)
plt.show()
| 18.117647 | 36 | 0.616883 |
6b30962ea23b97f0996ffa901c7fc575394509e9 | 6,420 | py | Python | autojail/config/wizard.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 6 | 2020-08-12T08:16:15.000Z | 2022-03-05T02:25:53.000Z | autojail/config/wizard.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-03-30T10:34:51.000Z | 2021-06-09T11:24:00.000Z | autojail/config/wizard.py | ekut-es/autojail | bc16e40e6df55c0a28a3059715851ffa59b14ba8 | [
"MIT"
] | 1 | 2021-11-21T09:30:58.000Z | 2021-11-21T09:30:58.000Z | from typing import FrozenSet, List, Optional, Union
from dataclasses import dataclass, field
from autojail.model.datatypes import IntegerList
from ..commands.base import BaseCommand
from ..model import (
Board,
ByteSize,
CellConfig,
DebugConsole,
HypervisorMemoryRegion,
JailhouseConfig,
M... | 29.181818 | 79 | 0.556231 |
865efbfc75b0a9c3914ab61fed9bd77e91053ad4 | 1,501 | py | Python | hw3-cloudmesh/cloudmesh_oliver/plugins/cm_shell_oliver.py | futuresystems/465-oliverlewis | c1a093e9de012e752a2277c4fb533cbd974a5a8d | [
"Apache-2.0"
] | null | null | null | hw3-cloudmesh/cloudmesh_oliver/plugins/cm_shell_oliver.py | futuresystems/465-oliverlewis | c1a093e9de012e752a2277c4fb533cbd974a5a8d | [
"Apache-2.0"
] | null | null | null | hw3-cloudmesh/cloudmesh_oliver/plugins/cm_shell_oliver.py | futuresystems/465-oliverlewis | c1a093e9de012e752a2277c4fb533cbd974a5a8d | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import os
from cmd3.console import Console
from cmd3.shell import command
from cloudmesh_oliver.command_oliver import command_oliver
class cm_shell_oliver:
def activate_cm_shell_oliver(self):
self.register_command_topic('mycommands', 'oliver')
@command
def ... | 26.803571 | 67 | 0.62958 |
86bf1cf0eb91606ae893870af8518fba514d5602 | 1,993 | py | Python | sorting/quick_sort.py | yujungcheng/algorithm_and_data_structure | 3742238227067217b82bf35ca3a968db4375f3c9 | [
"Apache-2.0"
] | null | null | null | sorting/quick_sort.py | yujungcheng/algorithm_and_data_structure | 3742238227067217b82bf35ca3a968db4375f3c9 | [
"Apache-2.0"
] | null | null | null | sorting/quick_sort.py | yujungcheng/algorithm_and_data_structure | 3742238227067217b82bf35ca3a968db4375f3c9 | [
"Apache-2.0"
] | 1 | 2020-04-16T01:17:04.000Z | 2020-04-16T01:17:04.000Z | #!/usr/bin/python3
enable_debug = True
count_debug = 0
def debug(msg):
global enable_debug
global count_debug
if enable_debug:
print("%s, count: %s" % (msg, count_debug))
count_debug += 1
def swap(list_data, x, y):
list_data[x], list_data[y] = list_data[y], list_data[x]
def partition... | 29.746269 | 80 | 0.594079 |
be0557c41ab23a48ead12fe6d059a401efe54f6b | 35,554 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_snmp_community.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_snmp_community.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/plugins/modules/network/cloudengine/ce_snmp_community.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... | 36.279592 | 140 | 0.551077 |
07d23ea7a59be057b1ff4e188a4330a88d7976f2 | 19,900 | py | Python | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/net_tools/test_nmcli.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/net_tools/test_nmcli.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | exercises/networking_selfpaced/networking-workshop/collections/ansible_collections/community/general/tests/unit/modules/net_tools/test_nmcli.py | tr3ck3r/linklight | 5060f624c235ecf46cb62cefcc6bddc6bf8ca3e7 | [
"MIT"
] | null | null | null | # Copyright: (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
import json
import pytest
from ansible_collections.community.general.plugins.modules.net_tools import nmcli
pytestmark = pytest.mark.usefixtures('patch_ansible_module')
TESTCASE_CONNEC... | 30.289193 | 123 | 0.639548 |
135030338fef804a925ec5915a7e0565f5a84cfa | 10,599 | py | Python | tests/shared/test_data.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 1 | 2021-10-18T01:24:58.000Z | 2021-10-18T01:24:58.000Z | tests/shared/test_data.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | 209 | 2020-03-18T18:28:12.000Z | 2022-03-01T13:42:29.000Z | tests/shared/test_data.py | chaneyjd/rasa | 104a9591fc10b96eaa7fe402b6d64ca652b7ebe2 | [
"Apache-2.0"
] | null | null | null | import glob
import os
import shutil
import tempfile
from pathlib import Path
import pytest
import rasa.shared
import rasa.shared.data
from rasa.shared.constants import DEFAULT_E2E_TESTS_PATH
from rasa.shared.nlu.training_data.loading import load_data
from rasa.shared.utils.io import write_text_file, json_to_string
fr... | 31.544643 | 84 | 0.677045 |
13700e5dd1ffa338b07517542151b4c522bdf8d5 | 1,910 | py | Python | AutosClasificados/core/tests.py | joaquinpunales1992/Python-Django-WatsonVisualRecognition-WatsonNLU | 2997359150236a7d897a3f9201f8e9404f3d7f02 | [
"MIT"
] | null | null | null | AutosClasificados/core/tests.py | joaquinpunales1992/Python-Django-WatsonVisualRecognition-WatsonNLU | 2997359150236a7d897a3f9201f8e9404f3d7f02 | [
"MIT"
] | null | null | null | AutosClasificados/core/tests.py | joaquinpunales1992/Python-Django-WatsonVisualRecognition-WatsonNLU | 2997359150236a7d897a3f9201f8e9404f3d7f02 | [
"MIT"
] | null | null | null | from django.test import TestCase
# Create your tests here.
import json
from watson_developer_cloud import NaturalLanguageUnderstandingV1
import watson_developer_cloud.natural_language_understanding.features.v1 as Features
natural_language_understanding = NaturalLanguageUnderstandingV1(
... | 50.263158 | 1,025 | 0.68377 |
138527f825aa7e22ff35bf4f36f232ac6ae3b3cc | 482 | py | Python | gdp1/assignment_2/word_counter.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | gdp1/assignment_2/word_counter.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | gdp1/assignment_2/word_counter.py | einekatze/gdp1-homework | 28889dfa1863e1f1dee164e5b465dddb1cfacfcc | [
"MIT"
] | null | null | null | from gdp1.common.input_helpers import str_input
def main():
word_1 = str_input("Enter a word: ")
word_2 = str_input("Enter another word: ")
if len(word_1) + len(word_2) > 29:
print("The summed length of both words must not exceed 29 characters. Exiting.")
exit(1)
i = 30 - len(word_1)... | 19.28 | 88 | 0.580913 |
b993fa9476be0eb39311ba224e9a02cc22f4124c | 966 | py | Python | exercises/fr/exc_01_12_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/fr/exc_01_12_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/fr/exc_01_12_02.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | import spacy
from spacy.matcher import Matcher
nlp = spacy.load("fr_core_news_sm")
matcher = Matcher(nlp.vocab)
doc = nlp(
"j'ai téléchargé Fortnite sur mon ordinateur portable et je ne peux pas "
"du tout lancer le jeu. Quelqu'un pour m'aider ?"
"donc quand je téléchargeais Minecraft j'ai eu la version d... | 37.153846 | 80 | 0.732919 |
bc59624d80baa5ab00cf9d48d00f86ae77c69df4 | 630 | py | Python | official_examples/Reinforcement_Learning_GameSolution_Examples/ma_cartpole/game_interface.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,045 | 2019-05-09T02:50:43.000Z | 2022-03-31T06:22:11.000Z | official_examples/Reinforcement_Learning_GameSolution_Examples/ma_cartpole/game_interface.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,468 | 2019-05-16T00:48:18.000Z | 2022-03-08T04:12:44.000Z | official_examples/Reinforcement_Learning_GameSolution_Examples/ma_cartpole/game_interface.py | RuichunWang/ModelArts-Lab | cfa9a853e3a76a21eac2818f055b36978ac2bb69 | [
"Apache-2.0"
] | 1,077 | 2019-05-09T02:50:53.000Z | 2022-03-27T11:05:32.000Z | from ray.rllib.examples.env.multi_agent import MultiAgentCartPole
class GameInterface():
def __init__(self, *args):
print("Initializing multiagent cartpole...")
self.game = MultiAgentCartPole({"num_agents": 4})
print("multiagent cartpole initialized.")
def reset(self, *args):
... | 27.391304 | 65 | 0.639683 |
d5dcf61cf3a394ed4d0004b29a710eebf6b5c596 | 4,663 | py | Python | volley/transport.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 8 | 2022-02-24T14:59:24.000Z | 2022-03-31T04:37:55.000Z | volley/transport.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 3 | 2022-02-27T17:08:52.000Z | 2022-03-18T13:11:01.000Z | volley/transport.py | shipt/py-volley | 0114651478c8df7304d3fe3cb9f72998901bb3fe | [
"MIT"
] | 2 | 2022-02-24T15:03:07.000Z | 2022-03-15T03:12:00.000Z | # Copyright (c) Shipt, Inc.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple, Union
from prometheus_client import Counter
from volley.logging import logger
... | 37.604839 | 119 | 0.669526 |
538e8313b5449b14c3815f3e641e00588e01036d | 421 | py | Python | books/PythonCleanCode/ch4_solid/srp_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch4_solid/srp_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonCleanCode/ch4_solid/srp_1.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | """Clean Code in Python - Chapter 4, The SOLID Principles
> SRP: Single Responsibility Principle
"""
class SystemMonitor:
def load_activity(self):
"""Get the events from a source, to be processed."""
def identify_events(self):
"""Parse the source raw data into events (domain objec... | 26.3125 | 70 | 0.643705 |
53f3675c075d366412207416db67d86b58e413d5 | 2,351 | py | Python | app.py | lehr-laemp/kiga-webapp-V2 | 1d35dd1deb82962e166169245fa0d4e5f265af22 | [
"Unlicense"
] | null | null | null | app.py | lehr-laemp/kiga-webapp-V2 | 1d35dd1deb82962e166169245fa0d4e5f265af22 | [
"Unlicense"
] | null | null | null | app.py | lehr-laemp/kiga-webapp-V2 | 1d35dd1deb82962e166169245fa0d4e5f265af22 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Begonnen am 12.03.2022
@author: HM
app.py
- Hauptprogramm
- lädt alle nötigen Funktionen aus dem Ordner def
- Programm soll eine Oberfläche erstellen, damit Schülerdaten eingegeben werden könnnen
- geschützt - verschlüsselt
- übers Internet
"""
# -----------... | 23.277228 | 91 | 0.56912 |
ab405c8b5d35fa5d9d046e7a9e707cbbfe2d5210 | 2,411 | py | Python | python/oneflow/nn/modules/flip.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/flip.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/flip.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 29.765432 | 113 | 0.623808 |
918e7641a0a384ce3fa89f9d03df99ce031964c8 | 961 | py | Python | projects/002-wuerfel/Kuna42_wuerfel.py | gaylordmartin179/start-projects | 094c7b3ab379bea39eabb31174e479307f9a3af0 | [
"MIT"
] | null | null | null | projects/002-wuerfel/Kuna42_wuerfel.py | gaylordmartin179/start-projects | 094c7b3ab379bea39eabb31174e479307f9a3af0 | [
"MIT"
] | 2 | 2021-04-04T09:16:43.000Z | 2021-04-07T08:53:53.000Z | projects/002-wuerfel/Kuna42_wuerfel.py | gaylordmartin179/start-projects | 094c7b3ab379bea39eabb31174e479307f9a3af0 | [
"MIT"
] | 2 | 2021-04-04T09:19:31.000Z | 2021-05-02T15:06:50.000Z | # Hier könnte ein Beispielcode stehen
from random import randint
class Wurfel:
def __init__(self, seiten: int):
# diese Variable speichert ab,
# wie viele Seiten der Würfel hat
self.seiten = seiten
def __int__(self):
return self.werfen()
def werfen(self):
# hier ... | 30.03125 | 61 | 0.621228 |
37dce94fdbf4ea085aab012d8747decfa1193d3d | 3,209 | py | Python | src/server/db/StateMapper.py | muenstermannmarius/ElectionSystem | a6e60d9147423787e869587b808def4771f89cb7 | [
"RSA-MD"
] | null | null | null | src/server/db/StateMapper.py | muenstermannmarius/ElectionSystem | a6e60d9147423787e869587b808def4771f89cb7 | [
"RSA-MD"
] | null | null | null | src/server/db/StateMapper.py | muenstermannmarius/ElectionSystem | a6e60d9147423787e869587b808def4771f89cb7 | [
"RSA-MD"
] | null | null | null | import mysql.connector
from server.State import State
from server.db.Mapper import Mapper
class StateMapper (Mapper):
"""This is a mapper-class, which represents state objects into
a relational database. For this reason you can find some methods,
which help to find, insert, modify, and delete objects. The... | 29.440367 | 82 | 0.585852 |
5367021786ff8b9b6972fef4c39f2f975b6bfc1b | 376 | py | Python | python/web_version/modules/__init__.py | derHahn/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 4 | 2015-02-20T09:20:10.000Z | 2018-02-05T10:54:10.000Z | python/web_version/modules/__init__.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 80 | 2018-04-13T13:46:24.000Z | 2022-02-16T16:01:46.000Z | python/web_version/modules/__init__.py | tlubitz/SBtab | da998eacc49f7f29d8168be366eb0c211c3adb5f | [
"MIT"
] | 6 | 2018-06-06T19:55:32.000Z | 2021-09-30T15:16:40.000Z | try: from . import balancer
except: import balancer
try: from . import kineticizer
except: import kineticizer
try: from . import misc
except: import misc
try: from . import SBtab
except: import SBtab
try: from . import validatorSBtab
except: import validatorSBtab
try: from . import sbtab2sbml
except: import sbtab2sbml
... | 25.066667 | 33 | 0.795213 |
beb83ff43bc4c93132b33157631ca0ea3165b125 | 154 | py | Python | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/pg-9.6-hindle-remove-method-error.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/pg-9.6-hindle-remove-method-error.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Books/Learning-Programming-with-Python.Tamim-Shahriar-Subeen/chapter-009.01-list/pg-9.6-hindle-remove-method-error.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | fruits = ['apple', 'mango', 'coconut', 'banana', 'orange']
item = "pineapple"
if item in fruits:
remove("item")
else:
print(item, "not in list")
| 19.25 | 58 | 0.61039 |
fe73b928b9fda7df6a691dafdf675b7fe1e8eca3 | 2,077 | py | Python | Packs/AWS_Sagemaker/Integrations/AWSSagemaker/AWSSagemaker.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/AWS_Sagemaker/Integrations/AWSSagemaker/AWSSagemaker.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/AWS_Sagemaker/Integrations/AWSSagemaker/AWSSagemaker.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import os
import sys
import boto3
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
if not demisto.params()['proxy']:
del os.environ['http_proxy']
del os.environ['https_proxy']
del os.environ['HTTP_PROXY']
del os.environ['HTTPS_PROXY']
def invoke_... | 32.968254 | 106 | 0.650457 |
22aa9983f44d02ea36b2f9dad10946380bcfff48 | 1,814 | py | Python | easy/3/python/app.py | carlan/dailyprogrammer | f8448c6a35277c567d0f1ecab781d45b294c8d0f | [
"MIT"
] | 1 | 2019-02-26T16:34:06.000Z | 2019-02-26T16:34:06.000Z | easy/3/python/app.py | carlan/dailyprogrammer | f8448c6a35277c567d0f1ecab781d45b294c8d0f | [
"MIT"
] | null | null | null | easy/3/python/app.py | carlan/dailyprogrammer | f8448c6a35277c567d0f1ecab781d45b294c8d0f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""app.py: challenge #3"""
__author__ = "Carlan Calazans"
__copyright__ = "Copyright 2016, Carlan Calazans"
__credits__ = ["Carlan Calazans"]
__license__ = "MIT"
__version__ = "1.0.0"
__maintainer__ = "Carlan Calazans"
__email__ = "carlancalazans at gmail dot com"
__status... | 30.745763 | 67 | 0.680816 |
4ac7cc433a923cdbdf5c893d65925686c46ad1d9 | 1,933 | py | Python | Problems/Depth-First Search/easy/LeafSimilarTrees/leaf_similar_trees.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Depth-First Search/easy/LeafSimilarTrees/leaf_similar_trees.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Depth-First Search/easy/LeafSimilarTrees/leaf_similar_trees.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import Optional, List
# Definition for a binary tree node.
class TreeNode:
def __init__(self, val=0, left=None, right=None):
self.val = val
self.left = left
self.right = right
# Recursive
def leafSimilar(root1: Optional[TreeNode], root2: Optional[TreeNode]) -> bool:
def g... | 33.327586 | 85 | 0.617175 |
e0da9d0425d1fc1acf265e0769d5b8a7e10304ff | 22,719 | py | Python | wz/core/pupils.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/core/pupils.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | wz/core/pupils.py | gradgrind/WZ | 672d93a3c9d7806194d16d6d5b9175e4046bd068 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
core/pupils.py - last updated 2021-06-05
Manage pupil data.
=+LICENCE=================================
Copyright 2021 Michael Towers
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a ... | 36.941463 | 80 | 0.567455 |
e82efdb572887485e7ca25cde57adbb6c67b7a84 | 809 | py | Python | main.py | jmorenov/BBOMO | 572965579928b532b6ae70e4dd468fcc734019da | [
"MIT"
] | null | null | null | main.py | jmorenov/BBOMO | 572965579928b532b6ae70e4dd468fcc734019da | [
"MIT"
] | null | null | null | main.py | jmorenov/BBOMO | 572965579928b532b6ae70e4dd468fcc734019da | [
"MIT"
] | null | null | null | import BBMO
import matplotlib.pyplot as plt
import ZDT6 as test
import numpy
import json
F1 = getattr(test, "F1")
F2 = getattr(test, "F2")
numberOfIsland = 200
numberOfGenerations = 250
dimension = 30
lb = 0
ub = 1
pmutate = 0.01
keep = 2
population, solutions = BBMO.bbmo([F1, F2], numberOfIsland, numberOfGenerations... | 26.096774 | 114 | 0.714462 |
1c1481f90fa2664e34832f63a982f8c766c26ce2 | 3,850 | py | Python | tests/api/test_organization_relation.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 1 | 2021-06-01T14:49:18.000Z | 2021-06-01T14:49:18.000Z | tests/api/test_organization_relation.py | DanielGrams/gsevp | e94034f7b64de76f38754b56455e83092378261f | [
"MIT"
] | 286 | 2020-12-04T14:13:00.000Z | 2022-03-09T19:05:16.000Z | tests/api/test_organization_relation.py | DanielGrams/gsevpt | a92f71694388e227e65ed1b24446246ee688d00e | [
"MIT"
] | null | null | null | def test_read(client, seeder, utils):
user_id, admin_unit_id = seeder.setup_api_access()
(
other_user_id,
other_admin_unit_id,
relation_id,
) = seeder.create_any_admin_unit_relation(admin_unit_id)
url = utils.get_url(
"api_v1_organization_relation",
id=relation_i... | 30.555556 | 82 | 0.699221 |
c7e83097d43142a5f638e05d2c52d437b613e0fb | 1,810 | py | Python | memorpy/BaseProcess.py | Lynext/VordLraxx | fb63c2e3e1608d947981832349d32fffe222f3db | [
"MIT"
] | null | null | null | memorpy/BaseProcess.py | Lynext/VordLraxx | fb63c2e3e1608d947981832349d32fffe222f3db | [
"MIT"
] | 1 | 2020-12-27T21:12:40.000Z | 2022-03-17T00:08:47.000Z | memorpy/BaseProcess.py | Lynext/VordLraxx | fb63c2e3e1608d947981832349d32fffe222f3db | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF8 -*-
import memorpy.utils as utils
import struct
""" Base class for process not linked to any platform """
class ProcessException(Exception):
pass
class BaseProcess(object):
def __init__(self, *args, **kwargs):
""" Create and Open a process object from its pi... | 29.672131 | 78 | 0.570166 |
90a38bfdadc38a18def550d065af5d0d7f004510 | 1,381 | py | Python | oneflow/python/ops/eager_nccl_ops.py | xxg1413/oneflow | f2e3c85a25b8aecfb6c0c0af1737833b1a77e135 | [
"Apache-2.0"
] | 2 | 2021-09-10T00:19:49.000Z | 2021-11-16T11:27:20.000Z | oneflow/python/ops/eager_nccl_ops.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | oneflow/python/ops/eager_nccl_ops.py | duijiudanggecl/oneflow | d2096ae14cf847509394a3b717021e2bd1d72f62 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agr... | 32.880952 | 82 | 0.739319 |
2933a12ca0e64398484ab083e35ac434353dd297 | 785 | py | Python | src/nfz_module/controller/SpeakerController.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/controller/SpeakerController.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | src/nfz_module/controller/SpeakerController.py | hwroitzsch/BikersLifeSaver | 469c738fdd6352c44a3f20689b17fa8ac04ad8a2 | [
"MIT"
] | null | null | null | import wiringpi2 as wiringpi
from model.GPIOPin import GPIOPin
from model.PinMode import PinMode
from model.WarningLevel import WarningLevel
from controller.ActorController import ActorController
__author__ = 'Hans-Werner Roitzsch'
class SpeakerController(ActorController):
def __init__(self):
self.frequenzy = 3... | 29.074074 | 70 | 0.815287 |
29746232d43e7ec19d6eec6b8b017f23b9bbb8f2 | 920 | py | Python | Packs/QRadar/Scripts/QRadarPrintEvents/QRadarPrintEvents.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 799 | 2016-08-02T06:43:14.000Z | 2022-03-31T11:10:11.000Z | Packs/QRadar/Scripts/QRadarPrintEvents/QRadarPrintEvents.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 9,317 | 2016-08-07T19:00:51.000Z | 2022-03-31T21:56:04.000Z | Packs/QRadar/Scripts/QRadarPrintEvents/QRadarPrintEvents.py | diCagri/content | c532c50b213e6dddb8ae6a378d6d09198e08fc9f | [
"MIT"
] | 1,297 | 2016-08-04T13:59:00.000Z | 2022-03-31T23:43:06.000Z | import json
import demistomock as demisto # noqa: F401
from CommonServerPython import * # noqa: F401
def main():
try:
incident = demisto.incident()
events = incident.get('CustomFields', {}).get('events', {})
if not events:
return CommandResults()
if isinstance(even... | 30.666667 | 104 | 0.623913 |
46812d167a80e4e4ab9ec6f1e21608a9cec7b6e1 | 406 | py | Python | Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/16.02-Operator Overloading.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/16.02-Operator Overloading.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | Python/Courses/Python-Tutorials.Telusko/01.Object-Oriented-Programming/16.02-Operator Overloading.py | shihab4t/Books-Code | b637b6b2ad42e11faf87d29047311160fe3b2490 | [
"Unlicense"
] | null | null | null | a = '5'
b = '8'
c = str("hello")
print(c)
# print(a.__add__(b)) # Magic Methods
class Student:
def __init__(self, m1, m2):
self.m1 = m1
self.m2 = m2
def __add__(self, other):
return Student(self.m1 + other.m1, self.m2 + other.m2)
def __str__(self):
return f"%% {self.m1... | 14.5 | 62 | 0.546798 |
31547744e7f46103326cbb46d77b8381d386a5fe | 814 | py | Python | calculation_pkg/simple_calc.py | ChriZpp/ReadTheDocs | e5b0603b7eb45f9f37bb3c36cff937a23f8e87d3 | [
"MIT"
] | null | null | null | calculation_pkg/simple_calc.py | ChriZpp/ReadTheDocs | e5b0603b7eb45f9f37bb3c36cff937a23f8e87d3 | [
"MIT"
] | null | null | null | calculation_pkg/simple_calc.py | ChriZpp/ReadTheDocs | e5b0603b7eb45f9f37bb3c36cff937a23f8e87d3 | [
"MIT"
] | null | null | null | def addition(x, y):
""" This is a simple addition function
:param x: Numerical value
:param y: Numerical value
:return: Addition of the given parameters
"""
return x + y
def subtraction(x, y):
""" This is a simple subtraction function
:param x: Numerical value
:param y: Numerical... | 20.871795 | 51 | 0.642506 |
31e12df6c04b89af13ceea41ec035b3024659660 | 1,578 | py | Python | python/python_backup/PRAC_PYTHON/ab30.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 16 | 2018-11-26T08:39:42.000Z | 2019-05-08T10:09:52.000Z | python/python_backup/PRAC_PYTHON/ab30.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 8 | 2020-05-04T06:29:26.000Z | 2022-02-12T05:33:16.000Z | python/python_backup/PRAC_PYTHON/ab30.py | SayanGhoshBDA/code-backup | 8b6135facc0e598e9686b2e8eb2d69dd68198b80 | [
"MIT"
] | 5 | 2020-02-11T16:02:21.000Z | 2021-02-05T07:48:30.000Z | #2darray input
# sum of row major and column major order using square matrix
#define row and column
r=input("Give row:");
#c=input("Give column:");
n=r
m=r
# define matrix filled with 0
a=[[0 for i in range(r)] for j in range(r)]
#input into matrix
for i in range(0,r,1):
for j in range(0,r,1):
... | 20.763158 | 62 | 0.521546 |
c33f1cd9e7c017a733579f1a4f550617c8f5c0bf | 1,410 | py | Python | src/assets/util/init.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | 1 | 2022-03-28T17:23:03.000Z | 2022-03-28T17:23:03.000Z | src/assets/util/init.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | null | null | null | src/assets/util/init.py | TU-Blueberry/bluestberry | fbde8dbcd730fe5c4e69ba15a1208a5c0903aa7d | [
"MIT"
] | null | null | null | import traceback
import pyodide
import pyodide_js
import micropip
import js
import sys
# Used to run code via the PyodideService
editor_input = ""
# plotly_output = "test"
IMPORT_PACKAGE_MAPPING = {
'skimage': 'scikit-image',
'sklearn': 'scikit-learn'
}
already_loaded = {'os', 'js'}
def _raise(ex):
raise ex
as... | 23.898305 | 109 | 0.680142 |
829e0ae734574d9005393411c0506aa45fba55a0 | 444 | py | Python | rateable/migrations/0002_alter_rateable_unique_together.py | TheKiddos/StaRat | 33807d73276563f636b430e1bbfcb65b645869f7 | [
"MIT"
] | 1 | 2021-05-18T16:33:10.000Z | 2021-05-18T16:33:10.000Z | rateable/migrations/0002_alter_rateable_unique_together.py | TheKiddos/StaRat | 33807d73276563f636b430e1bbfcb65b645869f7 | [
"MIT"
] | 3 | 2021-05-18T16:02:32.000Z | 2021-05-21T15:20:12.000Z | rateable/migrations/0002_alter_rateable_unique_together.py | TheKiddos/StaRat | 33807d73276563f636b430e1bbfcb65b645869f7 | [
"MIT"
] | 1 | 2021-09-12T22:56:09.000Z | 2021-09-12T22:56:09.000Z | # Generated by Django 3.2.3 on 2021-05-21 15:19
from django.conf import settings
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('rateable', '0001_initial'),
]
operations = [
mig... | 22.2 | 66 | 0.637387 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.