section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
service | network | # =============================================================================
# Copyright (C) 2014 Ryan Holmes
#
# 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 v... |
builtinContextMenus | itemFill | import gui.fitCommands as cmd
import gui.mainFrame
import wx
from gui.contextMenu import ContextMenuSingle
_t = wx.GetTranslation
class FillWithItem(ContextMenuSingle):
visibilitySetting = "moduleFill"
def __init__(self):
self.mainFrame = gui.mainFrame.MainFrame.getInstance()
def display(self, ... |
qtui | scriptpage | # Copyright (C) 2011 Chris Dekter
# Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu>
# 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) a... |
PyObjCTest | test_nstabview | from AppKit import *
from PyObjCTools.TestSupport import *
class TestNSTabViewHelper(NSObject):
def tabView_shouldSelectTabViewItem_(self, tv, it):
return 1
class TestNSTabView(TestCase):
def testConstants(self):
self.assertEqual(NSTopTabsBezelBorder, 0)
self.assertEqual(NSLeftTabsBe... |
downloaders | XDCC | # -*- coding: utf-8 -*-
import os
import re
import select
import socket
import struct
import threading
import time
from pyload.core.network.exceptions import Abort
from pyload.core.utils import format
from pyload.core.utils.convert import to_bytes, to_str
from pyload.core.utils.struct.lock import lock
from ..base.ad... |
migrations | 0085_org_models | # Generated by Django 3.0.6 on 2020-09-17 15:20
import hashlib
import uuid
import django.db.models.deletion
import django.db.models.expressions
import posthog.models.utils
from django.conf import settings
from django.db import migrations, models
def forwards_func(apps, schema_editor):
User = apps.get_model("pos... |
neubot | defer | # neubot/defer.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 Licen... |
Worker | Worker | import time
import gevent
import gevent.lock
from Config import config
from Content.ContentManager import VerifyError
from Debug import Debug
class WorkerDownloadError(Exception):
pass
class WorkerIOError(Exception):
pass
class WorkerStop(Exception):
pass
class Worker(object):
def __init__(self... |
migrations | upgrade39 | """
Migration 39
- Shield amplifier tiericide
- CCP getting rid of DB TDs due to exploits
"""
CONVERSIONS = {
1798: (9562,), # 'Basic' EM Shield Amplifier # Supplemental EM Ward Amplifier
1804: ( # 'Basic' Explosive Shield Amplifier
9574, # Supplemental Explosive Deflection Amplifier
),
18... |
script | functions | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2006-2009, 2012 Lukáš Lalinský
# Copyright (C) 2007 Javier Kohen
# Copyright (C) 2008-2011, 2014-2015, 2018-2023 Philipp Wolfer
# Copyright (C) 2009 Carlin Mangar
# Copyright (C) 2009 Nikolai Prokoschenko
# Copyright (C) 2011-2... |
searx-extra | standalone_searx | #!/usr/bin/env python
"""Script to run searx from terminal.
Getting categories without initiate the engine will only return `['general']`
>>> import searx.engines
... list(searx.engines.categories.keys())
['general']
>>> import searx.search
... searx.search.initialize()
... list(searx.engines.categories.keys())
['gen... |
protos | ssd_anchor_generator_pb2 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: object_detection/protos/ssd_anchor_generator.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 goog... |
Models | DiscoveredPrintersModel | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import TYPE_CHECKING, Callable, Dict, List, Optional
from PyQt6.QtCore import QObject, QTimer, pyqtProperty, pyqtSignal, pyqtSlot
from UM.i18n import i18nCatalog
from UM.Logger import Logger
from UM.OutputDevic... |
clickhouse | system_status | from datetime import timedelta
from os.path import abspath, dirname, join
from typing import Dict, Generator, List, Tuple
from zoneinfo import ZoneInfo
from dateutil.relativedelta import relativedelta
from django.utils import timezone
from posthog.api.dead_letter_queue import (
get_dead_letter_queue_events_last_24... |
aliceVision | SfMAlignment | __version__ = "2.0"
import os.path
from meshroom.core import desc
class SfMAlignment(desc.AVCommandLineNode):
commandLine = "aliceVision_sfmAlignment {allParams}"
size = desc.DynamicNodeSize("input")
category = "Utils"
documentation = """
This node allows to change the coordinate system of one SfM ... |
slack | views | import hashlib
import hmac
import json
import logging
from contextlib import suppress
from apps.api.permissions import RBACPermission
from apps.auth_token.auth import PluginAuthentication
from apps.base.utils import live_settings
from apps.slack.client import SlackClient
from apps.slack.errors import SlackAPIError
fro... |
objc | _context | """
A number of Cocoa API's have a 'context' argument that is a plain 'void*'
in ObjC, and an Integer value in Python. The 'context' object defined here
allows you to get a unique integer number that can be used as the context
argument for any Python object, and retrieve that object later on using the
context number.
... |
Test | UnicodeTests | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2007 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system.... |
draftmake | make_fillet | # ***************************************************************************
# * Copyright (c) 2019 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
events | autorating | # Copyright 2005 Joe Wreschnig
#
# 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 quodlibet import _
from quodlibet... |
qtgui | compass | #!/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 time
import numpy
import pmt
from gnuradio import gr
from PyQt5 import Qt
from PyQt5.QtCore import QPoint
from PyQt5.QtCore import... |
utils | thumbnails | import io
import math
import os
from pathlib import Path
import numpy as np
from django.conf import settings
from photonix.photos.models import Photo, PhotoFile, Task
from photonix.photos.utils.metadata import PhotoMetadata
from PIL import Image, ImageFile, ImageOps
THUMBNAILER_VERSION = 20210321
def process_genera... |
blueprints | app_blueprint | # -*- coding: utf-8 -*-
import datetime
import mimetypes
import operator
import os
import re
import sys
import time
from logging import getLogger
from urllib.parse import unquote
import flask
from pyload import APPID, PKGDIR
from pyload.core.utils import format
from ..helpers import (
clear_session,
get_perm... |
gui | compatibility | # -*- coding: utf-8 -*-
# This file is part of MyPaint.
# Copyright (C) 2019 by the MyPaint Development Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or... |
PythonBrowser | PythonBrowser | """PythonBrowser.py -- a module and/or demo program implementing a Python
object browser.
It can be used in two ways:
1) as a standalone demo app that shows how to use the NSOutlineView class
2) as a module to add an object browser to your app.
For the latter usage, include PythonBrowser.nib in your app bundle,
make ... |
extractor | mgoon | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import ExtractorError, qualities, unified_strdate
from .common import InfoExtractor
class MgoonIE(InfoExtractor):
_VALID_URL = r"""(?x)https?://(?:www\.)?
(?:(:?m\.)?mgoon\.com/(?:ch/(?:.+)/v|play/view)|
video\.mgoon\.com... |
snippet | builtin | # 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
... |
browser | inspector | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Base class for a QtWebKit/QtWebEngine web inspector."""
import base64
import binascii
import enum
from typing import Any, Optional, cast
from qutebrowser.browser import eventfilter
from qut... |
widgets | multifx | import copy
from sglib.lib.translate import _
from sglib.models.multifx_settings import multifx_settings
from sgui.sgqt import *
from . import _shared
from .control import *
from .multifx_tooltips import MULTIFX_INFO, mfx_set_tooltip
MULTIFX_CLIPBOARD = None
MULTIFX_EFFECTS_LOOKUP = {k: (v.index, v.tooltip) for k, v... |
webengine | webenginesettings | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Bridge from QWebEngineSettings to our own settings.
Module attributes:
ATTRIBUTES: A mapping from internal setting names to QWebEngineSetting enum
constants.
"""
import ... |
neubot | utils_posix | # neubot/utils_posix.py
#
# Copyright (c) 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... |
hogql | ast | from dataclasses import dataclass, field
from enum import Enum
from typing import Any, Dict, List, Literal, Optional, Union
from posthog.hogql.base import CTE, ConstantType, Expr, Type, UnknownType
from posthog.hogql.constants import ConstantDataType
from posthog.hogql.database.models import (
BooleanDatabaseField... |
PyObjCTest | test_cftimezone | import sys
import time
from CoreFoundation import *
from Foundation import NSDictionary, NSMutableDictionary, NSString
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
try:
long
except NameError:
long = int
class TestTimeZone(TestCase):
def testTypes(self):
... |
migrations | 0260_pak_v2 | # Generated by Django 3.2.15 on 2022-09-20 17:07
from django.contrib.auth.hashers import get_hasher
from django.db import migrations, models
PERSONAL_API_KEY_SALT = "posthog_personal_api_key"
def hash_key_value(value: str) -> str:
return get_hasher().encode(value, PERSONAL_API_KEY_SALT)
def hash_all_keys(apps... |
extractor | stv | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import (
compat_str,
float_or_none,
int_or_none,
smuggle_url,
str_or_none,
try_get,
)
from .common import InfoExtractor
class STVPlayerIE(InfoExtractor):
IE_NAME = "stv:player"
_VALID_URL = r"https?://play... |
bleachbit | _platform | #! /usr/bin/python3.7
""" This module tries to retrieve as much platform-identifying data as
possible. It makes this information available via function APIs.
If called from the command line, it prints the platform
information concatenated as single string to stdout. The output
format is usable as part... |
userguide | read | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2013 - 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
... |
example-iresourcecontroller | plugin | # encoding: utf-8
from collections import defaultdict
from typing import Any
import ckan.plugins as plugins
class ExampleIResourceControllerPlugin(plugins.SingletonPlugin):
plugins.implements(plugins.IResourceController)
def __init__(self, *args: Any, **kwargs: Any):
super().__init__(*args, **kwarg... |
extensions | filter | # -*- coding: utf-8 -*-
# Disable automatic downloads based on episode title.
# Released under the same license terms as gPodder itself.
import re
import gpodder
import gi # isort:skip
gi.require_version("Gtk", "3.0") # isort:skip
from gi.repository import Gtk # isort:skip
_ = gpodder.gettext
__title__ = _("Fi... |
funnels | funnel_trends | from datetime import datetime
from itertools import groupby
from typing import List, Optional, Tuple
from posthog.models.cohort import Cohort
from posthog.models.filters.filter import Filter
from posthog.models.team import Team
from posthog.queries.funnels.base import ClickhouseFunnelBase
from posthog.queries.funnels.... |
models | maintainable_object | import datetime
from uuid import uuid4
import humanize
import pytz
from common.exceptions import MaintenanceCouldNotBeStartedError
from common.insight_log import MaintenanceEvent, write_maintenance_insight_log
from django.db import models, transaction
from django.utils import timezone
class MaintainableObject(models... |
migrations | 0013_auto_20230517_0510 | # Generated by Django 3.2.18 on 2023-05-17 05:10
from django.db import migrations, models
from django.db.models import F
SOURCE_WEB = 0
def drop_autogenerated_web_shift_name(apps, schema_editor):
CustomOnCallShift = apps.get_model("schedules", "CustomOnCallShift")
CustomOnCallShift.objects.filter(source=SOU... |
accounts | WrzucajplikiPl | # -*- coding: utf-8 -*-
import re
import time
from pyload.core.utils import parse
from ..base.account import BaseAccount
from ..helpers import parse_html_form
class WrzucajplikiPl(BaseAccount):
__name__ = "WrzucajplikiPl"
__type__ = "account"
__version__ = "0.01"
__status__ = "testing"
__descr... |
plugins | auto_accounts | """This module automatically inserts Open directives for accounts not opened (at
the date of the first entry) and automatically removes open directives for
unused accounts. This can be used as a convenience for doing demos, or when
setting up your initial transactions, as an intermediate step.
"""
__copyright__ = "Copy... |
gui | Dialogs | # Copyright 2008, 2009, 2016 Free Software Foundation, Inc.
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
import sys
import textwrap
from shutil import which as find_executable
from gi.repository import Gdk, Gio, GLib, Gtk
from ..core import Messages
from . import Actions, Constan... |
downloaders | SolidfilesCom | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
#
# Test links:
# http://www.solidfiles.com/d/609cdb4b1b
class SolidfilesCom(SimpleDownloader):
__name__ = "SolidfilesCom"
__type__ = "downloader"
__version__ = "0.09"
__status__ = "testing"
__pattern__ ... |
disabled-Dnschain | SiteManagerPlugin | import json
import logging
import os
import re
import sys
import time
import gevent
from Config import config
from Debug import Debug
from Plugin import PluginManager
from util import Http
allow_reload = False # No reload supported
log = logging.getLogger("DnschainPlugin")
@PluginManager.registerTo("SiteManager")... |
downloaders | VkCom | # -*- coding: utf-8 -*-
#
# Test links:
# http://vk.com/video_ext.php?oid=166335015&id=162608895&hash=b55affa83774504b&hd=1
import re
from ..base.simple_downloader import SimpleDownloader
class VkCom(SimpleDownloader):
__name__ = "VkCom"
__type__ = "downloader"
__version__ = "0.06"
__status__ = "... |
navigation | tracker | # --------------------------------------------------------------------------
# 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... |
objc | _properties | __all__ = (
"object_property",
"bool_property",
"array_property",
"set_property",
"dict_property",
)
import collections
import sys
from copy import copy as copy_func
from objc import (
_C_BOOL,
_C_ID,
_C_NSBOOL,
NULL,
_C_NSUInteger,
ivar,
lookUpClass,
selector,
)
N... |
msi | create_windows_msi | # Copyright (c) 2022 UltiMaker
# Cura is released under the terms of the LGPLv3 or higher.
import argparse # Command line arguments parsing and help.
import os
import shutil
import subprocess
import uuid
from datetime import datetime
from pathlib import Path
from jinja2 import Template
def work_path(filename: Pat... |
downloaders | CloudzillaTo | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
class CloudzillaTo(SimpleDownloader):
__name__ = "CloudzillaTo"
__type__ = "downloader"
__version__ = "0.13"
__status__ = "testing"
__pattern__ = r"http://(?:www\.)?cloudzilla\.to/share/file/(?P<ID>[\w^_]+)"
... |
utils | pathbrowser | # ------------------------------------------------------------------------------------------------
# This file is an excerpt from Sick Beard's browser.py
# Modified and improved to fit SABnzbd.
#
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# Sick Beard is free software: you can re... |
serializers | schedules_polymorphic | from apps.public_api.serializers.schedules_calendar import (
ScheduleCalendarSerializer,
ScheduleCalendarUpdateSerializer,
)
from apps.public_api.serializers.schedules_ical import (
ScheduleICalSerializer,
ScheduleICalUpdateSerializer,
)
from apps.public_api.serializers.schedules_web import (
Schedu... |
migrations | 0007_persons_and_groups_on_events_backfill | from functools import cached_property
from typing import Dict, Tuple, Union
import structlog
from django.conf import settings
from posthog.async_migrations.definition import (
AsyncMigrationDefinition,
AsyncMigrationOperation,
AsyncMigrationOperationSQL,
)
from posthog.async_migrations.disk_util import ana... |
serializers | schedules_web | from apps.public_api.serializers.schedules_base import ScheduleBaseSerializer
from apps.schedules.models import CustomOnCallShift, OnCallScheduleWeb
from apps.schedules.tasks import (
drop_cached_ical_task,
schedule_notify_about_empty_shifts_in_schedule,
schedule_notify_about_gaps_in_schedule,
)
from common... |
downloaders | UloziskoSk | # -*- coding: utf-8 -*-
import re
import urllib.parse
from ..base.simple_downloader import SimpleDownloader
class UloziskoSk(SimpleDownloader):
__name__ = "UloziskoSk"
__type__ = "downloader"
__version__ = "0.31"
__status__ = "testing"
__pattern__ = r"http://(?:www\.)?ulozisko\.sk/.+"
__conf... |
draftguitools | gui_upgrade | # ***************************************************************************
# * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * ... |
plugins | builtin | from base64 import b64encode
import requests.auth
from .base import AuthPlugin
# noinspection PyAbstractClass
class BuiltinAuthPlugin(AuthPlugin):
package_name = "(builtin)"
class HTTPBasicAuth(requests.auth.HTTPBasicAuth):
def __call__(self, request: requests.PreparedRequest) -> requests.PreparedRequest:... |
orm-bindings | collection_node | import os
from pathlib import Path
from pony import orm
from pony.orm import db_session, select
from tribler.core.components.libtorrent.torrentdef import TorrentDef
from tribler.core.components.metadata_store.db.orm_bindings.channel_metadata import (
chunks,
)
from tribler.core.components.metadata_store.db.orm_bin... |
mylar | encrypted | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 vers... |
classes | classeseditors | from gaphas.geometry import Rectangle, distance_point_point_fast
from gaphor.core.format import format, parse
from gaphor.diagram.instanteditors import instant_editor, popup_entry, show_popover
from gaphor.transaction import Transaction
from gaphor.UML.classes.association import AssociationItem
@instant_editor.regist... |
aliceVision | FeatureMatching | __version__ = "2.0"
from meshroom.core import desc
class FeatureMatching(desc.AVCommandLineNode):
commandLine = "aliceVision_featureMatching {allParams}"
size = desc.DynamicNodeSize("input")
parallelization = desc.Parallelization(blockSize=20)
commandLineRange = "--rangeStart {rangeStart} --rangeSize... |
migrations | upgrade4 | """
Migration 4
- Converts modules based on Proteus Module Tiericide
Some modules have been unpublished (and unpublished module attributes are removed
from database), which causes pyfa to crash. We therefore replace these
modules with their new replacements
Based on http://community.eveonline.com/news... |
extractor | palcomp3 | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_str
from ..utils import int_or_none, str_or_none, try_get
from .common import InfoExtractor
class PalcoMP3BaseIE(InfoExtractor):
_GQL_QUERY_TMPL = """{
artist(slug: "%s") {
%s
}
}"""
_ARTIST_FIELDS_TMPL = "... |
commandFit | add | import eos.db
import wx
from logbook import Logger
from service.fit import Fit
pyfalog = Logger(__name__)
class CalcAddCommandCommand(wx.Command):
def __init__(self, fitID, commandFitID, state=None):
wx.Command.__init__(self, True, "Add Command Fit")
self.fitID = fitID
self.commandFitID =... |
Todo | ToDoItem | from Foundation import *
# enum ToDoItemStatus
INCOMPLETE = 0
COMPLETE = 1
DEFER_TO_NEXT_DAY = 2
SECS_IN_MINUTE = 60
SECS_IN_HOUR = SECS_IN_MINUTE * 60
SECS_IN_DAY = SECS_IN_HOUR * 24
SECS_IN_WEEK = SECS_IN_DAY * 7
class ToDoItem(NSObject):
__slots__ = (
"_day",
"_itemName",
"_notes",
... |
lector | toolbars | # This file is a part of Lector, a Qt based ebook reader
# Copyright (C) 2017-2019 BasioMeusPuga
# 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 o... |
backend | zotero | import logging
import requests
from django.conf import settings
from papers.utils import sanitize_html
logger = logging.getLogger("dissemin." + __name__)
##### Zotero interface #####
def fetch_zotero_by_DOI(doi):
"""
Fetch Zotero metadata for a given DOI.
Works only with the doi_cache proxy.
"""
... |
example-idatasetform | plugin_v5 | # encoding: utf-8
import ckan.plugins as p
import ckan.plugins.toolkit as tk
from ckan.types import Schema
class ExampleIDatasetFormPlugin(tk.DefaultDatasetForm, p.SingletonPlugin):
p.implements(p.IDatasetForm)
def create_package_schema(self) -> Schema:
# let's grab the default schema in our plugin
... |
gtk3 | queuedtorrents | #
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import os.path
... |
socks5 | connection | import logging
from asyncio import Protocol, ensure_future
from ipv8.messaging.serialization import PackError
from tribler.core.components.socks_servers.socks5.conversion import (
REP_COMMAND_NOT_SUPPORTED,
REP_SUCCEEDED,
REQ_CMD_BIND,
REQ_CMD_CONNECT,
REQ_CMD_UDP_ASSOCIATE,
SOCKS_VERSION,
... |
builders | image_resizer_builder | # 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... |
implant | add | import eos.db
import gui.mainFrame
import wx
from eos.const import ImplantLocation
from gui import globalEvents as GE
from gui.fitCommands.calc.implant.add import CalcAddImplantCommand
from gui.fitCommands.calc.implant.changeLocation import CalcChangeImplantLocationCommand
from gui.fitCommands.helpers import ImplantInf... |
modeling | element | #!/usr/bin/env python
"""Base class for model elements."""
from __future__ import annotations
import logging
from typing import TYPE_CHECKING, Callable, Iterator, Protocol, TypeVar, overload
from uuid import uuid1
from gaphor.core.modeling.event import ElementUpdated
from gaphor.core.modeling.properties import (
... |
gui | core_manager | import logging
import os
import re
import sys
import time
from collections import deque
from pathlib import Path
from typing import Optional
from PyQt5.QtCore import QObject, QProcess, QProcessEnvironment, QTimer
from PyQt5.QtNetwork import QNetworkRequest
from tribler.core.utilities.process_manager import ProcessMana... |
helpers | client | import json
import logging
import time
import typing
from urllib.parse import urljoin
import requests
from apps.api.permissions import ACTION_PREFIX, GrafanaAPIPermission
from django.conf import settings
from rest_framework import status
logger = logging.getLogger(__name__)
class GrafanaUser(typing.TypedDict):
... |
widgets | schemeselector | # 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
... |
Code | EnginesLinux32 | # -*- coding: utf-8 -*-
import collections
from Code import BaseConfig
def leeRivales():
dicRivales = collections.OrderedDict()
def mas(cm):
dicRivales[cm.clave] = cm
ConfigMotor = BaseConfig.ConfigMotor
cm = ConfigMotor(
"cheng", "Martin Sedlák", "4 ver 0.39", "http://www.vlasak.... |
resources | makeqrc | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2013-2014, 2018 Laurent Monin
# Copyright (C) 2014 Sophist-UK
# Copyright (C) 2016 Rahul Raturi
# Copyright (C) 2017 Sambhav Kothari
# Copyright (C) 2017 Ville Skyttä
#
# This program is free software; you... |
preferences | bookmarks | from gi.repository import Gtk
from sunflower.widgets.settings_page import SettingsPage
class Column:
NAME = 0
URI = 1
class BookmarksOptions(SettingsPage):
"""Bookmark options extension class"""
def __init__(self, parent, application):
SettingsPage.__init__(self, parent, application, "bookm... |
downloaders | FilesMailRu | # -*- coding: utf-8 -*-
import re
from ..base.downloader import BaseDownloader
class FilesMailRu(BaseDownloader):
__name__ = "FilesMailRu"
__type__ = "downloader"
__version__ = "0.41"
__status__ = "testing"
__pattern__ = r"http://(?:www\.)?files\.mail\.ru/.+"
__config__ = [("enabled", "bool"... |
metrics | gh | import json
import os
import urllib.request
import glom
API_KEY_ENV_VAR = "GH_API_KEY"
required_cmds = {}
required_env_vars = {
API_KEY_ENV_VAR: "The GitHub API only allows 50 requests per hour for unauthenticated clients."
"\nTo unlock 5000/hour, sent an env var with a token generated here: https://github.c... |
bleachbit | GuiBasic | # vim: ts=4:sw=4:expandtab
# BleachBit
# Copyright (C) 2008-2023 Andrew Ziem
# https://www.bleachbit.org
#
# 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
# ... |
picard | plugin | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2007-2008 Lukáš Lalinský
# Copyright (C) 2009 Carlin Mangar
# Copyright (C) 2009, 2014, 2017-2021, 2023 Philipp Wolfer
# Copyright (C) 2011 johnny64
# Copyright (C) 2011-2013 Michael Wiencek
# Copyright (C) 2013 Sebastian Ramac... |
extractor | zattoo | # coding: utf-8
from __future__ import unicode_literals
import re
from uuid import uuid4
from ..compat import compat_HTTPError, compat_str
from ..utils import (
ExtractorError,
int_or_none,
try_get,
url_or_none,
urlencode_postdata,
)
from .common import InfoExtractor
class ZattooPlatformBaseIE(I... |
formspree | settings | import os
import sys
from flask import render_template
# load a bunch of environment
DEBUG = os.getenv("DEBUG") in ["True", "true", "1", "yes"]
if DEBUG:
SQLALCHEMY_ECHO = True
TESTING = os.getenv("TESTING") in ["True", "true", "1", "yes"]
SQLALCHEMY_DATABASE_URI = os.getenv("SQLALCHEMY_DATABASE_URI") or os.get... |
draftguitools | gui_heal | # ***************************************************************************
# * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * ... |
browsers | _base | # Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna
# 2012 Christoph Reiter
# 2016-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... |
commands | thumbnail_processor | import queue
import threading
from multiprocessing import cpu_count
from time import sleep
from django.core.management.base import BaseCommand
from photonix.photos.models import Task
from photonix.photos.utils.tasks import requeue_stuck_tasks
from photonix.photos.utils.thumbnails import generate_thumbnails_for_photo
f... |
VersionUpgrade35to40 | VersionUpgrade35to40 | import configparser
import io
from typing import Dict, List, Set, Tuple
from cura.PrinterOutput.PrinterOutputDevice import ConnectionType
from UM.VersionUpgrade import VersionUpgrade
deleted_settings = {"bridge_wall_max_overhang"} # type: Set[str]
renamed_configurations = {"connect_group_name": "group_name"} # type... |
utilities | path_util | from __future__ import annotations
import itertools
import os
import pathlib
import sys
import tempfile
from itertools import islice
from typing import Union
from file_read_backwards import FileReadBackwards
class Path(type(pathlib.Path())):
@staticmethod
def mkdtemp(*args, **kwargs) -> Path:
return... |
sk1-wx | bbox | #!/usr/bin/env python2
#
# BuildBox for sK1/UniConvertor 2.x
#
# Copyright (C) 2018 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... |
metadata | aac | # Copyright (C) 2023 luzip665
#
# 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 it wil... |
utils | times | import re
from datetime import datetime, timezone, tzinfo
from typing import Callable, Literal, Union, overload
from isodate import LOCAL, parse_datetime # type: ignore[import]
UTC = timezone.utc
def now(tz: tzinfo = UTC) -> datetime:
return datetime.now(tz=tz)
def localnow() -> datetime:
return datetime... |
lector | sorter | # This file is a part of Lector, a Qt based ebook reader
# Copyright (C) 2017-2019 BasioMeusPuga
# 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 o... |
old | download_docs | #!/usr/bin/env python3
"""Download all the Beancount docs from Google Drive and bake a nice PDF with it.
TODO: Convert all the documentation using Pandoc to its native format, and write
a custom filter to make the native nicer, identify the code blocks, etc. and
write it out to Markdown and others.
"""
__copyright__ =... |
qltk | ratingsmenu | # Copyright 2011-2020 Nick Boultbee
# 2005 Joe Wreschnig
#
# 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.
fr... |
lib | winfolders | """ Get windows special folders without pythonwin
Example:
import specialfolders
start_programs = specialfolders.get(specialfolders.PROGRAMS)
Code is public domain, do with it what you will.
Luke Pinner - Environment.gov.au, 2010 February 10
"""
# Imports use _syntax to mask them from aut... |
beetsplug | acousticbrainz | # This file is part of beets.
# Copyright 2015-2016, Ohm Patel.
#
# 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, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.