section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
Bookmarks | DNDArrayController | #
# DNDArrayController.py
# Bookmarks
#
# Converted by u.fiedler on 10.02.05.
#
# The original version was written in Objective-C by Malcolm Crawford
# at http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
#
# See "Dragging Files" for a conceptual introduction:
# file:///Developer/ADC%20Reference%20Lib... |
gui | fitRename | import eos.db
import gui.globalEvents as GE
import gui.mainFrame
import wx
from gui.fitCommands.calc.fitRename import CalcFitRenameCommand
from gui.fitCommands.helpers import InternalCommandHistory
class GuiRenameFitCommand(wx.Command):
def __init__(self, fitID, name):
wx.Command.__init__(self, True, "Ren... |
views | dashboard | # encoding: utf-8
from __future__ import annotations
import logging
from typing import Any
import ckan.lib.base as base
import ckan.lib.helpers as h
from ckan.common import _, current_user
from ckan.types import Context
from ckan.views.user import _extra_template_variables
from flask import Blueprint
log = logging.g... |
examples | reconstruction | #!/usr/bin/env python
#
# Copyright 2010,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
import numpy
from gnuradio import blocks, digital, filter, gr
from gnuradio.fft import window
try:
from gnuradio import channels
except... |
PyObjCTest | test_nsattributedstring_appkit | from AppKit import *
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
try:
long
except NameError:
long = int
class TestNSAttributedString(TestCase):
def testConstants(self):
self.assertIsInstance(NSFontAttributeName, unicode)
self.assertIsInstan... |
colors | hcywheel | # -*- coding: utf-8 -*-
# This file is part of MyPaint.
# Copyright (C) 2012-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 Licens... |
config | configexc | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Exceptions related to config parsing."""
import dataclasses
import difflib
from typing import Any, List, Mapping, Optional, Sequence, Union
from qutebrowser.utils import log, usertypes
cl... |
narrowband | digital_bert_tx | #!/usr/bin/env python
#
# Copyright 2008,2011,2013 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, digital, eng_notation, gr
from gnuradio.eng_option import eng_option
# from ... |
httpie | client | import argparse
import http.client
import json
import sys
from contextlib import contextmanager
from time import monotonic
from typing import Any, Callable, Dict, Iterable
from urllib.parse import urlparse, urlunparse
import requests
# noinspection PyPackageRequirements
import urllib3
from urllib3.util import SKIP_HE... |
cura | BackendPlugin | # Copyright (c) 2023 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os
import socket
import subprocess
from typing import List, Optional
from UM.i18n import i18nCatalog
from UM.Logger import Logger
from UM.Message import Message
from UM.Platform import Platform
from UM.PluginObject i... |
preferences | lyrics | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 1, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY W... |
vendor | with_attrs_docs | # Based on pydantic-settings version 0.2.5 by Daniel Daniels, licensed under MIT
#
# https://github.com/danields761/pydantic-settings
from typing import Type
from class_doc import extract_docs_from_cls_obj
from pydantic import BaseModel
def apply_attributes_docs(
model: Type[BaseModel], override_existing: bool ... |
interactions | executionspecification | """An ExecutionSpecification is defined by a white recrange overlaying the
lifeline.
,----------.
| lifeline |
`----------'
| --- Lifeline
,+. -- ExecutionOccurrenceSpecification
| | -- ExecutionSpecification
`+' -- ExecutionOccurrentSpecification
|
ExecutionOccurrenceSpecifi... |
shelf | shelf_actions | """ shelf views """
from bookwyrm import forms, models
from bookwyrm.views.helpers import redirect_to_referer
from django.contrib.auth.decorators import login_required
from django.db import IntegrityError, transaction
from django.shortcuts import get_object_or_404, redirect
from django.views.decorators.http import requ... |
lib | caching | """
CherryPy implements a simple caching system as a pluggable Tool. This tool
tries to be an (in-process) HTTP/1.1-compliant cache. It's not quite there
yet, but it's probably good enough for most sites.
In general, GET responses are cached (along with selecting headers) and, if
another request arrives for the same r... |
migrations | 0146_eventproperty_sync | # Generated by Django 3.0.11 on 2021-04-05 19:23
from django.db import migrations
ATTRIBUTES = (
"event_names",
"event_names_with_usage",
"event_properties",
"event_properties_with_usage",
"event_properties_numerical",
)
def sync_event_and_properties_definitions(
team_uuid: str, Team, EventD... |
program | soxi | import logging
import os
from whipper.common import common
from whipper.common import task as ctask
logger = logging.getLogger(__name__)
SOXI = "soxi"
class AudioLengthTask(ctask.PopenTask):
"""
Calculate the length of a track in audio samples.
:cvar length: length of the decoded audio file, in audio ... |
localModule | add | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.module.localAdd import CalcAddLocalModuleCommand
from gui.fitCommands.helpers import (
InternalCommandHistory,
ModuleInfo,
restoreRemovedDummies,
)
from service.fit import Fit
from service.market import... |
extractor | popcorntv | from __future__ import unicode_literals
import re
from ..utils import extract_attributes, int_or_none, unified_timestamp
from .common import InfoExtractor
class PopcornTVIE(InfoExtractor):
_VALID_URL = (
r"https?://[^/]+\.popcorntv\.it/guarda/(?P<display_id>[^/]+)/(?P<id>\d+)"
)
_TESTS = [
... |
animosd | main | # Copyright (c) 2012,2013,2016 Nick Boultbee
# Copyright (C) 2012-13 Thomas Vogt
# Copyright (C) 2008 Andreas Bombe
# Copyright (C) 2005 Michael Urman
# Based on osd.py (C) 2005 Ton van den Heuvel, Joe Wreshnig
# (C) 2004 Gustavo J. A. M. Carneiro
#
# This program is free software; you can redistribute... |
experiments | secondary_experiment_result | from datetime import datetime
from typing import Dict, Optional
from zoneinfo import ZoneInfo
from ee.clickhouse.queries.experiments.trend_experiment_result import (
uses_count_per_property_value_aggregation,
uses_count_per_user_aggregation,
)
from posthog.constants import INSIGHT_FUNNELS, INSIGHT_TRENDS, TREN... |
scripts | RetractContinue | # Copyright (c) 2023 UltiMaker B.V.
# The PostProcessingPlugin is released under the terms of the LGPLv3 or higher.
from typing import List, Tuple
from UM.Application import Application # To get current absolute/relative setting.
from UM.Math.Vector import Vector
from ..Script import Script
class RetractContinue(... |
masstag | config | import glob
import os
from ..audioinfo import encode_fn
from ..constants import CONFIGDIR
from ..masstag import MassTagProfile, TagSourceProfile, fields_from_text
from ..puddleobjects import PuddleConfig
PROFILEDIR = os.path.join(CONFIGDIR, "masstagging")
CONFIG = os.path.join(CONFIGDIR, "masstagging.conf")
ALBUM_BO... |
cherrypy | _cpreqbody | """Request body processing for CherryPy.
.. versionadded:: 3.2
Application authors have complete control over the parsing of HTTP request
entities. In short,
:attr:`cherrypy.request.body<cherrypy._cprequest.Request.body>`
is now always set to an instance of
:class:`RequestBody<cherrypy._cpreqbody.RequestBody>`,
and *... |
Code | GestorSolo | import os
import sys
import time
from Code import PGN, ControlPosicion, Gestor, TrListas, Util
from Code.Constantes import *
from Code.QT import (
Controles,
Iconos,
PantallaAperturas,
PantallaEntMaq,
PantallaPGN,
PantallaSolo,
QTUtil,
QTUtil2,
QTVarios,
Voyager,
)
from PyQt4.Qt... |
bs4 | dammit | # -*- coding: utf-8 -*-
"""Beautiful Soup bonus library: Unicode, Dammit
This library converts a bytestream to Unicode through any means
necessary. It is heavily based on code from Mark Pilgrim's Universal
Feed Parser. It works best on XML and HTML, but it does not rewrite the
XML or HTML to reflect a new encoding; th... |
BOPTools | GeneralFuseResult | # /***************************************************************************
# * Copyright (c) 2016 Victor Titov (DeepSOIC) <vv.titov@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
gadgets | matcher_ah | # 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
... |
source | make_release | #!/usr/bin/env python
#
# Copyright 2014 Calum Lind <calumlind@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 os.path
fr... |
bitmessageqt | safehtmlparser | """Subclass of HTMLParser.HTMLParser for MessageView widget"""
import inspect
import re
from urllib import quote_plus
from HTMLParser import HTMLParser
from urlparse import urlparse
class SafeHTMLParser(HTMLParser):
"""HTML parser with sanitisation"""
# from html5lib.sanitiser
acceptable_elements = (
... |
migrations | 0008_auto_20221201_0809 | # Generated by Django 3.2.16 on 2022-12-01 08:09
import django_migration_linter as linter
import pytz
from common.timezones import is_valid_timezone
from django.db import migrations
from django.db.models import Q
def fix_bad_timezone_values(model):
def _fix_bad_timezone_values(apps, _schema_editor):
"""
... |
Machines | MachineNode | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Dict, List
import cura.CuraApplication # Imported like this to prevent circular dependencies.
import UM.FlameProfiler
from cura.Machines.ContainerNode import ContainerNode
from cura.Machines.MaterialNod... |
femviewprovider | view_constraint_centrif | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
neubot | connector | # neubot/connector.py
#
# Copyright (c) 2010-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... |
engines | prowlarr | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Prowlarr search (Files)
"""
from json import loads
from urllib.parse import urlencode
from searx.exceptions import SearxEngineAPIException
categories = ""
paging = False
api_key = ""
indexer_ids = ""
search_type = "search"
search_categories = ""
base_url = ""
de... |
AddonManager | expanded_view | # -*- coding: utf-8 -*-
################################################################################
## Form generated from reading UI file 'expanded_view.ui'
##
## Created by: Qt User Interface Compiler version 5.15.1
##
## WARNING! All changes made in this file will be lost when recompiling UI file!
############... |
states | state | """State diagram item."""
from __future__ import annotations
from gaphas.types import Pos
from gaphor import UML
from gaphor.core.modeling.element import Element
from gaphor.core.modeling.properties import attribute
from gaphor.core.styling import JustifyContent, TextAlign
from gaphor.diagram.presentation import Elem... |
core | parseheader_generic | #
# Copyright 2020 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
""" Module to generate AST for the headers and parse it """
import codecs
import logging
import os
import re
from ..core import Constants
from ..core.base import BlockTool, BlockTool... |
downloaders | PornovkaCz | # -*- coding: utf-8 -*-
import re
from ..base.downloader import BaseDownloader
class PornovkaCz(BaseDownloader):
__name__ = "PornovkaCz"
__type__ = "downloader"
__version__ = "0.02"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?pornovka\.cz/(.+)"
__config__ = [("enabled", "bool",... |
extractor | chirbit | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_b64decode
from ..utils import parse_duration
from .common import InfoExtractor
class ChirbitIE(InfoExtractor):
IE_NAME = "chirbit"
_VALID_URL = r"https?://(?:www\.)?chirb\.it/(?:(?:wp|pl)/|fb_chirbit_player\.swf\?k... |
mod-dash | client_smpl | # mod_dash/client_smpl.py
#
# Copyright (c) 2013 Antonio Servetti <antonio.servetti@polito.it>
#
# Copyright (c) 2010-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 ... |
migrations | upgrade1 | """
Migration 1
- Alters fits table to introduce target resist attribute
- Converts modules based on Oceanus Module Tiericide
Some modules have been deleted, which causes pyfa to crash when fits are
loaded as they no longer exist in the database. We therefore replace these
modules with their new replacemen... |
neubot | updater_verify | # neubot/updater_verify.py
#
# Copyright (c) 2011-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 Genera... |
widgets | listctrl | # ----------------------------------------------------------------------------
# Name: wxPython.lib.mixins.listctrl
# Purpose: Helpful mix-in classes for wxListCtrl
#
# Author: Robin Dunn
#
# Created: 15-May-2001
# RCS-ID: $Id: listctrl.py 54544 2008-07-08 02:36:46Z RD $
# Copyright: (c) 2001... |
Test | TestPeer | import io
import time
import pytest
from Crypt import CryptHash
from File import FileRequest, FileServer
from . import Spy
@pytest.mark.usefixtures("resetSettings")
@pytest.mark.usefixtures("resetTempSettings")
class TestPeer:
def testPing(self, file_server, site, site_temp):
file_server.sites[site.addr... |
data | polydata_utils | # --------------------------------------------------------------------------
# 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... |
reports | views | # -*- coding: utf-8 -*-
from babybuddy.mixins import PermissionRequiredMixin
from core import models
from django.views.generic.detail import DetailView
from . import graphs
class BMIChangeChildReport(PermissionRequiredMixin, DetailView):
"""
Graph of BMI change over time.
"""
model = models.Child
... |
widgets | title_bar | from __future__ import absolute_import
import math
from gi.repository import Gdk, Gtk, Pango
from sunflower.common import decode_file_name
from sunflower.widgets.breadcrumbs import Breadcrumbs
from sunflower.widgets.context_menu import ContextMenu
class Mode:
NORMAL = 0
SUPER_USER = 1
class TitleBar:
... |
plugins | pluginbase | #
# Copyright (C) 2007-2010 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 de... |
api | client | # neubot/api/client.py
#
# Copyright (c) 2011 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 Public ... |
Gui | Pocket | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
migrations | 0003_archivesspacedipobjectresourcepairing_data | from django.db import migrations
def data_migration(apps, schema_editor):
# The new chain - begins with selecting config, then calls upload script.
# The magic that pops open a new window happens in the dashboard UI, and isn't handled here.
archivesspace_upload_chain = "3572f844-5e69-4000-a24b-4e32d3487f8... |
module | projectedAdd | import eos.db
import wx
from eos.const import FittingModuleState
from gui.fitCommands.helpers import restoreCheckedStates
from logbook import Logger
from service.fit import Fit
pyfalog = Logger(__name__)
class CalcAddProjectedModuleCommand(wx.Command):
def __init__(
self, fitID, modInfo, position=None, i... |
tasks | acknowledge_reminder | from common.custom_celery_tasks import shared_dedicated_queue_retry_task
from django.conf import settings
from django.db import transaction
from .send_alert_group_signal import send_alert_group_signal
from .task_logger import task_logger
MAX_RETRIES = 1 if settings.DEBUG else None
@shared_dedicated_queue_retry_task... |
dom | constants | from js2py.base import *
def _get_conts(idl):
def is_valid(c):
try:
exec(c)
return 1
except:
pass
return "\n".join(
filter(
is_valid, (" ".join(e.strip(" ;").split()[-3:]) for e in idl.splitlines())
)
)
default_attrs = {"wr... |
migrate | migrate | # 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, ... |
rest | aiohttp_patch | from asyncio import CancelledError, Task
from threading import Lock
from typing import Type
from aiohttp import StreamReader
from aiohttp.abc import AbstractStreamWriter
from aiohttp.http_parser import RawRequestMessage
from aiohttp.web_app import Application
from aiohttp.web_protocol import RequestHandler
from aiohtt... |
KindleUnpack | mobi_cover | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
from __future__ import absolute_import, division, print_function, unicode_literals
import imghdr
import os
import struct
from .compatibility_utils import unicode_str
from .unipath import pathof
# note: struct pack, unpac... |
fcsprocket | fcsprocketdialog | # (c) 2020 Adam Spontarelli <adam@vector-space.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License (LGPL)
# as published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later versi... |
extractor | kaltura | # coding: utf-8
from __future__ import unicode_literals
import base64
import re
from ..compat import compat_parse_qs, compat_urlparse
from ..utils import ExtractorError, clean_html, int_or_none, smuggle_url, unsmuggle_url
from .common import InfoExtractor
class KalturaIE(InfoExtractor):
_VALID_URL = r"""(?x)
... |
Test | TestRateLimit | import time
import gevent
from util import RateLimit
# Time is around limit +/- 0.05 sec
def around(t, limit):
return t >= limit - 0.05 and t <= limit + 0.05
class ExampleClass(object):
def __init__(self):
self.counted = 0
self.last_called = None
def count(self, back="counted"):
... |
Pyfa | config | import hashlib
import os
import sys
import wx
import yaml
from cryptography.fernet import Fernet
from eos.const import FittingSlot
from logbook import (
CRITICAL,
DEBUG,
ERROR,
INFO,
WARNING,
FingersCrossedHandler,
Logger,
NestedSetup,
NullHandler,
StreamHandler,
TimedRotati... |
blocks | qa_mute | #!/usr/bin/env python
#
# Copyright 2004,2005,2007,2010,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from gnuradio import blocks, gr, gr_unittest
class test_mute(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block()
... |
frescobaldi-app | _main_ | # 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 | profiles_model | """
@file
@brief This file contains the profiles model, used by the Profile dialog
@author Jonathan Thomas <jonathan@openshot.org>
@section LICENSE
Copyright (c) 2008-2023 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Editor (http://www.openshot.org), an open-sourc... |
lib | generate_strings | # 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, ... |
events | headphonemon | # Copyright 2015 Christoph Reiter
# 2017 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.
impo... |
PrinterOutput | FirmwareUpdater | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from enum import IntEnum
from threading import Thread
from typing import Union
from PyQt6.QtCore import QObject, QUrl, pyqtProperty, pyqtSignal
from UM.Logger import Logger
MYPY = False
if MYPY:
from cura.PrinterOutpu... |
hogql | visitor | from typing import Optional
from posthog.hogql import ast
from posthog.hogql.base import AST, Expr
from posthog.hogql.errors import HogQLException
def clone_expr(expr: Expr, clear_types=False, clear_locations=False) -> Expr:
"""Clone an expression node."""
return CloningVisitor(
clear_types=clear_typ... |
gui | displayfilter | # 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 ... |
SceneDetails | Camera | # /***************************************************************************
# * Copyright (c) 2019 Victor Titov (DeepSOIC) <vv.titov@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
scripts | gprof2dot | #!/usr/bin/env python
#
# Copyright 2008-2009 Jose Fonseca
#
# This program 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 version 3 of the License, or
# (at your option) any later version.
#
# ... |
config | config | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Configuration storage and config-related utilities."""
import contextlib
import copy
import functools
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Iterator,
... |
musicview | 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
... |
Resources | audio | """
Copyright 2009-2017 Olivier Belanger
This file is part of SoundGrain.
SoundGrain is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Sound... |
query | pythonexpression | # Copyright 2016 Ryan Dellenbaugh
# 2017 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.
impo... |
extractor | vice | # coding: utf-8
from __future__ import unicode_literals
import functools
import hashlib
import json
import random
import re
import time
from ..compat import compat_HTTPError, compat_str
from ..utils import (
ExtractorError,
OnDemandPagedList,
clean_html,
int_or_none,
parse_age_limit,
str_or_no... |
mail | attachment | class Attachment(object):
"""An attachment to be included with an email."""
def __init__(self):
"""Create an empty Attachment."""
self._content = None
self._type = None
self._filename = None
self._disposition = None
self._content_id = None
@property
def ... |
util | soundfile | #!/usr/bin/python3
# -*- coding: utf-8 -*-
#
# SoundConverter - GNOME application for converting between audio formats.
# Copyright 2004 Lars Wirzenius
# Copyright 2005-2020 Gautier Portet
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... |
conf | base_settings | #
# Quru Image Server
#
# Base server settings (production settings)
#
# Do not edit this file - it will be overwritten when you upgrade the package.
#
# These settings can instead be overridden by creating the file
# <base>/conf/local_settings.py and adding entries there instead.
#
# The server's public/external host... |
ctrlport | GrDataPlotter | #!/usr/bin/env python
#
# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import struct
import sys
import time
from gnuradio import blocks, fft, filter, gr
from gnuradio.ctrlport.GNURadio import ControlPort
try:
import sip
... |
feminout | convert2TetGen | # ***************************************************************************
# * Copyright (c) 2010 Juergen Riegel <juergen.riegel@web.de> *
# * Copyright (c) 2018 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
api | radio | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2020-2022 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
from flask import request
from ..db import RadioStation
from . import api_routing, get_entity
from .exceptions imp... |
aliceVision | SfMTransform | __version__ = "3.1"
import os.path
from meshroom.core import desc
class SfMTransform(desc.AVCommandLineNode):
commandLine = "aliceVision_sfmTransform {allParams}"
size = desc.DynamicNodeSize("input")
category = "Utils"
documentation = """
This node allows to change the coordinate system of one SfM ... |
localModule | remove | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.module.localRemove import CalcRemoveLocalModulesCommand
from gui.fitCommands.helpers import InternalCommandHistory, restoreRemovedDummies
from service.fit import Fit
from service.market import Market
class GuiRem... |
crypto | keymanager | import binascii
import pkgutil
import textwrap
from binascii import a2b_base64, b2a_base64, unhexlify
from hashlib import sha256
from ..helpers import Error, bin_to_hex, dash_open, yes
from ..manifest import Manifest, NoManifestError
from ..repoobj import RepoObj
from ..repository import Repository
from .key import CH... |
Test | TestCrypt | import base64
import pytest
from CryptMessage import CryptMessage
@pytest.mark.usefixtures("resetSettings")
class TestCrypt:
publickey = "A3HatibU4S6eZfIQhVs2u7GLN5G9wXa9WwlkyYIfwYaj"
privatekey = "5JBiKFYBm94EUdbxtnuLi6cvNcPzcKymCUHBDf2B6aq19vvG3rL"
utf8_text = "\xc1rv\xedzt\xfbr\xf5t\xfck\xf6rf\xfar\xf... |
sunflower | emblems | from __future__ import absolute_import
import os
import sqlite3 as sql
from gi.repository import Gtk
from sunflower.common import encode_file_name, get_cache_directory
class EmblemManager:
"""Manager class for item emblems.
This object is used for managing emblems for items as well as rendering Pixbuffs.
... |
downloaders | MystoreTo | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
#
# Test link:
# http://mystore.to/dl/mxcA50jKfP
class MystoreTo(SimpleDownloader):
__name__ = "MystoreTo"
__type__ = "downloader"
__version__ = "0.08"
__status__ = "testing"
__pattern__ = r"https?://(?:ww... |
lib | gettext_setup | # This file is part of MyPaint.
# Copyright (C) 2007-2013 by Martin Renold <martinxyz@gmx.ch>
# Copyright (C) 2013-2019 by the MyPaint Development Team.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fou... |
lib | log | # 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, ... |
ui | ui_options_interface_top_tags | # -*- coding: utf-8 -*-
# Automatically generated - don't edit.
# Use `python setup.py build_ui` to update it.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_InterfaceTopTagsOptionsPage(object):
def setupUi(self, InterfaceTopTagsOptionsPage):
InterfaceTopTagsOptionsPage.setObjectName("InterfaceTop... |
plugins | vlive | """
$description South Korean live-streaming social platform with a focus on celebrities.
$url vlive.tv
$type live
$notes Embedded Naver VODs are not supported
"""
import logging
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import ... |
migrations | 0016_populate_ddc | from django.db import migrations
def create_ddc(apps, schema_editor):
"""
Creates a set of standard licenses
"""
DDC = apps.get_model("deposit", "DDC")
ddcs = [
{
"number": 0,
"name": "Computer science, knowledge & systems",
},
{
"number... |
PyObjCTest | test_cfmessageport | from CoreFoundation import *
from PyObjCTools.TestSupport import *
try:
long
except NameError:
long = int
class TestMessagePort(TestCase):
def testTypes(self):
self.assertIsCFType(CFMessagePortRef)
def testConstants(self):
self.assertEqual(kCFMessagePortSuccess, 0)
self.asser... |
CTFd | auth | import base64 # noqa: I001
import requests
from CTFd.cache import clear_team_session, clear_user_session
from CTFd.models import Teams, UserFieldEntries, UserFields, Users, db
from CTFd.utils import config, email, get_app_config, get_config
from CTFd.utils import user as current_user
from CTFd.utils import validators... |
Inspection | InitGui | # ***************************************************************************
# * Copyright (c) 2002,2003 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
digital | qa_burst_shaper | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
import numpy as np
import pmt
from gnuradio import blocks, digital, gr, gr_unittest
def make_length_tag(offset, length):
... |
friture | spectrogram | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009 Timoth?Lecomte
# This file is part of Friture.
#
# Friture is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# Friture is distribu... |
collection | prefs | # Copyright 2010, 2012-2014 Christoph Reiter
#
# 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 impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.