section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
plugins
tf1
""" $description French live TV channels from TF1 Group, including LCI and TF1. $url tf1.fr $url tf1info.fr $url lci.fr $type live $region France """ import logging import re from streamlink.plugin import Plugin, PluginError, pluginmatcher from streamlink.plugin.api import useragents, validate from streamlink.stream....
views
personal_notifications
from apps.auth_token.auth import ApiTokenAuthentication from apps.base.models import UserNotificationPolicy from apps.public_api.serializers import ( PersonalNotificationRuleSerializer, PersonalNotificationRuleUpdateSerializer, ) from apps.public_api.throttlers.user_throttle import UserThrottle from apps.user_m...
meta-architectures
ssd_meta_arch
# 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...
transports
streamingbase
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from octoprint.vendor.sockjs.tornado.transports import pollingbase class StreamingTransportBase(pollingbase.PollingTransportBase): def initialize(self, server): super(StreamingTransportBase, self).i...
views
schedules
import datetime import logging import pytz from apps.auth_token.auth import ApiTokenAuthentication, ScheduleExportAuthentication from apps.public_api.custom_renderers import CalendarRenderer from apps.public_api.serializers import ( PolymorphicScheduleSerializer, PolymorphicScheduleUpdateSerializer, ) from app...
PyObjCTest
test_cgerror
from PyObjCTools.TestSupport import * from Quartz.CoreGraphics import * class TestCGError(TestCase): def testConstants(self): self.assertEqual(kCGErrorSuccess, 0) self.assertEqual(kCGErrorFirst, 1000) self.assertEqual(kCGErrorFailure, kCGErrorFirst) self.assertEqual(kCGErrorIllegal...
femexamples
equation_electrostatics_capacitance_two_balls
# *************************************************************************** # * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com> * # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * Th...
plugins
yupptv
""" $description Indian live TV channels and video on-demand service. OTT service from YuppTV. $url yupptv.com $type live, vod $account Some streams require an account and subscription """ import logging import re import time from streamlink.plugin import Plugin, pluginargument, pluginmatcher from streamlink.plugin.a...
extractor
kusi
# coding: utf-8 from __future__ import unicode_literals import random import re from ..compat import compat_urllib_parse_unquote_plus from ..utils import ( float_or_none, int_or_none, timeconvert, update_url_query, xpath_text, ) from .common import InfoExtractor class KUSIIE(InfoExtractor): ...
Arch
ArchFrame
# *************************************************************************** # * Copyright (c) 2013 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
commands
migrate_clickhouse
import datetime from textwrap import indent from django.core.management.base import BaseCommand from infi.clickhouse_orm import Database from infi.clickhouse_orm.migrations import MigrationHistory from infi.clickhouse_orm.utils import import_submodules from posthog.settings import ( CLICKHOUSE_DATABASE, CLICKH...
extractor
lrt
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import clean_html, merge_dicts from .common import InfoExtractor class LRTIE(InfoExtractor): IE_NAME = "lrt.lt" _VALID_URL = r"https?://(?:www\.)?lrt\.lt(?P<path>/mediateka/irasas/(?P<id>[0-9]+))" _TESTS = [ { ...
anchor-generators
grid_anchor_generator_test
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
dataset-tools
create_kitti_tf_record_test
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
puddlestuff
m3u
import csv import os import sys from os.path import abspath, dirname from os.path import join as path_join from os.path import normcase, normpath, splitdrive from PyQt5.QtWidgets import QApplication, QFileDialog from . import audioinfo from .audioinfo.util import encode_fn, lnglength from .findfunc import tagtofilena...
femexamples
ccx_cantilever_ele_hexa20
# *************************************************************************** # * Copyright (c) 2019 Bernd Hahnebach <bernd@bimstatik.org> * # * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com> * # * * # * Th...
ui
uipreview
"""Show GTK 4 UI Components. Usage: python -m gaphor.ui.uipreview <ui file> """ import os import sys import defusedxml.ElementTree as etree import gi from gaphor.ui.styling import Styling gi.require_version("Gtk", "4.0") from gi.repository import Adw, Gio, GLib, Gtk # noqa: E402 def load_components(ui_filenam...
scripts
pkgbuild
#!/usr/bin/env python3 import argparse import json import os import subprocess from jinja2 import Template def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "-i", "--install", action="store_true", dest="install", help="Install the package after ...
Test
TestTranslate
from Translate import Translate class TestTranslate: def testTranslateStrict(self): translate = Translate() data = """ translated = _("original") not_translated = "original" """ data_translated = translate.translateData(data, {"_(original)": "translated"}) ...
torrentlist
torrentlist
# # Copyright (C) 2011 Nick Lanham <nick@afternight.org> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # import logging from collections i...
Test
TestDb
import io class TestDb: def testCheckTables(self, db): tables = [ row["name"] for row in db.execute("SELECT name FROM sqlite_master WHERE type='table'") ] assert "keyvalue" in tables # To store simple key -> value assert "json" in tables # Json file path r...
trends
trends
import copy import threading from datetime import datetime, timedelta from itertools import accumulate from typing import Any, Callable, Dict, List, Optional, Tuple, cast from zoneinfo import ZoneInfo from dateutil import parser from django.db.models.query import Prefetch from posthog.clickhouse.query_tagging import g...
community
bandwidth_accounting_community
from __future__ import annotations from asyncio import Future from binascii import unhexlify from random import Random from typing import Dict from ipv8.peer import Peer from ipv8.requestcache import RequestCache from ipv8.types import Address from tribler.core.components.bandwidth_accounting.community.cache import (...
index
html
__package__ = "archivebox.index" from collections import defaultdict from datetime import datetime, timezone from pathlib import Path from typing import Iterator, List, Mapping, Optional from django.core.cache import cache from django.utils.html import format_html, mark_safe from ..config import ( FOOTER_INFO, ...
sabnzbd
assembler
#!/usr/bin/python3 -OO # Copyright 2007-2023 The SABnzbd-Team (sabnzbd.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 2 # of the License, or (at your option) any later ver...
commands
recheck
# # 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. # See LICENSE for more details. # import deluge.component as com...
hedgebox
matrix
import datetime as dt from dataclasses import dataclass from typing import Optional from posthog.constants import ( INSIGHT_TRENDS, PAGEVIEW_EVENT, RETENTION_FIRST_TIME, TRENDS_LINEAR, TRENDS_WORLD_MAP, ) from posthog.demo.matrix.matrix import Cluster, Matrix from posthog.demo.matrix.randomization ...
cherrypy
_cpnative_server
"""Native adapter for serving CherryPy via its builtin server.""" import logging import sys import cherrypy from cherrypy import wsgiserver from cherrypy._cpcompat import BytesIO from cherrypy._cperror import bare_error, format_exc from cherrypy.lib import httputil class NativeGateway(wsgiserver.Gateway): recur...
lib
httputil
"""HTTP library functions. This module contains functions for building an HTTP application framework: any one, not just one whose name starts with "Ch". ;) If you reference any modules from some popular framework inside *this* module, FuManChu will personally hang you up by your thumbs and submit you to a public canin...
rtorrent
compat
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com> # 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, modify, ...
plugins
vkplay
""" $description Russian live-streaming platform for gaming and esports, owned by VKontakte. $url vkplay.live $type live $metadata id $metadata author $metadata category $metadata title """ import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from str...
Code
Everest
import os import random import LCEngine4 as LCEngine from Code import Partida, Util from Code.SQL import Base def str_file(fichero): with open(fichero) as f: return eval(f.read()) def get_partida_random(): path = "./IntFiles/Everest" li = [fich for fich in os.listdir(path) if fich.endswith(".st...
events
auto_update_tags_in_files
# Copyright 2019-2020 Joschua Gandert # 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 versi...
network
dial_tone_sink
#!/usr/bin/env python # # Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from argparse import ArgumentParser from gnuradio import audio, blocks, gr class dial_tone_sink(gr.top_block): def __init__(self, host, port, pkt...
communities
security
"""Decorators and helpers to check access to communities.""" from __future__ import annotations from functools import wraps from typing import Any, Callable from abilian.core.models.subjects import User from abilian.sbe.apps.communities.presenters import CommunityPresenter from abilian.services import get_service fr...
event
sql
from django.conf import settings from posthog.clickhouse.base_sql import COPY_ROWS_BETWEEN_TEAMS_BASE_SQL from posthog.clickhouse.indexes import index_by_kafka_timestamp from posthog.clickhouse.kafka_engine import ( KAFKA_COLUMNS, STORAGE_POLICY, kafka_engine, trim_quotes_expr, ) from posthog.clickhouse...
protos
export_as_protos
#!/usr/bin/env python3 """Export all the processed directives as proto records. This is an experiment to generate a realistic dataset for a forked query client as a new, separate project. The dream is that this is all that Beancount would become: a parser, booking engine and data source provider for a query/api thing....
Models
QualitySettingsModel
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os from typing import Set import cura.CuraApplication from PyQt6.QtCore import Qt, pyqtProperty, pyqtSignal from UM import i18nCatalog from UM.Logger import Logger from UM.Qt.ListModel import ListModel from UM.Setti...
sequencer
midi_file_dialog
import os from sglib import constants from sglib.lib.util import remove_bad_chars from sglib.log import LOG from sglib.models.daw._shared import TRACK_COUNT_ALL from sglib.models.daw.midi_file import DawMidiFile, MIDIFileAnalysis from sgui.daw import shared from sgui.sgqt import ( QCheckBox, QComboBox, QDi...
postprocessor
common
from __future__ import unicode_literals import os from ..utils import PostProcessingError, cli_configuration_args, encodeFilename class PostProcessor(object): """Post Processor class. PostProcessor objects can be added to downloaders with their add_post_processor() method. When the downloader has finis...
mail
custom_arg
class CustomArg(object): """Values that will be carried along with the email and its activity data. Substitutions will not be made on custom arguments, so any string entered into this parameter will be assumed to be the custom argument that you would like to be used. Top-level CustomArgs may be overrid...
imageserver
models
# # Quru Image Server # # Document: models.py # Date started: 08 Aug 2011 # By: Matt Fozard # Purpose: Image server SQLAlchemy-based database models # Requires: Flask, SQLAlchemy # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it ...
mcp
client
# This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the ...
SCL
TypeChecker
# Copyright (c) 2011, Thomas Paviot (tpaviot@gmail.com) # All rights reserved. # This file is part of the StepClassLibrary (SCL). # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code mus...
migrations
0003_auto_20200221_0131
# Generated by Django 3.0.3 on 2020-02-21 01:31 import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0002_auto_20200219_0816"), ] operations = [ migrations.RemoveField( model_name="author",...
update
update_pygments
#!/usr/bin/env python """ Update pygments style Call this script after each upgrade of pygments """ # pylint: disable=C0116 # set path from os.path import join import pygments from pygments.formatters import HtmlFormatter # pylint: disable=E0611 from pygments.style import Style from pygments.token import ( Com...
PyObjCTest
test_nsdistributednotificationcenter
from Foundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSDistributedNotificationCenter(TestCase): def testConstants(self): self.assertIsInstance(NSLocalNotificationCenterType, unicode) self.assertEqual(NSNotificationSuspension...
songsmenu
tapbpm
# Copyright 2017 Didier Villevalois, # 2010 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....
Arch
ArchGrid
# *************************************************************************** # * Copyright (c) 2011 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
migrations
0006_levelofdescription
import main.models from django.db import migrations, models def data_migration(apps, schema_editor): # Set AtoM DIP upload defaults DashboardSetting = apps.get_model("main", "DashboardSetting") StandardTaskConfig = apps.get_model("main", "StandardTaskConfig") DashboardSetting.objects.create( ...
data
viewer_volume
# -*- coding: utf-8 -*- # -------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.g...
cohort
util
import uuid from datetime import datetime, timedelta from typing import Any, Dict, List, Optional, Tuple, Union import structlog from dateutil import parser from django.conf import settings from django.utils import timezone from posthog.client import sync_execute from posthog.constants import PropertyOperatorType from...
invesalius
control
# -------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: GNU...
engines
gentoo
# SPDX-License-Identifier: AGPL-3.0-or-later """ Gentoo Wiki """ from urllib.parse import urlencode, urljoin from lxml import html from searx.utils import extract_text # about about = { "website": "https://wiki.gentoo.org/", "wikidata_id": "Q1050637", "official_api_documentation": "https://wiki.gentoo.o...
draftobjects
point
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
TechDraw
moveViews
#!/usr/bin/env python # -*- coding: utf-8 -*- # ************************************************************************** # Copyright (c) 2018 WandererFan <wandererfan@gmail.com> * # * # This file is part of the FreeCAD CAx deve...
config
pages
from CTFd.cache import cache from CTFd.models import Pages, db from CTFd.utils import get_config, markdown from CTFd.utils.dates import isoformat, unix_time_to_utc from CTFd.utils.formatters import safe_format from CTFd.utils.security.sanitize import sanitize_html from flask import current_app def format_variables(co...
requests
exceptions
# -*- coding: utf-8 -*- """ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. """ from .packages.urllib3.exceptions import HTTPError as BaseHTTPError class RequestException(IOError): """There was an ambiguous exception that occurred while handling your request.""...
PyObjCTest
test_nscell
import objc from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSCell(TestCase): def testUnicode(self): u = b"\xc3\xbc\xc3\xb1\xc3\xae\xc3\xa7\xc3\xb8d\xc3\xa8".decode("latin1") cell = NSCell.alloc().initTextCell_(u) c...
views
settings
import logging import cddagl.constants as cons from babel.core import Locale from cddagl.constants import get_cdda_uld_path, get_locale_path from cddagl.functions import clean_qt_path from cddagl.i18n import get_available_locales, load_gettext_locale from cddagl.i18n import proxy_gettext as _ from cddagl.sql.functions...
PyObjCTest
test_cgevent
from PyObjCTools.TestSupport import * from Quartz.CoreGraphics import * try: long except NameError: long = int class TestCGEvent(TestCase): def testTypes(self): self.assertIsCFType(CGEventRef) self.assertIsCFType(CGEventSourceRef) def testEventFunctions(self): evt = CGEventCr...
utils
crypto
# ruff: noqa: F401 import hashlib # re-export pycryptodome / pycryptodomex stuff in a single place # so packagers don't have to maintain dozens of patches try: # pycryptodome (drop-in replacement for the old PyCrypto library) from Crypto.Cipher import AES, PKCS1_v1_5 from Crypto.Hash import SHA256 from...
extractors
facebook
#!/usr/bin/env python __all__ = ["facebook_download"] import json from ..common import * def facebook_download(url, output_dir=".", merge=True, info_only=False, **kwargs): url = re.sub(r"//.*?facebook.com", "//facebook.com", url) html = get_html(url) title = r1(r'<title id="pageTitle">(.+)</title>', h...
hooks
post_gen_project
# encoding: utf-8 import os import cookiecutter.find as find import cookiecutter.generate as gen import jinja2 from ckan.cli.generate import remove_code_examples from ckan.common import asbool from cookiecutter.config import DEFAULT_CONFIG as config from cookiecutter.environment import StrictEnvironment from cookiecu...
scripts
header_utils
# Utilities for reading values in header files import re from argparse import ArgumentParser class PybindHeaderParser: def __init__(self, pathname): try: with open(pathname, "r") as f: self.file_txt = f.read() except: self.file_txt = "" def get_flag_au...
api
helpers
# # Quru Image Server # # Document: helpers.py # Date started: 12 Oct 2018 # By: Matt Fozard # Purpose: Image server API helper functions # Requires: Flask # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it un...
PyObjCTest
test_qccomposition
from PyObjCTools.TestSupport import * from Quartz.QuartzComposer import * try: unicode except NameError: unicode = str class TestQCComposition(TestCase): def testConstants(self): self.assertIsInstance(QCCompositionAttributeNameKey, unicode) self.assertIsInstance(QCCompositionAttributeDesc...
lib
gctools
import gc import inspect import os import sys import time try: import objgraph except ImportError: objgraph = None import cherrypy from cherrypy import _cprequest, _cpwsgi from cherrypy.process.plugins import SimplePlugin class ReferrerTree(object): """An object which gathers all referrers of an object...
installer
version_parser
""" @file @brief Parse version info files for libopenshot-audio, libopenshot, and openshot-qt (created on gitlab-ci.yml) @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2016 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (h...
managers
event_manager
# -*- coding: utf-8 -*- import time from ..utils.purge import uniquify class EventManager: def __init__(self, core): self.pyload = core self._ = core._ self.clients = [] def new_client(self, uuid): self.clients.append(Client(uuid)) def clean(self): for n, client...
extractor
rozhlas
# coding: utf-8 from __future__ import unicode_literals from ..utils import int_or_none, remove_start from .common import InfoExtractor class RozhlasIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?prehravac\.rozhlas\.cz/audio/(?P<id>[0-9]+)" _TESTS = [ { "url": "http://prehravac.rozh...
draftguitools
gui_wire2spline
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * (c) 2009, 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
extractor
vzaar
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import float_or_none, int_or_none, unified_timestamp, url_or_none from .common import InfoExtractor class VzaarIE(InfoExtractor): _VALID_URL = r"https?://(?:(?:www|view)\.)?vzaar\.com/(?:videos/)?(?P<i...
Fem
TestFemApp
# *************************************************************************** # * Copyright (c) 2018 Przemo Firszt <przemo@firszt.eu> * # * Copyright (c) 2018 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * Th...
util
webbrowser2
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2007 Lukáš Lalinský # Copyright (C) 2011 Calvin Walton # Copyright (C) 2013, 2018-2021 Laurent Monin # Copyright (C) 2016-2017 Sambhav Kothari # Copyright (C) 2018 Wieland Hoffmann # Copyright (C) 2019 Philipp Wolfer # # T...
scenarios
invited_to_channel
import logging import typing from apps.slack.client import SlackClient from apps.slack.scenarios import scenario_step from apps.slack.types import EventPayload, EventType, PayloadType, ScenarioRoute from django.utils import timezone if typing.TYPE_CHECKING: from apps.slack.models import SlackTeamIdentity, SlackUs...
Op
CircularHoleBase
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
femviewprovider
view_element_geometry1D
# *************************************************************************** # * Copyright (c) 2015 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
AddonManager
addonmanager_devmode_add_content
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022 FreeCAD Project Association * # * ...
list
lists
""" book list views""" from bookwyrm import forms, models from bookwyrm.lists_stream import ListsStream from bookwyrm.views.helpers import get_user_from_username from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator from django.shortcuts import redirect from django.templa...
fta
andgate
"""AND gate item definition.""" from math import pi 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, stroke from gaphor.dia...
imageserver
session_manager
# # Quru Image Server # # Document: session_manager.py # Date started: 15 Nov 2012 # By: Matt Fozard # Purpose: Manages a web or API session # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it under the ...
gpodder
deviceplaylist
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2011 Thomas Perl and 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...
PyObjCTest
dejagnu
""" A very crude emulator of dejagnu, just enough to integrate the libbfi unittests into the pyobjc ones. """ import codecs import os import re import signal import sys import unittest from distutils.sysconfig import get_config_var from distutils.util import get_platform from fnmatch import fnmatch gDgCommands = re.co...
plugins
tv4play
""" $description Live TV channels and video on-demand service from TV4, a Swedish free-to-air broadcaster. $url tv4play.se $url fotbollskanalen.se $type live, vod $metadata title $region Sweden $notes Only non-premium streams are supported """ import logging import re from urllib.parse import urljoin from streamlink....
core
core
# # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # Copyright (C) 2011 Pedro Algarvio <pedro@algarvio.me> # # 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. # Se...
quodlibet
main
# Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna # 2012,2013 Christoph Reiter # 2010-2021 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; eithe...
messages
specs
"""Definitions and lookup tables for MIDI messages. TODO: * add lookup functions for messages definitions by type and status byte. """ # TODO: these include undefined messages. CHANNEL_MESSAGES = set(range(0x80, 0xF0)) COMMON_MESSAGES = set(range(0xF0, 0xF8)) REALTIME_MESSAGES = set(range(0xF8, 0x100)) SYS...
canto-next
format
# -*- 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 log...
nfoview
export
# -*- coding: utf-8 -*- # Copyright (C) 2013 Osmo Salomaa # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pr...
migrations
0049_change_pointer_file_filegrpuse
from django.db import migrations def data_migration_up(apps, schema_editor): """ Change filegrpuse of pointer files: In AM 1.6, the pointer file was being created in the MCPClient and added to the SIP files with the default filegrpuse: 'original'. This was making this file to appear, named 'xml',...
views
comments
# -*- encoding: utf-8 -*- import collections import functools import json # json.dumps to put URL in <script> import re import time from configparser import NoOptionError from datetime import datetime, timedelta from html import escape from io import BytesIO as StringIO from os import path as os_path from urllib.pars...
importers
importer
""" handle reading a csv from an external service, defaults are from Goodreads """ import csv from datetime import timedelta from typing import Iterable, Optional from bookwyrm.models import ImportItem, ImportJob, SiteSettings, User from django.utils import timezone class Importer: """Generic class for csv data ...
completion
completiondelegate
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Completion item delegate for CompletionView. We use this to be able to highlight parts of the text. """ import html import re from qutebrowser.completion import completionwidget from quteb...
builtinViewColumns
ammo
# ============================================================================= # 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 ...
cli
options
import argparse import textwrap import typing from dataclasses import dataclass, field from enum import Enum, auto from typing import Any, Dict, List, Optional, Tuple, Type, TypeVar from httpie.cli.argparser import HTTPieArgumentParser from httpie.cli.utils import LazyChoices, Manual class Qualifiers(Enum): OPTI...
graphs
head_circumference_change
# -*- coding: utf-8 -*- import plotly.graph_objs as go import plotly.offline as plotly from django.utils.translation import gettext as _ from reports import utils def head_circumference_change(objects): """ Create a graph showing head_circumference over time. :param objects: a QuerySet of Head Circumferen...
extractor
playvid
from __future__ import unicode_literals import re from ..compat import compat_urllib_parse_unquote, compat_urllib_parse_unquote_plus from ..utils import ExtractorError, clean_html from .common import InfoExtractor class PlayvidIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?playvid\.com/watch(\?v=|/)(?P<id...
ipc
abstract
from sglib import constants from sglib.log import LOG class AbstractIPCTransport: """Abstract class for sending data to and from the engine.""" def send( self, path: str, key: str, value: str, ): """Send RPC commands to the engine Note that these parameters...
Debug
Debug
import os import re import sys from Config import config # Non fatal exception class Notify(Exception): def __init__(self, message=None): if message: self.message = message def __str__(self): return self.message # Gevent greenlet.kill accept Exception type def createNotifyType(...