section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
searx
webapp
#!/usr/bin/env python """ 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 use...
ui
ratingwidget
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2008, 2018-2022 Philipp Wolfer # Copyright (C) 2011, 2013 Michael Wiencek # Copyright (C) 2013, 2018, 2020-2022 Laurent Monin # Copyright (C) 2016-2017 Sambhav Kothari # Copyright (C) 2018 Vishal Choudhary # # This program is f...
notifier
telegram
from __future__ import absolute_import import asyncio import logging from ..conf import settings logger = logging.getLogger(__name__) class TelegramBot: def __init__(self, chat_id=None, split_on=None): from telegram import Bot # pylint: disable=import-outside-toplevel telegram_creds = setting...
wsgiserver
wsgiserver2
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Cont...
friture
scope_data
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2021 Timothée Lecomte # This file is part of Friture. # # Friture is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # Friture is distri...
ipv8
ipv8_component
from typing import Optional from ipv8.bootstrapping.dispersy.bootstrapper import DispersyBootstrapper from ipv8.configuration import DISPERSY_BOOTSTRAPPER, ConfigBuilder from ipv8.dht.churn import PingChurn from ipv8.dht.discovery import DHTDiscoveryCommunity from ipv8.dht.routing import RoutingTable from ipv8.messagi...
SysML
diagramtype
from gaphor.diagram.diagramtoolbox import DiagramType from gaphor.diagram.group import change_owner from gaphor.SysML.sysml import SysMLDiagram class DiagramDefault: def __init__(self, from_type, to_type, name): self.from_type = from_type self.to_type = to_type self.name = name class Sys...
library
file
# 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 import time from pathlib import Path from typing import Dict,...
extractor
bostonglobe
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import extract_attributes from .common import InfoExtractor class BostonGlobeIE(InfoExtractor): _VALID_URL = ( r"(?i)https?://(?:www\.)?bostonglobe\.com/.*/(?P<id>[^/]+)/\w+(?:\.html)?" ) _TESTS = [ { ...
extractor
myvideoge
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ( MONTH_NAMES, clean_html, get_element_by_class, get_element_by_id, int_or_none, js_to_json, qualities, unified_strdate, ) from .common import InfoExtractor class MyVideoGeIE(InfoExtractor): _VA...
migrations
0328_add_starter_feature_flag_template
from django.db import migrations def create_starter_template(apps, schema_editor): DashboardTemplate = apps.get_model("posthog", "DashboardTemplate") DashboardTemplate.objects.create( template_name="Flagged Feature Usage", dashboard_description="Overview of engagement with the flagged feature ...
extractor
xvideos
from __future__ import unicode_literals import re from ..compat import compat_urllib_parse_unquote from ..utils import ( ExtractorError, clean_html, determine_ext, int_or_none, parse_duration, ) from .common import InfoExtractor class XVideosIE(InfoExtractor): _VALID_URL = r"""(?x) ...
music-player
compile
#!/usr/bin/env python import os import sys os.chdir(os.path.dirname(__file__)) # Import compile_utils from core. sys.path += ["core"] from glob import glob import compile_utils as c from compile_utils import * # Compile core module. sys_exec(["./core/compile.py"]) sys_exec(["cp", "core/musicplayer.so", "musicplaye...
library
album
# 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 quodlibet import print_d from quodlibet.formats._audio import Albu...
const
attributes
# -*- coding: utf-8 -*- # Automatically generated - don't edit. # Use `python setup.py update_constants` to update it. MB_ATTRIBUTES = { "DB:cover_art_archive.art_type/name:001": "Front", "DB:cover_art_archive.art_type/name:002": "Back", "DB:cover_art_archive.art_type/name:003": "Booklet", "DB:cover_ar...
routing
graph
from .track import TrackSend try: from sg_py_vendor.pymarshal import pm_assert except ImportError: from pymarshal import pm_assert MAX_TRACK_SENDS = 16 class RoutingGraph: def __init__(self, graph=None): """ @graph: {int(track_num): {int(send_index): TrackSend}} ,...
extractor
seeker
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import get_element_by_class, strip_or_none from .common import InfoExtractor class SeekerIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?seeker\.com/(?P<display_id>.*)-(?P<article_id>\d+)\.html" ) _TESTS = [ ...
decrypters
TnyCz
# -*- coding: utf-8 -*- import re from ..base.simple_decrypter import SimpleDecrypter class TnyCz(SimpleDecrypter): __name__ = "TnyCz" __type__ = "decrypter" __version__ = "0.09" __status__ = "testing" __pattern__ = r"http://(?:www\.)?tny\.cz/\w+" __config__ = [ ("enabled", "bool", ...
extractor
tdslifeway
from __future__ import unicode_literals from .common import InfoExtractor class TDSLifewayIE(InfoExtractor): _VALID_URL = r"https?://tds\.lifeway\.com/v1/trainingdeliverysystem/courses/(?P<id>\d+)/index\.html" _TEST = { # From http://www.ministrygrid.com/training-viewer/-/training/t4g-2014-conferenc...
torrent-checker
torrent_checker
import asyncio import logging import random import time from asyncio import CancelledError from collections import defaultdict from typing import Dict, List, Optional, Tuple, Union from ipv8.taskmanager import TaskManager from pony.orm import db_session, desc, select from pony.utils import between from tribler.core im...
plugins
okru
""" $description Russian live-streaming and video hosting social platform. $url ok.ru $url mobile.ok.ru $type live, vod $metadata id $metadata author $metadata title """ import logging import re from urllib.parse import unquote, urlparse from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api i...
Draft
TestDraftGui
# *************************************************************************** # * Copyright (c) 2013 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * Th...
accounts
DebridlinkFr
# -*- coding: utf-8 -*- import json import time import pycurl from pyload.core.network.http.exceptions import BadHeader from ..base.multi_account import MultiAccount from ..downloaders.DebridlinkFr import error_description class DebridlinkFr(MultiAccount): __name__ = "DebridlinkFr" __type__ = "account" ...
queries
session_recording_list_from_replay_summary
import dataclasses import re from datetime import datetime, timedelta from typing import Any, Dict, List, Literal, NamedTuple, Tuple, Union from django.conf import settings from posthog.client import sync_execute from posthog.cloud_utils import is_cloud from posthog.constants import ( TREND_FILTER_TYPE_ACTIONS, ...
Code
OpeningGuide
import atexit import os import sqlite3 import Code.SQL.DBF as SQLDBF import LCEngine4 as LCEngine from Code import AperturasStd, Books, ControlPosicion, PGNreader, Util, VarGen from Code.QT import QTUtil2, QTVarios class UnMove: def __init__(self, bookGuide, father): self.bookGuide = bookGuide se...
pdu
qa_time_delta
#!/usr/bin/env python # # Copyright 2021 NTESS LLC. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import time import numpy as np import pmt from gnuradio import blocks, gr, gr_unittest, pdu class qa_time_delta(gr_unittest.TestCase): def setUp(self): self.tb = gr.t...
decrypters
MultiloadCz
# -*- coding: utf-8 -*- import re from ..base.decrypter import BaseDecrypter class MultiloadCz(BaseDecrypter): __name__ = "MultiloadCz" __type__ = "decrypter" __version__ = "0.46" __status__ = "testing" __pattern__ = r"http://(?:[^/]*\.)?multiload\.cz/(stahnout|slozka)/.+" __config__ = [ ...
documents
models
"""Entity objects for the Document Management applications. TODO: move to an independent service / app. """ from __future__ import annotations import itertools import logging import mimetypes import threading import uuid from pathlib import Path from typing import TYPE_CHECKING, Any, Collection, Iterator import pkg_...
core
tracklist
from __future__ import annotations import logging import random from collections.abc import Iterable from typing import TYPE_CHECKING, Optional from mopidy import exceptions from mopidy.core import listener from mopidy.internal import deprecation, validation from mopidy.internal.models import TracklistState from mopi...
extractor
cinchcast
# coding: utf-8 from __future__ import unicode_literals from ..utils import unified_strdate, xpath_text from .common import InfoExtractor class CinchcastIE(InfoExtractor): _VALID_URL = ( r"https?://player\.cinchcast\.com/.*?(?:assetId|show_id)=(?P<id>[0-9]+)" ) _TESTS = [ { "u...
serializers
action
from apps.public_api.serializers.webhooks import ( WebhookCreateSerializer, WebhookTriggerTypeField, ) from apps.webhooks.models import Webhook from common.api_helpers.custom_fields import TeamPrimaryKeyRelatedField from common.api_helpers.utils import CurrentTeamDefault from rest_framework import serializers f...
Cactus
setup
import os import shutil import subprocess import sys from distutils.sysconfig import get_python_lib from setuptools import setup VERSION = "3.3.3" SKELETON_FOLDERS = [ "pages", "plugins", "static/css", "static/images", "static/js", "templates", "locale", ] SKELETON_GLOB = ["skeleton/{0}/*"...
statistics
answerer
from functools import reduce from operator import mul from flask_babel import gettext keywords = ("min", "max", "avg", "sum", "prod") # required answerer function # can return a list of results (any result type) for a given query def answer(query): parts = query.query.split() if len(parts) < 2: ret...
fighter
projectedChangeState
import wx from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcChangeProjectedFighterStateCommand(wx.Command): def __init__(self, fitID, position, state): wx.Command.__init__(self, True, "Change Projected Fighter State") self.fitID = fitID self.posit...
workflows
s3_batch_export
import asyncio import contextlib import datetime as dt import io import json import posixpath import typing from dataclasses import dataclass import aioboto3 from django.conf import settings from posthog.batch_exports.service import S3BatchExportInputs from posthog.temporal.workflows.base import PostHogWorkflow from p...
machine
txbolt
# Copyright (c) 2011 Hesky Fisher # See LICENSE.txt for details. "Thread-based monitoring of a stenotype machine using the TX Bolt protocol." import plover.machine.base # In the TX Bolt protocol, there are four sets of keys grouped in # order from left to right. Each byte represents all the keys that # were pressed ...
PyObjCTest
test_cferror
from CoreFoundation import * from Foundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str try: long except NameError: long = int try: unichr except NameError: unichr = chr class TestError(TestCase): @min_os_level("10.5") def testTypes(...
unihandecode
krcodepoints
# -*- coding: utf-8 -*- __license__ = "GPL 3" __copyright__ = "2010 Hiroshi Miura <miurahr@linux.com>" __docformat__ = "restructuredtext en" """ Unicode code point dictionary. Based on Unicode.org Unihan database. """ CODEPOINTS = { "x34": [ "Qiu ", "Tian ", "", "", "Kua "...
updater
zeroname_updater
from __future__ import print_function import json import os import re import socket import sys import time from subprocess import call from bitcoinrpc.authproxy import AuthServiceProxy from six import string_types def publish(): print("* Signing and Publishing...") call(" ".join(command_sign_publish), shell...
neubot
marshal
# neubot/marshal.py # -*- coding: utf-8 -*- # # Copyright (c) 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 th...
frescobaldi-app
actioncollection
# 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 ...
management
forms
# -*- coding: utf-8 -*- """ flaskbb.management.forms ~~~~~~~~~~~~~~~~~~~~~~~~ It provides the forms that are needed for the management views. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import logging from flask_allows import Permission from flask_ba...
plugins
piaulizaportal
""" $description Japanese live-streaming and video hosting platform owned by PIA Corporation. $url ulizaportal.jp $type live, vod $metadata id $metadata title $account Purchased tickets are required. $notes Tickets purchased at "PIA LIVE STREAM" are used for this platform. """ import logging import re import time from...
misc
depcheck
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2016,2017 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...
network
qa_socket_pdu
#!/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 random import time import pmt from gnuradio import blocks, gr, gr_unittest, network, pdu class qa_socket_pdu(gr_unittest.TestCase): def setUp(self)...
storage
storage
""" Storing inventory items """ import collections InventoryItem = collections.namedtuple( "InventoryItem", "type stream payload expires tag" ) class Storage(object): # pylint: disable=too-few-public-methods """Base class for storing inventory (extendable for other items to store)""" pass class I...
brainz
mb
# 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 later version. try: import musicbrainzngs exce...
utils
compat
""" raven.utils.compat ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2016 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. Utilities for writing code that runs on Python 2 and 3 """ # flake8: noqa # Copyright (c) 2010-2013 Benjamin Peterson # # Permission is hereby granted, fr...
Assembly
TestAssemblyWorkbench
# SPDX-License-Identifier: LGPL-2.1-or-later # /**************************************************************************** # * # Copyright (c) 2023 Ondsel <development@ondsel.com> * # ...
extensions
ubuntu_unity
# -*- coding: utf-8 -*- # Ubuntu Unity Launcher Integration # Thomas Perl <thp@gpodder.org>; 2012-02-06 import logging import gpodder import gi # isort:skip gi.require_version("Unity", "7.0") # isort:skip from gi.repository import GLib, Unity # isort:skip _ = gpodder.gettext logger = logging.getLogger(__name_...
neubot
bytegen_speedtest
# neubot/bytegen_speedtest.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 ...
sandbox
test_subsampler
import matplotlib.pyplot as plt import numpy as np from friture import generated_filters from friture.audiobackend import SAMPLING_RATE from friture.delay_estimator import subsampler, subsampler_filtic Ns = int(1e4) # y = np.random.rand(Ns) f = 2e1 t = np.linspace(0, float(Ns) / SAMPLING_RATE, Ns) y = np.cos(2.0 * np...
PyObjCTest
test_nsbitmapimagerep
import array import sys import objc from AppKit import * from objc import NO, YES from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str try: long except NameError: long = int class TestNSBitmapImageRep(TestCase): def testInstantiation(self): # widthxheight ...
imports
troubleshoot
""" import books from another app """ from bookwyrm import models from bookwyrm.importers import Importer from bookwyrm.settings import PAGE_LENGTH from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDenied from django.core.paginator import Paginator from django.shortc...
puddlestuff
about
# -*- coding: utf-8 -*- from importlib import import_module from platform import python_version import mutagen from PyQt5.QtCore import PYQT_VERSION_STR, QT_VERSION_STR, Qt from PyQt5.QtGui import QPixmap from PyQt5.QtWidgets import ( QApplication, QDialog, QHBoxLayout, QLabel, QScrollArea, QTa...
engines
mediawiki
# SPDX-License-Identifier: AGPL-3.0-or-later """ General mediawiki-engine (Web) """ from json import loads from string import Formatter from urllib.parse import quote, urlencode # about about = { "website": None, "wikidata_id": None, "official_api_documentation": "http://www.mediawiki.org/wiki/API:Search...
bukuserver
api
#!/usr/bin/env python # pylint: disable=wrong-import-order, ungrouped-imports """Server module.""" import collections import typing as T from unittest import mock import buku import flask from buku import BukuDb from flask import current_app, jsonify, redirect, request, url_for from flask.views import MethodView from ...
sword
conftest
import os import pytest import xmlschema from deposit.protocol import DepositResult from deposit.sword.protocol import SWORDMETSMODSProtocol from lxml import etree @pytest.fixture def sword_mods_protocol(request, repository): """ Creates a sword mods repository object """ sword_mods_repository = repo...
events
squeezebox_sync
# Copyright 2011-2021 Nick Boultbee # # Inspired in parts by PySqueezeCenter (c) 2010 JingleManSweep # SqueezeCenter and SqueezeBox are copyright Logitech # # 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 F...
mainwin
patterncombo
import sys from PyQt5.QtCore import Qt, pyqtSignal from PyQt5.QtWidgets import ( QAbstractItemView, QApplication, QComboBox, QFrame, QHBoxLayout, QInputDialog, QPushButton, QShortcut, QVBoxLayout, ) from ..puddleobjects import ListBox, ListButtons, PuddleConfig from ..translations ...
Cloud
CloudApiClient
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import json import urllib.parse from json import JSONDecodeError from time import time from typing import ( Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar, Union, cast, ) f...
PythonBrowser
PythonBrowserModel
"""PythonBrowserModel.py -- module implementing the data model for PythonBrowser.""" import sys from operator import getitem, setitem from AppKit import NSBeep from Foundation import NSObject class PythonBrowserModel(NSObject): """This is a delegate as well as a data source for NSOutlineViews.""" def init...
views
telegram_channels
from apps.api.permissions import RBACPermission from apps.api.serializers.telegram import TelegramToOrganizationConnectorSerializer from apps.auth_token.auth import PluginAuthentication from common.api_helpers.mixins import PublicPrimaryKeyMixin from common.insight_log.chatops_insight_logs import ( ChatOpsEvent, ...
jargon
resources
# ============================================================================= # Copyright (C) 2018 Filip Sufitchi # # 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, eithe...
generated
indexsuper
#!/usr/bin/env python # # Generated Thu Jun 11 18:43:54 2009 by generateDS.py. # import sys from xml.dom import Node, minidom # # User methods # # Calls to the methods in these classes are generated by generateDS.py. # You can replace these methods by re-implementing the following class # in a module named genera...
chardet
charsetprober
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
draftobjects
block
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
Material
InitGui
# *************************************************************************** # * Copyright (c) 2013 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
example-database-migrations
env
# -*- coding: utf-8 -*- from __future__ import with_statement import os from logging.config import fileConfig from alembic import context from sqlalchemy import engine_from_config, pool # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config #...
Gui
Camotics
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2020 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
services
authentication
# -*- coding: utf-8 -*- """ flaskbb.auth.services.authentication ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Authentication providers, handlers and post-processors in FlaskBB :copyright: (c) 2014-2018 the FlaskBB Team. :license: BSD, see LICENSE for more details """ import logging from datetime impor...
beetsplug
fuzzy
# This file is part of beets. # Copyright 2016, Philippe Mongeau. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy...
Extractor
setup
# # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Basic plugin template created by: # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with ...
forum
views
"""Forum views.""" from __future__ import annotations from collections import Counter from datetime import date, datetime, timedelta from itertools import groupby from urllib.parse import quote import sqlalchemy as sa from abilian.core.util import utc_dt from abilian.i18n import _, _l from abilian.sbe.apps.communitie...
builtinViewColumns
graphColor
# ============================================================================= # 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 ...
Gui
Base
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
song
songconstants
#!/usr/bin/env python # -*- coding: utf-8 -*- ##################################################################### # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä # # 2008 myfingershurt ...
protos
string_int_label_map_pb2
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: object_detection/protos/string_int_label_map.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 goog...
config-integrations
formatted_webhook
# Main enabled = True title = "Formatted webhook" slug = "formatted_webhook" short_description = None description = None is_displayed_on_web = True is_featured = False is_able_to_autoresolve = True is_demo_alert_enabled = True description = None # Default templates slack_title = """\ *<{{ grafana_oncall_link }}|#{{ g...
PyObjCTest
test_cfplugin
""" No tests for CFPlugin: these API's are unsupported for the moment. """ import CoreFoundation from PyObjCTools.TestSupport import * symbols = [ # From CFPluginCOM.h: "IUnknownVTbl", "IS_ERROR", "HRESULT_CODE", "HRESULT_FACILITY", "SEVERITY_SUCCESS", "SEVERITY_ERROR", "MAKE_HRESULT", ...
cloudfiles
engine
# coding:utf-8 import pyrax from cactus.deployment.cloudfiles.auth import CloudFilesCredentialsManager from cactus.deployment.cloudfiles.file import CloudFilesFile from cactus.deployment.engine import BaseDeploymentEngine class CloudFilesDeploymentEngine(BaseDeploymentEngine): CredentialsManagerClass = CloudFile...
builders
box_coder_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...
classes
thumbnail
""" @file @brief This file has code to generate thumbnail images and HTTP thumbnail server @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an op...
gui
linemode
# This file is part of MyPaint. # -*- coding: utf-8 -*- # Copyright (C) 2012 by Richard Jones # Copyright (C) 2012-2018 by the MyPaint Development Team. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Fou...
term2048
game
# -*- coding: UTF-8 -*- """ Game logic """ from __future__ import print_function import atexit import math import os import os.path import sys from colorama import Fore, Style, init init(autoreset=True) from term2048 import keypress from term2048.board import Board class Game(object): """ A 2048 game ...
saveddata
drone
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, ...
Scripts
dictionary
#!/usr/bin/env python # This is a doctest """ ============================== Using Cocoa collection classes ============================== Cocoa contains a number of collection classes, including dictionaries and arrays (like python lists) in mutable and immutable variations. We'll demonstrate their usage using the ``...
code
planet_cache
#!/usr/bin/env python # -*- coding: UTF-8 -*- """Planet cache tool. """ __authors__ = [ "Scott James Remnant <scott@netsplit.com>", "Jeff Waugh <jdub@perkypants.org>" ] __license__ = "Python" import os import sys import time import ConfigParser import dbhash import planet def usage(): print "...
extractors
embed
__all__ = ["embed_download"] import urllib.parse from ..common import * from . import bokecc, iqiyi from .bilibili import bilibili_download from .dailymotion import dailymotion_download from .iqiyi import iqiyi_download_by_vid from .le import letvcloud_download_by_vu from .netease import netease_download from .qq imp...
connectors
bookwyrm_connector
""" using another bookwyrm instance as a source of book data """ from __future__ import annotations from typing import Any, Iterator from bookwyrm import activitypub, models from bookwyrm.book_search import SearchResult from .abstract_connector import AbstractMinimalConnector class Connector(AbstractMinimalConnect...
lib
pidfile
import os import psutil from sglib.constants import MAJOR_VERSION from sglib.lib import util from sglib.log import LOG def check_pidfile(path): """Check if a process is running. The process must create a pidfile for this to work """ if os.path.exists(path): text = util.read_file_text(path).st...
formats
ac3
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2019-2020 Philipp Wolfer # Copyright (C) 2020-2021 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 published by the Free Softwar...
installer
test_framerates
""" @file @brief Utility to determine which sample rates divide evenly by which frame rates @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2020 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an o...
extractor
hbo
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import int_or_none, parse_duration, urljoin, xpath_element, xpath_text from .common import InfoExtractor class HBOBaseIE(InfoExtractor): _FORMATS_INFO = { "pro7": { "width": 1280, "height": 720, ...
puddlestuff
funcprint
# -*- coding: utf-8 -*- import re from copy import copy from functools import partial from .constants import NO, YES pattern = re.compile(r"(%\d+\(.+\))|([\\]*\$\d+)") def perfunc(match, d): matchtext = match.group() if matchtext.startswith("\\"): return matchtext[1:] try: number = int(m...
extractor
theplatform
# coding: utf-8 from __future__ import unicode_literals import binascii import hashlib import hmac import re import time from ..compat import compat_parse_qs, compat_urllib_parse_urlparse from ..utils import ( ExtractorError, determine_ext, find_xpath_attr, float_or_none, int_or_none, mimetype...
PyObjCTest
test_cfxmlparser
from CoreFoundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str try: long except NameError: long = int class TestXMLParser(TestCase): # Note: This doesn't actually test the API def testTypes(self): self.assertIsCFType(CFXMLParserRef) ...
console
console
# # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Copyright (C) 2009 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. #...
cura
MachineAction
# Copyright (c) 2016 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os from typing import Optional from PyQt6.QtCore import QObject, QUrl, pyqtProperty, pyqtSignal, pyqtSlot from UM.Logger import Logger from UM.PluginObject import PluginObject from UM.PluginRegistry import PluginReg...
deluge-extractor
gtkui
# # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # Basic plugin template created by: # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with ...