section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
Code | XMotor | import os
import signal
import subprocess
import sys
import time
import psutil
from Code import EngineThread, Util, VarGen, XMotorRespuesta
from Code.QT import QTUtil2
from PyQt4 import QtCore
class XMotor:
def __init__(
self, nombre, exe, liOpcionesUCI=None, nMultiPV=0, priority=None, args=None
):
... |
error-handlers | sentry | import sentry_sdk
from sentry_sdk.integrations.logging import ignore_logger
from sentry_sdk.utils import event_from_exception, exc_info_from_error
from thumbor import __version__
class ErrorHandler:
def __init__(self, config):
self.config = config
dsn = config.SENTRY_DSN_URL
if not dsn:
... |
extractor | radiode | from __future__ import unicode_literals
from .common import InfoExtractor
class RadioDeIE(InfoExtractor):
IE_NAME = "radio.de"
_VALID_URL = r"https?://(?P<id>.+?)\.(?:radio\.(?:de|at|fr|pt|es|pl|it)|rad\.io)"
_TEST = {
"url": "http://ndr2.radio.de/",
"info_dict": {
"id": "ndr2... |
config | queues | # 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, ... |
comic | tohomhbase | #!/usr/bin/env python3
# encoding: utf-8
# https://www.tohomh123.com/ 网站的免费漫画的基类,简单提供几个信息实现一个子类即可推送特定的漫画
import imghdr
import json
import re
import urllib
import urllib2
from books.base import BaseComicBook
from bs4 import BeautifulSoup
from google.appengine.api import images
from lib.autodecoder import AutoDecoder
fr... |
entity | entity | import inspect
from collections import Counter
from typing import Any, Dict, Literal, Optional
from django.conf import settings
from posthog.constants import TREND_FILTER_TYPE_ACTIONS, TREND_FILTER_TYPE_EVENTS
from posthog.models.action import Action
from posthog.models.filters.mixins.funnel import FunnelFromToStepsMi... |
commands | status | #
# Copyright (C) 2011 Nick Lanham <nick@afternight.org>
#
# 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 deluge.com... |
disabled-Dnschain | UiRequestPlugin | import re
from Plugin import PluginManager
@PluginManager.registerTo("UiRequest")
class UiRequestPlugin(object):
def __init__(self, server=None):
from Site import SiteManager
self.site_manager = SiteManager.site_manager
super(UiRequestPlugin, self).__init__(server)
# Media request
... |
model | tracking | # encoding: utf-8
from __future__ import annotations
import datetime
import ckan.model.domain_object as domain_object
import ckan.model.meta as meta
from sqlalchemy import Column, Table, text, types
__all__ = ["tracking_summary_table", "TrackingSummary", "tracking_raw_table"]
tracking_raw_table = Table(
"tracki... |
paned | main | # Copyright 2004-2008 Joe Wreschnig, Michael Urman, Iñigo Serna
# 2009,2010 Steven Robertson
# 2009-2013 Christoph Reiter
# 2011-2022 Nick Boultbee
# 2017 Fredrik Strupe
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU ... |
implant | setAdd | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.implant.add import CalcAddImplantCommand
from gui.fitCommands.helpers import ImplantInfo, InternalCommandHistory
from service.fit import Fit
class GuiAddImplantSetCommand(wx.Command):
def __init__(self, fitID... |
CoreFoundation | _metadata | # This file is generated by objective.metadata
#
# Last update: Mon Oct 1 15:11:59 2012
import sys
import objc
if sys.maxsize > 2**32:
def sel32or64(a, b):
return b
else:
def sel32or64(a, b):
return a
if sys.byteorder == "little":
def littleOrBig(a, b):
return a
else:
... |
tools | msgfmt | #! /usr/bin/env python3
# Written by Martin v. Löwis <loewis@informatik.hu-berlin.de>
"""Generate binary message catalog from textual translation description.
This program converts a textual Uniforum-style message catalog (.po file) into
a binary GNU catalog (.mo file). This is essentially the same function as the
G... |
resources | artids | # -*- coding: utf-8 -*-
#
# 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
# (at your option) any later ver... |
KindleUnpack | mobi_k8resc | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
from __future__ import absolute_import, division, print_function, unicode_literals
DEBUG_USE_ORDERED_DICTIONARY = False # OrderedDict is supoorted >= python 2.7.
""" set to True to use OrderedDict for K8RESCProcessor.parse... |
bleachbit | GuiChaff | # vim: ts=4:sw=4:expandtab
# -*- coding: UTF-8 -*-
# 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 versio... |
views | backups | import html
import json
import logging
import os
import random
import zipfile
from collections import deque
from datetime import datetime, timedelta
from os import scandir
import arrow
import cddagl.constants as cons
from babel.dates import format_datetime
from babel.numbers import format_percent
from cddagl.functions... |
migrations | 0003_pronom_84 | import os
from django.core.management import call_command
from django.db import migrations
def load_fixtures(apps, schema_editor):
fixture_file = os.path.join(
os.path.dirname(__file__), "pronom84_formatgroups_new.json"
)
call_command("loaddata", fixture_file, app_label="fpr")
fixture_file =... |
ctrlport | GNURadioControlPortClient | #
# Copyright 2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""
Python Client classes for interfacing with the GNU Radio ControlPort interface
and for accessing Performance Counters.
While ControlPort and these client classes are designed to s... |
cmd | join | from __future__ import absolute_import
import sys
from bup import git, options
from bup.compat import argv_bytes
from bup.helpers import linereader, log
from bup.io import byte_stream
from bup.repo import LocalRepo, RemoteRepo
optspec = """
bup join [-r host:path] [refs or hashes...]
--
r,remote= remote repository ... |
PyObjCTest | test_camediatiming | from PyObjCTools.TestSupport import *
from Quartz.QuartzCore import *
try:
unicode
except NameError:
unicode = str
if os_release() >= "10.5":
class TestCAMediaTimingHelper(NSObject):
__pyobjc_protocols__ = [objc.protocolNamed("CAMediaTiming")]
def beginTime(self):
return 1
... |
search | common | # 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, ... |
searx | utils | # -*- coding: utf-8 -*-
import importlib
import re
import sys
from html.parser import HTMLParser
from numbers import Number
from os.path import join, splitext
from random import choice
from urllib.parse import urljoin, urlparse, urlunparse
from babel.core import get_global
from lxml import html
from lxml.etree import ... |
interaction-payloads | slash_command | """
[Documentation](https://api.slack.com/interactivity/slash-commands#app_command_handling)
"""
import typing
class SlashCommandPayload(typing.TypedDict):
"""
[Documentation](https://api.slack.com/interactivity/slash-commands#app_command_handling)
"""
command: str
"""
The command that was t... |
gui | layerswindow | # This file is part of MyPaint.
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2019 by the MyPaint Development Team
# Copyright (C) 2009 by Ilya Portnov <portnov@bk.ru>
#
# 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 Fre... |
autocomplete | widgets | from django import forms
from django.conf import settings # NOQA
from django.contrib.admin.widgets import SELECT2_TRANSLATIONS
from django.templatetags.static import static
from django.utils.translation import get_language
from django_select2.forms import HeavySelect2Widget
class Select2(HeavySelect2Widget):
"""... |
formats | mp3 | # Copyright 2004-2006 Joe Wreschnig, Michael Urman, Niklas Janlert
#
# 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... |
utils | standarddir | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Utilities to get and initialize data/config paths."""
import argparse
import contextlib
import enum
import os
import os.path
import sys
from typing import Iterator, Optional
from qutebrowse... |
deluge | gen_web_gettext | #!/usr/bin/env python
#
# Copyright (C) 2009-2012 Damien Churchill <damoxc@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.
#
"""S... |
auth | forms | # -*- coding: utf-8 -*-
"""
flaskbb.auth.forms
~~~~~~~~~~~~~~~~~~
It provides the forms that are needed for the auth views.
:copyright: (c) 2014 by the FlaskBB Team.
:license: BSD, see LICENSE for more details.
"""
import logging
from flask_babelplus import lazy_gettext as _
from flaskbb.utils.fi... |
gui | task_navigator | # --------------------------------------------------------------------------
# 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... |
comictaggerlib | renamewindow | """A PyQT4 dialog to confirm rename"""
# 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 requir... |
migrations | upgrade11 | """
Migration 11
- Converts modules based on December Release 2015 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
"""
CONVERSIONS = {
16467: ( # Medi... |
views | experiments | from typing import Any, Callable, Optional
from django.utils.timezone import now
from ee.clickhouse.queries.experiments.funnel_experiment_result import (
ClickhouseFunnelExperimentResult,
)
from ee.clickhouse.queries.experiments.secondary_experiment_result import (
ClickhouseSecondaryExperimentResult,
)
from e... |
orm-bindings | torrent_metadata | from datetime import datetime
from struct import unpack
from pony import orm
from pony.orm import db_session
from tribler.core import notifications
from tribler.core.components.metadata_store.category_filter.category import (
Category,
default_category_filter,
)
from tribler.core.components.metadata_store.cate... |
SQL | DBFcache | import time
class Almacen:
pass
class DBFcache:
def __init__(self, conexion, ctabla, select, condicion="", orden="", maxCache=2000):
self.conexion = conexion
self.cursor = conexion.cursor()
self.cursorBuffer = None
self.siBufferPendiente = False
self.ponSelect(select)... |
devscripts | show_downloads_statistics | #!/usr/bin/env python
from __future__ import unicode_literals
import itertools
import json
import os
import re
import sys
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from youtube_dl.compat import compat_print, compat_urllib_request
from youtube_dl.utils import format_bytes
def f... |
scripts | add_users_pagerduty_to_grafana | import os
import secrets
import sys
from urllib.parse import urljoin
import requests
from pdpyras import APISession
PAGERDUTY_API_TOKEN = os.environ["PAGERDUTY_API_TOKEN"]
PATH_USERS_GRAFANA = "/api/admin/users"
GRAFANA_URL = os.environ["GRAFANA_URL"] # Example: http://localhost:3000
GRAFANA_USERNAME = os.environ["G... |
blocks | qa_pipe_fittings | #!/usr/bin/env python
#
# Copyright 2005,2007,2010,2012,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from gnuradio import blocks, gr, gr_unittest
def calc_expected_result(src_data, n):
assert (len(src_data) % n) == 0
result = [list(... |
models | table | from django.db import models
from posthog.client import sync_execute
from posthog.errors import wrap_query_error
from posthog.hogql.database.models import (
BooleanDatabaseField,
DateDatabaseField,
DateTimeDatabaseField,
IntegerDatabaseField,
StringArrayDatabaseField,
StringDatabaseField,
St... |
versions | 029_1bfdf4240915_version_groups | # encoding: utf-8
"""029 Version groups
Revision ID: 1bfdf4240915
Revises: cdd68fe9ba21
Create Date: 2018-09-04 18:48:59.007126
"""
import sqlalchemy as sa
from alembic import op
from ckan.migration import skip_based_on_legacy_engine_version
# revision identifiers, used by Alembic.
revision = "1bfdf4240915"
down_rev... |
addons | Captcha9Kw | # -*- coding: utf-8 -*-
import base64
import re
import time
import urllib.parse
from pyload.core.network.http.exceptions import BadHeader
from ..base.addon import BaseAddon, threaded
class Captcha9Kw(BaseAddon):
__name__ = "Captcha9Kw"
__type__ = "addon"
__version__ = "0.44"
__status__ = "testing"
... |
storage | filesystem | """
Module for using filesystem (directory with files) for inventory storage
"""
import logging
import string
import time
from binascii import hexlify, unhexlify
from os import listdir, makedirs, path, remove, rmdir
from threading import RLock
from paths import lookupAppdataFolder
from storage import InventoryItem, In... |
baseclass | maildetail | # pylint: disable=unused-argument, consider-using-f-string, import-error, attribute-defined-outside-init
# pylint: disable=unnecessary-comprehension, no-member, no-name-in-module, too-few-public-methods
"""
Maildetail screen for inbox, sent, draft and trash.
"""
import os
from datetime import datetime
from kivy.app ... |
downloaders | DebridItaliaCom | # -*- coding: utf-8 -*-
import re
from ..base.multi_downloader import MultiDownloader
class DebridItaliaCom(MultiDownloader):
__name__ = "DebridItaliaCom"
__type__ = "downloader"
__version__ = "0.26"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.|s\d+\.)?debriditalia\.com/dl/\d+"
... |
PyObjCTest | test_nsdictionary | import sys
import types
import objc
from Foundation import *
from PyObjCTest.testhelper import PyObjC_TestClass3
from PyObjCTools.TestSupport import *
class TestNSDictionarySubclassing(TestCase):
# These tests seem to be specific for MacOSX
def testExceptionInInit(self):
if objc.platform != "MACOSX":... |
api | timelapse | __author__ = "Gina Häußge <osd@foosel.net>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import logging
import os
import threading
from urllib.parse import quote as urlquot... |
gui | objfactory | # 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
# (at your option)... |
ui | ui_options_advanced | # -*- coding: utf-8 -*-
# Automatically generated - don't edit.
# Use `python setup.py build_ui` to update it.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_AdvancedOptionsPage(object):
def setupUi(self, AdvancedOptionsPage):
AdvancedOptionsPage.setObjectName("AdvancedOptionsPage")
Advanc... |
controllers | grad_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.... |
calculix | write_constraint_selfweight | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
formspree | utils | import calendar
import datetime
import json
import re
import uuid
from urllib.parse import urlparse, urlunparse
import requests
from flask import g, jsonify, request, url_for
from formspree import settings
IS_VALID_EMAIL = lambda x: re.match(r"[^@]+@[^@]+\.[^@]+", x)
def valid_url(url):
parsed = urlparse(url)
... |
qltk | msg | # Copyright 2005 Joe Wreschnig, Michael Urman
# 2021-22 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 ver... |
frescobaldi-app | pagedview | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2019 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
... |
friture | levels_settings | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009 Timoth?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 distribu... |
cargo | imprt | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.cargo.add import CalcAddCargoCommand
from gui.fitCommands.helpers import CargoInfo, InternalCommandHistory
class GuiImportCargosCommand(wx.Command):
def __init__(self, fitID, cargos):
wx.Command.__ini... |
inbound | config | """Set up credentials (.env) and application variables (config.yml)"""
import os
import yaml
class Config(object):
"""All configuration for this app is loaded here"""
def __init__(self, **opts):
if os.environ.get("ENV") != "prod": # We are not in Heroku
self.init_environment()
... |
Models | ActiveIntentQualitiesModel | # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Any, Dict, List, Optional, Set
import cura.CuraApplication
from cura.Machines.ContainerTree import ContainerTree
from cura.Machines.MaterialNode import MaterialNode
from cura.Machines.Models.MachineModelU... |
frescobaldi-app | indent | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... |
Gui | Copy | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it a... |
formats | _image | # Copyright 2013 Christoph Reiter
# 2020 Nick Boultbee
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
from... |
Utils | NetworkingUtil | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import socket
from typing import Optional
from PyQt6.QtCore import QObject, pyqtSlot
#
# This is a QObject because some of the functions can be used (and are useful) in QML.
#
class NetworkingUtil(QObject):
def __ini... |
src | DigitalFactoryFeatureBudgetResponse | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Optional
from .BaseModel import BaseModel
class DigitalFactoryFeatureBudgetResponse(BaseModel):
"""Class representing the capabilities of a user account for Digital Library.
NOTE: For each max_... |
Operations | SetBuildPlateNumberOperation | # Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from cura.Settings.SettingOverrideDecorator import SettingOverrideDecorator
from UM.Operations.Operation import Operation
from UM.Scene.SceneNode import SceneNode
class SetBuildPlateNumberOperation(Operation):
"""Simp... |
PyObjCTest | test_nspropertylist | from Foundation import *
from PyObjCTools.TestSupport import *
class TestNSPropertyList(TestCase):
def testMethods(self):
self.assertResultIsBOOL(
NSPropertyListSerialization.propertyList_isValidForFormat_
)
self.assertArgIsOut(
NSPropertyListSerialization.dataFromP... |
femviewprovider | view_constraint_magnetization | # ***************************************************************************
# * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
css | cssnamespacerule | """CSSNamespaceRule currently implements http://dev.w3.org/csswg/css3-namespace/
"""
__all__ = ["CSSNamespaceRule"]
__docformat__ = "restructuredtext"
__version__ = "$Id$"
import xml.dom
import cssrule
import cssutils
class CSSNamespaceRule(cssrule.CSSRule):
"""
Represents an @namespace rule within a CSS st... |
ui | passworddialog | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2008, 2021 Philipp Wolfer
# Copyright (C) 2009 Carlin Mangar
# Copyright (C) 2012, 2014 Lukáš Lalinský
# Copyright (C) 2012-2013 Michael Wiencek
# Copyright (C) 2013-2014, 2018, 2020-2021 Laurent Monin
# Copyright (C) 2014 Soph... |
PyObjCTest | test_nsaccessibility | from AppKit import *
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
class TestNSAccessibilityHelper(NSObject):
def accessibilityIsAttributeSettable_(self, arg):
return 1
def accessibilityIsIgnored(self):
return 1
def accessibilityHitTest_(self... |
heartbeat | zabbix | from pathlib import PurePath
from apps.integrations.metadata.heartbeat._heartbeat_text_creator import (
HeartBeatTextCreator,
)
integration_verbal = PurePath(__file__).stem
creator = HeartBeatTextCreator(integration_verbal)
heartbeat_text = creator.get_heartbeat_texts()
heartbeat_expired_title = heartbeat_text.h... |
mylar | notifiers | # This file is part of mylar.
#
# mylar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# mylar is distributed in the hope that... |
disabled-Multiuser | MultiuserPlugin | import json
import re
import sys
from Config import config
from Crypt import CryptBitcoin
from Plugin import PluginManager
from Translate import translate as _
from util.Flag import flag
from . import UserPlugin
# We can only import plugin host clases after the plugins are loaded
@PluginManager.afterLoad
def import... |
models | import_job | """ track progress of goodreads imports """
import math
import re
import dateutil.parser
from bookwyrm.connectors import connector_manager
from bookwyrm.models import (
Book,
Edition,
ReadThrough,
Review,
ReviewRating,
Shelf,
ShelfBook,
User,
Work,
)
from bookwyrm.tasks import IMPOR... |
Code | GestorTacticas | import time
from Code import PGN, ControlPosicion, Gestor, Jugada
from Code.Constantes import *
from Code.QT import DatosNueva, Iconos, PantallaGM, QTUtil, QTUtil2, QTVarios
from PyQt4.QtCore import Qt
class GestorTacticas(Gestor.Gestor):
def inicio(self, tactica, posSiguiente=None):
if hasattr(self, "re... |
components | auth | """Settings for basic user authentication."""
from settings.base import config
AUTH_PASSWORD_VALIDATORS = [
{
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
"OPTIONS": {"min_length": config.get("password_minimum_length")},
}
]
DISABLE_PASSWORD_COMMON_VALIDATION = con... |
interactions | lifeline | """Lifeline diagram item.
Implementation Details
======================
Represented Classifier
----------------------
It is not clear how to attach a connectable element to a lifeline. For now,
``Lifeline.represents`` is ``None``. Ideas:
- drag and drop classifier from tree onto a lifeline
- match lifeline's name wit... |
Code | Gestor | import codecs
import os
import random
import time
import LCEngine4 as LCEngine
from Code import (
DGT,
Analisis,
AnalisisIndexes,
AperturasStd,
ControlPGN,
ControlPosicion,
DBgames,
DBgamesFEN,
Jugada,
Kibitzers,
Partida,
Util,
VarGen,
XRun,
)
from Code.Constante... |
pymarshal | bson | """
"""
import datetime
import time
from typing import Iterable, List, Optional
# Will raise an import error if the user hasn't installed 'bson'
import bson
from .json import JSON_TYPES
from .util.marshal import *
from .util.pm_assert import pm_assert
from .util.type import *
__all__ = [
"bson",
"ExtraKeysE... |
equations | electricforce_writer | # ***************************************************************************
# * Copyright (c) 2020 Markus Hovorka <m.hovorka@live.de> *
# * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> *
# * *
# * Th... |
mainwin | storedtags | import os
from PyQt5.QtCore import QMutex, Qt
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import (
QApplication,
QGridLayout,
QLabel,
QScrollArea,
QVBoxLayout,
QWidget,
)
from .. import audioinfo
from ..audioinfo import tag_versions
from ..constants import LEFTDOCK, SELECTIONCHANGED
fro... |
extractors | acfun | #!/usr/bin/env python
from ..common import *
from ..extractor import VideoExtractor
class AcFun(VideoExtractor):
name = "AcFun"
stream_types = [
{"id": "2160P", "qualityType": "2160p"},
{"id": "1080P60", "qualityType": "1080p60"},
{"id": "720P60", "qualityType": "720p60"},
{"... |
lector | database | # 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... |
parser | grammar | """Builder for Beancount grammar.
"""
__copyright__ = "Copyright (C) 2015-2016 Martin Blais"
__license__ = "GNU GPLv2"
import collections
import copy
import traceback
from datetime import date
from decimal import Decimal
from os import path
import regex
from beancount.core import account, data, display_context
from ... |
dev | recompile_requirements | #!/usr/bin/env python3
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Script to regenerate requirements files in misc/requirements."""
import argparse
import glob
import json
import os.path
import pathlib
import re
import shutil
import ... |
utils | utils | # 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, ... |
autocomplete | harvest | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2011 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... |
lib | mr_top | # 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, ... |
plugin-base | mount_manager_extension | from gi.repository import Gtk
class ExtensionFeatures:
SYSTEM_WIDE = 0
class MountManagerExtension:
"""Base class for mount manager extensions.
Mount manager has only one instance and is created on program startup.
Methods defined in this class are called automatically by the mount manager
so y... |
Show | mTempoVis | # /***************************************************************************
# * Copyright (c) 2016 Victor Titov (DeepSOIC) <vv.titov@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
Arch | importJSON | # ***************************************************************************
# * Copyright (c) 2017 Joseph Coffland <joseph@cauldrondevelopment.com> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
rest | trustview_endpoint | from functools import cached_property
from aiohttp import web
from aiohttp_apispec import docs
from ipv8.REST.schema import schema
from marshmallow.fields import Float, Integer, List, String
from tribler.core.components.bandwidth_accounting.db.database import BandwidthDatabase
from tribler.core.components.bandwidth_ac... |
gtk3 | files_tab | #
# Copyright (C) 2008 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 json
import logging
imp... |
services | password | """
flaskbb.auth.password
~~~~~~~~~~~~~~~~~~~~~
Password reset manager
:copyright: (c) 2014-2018 the FlaskBB Team.
:license: BSD, see LICENSE for more details
"""
from flask_babelplus import gettext as _
from ...core.auth.password import ResetPasswordService as _ResetPasswordService
from ...core... |
femexamples | equation_magnetodynamics_elmer | # ***************************************************************************
# * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
projectedFighter | changeMetas | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.fighter.projectedAdd import CalcAddProjectedFighterCommand
from gui.fitCommands.calc.fighter.projectedRemove import (
CalcRemoveProjectedFighterCommand,
)
from gui.fitCommands.helpers import FighterInfo, Intern... |
OpenSCAD | replaceobj | # ***************************************************************************
# * Copyright (c) 2012 Sebastian Hoogen <github@sebastianhoogen.de> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
extractor | minoto | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import int_or_none, parse_codecs
from .common import InfoExtractor
class MinotoIE(InfoExtractor):
_VALID_URL = r"(?:minoto:|https?://(?:play|iframe|embed)\.minoto-video\.com/(?P<player_id>[0-9]+)/)(?P<id>[a-zA-Z0-9]+)"
def _real... |
extensions | pil | # -*- coding: utf-8 -*-
# Copyright (C) 2012, Almar Klein, Ant1, Marius van Voorden
#
# This code is subject to the (new) BSD license:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of s... |
calculix | tasks | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * Copyright (c) 2017 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
colors | hsvwheel | # 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.