section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
nfoview | preferences | # -*- coding: utf-8 -*-
# Copyright (C) 2008 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... |
serializers | channel_filter | import typing
from apps.alerts.models import AlertReceiveChannel, ChannelFilter, EscalationChain
from apps.api.serializers.alert_receive_channel import (
valid_jinja_template_for_serializer_method_field,
)
from apps.base.messaging import get_messaging_backend_from_id
from apps.telegram.models import TelegramToOrga... |
nfoview | view | # -*- 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... |
gui | Bars | """
Copyright 2007, 2008, 2009, 2015, 2016 Free Software Foundation, Inc.
This file is part of GNU Radio
SPDX-License-Identifier: GPL-2.0-or-later
"""
import logging
from gi.repository import Gio, GLib, GObject, Gtk
from . import Actions
log = logging.getLogger(__name__)
"""
# Menu/Toolbar Lists:
#
# Sub items... |
extractor | vrv | # coding: utf-8
from __future__ import unicode_literals
import base64
import hashlib
import hmac
import json
import random
import string
import time
from ..compat import (
compat_HTTPError,
compat_urllib_parse,
compat_urllib_parse_urlencode,
)
from ..utils import ExtractorError, float_or_none, int_or_none... |
gui | projectedChangeProjectionRange | import eos.db
import gui.mainFrame
import wx
from eos.saveddata.drone import Drone as EosDrone
from eos.saveddata.fighter import Fighter as EosFighter
from eos.saveddata.fit import Fit as EosFit
from eos.saveddata.module import Module as EosModule
from gui import globalEvents as GE
from gui.fitCommands.calc.drone.proje... |
sendgrid | sendgrid | """
This library allows you to quickly and easily use the SendGrid Web API v3 via
Python.
For more information on this library, see the README on Github.
http://github.com/sendgrid/sendgrid-python
For more information on the SendGrid v3 API, see the v3 docs:
http://sendgrid.com/docs/API_Reference/api_v3.html
F... |
util | tornado | __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"
import logging
import mimetypes
import os
import re
import sys
from urllib.parse im... |
extractor | lego | # coding: utf-8
from __future__ import unicode_literals
import re
import uuid
from ..compat import compat_HTTPError
from ..utils import ExtractorError, int_or_none, qualities
from .common import InfoExtractor
class LEGOIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?lego\.com/(?P<locale>[a-z]{2}-[a-z]{2})/... |
deluge-webui | core | #
# Copyright (C) 2009 Damien Churchill <damoxc@gmail.com>
#
# Basic plugin template created by:
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
#... |
saveddata | mutatedMixin | # ===============================================================================
# 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, ... |
views | goal | """ non-interactive pages """
from bookwyrm import forms, models
from bookwyrm.status import create_generated_note
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseNotFound
from django.shortcuts import redirect
from django.template.loader import get_template
from django.temp... |
PyObjCTest | test_archive_python | """
Testcases for NSArchive-ing python objects.
(Implementation is incomplete)
"""
import os
import pickle
import sys
if sys.version_info[0] == 3:
import copyreg
else:
import copy_reg as copyreg
import objc._pycoder as pycoder
from PyObjCTest.fnd import (
NSArchiver,
NSArray,
NSData,
NSDicti... |
versions | 063_8b633852cb7a_org_changes | # encoding: utf-8
"""063 Org changes
Revision ID: 8b633852cb7a
Revises: 6deb2bbab394
Create Date: 2018-09-04 18:49:10.608831
"""
import sqlalchemy as sa
from alembic import op
from ckan.migration import skip_based_on_legacy_engine_version
# revision identifiers, used by Alembic.
revision = "8b633852cb7a"
down_revisi... |
general | metadata | from gaphor.core.modeling.properties import attribute
from gaphor.core.styling import (
FontWeight,
JustifyContent,
Style,
TextAlign,
VerticalAlign,
)
from gaphor.diagram.presentation import ElementPresentation
from gaphor.diagram.shapes import (
Box,
Orientation,
Text,
draw_border,
... |
frescobaldi-app | contextmenu | # 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
... |
midifile | song | # Python midifile package -- parse, load and play MIDI files.
# Copyright (c) 2011 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License... |
lector | models | # This file is a part of Lector, a Qt based ebook reader
# Copyright (C) 2017-2019 BasioMeusPuga
# 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 o... |
apps | uhd_display | #!/usr/bin/env python
#
# Copyright 2009,2011 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
from gnuradio import blocks, eng_notation, fft, filter, gr, uhd
from gnuradio.eng_option import eng_option
try... |
examples | pyqt_freq_c | #!/usr/bin/env python
#
# Copyright 2012,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
from gnuradio import blocks, filter, gr
from gnuradio.fft import window
try:
import sip
from gnuradio import qtgui
from PyQt5 import... |
Peer | PeerPortchecker | import logging
import re
import time
import urllib.parse
import urllib.request
from Debug import Debug
from util import UpnpPunch
class PeerPortchecker(object):
checker_functions = {
"ipv4": ["checkIpfingerprints", "checkCanyouseeme"],
"ipv6": ["checkMyaddr", "checkIpv6scanner"],
}
def _... |
plugins | unique_prices | """This module adds validation that there is a single price defined per
date and base/quote currencies. If multiple conflicting price values are
declared, an error is generated. Note that multiple price entries with the
same number do not generate an error.
This is meant to be turned on if you want to use a very stric... |
parts | plgarea | # -*- 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... |
qtui | phrasepage | # Copyright (C) 2011 Chris Dekter
# Copyright (C) 2018, 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 opt... |
Assembly | CommandCreateJoint | # SPDX-License-Identifier: LGPL-2.1-or-later
# /****************************************************************************
# *
# Copyright (c) 2023 Ondsel <development@ondsel.com> *
# ... |
phone-notifications | simple_phone_provider | import logging
from random import randint
from django.core.cache import cache
from .exceptions import FailedToSendSMS, FailedToStartVerification
from .phone_provider import PhoneProvider, ProviderFlags
logger = logging.getLogger(__name__)
class SimplePhoneProvider(PhoneProvider):
"""
SimplePhoneProvider is... |
graphs | diaperchange_lifetimes | # -*- coding: utf-8 -*-
import plotly.graph_objs as go
import plotly.offline as plotly
from django.utils.translation import gettext as _
from reports import utils
def diaperchange_lifetimes(changes):
"""
Create a graph showing how long diapers last (time between changes).
:param changes: a QuerySet of Dia... |
reports | utils | # -*- coding: utf-8 -*-
def default_graph_layout_options():
"""
Default layout options for all graphs.
:returns: a dict of default options.
"""
return {
"paper_bgcolor": "rgb(52, 58, 64)",
"plot_bgcolor": "rgb(52, 58, 64)",
"font": {
"color": "rgba(255, 255, 255... |
orm-bindings | channel_node | import random
from datetime import datetime
from ipv8.keyvault.crypto import default_eccrypto
from pony import orm
from pony.orm.core import DEFAULT, db_session
from tribler.core.components.metadata_store.db.orm_bindings.discrete_clock import clock
from tribler.core.components.metadata_store.db.serialization import (
... |
PyObjCTest | test_ikslideshow | from PyObjCTools.TestSupport import *
from Quartz import *
try:
unicode
except NameError:
unicode = str
class TestIKSlideShowHelper(NSObject):
def slideshowItemAtIndex_(self, idx):
return None
def nameOfSlideshowItemAtIndex_(self, idx):
return None
def canExportSlideshowItemAtIn... |
extractor | cbssports | from __future__ import unicode_literals
import re
from ..utils import int_or_none, try_get
# from .cbs import CBSBaseIE
from .common import InfoExtractor
# class CBSSportsEmbedIE(CBSBaseIE):
class CBSSportsEmbedIE(InfoExtractor):
IE_NAME = "cbssports:embed"
_VALID_URL = r"""(?ix)https?://(?:(?:www\.)?cbs|e... |
albums | main | # Copyright 2004-2007 Joe Wreschnig, Michael Urman, Iñigo Serna
# 2009-2010 Steven Robertson
# 2012-2022 Nick Boultbee
# 2009-2014 Christoph Reiter
# 2018-2020 Uriel Zajaczkovski
# 2019 Ruud van Asseldonk
#
# This program is free software; you can redistribute it a... |
draftutils | todo | # ***************************************************************************
# * (c) 2009, Yorik van Havre <yorik@uncreated.net> *
# * (c) 2019 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * *
# * Th... |
sslcrypto | _ecc | import hashlib
import hmac
import struct
import base58
try:
hashlib.new("ripemd160")
except ValueError:
# No native implementation
from . import _ripemd
def ripemd160(*args):
return _ripemd.new(*args)
else:
# Use OpenSSL
def ripemd160(*args):
return hashlib.new("ripemd160", *a... |
queries | session_recording_properties | from datetime import timedelta
from typing import TYPE_CHECKING, Any, Dict, List, NamedTuple, Tuple
from posthog.client import sync_execute
from posthog.models.event.util import parse_properties
from posthog.models.filters.session_recordings_filter import SessionRecordingsFilter
from posthog.queries.event_query import... |
PyObjCTest | test_structs | """
XXX: Add tests that check that the type actually works as expected:
* Use struct value as method argument
* Return struct value from a method
Add tests for nested structs as well (that is assert that NSRect.location is
an NSPoint, but using our own types)
"""
import objc
from PyObjCTest.fnd import NSObject
from P... |
fta | majorityvotegate | """Majority vote gate item definition."""
from math import pi
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 ... |
archivebox | main | __package__ = "archivebox"
import os
import platform
import shutil
import sys
from datetime import date, datetime
from pathlib import Path
from typing import IO, Dict, Iterable, List, Optional, Union
from crontab import CronSlices, CronTab
from django.db.models import QuerySet
from django.utils import timezone
from ... |
filter | qa_freq_xlating_fft_filter | #!/usr/bin/env python
#
# Copyright 2008,2010,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import cmath
import math
from gnuradio import blocks, filter, gr, gr_unittest
def fir_filter(x, taps, decim=1):
y = []
x2 = (len(taps) -... |
autokey | common | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# 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 late... |
digital | qa_meas_evm_cc | #!/usr/bin/env python
#
# Copyright 2020 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import random
import numpy
from gnuradio import blocks, channels, digital, gr, gr_unittest
class qa_meas_evm_cc(gr_unittest.TestCase):
def setUp(self):
... |
frescobaldi-app | bugreport | # 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
... |
config | environment | # encoding: utf-8
"""CKAN environment configuration"""
from __future__ import annotations
import logging
import os
import warnings
from typing import Union, cast
import ckan.authz as authz
import ckan.lib.app_globals as app_globals
import ckan.lib.helpers as helpers
import ckan.lib.plugins as lib_plugins
import ckan.... |
invesalius | project | # --------------------------------------------------------------------------
# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
# Homepage: http://www.softwarepublico.gov.br
# Contact: invesalius@cti.gov.br
# License: GNU... |
autokey | macro | import datetime
import shlex
from abc import abstractmethod
from autokey import common
from autokey.model.key import KEY_SPLIT_RE, Key
if common.USING_QT:
from PyQt5.QtWidgets import QAction
def _(text: str, args: tuple = None):
"""localisation function, currently returns the identity. If args are gi... |
downloaders | DropDownload | # -*- coding: utf-8 -*-
from ..base.xfs_downloader import XFSDownloader
class DropDownload(XFSDownloader):
__name__ = "DropDownload"
__type__ = "downloader"
__version__ = "0.03"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?drop\.download/\w{12}"
__config__ = [
("enabled"... |
webengine | notification | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Different ways of showing notifications to the user.
Our notification implementation consists of two different parts:
- NotificationBridgePresenter, the object we set as notification presen... |
fcbt | DistTools | # shell and operating system
import os
verbose = 0
dcount = fcount = 0
maxfileload = 100000
blksize = 1024 * 8
def BuildDistName():
# Building dist name
# reading the last Version information
[FCVersionMajor, FCVersionMinor, FCVersionBuild, FCVersionDisDa] = open(
"../Version.h", "r"
).readli... |
autokey | monitor | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Chris Dekter
#
# 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 late... |
util | Event | # Based on http://stackoverflow.com/a/2022629
class Event(list):
def __call__(self, *args, **kwargs):
for f in self[:]:
if "once" in dir(f) and f in self:
self.remove(f)
f(*args, **kwargs)
def __repr__(self):
return "Event(%s)" % list.__repr__(self)
... |
neubot | runner_updates | # neubot/runner_updates.py
#
# Copyright (c) 2012 Simone Basso <bassosimone@gmail.com>,
# NEXA Center for Internet & Society at Politecnico di Torino
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Pub... |
Material | importFCMat | # ***************************************************************************
# * Copyright (c) 2013 Juergen Riegel <FreeCAD@juergen-riegel.net> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
vidcutter | videostyle | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#######################################################################
#
# VidCutter - media cutter & joiner
#
# copyright © 2018 Pete Alexandrou
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licen... |
schemas | fields | from CTFd.models import Fields, TeamFieldEntries, UserFieldEntries, db, ma
from marshmallow import fields
class FieldSchema(ma.ModelSchema):
class Meta:
model = Fields
include_fk = True
dump_only = ("id",)
class UserFieldEntriesSchema(ma.ModelSchema):
class Meta:
model = User... |
utils | visualization_utils_test | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
gtk3 | menubar_osx | #
# Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
from deluge.configmanager ... |
PyObjCTest | test_ikscannerdeviceview | from PyObjCTools.TestSupport import *
from Quartz import *
class TestIKScannerDeviceView(TestCase):
@min_os_level("10.6")
def testConstants10_6(self):
self.assertEqual(IKScannerDeviceViewTransferModeFileBased, 0)
self.assertEqual(IKScannerDeviceViewTransferModeMemoryBased, 1)
self.ass... |
migrations | 0311_dashboard_template_scope | # Generated by Django 3.2.16 on 2023-03-14 11:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0310_add_starter_dashboard_template"),
]
operations = [
migrations.AddField(
# safe to ignore null locking this table... |
books | books | """ the good stuff! the books! """
from uuid import uuid4
from bookwyrm import forms, models
from bookwyrm.activitypub import ActivitypubResponse
from bookwyrm.connectors import ConnectorException, connector_manager
from bookwyrm.connectors.abstract_connector import get_image
from bookwyrm.settings import PAGE_LENGTH
... |
process | plugins | """Site services for use with a Web Site Process Bus."""
import os
import re
import signal as _signal
import sys
import threading
import time
from cherrypy._cpcompat import (
SetDaemonProperty,
Timer,
basestring,
get_daemon,
get_thread_ident,
ntob,
set,
)
# _module__file__base is used by ... |
base | hoster | # -*- coding: utf-8 -*-
import inspect
import re
import time
import urllib.parse
from pyload.core.network.exceptions import Abort, Fail, Reconnect, Retry, Skip
from pyload.core.utils import format, parse
from pyload.core.utils.old import fixurl
from ..helpers import parse_html_form, replace_patterns
from .captcha imp... |
libraries | rhythmbox | # -*- coding: utf-8 -*-
# rhythmbox.py
# Copyright (C) 2008-2009 concentricpuddle
# This file is part of puddletag, a semi-good music tag editor.
# 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 Foundatio... |
objc | _lazyimport | """
Helper module that will enable lazy imports of Cocoa wrapper items.
This should improve startup times and memory usage, at the cost
of not being able to use 'from Cocoa import *'
"""
__all__ = ("ObjCLazyModule",)
import re
import struct
import sys
import objc
from objc import getClassList, loadBundle, lookUpClas... |
comictaggerlib | options | """CLI options class for ComicTagger app"""
# Copyright 2012-2014 Anthony Beville
# 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 r... |
lib | static | import mimetypes
import os
import re
import stat
try:
from io import UnsupportedOperation
except ImportError:
UnsupportedOperation = object()
import cherrypy
from cherrypy._cpcompat import ntob, unquote
from cherrypy.lib import cptools, file_generator_limited, httputil
mimetypes.init()
mimetypes.types_map[".... |
downloaders | GoogledriveCom | # -*- coding: utf-8 -*
#
# Test links:
# https://drive.google.com/file/d/0B6RNTe4ygItBQm15RnJiTmMyckU/view?pli=1
import json
import re
import urllib.parse
from pyload.core.network.http.exceptions import BadHeader
from pyload.core.utils import parse
from ..base.downloader import BaseDownloader
class Googledrive... |
cd | cdprefs | # 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... |
notes | note | from sglib import constants
from sglib.lib import util
from sglib.lib.translate import _
from sglib.lib.util import *
from sglib.math import clip_min, clip_value, color_interpolate, linear_interpolate
from sglib.models import stargate as sg_project
from sglib.models import theme
from sglib.models.daw import *
from sgui... |
command | set_config | import ast
def set_config(engine, cmdline):
"""
Set one or more Plover config options upon executing a stroke pattern.
Syntax:
{PLOVER:SET_CONFIG:option:value}
{PLOVER:SET_CONFIG:option1:value1,option2:value2,...}
Example usage:
"O*EP": "{PLOVER:SET_CONFIG:'translation_frame_opacity':1... |
PyObjCTest | test_cgimagedestination | from CoreFoundation import CFArrayRef
from Foundation import NSMutableData
from PyObjCTools.TestSupport import *
from Quartz import *
try:
unicode
except NameError:
unicode = str
try:
long
except NameError:
long = int
import os
import sys
if sys.version_info[0] != 2:
def buffer(value):
... |
mystran | writer | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
components | cas_auth | from os import environ
from django.core.exceptions import ImproperlyConfigured
# We default to a live demo CAS server to facilitate QA and regression
# testing. The following credentials can be used to authenticate:
# Username: admin
# Password: django-cas-ng
CAS_DEMO_SERVER_URL = "https://django-cas-ng-demo-server.h... |
tasks | notify_ical_schedule_shift | import datetime
import json
import typing
from typing import TYPE_CHECKING
from apps.schedules.ical_utils import calculate_shift_diff, parse_event_uid
from apps.slack.client import SlackClient
from apps.slack.errors import (
SlackAPIChannelArchivedError,
SlackAPIChannelNotFoundError,
SlackAPIInvalidAuthErr... |
cherrypy | _cpserver | """Manage HTTP servers with CherryPy."""
import warnings
import cherrypy
from cherrypy._cpcompat import basestring, py3k
from cherrypy.lib import attributes
# We import * because we want to export check_port
# et al as attributes of this module.
from cherrypy.process.servers import *
class Server(ServerAdapter):
... |
Settings | SimpleModeSettingsManager | # Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from PyQt6.QtCore import QObject, pyqtProperty, pyqtSignal
from UM.Application import Application
class SimpleModeSettingsManager(QObject):
def __init__(self, parent=None):
super().__init__(parent)
se... |
extractor | mlb | from __future__ import unicode_literals
import re
from ..utils import determine_ext, int_or_none, parse_duration, parse_iso8601, try_get
from .common import InfoExtractor
class MLBBaseIE(InfoExtractor):
def _real_extract(self, url):
display_id = self._match_id(url)
video = self._download_video_d... |
versions | 001_103676e0a497_create_existing_tables | # encoding: utf-8
"""Create existing tables
Revision ID: 103676e0a497
Revises:
Create Date: 2018-09-04 16:57:42.622504
"""
import sqlalchemy as sa
from alembic import op
from ckan.migration import skip_based_on_legacy_engine_version
# revision identifiers, used by Alembic.
revision = "103676e0a497"
down_revision = N... |
utils | test_utils_test | __copyright__ = "Copyright (C) 2014-2016 Martin Blais"
__license__ = "GNU GPLv2"
import io
import os
import unittest
from os import path
from beancount.utils import test_utils
class TestTestUtils(unittest.TestCase):
def test_tempdir(self):
with test_utils.tempdir() as tempdir:
with open(pat... |
phone-notifications | exceptions | class BaseFailed(Exception):
"""
Failed is base exception for all Failed... exceptions.
This exception is indicates error while performing some phone notification operation.
Optionally can contain graceful_msg attribute. When graceful_msg is provided it mean that error on provider side is
not our fa... |
classes | query | """
@file
@brief This file can easily query Clips, Files, and other project data
@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 ... |
gui | uicolor | # This file is part of MyPaint.
# Copyright (C) 2015 by Andrew Chadwick <a.t.chadwick@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your ... |
localModule | changeStates | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.module.localChangeStates import (
CalcChangeLocalModuleStatesCommand,
)
from gui.fitCommands.helpers import InternalCommandHistory, restoreRemovedDummies
from service.fit import Fit
class GuiChangeLocalModule... |
browser | urlmarks | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
# SPDX-FileCopyrightText: Antoni Boucher <bouanto@zoho.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Managers for bookmarks and quickmarks.
Note we violate our general QUrl rule by storing url strings in the marks
OrderedDict. This... |
plugins | app17 | """
$description Social platform delivering live broadcasts on diverse topics, from politics and music to entertainment.
$url 17app.co
$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... |
engines | kickass | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Kickass Torrent (Videos, Music, Files)
"""
from operator import itemgetter
from urllib.parse import quote, urljoin
from lxml import html
from searx.utils import convert_str_to_int, extract_text, get_torrent_size
# about
about = {
"website": "https://kickass.so",
... |
admin | users | from CTFd.admin import admin
from CTFd.models import Challenges, Tracking, Users
from CTFd.utils import get_config
from CTFd.utils.decorators import admins_only
from CTFd.utils.modes import TEAMS_MODE
from flask import render_template, request, url_for
from sqlalchemy.sql import not_
@admin.route("/admin/users")
@adm... |
plugins | nounused_test | __copyright__ = "Copyright (C) 2014-2017 Martin Blais"
__license__ = "GNU GPLv2"
import unittest
from beancount import loader
from beancount.parser import cmptest
from beancount.plugins import nounused
class TestValidateUnusedAccounts(cmptest.TestCase):
@loader.load_doc()
def test_validate_unused_accounts(... |
list | embed | """ book list views"""
from bookwyrm import models
from bookwyrm.settings import PAGE_LENGTH
from django.core.paginator import Paginator
from django.db.models import Avg, DecimalField
from django.db.models.functions import Coalesce
from django.http import Http404
from django.shortcuts import get_object_or_404
from djan... |
builtinViewColumns | projectionRange | # coding: utf-8
# =============================================================================
# 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 Fou... |
css | csscomment | """CSSComment is not defined in DOM Level 2 at all but a cssutils defined
class only.
Implements CSSRule which is also extended for a CSSComment rule type.
"""
__all__ = ["CSSComment"]
__docformat__ = "restructuredtext"
__version__ = "$Id$"
import xml.dom
import cssrule
import cssutils
class CSSComment(cssrule.CSS... |
fighter | projectedChangeProjectionRange | import wx
from logbook import Logger
from service.fit import Fit
pyfalog = Logger(__name__)
class CalcChangeProjectedFighterProjectionRangeCommand(wx.Command):
def __init__(self, fitID, position, projectionRange):
wx.Command.__init__(self, True, "Change Projected Fighter Projection Range")
self.f... |
extractor | tennistv | # coding: utf-8
from __future__ import unicode_literals
import json
from ..utils import ExtractorError, unified_timestamp
from .common import InfoExtractor
class TennisTVIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?tennistv\.com/videos/(?P<id>[-a-z0-9]+)"
_TEST = {
"url": "https://www.tennis... |
serializers | incidents | from apps.alerts.models import AlertGroup
from apps.telegram.models.message import TelegramMessage
from common.api_helpers.mixins import EagerLoadingMixin
from common.constants.alert_group_restrictions import IS_RESTRICTED_TITLE
from django.db.models import Prefetch
from rest_framework import serializers
class Incide... |
widgets | canvas_renderer | # -*- coding: utf-8 -*-
# --------------------------------------------------------------------------
# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
# Homepage: http://www.softwarepublico.gov.br
# Contact: invesalius@cti.go... |
migrations | 0004_kafka | from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions
from posthog.models.event.sql import (
DISTRIBUTED_EVENTS_TABLE_SQL,
WRITABLE_EVENTS_TABLE_SQL,
)
from posthog.models.person.sql import (
KAFKA_PERSONS_DISTINCT_ID_TABLE_SQL,
KAFKA_PERSONS_TABLE_SQL,
PERSONS_DISTINCT_ID_TA... |
backfill | fix_preview_images | # 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, ... |
gui | app | import os
import sys
import config
import wx
from logbook import Logger
pyfalog = Logger(__name__)
from service.settings import LocaleSettings
class PyfaApp(wx.App):
def OnInit(self):
"""
Do application initialization work, e.g. define application globals.
"""
# Name for my appl... |
parser | printer | """Conversion from internal data structures to text.
"""
__copyright__ = "Copyright (C) 2014-2018 Martin Blais"
__license__ = "GNU GPLv2"
import codecs
import datetime
import enum
import io
import re
import sys
import textwrap
from decimal import Decimal
from typing import Optional
from beancount.core import (
a... |
PathTests | TestPathToolChangeGenerator | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2021 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
mako | _ast_util | # mako/_ast_util.py
# Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
ast
~~~
The `ast` module helps Python applications to process trees of the Pyth... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.