section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
models
relationship
""" defines relationships between users """ from bookwyrm import activitypub from django.core.cache import cache from django.db import IntegrityError, models, transaction from django.db.models import Q from . import fields from .activitypub_mixin import ActivityMixin, ActivitypubMixin, generate_activity from .base_mod...
transforms
property_types
from typing import Dict, Literal, Optional, Set, cast from posthog.hogql import ast from posthog.hogql.context import HogQLContext from posthog.hogql.database.models import DateTimeDatabaseField from posthog.hogql.escape_sql import escape_hogql_identifier from posthog.hogql.parser import parse_expr from posthog.hogql....
misc
offsets
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # show all possible offsets, in order of popularity, from a download of # http://www.accuraterip.com/driveoffsets.htm import sys from bs4 import BeautifulSoup if len(sys.argv) < 2: print("Usage: %s driveoffsets_file" % sys.argv[0], file=sys.stderr) raise Sys...
draftfunctions
offset
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
frescobaldi-app
lydocument
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2013 - 2014 by Wilbert Berendsen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 ...
types
views
import typing from .blocks import Block from .composition_objects import CompositionObjectPlainText class ModalView(typing.TypedDict): """ [Documentation](https://api.slack.com/surfaces/modals#view-object-fields) """ type: typing.Literal["modal"] """ Required. The type of view. Set to `modal...
gui
footer
# This file is part of MyPaint. # Copyright (C) 2015 by Andrew Chadwick <a.t.chadwick@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 2 of the License, or # (at your ...
python
spectrum_inversion
#!/usr/bin/env python # # Copyright 2004,2005,2007,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # # Gang - Here's a simple script that demonstrates spectrum inversion # using the multiply by [1,-1] method (mixing with Nyquist frequency). # Requi...
extractor
tubitv
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ExtractorError, int_or_none, sanitized_Request, urlencode_postdata from .common import InfoExtractor class TubiTvIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?tubitv\.com/(?:video|movies|tv-shows)/(?P<id>[0-9]...
equations
magnetodynamic_writer
# *************************************************************************** # * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
deposit
admin
# -*- 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 Affero General Public License # as published by the Free Software Foundation; either version 2 # of th...
activitypub
person
""" actor serializer """ from dataclasses import dataclass, field from typing import Dict from .base_activity import ActivityObject from .image import Image # pylint: disable=invalid-name @dataclass(init=False) class PublicKey(ActivityObject): """public key block""" owner: str publicKeyPem: str type...
accounts
FilefactoryCom
# -*- coding: utf-8 -*- import re import time from ..base.account import BaseAccount class FilefactoryCom(BaseAccount): __name__ = "FilefactoryCom" __type__ = "account" __version__ = "0.23" __status__ = "testing" __description__ = """Filefactory.com account plugin""" __license__ = "GPLv3" ...
QT
BasicMenus
from Code import Albums, Util, VarGen from Code.QT import Colocacion, Columnas, Controles, Delegados, Grid, Iconos, QTVarios class SaveMenu: def __init__(self, dicDatos, launcher, rotulo=None, icono=None): self.liopciones = [] self.rotulo = rotulo self.icono = icono self.dicDatos =...
cmd
damage
from __future__ import absolute_import import os import random from bup import options from bup.compat import argv_bytes, bytes_from_uint from bup.helpers import log from bup.io import path_msg def randblock(n): return b"".join(bytes_from_uint(random.randrange(0, 256)) for i in range(n)) optspec = """ bup dam...
meshes
mesh_buckling_ibeam_tria6
def create_nodes(femmesh): # nodes femmesh.addNode(0.0, 0.0, 0.0, 1) femmesh.addNode(0.0, 75.0, 0.0, 2) femmesh.addNode(10000.0, 75.0, 0.0, 3) femmesh.addNode(10000.0, 0.0, 0.0, 4) femmesh.addNode(0.0, 150.0, 0.0, 5) femmesh.addNode(10000.0, 150.0, 0.0, 6) femmesh.addNode(0.0, 0.0, 278.6...
ext
notifications
# -*- encoding: utf-8 -*- import io import json import logging import smtplib import socket import time from _thread import start_new_thread from email.message import EmailMessage from email.utils import formatdate from urllib.parse import quote logger = logging.getLogger("isso") try: import uwsgi except ImportE...
daemon
client
# This file is part of Supysonic. # Supysonic is a Python implementation of the Subsonic server API. # # Copyright (C) 2019 Alban 'spl0k' Féron # # Distributed under terms of the GNU AGPLv3 license. from multiprocessing.connection import Client from ..config import get_current_config from ..utils import get_secret_ke...
protos
faster_rcnn_pb2
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: object_detection/protos/faster_rcnn.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.protob...
BasicDrawing
EPSPrinting
import sys import BitmapContext import objc import Quartz import Utilities from Quartz import * # We're using a function that isn't made available through a wrapper, just # load it manually: if not hasattr(Quartz, "PMCGImageCreateWithEPSDataProvider"): functions = [ ("PMCGImageCreateWithEPSDataProvider", ...
feminout
importCcxDatResults
# *************************************************************************** # * Copyright (c) 2015 Przemo Firszt <przemo@firszt.eu> * # * Copyright (c) 2015 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * Th...
extractor
mitele
# coding: utf-8 from __future__ import unicode_literals from ..utils import int_or_none, parse_iso8601 from .telecinco import TelecincoIE class MiTeleIE(TelecincoIE): IE_DESC = "mitele.es" _VALID_URL = r"https?://(?:www\.)?mitele\.es/(?:[^/]+/)+(?P<id>[^/]+)/player" _TESTS = [ { "url...
extractor
malltv
# coding: utf-8 from __future__ import unicode_literals from ..utils import ( clean_html, dict_get, float_or_none, int_or_none, merge_dicts, parse_duration, try_get, ) from .common import InfoExtractor class MallTVIE(InfoExtractor): _VALID_URL = r"https?://(?:(?:www|sk)\.)?mall\.tv/(?...
pymarshal
csv
""" """ from typing import Any, Iterable, List, Optional, Tuple, Union from .util.marshal import * from .util.pm_assert import pm_assert from .util.type import * __all__ = [ "csv_cast_empty_str_to_none", "InitArgsError", "marshal_csv", "pm_assert", "type_assert", "type_assert_iter", "unm...
ui
theme
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2019-2022 Philipp Wolfer # Copyright (C) 2020-2021 Gabriel Ferreira # 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...
utils
np_box_ops
# 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...
action
util
from collections import Counter from typing import Counter as TCounter from typing import Dict, List, Literal, Optional, Tuple from posthog.constants import AUTOCAPTURE_EVENT, TREND_FILTER_TYPE_ACTIONS from posthog.hogql.hogql import HogQLContext from posthog.models import Entity, Filter from posthog.models.action imp...
core
urls
from core.views import ( AddView, HealthCheckView, HomepageView, PublicIndexView, SnapshotView, ) from django.conf import settings from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.urls import include, path from django.views import stati...
fallback
ecc
import hmac import os from .._ecc import ECC from ._jacobian import JacobianCurve from ._util import bytes_to_int, int_to_bytes, inverse, square_root_mod_prime from .aes import aes class EllipticCurveBackend: def __init__(self, p, n, a, b, g): self.p, self.n, self.a, self.b, self.g = p, n, a, b, g ...
views
admin
from datetime import datetime from ipaddress import ip_address import flask from nyaa import email, forms, models from nyaa.extensions import db app = flask.current_app bp = flask.Blueprint("admin", __name__, url_prefix="/admin") @bp.route("/log", endpoint="log", methods=["GET"]) def view_adminlog(): if not fla...
classes
settings
""" @file @brief This file loads and saves settings @author Noah Figg <eggmunkee@hotmail.com> @author Jonathan Thomas <jonathan@openshot.org> @author Olivier Girard <eolinwen@gmail.com> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenS...
KindleUnpack
mobi_html
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab from __future__ import absolute_import, division, print_function, unicode_literals from .compatibility_utils import PY2, utf8_str if PY2: range = xrange import re from .mobi_utils import fromBase32 # note: re requit...
bs4
testing
"""Helper classes for tests.""" # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __license__ = "MIT" import copy import functools import pickle import unittest from unittest import TestCase from bs4 import BeautifulSoup from bs4.builder import HTMLParserTreeBuilde...
nyaa
email
import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import requests from flask import current_app as app from nyaa import models class EmailHolder(object): """Holds email subject, recipient and content, so we have a general class for all mail backends.""" d...
duplicates
matchfuncs
try: from Levenshtein import jaro, jaro_winkler, ratio def _ratio(a, b): """Ratio The ratio by which the strings differ.""" return ratio(a, b) def _jaro(a, b): """Jaro The Jaro string similarity metric is intended for short strings like personal last names.""" ...
commands
notify_helm_install
import os from pprint import pprint import posthoganalytics from django.conf import settings from django.core.management.base import BaseCommand from posthog.utils import get_helm_info_env, get_machine_id class Command(BaseCommand): help = "Notify that helm install/upgrade has happened" def add_arguments(se...
lib
embeds
import math from datetime import datetime import pytz from pylons import app_globals as g from pylons import request from pylons import tmpl_context as c from pylons.controllers.util import abort from r2.controllers.reddit_base import UnloggedUser from r2.lib import js from r2.models import Account, NotFound from r2.m...
PyObjCTest
test_nsdata
import array import sys import objc from Foundation import * from PyObjCTest.testhelper import PyObjC_TestClass3 from PyObjCTools.TestSupport import * if sys.version_info[0] == 3: buffer = memoryview def array_frombytes(a, b): return a.frombytes(b) def array_tobytes(a): return a.tobytes(...
soundcloud
library
# Copyright 2016-2022 Nick Boultbee # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. from gi.repository import GLib fr...
jinja-templater
apply_jinja_template
import logging from django.conf import settings from jinja2 import TemplateAssertionError, TemplateSyntaxError, UndefinedError from jinja2.exceptions import SecurityError from .jinja_template_env import jinja_template_env logger = logging.getLogger(__name__) class JinjaTemplateError(Exception): def __init__(se...
analog
qa_rail_ff
#!/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 # # from gnuradio import analog, blocks, gr, gr_unittest def clip(x, lo, hi): if x < lo: return lo elif x > hi: return hi else: ...
wavefile
wavefile
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import unicode_literals """ Copyright 2012 David García Garzón This file is part of python-wavefile python-wavefile 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 ...
plugins
reverb
# -*- 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...
songsmenu
website_search
# Copyright 2011-2018 Nick Boultbee # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import os from urllib.parse impor...
conversions
releaseAug2020
""" Conversion pack for August 2020 release """ CONVERSIONS = { # Renamed items, extracted via diff file "Basic Energized EM Membrane": "'Basic' EM Energized Membrane", "Energized EM Membrane I": "EM Energized Membrane I", "Energized EM Membrane II": "EM Energized Membrane II", "Basic Energized Exp...
browser
qutescheme
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Backend-independent qute://* code. Module attributes: pyeval_output: The output of the last :pyeval command. _HANDLERS: The handlers registered via decorators. """ import collection...
lib
memcachestore
#!/usr/bin/env python # -*- coding:utf-8 -*- """GAE中不能直接使用WEB.PY的session,使用此Store代替dbstore""" import time import web from google.appengine.api import memcache from web.session import Store class MemcacheStore(Store): def __init__(self, memcache): self.memcache = memcache def __contains__(self, key):...
conversions
releaseMar2020
""" Conversion pack for March 2020 release """ CONVERSIONS = { # Renamed items "Micro Electrochemical Capacitor Booster I": "'Seed' Micro Capacitor Booster I", "Small Electrochemical Capacitor Booster I": "Small F-RX Compact Capacitor Booster", "Medium Electrochemical Capacitor Booster I": "Medium F-RX...
utils
json
""" raven.utils.json ~~~~~~~~~~~~~~~~~~~~~~~~ :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 import codecs import datetime import json import uuid try: JSONDecodeError = json.JSONDecodeError exce...
tools
shell
#!/usr/bin/env python # -*- coding: utf-8 -*- # MusicPlayer, https://github.com/albertz/music-player # Copyright (c) 2013, 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. import os import socket import sys import t...
util
xml
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2007 Lukáš Lalinský # Copyright (C) 2009 Carlin Mangar # Copyright (C) 2017 Sambhav Kothari # Copyright (C) 2018, 2020-2021 Laurent Monin # Copyright (C) 2019 Philipp Wolfer # # This program is free software; you can redistribu...
aliceVision
LightingEstimation
__version__ = "1.0" from meshroom.core import desc class LightingEstimation(desc.AVCommandLineNode): commandLine = "aliceVision_lightingEstimation {allParams}" category = "Utils" documentation = """ """ inputs = [ desc.File( name="input", label="SfMData", ...
-ext
fetch_md
# Sphinx extension defining the fetch_md directive # # Goal: # include the content of a given markdown file # # Usage: # .. fetch_md:: path/to/file.md # the filepath is relative to the project base directory # # Note: # some markdown files contain links to other files that belong to the project # since those links are ...
Gui
Job
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
manager
tp_manager
# 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, ...
tools
benchmark
#!/usr/bin/env python3 """Estimate and compare the performance of a list of revisions. """ __copyright__ = "Copyright (C) 2020 Martin Blais" __license__ = "GNU GPLv2" import argparse import os import subprocess def prevent_run_with_changes(): """Fail if some local changes exist.""" output = subprocess.chec...
xl
settings
# 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...
Resources
splash
# encoding: utf-8 """ Copyright 2009-2017 Olivier Belanger This file is part of SoundGrain. SoundGrain is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any lat...
canto-next
transform
# -*- 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...
archiver
help_cmd
import collections import functools import textwrap from ..constants import * # NOQA from ..helpers.nanorst import rst_to_terminal class HelpMixIn: helptext = collections.OrderedDict() helptext["patterns"] = textwrap.dedent( """ When specifying one or more file paths in a Borg command that s...
classes
klass
import logging from gaphor import UML from gaphor.core.format import format from gaphor.core.modeling.properties import attribute from gaphor.core.styling import ( FontStyle, FontWeight, JustifyContent, TextAlign, TextDecoration, ) from gaphor.diagram.presentation import ( Classified, Eleme...
ui
tablebaseddialog
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2016 Rahul Raturi # Copyright (C) 2018, 2021-2022 Laurent Monin # Copyright (C) 2019, 2021-2022 Philipp Wolfer # Copyright (C) 2020 Ray Bouchard # # This program is free software; you can redistribute it and/or # modify it unde...
docs
conf
#!/usr/bin/env python3 import os import sys from streamlink import __version__ as streamlink_version # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolu...
team
util
from datetime import timedelta from typing import Any, List from posthog.batch_exports.service import delete_schedule from posthog.cache_utils import cache_for from posthog.models.async_migration import is_async_migration_complete from posthog.temporal.client import sync_connect def delete_bulky_postgres_data(team_i...
addons
DeleteFinished
# -*- coding: utf-8 -*- from datetime import timedelta from pyload.core.utils.struct.style import style from ..base.addon import BaseAddon class DeleteFinished(BaseAddon): __name__ = "DeleteFinished" __type__ = "addon" __version__ = "1.19" __status__ = "testing" __config__ = [ ("enable...
clientScripts
examine_contents
#!/usr/bin/env python import multiprocessing import os from executeOrRunSubProcess import executeOrRun def concurrent_instances(): return multiprocessing.cpu_count() def main(job, target, output): args = ["bulk_extractor", target, "-o", output, "-M", "250", "-q", "-1"] try: os.makedirs(output) ...
PyObjCTest
test_cgdirectpalette
from PyObjCTools.TestSupport import * from Quartz.CoreGraphics import * try: long except NameError: long = int class TestCGDirectPalette(TestCase): def testStructs(self): v = CGDeviceByteColor() self.assertTrue(hasattr(v, "red")) self.assertTrue(hasattr(v, "green")) self.a...
config
router
# coding:utf-8 import logging from cactus.config.fallback import ConfigFallback from cactus.config.file import ConfigFile logger = logging.getLogger(__name__) class ConfigRouter(object): """ A router to manage a series of config files. """ def __init__(self, paths): """ Load all the...
restapi
channels_endpoint
import base64 import json from asyncio import CancelledError from binascii import unhexlify from pathlib import Path from aiohttp import ClientSession, ContentTypeError, web from aiohttp_apispec import docs, json_schema, querystring_schema from ipv8.REST.schema import schema from marshmallow.fields import Boolean, Int...
linters
directory
from pathlib import Path from typing import Iterator from ..diagnostic import Diagnostic from .linter import Linter class Directory(Linter): def __init__(self, file: Path, settings: dict) -> None: """Finds issues in the parent directory""" super().__init__(file, settings) def check(self) -> ...
digital
qa_fll_band_edge
#!/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 math import random from gnuradio import analog, blocks, digital, filter, gr, gr_unittest class test_fll_band_edge_cc(gr_unittest.TestCase): de...
management
views
# -*- coding: utf-8 -*- """ flaskbb.management.views ~~~~~~~~~~~~~~~~~~~~~~~~ This module handles the management views. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import logging import sys from celery import __version__ as celery_version from flask ...
cherrypy
_cpmodpy
"""Native adapter for serving CherryPy via mod_python Basic usage: ########################################## # Application in a module called myapp.py ########################################## import cherrypy class Root: @cherrypy.expose def index(self): return 'Hi there, Ho there, Hey there' # ...
ext
babelplugin
# ext/babelplugin.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 """gettext message extraction via Babel: http://babel.edgewall.org/""" from babel.messages.extr...
widgets
urlrequester
# 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 ...
documents
search
"""Indexing related utilities for Folder, Documents.""" from __future__ import annotations import sqlalchemy as sa from abilian.core.entities import Entity from abilian.core.extensions import db from abilian.sbe.apps.documents.models import Folder from abilian.services import get_service from .models import CmisObjec...
base
extractor
# -*- coding: utf-8 -*- import os import re from .plugin import BasePlugin class ArchiveError(Exception): """ raised when Archive error. """ class CRCError(Exception): """ raised when CRC error. """ class PasswordError(Exception): """ raised when password error. """ class B...
addons
HotFolder
# -*- coding: utf-8 -*- import os import shutil import time from ...core.datatypes.enums import Destination from ..base.addon import BaseAddon class HotFolder(BaseAddon): __name__ = "HotFolder" __type__ = "addon" __version__ = "0.27" __status__ = "testing" __config__ = [ ("enabled", "boo...
gui
brusheditor
# -*- coding: utf-8 -*- # This file is part of MyPaint. # Copyright (C) 2014-2018 by the MyPaint Development Team. # Copyright (C) 2007-2013 by Martin Renold <martinxyz@gmx.ch> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by...
mako
filters
# mako/filters.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 import codecs import re from mako import compat from mako.compat import codepoint2name, name2cod...
plover
misc
# Copyright (c) 2016 Open Steno Project # See LICENSE.txt for details. import os from plover.oslayer.config import CONFIG_DIR from plover.resource import ASSET_SCHEME def popcount_8(v): """Population count for an 8 bit integer""" assert 0 <= v <= 255 v -= (v >> 1) & 0x55555555 v = (v & 0x33333333) +...
windows
setup_py2exe
""" 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 (at your option) any later version. This...
lib
butler
# 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, ...
pynocchio
main_window_model
import logging from PyQt5 import QtCore, QtGui from .bookmark import Bookmark, TemporaryBookmark from .bookmark_database_manager import BookmarkManager from .comic import Comic from .comic_file_loader_factory import ComicLoaderFactory from .comic_page_handler import ComicPageHandlerDoublePage from .comic_page_handler...
extractor
toongoggles
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import int_or_none, parse_duration from .common import InfoExtractor class ToonGogglesIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?toongoggles\.com/shows/(?P<show_id>\d+)(?:/[^/]+/episodes/(?P<episode_id>\d+))?" _TESTS = ...
archiver
rlist_cmd
import argparse import os import sys import textwrap from ..constants import * # NOQA from ..helpers import ArchiveFormatter, BaseFormatter, basic_json_data, json_print from ..logger import create_logger from ..manifest import Manifest from ._common import Highlander, with_repository logger = create_logger() class...
lib
helpers
# This file is part of MyPaint. # Copyright (C) 2012-2019 by the MyPaint Development Team. # Copyright (C) 2007-2012 by Martin Renold <martinxyz@gmx.ch> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Fou...
extractor
alsace20tv
# coding: utf-8 from __future__ import unicode_literals from ..utils import ( clean_html, dict_get, get_element_by_class, int_or_none, unified_strdate, url_or_none, ) from .common import InfoExtractor class Alsace20TVIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?alsace20\.tv/(?:[\w...
BasicDrawing
ImageMasking
import sys import DataProvidersAndConsumers import Images import Utilities from Quartz import * def exportImageWithMaskFromURLWithDestination( context, imageURL, imagewidth, imageheight, bitsPerComponent, theMaskingImageURL, maskwidth, maskheight, ): imageBitsPerPixel = bitsPerCom...
extractor
twentythreevideo
from __future__ import unicode_literals import re from ..utils import int_or_none from .common import InfoExtractor class TwentyThreeVideoIE(InfoExtractor): IE_NAME = "23video" _VALID_URL = r"https?://(?P<domain>[^.]+\.(?:twentythree\.net|23video\.com|filmweb\.no))/v\.ihtml/player\.html\?(?P<query>.*?\bphot...
extractor
atresplayer
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_HTTPError from ..utils import ExtractorError, int_or_none, urlencode_postdata from .common import InfoExtractor class AtresPlayerIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?atresplayer\.com/[^/]+/[^/]+/[^/]+/[...
document
snapping
# -*- coding: utf-8 -*- # # Copyright (C) 2013 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....
i18n
json2nsh
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # 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 License # as published by the Free Software Foundation; either v...
extractor
regiotv
# coding: utf-8 from __future__ import unicode_literals from ..utils import sanitized_Request, xpath_text, xpath_with_ns from .common import InfoExtractor class RegioTVIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?regio-tv\.de/video/(?P<id>[0-9]+)" _TESTS = [ { "url": "http://www.r...
api
jukebox
# This file is part of Supysonic. # Supysonic is a Python implementation of the Subsonic server API. # # Copyright (C) 2019-2022 Alban 'spl0k' Féron # # Distributed under terms of the GNU AGPLv3 license. import uuid from flask import current_app, request from ..daemon import DaemonClient from ..daemon.exceptions imp...
draftfunctions
heal
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
baseclass
sent
# pylint: disable=import-error, attribute-defined-outside-init, too-many-arguments # pylint: disable=no-member, no-name-in-module, unused-argument, too-few-public-methods """ Sent screen; All sent message managed here. """ from kivy.app import App from kivy.properties import ListProperty, StringProperty from kivy....
parser
hashsrc
"""Compute a hash of the source files in order to warn when the source goes out of date. """ __copyright__ = "Copyright (C) 2015-2016 Martin Blais" __license__ = "GNU GPLv2" import argparse import hashlib import textwrap import types import warnings from os import path # List of input source files we should check ag...
migrations
0014_roles_memberships_and_resource_access
# Generated by Django 3.2.16 on 2022-11-23 17:34 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", "0280_fix_async_deletion_team"), migrations.s...
tools
fix_header
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2020-2021 Philipp Wolfer # Copyright (C) 2020-2021, 2023 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 p...