section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
protos | post_processing_pb2 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/post_processing.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pb2
from google.pr... |
MacOS | build_macos | # Copyright (c) 2023 UltiMaker
# Cura is released under the terms of the LGPLv3 or higher.
import argparse # Command line arguments parsing and help.
import os
import subprocess
from pathlib import Path
ULTIMAKER_CURA_DOMAIN = os.environ.get("ULTIMAKER_CURA_DOMAIN", "nl.ultimaker.cura")
def build_dmg(source_path:... |
south-migrations | 0001_initial | from south.db import db
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Agent'
db.create_table(
"Agent",
(
(
"uuid",
self.gf("django.db.models.fields.Char... |
uic-files | go_to_page_dialog_ui | # Form implementation generated from reading ui file './forms/go_to_page_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.9
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from . import main_window_view_rc
class Ui_GoPageDialog(object):
def setupUi(self, G... |
migrations | 0021_alter_settings_language | # Generated by Django 4.0.3 on 2022-03-05 11:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("babybuddy", "0020_update_language_en_to_en_us"),
]
operations = [
migrations.AlterField(
model_name="settings",
name=... |
gamedata | effect | # ===============================================================================
# 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, ... |
engines | openverse | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Openverse (formerly known as: Creative Commons search engine) [Images]
"""
from json import loads
from urllib.parse import urlencode
about = {
"website": "https://search.creativecommons.org/",
"wikidata_id": None,
"official_api_documentation": "https://a... |
extractor | trunews | from __future__ import unicode_literals
from .common import InfoExtractor
class TruNewsIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?trunews\.com/stream/(?P<id>[^/?#&]+)"
_TEST = {
"url": "https://www.trunews.com/stream/will-democrats-stage-a-circus-during-president-trump-s-state-of-the-union-... |
gui | task_tools | # --------------------------------------------------------------------------
# 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... |
examples | interpolate | #!/usr/bin/env python
#
# Copyright 2009,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
import time
import numpy
from gnuradio import blocks, filter, gr
from gnuradio.fft import window
try:
from gnuradio import analog
excep... |
draftobjects | clone | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 FreeCAD Developers *
# * ... |
saveddata | fighter | # ===============================================================================
# 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, ... |
playlist | export_to_sonos | # Copyright 2020-23 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.
import time
import quodlibet
DEVIC... |
markupsafe | tests | # -*- coding: utf-8 -*-
import gc
import sys
import unittest
from markupsafe import Markup, escape, escape_silent
from markupsafe._compat import text_type
class MarkupTestCase(unittest.TestCase):
def test_adding(self):
# adding two strings should escape the unsafe one
unsafe = '<script type="appl... |
Gui | Selection | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2015 Dan Falck <ddfalck@gmail.com> *
# * Copyright (c) 2021 Schildkroet *
# * ... |
feature-flag | feature_flag | import json
from typing import Dict, List, Optional, cast
import structlog
from django.core.cache import cache
from django.db import models
from django.db.models.signals import post_delete, post_save, pre_delete
from django.utils import timezone
from posthog.constants import (
ENRICHED_DASHBOARD_INSIGHT_IDENTIFIER... |
digital | qa_chunks_to_symbols | #!/usr/bin/env python
#
# Copyright 2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import pmt
from gnuradio import blocks, digital, gr, gr_unittest
class test_chunks_to_symbols(gr_unittest.TestCase):
def setUp(self):
self.tb ... |
PyObjCTest | test_nsset | import objc
from Foundation import *
from PyObjCTools.TestSupport import *
class TestNSSetInteraction(TestCase):
def __testRepeatedAllocInit(self):
for i in range(1, 1000):
a = NSSet.alloc().init()
def __testContains(self):
x = NSSet.setWithArray_(["foo", "bar", "baz"])
s... |
CIHazeFilterSample | MyHazeFilter | import objc
from Cocoa import *
from Quartz import *
_hazeRemovalKernel = None
class MyHazeFilter(CIFilter):
inputImage = objc.ivar()
inputColor = objc.ivar()
inputDistance = objc.ivar()
inputSlope = objc.ivar()
@classmethod
def initialize(cls):
CIFilter.registerFilterName_constructo... |
parts | ctxpanel | # -*- 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_nsgeometry | import Foundation
from Foundation import *
from PyObjCTools.TestSupport import *
class TestNSGeometry(TestCase):
def testConstants(self):
self.assertEqual(NSMinXEdge, 0)
self.assertEqual(NSMinYEdge, 1)
self.assertEqual(NSMaxXEdge, 2)
self.assertEqual(NSMaxYEdge, 3)
self.as... |
models | user_notification_policy_log_record | import logging
import humanize
from apps.alerts.tasks import send_update_log_report_signal
from apps.alerts.utils import render_relative_timeline
from apps.base.messaging import get_messaging_backend_from_id
from apps.base.models import UserNotificationPolicy
from apps.base.models.user_notification_policy import valid... |
options | interface_top_tags | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2019-2021 Philipp Wolfer
# Copyright (C) 2020-2021 Laurent Monin
#
# 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... |
extractor | ninenow | # coding: utf-8
from __future__ import unicode_literals
from ..compat import compat_str
from ..utils import ExtractorError, float_or_none, int_or_none, smuggle_url
from .common import InfoExtractor
class NineNowIE(InfoExtractor):
IE_NAME = "9now.com.au"
_VALID_URL = r"https?://(?:www\.)?9now\.com\.au/(?:[^/]... |
widgets | time_pitch_dialog | from sglib import constants
from sglib.lib import util
from sglib.lib.translate import _
from sglib.lib.util import *
from sglib.log import LOG
from sgui.sgqt import *
class TimePitchDialogWidget:
def __init__(
self,
audio_item=None,
modes=TIMESTRETCH_MODES,
ps_pitch=False,
):
... |
Models | MaterialOutputModel | # Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Optional
from PyQt6.QtCore import QObject, pyqtProperty
class MaterialOutputModel(QObject):
def __init__(
self,
guid: Optional[str],
type: str,
color: str,
b... |
StartPage | StartPage | # ***************************************************************************
# * Copyright (c) 2018 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
orm-bindings | tracker_state | from pony import orm
from tribler.core.utilities.tracker_utils import (
MalformedTrackerURLException,
get_uniformed_tracker_url,
)
def define_binding(db):
class TrackerState(db.Entity):
"""
This ORM class holds information about torrent trackers that TorrentChecker got while checking
... |
urllib3 | response | try:
import http.client as httplib
except ImportError:
import httplib
import io
import zlib
from socket import timeout as SocketTimeout
from ._collections import HTTPHeaderDict
from .connection import BaseSSLError, HTTPException
from .exceptions import DecodeError, ProtocolError, ReadTimeoutError, ResponseNot... |
extractor | rutv | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import ExtractorError, int_or_none, str_to_int
from .common import InfoExtractor
class RUTVIE(InfoExtractor):
IE_DESC = "RUTV.RU"
_VALID_URL = r"""(?x)
https?://
(?:test)?player\.(?:rut... |
qtgui | azelplot | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2020 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
import numpy as np
import pmt
from gnuradio import gr
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as Fig... |
plugins | dlive | """
$description Global live-streaming platform owned by BitTorrent, Inc.
$url dlive.tv
$type live, vod
$metadata author
$metadata title
"""
import logging
import re
from urllib.parse import unquote_plus
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.str... |
util | formatting | #!/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 ... |
lib | require | # 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, ... |
picard | log | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2007, 2011 Lukáš Lalinský
# Copyright (C) 2008-2010, 2019, 2021, 2023 Philipp Wolfer
# Copyright (C) 2012-2013 Michael Wiencek
# Copyright (C) 2013, 2015, 2018-2021, 2023 Laurent Monin
# Copyright (C) 2016-2018 Sambhav Kothari
... |
transforms | flatcss | """
CSS flattening transform.
"""
from __future__ import with_statement
__license__ = "GPL v3"
__copyright__ = "2008, Marshall T. Vandegrift <llasram@gmail.com>"
import math
import operator
import re
from collections import defaultdict
from xml.dom import SyntaxErr
import cssutils
from calibre import guess_type
from... |
daw | api_playlist | try:
from sg_py_vendor.pymarshal import pm_assert
except ImportError:
from pymarshal import pm_assert
from sglib import constants
from sglib.models.daw.playlist import Playlist, PlaylistEntry, PlaylistPoolEntry
def load():
"""Load all data for the playlist widget
@return:
list, The names of s... |
views | status | """ what are we here for if not for posting """
import logging
import re
from urllib.parse import urlparse
from bookwyrm import forms, models
from bookwyrm.models.report import DELETE_ITEM
from bookwyrm.utils import regex, sanitizer
from django.contrib.auth.decorators import login_required
from django.core.exceptions ... |
oncall-gateway | tasks | import requests
from celery.utils.log import get_task_logger
from common.custom_celery_tasks import shared_dedicated_queue_retry_task
from django.conf import settings
from .oncall_gateway_client import OnCallGatewayAPIClient
task_logger = get_task_logger(__name__)
@shared_dedicated_queue_retry_task(
autoretry_f... |
image-resizing | unsplashit | # The contents of this file are subject to the Common Public Attribution
# License Version 1.0. (the "License"); you may not use this file except in
# compliance with the License. You may obtain a copy of the License at
# http://code.reddit.com/LICENSE. The License is based on the Mozilla Public
# License Version 1.1, ... |
ui | selftest | import contextlib
import importlib.resources
import logging
import platform
import sys
import tempfile
import textwrap
import time
import cairo
import gi
from gaphor.abc import Service
from gaphor.application import Application, distribution
from gaphor.core import Transaction
from gaphor.core.modeling import Diagram
... |
devscripts | utils | # coding: utf-8
from __future__ import unicode_literals
import argparse
import functools
import os.path
import subprocess
import sys
dirn = os.path.dirname
sys.path.insert(0, dirn(dirn(os.path.abspath(__file__))))
from youtube_dl.compat import compat_kwargs
from youtube_dl.compat import compat_open as open
def re... |
managers | thread_manager | # -*- coding: utf-8 -*-
import os
import re
import subprocess
import time
from datetime import timedelta
from random import choice
from threading import Event, Lock
from ..datatypes.pyfile import PyFile
from ..network.request_factory import get_url
from ..threads.decrypter_thread import DecrypterThread
from ..threads... |
beetsplug | hook | # This file is part of beets.
# Copyright 2015, 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, ... |
saveddata | price | # ===============================================================================
# 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, ... |
audioinfo | mp4 | from copy import deepcopy
from mutagen.mp4 import MP4, MP4Cover
from . import tag_versions, util
from .util import (
FILENAME,
FILETAGS,
PATH,
CaselessDict,
cover_info,
del_deco,
fn_hash,
get_mime,
get_total,
getdeco,
info_to_dict,
isempty,
keys_deco,
parse_imag... |
auxiliary | util | #
# Quru Image Server
#
# Document: util.py
# Date started: 27 Mar 2018
# By: Matt Fozard
# Purpose: Auxiliary server utilities
# Requires:
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the ... |
ReverseEngineering | InitGui | # ***************************************************************************
# * Copyright (c) 2002 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
gtk3 | preferences | #
# Copyright (C) 2007, 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.
# S... |
beetsplug | freedesktop | # This file is part of beets.
# Copyright 2016, Matt Lichtenberg.
#
# 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... |
PathTests | TestPathCore | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
scenarios | alertgroup_appearance | import json
import typing
from apps.api.permissions import RBACPermission
from apps.slack.scenarios import scenario_step
from apps.slack.types import (
Block,
BlockActionType,
EventPayload,
InteractiveMessageActionType,
ModalView,
PayloadType,
ScenarioRoute,
)
from .step_mixins import Aler... |
plugins | dailymotion | """
$description Global live-streaming and video on-demand hosting platform.
$url dailymotion.com
$type live, vod
$metadata id
$metadata author
$metadata title
"""
import logging
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import ... |
cli | sass | # encoding: utf-8
from __future__ import annotations
import os
import subprocess
import click
from ckan.common import config
@click.command(
name="sass",
short_help="Compile all root sass documents into their CSS counterparts",
)
@click.option("-d", "--debug", is_flag=True, help="Compile css with sourcemaps... |
sphinx | conf | # -*- coding: utf-8 -*-
# ***************************************************************************
# * *
# * Copyright (c) 2012 *
# * Yorik van Havre <yorik@uncreated.net> ... |
downloaders | KatfileCom | # -*- coding: utf-8 -*-
from ..base.xfs_downloader import XFSDownloader
class KatfileCom(XFSDownloader):
__name__ = "KatfileCom"
__type__ = "downloader"
__version__ = "0.03"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?katfile\.com/\w+"
__config__ = [
("enabled", "bool",... |
src | CreateBackupJob | # Copyright (c) 2020 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import json
import threading
from datetime import datetime
from typing import Any, Dict, Optional
from cura.CuraApplication import CuraApplication
from cura.UltimakerCloud.UltimakerCloudScope import UltimakerCloudScope
from... |
misc | create_info | #!/usr/bin/env python3
import plistlib
import sys
if __name__ == "__main__":
assert sys.version_info[0] == 3
# "quodlibet" "3.4.0"
app_id, app_version = sys.argv[1:]
app_id_lower = app_id.lower()
plist = dict(
CFBundleExecutable=app_id_lower,
CFBundleIconFile="%s.icns" % app_id_l... |
gui | brushiconeditor | # -*- coding: utf-8 -*-
# This file is part of MyPaint.
# Copyright (C) 2009-2013 by Martin Renold <martinxyz@gmx.ch>
# Copyright (C) 2013-2019 by the MyPaint Development Team.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by... |
plugins | site | from dataclasses import asdict, dataclass
from hashlib import md5
from typing import TYPE_CHECKING, List, Optional
if TYPE_CHECKING:
from posthog.models import Team
@dataclass
class WebJsSource:
id: int
source: str
token: str
config_schema: List[dict]
config: dict
@dataclass
class WebJsUrl:... |
PyObjCTest | test_nsglyphgenerator | from AppKit import *
from PyObjCTools.TestSupport import *
class TestNSGlyphGeneratorHelper(NSObject):
def insertGlyphs_length_forStartingGlyphAtIndex_characterIndex_(
self, glyphs, length, glyphIndex, charIndex
):
self.glyphs = (glyphs, length, glyphIndex, charIndex)
def setIntAttribute_... |
schedulers | background | from __future__ import absolute_import
from threading import Event, Thread
from apscheduler.schedulers.base import BaseScheduler
from apscheduler.schedulers.blocking import BlockingScheduler
from apscheduler.util import asbool
class BackgroundScheduler(BlockingScheduler):
"""
A scheduler that runs in the ba... |
PyObjCTest | test_nstreecontroller | from AppKit import *
from PyObjCTools.TestSupport import *
class TestNSTreeController(TestCase):
def testMethods(self):
self.assertResultIsBOOL(NSTreeController.canInsert)
self.assertResultIsBOOL(NSTreeController.canInsertChild)
self.assertResultIsBOOL(NSTreeController.canAddChild)
... |
widgets | tristatesortheaderview | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2019-2020, 2022 Philipp Wolfer
# Copyright (C) 2020-2022 Laurent Monin
#
# 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 S... |
storage | object_storage | import abc
from typing import Dict, List, Optional, Union
import structlog
from boto3 import client
from botocore.client import Config
from django.conf import settings
from sentry_sdk import capture_exception
logger = structlog.get_logger(__name__)
class ObjectStorageError(Exception):
pass
class ObjectStorage... |
context | text | # -*- coding: utf-8 -*-
#
# Copyright (C) 2016 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.... |
models | last_modified | # 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, ... |
internal | storage | import gzip
import json
import logging
import pathlib
import tempfile
from mopidy import models
logger = logging.getLogger(__name__)
def load(path):
"""
Deserialize data from file.
:param path: full path to import file
:type path: pathlib.Path
:return: deserialized data
:rtype: dict
"""... |
fec | extended_tagged_decoder | #!/usr/bin/env python
#
# Copyright 2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from gnuradio import blocks, digital, gr
from . import fec_python as fec
from .bitflip import read_bitlist
class extended_tagged_decoder(gr.hier_block2):
... |
downloaders | Keep2ShareCc | # -*- coding: utf-8 -*-
import json
import re
from pyload.core.network.http.exceptions import BadHeader
from ..base.simple_downloader import SimpleDownloader
class Keep2ShareCc(SimpleDownloader):
__name__ = "Keep2ShareCc"
__type__ = "downloader"
__version__ = "0.47"
__status__ = "testing"
__pa... |
FirmwareUpdateChecker | FirmwareUpdateCheckerJob | # Copyright (c) 2020 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import ssl
import urllib.request
from typing import Dict
from urllib.error import URLError
import certifi # type: ignore
from UM.Application import Application
from UM.i18n import i18nCatalog
from UM.Job import Job
from U... |
booster | toggleStates | import wx
from logbook import Logger
from service.fit import Fit
pyfalog = Logger(__name__)
class CalcToggleBoosterStatesCommand(wx.Command):
def __init__(self, fitID, mainPosition, positions, forceStates=None):
wx.Command.__init__(self, True, "Toggle Booster States")
self.fitID = fitID
s... |
frescobaldi-app | cursorkeys | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2016 - 2016 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
... |
api | uploaded_media | from io import BytesIO
from typing import Dict, Optional
import structlog
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from drf_spectacular.utils import extend_schema
from PIL import Image
from posthog.api.routing import StructuredViewSetMixin
from posthog.models import Upl... |
saveddata | cargo | # ===============================================================================
# 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, ... |
QT | PantallaUsuarios | import os
import shutil
from Code import Usuarios
from Code.QT import (
Colocacion,
Columnas,
Delegados,
FormLayout,
Grid,
Iconos,
QTUtil,
QTUtil2,
QTVarios,
)
class WUsuarios(QTVarios.WDialogo):
def __init__(self, procesador):
self.configuracion = procesador.configura... |
engines | genius | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Genius
"""
from datetime import datetime
from json import loads
from urllib.parse import urlencode
# about
about = {
"website": "https://genius.com/",
"wikidata_id": "Q3419343",
"official_api_documentation": "https://docs.genius.com/",
"use_official_ap... |
frescobaldi-app | viewmanager | # 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
... |
cura | AutoSave | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import time
from typing import TYPE_CHECKING, Any
from PyQt6.QtCore import QTimer
from UM.Logger import Logger
if TYPE_CHECKING:
from cura.CuraApplication import CuraApplication
class AutoSave:
def __init__(self... |
colors | combined | # 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... |
src | guiCocoaCommon | # MusicPlayer, https://github.com/albertz/music-player
# Copyright (c) 2012, Albert Zeyer, www.az2000.de
# All rights reserved.
# This code is under the 2-clause BSD license, see License.txt in the root directory of this project.
import AppKit
import objc
import utils
if "pools" not in globals():
from collections... |
bukuserver | views | """views module."""
import functools
import itertools
import logging
import types
from argparse import Namespace
from collections import Counter
from typing import Any, List, Optional, Tuple
from urllib.parse import urlparse
import arrow
import buku
import wtforms
from flask import current_app, flash, redirect, reques... |
chardet | langgreekmodel | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... |
comicapi | utils | # coding=utf-8
"""Some generic utilities"""
# Copyright 2012-2014 Anthony Beville
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless r... |
femsolver | settings | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * Copyright (c) 2019 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
services | undomanager | """Undo management for Gaphor.
Undoing and redoing actions is managed through the UndoManager.
An undo action should be a callable object (called with no arguments).
An undo action should return a callable object that acts as redo function.
If None is returned the undo action is considered to be the redo action as w... |
Crypt | CryptConnection | import hashlib
import logging
import os
import random
import ssl
import sys
from Config import config
from util import helper
class CryptConnectionManager:
def __init__(self):
if config.openssl_bin_file:
self.openssl_bin = config.openssl_bin_file
elif sys.platform.startswith("win"):
... |
docsrc | createnews | # -*- coding: utf-8 -*-
import datetime
import glob
import os
import re
import shutil
import sys
from subprocess import call
import PyRSS2Gen
def remove_headerlinks(text):
return re.sub("""<a class=['"]headerlink['"] .*?</a>""", "", text)
def to_html(fns):
rst_fns = []
html_fns = []
html_dir = "_bu... |
futures | process | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Implements ProcessPoolExecutor.
The follow diagram and text describe the data-flow through the system:
|======================= In-process =====================|== Out-of-process ==|
+----------+ +----------... |
engines | ipfs_search | import json
import re
from datetime import datetime
from urllib.parse import urlencode
# config
categories = ["general", "images", "music", "videos"]
paging = True
time_range_support = True
# url
base_url = "https://api.ipfs-search.com/v1/"
search_string = "search?{query} first-seen:{time_range} metadata.Content-Type... |
picard | track | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2004 Robert Kaye
# Copyright (C) 2006-2007, 2011 Lukáš Lalinský
# Copyright (C) 2008 Gary van der Merwe
# Copyright (C) 2009 Carlin Mangar
# Copyright (C) 2010, 2014-2015, 2018-2022 Philipp Wolfer
# Copyright (C) 2011 Chad Wils... |
Test | BenchmarkSsl | #!/usr/bin/python2
from gevent import monkey
monkey.patch_all()
import os
import socket
import ssl
import sys
import time
sys.path.append(os.path.abspath("..")) # Imports relative to src dir
import io as StringIO
import gevent
from Config import config
from gevent.pool import Pool
from gevent.server import StreamS... |
gnuradio | eng_notation | #
# Copyright 2003 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""
Display numbers as strings using engineering notation.
"""
scale_factor = {}
scale_factor["E"] = 1e18
scale_factor["P"] = 1e15
scale_factor["T"] = 1e12
scale_factor["G"] = 1e9
scal... |
sunflower | indicator | import os
import sys
from gi.repository import Gtk
from sunflower import common
class Indicator(object):
"""This class provides access to application indicators in Gnome environments"""
def __init__(self, parent):
self._parent = parent
self._menu = Gtk.Menu()
self._create_menu_items(... |
mainwin | filterwin | from PyQt5.QtCore import QTimer, pyqtSignal
from PyQt5.QtWidgets import QLineEdit, QPushButton, QWidget
from ..constants import BOTTOMDOCK
from ..puddleobjects import PuddleCombo, create_buddy
from ..translations import translate
class DelayedEdit(QLineEdit):
delayedText = pyqtSignal(str, name="delayedText")
... |
filesystem-ajax | urls | # 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 ... |
migrations | 0003_auto_20230412_0006 | # Generated by Django 3.2.18 on 2023-04-12 00:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("webhooks", "0002_auto_20230320_1604"),
]
operations = [
migrations.AddField(
model_name="webhook",
name="integration... |
filter | qa_pfb_synthesizer | #!/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
from gnuradio import blocks, fft, filter, gr, gr_unittest
def sig_source_c(samp_rate, freq, amp, N):
t = [float(x) / samp_rate for x in r... |
frontend | folder | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2013-2022 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
from flask import current_app, flash, redirect, render_template, request, url_for
from ..daemon.client import Daem... |
plugins | vimeo | """
$description Global live-streaming and video hosting social platform.
$url vimeo.com
$type live, vod
$metadata id
$metadata author
$metadata title
$notes Password protected streams are not supported
"""
import logging
import re
from urllib.parse import urljoin, urlparse
from streamlink.plugin import Plugin, plugi... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.