section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
sgui | main | #!/usr/bin/python3
"""
This file is part of the Stargate project, Copyright Stargate 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 version 3 of the License.
This program is distributed in the ... |
string | splitters | # Copyright 2004-2009 Joe Wreschnig, Michael Urman, Steven Robertson
# 2011-2018 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
# (... |
blocks | qa_tagged_stream_mux | #!/usr/bin/env python
#
# Copyright 2013-2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import numpy
import pmt
from gnuradio import blocks, gr, gr_unittest
from gnuradio.gr import packet_utils
def make_tag(key, value, offset, srcid=None):
... |
model | api_token | # encoding: utf-8
from __future__ import annotations
import copy
import datetime
from secrets import token_urlsafe
from typing import Any, Optional
from ckan.common import config
from ckan.model import DomainObject, User, meta
from sqlalchemy import Column, ForeignKey, Table, orm, types
from sqlalchemy.dialects.postg... |
sabnzbd | sabtraylinux | #!/usr/bin/python3 -OO
# Copyright 2007-2023 The SABnzbd-Team (sabnzbd.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 2
# of the License, or (at your option) any later ver... |
femsolver | writerbase | # ***************************************************************************
# * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
migrations | 0002_squashed_initial | # Generated by Django 3.2.5 on 2022-05-31 14:46
import django.db.models.deletion
import django.db.models.manager
import django_migration_linter as linter
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("user_management", "0001_squashed... |
views | util | # encoding: utf-8
import ckan.lib.base as base
import ckan.lib.helpers as h
from ckan.common import _, request
from ckan.types import Response
from flask import Blueprint
util = Blueprint("util", __name__)
def internal_redirect() -> Response:
"""Redirect to the url parameter.
Only internal URLs are allowed"... |
builtinContextMenus | additionsExportSelection | import gui.mainFrame
import wx
from gui.contextMenu import ContextMenuSelection
from gui.utils.clipboard import toClipboard
from service.fit import Fit
from service.port.eft import (
exportBoosters,
exportCargo,
exportDrones,
exportFighters,
exportImplants,
)
_t = wx.GetTranslation
class Addition... |
cura | BuildVolume | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import math
from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Optional, Set, cast
import numpy
from cura.Scene.CuraSceneNode import CuraSceneNode
from cura.Settings.ExtruderManager import ExtruderManager
from cu... |
draftguitools | gui_fillets | # ***************************************************************************
# * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
bitmessageqt | utils | import hashlib
import os
import state
from addresses import addBMIfNotPresent
from bmconfigparser import config
from PyQt4 import QtGui
str_broadcast_subscribers = "[Broadcast subscribers]"
str_chan = "[chan]"
def identiconize(address):
size = 48
if not config.getboolean("bitmessagesettings", "useidenticon... |
tools | update_options | """Update the parts of the documentation that are auto-generated.
For example, the options documentation is a Google Doc. It can be generated from
the source code and updated automatically using this script.
"""
__copyright__ = "Copyright (C) 2015-2016 Martin Blais"
__license__ = "GNU GPLv2"
import argparse
import l... |
s3 | engine | # coding:utf-8
from __future__ import print_function
import logging
from boto import s3
from boto.exception import S3CreateError, S3ResponseError
from boto.route53.exception import DNSServerError
from cactus.deployment.engine import BaseDeploymentEngine
from cactus.deployment.s3.auth import AWSCredentialsManager
from... |
models | early_access_feature | from django.db import models
from posthog.models.utils import UUIDModel, sane_repr
class EarlyAccessFeature(UUIDModel):
class Stage(models.TextChoices):
DRAFT = "draft", "draft"
CONCEPT = "concept", "concept"
ALPHA = "alpha", "alpha"
BETA = "beta", "beta"
GENERAL_AVAILABILI... |
clientScripts | create_transfer_metadata | #!/usr/bin/env python
from argparse import ArgumentParser
import django
from lxml import etree
django.setup()
import metrics
# dashboard
from main.models import Transfer
def fetch_set(sip_uuid):
transfer = Transfer.objects.get(uuid=sip_uuid)
return transfer.transfermetadatasetrow
def fetch_fields_and_val... |
bitmessagekivy | mpybit | # pylint: disable=too-many-public-methods, unused-variable, too-many-ancestors
# pylint: disable=no-name-in-module, too-few-public-methods, unused-argument
# pylint: disable=attribute-defined-outside-init, too-many-instance-attributes
"""
Bitmessage android(mobile) interface
"""
import logging
import os
import sys
fr... |
community | discovery | import time
from random import choice
from ipv8.messaging.anonymization.tunnel import PEER_FLAG_EXIT_BT
from ipv8.peerdiscovery.discovery import DiscoveryStrategy
class GoldenRatioStrategy(DiscoveryStrategy):
"""
Strategy for removing peers once we have too many in the TunnelCommunity.
This strategy wil... |
forms | users | from CTFd.constants.config import Configs
from CTFd.constants.languages import SELECT_LANGUAGE_LIST
from CTFd.forms import BaseForm
from CTFd.forms.fields import SubmitField
from CTFd.models import UserFieldEntries, UserFields
from CTFd.utils.countries import SELECT_COUNTRIES_LIST
from flask_babel import lazy_gettext a... |
plotting | grid | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2015 Timothée Lecomte
# This file is part of Friture.
#
# Friture is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# Friture is distri... |
plugins | reuters | """
$description Global business, financial, national and international news.
$url reuters.com
$url reuters.tv
$type live, vod
"""
import logging
import re
from streamlink.plugin import Plugin, PluginError, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import HLSStream
log = log... |
dev | ssltest | import os
import select
import socket
import ssl
import sys
import traceback
HOST = "127.0.0.1"
PORT = 8912
def sslProtocolVersion():
# sslProtocolVersion
if sys.version_info >= (2, 7, 13):
# this means TLSv1 or higher
# in the future change to
# ssl.PROTOCOL_TLS1.2
return ssl... |
View | Deliver | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# A GAE web application to aggregate rss and send it to your kindle.
# Visit https://github.com/cdhigh/KindleEar for the latest version
# Contributors:
# rexdf <https://github.com/rexdf>
import gettext
from collections import defaultdict
import web
from apps.BaseHandler im... |
plugins | lrt | """
$description Live TV channels from LRT, a Lithuanian public, state-owned broadcaster.
$url lrt.lt
$type live
"""
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import HLSStream
@pluginmatcher(
re.compile(
r"https?:/... |
gh-pages | update_feed | #!/usr/bin/env python3
from __future__ import unicode_literals
import datetime
import json
import os.path
import sys
import textwrap
dirn = os.path.dirname
sys.path.insert(0, dirn(dirn(os.path.abspath(__file__))))
from utils import write_file
atom_template = textwrap.dedent(
"""\
<?xml version="1.0" encodi... |
database | covers_1to2 | # Copyright (C) 2009 Aren Olson (for the old_get_track_key function)
# Copyright (C) 2018 Johannes Sasongko <sasongko@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version ... |
legecy-translators | flow | """This module translates JS flow into PY flow.
Translates:
IF ELSE
DO WHILE
WHILE
FOR 123
FOR iter
CONTINUE, BREAK, RETURN, LABEL, THROW, TRY, SWITCH
"""
import random
from jsparser import *
from nodevisitor import exp_translator
from utils import *
TO_REGISTER = []
CONTINUE_LABEL = 'JS_CONTINUE_LABEL_%s'
BREAK_LA... |
gui | buttonmap | # This file is part of MyPaint.
# Copyright (C) 2012-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
# (at your option... |
extractor | storyfire | # coding: utf-8
from __future__ import unicode_literals
import functools
from ..utils import OnDemandPagedList, int_or_none, smuggle_url # HEADRequest,
from .common import InfoExtractor
class StoryFireBaseIE(InfoExtractor):
_VALID_URL_BASE = r"https?://(?:www\.)?storyfire\.com/"
def _call_api(self, path, ... |
controllers | editor_rect | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2021 by Ihor E. Novikov
# Copyright (C) 2021 by Maxim S. Barabash
#
# 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 Li... |
Code | GestorPartida | import time
from Code import PGN, ControlPosicion, Gestor, Partida, TrListas
from Code.Constantes import *
from Code.QT import (
Controles,
Iconos,
PantallaEntMaq,
PantallaPGN,
PantallaSolo,
QTUtil,
QTUtil2,
QTVarios,
Voyager,
)
from PyQt4.QtCore import Qt
class GestorPartida(Gest... |
extractor | discoverynetworks | # coding: utf-8
from __future__ import unicode_literals
import re
from .dplay import DPlayIE
class DiscoveryNetworksDeIE(DPlayIE):
_VALID_URL = r"https?://(?:www\.)?(?P<domain>(?:tlc|dmax)\.de|dplay\.co\.uk)/(?:programme|show|sendungen)/(?P<programme>[^/]+)/(?:video/)?(?P<alternate_id>[^/]+)"
_TESTS = [
... |
feminout | importToolsFem | # ***************************************************************************
# * Copyright (c) 2017 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
net | CA | # neubot/net/CA.py
#
# Copyright (c) 2010-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 Public... |
migrations | 0003_populate_license_chooser | # Generated by Django 2.2.1 on 2019-05-27 11:28
from django.db import migrations
def create_osf_license_choosers(apps, schema_editor):
"""
Creates LicenseChooser objects for osf repositories as they were hard-coded before introduced model.
"""
License = apps.get_model("deposit", "License")
Reposi... |
cdp | client | import base64
import re
from contextlib import asynccontextmanager
from dataclasses import dataclass
from typing import Any, AsyncGenerator, Awaitable, Callable, Coroutine, List, Mapping, Optional, Set
import trio
from streamlink.session import Streamlink
from streamlink.webbrowser.cdp.connection import CDPConnection,... |
models | embedded_ssd_mobilenet_v1_feature_extractor | # 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... |
posthog | health | # Defines the healthcheck endpoints to be used by process orchestration system
# deployments to ensure:
# 1. new deployments are not marked as ready if they are misconfigured, e.g.
# kafka settings are wrong
# 2. pods that are dead for some reason are taken out of service
# 3. traffic is not routed to pods that... |
hangups | setup | import os
import sys
from setuptools import setup
if sys.version_info < (3, 6):
raise RuntimeError("hangups requires Python 3.6+")
# Find __version__ without import that requires dependencies to be installed:
exec(open(os.path.join(os.path.dirname(__file__), "hangups/version.py")).read())
with open("README.rs... |
internal | daemons | """
This module provides an interface to spawn a detached task to be
run with httpie.internal.daemon_runner on a separate process. It is
based on DVC's daemon system.
https://github.com/iterative/dvc/blob/main/dvc/daemon.py
"""
import inspect
import os
import platform
import sys
from contextlib import suppress
from su... |
util | ssl_ | from binascii import hexlify, unhexlify
from hashlib import md5, sha1, sha256
from ..exceptions import InsecurePlatformWarning, SSLError
SSLContext = None
HAS_SNI = False
create_default_context = None
import errno
import warnings
try: # Test for SSL features
import ssl
from ssl import HAS_SNI # Has SNI?
... |
tasks | notify_about_gaps_in_schedule | import datetime
import pytz
from apps.slack.utils import format_datetime_to_slack_with_time, post_message_to_channel
from celery.utils.log import get_task_logger
from common.custom_celery_tasks import shared_dedicated_queue_retry_task
from django.core.cache import cache
from django.utils import timezone
task_logger =... |
disc | eaclog | # -*- coding: utf-8 -*-
#
# fix-header: nolicense
# MIT License
#
# Copyright(c) 2018 Konstantin Mochalov
# Copyright(c) 2022 Philipp Wolfer
# Copyright(c) 2022 Jeffrey Bosboom
#
# Original code from https://gist.github.com/kolen/765526
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# ... |
navigation | mtms | import random
import time
import invesalius.data.coregistration as dcr
import numpy as np
import pandas as pd
import win32com.client
class mTMS:
def __init__(self):
# TODO: create dialog to input mtms_path and vi
mtms_path = "C:\\mTMS\\Labview\\Builds\\mTMS 3.1 hack"
vipath = (
... |
digital | generic_mod_demod | #
# Copyright 2005,2006,2007,2009,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""
Generic modulation and demodulation.
"""
# See gnuradio-examples/python/digital for examples
import math
from gnuradio import analog, blocks, filter, gr
fr... |
sk1-wx | setup | #!/usr/bin/env python
#
# Setup script for sK1 2.x
#
# Copyright (C) 2013-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
# (... |
migrations | 0243_unpack_plugin_source_files | # Generated by Django 3.2.13 on 2022-06-15 15:28
import structlog
from django.core import exceptions
from django.db import migrations
from posthog.plugins.utils import extract_plugin_code
logger = structlog.get_logger(__name__)
def forwards_func(apps, schema_editor):
logger.info("Migration 0243 - started")
... |
nyaa | bencode | from io import BytesIO
def _pairwise(iterable):
"""Returns items from an iterable two at a time, ala
[0, 1, 2, 3, ...] -> [(0, 1), (2, 3), ...]"""
iterable = iter(iterable)
return zip(iterable, iterable)
__all__ = ["encode", "decode", "BencodeException", "MalformedBencodeException"]
# https://wiki.... |
extractors | title | __package__ = "archivebox.extractors"
import re
from html.parser import HTMLParser
from pathlib import Path
from typing import Optional
from ..config import (
CHECK_SSL_VALIDITY,
CURL_ARGS,
CURL_BINARY,
CURL_USER_AGENT,
CURL_VERSION,
SAVE_TITLE,
TIMEOUT,
)
from ..index.schema import Archiv... |
isbn | isbn | """ Use the range message from isbn-international to hyphenate ISBNs """
import os
from typing import Optional
from xml.etree import ElementTree
from xml.etree.ElementTree import Element
import requests
from bookwyrm import settings
def _get_rules(element: Element) -> list[Element]:
if (rules_el := element.find(... |
migrations | 0001_initial | # Generated by Django 3.2.19 on 2023-07-01 12:28
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("phone_notifications", "0001_initial"),
]
operations = [
migrations.CreateModel(
... |
Gui | Util | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
models | admintools | # 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 | trilulilu | # coding: utf-8
from __future__ import unicode_literals
from ..utils import ExtractorError, int_or_none, parse_iso8601
from .common import InfoExtractor
class TriluliluIE(InfoExtractor):
_VALID_URL = r"https?://(?:(?:www|m)\.)?trilulilu\.ro/(?:[^/]+/)?(?P<id>[^/#\?]+)"
_TESTS = [
{
"url":... |
mainwindow | tabbedbrowser | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""The main tabbed browser widget."""
import collections
import dataclasses
import datetime
import functools
import weakref
from typing import (
Any,
Deque,
List,
Mapping,
M... |
xmiexport | exportmodel | import logging
from gaphor.storage.xmlwriter import XMLWriter
logger = logging.getLogger(__name__)
class XMIExport:
XMI_VERSION = "2.1"
XMI_NAMESPACE = "http://schema.omg.org/spec/XMI/2.1"
UML_NAMESPACE = "http://schema.omg.org/spec/UML/2.1"
XMI_PREFIX = "XMI"
UML_PREFIX = "UML"
def __init_... |
extractor | tvplay | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_HTTPError, compat_urlparse
from ..utils import (
ExtractorError,
determine_ext,
int_or_none,
parse_duration,
parse_iso8601,
qualities,
try_get,
update_url_query,
url_or_none,
urljoin,
... |
pol | server | from __future__ import print_function
import json
import pickle
import re
import sys
import time
import traceback
from datetime import datetime
from hashlib import md5
import six
from lxml import etree
from twisted.internet import defer, endpoints, reactor
from twisted.web import resource, server
from twisted.web.cli... |
util | OpensslFindPatch | import ctypes.util
import logging
import os
import sys
from Config import config
find_library_original = ctypes.util.find_library
def getOpensslPath():
if config.openssl_lib_file:
return config.openssl_lib_file
if sys.platform.startswith("win"):
lib_paths = [
os.path.join(
... |
posthog | utils_cors | from urllib.parse import urlparse
CORS_ALLOWED_TRACING_HEADERS = (
"traceparent",
"request-id",
"request-context",
"x-amzn-trace-id",
"x-cloud-trace-context",
)
def cors_response(request, response):
if not request.META.get("HTTP_ORIGIN"):
return response
url = urlparse(request.MET... |
utils | organise | import os
import shutil
from hashlib import md5
from io import StringIO
from photonix.photos.models import LibraryPath
from photonix.photos.utils.db import record_photo
from photonix.photos.utils.fs import determine_destination, find_new_file_name, mkdir_p
from photonix.photos.utils.metadata import get_datetime
from P... |
drawBot | drawBotPageDrawingTools | from .drawBotDrawingTools import DrawBotDrawingTool, _drawBotDrawingTool
class DummyDrawBotDrawingTool(DrawBotDrawingTool):
def __init__(self, instructionSet):
super(DummyDrawBotDrawingTool, self).__init__()
# add the instruction set
self._instructionsStack.append(instructionSet)
#... |
core | data_parser | # 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... |
xlgui | cover | # Copyright (C) 2008-2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... |
PyObjCTest | test_nstableview | from AppKit import *
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
class TestNSTableViewHelper(NSObject):
def tableView_viewForTableColumn_row_(self, a, b, c):
pass
def tableView_rowViewForRow_(self, a, b):
pass
def tableView_didAddRowView_fo... |
flaskbb | deprecation | # -*- coding: utf-8 -*-
"""
flaskbb.deprecation
~~~~~~~~~~~~~~~~~~~
Module used for deprecation handling in FlaskBB
:copyright: (c) 2018 the FlaskBB Team.
:license: BSD, see LICENSE for more details.
"""
import inspect
import warnings
from abc import ABC, abstractproperty
from functools import wra... |
extractor | sexu | from __future__ import unicode_literals
from .common import InfoExtractor
class SexuIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?sexu\.com/(?P<id>\d+)"
_TEST = {
"url": "http://sexu.com/961791/",
"md5": "ff615aca9691053c94f8f10d96cd7884",
"info_dict": {
"id": "9617... |
cssutils | _codec3 | #!/usr/bin/env python
"""Python codec for CSS."""
__docformat__ = "restructuredtext"
__author__ = "Walter Doerwald"
__version__ = "$Id: util.py 1114 2008-03-05 13:22:59Z cthedot $"
import codecs
import marshal
import sys
# We're using bits to store all possible candidate encodings (or variants, i.e.
# we have two bit... |
femexamples | buckling_platebuckling | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
chardet | gb2312freq | ######################## 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... |
extractor | zype | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_HTTPError
from ..utils import ExtractorError, dict_get, int_or_none, js_to_json, parse_iso8601
from .common import InfoExtractor
class ZypeIE(InfoExtractor):
_ID_RE = r"[\da-fA-F]+"
_COMMON_RE = r"//player\.zype\.c... |
lib | signals | # -*- coding: utf-8 -*-
"""Contains ``ckan`` and ``ckanext`` namespaces for signals as well as a bunch
of predefined core-level signals.
Check :doc:`signals` for extra detais.
"""
import flask.signals
import flask_login.signals
from blinker import Namespace
ckan = Namespace()
ckanext = Namespace()
request_started ... |
clientScripts | post_store_aip_hook | #!/usr/bin/env python
import argparse
import os
import shutil
import sys
import django
import requests
django.setup()
import elasticSearchFunctions
import storageService as storage_service
from archivematicaFunctions import find_transfer_path_from_ingest
# archivematicaCommon
from custom_handlers import get_script_l... |
ui | app | import argparse
import logging
import os
import re
import meshroom
from meshroom.core import nodesDesc
from meshroom.core.taskManager import TaskManager
from meshroom.ui import commands, components
from meshroom.ui.components.clipboard import ClipboardHelper
from meshroom.ui.components.filepath import FilepathHelper
f... |
util | fileoperations | #!/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 ... |
implant | add | import wx
from logbook import Logger
from service.fit import Fit
pyfalog = Logger(__name__)
class CalcAddImplantCommand(wx.Command):
def __init__(self, fitID, implantInfo, position=None):
wx.Command.__init__(self, True, "Add Implant")
self.fitID = fitID
self.newImplantInfo = implantInfo
... |
gui | colorpreview | # This file is part of MyPaint.
# Copyright (C) 2013-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
"""Color preview... |
Gui | Boundary | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2019 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
plugins | rtvs | """
$description Live TV channels from RTVS, a Slovak public, state-owned broadcaster.
$url rtvs.sk
$type live
$region Slovakia
"""
import re
from urllib.parse import urlparse
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import HLSStream
@... |
controllers | zoom_ctrl | # -*- 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.... |
downloaders | RPNetBiz | # -*- coding: utf-8 -*-
import json
from ..base.multi_downloader import MultiDownloader
class RPNetBiz(MultiDownloader):
__name__ = "RPNetBiz"
__type__ = "downloader"
__version__ = "0.22"
__status__ = "testing"
__pattern__ = r"https?://.+rpnet\.biz"
__config__ = [
("enabled", "bool",... |
services | validators | # -*- coding: utf-8 -*-
"""
flaskbb.user.services.validators
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Validators for use with user services.
:copyright: (c) 2018 the Flaskbb Team.
:license: BSD, see LICENSE for more details
"""
import attr
from flask_babelplus import gettext as _
from requests.exceptions... |
extractor | slutload | from __future__ import unicode_literals
from .common import InfoExtractor
class SlutloadIE(InfoExtractor):
_VALID_URL = r"https?://(?:\w+\.)?slutload\.com/(?:video/[^/]+|embed_player|watch)/(?P<id>[^/]+)"
_TESTS = [
{
"url": "http://www.slutload.com/video/virginie-baisee-en-cam/TD73btpBqS... |
requests | auth | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import hashlib
import os
import re
import time
from base64 import b64encode
from .compat import str, urlparse
from .cookies import extract_cookies_to_jar
from .status_codes import codes
from .u... |
plugins | huya | """
$description Chinese live-streaming platform for live video game broadcasts and individual live streams.
$url huya.com
$type live
$metadata id
$metadata author
$metadata title
"""
import base64
import logging
import re
from html import unescape as html_unescape
from typing import Dict
from streamlink.plugin impor... |
webkit | cache | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""HTTP network cache."""
import os.path
from typing import cast
from qutebrowser.config import config
from qutebrowser.qt.network import QNetworkDiskCache
from qutebrowser.utils import standa... |
youtube-dl | options | from __future__ import unicode_literals
import optparse
import os.path
import re
import sys
from .compat import (
compat_expanduser,
compat_get_terminal_size,
compat_getenv,
compat_kwargs,
)
from .compat import compat_open as open
from .compat import compat_shlex_split
from .downloader.external import... |
BOPTools | JoinFeatures | # /***************************************************************************
# * Copyright (c) 2016 Victor Titov (DeepSOIC) <vv.titov@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
neubot | utils | # neubot/utils.py
#
# Copyright (c) 2010-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 Public ... |
builders | matcher_builder_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... |
builtinContextMenus | droneAddStack | import gui.fitCommands as cmd
import gui.mainFrame
import wx
from gui.contextMenu import ContextMenuSingle
from gui.fitCommands.helpers import droneStackLimit
from service.fit import Fit
_t = wx.GetTranslation
class DroneAddStack(ContextMenuSingle):
def __init__(self):
self.mainFrame = gui.mainFrame.Main... |
femexamples | constraint_transform_torque | # ***************************************************************************
# * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com> *
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
sabnzbd | bpsmeter | #!/usr/bin/python3 -OO
# Copyright 2007-2023 The SABnzbd-Team (sabnzbd.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 2
# of the License, or (at your option) any later ver... |
quodlibet | exfalso | # Copyright 2004-2005 Joe Wreschnig, Niklas Janlert
# 2012 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any... |
PyObjCTest | test_protocol | import platform
import sys
import warnings
import objc
from PyObjCTools.TestSupport import *
# Most useful systems will at least have 'NSObject'.
NSObject = objc.lookUpClass("NSObject")
# XXX : This is a really dumb way to detect < 10.3
if not NSObject.instancesRespondToSelector_("setValue:forKey:"):
# Defining ... |
events | discord_status | # discord_status: Set Discord status as current song.
#
# Copyright (c) 2022 Aditi K <105543244+teeleafs@users.noreply.github.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either versio... |
songsmenu | ifp | # Copyright 2004-2005 Joe Wreschnig
# 2016 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... |
slow-coro-detection | patch | from __future__ import annotations
import time
from asyncio import Handle
from tribler.core.utilities.slow_coro_detection import logger
from tribler.core.utilities.slow_coro_detection.utils import format_info
from tribler.core.utilities.slow_coro_detection.watching_thread import (
SLOW_CORO_DURATION_THRESHOLD,
... |
models | phone_call | from django.db import models
# Duplicate to avoid circular import to provide values for status field
class TwilioCallStatuses:
QUEUED = 10
RINGING = 20
IN_PROGRESS = 30
COMPLETED = 40
BUSY = 50
FAILED = 60
NO_ANSWER = 70
CANCELED = 80
CHOICES = (
(QUEUED, "queued"),
... |
workflows | clickhouse | import collections.abc
import contextlib
import datetime as dt
import json
import typing
import uuid
import aiohttp
import pyarrow as pa
import requests
from django.conf import settings
def encode_clickhouse_data(data: typing.Any) -> bytes:
"""Encode data for ClickHouse.
Depending on the type of data the en... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.