section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
neubot
system
# neubot/system.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 Lice...
context
imageObjectContext
import io import AppKit try: from PIL import Image hasPIL = True except ImportError: hasPIL = False from drawBot.misc import DrawBotError from .imageContext import ImageContext class BaseImageObjectContext(ImageContext): def _writeDataToFile(self, data, path, options): self._imageObjects ...
Arch
TestArch
# *************************************************************************** # * Copyright (c) 2013 Yorik van Havre <yorik@uncreated.net> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
caching
calculate_results
from typing import Any, Dict, List, Optional, Tuple, Union import structlog from posthog.caching.utils import ensure_is_date from posthog.clickhouse.query_tagging import tag_queries from posthog.constants import ( INSIGHT_FUNNELS, INSIGHT_PATHS, INSIGHT_RETENTION, INSIGHT_STICKINESS, INSIGHT_TRENDS...
struct
info
# -*- coding: utf-8 -*- from collections.abc import MutableMapping from .base import InscDict class ReadError(KeyError): pass class WriteError(KeyError): pass class DeleteError(KeyError): pass class Info(MutableMapping): __readable__ = True __writeable__ = True __updateable__ = True ...
fec
_qa_helper
#!/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 # # import numpy from gnuradio import blocks, gr # Must use absolute import here because this file is not installed as part # of the module from gnuradio.fec import...
views
auth
import logging from urllib.parse import urljoin from apps.auth_token.auth import PluginAuthentication, SlackTokenAuthentication from apps.social_auth.backends import LoginSlackOAuth2V2 from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.http import HttpResponse, HttpRespons...
migrations
0041_bind_pids
"""Migration for PID Binding: persistent identifier creation & resolution.""" from django.db import migrations, models def data_migration(apps, schema_editor): """Persistent Identifiers (PID) Workflow modifications (migration). This migration modifies the workflow so that there are three new micro-service...
config-integrations
alertmanager
# Main enabled = True title = "Alertmanager" slug = "alertmanager" short_description = "Prometheus" is_displayed_on_web = True is_featured = False is_able_to_autoresolve = True is_demo_alert_enabled = True description = None based_on_alertmanager = True # Behaviour source_link = "{{ payload.externalURL }}" grouping_...
utilities
dependencies
""" This file lists the python dependencies for Tribler. Note that this file should not depend on any external modules itself other than builtin ones. """ import logging import re from enum import Enum from pathlib import Path from typing import Iterator, Optional import tribler # fmt: off logger = logging.getLogge...
PyObjCTest
test_cgcontext
from __future__ import with_statement import os import sys import Quartz from PyObjCTools.TestSupport import * from Quartz import * try: long except NameError: long = int if sys.version_info[0] != 2: def buffer(value): if isinstance(value, bytes): return value return value.e...
gui
devTools
# ============================================================================= # 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 ...
widgets
gradient
# -*- coding: UTF-8 -*- # -------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.g...
puddlestuff
loadshortcuts
# -*- coding: utf-8 -*- import os import sys from PyQt5.QtWidgets import ( QAction, QApplication, QMainWindow, QMenu, QMenuBar, QToolBar, ) from .constants import CONFIGDIR from .puddleobjects import PuddleConfig, get_icon, open_resourcefile from .translations import translate __version__ = 3...
versions
051_a4fb0d85ced6_add_tag_vocabulary
# encoding: utf-8 """051 Add tag vocabulary Revision ID: a4fb0d85ced6 Revises: 01a6b058cb7f Create Date: 2018-09-04 18:49:06.480087 """ import sqlalchemy as sa from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used by Alembic. revision = "a4fb0d85ced6" down...
soundcloud
api
# Copyright 2016-23 Nick Boultbee # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import json from datetime import da...
serializers
integrations
from apps.alerts.grafana_alerting_sync_manager.grafana_alerting_sync import ( GrafanaAlertingSyncManager, ) from apps.alerts.models import AlertReceiveChannel from apps.base.messaging import get_messaging_backends from apps.integrations.legacy_prefix import has_legacy_prefix, remove_legacy_prefix from common.api_he...
qrcode
util
import math import re import lib.six as six from lib.qrcode import exceptions from lib.qrcode import qrbase as base from lib.six.moves import xrange # QR encoding modes. MODE_NUMBER = 1 << 0 MODE_ALPHA_NUM = 1 << 1 MODE_8BIT_BYTE = 1 << 2 MODE_KANJI = 1 << 3 # Encoding mode sizes. MODE_SIZE_SMALL = { MODE_NUMBER...
context
circle
# -*- coding: utf-8 -*- # # Copyright (C) 2013 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....
beetsplug
importfeeds
# This file is part of beets. # Copyright 2016, Fabrice Laporte. # # 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,...
models
ssd_inception_v3_feature_extractor
# 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...
interface
ui
#!/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 ...
extractor
sixplay
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_parse_qs, compat_str, compat_urllib_parse_urlparse from ..utils import determine_ext, int_or_none, qualities, try_get from .common import InfoExtractor class SixPlayIE(InfoExtractor): IE_NAME = "6play" _VALID_URL =...
widgets
statusbars
# # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # import deluge.common import de...
dmg-resources
settings
# -*- coding: utf-8 -*- import os.path import plistlib application = defines.get("app", "./dist/Plover.app") appname = os.path.basename(application) def icon_from_app(app_path): plist_path = os.path.join(app_path, "Contents", "Info.plist") with open(plist_path, "rb") as plist_file: plist = plistlib....
misc
guiprocess
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """A QProcess which shows notifications in the GUI.""" import dataclasses import locale import shlex import shutil import signal from typing import Dict, Mapping, Optional, Sequence from quteb...
core
generator
# # Copyright 2020 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import hashlib import json import os import pathlib import re import subprocess from datetime import datetime from gnuradio.blocktool import BlockHeaderParser, GenericHeaderParser fro...
error-handlers
file
#!/usr/bin/python # -*- coding: utf-8 -*- import json import logging import logging.handlers import operator import re import time from thumbor import __version__ class ErrorHandler: def __init__(self, config): if not config.ERROR_FILE_LOGGER: raise RuntimeError( "If you set ...
accounts
TwojlimitPl
# -*- coding: utf-8 -*- import datetime import hashlib import json import time from ..base.multi_account import MultiAccount class TwojlimitPl(MultiAccount): __name__ = "TwojlimitPl" __type__ = "account" __version__ = "0.01" __status__ = "testing" __config__ = [ ("mh_mode", "all;listed;...
lib
xml
# This file is part of MyPaint. # -*- coding: utf-8 -*- # Copyright (C) 2018 by the MyPaint Development Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or...
service
esi
# noinspection PyPackageRequirements import base64 import json import threading import time import webbrowser import config import eos.db import gui.globalEvents as GE import gui.mainFrame import wx from eos.saveddata.ssocharacter import SsoCharacter from gui.ssoLogin import SsoLogin, SsoLoginServer from logbook impor...
GenIconos
limpia
# -*- coding: latin-1 -*- import os # import shutil def leeFormato(): with open("Formatos.tema") as f: li = [] for linea in f: linea = linea.strip() if linea and not linea.strip().startswith("#"): nombre, folder, png = linea.split(" ") fold...
extractor
vuclip
from __future__ import unicode_literals import re from ..compat import compat_urllib_parse_urlparse from ..utils import ExtractorError, parse_duration, remove_end from .common import InfoExtractor class VuClipIE(InfoExtractor): _VALID_URL = r"https?://(?:m\.)?vuclip\.com/w\?.*?cid=(?P<id>[0-9]+)" _TEST = {...
rarfile
dumprar
#! /usr/bin/env python """Dump archive contents, test extraction.""" from __future__ import absolute_import, division, print_function import getopt import io import sys from datetime import datetime import rarfile as rf usage = """ dumprar [switches] [ARC1 ARC2 ...] [@ARCLIST] switches: @file read archive n...
meshes
mesh_transform_torque_tetra10
def create_nodes(femmesh): # nodes femmesh.addNode(4.0, -9.797174393178826e-16, 0.0, 1) femmesh.addNode(4.0, -9.797174393178826e-16, 50.0, 2) femmesh.addNode(5.0, -1.2246467991473533e-15, 0.0, 3) femmesh.addNode(5.0, -1.2246467991473533e-15, 50.0, 4) femmesh.addNode(4.0, -9.797174393178826e-16, ...
migrations
0137_team_timezone
# Generated by Django 3.0.11 on 2021-03-18 20:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0136_global_plugin_attachments"), ] operations = [ migrations.AddField( model_name="team", name="timezone...
extractors
baidu
#!/usr/bin/env python # -*- coding: utf-8 -*- __all__ = ["baidu_download"] from ..common import * from .embed import * from .universal import * def baidu_get_song_data(sid): data = json.loads( get_html( "http://music.baidu.com/data/music/fmlink?songIds=%s" % sid, faker=True ) )["...
jargon
jargon
# ============================================================================= # Copyright (C) 2018 Filip Sufitchi # # This file is part of pyfa. # # pyfa is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
threads
clicknload_thread
# -*- coding: utf-8 -*- import re import threading from base64 import standard_b64decode from cgi import FieldStorage from http.server import BaseHTTPRequestHandler, HTTPServer from urllib.parse import unquote from cryptography.fernet import Fernet from ..utils.misc import eval_js core = None js = None class Base...
serializers
resolution_note
from apps.alerts.models import AlertGroup, ResolutionNote from apps.api.serializers.user import FastUserSerializer from common.api_helpers.custom_fields import OrganizationFilteredPrimaryKeyRelatedField from common.api_helpers.exceptions import BadRequest from common.api_helpers.mixins import EagerLoadingMixin from res...
extractor
vbox7
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ExtractorError from .common import InfoExtractor class Vbox7IE(InfoExtractor): _VALID_URL = r"""(?x) https?:// (?:[^/]+\.)?vbox7\.com/ (?: ...
sunflower
accelerator_manager
from gi.repository import Gdk, Gtk class GroupType: MAIN_MENU = 0 PLUGIN_BASE = 1 ALL_GROUPS = 2 class AcceleratorManager: """This manager handles saving and loading of accelerators""" def __init__(self, application): self._application = application self._config = None ...
updaters
single_file_plugin
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2020 The OctoPrint Project - Released under terms of the AGPLv3 License" import ast import logging import os import shutil import tempfile from octoprint.settings import settings from octoprint.util....
papers
views
# -*- 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 Affero General Public License # as published by the Free Software Foundation; either version 2 # of the...
widgets
downloadspage
import logging import os from typing import List, Optional, Tuple from PyQt5.QtCore import Qt, QTimer, QUrl, pyqtSignal from PyQt5.QtGui import QDesktopServices from PyQt5.QtNetwork import QNetworkRequest from PyQt5.QtWidgets import QAbstractItemView, QAction, QFileDialog, QWidget from tribler.core.sentry_reporter.sen...
plover-build-utils
pyqt
import re def fix_icons(contents): # replace ``addPixmap(QtGui.QPixmap(":/settings.svg"),`` # by ``addFile(":/settings.svg", QtCore.QSize(),`` contents = re.sub( r'\baddPixmap\(QtGui\.QPixmap\(("[^"]*")\),', r"addFile(\1, QtCore.QSize(),", contents, ) return contents def ...
context
polygon
# -*- coding: utf-8 -*- # # Copyright (C) 2013 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....
decrypters
ImgurCom
# -*- coding: utf-8 -*- import json import re from pyload.core.utils.purge import uniquify from ..base.simple_decrypter import SimpleDecrypter class ImgurCom(SimpleDecrypter): __name__ = "ImgurCom" __type__ = "decrypter" __version__ = "0.61" __status__ = "testing" __pattern__ = r"https?://(?:w...
neubot
runner_tests
# neubot/runner_tests.py # # Copyright (c) 2012 Simone Basso <bassosimone@gmail.com>, # NEXA Center for Internet & Society at Politecnico di Torino # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
beetsplug
absubmit
# This file is part of beets. # Copyright 2016, Pieter Mulder. # # 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, m...
PyObjCTest
test_cglayer
import os import Quartz from PyObjCTools.TestSupport import * from Quartz import * try: long except NameError: long = int class TestCGLayer(TestCase): def testTypes(self): self.assertIsCFType(CGLayerRef) def setUp(self): url = CFURLCreateWithFileSystemPath( None, "/tmp/p...
draftguitools
gui_selectplane
# *************************************************************************** # * Copyright (c) 2019 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
clientScripts
archivematicaCreateMETSReingest
#!/usr/bin/env python import copy import os import archivematicaCreateMETSMetadataCSV as createmetscsv import archivematicaCreateMETSRights as createmetsrights import create_mets_v2 as createmets2 import metsrw import namespaces as ns from lxml import etree from main import models # dashboard def _create_premis_obj...
PyObjCTest
test_pdfview
from PyObjCTools.TestSupport import * from Quartz.PDFKit import * try: unicode except NameError: unicode = str class TestPDFViewHelper(NSObject): def PDFViewWillChangeScaleFactor_toScale_(self, f, s): return 1.0 def PDFViewWillClickOnLink_withURL_(self, s, u): pass def PDFViewPr...
parser
booking_method
"""Implementations of all the particular booking methods. This code is used by the full booking algorithm. """ __copyright__ = "Copyright (C) 2015-2017 Martin Blais" __license__ = "GNU GPLv2" import collections from decimal import Decimal from beancount.core import convert, flags, inventory, position from beancount....
pwidgets
colorctrls
# -*- coding: utf-8 -*- # # Copyright (C) 2015 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....
lib
i18n
# encoding: utf-8 """ Internationalization utilities. This module contains code from the pojson project, which is subject to the following license (see https://bitbucket.org/obviel/pojson): Copyright (c) 2010, Fanstatic Developers All rights reserved. Redistribution and use in source and binary forms, with or witho...
states
finalstate
"""Final state diagram item.""" from gaphor import UML from gaphor.diagram.presentation import ElementPresentation, Named from gaphor.diagram.shapes import Box, IconBox, Text, ellipse, stroke from gaphor.diagram.support import represents from gaphor.UML.recipes import stereotypes_str @represents(UML.FinalState) clas...
classes
app
""" @file @brief This file creates the QApplication, and displays the main window @author Noah Figg <eggmunkee@hotmail.com> @author Jonathan Thomas <jonathan@openshot.org> @author olivier Girard <eolinwen@gmail.com> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com...
extractor
minds
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_str from ..utils import clean_html, int_or_none, str_or_none, strip_or_none from .common import InfoExtractor class MindsBaseIE(InfoExtractor): _VALID_URL_BASE = r"https?://(?:www\.)?minds\.com/" def _call_api(self, path, vi...
heartbeat
prtg
from pathlib import PurePath from apps.integrations.metadata.heartbeat._heartbeat_text_creator import ( HeartBeatTextCreator, ) integration_verbal = PurePath(__file__).stem creator = HeartBeatTextCreator(integration_verbal) heartbeat_text = creator.get_heartbeat_texts() heartbeat_expired_title = heartbeat_text....
parts
stubpanel
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2018 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 ver...
PyObjCTest
test_calayer
from PyObjCTools.TestSupport import * from Quartz.CoreGraphics import * from Quartz.QuartzCore import * try: unicode except NameError: unicode = str class TestCALayerHelper(NSObject): def preferredSizeOfLayer_(self, layer): return 1 class TestCALayer(TestCase): @min_os_level("10.5") def...
gdist
bash_completions
# Copyright 2019 Arnaud Rebillout # # 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, merge, publish, # dist...
daw
entrypoint
# -*- 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 i...
general
generaleditors
from gaphor.diagram.general.comment import CommentItem from gaphor.diagram.instanteditors import instant_editor, show_popover from gaphor.transaction import Transaction from gi.repository import Gdk, Gtk @instant_editor.register(CommentItem) def comment_item_editor(item, view, event_manager, pos=None) -> bool: de...
box-coders
square_box_coder_test
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
src
DrivePluginExtension
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os from datetime import datetime from typing import Any, Dict, List, Optional, cast from cura.CuraApplication import CuraApplication from PyQt6.QtCore import QObject, pyqtProperty, pyqtSignal, pyqtSlot from UM.Exten...
api-helpers
custom_fields
import time from apps.alerts.models import ChannelFilter from apps.user_management.models import User from common.api_helpers.exceptions import BadRequest from common.timezones import raise_exception_if_not_valid_timezone from django.core.exceptions import ObjectDoesNotExist from rest_framework import fields, serializ...
ocrolib
morph
################################################################ ### various add-ons to the SciPy morphology package ################################################################ from __future__ import print_function import pylab from numpy import * from pylab import * from scipy.ndimage import filters, measuremen...
PyObjCTest
test_nsurlrequest
from Foundation import * from PyObjCTools.TestSupport import * class TestNSURLRequest(TestCase): def testConstants(self): self.assertEqual(NSURLRequestUseProtocolCachePolicy, 0) self.assertEqual(NSURLRequestReloadIgnoringLocalCacheData, 1) self.assertEqual(NSURLRequestReloadIgnoringLocalAn...
pwidgets
kbd_proc
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2021 by Ihor E. Novikov # Copyright (C) 2020 by Michael Schorcht # # 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 Lic...
migrations
upgrade37
""" Migration 37 - Capacitor Booster tiericide """ CONVERSIONS = { 4959: ( # 'Seed' Micro Capacitor Booster I 4957, # Micro Brief Capacitor Overcharge I 4961, # Micro Tapered Capacitor Infusion I 4955, # Micro F-RX Prototype Capacitor Boost 3556, # Micro Capacitor Booster I ...
components
update_mongo_news
import glob import logging import os from typing import Any, Dict, List, Text import numpy as np import pandas as pd from dag_factory.components.utils import ( date_str_to_unixtime, get_all_csv_paths, tag_dict_to_dict, ) from newscrawler.crawler import extract_article_information_from_html from newscrawler...
ProfileLib
RegularPolygon
# *************************************************************************** # * Copyright (c) 2014 Johan Kristensen * # * Copyright (c) 2014 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * Th...
db
store
import logging import re from datetime import datetime, timedelta from time import sleep, time from typing import Optional, Union from lz4.frame import LZ4FrameDecompressor from pony import orm from pony.orm import db_session, desc, left_join, raw_sql, select from pony.orm.dbproviders.sqlite import keep_exception from...
ui
statusindicator
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2019-2021 Philipp Wolfer # Copyright (C) 2020 Julius Michaelis # Copyright (C) 2020-2021 Laurent Monin # Copyright (C) 2021 Gabriel Ferreira # # This program is free software; you can redistribute it and/or # modify it under th...
plover-build-utils
setup
import contextlib import importlib import os import subprocess import sys import pkg_resources import setuptools from setuptools.command.build_py import build_py from setuptools.command.develop import develop class Command(setuptools.Command): def build_in_place(self): self.run_command("build_py") ...
clientScripts
failed_sip_cleanup
#!/usr/bin/env python import argparse import django from django.db import transaction django.setup() import metrics # archivematicaCommon import storageService as storage_service # dashboard from main import models REJECTED = "reject" FAILED = "fail" def main(job, fail_type, sip_uuid): # Update SIP Arrange t...
pdu
qa_add_system_time
#!/usr/bin/env python # # Copyright 2021 NTESS LLC. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import time import pmt from gnuradio import blocks, gr, gr_unittest, pdu class qa_add_system_time(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() ...
extractor
freesound
from __future__ import unicode_literals import re from ..utils import ( float_or_none, get_element_by_class, get_element_by_id, unified_strdate, ) from .common import InfoExtractor class FreesoundIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?freesound\.org/people/[^/]+/sounds/(?P<id>[^/]+...
printing
printout
# -*- coding: utf-8 -*- # # Copyright (C) 2016-2018 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 ver...
addons
LinkFilter
# -*- coding: utf-8 -*- from ..base.addon import BaseAddon class LinkFilter(BaseAddon): __name__ = "LinkFilter" __type__ = "addon" __version__ = "0.16" __status__ = "testing" __config__ = [ ("enabled", "bool", "Activated", False), ("filter", "str", "Filter links containing (comm...
imageserver
log_manager
# # Quru Image Server # # Document: log_manager.py # Date started: 28 Mar 2011 # By: Matt Fozard # Purpose: Provides multi-process logging services # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it und...
manuscript
toolbar
# 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 ...
core
convert
"""Conversions from Position (or Posting) to units, cost, weight, market value. * Units: Just the primary amount of the position. * Cost: The cost basis of the position, if available. * Weight: The cost basis or price of the position. * Market Value: The units converted to a value via a price map. To convert ...
Network
LocalClusterOutputDevice
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os from time import time from typing import Any, Callable, Dict, List, Optional from cura.CuraApplication import CuraApplication from cura.PrinterOutput.NetworkedPrinterOutputDevice import AuthState from cura.Printer...
PyObjCTest
test_nsurldownload
from Foundation import * from PyObjCTools.TestSupport import * class TestNSURLDownloadHelper(NSObject): def download_willResumeWithResponse_fromByte_(self, a, b, c): pass def download_didReceiveDataOfLength_(self, a, b): pass def download_shouldDecodeSourceDataOfMIMEType_(self, a, b): ...
extensions
video_converter
# -*- coding: utf-8 -*- # Convertes video files to avi or mp4 # This requires ffmpeg to be installed. Also works as a context # menu item for already-downloaded files. # # (c) 2011-08-05 Thomas Perl <thp.io/about> # Released under the same license terms as gPodder itself. import logging import os import subprocess im...
gui-qt
suggestions_widget
from plover import _ from plover.translation import escape_translation from PyQt5.QtCore import QAbstractListModel, QMimeData, QModelIndex, Qt from PyQt5.QtGui import QFont, QFontMetrics, QTextCharFormat, QTextCursor, QTextDocument from PyQt5.QtWidgets import QListView, QStyle, QStyledItemDelegate from .utils import A...
macosx
mac_app
#!/usr/bin/env python """ A setup file to build Frescobaldi.app with py2app. Use the '-h' flag to see the usage notes. """ import argparse import os import shutil import sys from subprocess import Popen from setuptools import setup # Python 2 text strings: basestring = str (ASCII) + unicode (Unicode) # Python 3 t...
neubot
runner_api
#!/usr/bin/env python # # Copyright (c) 2012 Simone Basso <bassosimone@gmail.com>, # NEXA Center for Internet & Society at Politecnico di Torino # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
metrics
vcs
import re from collections import Counter import attr from apatite.utils import run_cap from boltons.dictutils import OMD from boltons.timeutils import isoparse required_cmds = {"git": "install via your package manager"} def collect(plist, project, repo_dir): vcs_name = project.clone_info[0] ret = {"vcs_nam...
extractor
drbonanza
from __future__ import unicode_literals import re from ..utils import js_to_json, parse_duration, unescapeHTML from .common import InfoExtractor class DRBonanzaIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?dr\.dk/bonanza/[^/]+/\d+/[^/]+/(?P<id>\d+)/(?P<display_id>[^/?#&]+)" _TEST = { "url": "...
plugins
wwenetwork
""" $description Live and on-demand video service from World Wrestling Entertainment, Inc. $url network.wwe.com $type live, vod $account Required """ import json import logging import re from urllib.parse import parse_qsl, urlparse from streamlink.plugin import Plugin, PluginError, pluginargument, pluginmatcher from ...
migrations
0035_python3_compatibility
"""Update commands and rules for Python 3 compatibility.""" from django.db import migrations OLD_JHOVE_CMD_UUID = "11036e14-78d9-4449-8360-e2da394279ad" NEW_JHOVE_CMD_UUID = "4cac3267-453e-4456-9306-6d098dacb70d" JHOVE_RULES = ( "005d14f1-5b67-43fc-b3a5-5048ec915b0b", "085d5286-7616-4acd-88a4-ef65066362b9", ...
conversions
releaseMay2020
""" Conversion pack for May 2020 release """ CONVERSIONS = { # Renamed items, extracted via diff file "Adaptive Invulnerability Shield Hardener I": "Multispectrum Shield Hardener I", "Gistum C-Type Adaptive Invulnerability Shield Hardener": "Gistum C-Type Multispectrum Shield Hardener", "Adaptive Invul...
models
alert_group_counter
from django.db import models class ConcurrentUpdateError(Exception): pass class AlertGroupCounterQuerySet(models.QuerySet): def get_value(self, organization): counter, _ = self.get_or_create(organization=organization) num_updated_rows = self.filter( organization=organization, va...
mylar
wwt
#!/usr/bin/env python # 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 distri...
Base
Util
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...