section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
draftguitools | gui_edit_sketcher_objects | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2019, 2020 Carlo Pavan <carlopav@gmail.com> *
# * ... |
constructors | jsmath | import math
import random
from ..base import *
Math = PyJsObject(prototype=ObjectPrototype)
Math.Class = "Math"
CONSTANTS = {
"E": 2.7182818284590452354,
"LN10": 2.302585092994046,
"LN2": 0.6931471805599453,
"LOG2E": 1.4426950408889634,
"LOG10E": 0.4342944819032518,
"PI": 3.1415926535897932,
... |
clients | qbittorrent | import os
import re
import time
from base64 import b16encode, b32decode
import mylar
from lib.qbittorrent import client
from mylar import helpers, logger
class TorrentClient(object):
def __init__(self):
self.conn = None
def connect(self, host, username, password, test=False):
if self.conn is... |
draftmake | make_array | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * ... |
classes | sentry | """
@file
@brief This file manages the optional Sentry SDK
@author Jonathan Thomas <jonathan@openshot.org>
@author FeRD (Frank Dana) <ferdnyc@gmail.com>
@section LICENSE
Copyright (c) 2008-2021 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Editor (http://www.opens... |
extractor | adobepass | # coding: utf-8
from __future__ import unicode_literals
import re
import time
import xml.etree.ElementTree as etree
from ..compat import compat_kwargs, compat_urlparse
from ..utils import (
NO_DEFAULT,
ExtractorError,
unescapeHTML,
unified_timestamp,
urlencode_postdata,
)
from .common import InfoE... |
extractors | icourses | #!/usr/bin/env python
import base64
import datetime
import hashlib
import logging
import random
import re
from time import sleep
from urllib import error, parse
from xml.dom.minidom import parseString
from ..common import *
__all__ = ["icourses_download", "icourses_playlist_download"]
def icourses_download(url, out... |
changeset | apply | from functools import singledispatch
from gaphor.core.modeling.coremodel import ElementChange, RefChange, ValueChange
@singledispatch
def applicable(change, element_factory) -> bool:
raise NotImplementedError
@singledispatch
def apply_change(change, element_factory, modeling_factory):
raise NotImplementedE... |
migrations | 0005_reingest_data | from django.db import migrations
def data_migration(apps, schema_editor):
StandardTaskConfig = apps.get_model("main", "StandardTaskConfig")
TaskConfig = apps.get_model("main", "TaskConfig")
MicroServiceChainLink = apps.get_model("main", "MicroServiceChainLink")
MicroServiceChainLinkExitCode = apps.get... |
migrations | 0010_dip_upload_store | from django.db import migrations
def data_migration(apps, schema_editor):
StandardTaskConfig = apps.get_model("main", "StandardTaskConfig")
TaskConfig = apps.get_model("main", "TaskConfig")
MicroServiceChainLink = apps.get_model("main", "MicroServiceChainLink")
MicroServiceChainLinkExitCode = apps.get... |
session-recordings | session_recording_helpers | import base64
import gzip
import json
from collections import defaultdict
from datetime import datetime, timezone
from typing import Any, Callable, DefaultDict, Dict, Generator, List, Optional, Tuple
from dateutil.parser import ParserError, parse
from posthog.models import utils
from posthog.session_recordings.models.... |
resources | annotationswindow | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'raw/annotations.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.... |
options | interface | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2007-2008 Lukáš Lalinský
# Copyright (C) 2008 Will
# Copyright (C) 2009, 2019-2022 Philipp Wolfer
# Copyright (C) 2011, 2013 Michael Wiencek
# Copyright (C) 2013, 2019 Wieland Hoffmann
# Copyright (C) 2013-2014, 2018, 2020-2022... |
projectedModule | add | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.module.projectedAdd import CalcAddProjectedModuleCommand
from gui.fitCommands.helpers import InternalCommandHistory, ModuleInfo
from service.fit import Fit
class GuiAddProjectedModuleCommand(wx.Command):
def ... |
posthog | constants | from enum import Enum
from typing import Literal
from semantic_version import Version
FROZEN_POSTHOG_VERSION = Version(
"1.43.0"
) # Frozen at the last self-hosted version, just for backwards compat now
INTERNAL_BOT_EMAIL_SUFFIX = "@posthogbot.user"
# N.B. Keep this in sync with frontend enum (types.ts)
# AND ... |
saveddata | character | # ===============================================================================
# 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, ... |
Http | ClusterPrintCoreConfiguration | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Any, Dict, Optional, Union
from cura.PrinterOutput.Models.ExtruderConfigurationModel import (
ExtruderConfigurationModel,
)
from cura.PrinterOutput.Models.ExtruderOutputModel import ExtruderOutputMode... |
contrib | template | """
Interface to various templating engines.
"""
import os.path
__all__ = [
"render_cheetah",
"render_genshi",
"render_mako",
"cache",
]
class render_cheetah:
"""Rendering interface to Cheetah Templates.
Example:
render = render_cheetah('templates')
render.hello(name="cheeta... |
generator | top_block | import codecs
import operator
import os
import tempfile
import textwrap
from mako.template import Template
from .. import Messages, blocks
from ..Constants import TOP_BLOCK_FILE_MODE
from ..utils import expr_utils
from .FlowGraphProxy import FlowGraphProxy
DATA_DIR = os.path.dirname(__file__)
PYTHON_TEMPLATE = os.p... |
filter | qa_filter_delay_fc | #!/usr/bin/env python
#
# Copyright 2004,2007,2010,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
from gnuradio import blocks, fft, filter, gr, gr_unittest
def sin_source_f(samp_rate, freq, amp, N):
t = [float(x) / samp_... |
fitDamageStats | getter | # =============================================================================
# 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 ... |
downloaders | YourfilesTo | # -*- coding: utf-8 -*-
import re
import urllib.parse
from ..base.downloader import BaseDownloader
class YourfilesTo(BaseDownloader):
__name__ = "YourfilesTo"
__type__ = "downloader"
__version__ = "0.28"
__status__ = "testing"
__pattern__ = r"http://(?:www\.)?yourfiles\.(to|biz)/\?d=\w+"
__c... |
compat | page | # coding:utf-8
import logging
import os
from cactus.utils.url import path_to_url
logger = logging.getLogger(__name__)
class PageContextCompatibilityPlugin(object):
"""
This plugin ensures that the page context stays backwards compatible, but adds
deprecation warnings.
"""
def preBuildPage(self,... |
PyObjCTest | test_pdfdocument | from PyObjCTools.TestSupport import *
from Quartz.PDFKit import *
try:
unicode
except NameError:
unicode = str
class TestPDFDocument(TestCase):
def testConstants(self):
self.assertEqual(kPDFPrintPageScaleNone, 0)
self.assertEqual(kPDFPrintPageScaleToFit, 1)
self.assertEqual(kPDFPr... |
widgets | location_menu | from __future__ import absolute_import
import os
import urllib.parse
from gi.repository import Gtk, Pango
from sunflower import common
from sunflower.parameters import Parameters
from sunflower.plugin_base.item_list import ItemList
class LocationMenu:
"""Interface which shows list of paths to jump to."""
d... |
Base | Property | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2020 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
pages | things | # 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, ... |
Backups | BackupsManager | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import TYPE_CHECKING, Dict, Optional, Tuple
from cura.Backups.Backup import Backup
from UM.Logger import Logger
from UM.Version import Version
if TYPE_CHECKING:
from cura.CuraApplication import CuraApplica... |
interface | progress | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2018 The gPodder Team
#
# gPodder is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the Licens... |
PyObjCTest | keyvaluehelper | """
Helper module for KeyValue tests
"""
from __future__ import absolute_import, unicode_literals
import objc
from PyObjCTest.testbndl import PyObjCTest_KVBaseClass, PyObjCTest_KVPathClass
NSObject = objc.lookUpClass("NSObject")
DirectString = "Direct String"
IndirectString = "Indirect String"
DirectNumber = 42
Indi... |
styling | declarations | """Definitions (types) for style sheets."""
from enum import Enum
from typing import Callable, Dict, List, NamedTuple, Optional, Sequence, Tuple, Union
import tinycss2.color3
from tinycss2.ast import FunctionBlock
from tinycss2.parser import parse_declaration_list
Color = Tuple[float, float, float, float] # RGBA
Pa... |
manuscript | 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
... |
mylar | ftpsshup | #!/usr/local/bin/python
import os
import time
import mylar
from mylar import logger
def putfile(
localpath, file
): # localpath=full path to .torrent (including filename), file=filename of torrent
try:
import paramiko
except ImportError:
logger.fdebug(
"paramiko not found on... |
draftutils | init_draft_statusbar | # ***************************************************************************
# * Copyright (c) 2020 Carlo Pavan <carlopav@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
eos | modifiedAttributeDict | # ===============================================================================
# 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, ... |
mylar | versioncheckit | # This file is part of Mylar.
#
# Mylar 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.
#
# Mylar is distributed in the hope that it wi... |
migrations | 0259_backfill_team_recording_domains | from typing import Set
from urllib.parse import urlparse
import structlog
from django.db import migrations
# Populates the recording_domains field from domains of the app_urls
def backfill_recording_domains(apps, _):
logger = structlog.get_logger(__name__)
logger.info("starting 0258_team_recording_domains")
... |
network | socks5 | """
SOCKS5 proxy module
"""
# pylint: disable=attribute-defined-outside-init
import logging
import socket
import struct
from node import Peer
from proxy import GeneralProxyError, Proxy, ProxyError
logger = logging.getLogger("default")
class Socks5AuthError(ProxyError):
"""Rised when the socks5 protocol encount... |
utils | table | """Table rendering.
"""
__copyright__ = "Copyright (C) 2014-2016 Martin Blais"
__license__ = "GNU GPLv2"
import collections
import csv
import io
import itertools
# An unrendered table data structure. This is a table-like report data
# structure--a two-dimensional array of cells--that is used as an intermediate
# sta... |
versions | 072_08dcb9233ad7_add_resource_view | # encoding: utf-8
"""072 Add resource view
Revision ID: 08dcb9233ad7
Revises: c16f081ef73a
Create Date: 2018-09-04 18:49:13.697490
"""
import sqlalchemy as sa
from alembic import op
from ckan.migration import skip_based_on_legacy_engine_version
# revision identifiers, used by Alembic.
revision = "08dcb9233ad7"
down_... |
src | Events | import sys
import time
from collections import deque
from threading import Condition, RLock, currentThread
class OnRequestQueue:
ListUsedModFunctions = ("append", "popleft")
class QueueEnd:
def __init__(self, queueList=None):
if queueList is not None:
self.q = queueList
... |
module | localRemove | import eos.db
import wx
from eos.const import FittingSlot
from gui.fitCommands.helpers import (
ModuleInfo,
restoreCheckedStates,
restoreRemovedDummies,
)
from logbook import Logger
from service.fit import Fit
pyfalog = Logger(__name__)
class CalcRemoveLocalModulesCommand(wx.Command):
def __init__(se... |
downloaders | FshareVn | # -*- coding: utf-8 -*-
import json
import re
import urllib.parse
import pycurl
from pyload.core.network.cookie_jar import CookieJar
from pyload.core.network.http.exceptions import BadHeader
from pyload.core.network.http.http_request import HTTPRequest
from ..base.simple_downloader import SimpleDownloader
class Fsh... |
misc | savemanager | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Saving things to disk periodically."""
import collections
import os.path
from typing import MutableMapping
from qutebrowser.api import cmdutils
from qutebrowser.config import config
from qu... |
options | plugins | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2007 Lukáš Lalinský
# Copyright (C) 2009 Carlin Mangar
# Copyright (C) 2009, 2018-2023 Philipp Wolfer
# Copyright (C) 2011-2013 Michael Wiencek
# Copyright (C) 2013, 2015, 2018-2022 Laurent Monin
# Copyright (C) 2013, 2017 Soph... |
ui | colors | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2019-2021 Laurent Monin
# Copyright (C) 2019-2021 Philipp Wolfer
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Softwar... |
Arch | ArchNesting | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2017 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it a... |
util | jinja | __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2015 The OctoPrint Project - Released under terms of the AGPLv3 License"
import logging
import os
from jinja2 import nodes
from jinja2.ext import Extension
from jinja2.loaders import (
BaseLoader... |
gcs | auth | # coding:utf-8
import webbrowser
from cactus.deployment.gcs import (
CACTUS_CLIENT_ID,
CACTUS_CLIENT_SECRET,
CACTUS_REQUIRED_SCOPE,
LOCAL_REDIRECT_URI,
)
from cactus.exceptions import InvalidCredentials
from oauth2client.client import FlowExchangeError, OAuth2WebServerFlow
from oauth2client.contrib.key... |
constants | assets | import os
from CTFd.utils import get_asset_json
from CTFd.utils.config import ctf_theme
from CTFd.utils.helpers import markup
from flask import current_app, url_for
class _AssetsWrapper:
def manifest(self):
theme = ctf_theme()
manifest = os.path.join(
current_app.root_path, "themes", ... |
cli | user | __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2019 The OctoPrint Project - Released under terms of the AGPLv3 License"
import logging
import click
from octoprint import init_settings
from octoprint.access.groups import FilebasedGroupManager
fro... |
SceneDetails | ClipPlane | # /***************************************************************************
# * Copyright (c) 2019 Victor Titov (DeepSOIC) <vv.titov@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
PyObjCTest | test_nserror | from Foundation import *
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
class TestNSErrorHelper(NSObject):
def attemptRecoveryFromError_optionIndex_delegate_didRecoverSelector_contextInfo_(
self, a, b, c, d, e
):
pass
def attemptRecoveryFromErr... |
filesystem-ajax | views | # This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the ... |
chardet | escprober | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
Arch | importIFC | # ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
xl | event | # 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... |
installer | steps | # This file is part of Archivematica.
#
# Copyright 2010-2016 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the ... |
bin | hobby_ci | #!/usr/local/bin/python
import datetime
import os
import random
import re
import signal
import string
import sys
import time
import digitalocean
import requests
letters = string.ascii_lowercase
random_bit = "".join(random.choice(letters) for i in range(4))
name = f"do-ci-hobby-deploy-{random_bit}"
region = "sfo3"
im... |
analog | qa_agc | #!/usr/bin/env python
#
# Copyright 2004,2007,2010,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from gnuradio import analog, blocks, gr, gr_unittest
class test_agc(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_bl... |
config | events | __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License"
from enum import Enum
from typing import List, Optional
from octoprint.schema import BaseModel
from octoprint.vendor.with_attr... |
UML | copypaste | from __future__ import annotations
from typing import Iterator, NamedTuple
from gaphor.core.modeling.element import Id
from gaphor.diagram.copypaste import (
ElementCopy,
copy,
copy_element,
paste,
paste_element,
)
from gaphor.UML.recipes import owner_package
from gaphor.UML.uml import NamedElemen... |
dictionary | base | # Copyright (c) 2013 Hesky Fisher
# See LICENSE.txt for details.
# TODO: maybe move this code into the StenoDictionary itself. The current saver
# structure is odd and awkward.
# TODO: write tests for this file
"""Common elements to all dictionary formats."""
import functools
import threading
from os.path import spl... |
workflows | squash_person_overrides | import contextlib
import json
from collections.abc import Iterator
from dataclasses import asdict, dataclass, field
from datetime import datetime, timedelta, timezone
from typing import AsyncIterator, Iterable, NamedTuple
from uuid import UUID
import psycopg2
from posthog.clickhouse.client.execute import sync_execute
... |
generated | index | #!/usr/bin/env python
"""
Generated Mon Feb 9 19:08:05 2009 by generateDS.py.
"""
import os
import sys
from xml.dom import minidom
from . import compound
from . import indexsuper as supermod
class DoxygenTypeSub(supermod.DoxygenType):
def __init__(self, version=None, compound=None):
supermod.DoxygenTy... |
storage | xmlwriter | import xml.sax.handler
from typing import Dict, List, Tuple
from xml.sax.saxutils import escape, quoteattr
# See whether the xmlcharrefreplace error handler is
# supported
try:
from codecs import xmlcharrefreplace_errors
_error_handling = "xmlcharrefreplace"
del xmlcharrefreplace_errors
except ImportError... |
parsers | netscape_html | __package__ = "archivebox.parsers"
import re
from datetime import datetime
from typing import IO, Iterable
from ..index.schema import Link
from ..util import enforce_types, htmldecode
@enforce_types
def parse_netscape_html_export(html_file: IO[str], **_kwargs) -> Iterable[Link]:
"""Parse netscape-format bookma... |
migrations | 0004_auto_20210130_1157 | # Generated by Django 3.0.7 on 2021-01-30 11:57
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("photos", "0003_auto_20201229_1329"),
]
operations = [
migrations.AlterField(
model_name="photota... |
collection | main | # Copyright 2010, 2012-2014 Christoph Reiter
# 2017 Uriel Zajaczkovski
# 2017-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 ver... |
backend | extractors | # -*- encoding: utf-8 -*-
# Dissemin: open access policy enforcement tool
# Copyright (C) 2014 Antonin Delpeuch
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the Licen... |
OLD | wmodel | ################################################################
### Whitespace model based on neural networks.
### Determines whether there is whitespace at a given location
### on a textline.
################################################################
import common as ocrolib
import improc
import lineproc
impor... |
dataset-tools | oid_tfrecord_creation | # 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... |
extractor | wdr | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_str, compat_urlparse
from ..utils import (
ExtractorError,
determine_ext,
dict_get,
js_to_json,
strip_jsonp,
try_get,
unified_strdate,
update_url_query,
url_or_none,
urlhandle_detect_e... |
octoprint | daemon | """
Generic linux daemon base class
Originally from http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/#c35
"""
import os
import signal
import sys
import time
class Daemon:
"""
A generic daemon class.
Usage: subclass the daemon class and override the run() method.
If you wa... |
apps | evaluation_random_numbers | #!/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 gr
from matplotlib import pyplot as plt
from scipy.stats import laplace, norm, rayleigh
# NOTE: scipy and matplotlib are ... |
PyObjCTest | test_nsresponder | from AppKit import *
from PyObjCTools.TestSupport import *
class TestNSResponder(TestCase):
def testMethods(self):
self.assertResultIsBOOL(NSResponder.tryToPerform_with_)
self.assertResultIsBOOL(NSResponder.performKeyEquivalent_)
self.assertResultIsBOOL(NSResponder.acceptsFirstResponder)
... |
engine | wsgi | """
WSGI config for engine project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
import os
from django.conf import settings
from django.core.wsgi import get_wsgi_application
from... |
widgets | 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
... |
query | unique | # Copyright 2023 LoveIsGrief
#
# 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 typing import Any, Optional
from qu... |
zeromq | qa_zeromq_sub_msg_source | #!/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
#
#
"""Unit tests for ZMQ SUB Message Source block"""
import time
import pmt
import zmq
from gnuradio import blocks, gr, gr_unittest, zeromq
class qa_zeromq_sub_ms... |
utils | extract_docs | """
Copyright 2008-2015 Free Software Foundation, Inc.
This file is part of GNU Radio
SPDX-License-Identifier: GPL-2.0-or-later
"""
import itertools
import json
import queue
import random
import re
import subprocess
import sys
import threading
#######################################################################... |
versions | 077_51171a04d86d_add_revisions_to_system_info | # encoding: utf-8
"""077 Add revisions to system_info
Revision ID: 51171a04d86d
Revises: 59995aa965c0
Create Date: 2018-09-04 18:49:15.478074
"""
import sqlalchemy as sa
from alembic import op
from ckan.migration import skip_based_on_legacy_engine_version
# revision identifiers, used by Alembic.
revision = "51171a04... |
feminout | readFenicsXDMF | # ***************************************************************************
# * Copyright (c) 2017-2023 Johannes Hartung <j.hartung@gmx.net> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
pwidgets | colorbtn | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015 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.... |
clientScripts | create_event | #!/usr/bin/env python
# This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, ei... |
papers | bibtex | # -*- encoding: utf-8 -*-
# Dissemin: open access policy enforcement tool
# Copyright (C) 2014 Antonin Delpeuch
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the Licen... |
Peer | Peer | import collections
import io
import itertools
import logging
import sys
import time
import gevent
from Config import config
from Debug import Debug
from Plugin import PluginManager
from util import helper
from .PeerHashfield import PeerHashfield
if config.use_tempfiles:
import tempfile
# Communicate remote pee... |
decrypters | DataHuFolder | # -*- coding: utf-8 -*-
from ..base.simple_decrypter import SimpleDecrypter
class DataHuFolder(SimpleDecrypter):
__name__ = "DataHuFolder"
__type__ = "decrypter"
__version__ = "0.13"
__status__ = "testing"
__pattern__ = r"http://(?:www\.)?data\.hu/dir/\w+"
__config__ = [
("enabled",... |
draftmake | make_orthoarray | # ***************************************************************************
# * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
console | main | #
# Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com>
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
#... |
neubot | brigade | # neubot/brigade.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 Public Lic... |
decrypters | AlldebridComTorrent | # -*- coding: utf-8 -*-
import json
import os
import time
import urllib.request
from pyload.core.network.http.http_request import FormFile
from pyload.core.utils.old import safejoin
from ..base.simple_decrypter import SimpleDecrypter
from ..helpers import exists
class AlldebridComTorrent(SimpleDecrypter):
__na... |
workflows | snowflake_batch_export | import datetime as dt
import json
import tempfile
from dataclasses import dataclass
import snowflake.connector
from django.conf import settings
from posthog.batch_exports.service import SnowflakeBatchExportInputs
from posthog.temporal.workflows.base import PostHogWorkflow
from posthog.temporal.workflows.batch_exports ... |
KindleUnpack | unipath | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# Copyright (c) 2014 Kevin B. Hendricks, John Schember, and Doug Massay
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following ... |
core | models | # -*- coding: utf-8 -*-
import re
from datetime import timedelta
from babybuddy.site_settings import NapSettings
from core.utils import random_color
from django.core.cache import cache
from django.core.exceptions import ValidationError
from django.core.validators import RegexValidator
from django.db import models
from... |
FilePack | FilePackPlugin | import os
import re
import gevent
from Config import config
from Debug import Debug
from Plugin import PluginManager
# Keep archive open for faster reponse times for large sites
archive_cache = {}
def closeArchive(archive_path):
if archive_path in archive_cache:
del archive_cache[archive_path]
def ope... |
lib | command | # This file is part of MyPaint.
# -*- coding: utf-8 -*-
# Copyright (C) 2010-2019 by the MyPaint Development Team.
# Copyright (C) 2007-2012 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... |
components | braveadblock | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Functions related to the Brave adblocker."""
import contextlib
import functools
import io
import logging
import pathlib
import subprocess
from typing import IO, Iterator, Optional
from qute... |
mail | header | class Header(object):
"""A header to specify specific handling instructions for your email.
If the name or value contain Unicode characters, they must be properly
encoded. You may not overwrite the following reserved headers:
x-sg-id, x-sg-eid, received, dkim-signature, Content-Type,
Content-Transf... |
core | comments | #
# Copyright 2019 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
""" Module to read and add special blocktool comments in the public header """
import warnings
from ..core import Constants
def strip_symbols(line):
"""
helper function to ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.