section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
version-checks
httpheader
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import requests from ..exceptions import CannotCheckOffline, ConfigurationInvalid, NetworkError logger = logg...
network
knownnodes
""" Manipulations with knownNodes dictionary. """ # TODO: knownnodes object maybe? # pylint: disable=global-statement import json import logging import os import pickle # nosec B403 import threading import time try: from collections.abc import Iterable except ImportError: from collections import Iterable im...
blocks
qa_message_debug
#!/usr/bin/env python # # Copyright 2021 Malte Lenhart # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import time import pmt from gnuradio import blocks, gr, gr_unittest # this test tests message strobe and message debug blocks against each other # similar tests contained in mes...
templatetags
interaction
""" template filters for status interaction buttons """ from bookwyrm import models from bookwyrm.utils.cache import get_or_set from django import template register = template.Library() @register.filter(name="liked") def get_user_liked(user, status): """did the given user fav a status?""" return get_or_set( ...
commands
manage
# # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. #...
transports
xhrstreaming
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.transports.xhrstreaming ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Xhr-Streaming transport implementation """ from octoprint.vendor.sockjs.tornado.transports import streamingbase from...
fitWarpTime
graph
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa 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 ...
saveddata
ssocharacter
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, ...
engines
rumble
# SPDX-License-Identifier: AGPL-3.0-or-later """ Rumble (Videos) """ from datetime import datetime from urllib.parse import urlencode from lxml import html # about from searx.utils import extract_text about = { "website": "https://rumble.com/", "wikidata_id": "Q104765127", "official_api_documentation": ...
extractor
skyit
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_parse_qs, compat_str, compat_urllib_parse_urlparse from ..utils import dict_get, int_or_none, parse_duration, unified_timestamp from .common import InfoExtractor class SkyItPlayerIE(InfoExtractor): IE_NAME = "player.sky.it" _...
actions
actionspropertypages
import math from gaphor import UML from gaphor.core import transactional from gaphor.diagram.propertypages import ( LabelValue, PropertyPageBase, PropertyPages, handler_blocking, new_resource_builder, unsubscribe_all_on_destroy, ) from gaphor.UML.actions.activitynodes import DecisionNodeItem, F...
api
browse
# This file is part of Supysonic. # Supysonic is a Python implementation of the Subsonic server API. # # Copyright (C) 2013-2022 Alban 'spl0k' Féron # # Distributed under terms of the GNU AGPLv3 license. import re import string from flask import current_app, request from peewee import fn from ..db import Album, Arti...
extractors
media
__package__ = "archivebox.extractors" from pathlib import Path from typing import Optional from ..config import ( CHECK_SSL_VALIDITY, MEDIA_TIMEOUT, SAVE_MEDIA, YOUTUBEDL_ARGS, YOUTUBEDL_BINARY, YOUTUBEDL_VERSION, ) from ..index.schema import ArchiveError, ArchiveOutput, ArchiveResult, Link fr...
migrations
0073_index_files_runsql
"""MySQL specific indexes for Files.""" from django.db import migrations def create_indexes(apps, schema_editor): if schema_editor.connection.vendor != "mysql": return with schema_editor.connection.cursor() as cursor: cursor.execute( "CREATE INDEX Files_transfer_lvrgv3pn_idx ON Fi...
utils
diskspeed
#!/usr/bin/python3 """ Measure writing speed of disk specified (or working directory if not specified)""" import logging import os import sys import time _DUMP_DATA_SIZE = 10 * 1024 * 1024 def diskspeedmeasure(dirname: str) -> float: """Returns writing speed to my_dirname in MB/s method: keep writing a fil...
downloaders
TusfilesNet
# -*- coding: utf-8 -*- from ..base.xfs_downloader import XFSDownloader class TusfilesNet(XFSDownloader): __name__ = "TusfilesNet" __type__ = "downloader" __version__ = "0.20" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?tusfiles\.(?:net|com)/\w{12}" __config__ = [ ("ena...
plugins
sprites_disabled
import os import pipes import shutil import subprocess import sys """ This plugin uses glue to sprite images: http://glue.readthedocs.org/en/latest/quickstart.html Install: (Only if you want to sprite jpg too) brew install libjpeg sudo easy_install pip sudo pip uninstall pil sudo pip install pil sudo pip install gl...
PyObjCTest
test_nsjavasetup
import os from Foundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSJavaSetup(TestCase): @max_os_level("10.5") def testConstants(self): self.assertIsInstance(NSJavaClasses, unicode) self.assertIsInstance(NSJavaRoot, unicod...
descriptors
evaluated
# Copyright 2016 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # class Evaluated(object): def __init__(self, expected_type, default, name=None): self.expected_type = expected_type self.default = default self.name = name or "e...
src
testmode_init
import time import uuid import helper_inbox import helper_sql # from .tests.samples import sample_inbox_msg_ids, sample_deterministic_addr4 sample_deterministic_addr4 = "BM-2cWzSnwjJ7yRP3nLEWUV5LisTZyREWSzUK" sample_inbox_msg_ids = [ "27e644765a3e4b2e973ee7ccf958ea20", "51fc5531-3989-4d69-bbb5-68d64b756f5b", ...
friture
friture_rc
# -*- coding: utf-8 -*- # Resource object code # # Created: sam. févr. 14 20:44:06 2015 # by: The Resource Compiler for PyQt (Qt v5.4.0) # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore qt_resource_data = b"\ \x00\x02\x3f\xc8\ \x89\ \x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x...
fta
undevelopedevent
"""Undeveloped Event item definition.""" from gaphas.geometry import Rectangle from gaphor.core.modeling import DrawContext from gaphor.diagram.presentation import ( Classified, ElementPresentation, from_package_str, ) from gaphor.diagram.shapes import Box, IconBox, Text, draw_diamond from gaphor.diagram.s...
beetsplug
subsonicplaylist
# This file is part of beets. # Copyright 2019, Joris Jensen # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, mod...
app
config
# -*- coding: utf-8 -*- from pyload.core.utils.misc import random_string def get_default_config(develop): return DevelopmentConfig if develop else ProductionConfig class BaseConfig: DEBUG = False TESTING = False SESSION_COOKIE_SAMESITE = "Lax" #: Extensions # BCRYPT_LOG_ROUNDS = 13 # DE...
extractor
senateisvp
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_parse_qs, compat_urlparse from ..utils import ExtractorError, unsmuggle_url from .common import InfoExtractor class SenateISVPIE(InfoExtractor): _COMM_MAP = [ ["ag", "76440", "http://ag-f.akamaihd.net"], ...
util
thread
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2007 Lukáš Lalinský # Copyright (C) 2008 Gary van der Merwe # Copyright (C) 2011-2013 Michael Wiencek # Copyright (C) 2013, 2018, 2020-2022 Laurent Monin # Copyright (C) 2016 Sambhav Kothari # Copyright (C) 2017 Sophist-UK...
beetsplug
badfiles
# This file is part of beets. # Copyright 2016, François-Xavier Thomas. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use...
reader
index
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import absolute_import, division, print_function, unicode_literals __license__ = "GPL v3" __copyright__ = "2012, Kovid Goyal <kovid@kovidgoyal.net>" __docformat__ = "restructuredtext en" import struct from collections import Orde...
extractor
dvtv
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ( ExtractorError, determine_ext, int_or_none, js_to_json, mimetype2ext, parse_iso8601, try_get, unescapeHTML, ) from .common import InfoExtractor class DVTVIE(InfoExtractor): IE_NAME = "dvtv" ...
modeling
coremodel
# This file is generated by coder.py. DO NOT EDIT! # ruff: noqa: F401, E402, F811 # fmt: off from __future__ import annotations # 4: override Diagram from gaphor.core.modeling.diagram import Diagram # 1: override Element from gaphor.core.modeling.element import Element # 7: override Presentation from gaphor.core.mode...
Arch
importIFClegacy
# *************************************************************************** # * Copyright (c) 2011 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
formatters
xml
from typing import TYPE_CHECKING, Optional from ...encoding import UTF8 from ...plugins import FormatterPlugin if TYPE_CHECKING: from xml.dom.minidom import Document XML_DECLARATION_OPEN = "<?xml" XML_DECLARATION_CLOSE = "?>" def parse_xml(data: str) -> "Document": """Parse given XML `data` string into an...
WebServicesTool
WSTConnectionWindowControllerClass
""" Instances of WSTConnectionWindowController are the controlling object for the document windows for the Web Services Tool application. Implements a standard toolbar. """ # Note about multi-threading. # Although WST does its network stuff in a background thread, with Python 2.2 # there are still moments where the a...
clientScripts
is_maildir_aip
#!/usr/bin/env python # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, ei...
extractor
ceskatelevize
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_urllib_parse_unquote, compat_urllib_parse_urlparse from ..utils import ( USER_AGENTS, ExtractorError, float_or_none, sanitized_Request, str_or_none, traverse_obj, urlencode_postdata, ) from .commo...
vcs
menu
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # This program 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 2 ...
contrib
dump_comments
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2020 Lucas Cimon. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including ...
books
series
""" books belonging to the same series """ from sys import float_info from bookwyrm import models from bookwyrm.views.helpers import is_api_request from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.views import View def sort_by_series(book): """sort ...
CryptMessage
CryptMessage
import base64 import hashlib import struct from Crypt import Crypt from lib import sslcrypto curve = sslcrypto.ecc.get_curve("secp256k1") def eciesEncrypt(data, pubkey, ciphername="aes-256-cbc"): ciphertext, key_e = curve.encrypt( data, base64.b64decode(pubkey), algo=ciphername, ...
Show
SceneDetail
# /*************************************************************************** # * Copyright (c) 2019 Victor Titov (DeepSOIC) <vv.titov@gmail.com> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
gui
filehandling
# -*- coding: utf-8 -*- # This file is part of MyPaint. # Copyright (C) 2009-2019 by the MyPaint Development Team # Copyright (C) 2007-2014 by Martin Renold <martinxyz@gmx.ch> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by ...
engines
loc
# SPDX-License-Identifier: AGPL-3.0-or-later """ Library of Congress : images from Prints and Photographs Online Catalog """ from json import loads from urllib.parse import urlencode about = { "website": "https://www.loc.gov/pictures/", "wikidata_id": "Q131454", "official_api_documentation": "https://w...
meshes
mesh_electricforce_elmer_nongui6_tetra10
def create_nodes(femmesh): # nodes femmesh.addNode(0.0, 0.0, 0.0, 1) femmesh.addNode(5000.0, 0.0, 0.0, 2) femmesh.addNode(5000.0, 0.0, 1000.0, 3) femmesh.addNode(1500.0, 0.0, 1000.0, 4) femmesh.addNode(1500.0, 0.0, 2500.0, 5) femmesh.addNode(5000.0, 0.0, 2500.0, 6) femmesh.addNode(5000.0...
extractors
ixigua
#!/usr/bin/env python import base64 import binascii import ctypes import random import string from json import loads from urllib import request from ..common import * __all__ = ["ixigua_download", "ixigua_download_playlist_by_url"] headers = { "user-agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.3...
plugins
welt
""" $description German news and documentaries TV channel, owned by Axel Springer SE. $url welt.de $type live, vod $region Germany """ import re from urllib.parse import quote from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls import HLSStream @...
models
hook
import json from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from django.db.models.signals import post_delete, post_save from django.dispatch.dispatcher import receiver from posthog.models.signals import mutable_receiver from posthog.models.utils import g...
gcs
engine
# coding:utf-8 import logging import threading import apiclient.discovery import apiclient.errors import httplib2 from cactus.deployment.engine import BaseDeploymentEngine from cactus.deployment.gcs.auth import GCSCredentialsManager from cactus.deployment.gcs.file import GCSFile from cactus.exceptions import InvalidCr...
friture
histplot
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009 Timoth←e Lecomte # This file is part of Friture. # # Friture is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # Friture is distri...
xinebe
player
# Copyright 2006-2007 Lukas Lalinsky # 2021 Nick Boultbee # # This program 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 2 of the License, or # (at your option) any later versio...
extractor
facebook
# coding: utf-8 from __future__ import unicode_literals import json import re import socket from ..compat import ( compat_etree_fromstring, compat_http_client, compat_str, compat_urllib_error, compat_urllib_parse_unquote, compat_urllib_parse_unquote_plus, ) from ..utils import ( ExtractorE...
commands
create_library
import argparse import os from pathlib import Path from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand from django.db.utils import IntegrityError from photonix.photos.models import Library, LibraryPath, LibraryUser from photonix.photos.utils.db import record_photo from ph...
Gui
Array
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2015 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it a...
extractors
w56
#!/usr/bin/env python __all__ = ["w56_download", "w56_download_by_id"] import json from ..common import * from .sohu import sohu_download def w56_download_by_id(id, title=None, output_dir=".", merge=True, info_only=False): content = json.loads(get_html("http://vxml.56.com/json/%s/?src=site" % id)) info = c...
qltk
about
# Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna # # This program 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 2 of the License, or # (at your option) any later version. impor...
auth
cookie
# The contents of this file are subject to the Common Public Attribution # License Version 1.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://code.reddit.com/LICENSE. The License is based on the Mozilla Public # License Version 1.1, ...
tasks
distribute_alert
from apps.alerts.constants import TASK_DELAY_SECONDS from apps.alerts.signals import ( alert_create_signal, alert_group_escalation_snapshot_built, ) from common.custom_celery_tasks import shared_dedicated_queue_retry_task from django.conf import settings from .task_logger import task_logger @shared_dedicated...
extractor
soundcloud
# coding: utf-8 from __future__ import unicode_literals import itertools import re from ..compat import compat_HTTPError, compat_kwargs, compat_str, compat_urlparse from ..utils import ( KNOWN_EXTENSIONS, ExtractorError, HEADRequest, error_to_compat_str, float_or_none, int_or_none, mimetyp...
server
db
""" Database related functionality. This module implements an `auto_close_old_connections` decorator/context manager. In order to be able to re-use database connections in the Django ORM outside of the typical request/response cycle, we have to wrap database usage in order to make sure anything older than CONN_MAX_AGE...
config
webcam
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License" from enum import Enum from typing import Optional from octoprint.schema import BaseModel from octoprint.vendor.with_attrs_docs...
ui
palette
from PySide2.QtCore import Property, QObject, Qt, Signal, Slot from PySide2.QtGui import QColor, QPalette from PySide2.QtWidgets import QApplication class PaletteManager(QObject): """ Manages QApplication's palette and provides a toggle between a dark and a light theme. """ def __init__(self, qmlEngi...
plugins
albavision
""" $description TV network with multiple live TV channels broadcasting across various Latin American countries. $url antena7.com.do $url atv.pe $url c9n.com.py $url canal10.com.ni $url canal12.com.sv $url chapintv.com $url elnueve.com.ar $url redbolivision.tv.bo $url repretel.com $url rts.com.ec $url snt.com.py $url t...
extractor
bigo
# coding: utf-8 from __future__ import unicode_literals from ..utils import ExtractorError, urlencode_postdata from .common import InfoExtractor class BigoIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?bigo\.tv/(?:[a-z]{2,}/)?(?P<id>[^/]+)" _TESTS = [ { "url": "https://www.bigo.tv/...
payout
payout_component
from tribler.core import notifications from tribler.core.components.bandwidth_accounting.bandwidth_accounting_component import ( BandwidthAccountingComponent, ) from tribler.core.components.component import Component from tribler.core.components.ipv8.ipv8_component import Ipv8Component from tribler.core.components....
core
Video
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
release-db
make
#!/usr/bin/env python3 # Copyright 2017 Christoph Reiter # # This program 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 2 of the License, or # (at your option) any later version. import os im...
nyaa
db_create
#!/usr/bin/env python3 import sqlalchemy from nyaa import create_app, models from nyaa.extensions import db app = create_app("config") NYAA_CATEGORIES = [ ( "Anime", ["Anime Music Video", "English-translated", "Non-English-translated", "Raw"], ), ("Audio", ["Lossless", "Lossy"]), ("Lit...
builtinContextMenus
envEffectAdd
import re from collections import OrderedDict from itertools import chain import gui.fitCommands as cmd import gui.mainFrame # noinspection PyPackageRequirements import wx from gui.contextMenu import ContextMenuUnconditional from service.market import Market _t = wx.GetTranslation class Group: def __init__(sel...
mock
kivy_main
# pylint: disable=unused-import, wrong-import-position, ungrouped-imports # flake8: noqa:E401, E402 """Mock kivy app with mock threads.""" import os from kivy.config import Config from pybitmessage import state from pybitmessage.mock import multiqueue if os.environ.get("INSTALL_TESTS", False): Config.set("graph...
lib
common_metrics
import time from contextlib import contextmanager from prometheus_client import Counter # We need to balance reasonably accurate tracking with high cardinality here, as # this is used with script_name labels and there are already over 100 scripts. TASK_DURATION_BUCKETS = ( 2.0, 5.0, 10.0, 20.0, 30...
View
Admin
#!/usr/bin/env python # -*- coding:utf-8 -*- # A GAE web application to aggregate rss and send it to your kindle. # Visit https://github.com/cdhigh/KindleEar for the latest version # Contributors: # rexdf <https://github.com/rexdf> import datetime import gettext import hashlib import web from apps.BaseHandler import ...
design
api_object
# Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # class ApiObject(object): """ Filter count variable if the filter design tool has to return multiple filter parameters in future e.g Cascaded Filters """ def __i...
po
build_babel
import subprocess from pathlib import Path po_path: Path = Path(__file__).resolve().parent def run_babel(command: str, input: Path, output_file: Path, locale: str): subprocess.run( [ "pybabel", command, f"--input={input}", f"--output-file={output_file}", ...
settings
test
# flake8: noqa # This file is part of Archivematica. # # Copyright 2010-2018 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either ve...
lib
amqp
# The contents of this file are subject to the Common Public Attribution # License Version 1.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://code.reddit.com/LICENSE. The License is based on the Mozilla Public # License Version 1.1, ...
streamlink
exceptions
class StreamlinkError(Exception): """ Any error caused by Streamlink will be caught with this exception. """ # TODO: don't use PluginError for failed HTTP requests or validation schema failures class PluginError(StreamlinkError): """ Plugin related error. """ class FatalPluginError(PluginErr...
user-management
middlewares
import logging import requests from common.api_helpers.utils import create_engine_url from django.http import HttpResponse, JsonResponse from django.utils.deprecation import MiddlewareMixin from rest_framework import status from .exceptions import OrganizationDeletedException, OrganizationMovedException logger = log...
extractor
cbc
# coding: utf-8 from __future__ import unicode_literals import hashlib import json import re from xml.sax.saxutils import escape from ..compat import compat_HTTPError, compat_str from ..utils import ( ExtractorError, find_xpath_attr, int_or_none, js_to_json, orderedSet, parse_age_limit, pa...
stylesheets
stylesheetlist
"""StyleSheetList implements DOM Level 2 Style Sheets StyleSheetList.""" __all__ = ["StyleSheetList"] __docformat__ = "restructuredtext" __version__ = "$Id$" class StyleSheetList(list): """Interface `StyleSheetList` (introduced in DOM Level 2) The `StyleSheetList` interface provides the abstraction of an ord...
session-recordings
realtime_snapshots
import json from time import sleep from typing import Dict, List, Optional import structlog from posthog import settings from posthog.redis import get_client from prometheus_client import Counter from sentry_sdk import capture_exception logger = structlog.get_logger(__name__) PUBLISHED_REALTIME_SUBSCRIPTIONS_COUNTER...
femexamples
ccx_cantilever_ele_seg3
# *************************************************************************** # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
OpenSCAD
OpenSCAD2Dgeom
# *************************************************************************** # * Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
lib
normalized_hot
# The contents of this file are subject to the Common Public Attribution # License Version 1.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://code.reddit.com/LICENSE. The License is based on the Mozilla Public # License Version 1.1, ...
draftobjects
layer
# *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * Th...
widgets
colorbutton
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # This program 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 2 ...
tags-to-knowledge
migration
import logging from typing import Iterable, List from ipv8.keyvault.crypto import default_eccrypto from ipv8.keyvault.private.libnaclkey import LibNaCLSK from ipv8.messaging.serialization import Serializer from pony.orm import db_session, select from tribler.core.components.knowledge.community.knowledge_payload import...
pwidgets
strokectrls
# -*- coding: utf-8 -*- # # Copyright (C) 2015 by Ihor E. Novikov # # This program 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....
extractors
imgur
#!/usr/bin/env python from ..common import * from ..extractor import VideoExtractor from .universal import * class Imgur(VideoExtractor): name = "Imgur" stream_types = [ {"id": "original"}, {"id": "thumbnail"}, ] def prepare(self, **kwargs): if re.search(r"imgur\.com/a/", se...
network
connectionchooser
""" Select which node to connect to """ # pylint: disable=too-many-branches import logging import random import knownnodes import protocol import state from bmconfigparser import config from queues import portCheckerQueue, queue logger = logging.getLogger("default") def getDiscoveredPeer(): """Get a peer from t...
downloaders
RapideoPl
# -*- coding: utf-8 -*- import json from ..base.multi_downloader import MultiDownloader class RapideoPl(MultiDownloader): __name__ = "RapideoPl" __type__ = "downloader" __version__ = "0.14" __status__ = "testing" __pattern__ = r"^unmatchable$" __config__ = [ ("enabled", "bool", "Acti...
aliceVision
MeshMasking
__version__ = "1.1" from meshroom.core import desc class MeshMasking(desc.AVCommandLineNode): commandLine = "aliceVision_meshMasking {allParams}" category = "Mesh Post-Processing" documentation = """ Decimate triangles based on image masks. """ inputs = [ desc.File( name="input",...
util
preservedtags
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2018, 2020-2021 Laurent Monin # Copyright (C) 2019-2020 Philipp Wolfer # # This program 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 S...
posthog
user_permissions
from functools import cached_property from typing import Any, Dict, List, Optional, cast from uuid import UUID from posthog.constants import AvailableFeature from posthog.models import ( Dashboard, DashboardTile, Insight, Organization, OrganizationMembership, Team, User, ) class UserPermi...
src
DFLibraryFileUploadResponse
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from datetime import datetime from typing import Optional from .BaseModel import BaseModel class DFLibraryFileUploadResponse(BaseModel): """ Model that represents the response received from the Digital Factory aft...
slack
alert_group_slack_service
import logging import typing from apps.slack.client import SlackClient from apps.slack.errors import ( SlackAPIChannelArchivedError, SlackAPIChannelInactiveError, SlackAPIChannelNotFoundError, SlackAPIInvalidAuthError, SlackAPIMessageNotFoundError, SlackAPIRatelimitError, SlackAPITokenError...
octoprint
users
__author__ = "Marc Hannappel <salandora@gmail.com>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms of the AGPLv3 License" # Wrapper to the new access.users location import warnings from octoprint...
extractor
spike
from __future__ import unicode_literals from .mtv import MTVServicesInfoExtractor class BellatorIE(MTVServicesInfoExtractor): _VALID_URL = r"https?://(?:www\.)?bellator\.com/[^/]+/[\da-z]{6}(?:[/?#&]|$)" _TESTS = [ { "url": "http://www.bellator.com/fight/atwr7k/bellator-158-michael-page-v...
downloaders
EuroshareEu
# -*- coding: utf-8 -*- import re from datetime import timedelta from ..base.simple_downloader import SimpleDownloader class EuroshareEu(SimpleDownloader): __name__ = "EuroshareEu" __type__ = "downloader" __version__ = "0.41" __status__ = "testing" __pattern__ = r"http://(?:www\.)?euroshare\.(e...
PyObjCTest
test_cgremoteoperation
from PyObjCTools.TestSupport import * from Quartz.CoreGraphics import * try: long except NameError: long = int class TestCGRemoteOperation(TestCase): def testConstants(self): self.assertEqual(CGEventNoErr, kCGErrorSuccess) self.assertEqual(kCGScreenUpdateOperationRefresh, 0) self...
femobjects
constraint_initialpressure
# *************************************************************************** # * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
httpie
setup
# This is purely the result of trial and error. import sys import httpie from setuptools import find_packages, setup # Note: keep requirements here to ease distributions packaging tests_require = [ "pytest", "pytest-httpbin>=0.0.6", "pytest-lazy-fixture>=0.0.6", "responses", "pytest-mock", "w...