section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
components | scrollcommands | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Scrolling-related commands."""
from typing import Callable, Dict
from qutebrowser.api import apitypes, cmdutils
@cmdutils.register()
@cmdutils.argument("tab", value=cmdutils.Value.cur_tab... |
util | QueryJson | import json
import os
import re
def queryFile(file_path, filter_path, filter_key=None, filter_val=None):
back = []
data = json.load(open(file_path))
if filter_path == [""]:
return [data]
for key in filter_path: # Get to the point
data = data.get(key)
if not data:
r... |
managers | captcha_manager | # -*- coding: utf-8 -*-
import time
from threading import Lock
from ..utils.struct.lock import lock
class CaptchaManager:
def __init__(self, core):
self.lock = Lock()
self.pyload = core
self._ = core._
self.tasks = [] #: Task store, for outgoing tasks only
self.ids = 0 ... |
sabnzbd | sorting | #!/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... |
cd | _cdguipanel | # Copyright (C) 2009-2010 Aren Olson
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... |
gstbe | prefs | # Copyright 2004-2011 Joe Wreschnig, Michael Urman, Steven Robertson,
# 2011-2014 Christoph Reiter
# 2020-2022 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;... |
autocomplete | util | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2011 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... |
frescobaldi-app | appinfo | # 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
... |
web | http | """
HTTP Utilities
(from web.py)
"""
__all__ = [
"expires",
"lastmodified",
"prefixurl",
"modified",
"changequery",
"url",
"profiler",
]
import os
import sys
import threading
import urllib
import urlparse
try:
import datetime
except ImportError:
pass
import net
import utils
impor... |
views | blender_listview | """
@file
@brief This file contains the blender file listview, used by the 3d animated titles screen
@author Jonathan Thomas <jonathan@openshot.org>
@section LICENSE
Copyright (c) 2008-2018 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Editor (http://www.openshot.o... |
commands | remove_remote_user_preview_images | """ Remove preview images for remote users """
from bookwyrm import models, preview_images
from django.core.management.base import BaseCommand
from django.db.models import Q
# pylint: disable=line-too-long
class Command(BaseCommand):
"""Remove preview images for remote users"""
help = "Remove preview images ... |
src | sk1_launcher | #!/usr/bin/env python2
#
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013-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 y... |
migrations | 0025_auto_20201217_0046 | # Generated by Django 3.0.7 on 2020-12-17 00:46
import bookwyrm.models.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0024_merge_20201216_1721"),
]
operations = [
migrations.AlterField(
model_name="author",
... |
femviewprovider | view_constraint_sectionprint | # ***************************************************************************
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
invesalius3 | app | #!/usr/bin/env python3
# --------------------------------------------------------------------------
# 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... |
extractor | imggaming | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from ..compat import compat_HTTPError
from ..utils import ExtractorError, int_or_none, str_or_none, try_get
from .common import InfoExtractor
class ImgGamingBaseIE(InfoExtractor):
_API_BASE = "https://dce-frontoffice.imggaming.com/api... |
matrix | matrix | import datetime as dt
from abc import ABC, abstractmethod
from collections import defaultdict, deque
from typing import Any, DefaultDict, Deque, Dict, List, Optional, Set, Type
import mimesis
import mimesis.random
from django.conf import settings
from django.utils import timezone
from posthog.constants import GROUP_TY... |
PyObjCTest | test_cgdataconsumer | import os
import Quartz
from Foundation import NSMutableData
from PyObjCTools.TestSupport import *
from Quartz import *
try:
long
except NameError:
long = int
class TestCGDataConsumer(TestCase):
def testTypes(self):
self.assertIsCFType(CGDataConsumerRef)
def testFunctions(self):
sel... |
service | server | import http.server
import json
import socket
import socketserver
import threading
import traceback
import urllib.parse
from logbook import Logger
from service.esiAccess import APIException, GenericSsoError
pyfalog = Logger(__name__)
# https://github.com/fuzzysteve/CREST-Market-Downloader/
class AuthHandler(http.ser... |
Gui | CircularHoleBase | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
data-decoders | tf_example_decoder | # 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... |
migrations | 0052_correct_extract_packages_fallback_link | """Migration to ensure that if extract contents from compressed archives
fails that the workflow doesn't continue to trudge along to completion where
there is a likelihood of other errors.
"""
from django.db import migrations
def data_migration_down(apps, schema_editor):
"""Reset the two fields in the Dashboard d... |
example-idatasetform | plugin_v1 | # encoding: utf-8
from __future__ import annotations
import ckan.plugins as p
import ckan.plugins.toolkit as tk
from ckan.types import Schema
class ExampleIDatasetFormPlugin(tk.DefaultDatasetForm, p.SingletonPlugin):
p.implements(p.IDatasetForm)
def create_package_schema(self) -> Schema:
# let's gra... |
backend | maintenance | # -*- 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... |
parts | statusbar | # -*- 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... |
builtinContextMenus | graphFitAmmoPicker | # noinspection PyPackageRequirements
import gui.mainFrame
import wx
from gui.auxWindow import AuxiliaryDialog
from gui.contextMenu import ContextMenuSingle
from service.ammo import Ammo
from service.market import Market
_t = wx.GetTranslation
class GraphFitAmmoPicker(ContextMenuSingle):
def __init__(self):
... |
bitmessageqt | account | # pylint: disable=too-many-instance-attributes,attribute-defined-outside-init
"""
account.py
==========
Account related functions.
"""
from __future__ import absolute_import
import inspect
import re
import sys
import time
import queues
from addresses import decodeAddress
from bmconfigparser import config
from help... |
threads | addon_thread | # -*- coding: utf-8 -*-
from copy import copy
from .plugin_thread import PluginThread
class AddonThread(PluginThread):
"""
thread for addons.
"""
# ----------------------------------------------------------------------
def __init__(self, manager, function, args, kwargs):
"""
Con... |
femobjects | element_geometry1D | # ***************************************************************************
# * Copyright (c) 2015 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
controllers | toolbar | # The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, ... |
engines | xpath | # SPDX-License-Identifier: AGPL-3.0-or-later
from urllib.parse import urlencode
from lxml import html
from searx.utils import eval_xpath, eval_xpath_list, extract_text, extract_url
search_url = None
lang_all = "en"
url_xpath = None
content_xpath = None
title_xpath = None
thumbnail_xpath = False
paging = False
sugges... |
migrations | 0009_settings_timezone | # Generated by Django 3.0.3 on 2020-02-14 17:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("babybuddy", "0008_auto_20200120_0622"),
]
operations = [
migrations.AddField(
model_name="settings",
name="timezone",... |
extractor | netzkino | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import clean_html, int_or_none, js_to_json, parse_iso8601
from .common import InfoExtractor
class NetzkinoIE(InfoExtractor):
_VALID_URL = (
r"https?://(?:www\.)?netzkino\.de/\#!/(?P<category>[^/]+)/(?P<id>[^/]+)"
)
_... |
ui | ui_infostatus | # -*- 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_InfoStatus(object):
def setupUi(self, InfoStatus):
InfoStatus.setObjectName("InfoStatus")
InfoStatus.resize(683, 145)
sizePo... |
OpenSCAD | TestOpenSCADGui | # ***************************************************************************
# * Copyright (c) 2021 Chris Hennes <chennes@pioneerlibrarysystem.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
PyObjCTest | test_cgimagesource | import Quartz
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
try:
long
except NameError:
long = int
class TestCGImageSource(TestCase):
def testConstants(self):
self.assertEqual(Quartz.kCGImageStatusUnexpectedEOF, -5)
self.assertEqual(Quartz.kCG... |
extractor | vyborymos | # coding: utf-8
from __future__ import unicode_literals
from ..compat import compat_str
from .common import InfoExtractor
class VyboryMosIE(InfoExtractor):
_VALID_URL = r"https?://vybory\.mos\.ru/(?:#precinct/|account/channels\?.*?\bstation_id=)(?P<id>\d+)"
_TESTS = [
{
"url": "http://vyb... |
markovify | splitters | # -*- coding: utf-8 -*-
# markovify
# Copyright (c) 2015, Jeremy Singer-Vine
# Origin: https://github.com/jsvine/markovify
# MIT License: https://github.com/jsvine/markovify/blob/master/LICENSE.txt
import re
ascii_lowercase = "abcdefghijklmnopqrstuvwxyz"
ascii_uppercase = ascii_lowercase.upper()
# States w/ with tha... |
i18n | qtranslator | # 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
... |
transfer | views | # This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the ... |
migrations | 0067_delete_workflow_models | import django_extensions.db.fields
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("main", "0066_archivesspace_base_url")]
operations = [
migrations.RemoveField(model_name="microservicechain", name="replaces"),
migrations.RemoveField(model_name="micros... |
core | target_assigner | # 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... |
category-filter | category | """
Category.
Author(s): Yuan Yuan, Jelle Roozenburg
"""
import logging
import re
from functools import cmp_to_key
from tribler.core.components.metadata_store.category_filter.family_filter import (
default_xxx_filter,
)
from tribler.core.components.metadata_store.category_filter.init_category import (
getCat... |
PartDesignTests | TestRevolve | # ***************************************************************************
# * Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.net> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
extractor | ir90tv | # coding: utf-8
from __future__ import unicode_literals
from ..utils import remove_start
from .common import InfoExtractor
class Ir90TvIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?90tv\.ir/video/(?P<id>[0-9]+)/.*"
_TESTS = [
{
"url": "http://90tv.ir/video/95719/%D8%B4%D8%A7%DB%8C%... |
frescobaldi-app | resultfiles | # 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
... |
ctrlport | RPCConnectionThrift | #!/usr/bin/env python
#
# Copyright 2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
import pmt
from gnuradio import gr
from gnuradio.ctrlport import RPCConnection
from gnuradio.ctrlport.GNURadio import ControlPort
from thrift import T... |
api | sentry_stats | from datetime import datetime, timedelta
from typing import Any, Dict, List, Optional, Tuple, Union
import requests
from django.http import HttpRequest, JsonResponse
from posthog.models.instance_setting import get_instance_settings
from rest_framework.decorators import api_view
from rest_framework.exceptions import Va... |
Marketplace | MissingPackageList | # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import TYPE_CHECKING, Dict, List, Optional
from PyQt6.QtCore import QCoreApplication, QObject, pyqtProperty, pyqtSignal
from UM.i18n import i18nCatalog
from UM.TaskManagement.HttpRequestManager import (
H... |
graphs | sleep_pattern | # -*- coding: utf-8 -*-
from collections import OrderedDict
from datetime import timedelta
import plotly.graph_objs as go
import plotly.offline as plotly
from core.utils import duration_string
from django.utils import formats, timezone
from django.utils.translation import gettext as _
from reports import utils
ASLEEP... |
downloaders | HotlinkCc | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
class HotlinkCc(SimpleDownloader):
__name__ = "HotlinkCc"
__type__ = "downloader"
__version__ = "0.01"
__status__ = "testing"
__pattern__ = r"https?://hotlink\.cc/\w+"
__config__ = [
("enabled", ... |
extractor | box | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from ..utils import determine_ext, parse_iso8601, update_url_query # try_get,
from .common import InfoExtractor
class BoxIE(InfoExtractor):
_VALID_URL = (
r"https?://(?:[^.]+\.)?app\.box\.com/s/(?P<shared_name>[^/]+)/file/(?P... |
qis | setup | import os.path
from setuptools import find_packages, setup
package_dir = "src"
about = {}
with open(os.path.join(package_dir, "imageserver", "__about__.py")) as fp:
exec(fp.read(), about)
setup(
name=about["__tag__"],
version=about["__version__"],
description=about["__title__"] + " - " + about["__su... |
Settings | IntentManager | # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import TYPE_CHECKING, Any, Dict, List, Set, Tuple
import cura.CuraApplication
from cura.Machines.ContainerTree import ContainerTree
from cura.Settings.cura_empty_instance_containers import empty_intent_containe... |
extractor | phoenix | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_str
from ..utils import int_or_none, merge_dicts, try_get, unified_timestamp, urljoin
from .youtube import YoutubeIE
from .zdf import ZDFBaseIE
class PhoenixIE(ZDFBaseIE):
IE_NAME = "phoenix.de"
_VALID_URL = (
... |
config | types | # ruff: noqa: ARG002
from __future__ import annotations
import logging
import re
import socket
from abc import ABC, abstractmethod
from typing import (
TYPE_CHECKING,
Any,
AnyStr,
Callable,
ClassVar,
Generic,
Literal,
Optional,
TypeVar,
Union,
cast,
)
from mopidy.config im... |
transports | eventsource | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
"""
sockjs.tornado.transports.eventsource
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EventSource transport implementation.
"""
from octoprint.vendor.sockjs.tornado.transports import streamingbase
from oc... |
readability | readability | #!/usr/bin/env python
from __future__ import print_function
import logging
import re
import sys
from lxml.etree import tounicode
from lxml.html import document_fromstring, fragment_fromstring
from .cleaners import clean_attributes, html_cleaner
from .compat import bytes_, str_, tostring_
from .debug import describe,... |
userguide | util | # 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
... |
caching | caching_test | import argparse
import tempfile
import unittest
from os import path
from unittest import mock
from beancount.utils import caching
class TestCachingGetFile(unittest.TestCase):
def test_get_file__abs(self):
with tempfile.TemporaryDirectory() as tmpdir:
filename = caching.get_file(path.join(tmpd... |
book | base | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = "GPL v3"
__copyright__ = "2010, Kovid Goyal <kovid@kovidgoyal.net>"
__docformat__ = "restructuredtext en"
import copy
from calibre.ebooks.metadata.book import (
ALL_METADATA_FIELDS,
SC_COPYABLE_FIELDS,
SC_FIELDS_COPY_N... |
resources | rulesets | from migrator import oncall_api_client
from migrator.config import EXPERIMENTAL_MIGRATE_EVENT_RULES_LONG_NAMES
from migrator.utils import find_by_id
def match_ruleset(
ruleset: dict,
oncall_integrations: list[dict],
escalation_policies: list[dict],
services: list[dict],
integrations: list[dict],
)... |
CoreFoundation | _static | import CoreFoundation as _CF
import objc as _objc
#
# 'Emulation' for CFArray contructors
#
def _setup():
NSArray = _objc.lookUpClass("NSArray")
NSMutableArray = _objc.lookUpClass("NSMutableArray")
def CFArrayCreate(allocator, values, numvalues, callbacks):
assert callbacks is None
return... |
gui | attribute_gauge | import math
import wx
from gui.utils import anim_effects
# todo: clean class up. Took from pyfa gauge, has a bunch of extra shit we don't need
class AttributeGauge(wx.Window):
def __init__(
self,
parent,
max_range=100,
animate=True,
leading_edge=True,
edge_on_neut... |
PyObjCTest | test_assocations | import objc
from PyObjCTools.TestSupport import *
NSObject = objc.lookUpClass("NSObject")
class OC_AssocSneakyCopy(NSObject):
def copy(self):
return "<copy!>"
def copyWithZone_(self, zone):
return "<copy!>"
class TestAssocations(TestCase):
@min_os_level("10.6")
def testKeysAreIdent... |
bitmessagekivy | kivy_helper_search | """
Sql queries for bitmessagekivy
"""
from pybitmessage.helper_sql import sqlQuery
def search_sql(
xAddress="toaddress",
account=None,
folder="inbox",
where=None,
what=None,
unreadOnly=False,
start_indx=0,
end_indx=20,
):
# pylint: disable=too-many-arguments, too-many-branches
... |
snippet | tool | # 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
... |
scenarios | onboarding | import logging
import typing
from apps.slack.scenarios import scenario_step
from apps.slack.types import EventPayload, EventType, PayloadType, ScenarioRoute
if typing.TYPE_CHECKING:
from apps.slack.models import SlackTeamIdentity, SlackUserIdentity
logger = logging.getLogger(__name__)
class ImOpenStep(scenario... |
dashboards | dashboard_templates | import json
from pathlib import Path
from typing import Dict
import structlog
from django.db.models import Q
from django.utils.decorators import method_decorator
from django.views.decorators.cache import cache_page
from posthog.api.forbid_destroy_model import ForbidDestroyModel
from posthog.api.routing import Structur... |
coverart | utils | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2013-2015, 2020-2021 Laurent Monin
# Copyright (C) 2017 Sambhav Kothari
# Copyright (C) 2018 Wieland Hoffmann
# Copyright (C) 2019-2021 Philipp Wolfer
#
# This program is free software; you can redistribute it and/or
# modify i... |
xl | devices | # Copyright (C) 2008-2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... |
api-helpers | mixins | import json
import math
import typing
from apps.alerts.incident_appearance.templaters import (
AlertPhoneCallTemplater,
AlertSlackTemplater,
AlertSmsTemplater,
AlertTelegramTemplater,
AlertWebTemplater,
TemplateLoader,
)
from apps.api.permissions import LegacyAccessControlRole
from apps.base.me... |
gigachannel | gigachannel_component | from ipv8.peerdiscovery.network import Network
from tribler.core.components.component import Component
from tribler.core.components.database.database_component import DatabaseComponent
from tribler.core.components.gigachannel.community.gigachannel_community import (
GigaChannelCommunity,
GigaChannelTestnetCommu... |
PDFKitViewer | MyPDFDocument | import objc
from AppKit import *
from PyObjCTools import NibClassBuilder
from Quartz import *
class MyPDFDocument(NibClassBuilder.AutoBaseClass):
_outline = objc.ivar()
_searchResults = objc.ivar()
def dealloc(self):
NSNotificationCenter.defaultCenter().removeObserver_(self)
self._searchR... |
pdu | qa_pdu_split | #!/usr/bin/env python
#
# Copyright 2021 NTESS LLC.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import time
import pmt
from gnuradio import blocks, gr, gr_unittest, pdu
class qa_pdu_split(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block()
def ... |
parts | doctabs | # -*- coding: utf-8 -*-
#
# Copyright (C) 2018 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.... |
migrations | upgrade46 | """
Migration 46
- Mining crystal changes
"""
CONVERSIONS = {
60276: ( # Simple Asteroid Mining Crystal Type A I
18066, # Veldspar Mining Crystal I
18062, # Scordite Mining Crystal I
18060, # Pyroxeres Mining Crystal I
18058, # Plagioclase Mining Crystal I
),
60281: ( ... |
gui | drawutils | # This file is part of MyPaint.
# Copyright (C) 2014 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 ... |
PyObjCTest | test_ikdevicebrowserview | from PyObjCTools.TestSupport import *
from Quartz import *
class TestIKDeviceBrowserView(TestCase):
@min_os_level("10.6")
def testConstants10_6(self):
self.assertEqual(IKDeviceBrowserViewDisplayModeTable, 0)
self.assertEqual(IKDeviceBrowserViewDisplayModeOutline, 1)
self.assertEqual(IK... |
PyObjCTest | test_cfpreferences | import os
from CoreFoundation import *
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
try:
long
except NameError:
long = int
class TestPreferences(TestCase):
def testGetting(self):
v = CFPreferencesCopyAppValue("Default Window Settings", "com.apple.T... |
deluge-scheduler | gtkui | #
# Copyright (C) 2009 Andrew Resch <andrewresch@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
... |
accounts | OverLoadMe | # -*- coding: utf-8 -*-
import json
from ..base.multi_account import MultiAccount
class OverLoadMe(MultiAccount):
__name__ = "OverLoadMe"
__type__ = "account"
__version__ = "0.13"
__status__ = "testing"
__config__ = [
("mh_mode", "all;listed;unlisted", "Filter downloaders to use", "all"... |
models | organization_resource_access | from django.db import models
from posthog.models.organization import Organization
class OrganizationResourceAccess(models.Model):
class AccessLevel(models.IntegerChoices):
"""Level for which a role or user can edit or view resources"""
CAN_ONLY_VIEW = 21, "Can only view"
CAN_ALWAYS_EDIT =... |
Resources | ControlPanel | """
Copyright 2009-2017 Olivier Belanger
This file is part of SoundGrain.
SoundGrain 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.
Sound... |
migrations | 0029_auto_20201221_2014 | # Generated by Django 3.0.7 on 2020-12-21 20:14
import bookwyrm.models.fields
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0028_remove_book_author_text"),
]
operati... |
Code | GestorCompeticion | from Code import Apertura, Gestor, Jugada, Tutor, VarGen, XMotorRespuesta
from Code.Constantes import *
from Code.QT import QTUtil2
class GestorCompeticion(Gestor.Gestor):
def inicio(self, categoria, nivel, siBlancas, puntos, aplazamiento=None):
self.tipoJuego = kJugNueva
self.liReiniciar = categ... |
httpie | cookies | from http import cookiejar
_LOCALHOST = "localhost"
_LOCALHOST_SUFFIX = ".localhost"
class HTTPieCookiePolicy(cookiejar.DefaultCookiePolicy):
def return_ok_secure(self, cookie, request):
"""Check whether the given cookie is sent to a secure host."""
is_secure_protocol = super().return_ok_secure(... |
webkit | webview | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""The main browser widgets."""
from qutebrowser.browser.webkit import webpage
from qutebrowser.config import config, stylesheet
from qutebrowser.keyinput import modeman
from qutebrowser.qt.cor... |
Messages | NotClusterHostMessage | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import TYPE_CHECKING
from PyQt6.QtCore import QUrl
from PyQt6.QtGui import QDesktopServices
from UM import i18nCatalog
from UM.Message import Message
if TYPE_CHECKING:
from ..UltimakerNetworkedPrinterOutput... |
Test | testmakeWireString | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2013 WandererFan <wandererfan@gmail.com> *
# * *
# * This file is part of the FreeCAD ... |
website | urls | # -*- 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... |
plugins | onecommodity_test | __copyright__ = "Copyright (C) 2014-2016 Martin Blais"
__license__ = "GNU GPLv2"
import unittest
from beancount import loader
class TestOneCommodity(unittest.TestCase):
@loader.load_doc(expect_errors=True)
def test_one_commodity_transaction(self, _, errors, __):
"""
plugin "beancount.plugin... |
builtinStatsViews | priceViewMinimal | # =============================================================================
# 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 ... |
fta | transferout | """Transfer Out item definition."""
from gaphas.geometry import Rectangle
from gaphor.core.modeling import DrawContext
from gaphor.diagram.presentation import (
Classified,
ElementPresentation,
from_package_str,
)
from gaphor.diagram.shapes import Box, IconBox, Text, stroke
from gaphor.diagram.support impo... |
PyObjCTest | test_nstextinputclient | from AppKit import *
from PyObjCTools.TestSupport import *
class TestNSTextInputClientHelper(NSObject):
def insertText_replacementRange_(self, txt, rng):
pass
def doCommandBySelector_(self, sel):
pass
def setMarkedText_selectedRange_replacementRange_(self, txt, rng1, rng2):
pass
... |
extractor | gedidigital | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import determine_ext, int_or_none
from .common import InfoExtractor
class GediDigitalIE(InfoExtractor):
_VALID_URL = r"""(?x)https?://video\.
(?:
(?:
(?:espresso\.)?repubblica
|last... |
PyObjCTest | test_keyvaluecoding | # Tests for PyObjCTools.KeyValueCoding
import operator
import os
from PyObjCTools import KeyValueCoding
from PyObjCTools.TestSupport import *
class TestHelpers(TestCase):
def test_msum(self):
self.assertEqual(KeyValueCoding.msum([1, 1e100, 1, -1e100] * 10000), 20000)
self.assertEqual(KeyValueCodi... |
gpodder | setup | #!/usr/bin/env python3
#
# 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... |
docs | conf | # coding: utf-8
#
# youtube-dl documentation build configuration file, created by
# sphinx-quickstart on Fri Mar 14 21:05:43 2014.
#
# 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.
#
# All co... |
extractor | bellmedia | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
class BellMediaIE(InfoExtractor):
_VALID_URL = r"""(?x)https?://(?:www\.)?
(?P<domain>
(?:
ctv|
tsn|
bnn(?:bloomberg)?|
thecomed... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.