section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
api | cohort | import csv
import json
from datetime import datetime
from typing import Any, Dict, cast
import posthoganalytics
from django.conf import settings
from django.db.models import QuerySet
from django.db.models.expressions import F
from django.utils import timezone
from posthog.api.forbid_destroy_model import ForbidDestroyM... |
isso | setup | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
from pathlib import Path
from re import sub as re_sub
from setuptools import find_packages, setup
# https://packaging.python.org/en/latest/guides/making-a-pypi-friendly-readme/
this_directory = Path(__file__).parent
long_description = (this_directory / "README.md").re... |
schema-checker | block | from .utils import Spec, expand
PARAM_SCHEME = expand(
base_key=str, # todo: rename/remove
id=str,
label=str,
category=str,
dtype=str,
default=object,
options=list,
option_labels=list,
option_attributes=Spec(types=dict, required=False, item_scheme=(str, list)),
hide=str,
)
PORT... |
clients | scgi | #!/usr/bin/python
# rtorrent_xmlrpc
# (c) 2011 Roger Que <alerante@bellsouth.net>
#
# Modified portions:
# (c) 2013 Dean Gardiner <gardiner91@gmail.com>
#
# Python module for interacting with rtorrent's XML-RPC interface
# directly over SCGI, instead of through an HTTP server intermediary.
# Inspired by Glenn Washburn... |
filter | qa_filterbank | #!/usr/bin/env python
#
# Copyright 2012,2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
import random
import time
from gnuradio import blocks, filter, gr, gr_unittest
def convolution(A, B):
"""
Returns a convolution of th... |
funnels | utils | from typing import Type
from posthog.constants import FunnelOrderType
from posthog.models.filters import Filter
from posthog.queries.funnels import ClickhouseFunnelBase
def get_funnel_order_class(filter: Filter) -> Type[ClickhouseFunnelBase]:
from posthog.queries.funnels import (
ClickhouseFunnel,
... |
utils | named_pipe | import abc
import logging
import os
import random
import tempfile
import threading
from contextlib import suppress
from pathlib import Path
from typing import Type
from streamlink.compat import is_win32
try:
from ctypes import (
byref,
c_ulong,
c_void_p, # type: ignore[attr-defined]
... |
calc | shipModeChange | import wx
from eos.saveddata.mode import Mode
from logbook import Logger
from service.fit import Fit
from service.market import Market
pyfalog = Logger(__name__)
class CalcChangeShipModeCommand(wx.Command):
def __init__(self, fitID, itemID):
wx.Command.__init__(self, True, "Change Ship Mode")
sel... |
network | networkmanager | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Our own QNetworkAccessManager."""
import collections
import dataclasses
import html
from typing import TYPE_CHECKING, Dict, MutableMapping, Optional, Set
from qutebrowser.browser import sha... |
builtinContextMenus | itemStats | # noinspection PyPackageRequirements
import gui.mainFrame
import wx
from gui.contextMenu import ContextMenuSingle
from gui.itemStats import ItemStatsFrame
from service.fit import Fit
_t = wx.GetTranslation
class ItemStats(ContextMenuSingle):
def __init__(self):
self.mainFrame = gui.mainFrame.MainFrame.g... |
TechDrawTools | TaskHoleShaftFit | # ***************************************************************************
# * Copyright (c) 2023 edi <edi271@a1.net> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
QT | WOpeningGuide | from Code import DBgames, OpeningGuide
from Code.QT import (
Colocacion,
Controles,
Iconos,
QTVarios,
WBG_Games,
WBG_InfoMove,
WBG_Moves,
WBG_Summary,
)
from PyQt4 import QtCore, QtGui
class WOpeningGuide(QTVarios.WDialogo):
def __init__(self, wParent, procesador, fenM2inicial=None... |
SCL-output | ifc2x3 | # This file was generated by fedex_python. You probably don't want to edit
# it since your modifications will be lost if fedex_plus is used to
# regenerate it.
import sys
from SCL.AggregationDataTypes import *
from SCL.Builtin import *
from SCL.ConstructedDataTypes import *
from SCL.Rules import *
from SCL.SCLBase im... |
downloaders | VeohCom | # -*- coding: utf-8 -*-
import json
from ..base.simple_downloader import SimpleDownloader
class VeohCom(SimpleDownloader):
__name__ = "VeohCom"
__type__ = "downloader"
__version__ = "0.30"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?veoh\.com/(?:tv/)?(?:watch|videos)/(?P<ID>v\w+)"... |
extractor | nosvideo | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import (
ExtractorError,
sanitized_Request,
urlencode_postdata,
xpath_text,
xpath_with_ns,
)
from .common import InfoExtractor
_x = lambda p: xpath_with_ns(p, {"xspf": "http://xspf.org/ns/0/"})
class NosVideoIE(InfoE... |
extractor | ministrygrid | from __future__ import unicode_literals
from ..utils import ExtractorError, smuggle_url
from .common import InfoExtractor
class MinistryGridIE(InfoExtractor):
_VALID_URL = (
r"https?://(?:www\.)?ministrygrid\.com/([^/?#]*/)*(?P<id>[^/#?]+)/?(?:$|[?#])"
)
_TEST = {
"url": "http://www.mini... |
output | http | import socket
from contextlib import suppress
from http.server import BaseHTTPRequestHandler
from io import BytesIO
from typing import Optional
from streamlink_cli.output.abc import Output
class HTTPRequest(BaseHTTPRequestHandler):
# noinspection PyMissingConstructor
def __init__(self, request_text):
... |
equations | heat_writer | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> *
# * ... |
classes | project | """
@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... |
cli | plugin_info | # encoding: utf-8
from __future__ import annotations
from typing import Any, Callable
import ckan.plugins as p
import click
@click.command(name="plugin-info", short_help="Provide info on installed plugins.")
def plugin_info():
"""print info about current plugins from the .ini file"""
import ckan.plugins as ... |
UML | umlfmt | """Formatting of UML elements like attributes, operations, stereotypes, etc."""
import re
from typing import Tuple
from gaphor.core.format import format
from gaphor.i18n import gettext
from gaphor.UML import uml as UML
# Do not render if the name still contains a visibility element
no_render_pat = re.compile(r"^\s*[... |
managers | folder | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2013-2023 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
import os.path
from ..daemon.client import DaemonClient
from ..daemon.exceptions import DaemonUnavailableError
fro... |
QT | PantallaResistance | from Code.QT import (
Colocacion,
Columnas,
Controles,
FormLayout,
Grid,
Iconos,
QTUtil2,
QTVarios,
)
class WResistance(QTVarios.WDialogo):
def __init__(self, owner, resistance):
self.resistance = resistance
# Dialogo -----------------------------------------------... |
utils | label_map_util_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... |
slack | tasks | import logging
import random
from typing import Optional
from apps.alerts.tasks.compare_escalations import compare_escalations
from apps.slack.alert_group_slack_service import AlertGroupSlackService
from apps.slack.client import SlackClient
from apps.slack.constants import (
CACHE_UPDATE_INCIDENT_SLACK_MESSAGE_LIF... |
tasks | refresh_ical_files | from apps.alerts.tasks import notify_ical_schedule_shift
from apps.schedules.ical_utils import is_icals_equal
from apps.schedules.tasks import (
notify_about_empty_shifts_in_schedule,
notify_about_gaps_in_schedule,
)
from apps.slack.tasks import start_update_slack_user_group_for_schedules
from celery.utils.log ... |
neubot | raw_srvr | # neubot/raw_srvr.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 Li... |
api | filters | # -*- coding: utf-8 -*-
from core import models
from django_filters import rest_framework as filters
class CharInFilter(filters.BaseInFilter, filters.CharFilter):
pass
class ChildFieldFilter(filters.FilterSet):
class Meta:
abstract = True
fields = ["child"]
class TagsFieldFilter(filters.Fi... |
beetsplug | loadext | # This file is part of beets.
# Copyright 2019, Jack Wilsdon <jack.wilsdon@gmail.com>
#
# 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... |
blueprints | api_blueprint | # -*- coding: utf-8 -*-
import traceback
from ast import literal_eval
from itertools import chain
from logging import getLogger
from urllib.parse import unquote
import flask
from flask.json import jsonify
from pyload import APPID
from ..helpers import clear_session, set_session
bp = flask.Blueprint("api", __name__)... |
transforms | filenames | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = "GPL v3"
__copyright__ = "2010, Kovid Goyal <kovid@kovidgoyal.net>"
__docformat__ = "restructuredtext en"
import posixpath
from calibre.ebooks.oeb.base import rewrite_links, urlnormalize
from lxml import etree
from urlparse import... |
macos | release | #!/usr/bin/env python3
import argparse
import json
import os
import platform
import shutil
import subprocess
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
"--pkg",
action="store_true",
default=False,
dest="pkg",
help="Build a PKG installer i... |
negotiate | server | # neubot/negotiate/server.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 P... |
misc | quitter | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Helpers related to quitting qutebrowser cleanly."""
import argparse
import atexit
import functools
import json
import os
import os.path
import shutil
import subprocess
import sys
import toke... |
futures | _base | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
import collections
import itertools
import logging
import threading
import time
import types
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
FIRST_COMPLETED = 'FIRST_COMPLETED'
FIRST_EXCEPTION = 'FIRST_EXCEPTION'
... |
lib | emailer | # 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, ... |
pages | trafficpages | # 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, ... |
versions | 2bceb2cb4d7c_add_comment_count_to_torrent | """Add comment_count to Torrent
Revision ID: 2bceb2cb4d7c
Revises: d0eeb8049623
Create Date: 2017-05-26 15:07:21.114331
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = "2bceb2cb4d7c"
down_revision = "d0eeb8049623"
branch_labels = None
depends_on = None
COMMENT_... |
filters | curve | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com thumbor@googlegroups.com
import ast
from thumbor.ext.filters import _curve
from thumbor.filt... |
utils | html5_entities | entity_map = {
"AElig": "\xc6",
"AMP": "&",
"Aacute": "\xc1",
"Abreve": "\u0102",
"Acirc": "\xc2",
"Acy": "\u0410",
"Afr": "\U0001d504",
"Agrave": "\xc0",
"Alpha": "\u0391",
"Amacr": "\u0100",
"And": "\u2a53",
"Aogon": "\u0104",
"Aopf": "\U0001d538",
"ApplyFunctio... |
engines | base | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
BASE (Scholar publications)
"""
import re
from datetime import datetime
from urllib.parse import urlencode
from lxml import etree
from searx.utils import searx_useragent
# about
about = {
"website": "https://base-search.net",
"wikidata_id": "Q448335",
"of... |
connectors | format_mappings | """ comparing a free text format to the standardized one """
format_mappings = {
"paperback": "Paperback",
"soft": "Paperback",
"pamphlet": "Paperback",
"peperback": "Paperback",
"tapa blanda": "Paperback",
"turtleback": "Paperback",
"pocket": "Paperback",
"spiral": "Paperback",
"rin... |
util | json_data | # Copyright 2012-2020 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 __future__ import absolute_i... |
blocks | qa_transcendental | #!/usr/bin/env python
#
# Copyright 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, gr, gr_unittest
class test_transcendental(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block(... |
auth | http | # 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, ... |
resources | schedules | import datetime
from dataclasses import dataclass
from enum import Enum
from typing import Optional
from uuid import uuid4
from migrator import oncall_api_client
from migrator.config import (
SCHEDULE_MIGRATION_MODE,
SCHEDULE_MIGRATION_MODE_ICAL,
SCHEDULE_MIGRATION_MODE_WEB,
)
def match_schedule(
sch... |
example-idatastorebackend | example_sqlite | # -*- coding: utf-8 -*-
# type: ignore
import logging
from ckanext.datastore.backend import DatastoreBackend
from sqlalchemy import create_engine
log = logging.getLogger(__name__)
class DatastoreExampleSqliteBackend(DatastoreBackend):
def __init__(self):
self._engine = None
def _get_engine(self):
... |
python | noise | #!/usr/bin/env python
#
# Copyright 2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from argparse import ArgumentParser
from gnuradio import audio, digital, gr
from gnuradio.eng_arg import eng_float
class my_top_block(gr.top_block):
def __... |
quickinsert | dynamics | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... |
lib | cssfilter | # 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 | yourporn | from __future__ import unicode_literals
from ..compat import compat_str
from ..utils import parse_duration, urljoin
from .common import InfoExtractor
class YourPornIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?sxyprn\.com/post/(?P<id>[^/?#&.]+)"
_TESTS = [
{
"url": "https://sxyprn.... |
fta | conditionalevent | """Conditional Event item definition."""
from gaphor.diagram.presentation import (
Classified,
ElementPresentation,
from_package_str,
)
from gaphor.diagram.shapes import Box, IconBox, Text
from gaphor.diagram.support import represents
from gaphor.diagram.text import FontStyle, FontWeight
from gaphor.RAAML ... |
accounts | OneFichierCom | # -*- coding: utf-8 -*-
import re
import time
from pyload.core.network.http.exceptions import BadHeader
from ..base.account import BaseAccount
class OneFichierCom(BaseAccount):
__name__ = "OneFichierCom"
__type__ = "account"
__version__ = "0.24"
__status__ = "testing"
__description__ = """1fic... |
Code | GestorGM | import copy
import random
from Code import GM, Apertura, Gestor, Jugada, Util
from Code.Constantes import *
from Code.QT import PantallaGM, PantallaJuicio, QTUtil2
class GestorGM(Gestor.Gestor):
def inicio(self, record):
self.tipoJuego = kJugGM
self.ayudas = 9999 # Para que analice sin problema... |
extractor | picarto | # coding: utf-8
from __future__ import unicode_literals
from ..utils import ExtractorError, js_to_json
from .common import InfoExtractor
class PicartoIE(InfoExtractor):
_VALID_URL = r"https?://(?:www.)?picarto\.tv/(?P<id>[a-zA-Z0-9]+)"
_TEST = {
"url": "https://picarto.tv/Setz",
"info_dict": ... |
core | authmanager | #
# Copyright (C) 2009 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... |
Code | GestorTorneo | import time
from Code import Books, Gestor, Jugada, Partida, Torneo, Util, XGestorMotor
from Code.Constantes import *
from Code.QT import Iconos, PantallaTorneos, QTUtil, QTVarios
class GestorTorneo(Gestor.Gestor):
def inicio(self, nombre_torneo, liNumGames):
self.tipoJuego = kJugMvM
self.torneo... |
manager | db_manager | # 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, ... |
metrics | license | import datetime
import json
import re
import subprocess
from collections import Counter
import glom
from apatite.utils import run_cap
DETECT_CMD = "license-detector"
required_cmds = {
DETECT_CMD: "Download from: https://github.com/src-d/go-license-detector/releases,"
' rename to "license-detector" (if need b... |
fcbt | DistBin | # shell and operating system
import os
import sys
from . import DistTools, FileTools
# sys.path.append( "E:\\Develop\\Projekte\\FreeCADWin\\src\\Tools" )
# line separator
ls = os.linesep
# path separator
ps = os.pathsep
# dir separator
ds = os.sep
DistName = DistTools.BuildDistName()
DistBin = DistName + "_binary... |
mopidy | listener | import logging
import pykka
from pykka.messages import ProxyCall
logger = logging.getLogger(__name__)
def send(cls, event, **kwargs):
listeners = pykka.ActorRegistry.get_by_class(cls)
logger.debug("Sending %s to %s: %s", event, cls.__name__, kwargs)
for listener in listeners:
# Save time by call... |
formats | remote | # Copyright 2004-2005 Joe Wreschnig, Michael Urman
#
# 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... |
async-deletion | delete_cohorts | from typing import Any, Dict, List, Set, Tuple
from posthog.client import sync_execute
from posthog.models.async_deletion import AsyncDeletion, DeletionType
from posthog.models.async_deletion.delete import AsyncDeletionProcess, logger
class AsyncCohortDeletion(AsyncDeletionProcess):
DELETION_TYPES = [DeletionTyp... |
migrations-data | mc_validate_cmd | import json
import subprocess
import sys
import uuid
from collections import namedtuple
from lxml import etree
SUCCESS_CODE = 0
ERROR_CODE = 1
NS = "{https://mediaarea.net/mediaconch}"
class MediaConchException(Exception):
pass
Parse = namedtuple("Parse", "etree_el stdout")
def parse_mediaconch_data(target)... |
frontend | views | import json
import re
import urllib
from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.core.validators import URLValidator
from django.http import (HttpResponse, HttpResponseBadRequest,
HttpResponseRedirect)
from django.shortcuts import ... |
FieldGraph | CGraphModel | from AppKit import NSBezierPath
from fieldMath import *
from Foundation import NSObject
from objc import *
# ____________________________________________________________
class CGraphModel(NSObject):
def init(self):
self.field = [1.0, 1.12, 0.567]
self.phase = [degToRad(0), degToRad(152.6), degToRa... |
views | resolution_note | from apps.alerts.models import ResolutionNote
from apps.alerts.tasks import send_update_resolution_note_signal
from apps.api.permissions import RBACPermission
from apps.api.serializers.resolution_note import (
ResolutionNoteSerializer,
ResolutionNoteUpdateSerializer,
)
from apps.auth_token.auth import PluginAut... |
migrations | 0173_default_user_auth_group_setting | # Generated by Django 3.2.16 on 2022-12-27 21:34
import django.db.models.deletion
from django.db import migrations, models
def backfill_sitesettings(apps, schema_editor):
db_alias = schema_editor.connection.alias
group_model = apps.get_model("auth", "Group")
editor_group = group_model.objects.using(db_al... |
versions | 057_660a5aae527e_tracking | # encoding: utf-8
"""057 Tracking
Revision ID: 660a5aae527e
Revises: 11af3215ae89
Create Date: 2018-09-04 18:49:08.573692
"""
import sqlalchemy as sa
from alembic import op
from ckan.migration import skip_based_on_legacy_engine_version
# revision identifiers, used by Alembic.
revision = "660a5aae527e"
down_revision ... |
database | table_bittorrent | #!/usr/bin/env python
#
# Copyright (c) 2011 Simone Basso <bassosimone@gmail.com>,
# NEXA Center for Internet & Society at Politecnico di Torino
# Copyright (c) 2011 Alessio Palmero Aprosio <alessio@apnetwork.it>,
# Universita` degli Studi di Milano
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubo... |
analog | wfm_rcv_fmdet | #
# Copyright 2005,2006,2012-2013,2020 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
from . import analog_python as analog
from .fm_emph import fm_deemph
class wfm_rcv_fmdet(gr.hier_block... |
tools | segment | from gaphas.connector import ConnectionSink, Connector
from gaphas.segment import LineSegment, Segment
from gaphor.core.modeling.event import RevertibleEvent
from gaphor.diagram.connectors import ItemTemporaryDisconnected
from gaphor.diagram.presentation import LinePresentation
@Segment.register(LinePresentation)
cla... |
Gui | PocketShape | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
DotView | DotView | """DotView.py -- A one-window app demonstrating how to write a custom NSView.
To build the demo program, run this line in Terminal.app:
$ python setup.py py2app -A
This creates a directory "dist" containing DotView.app. (The
-A option causes the files to be symlinked to the .app bundle instead
of copied. This me... |
Models | SettingVisibilityPresetsModel | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import List, Optional
from cura.Settings.SettingVisibilityPreset import SettingVisibilityPreset
from PyQt6.QtCore import QObject, pyqtProperty, pyqtSignal, pyqtSlot
from UM.i18n import i18nCatalog
from UM.Logge... |
neubot | config | # neubot/config.py
#
# Copyright (c) 2010-2011, 2013
# Nexa Center for Internet & Society, Politecnico di Torino (DAUIN)
# and Simone Basso <bassosimone@gmail.com>
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms o... |
bitmessageqt | statusbar | # pylint: disable=unused-argument
"""Status bar Module"""
from time import time
from PyQt4 import QtGui
class BMStatusBar(QtGui.QStatusBar):
"""Status bar with queue and priorities"""
duration = 10000
deleteAfter = 60
def __init__(self, parent=None):
super(BMStatusBar, self).__init__(paren... |
QT | PantallaAnalisis | from Code import Partida, VarGen, XRun
from Code.QT import (
Colocacion,
Columnas,
Controles,
Delegados,
Grid,
Histogram,
Iconos,
PantallaAnalisisParam,
QTUtil,
QTUtil2,
QTVarios,
Tablero,
WCapturas,
)
from PyQt4 import QtCore, QtGui
class WAnalisisGraph(QTVarios.WD... |
frescobaldi-app | bookmarkmanager | # 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
... |
gui | single_application | # Copied and modified from http://stackoverflow.com/a/12712362/605356
import logging
import sys
from typing import Optional
from PyQt5.QtCore import QTextStream, pyqtSignal
from PyQt5.QtNetwork import QLocalServer, QLocalSocket
from PyQt5.QtWidgets import QApplication
from tribler.gui.tribler_window import TriblerWin... |
representatives | alert_group_representative | import logging
from apps.alerts.constants import ActionSource
from apps.alerts.representative import AlertGroupAbstractRepresentative
from apps.slack.scenarios.scenario_step import ScenarioStep
from celery.utils.log import get_task_logger
from common.custom_celery_tasks import shared_dedicated_queue_retry_task
from dj... |
gstreamer | converter | #!/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 ... |
drone | localChangeAmount | import wx
from gui.fitCommands.helpers import DroneInfo
from logbook import Logger
from service.fit import Fit
pyfalog = Logger(__name__)
class CalcChangeLocalDroneAmountCommand(wx.Command):
def __init__(self, fitID, position, amount):
wx.Command.__init__(self, True, "Change Local Drone Amount")
... |
clients | utorrent | import os
from libs.utorrent.client import UTorrentClient
# Only compatible with uTorrent 3.0+
class TorrentClient(object):
def __init__(self):
self.conn = None
def connect(self, host, username, password):
if self.conn is not None:
return self.conn
if not host:
... |
version-checks | github_commit | __author__ = "Gina Häußge <osd@foosel.net>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import logging
import requests
BRANCH_HEAD_URL = "https://api.github.com/repos/{u... |
models | transition_model | """
@file
@brief This file contains the transitions model, used by the main window
@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-sourc... |
library | playlist | # 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.
import os
import re
from typing import Generator, Iterable, Optional
i... |
PyObjCTools | NibClassBuilder | #!/usr/bin/env python
"""NibClassBuilder.py -- Tools for working with class definitions in
"Next Interface Builder" files ("nibs").
NOTE: This module is deprecated and is not supported with modern versions
of Interface Builder because those uses a NIB format that is not compatibility
with NibClassBuilder. We have no ... |
windows | about | """
@file
@brief This file loads the About dialog (i.e about Openshot Project)
@author Jonathan Thomas <jonathan@openshot.org>
@author Olivier Girard <olivier@openshot.org>
@section LICENSE
Copyright (c) 2008-2018 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Edit... |
migrations | 0289_add_tags_to_feature_flags | # Generated by Django 3.2.16 on 2023-01-12 17:33
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0288_add_session_recording_persistence"),
]
operations = [
migrations.RemoveConstraint(
... |
statusbar | url | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""URL displayed in the statusbar."""
import enum
from qutebrowser.config import stylesheet
from qutebrowser.mainwindow.statusbar import textbase
from qutebrowser.qt.core import QUrl, pyqtProp... |
osf | tests | #!/usr/bin/env python
# -*- coding: 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 Affero General Public License
# as published by the Free Software Foundation; eith... |
examples | fir_filter_fff | #!/usr/bin/env python
#
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
from argparse import ArgumentParser
import numpy
from gnuradio import analog, blocks, eng_notation, filter, gr
from gnuradio.eng_arg import eng_float,... |
pwidgets | fillctrls | # -*- 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.... |
lib | opml | # version : 0.5
# https://pypi.python.org/pypi/opml
import lxml.etree
class OutlineElement(object):
"""A single outline object."""
def __init__(self, root):
"""Initialize from the root <outline> node."""
self._root = root
def __getattr__(self, attr):
if attr in self._root.attrib... |
plugins | noduplicates_test | __copyright__ = "Copyright (C) 2014-2016 Martin Blais"
__license__ = "GNU GPLv2"
import unittest
from beancount import loader
from beancount.core import compare
from beancount.parser import cmptest
from beancount.plugins import noduplicates
class TestValidateDuplicates(cmptest.TestCase):
def checkDuplicates(se... |
PyObjCTest | test_nsuserinterfaceitemsearching | from AppKit import *
from PyObjCTools.TestSupport import *
class TestNSUserInterfaceItemSearchingHelper(NSObject):
def searchForItemsWithSearchString_resultLimit_matchedItemHandler_(self, s, l, h):
pass
class TestNSUserInterfaceItemSearching(TestCase):
@min_os_level("10.6")
def testMethods(self)... |
bookwyrm | urls | """ url routing for the app and api """
from bookwyrm import settings, views
from bookwyrm.utils import regex
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import path, re_path
from django.views.generic.ba... |
webui | webserver_thread | # -*- coding: utf-8 -*-
import logging
import threading
from cheroot import wsgi
from cheroot.ssl.builtin import BuiltinSSLAdapter
from .app import App
# TODO: make configurable to serve API
class WebServerThread(threading.Thread):
def __init__(self, pycore):
super().__init__()
self.daemon = Tr... |
reader | others_reader | # --------------------------------------------------------------------------
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.