section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
bs4
element
# Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __license__ = "MIT" import collections import re import shlex import sys import warnings from bs4.dammit import EntitySubstitution DEFAULT_OUTPUT_ENCODING = "utf-8" PY3K = (sys.version_info[0] > 2) whitespace_re = ...
plotting
canvasBackground
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2015 Timothée Lecomte # This file is part of Friture. # # Friture is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # Friture is distri...
cmd
save
from __future__ import absolute_import, print_function import math import os import stat import sys import time from binascii import hexlify from errno import ENOENT from bup import client, git, hashsplit, hlinkdb, index, metadata, options from bup.compat import argv_bytes, environ, nullcontext from bup.hashsplit imp...
meshes
mesh_multibodybeam_tria6
def create_nodes(femmesh): # nodes femmesh.addNode(100.0, 10.0, 0.0, 1) femmesh.addNode(100.0, 0.0, 0.0, 2) femmesh.addNode(80.0, 10.0, 0.0, 3) femmesh.addNode(80.0, 0.0, 0.0, 4) femmesh.addNode(60.0, 10.0, 0.0, 5) femmesh.addNode(60.0, 0.0, 0.0, 6) femmesh.addNode(40.0, 10.0, 0.0, 7) ...
AddonManager
AddonManager
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022-2023 FreeCAD Project Association * # * Copyright (...
sbe
app
"""Static configuration for the application. TODO: add more (runtime) flexibility in plugin discovery, selection and activation. """ from __future__ import annotations import logging import jinja2 from abilian.app import Application as BaseApplication from abilian.core.celery import FlaskLoader as CeleryBaseLoader f...
cache
projected
# ============================================================================= # 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 ...
projectedDrone
changeAmount
import math import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.drone.projectedChangeAmount import ( CalcChangeProjectedDroneAmountCommand, ) from gui.fitCommands.calc.drone.projectedRemove import CalcRemoveProjectedDroneCommand from gui.fitCommands.helpers imp...
builtinViews
emptyView
# noinspection PyPackageRequirements import gui.globalEvents as GE import gui.mainFrame import wx from gui.chrome_tabs import EVT_NOTEBOOK_PAGE_CHANGED class BlankPage(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent, size=(0, 0)) self.mainFrame = gui.mainFrame.MainFrame.getI...
transfer
urls
# This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the ...
parser
context
"""Produce a rendering of the account balances just before and after a particular entry is applied. """ __copyright__ = "Copyright (C) 2014-2017 Martin Blais" __license__ = "GNU GPLv2" import functools import io from os import path from beancount.core import compare, convert, data, getters, interpolate, inventory fr...
calculix
writer
# *************************************************************************** # * Copyright (c) 2015 Przemo Firszt <przemo@firszt.eu> * # * Copyright (c) 2015 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * Th...
i18n
molint
#!/usr/bin/env python """ This script reads a MO file and checks that translated messages do not use named string formatting fields that do not appear in the original messages. This would cause keyword errors when the format method is called on a translated string. """ import string import sys import mofile _pars...
legecy-translators
jsparser
""" The process of translating JS will go like that: # TOP = 'imports and scope set' 1. Remove all the comments 2. Replace number, string and regexp literals with markers 4. Remove global Functions and move their translation to the TOP. Also add register code there. 5. Replace inline functions with lvals 6. Rem...
gui-qt
utils
from plover import _ from PyQt5.QtCore import QSettings from PyQt5.QtGui import QGuiApplication, QKeySequence from PyQt5.QtWidgets import QAction, QMainWindow, QToolBar, QToolButton, QWidget def ActionCopyViewSelectionToClipboard(view): def copy_selection_to_clipboard(): indexes = view.selectedIndexes() ...
settings
sphinx
""" Django configuration for sphinx build. Most settings are left empty or to their default values as they are not actually used. """ import os from datetime import timedelta BASE_DIR = os.path.dirname(os.path.join(os.path.dirname(__file__), "..", "..", "..")) DEBUG = False ALLOWED_HOSTS = [] CACHES = {"default":...
fcgear
svggear
# (c) 2014 David Douard <david.douard@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (LGPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version....
engines
spotify
# SPDX-License-Identifier: AGPL-3.0-or-later """ Spotify (Music) """ import base64 from json import loads from urllib.parse import urlencode import requests # about about = { "website": "https://www.spotify.com", "wikidata_id": "Q689141", "official_api_documentation": "https://developer.spotify.com/web-...
downloaders
PremiumizeMe
# -*- coding: utf-8 -*- import json import re from ..base.multi_downloader import MultiDownloader class PremiumizeMe(MultiDownloader): __name__ = "PremiumizeMe" __type__ = "downloader" __version__ = "0.34" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?premiumize\.me/file\?id=(?P<ID>\...
migrations
0028_alter_sleep_options_remove_sleep_napping_sleep_nap
# Generated by Django 4.2 on 2023-05-07 00:28 from django.db import migrations, models from django.utils import timezone def set_sleep_nap_values(apps, schema_editor): # The model must be imported to ensure its overridden `save` method is run. from core.models import Sleep for sleep in Sleep.objects.all...
femtaskpanels
task_constraint_currentdensity
# *************************************************************************** # * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
community
cache
from __future__ import annotations from asyncio import Future from typing import TYPE_CHECKING from ipv8.requestcache import RandomNumberCache from tribler.core.components.bandwidth_accounting.db.transaction import ( BandwidthTransactionData, ) if TYPE_CHECKING: from tribler.core.components.bandwidth_account...
gui-qt
add_translation_widget
from collections import namedtuple from html import escape as html_escape from os.path import split as os_path_split from plover import _ from plover.engine import StartingStrokeState from plover.formatting import RetroFormatter from plover.gui_qt.add_translation_widget_ui import Ui_AddTranslationWidget from plover.gu...
declaration
option
# -*- coding: utf-8 -*- """This module defines Option class and its helpers. """ from __future__ import annotations import enum from typing import Any, Generic, Optional, TypeVar, cast from ckan.types import Validator, ValidatorFactory from typing_extensions import Self T = TypeVar("T") class SectionMixin: ""...
community
dispatcher
import random from collections import defaultdict from ipv8.messaging.anonymization.tunnel import ( CIRCUIT_ID_PORT, CIRCUIT_STATE_READY, CIRCUIT_TYPE_DATA, CIRCUIT_TYPE_RP_DOWNLOADER, CIRCUIT_TYPE_RP_SEEDER, ) from ipv8.taskmanager import TaskManager, task from tribler.core.components.socks_server...
extractor
blerp
# coding: utf-8 from __future__ import unicode_literals import json from ..utils import strip_or_none, traverse_obj from .common import InfoExtractor class BlerpIE(InfoExtractor): IE_NAME = "blerp" _VALID_URL = r"https?://(?:www\.)?blerp\.com/soundbites/(?P<id>[0-9a-zA-Z]+)" _TESTS = [ { ...
views
social
"""First cut at a notification system.""" from __future__ import annotations from abilian.core.extensions import csrf, db from abilian.core.models.subjects import User from abilian.i18n import render_template_i18n from abilian.sbe.apps.communities.security import require_admin from abilian.sbe.apps.notifications impor...
builtinViews
implantEditor
import re import gui.builtinMarketBrowser.pfSearchBox as SBox import gui.display as d # noinspection PyPackageRequirements import wx from gui.bitmap_loader import BitmapLoader from gui.marketBrowser import SearchBox from service.market import Market # noinspection PyPackageRequirements from wx.lib.buttons import Gen...
group
group
from django.db import models class Group(models.Model): class Meta: constraints = [ models.UniqueConstraint( fields=["team_id", "group_key", "group_type_index"], name="unique team_id/group_key/group_type_index combo", ) ] team: models.Fo...
frescobaldi-app
guistyle
# 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 ...
downloaders
RapidgatorNet
# -*- coding: utf-8 -*- import json import re from datetime import timedelta import pycurl from pyload.core.network.http.exceptions import BadHeader from pyload.core.utils import seconds from ..anticaptchas.ReCaptcha import ReCaptcha from ..anticaptchas.SolveMedia import SolveMedia from ..base.simple_downloader impor...
scripts
doctor
"""Debugging tool for those finding bugs in Beancount. This tool is able to dump lexer/parser state, and will provide other services in the name of debugging. """ __copyright__ = "Copyright (C) 2014-2016 Martin Blais" __license__ = "GNU GPLv2" import collections import logging import os import re import sys from typ...
migrations
0117_alter_user_preferred_language
# Generated by Django 3.2.5 on 2021-11-15 18:22 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0116_auto_20211114_1734"), ] operations = [ migrations.AlterField( model_name="user", name="preferred_lan...
extractor
viewlift
from __future__ import unicode_literals import json import re from ..compat import compat_HTTPError from ..utils import ExtractorError, int_or_none, parse_age_limit from .common import InfoExtractor class ViewLiftBaseIE(InfoExtractor): _API_BASE = "https://prod-api.viewlift.com/" _DOMAINS_REGEX = r"(?:(?:ma...
borg
version
import re def parse_version(version): """ Simplistic parser for setuptools_scm versions. Supports final versions and alpha ('a'), beta ('b') and release candidate ('rc') versions. It does not try to parse anything else than that, even if there is more in the version string. Output is a version t...
gui
builderhacks
# -*- coding: utf-8 -*- # This file is part of MyPaint. # Copyright (C) 2013-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 Licen...
examples
pyqt_time_f
#!/usr/bin/env python # # Copyright 2011,2012,2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import sys from gnuradio import blocks, gr try: import sip from gnuradio import qtgui from PyQt5 import Qt, QtWidgets except ImportError: ...
extractor
xboxclips
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_parse_qs, compat_urllib_parse_urlparse from ..utils import int_or_none, month_by_abbreviation, parse_filesize from .common import InfoExtractor class XboxClipsIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?(?:xbo...
extractor
teamcoco
# coding: utf-8 from __future__ import unicode_literals import json from ..utils import ( ExtractorError, determine_ext, int_or_none, mimetype2ext, parse_duration, parse_iso8601, qualities, ) from .turner import TurnerBaseIE class TeamcocoIE(TurnerBaseIE): _VALID_URL = r"https?://(?:...
saveddata
queries
# =============================================================================== # 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, ...
saveddata
miscData
# =============================================================================== # Copyright (C) 2011 Anton Vorobyov # # 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...
extractor
shared
from __future__ import unicode_literals from ..compat import compat_b64decode, compat_urllib_parse_unquote_plus from ..utils import ( KNOWN_EXTENSIONS, ExtractorError, determine_ext, int_or_none, js_to_json, parse_filesize, rot47, url_or_none, urlencode_postdata, ) from .common impo...
versions
078_ae821876532a_remove_old_authz_model
# encoding: utf-8 """078 Remove old authz model Revision ID: ae821876532a Revises: 51171a04d86d Create Date: 2018-09-04 18:49:15.812926 """ import sqlalchemy as sa from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used by Alembic. revision = "ae821876532a" ...
plugins
smartlink
# Smart Link Plugin # by Jack Miller # v1.0 # Allow links to be fetched to disk and then run a smarter handler on it # Use :fetch instead of :goto to use these handlers. # HANDLERS is a list of handlers, specified like: HANDLERS = [ { "match-url": ".*\\.mp3$", "handler": "mplayer", "rege...
utils
encoding
""" raven.utils.encoding ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, unicode_literals import warnings from raven.utils.compat import PY2, binary_type, integer_types, s...
heartbeat
models
import logging import typing from urllib.parse import urljoin from common.public_primary_keys import ( generate_public_primary_key, increase_public_primary_key_length, ) from django.conf import settings from django.core.validators import MinLengthValidator from django.db import models from django.utils import ...
lastfm
client
# code under public domain """ The main client API you'll be working with most often. You'll need to configure a lastfm.session.LastfmSession for this to work, but otherwise it's fairly self-explanatory. """ from __future__ import absolute_import import re try: import json except ImportError: import simplej...
meshes
mesh_rc_wall_2d_tria6
def create_nodes(femmesh): # nodes femmesh.addNode(0.0, 0.0, 0.0, 1) femmesh.addNode(0.0, 2000.0, 0.0, 2) femmesh.addNode(500.0, 0.0, 0.0, 3) femmesh.addNode(4000.0, 2000.0, 0.0, 4) femmesh.addNode(3500.0, 0.0, 0.0, 5) femmesh.addNode(4000.0, 0.0, 0.0, 6) femmesh.addNode(0.0, -2000.0, 0....
engines
reddit
# SPDX-License-Identifier: AGPL-3.0-or-later """ Reddit """ import json from datetime import datetime from urllib.parse import urlencode, urljoin, urlparse # about about = { "website": "https://www.reddit.com/", "wikidata_id": "Q1136", "official_api_documentation": "https://www.reddit.com/dev/api", "...
utils
epy_block_io
import collections import inspect TYPE_MAP = { "complex64": "complex", "complex": "complex", "float32": "float", "float": "float", "int32": "int", "uint32": "int", "int16": "short", "uint16": "short", "int8": "byte", "uint8": "byte", } BlockIO = collections.namedtuple( "Blo...
Tools
pythondoc
#! python # -*- coding: utf-8 -*- # (c) 2007 Werner Mayer LGPL # Create HTML documentation from FreeCAD's Python modules and classes. import os import pkgutil import pydoc import sys import zipfile import dircache def generateDoc(): # Get the path to the FreeCAD module relative to this directory toolspath =...
extractor
dlf
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import ( determine_ext, extract_attributes, int_or_none, merge_dicts, traverse_obj, url_or_none, variadic, ) from .common import InfoExtractor class DLFBaseIE(InfoExtractor): ...
cmd
tag
from __future__ import absolute_import import sys from bup import git, options from bup.compat import argv_bytes from bup.helpers import debug1, log from bup.io import byte_stream, path_msg # FIXME: review for safe writes. optspec = """ bup tag bup tag [-f] <tag name> <commit> bup tag [-f] -d <tag name> -- d,delete...
PyObjCTest
test_nsspellchecker
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSSpellChecker(TestCase): def testMethods(self): self.assertResultIsBOOL(NSSpellChecker.sharedSpellCheckerExists) self.assertArgIsBOOL( NSSpellChecker.checkSpellin...
frescobaldi-app
tabbar
# 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 ...
mako
pygen
# mako/pygen.py # Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """utilities for generating and formatting literal Python code.""" import re from mako import exce...
gui
VariableEditor
""" Copyright 2015, 2016 Free Software Foundation, Inc. This file is part of GNU Radio SPDX-License-Identifier: GPL-2.0-or-later """ from gi.repository import Gdk, GObject, Gtk from . import Actions, Constants, Utils BLOCK_INDEX = 0 ID_INDEX = 1 class VariableEditorContextMenu(Gtk.Menu): """A simple context...
PyObjCTest
test_IKFilterBrowserPanel
from PyObjCTools.TestSupport import * from Quartz import * try: unicode except NameError: unicode = str class TestIKFilterBrowserPanel(TestCase): @min_os_level("10.5") def testMethods(self): self.assertArgIsSEL( IKFilterBrowserPanel.beginWithOptions_modelessDelegate_didEndSelector...
ci
workflow_generate
#!/usr/bin/env python import shlex import textwrap import jinja2 import yaml class GithubActionsYamlLoader(yaml.SafeLoader): @staticmethod def _unsupported(kind, token): return SyntaxError( "Github Actions does not support %s:\n%s" % (kind, token.start_mark) ) def fetch_alia...
migrations
0001_initial
# -*- coding: utf-8 -*- from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("upload", "0002_uploadedpdf_num_pages"), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ("papers", "0001_squashed_0059_re...
mako
util
# mako/util.py # Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import codecs import collections import operator import os import re from mako import compat def u...
views
add_to_timeline_treeview
""" @file @brief This file contains the add to timeline file treeview @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an open-source project de...
docbrowser
sourceviewer
# 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 ...
Path
InitGui
# *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
gui
external_editor
""" Copyright 2015 Free Software Foundation, Inc. This file is part of GNU Radio SPDX-License-Identifier: GPL-2.0-or-later """ import os import subprocess import sys import tempfile import threading import time class ExternalEditor(threading.Thread): def __init__(self, editor, name, value, callback): ...
utils
pystone
#!/usr/bin/python3 -OO """ "PYSTONE" Benchmark Program Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes) Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013. Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness h...
torrentlist
queue_mode
# # 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. # from deluge.ui.client import clie...
tagsources
freedb
from . import CDDB CDDB.proto = 6 # utf8 instead of latin1 import time from collections import defaultdict from puddlestuff import audioinfo, version_string from puddlestuff.tagsources import RetrievalError from puddlestuff.util import to_string, translate CLIENTINFO = {"client_name": "puddletag", "client_version":...
extractor
ruutu
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_urllib_parse_urlparse from ..utils import ( ExtractorError, determine_ext, find_xpath_attr, int_or_none, unified_strdate, url_or_none, xpath_attr, xpath_text, ) from .common import InfoExtractor class ...
searx
query
# SPDX-License-Identifier: AGPL-3.0-or-later import re from abc import ABC, abstractmethod from searx.engines import categories, engine_shortcuts, engines from searx.external_bang import get_bang_definition_and_autocomplete from searx.languages import language_codes from searx.search import EngineRef from searx.webut...
XmlMaterialProfile
XmlMaterialUpgrader
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import xml.etree.ElementTree as ET from UM.VersionUpgrade import VersionUpgrade from .XmlMaterialProfile import XmlMaterialProfile class XmlMaterialUpgrader(VersionUpgrade): def getXmlVersion(self, serialized): ...
gtk3
torrentview
# # Copyright (C) 2007, 2008 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. # """The torrent view comp...
picard
album
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2004 Robert Kaye # Copyright (C) 2006-2009, 2011-2012, 2014 Lukáš Lalinský # Copyright (C) 2008 Gary van der Merwe # Copyright (C) 2008 Hendrik van Antwerpen # Copyright (C) 2008 ojnkpjg # Copyright (C) 2008-2011, 2014, 2018-20...
options
tags_compatibility_wave
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006 Lukáš Lalinský # Copyright (C) 2019-2021 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 License # a...
gadgets
drag
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2011 - 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 ...
postprocessor
metadatafromtitle
from __future__ import unicode_literals import re from .common import PostProcessor class MetadataFromTitlePP(PostProcessor): def __init__(self, downloader, titleformat): super(MetadataFromTitlePP, self).__init__(downloader) self._titleformat = titleformat self._titleregex = ( ...
common
path
# -*- Mode: Python; test-case-name: whipper.test.test_common_path -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (C) 2009 Thomas Vander Stichele # This file is part of whipper. # # whipper is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
aliceVision
PhotometricStereo
__version__ = "1.0" from meshroom.core import desc class PhotometricStereo(desc.CommandLineNode): commandLine = "aliceVision_photometricStereo {allParams}" category = "Photometry" documentation = """ Reconstruction using Photometric Stereo. A normal map is evaluated from several photographs taken from th...
PyObjCTest
test_nsprintpanel
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSPrintPanel(TestCase): def testConstants(self): self.assertEqual(NSPrintPanelShowsCopies, 0x01) self.assertEqual(NSPrintPanelShowsPageRange, 0x02) self.assertEqual(NS...
dev
gen_versioninfo
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Generate file_version_info.txt for Pyinstaller use with Windows builds.""" import os.path import sys # pylint: disable=import-error,no-member,useless-suppression fro...
StartPage
OpenSettings
# *************************************************************************** # * Copyright (c) 2020 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
migrations
0009_matching_gui
from django.db import migrations def data_migration(apps, schema_editor): StandardTaskConfig = apps.get_model("main", "StandardTaskConfig") TaskConfig = apps.get_model("main", "TaskConfig") MicroServiceChainLink = apps.get_model("main", "MicroServiceChainLink") MicroServiceChainLinkExitCode = apps.get...
OAuth2
Models
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from copy import deepcopy from typing import Any, Dict, List, Optional, Union from cura.OAuth2.KeyringAttribute import KeyringAttribute class BaseModel: def __init__(self, **kwargs: Any) -> None: self.__dict__...
Draft
InitGui
# *************************************************************************** # * Copyright (c) 2009 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
blocks
qa_stream_mux
#!/usr/bin/env python # # Copyright 2004,2005,2007,2010,2012,2013,2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import os import pmt from gnuradio import blocks, gr, gr_unittest class test_stream_mux(gr_unittest.TestCase): def setUp(sel...
ops
summarize_test
""" Unit tests for summarization. """ __copyright__ = "Copyright (C) 2014-2016 Martin Blais" __license__ = "GNU GPLv2" import collections import datetime import re import unittest from datetime import date from beancount import loader from beancount.core import convert, data, flags, interpolate, inventory from bean...
deluge
configmanager
# # Copyright (C) 2007 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 logging import os impo...
gaphor
abc
from __future__ import annotations import abc from typing import TYPE_CHECKING, Iterable if TYPE_CHECKING: from gaphor.core.modeling import Element from gaphor.diagram.diagramtoolbox import ( DiagramType, ElementCreateInfo, ToolboxDefinition, ) class Service(metaclass=abc.ABCMeta...
midifile
output
# Python midifile package -- parse, load and play MIDI files. # Copyright (c) 2011 - 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 # of the License...
admin
teams
from CTFd.admin import admin from CTFd.models import Challenges, Teams, Tracking from CTFd.utils.decorators import admins_only from flask import render_template, request, url_for from sqlalchemy.sql import not_ @admin.route("/admin/teams") @admins_only def teams_listing(): q = request.args.get("q") field = re...
beetsplug
parentwork
# This file is part of beets. # Copyright 2017, Dorian Soergel. # # 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, ...
dialogs
colordlg
# -*- 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
jsontemplates
# 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, ...
logic
converters
# encoding: utf-8 import json from typing import Any import ckan.lib.navl.dictization_functions as df import ckan.logic.validators as validators import ckan.model as model from ckan.common import _, aslist from ckan.types import ( Context, DataValidator, FlattenDataDict, FlattenErrorDict, FlattenK...
aliceVision
FeatureExtraction
__version__ = "1.3" from meshroom.core import desc class FeatureExtraction(desc.AVCommandLineNode): commandLine = "aliceVision_featureExtraction {allParams}" size = desc.DynamicNodeSize("input") parallelization = desc.Parallelization(blockSize=40) commandLineRange = "--rangeStart {rangeStart} --range...
vocoder
cvsd
#!/usr/bin/env python # # Copyright 2007,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import blocks, filter, gr from . import vocoder_python class cvsd_encode_fb(gr.hier_block2): """ This is a wrapper for the CVSD enco...
lib
munge
# encoding: utf-8 # Note these functions are similar to, but separate from name/title mungers # found in the ckanext importer. That one needs to be stable to prevent # packages changing name on reimport, but these ones can be changed and # improved. import os.path import re from typing import Union from ckan import ...
context
gifContext
import tempfile import Quartz from .imageContext import ImageContext, getSaveImageOptions from .tools.gifTools import generateGif class GIFContext(ImageContext): fileExtensions = ["gif"] saveImageOptions = getSaveImageOptions( [ "imageGIFDitherTransparency", "imageGIFRGBColo...
data
viewer_slice
# -*- 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.go...
friture
dock
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009 Timoth?Lecomte # This file is part of Friture. # # Friture is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as published by # the Free Software Foundation. # # Friture is distribu...