section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
PyObjCTest
test_nsprintinfo
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSPrintInfo(TestCase): def testConstants(self): self.assertEqual(NSPortraitOrientation, 0) self.assertEqual(NSLandscapeOrientation, 1) self.assertEqual(NSAutoPaginati...
femviewprovider
view_mesh_region
# *************************************************************************** # * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
openssl
library
import ctypes import ctypes.util import os import sys from .discovery import discover as user_discover # Disable false-positive _MEIPASS # pylint: disable=no-member,protected-access # Discover OpenSSL library def discover_paths(): # Search local files first if "win" in sys.platform: # Windows ...
model
abstract_window_filter
# Copyright (C) 2011 Chris Dekter # Copyright (C) 2019-2020 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 opt...
sentry-reporter
sentry_reporter
import logging import os import sys from collections import defaultdict from contextlib import contextmanager from contextvars import ContextVar from enum import Enum, auto from hashlib import md5 from typing import Any, Dict, Optional import sentry_sdk from faker import Faker from sentry_sdk.integrations.logging impo...
ui
logview
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2007 Lukáš Lalinský # Copyright (C) 2008-2009, 2019-2022 Philipp Wolfer # Copyright (C) 2012-2013 Michael Wiencek # Copyright (C) 2013-2014, 2018-2022 Laurent Monin # Copyright (C) 2014 Sophist-UK # Copyright (C) 2016, 2018 Sam...
PyObjCTest
test_nsxmlparser
from Foundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSXMLParser(TestCase): def testConstants(self): self.assertEqual(NSXMLParserInternalError, 1) self.assertEqual(NSXMLParserOutOfMemoryError, 2) self.assertEqual(NSX...
Assembly
InitGui
# SPDX-License-Identifier: LGPL-2.1-or-later # /**************************************************************************** # * # Copyright (c) 2023 Ondsel <development@ondsel.com> * # ...
neubot
background_api
# neubot/background_api.py # # Copyright (c) 2012 # Nexa Center for Internet & Society, Politecnico di Torino (DAUIN) # and Simone Basso <bassosimone@gmail.com> # # 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 t...
app
test_uninstaller
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022 FreeCAD Project Association * # * ...
remote
api
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2012 - 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
elpais
# coding: utf-8 from __future__ import unicode_literals from ..utils import strip_jsonp, unified_strdate from .common import InfoExtractor class ElPaisIE(InfoExtractor): _VALID_URL = r"https?://(?:[^.]+\.)?elpais\.com/.*/(?P<id>[^/#?]+)\.html(?:$|[?#])" IE_DESC = "El País" _TESTS = [ { ...
xdcc
request
# -*- coding: utf-8 -*- import errno import os import select import socket import struct import time from ..exceptions import Abort class XDCCRequest: def __init__(self, bucket=None, options={}): self.proxies = options.get("proxies", {}) self.bucket = bucket self.fh = None self....
restapi
torrentinfo_endpoint
import hashlib import json from asyncio.exceptions import TimeoutError as AsyncTimeoutError from copy import deepcopy from ssl import SSLError from aiohttp import ( ClientConnectorError, ClientResponseError, ClientSession, ServerConnectionError, web, ) from aiohttp_apispec import docs from ipv8.RES...
migrations
0001_squashed_initial
# Generated by Django 3.2.5 on 2022-05-31 14:46 import datetime import apps.base.models.live_setting import apps.base.models.user_notification_policy import django.core.validators import django.db.models.deletion import django_migration_linter as linter from django.db import migrations, models class Migration(migra...
migrations
0013_auto_20210415_0528
# Generated by Django 3.2 on 2021-04-15 12:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0012_auto_20200813_0238"), ] operations = [ migrations.AlterField( model_name="feeding", name="method", ...
migrations
0020_index_after_processing_decision
from django.db import migrations def data_migration(apps, schema_editor): MicroServiceChain = apps.get_model("main", "MicroServiceChain") MicroServiceChainLink = apps.get_model("main", "MicroServiceChainLink") TaskConfig = apps.get_model("main", "TaskConfig") StandardTaskConfig = apps.get_model("main"...
WebUi
setup
# # Copyright (C) 2009 Damien Churchill <damoxc@gmail.com> # # Basic plugin template created by: # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # Copyright (C) 2007-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 #...
digital
qa_glfsr_source
#!/usr/bin/env python # # Copyright 2007,2010,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import blocks, digital, gr, gr_unittest class test_glfsr_source(gr_unittest.TestCase): def setUp(self): self.tb = gr.t...
plugins
script
# Canto Script Plugin # by Jack Miller # v1.0 # With this plugin you can add a feed with a URL starting with "script:" and # ending with a simple script invocation. You must specify a name for the feed. # # For example: # canto-remote addfeed "script:~/bin/feed.sh" name="Script Feed" # # Scripts must have executable...
extractor
prosiebensat1
# coding: utf-8 from __future__ import unicode_literals import re from hashlib import sha1 from ..compat import compat_str from ..utils import ( ExtractorError, determine_ext, float_or_none, int_or_none, merge_dicts, unified_strdate, ) from .common import InfoExtractor class ProSiebenSat1Bas...
python
dial_tone_wav
#!/usr/bin/env python # # Copyright 2004,2005,2007,2008,2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # # GNU Radio example program to record a dial tone to a WAV file from argparse import ArgumentParser from gnuradio import blocks, gr fro...
bleachbit
Options
# 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 # ...
Test
UnitTests
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2010 Juergen Riegel <juergen.riegel@web.de> * # * * # * This file is part of the FreeCAD CAx development system....
extractor
worldstarhiphop
from __future__ import unicode_literals from .common import InfoExtractor class WorldStarHipHopIE(InfoExtractor): _VALID_URL = r"https?://(?:www|m)\.worldstar(?:candy|hiphop)\.com/(?:videos|android)/video\.php\?.*?\bv=(?P<id>[^&]+)" _TESTS = [ { "url": "http://www.worldstarhiphop.com/vide...
serializers
user
import math import time from apps.api.serializers.telegram import TelegramToUserConnectorSerializer from apps.base.messaging import get_messaging_backends from apps.base.models import UserNotificationPolicy from apps.base.utils import live_settings from apps.oss_installation.utils import cloud_user_identity_status fro...
PyObjCTest
test_metadata
""" Tests for the new-style metadata format interface. Note: Tests for calling from ObjC into python are in test_metadata_py.py TODO: - Add tests for calling functions instead of methods - The python->C interface (that is the contents of the metadata object) is likely to change when the bridge is feature-complete. ...
models
mail_queue
# 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, ...
extractor
whyp
# coding: utf-8 from __future__ import unicode_literals from ..utils import ( T, float_or_none, merge_dicts, str_or_none, traverse_obj, url_or_none, ) from .common import InfoExtractor class WhypIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?whyp\.it/tracks/(?P<id>\d+)" _TESTS =...
serializers
webhook
from collections import defaultdict from apps.webhooks.models import Webhook, WebhookResponse from apps.webhooks.models.webhook import ( PUBLIC_WEBHOOK_HTTP_METHODS, WEBHOOK_FIELD_PLACEHOLDER, ) from apps.webhooks.presets.preset_options import WebhookPresetOptions from common.api_helpers.custom_fields import T...
fitLockTime
graph
# ============================================================================= # 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 ...
ctrlport
usrp_sink_controller
#!/usr/bin/env python import sys from argparse import ArgumentParser import pmt from gnuradio.ctrlport.GNURadioControlPortClient import GNURadioControlPortClient parser = ArgumentParser() parser.add_argument( "-H", "--host", default="localhost", help="Hostname to connect to (default=%(default)r)", ) ...
views
routes
from apps.alerts.models import ChannelFilter from apps.auth_token.auth import ApiTokenAuthentication from apps.public_api.serializers import ( ChannelFilterSerializer, ChannelFilterUpdateSerializer, ) from apps.public_api.throttlers.user_throttle import UserThrottle from common.api_helpers.exceptions import Bad...
neubot
compat
# neubot/compat.py # # Copyright (c) 2010 Simone Basso <bassosimone@gmail.com>, # NEXA Center for Internet & Society at Politecnico di Torino # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
util
imageinfo
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2014, 2018, 2020-2021 Laurent Monin # Copyright (C) 2017 Sambhav Kothari # Copyright (C) 2020-2021 Philipp Wolfer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General ...
src
inventory
"""The Inventory singleton""" # TODO make this dynamic, and watch out for frozen, like with messagetypes import storage.filesystem import storage.sqlite from bmconfigparser import config from singleton import Singleton @Singleton class Inventory: """ Inventory singleton class which uses storage backends ...
digital
qa_crc32_bb
#!/usr/bin/env python # Copyright 2012-2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import pmt from gnuradio import blocks, digital, gr, gr_unittest class qa_crc32_bb(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_bloc...
TLayer
TLayerDemo
import objc import ShadowOffsetView from Cocoa import * from PyObjCTools import NibClassBuilder from Quartz import * class TLayerDemo(NSObject): colorWell = objc.IBOutlet() shadowOffsetView = objc.IBOutlet() shadowRadiusSlider = objc.IBOutlet() tlayerView = objc.IBOutlet() transparencyLayerButton ...
utils
inputs
# ============================================================================= # 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 ...
neubot
poller
# neubot/poller.py # # Copyright (c) 2010, 2012 # Nexa Center for Internet & Society, Politecnico di Torino (DAUIN) # and Simone Basso <bassosimone@gmail.com> # # 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...
draftguitools
gui_arcs
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * (c) 2009, 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
plugins
n13tv
""" $description Israeli live TV channel and video on-demand service owned by Network 13. $url 13tv.co.il $type live, vod $region Israel """ import logging import re from urllib.parse import urljoin, urlunparse from streamlink.plugin import Plugin, PluginError, pluginmatcher from streamlink.plugin.api import validate...
trends
total_volume
import urllib.parse from datetime import date, datetime, timedelta from typing import Any, Callable, Dict, List, Tuple, Union from posthog.clickhouse.query_tagging import tag_queries from posthog.constants import ( MONTHLY_ACTIVE, NON_TIME_SERIES_DISPLAY_TYPES, TRENDS_CUMULATIVE, UNIQUE_GROUPS, UNI...
storage
mergeconflict
from __future__ import annotations import io from pathlib import Path try: import pygit2 except ImportError: import warnings warnings.warn("Library pygit2 not found", ImportWarning, stacklevel=1) def in_git_repository(filename: Path) -> bool: return bool(pygit2.discover_repository(filename)) def ...
draftutils
units
# *************************************************************************** # * Copyright (c) 2009 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * Th...
CIBevelSample
SampleCIView
""" SampleCIView - simple OpenGL based CoreImage view """ import CGL import objc from Cocoa import * from OpenGL.GL import * # XXX: this may or may not be a bug in the OpenGL bindings from OpenGL.GL.APPLE.transform_hint import * from Quartz import * # The default pixel format _pf = None class SampleCIView(NSOpenGL...
extractors
flickr
#!/usr/bin/env python __all__ = ["flickr_download_main"] import json from ..common import * pattern_url_photoset = ( r"https?://www\.flickr\.com/photos/.+/(?:(?:sets)|(?:albums))?/([^/]+)" ) pattern_url_photostream = r"https?://www\.flickr\.com/photos/([^/]+)(?:/|(?:/page))?$" pattern_url_single_photo = r"https...
draftguitools
gui_circles
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * (c) 2009, 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
extensions
tagging
# -*- coding: utf-8 -*- #### # 01/2011 Bernd Schlapsi <brot@gmx.info> # # This script 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. #...
builtinContextMenus
fitAddBrowse
# noinspection PyPackageRequirements import gui.mainFrame import wx from gui.contextMenu import ContextMenuUnconditional _t = wx.GetTranslation class AddBrowsedFits(ContextMenuUnconditional): def __init__(self): self.mainFrame = gui.mainFrame.MainFrame.getInstance() def display(self, callingWindow,...
draftgeoutils
edges
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * * # * Th...
borg
selftest
# Note: these tests are part of the self test, do not use or import pytest functionality here. # See borg.selftest for details. If you add/remove test methods, update SELFTEST_COUNT """ Self testing module =================== The selftest() function runs a small test suite of relatively fast tests that are mean...
tools
traceImage
import os import tempfile from xml.dom import minidom import AppKit from drawBot.misc import executeExternalProcess, getExternalToolPath from fontTools.misc.transform import Transform from .imageObject import ImageObject def _getPath(element, path=None, pathItems=None): if pathItems is None: pathItems =...
internal
deps
from __future__ import annotations import functools import platform import re import sys from pathlib import Path from typing import TYPE_CHECKING, Callable, Optional, TypedDict if sys.version_info < (3, 10): import importlib_metadata as metadata # pyright: ignore[reportMissingImports] else: from importlib i...
utils
test_utils_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...
util
massagers
# Copyright 2004-2011 Joe Wreschnig, Michael Urman, Iñigo Serna, 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 ...
formats
util
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2008, 2012 Lukáš Lalinský # Copyright (C) 2008 Will # Copyright (C) 2010, 2014, 2018-2020, 2023 Philipp Wolfer # Copyright (C) 2013 Michael Wiencek # Copyright (C) 2013, 2017-2019, 2021 Laurent Monin # Copyright (C) 2016-2...
analog
fm_demod
# # Copyright 2006,2007,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from math import pi from gnuradio import filter, gr from . import analog_python as analog from .fm_emph import fm_deemph class fm_demod_cf(gr.hier_block2): """ G...
commands
compile_themes
""" Our own command to all scss themes """ import glob import os import sass from bookwyrm import settings from django.core.management.base import BaseCommand from sass_processor.apps import APPS_INCLUDE_DIRS from sass_processor.processor import SassProcessor from sass_processor.utils import get_custom_functions cla...
PartDesignTests
TestFillet
# *************************************************************************** # * Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
extractor
hitrecord
from __future__ import unicode_literals from ..compat import compat_str from ..utils import clean_html, float_or_none, int_or_none, try_get from .common import InfoExtractor class HitRecordIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?hitrecord\.org/records/(?P<id>\d+)" _TEST = { "url": "https...
tasks
new_alert_group
import json import logging import typing from apps.alerts.models import AlertGroup from apps.mobile_app.alert_rendering import get_push_notification_subtitle from apps.mobile_app.types import FCMMessageData, MessageType, Platform from apps.mobile_app.utils import ( MAX_RETRIES, construct_fcm_message, send_...
trends
breakdown
import json import re import urllib.parse from datetime import datetime from typing import Any, Callable, Dict, List, Optional, Tuple, Union from zoneinfo import ZoneInfo from django.forms import ValidationError from posthog.constants import ( MONTHLY_ACTIVE, NON_TIME_SERIES_DISPLAY_TYPES, TREND_FILTER_TYP...
ui
elementeditor
"""The element editor is a utility window used for editing elements.""" import importlib.resources import logging from typing import Optional from unicodedata import normalize from babel import Locale from gaphor.abc import ActionProvider from gaphor.core import Transaction, action, event_handler from gaphor.core.mod...
backends
sonic
from typing import Generator, List from archivebox.config import ( SEARCH_BACKEND_HOST_NAME, SEARCH_BACKEND_PASSWORD, SEARCH_BACKEND_PORT, SONIC_BUCKET, SONIC_COLLECTION, ) from archivebox.util import enforce_types from sonic import IngestClient, SearchClient MAX_SONIC_TEXT_TOTAL_LENGTH = ( 10...
const
countries
# -*- coding: utf-8 -*- # Automatically generated - don't edit. # Use `python setup.py update_constants` to update it. RELEASE_COUNTRIES = { "AD": "Andorra", "AE": "United Arab Emirates", "AF": "Afghanistan", "AG": "Antigua and Barbuda", "AI": "Anguilla", "AL": "Albania", "AM": "Armenia", ...
ofdm
receive_path
# # Copyright 2005,2006,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import copy import sys from gnuradio import analog, digital, eng_notation, gr # ///////////////////////////////////////////////////////////////////////////// # ...
unihandecode
zhcodepoints
# -*- coding: utf-8 -*- __license__ = "GPL 3" __copyright__ = "2010 Hiroshi Miura <miurahr@linux.com>" __docformat__ = "restructuredtext en" """ Unicode code point dictionary. Based on Unicode.org Unihan database. """ CODEPOINTS = { "x34": [ "Qiu ", "Tian ", "", "", "Kua "...
cli
asset
# encoding: utf-8 import logging import click from ckan.cli import error_shout from ckan.lib import webassets_tools from webassets import script from webassets.exceptions import BundleError log = logging.getLogger(__name__) @click.group(short_help="WebAssets commands.") def asset(): """WebAssets commands.""" ...
aliceVision
ExportMatches
__version__ = "1.1" from meshroom.core import desc class ExportMatches(desc.AVCommandLineNode): commandLine = "aliceVision_exportMatches {allParams}" size = desc.DynamicNodeSize("input") category = "Export" documentation = """ """ inputs = [ desc.File( name="input", ...
Messages
NewPrinterDetectedMessage
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from cura.CuraApplication import CuraApplication from UM import i18nCatalog from UM.Message import Message class NewPrinterDetectedMessage(Message): i18n_catalog = i18nCatalog("cura") def __init__(self, num_printe...
editing
kakasi
# 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 os import subprocess import sys from quodlibet.qltk import Icon...
drafttaskpanels
task_polararray
# *************************************************************************** # * (c) 2019 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
cmd
midx
from __future__ import absolute_import, print_function import glob import math import os import resource import struct import sys from binascii import hexlify from bup import _helpers, git, midx, options, xstat from bup.compat import ExitStack, argv_bytes, hexstr from bup.helpers import ( Sha1, add_error, ...
qt
_core_pyqtproperty
"""WORKAROUND for missing pyqtProperty typing, ported from PyQt5-stubs: FIXME:mypy PyQt6-stubs issue https://github.com/python-qt-tools/PyQt5-stubs/blob/5.15.6.0/PyQt5-stubs/QtCore.pyi#L68-L111 """ # flake8: noqa # pylint: disable=invalid-name,missing-class-docstring,too-many-arguments,redefined-builtin,unused-argume...
canto-curses
tag
# -*- coding: utf-8 -*- # Canto-curses - ncurses RSS reader # Copyright (C) 2016 Jack Miller <jack@codezen.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import curses...
migrations
0003_add_user_signup_flds
# Generated by Django 3.0.7 on 2020-12-16 16:50 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("accounts", "0002_crt_fld_has_config_persional_info"), ] operations = [ migrations.AddField( model_name="user", name="...
Op
Area
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
PartDesignTests
TestPrimitive
# *************************************************************************** # * Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
events
synchronizedlyrics
# Synchronized Lyrics: a Quod Libet plugin for showing synchronized lyrics. # Copyright (C) 2015 elfalem # 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; eith...
templatetags
revisions_link
import django.template.base as base from django import template from django.urls import reverse register = template.Library() @register.tag(name="revisions_link") def revisions_link(parser, token): try: # split_contents() knows not to split quoted strings. tag_name, revision_type, object_uuid = t...
fighter
localAdd
import wx from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcAddLocalFighterCommand(wx.Command): def __init__(self, fitID, fighterInfo, position=None, ignoreRestrictions=False): wx.Command.__init__(self, True, "Add Fighter") self.fitID = fitID self...
extractor
teamtreehouse
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ( ExtractorError, clean_html, determine_ext, float_or_none, get_element_by_class, get_element_by_id, parse_duration, remove_end, urlencode_postdata, urljoin, ) from .common import InfoExtracto...
extractor
khanacademy
from __future__ import unicode_literals import json from ..utils import int_or_none, parse_iso8601, try_get from .common import InfoExtractor class KhanAcademyBaseIE(InfoExtractor): _VALID_URL_TEMPL = ( r"https?://(?:www\.)?khanacademy\.org/(?P<id>(?:[^/]+/){%s}%s[^?#/&]+)" ) def _parse_video(s...
tasks
exporter
from typing import Optional from posthog.celery import app from posthog.models import ExportedAsset from prometheus_client import Counter, Histogram EXPORT_QUEUED_COUNTER = Counter( "exporter_task_queued", "An export task was queued", labelnames=["type"], ) EXPORT_SUCCEEDED_COUNTER = Counter( "exporte...
builtinViews
fittingView
# ============================================================================= # 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 ...
engines
digg
# SPDX-License-Identifier: AGPL-3.0-or-later """ Digg (News, Social media) """ # pylint: disable=missing-function-docstring from datetime import datetime from urllib.parse import urlencode from lxml import html from searx.utils import eval_xpath, extract_text # about about = { "website": "https://digg.com", ...
community
gigachannel_community
import time import uuid from binascii import unhexlify from collections import defaultdict from dataclasses import dataclass from random import sample from anyio import Event, create_task_group, move_on_after from ipv8.types import Peer from pony.orm import db_session from tribler.core import notifications from trible...
blueprints
json_blueprint
# -*- coding: utf-8 -*- import os import flask from flask.json import jsonify from pyload.core.api import Role from pyload.core.utils import format from ..helpers import ( get_permission, login_required, permlist, render_template, set_permission, ) bp = flask.Blueprint("json", __name__) @bp.ro...
migrations
0023_alter_tag_options_alter_bmi_tags_and_more
# Generated by Django 4.0.3 on 2022-04-16 21:56 import core.models from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("core", "0022_alter_default_date_and_time"), ] operations = [ migrations.AlterModelOptions( name="tag", opt...
engrave
custom
# 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 ...
Test
TestThreadPool
import threading import time import gevent import pytest from util import ThreadPool class TestThreadPool: def testExecutionOrder(self): with ThreadPool.ThreadPool(4) as pool: events = [] @pool.wrap def blocker(): events.append("S") out...
extractor
karrierevideos
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_urlparse from ..utils import fix_xml_ampersands, float_or_none, xpath_text, xpath_with_ns from .common import InfoExtractor class KarriereVideosIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?karrierevideos\.at(?:/[^/]+)+/(?...
saveddata
module
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, ...
utils
docutils
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Utilities used for the documentation and built-in help.""" import collections import enum import inspect import os.path import re import sys from typing import Any, Callable, List, MutableMa...
ee
settings
""" Django settings for PostHog Enterprise Edition. """ import os from typing import Dict, List from posthog.settings import AUTHENTICATION_BACKENDS, DEBUG, DEMO, SITE_URL from posthog.settings.utils import get_from_env from posthog.utils import str_to_bool # Zapier REST hooks HOOK_EVENTS: Dict[str, str] = { # "e...
draftobjects
bezcurve
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
clickhouse
log_entries
from posthog.clickhouse.kafka_engine import KAFKA_COLUMNS, kafka_engine, ttl_period from posthog.clickhouse.table_engines import ReplacingMergeTree from posthog.kafka_client.topics import KAFKA_LOG_ENTRIES from posthog.settings import CLICKHOUSE_CLUSTER, CLICKHOUSE_DATABASE LOG_ENTRIES_TABLE = "log_entries" LOG_ENTRIE...
controllers
editor_bezier
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2021 by Ihor E. Novikov # Copyright (C) 2020 by Michael Schorcht # # 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 Lic...
commands
reindex_from_remote_cluster
"""Reindex Elasticsearch data from remote cluster. Creates the Elasticsearch 6.x indexes based on the configuration and reindexes the data from earlier AM versions from a remote cluster using the 1.x version. This task deletes the "aips", "aipfiles", "transfers" and "transferfiles" indexes by default before recreating...