section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
port | port | # =============================================================================
# Copyright (C) 2014 Ryan Holmes
#
# 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 v... |
migrations | 0160_auto_20221101_2251 | # Generated by Django 3.2.15 on 2022-11-01 22:51
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0159_auto_20220924_0634"),
]
operations = [
migrations.AddField(
model_name="user",
name="allow_reactiva... |
extractor | rutube | # coding: utf-8
from __future__ import unicode_literals
import itertools
import re
from ..compat import compat_parse_qs, compat_str, compat_urllib_parse_urlparse
from ..utils import (
bool_or_none,
determine_ext,
int_or_none,
try_get,
unified_timestamp,
url_or_none,
)
from .common import InfoE... |
deluge | _libtorrent | #
# 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.
#
"""
This module is used to han... |
FeatureHole | HoleGui | # /******************************************************************************
# * Copyright (c) 2012 Jan Rheinländer <jrheinlaender@users.sourceforge.net> *
# * *
# * This file is part of the FreeCAD CAx development system. ... |
VersionUpgrade48to49 | VersionUpgrade48to49 | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import configparser
import io
import json
from typing import List, Tuple
from cura.API import Account
from UM.VersionUpgrade import VersionUpgrade
class VersionUpgrade48to49(VersionUpgrade):
_moved_visibility_setting... |
plugins | toolkit | # encoding: utf-8
"""This module is intended to make functions/objects consistently available to
plugins, whilst giving core CKAN developers the ability move code around or
change underlying frameworks etc.
It should not be used internally within ckan - only by extensions.
Functions/objects should only be removed aft... |
sabnzbd | deobfuscate_filenames | #!/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... |
downloaders | NovafileCom | # -*- coding: utf-8 -*-
#
# Test links:
# http://novafile.com/vfun4z6o2cit
# http://novafile.com/s6zrr5wemuz4
import re
import urllib.parse
import pycurl
from ..anticaptchas.HCaptcha import HCaptcha
from ..base.xfs_downloader import XFSDownloader
class NovafileCom(XFSDownloader):
__name__ = "NovafileCom"
... |
migrations | 0179_reportcomment_comment_type | # Generated by Django 3.2.18 on 2023-05-16 16:02
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0178_auto_20230328_2132"),
]
operations = [
migrations.AddField(
model_name="reportcomment",
name="actio... |
middleware | common_middleware | # encoding: utf-8
"""Additional middleware used by the Flask app stack."""
import hashlib
from typing import Any
from urllib.parse import unquote, urlparse
import sqlalchemy as sa
from ckan.common import CKANConfig, config
from ckan.types import CKANApp
class RootPathMiddleware(object):
"""
Prevents the SCR... |
PyObjCTest | test_nstypesetter | from AppKit import *
from PyObjCTools.TestSupport import *
class TestNSTypesetterHelper(NSTypesetter):
def willSetLineFragmentRect_forGlyphRange_usedRect_baselineOffset_(
self, a, b, c, d
):
return 1
def getGlyphsInRange_glyphs_characterIndexes_glyphInscriptions_elasticBits_bidiLevels_(
... |
viewers | pointandclick | # 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
... |
exports | ordered_csv_renderer | from collections import OrderedDict
from typing import Any, Dict, Generator
from more_itertools import unique_everseen
from rest_framework_csv.renderers import CSVRenderer
class OrderedCsvRenderer(
CSVRenderer,
):
def tablize(self, data: Any, header: Any = None, labels: Any = None) -> Generator:
"""
... |
Machines | ContainerTree | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import time
from typing import TYPE_CHECKING, Dict, List, Optional
import cura.CuraApplication # Imported like this to prevent circular dependencies.
from cura.Machines.MachineNode import MachineNode
from cura.Settings.Gl... |
models | resolution_note | import typing
import humanize
from apps.slack.slack_formatter import SlackFormatter
from common.public_primary_keys import (
generate_public_primary_key,
increase_public_primary_key_length,
)
from common.utils import clean_markup
from django.conf import settings
from django.core.validators import MinLengthVali... |
draftutils | translate | # ***************************************************************************
# * (c) 2009 Yorik van Havre <yorik@uncreated.net> *
# * (c) 2019 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * *
# * Th... |
downloaders | LeechThreeHundreedSixtyCom | # -*- coding: utf-8 -*-
import json
from pyload.core.utils import parse
from ..base.multi_downloader import MultiDownloader
class LeechThreeHundreedSixtyCom(MultiDownloader):
__name__ = "LeechThreeHundreedSixtyCom"
__type__ = "downloader"
__version__ = "0.01"
__status__ = "testing"
__pattern__... |
qtui | autokey_treewidget | # Copyright (C) 2011 Chris Dekter
# Copyright (C) 2018 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... |
gui | inputtestwindow | # This file is part of MyPaint.
# Copyright (C) 2010-2018 by the MyPaint Development Team.
# Copyright (C) 2010-2013 by Martin Renold <martinxyz@gmx.ch>
#
# 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 Fou... |
migrations | 0020_auto_20201208_0213 | # Generated by Django 3.0.7 on 2020-12-08 02:13
import bookwyrm.models.fields
import django.core.validators
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("boo... |
blocks | qa_unpack_k_bits | #!/usr/bin/env python
#
# Copyright 2006,2010,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import random
import pmt
from gnuradio import blocks, gr, gr_unittest
class test_unpack(gr_unittest.TestCase):
def setUp(self):
random.s... |
babybuddy | apps | # -*- coding: utf-8 -*-
import datetime
import os
from babybuddy import VERSION
from dbsettings.loading import set_setting_value, setting_in_db
from django.apps import AppConfig
from django.conf import settings
from django.db.models.signals import post_migrate
def create_read_only_group(sender, **kwargs):
from d... |
AddonManager | addonmanager_devmode_licenses_table | # SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2022 FreeCAD Project Association *
# * ... |
util | mbserver | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2021 Laurent Monin
# Copyright (C) 2021 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 Foundati... |
fcbt | BuildDoc | # shell and operating system
import os
import sys
import FileTools
# sys.path.append( "..\Tools" )
# import FileTools
# line separator
ls = os.linesep
# path separator
ps = os.pathsep
# dir separator
ds = os.sep
# ====================================================================
# script assumes to run in src/D... |
extractor | howstuffworks | from __future__ import unicode_literals
from ..utils import (
determine_ext,
find_xpath_attr,
int_or_none,
js_to_json,
unescapeHTML,
)
from .common import InfoExtractor
class HowStuffWorksIE(InfoExtractor):
_VALID_URL = r"https?://[\da-z-]+\.(?:howstuffworks|stuff(?:(?:youshould|theydontwanty... |
pdu | qa_pdu | #!/usr/bin/env python
#
# Copyright 2013 Free Software Foundation, Inc.
# Copyright 2021 Marcus Müller
#
# 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 test_pdu(gr_unittest.TestCase):
def setUp(se... |
config-integrations | elastalert | # Main
enabled = True
title = "Elastalert"
slug = "elastalert"
short_description = "Elastic"
is_displayed_on_web = True
description = None
is_featured = False
is_able_to_autoresolve = True
is_demo_alert_enabled = True
description = None
# Default templates
slack_title = """\
*<{{ grafana_oncall_link }}|#{{ grafana_on... |
femobjects | constraint_magnetization | # ***************************************************************************
# * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
extractor | hketv | # coding: utf-8
from __future__ import unicode_literals
from ..compat import compat_str
from ..utils import (
ExtractorError,
clean_html,
int_or_none,
merge_dicts,
parse_count,
str_or_none,
try_get,
unified_strdate,
urlencode_postdata,
urljoin,
)
from .common import InfoExtracto... |
models | automoderator | # 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, ... |
web | template | """
simple, elegant templating
(part of web.py)
Template design:
Template string is split into tokens and the tokens are combined into nodes.
Parse tree is a nodelist. TextNode and ExpressionNode are simple nodes and
for-loop, if-loop etc are block nodes, which contain multiple child nodes.
Each node can emit som... |
outline | 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
... |
pyvideo | check_links | #!/usr/bin/env python3
"""
Check a site and report broken links.
"""
import sys
from argparse import ArgumentParser
from queue import Queue
from urllib.parse import urljoin, urlparse
import requests
from bs4 import BeautifulSoup
def extract_links(address):
"""extracts links from a web page"""
try:
r ... |
accounts | LinksnappyCom | # -*- coding: utf-8 -*-
import json
from ..base.multi_account import MultiAccount
class LinksnappyCom(MultiAccount):
__name__ = "LinksnappyCom"
__type__ = "account"
__version__ = "0.22"
__status__ = "testing"
__config__ = [
("mh_mode", "all;listed;unlisted", "Filter downloaders to use",... |
canto-curses | guibase | # -*- coding: utf-8 -*-
# Canto-curses - ncurses RSS reader
# Copyright (C) 2016 Jack Miller <jack@codezen.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
import loggin... |
graphs | pumping_amounts | # -*- coding: utf-8 -*-
import plotly.graph_objs as go
import plotly.offline as plotly
from django.utils import timezone
from django.utils.translation import gettext as _
from reports import utils
def pumping_amounts(objects):
"""
Create a graph showing pumping amounts over time.
:param instances: a Query... |
tornado | session | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
"""
sockjs.tornado.session
~~~~~~~~~~~~~~~~~~~~~~
SockJS session implementation.
"""
import asyncio
import functools
import logging
from octoprint.vendor.sockjs.tornado import periodic, proto, sess... |
baseclass | addressbook | # pylint: disable=unused-argument, consider-using-f-string, import-error
# pylint: disable=unnecessary-comprehension, no-member, no-name-in-module
"""
addressbook.py
==============
All saved addresses are managed in Addressbook
"""
import logging
import os
from functools import partial
from kivy.app import App
fro... |
presets | preset_options | from importlib import import_module
from apps.webhooks.models import Webhook
from django.conf import settings
from django.db.models.signals import pre_save
from django.dispatch import receiver
class WebhookPresetOptions:
WEBHOOK_PRESETS = {}
for webhook_preset_config in settings.INSTALLED_WEBHOOK_PRESETS:
... |
matchers | argmax_matcher_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... |
thumbor | setup | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com thumbor@googlegroups.com
import glob
import logging
import os
from pathlib import Path
from ... |
musicview | pointandclick | # 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
... |
neubot | state | # neubot/state.py
#
# Copyright (c) 2011-2012
# Nexa Center for Internet & Society, Politecnico di Torino (DAUIN)
# and Simone Basso <bassosimone@gmail.com>
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of the G... |
neubot | runner_hosts | # neubot/runner_hosts.py
#
# Copyright (c) 2012-2013
# Nexa Center for Internet & Society, Politecnico di Torino (DAUIN)
# and Simone Basso <bassosimone@gmail.com>
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms o... |
soundcloud | main | # Copyright 2016-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; either version 2 of the License, or
# (at your option) any later version.
from urllib.parse import parse_qs... |
comic | manhuarenbase | #!/usr/bin/env python3
# encoding: utf-8
import json
import re
from books.base import BaseComicBook
from bs4 import BeautifulSoup
from lib.autodecoder import AutoDecoder
from lib.urlopener import URLOpener
from packer import decode_packed_codes
class ManHuaRenBaseBook(BaseComicBook):
accept_domains = ("https://w... |
translators | jsregexps | from pyjsparserdata import *
REGEXP_SPECIAL_SINGLE = {"\\", "^", "$", "*", "+", "?", "."}
NOT_PATTERN_CHARS = {
"^",
"$",
"\\",
".",
"*",
"+",
"?",
"(",
")",
"[",
"]",
"|",
} # what about '{', '}', ???
CHAR_CLASS_ESCAPE = {"d", "D", "s", "S", "w", "W"}
CONTROL_ESCAPE... |
views | resolution_notes | from apps.alerts.models import ResolutionNote
from apps.alerts.tasks import send_update_resolution_note_signal
from apps.auth_token.auth import ApiTokenAuthentication
from apps.public_api.serializers.resolution_notes import (
ResolutionNoteSerializer,
ResolutionNoteUpdateSerializer,
)
from apps.public_api.throt... |
builtinContextMenus | itemAmountChange | import re
import gui.fitCommands as cmd
import gui.mainFrame
import wx
from eos.saveddata.cargo import Cargo as es_Cargo
from eos.saveddata.drone import Drone
from eos.saveddata.fighter import Fighter as es_Fighter
from eos.saveddata.fit import Fit as es_Fit
from gui.contextMenu import ContextMenuCombined
from service... |
models | files_model | """
@file
@brief This file contains the project file model, used by the project tree
@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 Video Ed... |
options | network | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2006 Lukáš Lalinský
# Copyright (C) 2013, 2018, 2020-2021 Laurent Monin
# Copyright (C) 2013, 2020-2021 Philipp Wolfer
# Copyright (C) 2016-2017 Sambhav Kothari
#
# This program is free software; you can redistribute it and/or
... |
RAAML | modelinglanguage | """The RAAML Modeling Language module is the entrypoint for RAAML related
assets."""
from typing import Iterable
from gaphor.abc import ModelingLanguage
from gaphor.core import gettext
from gaphor.diagram.diagramtoolbox import (
DiagramType,
ElementCreateInfo,
ToolboxDefinition,
)
from gaphor.RAAML import... |
api | connection | __author__ = "Gina Häußge <osd@foosel.net>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
from flask import abort, jsonify, request
from octoprint.access.permissions import ... |
migrations | 0273_mark_inactive_exports_as_finished | import json
from datetime import timedelta
from django.db import migrations
from django.utils import timezone
def mark_inactive_exports_as_finished(apps, _):
migration_start_time = timezone.now()
ActivityLog = apps.get_model("posthog", "ActivityLog")
PluginStorage = apps.get_model("posthog", "PluginStor... |
pwidgets | canvas_menu | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013-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 ver... |
PathTests | TestRefactoredTestPost | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2022 sliptonic <shopinthewoods@gmail.com> *
# * Copyright (c) 2022 Larry Woestman <LarryWoestman2@gmail.com> *
# * ... |
ci | problemmatchers | #!/usr/bin/env python3
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Register problem matchers for GitHub Actions.
Relevant docs:
https://github.com/actions/toolkit/blob/master/docs/problem-matchers.md
https://github.com/actions/toolk... |
addons | JustPremium | # -*- coding: utf-8 -*-
import re
from ..base.addon import BaseAddon
class JustPremium(BaseAddon):
__name__ = "JustPremium"
__type__ = "addon"
__version__ = "0.27"
__status__ = "testing"
__config__ = [
("enabled", "bool", "Activated", False),
("excluded", "str", "Exclude hosters ... |
migrations | 0008_auto_20180215_1445 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.10 on 2018-02-15 14:45
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("frontend", "0005_auto_20180131_1949"),
]
operations = [
migrations.RunSQL(
... |
Op | Engrave | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it a... |
draftguitools | gui_clone | # ***************************************************************************
# * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * ... |
plugins | proxyconfig_stem | # -*- coding: utf-8 -*-
"""
Configure tor proxy and hidden service with
`stem <https://stem.torproject.org/>`_ depending on *bitmessagesettings*:
* try to start own tor instance on *socksport* if *sockshostname*
is unset or set to localhost;
* if *socksport* is already in use that instance is used only for
... |
frescobaldi-app | networkaccessmanager | # 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
... |
lib | layervis | # This file is part of MyPaint.
# -*- coding: utf-8 -*-
# Copyright (C) 2017-2018 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
# the Free Software Foundation; either version 2 of the Licen... |
drawBot | drawBotDrawingTools | import math
import os
import random
from collections import namedtuple
from contextlib import contextmanager
import AppKit
import CoreText
import Quartz
from .context import (
getContextForFileExt,
getContextOptions,
getContextOptionsDocs,
getFileExtensions,
)
from .context.baseContext import (
Be... |
femtaskpanels | task_mesh_group | # ***************************************************************************
# * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
fitRemoteReps | graph | # =============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either ... |
scripts | bind_gr_module | import argparse
import os
import pathlib
import tempfile
from gnuradio.bindtool import BindingGenerator
parser = argparse.ArgumentParser(description="Bind a GR In-Tree Module")
parser.add_argument(
"names",
type=str,
nargs="+",
help="Names of gr modules to bind (e.g. fft digital analog)",
)
parser.ad... |
v15-webassets | plugin | # encoding: utf-8
import ckan.plugins as plugins
import ckan.plugins.toolkit as toolkit
from ckan.common import CKANConfig
def most_popular_groups():
"""Return a sorted list of the groups with the most datasets."""
# Get a list of all the site's groups from CKAN, sorted by number of
# datasets.
grou... |
nfoview | unittest | # -*- coding: utf-8 -*-
# Copyright (C) 2005 Osmo Salomaa
#
# 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.
#
# This pr... |
analog | nbfm_rx | #
# Copyright 2005,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
from gnuradio import fft, filter, gr
from . import analog_python as analog
from .fm_emph import fm_deemph
class nbfm_rx(gr.hier_block2):
"""
Narrow Band F... |
examples | run_length | #!/usr/bin/env python
#
# Copyright 2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
from optparse import OptionParser
def main():
parser = OptionParser()
parser.add_option(
"-f", "--file", default=None, help="Choose ... |
gaphor | application | """The Application object. One application should be available.
An application can host multiple sessions. From a user point of view a
session is represented as a window in which a diagram can be edited.
"""
from __future__ import annotations
import importlib.metadata
import logging
from pathlib import Path
from typ... |
lib | takedowns | # 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, ... |
neubot | state | #!/usr/bin/env python
#
# Copyright (c) 2011-2012
# Nexa Center for Internet & Society, Politecnico di Torino (DAUIN)
# and Simone Basso <bassosimone@gmail.com>
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of t... |
extractors | netease | #!/usr/bin/env python
__all__ = ["netease_download"]
import base64
import hashlib
import os
from json import loads
from ..common import *
from ..common import print_more_compatible as print
from ..util import fs
def netease_hymn():
return """
player's Game Over,
u can abandon.
u get pissed,
ge... |
processors | online_dictionary | # SPDX-License-Identifier: AGPL-3.0-or-later
import re
from searx.utils import is_valid_lang
from .online import OnlineProcessor
parser_re = re.compile(".*?([a-z]+)-([a-z]+) (.+)$", re.I)
class OnlineDictionaryProcessor(OnlineProcessor):
engine_type = "online_dictionary"
def get_params(self, search_query... |
Tor | TorManager | import atexit
import binascii
import logging
import os
import random
import re
import socket
import subprocess
import sys
import time
import gevent
import socks
from Config import config
from Crypt import CryptRsa
from Debug import Debug
from gevent.lock import RLock
from Plugin import PluginManager
from Site import S... |
clientScripts | normalize_report | #!/usr/bin/env python
import logging
import os.path
from argparse import ArgumentParser
import components.helpers as helpers
import django
from custom_handlers import get_script_logger
from django.conf import settings as mcpclient_settings
from django.contrib.auth.models import User
from django.core.mail import send_m... |
plugins | check_average_cost_test | __copyright__ = "Copyright (C) 2018 Martin Blais"
__license__ = "GNU GPLv2"
import textwrap
import unittest
from beancount import loader
class TestMatchAverageCost(unittest.TestCase):
def test_match_average_cost(self):
setup = """
plugin "beancount.plugins.check_average_cost"
plugin... |
PyObjCTest | test_number_proxy | """
Tests for the proxy of Python numbers
NOTE: Decimal conversion is not tested, the required proxy is part of
the Foundation bindings :-(
"""
from __future__ import unicode_literals
import os
import sys
import objc
from PyObjCTest.fnd import NSNumber, NSNumberFormatter
from PyObjCTest.pythonnumber import OC_TestNu... |
extractors | fc2video | #!/usr/bin/env python
__all__ = ["fc2video_download"]
import re
from hashlib import md5
from urllib.parse import urlparse
from ..common import *
# ----------------------------------------------------------------------
def makeMimi(upid):
"""From http://cdn37.atwikiimg.com/sitescript/pub/dksitescript/FC2.site.j... |
alerts | integration_options_mixin | import importlib
from common.utils import getattrd
from django.conf import settings
class IntegrationOptionsMixin:
DEFAULT_INTEGRATION = "grafana"
# Import every integration config file listed in settings.INSTALLED_ONCALL_INTEGRATIONS
# as a submodule into a tuple, e.g. AlertReceiveChannel._config[0].id,... |
downloaders | DebridplanetCom | # -*- coding: utf-8 -*-
import json
import pycurl
from ..base.multi_downloader import MultiDownloader
class DebridplanetCom(MultiDownloader):
__name__ = "DebridplanetCom"
__type__ = "downloader"
__version__ = "0.01"
__status__ = "testing"
__pattern__ = r"^unmatchable$"
__config__ = [
... |
downloaders | IfolderRu | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
class IfolderRu(SimpleDownloader):
__name__ = "IfolderRu"
__type__ = "downloader"
__version__ = "0.44"
__status__ = "testing"
__pattern__ = r"http://(?:www)?(files\.)?(ifolder\.ru|metalarea\.org|rusfolder\.(... |
widgets | lfo | from sglib.lib.translate import _
from sgui.sgqt import *
from . import _shared
from .control import *
class lfo_widget:
def __init__(
self,
a_size,
a_rel_callback,
a_val_callback,
a_port_dict,
a_freq_port,
a_type_port,
a_type_list,
a_label=... |
plugins | zdf_mediathek | """
$description Live TV channels and video on-demand service from ZDF, a German public, independent broadcaster.
$url zdf.de
$type live, vod
$region Germany
"""
import logging
import re
from urllib.parse import urlparse, urlunparse
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import... |
widgets | charmap | # 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
... |
digital | gmsk | #
# GMSK modulation and demodulation.
#
#
# Copyright 2005-2007,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
# See gnuradio-examples/python/digital for examples
import inspect
from math import log as ln
from math import pi
from pprint import... |
beetsplug | replaygain | # This file is part of beets.
# Copyright 2016, Fabrice Laporte, Yevgeny Bezman, and 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... |
migrations | 0010_funnel_funnelstep | # Generated by Django 2.2.7 on 2020-01-27 19:31
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0009_auto_20200127_0018"),
]
operations = [
migrations.CreateMod... |
femtools | femutils | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * Copyright (c) 2018 Bernd Hahnebach <bernd@bimstatik.org> *
# * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> *
# * ... |
mock | class_addressGenerator | """
A thread for creating addresses
"""
import logging
import random
import threading
from pybitmessage import queues, state
from pybitmessage.bmconfigparser import config
from six.moves import queue
# from network.threads import StoppableThread
fake_addresses = {
"BM-2cUgQGcTLWAkC6dNsv2Bc8XB3Y1GEesVLV": {
... |
events | seekpoints | # 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 quodlibet import _, app
from quodlib... |
plugins | rtbf | """
$description Live TV channels and video on-demand service from RTBF, a Belgian public broadcaster.
$url rtbf.be/auvio
$url rtbfradioplayer.be
$type live, vod
$region Belgium, Europe
"""
import datetime
import logging
import re
from html import unescape as html_unescape
from streamlink.plugin import Plugin, plugin... |
extractor | oktoberfesttv | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class OktoberfestTVIE(InfoExtractor):
_VALID_URL = (
r"https?://(?:www\.)?oktoberfest-tv\.de/[^/]+/[^/]+/video/(?P<id>[^/?#]+)"
)
_TEST = {
"url": "http://www.oktoberfest-tv.de/de/kameras/video/hb-z... |
qltk | completion | # Copyright 2005 Joe Wreschnig, Michael Urman,
# 2011 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 v... |
OAuth2 | AuthorizationHelpers | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import secrets
import urllib.parse
from base64 import b64encode
from datetime import datetime
from hashlib import sha512
from typing import Callable, Optional
from cura.OAuth2.Models import AuthenticationResponse, OAuth2Se... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.