section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
mako | cache | # mako/cache.py
# Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from mako import compat, util
_cache_plugins = util.PluginLoader("mako.cache")
register_plugin = _... |
Scripts | RadialCopy | #! python
# -*- coding: utf-8 -*-
# (c) 2010 Werner Mayer LGPL
"""
An example for a high-level custom feature object to make a so called "radial copy".
"""
__author__ = "Werner Mayer <wmayer@users.sourceforge.net>"
import math
import FreeCAD
import FreeCADGui
import Part
from FreeCAD import Base
from PySide import Q... |
Arranging | Nest2DArrange | # Copyright (c) 2020 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import TYPE_CHECKING, List, Optional, Tuple
import numpy
from cura.Arranging.Arranger import Arranger
from pynest2d import Box, Item, NfpConfig, Point, nest
from UM.Application import Application
from UM.Logger... |
extractor | stretchinternet | from __future__ import unicode_literals
from .common import InfoExtractor
class StretchInternetIE(InfoExtractor):
_VALID_URL = r"https?://portal\.stretchinternet\.com/[^/]+/(?:portal|full)\.htm\?.*?\beventId=(?P<id>\d+)"
_TEST = {
"url": "https://portal.stretchinternet.com/umary/portal.htm?eventId=57... |
femsolver | reportdialog | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
libs | iso639 | # -*- coding: utf-8 -*-
"""
ISO639-2 standart: the module only contains the dictionary ISO639_2
which maps a language code in three letters (eg. "fre") to a language
name in english (eg. "French").
"""
# ISO-639, the list comes from:
# http://www.loc.gov/standards/iso639-2/php/English_list.php
_ISO639 = (
("Abkhaz... |
extractor | slideshare | from __future__ import unicode_literals
import json
import re
from ..compat import compat_urlparse
from ..utils import ExtractorError, get_element_by_id
from .common import InfoExtractor
class SlideshareIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?slideshare\.net/[^/]+?/(?P<title>.+?)($|\?)"
_TEST ... |
Backups | Backup | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import io
import os
import re
import shutil
from copy import deepcopy
from typing import TYPE_CHECKING, Dict, List, Optional
from zipfile import ZIP_DEFLATED, BadZipfile, ZipFile
from UM import i18nCatalog
from UM.Logger i... |
baseclass | allmail | # pylint: disable=import-error, no-name-in-module
# pylint: disable=unused-argument, no-member, attribute-defined-outside-init
"""
allmail.py
==============
All mails are managed in allmail screen
"""
import logging
from kivy.app import App
from kivy.clock import Clock
from kivy.properties import ListProperty, Str... |
caching | insight_cache | from datetime import datetime, timedelta
from time import perf_counter
from typing import Any, List, Optional, Tuple, cast
from uuid import UUID
import structlog
from django.conf import settings
from django.core.cache import cache
from django.db import connection
from django.utils.timezone import now
from posthog.cach... |
migrations | 0156_insight_short_id | # Generated by Django 3.1.8 on 2021-05-26 23:18
import posthog.models.insight
from django.db import migrations, models
def create_short_ids(apps, schema_editor):
DashboardItem = apps.get_model("posthog", "DashboardItem")
for obj in DashboardItem.objects.all():
obj.short_id = posthog.utils.generate_sh... |
core | region_similarity_calculator_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... |
femmesh | gmshtools | # ***************************************************************************
# * *
# * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
migrations | 0048_session_replay_events_count | from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions
from posthog.session_recordings.sql.session_replay_event_migrations_sql import (
ADD_EVENT_COUNT_DISTRIBUTED_SESSION_REPLAY_EVENTS_TABLE_SQL,
ADD_EVENT_COUNT_SESSION_REPLAY_EVENTS_TABLE_SQL,
ADD_EVENT_COUNT_WRITABLE_SESSION_REPLAY... |
meta | mode | from plover.formatting import SPACE, Case
def meta_mode(ctx, cmdline):
"""
cmdline should be:
caps: UPPERCASE
lower: lowercase
title: Title Case
camel: titlecase, no space, initial lowercase
snake: underscore_space
reset_space: Space resets to ' '
reset... |
AddonManager | TestAddonManagerGui | # SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2022-2023 FreeCAD Project Association *
# * ... |
interface | configeditor | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2018 The gPodder Team
#
# gPodder 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... |
migrations | 0021_normalize_jp2_with_ffmpeg_for_preservation | from django.db import migrations
NEW_FFMPEG_CMD_UUID = "66ba8388-2cd2-44a7-9d30-5d194d47c75b"
OLD_CONVERT_RULE_UUID = "76ece049-6812-402e-b231-8cf1445a04b4"
NEW_FFMPEG_RULE_UUID = "b98667be-2614-410b-9079-41942dbc3b32"
def data_migration_up(apps, schema_editor):
"""Fix jp2 not normalizing for preservation. Disab... |
migrations | 0035_fix_workflow_dip_generation | from django.db import migrations
def data_migration(apps, schema_editor):
"""Migrations to fix the workflow so that the "Check if DIP should be
generated" link is reachable. The previous migration inadvertently orphaned
this link.
"""
MicroServiceChainLink = apps.get_model("main", "MicroServiceCha... |
TDTest | DrawViewDetailTest | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# test script for DrawViewDetail
# creates a page, a view and a detail view
import unittest
import FreeCAD
from PySide import QtCore
from .TechDrawTestUtilities import createPageWithSVGTemplate
class DrawViewDetailTest(unittest.TestCase):
def setUp(self):
... |
ui | filebrowser | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2006-2008 Lukáš Lalinský
# Copyright (C) 2008 Hendrik van Antwerpen
# Copyright (C) 2008-2009, 2019-2022 Philipp Wolfer
# Copyright (C) 2011 Andrew Barnert
# Copyright (C) 2012-2013 Michael Wiencek
# Copyright (C) 2013 Wieland ... |
PyObjCTest | test_nsindexset | from Foundation import *
from PyObjCTools.TestSupport import *
class TestNSIndexSet(TestCase):
def testMethods(self):
self.assertResultIsBOOL(NSIndexSet.isEqualToIndexSet_)
self.assertResultIsBOOL(NSIndexSet.containsIndex_)
self.assertResultIsBOOL(NSIndexSet.containsIndexesInRange_)
... |
version-checks | git_commit | __author__ = "Gina Häußge <osd@foosel.net>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import errno
import logging
import subprocess
import sys
from ..exceptions import... |
server | shared_dirs | """Shared directory setup.
"""
import logging
import os
from django.conf import settings
from processing import BUILTIN_CONFIGS, install_builtin_config
logger = logging.getLogger("archivematica.mcp.server.shareddirs")
def create():
dirs = (
"arrange",
"completed",
"completed/transfers",
... |
flaskbb | extensions | # -*- coding: utf-8 -*-
"""
flaskbb.extensions
~~~~~~~~~~~~~~~~~~
The extensions that are used by FlaskBB.
:copyright: (c) 2014 by the FlaskBB Team.
:license: BSD, see LICENSE for more details.
"""
from celery import Celery
from flask_alembic import Alembic
from flask_allows import Allows
from fla... |
extractor | udn | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_urlparse
from ..utils import determine_ext, int_or_none, js_to_json
from .common import InfoExtractor
class UDNEmbedIE(InfoExtractor):
IE_DESC = "聯合影音"
_PROTOCOL_RELATIVE_VALID_URL = r"//video\.udn\.com/(?:embed|pl... |
eva | protocol | """
EVA protocol: a protocol for transferring big binary data over ipv8.
Limitations and other useful information described in the corresponding class.
An example of use:
>>> import os
>>> class MyCommunity(Community):
... community_id = os.urandom(20)
...
... def __init__(self, *args, **kwargs):
... ... |
devtools | inspector | # DO NOT EDIT THIS FILE!
#
# This file is generated from the CDP specification. If you need to make
# changes, edit the generator and regenerate all modules.
#
# CDP version: v0.0.1156692
# CDP domain: Inspector (experimental)
from __future__ import annotations
import enum # noqa
import typing
from dataclasses impor... |
models | message | import telegram
from apps.alerts.models import AlertGroup
from django.db import models
class TelegramMessage(models.Model):
(
ALERT_GROUP_MESSAGE,
ACTIONS_MESSAGE,
LOG_MESSAGE,
FORMATTING_ERROR,
PERSONAL_MESSAGE,
LINK_TO_CHANNEL_MESSAGE,
LINK_TO_CHANNEL_MESS... |
migrations | 0004_enterpriseeventdefinition_enterprisepropertydefinition | # Generated by Django 3.1.8 on 2021-06-02 19:42
import django.contrib.postgres.fields
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0156_insight_short_id"),
migrations... |
autokey | extractDoc | # -*- coding: utf-8 -*-
# Copyright (C) 2008 Chris Dekter
# 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.
#
# This pro... |
installer | views | # 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 ... |
PyObjCTest | test_cvopenglbufferpool | from PyObjCTools.TestSupport import *
from Quartz import *
try:
unicode
except NameError:
unicode = str
try:
long
except NameError:
long = int
class TestCVOpenGLBufferPool(TestCase):
def testTypes(self):
self.assertIsCFType(CVOpenGLBufferPoolRef)
def testConstants(self):
se... |
zoneinfo | rebuild | import json
import logging
import os
import shutil
import tempfile
from subprocess import check_call
from dateutil.zoneinfo import METADATA_FN, ZONEFILENAME, tar_open
def rebuild(filename, tag=None, format="gz", zonegroups=[], metadata=None):
"""Rebuild the internal timezone info in dateutil/zoneinfo/zoneinfo*ta... |
PathDemo | DemoView | import random
from math import pi as PI
import objc
from Cocoa import *
from Quartz import *
class DemoView(NSView):
_demoNumber = objc.ivar(objc._C_INT)
def initWithFrame_(self, frameRect):
self = super(DemoView, self).initWithFrame_(frameRect)
if self is None:
return None
... |
draftguitools | gui_rotate | # ***************************************************************************
# * (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> *
# * ... |
misc | cmdhistory | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Command history for the status bar."""
from typing import MutableSequence
from qutebrowser.misc import lineparser
from qutebrowser.qt.core import QObject, pyqtSignal, pyqtSlot
from qutebrow... |
struct | lock | # -*- coding: utf-8 -*-
import time
from functools import partial, wraps
from threading import Condition, Lock, RLock, current_thread
# NOTE: decorator
def lock(func=None, **kwgs):
# If the decorator was used with parameters, then `func` will be empty.
# If that is the case, return the decorator with the par... |
moodbar | painter | # moodbar - Replace Exaile's seekbar with a moodbar
# Copyright (C) 2015, 2018-2019, 2021 Johannes Sasongko <sasongko@gmail.com>
#
# 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... |
src | DigitalFactoryFileResponse | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from datetime import datetime
from typing import Optional
from .BaseModel import BaseModel
DIGITAL_FACTORY_RESPONSE_DATETIME_FORMAT = "%Y-%m-%dT%H:%M:%S.%fZ"
class DigitalFactoryFileResponse(BaseModel):
"""Class repr... |
search | query | # encoding: utf-8
from __future__ import annotations
import logging
import re
from typing import Any, Dict, NoReturn, Optional, Union, cast
import ckan.logic as logic
import ckan.model as model
import pysolr
from ckan.common import asbool, config
from ckan.lib.search.common import SearchError, SearchQueryError, make_... |
Gui | Dogbone | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it a... |
builtinContextMenus | shipModeChange | # noinspection PyPackageRequirements
import gui.fitCommands as cmd
import gui.mainFrame
import wx
from gui.contextMenu import ContextMenuUnconditional
from service.fit import Fit
_t = wx.GetTranslation
class ChangeShipTacticalMode(ContextMenuUnconditional):
def __init__(self):
self.mainFrame = gui.mainF... |
friture | imageplot | #!/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... |
mylar | config | import codecs
import errno
import glob
import itertools
import os
import re
import shutil
import threading
from collections import OrderedDict
from operator import itemgetter
import ConfigParser
import mylar
from mylar import encrypted, helpers, logger
config = ConfigParser.SafeConfigParser()
_CONFIG_DEFINITIONS = O... |
helpers | process | import contextlib
import os
import os.path
import shlex
import signal
import subprocess
import sys
import time
import traceback
from .. import __version__
from ..logger import create_logger
from ..platformflags import is_win32
logger = create_logger()
from ..helpers import EXIT_SIGNAL_BASE, EXIT_SUCCESS, EXIT_WARNIN... |
migrations | 0115_session_recording_viewed | # Generated by Django 3.0.11 on 2021-01-19 16:11
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0114_fix_team_event_names"),
]
operations = [
migrations.Create... |
PyObjCTest | test_posing | from __future__ import unicode_literals
import sys
import objc
from PyObjCTools.TestSupport import *
# Most useful systems will at least have 'NSObject'.
# NSObject = objc.lookUpClass('NSObject')
# Use a class that isn't used in the rest of the testsuite,
# should write a native class for this!
BaseName = "NSAttrib... |
base | simple_decrypter | # -*- coding: utf-8 -*-
import re
from pyload.core.network.http.exceptions import BadHeader
from pyload.core.utils import parse
from ..helpers import replace_patterns, search_pattern
from .decrypter import BaseDecrypter
class SimpleDecrypter(BaseDecrypter):
__name__ = "SimpleDecrypter"
__type__ = "decrypte... |
examples | gpodder_mark_played | #!/usr/bin/env python3
# Example script that can be used as post-play extension in media players
#
# Set the configuration options "audio_played_dbus" and "video_played_dbus"
# to True to let gPodder leave the played status untouched when playing
# files in the media player. After playback has finished, call this scrip... |
migrations | 0320_survey | # Generated by Django 3.2.18 on 2023-05-29 16:41
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", "0319_user_requested_password_reset_at"),
]
... |
pynocchio | thumbnails | import random
from PyQt5 import QtCore, QtGui, QtWidgets
from .uic_files import thumbnails_ui
class ThumbnailsDock(QtWidgets.QDockWidget):
def __init__(self, parent=None):
super().__init__(parent=parent)
self.ui = thumbnails_ui.Ui_Thumbnails()
self.ui.setupUi(self)
self.thumb_s... |
protos | optimizer_pb2 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/optimizer.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... |
bup | ssh | """SSH connection.
Connect to a remote host via SSH and execute a command on the host.
"""
from __future__ import absolute_import, print_function
import os
import re
import subprocess
import sys
from bup import path
from bup.compat import environ
def connect(rhost, port, subcmd, stderr=None):
"""Connect to 'rh... |
pyobjc-framework-Quartz | setup | """
Wrappers for the "Quartz" related frameworks on MacOSX. These frameworks
provide a number of graphics related API's.
The frameworks wrapped by this package are:
* CoreGraphics - 2D Graphics, based on the PDF model
* ImageIO - Reading and writing images
* QuartzComposer - Working with "Quartz Composer" ... |
friture | spectrum_data | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2021 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... |
commands | instance_version | """ Get your admin code to allow install """
from bookwyrm import models
from bookwyrm.settings import VERSION
from django.core.management.base import BaseCommand
# pylint: disable=no-self-use
class Command(BaseCommand):
"""command-line options"""
help = "What version is this?"
def add_arguments(self, p... |
fingerprint | search | # Copyright 2014 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 contextlib import contextmanag... |
builtinItemStatsViews | attributeSlider | import math
import wx
import wx.lib.newevent
from eos.utils.float import floatUnerr
from gui.attribute_gauge import AttributeGauge
_ValueChanged, EVT_VALUE_CHANGED = wx.lib.newevent.NewEvent()
class AttributeSliderChangeEvent:
def __init__(
self,
obj,
old_value,
new_value,
... |
scripts | user_edit | #
# Quru Image Server
#
# Document: user_edit.py
# Date started: 10 May 2012
# By: Matt Fozard
# Purpose: Local user account utility
# Requires:
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of... |
videoview | plugin | # encoding: utf-8
from __future__ import annotations
from typing import Any
import ckan.plugins as p
from ckan.common import CKANConfig
from ckan.config.declaration import Declaration, Key
from ckan.types import Context
ignore_empty = p.toolkit.get_validator("ignore_empty")
unicode_safe = p.toolkit.get_validator("un... |
tagsources | parse_html | # this module is a hack to overcome BeautifulSoup's tendency to fall on script tags contents
# while we're at it, we also wrap url fetching.
import re
import urllib.error
import urllib.parse
import urllib.request
import lxml.html
def classify(seq, key_func):
result = {}
for item in seq:
key = key_fu... |
landing | about | """ non-interactive pages """
from bookwyrm import models, settings
from dateutil.relativedelta import relativedelta
from django.http import Http404
from django.template.response import TemplateResponse
from django.utils import timezone
from django.views.decorators.http import require_GET
@require_GET
def about(reque... |
extractor | pornotube | from __future__ import unicode_literals
import json
from ..utils import int_or_none
from .common import InfoExtractor
class PornotubeIE(InfoExtractor):
_VALID_URL = r"https?://(?:\w+\.)?pornotube\.com/(?:[^?#]*?)/video/(?P<id>[0-9]+)"
_TEST = {
"url": "http://www.pornotube.com/orientation/straight/v... |
migrations | 0066_archivesspace_base_url | """Migrate the ArchivesSpace connection details.
``host`` and `port`` are replaced by ``base_url``.
"""
from urllib.parse import urlparse
from django.db import migrations
_AS_DICTNAME = "upload-archivesspace_v0.0"
_AS_UPLOAD_STC = "10a0f352-aeb7-4c13-8e9e-e81bda9bca29"
def _load_config(DashboardSetting):
"""L... |
archiver | transfer_cmd | import argparse
from ..archive import Archive
from ..compress import CompressionSpec
from ..constants import * # NOQA
from ..crypto.key import uses_same_chunker_secret, uses_same_id_hash
from ..helpers import (
EXIT_ERROR,
EXIT_SUCCESS,
Error,
Location,
archivename_validator,
comment_validator... |
bleachbit | Cleaner | # vim: ts=4:sw=4:expandtab
# BleachBit
# Copyright (C) 2008-2023 Andrew Ziem
# https://www.bleachbit.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# ... |
ssl-match-hostname | _implementation | """The match_hostname() function from Python 3.3.3, essential when using SSL."""
# Note: This file is under the PSF license as the code comes from the python
# stdlib. http://docs.python.org/3/license.html
import re
__version__ = "3.4.0.2"
class CertificateError(ValueError):
pass
def _dnsname_match(dn, hos... |
extractor | theweatherchannel | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from ..utils import determine_ext, parse_duration, parse_iso8601
from .theplatform import ThePlatformIE
class TheWeatherChannelIE(ThePlatformIE):
_VALID_URL = r"https?://(?:www\.)?weather\.com(?P<asset_name>(?:/(?P<locale>[a-z]{2}-[A-... |
docs | conf | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... |
UML | group | from gaphor import UML
from gaphor.diagram.group import group, ungroup
@group.register(UML.Package, UML.Type)
@group.register(UML.Package, UML.Package)
def container_group(parent, element) -> bool:
if element.owner:
ungroup(element.owner, element)
element.package = parent
return True
@ungroup.r... |
hogql | parser | from typing import Dict, List, Literal, Optional, cast
from antlr4 import CommonTokenStream, InputStream, ParserRuleContext, ParseTreeVisitor
from antlr4.error.ErrorListener import ErrorListener
from posthog.hogql import ast
from posthog.hogql.base import AST
from posthog.hogql.constants import RESERVED_KEYWORDS
from ... |
decrypters | PastedCo | # -*- coding: utf-8 -*-
import re
from ..base.decrypter import BaseDecrypter
class PastedCo(BaseDecrypter):
__name__ = "PastedCo"
__type__ = "decrypter"
__version__ = "0.06"
__status__ = "testing"
__pattern__ = r"http://pasted\.co/\w+"
__config__ = [("enabled", "bool", "Activated", True)]
... |
AddonManager | addonmanager_devmode_person_editor | # SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2022 FreeCAD Project Association *
# * ... |
gui | ParserErrorsDialog | """
Copyright 2013 Free Software Foundation, Inc.
This file is part of GNU Radio
SPDX-License-Identifier: GPL-2.0-or-later
"""
from gi.repository import GObject, Gtk
from .Constants import MIN_DIALOG_HEIGHT, MIN_DIALOG_WIDTH
class ParserErrorsDialog(Gtk.Dialog):
"""
A dialog for viewing parser errors
... |
scripts | TimeLapse | # Copyright (c) 2020 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
# Created by Wayne Porter
from ..Script import Script
class TimeLapse(Script):
def __init__(self):
super().__init__()
def getSettingDataString(self):
return """{
"name": "Time Lapse",
... |
decrypters | Dereferer | # -*- coding: utf-8 -*-
import re
from ..base.simple_decrypter import SimpleDecrypter
class Dereferer(SimpleDecrypter):
__name__ = "Dereferer"
__type__ = "decrypter"
__version__ = "0.27"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?(?:\w+\.)*?(?P<DOMAIN>(?:[\d.]+|[\w\-]{3,63}(?:\.[... |
cli | archivebox_config | #!/usr/bin/env python3
__package__ = "archivebox.cli"
__command__ = "archivebox config"
import argparse
import sys
from typing import IO, List, Optional
from ..config import OUTPUT_DIR
from ..logging_util import SmartFormatter, accept_stdin
from ..main import config
from ..util import docstring
@docstring(config._... |
downloaders | AccioDebridCom | # -*- coding: utf-8 -*-
import json
import pycurl
from pyload.core.network.http.exceptions import BadHeader
from ..base.multi_downloader import MultiDownloader
def args(**kwargs):
return kwargs
class AccioDebridCom(MultiDownloader):
__name__ = "AccioDebridCom"
__type__ = "downloader"
__version__ ... |
engines | sjp | # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Słownik Języka Polskiego
Dictionary of the polish language from PWN (sjp.pwn)
"""
from lxml.html import fromstring
from searx import logger
from searx.raise_for_httperror import raise_for_httperror
from searx.utils import extract_text
logger = logger.get... |
stargate | audio_pool | try:
from sg_py_vendor.pymarshal.csv import *
except ImportError:
from pymarshal.csv import *
import os
from sglib import constants
from sglib.lib.util import pi_path
from sglib.models.multifx_settings import multifx_settings
__all__ = [
"AudioPool",
"AudioPoolEntry",
"PerFileFX",
]
class Audio... |
Machines | MaterialNode | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import TYPE_CHECKING, Any, Optional
import UM.FlameProfiler
from cura.Machines.ContainerNode import ContainerNode
from cura.Machines.QualityNode import QualityNode
from UM.Logger import Logger
from UM.Settings.... |
extractor | orf | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_str
from ..utils import (
HEADRequest,
clean_html,
determine_ext,
float_or_none,
int_or_none,
orderedSet,
remove_end,
str_or_none,
strip_jsonp,
unescapeHTML,
unified_strdate,
u... |
network | https | import asyncore
from http import HTTPClient
from tls import TLSHandshake
"""
self.sslSock = ssl.wrap_socket(
self.sock,
keyfile=os.path.join(paths.codePath(), 'sslkeys', 'key.pem'),
certfile=os.path.join(paths.codePath(), 'sslkeys', 'cert.pem'),
server_side=not self.initiatedConnection,
ssl_versio... |
extractor | xtube | from __future__ import unicode_literals
import itertools
import re
from ..utils import (
int_or_none,
js_to_json,
orderedSet,
parse_duration,
sanitized_Request,
str_to_int,
url_or_none,
)
from .common import InfoExtractor
class XTubeIE(InfoExtractor):
_VALID_URL = r"""(?x)
... |
category-filter | family_filter | """
The FamilyFilter filters out nsfw content if enabled.
Author(s): Jelle Roozenburg
"""
import logging
import re
from tribler.core.utilities.install_dir import get_lib_path
WORDS_REGEXP = re.compile("[a-zA-Z0-9]+")
termfilename = (
get_lib_path()
/ "components"
/ "metadata_store"
/ "category_filte... |
accounts | NitroflareCom | # -*- coding: utf-8 -*-
import json
import time
from ..base.account import BaseAccount
class NitroflareCom(BaseAccount):
__name__ = "NitroflareCom"
__type__ = "account"
__version__ = "0.21"
__status__ = "testing"
__description__ = """Nitroflare.com account plugin"""
__license__ = "GPLv3"
... |
nyaa | torrents | import functools
import os
from urllib.parse import quote, urlencode
import flask
from flask import current_app as app
from nyaa import bencode
from orderedset import OrderedSet
USED_TRACKERS = OrderedSet()
def read_trackers_from_file(file_object):
USED_TRACKERS.clear()
for line in file_object:
lin... |
transformer | factory | """
Built-in transforms
"""
import importlib
import logging
import os
import pkgutil
import six
logger = logging.getLogger(__name__)
def load_transforms():
path = os.path.dirname(os.path.abspath(__file__))
before, sep, _ = __name__.rpartition(".")
prefix = before + sep
registry = {}
for _, modna... |
generated | indexsuper | #!/usr/bin/env python
#
# Generated Thu Jun 11 18:43:54 2009 by generateDS.py.
#
import sys
from xml.dom import Node, minidom
#
# User methods
#
# Calls to the methods in these classes are generated by generateDS.py.
# You can replace these methods by re-implementing the following class
# in a module named genera... |
extractor | sonyliv | # coding: utf-8
from __future__ import unicode_literals
import time
import uuid
from ..compat import compat_HTTPError
from ..utils import ExtractorError, int_or_none
from .common import InfoExtractor
class SonyLIVIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?sonyliv\.com/(?:s(?:how|port)s/[^/]+|movies|cl... |
classes | sequences | """
@file
@brief This file is for legacy support of OpenShot 1.x project files
@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 (http://www.openshot.org), an open-source pr... |
managers | plugin_manager | # -*- coding: utf-8 -*-
import importlib
import os
import re
import sys
from ast import literal_eval
from importlib.abc import MetaPathFinder
from itertools import chain
from pyload import APPID, PKGDIR
# import semver
class ImportRedirector(MetaPathFinder):
ROOT = "pyload.plugins."
USERROOT = "plugins."
... |
downloaders | DatoidCz | # -*- coding: utf-8 -*-
import json
import time
import urllib.parse
from ..base.simple_downloader import SimpleDownloader
class DatoidCz(SimpleDownloader):
__name__ = "DatoidCz"
__type__ = "downloader"
__version__ = "0.02"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?datoid\.(?:cz|... |
browser | downloads | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Shared QtWebKit/QtWebEngine code for downloads."""
import collections
import enum
import functools
import html
import os.path
import pathlib
import re
import sys
import tempfile
from typing ... |
Stats | StatsPlugin | import html
import itertools
import json
import os
import sys
import time
from Config import config
from Db import Db
from Debug import Debug
from Plugin import PluginManager
from util import helper
@PluginManager.registerTo("UiRequest")
class UiRequestPlugin(object):
def formatTableRow(self, row, class_name="")... |
SimulationView | NozzleNode | # Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os
from UM.Application import Application
from UM.Math.Color import Color
from UM.PluginRegistry import PluginRegistry
from UM.Resources import Resources
from UM.Scene.SceneNode import SceneNode
from UM.View.GL.Open... |
plugins | event_series | import re
from itertools import groupby
from logging import getLogger
from operator import attrgetter
from pelican import signals
EVENT_HAS_YEAR_RE = re.compile("^(?P<event>[^0-9]+) (?P<year>[0-9]{4})$")
log = getLogger(__name__)
class EventSeries:
def __init__(self, name, members, labels):
self.name = ... |
docs | conf | # -*- coding: utf-8 -*-
#
# Thumbor documentation build configuration file, created by
# sphinx-quickstart on Mon Sep 1 13:18:38 2014.
#
# 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.
#
# A... |
Arch | ArchProject | # -*- coding: utf8 -*-
# ***************************************************************************
# * Copyright (c) 2011 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it an... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.