section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
femexamples
equation_flow_initial_elmer_2D
# *************************************************************************** # * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
sabnzbd
sabtray
#!/usr/bin/python3 -OO # Copyright 2007-2023 The SABnzbd-Team (sabnzbd.org) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later ver...
engines
framalibre
# SPDX-License-Identifier: AGPL-3.0-or-later """ FramaLibre (It) """ from html import escape from urllib.parse import urlencode, urljoin from lxml import html from searx.utils import extract_text # about about = { "website": "https://framalibre.org/", "wikidata_id": "Q30213882", "official_api_documentat...
devtools
security
# 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: Security from __future__ import annotations import enum # noqa import typing from dataclasses import dataclass # n...
utils
convert
# -*- coding: utf-8 -*- import bitmath from .check import is_iterable, is_mapping def convert(obj, rule, func, args=(), kwargs=None, fallback=None): if kwargs is None: kwargs = {} res = None cvargs = (rule, func, args, kwargs, fallback) try: if rule(obj): res = func(obj, ...
lib
s3_helpers
# 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, ...
engines
nyaa
# SPDX-License-Identifier: AGPL-3.0-or-later """ Nyaa.si (Anime Bittorrent tracker) """ from urllib.parse import urlencode from lxml import html from searx.utils import extract_text, get_torrent_size, int_or_zero # about about = { "website": "https://nyaa.si/", "wikidata_id": None, "official_api_documen...
data
watershed_process
import numpy as np from scipy import ndimage from scipy.ndimage import generate_binary_structure, watershed_ift try: from skimage.segmentation import watershed except ImportError: from skimage.morphology import watershed def get_LUT_value(data, window, level): shape = data.shape data_ = data.ravel() ...
docs-rst
download_docs
#!/usr/bin/env python3 """Download a document in various formats and compare its native Pandoc conversions. The purpose is figure out which of the formats downloadable from Google Docs offers the richest representation to post-process and automatically convert to Markdown format for inclusion in the repo. Ultimately, ...
PyObjCTest
test_cgdisplaystream
import Quartz from PyObjCTools.TestSupport import * CGDisplayStreamFrameAvailableHandler = b"vIQ@@" try: long except NameError: long = int try: unicode except NameError: unicode = str class TestCGDisplayStream(TestCase): @min_os_level("10.8") def testTypes10_8(self): self.assertIsCF...
utils
filenames
''' Make strings safe for use as ASCII filenames, while trying to preserve as much meaning as possible. ''' import errno import os from math import ceil from calibre import force_unicode, isbytestring, sanitize_file_name from calibre.constants import (filesystem_encoding, iswindows, pre...
hogql
metadata
from posthog.hogql import ast from posthog.hogql.context import HogQLContext from posthog.hogql.errors import HogQLException from posthog.hogql.filters import replace_filters from posthog.hogql.hogql import translate_hogql from posthog.hogql.parser import parse_select from posthog.hogql.printer import print_ast from po...
digital
qa_crc32_async_bb
#!/usr/bin/env python # Copyright 2022 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import pmt from gnuradio import blocks, digital, gr, gr_unittest class qa_crc32_async_bb(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_blo...
queries
property_optimizer
from dataclasses import dataclass from typing import List, Optional, cast from posthog.constants import PropertyOperatorType from posthog.models.property import Property, PropertyGroup from rest_framework.exceptions import ValidationError @dataclass(frozen=True) class PropertyGroups: outer: Optional[PropertyGrou...
builders
anchor_generator_builder_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...
managers
account_manager
# -*- coding: utf-8 -*- import os import shutil from threading import Lock from ..utils.struct.lock import lock from .event_manager import AccountUpdateEvent # MANAGER VERSION __version__ = 1 class AccountManager: """ manages all accounts. """ # ----------------------------------------------------...
raven
processors
""" raven.core.processors ~~~~~~~~~~~~~~~~~~~~~ :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 import re import warnings from raven.utils import varmap from raven.utils.compat import PY3, string_types...
PyObjCTest
test_cfdateformatter
from CoreFoundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str try: long except NameError: long = int class TestDateFormatter(TestCase): def testTypeID(self): self.assertIsInstance(CFDateGetTypeID(), (int, long)) def testConstants(se...
digital
qa_packet_headergenerator_bb
#!/usr/bin/env python # # Copyright 2012-2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # import pmt from gnuradio import blocks, digital, gr, gr_unittest from gnuradio.gr import packet_utils class qa_packet_headergenerator_bb(gr_unittest.TestCas...
downloaders
HellshareCz
# -*- coding: utf-8 -*- from ..base.simple_downloader import SimpleDownloader class HellshareCz(SimpleDownloader): __name__ = "HellshareCz" __type__ = "downloader" __version__ = "0.91" __status__ = "testing" __pattern__ = r"http://(?:www\.)?hellshare\.(?:cz|com|sk|hu|pl)/[^?]*/\d+" __config_...
docs
test_tcm
#!/usr/bin/env python import math import random import sys import fsm_utils from gnuradio import audio, blocks, digital, eng_notation, 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, Kb, bitspersymbol,...
session-recordings
session_recording_api
import json from datetime import datetime, timedelta from typing import Any, List, Type, cast import posthoganalytics import requests from dateutil import parser from django.contrib.auth.models import AnonymousUser from django.db.models import Count, Prefetch from django.http import HttpResponse, JsonResponse from drf...
bitmessageqt
newchandialog
""" src/bitmessageqt/newchandialog.py ================================= """ import widgets from addresses import addBMIfNotPresent from addressvalidator import AddressValidator, PassPhraseValidator from PyQt4 import QtCore, QtGui from queues import UISignalQueue, addressGeneratorQueue, apiAddressGeneratorReturnQueue ...
transport
tornado
""" raven.transport.tornado ~~~~~~~~~~~~~~~~~~~~~~~ :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 from functools import partial from raven.transport.base import AsyncTransport from raven.transport.ht...
autokey
logger
# Copyright (C) 2018-2019 Thomas Hess <thomas.hess@udo.edu> # 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. # This pro...
Models
MaterialManagementModel
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import copy # To duplicate materials. import uuid # To generate new GUIDs for new materials. from typing import TYPE_CHECKING, Any, Dict, Optional import cura.CuraApplication # Imported like this to prevent cirmanagecul...
image
svg
from decimal import Decimal # On Python 2.6 must install lxml since the older xml.etree.ElementTree # version can not be used to create SVG images. try: import lxml.etree as ET except ImportError: import xml.etree.ElementTree as ET import qrcode.image.base class SvgFragmentImage(qrcode.image.base.BaseImage)...
beetsplug
lastimport
# This file is part of beets. # Copyright 2016, Rafael Bodill https://github.com/rafi # # 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...
engines
ahmia
# SPDX-License-Identifier: AGPL-3.0-or-later """ Ahmia (Onions) """ from urllib.parse import parse_qs, urlencode, urlparse from lxml.html import fromstring from searx.engines.xpath import eval_xpath, eval_xpath_list, extract_text, extract_url # about about = { "website": "http://juhanurmihxlp77nkq76byazcldy2hlm...
engines
gif
#!/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 re from io import BytesIO from shutil import which from subpr...
common
config
# -*- Mode: Python; test-case-name: whipper.test.test_common_config -*- # 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 # th...
TestStart
TestStartPage
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2021 Chris Hennes <chennes@pioneerlibrarysystem.org> * # * * # * This program is free software; you can redistribute it a...
comictaggerlib
coverimagewidget
"""A PyQt4 widget to display cover images Display cover images from either a local archive, or from Comic Vine. TODO: This should be re-factored using subclasses! """ # Copyright 2012-2014 Anthony Beville # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complian...
addons
AntiStandby
# -*- coding: utf-8 -*- import os import subprocess import sys import time from ..base.addon import BaseAddon, expose try: import caffeine except ImportError: pass class Kernel32: ES_AWAYMODE_REQUIRED = 0x00000040 ES_CONTINUOUS = 0x80000000 ES_DISPLAY_REQUIRED = 0x00000002 ES_SYSTEM_REQUIRE...
AssemblyTests
TestCore
# SPDX-License-Identifier: LGPL-2.1-or-later # /**************************************************************************** # * # Copyright (c) 2023 Ondsel <development@ondsel.com> * # ...
common
directory
# -*- Mode: Python; test-case-name: whipper.test.test_common_directory -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (C) 2013 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 #...
chardet
euctwfreq
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
api
element
from typing import Literal, Tuple from posthog.api.routing import StructuredViewSetMixin from posthog.auth import PersonalAPIKeyAuthentication, TemporaryTokenAuthentication from posthog.client import sync_execute from posthog.models import Element, Filter from posthog.models.element.element import chain_to_elements fr...
bitmessageqt
settings
""" This module setting file is for settings """ import os import sys import tempfile import ConfigParser import debug import defaults import namecoin import openclpow import paths import queues import six import state import widgets from bmconfigparser import config as config_obj from helper_sql import sqlExecute, sq...
widgets
discoveringpage
from PyQt5.QtWidgets import QWidget from tribler.gui.sentry_mixin import AddBreadcrumbOnShowMixin from tribler.gui.utilities import connect from tribler.gui.widgets.loadingpage import LOADING_ANIMATION class DiscoveringPage(AddBreadcrumbOnShowMixin, QWidget): """ The DiscoveringPage is shown when users are st...
preferences
plugin
# Copyright (C) 2008-2010 Adam Olsen # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that...
versions
074_a4ca55f0f45e_remove_resource_groups
# encoding: utf-8 """074 Remove resource groups Revision ID: a4ca55f0f45e Revises: 011f51208be3 Create Date: 2018-09-04 18:49:14.423978 """ import sqlalchemy as sa from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used by Alembic. revision = "a4ca55f0f45e" ...
components
utils
import os import time from datetime import datetime import yaml def get_all_csv_paths(path): csv_paths = [] for root, dirs, files in os.walk(path): for file in files: if file.endswith(".csv"): csv_paths.append(os.path.join(root, file)) return csv_paths def date_str_t...
snippet
expand
# 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 ...
playorder
shufflebygrouping
# Copyright 2018 Phoenix Dailey # 2020 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...
core
inventory
"""A container for an inventory of positions. This module provides a container class that can hold positions. An inventory is a mapping of positions, where each position is keyed by (currency: str, cost: Cost) -> position: Position where 'currency': The commodity under consideration, USD, CAD, or stock units su...
gaphor
main
import argparse import logging import os import sys from gaphor.application import distribution from gaphor.entrypoint import initialize from gaphor.plugins import default_plugin_path, enable_plugins LOG_FORMAT = "%(name)s %(levelname)s %(message)s" def main(argv=None) -> int: """Start Gaphor from the command l...
PyObjCTest
test_metadata_function
""" Tests for the new-style metadata format interface. These tests are for global function """ from __future__ import unicode_literals import sys import warnings import objc from PyObjCTest.metadatafunction import * from PyObjCTools.TestSupport import * if sys.version_info[0] == 3: unicode = str _FunctionTable...
Grady
MyWindowController
from Cocoa import * class MyWindowController(NSWindowController): rectGradientView = objc.IBOutlet() bezierGradientView = objc.IBOutlet() startColorWell = objc.IBOutlet() endColorWell = objc.IBOutlet() angle = objc.IBOutlet() angleSlider = objc.IBOutlet() radialCheck = objc.IBOutlet() ...
migrations
0054_index_aip_silent_error_branch
from django.db import migrations from main.models import Job # Can't use apps.get_model for this model as we need to access class attributes. NEW_EXIT_CODE_PK = "c2638a7b-3308-4a0b-895a-001e09fd407a" def data_migration_up(apps, schema_editor): """Add new branch to Index AIP chain link to continue on errors. ...
dialogs
editmetadatadialog
from typing import Dict, List from PyQt5 import uic from PyQt5.QtCore import QModelIndex, QPoint, Qt, pyqtSignal from PyQt5.QtWidgets import QComboBox, QSizePolicy, QWidget from tribler.core.components.database.db.tribler_database import ResourceType from tribler.core.components.knowledge.knowledge_constants import ( ...
lib
create_test_data
# encoding: utf-8 from __future__ import annotations import datetime import logging from typing import Any, Optional, Union import ckan.model as model from ckan.logic import get_action from ckan.types import Context log = logging.getLogger(__name__) class CreateTestData(object): # keep track of the objects cre...
plugins
mediaklikk
""" $description Live TV channels from MTVA, a Hungarian public, state-owned broadcaster. $url mediaklikk.hu $url m4sport.hu $type live $region Hungary """ import logging import re from urllib.parse import unquote, urlparse from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate...
booster
changeMeta
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.booster.add import CalcAddBoosterCommand from gui.fitCommands.helpers import BoosterInfo, InternalCommandHistory from service.fit import Fit class GuiChangeBoosterMetaCommand(wx.Command): def __init__(self, f...
migrations
0004_auto_20230616_1510
# Generated by Django 3.2.19 on 2023-06-16 15:10 import django_migration_linter as linter from common.database import ( get_random_readonly_database_key_if_present_otherwise_default, ) from django.db import migrations, models from django.db.models import Count def fix_duplicate_order_user_notification_policy(app...
diagramexport
exportcli
#!/usr/bin/python import argparse import logging import re from pathlib import Path from typing import List from gaphor.application import Session from gaphor.core.modeling import Diagram from gaphor.diagram.export import escape_filename, save_pdf, save_png, save_svg from gaphor.storage import storage log = logging....
QT
PantallaSavePGN
import codecs import encodings import os import chardet.universaldetector from Code import PGN, TrListas, Util, VarGen from Code.QT import ( Colocacion, Columnas, Controles, Delegados, Grid, Iconos, QTUtil, QTUtil2, QTVarios, ) from PyQt4 import QtGui class WBaseSave(QtGui.QWidget...
PyObjCTest
test_nsimage
import AppKit from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSImageHelper(NSObject): def image_didLoadRepresentation_withStatus_(self, i, r, s): pass def image_didLoadPartOfRepresentation_withValidRows_(self, i, r, c): ...
audioscrobbler
asprefs
# Copyright (C) 2006 Adam Olsen # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 1, or (at your option) # any later version. # # This program is distributed in the hope that it w...
plover-build-utils
install_wheels
#!/usr/bin/env python3 import os import subprocess import sys # Default directory for caching wheels. WHEELS_CACHE = os.path.join(".cache", "wheels") def _split_opts(text): args = text.split() assert (len(args) % 2) == 0 return {name: int(nb_args) for name, nb_args in zip(*([iter(args)] * 2))} # Allow...
octoprint
environment
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms of the AGPLv3 License" import copy import logging import os import sys import threading import psutil from octoprint.plugin import EnvironmentDetecti...
Main
Stock
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2015 Dan Falck <ddfalck@gmail.com> * # * * # * This program is free software; you can redistribute it a...
scripts
make_lang_en
#!/usr/bin/env python # # 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 L...
core
losses
# 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...
config
plugins
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License" from typing import Dict, List from octoprint.schema import BaseModel from octoprint.vendor.with_attrs_docs import with_attrs_d...
objc
_convenience
""" This module implements a callback function that is used by the C code to add Python special methods to Objective-C classes with a suitable interface. This module contains no user callable code. TODO: - Add external interface: Framework specific modules may want to add to this. - These are candidates for implemen...
plugins
models
# -*- coding: utf-8 -*- """ flaskbb.plugins.models ~~~~~~~~~~~~~~~~~~~~~~~ This module provides registration and a basic DB backed key-value store for plugins. :copyright: (c) 2017 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ from flask import current_app from flaskbb....
blocks
qa_keep_m_in_n
#!/usr/bin/env python # # Copyright 2008,2010,2012,2013,2018,2022 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import random import sys from gnuradio import blocks, gr, gr_unittest class test_keep_m_in_n(gr_unittest.TestCase): def setUp(sel...
heartbeat
tasks
import datetime from apps.heartbeat.models import IntegrationHeartBeat from apps.integrations.tasks import create_alert from celery.utils.log import get_task_logger from common.custom_celery_tasks import shared_dedicated_queue_retry_task from django.conf import settings from django.db import transaction from django.db...
webservice
api_helpers
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2017 Sambhav Kothari # Copyright (C) 2018, 2020-2021, 2023 Laurent Monin # Copyright (C) 2018-2023 Philipp Wolfer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General ...
PathTests
PathTestUtils
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
analog
qa_fm_emph
#!/usr/bin/env python # # Copyright 2019 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import analog, blocks, gr, gr_unittest class test_fm_emph(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() def t...
mail
substitution
class Substitution(object): """A string substitution to be applied to the text and HTML contents of the body of your email, as well as in the Subject and Reply-To parameters. """ def __init__(self, key=None, value=None): """Create a Substitution with the given key and value. :param key...
accounts
AlldebridCom
# -*- coding: utf-8 -*- import json from functools import reduce from ..base.multi_account import MultiAccount class AlldebridCom(MultiAccount): __name__ = "AlldebridCom" __type__ = "account" __version__ = "0.45" __status__ = "testing" __config__ = [ ("mh_mode", "all;listed;unlisted", "...
profiles
packageimport
"""Profile Import dependency relationship.""" from gaphor import UML from gaphor.diagram.presentation import LinePresentation from gaphor.diagram.shapes import Text, draw_arrow_head from gaphor.diagram.support import represents from gaphor.UML.recipes import stereotypes_str @represents( UML.PackageImport, he...
constructors
jsstring
# python 3 support import six from ..base import * if six.PY3: unichr = chr @Js def fromCharCode(): args = arguments.to_list() res = "" for e in args: res += unichr(e.to_uint16()) return this.Js(res) fromCharCode.own["length"]["value"] = Js(1) String.define_own_property( "fromChar...
plotting
generated_cmrmap
# CMRMAP generated from cmrmapPlot.py # Returns a colour map CMAP (varying black - # purple - red - yellow - white) that is monochrome- # compatible, i.e. it produces a monotonic greyscale # colour map. # # The map is a slight modification to that suggested in # [1]. # # Reference: # # [1] Rappaport, C...
tools
extract_features
#!/usr/bin/env python import argparse import json import os import sys FILES = ["pii", "ccn"] HEADERS = ["offset", "content", "context"] def main(uuid, log_path, output): features = {} path = os.path.normpath(os.path.join(log_path, "bulk-" + uuid)) for name in FILES: filepath = os.path.join(path...
Settings
SidebarCustomMenuItemsModel
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import Any from PyQt6.QtCore import Qt, pyqtSlot from UM.Qt.ListModel import ListModel class SidebarCustomMenuItemsModel(ListModel): name_role = Qt.ItemDataRole.UserRole + 1 actions_role = Qt.ItemData...
Op
Probe
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2018 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
dialogs
about_autokey_dialog
# Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu> # 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. # This program ...
friture
spectrumPlotWidget
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging from enum import Enum import numpy as np from friture.audiobackend import SAMPLING_RATE from friture.filled_curve import CurveType, FilledCurve from friture.plotting.coordinateTransform import CoordinateTransform from friture.qml_tools import qml_url, raise...
archiver
list_cmd
import argparse import os import sys import textwrap from ..archive import Archive from ..cache import Cache from ..constants import * # NOQA from ..helpers import BaseFormatter, ItemFormatter, archivename_validator from ..logger import create_logger from ..manifest import Manifest from ._common import Highlander, bu...
conversions
releaseDecember15
""" Conversion pack for December 2015 release (no release name) """ CONVERSIONS = { # Renamed items "Medium 'Gremlin' Power Core Disruptor I": "Medium Gremlin Compact Energy Neutralizer", "Medium Coaxial Remote Armor Repairer": "Medium Coaxial Compact Remote Armor Repairer", "'Distributor' Tracking Dis...
ui
debug
import sys from AppKit import NSPanel from Foundation import NSLog from vanilla import * from .codeEditor import OutPutEditor class ShowHideNSPanel(NSPanel): def close(self): self.orderOut_(None) class ShowHideFloatingWindow(FloatingWindow): nsWindowClass = ShowHideNSPanel class DebugWindowContr...
profiling
benchmarks
""" This file is the declaration of benchmarks for HTTPie. It is also used to run them with the current environment. Each instance of BaseRunner class will be an individual benchmark. And if run without any arguments, this file will execute every benchmark instance and report the timings. The benchmarks are run throu...
mylar
searchit
# This file is part of Mylar. # # Mylar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Mylar is distributed in the hope that it wi...
statusbar
textbase
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Base text widgets for statusbar.""" from qutebrowser.qt.core import Qt from qutebrowser.qt.gui import QPainter from qutebrowser.qt.widgets import QLabel, QSizePolicy from qutebrowser.utils i...
puddlestuff
constants
# -*- coding: utf-8 -*- import os import sys from os.path import dirname, join from PyQt5.QtCore import Qt from .translations import translate YES = translate("Defaults", "Yes") NO = translate("Defaults", "No") BLANK = translate("Defaults", "<blank>") KEEP = translate("Defaults", "<keep>") VARIOUS = translate("Defau...
processor
join_flv
#!/usr/bin/env python import struct from io import BytesIO TAG_TYPE_METADATA = 18 ################################################## # AMF0 ################################################## AMF_TYPE_NUMBER = 0x00 AMF_TYPE_BOOLEAN = 0x01 AMF_TYPE_STRING = 0x02 AMF_TYPE_OBJECT = 0x03 AMF_TYPE_MOVIECLIP = 0x04 AMF_TY...
pynocchio
pynocchio
import os import sys from PyQt5 import QtCore, QtWidgets from .main_window_model import MainWindowModel from .main_window_view import MainWindowView DATADIRS = ( os.path.abspath("./pynocchio"), "/usr/share/pynocchio", "/usr/local/share/pynocchio", os.path.join(QtCore.QDir.homePath(), ".local/share/py...
apiv1
user
# 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, ...
settings
base
# flake8: noqa # This file is part of Archivematica. # # Copyright 2010-2017 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 ve...
clientScripts
move_or_merge
#!/usr/bin/env python import errno import filecmp import os import shutil from custom_handlers import get_script_logger logger = get_script_logger("archivematica.mcp.client.move_or_merge") def mkdir_p(path): """Create a directory if it doesn't already exist.""" try: os.makedirs(path) except OSEr...
mail
content
from .validators import ValidateAPIKey class Content(object): """Content to be included in your email. You must specify at least one mime type in the Contents of your email. """ def __init__(self, type_=None, value=None): """Create a Content with the specified MIME type and value. :...
migrations
0003_archivesspace_help_text
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("administration", "0002_archivesspaceconfig")] operations = [ migrations.AlterField( model_name="archivesspaceconfig", name="access_conditions", field=models.CharField(...
config-integrations
webhook
# Main enabled = True title = "Webhook" slug = "webhook" short_description = "If your monitoring system isn't listed, choose Webhook for generic templates, and feel free to modify them as needed." description = None is_featured = True featured_tag_name = "Generic" is_displayed_on_web = True is_able_to_autoresolve = Tru...
administration
views_processing
# 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 ...
migrations
0001_squashed_0059_remove_django_geojson
# Generated by Django 2.2.10 on 2020-02-27 10:07 import datetime import caching.base import django.contrib.postgres.fields import django.contrib.postgres.fields.jsonb import django.db.models.deletion import django_countries.fields import papers.baremodels import papers.models from django.conf import settings from dja...
downloaders
FileSharkPl
# -*- coding: utf-8 -*- import base64 import re import urllib.parse from datetime import timedelta from ..base.simple_downloader import SimpleDownloader class FileSharkPl(SimpleDownloader): __name__ = "FileSharkPl" __type__ = "downloader" __version__ = "0.22" __status__ = "testing" __pattern__ ...