section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
gui | colorpicker | # This file is part of MyPaint.
# Copyright (C) 2010-2020 by the MyPaint Development Team
# Copyright (C) 2009-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 Foun... |
snapshot-classes | escalation_policy_snapshot | import datetime
import typing
from collections import namedtuple
from apps.alerts.constants import NEXT_ESCALATION_DELAY
from apps.alerts.escalation_snapshot.utils import eta_for_escalation_step_notify_if_time
from apps.alerts.models.alert_group_log_record import AlertGroupLogRecord
from apps.alerts.models.escalation_... |
slow-coro-detection | watching_thread | from __future__ import annotations
import time
from asyncio import Handle
from threading import Event, Lock, Thread
from typing import Optional
from tribler.core.utilities.slow_coro_detection import logger
from tribler.core.utilities.slow_coro_detection.utils import format_info
# How long (in seconds) a coroutine ca... |
clientScripts | verify_checksum | # This file is part of Archivematica.
#
# Copyright 2010-2017 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the ... |
webkit | certificateerror | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""A wrapper over a list of QSslErrors."""
from typing import Optional, Sequence
from qutebrowser.qt.network import QNetworkReply, QSslError
from qutebrowser.utils import debug, jinja, urlutil... |
xl | shelve_compat | # Copyright (C) 2019 Johannes Sasongko <sasongko@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 option) any later version.
#
# This ... |
blocks | qa_integrate | #!/usr/bin/env python
#
# Copyright 2008,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_integrate(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block()
d... |
classes | clip | """
@file
@brief This file is for legacy support of OpenShot 1.x project files
@author Jonathan Thomas <jonathan@openshot.org>
@section LICENSE
Copyright (c) 2008-2018 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Editor (http://www.openshot.org), an open-source pr... |
PyObjCLauncher | PyObjCLauncher | import objc
objc.setVerbose(1)
from AppKit import *
from Foundation import *
from LaunchServices import *
from MyDocument import *
from PreferencesWindowController import *
from PyObjCTools import AppHelper
PYTHON_EXTENSIONS = ["py", "pyw", "pyc"]
FILE_TYPE_BINDING_MESSAGE = """
%s is not the default application for... |
beetsplug | beatport | # This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, ... |
cherrypy | _cptree | """CherryPy Application and Tree objects."""
import os
import cherrypy
from cherrypy import _cpconfig, _cplogging, _cprequest, _cpwsgi, tools
from cherrypy._cpcompat import ntou, py3k
from cherrypy.lib import httputil
class Application(object):
"""A CherryPy Application.
Servers and gateways should not in... |
fec | qa_polar_decoder_sc_systematic | #!/usr/bin/env python
#
# Copyright 2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import numpy as np
from gnuradio import blocks, fec, gr, gr_unittest
from gnuradio.fec.extended_decoder import extended_decoder
from gnuradio.fec.polar import ch... |
builtinContextMenus | fitSystemSecurity | from collections import OrderedDict
import gui.fitCommands as cmd
import gui.mainFrame
import wx
from eos.const import FitSystemSecurity
from gui.contextMenu import ContextMenuUnconditional
from service.fit import Fit
_t = wx.GetTranslation
class FitSystemSecurityMenu(ContextMenuUnconditional):
def __init__(sel... |
qute-pylint | config | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Custom astroid checker for config calls."""
import pathlib
import sys
import astroid
import yaml
from pylint import checkers, interfaces
from pylint.checkers import utils
OPTIONS = None
FA... |
util | dev | """
This module provides a bunch of utility methods and helpers FOR DEVELOPMENT ONLY.
"""
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
import contextlib
import time
@contextlib.contextmanager
def duration_log(context=None, log=None):
"""
Context manager to log the ... |
PyObjCTest | test3_protocol | import platform
import sys
import warnings
import objc
from PyObjCTools.TestSupport import *
# Most useful systems will at least have 'NSObject'.
NSObject = objc.lookUpClass("NSObject")
# XXX : This is a really dumb way to detect < 10.3
if not NSObject.instancesRespondToSelector_("setValue:forKey:"):
# Defining... |
BasicDrawing | MyAppController | import BitmapContext
import objc
import PDFHandling
import Utilities
from Cocoa import *
# Initial defaults
_dpi = 144
_useQT = False
def getURLToExport(suffix):
savePanel = NSSavePanel.savePanel()
initialFileName = "BasicDrawing.%s" % (suffix,)
if (
savePanel.runModalForDirectory_file_(None, i... |
storage | upgrade_canvasitem | from gaphor.core.modeling.element import generate_id
def upgrade_canvasitem(item, gaphor_version):
upgrade_canvas_item_to_1_0_2(item)
if version_lower_than(gaphor_version, (1, 1, 0)):
upgrade_presentation_item_to_1_1_0(item)
new_canvasitems = upgrade_message_item_to_1_1_0(item)
else:
... |
widgets | queue | # Copyright (C) 2008-2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... |
WizardShaft | WizardShaft | # -*- coding: utf-8 -*-
# /******************************************************************************
# * Copyright (c) 2012 Jan Rheinländer <jrheinlaender@users.sourceforge.net> *
# * *
# * This file is part of the FreeCAD CAx developme... |
common | drive | # -*- Mode: Python; test-case-name: whipper.test.test_common_drive -*-
# vi:si:et:sw=4:sts=4:ts=4
# Copyright (C) 2009 Thomas Vander Stichele
# This file is part of whipper.
#
# whipper is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the... |
migrations | 0016_auto_20201129_0304 | # Generated by Django 3.0.7 on 2020-11-29 03:04
import django.db.models.deletion
from django.conf import settings
from django.contrib.postgres.fields import ArrayField
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0015_auto_20201128_0349"),... |
classes | classconnect | """Classes related (dependency, implementation) adapter connections."""
from __future__ import annotations
from gaphor import UML
from gaphor.core.modeling import Element, Presentation
from gaphor.diagram.connectors import (
Connector,
DirectionalRelationshipConnect,
RelationshipConnect,
)
from gaphor.dia... |
Test | Workbench | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2006 Werner Mayer <werner.wm.mayer@gmx.de> *
# * *
# * This file is part of the FreeCAD CAx development system.... |
mail | tracking_settings | class TrackingSettings(object):
"""Settings to track how recipients interact with your email."""
def __init__(self):
"""Create an empty TrackingSettings."""
self._click_tracking = None
self._open_tracking = None
self._subscription_tracking = None
self._ganalytics = None
... |
Gui | SetupSheet | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2018 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
ui | palette | from dataclasses import dataclass, field
from enum import Enum, auto
from typing import List, Optional
PYGMENTS_BRIGHT_BLACK = "ansibrightblack"
AUTO_STYLE = "auto" # Follows terminal ANSI color styles
class Styles(Enum):
PIE = auto()
ANSI = auto()
class PieStyle(str, Enum):
UNIVERSAL = "pie"
DAR... |
graphs | feeding_duration | # -*- coding: utf-8 -*-
import plotly.graph_objs as go
import plotly.offline as plotly
from core.utils import duration_parts
from django.db.models import Count, Sum
from django.db.models.functions import TruncDate
from django.utils.translation import gettext as _
from reports import utils
def feeding_duration(instanc... |
gpodder | util | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2018 The gPodder Team
# Copyright (c) 2011 Neal H. Walfield
#
# gPodder is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foun... |
Arch | exportIFCStructuralTools | # ***************************************************************************
# * Copyright (c) 2020 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
job | manager | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... |
mod-dash | server_smpl | # mod_dash/server_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 ... |
Tools | SubWCRev | #! python
# -*- coding: utf-8 -*-
# (c) 2006 Werner Mayer LGPL
#
# FreeCAD RevInfo script to get the revision information from Subversion, Bazaar, and Git.
#
# Under Linux the Subversion tool SubWCRev shipped with TortoiseSVN isn't
# available which is provided by this script.
# 2012/02/01: The script was extended to s... |
KindleUnpack | kindleunpack | #!/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 os
__path__ = ["lib", os.path.dirname(os.path.realpath(__file__)), "kindleunpack"]
import codecs
import sys
import traceback
from ... |
picard | dataobj | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2004 Robert Kaye
# Copyright (C) 2006-2008 Lukáš Lalinský
# Copyright (C) 2011-2012 Michael Wiencek
# Copyright (C) 2013, 2020-2021, 2023 Laurent Monin
# Copyright (C) 2017 Sambhav Kothari
# Copyright (C) 2017 Sophist-UK
# Copy... |
feminout | writeFenicsXDMF | # ***************************************************************************
# * Copyright (c) 2017-2023 Johannes Hartung <j.hartung@gmx.net> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
imageserver | template_manager | #
# Quru Image Server
#
# Document: template_manager.py
# Date started: 22 Sep 2015
# By: Matt Fozard
# Purpose: Provides a managed interface to the image templates
# Requires:
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute it and/or ... |
librivox | about_window | # 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, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY W... |
qltk | download | # Copyright 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 os.path import splitext
from pat... |
conversions | releaseProteus | """
Conversion pack for Proteus Module Tiericide
"""
CONVERSIONS = {
# Renamed items
"Basic Capacitor Recharger": "'Basic' Capacitor Recharger",
"Basic Capacitor Power Relay": "'Basic' Capacitor Power Relay",
"Basic Overdrive Injector System": "'Basic' Overdrive Injector System",
"Basic Reinforced ... |
friture | spectrogram_settings | #!/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... |
QT | TabTipos | from Code import VarGen
from Code.QT import Colocacion, Controles, Iconos, QTUtil
from PyQt4 import QtCore, QtGui
class Posicion:
def __init__(self, x=0, y=0, ancho=0, alto=0, angulo=0, orden=15):
self.x = x
self.y = y
self.ancho = ancho
self.alto = alto
self.angulo = angul... |
document | eventloop | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 by Ihor E. Novikov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... |
PyObjCTest | test_nsexception | import Foundation
import objc
from Foundation import *
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
class TestNSExceptionInteraction(TestCase):
def testRepeatedAllocInit(self):
for i in range(1, 1000):
a = NSException.alloc().initWithName_reason_u... |
v1 | tokens | import datetime
from typing import List
from CTFd.api.v1.helpers.schemas import sqlalchemy_to_pydantic
from CTFd.api.v1.schemas import APIDetailedSuccessResponse, APIListSuccessResponse
from CTFd.models import Tokens, db
from CTFd.schemas.tokens import TokenSchema
from CTFd.utils.decorators import authed_only, require... |
user | plugins | # -*- coding: utf-8 -*-
"""
flaskbb.user.plugins
~~~~~~~~~~~~~~~~~~~~
Plugin implementations for the FlaskBB user module.
:copyright: (c) 2018 the FlaskBB Team
:license: BSD, see LICENSE for details
"""
from itertools import chain
from flask_babelplus import gettext as _
from pluggy import Hooki... |
core | target_assigner_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... |
gdist | coverage | # Copyright 2015-2016 Christoph Reiter
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
#... |
docs | conf | # documentation build configuration file, created by
# sphinx-quickstart on Sat Sep 10 18:18:25 2011.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a defau... |
chardet | compat | ######################## BEGIN LICENSE BLOCK ########################
# Contributor(s):
# Dan Blanchard
# Ian Cordasco
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# versi... |
cactus | site | import logging
import os
import shutil
import socket
import sys
import traceback
import webbrowser
import django.conf
from cactus import ui as ui_module
from cactus.browser import browserReload, browserReloadCSS
from cactus.compat.page import PageContextCompatibilityPlugin
from cactus.compat.paths import SiteCompatibi... |
gui | device | # This file is part of MyPaint.
# -*- coding: utf-8 -*-
# Copyright (C) 2014-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 Foundation; either version 2 of the Licen... |
gtkui | dialogs | # -*- 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 later version.
#
# This pr... |
Gui | Probe | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
panel | radio | # Copyright (C) 2008-2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... |
colors | sliders | # 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 License, or
# (at your option... |
qltk | properties | # Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna
# 2012 Nick Boultbee
# 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; eithe... |
Path | Preferences | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it a... |
draftviewproviders | view_layer | # ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * Copyright (c) 2021 FreeCAD Developers *
# * ... |
SCL | BaseType | # Copyright (c) 2011, Thomas Paviot (tpaviot@gmail.com)
# All rights reserved.
# This file is part of the StepClassLibrary (SCL).
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code mus... |
draftguitools | gui_edit_part_objects | # ***************************************************************************
# * Copyright (c) 2019 Carlo Pavan <carlopav@gmail.com> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
extractor | rottentomatoes | from __future__ import unicode_literals
from .common import InfoExtractor
from .internetvideoarchive import InternetVideoArchiveIE
class RottenTomatoesIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?rottentomatoes\.com/m/[^/]+/trailers/(?P<id>\d+)"
_TEST = {
"url": "http://www.rottentomatoes.co... |
docker | generate | #!/usr/bin/env python3
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Generate Dockerfiles for qutebrowser's CI."""
import argparse
import sys
import jinja2
CONFIGS = {
"archlinux-webkit": {"webengine": False, "unstable": False, ... |
imageserver | flask_ext | #
# Quru Image Server
#
# Document: flask_ext.py
# Date started: 06 Feb 2015
# By: Matt Fozard
# Purpose: Flask extensions
# Requires: Flask
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
person | util | import datetime
import json
from contextlib import ExitStack
from typing import Dict, List, Optional, Union
from uuid import UUID
from zoneinfo import ZoneInfo
from dateutil.parser import isoparse
from django.db.models.query import QuerySet
from django.db.models.signals import post_delete, post_save
from django.dispat... |
file-import | toly_dialog | # 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
... |
TechDraw | Init | # ***************************************************************************
# * Copyright (c) 2002 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
tools | dropzone | from __future__ import annotations
import logging
from gaphas.geometry import Rectangle
from gaphas.guide import GuidedItemMoveMixin
from gaphas.item import NW, SE, Item
from gaphas.move import ItemMove
from gaphas.move import Move as MoveAspect
from gaphas.tool.itemtool import item_at_point
from gaphas.view import G... |
scripts | Stretch | # This PostProcessingPlugin script is released under the terms of the LGPLv3 or higher.
"""
Copyright (c) 2017 Christophe Baribaud 2017
Python implementation of https://github.com/electrocbd/post_stretch
Correction of hole sizes, cylinder diameters and curves
See the original description in https://github.com/electrocb... |
internal | http | from __future__ import annotations
import logging
import time
from typing import TYPE_CHECKING
import requests
from mopidy import httpclient
if TYPE_CHECKING:
from mopidy.httpclient import ProxyConfig
logger = logging.getLogger(__name__)
def get_requests_session(
proxy_config: ProxyConfig,
user_agent:... |
migrations | 0011_auto_20200214_1939 | # Generated by Django 3.0.3 on 2020-02-15 03:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("core", "0010_timer_child"),
]
operations = [
migrations.AddField(
model_name="diaperchange",
name="notes",
... |
femobjects | base_fempythonobject | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
femtaskpanels | task_constraint_sectionprint | # ***************************************************************************
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
modeling | elementfactory | """Factory for and registration of model elements."""
from __future__ import annotations
from collections import OrderedDict
from contextlib import contextmanager
from typing import Callable, Iterator, Protocol, TypeVar, overload
from gaphor.abc import Service
from gaphor.core.eventmanager import EventManager, event... |
Models | PrintJobOutputModel | # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import TYPE_CHECKING, List, Optional
from cura.CuraApplication import CuraApplication
from PyQt6.QtCore import QObject, QUrl, pyqtProperty, pyqtSignal, pyqtSlot
from PyQt6.QtGui import QImage
if TYPE_CHECKING:... |
tools | handlemove | from typing import Optional
from gaphas.connector import Handle
from gaphas.guide import GuidedItemHandleMoveMixin
from gaphas.handlemove import ConnectionSinkType, HandleMove, ItemHandleMove
from gaphas.item import Item, Line
from gaphas.move import Move
from gaphas.types import Pos
from gaphas.view import GtkView
fr... |
reader | dicom_grouper | # ---------------------------------------------------------------------
# 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@cenpra.gov.br
# License: GNU - General Public Lice... |
Base | SetupSheetOpPrototype | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2018 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
lib | cache | # 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, ... |
extractor | testurl | from __future__ import unicode_literals
import re
from ..utils import ExtractorError
from .common import InfoExtractor
class TestURLIE(InfoExtractor):
"""Allows addressing of the test cases as test:yout.*be_1"""
IE_DESC = False # Do not list
_VALID_URL = r"test(?:url)?:(?P<id>(?P<extractor>.+?)(?:_(?P... |
bup | metadata | """Metadata read/write support for bup."""
# Copyright (C) 2010 Rob Browning
#
# This code is covered under the terms of the GNU Library General
# Public License as described in the bup LICENSE file.
from __future__ import absolute_import, print_function
import errno
import os
import socket
import stat
import struct... |
core | getters | """Getter functions that operate on lists of entries to return various lists of
things that they reference, accounts, tags, links, currencies, etc.
"""
__copyright__ = "Copyright (C) 2013-2016 Martin Blais"
__license__ = "GNU GPLv2"
from collections import OrderedDict, defaultdict
from beancount.core import account
... |
network | dandelion | """
Dandelion class definition, tracks stages
"""
import logging
from collections import namedtuple
from random import choice, expovariate, sample
from threading import RLock
from time import time
import connectionpool
import state
from queues import invQueue
from singleton import Singleton
# randomise routes after 6... |
config | middleware | # 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, ... |
sandbox | filter_compare_fir_iir | import numpy as np
from matplotlib import pylab as plt
from numpy.fft import fft, fftfreq, fftshift
from scipy.signal.filter_design import iirdesign
from scipy.signal.fir_filter_design import remez
from scipy.signal.signaltools import lfilter
N = 2**13
fs = 44100.0
x = np.arange(0, N) / fs
f = 1800.0
# signal
y = np.s... |
gui | mainFrame | # =============================================================================
# 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 ... |
models | subreddit | # 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, ... |
scenarios | profile_update | import typing
from apps.slack.constants import SLACK_BOT_ID
from apps.slack.scenarios import scenario_step
from apps.slack.types import EventPayload, EventType, PayloadType, ScenarioRoute
if typing.TYPE_CHECKING:
from apps.slack.models import SlackTeamIdentity, SlackUserIdentity
class ProfileUpdateStep(scenario... |
extractor | vk | # coding: utf-8
from __future__ import unicode_literals
import collections
import functools
import re
from ..compat import compat_urlparse
from ..utils import (
ExtractorError,
OnDemandPagedList,
clean_html,
get_element_by_class,
int_or_none,
orderedSet,
str_or_none,
str_to_int,
un... |
deluge | error | #
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2011 Pedro Algarvio <pedro@algarvio.me>
#
# 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 LIC... |
src | highlevelcrypto | """
High level cryptographic functions based on `.pyelliptic` OpenSSL bindings.
.. note::
Upstream pyelliptic was upgraded from SHA1 to SHA256 for signing. We must
`upgrade PyBitmessage gracefully. <https://github.com/Bitmessage/PyBitmessage/issues/953>`_
`More discussion. <https://github.com/yann2192/pyelliptic... |
machine | passport | # Copyright (c) 2013 Hesky Fisher
# See LICENSE.txt for details.
"Thread-based monitoring of a stenotype machine using the passport protocol."
from itertools import zip_longest
from plover.machine.base import SerialStenotypeBase
# Passport protocol is documented here:
# http://www.eclipsecat.com/?q=system/files/Pas... |
friture | filled_curve | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2021 Timothée Lecomte
# This file is part of Friture.
#
# Friture is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# Friture is distri... |
versions | dc8c1be855c_ | """empty message
Revision ID: dc8c1be855c
Revises: None
Create Date: 2015-01-06 17:53:38.330924
"""
# revision identifiers, used by Alembic.
revision = "dc8c1be855c"
down_revision = None
import sqlalchemy as sa
from alembic import op
def upgrade():
### commands auto generated by Alembic - please adjust! ###
... |
octoprint | timelapse | __author__ = "Gina Häußge <osd@foosel.net>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
import collections
import datetime
import fnmatch
import glob
import logging
import os
import queue
import re
import shutil
import sys
import threading
import time
import octoprint.plugi... |
ui | ui_scripteditor | # -*- 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_ScriptEditor(object):
def setupUi(self, ScriptEditor):
ScriptEditor.setObjectName("ScriptEditor")
ScriptEditor.resize(902, 729)
... |
config | schemas | import collections
from typing import Any
from mopidy.config import types
def _did_you_mean(name, choices):
"""Suggest most likely setting based on levenshtein."""
if not choices:
return None
name = name.lower()
candidates = [(_levenshtein(name, c), c) for c in choices]
candidates.sort()... |
misc | utilcmds | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Misc. utility commands exposed to the user."""
# QApplication and objects are imported so they're usable in :debug-pyeval
import functools
import os
import sys
import traceback
from typing ... |
scripts | slic3r_pre | # ***************************************************************************
# * Copyright (c) 2015 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
gui | test_workers_utility | # SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2022-2023 FreeCAD Project Association *
# * ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.