section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
PyObjCTest | test_cvreturn | from PyObjCTools.TestSupport import *
from Quartz import *
class TestCVReturn(TestCase):
def testConstants(self):
self.assertEqual(kCVReturnSuccess, 0)
self.assertEqual(kCVReturnError, -6660)
self.assertEqual(kCVReturnInvalidArgument, -6661)
self.assertEqual(kCVReturnAllocationFail... |
preferences | toolbar | import json
from gi.repository import Gtk
from sunflower.widgets.settings_page import SettingsPage
class Column:
NAME = 0
DESCRIPTION = 1
TYPE = 2
ICON = 3
CONFIG = 4
class ToolbarOptions(SettingsPage):
"""Toolbar options extension class"""
def __init__(self, parent, application):
... |
Sidebar | ZipStream | import io
import os
import zipfile
class ZipStream(object):
def __init__(self, dir_path):
self.dir_path = dir_path
self.pos = 0
self.buff_pos = 0
self.zf = zipfile.ZipFile(self, "w", zipfile.ZIP_DEFLATED, allowZip64=True)
self.buff = io.BytesIO()
self.file_list = se... |
replaygain | replaygainprefs | # 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... |
views | organizations | from apps.auth_token.auth import ApiTokenAuthentication
from apps.public_api.serializers import OrganizationSerializer
from apps.public_api.throttlers.user_throttle import UserThrottle
from apps.user_management.models import Organization
from common.api_helpers.mixins import RateLimitHeadersMixin
from common.api_helper... |
sessions | manager | # 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
... |
scripts | effectUsedBy | #!/usr/bin/env python3
# ======================================================================
# Copyright (C) 2010 Anton Vorobyov
#
# 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 Softw... |
canto-next | feed | # -*- coding: utf-8 -*-
# Canto - RSS reader backend
# 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 json
import ... |
ext | beaker_cache | """Provide a :class:`.CacheImpl` for the Beaker caching system."""
from mako import exceptions
from mako.cache import CacheImpl
try:
from beaker import cache as beaker_cache
except:
has_beaker = False
else:
has_beaker = True
_beaker_cache = None
class BeakerCacheImpl(CacheImpl):
"""A :class:`.Cach... |
gui | userconfig | # This file is part of MyPaint.
# -*- coding: utf-8 -*-
# Copyright (C) 2007-2013 by Martin Renold <martinxyz@gmx.ch>
# Copyright (C) 2013-2019 by the MyPaint Development Team.
#
# 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... |
gui | code_executor | import binascii
import logging
import os
import sys
import traceback
from base64 import b64decode, b64encode
from code import InteractiveConsole
from pathlib import Path
from PyQt5.QtNetwork import QTcpServer
from tribler.gui.utilities import connect, take_screenshot
class CodeExecutor:
"""
This class is res... |
transports | xhr | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
"""
sockjs.tornado.transports.xhr
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xhr-Polling transport implementation
"""
import logging
from octoprint.vendor.sockjs.tornado import proto
from octoprint.vendor.sockjs... |
gui | shipBrowser | # noinspection PyPackageRequirements
import gui.globalEvents as GE
import gui.mainFrame
import wx
from gui.builtinShipBrowser.categoryItem import CategoryItem
from gui.builtinShipBrowser.events import (
EVT_SB_IMPORT_SEL,
EVT_SB_SEARCH_SEL,
EVT_SB_STAGE1_SEL,
EVT_SB_STAGE2_SEL,
EVT_SB_STAGE3_SEL,
)
... |
engines | fdroid | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
F-Droid (a repository of FOSS applications for Android)
"""
from urllib.parse import urlencode
from lxml import html
from searx.utils import extract_text
# about
about = {
"website": "https://f-droid.org/",
"wikidata_id": "Q1386210",
"official_api_documen... |
builtinContextMenus | graphDmgDroneMode | from collections import OrderedDict
import gui.globalEvents as GE
import gui.mainFrame
import wx
from gui.contextMenu import ContextMenuUnconditional
from service.const import GraphDpsDroneMode
from service.settings import GraphSettings
# noinspection PyPackageRequirements
_t = wx.GetTranslation
class GraphDmgDron... |
zvonok | status_callback | import logging
from typing import Optional
from apps.alerts.constants import ActionSource
from apps.alerts.signals import user_notification_action_triggered_signal
from apps.base.utils import live_settings
from apps.zvonok.models.phone_call import ZvonokCallStatuses, ZvonokPhoneCall
logger = logging.getLogger(__name_... |
Gui | AxisMap | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2018 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
charmap | widget | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... |
downloaders | NoPremiumPl | # -*- coding: utf-8 -*-
import json
from ..base.multi_downloader import MultiDownloader
class NoPremiumPl(MultiDownloader):
__name__ = "NoPremiumPl"
__type__ = "downloader"
__version__ = "0.13"
__status__ = "testing"
__pattern__ = r"https?://direct\.nopremium\.pl.+"
__config__ = [
("... |
chardet | charsetprober | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
serializer | manager | """
raven.utils.serializer.manager
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import logging
from contextlib import closing
from raven.utils.compat import text_type
... |
versions | 015_6d8ffebcaf54_remove_state_object | # encoding: utf-8
"""015 Remove state_object
Revision ID: 6d8ffebcaf54
Revises: 93519b684820
Create Date: 2018-09-04 18:48:53.302758
"""
import sqlalchemy as sa
from alembic import op
from ckan.migration import skip_based_on_legacy_engine_version
# revision identifiers, used by Alembic.
revision = "6d8ffebcaf54"
dow... |
beetsplug | aura | # This file is part of beets.
# Copyright 2020, Callum Brown.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, mo... |
service | market | # ===============================================================================
# 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, eithe... |
femtools | geomtools | # ***************************************************************************
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
extractor | bfmtv | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import extract_attributes
from .common import InfoExtractor
class BFMTVBaseIE(InfoExtractor):
_VALID_URL_BASE = r"https?://(?:www\.)?bfmtv\.com/"
_VALID_URL_TMPL = (
_VALID_URL_BASE + r"(?:[^/]+/)*[^/?&#]+_%s[A-Z]-(?P<id>... |
femexamples | ccx_cantilever_ele_quad8 | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
Points | InitGui | # ***************************************************************************
# * Copyright (c) 2002,2003 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
extractor | cnbc | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import smuggle_url
from .common import InfoExtractor
class CNBCIE(InfoExtractor):
_VALID_URL = r"https?://video\.cnbc\.com/gallery/\?video=(?P<id>[0-9]+)"
_TEST = {
"url": "http://video.cnbc.com/gallery/?video=3000503714"... |
femmesh | femmesh2mesh | # ***************************************************************************
# * *
# * Copyright (c) 2016 Frantisek Loeffelmann <LoffF@email.cz> *
# * *
# * Th... |
browser | qtnetworkdownloads | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Download manager."""
import dataclasses
import functools
import io
import os.path
import shutil
from typing import IO, Dict, Optional
from qutebrowser.browser import downloads
from qutebrow... |
PathTests | TestRefactoredCentroidPost | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2022 sliptonic <shopinthewoods@gmail.com> *
# * Copyright (c) 2022 Larry Woestman <LarryWoestman2@gmail.com> *
# * ... |
frescobaldi-app | panelmanager | # 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
... |
editing | titlecase | # Copyright 2010-14 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 gi.repository import Gtk
from ... |
browser | addrelease | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2021-2022 Laurent Monin
# Copyright (C) 2021-2023 Philipp Wolfer
# Copyright (C) 2022 Bob Swift
# Copyright (C) 2022 jesus2099
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the... |
conversion | oeboutput | from __future__ import with_statement
__license__ = "GPL 3"
__copyright__ = "2009, Kovid Goyal <kovid@kovidgoyal.net>"
__docformat__ = "restructuredtext en"
import os
import re
from calibre import CurrentDir
class OEBOutput:
name = "OEB Output"
author = "Kovid Goyal"
file_type = "oeb"
def convert(... |
Test | TestPythonSyntax | # ***************************************************************************
# * Copyright (c) 2018 looooo <sppedflyer@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
mixins | common | import datetime
import json
import re
from math import ceil
from typing import Any, Dict, List, Literal, Optional, Union, cast
from zoneinfo import ZoneInfo
from dateutil.relativedelta import relativedelta
from django.utils import timezone
from posthog.constants import (
ACTIONS,
BREAKDOWN,
BREAKDOWN_ATTRI... |
Gui | DogboneII | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2022 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
Code | Routes | import datetime
import os.path
import random
from Code import Partida, TrListas, Util
class Reg:
pass
PLAYING, BETWEEN, ENDING, ENDED = range(4)
KM_TACTIC = 5
C_MILES = 1.609344
def km_mi(km, is_miles):
return (
"%0.0f %s" % (float(km) / C_MILES, _("mi"))
if is_miles
else "%d %s" ... |
commands | start_celery | import os
import shlex
import subprocess
from common.utils import getenv_boolean
from django.core.management.base import BaseCommand
from django.utils import autoreload
WORKER_ID = 0
def restart_celery(*args, **kwargs):
global WORKER_ID
kill_worker_cmd = "celery -A engine control shutdown"
subprocess.ca... |
tasks | alert_group_web_title_cache | from apps.alerts.incident_appearance.templaters import TemplateLoader
from apps.alerts.tasks.task_logger import task_logger
from common.custom_celery_tasks import shared_dedicated_queue_retry_task
from common.jinja_templater import apply_jinja_template
from django.db.models import Min
# BATCH_SIZE is how many alert gr... |
femexamples | ccx_buckling_flexuralbuckling | # ***************************************************************************
# * Copyright (c) 2021 Tobias Vaara <t@vaara.se> *
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
PreviewStage | PreviewStage | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os.path
from typing import TYPE_CHECKING, Optional
from cura.Stages.CuraStage import CuraStage
from UM.Qt.QtApplication import QtApplication
if TYPE_CHECKING:
from UM.View.View import View
class PreviewStage(... |
migrations | 0219_migrate_tags_v2 | # Generated by Django 3.2.5 on 2022-03-01 23:41
from typing import Any, List, Tuple
from django.core.paginator import Paginator
from django.db import migrations
from django.db.models import Q
from posthog.models.tag import tagify
def forwards(apps, schema_editor):
import structlog
logger = structlog.get_log... |
scenarios | manual_incident | import json
import typing
from uuid import uuid4
from apps.alerts.models import AlertReceiveChannel, ChannelFilter
from apps.slack.constants import DIVIDER
from apps.slack.errors import SlackAPIChannelNotFoundError
from apps.slack.scenarios import scenario_step
from apps.slack.types import (
Block,
BlockAction... |
plugins | oneplusone | """
$description Ukrainian live TV channels from 1 + 1 Media group, including 1 + 1, 2 + 2, PLUSPLUS, TET and UNIAN.
$url 1plus1.video
$type live
"""
import logging
import re
from base64 import b64decode
from time import time
from urllib.parse import urljoin, urlparse
from streamlink.exceptions import NoStreamsError,... |
models | comment_tree | # 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, ... |
shift-swaps | slack_followups | import datetime
from apps.schedules.models import ShiftSwapRequest
from apps.slack.scenarios.shift_swap_requests import ShiftSwapRequestFollowUp
from celery.utils.log import get_task_logger
from common.custom_celery_tasks import shared_dedicated_queue_retry_task
from django.conf import settings
from django.core.cache ... |
forum | actions | from __future__ import annotations
from typing import cast
from abilian.i18n import _l
from abilian.services import get_service
from abilian.services.security import Admin, SecurityService
from abilian.web.action import Action, FAIcon, ModalActionMixin, actions
from flask import g, request, url_for
from flask.bluepri... |
Code | TabVisual | import copy
import time
from Code import TrListas, Util, VarGen
from Code.QT import TabTipos
class PFlecha(TabTipos.Flecha):
def __init__(self):
TabTipos.Flecha.__init__(self)
self.nombre = ""
self.id = None
class PMarco(TabTipos.Marco):
def __init__(self):
TabTipos.Marco.__... |
Start | InitGui | # ***************************************************************************
# * Copyright (c) 2002,2003 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
PackageManager | setup | """
Script for building the example.
Usage:
python setup.py py2app
"""
import glob
import os
import sys
# This is very likely incorrect, as the application is non-existant at the
# moment.
from distutils.core import setup
import py2app
DB_FILE_TYPE = "Python Package Database"
plist = dict(
CFBundleName="Pa... |
chardet | jpcntx | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
converter | block_tree | # Copyright 2016 Free Software Foundation, Inc.
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
"""
Converter for legacy block tree definitions in XML format
"""
from ..core.io import yaml
from . import xml
def from_xml(filename):
"""Load block tree description from xml file"""
... |
alarmclock | acprefs | # Copyright (C) 2006 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 1, or (at your option)
# any later version.
#
# This program is distributed in the hope that it w... |
core | taskManager | import logging
from enum import Enum
from threading import Thread
import meshroom
import meshroom.core.graph
from meshroom.common import BaseObject, DictModel, Property, Signal, Slot
from meshroom.core.node import Status
class State(Enum):
"""
State of the Thread that is computing nodes
"""
IDLE = 0... |
src | UserAttrib | from Events import Event
from utils import *
class UserAttrib(object):
"""The idea/plan for this attrib type is:
Use it in the GUI and display it nicely. Store every GUI related info here.
I.e. this should say whether it is read-only to the user (if not visible to user at all ->
don't use this class)... |
modes | eventview | #
# Copyright (C) 2011 Nick Lanham <nick@afternight.org>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import deluge.com... |
analog | qa_pll_refout | #!/usr/bin/env python
#
# Copyright 2004,2010,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
from gnuradio import analog, blocks, gr, gr_unittest
class test_pll_refout(gr_unittest.TestCase):
def setUp(self):
self... |
versions | 005_12c2232c15f5_add_authorization_tables | # encoding: utf-8
"""005 Add authorization tables
Revision ID: 12c2232c15f5
Revises: f92ee205e46d
Create Date: 2018-09-04 17:34:59.667587
"""
import sqlalchemy as sa
from alembic import op
from ckan.migration import skip_based_on_legacy_engine_version
# revision identifiers, used by Alembic.
revision = "12c2232c15f5... |
linux | log_dbus | import ctypes.util
import logging
import os
from contextlib import contextmanager
from plover import __name__ as __software_name__
from plover import log
from plover.oslayer.config import ASSETS_DIR
APPNAME = ctypes.c_char_p(__software_name__.capitalize().encode())
APPICON = ctypes.c_char_p(os.path.join(ASSETS_DIR, "... |
daw | filedragdrop | import os
from sglib import constants
from sglib.lib import util
from sgui import shared as glbl_shared
from sgui import widgets
from sgui.daw import shared
from sgui.sgqt import *
from sgui.widgets import FileDragDropListWidget
class FileDragDropper(widgets.AbstractFileBrowserWidget):
def __init__(
self... |
models | async_migration | from typing import List
from django.db import models
# an enum, essentially
class MigrationStatus:
NotStarted = 0
Running = 1
CompletedSuccessfully = 2
Errored = 3
RolledBack = 4
Starting = 5 # only relevant for the UI
FailedAtStartup = 6
class AsyncMigrationError(models.Model):
id... |
extractor | sport5 | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import ExtractorError
from .common import InfoExtractor
class Sport5IE(InfoExtractor):
_VALID_URL = r"https?://(?:www|vod)?\.sport5\.co\.il/.*\b(?:Vi|docID)=(?P<id>\d+)"
_TESTS = [
{
"url": "http://vod.sport5.... |
blocks | qa_repeat | #!/usr/bin/env python
#
# Copyright 2008,2010,2012,2013 Free Software Foundation, Inc.
# Copyright 2023 Daniel Estevez <daniel@destevez.net>
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import time
import numpy as np
import pmt
from gnuradio import blocks, gr, gr_unittest, pdu
... |
docs | conf | import os.path
# Simulate import of the "supysonic" package
supy_module_path = os.path.join(
os.path.dirname(__file__), "..", "supysonic", "__init__.py"
)
with open(supy_module_path, "rt", encoding="utf-8") as f:
supysonic = type("", (), {})()
exec(f.read(), supysonic.__dict__)
# -- Project information -... |
Spreadsheet | importXLSX | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2016 Ulrich Brammer <ulrich1a@users.sourceforge.net> *
# * *
# * This program is free software; yo... |
frescobaldi-app | inputdialog | # 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 | animeondemand | from __future__ import unicode_literals
import re
from ..compat import compat_str
from ..utils import (
ExtractorError,
determine_ext,
extract_attributes,
url_or_none,
urlencode_postdata,
urljoin,
)
from .common import InfoExtractor
class AnimeOnDemandIE(InfoExtractor):
_VALID_URL = r"ht... |
components | csvData | import csv
import logging
import os
from meshroom.common.qt import QObjectListModel
from PySide2.QtCharts import QtCharts
from PySide2.QtCore import Property, QObject, Signal, Slot
class CsvData(QObject):
"""Store data from a CSV file."""
def __init__(self, parent=None):
"""Initialize the object wit... |
QT | PantallaSTS | import os
import shutil
import time
from Code import STS, ControlPosicion, Util, VarGen
from Code.QT import (
Colocacion,
Columnas,
Controles,
FormLayout,
Grid,
Iconos,
PantallaMotores,
QTUtil,
QTUtil2,
QTVarios,
Tablero,
)
from PyQt4 import QtCore, QtGui
class WRun(QTVari... |
migrations | 0128_stricter_team_schema | # Generated by Django 3.0.6 on 2021-02-09 09:11
import django.core.validators
import django.db.models.deletion
import posthog.models.utils
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0127_stricter_team_data"),
]
operations = [
... |
vocoder | qa_ulaw_vocoder | #!/usr/bin/env python
#
# Copyright 2011,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from gnuradio import blocks, gr, gr_unittest, vocoder
class test_ulaw_vocoder(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block()... |
friture | spectrogram_image | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009 Timothée Lecomte
# This file is part of Friture.
#
# Friture is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# Friture is distri... |
downloaders | YibaishiwuCom | # -*- coding: utf-8 -*-
import json
import re
import urllib.parse
from ..base.simple_downloader import SimpleDownloader
class YibaishiwuCom(SimpleDownloader):
__name__ = "YibaishiwuCom"
__type__ = "downloader"
__version__ = "0.19"
__status__ = "testing"
__pattern__ = r"http://(?:www\.)?(?:u\.)?1... |
backend | tasks | # -*- 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... |
ui | playertoolbar | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2019 Timur Enikeev
# Copyright (C) 2019-2022 Laurent Monin
# Copyright (C) 2019-2023 Philipp Wolfer
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... |
baseclass | login | # pylint: disable=no-member, too-many-arguments, too-few-public-methods
# pylint: disable=no-name-in-module, unused-argument, arguments-differ
"""
Login screen appears when the App is first time starts and when new Address is generated.
"""
from kivy.app import App
from kivy.clock import Clock
from kivy.properties i... |
fta | notgate | """NOT gate 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 import r... |
utils | config | from __future__ import with_statement
__license__ = "GPL v3"
__copyright__ = "2008, Kovid Goyal kovid@kovidgoyal.net"
__docformat__ = "restructuredtext en"
"""
Manage application-wide preferences.
"""
import base64
import datetime
import json
import os
import plistlib
from copy import deepcopy
from optparse import In... |
TLayer | TLayerView | import objc
from Circle import Circle
from Cocoa import *
from Extras import makeRandomPointInRect
from Quartz import *
gCircleCount = 3
class NSEvent(objc.Category(NSEvent)):
def locationInView_(self, view):
return view.convertPoint_fromView_(self.locationInWindow(), None)
class TLayerView(NSView):
... |
femsolver | report | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
pwidgets | minipalette | # -*- coding: utf-8 -*-
#
# Copyright (C) 2016 by Ihor E. Novikov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... |
plugins | sportschau | """
$description German sports magazine live stream, owned by ARD.
$url sportschau.de
$type live
"""
import logging
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import HLSStream
from streamlink.stream.http import HTTPStream
from st... |
plugins | bilibili | """
$description Chinese video sharing website based in Shanghai, themed around animation, comics, and games (ACG).
$url live.bilibili.com
$type live
"""
import logging
import re
from urllib.parse import urlparse
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from strea... |
nested-json | interpret | from typing import Any, Iterable, Tuple, Type, Union
from .errors import NestedJSONSyntaxError
from .parse import assert_cant_happen, parse
from .tokens import EMPTY_STRING, NestedJSONArray, Path, PathAction, Token, TokenKind
__all__ = [
"interpret_nested_json",
"unwrap_top_level_list_if_needed",
]
JSONType ... |
util | ThreadPool | import queue
import threading
import time
import gevent
import gevent._threading
import gevent.monkey
import gevent.threadpool
class ThreadPool:
def __init__(self, max_size, name=None):
self.setMaxSize(max_size)
if name:
self.name = name
else:
self.name = "ThreadPo... |
extractor | bleacherreport | # coding: utf-8
from __future__ import unicode_literals
from ..utils import ExtractorError, int_or_none, parse_iso8601
from .amp import AMPIE
from .common import InfoExtractor
class BleacherReportIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?bleacherreport\.com/articles/(?P<id>\d+)"
_TESTS = [
... |
extractor | ctsnews | # coding: utf-8
from __future__ import unicode_literals
from ..utils import unified_timestamp
from .common import InfoExtractor
from .youtube import YoutubeIE
class CtsNewsIE(InfoExtractor):
IE_DESC = "華視新聞"
_VALID_URL = r"https?://news\.cts\.com\.tw/[a-z]+/[a-z]+/\d+/(?P<id>\d+)\.html"
_TESTS = [
... |
types | composition_objects | """
[Documentation](https://api.slack.com/reference/block-kit/composition-objects)
"""
import typing
from .common import Style
class _TextBase(typing.TypedDict):
"""
An object containing some text, formatted either as `plain_text` or using `mrkdwn`.
[Documentation](https://api.slack.com/reference/block... |
classes | track | """
@file
@brief This file is for legacy support of OpenShot 1.x project files
@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.org), an open-source pr... |
extractor | gaia | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_str, compat_urllib_parse_unquote
from ..utils import (
ExtractorError,
int_or_none,
str_or_none,
strip_or_none,
try_get,
urlencode_postdata,
)
from .common import InfoExtractor
class GaiaIE(InfoExtr... |
Gui | Engrave | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
views | home | # encoding: utf-8
from __future__ import annotations
from typing import Any, List, Optional, Tuple
from urllib.parse import urlencode
import ckan.lib.base as base
import ckan.lib.helpers as h
import ckan.lib.search as search
import ckan.logic as logic
from ckan.common import _, config, current_user, g
from ckan.type... |
panel | collection | # 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... |
extractor | hidive | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_str
from ..utils import ExtractorError, int_or_none, url_or_none, urlencode_postdata
from .common import InfoExtractor
class HiDiveIE(InfoExtractor):
_VALID_URL = (
r"https?://(?:www\.)?hidive\.com/stream/(?P<t... |
modeling | collection | """1:n and n:m relations in the data model are saved using a collection."""
from __future__ import annotations
import contextlib
from typing import Generic, Sequence, Type, TypeVar, overload
from gaphor.core.modeling.event import AssociationUpdated
T = TypeVar("T")
class collection(Generic[T]):
"""Collection ... |
Test | TestDiff | import io
from util import Diff
class TestDiff:
def testDiff(self):
assert Diff.diff([], ["one", "two", "three"]) == [
("+", ["one", "two", "three"])
]
assert Diff.diff(
["one", "two", "three"], ["one", "two", "three", "four", "five"]
) == [("=", 11), ("+"... |
Test | testPathArraySel | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2013 WandererFan <wandererfan@gmail.com> *
# * *
# * This file is part of the FreeCAD C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.