section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
TranslateSite
TranslateSitePlugin
import time from Plugin import PluginManager from Translate import translate @PluginManager.registerTo("UiRequest") class UiRequestPlugin(object): def actionSiteMedia(self, path, **kwargs): file_name = path.split("/")[-1].lower() if not file_name: # Path ends with / file_name = "inde...
prefs
prefs_ui
# -*- coding: utf-8 -*- # # Copyright (C) 2015-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...
PyObjCTest
test_initialized
from __future__ import unicode_literals from PyObjCTest.initialize import OC_TestInitialize from PyObjCTools.TestSupport import * class OC_TestInitializePython(OC_TestInitialize): def init(self): return super(OC_TestInitializePython, self).init() OBJECT_LIST = [] class OC_TestInitializePython2(OC_Tes...
extractor
thisav
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import remove_end from .common import InfoExtractor class ThisAVIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?thisav\.com/video/(?P<id>[0-9]+)/.*" _TESTS = [ { # jwplayer "url": "http://www....
context
jump
# -*- coding: utf-8 -*- # # Copyright (C) 2013 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....
pyinstaller
win_startup_hook
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2019, 2021, 2023 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 Software Foundation; either version 2 # ...
administration
forms_dip_upload
from django import forms from django.utils.translation import ugettext_lazy as _ PREMIS_CHOICES = [("yes", _("Yes")), ("no", _("No")), ("premis", _("Base on PREMIS"))] EAD_ACTUATE_CHOICES = [ ("none", _("None")), ("onLoad", _("onLoad")), ("other", _("other")), ("onRequest", _("onRequest")), ] EAD_SHO...
mopidy
_main_
from __future__ import annotations import logging import signal import sys from pathlib import Path from typing import TYPE_CHECKING, TypedDict import pykka.debug from mopidy import commands from mopidy import config as config_lib from mopidy import ext from mopidy.internal import log, path, process, versioning from ...
cli
argtypes
import argparse import getpass import os import sys from copy import deepcopy from typing import List, Optional, Union from ..sessions import VALID_SESSION_NAME_PATTERN from .constants import DEFAULT_FORMAT_OPTIONS, SEPARATOR_CREDENTIALS class KeyValueArg: """Base key-value pair parsed from CLI.""" def __in...
youtube-dl
casefold
# coding: utf-8 from __future__ import unicode_literals from .compat import compat_chr, compat_str # Below is included the text of icu/CaseFolding.txt retrieved from # https://github.com/unicode-org/icu/blob/main/icu4c/source/data/unidata/CaseFolding.txt # In case newly foldable Unicode characters are defined, paste ...
paths
sql
PATH_ARRAY_QUERY = """ SELECT person_id, path, {extra_final_select_statements} conversion_time, event_in_session_index, concat(toString(event_in_session_index), '_', path) as path_key, if(event_in_session_index > 1, concat(toString(event_in_ses...
models
promo
# 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, ...
deluge
argparserbase
# # Copyright (C) 2007 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. # See LICENSE for more details. # import argparse import logging...
widgets
folding
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2012 - 2017 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 ...
extractor
wakanim
# coding: utf-8 from __future__ import unicode_literals from ..utils import ExtractorError, merge_dicts, urljoin from .common import InfoExtractor class WakanimIE(InfoExtractor): _VALID_URL = r"https://(?:www\.)?wakanim\.tv/[^/]+/v2/catalogue/episode/(?P<id>\d+)" _TESTS = [ { "url": "http...
dev
build_pyqt_wheel
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Build updated PyQt wheels.""" import argparse import os import pathlib import subprocess import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.par...
blocks
virtual
# Copyright 2016 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # import itertools from . import Block, register_build_in from ._build import build_params @register_build_in class VirtualSink(Block): count = itertools.count() key = "virtual_si...
actions
flowconnect
"""Flow item adapter connections.""" from typing import Type, Union from gaphor import UML from gaphor.diagram.connectors import Connector, RelationshipConnect from gaphor.diagram.support import get_diagram_item_metadata, get_model_element from gaphor.UML.actions.action import ( AcceptEventActionItem, ActionI...
gui
viewColumn
# ============================================================================= # 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 ...
chardet
universaldetector
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
settings
general
# Copyright (C) 2011 Chris Dekter # Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu> # 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) a...
kibitzr
conf
import contextlib import copy import logging.config import os import re import entrypoints import yaml from . import timeline from .exceptions import ConfigurationError logger = logging.getLogger(__name__) class ReloadableSettings: _instance = None CONFIG_DIRS = ( "", "~/.config/kibitzr/", ...
books
Xueqiu
#!/usr/bin/env python # -*- coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 import json import re import urllib from base import BaseFeedBook from bs4 import BeautifulSoup from config import SHARE_FUCK_GFW_SRV from lib.urlopener import URLOpener __author__ = "henryouly" def getBook(): re...
classes
timeline
""" @file @brief This file contains a timeline object, which listens for updates and syncs a libopenshot timeline object @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (h...
extractor
puhutv
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_HTTPError, compat_str from ..utils import ( ExtractorError, float_or_none, int_or_none, parse_resolution, str_or_none, try_get, unified_timestamp, url_or_none, urljoin, ) from .common import InfoExtr...
oss-installation
utils
import logging from urllib.parse import urljoin from apps.oss_installation import constants as oss_constants from apps.schedules.ical_utils import list_users_to_notify_from_ical_for_period from django.utils import timezone logger = logging.getLogger(__name__) def active_oss_users_count(): """ active_oss_use...
network
uploadthread
""" `UploadThread` class definition """ import time import helper_random import protocol from inventory import Inventory from network.connectionpool import BMConnectionPool from network.dandelion import Dandelion from randomtrackingdict import RandomTrackingDict from threads import StoppableThread class UploadThread...
i18n
nshutil
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2020-2021 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 Software Foundation; eit...
versions
088_3537d5420e0e_delete_extrase_which_are_deleted_state
# encoding: utf-8 """delete extrase which are deleted state Revision ID: 3537d5420e0e Revises: ff1b303cab77 Create Date: 2019-05-09 13:38:22.072361 """ from alembic import op # revision identifiers, used by Alembic. revision = "3537d5420e0e" down_revision = "ff1b303cab77" branch_labels = None depends_on = None def...
z88
tasks
# *************************************************************************** # * Copyright (c) 2017 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
nfoview
application
# -*- coding: utf-8 -*- # Copyright (C) 2015 Osmo Salomaa # # 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. # # This pr...
equations
magnetodynamic2D_writer
# *************************************************************************** # * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
extractor
medici
# coding: utf-8 from __future__ import unicode_literals from ..utils import unified_strdate, update_url_query, urlencode_postdata from .common import InfoExtractor class MediciIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?medici\.tv/#!/(?P<id>[^?#&]+)" _TEST = { "url": "http://www.medici.tv/#!...
sandbox
log2scale
#!/usr/bin/python # -*- coding: utf-8 -*- import math import sys import PyQt4.Qwt5 as Qwt import sip from PyQt4.QtCore import * from PyQt4.QtGui import * LOG2_MIN = 2.0 ** (-20) # Mininum value for logarithmic scales. LOG2_MAX = 2.0**20 # Maximum value for logarithmic scales. class CustomScaleEngine(Qwt.QwtScale...
postgres
20180317
import argparse import hashlib import psycopg2 try: bytes = buffer except NameError: pass parser = argparse.ArgumentParser() parser.add_argument("username") parser.add_argument("password") parser.add_argument("database") parser.add_argument("-H", "--host", default="localhost", help="default: localhost") args...
deep-learning
utils
import os import pathlib import sys def prepare_plaidml(): # Linux if installed plaidml with pip3 install --user if sys.platform.startswith("linux"): local_user_plaidml = ( pathlib.Path("~/.local/share/plaidml/").expanduser().absolute() ) if local_user_plaidml.exists(): ...
QT
PantallaBooks
import os import subprocess from Code import Books, Util, VarGen from Code.QT import Colocacion, Controles, FormLayout, Iconos, QTUtil2, QTVarios from PyQt4 import QtCore, QtGui class WBooksCrear(QtGui.QDialog): def __init__(self, wParent): QtGui.QDialog.__init__(self, wParent) self.wParent = wP...
util
winapi
# Copyright 2016 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. """ Error handling: every function ...
wiki
models
from __future__ import annotations from datetime import datetime from abilian.core.entities import Entity, db from abilian.core.models import SEARCHABLE from abilian.core.models.subjects import User from abilian.sbe.apps.communities.models import ( Community, CommunityIdColumn, community_content, ) from a...
doc
extract_swagger
import json import logging from asyncio import get_event_loop from io import StringIO from pathlib import Path from unittest.mock import Mock import aiohttp import yaml from tribler.core.components.reporter.reporter_component import ReporterComponent from tribler.core.components.restapi.restapi_component import RESTCo...
extractor
foxsports
from __future__ import unicode_literals from .common import InfoExtractor class FoxSportsIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?foxsports\.com/(?:[^/]+/)*video/(?P<id>\d+)" _TEST = { "url": "http://www.foxsports.com/tennessee/video/432609859715", "md5": "b49050e955bebe32c301972...
utils
pager
"""Code to write output to a pager. This module contains an object accumulates lines up to a minimum and then decides whether to flush them to the original output directly if under the threshold (no pager) or creates a pager and flushes the lines to it if above the threshold and then forwards all future lines to it. T...
util
log
#!/usr/bin/env python # This file is Python 2 compliant. import os import sys from ..version import script_name TERM = os.getenv("TERM", "") IS_ANSI_TERMINAL = TERM in ( "eterm-color", "linux", "screen", "vt100", ) or TERM.startswith("xterm") # ANSI escape code # See <http://en.wikipedia.org/wiki/AN...
models
base_auth_token
import binascii from hmac import compare_digest from typing import Optional from apps.auth_token import constants from apps.auth_token.crypto import hash_token_string from apps.auth_token.exceptions import InvalidToken from django.db import models from django.utils import timezone class AuthTokenQueryset(models.Quer...
BasicShapes
ShapeContent
#! python # -*- coding: utf-8 -*- # ShapeContent.py # 2021, by Mark Ganson <TheMarkster> # LGPL 2.1 or later # this file is called from c++ in TaskCheckGeometry.cpp # from buildShapeContent() import FreeCAD as App import Part translate = App.Qt.translate def roundVector(v, dec): return str([round(v[0], dec), r...
src
run_tribler
import argparse # A fix for "LookupError: unknown encoding: idna" error. # Adding encodings.idna to hiddenimports is not enough. # https://github.com/pyinstaller/pyinstaller/issues/1113 # noinspection PyUnresolvedReferences import encodings.idna # pylint: disable=unused-import import logging.config import os import s...
babybuddy
site_settings
# -*- coding: utf-8 -*- from datetime import time import dbsettings from core.fields import NapStartMaxTimeField, NapStartMinTimeField from django.utils.translation import gettext_lazy as _ from .widgets import TimeInput class NapStartMaxTimeValue(dbsettings.TimeValue): field = NapStartMaxTimeField class NapS...
audio
scan
import collections import logging import time from enum import IntEnum from pathlib import Path from typing import Any, Optional, cast from mopidy import exceptions from mopidy.audio import tags as tags_lib from mopidy.audio import utils from mopidy.internal import log from mopidy.internal.gi import Gst, GstPbutils ...
femexamples
ccx_cantilever_ele_tetra4
# *************************************************************************** # * Copyright (c) 2019 Bernd Hahnebach <bernd@bimstatik.org> * # * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com> * # * * # * Th...
app
test_macro_parser
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022-2023 FreeCAD Project Association * # * ...
pynocchio
comic
import os class Comic: """This is basic class of Pynocchio. Represents a comic object""" def __init__(self, name, path): """ Comic class __init__ method Args: name (str): comic name path (str): comic file path """ self.name = name self....
plugins
utils
import io import json import os import re import tarfile from tarfile import ReadError from typing import Any, Dict, Optional, Tuple from urllib.parse import parse_qs, quote from zipfile import ZIP_DEFLATED, BadZipFile, Path, ZipFile import requests from django.conf import settings def parse_github_url( url: str...
network
bmproto
""" Class BMProto defines bitmessage's network protocol workflow. """ import base64 import hashlib import logging import re import socket import struct import time from binascii import hexlify import addresses import connectionpool import knownnodes import protocol import state from bmconfigparser import config from ...
wall
presenters
from __future__ import annotations import logging from functools import singledispatch import bleach from abilian.core.util import BasePresenter from abilian.i18n import _, _l from abilian.sbe.apps.calendar.models import Event from abilian.sbe.apps.communities.models import Community from abilian.sbe.apps.documents.m...
extractor
once
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class OnceIE(InfoExtractor): _VALID_URL = r"https?://.+?\.unicornmedia\.com/now/(?:ads/vmap/)?[^/]+/[^/]+/(?P<domain_id>[^/]+)/(?P<application_id>[^/]+)/(?:[^/]+/)?(?P<media_item_id>[^/]+)/content\.(?:once|m3u8|m...
pyobjc-framework-Quartz
pyobjc_setup
""" Generic setup.py file for PyObjC framework wrappers. This file should only be changed in pyobjc-core and then copied to all framework wrappers. """ __all__ = ("setup", "Extension", "Command") import sys from pkg_resources import Distribution try: import setuptools except ImportError: import distribute...
formats
mpc
# Copyright 2004-2005 Joe Wreschnig, Michael Urman # # 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 mutagen.musep...
ui
ui_options_tags
# -*- coding: utf-8 -*- # Automatically generated - don't edit. # Use `python setup.py build_ui` to update it. from PyQt5 import QtCore, QtGui, QtWidgets class Ui_TagsOptionsPage(object): def setupUi(self, TagsOptionsPage): TagsOptionsPage.setObjectName("TagsOptionsPage") TagsOptionsPage.resize...
model
abstract_hotkey
# Copyright (C) 2011 Chris Dekter # Copyright (C) 2019-2020 Thomas Hess <thomas.hess@udo.edu> # # 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 opt...
sandbox
filter_opt_test
# -*- coding: utf-8 -*- import scipy from numpy import ( angle, arange, array, concatenate, cos, exp, interp, linspace, log, log10, ones, pi, sin, sqrt, zeros, ) # the three following lines are a workaround for a bug with scipy and py2exe # together. See http...
src
MeshFormatHandler
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import io from typing import Dict, List, Optional, Union, cast from cura.CuraApplication import CuraApplication from UM.FileHandler.FileHandler import FileHandler from UM.FileHandler.FileWriter import FileWriter from UM.i18...
draftmake
make_ellipse
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
v1
files
from typing import List from CTFd.api.v1.helpers.request import validate_args from CTFd.api.v1.helpers.schemas import sqlalchemy_to_pydantic from CTFd.api.v1.schemas import APIDetailedSuccessResponse, APIListSuccessResponse from CTFd.constants import RawEnum from CTFd.models import Files, db from CTFd.schemas.files im...
channels
qa_channel_model
#!/usr/bin/env python # # Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import math from gnuradio import analog, blocks, channels, gr, gr_unittest class test_channel_model(gr_unittest.TestCase): def setUp(self): s...
plugins
livestream
""" $description Global live-streaming and video on-demand hosting platform. $url livestream.com $type live $metadata id $metadata title """ import logging import re from operator import itemgetter from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hl...
friture
about
#!/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...
draftfunctions
upgrade
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
resources
definitions
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'raw/definition.ui' # # Created by: PyQt5 UI code generator 5.10.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(self, Dialog): Dialog.s...
protos
eval_pb2
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: object_detection/protos/eval.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pb2 from google.protobuf impo...
digital
qam_constellations
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import numpy from .constellation_map_generator import constellation_map_generator """ Note on the naming scheme. Each constellation is named using a prefix for ...
scripts
formant_maker
""" This file is part of the Stargate project, Copyright Stargate 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 version 3 of the License. This program is distributed in the hope that it will b...
search
models
# SPDX-License-Identifier: AGPL-3.0-or-later import typing class EngineRef: __slots__ = "name", "category" def __init__(self, name: str, category: str): self.name = name self.category = category def __repr__(self): return "EngineRef({!r}, {!r})".format(self.name, self.category) ...
channels
distortion_3_gen
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: Third Order Distortion # Author: mettus # Generated: Thu Aug 1 12:37:59 2013 ################################################## import math from gnuradio import blocks, gr from gnuradio.filter import firdes...
searx
poolrequests
import sys from itertools import cycle from threading import local from time import time import requests from searx import logger, settings from searx.raise_for_httperror import raise_for_httperror logger = logger.getChild("poolrequests") try: import ssl if ssl.OPENSSL_VERSION_INFO[0:3] < (1, 0, 2): ...
ipv8
discovery_booster
from __future__ import annotations import logging from ipv8.community import Community from ipv8.peerdiscovery.discovery import DiscoveryStrategy, EdgeWalk class DiscoveryBooster: """This class is designed for increasing the speed of peers' discovery during a limited time. It can be applied to any communit...
hogql-queries
lifecycle_query_runner
from datetime import timedelta from math import ceil from typing import Any, Dict, List, Optional from django.utils.timezone import datetime from posthog.caching.insights_api import ( BASE_MINIMUM_INSIGHT_REFRESH_INTERVAL, REDUCED_MINIMUM_INSIGHT_REFRESH_INTERVAL, ) from posthog.caching.utils import is_stale f...
QT
PantallaTorneos
import codecs import os import shutil import time from Code import Books, ControlPosicion, Torneo, Util, VarGen, XRun from Code.QT import ( Colocacion, Columnas, Controles, FormLayout, Grid, Iconos, PantallaMotores, PantallaSavePGN, QTUtil, QTUtil2, QTVarios, Voyager, ) ...
-packaging
pydot_patch
# A workaround for Pydot, to make sure it works # in a PyInstaller setup. # The application path is updated and the # environment variable VGBINDIR is set to make sure plugins are found import logging import os import subprocess import sys import pydot log = logging.getLogger(__name__) def graphviz_path(): if ...
extractor
tvnow
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import ( ExtractorError, int_or_none, parse_duration, parse_iso8601, str_or_none, update_url_query, urljoin, ) from .common import InfoExtractor class TVNowBaseIE(InfoExtractor)...
lilydoc
manager
# 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 ...
models
announcement
""" admin announcements """ from django.db import models from django.db.models import Q from django.utils import timezone from django.utils.translation import gettext_lazy as _ from .base_model import BookWyrmModel DisplayTypes = [ ("primary-light", _("Primary")), ("success-light", _("Success")), ("link-l...
migrations
0019_default_for_deposit_record_status
# Generated by Django 2.2.4 on 2019-10-07 07:12 from django.db import migrations, models def empty_to_failed(apps, schema_editor): """ Changes status of each DepositRecord with empty value to 'failed'. """ DepositRecord = apps.get_model("deposit", "DepositRecord") DepositRecord.objects.filter(st...
data
tracker_connection
# -------------------------------------------------------------------------- # 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.gov.br # License: GNU...
plugins
widemixer
# -*- coding: utf-8 -*- """ This file is part of the Stargate project, Copyright Stargate 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 version 3 of the License. This program is distributed in...
downloaders
FlyFilesNet
# -*- coding: utf-8 -*- import re import urllib.parse from datetime import timedelta from ..base.simple_downloader import SimpleDownloader class FlyFilesNet(SimpleDownloader): __name__ = "FlyFilesNet" __type__ = "downloader" __version__ = "0.15" __status__ = "testing" __pattern__ = r"http://(?:...
extractor
mgtv
# coding: utf-8 from __future__ import unicode_literals import base64 import time import uuid from ..compat import compat_HTTPError, compat_str from ..utils import ExtractorError, int_or_none from .common import InfoExtractor class MGTVIE(InfoExtractor): _VALID_URL = r"https?://(?:w(?:ww)?\.)?mgtv\.com/(v|b)/(?...
extractors
bilibili
#!/usr/bin/env python import hashlib import math from ..common import * from ..extractor import VideoExtractor class Bilibili(VideoExtractor): name = "Bilibili" # Bilibili media encoding options, in descending quality order. stream_types = [ { "id": "hdflv2_8k", "quality...
pwidgets
palette_viewer
# -*- 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....
models
ssd_inception_v2_feature_extractor_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...
Arch
ArchSectionPlane
# *************************************************************************** # * Copyright (c) 2011 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
downloaders
MexaSh
# -*- coding: utf-8 -*- from ..base.xfs_downloader import XFSDownloader class MexaSh(XFSDownloader): __name__ = "MexaSh" __type__ = "downloader" __version__ = "0.01" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?(?:mexa\.sh|mexashare\.com)/(?P<ID>\w{12})" __config__ = [ (...
protos
matcher_pb2
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: object_detection/protos/matcher.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pb2 from google.protobuf i...
books
edit_book
""" the good stuff! the books! """ from re import findall, sub from bookwyrm import book_search, forms, models # from bookwyrm.activitypub.base_activity import ActivityObject from bookwyrm.utils.isni import ( augment_author_metadata, build_author_from_isni, find_authors_by_name, ) from bookwyrm.views.help...
extensions
youtube_dl
# -*- coding: utf-8 -*- # Manage YouTube subscriptions using youtube-dl (https://github.com/ytdl-org/youtube-dl) # Requirements: youtube-dl module (pip install youtube_dl) # (c) 2019-08-17 Eric Le Lay <elelay.fr:contact> # Released under the same license terms as gPodder itself. import logging import os import re impo...
lib
app_globals
# 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, ...
src
run_tribler_headless
""" This script enables you to start Tribler headless. """ import argparse import logging import os import re import signal import sys import time from asyncio import ensure_future, get_event_loop, sleep from datetime import date from socket import inet_aton from typing import Optional from tribler.core.components.ses...
Work
Url2Book
#!/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 # Author: # cdhigh <https://github.com/cdhigh> # Contributors: # rexdf <https://github.com/rexdf> import base64 import zlib import jinja2...
AddonManager
addonmanager_devmode
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022 FreeCAD Project Association * # * ...
beetsplug
fromfilename
# This file is part of beets. # Copyright 2016, Jan-Erik Dahlin # # 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, ...
plover
log
# Copyright (c) 2013 Hesky Fisher # See LICENSE.txt for details. """A module to handle logging.""" import logging import os import sys import traceback from logging import DEBUG, ERROR, INFO, WARNING from logging.handlers import RotatingFileHandler from plover.oslayer.config import CONFIG_DIR, PLATFORM LOG_FORMAT =...