section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
imageserver | views | #
# Quru Image Server
#
# Document: views.py
# Date started: 04 Apr 2011
# By: Matt Fozard
# Purpose: Raw image handling URLs and views
# Requires: Flask
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute it and/or modify
# it unde... |
streamlink-cli | streamrunner | import errno
import logging
import sys
from contextlib import suppress
from pathlib import Path
from threading import Event, Lock, Thread
from typing import Optional
from streamlink.stream.stream import StreamIO
from streamlink_cli.output import FileOutput, HTTPOutput, Output, PlayerOutput
from streamlink_cli.utils.pr... |
extractor | dlive | from __future__ import unicode_literals
import json
import re
from ..utils import int_or_none
from .common import InfoExtractor
class DLiveVODIE(InfoExtractor):
IE_NAME = "dlive:vod"
_VALID_URL = (
r"https?://(?:www\.)?dlive\.tv/p/(?P<uploader_id>.+?)\+(?P<id>[^/?#&]+)"
)
_TESTS = [
... |
cssutils | prodparser | # -*- coding: utf-8 -*-
"""Productions parser used by css and stylesheets classes to parse
test into a cssutils.util.Seq and at the same time retrieving
additional specific cssutils.util.Item objects for later use.
TODO:
- ProdsParser
- handle EOF or STOP?
- handle unknown @rules
- handle S... |
forms | admin | """ using django model forms """
import datetime
from bookwyrm import models
from django import forms
from django.core.exceptions import PermissionDenied
from django.forms import widgets
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from django_celery_beat.models import Inter... |
service | settings | # =============================================================================
# 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 ... |
plugins | delfi | """
$description Internet portal in Estonia, Latvia, and Lithuania providing daily news, ranging from gardening to politics.
$url delfi.lt
$url delfi.ee
$url delfi.lv
$type vod
"""
import itertools
import logging
import re
from urllib.parse import urlparse
from streamlink.plugin import Plugin, PluginError, pluginmatc... |
scripts | dump_version | """
This script is solely used when generating builds. It generates a version number automatically using
git tags as it's basis. Whenever a build is created, run this file beforehand and it should replace
the old version number with the new one in VERSION.YML
"""
import os
import subprocess
import yaml
def rreplace... |
tagsources | TagSource | # An interface specification for Tag Sources
#
# A Tag Source should define a class that derives from TagSOurce, and sets
# a module attribue "info" to an instance of that class in order to interface
# with puddletag
from puddlestuff.constants import CHECKBOX, COMBO, SPINBOX, TAGLIST, TEXT
from puddlestuff.util import ... |
controllers | promotecontroller | # 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, ... |
TemplatePyMod | FeaturePython | """
Examples for a feature class and its view provider.
(c) 2009 Werner Mayer LGPL
"""
__author__ = "Werner Mayer <wmayer@users.sourceforge.net>"
import math
import FreeCAD
import Part
from FreeCAD import Base
from pivy import coin
class PartFeature:
def __init__(self, obj):
obj.Proxy = self
class Bo... |
extractor | giga | # coding: utf-8
from __future__ import unicode_literals
import itertools
from ..utils import compat_str, parse_duration, parse_iso8601, qualities, str_to_int
from .common import InfoExtractor
class GigaIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?giga\.de/(?:[^/]+/)*(?P<id>[^/]+)"
_TESTS = [
... |
messages | decode | from ..py2 import convert_py2_bytes
from .checks import check_data
from .specs import (
CHANNEL_MESSAGES,
MIN_PITCHWHEEL,
SPEC_BY_STATUS,
SYSEX_END,
SYSEX_START,
)
def _decode_sysex_data(data):
return {"data": tuple(data)}
def _decode_quarter_frame_data(data):
return {"frame_type": data[... |
Code | PGNreader | import LCEngine4 as LCEngine
from Code import Util
class Move:
def __init__(self):
self.pgn = ""
self.pv = ""
self.comentarios = []
self.variantes = []
self.criticas = []
self.desde = None
self.hasta = None
self.coronacion = None
self.siMate ... |
scripts | opensbp_post | # ***************************************************************************
# * Copyright (c) 2014 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
tools | gifTools | import os
import shutil
import tempfile
import AppKit
from drawBot.misc import executeExternalProcess, getExternalToolPath
def generateGif(sourcePaths, destPath, delays, loop=True):
gifsiclePath = getExternalToolPath(os.path.dirname(__file__), "gifsicle")
assert gifsiclePath is not None
cmds = [
... |
draftfunctions | svgtext | # -*- coding: utf8 -*-
# ***************************************************************************
# * Copyright (c) 2009 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2018 George Shuklin (amarao) *
# * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-cast... |
OLD | lineproc | ################################################################
### functions specific to text line processing
### (text line segmentation is in lineseg)
################################################################
import morph
from pylab import *
from scipy import stats
from scipy.ndimage import filters, interpo... |
extractor | mediaset | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_parse_qs, compat_urllib_parse_urlparse
from ..utils import ExtractorError, int_or_none, update_url_query
from .theplatform import ThePlatformBaseIE
class MediasetIE(ThePlatformBaseIE):
_TP_TLD = "eu"
_VALID_URL = r... |
PrinterOutput | NetworkMJPGImage | # Copyright (c) 2018 Aldo Hoeben / fieldOfView
# NetworkMJPGImage is released under the terms of the LGPLv3 or higher.
from PyQt6.QtCore import QByteArray, QRect, QUrl, pyqtProperty, pyqtSignal, pyqtSlot
from PyQt6.QtGui import QImage, QPainter
from PyQt6.QtNetwork import QNetworkAccessManager, QNetworkReply, QNetwork... |
generateBase | generateModel_Module | #!/usr/bin/env python3
#
# Generated Wed Sep 27 11:00:46 2023 by generateDS.py.
# Update it with: python generateDS.py -o generateModel_Module.py generateMetaModel_Module.xsd
#
# WARNING! All changes made in this file will be lost!
#
import getopt
import sys
from xml.dom import Node, minidom
#
# If you have install... |
sslcrypto | _aes | # pylint: disable=import-outside-toplevel
class AES:
def __init__(self, backend, fallback=None):
self._backend = backend
self._fallback = fallback
def get_algo_key_length(self, algo):
if algo.count("-") != 2:
raise ValueError("Invalid algorithm name")
try:
... |
Draft | Draft | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 FreeCAD Developers ... |
snippet | completer | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2012 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
# of th... |
Newsfeed | NewsfeedPlugin | import re
import time
from Db.DbQuery import DbQuery
from Debug import Debug
from Plugin import PluginManager
from util import helper
from util.Flag import flag
@PluginManager.registerTo("UiWebsocket")
class UiWebsocketPlugin(object):
def formatSiteInfo(self, site, create_user=True):
site_info = super(Ui... |
cd | linux_cd_parser | """
This module is a low-level reader and parser for audio CDs.
It heavily relies on ioctls to the linux kernel.
Original source for the code:
http://www.carey.geek.nz/code/python-cdrom/cdtoc.py
Source for all the magical constants and more infos on the ioctls:
linux/include/uapi/linux/cdrom.h... |
fec | bitflip | #!/usr/bin/env python
#
# Copyright 2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
def bitreverse(mint):
res = 0
while mint != 0:
res = res << 1
res += mint & 1
mint = mint >> 1
return res
const_lut = [2]
s... |
lector | settingsdialog | # This file is a part of Lector, a Qt based ebook reader
# Copyright (C) 2017-2019 BasioMeusPuga
# 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 o... |
telegram | alert_group_representative | import logging
from apps.alerts.models import AlertGroup
from apps.alerts.representative import AlertGroupAbstractRepresentative
from apps.telegram.models import TelegramMessage
from apps.telegram.tasks import (
edit_message,
on_create_alert_telegram_representative_async,
)
logger = logging.getLogger(__name__... |
src | gui | # MusicPlayer, https://github.com/albertz/music-player
# Copyright (c) 2012, Albert Zeyer, www.az2000.de
# All rights reserved.
# This code is under the 2-clause BSD license, see License.txt in the root directory of this project.
from __future__ import print_function
import sys
import appinfo
from TaskSystem import ... |
webkit | webkittab | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Wrapper over our (QtWebKit) WebView."""
import functools
import re
import xml.etree.ElementTree
from typing import Iterable, Optional, cast
from qutebrowser.browser import browsertab, share... |
mako | compat | import sys
import time
py3k = sys.version_info >= (3, 0)
py33 = sys.version_info >= (3, 3)
py2k = sys.version_info < (3,)
py26 = sys.version_info >= (2, 6)
py27 = sys.version_info >= (2, 7)
jython = sys.platform.startswith("java")
win32 = sys.platform.startswith("win")
pypy = hasattr(sys, "pypy_version_info")
if py3k... |
gui | MainWindow | """
Copyright 2008, 2009, 2011 Free Software Foundation, Inc.
This file is part of GNU Radio
SPDX-License-Identifier: GPL-2.0-or-later
"""
import logging
import os
from gi.repository import Gdk, GObject, Gtk
from ..core import Messages
from . import Actions, Bars, Utils
from .BlockTreeWindow import BlockTreeWindo... |
renderers | sms_renderer | from apps.alerts.incident_appearance.renderers.base_renderer import (
AlertBaseRenderer,
AlertGroupBaseRenderer,
)
from apps.alerts.incident_appearance.renderers.constants import DEFAULT_BACKUP_TITLE
from apps.alerts.incident_appearance.templaters import AlertSmsTemplater
from common.utils import str_or_backup
... |
mylar | parseit | # This file is part of Mylar.
#
# Mylar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mylar is distributed in the hope that... |
markupsafe | _native | # -*- coding: utf-8 -*-
"""
markupsafe._native
~~~~~~~~~~~~~~~~~~
Native Python implementation the C module is not compiled.
:copyright: (c) 2010 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from markupsafe import Markup
from markupsafe._compat import text_type
def escape(... |
ordered-model | serializer | from common.api_helpers.exceptions import BadRequest
from rest_framework import serializers
class OrderedModelSerializer(serializers.ModelSerializer):
"""Ordered model serializer to be used in public API."""
position = serializers.IntegerField(required=False, source="order")
# manual_order=True is intend... |
gui | StateCache | """
Copyright 2007 Free Software Foundation, Inc.
This file is part of GNU Radio
SPDX-License-Identifier: GPL-2.0-or-later
"""
from . import Actions
from .Constants import STATE_CACHE_SIZE
class StateCache(object):
"""
The state cache is an interface to a list to record data/states and to revert to previou... |
libs | singleapplication | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#######################################################################
#
# VidCutter - media cutter & joiner
#
# copyright © 2018 Pete Alexandrou
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licen... |
borg | logger | """logging facilities
The way to use this is as follows:
* each module declares its own logger, using:
from .logger import create_logger
logger = create_logger()
* then each module uses logger.info/warning/debug/etc according to the
level it believes is appropriate:
logger.debug('debugging info for d... |
printdlg | panels | # -*- coding: utf-8 -*-
#
# Copyright (C) 2016 by Ihor E. Novikov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... |
PyObjCTest | test_nscolor | import array
import sys
from AppKit import *
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
class TestRegressions(TestCase):
def testQualifiersInSignature(self):
NSColor.redColor().getRed_green_blue_alpha_(None, None, None, None)
def testMethods(self):
... |
versions | 46a278193a94_enable_millisecond_precision_in_mysql_ | """Enable millisecond precision in MySQL datetime
Revision ID: 46a278193a94
Revises: 4d3c1b59d011
Create Date: 2022-11-01 23:27:44.620893
"""
from alembic import op # noqa: I001
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = "46a278193a94"
down_revision = "4d3c1b59d011"
br... |
core | Connection | """
Copyright 2008-2015 Free Software Foundation, Inc.
This file is part of GNU Radio
SPDX-License-Identifier: GPL-2.0-or-later
"""
from .base import Element
from .Constants import ALIASES_OF
from .utils.descriptors import lazy_property
class Connection(Element):
is_connection = True
def __init__(self, p... |
TDTest | DrawHatchTest | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import unittest
import FreeCAD
class DrawHatchTest(unittest.TestCase):
def setUp(self):
"""Creates a page and view"""
self.path = os.path.dirname(os.path.abspath(__file__))
print("TDHatch path: " + self.path)
templateFileS... |
event | model | import datetime
import sys
from pathlib import Path
from photonix.photos.utils.metadata import PhotoMetadata, parse_datetime
class EventModel:
version = 20210505
approx_ram_mb = 120
max_num_workers = 2
def predict(self, image_file):
metadata = PhotoMetadata(image_file)
date_taken = N... |
scripts | msgfmt | #! /usr/bin/env python3
# Written by Martin v. Löwis <loewis@informatik.hu-berlin.de>
"""Generate binary message catalog from textual translation description.
This program converts a textual Uniforum-style message catalog (.po file) into
a binary GNU catalog (.mo file). This is essentially the same function as the
G... |
lib | profiler | """Profiler tools for CherryPy.
CherryPy users
==============
You can profile any of your pages as follows::
from cherrypy.lib import profiler
class Root:
p = profile.Profiler("/path/to/profile/dir")
def index(self):
self.p.run(self._index)
index.exposed = True
... |
Cloud | ToolPathUploader | # Copyright (c) 2019 Ultimaker B.V.
# !/usr/bin/env python
# -*- coding: utf-8 -*-
from typing import Any, Callable, Dict, Optional, Tuple, cast
from PyQt6.QtNetwork import QNetworkReply, QNetworkRequest
from UM.Logger import Logger
from UM.TaskManagement.HttpRequestManager import HttpRequestManager
from ..Models.Htt... |
Arch | ArchStairs | # ***************************************************************************
# * Copyright (c) 2013 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
models | escalation_chain | import typing
from apps.alerts.models.escalation_policy import (
generate_public_primary_key_for_escalation_policy,
)
from common.public_primary_keys import (
generate_public_primary_key,
increase_public_primary_key_length,
)
from django.conf import settings
from django.core.validators import MinLengthVali... |
downloaders | FileuploadNet | # -*- coding: utf-8 -*-
from ..anticaptchas.ReCaptcha import ReCaptcha
from ..base.simple_downloader import SimpleDownloader
class FileuploadNet(SimpleDownloader):
__name__ = "FileuploadNet"
__type__ = "downloader"
__version__ = "0.08"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?fi... |
update | update_languages | #!/usr/bin/env python
# This script generates languages.py from intersecting each engine's supported languages.
#
# Output files: searx/data/engines_languages.json and searx/languages.py
import json
from pathlib import Path
from pprint import pformat
from babel import Locale, UnknownLocaleError
from babel.languages ... |
tools | code_generator | #
# Copyright 2013-2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
""" A code generator (needed by ModToolAdd) """
from mako.template import Template
from ..templates import Templates
from .util_functions import (
str_to_fancyc_comment,
... |
network | cookie_jar | # -*- coding: utf-8 -*-
import time
from datetime import timedelta
class CookieJar:
def __init__(self, pluginname, account=None):
self.cookies = {}
self.plugin = pluginname
self.account = account
def add_cookies(self, clist):
for c in clist:
name = c.split("\t")[5... |
draftmake | make_line | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 FreeCAD Developers *
# * ... |
file-list | gio_wrapper | from __future__ import absolute_import
from gi.repository import Gio, GLib, GObject
from sunflower.plugin_base.provider import Mode
# GFile.read_bytes() has upper limit for size of G_MAXSSIZE (9223372036854775807) which is unsensibly large
MAX_READ_FILE_SIZE = 4 * 1024 * 1024 * 1024
class File:
"""This is a wra... |
commands | generate_preview_images | """ Generate preview images """
from bookwyrm import models, preview_images
from django.core.management.base import BaseCommand
# pylint: disable=line-too-long
class Command(BaseCommand):
"""Creates previews for existing objects"""
help = "Generate preview images"
# pylint: disable=no-self-use
def a... |
machine | keymap | import json
from collections import OrderedDict, defaultdict
from plover import log
class Keymap:
def __init__(self, keys, actions):
# List of supported actions.
self._actions = OrderedDict((action, n) for n, action in enumerate(actions))
self._actions["no-op"] = len(self._actions)
... |
plugins | twitch | """
$description Global live-streaming and video hosting social platform owned by Amazon.
$url twitch.tv
$type live, vod
$metadata id
$metadata author
$metadata category
$metadata title
$notes See the :ref:`Authentication <cli/plugins/twitch:Authentication>` docs on how to prevent ads.
$notes Read more about :ref:`embe... |
PathTests | TestPathDepthParams | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
interface | gladewindow | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# SoundConverter - GNOME application for converting between audio formats.
# Copyright 2004 Lars Wirzenius
# Copyright 2005-2020 Gautier Portet
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... |
Code | Util | import atexit
import base64
import codecs
import collections
import datetime
import gc
import glob
import hashlib
import os
import random
import shutil
import sqlite3
import threading
import time
import zlib
from itertools import cycle, izip
import chardet.universaldetector
import cPickle
import scandir
def xor_cryp... |
protos | image_resizer_pb2 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/image_resizer.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.prot... |
Notifications | setup | #
# Copyright (C) 2009-2010 Pedro Algarvio <pedro@algarvio.me>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2009 Damien Churchill <damoxc@gmail.com>
#
# This file is part of Deluge and is li... |
deluge-autoadd | gtkui | #
# Copyright (C) 2009 GazpachoKing <chase.sterling@gmail.com>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2009 Damien Churchill <damoxc@gmail.com>
#
# This file is part of Deluge and is li... |
draftfunctions | scale | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 FreeCAD Developers *
# * ... |
fta | inhibitgate | """Inhibit gate item definition."""
from gaphas.geometry import Rectangle
from gaphor.core.modeling import DrawContext
from gaphor.diagram.presentation import (
Classified,
ElementPresentation,
from_package_str,
)
from gaphor.diagram.shapes import Box, IconBox, Text, stroke
from gaphor.diagram.support impo... |
deluge | setup | #!/usr/bin/env python
#
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2009 Damien Churchill <damoxc@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 Ope... |
core | views | # -*- coding: utf-8 -*-
from babybuddy.mixins import LoginRequiredMixin, PermissionRequiredMixin
from babybuddy.views import BabyBuddyFilterView
from core import filters, forms, models, timeline
from django.contrib import messages
from django.contrib.messages.views import SuccessMessageMixin
from django.forms import Fo... |
ui | greeter | import importlib.resources
from pathlib import Path
from typing import NamedTuple
from gaphor.abc import ActionProvider, Service
from gaphor.action import action
from gaphor.application import distribution
from gaphor.babel import translate_model
from gaphor.core import event_handler
from gaphor.event import SessionCr... |
machine | geminipr | # Copyright (c) 2010-2011 Joshua Harlan Lifton.
# See LICENSE.txt for details.
"""Thread-based monitoring of a Gemini PR stenotype machine."""
import binascii
from plover import log
from plover.machine.base import SerialStenotypeBase
# In the Gemini PR protocol, each packet consists of exactly six bytes
# and the m... |
io | yaml | # Copyright 2016 Free Software Foundation, Inc.
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
from collections import OrderedDict
import yaml
from ..params.param import attributed_str
class GRCDumper(yaml.SafeDumper):
@classmethod
def add(cls, data_type):
def dec... |
plugins | zengatv | """
$description Indian live TV channels. OTT service from Zenga TV.
$url zengatv.com
$type live
"""
import logging
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.stream.hls import HLSStream
log = logging.getLogger(__name__)
@pluginmatcher(
re.compile(
r"https?://(www\.)?... |
downloaders | SendspaceCom | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
class SendspaceCom(SimpleDownloader):
__name__ = "SendspaceCom"
__type__ = "downloader"
__version__ = "0.23"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?sendspace\.com/file/\w+"
__config__ ... |
beetsplug | embyupdate | """Updates the Emby Library whenever the beets library is changed.
emby:
host: localhost
port: 8096
username: user
apikey: apikey
password: password
"""
import hashlib
from urllib.parse import parse_qs, urlencode, urljoin, urlsplit, urlunsplit
import requests
from beets im... |
rights | views | # 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 ... |
api | insight | import json
from functools import lru_cache
from typing import Any, Dict, List, Optional, Type, Union, cast
import structlog
from django.db import transaction
from django.db.models import Count, Prefetch, QuerySet
from django.db.models.query_utils import Q
from django.http import HttpResponse
from django.utils.text im... |
network | audio_source | #!/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
#
#
import sys
from argparse import ArgumentParser
from gnuradio import blocks, gr
try:
from gnuradio import audio
except ImportError:
sys.stderr.... |
other | doxypy | #!/usr/bin/env python
__applicationName__ = "doxypy"
__blurb__ = """
doxypy is an input filter for Doxygen. It preprocesses python
files so that docstrings of classes and functions are reformatted
into Doxygen-conform documentation blocks.
"""
__doc__ = (
__blurb__
+ """
In order to make Doxygen preprocess f... |
gpodder | jsonconfig | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2018 The gPodder Team
#
# gPodder is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the Licens... |
decrypters | LixIn | # -*- coding: utf-8 -*-
import re
import urllib.parse
from ..base.decrypter import BaseDecrypter
class LixIn(BaseDecrypter):
__name__ = "LixIn"
__type__ = "decrypter"
__version__ = "0.28"
__status__ = "testing"
__pattern__ = r"http://(?:www\.)?lix\.in/(?P<ID>.+)"
__config__ = [
("ena... |
-development | helpers_locale | import os
# https://msdn.microsoft.com/en-us/library/windows/desktop/dd317756(v=vs.85).aspx
windows_codecs = {
"cp1252", # Standard Windows
"cp1251", # Russian
"cp037",
"cp424",
"cp437",
"cp500",
"cp720",
"cp737",
"cp775",
"cp850",
"cp852",
"cp855",
"cp856",
"c... |
extractor | xiami | # coding: utf-8
from __future__ import unicode_literals
from ..compat import compat_urllib_parse_unquote
from ..utils import int_or_none
from .common import InfoExtractor
class XiamiBaseIE(InfoExtractor):
_API_BASE_URL = "https://emumo.xiami.com/song/playlist/cat/json/id"
def _download_webpage_handle(self, ... |
Surface | InitGui | # -*- coding: utf8 -*-
# ***************************************************************************
# * Copyright (c) 2014 Nathan Miller <Nathan.A.Mill@gmail.com> *
# * Copyright (c) 2014 Balázs Bámer *
# * ... |
borg | repository | import errno
import mmap
import os
import shutil
import stat
import struct
import time
from binascii import unhexlify
from collections import defaultdict
from configparser import ConfigParser
from datetime import datetime, timezone
from functools import partial
from itertools import islice
from .checksums import Strea... |
views | escalation_chain | from apps.alerts.models import EscalationChain
from apps.api.permissions import RBACPermission
from apps.api.serializers.escalation_chain import (
EscalationChainListSerializer,
EscalationChainSerializer,
FilterEscalationChainSerializer,
)
from apps.auth_token.auth import PluginAuthentication
from apps.mobi... |
clients | transmission | import os
import mylar
from mylar import logger
from transmissionrpc import Client
class TorrentClient(object):
def __init__(self):
self.conn = None
def connect(self, host, username, password):
if self.conn is not None:
return self.conn
if not host:
return Fa... |
extractor | cbs | from __future__ import unicode_literals
from ..utils import (
ExtractorError,
find_xpath_attr,
int_or_none,
update_url_query,
xpath_element,
xpath_text,
)
from .theplatform import ThePlatformFeedIE
class CBSBaseIE(ThePlatformFeedIE):
def _parse_smil_subtitles(self, smil, namespace=None, s... |
ocrolib | toplevel | from __future__ import print_function
import functools
import linecache
import os
import sys
import warnings
from types import NoneType
import numpy as np
# FIXME from ... import wrap
### printing
def strc(arg, n=10):
"""Compact version of `str`."""
if isinstance(arg, float):
return "%.3g" % arg
... |
meshes | mesh_buckling_plate_tria6 | def create_nodes(femmesh):
# nodes
femmesh.addNode(0.0, 0.0, 0.0, 1)
femmesh.addNode(0.0, 6000.0, 0.0, 2)
femmesh.addNode(8000.0, 0.0, 0.0, 3)
femmesh.addNode(8000.0, 6000.0, 0.0, 4)
femmesh.addNode(0.0, 300.0, 0.0, 5)
femmesh.addNode(0.0, 600.0, 0.0, 6)
femmesh.addNode(0.0, 900.0, 0.0, ... |
ext | turbogears | # ext/turbogears.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
from mako import compat
from mako.lookup import TemplateLookup
from mako.template import Templat... |
saveddata | skill | # ===============================================================================
# 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, ... |
accounts | UpstoreNet | # -*- coding: utf-8 -*-
import re
import time
from ..base.account import BaseAccount
class UpstoreNet(BaseAccount):
__name__ = "UpstoreNet"
__type__ = "account"
__version__ = "0.01"
__status__ = "testing"
__description__ = """Upstore.net account plugin"""
__license__ = "GPLv3"
__authors... |
fitEwarStats | graph | # =============================================================================
# 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 ... |
GraphicsBindings | JoystickView | #
# JoystickView.py
# GraphicsBindings
#
# Converted by u.fiedler on feb 2005
# with great help from Bob Ippolito - Thank you Bob!
#
# The original version was written in Objective-C by Malcolm Crawford
# http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
from math import atan2, cos, pi, sin, sqrt
fro... |
http | exceptions | # -*- coding: utf-8 -*-
import http.client
PROPRIETARY_RESPONSES = {
440: "Login Timeout - The client's session has expired and must log in again.",
449: "Retry With - The server cannot honour the request because the user has not provided the required information",
451: "Redirect - Unsupported Redirect He... |
base | cache | # =============================================================================
# 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 ... |
generators | sweep | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009 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... |
libs | graphicseffects | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#######################################################################
#
# VidCutter - media cutter & joiner
#
# copyright © 2018 Pete Alexandrou
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.