section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
apiv1
login
# 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, ...
femobjects
mesh_region
# *************************************************************************** # * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
printdlg
ruler
# -*- coding: utf-8 -*- # # Copyright (C) 2016 by Ihor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
api
personal_api_key
from typing import Type, cast from posthog.models import PersonalAPIKey, User from posthog.models.personal_api_key import hash_key_value from posthog.models.utils import generate_random_token_personal from rest_framework import mixins, response, serializers, viewsets class PersonalAPIKeySerializer(serializers.ModelS...
draftguitools
gui_layers
# *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * Th...
calculix
write_constraint_initialtemperature
# *************************************************************************** # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
plugins
tvtoya
""" $description Polish live TV channel owned by Toya. $url tvtoya.pl $type live """ import re from streamlink.plugin import Plugin, PluginError, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls import HLSStream @pluginmatcher( re.compile( r"https?://(?:www\.)?tvtoya\....
Code
EnginesLinux64
# -*- coding: utf-8 -*- import collections from Code import BaseConfig def leeRivales(): dicRivales = collections.OrderedDict() def mas(cm): dicRivales[cm.clave] = cm ConfigMotor = BaseConfig.ConfigMotor cm = ConfigMotor( "cheng", "Martin Sedlák", "4 ver 0.39", "http://www.vlasak....
connectors
openlibrary
""" openlibrary data connector """ import re from typing import Any, Iterable, Iterator, Optional, Union from bookwyrm import models from bookwyrm.book_search import SearchResult from bookwyrm.utils.sanitizer import clean from markdown import markdown from .abstract_connector import ( AbstractConnector, JsonD...
Gui
Adaptive
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2018 Kresimir Tusek <kresimir.tusek@gmail.com> * # * * # * This file is part of the FreeCAD CAx development system....
audio
tags
import collections import datetime import logging import numbers from mopidy.internal import log from mopidy.internal.gi import GLib, Gst from mopidy.models import Album, Artist, Track logger = logging.getLogger(__name__) def repr_tags(taglist, max_bytes=10): """Returns a printable representation of a :class:`G...
z88
writer
# *************************************************************************** # * Copyright (c) 2017 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
Tools
makedist
#! python # -*- coding: utf-8 -*- # (c) 2006 Werner Mayer LGPL # # Python script to make source tarballs. # import getopt import gzip import io import os import platform import shutil import subprocess import sys import tarfile import time def main(): bindir = "." major = "0" minor = "0" dfsg = False...
formats
midi
# 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 mutagen.smf import SMF from ....
builders
region_similarity_calculator_builder
# 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...
builders
losses_builder
# 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...
QT
PantallaTab
import collections from Code.QT import Colocacion, Controles, Iconos, QTVarios from PyQt4 import QtCore, QtGui class SelectUna(Controles.LB): def __init__(self, owner, pmVacio, siAddText): self.owner = owner self.pixmap = None self.id = None self.toolTip = None self.selecc...
draftguitools
gui_lines
# *************************************************************************** # * (c) 2009 Yorik van Havre <yorik@uncreated.net> * # * (c) 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
notes
key
from sglib import constants from sgui import shared as glbl_shared from sgui.daw import shared from sgui.sgqt import QApplication, QColor, QGraphicsRectItem class PianoKeyItem(QGraphicsRectItem): """This is a piano key on the PianoRollEditor""" def __init__( self, a_piano_width, a_not...
drone
projectedRemove
import wx from gui.fitCommands.helpers import DroneInfo from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcRemoveProjectedDroneCommand(wx.Command): def __init__(self, fitID, itemID, amount): wx.Command.__init__(self, True, "Remove Projected Drone") self.fi...
Code
Configuracion
# -*- coding: utf-8 -*- import operator import os import shutil from Code import ( BaseConfig, CajonDesastre, MotoresExternos, Traducir, TrListas, Util, VarGen, ) from Code.Constantes import * from PyQt4 import QtGui from PyQt4.QtCore import Qt if VarGen.isLinux32: import Code.Engines...
documents
tasks
"""Celery tasks related to document transformation and preview.""" from __future__ import annotations import logging from contextlib import contextmanager from typing import TYPE_CHECKING, Iterator from abilian.core.extensions import db from abilian.services import converter, get_service from abilian.services.convers...
migrations
0050_remove_magic_links
"""Migration to replace magic links with unit variables.""" from collections import namedtuple from django.db import migrations from main.models import Job # Can't use apps.get_model for this model as we need to access class attributes. def data_migration(apps, schema_editor): """Replace magic links with unit v...
migrations
0002_archivesspaceconfig
import main.models from django.db import migrations, models def insert_data(apps, schema_editor): # Insert default values into the ArchivesSpaceConfig table. # Leaving all other values null/blank is consistent with default ATK config. ArchivesSpaceConfig = apps.get_model("administration", "ArchivesSpaceCo...
softwareupdate
util
__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 from octoprint.util.platform import CLOSE_FDS from .exceptions im...
Gui
Fixture
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2015 Dan Falck <ddfalck@gmail.com> * # * * # * This program is free software; you can redistribute it a...
QT
PantallaEntMaq
import os from Code import Books, ControlPosicion, Personalidades, Util from Code.Constantes import * from Code.QT import ( Colocacion, Controles, FormLayout, Iconos, Motores, PantallaAperturas, PantallaMotores, PantallaTutor, QTUtil, QTUtil2, QTVarios, Voyager, ) from P...
commandFit
toggleStates
import wx from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcToggleCommandFitStatesCommand(wx.Command): def __init__(self, fitID, mainCommandFitID, commandFitIDs, forceStates=None): wx.Command.__init__(self, True, "Toggle Command Fit States") self.fitID = ...
states
propertypages
"""State items property pages. To register property pages implemented in this module, it is imported in gaphor.adapter package. """ from __future__ import annotations from gaphor import UML from gaphor.core import transactional from gaphor.diagram.propertypages import ( LabelValue, PropertyPageBase, Prop...
PyObjCTest
test_nsworkspace
import os import objc from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSWorkspace(TestCase): def testInfoForFile(self): ws = NSWorkspace.sharedWorkspace() # A method with 2 output parameters, this means the result ...
declaration
utils
# -*- coding: utf-8 -*- from typing import Any, Callable, Dict, Generic, TypeVar T = TypeVar("T", bound=Callable[..., Any]) class FormatHandler(Generic[T]): """Registry for different implementations of serializers, loaders, etc. Allows to collect a set of functions that can handle certain base value in ...
PyObjCTest
test_nsoperation
from Foundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSOperation(TestCase): def testConstants(self): self.assertEqual(NSOperationQueuePriorityVeryLow, -8) self.assertEqual(NSOperationQueuePriorityLow, -4) self.assert...
WizardShaft
SegmentFunction
# -*- coding: utf-8 -*- # /****************************************************************************** # * Copyright (c) 2012 Jan Rheinländer <jrheinlaender@users.sourceforge.net> * # * * # * This file is part of the FreeCAD CAx developme...
migrations
0081_package_status
# Generated by Django 1.11.29 on 2021-05-17 18:39 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("main", "0080_delete_software_agent"), ] operations = [ migrations.AddField( model_name="sip", name="completed_at", ...
storage
sqlite
""" Sqlite Inventory """ import sqlite3 import time from threading import RLock from helper_sql import SqlBulkExecute, sqlExecute, sqlQuery from storage import InventoryItem, InventoryStorage class SqliteInventory(InventoryStorage): # pylint: disable=too-many-ancestors """Inventory using SQLite""" def __in...
polar
testbed
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # SPDX-License-Identifier: GPL-3.0-or-later # # import matplotlib.pyplot as plt import numpy as np from . import channel_construction as cc from .decoder import PolarDecoder from .encoder import PolarEncoder from .helper_functions import power...
plugins
delay
# -*- coding: utf-8 -*- """ This file is part of the Stargate project, Copyright Stargate Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 3 of the License. This program is distributed in...
plugins
nimotv
""" $description Chinese, global live-streaming platform run by Huya Live. $url nimo.tv $type live $metadata author $metadata category $metadata title """ import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import useragents, validate from streamlink.stream.http imp...
util
script_detector_weighted
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2021 Bob Swift # Copyright (C) 2021 Philipp Wolfer # Copyright (C) 2021-2022 Laurent Monin # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as pub...
transport
http
""" raven.transport.http ~~~~~~~~~~~~~~~~~~~~ :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.conf import defaults from raven.exceptions import APIError, RateLimited from raven.transport.base...
plugins
lnk
""" $description Lithuanian live TV channels from LNK Group, including 2TV, BTV, Info TV, LNK and TV1. $url lnk.lt $type live $metadata id $metadata author $metadata category $metadata title $region Lithuania """ import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api i...
PathTests
TestRefactoredGrblPost
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2022 sliptonic <shopinthewoods@gmail.com> * # * Copyright (c) 2022 Larry Woestman <LarryWoestman2@gmail.com> * # * ...
extractors
dom
__package__ = "archivebox.extractors" from pathlib import Path from typing import Optional from ..config import CHROME_VERSION, SAVE_DOM, TIMEOUT from ..index.schema import ArchiveError, ArchiveOutput, ArchiveResult, Link from ..logging_util import TimedProgress from ..system import atomic_write, chmod_file, run from...
aliceVision
LdrToHdrMerge
__version__ = "4.1" 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....
sandbox
filter_overlap_add
from pylab import * from scipy.signal.filter_design import ellip, freqz, iirdesign from scipy.signal.fir_filter_design import remez from scipy.signal.signaltools import lfilter figure() N = 2**13 fs = 44100.0 x = arange(0, N) / fs f1 = 18000.0 f2 = 2000.0 # signal y = sin(2 * pi * x * f1) + sin(2 * pi * x * f2) # wi...
migrations
0146_auto_20220316_2320
# Generated by Django 3.2.12 on 2022-03-16 23:20 import bookwyrm.models.fields from bookwyrm.models import Shelf from django.db import migrations def add_shelves(apps, schema_editor): """add any superusers to the "admin" group""" db_alias = schema_editor.connection.alias shelf_model = apps.get_model("bo...
webengine
webenginequtescheme
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """QtWebEngine specific qute://* handlers and glue code.""" from qutebrowser.browser import qutescheme from qutebrowser.qt.core import QBuffer, QByteArray, QIODevice, QUrl from qutebrowser.qt.w...
readability
htmls
import re import lxml.html from lxml.html import tostring from .cleaners import clean_attributes, normalize_spaces from .compat import str_ from .encoding import get_encoding utf8_parser = lxml.html.HTMLParser(encoding="utf-8") def build_doc(page): if isinstance(page, str_): encoding = None dec...
guitarscene
Rockmeter
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire # # Copyright (C) 2009 Blazingamer <n_hydo...
iomediator
windowgrabber
# -*- coding: utf-8 -*- # Copyright (C) 2011 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 3 of the License, or # (at your option) any later version. # # This pr...
draftviewproviders
view_text
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * Co...
Gui
Drilling
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
kibitzr
travis_pypi_setup
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file """ from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.a...
gui
test_dummy
# *************************************************************************** # * Copyright (c) 2021 Chris Hennes <chennes@pioneerlibrarysystem.org> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
src
class_objectProcessor
""" The objectProcessor thread, of which there is only one, processes the network objects """ # pylint: disable=too-many-locals,too-many-return-statements # pylint: disable=too-many-branches,too-many-statements import hashlib import logging import random import subprocess # nosec B404 import threading import time from...
util
flask
from flask import make_response __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 functools import hashlib import hmac import...
api
hook
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later # pylint: disable=invalid-name """Hooks for extensions.""" import importlib from typing import Any, Callable from qutebrowser.extensions import loader def _add_module_info(func: Callable[.....
classes
classestoolbox
"""The definition for the classes section of the toolbox.""" from gaphas.item import SE from gaphor import UML from gaphor.core import gettext from gaphor.diagram.diagramtoolbox import ToolDef, ToolSection, new_item_factory from gaphor.UML import diagramitems from gaphor.UML.toolboxconfig import namespace_config def...
fta
basicevent
"""Basic Event item definition.""" from gaphas.geometry import Rectangle from gaphor.core.modeling import DrawContext from gaphor.diagram.presentation import ( Classified, ElementPresentation, from_package_str, ) from gaphor.diagram.shapes import Box, IconBox, Text, ellipse, stroke from gaphor.diagram.supp...
ZeroNet
update
import json import os import re import shutil import sys def update(): from Config import config config.parse(silent=True) if getattr(sys, "source_update_dir", False): if not os.path.isdir(sys.source_update_dir): os.makedirs(sys.source_update_dir) source_path = sys.source_upd...
datastore
cli
# encoding: utf-8 import logging import os from typing import Any import ckan.logic as logic import ckanext.datastore as datastore_module import click from ckan.common import config from ckan.model import parse_db_config from ckanext.datastore.backend.postgres import identifier from ckanext.datastore.blueprint import...
printing
winspool
# -*- coding: utf-8 -*- # # Winspoll connector # # Copyright (C) 2016 by Ihor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
settings
test
# flake8: noqa # This file is part of Archivematica. # # Copyright 2010-2017 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 ve...
pynocchio
comic_file_loader_factory
import logging from .comic_file_loader_dir import ComicDirLoader, is_directory from .comic_file_loader_image import ComicImageLoader from .comic_file_loader_rar import ComicRarLoader, is_rarfile from .comic_file_loader_tar import ComicTarLoader, is_tarfile from .comic_file_loader_zip import ComicZipLoader, is_zipfile ...
desktop
exportlocal
# -*- 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...
orm-bindings
metadata_node
from pony import orm from tribler.core.components.metadata_store.db.serialization import ( METADATA_NODE, MetadataNodePayload, ) def define_binding(db): class MetadataNode(db.ChannelNode): """ This ORM class extends ChannelNode by adding metadata-storing attributes such as "title" and "tag...
neubot
runner_dload
# neubot/runner_dload.py # # Copyright (c) 2012 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 Publi...
stats
stats
class Stats(object): def __init__(self, start_date=None): self._start_date = None self._end_date = None self._aggregated_by = None self._sort_by_metric = None self._sort_by_direction = None self._limit = None self._offset = None # Minimum required for...
extractor
clyp
from __future__ import unicode_literals from ..compat import compat_parse_qs, compat_urllib_parse_urlparse from ..utils import float_or_none, unified_timestamp from .common import InfoExtractor class ClypIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?clyp\.it/(?P<id>[a-z0-9]+)" _TESTS = [ { ...
cli
server
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import logging import sys import click from octoprint.cli import ( bulk_options, get_ctx_obj_option, set_ctx_obj_...
misc
create_launcher
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2016 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any late...
VersionUpgrade462to47
VersionUpgrade462to47
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import configparser import io from typing import Dict, List, Set, Tuple from UM.Util import parseBool from UM.VersionUpgrade import VersionUpgrade # Renamed definition files _RENAMED_DEFINITION_DICT = { "dagoma_discoe...
PrinterOutput
GenericOutputController
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING, Optional, Set, Union from PyQt6.QtCore import QTimer from .PrinterOutputController import PrinterOutputController if TYPE_CHECKING: from .Models.ExtruderOutputModel import ExtruderOu...
api
feature_flag
import json from typing import Any, Dict, List, Optional, cast from django.conf import settings from django.db.models import Q, QuerySet from posthog.api.dashboards.dashboard import Dashboard from posthog.api.forbid_destroy_model import ForbidDestroyModel from posthog.api.routing import StructuredViewSetMixin from pos...
interactions
interaction
"""Interaction diagram item.""" from gaphor import UML from gaphor.core.styling import JustifyContent, TextAlign from gaphor.diagram.presentation import ElementPresentation, Named from gaphor.diagram.shapes import Box, Text, stroke from gaphor.diagram.support import represents from gaphor.UML.recipes import stereotype...
femtaskpanels
task_constraint_electrostaticpotential
# *************************************************************************** # * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> * # * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> * # * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> * # * ...
auth
activation
# -*- coding: utf-8 -*- """ flaskbb.core.auth.activation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Interfaces for handling account activation in FlaskBB :copyright: (c) 2014-2018 the FlaskBB Team :license: BSD, see LICENSE for more details """ from abc import ABC, abstractmethod class AccountActivator(ABC...
docs
conf
# -*- coding: utf-8 -*- # # DrawBot documentation build configuration file, created by # sphinx-quickstart on Wed Sep 11 22:57:28 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...
analog
qa_quadrature_demod
#!/usr/bin/env python # # Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import cmath from gnuradio import analog, blocks, gr, gr_unittest class test_quadrature_demod(gr_unittest.TestCase): def setUp(self): self.tb...
migrations
0037_auto_20210118_1954
# Generated by Django 3.0.7 on 2021-01-18 19:54 from django.db import migrations, models def empty_to_null(apps, schema_editor): User = apps.get_model("bookwyrm", "User") db_alias = schema_editor.connection.alias User.objects.using(db_alias).filter(email="").update(email=None) def null_to_empty(apps, s...
VersionUpgrade21to22
MachineInstance
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import configparser # To read config files. import io # To write config files to strings as if they were files. import os.path # To get the path to write new user profiles to. import urllib # To serialise the user conta...
api
search
# This file is part of Supysonic. # Supysonic is a Python implementation of the Subsonic server API. # # Copyright (C) 2013-2022 Alban 'spl0k' Féron # # Distributed under terms of the GNU AGPLv3 license. from collections import OrderedDict from datetime import datetime from flask import request from ..db import Albu...
cssselect
tests
#!/usr/bin/env python # coding: utf8 """ Tests for cssselect =================== These tests can be run either by py.test or by the standard library's unittest. They use plain ``assert`` statements and do little reporting themselves in case of failure. Use py.test to get fancy error reporting ...
decrypters
FreakhareComFolder
# -*- coding: utf-8 -*- import re from ..base.simple_decrypter import SimpleDecrypter class FreakhareComFolder(SimpleDecrypter): __name__ = "FreakhareComFolder" __type__ = "decrypter" __version__ = "0.09" __status__ = "testing" __pattern__ = r"http://(?:www\.)?freakshare\.com/folder/.+" __c...
extractor
motorsport
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_urlparse from .common import InfoExtractor class MotorsportIE(InfoExtractor): IE_DESC = "motorsport.com" _VALID_URL = r"https?://(?:www\.)?motorsport\.com/[^/?#]+/video/(?:[^/?#]+/)(?P<id>[^/]+)/?(?:$|[?#])" _TEST = { ...
examples
roundedRect
def roundedRect( x, y, w, h, radius, radiusBottomRight=None, radiusTopRight=None, radiusTopLeft=None ): """ Draw a rounded rect from position `x`, `y` with given width and height and given `radius`. A radiuses that exceeds the width or height of the rectangle will be clipped. Optionally a radius c...
helpers
request
from functools import wraps from flask import request from pydantic import ValidationError, create_model ARG_LOCATIONS = { "query": lambda: request.args, "json": lambda: request.get_json(), "form": lambda: request.form, "headers": lambda: request.headers, "cookies": lambda: request.cookies, } de...
Models
PrinterOutputModel
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING, Dict, List, Optional from cura.PrinterOutput.Models.ExtruderOutputModel import ExtruderOutputModel from cura.PrinterOutput.Models.PrinterConfigurationModel import ( PrinterConfiguratio...
src
Song
# -*- coding: utf-8 -*- # MusicPlayer, https://github.com/albertz/music-player # Copyright (c) 2012, Albert Zeyer, www.az2000.de # All rights reserved. # This code is under the 2-clause BSD license, see License.txt in the root directory of this project. from __future__ import print_function import Traits import utils...
lib
js
#!/usr/bin/env python # 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 #...
events
telepathy_status
# Quod Libet Telepathy Plugin # Copyright 2012 Christoph Reiter # 2012,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 op...
clientScripts
bind_pids
#!/usr/bin/env python # This file is part of Archivematica. # # Copyright 2010-2017 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, ei...
builtinItemStatsViews
itemDescription
# noinspection PyPackageRequirements import re import wx # noinspection PyPackageRequirements import wx.html _t = wx.GetTranslation class ItemDescription(wx.Panel): def __init__(self, parent, stuff, item): wx.Panel.__init__(self, parent) mainSizer = wx.BoxSizer(wx.VERTICAL) self.SetSize...
docsrc
conf
# -*- coding: utf-8 -*- # # puddletag documentation build configuration file, created by # sphinx-quickstart on Tue Mar 22 20:40:26 2011. # # 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...
extractor
chilloutzone
from __future__ import unicode_literals import json import re from ..compat import compat_b64decode from ..utils import ExtractorError, clean_html from .common import InfoExtractor from .youtube import YoutubeIE class ChilloutzoneIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?chilloutzone\.net/video/(?P<i...
migrations
0006_event_definition_verification
# Generated by Django 3.2.5 on 2022-01-17 20:13 import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("ee", "0005_project_based_...
orm-bindings
vsids
import datetime import math from pony import orm from pony.orm import db_session from tribler.core.components.metadata_store.db.orm_bindings.channel_node import ( LEGACY_ENTRY, ) def define_binding(db): # ACHTUNG! This thing should be used as a singleton, i.e. there should be only a single row there! # W...
archiver
_common
import argparse import functools import os import textwrap import borg from ..archive import Archive from ..cache import Cache, assert_secure from ..constants import * # NOQA from ..helpers import ( Error, Highlander, Location, SortBySpec, location_validator, positive_int_validator, relat...
books
kftoutiao
#!/usr/bin/env python # -*- coding:utf-8 -*- import string import urllib from base import BaseFeedBook # 继承基类BaseFeedBook from bs4 import BeautifulSoup # 导入BeautifulSoup处理模块 from bs4 import element from config import SHARE_FUCK_GFW_SRV from lib.urlopener import URLOpener # 导入请求URL获取页面内容的模块 # 返回此脚本定义的类名 def getBo...
migrations
0283_prompt_sequence_model
# Generated by Django 3.2.16 on 2022-12-06 09:32 import django.contrib.postgres.fields 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 = [ ("posthog", "0282_fix_insi...