section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
settings | dev | """
Development specific settings for Dissemin project.
"""
import os
from .common import *
DEBUG = True
DEBUG_TOOLBAR_CONFIG = {"SHOW_TOOLBAR_CALLBACK": lambda r: True}
# Set the log level with LOGLEVEL. If exists, this value is overwritten by the environment variable DISSEMIN_LOGLEVEL
LOGLEVEL = "DEBUG"
LOGGING["... |
src | DigitalFactoryFileModel | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Callable, Dict, List
from PyQt6.QtCore import Qt, pyqtSignal
from UM.Logger import Logger
from UM.Qt.ListModel import ListModel
from .DigitalFactoryFileResponse import DigitalFactoryFileResponse
DIGITAL... |
widgets | popup | #
# 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 deluge.decor... |
urllib3 | connectionpool | import errno
import logging
import socket
import sys
import warnings
from socket import error as SocketError
from socket import timeout as SocketTimeout
try: # Python 3
from queue import Empty, Full, LifoQueue
except ImportError:
from Queue import LifoQueue, Empty, Full
import Queue as _ # Platform-speci... |
pyelliptic | cipher | """
Symmetric Encryption
"""
# Copyright (C) 2011 Yann GUIBET <yannguibet@gmail.com>
# See LICENSE for details.
from .openssl import OpenSSL
# pylint: disable=redefined-builtin
class Cipher(object):
"""
Main class for encryption
import pyelliptic
iv = pyelliptic.Cipher.gen_IV('aes-256-cfb'... |
lib | api_token | # -*- coding: utf-8 -*-
from __future__ import annotations
import logging
from calendar import timegm
from datetime import datetime
from typing import Any, Iterable, Mapping, Optional
import ckan.model as model
import ckan.plugins as plugins
import jwt
from ckan.common import config
from ckan.exceptions import CkanCo... |
dev | standardpaths_tester | #!/usr/bin/env python3
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Show various QStandardPath paths."""
import os
import sys
from PyQt6.QtCore import (
PYQT_VERSION_STR,
QT_VERSION_STR,
QCoreApplication,
QStandardPat... |
modulesets | checkupdates | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 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 late... |
insight-log | resource_insight_logs | import enum
import json
import logging
import re
from abc import ABC, abstractmethod
from .insight_logs_enabled_check import is_insight_logs_enabled
insight_logger = logging.getLogger("insight_logger")
logger = logging.getLogger(__name__)
class EntityEvent(enum.Enum):
CREATED = "created"
UPDATED = "updated"... |
PyObjCTest | test_nswindowrestoration | import AppKit
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
class RestorationHelper(AppKit.NSObject):
def restoreWindowWithIdentifier_state_completionHandler_(self, a, b, c):
pass
class TestNSWindowRestoration(TestCase):
@min_os_level("10.7")
@expect... |
entity | util | from typing import Any, Dict, List, Sequence, Set, Tuple
from posthog.constants import TREND_FILTER_TYPE_ACTIONS
from posthog.hogql.hogql import HogQLContext
from posthog.models.action.util import format_action_filter
from posthog.models.entity import Entity
from posthog.queries.util import PersonPropertiesMode
def ... |
addons | ImageTyperz | # -*- coding: utf-8 -*-
import base64
import re
import pycurl
from pyload.core.network.request_factory import get_request
from ..base.addon import BaseAddon, threaded
class ImageTyperzException(Exception):
def __init__(self, err):
self.err = err
def get_code(self):
return self.err
def ... |
util | retry | import logging
import time
from ..exceptions import (
ConnectTimeoutError,
MaxRetryError,
ProtocolError,
ReadTimeoutError,
ResponseError,
)
from ..packages import six
log = logging.getLogger(__name__)
class Retry(object):
"""Retry configuration.
Each retry attempt will create a new Retr... |
extractor | photobucket | from __future__ import unicode_literals
import json
import re
from ..compat import compat_urllib_parse_unquote
from .common import InfoExtractor
class PhotobucketIE(InfoExtractor):
_VALID_URL = r"https?://(?:[a-z0-9]+\.)?photobucket\.com/.*(([\?\&]current=)|_)(?P<id>.*)\.(?P<ext>(flv)|(mp4))"
_TEST = {
... |
list | list | """ book list views"""
from typing import Optional
from bookwyrm import book_search, forms, models
from bookwyrm.activitypub import ActivitypubResponse
from bookwyrm.settings import PAGE_LENGTH
from bookwyrm.views.helpers import (
is_api_request,
maybe_redirect_local_path,
redirect_to_referer,
)
from djang... |
interactions | interactionstoolbox | """The definition for the interactions section of the toolbox."""
from gaphas.item import SE
from gaphas.segment import Segment
from gaphor import UML
from gaphor.core import gettext
from gaphor.diagram.diagramtoolbox import ToolDef, ToolSection, new_item_factory
from gaphor.UML import diagramitems
from gaphor.UML.rec... |
beetsplug | deezer | # This file is part of beets.
# Copyright 2019, Rahul Ahuja.
#
# 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, mod... |
extractor | tass | # coding: utf-8
from __future__ import unicode_literals
import json
from ..utils import js_to_json, qualities
from .common import InfoExtractor
class TassIE(InfoExtractor):
_VALID_URL = r"https?://(?:tass\.ru|itar-tass\.com)/[^/]+/(?P<id>\d+)"
_TESTS = [
{
"url": "http://tass.ru/obschest... |
core | Input | #####################################################################
# -*- coding: utf-8 -*- #
# #
# Frets on Fire #
# Copyright (C) 2006 Sami Kyöstilä ... |
filemanager | storage | __author__ = "Gina Häußge <osd@foosel.net>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import copy
import logging
import os
import shutil
from contextlib import contextma... |
cli | archivebox_init | #!/usr/bin/env python3
__package__ = "archivebox.cli"
__command__ = "archivebox init"
import argparse
import sys
from typing import IO, List, Optional
from ..config import OUTPUT_DIR
from ..logging_util import SmartFormatter, reject_stdin
from ..main import init
from ..util import docstring
@docstring(init.__doc__... |
cherrypy | _cpwsgi | """WSGI interface (see PEP 333 and 3333).
Note that WSGI environ keys and values are 'native strings'; that is,
whatever the type of "" is. For Python 2, that's a byte string; for Python 3,
it's a unicode string. But PEP 3333 says: "even if Python's str type is
actually Unicode "under the hood", the content of native ... |
transmissionrpc | constants | # -*- coding: utf-8 -*-
# Copyright (c) 2008-2013 Erik Svensson <erik.public@gmail.com>
# Licensed under the MIT license.
import logging
from six import iteritems
LOGGER = logging.getLogger("transmissionrpc")
LOGGER.setLevel(logging.ERROR)
def mirror_dict(source):
"""
Creates a dictionary with all values a... |
containers | DLC | # -*- coding: utf-8 -*-
import base64
import os
import re
import xml.dom.minidom
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from pyload.core.utils.convert import to_str
from ..base.container import BaseContainer
class BadDLC... |
http | stream | # neubot/http/stream.py
#
# 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 the GNU General Public... |
lib | job | """
A Job is MCP Client's representation of a unit of work to be
performed--corresponding to a Task on the MCP Server side. Jobs are run in
batches by clientScript modules and populated with an exit code, standard out
and standard error information.
"""
import logging
import sys
import traceback
from contextlib import... |
util | enumeration | # This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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, ... |
PyObjCTest | test_imagekitdeprecated | from PyObjCTools.TestSupport import *
from Quartz import *
try:
unicode
except NameError:
unicode = str
class TestImageKitDeprecatedHelper(NSObject):
def numberOfCellsInImageBrowser_(self, b):
return 1
def imageBrowser_cellAtIndex_(self, b, idx):
return None
def imageBrowser_mov... |
Machines | ContainerNode | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Any, Dict, Optional
from UM.ConfigurationErrorMessage import ConfigurationErrorMessage
from UM.Logger import Logger
from UM.Settings.ContainerRegistry import ContainerRegistry
from UM.Settings.InstanceCo... |
notification | api | import importlib
from django.utils.translation import ungettext as _plural
from .settings import notification_settings
__all__ = (
"get_notifications",
"add_notification_for",
"broadcast_notification",
"mark_read",
"mark_all_read",
"delete_notification_per_tag",
)
def get_backend_class():
... |
migrations | 0021_session_recording_events_materialize_full_snapshot | from infi.clickhouse_orm import migrations
from posthog.client import sync_execute
from posthog.settings import CLICKHOUSE_CLUSTER
SESSION_RECORDING_EVENTS_MATERIALIZED_COLUMN_COMMENTS_SQL = (
lambda: """
ALTER TABLE session_recording_events
ON CLUSTER '{cluster}'
COMMENT COLUMN has_full_snapshot 'colu... |
reports | views_pages | #
# Quru Image Server
#
# Document: views_pages.py
# Date started: 08 Sep 2011
# By: Matt Fozard
# Purpose: Reports web page 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 ... |
posthog | version_requirement | from typing import Tuple
from posthog import redis
from semantic_version.base import SimpleSpec, Version
class ServiceVersionRequirement:
accepted_services = ("clickhouse", "postgresql", "redis")
def __init__(self, service, supported_version):
if service not in self.accepted_services:
se... |
postprocessor | embedthumbnail | # coding: utf-8
from __future__ import unicode_literals
import os
import subprocess
from ..compat import compat_open as open
from ..utils import (
PostProcessingError,
check_executable,
encodeArgument,
encodeFilename,
prepend_extension,
process_communicate_or_kill,
replace_extension,
s... |
SCL | Model | # Copyright (c) 2011-2012, 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 cod... |
sql | model | from datetime import datetime
import sqlalchemy as sa
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
metadata = sa.MetaData()
Base = declarative_base(metadata=metadata)
class ConfigValue(Base):
__tablename__ = "config_value"
id = sa.Column(sa.Integer, prima... |
stargate | takes | from sglib.lib import *
from sglib.lib.util import *
class SgTakes:
def __init__(self):
self._dict = {} # map take uid to a list of item uids
self._lookup = {} # map item uid to take uid
def are_common(self, uids):
"""Return a take uid if all item uids are part of the same take,
... |
BasicDrawing | PathDrawing | import math
from Quartz import *
def doEgg(context):
p0 = CGPoint(0, 0)
p1 = CGPoint(0, 200)
c1 = CGPoint(140, 5)
c2 = CGPoint(80, 198)
CGContextTranslateCTM(context, 100, 5)
CGContextBeginPath(context)
CGContextMoveToPoint(context, p0.x, p0.y)
# Create the Bezier path segment for t... |
library | librarians | # Copyright 2006 Joe Wreschnig
# 2012-2022 Nick Boultbee
# 2014 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 o... |
events | inhibit | # Copyright 2011 Christoph Reiter <reiter.christoph@gmail.com>
# Copyright 2020 Antigone <mail@antigone.xyz>
#
# 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... |
SimulationView | SimulationPass | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os.path
import numpy
from cura.LayerPolygon import LayerPolygon
from cura.Settings.ExtruderManager import ExtruderManager
from UM.Application import Application
from UM.Math.Color import Color
from UM.Math.Vector im... |
packages | six | """Utilities for writing code that runs on Python 2 and 3"""
# Copyright (c) 2010-2011 Benjamin Peterson
# 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 witho... |
rtorrent | err | # 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, ... |
detectors | local_detector | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com thumbor@googlegroups.com
from os.path import abspath, dirname, isabs, join
from typing import... |
colors | hsvcube | # This file is part of MyPaint.
# Copyright (C) 2012-2013 by Andrew Chadwick <a.t.chadwickgmail.com>
# Copyright (C) 2014-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 Softw... |
extractor | ndtv | # coding: utf-8
from __future__ import unicode_literals
from ..compat import compat_urllib_parse_unquote_plus
from ..utils import parse_duration, remove_end, unified_strdate, urljoin
from .common import InfoExtractor
class NDTVIE(InfoExtractor):
_VALID_URL = r"https?://(?:[^/]+\.)?ndtv\.com/(?:[^/]+/)*videos?/?(... |
beetsplug | duplicates | # This file is part of beets.
# Copyright 2016, Pedro Silva.
#
# 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, mod... |
Base | MachineState | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2021 sliptonic shopinthewoods@gmail.com *
# * *
# * This program is free software; you can redistribute it a... |
formats | vgm | # Copyright 2014 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.
import os
import struct
from typing ... |
xl | lyrics | # Copyright (C) 2008-2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... |
midiinput | tool | """
MIDI input dock
"""
import actioncollection
import actioncollectionmanager
import icons
import panel
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QKeySequence
from PyQt5.QtWidgets import QAction
class MidiInputTool(panel.Panel):
"""Midi Tool."""
def __init__(self, mainwindow):
super().__... |
Arch | ArchCommands | # -*- coding: utf8 -*-
# ***************************************************************************
# * Copyright (c) 2011 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it an... |
decrypters | FilecryptCc | # -*- coding: utf-8 -*-
#
# Test links:
# http://filecrypt.cc/Container/64E039F859.html
import base64
import re
import urllib.parse
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from pyload.core.network.cookie_jar import Cookie... |
extractor | ccc | # coding: utf-8
from __future__ import unicode_literals
from ..utils import int_or_none, parse_iso8601, try_get, url_or_none
from .common import InfoExtractor
class CCCIE(InfoExtractor):
IE_NAME = "media.ccc.de"
_VALID_URL = r"https?://(?:www\.)?media\.ccc\.de/v/(?P<id>[^/?#&]+)"
_TESTS = [
{
... |
gui-qt | machine_options | from copy import copy
from pathlib import Path
from plover import _
from plover.gui_qt.config_keyboard_widget_ui import Ui_KeyboardWidget
from plover.gui_qt.config_serial_widget_ui import Ui_SerialWidget
from plover.oslayer.serial import patch_ports_info
from PyQt5.QtCore import Qt, QVariant, pyqtSignal
from PyQt5.QtG... |
draftobjects | rectangle | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 FreeCAD Developers *
# * ... |
transports | rawwebsocket | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
"""
sockjs.tornado.transports.rawwebsocket
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Raw websocket transport implementation
"""
import logging
from octoprint.vendor.sockjs.tornado import session, webso... |
accounts | LeechThreeHundreedSixtyCom | # -*- coding: utf-8 -*-
import json
import time
from datetime import timedelta
from ..base.multi_account import MultiAccount
class LeechThreeHundreedSixtyCom(MultiAccount):
__name__ = "LeechThreeHundreedSixtyCom"
__type__ = "account"
__version__ = "0.02"
__status__ = "testing"
__description__ =... |
parsers | wallabag_atom | __package__ = "archivebox.parsers"
from datetime import datetime
from typing import IO, Iterable
from ..index.schema import Link
from ..util import enforce_types, htmldecode, str_between
@enforce_types
def parse_wallabag_atom_export(rss_file: IO[str], **_kwargs) -> Iterable[Link]:
"""Parse Wallabag Atom files ... |
plugins | mdstrm | """
$description CDN hosting live content for various websites in the Americas.
$url mdstrm.com
$url latina.pe/tvenvivo
$url saltillo.multimedios.com/video
$type live
$metadata id
$metadata title
"""
import logging
import re
from urllib.parse import urlparse
from streamlink.plugin import Plugin, pluginmatcher
from st... |
chardet | universaldetector | ######################## 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... |
QT | PantallaWashing | import os
import shutil
from Code import DBgames, Partida, Util, Washing
from Code.QT import (
Colocacion,
Columnas,
Controles,
FormLayout,
Grid,
Iconos,
PantallaSavePGN,
QTUtil2,
QTVarios,
)
from PyQt4 import QtCore, QtSvg
class WWashing(QTVarios.WDialogo):
def __init__(self,... |
migrations | 0233_plugin_source_file | # Generated by Django 3.2.12 on 2022-05-16 11:49
import json
import django.db.models.deletion
import posthog.models.utils
from django.db import migrations, models
def migrate_plugin_source(apps, schema_editor):
Plugin = apps.get_model("posthog", "Plugin")
PluginSourceFile = apps.get_model("posthog", "PluginS... |
frescobaldi-app | documentactions | # 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
... |
qltk | paned | # Copyright 2005 Joe Wreschnig, Michael Urman
# 2017 Fredrik Strupe
#
# 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 v... |
extractor | googledrive | from __future__ import unicode_literals
import re
from ..compat import compat_parse_qs
from ..utils import (
ExtractorError,
determine_ext,
get_element_by_class,
int_or_none,
lowercase_escape,
try_get,
update_url_query,
)
from .common import InfoExtractor
class GoogleDriveIE(InfoExtracto... |
migrations | 0042_auto_20210201_2108 | # Generated by Django 3.0.7 on 2021-02-01 21:08
import bookwyrm.models.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0041_auto_20210131_1614"),
]
operations = [
migrations.AlterModelOptions(
name="list",
... |
picard | config | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2006-2007, 2014, 2017 Lukáš Lalinský
# Copyright (C) 2008, 2014, 2019-2023 Philipp Wolfer
# Copyright (C) 2012, 2017 Wieland Hoffmann
# Copyright (C) 2012-2014 Michael Wiencek
# Copyright (C) 2013-2016, 2018-2022 Laurent Monin
... |
gui | test_workers_startup | # SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2022-2023 FreeCAD Project Association *
# * ... |
User | User | import binascii
import json
import logging
import time
import gevent
import util
from Config import config
from Crypt import CryptBitcoin
from Debug import Debug
from Plugin import PluginManager
from util import helper
@PluginManager.acceptPlugins
class User(object):
def __init__(self, master_address=None, maste... |
commands | rebuild_transfer_backlog | """Recreate the ``transfers`` Elasticsearch index from the Transfer Backlog.
This is useful if the Elasticsearch index has been deleted or damaged
or during software upgrades where the document schema has changed.
It also requests the Storage Service to reindex the transfers.
This must be run on the same system that... |
Settings | CuraFormulaFunctions | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import TYPE_CHECKING, Any, List, Optional
from UM.Logger import Logger
from UM.Settings.PropertyEvaluationContext import PropertyEvaluationContext
from UM.Settings.SettingFunction import SettingFunction
if TYP... |
extractor | arte | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_str, compat_urlparse
from ..utils import (
ExtractorError,
int_or_none,
qualities,
strip_or_none,
try_get,
unified_strdate,
url_or_none,
)
from .common import InfoExtractor
class ArteTVBaseIE(In... |
pol | feed | import datetime
import re
import sys
from contextlib import closing
from hashlib import md5
import MySQLdb
import w3lib.html
import w3lib.url
from feedgenerator import Enclosure, Rss201rev2Feed
from lxml import etree
from settings import DATABASES, DOWNLOADER_USER_AGENT
from twisted.logger import Logger
from .db impo... |
common | task | # -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
import logging
import os
import signal
import subprocess
from whipper.extern import asyncsub
from whipper.extern.task import task
logger = logging.getLogger(__name__)
class SyncRunner(task.SyncRunner):
pass
class LoggableTask(task.Task):
pass
class Logg... |
previous-dbs | knowledge_db | import datetime
import logging
from dataclasses import dataclass
from enum import IntEnum
from typing import Any, Callable, Iterator, List, Optional, Set
from pony import orm
from pony.orm import raw_sql
from pony.orm.core import Entity, Query, select
from pony.utils import between
from tribler.core.components.knowled... |
draftguitools | gui_mirror | # ***************************************************************************
# * (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 | groupon | from __future__ import unicode_literals
from .common import InfoExtractor
class GrouponIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?groupon\.com/deals/(?P<id>[^/?#&]+)"
_TEST = {
"url": "https://www.groupon.com/deals/bikram-yoga-huntington-beach-2#ooid=tubGNycTo_9Uxg82uESj4i61EYX8nyuf",
... |
Code | GestorTurnOnLights | import time
from Code import ControlPosicion, Gestor, Jugada, TurnOnLights
from Code.Constantes import *
from Code.QT import QTUtil, QTUtil2
class GestorTurnOnLights(Gestor.Gestor):
def inicio(self, num_theme, num_block, tol):
if hasattr(self, "reiniciando"):
if self.reiniciando:
... |
plugins | nabu | # -*- coding: utf-8 -*-
"""
This file is part of the Stargate project, Copyright Stargate Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 3 of the License.
This program is distributed in... |
migrations | 0025_cohort | # Generated by Django 3.0.3 on 2020-02-26 02:02
import django.contrib.postgres.fields.jsonb
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0024_add_event_distinct_id_index"),
]
operations = [
... |
mpdserver | main | # Copyright 2014 Christoph Reiter <reiter.christoph@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
import... |
draftmake | make_layer | # ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * *
# * Th... |
photocollage | artwork | # Copyright (C) 2014 Adrien Vergé
#
# 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.
#
# This program is distributed in t... |
brainz | query | # Copyright 2005-2010 Joshua Kwan <joshk@triplehelix.org>,
# Michael Ball <michael.ball@gmail.com>,
# Steven Robertson <steven@strobe.cc>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... |
extractor | tv5mondeplus | # coding: utf-8
from __future__ import unicode_literals
from ..utils import determine_ext, extract_attributes, int_or_none, parse_duration
from .common import InfoExtractor
class TV5MondePlusIE(InfoExtractor):
IE_DESC = "TV5MONDE+"
_VALID_URL = r"https?://(?:www\.)?(?:tv5mondeplus|revoir\.tv5monde)\.com/tout... |
keyinput | basekeyparser | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Base class for vim-like key sequence parser."""
import dataclasses
import string
import traceback
import types
from typing import Mapping, MutableMapping, Optional, Sequence
from qutebrowse... |
bup | xstat | """Enhanced stat operations for bup."""
from __future__ import absolute_import
import os
import stat as pystat
import sys
from bup import _helpers
try:
_bup_utimensat = _helpers.bup_utimensat
except AttributeError as e:
_bup_utimensat = False
try:
_bup_utimes = _helpers.bup_utimes
except AttributeError... |
Resources | MidiSettings | # encoding: utf-8
"""
Copyright 2009-2017 Olivier Belanger
This file is part of SoundGrain.
SoundGrain is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any lat... |
engines | google | # SPDX-License-Identifier: AGPL-3.0-or-later
"""Google (Web)
For detailed description of the *REST-full* API see: `Query Parameter
Definitions`_.
.. _Query Parameter Definitions:
https://developers.google.com/custom-search/docs/xml_results#WebSearch_Query_Parameter_Definitions
"""
# pylint: disable=invalid-name, ... |
dtv | atsc_rx_filter | #!/usr/bin/env /usr/bin/python
#
# Copyright 2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your o... |
css | cssstylerule | """CSSStyleRule implements DOM Level 2 CSS CSSStyleRule."""
__all__ = ["CSSStyleRule"]
__docformat__ = "restructuredtext"
__version__ = "$Id$"
import xml.dom
import cssrule
import cssutils
from cssstyledeclaration import CSSStyleDeclaration
from selectorlist import SelectorList
class CSSStyleRule(cssrule.CSSRule):
... |
Op | Base | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
mod-dash | main | # mod_dash/main.py
#
# Copyright (c) 2013
# Nexa Center for Internet & Society, Politecnico di Torino (DAUIN)
# and Simone Basso <bassosimone@gmail.com>
#
# 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 G... |
tornado | periodic | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
"""
sockjs.tornado.periodic
~~~~~~~~~~~~~~~~~~~~~~~
This module implements customized PeriodicCallback from tornado with
support of the sliding window.
"""
import logging
import time
LOG = logg... |
api | person | import json
from datetime import datetime
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar, cast
import posthoganalytics
from django.db.models import Prefetch
from django.shortcuts import get_object_or_404
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import Open... |
migrations | 0008_auto_20230712_1613 | # Generated by Django 3.2.19 on 2023-07-12 16:13
import logging
from apps.alerts.models import EscalationPolicy
from apps.webhooks.models import Webhook
from django.core.exceptions import ObjectDoesNotExist
from django.db import migrations
LEGACY_SUFFIX = " (Legacy)"
logger = logging.getLogger(__name__)
def conver... |
sabnzbd | rss | #!/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... |
utils | systrayiconthread | #!/usr/bin/python3
# based on SysTrayIcon.py by Simon Brunning - simon@brunningonline.net
# http://www.brunningonline.net/simon/blog/archives/001835.html
# http://www.brunningonline.net/simon/blog/archives/SysTrayIcon.py.html
# modified on 2011-10-04 by Jan Schejbal to support threading and preload icons
# override do... |
schema-checker | validator | # Copyright 2016 Free Software Foundation, Inc.
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
from .utils import Message, Spec
class Validator(object):
def __init__(self, scheme=None):
self._path = []
self.scheme = scheme
self.messages = []
self... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.