section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
extractors
nicovideo
#!/usr/bin/env python __all__ = ["nicovideo_download"] from ..common import * def nicovideo_login(user, password): data = ( "current_form=login&mail=" + user + "&password=" + password + "&login_submit=Log+In" ) response = request.urlopen( request.Request( ...
net
neuronavigation_api
# -------------------------------------------------------------------------- # 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...
utils
date
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = "GPL v3" __copyright__ = "2010, Kovid Goyal <kovid@kovidgoyal.net>" __docformat__ = "restructuredtext en" import re from datetime import datetime, time, timedelta from functools import partial ...
async-migrations
setup
from typing import Dict, Optional from django.core.exceptions import ImproperlyConfigured from infi.clickhouse_orm.utils import import_submodules from posthog.async_migrations.definition import AsyncMigrationDefinition from posthog.constants import FROZEN_POSTHOG_VERSION from posthog.models.async_migration import ( ...
extractor
sapo
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import parse_duration, unified_strdate from .common import InfoExtractor class SapoIE(InfoExtractor): IE_DESC = "SAPO Vídeos" _VALID_URL = r"https?://(?:(?:v2|www)\.)?videos\.sapo\.(?:pt|cv|ao|mz|tl)/(?P<id>[\da-zA-Z]{20})" ...
data
cursor_actors
# -------------------------------------------------------------------------- # 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...
extractor
vine
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import determine_ext, int_or_none, unified_timestamp from .common import InfoExtractor class VineIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?vine\.co/(?:v|oembed)/(?P<id>\w+)" _TESTS = [ ...
baseclass
common
# pylint: disable=no-name-in-module, attribute-defined-outside-init, import-error, unused-argument """ All Common widgets of kivy are managed here. """ import os from datetime import datetime from kivy.app import App from kivy.core.window import Window from kivy.metrics import dp from kivy.properties import ListP...
example-iauthfunctions
plugin_v5_custom_config_setting
# encoding: utf-8 from typing import Optional import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from ckan.config.declaration import Declaration, Key from ckan.types import AuthResult, Context, DataDict def group_create(context: Context, data_dict: Optional[DataDict] = None) -> AuthResult: # ...
gstbe
util
# Copyright 2009-2011 Steven Robertson, Christoph Reiter # 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 opti...
transmissionrpc
session
# -*- coding: utf-8 -*- # Copyright (c) 2008-2013 Erik Svensson <erik.public@gmail.com> # Licensed under the MIT license. from six import integer_types, iteritems from transmissionrpc.utils import Field class Session(object): """ Session is a class holding the session data for a Transmission daemon. Acc...
Scripts
autoreadme
#!/usr/bin/python """ This script is a daemon that will open the ReadMe file in the root of any (removable) volume that is inserted while this script is running. The script is part of an article at MAcDevCenter: http://www.macdevcenter.com/pub/a/mac/2003/01/31/pyobjc_one.html Usage: python autoreadme.py """ i...
utils
encryption_test
__copyright__ = "Copyright (C) 2015-2016 Martin Blais" __license__ = "GNU GPLv2" import os import subprocess import tempfile import unittest from os import path from beancount import loader from beancount.utils import encryption, test_utils TEST_PUBLIC_KEY = """ -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v...
extractor
veehd
from __future__ import unicode_literals import json import re from ..compat import compat_urllib_parse_unquote, compat_urlparse from ..utils import ExtractorError, clean_html, get_element_by_id from .common import InfoExtractor class VeeHDIE(InfoExtractor): _VALID_URL = r"https?://veehd\.com/video/(?P<id>\d+)" ...
PyObjCTest
test_nsdebug
import Foundation from PyObjCTools.TestSupport import * class TestNSDebug(TestCase): def testNoUnsupportedSymbols(self): self.assertNotHasAttr(Foundation, "NSDebugEnabled") self.assertNotHasAttr(Foundation, "NSZombieEnabled") self.assertNotHasAttr(Foundation, "NSDeallocateZombies") ...
PyObjCTest
test_methodedits
# FIXME: This test suite seems to polute it's environment, other tests fail # when this test suite is active! from __future__ import unicode_literals import sys import objc from PyObjCTools.TestSupport import * from PyObjCTools.TestSupport import onlyPython2 NSObject = objc.lookUpClass("NSObject") class MEClass(NS...
xl
xldbus
# 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...
cdp
connection
# TODO: trio>0.22 release: remove __future__ import (generic memorychannels) from __future__ import annotations import dataclasses import itertools import json import logging from collections import defaultdict from contextlib import asynccontextmanager from typing import AsyncGenerator, Dict, Generator, Generic, Opti...
document
canvas
# -*- 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...
extractor
adobeconnect
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_parse_qs, compat_urlparse from .common import InfoExtractor class AdobeConnectIE(InfoExtractor): _VALID_URL = r"https?://\w+\.adobeconnect\.com/(?P<id>[\w-]+)" def _real_extract(self, url): video_id = self._match_id(...
deluge
version
#!/usr/bin/env python # Authors: Douglas Creager <dcreager@dcreager.net> # Calum Lind <calumlind@gmail.com> # # This file is placed into the public domain. # # Calculates the current version number by first checking output of “git describe”, # modified to conform to PEP 386 versioning scheme. If “git describe...
gtk3
piecesbar
# # Copyright (C) 2011 Pedro Algarvio <pedro@algarvio.me> # # 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. # from math import pi import gi ...
views
profiles_treeview
""" @file @brief This file contains the profiles treeview, used by the profile window @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2023 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an open-so...
gui
task_generic
# -------------------------------------------------------------------------- # 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...
cli
config
__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 json import logging import pprint import click from octoprint import FatalStartupError, init_settings from octoprint.c...
commands
plugin
# # 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. # See LICENSE for more details. # import deluge.component as com...
QT
PantallaWorkMap
from Code import Analisis, ControlPosicion, Jugada, Partida, TrListas, WorkMap from Code.QT import ( Colocacion, Columnas, Controles, Delegados, FormLayout, Grid, Iconos, QTUtil2, QTVarios, Tablero, ) from PyQt4 import QtGui, QtSvg class WMap(QTVarios.WDialogo): def __init_...
Cura
conanfile
import os from pathlib import Path from conan import ConanFile from conan.errors import ConanException, ConanInvalidConfiguration from conan.tools.env import Environment, VirtualBuildEnv, VirtualRunEnv from conan.tools.files import copy, mkdir, rm, rmdir, save from conan.tools.microsoft import unix_path from conan.too...
forms
widgets
""" using django model forms """ from django import forms class ArrayWidget(forms.widgets.TextInput): """Inputs for postgres array fields""" # pylint: disable=unused-argument # pylint: disable=no-self-use def value_from_datadict(self, data, files, name): """get all values for this name""" ...
UltimakerMachineActions
BedLevelMachineAction
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import List from cura.MachineAction import MachineAction from cura.PrinterOutput.PrinterOutputDevice import PrinterOutputDevice from UM.Application import Application from UM.FlameProfiler import pyqtSlot from ...
widgets
emblems_renderer
import cairo from gi.repository import Gdk, GObject, Gtk class CellRendererEmblems(Gtk.CellRenderer): """Cell renderer that accepts list of icon names.""" __gproperties__ = { "emblems": ( GObject.TYPE_PYOBJECT, "Emblem list", "List of icon names to display", ...
filter
qa_interp_fir_filter
#!/usr/bin/env python # # Copyright 2004,2007,2010,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 blocks, filter, gr, gr_unittest class test_interp_fir_filter(gr_unittest.TestCase): def setUp(self): ...
lib
strokemap
# This file is part of MyPaint. # Copyright (C) 2011-2018 by the MyPaint Development Team. # Copyright (C) 2009-2011 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 # the Free Software Fou...
preferences
edit_user
""" edit your own account """ from io import BytesIO from uuid import uuid4 from bookwyrm import forms from bookwyrm.views.helpers import set_language from django.contrib.auth.decorators import login_required from django.core.files.base import ContentFile from django.shortcuts import redirect from django.template.resp...
modeling
diagram
"""This module contains a model element Diagram. Diagrams can be visualized and edited. """ from __future__ import annotations import logging from dataclasses import dataclass from functools import lru_cache from typing import ( Callable, Iterable, Iterator, Protocol, Sequence, TypeVar, ov...
Mesh
MeshEnums
# *************************************************************************** # * * # * Copyright (c) 2022 Werner Mayer <wmayer[at]users.sourceforge.net> * # * * # * Th...
backend
doiprefixes
# -*- encoding: utf-8 -*- # These DOI prefixes were taken from Impactstory: # https://github.com/Impactstory/oadoi/blob/ce1e51109151674e9a6c69b448cebacc9c19eb1e/oa_local.py # Kudos to them!! ❤ # Removed the following prefixes as some DOIs do not lead to full texts # or open data: # 10.15122 # 10.14756 # 10.5438 # 10...
PyBitmessage
tests_kivy
#!/usr/bin/env python """Custom tests runner script for tox and python3""" import os import random # noseq import subprocess import sys import unittest from time import sleep def unittest_discover(): """Explicit test suite creation""" loader = unittest.defaultTestLoader loader.sortTestMethodsUsing = lamb...
utils
certgen
#!/usr/bin/python3 """ Adapted from the docs of cryptography Creates a key and self-signed certificate for local use """ import datetime import socket from cryptography import x509 from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives import hashes, serialization from cryptogra...
fec
qa_fecapi_cc
#!/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 # # from _qa_helper import _qa_helper from _qa_helper_async import _qa_helper_async from gnuradio import fec, gr, gr_unittest class test_fecapi_cc(gr_unittest.Test...
femsolver
signal
# *************************************************************************** # * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
babybuddy
middleware
from functools import wraps from os import getenv from time import time from urllib.parse import urlsplit, urlunsplit import pytz from django.conf import settings from django.contrib.auth.middleware import RemoteUserMiddleware from django.http import HttpRequest from django.utils import timezone, translation class U...
Marketplace
RemotePackageList
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING, Optional from PyQt6.QtCore import pyqtProperty, pyqtSignal, pyqtSlot from PyQt6.QtNetwork import QNetworkReply from UM.i18n import i18nCatalog from UM.Logger import Logger from UM.TaskMa...
addons
UpdateManager
# -*- coding: utf-8 -*- import operator import os import re import sys import time from datetime import timedelta from pyload import PKGDIR from ..base.addon import BaseAddon, expose, threaded from ..helpers import exists class UpdateManager(BaseAddon): __name__ = "UpdateManager" __type__ = "addon" __v...
beetsplug
kodiupdate
# This file is part of beets. # Copyright 2017, Pauli Kettunen. # # 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, ...
api
dead_letter_queue
from datetime import datetime from typing import Any, List, Optional, Union from posthog.client import sync_execute from posthog.permissions import IsStaffUser from rest_framework import mixins, permissions, serializers, viewsets # keep in sync with posthog/frontend/src/scenes/instance/DeadLetterQueue/MetricsTab.tsx ...
fec
qa_polar_decoder_sc
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import numpy as np from gnuradio import blocks, fec, gr, gr_unittest from gnuradio.fec import extended_decoder from gnuradio.fec.polar import channel_constructio...
PyObjCTest
test_propertiesforclass
import objc from PyObjCTest.properties import OCPropertyDefinitions from PyObjCTools.TestSupport import * class TestPropertiesForClass(TestCase): @min_os_level("10.6") def testBasic(self): props = objc.propertiesForClass(OCPropertyDefinitions) self.assertIsInstance(props, list) p = se...
RemotePyInterpreter
remote_pipe
import itertools def as_unicode(s, encoding="utf-8"): typ = type(s) if typ is unicode: pass elif issubclass(typ, unicode): s = unicode(s) elif issubclass(typ, str): s = unicode(s, encoding, "replace") else: raise TypeError, "expecting basestring, not %s" % (typ.__na...
mmkeys
osx
# Copyright 2012 Martijn Pieters <mj@zopatista.com> # Copyright 2014 Eric Le Lay elelay.fr:dev # # 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 op...
ParsePageContents
parse_page_contents
""" Parse a PDF file and print some information about it. Usage: python parse_page_contents.py inputfile ... """ import array import sys import objc import Quartz from Quartz import * class MyDataScan (object): def __init__(self): self.numImagesWithColorThisPage = 0 self.numImageMasksThisPag...
eos
events
# Decided to put this in it's own file so that we can easily choose not to import it (thanks to mac-deprecated builds =/) import datetime from eos.db.saveddata.fit import boostedOntoRel, projectedFitSourceRel from eos.saveddata.booster import Booster from eos.saveddata.cargo import Cargo from eos.saveddata.drone impo...
main
forms
# 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 ...
controllers
awards
# 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, ...
puddlestuff
helperwin
# -*- coding: utf-8 -*- """Dialog's that crop up along the application, but are used at at most one place, and aren't that complicated are put here.""" import os import sys from copy import deepcopy from PyQt5.QtCore import QItemSelectionModel, Qt, pyqtRemoveInputHook, pyqtSignal from PyQt5.QtGui import QBrush, QColor...
PyObjCTest
test_nsscreen
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSScreen(TestCase): def testMethods(self): m = NSScreen.supportedWindowDepths.__metadata__() self.assertTrue(m["retval"]["c_array_delimited_by_null"]) @min_os_level("10.6...
filters
watermark
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com # pylint: disable=invalid-name import math import re import tornad...
qltk
getstring
# Copyright 2005 Joe Wreschnig, Michael Urman # 2013, 2015 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 la...
options
cover
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2007 Lukáš Lalinský # Copyright (C) 2010, 2018-2021 Philipp Wolfer # Copyright (C) 2012, 2014 Wieland Hoffmann # Copyright (C) 2012-2014 Michael Wiencek # Copyright (C) 2013-2015, 2018-2021 Laurent Monin # Copyright (C) 20...
PyObjCTest
test_nsbrowser
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSBrowserHelper(NSObject): def browser_selectCellWithString_inColumn_(self, b, c, s): return 1 def browser_selectRow_inColumn_(self, b, r, c): return 1 def browser_i...
PyObjCTest
test_nspersistentdocument
from AppKit import * from PyObjCTools.TestSupport import * class TestNSPersistentDocument(TestCase): @min_os_level("10.5") def testMethods10_5(self): self.assertResultIsBOOL( NSPersistentDocument.configurePersistentStoreCoordinatorForURL_ofType_modelConfiguration_storeOptions_error_ ...
gui
toolstack
# This file is part of MyPaint. # Copyright (C) 2014-2018 by the MyPaint Development 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...
avr-isp
intelHex
""" Module to read intel hex files into binary data blobs. IntelHex files are commonly used to distribute firmware See: http://en.wikipedia.org/wiki/Intel_HEX This is a python 3 conversion of the code created by David Braam for the Cura project. """ import io from UM.Logger import Logger def readHex(filename): "...
extractor
dailymotion
# coding: utf-8 from __future__ import unicode_literals import functools import json import re from ..compat import compat_HTTPError from ..utils import ( ExtractorError, OnDemandPagedList, age_restricted, clean_html, int_or_none, try_get, unescapeHTML, urlencode_postdata, ) from .comm...
femviewprovider
view_constant_vacuumpermittivity
# *************************************************************************** # * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
Draft
importAirfoilDAT
# -*- coding: utf-8 -*- ## @package importAirfoilDAT # \ingroup DRAFT # \brief Airfoil (.dat) file importer # # This module provides support for importing airfoil .dat files """@package importAirfoilDAT \ingroup DRAFT \brief Airfoil (.dat) file importer This module provides support for importing airfoil .dat files. ...
Arch
ArchSketchObject
# *************************************************************************** # * Copyright (c) 2022 Paul Lee <paullee0@gmail.com> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
kibitzr
bash
""" Kibitzr accepts shell scripts in 3 places: * Fetch * Transform * Notify Execute code from notifier with transformation result passed via stdin. Here is a simplistic example of ``kibitzr.yml`` file, that uses all three: .. code-block:: yaml checks: - name: Shell example script: | for...
draftguitools
gui_groups
# *************************************************************************** # * (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> * # * ...
meshroom
multiview
# Multiview pipeline version __version__ = "2.2" import os from meshroom.core.graph import Graph, GraphModification # Supported image extensions imageExtensions = ( # bmp: ".bmp", # cineon: ".cin", # dds ".dds", # dpx: ".dpx", # gif: ".gif", # hdr: ".hdr", ".rgbe",...
network
vector_sink
#!/usr/bin/env python # # Copyright 2006,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from argparse import ArgumentParser from gnuradio import blocks, gr from gnuradio.eng_arg import eng_float, intx class vector_sink(gr.top_block): def ...
dev
update_3rdparty
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Daniel Schadt # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Update all third-party-modules.""" import argparse import json import os import shutil import sys import urllib.error import u...
formatters
colors
import json from typing import Optional, Tuple, Type import pygments.formatters import pygments.lexer import pygments.lexers import pygments.style import pygments.styles import pygments.token from pygments.formatters.terminal import TerminalFormatter from pygments.formatters.terminal256 import Terminal256Formatter fro...
cli
bind
# # Copyright 2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ Create Python bindings for GR block """ import os import click try: from gnuradio.blocktool import BlockHeaderParser from gnuradio.blocktool.core.base import BlockToolEx...
config
folder
__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 typing import Optional from octoprint.schema import BaseModel from octoprint.vendor.with_attrs_docs import with_attrs_doc...
admin
ip_blocklist
""" Manage IP blocklist """ from bookwyrm import forms, models from django.contrib.auth.decorators import login_required, permission_required from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.decorators import method_decorator from django.vi...
migrations
0017_auto_20201130_1819
# Generated by Django 3.0.7 on 2020-11-30 18:19 import bookwyrm.models.activitypub_mixin import bookwyrm.models.fields import django.db.models.deletion from django.conf import settings from django.db import migrations, models def copy_rsa_keys(app_registry, schema_editor): db_alias = schema_editor.connection.ali...
extractor
eporner
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ( ExtractorError, encode_base_n, int_or_none, merge_dicts, parse_duration, str_to_int, url_or_none, ) from .common import InfoExtractor class EpornerIE(InfoExtractor): _VALID_URL = r"https?://(?:www...
matrix
manager
import datetime as dt import json from time import sleep from typing import Any, Dict, List, Literal, Optional, Tuple, cast from django.conf import settings from django.core import exceptions from django.db import transaction from posthog.client import query_with_columns, sync_execute from posthog.models import ( ...
serializers
alert
from apps.alerts.incident_appearance.renderers.web_renderer import AlertWebRenderer from apps.alerts.models import Alert from django.core.cache import cache from django.utils import timezone from rest_framework import serializers from .alerts_field_cache_buster_mixin import AlertsFieldCacheBusterMixin class AlertFie...
migrations
0090_org_live
# Generated by Django 3.0.7 on 2020-09-24 00:23 import django.db.models.deletion import posthog.models.utils from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0089_auto_20201015_1031"), ] operations = [ ...
Test
TestOptionalManager
import copy import pytest @pytest.mark.usefixtures("resetSettings") class TestOptionalManager: def testDbFill(self, site): contents = site.content_manager.contents assert len(site.content_manager.hashfield) > 0 assert contents.db.execute( "SELECT COUNT(*) FROM file_optional WH...
downloaders
HighWayMe
# -*- coding: utf-8 -*- import re from pyload.core.utils import seconds from ..base.multi_downloader import MultiDownloader class HighWayMe(MultiDownloader): __name__ = "HighWayMe" __type__ = "downloader" __version__ = "0.25" __status__ = "testing" __pattern__ = r"https?://.+high-way\.my" ...
PyObjCTest
test_nstoolbar
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSToolbarHelper(NSObject): def toolbar_itemForItemIdentifier_willBeInsertedIntoToolbar_(self, a, b, c): return 1 class TestNSToolbar(TestCase): def testConstants(self): ...
canto-curses
story
# -*- coding: utf-8 -*- # Canto-curses - ncurses RSS reader # Copyright (C) 2016 Jack Miller <jack@codezen.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import curses...
extractor
pandoratv
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_str, compat_urlparse from ..utils import ( ExtractorError, float_or_none, parse_duration, str_to_int, urlencode_postdata, ) from .common import InfoExtractor class PandoraTVIE(InfoExtractor): IE_NAM...
api
serializers
# -*- coding: utf-8 -*- from copy import deepcopy from babybuddy import models as babybuddy_models from core import models from django.contrib.auth import get_user_model from django.utils import timezone from rest_framework import serializers from rest_framework.exceptions import ValidationError from taggit.serializer...
downloaders
IronfilesNet
# -*- coding: utf-8 -*- import json from ..base.simple_downloader import SimpleDownloader class IronfilesNet(SimpleDownloader): __name__ = "IronfilesNet" __type__ = "downloader" __version__ = "0.02" __status__ = "testing" __pattern__ = ( r"https?://ironfiles\.net/file/download/id/(?P<ID...
sphinxext
codeblockext
from __future__ import annotations __author__ = "Gina Häußge <osd@foosel.net>" __license__ = "The MIT License <http://opensource.org/licenses/MIT>" __copyright__ = ( "Copyright (C) 2015 Gina Häußge - Released under terms of the MIT License" ) from typing import Any import sphinx.highlighting from docutils import...
extractor
dplay
# coding: utf-8 from __future__ import unicode_literals import json import re from ..compat import compat_HTTPError from ..utils import ( ExtractorError, determine_ext, float_or_none, int_or_none, strip_or_none, unified_timestamp, ) from .common import InfoExtractor class DPlayIE(InfoExtract...
frescobaldi-app
actioncollectionmanager
# 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 ...
commands
update_billing_quotas
import pprint from django.core.management.base import BaseCommand from ee.billing.quota_limiting import update_all_org_billing_quotas class Command(BaseCommand): help = "Update billing rate limiting for all organizations" def add_arguments(self, parser): parser.add_argument( "--dry-run",...
migrations
0030_weightpercentile_weightpercentile_unique_age_sex
# Generated by Django 4.2.5 on 2023-09-20 10:56 import csv from django.db import migrations, models, transaction from django.utils import dateparse def add_to_ORM(WeightPercentile: models.Model, alias, filepath: str, sex: str): with open(filepath) as csvfile: weight_reader = csv.DictReader(csvfile) ...
fta
houseevent
"""House 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, stroke from gaphor.diagram.support impor...
webengine
cookies
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Filter for QtWebEngine cookies.""" from qutebrowser.config import config from qutebrowser.misc import objects from qutebrowser.utils import log, utils @utils.prevent_exceptions(False) # R...
aliceVision
ImageMatchingMultiSfM
__version__ = "1.0" import os from meshroom.core import desc class ImageMatchingMultiSfM(desc.AVCommandLineNode): commandLine = "aliceVision_imageMatching {allParams}" # use both SfM inputs to define Node's size size = desc.MultiDynamicNodeSize(["input", "inputB"]) category = "Sparse Reconstruction...
extractors
qie
#!/usr/bin/env python # -*- coding: utf-8 -*- from json import loads from ..common import * from ..extractor import VideoExtractor from ..util.log import * class QiE(VideoExtractor): name = "QiE (企鹅直播)" # Last updated: 2015-11-24 stream_types = [ {"id": "normal", "container": "flv", "video_prof...
Cors
CorsPlugin
import copy import html import os import re import gevent from Plugin import PluginManager from Translate import Translate plugin_dir = os.path.dirname(__file__) if "_" not in locals(): _ = Translate(plugin_dir + "/languages/") def getCorsPath(site, inner_path): match = re.match("^cors-([A-Za-z0-9]{26,35})...
gui
auxWindow
# ============================================================================= # 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 ...
TinyURLService
TinyURLService
import traceback import urllib import objc import urllib2 from AppKit import * from Foundation import * from PyObjCTools import AppHelper def serviceSelector(fn): # this is the signature of service selectors return objc.selector(fn, signature="v@:@@o^@") def ERROR(s): # NSLog(u"ERROR: %s", s) retur...