section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
transports
scgi
#!/usr/bin/python # rtorrent_xmlrpc # (c) 2011 Roger Que <alerante@bellsouth.net> # # Modified portions: # (c) 2013 Dean Gardiner <gardiner91@gmail.com> # # Python module for interacting with rtorrent's XML-RPC interface # directly over SCGI, instead of through an HTTP server intermediary. # Inspired by Glenn Washburn...
aliceVision
DepthMap
__version__ = "4.0" from meshroom.core import desc class DepthMap(desc.AVCommandLineNode): commandLine = "aliceVision_depthMapEstimation {allParams}" gpu = desc.Level.INTENSIVE size = desc.DynamicNodeSize("input") parallelization = desc.Parallelization(blockSize=3) commandLineRange = "--rangeStar...
scenarios
slack_usergroup
import typing from apps.slack.scenarios import scenario_step from apps.slack.types import EventPayload, EventType, PayloadType, ScenarioRoute from django.utils import timezone if typing.TYPE_CHECKING: from apps.slack.models import SlackTeamIdentity, SlackUserIdentity class SlackUserGroupEventStep(scenario_step....
scripts
check_invalid_imports
import os import re import sys from pathlib import Path """ Run this file with the Cura project root as the working directory Checks for invalid imports. When importing from plugins, there will be no problems when running from source, but for some build types the plugins dir is not on the path, so relative imports sh...
PyObjCTest
test_ikimagebrowserview
from PyObjCTools.TestSupport import * from Quartz import * try: unicode except NameError: unicode = str class TestIKImageBrowserViewHelper(NSObject): # IKImageBrowserDataSource def numberOfItemsInImageBrowser_(self, b): return 1 def imageBrowser_itemAtIndex_(self, b, i): return N...
commands
remove_editions
""" PROCEED WITH CAUTION: this permanently deletes book data """ from bookwyrm import models from django.core.management.base import BaseCommand from django.db.models import Count, Q def remove_editions(): """combine duplicate editions and update related models""" # not in use filters = { "%s__isn...
browser
downloadview
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """The ListView to display downloads in.""" import functools from typing import Callable, MutableSequence, Tuple, Union from qutebrowser.browser import downloads from qutebrowser.config import...
propsdlg
pdfpropsdlg
# -*- coding: utf-8 -*- # # Copyright (C) 2016 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....
httplib2
iri2uri
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characters...
builtinViewColumns
price
# ============================================================================= # Copyright (C) 2010 Diego Duclos, Lucas Thode # # 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 Founda...
aliceVision
MeshResampling
__version__ = "1.0" from meshroom.core import desc class MeshResampling(desc.AVCommandLineNode): commandLine = "aliceVision_meshResampling {allParams}" cpu = desc.Level.NORMAL ram = desc.Level.NORMAL category = "Mesh Post-Processing" documentation = """ This node allows to recompute the mesh sur...
i18n
summary
#!/usr/bin/env python3 # summary.py - Text-based visual translation completeness summary # Thomas Perl <thp@gpodder.org>, 2009-01-03 # # Usage: make statistics | python summary.py # import glob import math import os import re import subprocess width = 40 class Language(object): def __init__(self, language, tran...
v1
submissions
from typing import List from CTFd.api.v1.helpers.request import validate_args from CTFd.api.v1.helpers.schemas import sqlalchemy_to_pydantic from CTFd.api.v1.schemas import ( APIDetailedSuccessResponse, PaginatedAPIListSuccessResponse, ) from CTFd.cache import clear_challenges, clear_standings from CTFd.consta...
pdu
qa_pdu_to_stream
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government # retains certain rights in this software. # # SPDX-License-Identifier: GPL-3.0-or-later # import time im...
plugins
vtvgo
""" $description Live TV channels from VTV, a Vietnamese public, state-owned broadcaster. $url vtvgo.vn $type live """ import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls import HLSStream log = logging.getLogger(__name__) ...
ui
edittagdialog
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2011-2014 Michael Wiencek # Copyright (C) 2014 Sophist-UK # Copyright (C) 2016-2017 Sambhav Kothari # Copyright (C) 2017 Wieland Hoffmann # Copyright (C) 2017-2018, 2020-2022 Laurent Monin # Copyright (C) 2018 Vishal Choudhary ...
find-file-extensions
default
from __future__ import absolute_import import fnmatch import os from builtins import map from gi.repository import Gtk from sunflower.plugin_base.find_extension import FindExtension class DefaultFindFiles(FindExtension): """Default extension for find files tool""" def __init__(self, parent): FindEx...
nfoview
util
# -*- coding: utf-8 -*- # Copyright (C) 2005 Osmo Salomaa # # 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 pr...
models
region
import logging from django.db import models logger = logging.getLogger(__name__) def sync_regions(regions: list[dict]): from apps.user_management.models import Region gcom_regions = {region["slug"]: region for region in regions} existing_region_slugs = set(Region.objects.all().values_list("slug", flat=...
PyObjCTest
test_subclass
import sys import types import objc from PyObjCTest.testbndl import PyObjC_TestClass3 from PyObjCTools.TestSupport import * # Most useful systems will at least have 'NSObject'. NSObject = objc.lookUpClass("NSObject") NSArray = objc.lookUpClass("NSArray") NSAutoreleasePool = objc.lookUpClass("NSAutoreleasePool") cla...
pwidgets
gradientctrls
# -*- 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....
PyObjCTest
test_cftree
from CoreFoundation import * from PyObjCTools.TestSupport import * try: long except NameError: long = int import sys if sys.version_info[0] == 3: def cmp(a, b): try: if a < b: return -1 elif b < a: return 1 return 0 ex...
scripts
asciidoc2html
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Generate the html documentation based on the asciidoc files.""" import argparse import io import os import pathlib import re import shutil import subprocess import s...
objc
_descriptors
""" Python <-> Objective-C bridge (PyObjC) This module defines the core interfaces of the Python<->Objective-C bridge. """ __all__ = [ "IBOutlet", "IBAction", "accessor", "Accessor", "typedAccessor", "callbackFor", "selectorFor", "synthesize", "namedselector", "typedSelector", ...
ipc
stargate
import os from sglib import constants from sglib.lib import util from sglib.lib.util import get_wait_file_path, wait_for_finished_file from sglib.log import LOG from .abstract import AbstractIPC class StargateIPC(AbstractIPC): def __init__( self, transport, with_audio, path="/sta...
radio-crawler
clean_uris
#!/usr/bin/env python2 # Copyright 2011,2014 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 __...
Cloud
AbstractCloudOutputDevice
from time import time from typing import Callable, List, Optional from cura.CuraApplication import CuraApplication from cura.PrinterOutput.NetworkedPrinterOutputDevice import AuthState from cura.PrinterOutput.PrinterOutputDevice import ConnectionType from PyQt6.QtCore import QObject, pyqtSlot from PyQt6.QtNetwork impo...
extractor
xuite
# coding: utf-8 from __future__ import unicode_literals from ..utils import ( ExtractorError, float_or_none, get_element_by_attribute, parse_iso8601, remove_end, ) from .common import InfoExtractor class XuiteIE(InfoExtractor): IE_DESC = "隨意窩Xuite影音" _REGEX_BASE64 = r"(?:[A-Za-z0-9+/]{4})...
model
meta
# encoding: utf-8 """SQLAlchemy Metadata and Session object""" from typing import Any, Optional import sqlalchemy.orm as orm from ckan.types import AlchemySession from sqlalchemy import MetaData, event from sqlalchemy.engine import Engine __all__ = ["Session"] # SQLAlchemy database engine. Updated by model.init_mo...
scripts
centroid_post
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2015 Dan Falck <ddfalck@gmail.com> * # * Copyright (c) 2020 Schildkroet * # * ...
versions
402ce1583e3f_initial_config_model
"""Initial config model Revision ID: 402ce1583e3f Revises: Create Date: 2015-12-23 15:05:36.841153 """ # revision identifiers, used by Alembic. revision = "402ce1583e3f" down_revision = None branch_labels = None depends_on = None import sqlalchemy as sa from alembic import op def upgrade(): op.create_table( ...
mobile-app
fcm_relay
import logging from apps.auth_token.auth import ApiTokenAuthentication from apps.mobile_app.models import FCMDevice 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 firebase_admin.exceptions import FirebaseError ...
utils
qtlog
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Loggers and utilities related to Qt logging.""" import argparse import contextlib import faulthandler import logging import sys import traceback from typing import Callable, Iterator, Option...
photos
views
from pathlib import Path from django.conf import settings from django.http import ( HttpResponse, HttpResponseNotFound, HttpResponseRedirect, JsonResponse, ) from django.shortcuts import get_object_or_404 from photonix.photos.models import Library from photonix.photos.utils.thumbnails import get_thumbn...
builtinMarketBrowser
pfSearchBox
# noinspection PyPackageRequirements import gui.utils.color as colorUtils import gui.utils.draw as drawUtils import wx from gui.utils.helpers_wxPython import HandleCtrlBackspace SearchButton, EVT_SEARCH_BTN = wx.lib.newevent.NewEvent() CancelButton, EVT_CANCEL_BTN = wx.lib.newevent.NewEvent() TextEnter, EVT_TEXT_ENTER...
docs
ext_argparse
""" Convert an argparse parser to option directives. Inspired by sphinxcontrib.autoprogram but with a few differences: - Contains some simple pre-processing on the help messages to make the Sphinx version a bit prettier. """ import argparse import re from textwrap import dedent from docutils import nodes from doc...
core
Player
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
invesalius3
setup
import logging import os import pathlib import subprocess import sys import numpy import setuptools from Cython.Build import build_ext, cythonize if sys.platform == "darwin": unix_copt = ["-Xpreprocessor", "-fopenmp", "-lomp"] unix_lopt = ["-Xpreprocessor", "-fopenmp", "-lomp"] else: unix_copt = [ ...
scripts
dumper_post
# *************************************************************************** # * Copyright (c) 2014 sliptonic <shopinthewoods@gmail.com> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
Sandbox
Init
# *************************************************************************** # * Copyright (c) 2001,2002 Juergen Riegel <juergen.riegel@web.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
term2048
keypress
# -*- coding: UTF-8 -*- """ Keyboard events processing """ # Common values # Space Bar key to pause the game SPACE = 32 # Vim keys K, J, L, H = 107, 106, 108, 104 try: import termios except ImportError: # Windows import msvcrt UP, DOWN, RIGHT, LEFT = 72, 80, 77, 75 __key_aliases = { ...
Settings
PerObjectContainerStack
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import Any, Optional from UM.Application import Application from UM.Decorators import override from UM.Settings.Interfaces import PropertyEvaluationContext from UM.Settings.SettingInstance import InstanceState ...
migrations
0046_reviewrating
# Generated by Django 3.0.7 on 2021-02-25 18:36 import django.db.models.deletion from django.db import connection, migrations, models from django.db.models import Q from psycopg2.extras import execute_values def convert_review_rating(app_registry, schema_editor): """take rating type Reviews and convert them to R...
analog
qa_dpll
#!/usr/bin/env python # # Copyright 2012,2013 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_dpll_bb(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() ...
invesalius
expanduser
#!/usr/bin/python # -*- coding: utf-8 -*- # From http://bugs.python.org/file23442/expanduser.py import ctypes from ctypes import windll, wintypes class GUID(ctypes.Structure): _fields_ = [ ("Data1", wintypes.DWORD), ("Data2", wintypes.WORD), ("Data3", wintypes.WORD), ("Data4", win...
dtv
qa_dtv
#!/usr/bin/env python # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import os from os.path import getsize import numpy as np import pmt from gnuradio import blocks, digital, dtv, gr, gr_unittest ts_in_file = os.path.join(os.get...
base
multi_account
# -*- coding: utf-8 -*- import re import time from datetime import timedelta from pyload.core.utils.purge import chars as remove_chars from pyload.core.utils.purge import uniquify from .account import BaseAccount class MultiAccount(BaseAccount): __name__ = "MultiAccount" __type__ = "account" __version_...
migrations
0167_feature_flag_override
# Generated by Django 3.1.12 on 2021-09-06 18:59 import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0166_plugin_public_jobs"), ] operations = [ migrations.CreateMo...
sequencer
seq
import copy import math from sglib import constants from sglib.lib import util from sglib.lib.translate import _ from sglib.lib.util import * from sglib.log import LOG from sglib.math import clip_min, clip_value from sglib.models import theme from sglib.models.daw import * from sgui import shared as glbl_shared from s...
commands
reset
# -*- coding: utf-8 -*- from os import path from dbsettings.models import Setting from django.apps import apps from django.contrib.auth import get_user_model from django.core.cache import cache from django.core.management import call_command from django.core.management.base import BaseCommand, CommandError from django...
translators
translating_nodes
from __future__ import unicode_literals import random import six from .friendly_nodes import * from .pyjsparserdata import * if six.PY3: from functools import reduce xrange = range unicode = str # number of characters above which expression will be split to multiple lines in order to avoid python parse...
downloaders
RehostTo
# -*- coding: utf-8 -*- from ..base.multi_downloader import MultiDownloader class RehostTo(MultiDownloader): __name__ = "RehostTo" __type__ = "downloader" __version__ = "0.29" __status__ = "testing" __pattern__ = r"https?://.*rehost\.to\..+" __config__ = [ ("enabled", "bool", "Activa...
extractor
tvc
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import clean_html, int_or_none from .common import InfoExtractor class TVCIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?tvc\.ru/video/iframe/id/(?P<id>\d+)" _TEST = { "url": "http://www.tvc.ru/video/iframe/id/74622...
params
dtypes
# Copyright 2008-2017 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # import builtins import re from .. import Constants, blocks # Blacklist certain ids, its not complete, but should help ID_BLACKLIST = ["self"] + dir(builtins) try: from gnuradio i...
addons
AntiVirus
# -*- coding: utf-8 -*- import os import shutil import subprocess from pyload.core.utils.convert import to_str from ..base.addon import BaseAddon, expose, threaded from ..helpers import exists try: import send2trash except ImportError: pass class AntiVirus(BaseAddon): __name__ = "AntiVirus" __type...
parts
_base
# 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 ...
extractor
bitchute
# coding: utf-8 from __future__ import unicode_literals import itertools import re from ..utils import orderedSet, unified_strdate, urlencode_postdata from .common import InfoExtractor class BitChuteIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?bitchute\.com/(?:video|embed|torrent/[^/]+)/(?P<id>[^/?#&]+)...
qtui
folderpage
# Copyright (C) 2011 Chris Dekter # 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) a...
plugins
afreeca
""" $description TV and live video game broadcasts, artist performances and personal daily-life video blogs & shows. $url play.afreecatv.com $type live """ import logging import re from streamlink.plugin import Plugin, pluginargument, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls...
preferences
lilypond
# 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
ExashareCom
# -*- coding: utf-8 -*- from ..base.xfs_downloader import XFSDownloader class ExashareCom(XFSDownloader): __name__ = "ExashareCom" __type__ = "downloader" __version__ = "0.08" __status__ = "testing" __pattern__ = r"http://(?:www\.)?exashare\.com/\w{12}" __config__ = [ ("enabled", "bo...
plugins
sync_inoreader
# Canto Inoreader Plugin # by Jack Miller # v0.4 # DEPENDENCIES # This plugin requires the 'requests' module, which can usually be found in # your distro's package manager as python3-requests (or python-requests on # Arch). # IMPORTANT NOTES # - When this plugin is enabled, canto will synchronize your subscribed fe...
views
torrents
import json from ipaddress import ip_address from urllib.parse import quote import flask from nyaa import backend, forms, models, torrents from nyaa.extensions import db from nyaa.utils import cached_function from sqlalchemy.orm import joinedload from werkzeug.datastructures import CombinedMultiDict app = flask.curre...
dataset-tools
create_pascal_tf_record_test
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
src
class_singleCleaner
""" The `singleCleaner` class is a timer-driven thread that cleans data structures to free memory, resends messages when a remote node doesn't respond, and sends pong messages to keep connections alive if the network isn't busy. It cleans these data structures in memory: - inventory (moves data to the on-disk sql da...
scorewiz
dialog
# 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 ...
client
escape
# Methods used for rendering a ClickHouse query, given a template string and a # set of parameters. # # This uses the `escape_param` function from the `clickhouse-driver` package, # but passes an empty `Context` object to it. Prior to # https://github.com/mymarilyn/clickhouse-driver/commit/87090902f0270ed51a0b6754d5cbf...
schemas
challenges
from CTFd.models import Challenges, ma from marshmallow import validate from marshmallow.exceptions import ValidationError from marshmallow_sqlalchemy import field_for class ChallengeRequirementsValidator(validate.Validator): default_message = "Error parsing challenge requirements" def __init__(self, error=N...
process-manager
process
from __future__ import annotations import logging import os import sqlite3 import time from datetime import datetime, timedelta from enum import Enum from typing import TYPE_CHECKING, Any, List, Optional import psutil from tribler.core.utilities.process_manager import sql_scripts from tribler.core.utilities.process_m...
extractor
telequebec
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_str from ..utils import int_or_none, smuggle_url, try_get, unified_timestamp from .common import InfoExtractor class TeleQuebecBaseIE(InfoExtractor): BRIGHTCOVE_URL_TEMPLATE = ( "http://players.brightcove.net/%s/%s_defaul...
machine
keyboard
# -*- coding: utf-8 -*- # Copyright (c) 2010 Joshua Harlan Lifton. # See LICENSE.txt for details. "For use with a computer keyboard (preferably NKRO) as a steno machine." from plover import _ from plover.machine.base import StenotypeBase from plover.misc import boolean from plover.oslayer.keyboardcontrol import Keybo...
conversions
releaseMar2016
""" Conversion pack for January 2016 (YC118.1) release """ CONVERSIONS = { # Renamed items "Basic Gyrostabilizer": "'Basic' Gyrostabilizer", "Basic Damage Control": "'Basic' Damage Control", "Micro Capacitor Battery I": "'Micro' Cap Battery", "ECM Burst I": "Burst Jammer I", "Small Capacitor Ba...
api
notebook
from typing import Any, Dict, List, Optional import structlog from django.db import transaction from django.db.models import Q, QuerySet from django.utils.timezone import now from django_filters.rest_framework import DjangoFilterBackend from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import (...
Code
GestorOpeningLines
import random import time from Code import ( Books, ControlPosicion, Gestor, Jugada, OpeningLines, Partida, TrListas, Util, XMotorRespuesta, ) from Code.Constantes import * from Code.QT import Iconos, QTUtil2, QTVarios class GestorOpeningEngines(Gestor.Gestor): def inicio(self...
midifile
parser
# 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...
Drawing
InitGui
# Drawing gui init module # (c) 2003 Juergen Riegel # # Gathering all the information to start FreeCAD # This is the second one of three init scripts, the third one # runs when the gui is up # *************************************************************************** # * (c) Juergen Riegel (juergen.riegel@web.de) 2...
widgets
inputpane
# # Copyright (C) 2011 Nick Lanham <nick@afternight.org> # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to li...
aliceVision
NormalIntegration
__version__ = "1.0" from meshroom.core import desc class NormalIntegration(desc.CommandLineNode): commandLine = "aliceVision_normalIntegration {allParams}" category = "Photometry" documentation = """ TODO. """ inputs = [ desc.File( name="inputPath", label="Normal Maps...
gpodder
download
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2018 The gPodder Team # # gPodder is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the Licens...
Models
MaterialBrandsModel
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from cura.Machines.Models.BaseMaterialsModel import BaseMaterialsModel from PyQt6.QtCore import Qt, pyqtSignal from PyQt6.QtQml import QQmlEngine from UM.Qt.ListModel import ListModel class MaterialTypesModel(ListModel): ...
chardet
utf8prober
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
httpie
encoding
from typing import Tuple, Union from charset_normalizer import from_bytes from charset_normalizer.constant import TOO_SMALL_SEQUENCE UTF8 = "utf-8" ContentBytes = Union[bytearray, bytes] def detect_encoding(content: ContentBytes) -> str: """ We default to UTF-8 if text too short, because the detection ...
service
esiAccess
# noinspection PyPackageRequirements import base64 import datetime import hashlib import json import os import secrets import time import uuid from collections import namedtuple from datetime import timedelta from urllib.parse import urlencode import config from jose import jwt from jose.exceptions import ExpiredSigna...
tz
win
# This code was originally contributed by Jeffrey Harris. import datetime import struct from six import text_type from six.moves import winreg try: import ctypes from ctypes import wintypes except ValueError: # ValueError is raised on non-Windows systems for some horrible reason. raise ImportError("Ru...
context
resize
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2021 by Ihor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
PartDesignTests
TestBoolean
# *************************************************************************** # * Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
CDDA-Game-Launcher
setup
#!/usr/bin/env python import os import os.path import pathlib import shutil import subprocess import sys import winreg from distutils.cmd import Command from distutils.core import setup from os import scandir from pathlib import Path from subprocess import DEVNULL, CalledProcessError, call, check_output from zipfile i...
service
precalcImplantSet
# ============================================================================= # 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 ...
CloudSync
SyncOrchestrator
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os from typing import Any, Dict, List, cast from cura.CuraApplication import CuraApplication from UM import i18n_catalog from UM.Extension import Extension from UM.Logger import Logger from UM.Message import Message...
ui
drawView
from AppKit import NSBezelBorder, NSDragOperationNone from Foundation import NSURL from Quartz import PDFDocument, PDFThumbnailView, PDFView from vanilla import Group epsPasteBoardType = "CorePasteboardFlavorType 0x41494342" class DrawBotPDFThumbnailView(PDFThumbnailView): def draggingUpdated_(self, draggingInfo...
albums
models
# Copyright 2013 Christoph Reiter # 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. from...
customize
conversion
# -*- coding: utf-8 -*- """ Defines the plugin system for conversions. """ import os import re import shutil from calibre import CurrentDir from calibre.customize import Plugin class ConversionOption(object): """ Class representing conversion options """ def __init__( self, name=None, help=...
backend
oaireader
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the Licen...
browser
eventfilter
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Event handling for a browser tab.""" from qutebrowser.config import config from qutebrowser.keyinput import modeman from qutebrowser.qt import machinery from qutebrowser.qt.core import QEven...
doc
conf
# -*- coding: utf-8 -*- # # Tribler documentation build configuration file, created by # sphinx-quickstart on Wed Jun 15 19:59:31 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
config
scripts
__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, Optional from octoprint.schema import BaseModel from octoprint.vendor.with_attrs_docs import with_att...
accounts
MegasharesCom
# -*- coding: utf-8 -*- import re import time from ..base.account import BaseAccount class MegasharesCom(BaseAccount): __name__ = "MegasharesCom" __type__ = "account" __version__ = "0.11" __status__ = "testing" __description__ = """Megashares.com account plugin""" __license__ = "GPLv3" ...
PyObjCTest
test_cfxmlnode
from CoreFoundation import * from PyObjCTools.TestSupport import * try: long except NameError: long = int class TestXMLNode(TestCase): # NOTE: This doesn't actually test the API def testTypes(self): self.assertIsCFType(CFXMLNodeRef) def testConstants(self): self.assertEqual(kCFX...
basemodels
Facenet
import os from tensorflow.keras import backend as K from tensorflow.keras.layers import ( Activation, BatchNormalization, Concatenate, Conv2D, Dense, Dropout, GlobalAveragePooling2D, Input, Lambda, MaxPooling2D, add, ) from tensorflow.keras.models import Model def scaling(...
writer8
toc
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import absolute_import, division, print_function, unicode_literals __license__ = "GPL v3" __copyright__ = "2012, Kovid Goyal <kovid@kovidgoyal.net>" __docformat__ = "restructuredtext en" from calibre.ebooks.oeb.base import XHTML,...