section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
bitmessageqt | bitmessage_icons_rc | # -*- coding: utf-8 -*-
# Resource object code
#
# Created: Sa 21. Sep 13:45:58 2013
# by: The Resource Compiler for PyQt (Qt v4.8.4)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x03\x66\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x... |
migrations | 0300_add_constraints_to_person_override | # Generated by Django 3.2.16 on 2023-02-02 14:32
import django.db.models.expressions
from django.db import migrations, models
# NOTE: I've moved these here to make sure that the migration is self-contained
# such that the state of the database is predictable.
#
# This function checks two things:
# 1. A new override_p... |
chardet | mbcharsetprober | ######################## 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... |
downloaders | GigapetaCom | # -*- coding: utf-8 -*-
import random
from ..base.simple_downloader import SimpleDownloader
class GigapetaCom(SimpleDownloader):
__name__ = "GigapetaCom"
__type__ = "downloader"
__version__ = "0.09"
__status__ = "testing"
__pattern__ = r"http://(?:www\.)?gigapeta\.com/dl/\w+"
__config__ = [... |
script | update_user_agents | #!/usr/bin/env python
import argparse
import re
import sys
from os import getenv
from pathlib import Path
from typing import Any, Mapping, Sequence, Union
import requests
ROOT = Path(__file__).parents[1].resolve()
MAPPING: Mapping[str, Sequence[Union[str, int]]] = {
"ANDROID": ("android", "standard", "sample_us... |
views | updates | """ endpoints for getting updates about activity """
from bookwyrm import activitystreams
from django.contrib.auth.decorators import login_required
from django.http import Http404, JsonResponse
from django.utils.translation import ngettext
@login_required
def get_notification_count(request):
"""any notifications ... |
core | check_os | import logging
import os
import sys
import tempfile
import time
import traceback
import psutil
from tribler.core.utilities.utilities import show_system_popup
logger = logging.getLogger(__name__)
def error_and_exit(title, main_text):
"""
Show a pop-up window and sys.exit() out of Python.
:param title: t... |
extractor | viidea | from __future__ import unicode_literals
import re
from ..compat import compat_HTTPError, compat_str, compat_urlparse
from ..utils import ExtractorError, js_to_json, parse_duration, parse_iso8601
from .common import InfoExtractor
class ViideaIE(InfoExtractor):
_VALID_URL = r"""(?x)https?://(?:www\.)?(?:
... |
utils | object_detection_evaluation_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... |
core | account | """Functions that operate on account strings.
These account objects are rather simple and dumb; they do not contain the list
of their associated postings. This is achieved by building a realization; see
realization.py for details.
"""
__copyright__ = "Copyright (C) 2013-2016 Martin Blais"
__license__ = "GNU GPLv2"
i... |
soundcloud | util | # Copyright 2016-21 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 datetime import datetime
from ... |
supysonic | cli | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2013-2023 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
import time
import click
from click.exceptions import ClickException
from .config import IniConfig
from .daemon.c... |
searx | exceptions | """
searx 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 License, or
(at your option) any later version.
searx is distributed in the hope that it will be useful,
but WITHOUT ANY WA... |
messages | messages | import re
from ..py2 import convert_py2_bytes
from .checks import check_data, check_msgdict, check_value
from .decode import decode_message
from .encode import encode_message
from .specs import REALTIME_TYPES, SPEC_BY_TYPE, make_msgdict
from .strings import msg2str, str2msg
class BaseMessage(object):
"""Abstract... |
papers | doi | # -*- encoding: utf-8 -*-
# Dissemin: open access policy enforcement tool
# Copyright (C) 2014 Antonin Delpeuch
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License
# as published by the Free Software Foundation; either version 2
# of th... |
builtinAdditionPanes | fighterView | # =============================================================================
# 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 ... |
views | admin | # encoding: utf-8
from __future__ import annotations
import logging
from typing import Any, List, Union
import ckan.lib.app_globals as app_globals
import ckan.lib.base as base
import ckan.lib.helpers as h
import ckan.lib.navl.dictization_functions as dict_fns
import ckan.logic as logic
import ckan.logic.schema
import... |
migrate | mr_domains | # 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, ... |
PrinterOutput | PrinterOutputController | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from UM.Logger import Logger
from UM.Signal import Signal
MYPY = False
if MYPY:
from .Models.ExtruderOutputModel import ExtruderOutputModel
from .Models.PrinterOutputModel import PrinterOutputModel
from .Models... |
quickinsert | 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
... |
util | confit | # This file is part of beets.
# Copyright 2016-2019, Adrian Sampson.
#
# 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, c... |
core | eventmanager | #
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import deluge.... |
downloaders | PromptfileCom | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
class PromptfileCom(SimpleDownloader):
__name__ = "PromptfileCom"
__type__ = "downloader"
__version__ = "0.19"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?promptfile\.com/"
__config__ = [
... |
src | UM3OutputDevicePlugin | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Callable, Dict, Optional
from cura.CuraApplication import CuraApplication
from UM.OutputDevice.OutputDeviceManager import ManualDeviceAdditionAttempt
from UM.OutputDevice.OutputDevicePlugin import OutputD... |
BasicDrawing | CoordinateSystem | import math
import Utilities
from Quartz import *
def doRotatedEllipses(context):
totreps = 144
tint = 1.0
tintIncrement = 1.0 / totreps
# Create a new transform consisting of a 45 degrees rotation.
theTransform = CGAffineTransformMakeRotation(math.pi / 4)
# Apply a scale to the transform jus... |
serializers | escalation_policies | import time
from datetime import timedelta
from apps.alerts.models import EscalationChain, EscalationPolicy
from apps.schedules.models import OnCallSchedule
from apps.slack.models import SlackUserGroup
from apps.user_management.models import User
from apps.webhooks.models import Webhook
from common.api_helpers.custom_... |
gpodder | coverart | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2018 The gPodder Team
#
# gPodder is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the Licens... |
parts | strings | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... |
models | api_auth_token | from typing import Tuple
from apps.auth_token import constants, crypto
from apps.auth_token.models.base_auth_token import BaseAuthToken
from apps.user_management.models import Organization, User
from django.db import models
class ApiAuthToken(BaseAuthToken):
objects: models.QuerySet["ApiAuthToken"]
user = m... |
views | feed | # encoding: utf-8
from __future__ import annotations
import json
import logging
import unicodedata
from typing import Any, Optional
from urllib.parse import urlparse
import ckan.lib.base as base
import ckan.lib.helpers as h
import ckan.logic as logic
import ckan.plugins as plugins
from ckan.common import _, config, c... |
books | Lifeweek | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import re
from base import BaseFeedBook
def getBook():
return Lifeweek
class Lifeweek(BaseFeedBook):
title = "三联生活周刊"
description = '秉承"倡导品质生活"的理念,提供优质新媒体内容与服务。每周六推送'
language = "zh-cn"
feed_encoding = "utf-8"
page_encoding = "utf-8"
masthead... |
Gui | Comment | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2015 Dan Falck <ddfalck@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
builtinItemStatsViews | itemAttributes | import csv
from enum import IntEnum
import config
import gui
# noinspection PyPackageRequirements
import wx
import wx.lib.agw.hypertreelist
from gui import globalEvents as GE
from gui.bitmap_loader import BitmapLoader
from gui.builtinItemStatsViews.attributeGrouping import *
from gui.utils.numberFormatter import form... |
vcs | abstractrepo | # 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
... |
blocks | qa_argmax | #!/usr/bin/env python
#
# Copyright 2007,2010,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 blocks, gr, gr_unittest
class test_arg_max(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_blo... |
supysonic | watcher | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2014-2022 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
import logging
import os.path
import time
from threading import Condition, Thread, Timer
from watchdog.events impo... |
puddlestuff | functions | # -*- coding: utf-8 -*-
# functions.py
# Copyright (C) 2008-2010 concentricpuddle, GPLv2
"""A modules that defines function that are to be used througout puddletag.
Basically, this modules contains functions that are called via
the getfunc function in findfunc.py. Most of the time though,
getfunc isn't called direct... |
filter | file_taps_loader | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2018 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import csv
import os
import re
import sys
import numpy as np
from gnuradio import gr
class file_taps_loader(gr.basic_block):
"""
... |
i18n | nsh2json | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2020 Philipp Wolfer
#
# 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 v... |
event | util | import datetime as dt
import json
import uuid
from typing import Any, Dict, List, Optional, Set, Union
from zoneinfo import ZoneInfo
from dateutil.parser import isoparse
from django.utils import timezone
from posthog.client import sync_execute
from posthog.kafka_client.client import ClickhouseProducer
from posthog.kaf... |
plugins | sound_playfile | # -*- coding: utf-8 -*-
"""
Sound notification plugin using external executable or winsound (on Windows)
"""
try:
import winsound
def connect_plugin(sound_file):
"""Plugin's entry point"""
winsound.PlaySound(sound_file, winsound.SND_FILENAME)
except ImportError:
import os
import subpr... |
plugins | aloula | """
$description Live TV channels and video on-demand service from the SBA, a Saudi, state-owned broadcaster.
$url aloula.sa
$type live, vod
$metadata id
$metadata author
$metadata category
$metadata title
"""
import logging
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api impo... |
accounts | IronfilesNet | # -*- coding: utf-8 -*-
import json
import time
from ..base.account import BaseAccount
class IronfilesNet(BaseAccount):
__name__ = "IronfilesNet"
__type__ = "account"
__version__ = "0.01"
__status__ = "testing"
__description__ = """Ironfiles.net account plugin"""
__license__ = "GPLv3"
_... |
core | distribution_test | """
Tests for distribution.
"""
__copyright__ = "Copyright (C) 2015-2017 Martin Blais"
__license__ = "GNU GPLv2"
import unittest
from beancount.core import distribution
class TestDistributionBase(unittest.TestCase):
def assertDist(self, dist, mode, min, max):
self.assertEqual(mode, dist.mode())
... |
migrations | 1_2_0_upgrade_2_0_0 | from __future__ import print_function
import os
import sys
import dataset
from CTFd import config, create_app
from CTFd.utils import string_types
from sqlalchemy_utils import drop_database
# This is important to allow access to the CTFd application factory
sys.path.append(os.getcwd())
def cast_bool(value):
if ... |
Idf | Init | # ***************************************************************************
# * Copyright (c) 2002,2003 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
classes | logger_libopenshot | """
@file
@brief This file connects to libopenshot and logs debug messages (if debug preference enabled)
@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.opensh... |
lib | feedparser | #!/usr/bin/env python
"""Universal feed parser
Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
Visit http://feedparser.org/ for the latest version
Visit http://feedparser.org/docs/ for the latest documentation
Required: Python 2.4 or later
Recommended: CJKCodecs and iconv_codec <http://cjkpytho... |
drawBot | updater | import plistlib
import re
import ssl
import subprocess
import tempfile
import traceback
from urllib.request import Request, urlopen
import AppKit
import vanilla
from defconAppKit.windows.progressWindow import ProgressWindow
from drawBot import __version__
from packaging.version import Version
from vanilla.dialogs impo... |
posthog | views | import os
from functools import wraps
from typing import Dict, Union
import sentry_sdk
from django.conf import settings
from django.contrib.auth import login
from django.contrib.auth.decorators import login_required as base_login_required
from django.db import DEFAULT_DB_ALIAS, connections
from django.db.migrations.ex... |
util | enum | # Copyright 2014 Christoph Reiter
# 2016 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.
def... |
dbcore | db | # This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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, ... |
scripts | grbl_post | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2014 sliptonic <shopinthewoods@gmail.com> *
# * Copyright (c) 2018, 2019 Gauthier Briere *
# * Copyright (c) 2019, 2020 Schildkroet ... |
api | explicit_team_member | from typing import Optional, cast
from django.db.utils import IntegrityError
from django.shortcuts import get_object_or_404
from ee.models.explicit_team_membership import ExplicitTeamMembership
from posthog.api.routing import StructuredViewSetMixin
from posthog.api.shared import UserBasicSerializer
from posthog.models... |
string | date | # 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 datetime import datetime
from time import localtime, strftime
from... |
Todo | ToDoCell | from Cocoa import *
NOT_DONE = 0
DONE = 1
DEFERRED = 2
class ToDoCell(NSButtonCell):
__slots__ = ("_triState", "_doneImage", "_deferredImage", "_timeDue")
def init(self):
self._triState = NOT_DONE
self._timeDue = None
self._doneImage = None
self._deferredImage = None
... |
src | BaseModel | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from datetime import datetime, timezone
from typing import Any, Dict, List, Type, TypeVar, Union
# Type variable used in the parse methods below, which should be a subclass of BaseModel.
T = TypeVar("T", bound="BaseModel")... |
item-editor | abstract | from sglib.lib import util
from sglib.lib.util import *
from sglib.math import clip_value
from sglib.models import theme
from sgui import shared as glbl_shared
from sgui.daw import shared
from sgui.daw.shared import *
from sgui.sgqt import *
class ItemEditorHeader(QGraphicsRectItem):
"""The horizontal header at t... |
trends | lifecycle_actors | from typing import Dict, Optional, Tuple
from posthog.models.filters.lifecycle_filter import LifecycleFilter
from posthog.queries.actor_base_query import ActorBaseQuery
from posthog.queries.trends.lifecycle import LifecycleEventQuery
from posthog.queries.trends.sql import LIFECYCLE_PEOPLE_SQL
class LifecycleActors(A... |
events | bansheeimport | # Copyright 2018 Phidica Veia
#
# 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 sqlite3
from gi.repos... |
Models | UserChangesModel | # Copyright (c) 2020 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os
from collections import OrderedDict
from PyQt6.QtCore import Qt, pyqtSlot
from UM.Application import Application
from UM.i18n import i18nCatalog
from UM.Logger import Logger
from UM.Qt.ListModel import ListModel
... |
box-coders | faster_rcnn_box_coder_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... |
sabnzbd | dirscanner | #!/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... |
diagramitems | person | from math import pi
from gaphor.C4Model import c4model
from gaphor.core.styling import FontWeight, JustifyContent, TextAlign
from gaphor.diagram.presentation import ElementPresentation, Named
from gaphor.diagram.shapes import Box, Text, stroke
from gaphor.diagram.support import represents
@represents(c4model.C4Perso... |
migrations | 0192_event_properties | # Generated by Django 3.2.5 on 2021-12-03 09:12
import django.db.models.deletion
import django.utils.timezone
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0191_rename_specialmigration_asyncmigration"),
]
operations = [
migr... |
tasks | materialized_columns | from celery.utils.log import get_task_logger
from ee.clickhouse.materialized_columns.columns import (
TRIM_AND_EXTRACT_PROPERTY,
ColumnName,
get_materialized_columns,
)
from posthog.client import sync_execute
from posthog.settings import CLICKHOUSE_CLUSTER, CLICKHOUSE_DATABASE
logger = get_task_logger(__na... |
windows | animated_title | """
@file
@brief This file loads the animated title dialog (i.e Blender animation automation)
@author Noah Figg <eggmunkee@hotmail.com>
@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... |
Test | TestApp | # ***************************************************************************
# * Copyright (c) 2002 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
nyaa | config_example | import os
import re
DEBUG = True
######################
## Maintenance mode ##
######################
# A read-only maintenance mode, in which the database is not modified
MAINTENANCE_MODE = False
# A maintenance message (used in layout.html template)
MAINTENANCE_MODE_MESSAGE = "Site is currently in read-only mainte... |
core | filters | # -*- coding: utf-8 -*-
import django_filters
from core import models
from django.utils.translation import gettext as _
class TagFilter(django_filters.FilterSet):
tag = django_filters.ModelChoiceFilter(
label=_("Tag"),
field_name="tags__name",
distinct=True,
queryset=models.Tag.obj... |
blocks | sigmf_sink_minimal | #!/usr/bin/env python
#
# Copyright 2022 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import json
import numpy as np
from gnuradio import gr
from . import blocks_python as blocks
class sigmf_sink_minimal(gr.hier_block2):
"""
A partial i... |
cli | search_index | # encoding: utf-8
from __future__ import annotations
import multiprocessing as mp
import ckan.logic as logic
import ckan.model as model
import click
import sqlalchemy as sa
from ckan.common import config
from ckan.lib.search import query_for
from . import error_shout
@click.group(name="search-index", short_help="S... |
supysonic | db | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2013-2023 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
import importlib
import mimetypes
import os.path
import time
from datetime import datetime
from hashlib import sha1... |
saveddata | miscData | # ===============================================================================
# Copyright (C) 2011 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 Software Foundation... |
css | cssproperties | """CSS2Properties (partly!) implements DOM Level 2 CSS CSS2Properties used
by CSSStyleDeclaration
TODO: CSS2Properties
If an implementation does implement this interface, it is expected to
understand the specific syntax of the shorthand properties, and apply
their semantics; when the margin property is set... |
frescobaldi-app | helpers | # 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
... |
ckan | authz | # encoding: utf-8
from __future__ import annotations
import functools
import importlib
import inspect
from collections import OrderedDict, defaultdict
from logging import getLogger
from types import ModuleType
from typing import Any, Callable, Collection, KeysView, Optional, Union
import ckan.model as model
import ck... |
ui | drawBotController | import AppKit
from defconAppKit.windows.baseWindow import BaseWindowController
from drawBot.context.drawBotContext import DrawBotContext
from drawBot.drawBotDrawingTools import _drawBotDrawingTool
from drawBot.misc import getDefault, setDefault, warnings
from drawBot.scriptTools import CallbackRunner, ScriptRunner, Std... |
downloaders | DailyuploadsNet | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
class DailyuploadsNet(SimpleDownloader):
__name__ = "DailyuploadsNet"
__type__ = "downloader"
__version__ = "0.01"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?dailyuploads\.net/\w+"
__confi... |
parts | special | # 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
... |
hosts | updateHostsFile | #!/usr/bin/env python3
# Script by Ben Limmer
# https://github.com/l1m5
#
# This Python script will combine all the host files you provide
# as sources into one, unique host file to keep your internet browsing happy.
import argparse
import fnmatch
import ipaddress
import json
import locale
import os
import platform
i... |
extractor | tweakers | from __future__ import unicode_literals
from ..utils import determine_ext, int_or_none, mimetype2ext
from .common import InfoExtractor
class TweakersIE(InfoExtractor):
_VALID_URL = r"https?://tweakers\.net/video/(?P<id>\d+)"
_TEST = {
"url": "https://tweakers.net/video/9926/new-nintendo-3ds-xl-op-all... |
tools | find_multiline_returns | #!/usr/bin/env python3
"""Find the instances of multi-line docstring Returns sections.
See: https://bitbucket.org/birkenfeld/sphinx-contrib/issues/111
"""
__copyright__ = "Copyright (C) 2016 Martin Blais"
__license__ = "GNU GPLv2"
import argparse
import io
import logging
import os
import re
import textwrap
from os i... |
extractor | dispeak | from __future__ import unicode_literals
import re
from ..utils import int_or_none, parse_duration, remove_end, xpath_element, xpath_text
from .common import InfoExtractor
class DigitallySpeakingIE(InfoExtractor):
_VALID_URL = r"https?://(?:s?evt\.dispeak|events\.digitallyspeaking)\.com/(?:[^/]+/)+xml/(?P<id>[^.... |
PathTests | TestCentroidPost | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2022 sliptonic <shopinthewoods@gmail.com> *
# * Copyright (c) 2022 Larry Woestman <LarryWoestman2@gmail.com> *
# * ... |
utilities | tiny_tribler_service | import asyncio
import logging
import signal
import tempfile
from pathlib import Path
from typing import List, Optional
from tribler.core.components.component import Component
from tribler.core.components.session import Session
from tribler.core.config.tribler_config import TriblerConfig
from tribler.core.utilities.asy... |
gamedata | attribute | # ===============================================================================
# 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, ... |
chardet | jisfreq | ######################## 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... |
extractor | eagleplatform | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_HTTPError
from ..utils import ExtractorError, int_or_none, unsmuggle_url, url_or_none
from .common import InfoExtractor
class EaglePlatformIE(InfoExtractor):
_VALID_URL = r"""(?x)
(?:
... |
extractors | ckplayer | #!/usr/bin/env python
# coding:utf-8
# Author: Beining --<i@cnbeining.com>
# Purpose: A general extractor for CKPlayer
# Created: 03/15/2016
__all__ = ["ckplayer_download"]
from copy import copy
from xml.etree import ElementTree as ET
from ..common import *
# ------------------------------------------------------... |
extractor | bigflix | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_b64decode, compat_urllib_parse_unquote
from .common import InfoExtractor
class BigflixIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?bigflix\.com/.+/(?P<id>[0-9]+)"
_TESTS = [
{
# 2 format... |
implementation | base | import logging
import time
from collections import deque
from typing import Optional
import psutil
class ResourceMonitor:
"""
This is a base resource monitor class that monitors the process's CPU and memory usage.
This is done by check_resources() method.
The periodic monitoring of the resources is ... |
autokey | dbus_service | # Copyright (C) 2011 Chris Dekter
# Copyright (C) 2019 Thomas Hess <thomas.hess@udo.edu>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) a... |
clientScripts | archivematicaCreateMETSRightsDspaceMDRef | #!/usr/bin/env python
#
# 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, ... |
widgets | breadcrumbs | from __future__ import absolute_import
import os
from gi.repository import GObject, Gtk
from sunflower.common import decode_file_name
class Breadcrumbs:
"""Linked list of buttons navigating to different paths."""
def __init__(self, parent):
self.container = Gtk.ScrolledWindow.new()
self.con... |
Test | unittestgui | #!/usr/bin/env python3
"""
GUI framework and application for use with Python unit testing framework.
Execute tests written using the framework provided by the 'unittest' module.
Further information is available in the bundled documentation, and from
http://pyunit.sourceforge.net/
Copyright (c) 1999, 2000, 2001 Ste... |
chardet | jisfreq | ######################## 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... |
frescobaldi-app | listmodel | # 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
... |
chardet | compat | ######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
# Ian Cordasco - port to Python
#
# This library 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; either
# versio... |
unit | views | # This file is part of Archivematica.
#
# Copyright 2010-2016 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 ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.