section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
util
request
from base64 import b64encode from ..packages.six import b ACCEPT_ENCODING = "gzip,deflate" def make_headers( keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=None, proxy_basic_auth=None, disable_cache=None, ): """ Shortcuts for generating request headers. :para...
devtools
input_
# DO NOT EDIT THIS FILE! # # This file is generated from the CDP specification. If you need to make # changes, edit the generator and regenerate all modules. # # CDP version: v0.0.1156692 # CDP domain: Input from __future__ import annotations import enum # noqa import typing from dataclasses import dataclass # noqa...
resources
compile
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006 Lukáš Lalinský # Copyright (C) 2013-2014, 2018 Laurent Monin # Copyright (C) 2014 Shadab Zafar # Copyright (C) 2016 Sambhav Kothari # # This program is free software; you can redistribute it and/or # ...
model
types
# encoding: utf-8 import copy import uuid from typing import Any import simplejson as json from sqlalchemy import types __all__ = ["make_uuid", "UuidType", "JsonType", "JsonDictType"] def make_uuid() -> str: return str(uuid.uuid4()) class UuidType(types.TypeDecorator): # type: ignore impl = types.Unicod...
engines
wordnik
# SPDX-License-Identifier: AGPL-3.0-or-later """Wordnik (general) """ from lxml.html import fromstring from searx import logger from searx.raise_for_httperror import raise_for_httperror from searx.utils import extract_text logger = logger.getChild("Wordnik engine") # about about = { "website": "https://www.word...
builders
preprocessor_builder
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
cli
config
# -*- coding: utf-8 -*- from __future__ import annotations import itertools from typing import Iterable import click from ckan.common import config as cfg from ckan.config.declaration import Declaration, Flag from ckan.config.declaration.key import Pattern from . import error_shout @click.group(short_help="Search,...
src
api
# Copyright (c) 2012-2016 Jonathan Warren # Copyright (c) 2012-2022 The Bitmessage developers """ This is not what you run to start the Bitmessage API. Instead, `enable the API <https://bitmessage.org/wiki/API>`_ and optionally `enable daemon mode <https://bitmessage.org/wiki/Daemon>`_ then run the PyBitmessage. The ...
AnnounceBitTorrent
AnnounceBitTorrentPlugin
import socket import struct import time import urllib.request import gevent import lib.bencode_open as bencode_open import socks import sockshandler from Config import config from Debug import Debug from lib.subtl.subtl import UdpTrackerClient from Plugin import PluginManager from util import helper # We can only im...
custom-config-setting
plugin
# encoding: utf-8 from __future__ import annotations from typing import Any, Callable import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from ckan.common import CKANConfig, config from ckan.config.declaration import Declaration, Key def show_most_popular_groups(): """Return the value of the m...
box-coders
keypoint_box_coder
# 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...
qtgui
digitalnumbercontrol
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import pmt from gnuradio import gr from PyQt5 import QtCore from PyQt5.QtCore import QSize from PyQt5.QtCore import Qt from PyQt5.QtCore i...
fta
orgate
"""OR 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.diag...
gdist
man
# Copyright 2007-2008 Joe Wreschnig # 2009,2012-2016 Christoph Reiter # # 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 right...
parsers
fb2
# 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...
plugins
openrectv
""" $description Japanese live-streaming and video hosting social platform. $url openrec.tv $type live, vod """ import logging import re from streamlink.plugin import Plugin, pluginargument, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls import HLSStream log = logging.getLogger(_...
gpodder
utilwin32ctypes
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2018 The gPodder Team # Copyright (c) 2018 Eric Le Lay # # 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 Foundatio...
slack
utils
import enum import typing from datetime import datetime from apps.slack.client import SlackClient from apps.slack.errors import SlackAPIChannelNotFoundError if typing.TYPE_CHECKING: from apps.user_management.models import Organization class SlackDateFormat(enum.StrEnum): """ https://api.slack.com/refere...
core
notifications
from typing import Optional from ipv8.messaging.anonymization.tunnel import Circuit # pylint: disable=unused-argument def torrent_finished(infohash: str, name: str, hidden: bool): # A torrent has finished downloading. Contains the infohash and the name of the torrent ... def tribler_shutdown_state(state: ...
models
report
# 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, ...
util
comm
__author__ = "Gina Häußge <osd@foosel.net> based on work by David Braam" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2013 David Braam, Gina Häußge & others - Released under terms of the AGPLv3 License" """ The code in this file is based on Cura...
beetsplug
inline
# 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, ...
drone
projectedAdd
import math import wx from gui.fitCommands.helpers import DroneInfo from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcAddProjectedDroneCommand(wx.Command): def __init__(self, fitID, droneInfo): wx.Command.__init__(self, True, "Add Projected Drone") self....
sequencer
item
from sglib import constants from sglib.lib import util from sglib.lib.translate import _ from sglib.lib.util import * from sglib.log import LOG from sglib.math import clip_max, clip_min, clip_value from sglib.models import theme from sglib.models.daw import * from sgui import shared as glbl_shared from sgui.daw import ...
extractors
veoh
#!/usr/bin/env python __all__ = ["veoh_download"] import urllib.error from ..common import * def veoh_download(url, output_dir=".", merge=False, info_only=False, **kwargs): """Get item_id""" if re.match(r"http://www.veoh.com/watch/\w+", url): item_id = match1(url, r"http://www.veoh.com/watch/(\w+)"...
imageserver
errors
# # Quru Image Server # # Document: errors.py # Date started: 31 Mar 2011 # By: Matt Fozard # Purpose: Internal errors and exceptions # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it under the terms o...
i18n
messages
# 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 ...
api
table
from typing import Any, List from posthog.api.routing import StructuredViewSetMixin from posthog.api.shared import UserBasicSerializer from posthog.hogql.database.database import SerializedField, serialize_fields from posthog.models import User from posthog.permissions import OrganizationMemberPermissions from posthog...
scenarios
paging
import enum import json import typing from uuid import uuid4 from apps.alerts.models import AlertReceiveChannel, EscalationChain from apps.alerts.paging import ( AvailabilityWarning, PagingError, ScheduleNotifications, UserNotifications, check_user_availability, direct_paging, ) from apps.slack...
backend
oai
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the Licen...
plugins
coherent_cost_test
__copyright__ = "Copyright (C) 2016 Martin Blais" __license__ = "GNU GPLv2" import datetime import unittest from beancount import loader from beancount.parser import cmptest from beancount.plugins import coherent_cost class TestValidateUnusedAccounts(cmptest.TestCase): @loader.load_doc() def test_validate_...
femexamples
constraint_tie
# *************************************************************************** # * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> * # * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com * # * * # * Th...
Arch
ArchFence
# ***************************************************************************** # * Copyright (c) 2019 furti <daniel.furtlehner@gmx.net> * # * * # * This program is free software; you can redistribute it and/or modify * ...
PyObjCTest
test_cfurlenumerator
import os from CoreFoundation import * from PyObjCTools.TestSupport import * try: long except NameError: long = int class TestCFURLEnumerator(TestCase): @min_os_level("10.6") def testTypes(self): self.assertIsCFType(CFURLEnumeratorRef) @min_os_level("10.6") def testFunctions(self): ...
flaskbb
email
# -*- coding: utf-8 -*- """ flaskbb.email ~~~~~~~~~~~~~ This module adds the functionality to send emails :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import logging from flask import render_template from flask_babelplus import lazy_gettext as _ from ...
stream
hls
import logging import re import struct from concurrent.futures import Future from datetime import datetime, timedelta from typing import Any, Dict, List, NamedTuple, Optional, Tuple, Union from urllib.parse import urlparse from requests import Response from requests.exceptions import ChunkedEncodingError, ConnectionEr...
file-list
gio_provider
from __future__ import absolute_import import os from urllib.parse import unquote from gi.repository import Gio, GLib from sunflower.plugin_base.provider import ( FileInfo, FileInfoExtended, FileType, Provider, Support, SystemSize, ) from .gio_wrapper import File from .local_monitor import Lo...
AddonManager
addonmanager_metadata
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2023 FreeCAD Project Association * # * ...
uic-files
preference_dialog_ui
# Form implementation generated from reading ui file './forms/preference_dialog.ui' # # Created by: PyQt5 UI code generator 5.9 # # WARNING! All changes made in this file will be lost! from lib.color_line import ColorLine from PyQt5 import QtCore, QtGui, QtWidgets from . import main_window_view_rc class Ui_config_d...
utils
usertypes
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Custom useful data types.""" import dataclasses import enum import html import operator from typing import Optional, Sequence, TypeVar, Union from qutebrowser.qt.core import QObject, QTimer...
localModule
fillAdd
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.module.localAdd import CalcAddLocalModuleCommand from gui.fitCommands.helpers import ( InternalCommandHistory, ModuleInfo, restoreRemovedDummies, ) from service.fit import Fit from service.market import...
mobile-app
demo_push
import json import logging import random import string import typing from apps.mobile_app.exceptions import DeviceNotSet from apps.mobile_app.types import FCMMessageData, MessageType, Platform from apps.mobile_app.utils import construct_fcm_message, send_push_notification from apps.user_management.models import User f...
cmd
mux
from __future__ import absolute_import import os import subprocess import sys from bup import options from bup.helpers import debug1, debug2, mux from bup.io import byte_stream optspec = """ bup mux command [arguments...] -- """ def main(argv): # Give the subcommand exclusive access to stdin. orig_stdin = ...
clientScripts
parse_mets_to_db
#!/usr/bin/env python import argparse import datetime import os import uuid import django from django.db import transaction from lxml import etree django.setup() import databaseFunctions import fileOperations # archivematicaCommon import namespaces as ns from fpr import models as fpr_models # dashboard from main im...
lib
archivematicaClient
#!/usr/bin/env python """ Archivematica Client (Gearman Worker) This executable does the following. 1. Loads tasks from config. Loads a list of performable tasks (client scripts) from a config file (typically that in lib/archivematicaClientModules) and creates a mapping from names of those tasks (e.g., 'normali...
migrations
0013_silence_deprecated_tags_warnings
# Generated by Django 3.2.13 on 2022-06-23 16:11 import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("ee", "0012_migrate_tags_v2"), ] operations = [ migrations.RenameField( model_name="enterpr...
downloaders
YadiSk
# -*- coding: utf-8 -*- import json import random import re from ..base.simple_downloader import SimpleDownloader class YadiSk(SimpleDownloader): __name__ = "YadiSk" __type__ = "downloader" __version__ = "0.12" __status__ = "testing" __pattern__ = r"https?://yadi\.sk/d/[\w\-]+" __config__ =...
migrations
0329_datawarehousecredential_datawarehousetable
# Generated by Django 3.2.18 on 2023-06-20 19:20 import django.db.models.deletion import encrypted_fields.fields import posthog.models.utils from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0328_add_starter_feat...
plover
formatting
# Copyright (c) 2010-2011 Joshua Harlan Lifton. # See LICENSE.txt for details. """This module converts translations to printable text. This module defines and implements plover's custom dictionary language. """ import re import string from collections import namedtuple from enum import Enum from os.path import comm...
localDrone
toggleStates
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.drone.localToggleStates import ( CalcToggleLocalDroneStatesCommand, ) from gui.fitCommands.helpers import InternalCommandHistory from service.fit import Fit class GuiToggleLocalDroneStatesCommand(wx.Command):...
macosx
setup
# 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 ...
plugins
earthcam
""" $description A network of live webcams for tourism and entertainment. $url earthcam.com $type live, vod $metadata author $metadata category $metadata title $notes Only works for the cams hosted on EarthCam """ import logging import re from urllib.parse import urlparse from streamlink.plugin import Plugin, pluginm...
tasks
sync
import logging from apps.grafana_plugin.helpers import GcomAPIClient from apps.grafana_plugin.helpers.client import GrafanaAPIClient from apps.grafana_plugin.helpers.gcom import ( get_active_instance_ids, get_deleted_instance_ids, get_stack_regions, ) from apps.user_management.models import Organization fr...
models
media_cache
# 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, ...
clientScripts
parse_external_mets
#!/usr/bin/env python import argparse import os import parse_mets_to_db from archivematicaFunctions import find_mets_file from custom_handlers import get_script_logger from lxml import etree # archivematicaCommon logger = get_script_logger("archivematica.mcp.client.parse_external_mets") def parse_reingest_mets(job...
mp-sched
synthetic
#!/usr/bin/env python # # Copyright 2008,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import os from argparse import ArgumentParser from gnuradio import blocks, eng_notation, filter, gr from gnuradio.eng_arg import eng_float, intx class pip...
filemanager
util
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License" import io import os from octoprint import UMASK from octoprint.util import atomic_...
Db
Db
import atexit import errno import json import logging import os import re import sqlite3 import sys import threading import time import weakref import gevent from Config import config from Debug import Debug from util import SafeRe, ThreadPool, helper from .DbCursor import DbCursor thread_pool_db = ThreadPool.Thread...
api
views
# -*- coding: utf-8 -*- from babybuddy import models as babybuddy_models from core import models from django.shortcuts import get_object_or_404 from rest_framework import views, viewsets from rest_framework.decorators import action from rest_framework.response import Response from rest_framework.schemas.openapi import ...
versions
084_d85ce5783688_add_metadata_created
# encoding: utf-8 """084 Add metadata created Revision ID: d85ce5783688 Revises: f98d8fa2a7f7 Create Date: 2018-09-04 18:49:17.957865 """ import sqlalchemy as sa from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used by Alembic. revision = "d85ce5783688" do...
lib
static
#!/usr/bin/env python # 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 #...
handlers
imaging
#!/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 urllib.parse import quote, unquote from thumbor.context import...
forum
forms
# -*- coding: utf-8 -*- """ flaskbb.forum.forms ~~~~~~~~~~~~~~~~~~~ It provides the forms that are needed for the forum views. :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import logging from flask import current_app from flask_babelplus import lazy_g...
eos
effects
# =============================================================================== # 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, ...
qltk
quodlibetwindow
# Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna # 2012 Christoph Reiter # 2012-2023 Nick Boultbee # 2017 Uriel Zajaczkovski # # 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 ...
QT
PantallaDirector
import os from Code import TabVisual, TrListas, Util from Code.QT import ( Colocacion, Columnas, Controles, Delegados, FormLayout, Grid, Iconos, PantallaTab, PantallaTabVFlechas, PantallaTabVMarcos, PantallaTabVMarkers, PantallaTabVSVGs, QTUtil, QTUtil2, QTVa...
database
user_database
# -*- coding: utf-8 -*- import hashlib import os from ..utils.struct.style import style # TODO: rewrite using scrypt or argon2_cffi def _salted_password(password, salt): dk = hashlib.pbkdf2_hmac("sha256", password.encode(), bytes.fromhex(salt), 100000) return salt + dk.hex() def _gensalt(): return os....
core
admin
# -*- coding: utf-8 -*- from core import models from core.forms import TagAdminForm from django.conf import settings from django.contrib import admin from import_export import fields, resources from import_export.admin import ExportActionMixin, ImportExportMixin class ImportExportResourceBase(resources.ModelResource)...
migrations
0008_work_default_edition
# Generated by Django 3.0.7 on 2020-11-04 18:15 import django.db.models.deletion from django.db import migrations, models def set_default_edition(app_registry, schema_editor): db_alias = schema_editor.connection.alias works = app_registry.get_model("bookwyrm", "Work").objects.using(db_alias) editions = a...
accounts
RehostTo
# -*- coding: utf-8 -*- from ..base.multi_account import MultiAccount class RehostTo(MultiAccount): __name__ = "RehostTo" __type__ = "account" __version__ = "0.25" __status__ = "testing" __config__ = [ ("mh_mode", "all;listed;unlisted", "Filter downloaders to use", "all"), ("mh_...
compatibility
result_storage
#!/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 import thumbor.result_storages as storages from thumbor.compatibilit...
orm-bindings
torrent_state
from __future__ import annotations from pony import orm from tribler.core.components.torrent_checker.torrent_checker.dataclasses import ( HealthInfo, ) def define_binding(db): class TorrentState(db.Entity): """ This ORM class represents torrent swarms. It is used by HealthChecker. """...
telegram
client
import logging from typing import Optional, Tuple, Union from apps.alerts.models import AlertGroup from apps.base.utils import live_settings from apps.telegram.models import TelegramMessage from apps.telegram.renderers.keyboard import TelegramKeyboardRenderer from apps.telegram.renderers.message import TelegramMessage...
users
views
import datetime import stripe from flask import ( flash, g, redirect, render_template, render_template_string, request, url_for, ) from flask_login import current_user, login_required, login_user, logout_user from formspree import settings from formspree.stuff import DB, TEMPLATES from form...
aliceVision
Meshing
__version__ = "7.0" from meshroom.core import desc class Meshing(desc.AVCommandLineNode): commandLine = "aliceVision_meshing {allParams}" cpu = desc.Level.INTENSIVE ram = desc.Level.INTENSIVE category = "Dense Reconstruction" documentation = """ This node creates a dense geometric surface repre...
docs
test_viterbi_equalization1
#!/usr/bin/env python import math import random import sys import fsm_utils from gnuradio import audio, blocks, digital, eng_notation, filter, gr, trellis try: from gnuradio import analog except ImportError: sys.stderr.write("Error: Program requires gr-analog.\n") sys.exit(1) def run_test( f, K...
Label
setup
# # Copyright (C) 2008 Martijn Voncken <mvoncken@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. # from setuptools import find_pa...
Scene
CuraSceneNode
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from copy import deepcopy from typing import Dict, List, Optional, cast import cura.CuraApplication # To get the build plate. from cura.Settings.ExtruderStack import ExtruderStack # For typing. from cura.Settings.Setting...
ReverseEngineering
Init
# -*- coding: utf8 -*- # *************************************************************************** # * Copyright (c) 2002 Juergen Riegel <juergen.riegel@web.de> * # * * # * This file is part of the FreeCAD CAx development system. ...
migrations
0026_alter_feeding_end_alter_feeding_start_and_more
# Generated by Django 4.0.4 on 2022-06-10 03:34 import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0025_pumping_tags"), ] operations = [ migrations.AlterField( model_name="feeding", ...
inbound
parse
"""Parse data received from the SendGrid Inbound Parse webhook""" import base64 import email import mimetypes from six import iteritems from werkzeug.utils import secure_filename class Parse(object): def __init__(self, config, request): self._keys = config.keys self._request = request req...
subscriptions
email_subscriptions
import uuid from typing import List, Optional import structlog from ee.tasks.subscriptions.subscription_utils import UTM_TAGS_BASE from posthog.email import EmailMessage from posthog.models.exported_asset import ExportedAsset from posthog.models.subscription import Subscription, get_unsubscribe_token from posthog.util...
daw
strings
""" 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 the hope that it will b...
builtinPreferenceViews
pyfaNetworkPreferences
# noinspection PyPackageRequirements import gui.mainFrame import wx from gui.bitmap_loader import BitmapLoader from gui.preferenceView import PreferenceView from service.network import Network from service.settings import NetworkSettings _t = wx.GetTranslation class PFNetworkPref(PreferenceView): def populatePan...
util
atomic
# Copyright 2013,2015 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. """Helpers for atomic file ope...
Arch
ArchSite
# -*- coding: utf8 -*- # *************************************************************************** # * Copyright (c) 2011 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it an...
command
basecommand
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 import argparse import logging import os from whipper.common import config, drive logger = logging.getLogger(__name__) # Q: What about argparse.add_subparsers(), you ask? # A: Unfortunately add_subparsers() does not support specifying the # formatter_class of subpar...
views
interaction
""" boosts and favs """ from bookwyrm import models from django.contrib.auth.decorators import login_required from django.core.cache import cache from django.db import IntegrityError from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotFound from django.shortcuts import redirect from django.util...
canto-next
canto_backend
# -*- 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. # This Backend class...
cura
PrintJobPreviewImageProvider
from typing import Tuple from PyQt6.QtCore import QSize from PyQt6.QtGui import QImage from PyQt6.QtQuick import QQuickImageProvider from UM.Application import Application class PrintJobPreviewImageProvider(QQuickImageProvider): def __init__(self): super().__init__(QQuickImageProvider.ImageType.Image) ...
bup
rm
from __future__ import absolute_import from binascii import hexlify, unhexlify from bup import git, vfs from bup.client import ClientError from bup.compat import hexstr, pending_raise from bup.git import get_commit_items from bup.helpers import add_error, die_if_errors, log, saved_errors from bup.io import path_msg ...
notifier
twilio
import functools import logging import six from ..conf import settings logger = logging.getLogger(__name__) def notify_factory(conf, value): @functools.wraps(notify) def baked_notify(report): from twilio.rest import Client # pylint: disable=import-outside-toplevel return notify( ...
options
tags_compatibility_id3
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006 Lukáš Lalinský # Copyright (C) 2019-2021, 2023 Philipp Wolfer # Copyright (C) 2021 Laurent Monin # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Licen...
localModule
replace
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.module.localReplace import CalcReplaceLocalModuleCommand from gui.fitCommands.helpers import ( InternalCommandHistory, ModuleInfo, restoreRemovedDummies, ) from service.fit import Fit from service.marke...
simplejson
tool
r"""Command-line tool to validate and pretty-print JSON Usage:: $ echo '{"json":"obj"}' | python -m simplejson.tool { "json": "obj" } $ echo '{ 1.2:3.4}' | python -m simplejson.tool Expecting property name: line 1 column 2 (char 2) """ import sys import simplejson as json def main(): ...
widgets
loadingpage
from PyQt5.QtSvg import QGraphicsSvgItem, QSvgRenderer from PyQt5.QtWidgets import QGraphicsScene, QWidget from tribler.gui.sentry_mixin import AddBreadcrumbOnShowMixin from tribler.gui.utilities import connect, get_image_path def load_gears_animation(): svg_container = QGraphicsScene() svg_item = QGraphicsSv...
extractor
ximalaya
# coding: utf-8 from __future__ import unicode_literals import itertools import re from .common import InfoExtractor class XimalayaBaseIE(InfoExtractor): _GEO_COUNTRIES = ["CN"] class XimalayaIE(XimalayaBaseIE): IE_NAME = "ximalaya" IE_DESC = "喜马拉雅FM" _VALID_URL = ( r"https?://(?:www\.|m\...
extractor
charlierose
from __future__ import unicode_literals from ..utils import remove_end from .common import InfoExtractor class CharlieRoseIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?charlierose\.com/(?:video|episode)(?:s|/player)/(?P<id>\d+)" _TESTS = [ { "url": "https://charlierose.com/videos/2...
gtk3
sidebar
# # Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com> # Copyright (C) 2008 Martijn Voncken <mvoncken@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 L...
sgui
project_recovery
""" 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 the hope that it will ...