section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
clientScripts
characterize_file
#!/usr/bin/env python # # Collects characterization commands for the provided file, then either # a) Inserts the tool's XML output into the database, or # b) Prints the tool's stdout, for tools which do not output XML # # If a tool has no defined characterization commands, then the default # will be run instead (curren...
dev
get_coredumpctl_traces
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Get qutebrowser crash information and stacktraces from coredumpctl.""" import argparse import dataclasses import os import os.path import subprocess import sys impor...
widgets
playlist_columns
# 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...
frescobaldi-app
bookmarks
# 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 ...
blocks
qa_blocks_hier_block2
#!/usr/bin/env python import threading import time import numpy from gnuradio import blocks, gr, gr_unittest class add_ff(gr.sync_block): def __init__(self): gr.sync_block.__init__( self, name="add_ff", in_sig=[numpy.float32, numpy.float32], out_sig=[numpy...
browser
browsertab
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Base class for a wrapper over QWebView/QWebEngineView.""" import dataclasses import enum import functools import itertools import pathlib from typing import ( TYPE_CHECKING, Any, ...
KindleUnpack
mobi_utils
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # flake8: noqa from __future__ import absolute_import, division, print_function, unicode_literals import binascii from .compatibility_utils import PY2, bchr, bord, text_type if PY2: range = xrange from itertools impo...
diagramitems
database
from gaphor.C4Model import c4model from gaphor.core.styling import FontWeight, JustifyContent, TextAlign from gaphor.diagram.presentation import ElementPresentation, Named from gaphor.diagram.shapes import Box, Text, ellipse, stroke from gaphor.diagram.support import represents @represents(c4model.C4Database) class C...
aliceVision
CameraLocalization
__version__ = "1.0" import os from meshroom.core import desc class CameraLocalization(desc.AVCommandLineNode): commandLine = "aliceVision_cameraLocalization {allParams}" category = "Utils" documentation = """ """ inputs = [ desc.File( name="sfmdata", label="SfMD...
qtgui
qa_qtgui
#!/usr/bin/env python # # Copyright 2011, 2020 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import gr, gr_unittest, qtgui class test_qtgui(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() def tearDo...
sunflower
accelerator_group
from gi.repository import Gtk class AcceleratorGroup: """Accelerator group provides customizable keyboard shortcuts for plugins with automatically generated configuration.""" def __init__(self, application): self._application = application self._manager = self._application.accelerator_man...
plugins
implicit_prices_test
__copyright__ = "Copyright (C) 2015-2017 Martin Blais" __license__ = "GNU GPLv2" import unittest from beancount import loader from beancount.core import data from beancount.core.number import D from beancount.parser import cmptest from beancount.plugins import implicit_prices class TestImplicitPrices(cmptest.TestC...
migrations
0024_auto_20230718_0953
# Generated by Django 3.2.20 on 2023-07-18 09:53 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_orders(apps, schema_editor): E...
extractor
clipchamp
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_str from ..utils import ( ExtractorError, T, merge_dicts, traverse_obj, unified_timestamp, url_or_none, ) from .common import InfoExtractor class ClipchampIE(InfoExtractor): _VALID_URL = r"https?://(?:www\...
QT
WBG_InfoMove
from Code import ControlPosicion, Jugada, VarGen from Code.QT import Colocacion, Controles, FormLayout, Iconos, QTVarios, Tablero from PyQt4 import QtCore, QtGui class WInfomove(QtGui.QWidget): def __init__(self, winBookGuide, siMoves=True): QtGui.QWidget.__init__(self) self.siMoves = siMoves ...
autocomplete
completer
# 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 ...
bookwyrm
apps
"""Do further startup configuration and initialization""" import logging import os import urllib from bookwyrm import settings from django.apps import AppConfig logger = logging.getLogger(__name__) def download_file(url, destination): """Downloads a file to the given path""" try: # Ensure our destin...
seedbox
seeder
""" This script generates torrents in input folder and seed them. For available parameters see "parse_args" function below. Folder structure: # my channel # ├ sub_directory # | ├ file1 # | └ file2 # ├ sub_directory2 # | ├ file3 # | └ file4 # ├ file5 # └ file6 The script generates torrents for each folder contains fi...
cli
chardetect
#!/usr/bin/env python """ Script which takes one or more file paths and reports on their detected encodings Example:: % chardetect somefile someotherfile somefile: windows-1252 with confidence 0.5 someotherfile: ascii with confidence 1.0 If no paths are provided, it takes its input from stdin. """ from...
core
models
__package__ = "archivebox.core" import json import uuid from pathlib import Path from typing import List, Optional from django.contrib.auth.models import User # noqa from django.core.cache import cache from django.db import models from django.db.models import Case, IntegerField, Value, When from django.urls import ...
signal
correlation
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2018 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...
constants
config
import json from CTFd.constants import JinjaEnum, RawEnum from CTFd.utils import get_config from flask import url_for class ConfigTypes(str, RawEnum): CHALLENGE_VISIBILITY = "challenge_visibility" SCORE_VISIBILITY = "score_visibility" ACCOUNT_VISIBILITY = "account_visibility" REGISTRATION_VISIBILITY ...
config-integrations
direct_paging
# Main enabled = True title = "Direct paging" slug = "direct_paging" short_description = None description = None is_displayed_on_web = True is_featured = False is_able_to_autoresolve = False is_demo_alert_enabled = False description = None # Default templates slack_title = """\ *<{{ grafana_oncall_link }}|#{{ grafana...
chardet
sbcharsetprober
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
options
maintenance
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2021-2022 Bob Swift # Copyright (C) 2021-2022 Laurent Monin # Copyright (C) 2021-2023 Philipp Wolfer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Licens...
frescobaldi-app
metainfo
# 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 ...
addons
UnSkipOnFail
# -*- coding: utf-8 -*- from pyload.core.datatypes.pyfile import PyFile from ..base.addon import BaseAddon class UnSkipOnFail(BaseAddon): __name__ = "UnSkipOnFail" __type__ = "addon" __version__ = "0.14" __status__ = "testing" __config__ = [("enabled", "bool", "Activated", True)] __descri...
View
DbViewer
#!/usr/bin/env python # -*- coding:utf-8 -*- # A GAE web application to aggregate rss and send it to your kindle. # Visit https://github.com/cdhigh/KindleEar for the latest version # Contributors: # rexdf <https://github.com/rexdf> import web from apps.BaseHandler import BaseHandler from apps.dbModels import * from li...
gui-qt
suggestions_dialog
import re from plover import _ from plover.formatting import RetroFormatter from plover.gui_qt.suggestions_dialog_ui import Ui_SuggestionsDialog from plover.gui_qt.tool import Tool from plover.gui_qt.utils import ToolBar from plover.suggestions import Suggestion from PyQt5.QtCore import Qt from PyQt5.QtGui import QCur...
picard
config_upgrade
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2013-2014 Michael Wiencek # Copyright (C) 2013-2016, 2018-2022 Laurent Monin # Copyright (C) 2014, 2017 Lukáš Lalinský # Copyright (C) 2014, 2018-2023 Philipp Wolfer # Copyright (C) 2015 Ohm Patel # Copyright (C) 2016 Suhas # C...
extractor
viqeo
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import int_or_none, str_or_none, url_or_none from .common import InfoExtractor class ViqeoIE(InfoExtractor): _VALID_URL = r"""(?x) (?: viqeo:| https?://c...
gigachannel-manager
gigachannel_manager_component
from tribler.core.components.component import Component from tribler.core.components.gigachannel_manager.gigachannel_manager import ( GigaChannelManager, ) from tribler.core.components.libtorrent.libtorrent_component import LibtorrentComponent from tribler.core.components.metadata_store.metadata_store_component imp...
scripts
geoip_service
#!/usr/bin/python # The contents of this file are subject to the Common Public Attribution # License Version 1.0. (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://code.reddit.com/LICENSE. The License is based on the Mozilla Public # Lic...
torrentlist
torrentactions
# # Copyright (C) 2011 Nick Lanham <nick@afternight.org> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # import logging import os import ...
win
replace_nsi
import logging from argparse import ArgumentParser from pathlib import Path logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO) def parse_arguments(): parser = ArgumentParser(description='Update Tribler NSI') parser.add_argument('-r', '--repo', type=str, help='path to a repository fo...
app
helpers
# -*- coding: utf-8 -*- import json from functools import wraps from urllib.parse import unquote, urljoin, urlparse import flask import flask_themes2 from pyload.core.api import Perms, Role, has_permission class JSONEncoder(json.JSONEncoder): def default(self, obj): try: return dict(obj) ...
i18n
commands
# coding:utf-8 from cactus.utils.filesystem import chdir from django.core.management.commands.compilemessages import ( Command as CompileMessagesCommand, ) from django.core.management.commands.makemessages import Command as MakeMessagesCommand DEFAULT_COMMAND_KWARGS = { # Command Options "verbosity": 3, ...
misc
checkpyver
# SPDX-FileCopyrightText: Florian Bruhin (The-Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Check if qutebrowser is run with the correct python version. This should import and run fine with both python2 and python3. """ import sys try: # Python3 from tkinter import Tk, me...
engines
pubmed
# SPDX-License-Identifier: AGPL-3.0-or-later """ PubMed (Scholar publications) """ from datetime import datetime from urllib.parse import urlencode from flask_babel import gettext from lxml import etree from searx.poolrequests import get # about about = { "website": "https://www.ncbi.nlm.nih.gov/pubmed/", "...
torrentlist
torrentview
# # 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 deluge.component as component from deluge.decorators import overrid...
language-names
data
# Do not edit, this file is generated. See generate.py. language_names = { "C": { "aa": "Afar", "ab": "Abkhazian", "ae": "Avestan", "af": "Afrikaans", "am": "Amharic", "ar": "Arabic", "as": "Assamese", "ast": "Asturian", "ay": "Aymara", ...
apatite
cli
# -*- coding: utf-8 -*- # TODO: check - README should consist of nothing but words in # templates and yaml. any other words and it's a sign the README/other # docs have been manually edited. import csv import datetime import imp import json import os import shutil import subprocess import sys import time from collect...
extractor
canvas
from __future__ import unicode_literals import json import re from ..compat import compat_HTTPError from ..utils import ( ExtractorError, clean_html, extract_attributes, float_or_none, get_element_by_class, int_or_none, merge_dicts, str_or_none, strip_or_none, url_or_none, ) fr...
clientScripts
extract_maildir_attachments
#!/usr/bin/env python # 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, ei...
types
scenario_routes
import typing from .common import EventType, PayloadType if typing.TYPE_CHECKING: from apps.slack.scenarios.scenario_step import ScenarioStep from apps.slack.types import BlockActionType, InteractiveMessageActionType class ScenarioRoute: class _Base(typing.TypedDict): step: "ScenarioStep" c...
PyObjCTest
test_cgpattern
import os import Quartz from PyObjCTools.TestSupport import * from Quartz import * try: long except NameError: long = int class TestCGPattern(TestCase): def testConstants(self): self.assertEqual(kCGPatternTilingNoDistortion, 0) self.assertEqual(kCGPatternTilingConstantSpacingMinimalDisto...
draftmake
make_arc_3points
# *************************************************************************** # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
scripts
setupcommon
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Data used by setup.py and the PyInstaller qutebrowser.spec.""" import os import os.path import subprocess import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.pardir)) ...
ui
ui_options_tags_compatibility_aac
# -*- coding: utf-8 -*- # Automatically generated - don't edit. # Use `python setup.py build_ui` to update it. from PyQt5 import QtCore, QtGui, QtWidgets class Ui_TagsCompatibilityOptionsPage(object): def setupUi(self, TagsCompatibilityOptionsPage): TagsCompatibilityOptionsPage.setObjectName("TagsCompa...
models
role
from django.db import models from ee.models.organization_resource_access import OrganizationResourceAccess from posthog.models.utils import UUIDModel class Role(UUIDModel): name: models.CharField = models.CharField(max_length=200) organization: models.ForeignKey = models.ForeignKey( "posthog.Organizat...
lector
dockwidgets
# This file is a part of Lector, a Qt based ebook reader # Copyright (C) 2017-2019 BasioMeusPuga # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
gui
deep_learning_seg_dialog
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import importlib import multiprocessing import os import pathlib import subprocess import sys import tempfile import time import invesalius.data.slice_ as slc import numpy as np import wx from invesalius.gui import dialogs from invesalius.pubsub import pub as Publisher f...
searx
external_bang
# SPDX-License-Identifier: AGPL-3.0-or-later from searx.data import EXTERNAL_BANGS def get_node(external_bangs_db, bang): node = external_bangs_db["trie"] after = "" before = "" for bang_letter in bang: after += bang_letter if after in node and isinstance(node, dict): node...
extractor
dctp
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_str from ..utils import float_or_none, int_or_none, unified_timestamp, url_or_none from .common import InfoExtractor class DctpTvIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?dctp\.tv/(?:#/)?filme/(?P<id>[^/?#&]+)" _TE...
migrations
0004_auto_20220711_1106
# Generated by Django 3.2.13 on 2022-07-11 11:06 import django_migration_linter as linter from django.db import migrations class Migration(migrations.Migration): """ The previous version of this migration removes two fields: cached_render_for_web and active_cache_for_web_calculation_id. Now it doesn'...
win32
makedefs
#!/usr/bin/env python # Script to create .defs from a folder of MinGW implibs and a folder of DLLs. # Copyright (C) 2010 John Stumpo # # 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 vers...
kibitzr
timeline
import collections import logging import re import pytimeparse import schedule import six from .exceptions import ConfigurationError logger = logging.getLogger(__name__) TimelineRule = collections.namedtuple("TimelineRule", "interval unit at") class Timeline: RE_TIME = re.compile(r"\d?\d:\d\d") def __ini...
femobjects
constraint_bodyheatsource
# *************************************************************************** # * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> * # * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * Th...
simplejson
scanner
"""JSON token scanner """ import re def _import_c_make_scanner(): try: from simplejson._speedups import make_scanner return make_scanner except ImportError: return None c_make_scanner = _import_c_make_scanner() __all__ = ["make_scanner"] NUMBER_RE = re.compile( r"(-?(?:0|[1-9]...
pyobjc-framework-Cocoa
distribute_setup
#!python """Bootstrap distribute installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from distribute_setup import use_setuptools use_setuptools() If you want to require a specific version of se...
translators
pyjsparser
# The MIT License # # Copyright 2014, 2015 Piotr Dabkowski # # 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, modif...
core
filtermanager
# # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # import logging import deluge....
extractor
pornoxo
from __future__ import unicode_literals import re from ..utils import str_to_int from .common import InfoExtractor class PornoXOIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?pornoxo\.com/videos/(?P<id>\d+)/(?P<display_id>[^/]+)\.html" _TEST = { "url": "http://www.pornoxo.com/videos/7564/strip...
admin
reports
""" moderation via flagged posts and users """ from bookwyrm import forms, models from bookwyrm.models.report import USER_DELETION, USER_SUSPENSION, USER_UNSUSPENSION from bookwyrm.settings import PAGE_LENGTH from bookwyrm.views.helpers import redirect_to_referer from django.contrib.auth.decorators import login_require...
lib
modes
# This file is part of MyPaint. # Copyright (C) 2015 by Andrew Chadwick <a.t.chadwick@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your ...
location
model
import csv import math import sys from pathlib import Path import matplotlib.path as mpltPath import shapefile from photonix.classifiers.base_model import BaseModel from photonix.photos.utils.metadata import PhotoMetadata, parse_gps_location WORLD_FILE = ( Path("location") / "TM_WORLD_BORDERS-0.3.shp" ) # http:/...
aliceVision
CheckerboardDetection
__version__ = "1.0" from meshroom.core import desc class CheckerboardDetection(desc.AVCommandLineNode): commandLine = "aliceVision_checkerboardDetection {allParams}" size = desc.DynamicNodeSize("input") parallelization = desc.Parallelization(blockSize=5) commandLineRange = "--rangeStart {rangeStart} ...
PyObjCTest
test_nsruleeditor
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSRuleEditorHelper(NSObject): def ruleEditor_numberOfChildrenForCriterion_withRowType_(self, ed, cr, rt): return 1 def ruleEditor_child_forCriterion_withRowType_(self, ed, ch, cr...
saveddata
implantSet
# =============================================================================== # Copyright (C) 2016 Ryan Holmes # # 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, e...
trax
search
# 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...
UML
sanitizerservice
"""The Sanitize module is dedicated to adapters (stuff) that keeps the model clean and in sync with diagrams.""" from typing import Iterable from gaphor import UML from gaphor.abc import Service from gaphor.core import event_handler from gaphor.core.modeling import Diagram, Element, Presentation from gaphor.core.mod...
plugins
radionet
""" $description Global and country-specific websites for live radio simulcasts for over 40,000 stations. $url radio.net $url radio.at $url radio.de $url radio.dk $url radio.es $url radio.fr $url radio.it $url radio.pl $url radio.pt $url radio.se $type live """ import logging import re from urllib.parse import urlpars...
extractor
vodlocker
# coding: utf-8 from __future__ import unicode_literals from ..utils import NO_DEFAULT, ExtractorError, sanitized_Request, urlencode_postdata from .common import InfoExtractor class VodlockerIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?vodlocker\.(?:com|city)/(?:embed-)?(?P<id>[0-9a-zA-Z]+)(?:\..*?)?" ...
extractor
ro220
from __future__ import unicode_literals from ..compat import compat_urllib_parse_unquote from .common import InfoExtractor class Ro220IE(InfoExtractor): IE_NAME = "220.ro" _VALID_URL = r"(?x)(?:https?://)?(?:www\.)?220\.ro/(?P<category>[^/]+)/(?P<shorttitle>[^/]+)/(?P<id>[^/]+)" _TEST = { "url": ...
formats
_id3
# Copyright 2004-2020 Joe Wreschnig, Michael Urman, Niklas Janlert, # Steven Robertson, Nick Boultbee, h88e22dgpeps56sg # # 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; eith...
game
Scorekeeper
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
decrypters
TenluaVnFolder
# -*- coding: utf-8 -*- import json from ..base.simple_decrypter import SimpleDecrypter class TenluaVnFolder(SimpleDecrypter): __name__ = "TenluaVnFolder" __type__ = "decrypter" __version__ = "0.03" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?tenlua\.vn/folder/.+?/(?P<ID>[0-9a-f]+...
WebServicesTool-CocoaBindings
WSTApplicationDelegateClass
""" WSTApplicationDelegateClass """ from AppKit import * from PyObjCTools import AppHelper from twisted.internet import reactor from WSTConnectionWindowControllerClass import WSTConnectionWindowController class WSTApplicationDelegate(NSObject): @objc.IBAction def newConnectionAction_(self, sender): "...
draftgeoutils
geometry
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * * # * Th...
QT
Piezas
import codecs import collections import os import shutil from Code import TrListas, VarGen from Code.Constantes import * from Code.QT import Colocacion, Controles, FormLayout, Iconos, QTVarios from PyQt4 import QtCore, QtGui, QtSvg class ConjuntoPiezas: def __init__(self, nombre): self.nombre = nombre ...
widgets
tableiconbuttons
from PyQt5.QtCore import QEvent, QModelIndex, QObject, QRect, QSize, pyqtSignal from PyQt5.QtGui import QIcon from tribler.gui.utilities import get_image_path class IconButton(QObject): icon = QIcon() icon_border_ratio = float(0.1) clicked = pyqtSignal(QModelIndex) icon_border = 4 icon_size = 16 ...
femviewprovider
view_constraint_currentdensity
# *************************************************************************** # * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
comictaggerlib
pageloader
"""A PyQT4 class to load a page image from a ComicArchive in a background thread""" # Copyright 2012-2014 Anthony Beville # 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.apa...
middleware
flask_app
# encoding: utf-8 from __future__ import annotations import inspect import logging import os import pkgutil import sys import time from logging.handlers import SMTPHandler from typing import Any, Optional, Union, cast import ckan.lib.app_globals as app_globals import ckan.lib.plugins as lib_plugins import ckan.model ...
objc
_pycoder
""" Implementation of NSCoding for OC_PythonObject and friends NOTE: this only works with a keyed archiver, not with a plain archiver. It should be easy enough to change this later on if needed. A minor problem with NSCoding support is that NSCoding restores graphs recusively while Pickle does so depth-first (more of...
bup
repo
from __future__ import absolute_import from functools import partial from os.path import realpath from bup import client, git, vfs from bup.compat import pending_raise _next_repo_id = 0 _repo_ids = {} def _repo_id(key): global _next_repo_id, _repo_ids repo_id = _repo_ids.get(key) if repo_id: re...
async-deletion
async_deletion
from django.db import models class DeletionType(models.IntegerChoices): Team = 0 Person = 1 Group = 2 Cohort_stale = 3 Cohort_full = 4 # This model represents deletions that should delete (other, unrelated) data async class AsyncDeletion(models.Model): class Meta: constraints = [ ...
migrations
0045_session_replay_events_size
from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions from posthog.session_recordings.sql.session_replay_event_migrations_sql import ( ADD_SIZE_DISTRIBUTED_SESSION_REPLAY_EVENTS_TABLE_SQL, ADD_SIZE_SESSION_REPLAY_EVENTS_TABLE_SQL, ADD_SIZE_WRITABLE_SESSION_REPLAY_EVENTS_TABLE_SQL, ...
accounts
UlozTo
# -*- coding: utf-8 -*- import re import time import urllib.parse from ..base.account import BaseAccount from ..helpers import parse_html_form class UlozTo(BaseAccount): __name__ = "UlozTo" __type__ = "account" __version__ = "0.35" __status__ = "testing" __description__ = """Uloz.to account plu...
migrations
0036_annualgoal
# Generated by Django 3.0.7 on 2021-01-16 18:43 import bookwyrm.models.fields import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0035_edition_edition_rank"), ] operations...
downloaders
UpleaCom
# -*- coding: utf-8 -*- import re import urllib.parse from ..base.simple_downloader import SimpleDownloader def decode_cloudflare_email(value): email = "" key = int(value[:2], 16) for i in range(2, len(value), 2): email += chr(int(value[i : i + 2], 16) ^ key) return email class UpleaCom(...
CloudSync
DownloadPresenter
# Copyright (c) 2022 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. import tempfile from typing import Any, Dict, List from cura.CuraApplication import CuraApplication from cura.UltimakerCloud.UltimakerCloudScope import UltimakerCloudScope from PyQt6.QtNetwork import QNetworkReply from UM.i18...
util
windows
# Copyright 2013,2016 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. from __future__ import absolut...
bup
tree
from __future__ import absolute_import, print_function from io import BytesIO from bup.git import mangle_name, shalist_item_sort_key from bup.hashsplit import GIT_MODE_TREE, split_to_blob_or_tree from bup.helpers import add_error from bup.io import path_msg class TreeItem: __slots__ = "name", "mode", "gitmode",...
gui
test_uninstaller_gui
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022 FreeCAD Project Association * # * ...
options
profiles
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2021 Bob Swift # Copyright (C) 2022 Laurent Monin # Copyright (C) 2022 Philipp Wolfer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as publishe...
qltk
tagsfrompath
# Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna # # 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. impor...
pyload
_main_
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import atexit import os import sys import time from functools import partial from . import __version__ from .core import Core DESCRIPTION = """ ____________ ___/ | \_____________ _ _______________ _ ___ / | ___/ | _ __ _ _...
migrations
0095_session_recording_event_table
# Generated by Django 3.0.7 on 2020-10-26 10:43 import django.contrib.postgres.fields.jsonb import django.db.models.deletion import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0094_description_on_dashboard_items"), ...
browser
shared
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Various utilities shared between webpage/webview subclasses.""" import enum import html import netrc import os import sys import tempfile from typing import Callable, Iterable, Iterator, Lis...