section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
songsmenu | filterall | # Copyright 2012 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.
from gi.repository import Gtk
from ... |
extractor | stitcher | from __future__ import unicode_literals
from ..compat import compat_str
from ..utils import (
ExtractorError,
clean_html,
clean_podcast_url,
int_or_none,
str_or_none,
try_get,
url_or_none,
)
from .common import InfoExtractor
class StitcherBaseIE(InfoExtractor):
_VALID_URL_BASE = r"htt... |
migrations | 0014_fix_fits_command | from django.db import migrations
def data_migration(apps, schema_editor):
"""Fix the FITS characterization FPR command. Disable the old FITS
command/rule, create a new FITS command that does not pollute the
command output, i.e., render it invalid XML, disable the existing default
characterization via ... |
playlists | main | # Copyright 2005 Joe Wreschnig
# 2011-2022 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.
import ... |
PyObjCTest | test_nsxmldocument | from Foundation import *
from PyObjCTools.TestSupport import *
class TestXMLDocument(TestCase):
def testConstants(self):
self.assertEqual(NSXMLDocumentXMLKind, 0)
self.assertEqual(NSXMLDocumentXHTMLKind, 1)
self.assertEqual(NSXMLDocumentHTMLKind, 2)
self.assertEqual(NSXMLDocumentTe... |
accounts | FastixRu | # -*- coding: utf-8 -*-
import json
from ..base.multi_account import MultiAccount
class FastixRu(MultiAccount):
__name__ = "FastixRu"
__type__ = "account"
__version__ = "0.13"
__status__ = "testing"
__config__ = [
("mh_mode", "all;listed;unlisted", "Filter downloaders to use", "all"),
... |
TemplatePyMod | PythonQt | """
Examples for customizing the FreeCAD application with PySide facilities.
(c) 2007 Werner Mayer LGPL
"""
__author__ = "Werner Mayer <werner.wm.mayer@gmx.de>"
import __main__
import FreeCADGui
from PySide import QtCore, QtGui
class MainWindow:
def __init__(self):
self.app = QtGui.qApp
self.mw ... |
pytz | reference | """
Reference tzinfo implementations from the Python docs.
Used for testing against as they are only correct for the years
1987 to 2006. Do not use these for real code.
"""
from datetime import datetime, timedelta, tzinfo
from pytz import HOUR, UTC, ZERO, utc
# A class building tzinfo objects for fixed-offset time z... |
Resources | Trajectory | #!/usr/bin/env python
# encoding: utf-8
"""
Copyright 2009-2017 Olivier Belanger
This file is part of SoundGrain.
SoundGrain 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
(a... |
extractor | callin | # coding: utf-8
from __future__ import unicode_literals
from ..compat import compat_str
from ..utils import ExtractorError, traverse_obj, try_get
from .common import InfoExtractor
class CallinIE(InfoExtractor):
_VALID_URL = (
r"https?://(?:www\.)?callin\.com/episode/(?:[^/#?-]+-)*(?P<id>[^/#?-]+)"
)
... |
classes | conversion | """
@file
@brief This file deals with value conversions
@author Jonathan Thomas <jonathan@openshot.org>
@author Frank Dana <ferdnyc AT gmail com>
@section LICENSE
Copyright (c) 2008-2018 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Editor (http://www.openshot.org... |
addons | DeathByCaptcha | # -*- coding: utf-8 -*-
import base64
import json
import re
import time
import pycurl
from pyload.core.network.http.exceptions import BadHeader
from pyload.core.network.request_factory import get_request
from pyload.core.utils.convert import to_str
from ..base.addon import BaseAddon, threaded
class DeathByCaptchaE... |
ocrolib | chars | # -*- encoding: utf-8 -*-
import re
# common character sets
digits = "0123456789"
letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
symbols = r"""!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""
ascii = digits + letters + symbols
xsymbols = """€¢£»«›‹÷©®†‡°∙•◦‣¶§÷¡¿▪▫"""
german = "ÄäÖöÜüß"
french = "ÀàÂâÆæÇçÉéÈèÊ... |
frescobaldi-app | highlighter | # 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
... |
archivebox | logging_util | __package__ = "archivebox"
import argparse
import os
import re
import stat
import sys
import time
from dataclasses import dataclass
from datetime import datetime, timezone
from math import log
from multiprocessing import Process
from pathlib import Path
from typing import IO, TYPE_CHECKING, Any, Dict, List, Optional, ... |
USBPrinting | AvrFirmwareUpdater | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from time import sleep
from cura.CuraApplication import CuraApplication
from cura.PrinterOutput.FirmwareUpdater import FirmwareUpdater, FirmwareUpdateState
from serial import SerialException
from UM.Logger import Logger
f... |
pyobjc-framework-Quartz | distribute_setup | #!python
"""Bootstrap distribute installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from distribute_setup import use_setuptools
use_setuptools()
If you want to require a specific version of se... |
Code | GestorPlayPGN | import copy
import time
from Code import Apertura, Gestor, Partida, Util
from Code.Constantes import *
from Code.QT import PantallaJuicio, PantallaPlayPGN, QTUtil2
class GestorUnJuego(Gestor.Gestor):
def inicio(self, recno, siBlancas):
db = PantallaPlayPGN.PlayPGNs(self.configuracion.ficheroPlayPGN)
... |
downloaders | UptoboxCom | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
class UptoboxCom(SimpleDownloader):
__name__ = "UptoboxCom"
__type__ = "downloader"
__version__ = "0.40"
__status__ = "testing"
__pattern__ = (
r"https?://(?:www\.)?(uptobox|uptostream)\.(?:com|eu|li... |
cli | users | # -*- coding: utf-8 -*-
"""
flaskbb.cli.users
~~~~~~~~~~~~~~~~~
This module contains all user commands.
:copyright: (c) 2016 by the FlaskBB Team.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
import click
from flaskbb.cli.main import flaskbb
from flaskbb.cli.utils import E... |
service | character | # =============================================================================
# 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 ... |
neubot | raw | # neubot/raw.py
#
# 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 GNU Gene... |
builtinAdditionPanes | commandView | # =============================================================================
# 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 ... |
extractor | tv5unis | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import int_or_none, parse_age_limit, smuggle_url, try_get
from .common import InfoExtractor
class TV5UnisBaseIE(InfoExtractor):
_GEO_COUNTRIES = ["CA"]
def _real_extract(self, url):
groups = re.match(self._VALID_URL, url... |
imageserver | ldap_client | #
# Quru Image Server
#
# Document: ldap_client.py
# Date started: 11 Aug 2011
# By: Dhruv Ahuja and Matt Fozard
# Purpose: LDAP client and helper functions
# Requires: python-ldap
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute i... |
migrations | 0002_auto_20230320_1604 | # Generated by Django 3.2.18 on 2023-03-20 16:04
import django.db.models.deletion
import django.utils.timezone
import django_migration_linter as linter
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("alerts", "0010_channelfilter_filtering_term_type"),
... |
PyObjCTest | test_nsopengl | from AppKit import *
from PyObjCTools.TestSupport import *
try:
long
except NameError:
long = int
class TestNSOpenGL(TestCase):
def testConstants(self):
self.assertEqual(NSOpenGLGOFormatCacheSize, 501)
self.assertEqual(NSOpenGLGOClearFormatCache, 502)
self.assertEqual(NSOpenGLGORe... |
bleachbit | GuiPreferences | # vim: ts=4:sw=4:expandtab
# -*- coding: UTF-8 -*-
# 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 versio... |
example-idatasetform | plugin_v3 | # encoding: utf-8
"""Example IDatasetFormPlugin"""
from __future__ import annotations
import ckan.plugins as p
import ckan.plugins.toolkit as tk
from ckan.types import Schema
class ExampleIDatasetFormPlugin(tk.DefaultDatasetForm, p.SingletonPlugin):
p.implements(p.IDatasetForm)
def _modify_package_schema(s... |
js2py | base | """Most important file in Js2Py implementation: PyJs class - father of all PyJs objects"""
import re
import traceback
from copy import copy
from types import (
BuiltinFunctionType,
BuiltinMethodType,
FunctionType,
GeneratorType,
MethodType,
ModuleType,
)
# python 3 support
import six
from .tra... |
meshes | mesh_truss_crane_seg2 | def create_nodes(femmesh):
# nodes
femmesh.addNode(0.0, 2000.0, 0.0, 1)
femmesh.addNode(0.0, 0.0, 0.0, 2)
femmesh.addNode(2000.0, 2000.0, 0.0, 3)
femmesh.addNode(2000.0, 0.0, 0.0, 4)
femmesh.addNode(4000.0, 2000.0, 0.0, 5)
femmesh.addNode(4000.0, 0.0, 0.0, 6)
femmesh.addNode(6000.0, 2000... |
Models | CompatibleMachineModel | # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Optional
from PyQt6.QtCore import QObject, Qt, pyqtProperty, pyqtSignal, pyqtSlot
from UM.i18n import i18nCatalog
from UM.Logger import Logger
from UM.Qt.ListModel import ListModel
class CompatibleMach... |
accounts | 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 ... |
services | registration | # -*- coding: utf-8 -*-
"""
flaskbb.auth.services
~~~~~~~~~~~~~~~~~~~~~
Implementation of services found in flaskbb.core.auth.services
:copyright: (c) 2014-2018 the FlaskBB Team.
:license: BSD, see LICENSE for more details
"""
from datetime import datetime
from itertools import chain
import att... |
qltk | songsmenu | # Copyright 2006 Joe Wreschnig
# 2013-2022 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 gi... |
resources | settingswindow | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'raw/settings.ui'
#
# Created by: PyQt5 UI code generator 5.12
#
# 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.setOb... |
fec | qa_puncture | #!/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 collections import deque
from gnuradio import blocks, fec, gr, gr_unittest
class test_puncture(gr_unittest.TestCase):
def puncture_setup(self):
... |
daw | playlist | try:
from sg_py_vendor.pymarshal import pm_assert, type_assert, type_assert_iter
except ImportError:
from pymarshal import pm_assert, type_assert, type_assert_iter
class PlaylistPoolEntry:
def __init__(
self,
name,
seq_uid,
):
self.name = type_assert(
name,
... |
Tools | dir2qrc | #! python
# -*- coding: utf-8 -*-
# (c) 2007 Juergen Riegel GPL
Usage = """dir2qrc - merging all files in a directory in a qrc file
Usage:
dir2qrc [Optionen]
Options:
-v, --verbose print out all files collected
-o --out-file=FILENAME use this file name for output, default resources.qrc
-d, --direc... |
TDTest | DrawViewSectionTest | import unittest
import FreeCAD
from PySide import QtCore
from .TechDrawTestUtilities import createPageWithSVGTemplate
class DrawViewSectionTest(unittest.TestCase):
def setUp(self):
"""Creates a page and a view"""
FreeCAD.newDocument("TDSection")
FreeCAD.setActiveDocument("TDSection")
... |
ops | basicops | """Basic filtering and aggregation operations on lists of entries.
This module contains some common basic operations on entries that are complex
enough not to belong in core/data.py.
"""
__copyright__ = "Copyright (C) 2014, 2016-2017 Martin Blais"
__license__ = "GNU GPLv2"
from collections import defaultdict
from b... |
commands | deduplicate_book_data | """ PROCEED WITH CAUTION: uses deduplication fields to permanently
merge book data objects """
from bookwyrm import models
from bookwyrm.management.merge import merge_objects
from django.core.management.base import BaseCommand
from django.db.models import Count
def dedupe_model(model):
"""combine duplicate editio... |
migrations | remove_field | from django.db import connection
from django.db.migrations import RemoveField
from django.db.migrations.loader import MigrationLoader
class RemoveFieldState(RemoveField):
"""
Remove field from Django's migration state, but not from the database.
This is essentially the same as RemoveField, but database_fo... |
reader | ncx | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import absolute_import, division, print_function, unicode_literals
__license__ = "GPL v3"
__copyright__ = "2012, Kovid Goyal <kovid@kovidgoyal.net>"
__docformat__ = "restructuredtext en"
import os
from calibre import replace_ent... |
lib | appimage | import os
import shutil
DESKTOP_FILE = """\
[Desktop Entry]
Type=Application
Name=StargateDAW
Comment=Digital Audio Workstation
Exec={EXEC}
Icon={ICON}
"""
def appimage_start_menu_path():
desktop_dir = os.path.join(
os.path.expanduser("~"),
".local",
"share",
"applications",
)... |
configmanager | configmanager | # -*- coding: utf-8 -*-
# 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 Licens... |
functions | mapping | from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple, Type
from posthog.hogql import ast
from posthog.hogql.base import ConstantType
from posthog.hogql.errors import HogQLException
def validate_function_args(
args: List[ast.Expr],
min_args: int,
max_args: Optional[int],
fu... |
docs | conf | #
# OctoPrint documentation build configuration file, created by
# sphinx-quickstart on Mon Dec 02 17:08:50 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values ... |
cssutils | _codec2 | #!/usr/bin/env python
"""Python codec for CSS."""
__docformat__ = "restructuredtext"
__author__ = "Walter Doerwald"
__version__ = "$Id: util.py 1114 2008-03-05 13:22:59Z cthedot $"
import codecs
import marshal
# We're using bits to store all possible candidate encodings (or variants, i.e.
# we have two bits for the v... |
projectedFighter | changeAmount | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.fighter.changeAmount import CalcChangeFighterAmountCommand
from gui.fitCommands.calc.fighter.projectedRemove import (
CalcRemoveProjectedFighterCommand,
)
from gui.fitCommands.helpers import InternalCommandHist... |
covergrid | prefs | # Copyright 2004-2007 Joe Wreschnig, Michael Urman, Iñigo Serna
# 2009-2010 Steven Robertson
# 2012,2013,2016 Nick Boultbee
# 2009-2013 Christoph Reiter
# 2016 Mice Pápai
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Gene... |
order | reorder | # Copyright 2016 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.
import random
from quodlibet import _... |
bleachbit | SystemInformation | # vim: ts=4:sw=4:expandtab
# -*- coding: UTF-8 -*-
# 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... |
ckan | setup | # encoding: utf-8
import os
from setuptools import setup
# Avoid problem releasing to pypi from vagrant
if os.environ.get("USER", "") == "vagrant":
del os.link
extras_require = {}
_extras_groups = [
("requirements", "requirements.txt"),
("dev", "dev-requirements.txt"),
]
HERE = os.path.dirname(__file__... |
decrypters | Go4UpCom | # -*- coding: utf-8 -*-
import json
import re
import urllib.parse
from ..base.simple_decrypter import SimpleDecrypter
class Go4UpCom(SimpleDecrypter):
__name__ = "Go4UpCom"
__type__ = "decrypter"
__version__ = "0.19"
__status__ = "testing"
__pattern__ = r"http://go4up\.com/(dl/\w{12}|rd/\w{12}/... |
grouptagger | gt_common | # Copyright (C) 2011 Dustin Spicuzza
#
# 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... |
UI | WhatsNewPagesModel | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple
from cura.UI.WelcomePagesModel import WelcomePagesModel
from PyQt6.QtCore import pyqtProperty, pyqtSlot
from UM.Logger import Logger
from UM.Resources... |
widgets | routing_matrix | from sglib.models import theme
from sgui.daw import shared as daw_shared
from sgui.sgqt import *
from sgui.util import get_font
from . import _shared
ROUTING_GRAPH_NODE_BRUSH = None
ROUTING_GRAPH_TO_BRUSH = None
ROUTING_GRAPH_FROM_BRUSH = None
ROUTE_TYPES = {
0: "Audio",
1: "Sidechain",
2: "MIDI",
}
cl... |
migrations | 0005_auto_20190416_2048 | # Generated by Django 2.2 on 2019-04-17 03:48
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("core", "0004_child_picture"),
]
operations = [
m... |
query-metrics | sql | # Note: These tables are not (yet) created automatically, as they're considered experimental on cloud and exact schema is in flux.
from posthog.clickhouse.dictionaries import dictionary_source_clickhouse
from posthog.clickhouse.kafka_engine import KAFKA_COLUMNS_WITH_PARTITION, kafka_engine
from posthog.clickhouse.tabl... |
widgets | torrentfiletreewidget | import sys
from PyQt5.QtCore import Qt, pyqtSignal
from PyQt5.QtWidgets import QHeaderView, QTreeWidget, QTreeWidgetItem
from tribler.gui.utilities import connect, format_size, get_image_path
from tribler.gui.widgets.downloadwidgetitem import create_progress_bar_widget
MAX_ALLOWED_RECURSION_DEPTH = sys.getrecursionli... |
scripts | marlin_post | # -*- coding: utf-8 -*-
# *****************************************************************************
# * *
# * (c) sliptonic (shopinthewoods@gmail.com) 2014 *
# * (c) Gauthier Briere - 2018, 2019 ... |
mackup | setup | """Setup file to automate the install of Mackup in the Python environment."""
from mackup.constants import VERSION
from setuptools import setup
setup(
name="mackup",
version=VERSION,
author="Laurent Raufaste",
author_email="analogue@glop.org",
url="https://github.com/lra/mackup",
description="K... |
ArchiveBox | setup | import json
from pathlib import Path
import setuptools
from setuptools.command.test import test
PKG_NAME = "archivebox"
DESCRIPTION = "Self-hosted internet archiving solution."
LICENSE = "MIT"
AUTHOR = "Nick Sweeting"
AUTHOR_EMAIL = "git@nicksweeting.com"
REPO_URL = "https://github.com/ArchiveBox/ArchiveBox"
PROJECT_... |
downloaders | AnonfilesCom | # -*- coding: utf-8 -*-
from ..base.simple_downloader import SimpleDownloader
class AnonfilesCom(SimpleDownloader):
__name__ = "AnonfilesCom"
__type__ = "downloader"
__version__ = "0.02"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?anonfiles?\.com/(?P<ID>\w+)"
__config__ = [
... |
RAAML | raaml | # This file is generated by coder.py. DO NOT EDIT!
# ruff: noqa: F401, E402, F811
# fmt: off
from __future__ import annotations
from gaphor.core.modeling.properties import association
from gaphor.core.modeling.properties import attribute as _attribute
from gaphor.core.modeling.properties import derived, derivedunion
... |
femexamples | ccx_cantilever_ele_seg2 | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
fallback | _util | def int_to_bytes(raw, length):
data = []
for _ in range(length):
data.append(raw % 256)
raw //= 256
return bytes(data[::-1])
def bytes_to_int(data):
raw = 0
for byte in data:
raw = raw * 256 + byte
return raw
def legendre(a, p):
res = pow(a, (p - 1) // 2, p)
i... |
metadata | mp3 | # 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... |
builtinStatsViews | outgoingViewFull | # ===============================================================================
# Copyright (C) 2014 Alexandros Kosiaris
#
# 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... |
extractor | traileraddict | from __future__ import unicode_literals
import re
from .common import InfoExtractor
class TrailerAddictIE(InfoExtractor):
_WORKING = False
_VALID_URL = r"(?:https?://)?(?:www\.)?traileraddict\.com/(?:trailer|clip)/(?P<movie>.+?)/(?P<trailer_name>.+)"
_TEST = {
"url": "http://www.traileraddict.co... |
models | exported_asset | import secrets
from datetime import timedelta
from typing import List, Optional
import structlog
from django.conf import settings
from django.db import models
from django.db.models import Q
from django.http import HttpResponse
from django.utils.text import slugify
from django.utils.timezone import now
from posthog.jwt... |
sunflower | config | import json
import os
class Container:
"""Generic configuration container"""
def __init__(self, data=None):
self._values = {}
if data is not None:
self._values = data
def _get_data(self):
"""Get data for storage"""
return self._values.copy()
def set(self... |
frescobaldi-app | plugin | # 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
... |
chardet | hebrewprober | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#... |
localFighter | remove | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.fighter.localRemove import CalcRemoveLocalFighterCommand
from gui.fitCommands.helpers import InternalCommandHistory
from service.fit import Fit
from service.market import Market
class GuiRemoveLocalFightersComman... |
externalchanges | 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
... |
transport | twisted | """
raven.transport.twisted
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from raven.transport.base import AsyncTransport
from raven.transport.http import HTTPTransport
from r... |
localFighter | imprt | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.fighter.localAdd import CalcAddLocalFighterCommand
from gui.fitCommands.helpers import FighterInfo, InternalCommandHistory
from service.fit import Fit
class GuiImportLocalFightersCommand(wx.Command):
def __in... |
extractor | bbc | # coding: utf-8
from __future__ import unicode_literals
import functools
import itertools
import json
import re
from ..compat import (
compat_etree_Element,
compat_HTTPError,
compat_parse_qs,
compat_str,
compat_urllib_error,
compat_urllib_parse_urlparse,
compat_urlparse,
)
from ..utils imp... |
Test | TestNoparallel | import time
import gevent
import pytest
import util
from util import ThreadPool
@pytest.fixture(params=["gevent.spawn", "thread_pool.spawn"])
def queue_spawn(request):
thread_pool = ThreadPool.ThreadPool(10)
if request.param == "gevent.spawn":
return gevent.spawn
else:
return thread_pool.... |
aliceVision | LdrToHdrCalibration | __version__ = "3.0"
import json
import math
import os
from collections import Counter
from meshroom.core import desc
def findMetadata(d, keys, defaultValue):
v = None
for key in keys:
v = d.get(key, None)
k = key.lower()
if v is not None:
return v
for dk, dv in d.... |
backend | pubtype_translations | # -*- 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 General Public License
# as published by the Free Software Foundation; either version 2
# of the Licen... |
jobstores | memory | from __future__ import absolute_import
from apscheduler.jobstores.base import BaseJobStore, ConflictingIdError, JobLookupError
from apscheduler.util import datetime_to_utc_timestamp
class MemoryJobStore(BaseJobStore):
"""
Stores jobs in an array in RAM. Provides no persistence support.
Plugin alias: ``m... |
plugins | tvp | """
$description Live TV channels and VODs from TVP, a Polish public, state-owned broadcaster.
$url tvp.info
$url tvp.pl
$type live, vod
$metadata id
$metadata title
$notes Some VODs may be geo-restricted. Authentication is not supported.
"""
import logging
import re
from typing import List, Optional, Tuple
from urlli... |
config | sort_ini | #!/usr/bin/env python
import sys
import ConfigParser
if len(sys.argv) > 1:
filename = sys.argv[1]
else:
filename = "config.ini"
oconfig = ConfigParser.RawConfigParser()
oconfig.read(filename)
# This part will destroy the configuration if there's a crash while
# writing the output. We're in an GIT-controll... |
writer8 | skeleton | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import absolute_import, division, print_function, unicode_literals
__license__ = "GPL v3"
__copyright__ = "2012, Kovid Goyal <kovid@kovidgoyal.net>"
__docformat__ = "restructuredtext en"
import re
from collections import namedtup... |
verification | channel | import datetime
from typing import Optional, Tuple
from uuid import uuid4
from apps.telegram.models import TelegramToOrganizationConnector
from common.insight_log.chatops_insight_logs import (
ChatOpsEvent,
ChatOpsTypePlug,
write_chatops_insight_log,
)
from django.core.exceptions import ValidationError
fro... |
lib | naming | # This file is part of MyPaint.
# Copyright (C) 2017-2019 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... |
general | connectors | """Connect comments."""
import logging
from typing import Union
from gaphor.core.modeling import Comment
from gaphor.diagram.connectors import BaseConnector, Connector
from gaphor.diagram.general.comment import CommentItem
from gaphor.diagram.general.commentline import CommentLineItem
from gaphor.diagram.presentation... |
archiver | recreate_cmd | import argparse
from ..archive import ArchiveRecreater
from ..compress import CompressionSpec
from ..constants import * # NOQA
from ..helpers import ChunkerParams, archivename_validator, comment_validator, timestamp
from ..logger import create_logger
from ..manifest import Manifest
from ._common import Highlander, bu... |
AppImage | create_appimage | # Copyright (c) 2022 UltiMaker
# Cura is released under the terms of the LGPLv3 or higher.
import argparse # Command line arguments parsing and help.
import os # Finding installation directory.
import os.path # Finding files.
import shutil # Copying files.
import stat # For setting file permissions.
import subpr... |
plugins | ustreamtv | """
$description Global live-streaming and video on-demand platform owned by IBM.
$url ustream.tv
$url video.ibm.com
$type live, vod
"""
import logging
import re
from collections import deque
from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
from random import randint
from threading ... |
UML | toolbox | """The action definition for the UML toolbox."""
from gaphor.diagram.diagramtoolbox import (
DiagramType,
DiagramTypes,
ElementCreateInfo,
ToolboxDefinition,
general_tools,
)
from gaphor.i18n import i18nize
from gaphor.UML.actions.actionstoolbox import actions
from gaphor.UML.classes.classestoolbox... |
migrations | 0023_alter_settings_timezone | # Generated by Django 4.1.2 on 2022-10-12 02:19
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("babybuddy", "0022_alter_settings_language"),
]
operations = [
migrations.AlterField(
model_name="settings",
name="tim... |
PathTests | TestPathVcarve | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2020 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
constructors | jsarray | from ..base import *
@Js
def Array():
if len(arguments) == 0 or len(arguments) > 1:
return arguments.to_list()
a = arguments[0]
if isinstance(a, PyJsNumber):
length = a.to_uint32()
if length != a.value:
raise MakeError("RangeError", "Invalid array length")
temp ... |
ui | ui_options_general | # -*- 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_GeneralOptionsPage(object):
def setupUi(self, GeneralOptionsPage):
GeneralOptionsPage.setObjectName("GeneralOptionsPage")
GeneralOpt... |
authorize | api | # 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, ... |
frescobaldi-app | simplemarkdown | # SimpleMarkdown -- a basic markdown-like parser.
#
# 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
# of the License, or (at y... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.