section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
context
printContext
import AppKit from fontTools.pens.basePen import AbstractPen from .baseContext import BaseContext class StringPen(AbstractPen): def __init__(self, seperator=None): self.data = [] if seperator is None: seperator = " " self.seperator = seperator def moveTo(self, pt): ...
Op
Profile
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> * # * Copyright (c) 2020 Schildkroet ...
comictaggerlib
comicvinecacher
"""A python class to manage caching of data from Comic Vine""" # Copyright 2012-2014 Anthony Beville # 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/LICE...
femexamples
boxanalysis_frequency
# *************************************************************************** # * Copyright (c) 2019 Bernd Hahnebach <bernd@bimstatik.org> * # * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com * # * * # * Th...
extractor
tbs
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_parse_qs, compat_urllib_parse_urlparse from ..utils import float_or_none, int_or_none, strip_or_none from .turner import TurnerBaseIE class TBSIE(TurnerBaseIE): _VALID_URL = r"https?://(?:www\.)?(?P<site>tbs|tntdrama)\...
statistics
challenges
from CTFd.api.v1.statistics import statistics_namespace from CTFd.models import Challenges, Solves, db from CTFd.utils.decorators import admins_only from CTFd.utils.modes import get_model from flask_restx import Resource from sqlalchemy import func from sqlalchemy.sql import and_ @statistics_namespace.route("/challen...
lib
pathlib
import fnmatch import functools import io import ntpath import os import posixpath import re import sys import time from collections import Sequence from contextlib import contextmanager from errno import EINVAL, ENOENT from operator import attrgetter from stat import S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISR...
views
escalation_policy
from apps.alerts.models import EscalationPolicy from apps.api.permissions import RBACPermission from apps.api.serializers.escalation_policy import ( EscalationPolicyCreateSerializer, EscalationPolicySerializer, EscalationPolicyUpdateSerializer, ) from apps.auth_token.auth import PluginAuthentication from co...
api
instance_settings
import re from typing import Any, Dict, Optional, Tuple, Union from posthog.cloud_utils import is_cloud from posthog.models.instance_setting import ( get_instance_setting as get_instance_setting_raw, ) from posthog.models.instance_setting import ( set_instance_setting as set_instance_setting_raw, ) from postho...
extractor
commonmistakes
from __future__ import unicode_literals import sys from ..utils import ExtractorError from .common import InfoExtractor class CommonMistakesIE(InfoExtractor): IE_DESC = False # Do not list _VALID_URL = r"""(?x) (?:url|URL)$ """ _TESTS = [ { "url": "url", "on...
imageserver
image_wrapper
# # Quru Image Server # # Document: image_wrapper.py # Date started: 07 Mar 2011 # By: Matt Fozard # Purpose: Wrapper for a returned image and its associated properties # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and...
extractor
tunein
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_urlparse from ..utils import ExtractorError from .common import InfoExtractor class TuneInBaseIE(InfoExtractor): _API_BASE_URL = "http://tunein.com/tuner/tune/" @staticmethod def _extract_urls(webpage): ...
sgui
_main
import os import sys import time from sglib.lib import util from sglib.lib.translate import _ from sglib.log import LOG, setup_logging from sgui import project as project_mod from sgui import sgqt from sgui import shared as glbl_shared from sgui import widgets from sgui.daw import shared as daw_shared from sgui.main i...
data-decoders
tf_example_decoder_test
# Copyright 2017 The TensorFlow 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 applica...
graphs
weight_change
# -*- coding: utf-8 -*- from datetime import datetime, timedelta import plotly.graph_objs as go import plotly.offline as plotly from django.db.models.manager import BaseManager from django.utils.translation import gettext as _ from reports import utils def weight_change( actual_weights: BaseManager, percentile_w...
extractor
threeqsdn
from __future__ import unicode_literals import re from ..compat import compat_HTTPError from ..utils import ( ExtractorError, determine_ext, float_or_none, int_or_none, parse_iso8601, ) from .common import InfoExtractor class ThreeQSDNIE(InfoExtractor): IE_NAME = "3qsdn" IE_DESC = "3Q SD...
draftfunctions
move
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
fec
extended_async_encoder
#!/usr/bin/env python # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import weakref from gnuradio import gr from . import fec_python as fec from .bitflip import read_bitlist class extended_async_encoder(gr.hier_block2): de...
migrations
0001_initial
# -*- coding: utf-8 -*- from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name="UploadedPDF", ...
extractors
kuaishou
#!/usr/bin/env python import json import re import urllib.parse import urllib.request from ..common import ( download_urls, get_content, playlist_not_supported, print_info, url_size, ) from ..util import log __all__ = ["kuaishou_download_by_url"] def kuaishou_download_by_url(url, info_only=Fals...
neubot
http_clnt
#!/usr/bin/env python # # Copyright (c) 2012 # Nexa Center for Internet & Society, Politecnico di Torino (DAUIN) # and Simone Basso <bassosimone@gmail.com> # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: you can redistribute it and/or modify # it under the terms of the GN...
auth
registration
# -*- coding: utf-8 -*- """ flaskbb.core.auth.services ~~~~~~~~~~~~~~~~~~~~~~~~~~ This modules provides services used in authentication and authorization across FlaskBB. :copyright: (c) 2014-2018 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ from abc import ABC, abstrac...
gdist
tests
# Copyright 2014-2016 Christoph Reiter # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, #...
gui
blendmodehandler
# This file is part of MyPaint. # Copyright (C) 2019 by The MyPaint Team # # 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...
cactus
logger
import json import logging import os import types import six class JsonFormatter(logging.Formatter): def format(self, record): data = { "level": record.levelno, "levelName": record.levelname, "msg": logging.Formatter.format(self, record), } if type(rec...
dateutil
rrule
# -*- coding: utf-8 -*- """ The rrule module offers a small, complete, and very fast, implementation of the recurrence rules documented in the `iCalendar RFC <http://www.ietf.org/rfc/rfc2445.txt>`_, including support for caching of results. """ import calendar import datetime import itertools import sys try: from ...
filter
freq_xlating_fft_filter
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 Sylvain Munaut <tnt@246tNt.com> # # SPDX-License-Identifier: GPL-3.0-or-later # import cmath import math from gnuradio import gr from gnuradio.blocks import rotator_cc from .filter_python import fft_filter_ccc __all__ = ["freq_xlating_fft_filter_ccc"]...
query
conditional
# Copyright 2016 Ryan Dellenbaugh # 2020 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 version. from q...
plugins
ltv_lsm_lv
""" $description Live TV channels from LTV, a Latvian public, state-owned broadcaster. $url ltv.lsm.lv $type live $region Latvia """ import logging import re from urllib.parse import urlsplit, urlunsplit from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.str...
utils
urlmatch
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """A Chromium-like URL matching pattern. See: https://developer.chrome.com/apps/match_patterns https://cs.chromium.org/chromium/src/extensions/common/url_pattern.cc https://cs.chromium.org/chro...
narrowband
benchmark_add_channel
#!/usr/bin/env python # # Copyright 2010,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import math import random import sys from optparse import OptionParser from gnuradio import blocks, channels, eng_notation, gr from gnuradio.eng_option imp...
resources
acc_keys
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2018 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 ver...
auxiliary
stats_server
# # Quru Image Server # # Document: stats_server.py # Date started: 31 Aug 2011 # By: Matt Fozard # Purpose: Stats recording server # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
builtinItemStatsViews
itemTraits
# noinspection PyPackageRequirements import wx # noinspection PyPackageRequirements import wx.html _t = wx.GetTranslation class ItemTraits(wx.Panel): def __init__(self, parent, stuff, item): wx.Panel.__init__(self, parent) mainSizer = wx.BoxSizer(wx.VERTICAL) self.SetSizer(mainSizer) ...
utilities
tracker_utils
import re from http.client import HTTP_PORT, HTTPS_PORT from json import dumps from urllib.parse import ParseResult, parse_qsl, unquote, urlencode, urlparse UDP = "udp" HTTP = "http" HTTPS = "https" SUPPORTED_SCHEMES = {UDP, HTTP, HTTPS} DEFAULT_PORTS = {HTTP: HTTP_PORT, HTTPS: HTTPS_PORT} class MalformedTrackerURLE...
unihandecode
unidecoder
# -*- coding: utf-8 -*- __license__ = "GPL 3" __copyright__ = "2010, Hiroshi Miura <miurahr@linux.com>" __docformat__ = "restructuredtext en" """ Decode unicode text to an ASCII representation of the text in Chinese. Transliterate unicode characters to ASCII based on chinese pronounce. Derived from John Schember's u...
animosd
config
# Copyright (C) 2012-13 Nick Boultbee, Thomas Vogt # Copyright (C) 2008 Andreas Bombe # Copyright (C) 2005 Michael Urman # Based on osd.py (C) 2005 Ton van den Heuvel, Joe Wreshnig # (C) 2004 Gustavo J. A. M. Carneiro # # This program is free software; you can redistribute it and/or modify # it under t...
PyObjCTest
test_usekvo
import objc from PyObjCTools.TestSupport import * NSObject = objc.lookUpClass("NSObject") class TestUseKVOObserver(NSObject): def init(self): self = super(TestUseKVOObserver, self).init() if self is None: return None self.observations = [] return self def observe...
comicapi
genericmetadata
"""A class for internal metadata storage The goal of this class is to handle ALL the data that might come from various tagging schemes and databases, such as ComicVine or GCD. This makes conversion possible, however lossy it might be """ # Copyright 2012-2014 Anthony Beville # Licensed under the Apache License, Ve...
RemotePyInterpreter
ConsoleReactor
__all__ = ['ConsoleReactor'] import sys from Foundation import * from netrepr import NetRepr, RemoteObjectPool, RemoteObjectReference class ConsoleReactor(NSObject): def init(self): self = super(ConsoleReactor, self).init() self.pool = None self.netReprCenter = None self.connect...
RemovableDriveOutputDevice
RemovableDriveOutputDevice
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os import os.path from UM.Application import Application from UM.FileHandler.FileWriter import ( FileWriter, ) # To check against the write modes (text vs. binary). from UM.FileHandler.WriteFileJob import Write...
migrations
0001_initial
import main.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name="ArchivistsToolkitConfig", fields=[ ( "id", main.models.UUID...
docs
conf
# -*- coding: utf-8 -*- """ Configuration file for the Sphinx documentation builder. For a full list of options see the documentation: http://www.sphinx-doc.org/en/master/config """ import os import sys sys.path.insert(0, os.path.abspath("../src")) from importlib import import_module import version # noqa:E402 #...
plugins
streann
""" $description Global live-streaming and video on-demand hosting platform. $url ott.streann.com $url centroecuador.ec $url columnaestilos.com $url evtv.online/noticias-de-venezuela $url telecuracao.com $type live, vod $metadata title """ import base64 import logging import random import re import time from urllib.pa...
extractor
nuvid
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import int_or_none, parse_duration, try_get, url_or_none from .common import InfoExtractor class NuvidIE(InfoExtractor): _VALID_URL = r"https?://(?:www|m)\.nuvid\.com/video/(?P<id>[0-9]+)" _TESTS =...
extractor
pyvideo
from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import int_or_none from .common import InfoExtractor class PyvideoIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?pyvideo\.org/(?P<category>[^/]+)/(?P<id>[^/?#&.]+)" ) _TESTS = [ { ...
PyObjCTest
test_nstextview
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSTextViewHelper(NSObject): def textView_URLForContentsOfTextAttachment_atIndex_(self, a, b, c): pass def textView_clickedOnLink_atIndex_(self, tv, a, b): return 1 d...
ports
_virtual_connections
# Copyright 2008-2016 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # from itertools import chain from .. import blocks class LoopError(Exception): pass def upstream_ports(port): if port.is_sink: return _sources_from_virtual_sink_por...
dbcore
query
# This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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, ...
digital
qa_decision_feedback_equalizer
#!/usr/bin/env python # # Copyright 2020 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import random import numpy from gnuradio import blocks, channels, digital, gr, gr_unittest class qa_decision_feedback_equalizer(gr_unittest.TestCase): def ...
MergerSite
MergerSitePlugin
import copy import os import re import time from Debug import Debug from Plugin import PluginManager from Translate import Translate from util import RateLimit, helper from util.Flag import flag try: import OptionalManager.UiWebsocketPlugin # To make optioanlFileInfo merger sites compatible except Exception: ...
draftguitools
gui_trimex
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * (c) 2009, 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
extractor
youporn
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ( extract_attributes, int_or_none, str_to_int, unified_strdate, url_or_none, ) from .common import InfoExtractor class YouPornIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?youporn\.com/(?:watch|embed...
gui
dialogs
# This file is part of MyPaint. # -*- coding: utf-8 -*- # Copyright (C) 2010-2018 by the MyPaint Development Team. # Copyright (C) 2009-2013 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...
management
models
# -*- coding: utf-8 -*- """ flaskbb.management.models ~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains all management related models. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import logging from flaskbb.extensions import cache, db from flaskbb.utils...
PyObjCTest
test_descriptors
import sys import objc from PyObjCTools.TestSupport import * try: from Foundation import NSRange _C_NSRange = NSRange.__typestr__ except ImportError: if sys.maxsize > 2**32: _C_NSRange = b"{_NSRange=QQ}" else: _C_NSRange = b"{_NSRange=II}" NSObject = objc.lookUpClass("NSObject") ...
builtinShipBrowser
sfBrowserItem
# noinspection PyPackageRequirements import gui.mainFrame import gui.utils.draw as drawUtils import wx SB_ITEM_NORMAL = 0 SB_ITEM_SELECTED = 1 SB_ITEM_HIGHLIGHTED = 2 SB_ITEM_DISABLED = 4 BTN_NORMAL = 1 BTN_PRESSED = 2 BTN_HOVER = 4 BTN_DISABLED = 8 class PFBaseButton: def __init__( self, normal...
publishers
views
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # This program 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 version 2 # of the...
drawBot
misc
import functools import io import os import subprocess import sys import AppKit from fontTools.misc.transform import Transform # ========== # = errors = # ========== class DrawBotError(TypeError): pass # ================= # = default tools = # ================= def getDefault(key, defaultValue=None): ""...
src
helper_random
"""Convenience functions for random operations. Not suitable for security / cryptography operations.""" import os import random try: from pyelliptic.openssl import OpenSSL except ImportError: from .pyelliptic.openssl import OpenSSL NoneType = type(None) def seed(): """Initialize random number generator...
cherrypy
_cpthreadinglocal
# This is a backport of Python-2.4's threading.local() implementation """Thread-local objects (Note that this module provides a Python version of thread threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the local class from threa...
ipconsole
ipython_view
""" Provides IPython console widget. @author: Eitan Isaacson @organization: IBM Corporation @copyright: Copyright (c) 2007 IBM Corporation @license: BSD All rights reserved. This program and the accompanying materials are made available under the terms of the BSD which accompanies this distribution, and is available ...
util
commandline
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import queue import re import time import warnings from typing impo...
bleachbit
RecognizeCleanerML
# vim: ts=4:sw=4:expandtab # BleachBit # Copyright (C) 2008-2023 Andrew Ziem # https://www.bleachbit.org # # 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 # ...
QT
PantallaAlbumes
from Code.QT import Colocacion, Controles, Iconos, QTUtil2, QTVarios from PyQt4 import QtGui class WAlbum(QTVarios.WDialogo): def __init__(self, wowner, procesador, album): self.album = album titulo = album.nombre QTVarios.WDialogo.__init__(self, wowner, titulo, album.icono(), "albumes") ...
utils
getperformance
import locale import logging import platform import subprocess import time from .pystone import pystones def getcpu(): # find the CPU name (which needs a different method per OS), and return it # If none found, return platform.platform(). cputype = None try: if platform.system() == "Windows...
migrations
0308_add_indirect_person_override_constraints
# Generated by Django 3.2.16 on 2023-03-01 17:03 import django.contrib.postgres.constraints import django.db.models.deletion import django.db.models.expressions from django.db import migrations, models # The previous migration attempted to add a constraint to the personoverride # table. We want to remove that constra...
PyObjCTest
test_copying
import objc from PyObjCTools.TestSupport import * NSObject = objc.lookUpClass("NSObject") NSAutoreleasePool = objc.lookUpClass("NSAutoreleasePool") from PyObjCTest.copying import OC_CopyBase, OC_CopyHelper def funcattr(**kwds): def annotate(func): for k, v in kwds.items(): setattr(func, k, v)...
Code
OpeningLines
import collections import datetime import os import random import shutil import sqlite3 import LCEngine4 as LCEngine from Code import ( AperturasStd, ControlPosicion, DBgames, EnginesBunch, Partida, PGNreader, Util, ) from Code.QT import QTUtil2, QTVarios class ListaOpenings: def __in...
Code
GestorFideFics
import collections import copy import datetime import random import LCEngine4 as LCEngine from Code import Apertura, Gestor, Partida, Util from Code.Constantes import * from Code.QT import PantallaJuicio, QTUtil2 from Code.SQL import Base class GestorFideFics(Gestor.Gestor): def selecciona(self, tipoJuego): ...
extractors
qingting
import json import re from ..common import get_content, playlist_not_supported, url_size from ..extractors import VideoExtractor from ..util import log __all__ = ["qingting_download_by_url"] class Qingting(VideoExtractor): # every resource is described by its channel id and program id # so vid is tuple (cha...
install
update
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2013 - 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 ...
sabnzbd
articlecache
#!/usr/bin/python3 -OO # Copyright 2007-2023 The SABnzbd-Team (sabnzbd.org) # # 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 ver...
src
launch
#!/usr/bin/env python3 """ @file @brief This file is used to launch OpenShot @author Jonathan Thomas <jonathan@openshot.org> @author Noah Figg <eggmunkee@hotmail.com> @mainpage OpenShot Video Editor 2.0 Welcome to the OpenShot Video Editor 2.0 PyQt5 documentation. OpenShot was developed to make high-quality v...
draftgeoutils
linear_algebra
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * * # * Th...
PSConverterTool
PSConverterTool
import sys import objc from CoreFoundation import * from Quartz import * DEBUG = 0 class MyConverterData(object): def __init__(self): self.doProgress = False self.abortConverter = False self.outStatusFile = sys.stdout self.converter = None # Converter callbacks def begin_docu...
examples
resampler
#!/usr/bin/env python # # Copyright 2009,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import sys import numpy from gnuradio import blocks, filter, gr try: from gnuradio import analog except ImportError: sys.stderr.write("Error: ...
sphinx
conf
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
tasks
check_escalation_finished
import datetime import typing import requests from apps.alerts.tasks.task_logger import task_logger from celery import shared_task from common.database import ( get_random_readonly_database_key_if_present_otherwise_default, ) from django.conf import settings from django.db.models import Q from django.utils import ...
extractor
videa
# coding: utf-8 from __future__ import unicode_literals import random import re import string from ..compat import compat_b64decode, compat_ord, compat_struct_pack, compat_urlparse from ..utils import ( ExtractorError, int_or_none, mimetype2ext, parse_codecs, update_url_query, urljoin, xpa...
api
views_files_api
# # Quru Image Server # # Document: views_files_api.py # Date started: 30 Nov 2012 # By: Matt Fozard # Purpose: Developer / Admin API for managing the file system # Requires: Flask # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute i...
AnnounceZero
AnnounceZeroPlugin
import itertools import time from Crypt import CryptRsa from Plugin import PluginManager from util import helper allow_reload = False # No source reload supported in this plugin time_full_announced = {} # Tracker address: Last announced all site to tracker connection_pool = {} # Tracker address: Peer object # We...
metadata
speex
# Copyright (C) 2008-2010 Adam Olsen # # 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, or (at your option) # any later version. # # This program is distributed in the hope that...
extractors
douyin
# coding=utf-8 import json from ..common import ( download_urls, fake_headers, get_content, get_location, match1, playlist_not_supported, print_info, url_size, ) __all__ = ["douyin_download_by_url"] def get_value(source: dict, path): try: value = source for key i...
migrations
0011_auto_20210216_1331
# Generated by Django 3.1.3 on 2021-02-16 13:31 import uuid from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0010_auto_20210216_1055"), ] operations = [ migrations.AddField( model_name="archiveresult", nam...
lib
executeOrRunSubProcess
#!/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
rtvnh
# coding: utf-8 from __future__ import unicode_literals from ..utils import ExtractorError from .common import InfoExtractor class RTVNHIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?rtvnh\.nl/video/(?P<id>[0-9]+)" _TEST = { "url": "http://www.rtvnh.nl/video/131946", "md5": "cdbec9f4455...
tools
version_check
from __future__ import absolute_import from json import JSONDecoder from threading import Thread from urllib.request import urlopen from gi.repository import Gdk, GObject, Gtk class VersionCheck: """Small class used for checking and displaying current and latest version of software detected by getting a fil...
util
taskqueue
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # SoundConverter - GNOME application for converting between audio formats. # Copyright 2004 Lars Wirzenius # Copyright 2005-2020 Gautier Portet # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
httpie
utils
import base64 import json import mimetypes import os import re import sys import sysconfig import tempfile import time from collections import OrderedDict from contextlib import contextmanager from http.cookiejar import parse_ns_headers from pathlib import Path from pprint import pformat from typing import ( IO, ...
default-toolbar
bookmark_button
import os from gi.repository import GObject, Gtk class Button(Gtk.ToolButton): """Bookmark toolbar button""" def __init__(self, application, name, config): GObject.GObject.__init__(self) self._name = name self._config = config self._application = application self._pa...
raven
breadcrumbs
from __future__ import absolute_import import logging import os import time from types import FunctionType from raven.utils import once from raven.utils.compat import get_code, iteritems, string_types, text_type special_logging_handlers = [] special_logger_handlers = {} logger = logging.getLogger("raven") def ev...
templatetags
orcid
# -*- encoding: utf-8 -*- from django import template from django.conf import settings from django.contrib.staticfiles.templatetags.staticfiles import static from django.utils.html import escape from django.utils.safestring import mark_safe register = template.Library() @register.filter(is_safe=True) def orcid_to_...
layoutcontrol
widget
# 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 ...
gui
dialogs
# -*- coding: UTF-8 -*- # -------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.go...
transformer
jinja_transform
import functools import json import logging import os import re import six from kibitzr.stash import LazyStash from .html import SoupOps, deep_recursion from .xpath import parse_html, serialize_xpath_results logger = logging.getLogger(__name__) class JinjaTransform: def __init__(self, code, conf): from...
main
urls
# 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, either version 3 of the ...
AssemblyTests
TestTEMPLATE
# SPDX-License-Identifier: LGPL-2.1-or-later # /**************************************************************************** # * # Copyright (c) 2023 Ondsel <development@ondsel.com> * # ...
image
pure
import qrcode.image.base from pymaging import Image from pymaging.colors import RGB from pymaging.formats import registry from pymaging.shapes import Line from pymaging.webcolors import Black, White from pymaging_png.png import PNG class PymagingImage(qrcode.image.base.BaseImage): """ pymaging image builder, ...
model
resource_view
# encoding: utf-8 from __future__ import annotations from typing import Any, Collection, Optional import ckan.model.domain_object as domain_object import ckan.model.meta as meta import ckan.model.types as _types import sqlalchemy as sa from ckan.types import Query from typing_extensions import Self __all__ = ["Resou...