section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
plugins
tv999
""" $description Turkish live TV channel owned by Detelina Media. $url tv999.bg $type live $region Bulgaria """ import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls import HLSStream from streamlink.utils.url import update_sc...
migrations
0044_update_idtools
from django.db import migrations def data_migration(apps, schema_editor): mscrd = apps.get_model("main", "MicroServiceChoiceReplacementDic") # Use new fido command introduced in fpr-admin v1.7.2 fido_idcommand_ids = [ "0db6372b-f507-4db0-9993-e745044a69f9", "56345ae4-08d1-42df-a2f9-9ba376...
PyObjCTest
loader
from __future__ import absolute_import, print_function import glob import os import string import sys import unittest from distutils.command.install_lib import install_lib from distutils.errors import DistutilsOptionError from fnmatch import fnmatch from os.path import basename, dirname, expanduser, join, splitext fr...
Arranging
Arranger
from typing import TYPE_CHECKING, List, Optional, Set, Tuple if TYPE_CHECKING: from UM.Operations.GroupedOperation import GroupedOperation class Arranger: def createGroupOperationForArrange( self, *, add_new_nodes_in_scene: bool = False ) -> Tuple["GroupedOperation", int]: """ Fin...
decrypters
MultiUpOrg
# -*- coding: utf-8 -*- import re import urllib.parse from ..base.simple_decrypter import SimpleDecrypter class MultiUpOrg(SimpleDecrypter): __name__ = "MultiUpOrg" __type__ = "decrypter" __version__ = "0.18" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?multiup\.(?:org|eu)/(?:en/|f...
extractor
livejournal
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_str from ..utils import int_or_none from .common import InfoExtractor class LiveJournalIE(InfoExtractor): _VALID_URL = ( r"https?://(?:[^.]+\.)?livejournal\.com/video/album/\d+.+?\bid=(?P<id>\d+)" ) _TEST = { ...
migrations
201606061345_221d918aa9f0_add_user_authentication_infos
"""Add user authentication infos Revision ID: 221d918aa9f0 Revises: 127be3fb000 Create Date: 2016-06-06 13:45:52.915050 """ import sqlalchemy as sa # revision identifiers, used by Alembic. from alembic import op revision = "221d918aa9f0" down_revision = "127be3fb000" def upgrade(): # has no effect on other D...
thumbor
testing
#!/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 mimetypes import random from io import BytesIO from os.path i...
gui
keyring_manager_window
from __future__ import absolute_import import time from gi.repository import Gtk from sunflower.gui.input_dialog import PasswordDialog class Column: ID = 0 NAME = 1 MODIFIED = 2 class KeyringManagerWindow: """Keyring manager window is used to give user control over passwords stored in our own ...
ui
ui_options_cdlookup_select
# -*- 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_CDLookupOptionsPage(object): def setupUi(self, CDLookupOptionsPage): CDLookupOptionsPage.setObjectName("CDLookupOptionsPage") CDLook...
Tools
examplePy2wiki
#! python # (c) 2009 Juergen Riegel GPL Usage = """examplePy2wiki - generating a wiki text out of a python example Usage: examplePy2wiki [Optionen] Options: -o --out-file=FILENAME use this file name for output, default resources.qrc -i, --in-file=FILENAME directory to search, default PWD -h, --help ...
oss-installation
tasks
from apps.base.utils import live_settings from apps.oss_installation.cloud_heartbeat import send_cloud_heartbeat from apps.oss_installation.usage_stats import UsageStatsService from celery.utils.log import get_task_logger from common.custom_celery_tasks import shared_dedicated_queue_retry_task from django.utils import ...
extractor
adobetv
from __future__ import unicode_literals import functools import re from ..compat import compat_str from ..utils import ( ISO639Utils, OnDemandPagedList, float_or_none, int_or_none, parse_duration, str_or_none, str_to_int, unified_strdate, ) from .common import InfoExtractor class Ado...
calculix
write_step_equation
# *************************************************************************** # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
DatabaseHandlers
QualityDatabaseHandler
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from UM.Settings.DatabaseContainerMetadataController import ( DatabaseMetadataContainerController, ) from UM.Settings.InstanceContainer import InstanceContainer from UM.Settings.SQLQueryFactory import SQLQueryFactory, m...
classes
enumeration
import logging from gaphor import UML from gaphor.core.modeling.properties import attribute from gaphor.core.styling import FontStyle, FontWeight, JustifyContent, TextAlign from gaphor.diagram.presentation import ( Classified, ElementPresentation, from_package_str, ) from gaphor.diagram.shapes import Box, ...
Tools
ConvertFCMat
# *************************************************************************** # * Copyright (c) 2013 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
widgets
progressbar
# 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 ...
models
user
from functools import cached_property from typing import Any, Callable, Dict, List, Optional, Tuple, Type, TypedDict from django.contrib.auth.models import AbstractUser, BaseUserManager from django.db import models, transaction from django.db.models import Q from django.utils import timezone from django.utils.translat...
extractor
howcast
from __future__ import unicode_literals from ..utils import parse_iso8601 from .common import InfoExtractor class HowcastIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?howcast\.com/videos/(?P<id>\d+)" _TEST = { "url": "http://www.howcast.com/videos/390161-How-to-Tie-a-Square-Knot-Properly", ...
formats
wav
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2007 Lukáš Lalinský # Copyright (C) 2012-2013, 2017 Wieland Hoffmann # Copyright (C) 2013 Michael Wiencek # Copyright (C) 2016-2017 Sambhav Kothari # Copyright (C) 2018, 2020-2021 Laurent Monin # Copyright (C) 2018-2022 Philipp...
devtools
target
# 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: Target from __future__ import annotations import enum # noqa import typing from dataclasses import dataclass # noq...
mopidy
backend
# ruff: noqa: ARG002 from __future__ import annotations import logging from typing import TYPE_CHECKING, Any, Literal, Optional import pykka from mopidy import listener from pykka.typing import ActorMemberMixin, proxy_field, proxy_method if TYPE_CHECKING: from mopidy.audio.actor import AudioProxy from mopid...
baseclass
payment
# pylint: disable=import-error, no-name-in-module, too-few-public-methods, too-many-ancestors """ Payment/subscription frontend """ from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.screenmanager import Screen from kivymd.uix.behaviors.elevation import RectangularElevationBehavior fr...
gui
test_installer_gui
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022 FreeCAD Project Association * # * ...
ipv8
settings
from typing import Optional from pydantic import validator from tribler.core.config.tribler_config_section import TriblerConfigSection from tribler.core.utilities.network_utils import NetworkUtils # pylint: disable=no-self-argument class BootstrapSettings(TriblerConfigSection): enabled: bool = True max_down...
audio
utils
from __future__ import annotations from typing import TYPE_CHECKING, Any, Callable, cast from mopidy import httpclient from mopidy.internal.gi import Gst from mopidy.types import DurationMs, UriScheme if TYPE_CHECKING: from collections.abc import Iterable from mopidy.config import ProxyConfig def millisec...
extractor
lenta
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class LentaIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?lenta\.ru/[^/]+/\d+/\d+/\d+/(?P<id>[^/?#&]+)" _TESTS = [ { "url": "https://lenta.ru/news/2018/03/22/savshenko_go/", "info_d...
protos
expose_protos_test
"""Isolated test for proto conversion. bazel test --test_env=LEDGER=<filename.beancount> //experiments/v3/protos:expose_protos_test """ import functools import os import pprint import sys import tempfile import time import unittest from os import path try: from experiments.v3.protos import expose_protos as ep ex...
libs
config
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ####################################################################### # # VidCutter - media cutter & joiner # # copyright © 2018 Pete Alexandrou # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
bitmessagekivy
uikivysignaler
""" UI Singnaler for kivy interface """ import logging from threading import Thread from kivy.app import App from pybitmessage import queues, state from pybitmessage.bitmessagekivy.baseclass.common import kivy_state_variables logger = logging.getLogger("default") class UIkivySignaler(Thread): """Kivy ui si...
sketch
sketchgizeh
import random import sys import gizeh as gz import numpy as np class SketchGizeh(object): def __init__(self): self._surface = None def setup(self, width=1200, height=900, bg_color=(1, 1, 1)): self._width = width self._height = height self._surface = gz.Surface(width=width, he...
builtinShipBrowser
categoryItem
# coding: utf-8 import gui.utils.color as colorUtils import gui.utils.draw as drawUtils import gui.utils.fonts as fonts import wx from gui.bitmap_loader import BitmapLoader from gui.builtinShipBrowser.sfBrowserItem import SFBrowserItem from logbook import Logger from .events import Stage2Selected pyfalog = Logger(__...
util
songwrapper
# Copyright 2005 Michael Urman # 2016-22 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 qu...
components
readlinecommands
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Bridge to provide readline-like shortcuts for QLineEdits.""" import os from typing import Any, Callable, Iterable, MutableMapping, Optional from qutebrowser.api import cmdutils from qutebro...
engines
torrentz
# SPDX-License-Identifier: AGPL-3.0-or-later """ Torrentz2.is (BitTorrent meta-search engine) """ import re from datetime import datetime from urllib.parse import urlencode from lxml import html from searx.utils import extract_text, get_torrent_size # about about = { "website": "https://torrentz2.is/", "wik...
models
dashboard_tile
from typing import List from django.core.exceptions import ValidationError from django.db import models from django.db.models import Q, QuerySet, UniqueConstraint from django.utils import timezone from posthog.models.dashboard import Dashboard from posthog.models.insight import generate_insight_cache_key from posthog....
PyObjCTools
AppHelper
"""AppKit helpers. Exported functions: * runEventLoop - run NSApplicationMain in a safer way * runConsoleEventLoop - run NSRunLoop.run() in a stoppable manner * stopEventLoop - stops the event loop or terminates the application * endSheetMethod - set correct signature for NSSheet callbacks * callAfter - call a functio...
meta-architectures
faster_rcnn_meta_arch
# 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...
calculix
write_mesh
# *************************************************************************** # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
migrations
0095_auto_20210911_2053
# Generated by Django 3.2.4 on 2021-09-11 20:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0094_auto_20210911_1550"), ] operations = [ migrations.AlterField( model_name="connector", name="deactiva...
seedbox
generate_test_data
""" This scripts generates data for testing purposes. It generates given amount of folders which contains given amount of files. For available parameters see "parse_args" function below. """ import argparse import os from pathlib import Path _file_count_per_folder = 8 _file_size = 128 * 1024 def parse_args(): p...
scripts
generate_man_pages
import os import re from contextlib import contextmanager from pathlib import Path from typing import Iterable, Iterator, Optional # So that httpie.cli.definition can provide man-page-specific output. Must be set before importing httpie. os.environ["HTTPIE_BUILDING_MAN_PAGES"] = "1" import httpie from httpie.cli.defi...
install
dashboard_gunicorn_config
# Documentation: http://docs.gunicorn.org/en/stable/configure.html # Example: https://github.com/benoitc/gunicorn/blob/master/examples/example_config.py import os import shutil import tempfile # http://docs.gunicorn.org/en/stable/settings.html#user user = os.environ.get("AM_GUNICORN_USER", "archivematica") # http://d...
gpodder
query
# -*- 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...
qtgui
msgcheckbox
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import pmt from gnuradio import gr from PyQt5 import Qt from PyQt5.QtCore import Qt as Qtc from PyQt5.QtWidgets import QFrame, QVBoxLayout...
gui
stylePickers
# ============================================================================= # 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 ...
ui
coverartbox
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2007, 2011 Lukáš Lalinský # Copyright (C) 2009 Carlin Mangar # Copyright (C) 2009, 2018-2023 Philipp Wolfer # Copyright (C) 2011-2013 Michael Wiencek # Copyright (C) 2012 Chad Wilson # Copyright (C) 2012-2014 Wieland Hoffm...
Http
ClusterPrintJobStatus
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import Any, Dict, List, Optional, Union from cura.PrinterOutput.Models.PrinterConfigurationModel import ( PrinterConfigurationModel, ) from ...ClusterOutputController import ClusterOutputController from ..B...
engines
dailymotion
# SPDX-License-Identifier: AGPL-3.0-or-later """ Dailymotion (Videos) """ from datetime import datetime from json import loads from urllib.parse import urlencode from searx.utils import html_to_text, match_language # about about = { "website": "https://www.dailymotion.com", "wikidata_id": "Q769222", "of...
lector
definitionsdialog
# 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...
Code
Variantes
from Code import GestorVariantes def editaVariante( procesador, gestorBase, fen, lineaPGN, titulo=None, siEngineActivo=False, siCompetitivo=False, siBlancasAbajo=None, ): wpantalla = procesador.pantalla liKibitzersActivas = procesador.liKibitzersActivas xtutor = procesador....
bleachbit
Winapp
# vim: ts=4:sw=4:expandtab # BleachBit # Copyright (C) 2008-2023 Andrew Ziem # https://www.bleachbit.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 3 of the License, or # ...
mp-sched
affinity_set
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: Affinity Set Test ################################################## import sys from argparse import ArgumentParser from gnuradio import blocks, eng_notation, filter, gr from gnuradio.eng_arg import eng_arg ...
generateTemplates
templateModuleAppMain
#! python # -*- coding: utf-8 -*- # (c) 2006 Juergen Riegel import generateBase.generateModel_Module import generateBase.generateTools from . import template class TemplateModuleAppMain(template.ModelTemplate): def Generate(self): file = open(self.path + "/App" + self.module.Name + ".cpp", "w") ...
extractor
imgur
from __future__ import unicode_literals import re from ..utils import ExtractorError, int_or_none, js_to_json, mimetype2ext from .common import InfoExtractor class ImgurIE(InfoExtractor): _VALID_URL = r"https?://(?:i\.)?imgur\.com/(?!(?:a|gallery|(?:t(?:opic)?|r)/[^/]+)/)(?P<id>[a-zA-Z0-9]+)" _TESTS = [ ...
builtinItemStatsViews
attributeGrouping
from service.const import GuiAttrGroup RequiredSkillAttrs = sum( ( ["requiredSkill{}".format(x), "requiredSkill{}Level".format(x)] for x in range(1, 7) ), [], ) # todo: maybe moved some of these basic definitions into eos proper? Can really be useful with effect writing as a lot of these a...
util
csrf
"""CSRF double cookie implementation""" __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" import flask from octoprint.server.util.flask import OctoPrintFlaskResponse exempt_vi...
draftguitools
gui_orthoarray
# *************************************************************************** # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
migration
env
# encoding: utf-8 from __future__ import with_statement from alembic import context # from logging.config import fileConfig from ckan.model import init_model from ckan.model.meta import metadata from sqlalchemy import engine_from_config, pool # When auto-generating migration scripts, uncomment these lines to includ...
soundcloud
query
# Copyright 2016-22 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 operator import time from co...
eos
config
import os import sys from os.path import abspath, dirname, join, realpath from logbook import Logger istravis = os.environ.get("TRAVIS") == "true" pyfalog = Logger(__name__) debug = False gamedataCache = True saveddataCache = True gamedata_version = "" gamedata_date = "" gamedata_connectionstring = "sqlite:///" + re...
snippet
restore
# 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
cliphunter
from __future__ import unicode_literals from ..utils import int_or_none, url_or_none from .common import InfoExtractor class CliphunterIE(InfoExtractor): IE_NAME = "cliphunter" _VALID_URL = r"""(?x)https?://(?:www\.)?cliphunter\.com/w/ (?P<id>[0-9]+)/ (?P<seo>.+?)(?:$|[#\?]) """ _TES...
downloaders
WebshareCz
# -*- coding: utf-8 -*- import re from ..base.simple_downloader import SimpleDownloader class WebshareCz(SimpleDownloader): __name__ = "WebshareCz" __type__ = "downloader" __version__ = "0.26" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?(en\.)?webshare\.cz/(?:#/)?(file/)?(?P<ID>\w+...
navigation
image
# -------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: GNU...
hal
metadataformatter
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation; either version 2 # of th...
migrations
0002_squashed_initial
# Generated by Django 3.2.5 on 2022-05-31 14:46 import django.db.models.deletion import django_migration_linter as linter from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("user_management", "0001_squashed_initial"), ("slack", "0...
analog
wfm_rcv_pll
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2007-2020 Free Software Foundation, Inc. # # SPDX-License-Identifier: GPL-3.0 # # GNU Radio Python Flow Graph # Title: FM stereo demod block import math from gnuradio import analog, blocks, fft, filter, gr from gnuradio.filter import firdes class wfm_rcv_p...
community
tunnel_community
import hashlib import math import sys import time from asyncio import Future from asyncio import TimeoutError as AsyncTimeoutError from asyncio import open_connection from binascii import unhexlify from collections import Counter from distutils.version import LooseVersion from typing import Callable, List, Optional im...
gui
itemStats
# ============================================================================= # 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 ...
updaters
python_updater
__author__ = "Gina Häußge <osd@foosel.net>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License" def can_perform_update(target, check, online=True): return ( "python_u...
lib
helpers
# encoding: utf-8 """Helper functions Consists of functions to typically be used within templates, but also available to Controllers. This module is available to templates as 'h'. """ from __future__ import annotations import copy import datetime import email.utils import functools import logging import os import pp...
gui
inktool
# 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 ...
Assembly
Init
# SPDX-License-Identifier: LGPL-2.1-or-later # /**************************************************************************** # * # Copyright (c) 2023 Ondsel <development@ondsel.com> * # ...
database
table_log
# neubot/database/table_log.py # # Copyright (c) 2011 Simone Basso <bassosimone@gmail.com>, # NEXA Center for Internet & Society at Politecnico di Torino # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: you can redistribute it and/or modify # it under the terms of the GNU General...
Test
TestUser
import pytest from Crypt import CryptBitcoin @pytest.mark.usefixtures("resetSettings") class TestUser: def testAddress(self, user): assert user.master_address == "15E5rhcAUD69WbiYsYARh4YHJ4sLm2JEyc" address_index = 1458664252141532163166741013621928587528255888800826689784628722366466547364755811 ...
tools
extract_pot
#!/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...
app
test_addon
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022-2023 FreeCAD Project Association * # * ...
mylar
importer
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 vers...
draftobjects
polygon
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
migrations
0223_organizationdomain
# Generated by Django 3.2.5 on 2022-03-16 08:36 import django.db.models.deletion import posthog.models.organization_domain import posthog.models.utils from django.db import migrations, models from django.utils import timezone def migrate_domain_whitelist(apps, schema_editor): Organization = apps.get_model("posth...
lib
sr_pops
# 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, ...
digital
qam
# # Copyright 2005,2006,2011,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ QAM modulation and demodulation. """ from math import log, pi, sqrt from gnuradio import gr from . import digital_python as digital from . import modulation_utils...
VersionUpgrade43to44
VersionUpgrade43to44
import configparser import io from typing import List, Tuple from UM.Util import ( parseBool, ) # To parse whether the Alternate Skin Rotations function is activated. from UM.VersionUpgrade import VersionUpgrade _renamed_container_id_map = { "ultimaker2_0.25": "ultimaker2_olsson_0.25", "ultimaker2_0.4": ...
PyObjCTest
test_cgimagemetadata
import Quartz from PyObjCTools.TestSupport import * try: long except NameError: long = int try: unicode except NameError: unicode = str class TestCGImageMetadata(TestCase): @min_os_level("10.8") def testTypes10_8(self): self.assertIsCFType(Quartz.CGImageMetadataRef) self.asse...
App
FreeCADTest
# *************************************************************************** # * Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
PySide
mainwindow
import sys import FreeCAD import FreeCADGui from PySide import QtCore, QtGui from ui_mainwindow import Ui_MainWindow # sys.path.append("") class MainWindow(QtGui.QMainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) from PySide import QtNetwork # Webkit...
migrations
0027_full_reingest
from django.db import migrations def data_migration(apps, schema_editor): MicroServiceChain = apps.get_model("main", "MicroServiceChain") MicroServiceChainLink = apps.get_model("main", "MicroServiceChainLink") MicroServiceChainLinkExitCode = apps.get_model( "main", "MicroServiceChainLinkExitCode" ...
rest
statistics_endpoint
from aiohttp import web from aiohttp_apispec import docs from ipv8.REST.schema import schema from ipv8.types import IPv8 from marshmallow.fields import Integer, String from tribler.core.components.metadata_store.db.store import MetadataStore from tribler.core.components.restapi.rest.rest_endpoint import ( RESTEndpo...
extractor
presstv
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import remove_start from .common import InfoExtractor class PressTVIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?presstv\.ir/[^/]+/(?P<y>\d+)/(?P<m>\d+)/(?P<d>\d+)/(?P<id>\d+)/(?P<display_id>[^/]+)?" _TEST = { "ur...
UFPWriter
UFPWriter
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import json from dataclasses import asdict from io import StringIO # For converting g-code to bytes. from typing import Dict, List, cast from Charon.filetypes.OpenPackagingConvention import OPCError from Charon.OpenMode im...
src
Queue
import math import random import appinfo import Traits import utils from Events import Event from Song import Song from State import state from UserAttrib import UserAttrib from utils import * try: QueueCallbacks except NameError: # This is fixed. In case we add some, we have to restart. class QueueCallbacks: ...
mainwin
action_dialogs
from functools import partial from PyQt5.QtCore import Qt from PyQt5.QtWidgets import QHBoxLayout, QListWidgetItem, QPushButton from ..actiondlg import ActionWindow, CreateFunction from ..constants import RIGHTDOCK, SELECTIONCHANGED from ..mainwin.funcs import applyaction, run_func from ..puddleobjects import PuddleC...
extractor
contv
# coding: utf-8 from __future__ import unicode_literals from ..utils import float_or_none, int_or_none from .common import InfoExtractor class CONtvIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?contv\.com/details-movie/(?P<id>[^/]+)" _TESTS = [ { "url": "https://www.contv.com/detai...
util
filenaming
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2013-2014 Ionuț Ciocîrlan # Copyright (C) 2013-2014, 2018-2022 Laurent Monin # Copyright (C) 2014 Michael Wiencek # Copyright (C) 2017 Sambhav Kothari # Copyright (C) 2017 Ville Skyttä # Copyright (C) 2018 Antonio Larrosa # Cop...
plugins
json_reader
import json import logging import os import pathlib from urllib.parse import urlparse, urlunparse import docutils import docutils.io from docutils.core import publish_parts from pelican import signals from pelican.readers import BaseReader, PelicanHTMLTranslator from pelican.utils import slugify log = logging.getLogg...
classes
interfacerealization
"""Implementation of interface.""" from gaphor import UML from gaphor.core.styling import Style from gaphor.diagram.presentation import LinePresentation, Named from gaphor.diagram.shapes import Box, Text, stroke from gaphor.diagram.support import represents from gaphor.UML.classes.interface import Folded, InterfacePo...
QT
PantallaAnalisisParam
from Code import Books, EngineThread, Util from Code.QT import FormLayout, Iconos, QTUtil, QTUtil2 SEPARADOR = FormLayout.separador def leeDicParametros(configuracion): fichero = configuracion.ficheroAnalisis dic = Util.recuperaVar(fichero) if not dic: dic = {} alm = Util.Almacen() alm.mo...
cmis
renderer
from __future__ import annotations from typing import Any from abilian.sbe.apps.documents.models import Document, Folder from flask import render_template # TEMP ROOT = "http://localhost:5000/cmis/atompub" XML_HEADER = "<?xml version='1.0' encoding='UTF-8'?>\n" class Feed: def __init__(self, object: Folder, co...