section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
qltk
scanbox
# Copyright 2004-2021 Joe Wreschnig, Michael Urman, Iñigo Serna, # Steven Robertson, 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 L...
views
webhooks
from apps.auth_token.auth import ApiTokenAuthentication from apps.public_api.serializers.webhooks import ( WebhookCreateSerializer, WebhookResponseSerializer, WebhookUpdateSerializer, ) from apps.public_api.throttlers import UserThrottle from apps.webhooks.models import Webhook, WebhookResponse from common....
subscriptions
subscription_utils
from datetime import timedelta from typing import List, Tuple, Union import structlog from celery import group from django.conf import settings from posthog.models.dashboard_tile import get_tiles_ordered_by_position from posthog.models.exported_asset import ExportedAsset from posthog.models.insight import Insight from...
viewers
popplerwidget
# 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 ...
migrations
0044_auto_20200413_1936
# Generated by Django 3.0.3 on 2020-04-13 19:36 import django.contrib.postgres.fields.jsonb import django.db.models.deletion from django.db import migrations from posthog.constants import TREND_FILTER_TYPE_ACTIONS def move_funnel_steps(apps, schema_editor): Funnel = apps.get_model("posthog", "Funnel") for fu...
spectral
rgb_to_spectral
# -*- coding: utf-8 -*- """RGB_to_Spectral Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/drive/16mwE57LUxwMQFwyHuZ2I--fD9YgS0uK8 """ # !pip install git+git://github.com/colour-science/colour import colour import numpy as np from colour import ( STANDA...
extractors
vine
#!/usr/bin/env python __all__ = ["vine_download"] import json from ..common import * def vine_download(url, output_dir=".", merge=True, info_only=False, **kwargs): html = get_content(url) video_id = r1(r"vine.co/v/([^/]+)", url) title = r1(r"<title>([^<]*)</title>", html) stream = r1(r'<meta prope...
lib
midi
from sglib.log import LOG try: import mido except ImportError: from sg_py_vendor import mido class MidiEvent: def __init__(self, a_ev, a_start_beat): self.ev = a_ev self.start_beat = a_start_beat self.type = a_ev.type def __lt__(self, other): return self.start_beat < ...
downloaders
StreamcloudEu
# -*- coding: utf-8 -*- from ..base.xfs_downloader import XFSDownloader class StreamcloudEu(XFSDownloader): __name__ = "StreamcloudEu" __type__ = "downloader" __version__ = "0.16" __status__ = "testing" __pattern__ = r"http://(?:www\.)?streamcloud\.eu/\w{12}" __config__ = [ ("enabled...
App
FreeCADInit
# *************************************************************************** # * Copyright (c) 2001,2002 Jürgen Riegel <juergen.riegel@web.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
gui
Constants
""" Copyright 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio SPDX-License-Identifier: GPL-2.0-or-later """ from gi.repository import Gdk, Gtk from ..core.Constants import * # default path for the open/save dialogs DEFAULT_FILE_PATH = ( os.getcwd() if os.name != "nt" else os.path.expa...
util
collections
# Copyright 2006 Joe Wreschnig # 2013 Christoph Reiter # 2016-21 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 o...
widgets
createtorrentpage
import os from PyQt5.QtCore import QDir from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QAction, QFileDialog, QWidget from tribler.gui.defs import BUTTON_TYPE_NORMAL, PAGE_EDIT_CHANNEL_TORRENTS from tribler.gui.dialogs.confirmationdialog import ConfirmationDialog from tribler.gui.network.request_manager impo...
mylar
filechecker
# /usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Mylar. # # Mylar 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 versi...
filters
upscale
#!/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 from thumbor.filters import BaseFilter, filter_method class Filter...
db
tribler_database
import datetime import logging from dataclasses import dataclass from enum import IntEnum from typing import Any, Callable, Iterator, List, Optional, Set from pony import orm from pony.orm import raw_sql from pony.orm.core import Entity, Query, select from pony.utils import between from tribler.core.components.knowled...
manager
compat
import shutil import subprocess import sys from contextlib import suppress from typing import List, Optional from httpie.compat import is_frozen class PipError(Exception): """An exception that occurs when pip exits with an error status code.""" def __init__(self, stdout, stderr): self.stdout = stdou...
engines
solidtorrents
# SPDX-License-Identifier: AGPL-3.0-or-later """Solid Torrents """ # pylint: disable=missing-function-docstring from json import loads from urllib.parse import urlencode from searx import logger logger = logger.getChild("solidtor engine") about = { "website": "https://www.solidtorrents.net/", "wikidata_id...
http
server
# neubot/http/server.py # # Copyright (c) 2010-2011 Simone Basso <bassosimone@gmail.com>, # NEXA Center for Internet & Society at Politecnico di Torino # # 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 General P...
user
models
# -*- coding: utf-8 -*- """ flaskbb.user.models ~~~~~~~~~~~~~~~~~~~ This module provides the models for the user. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import logging from flask import url_for from flask_login import AnonymousUserMixin, UserMix...
windows
main_window
""" @file @brief This file loads the main window (i.e. the primary user-interface) @author Noah Figg <eggmunkee@hotmail.com> @author Jonathan Thomas <jonathan@openshot.org> @author Olivier Girard <olivier@openshot.org> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios....
utilities
search_utils
""" Search utilities. Author(s): Jelle Roozenburg, Arno Bakker, Alexander Kozlovsky """ import re import time from collections import deque from typing import Deque, List, Optional, Tuple RE_KEYWORD_SPLIT = re.compile(r"[\W_]", re.UNICODE) DIALOG_STOPWORDS = {"an", "and", "by", "for", "from", "of", "the", "to", "with...
models
alert_receive_channel
import logging import typing from functools import cached_property from urllib.parse import urljoin import emoji from apps.alerts.grafana_alerting_sync_manager.grafana_alerting_sync import ( GrafanaAlertingSyncManager, ) from apps.alerts.integration_options_mixin import IntegrationOptionsMixin from apps.alerts.mod...
migrations
0023_green_oa_service
# Generated by Django 2.2.7 on 2020-01-07 11:26 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("deposit", "0022_deposit_record_index"), ] operations = [ migrations.CreateModel( name="GreenOpen...
calculix
write_constraint_pressure
# *************************************************************************** # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
engines
mysql_server
# SPDX-License-Identifier: AGPL-3.0-or-later """ MySQL database (Offline) """ # error is ignored because the admin has to # install it manually to use the engine # pylint: disable=import-error import mysql.connector engine_type = "offline" auth_plugin = "caching_sha2_password" host = "127.0.0.1" port = 3306 databas...
plugins
search_on_category_select
""" searx 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 License, or (at your option) any later version. searx is distributed in the hope that it will be useful, but WITHOUT ANY WA...
utils
format
# -*- coding: utf-8 -*- import datetime import os import bitmath from .check import is_iterable from .convert import BYTE_PREFIXES, to_str from .fs import fullpath from .misc import is_plural def attributes(obj, ignore=None): if ignore is None: attrs = tuple(map(to_str, obj)) else: ignored ...
services
update
# -*- coding: utf-8 -*- """ flaskbb.user.services.update ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ User update services. :copyright: (c) 2018 the FlaskBB Team. :license: BSD, see LICENSE for more details """ import attr from ...core.changesets import ChangeSetHandler from ...core.exceptions import accumulate...
-development
helpers_fits
import pytest # noinspection PyPackageRequirements # noinspection PyShadowingNames @pytest.fixture def RifterFit(DB, Gamedata, Saveddata): print("Creating Rifter") item = ( DB["gamedata_session"] .query(Gamedata["Item"]) .filter(Gamedata["Item"].name == "Rifter") .first() ...
thumbor
transformer
#!/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 import math import sys from thumbor.point import FocalPoint from th...
PyObjCTest
test_subclassing
import objc from Foundation import * from PyObjCTools.TestSupport import * class TestSubclassing(TestCase): def testBasicSubclassing(self): class NSObjectSubclass(NSObject): def someRandomMethod(self): return 42 subclassClass = NSClassFromString("NSObjectSubclass") ...
src
tr
""" Translating text """ import os try: import state except ImportError: from . import state class translateClass: """ This is used so that the translateText function can be used when we are in daemon mode and not using any QT functions. """ # pylint: disable=old-style-class,too-few-publ...
cherrypy
_cpcompat_subprocess
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # This module should remain compatible with Python 2.2, see PEP 291. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://ww...
stylesheets
stylesheet
"""StyleSheet implements DOM Level 2 Style Sheets StyleSheet.""" __all__ = ["StyleSheet"] __docformat__ = "restructuredtext" __version__ = "$Id$" import cssutils import urlparse class StyleSheet(cssutils.util.Base2): """ The StyleSheet interface is the abstract base interface for any type of style sheet....
PyObjCTest
test_nspopupbuttoncell
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSPopUpButtonCell(TestCase): def testConstants(self): self.assertEqual(NSPopUpNoArrow, 0) self.assertEqual(NSPopUpArrowAtCenter, 1) self.assertEqual(NSPopUpArrowAtBott...
canto-next
remote
# -*- coding: utf-8 -*- # Canto - RSS reader backend # 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 logging impor...
deposit
tasks
# -*- 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...
borg
setup
# borgbackup - main setup code (see also setup.cfg and other setup_*.py files) import os import sys from collections import defaultdict from glob import glob try: import multiprocessing except ImportError: multiprocessing = None from setuptools import Command, Extension, setup from setuptools.command.build_e...
plugins
ard_mediathek
""" $description Live TV channels and video on-demand service from ARD, a German public, independent broadcaster. $url ardmediathek.de $url mediathek.daserste.de $type live, vod $metadata title $region Germany """ import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api ...
util
tags
# Copyright 2007-2008 Joe Wreschnig # 2014 Christoph Reiter # 2014-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 y...
PyObjCTest
test_pickle
import sys from objc._pythonify import OC_PythonFloat, OC_PythonLong from PyObjCTest.fnd import NSNumber from PyObjCTools.TestSupport import * if sys.version_info[0] == 2: from objc._pythonify import OC_PythonInt import pickle try: import cPickle except ImportError: cPickle = None try: long except ...
network
asyncore_pollchoose
""" Basic infrastructure for asynchronous socket service clients and servers. """ # -*- Mode: Python -*- # Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp # Author: Sam Rushing <rushing@nightmare.com> # pylint: disable=too-many-branches,too-many-lines,global-statement # pylint: disable=redefined-builtin,no-s...
nfoview
open
# -*- coding: utf-8 -*- # Copyright (C) 2008 Osmo Salomaa # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pr...
digital
bpsk
# # Copyright 2005,2006,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ BPSK modulation and demodulation. """ from cmath import exp from math import log, pi from gnuradio import gr from gnuradio.digital.generic_mod_demod import ( gener...
extractors
pixnet
#!/usr/bin/env python __all__ = ["pixnet_download"] import urllib.error from json import loads from time import time from urllib.parse import quote from ..common import * def pixnet_download(url, output_dir=".", merge=True, info_only=False, **kwargs): if re.match(r"http://(\w)+.pixnet.net/album/video/(\d)+", u...
xl
plugins
# 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...
gui
utilities
import hashlib import inspect import json import logging import math import os import sys import time import traceback import types from datetime import datetime, timedelta from pathlib import Path from typing import Callable, Dict, List from urllib.parse import quote_plus from uuid import uuid4 import tribler.gui fro...
Models
UM3PrintJobOutputModel
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import List, Optional from cura.PrinterOutput.Models.PrintJobOutputModel import PrintJobOutputModel from cura.PrinterOutput.PrinterOutputController import PrinterOutputController from PyQt6.QtCore import pyqtPro...
xl
transcoder
# 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...
PerObjectSettingsTool
PerObjectSettingsTool
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from cura.Settings.ExtruderManager import ExtruderManager from cura.Settings.SettingOverrideDecorator import SettingOverrideDecorator from UM.Application import Application from UM.Event import Event from UM.Logger import L...
extractor
tv4
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import int_or_none, parse_iso8601 from .common import InfoExtractor class TV4IE(InfoExtractor): IE_DESC = "tv4.se and tv4play.se" _VALID_URL = r"""(?x)https?://(?:www\.)? (?: tv4\.se/(?:[^/]+)/klipp/(?:.*)-| ...
builtinContextMenus
additionsImport
import gui.mainFrame import wx from gui import fitCommands as cmd from gui.contextMenu import ContextMenuUnconditional from gui.utils.clipboard import fromClipboard from service.fit import Fit from service.port.eft import importGetMutationData, lineIter, parseAdditions _t = wx.GetTranslation class AdditionsImport(Co...
examples
fir_filter_ccc
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import sys from argparse import ArgumentParser import numpy from gnuradio import analog, blocks, eng_notation, filter, gr from gnuradio.eng_arg import eng_float,...
migrations
upgrade41
""" Migration 41 - Resistance plating tiericide """ CONVERSIONS = { 16345: ( # Upgraded Layered Coating I 16347, # Limited Layered Plating I 16349, # 'Scarab' Layered Plating I 16351, # 'Grail' Layered Plating I ), 16305: ( # Upgraded Multispectrum Coating I 16307, # ...
gpodder
syncui
# -*- 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...
accounts
TurbobitNet
# -*- coding: utf-8 -*- import re import time from ..base.account import BaseAccount from ..helpers import parse_html_form, set_cookie class TurbobitNet(BaseAccount): __name__ = "TurbobitNet" __type__ = "account" __version__ = "0.14" __status__ = "testing" __description__ = """TurbobitNet accoun...
migrations
0246_integrations
# Generated by Django 3.2.13 on 2022-06-24 07:06 import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0245_silence_deprecated_tags_warnings"), ] operations = [ migra...
migrations
0247_feature_flags_experience_continuity
# Generated by Django 3.2.13 on 2022-06-22 11:22 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0246_integrations"), ] operations = [ migrations.AddField( model_name="featureflag",...
UML
propertypages
from gaphor import UML from gaphor.core import transactional from gaphor.diagram.propertypages import ( LabelValue, PropertyPageBase, new_resource_builder, ) from gi.repository import Gio new_builder = new_resource_builder("gaphor.UML") class TypedElementPropertyPage(PropertyPageBase): order = 31 ...
libs
taskbarprogress
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ####################################################################### # # VidCutter - media cutter & joiner # # copyright © 2018 Pete Alexandrou # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
downloaders
OverLoadMe
# -*- coding: utf-8 -*- import json from pyload.core.utils import parse from ..base.multi_downloader import MultiDownloader class OverLoadMe(MultiDownloader): __name__ = "OverLoadMe" __type__ = "downloader" __version__ = "0.20" __status__ = "testing" __pattern__ = r"https?://.*overload\.me/.+"...
borg
remote
import atexit import errno import functools import inspect import logging import os import queue import select import shlex import shutil import socket import struct import sys import tempfile import textwrap import time import traceback from subprocess import PIPE, Popen import borg.logger from . import __version__ ...
chardet
charsetgroupprober
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
plugins
tracker_url_remover
""" searx 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 License, or (at your option) any later version. searx is distributed in the hope that it will be useful, but WITHOUT ANY WA...
deluge
common
# # Copyright (C) 2007,2008 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. # """Common functions for v...
chardet
cp949prober
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
schema
person_distinct_ids
from typing import Dict, List from posthog.hogql.database.argmax import argmax_select from posthog.hogql.database.models import ( BooleanDatabaseField, FieldOrTable, IntegerDatabaseField, LazyJoin, LazyTable, StringDatabaseField, Table, ) from posthog.hogql.database.schema.persons import Pe...
api
settings
__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 logging import re import octoprint.plugin import octoprint.util from flask ...
core
ConfigDefs
##################################################################### # Frets on Fire X (FoFiX) # # Copyright (C) 2012 FoFiX Team # # # # This program is free software; you can...
scripts
renders_update
#!/usr/bin/env python3 """ This script updates ship renders and removes unused ones. """ import argparse import os import re import sqlite3 from PIL import Image parser = argparse.ArgumentParser( description="This script updates ship renders for pyfa" ) parser.add_argument( "-r", "--renders", requi...
gtkui
submenu
# # Copyright (C) 2008 Martijn Voncken <mvoncken@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 logging from deluge i...
fpr
views
from django.contrib import messages from django.contrib.auth.decorators import user_passes_test from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render from django.urls import reverse from django.utils.translation import ugettext as _ from fpr import forms as fprforms from fpr i...
lib
hooks
# 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, ...
linux
build
import stat import subprocess from pathlib import Path from typing import Iterator, Tuple BUILD_DIR = Path(__file__).parent HTTPIE_DIR = BUILD_DIR.parent.parent.parent EXTRAS_DIR = HTTPIE_DIR / "extras" MAN_PAGES_DIR = EXTRAS_DIR / "man" SCRIPT_DIR = BUILD_DIR / Path("scripts") HOOKS_DIR = SCRIPT_DIR / "hooks" DIST...
qbittorrent
client
import json import requests class LoginRequired(Exception): def __str__(self): return "Please login first." class Client(object): """class to interact with qBittorrent WEB API""" def __init__(self, url): if not url.endswith("/"): url += "/" self.url = url s...
extractor
faz
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_etree_fromstring from ..utils import int_or_none, xpath_element, xpath_text from .common import InfoExtractor class FazIE(InfoExtractor): IE_NAME = "faz.net" _VALID_URL = r"https?://(?:www\.)?faz\.net/(?:[^/]+/)*.*...
PartDesignTests
TestMultiTransform
# *************************************************************************** # * Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
serializers
resolution_notes
from apps.alerts.models import AlertGroup, ResolutionNote from common.api_helpers.custom_fields import ( OrganizationFilteredPrimaryKeyRelatedField, UserIdField, ) from common.api_helpers.exceptions import BadRequest from common.api_helpers.mixins import EagerLoadingMixin from rest_framework import serializers ...
providers
caa_release_group
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2014-2016, 2018-2021 Laurent Monin # Copyright (C) 2017 Sambhav Kothari # Copyright (C) 2020 Philipp Wolfer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public...
youtube-dl
cache
from __future__ import unicode_literals import errno import json import os import re import shutil import traceback from .compat import compat_getenv from .compat import compat_open as open from .utils import ( error_to_compat_str, expand_path, is_outdated_version, try_get, write_json_file, ) from...
prototypes
jsregexp
class RegExpPrototype: def toString(): flags = "" if this.glob: flags += "g" if this.ignore_case: flags += "i" if this.multiline: flags += "m" v = this.value if this.value else "(?:)" return "/%s/" % v + flags def test(string):...
templatetags
shelf_tags
""" Filters and tags related to shelving books """ from bookwyrm import models from bookwyrm.utils import cache from django import template from django.utils.translation import gettext_lazy as _ register = template.Library() SHELF_NAMES = { "all": _("All books"), "to-read": _("To Read"), "reading": _("Cu...
communities
search
from __future__ import annotations import logging from typing import Any import whoosh.fields as wf import whoosh.query as wq from abilian.sbe.app import Application from flask import g from flask_login import current_user from whoosh.query.compound import Or from whoosh.query.terms import Term from .models import M...
components
ldap_auth
from os import environ from django.core.exceptions import ImproperlyConfigured try: import ldap from django_auth_ldap import config as ldap_config except ImportError: raise ImproperlyConfigured( "python-ldap and django-auth-ldap must be installed to use LDAP authentication." ) # All LDAP use...
vocoder
qa_codec2_vocoder
#!/usr/bin/env python # # Copyright 2011,2013,2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import blocks, gr, gr_unittest, vocoder from gnuradio.vocoder import codec2 class test_codec2_vocoder(gr_unittest.TestCase): def se...
downloaders
PixeldrainCom
# -*- coding: utf-8 -*- import json import re from ..base.simple_downloader import SimpleDownloader class PixeldrainCom(SimpleDownloader): __name__ = "PixeldrainCom" __type__ = "downloader" __version__ = "0.02" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?pixeldrain\.com/u/(?P<ID>\...
blocks
qa_endian_swap
#!/usr/bin/env python # # Copyright 2011-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import ctypes from gnuradio import blocks, gr, gr_unittest class test_endian_swap(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_bl...
migrations
0005_add_fields_to_depositrecord
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-11-26 11:51 import django.contrib.postgres.fields.jsonb from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("deposit", "0004_disable_repositories_and_add_urls"), ] operations = [ m...
cli
systeminfo
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import datetime import logging import os import click from octoprint.cli import init_platform_for_cli, standard_options from ...
quickinsert
tool
# 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 ...
extractor
fusion
from __future__ import unicode_literals from ..utils import determine_ext, int_or_none, mimetype2ext, parse_iso8601 from .common import InfoExtractor class FusionIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?fusion\.(?:net|tv)/(?:video/|show/.+?\bvideo=)(?P<id>\d+)" ) _TESTS = [ ...
CuraEngineBackend
CuraEngineBackend
# Copyright (c) 2022 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. import argparse # To run the engine in debug mode if the front-end is in debug mode. import os import sys from collections import defaultdict from time import time from typing import TYPE_CHECKING, Any, Dict, List, Optional, ...
equations
linear
# *************************************************************************** # * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> * # * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * Th...
CIMicroPaint
CIMicroPaintView
import objc from Cocoa import * from Quartz import * from SampleCIView import SampleCIView class CIMicroPaintView (SampleCIView): imageAccumulator = objc.ivar() brushFilter = objc.ivar() compositeFilter = objc.ivar() color = objc.ivar() brushSize = objc.ivar...
ui
ui_win_compat_dialog
# -*- 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_WinCompatDialog(object): def setupUi(self, WinCompatDialog): WinCompatDialog.setObjectName("WinCompatDialog") WinCompatDialog.setWin...
PyObjCTest
test_nspasteboard
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSPasteboard(TestCase): def testConstants(self): self.assertIsInstance(NSStringPboardType, unicode) self.assertIsInstance(NSFilenamesPboardType, unicode) self.assertIs...
serializers
maintenance
import datetime import typing from apps.alerts.models import MaintainableObject from rest_framework import serializers class MaintainableObjectSerializerMixin(serializers.Serializer): maintenance_mode = serializers.SerializerMethodField() # For some reason maintenance_started_at's format is flaky. Forcing t...
decrypters
ArchiveOrgFolder
# -*- coding: utf-8 -*- import re from ..base.decrypter import BaseDecrypter class ArchiveOrgFolder(BaseDecrypter): __name__ = "ArchiveOrgFolder" __type__ = "decrypter" __version__ = "0.01" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?archive\.org/details/.+" __config__ = [ ...
gui
frame
# ============================================================================= # 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 ...