section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
gui
characterEditor
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # 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 ...
threads
info_thread
# -*- coding: utf-8 -*- import time from datetime import timedelta from ..api import OnlineStatus from ..datatypes.pyfile import PyFile from ..utils.old.packagetools import parse_names from .plugin_thread import PluginThread class InfoThread(PluginThread): def __init__(self, manager, data, pid=-1, rid=-1, add=F...
admin
announcements
""" make announcements """ from bookwyrm import forms, models from bookwyrm.settings import PAGE_LENGTH from django.contrib.auth.decorators import login_required, permission_required from django.core.paginator import Paginator from django.shortcuts import get_object_or_404, redirect from django.template.response import...
migrations
201802021027_af3f5579c84d_add_cascades
"""Add cascades Revision ID: af3f5579c84d Revises: 7c3fcf8a3335 Create Date: 2018-02-02 10:27:50.290095 """ import logging import flaskbb import sqlalchemy as sa from alembic import op logger = logging.getLogger("alembic.runtime.migration") # revision identifiers, used by Alembic. revision = "af3f5579c84d" down_re...
templatetags
landing_page_tags
""" template filters """ from bookwyrm import models from django import template from django.db.models import Avg, Count, F, Q, StdDev register = template.Library() @register.simple_tag(takes_context=False) def get_book_superlatives(): """get book stats for the about page""" total_ratings = models.Review.obj...
migrations
0013_auto_20210411_1241
# Generated by Django 3.2 on 2021-04-11 19:41 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("babybuddy", "0012_auto_20201024_1847"), ] operations = [ migrations.AlterField( model_name="settings", name="language",...
SketcherTests
TestSketchExpression
# *************************************************************************** # * Copyright (c) 2021 Werner Mayer <werner.wm.mayer@gmx.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
Execute
setup
# # Copyright (C) 2009 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. # from setuptools import find_pac...
bup
hlinkdb
import os import pickle from contextlib import ExitStack from bup.helpers import atomically_replaced_file, unlink def pickle_load(filename): try: f = open(filename, "rb") except FileNotFoundError: return None with f: return pickle.load(f, encoding="bytes") class Error(Exception)...
downloaders
GamefrontCom
# -*- coding: utf-8 -*- from ..base.simple_downloader import SimpleDownloader class GamefrontCom(SimpleDownloader): __name__ = "GamefrontCom" __type__ = "downloader" __version__ = "0.13" __status__ = "testing" __pattern__ = r"http://(?:www\.)?gamefront\.com/files/(?P<ID>\d+)" __config__ = [ ...
services
modelinglanguage
from typing import Dict, Iterable from gaphor.abc import ActionProvider, ModelingLanguage, Service from gaphor.action import action from gaphor.core import event_handler from gaphor.entrypoint import initialize from gaphor.services.properties import PropertyChanged class ModelingLanguageChanged: def __init__(sel...
fcsprocket
sprocket
# (c) 2020 Adam Spontarelli <adam@vector-space.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License (LGPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later versi...
ocrolib
ngraphs
# TODO: # - handle UTF-8 inputs correctly from __future__ import print_function import codecs import re from collections import Counter, defaultdict from pylab import * replacements = [ (r"[\0-\x1f]", ""), # get rid of weird control characters (r"\s+", " "), # replace multiple spaces (r"[~]", ""), # ...
engines
google_play_apps
# SPDX-License-Identifier: AGPL-3.0-or-later """ Google Play Apps """ from urllib.parse import urlencode from lxml import html from searx.utils import ( eval_xpath, eval_xpath_getindex, eval_xpath_list, extract_text, extract_url, ) about = { "website": "https://play.google.com/", "wikid...
extractor
hypem
from __future__ import unicode_literals from ..utils import int_or_none from .common import InfoExtractor class HypemIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?hypem\.com/track/(?P<id>[0-9a-z]{5})" _TEST = { "url": "http://hypem.com/track/1v6ga/BODYWORK+-+TAME", "md5": "b9cc91b5af89...
PyObjCTest
test_cfcalendar
import datetime from CoreFoundation import * from PyObjCTools.TestSupport import * try: long except NameError: long = int class TestCFCalendarVariadic(TestCase): def testTypes(self): self.assertIsCFType(CFCalendarRef) def testCFCalendarComposeAbsoluteTime(self): calendar = CFCalenda...
Tools
catfiles
#! python # -*- coding: utf-8 -*- # (c) 2018 Werner Mayer LGPL # import getopt # import os # The code that needs this is commented out import shutil import sys def main(): outputfile = "" try: opts, args = getopt.getopt(sys.argv[1:], "o:", ["outputfile="]) except getopt.GetoptError: pass...
extractors
mtv81
#!/usr/bin/env python __all__ = ["mtv81_download"] from html.parser import HTMLParser from xml.dom.minidom import parseString from ..common import * def mtv81_download(url, output_dir=".", merge=True, info_only=False, **kwargs): html = get_content(url) title = HTMLParser().unescape( "|".join(match1...
backports
chainmap
# from https://hg.python.org/cpython/file/default/Lib/collections/__init__.py from collections import MutableMapping class ChainMap(MutableMapping): """A ChainMap groups multiple dicts (or other mappings) together to create a single, updateable view. The underlying mappings are stored in a list. That l...
builtinContextMenus
additionsExportAll
import gui.mainFrame import wx from gui.contextMenu import ContextMenuUnconditional 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 Addi...
core
standard_fields
# 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...
lib
sessions
"""Session implementation for CherryPy. You need to edit your config file to use sessions. Here's an example:: [/] tools.sessions.on = True tools.sessions.storage_type = "file" tools.sessions.storage_path = "/home/site/sessions" tools.sessions.timeout = 60 This sets the session to be stored in fi...
femtaskpanels
task_constraint_bodyheatsource
# *************************************************************************** # * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
ocrolib
exceptions
import inspect import numpy as np def summary(x): """Summarize a datatype as a string (for display and debugging).""" if type(x) == np.ndarray: return "<ndarray %s %s>" % (x.shape, x.dtype) if type(x) == str and len(x) > 10: return '"%s..."' % x if type(x) == list and len(x) > 10: ...
filter
qa_dc_blocker
#!/usr/bin/env python # # Copyright 2011-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import blocks, filter, gr, gr_unittest class test_dc_blocker(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() ...
View
Login
#!/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 datetime import gettext import hashlib try: import json except ImportError:...
femexamples
equation_magnetodynamics_2D_elmer
# *************************************************************************** # * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
core
Data
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
migrations
eb68f277ab61_add_func_column_to_dynamic_challenges
"""Add func column to dynamic_challenges Revision ID: eb68f277ab61 Revises: b37fb68807ea Create Date: 2023-06-28 17:37:48.244827 """ import sqlalchemy as sa from CTFd.plugins.migrations import get_columns_for_table revision = "eb68f277ab61" down_revision = "b37fb68807ea" branch_labels = None depends_on = None def ...
cmd
import_duplicity
from __future__ import absolute_import import os import sys import tempfile from calendar import timegm from subprocess import check_call from time import strptime import bup.path from bup import git, helpers, options from bup.compat import argv_bytes from bup.helpers import log, saved_errors, shstr optspec = """ bu...
utils
strfunctions
""" string manipulation module """ import re def sequential_rep(text_, *args): # type: (basestring, tuple) -> basestring """ :param text_: string content :param args: like <pattern>, <replacement>, <pattern>, <replacement>, ... :return: if text_ length was zero or invalid parameters then no manip...
digital
qa_pfb_clock_sync
#!/usr/bin/env python # # Copyright 2011,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import cmath import random import time from gnuradio import blocks, digital, filter, gr, gr_unittest class test_pfb_clock_sync(gr_unittest.TestCase): ...
migrations
upgrade36
""" Migration 36 - Shield Booster, Armor Repairer and Capacitor Transfer tiericide """ CONVERSIONS = { 6441: ( # Small Clarity Ward Enduring Shield Booster 6443, # Small Converse Deflection Catalyzer ), 6437: ( # Small C5-L Compact Shield Booster 6439, # Small Neutron Saturation Inject...
webkit
http
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Parsing functions for various HTTP headers.""" import dataclasses import email.errors import email.headerregistry import os.path from typing import Type from qutebrowser.qt.network import Q...
mixins
property
import json from typing import Any, Dict, List, Optional, Union, cast from posthog.constants import PROPERTIES, PropertyOperatorType from posthog.models.filters.mixins.base import BaseParamMixin from posthog.models.filters.mixins.utils import ( cached_property, include_dict, include_query_tags, ) from post...
ui
splitView
from AppKit import ( NSBezierPath, NSColor, NSSplitView, NSSplitViewDividerStyleThick, NSSplitViewDividerStyleThin, ) from objc import super from vanilla import * from vanilla.vanillaBase import VanillaBaseObject class SimpleNSSplitView(NSSplitView): def init(self): self = super(Simple...
playorder
queue
# Copyright 2009 Steven Robertson # 2016-20 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...
extractor
teachable
from __future__ import unicode_literals import re from ..utils import ( ExtractorError, clean_html, get_element_by_class, int_or_none, strip_or_none, urlencode_postdata, urljoin, ) from .common import InfoExtractor from .wistia import WistiaIE class TeachableBaseIE(InfoExtractor): _N...
beetsplug
scrub
# This file is part of beets. # Copyright 2016, Adrian Sampson. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, ...
Settings
MachineManager
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import re import time import unicodedata from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, cast import cura.CuraApplication # Imported like this to prevent circular references. from cura.Machines.Container...
KindleUnpack
mobi_index
#!/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 from .compatibility_utils import PY2, bchr, bord, bstr if PY2: range = xrange import struct from .mobi_utils import toHex # note: s...
frescobaldi-app
lilypondinfo
# 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 ...
api
printer_profiles
__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 copy from flask import abort, jsonify, request, url_for from octoprint.acc...
admin
user_admin
""" manage user """ from bookwyrm import forms, models from bookwyrm.models.report import USER_PERMS from bookwyrm.settings import PAGE_LENGTH from django.contrib.auth.decorators import login_required, permission_required from django.core.paginator import Paginator from django.shortcuts import get_object_or_404, redire...
GCodeGzReader
GCodeGzReader
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import gzip from UM.Mesh.MeshReader import MeshReader # The class we're extending/implementing. from UM.MimeTypeDatabase import ( # To add the .gcode.gz files to the MIME type database. MimeType, MimeTypeDatabase...
engines
yahoo_news
# SPDX-License-Identifier: AGPL-3.0-or-later """Yahoo (News) Yahoo News is "English only" and do not offer localized nor language queries. """ # pylint: disable=invalid-name, missing-function-docstring import re from datetime import datetime, timedelta from urllib.parse import urlencode from dateutil import parser...
extractor
mofosex
from __future__ import unicode_literals import re from ..utils import int_or_none, str_to_int, unified_strdate from .common import InfoExtractor from .keezmovies import KeezMoviesIE class MofosexIE(KeezMoviesIE): _VALID_URL = r"https?://(?:www\.)?mofosex\.com/videos/(?P<id>\d+)/(?P<display_id>[^/?#&.]+)\.html" ...
errorreport
faulthandling
# Copyright 2017 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 later version. """ Interface around faulthandler t...
QT
WBG_Players
import LCEngine4 as LCEngine from Code import AperturasStd, Partida from Code.QT import ( Colocacion, Columnas, Controles, Delegados, FormLayout, Grid, Iconos, QTUtil, QTUtil2, QTVarios, ) from PyQt4 import QtCore, QtGui OPENINGS_WHITE, OPENINGS_BLACK, MOVES_WHITE, MOVES_BLACK =...
analog
am_demod
# # Copyright 2006,2007,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import blocks, filter, gr class am_demod_cf(gr.hier_block2): """ Generalized AM demodulation block with audio filtering. This block demodulates a...
notifier
webhook
import logging from ..conf import settings logger = logging.getLogger(__name__) class WebHookNotify: CREDS_KEY = "webhook" POST_KEY = "message" def __init__(self, creds_key=None, conf=None, value=None, post_key=None): import requests # pylint: disable=import-outside-toplevel self.sess...
desktop
welcome
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2018 The gPodder Team # # gPodder 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 Licens...
kafka-client
helper
""" Helper methods for creating the kafka-python KafkaProducer and KafkaConsumer objects. https://github.com/heroku/kafka-helper """ import base64 import json import os import ssl from base64 import standard_b64encode from tempfile import NamedTemporaryFile from cryptography.hazmat.backends import default_backend fro...
PartDesign
InvoluteGearFeature
# *************************************************************************** # * Copyright (c) 2014 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
extractor
pinterest
# coding: utf-8 from __future__ import unicode_literals import json import re from ..compat import compat_str from ..utils import ( determine_ext, float_or_none, int_or_none, try_get, unified_timestamp, url_or_none, ) from .common import InfoExtractor class PinterestBaseIE(InfoExtractor): ...
deprecated
update_old_news_impprt
import glob import logging import os from typing import Any, Dict, List, Text import pandas as pd from dag_factory.components.old_news_import import OldNewsImportSpec from dag_factory.components.utils import ( date_str_to_unixtime, get_all_csv_paths, tag_dict_to_dict, ) from newscrawler.crawler import extr...
UML
umloverrides
"""Special methods (overrides) that add behavior to the model that cannot simply be generated. Derived methods always return a list. Note this is not the case for normal properties. """ from __future__ import annotations import itertools from gaphor.core.modeling.properties import derived from gaphor.UML import uml...
API
Backups
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple from cura.Backups.BackupsManager import BackupsManager if TYPE_CHECKING: from cura.CuraApplication import CuraApplication class Backups: """The back-up...
canto-next
hooks
# -*- coding: utf-8 -*- # Canto - RSS reader backend # Copyright (C) 2016 Jack Miller <jack@codezen.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import logging impo...
extractor
amcnetworks
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import int_or_none, parse_age_limit, try_get, update_url_query from .theplatform import ThePlatformIE class AMCNetworksIE(ThePlatformIE): _VALID_URL = r"https?://(?:www\.)?(?P<site>amc|bbcamerica|ifc|(?:we|sundance)tv)\.com/(?P<id>(?...
Code
RunKibitzer
import os import struct import sys import time import LCEngine4 as LCEngine import psutil from Code import ( AnalisisIndexes, AperturasStd, Books, Configuracion, ControlPosicion, EngineThread, Kibitzers, Partida, Util, VarGen, XMotorRespuesta, ) from Code.QT import ( Col...
Path
Init
# *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
Models
IntentCategoryModel
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import collections from typing import TYPE_CHECKING, Dict, Optional import cura.CuraApplication from cura.Machines.Models.IntentModel import IntentModel from cura.Settings.IntentManager import IntentManager from PyQt6.QtCo...
commands
help
# # Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com> # Copyright (C) 2009 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. #...
mail
ganalytics
class Ganalytics(object): """Allows you to enable tracking provided by Google Analytics.""" def __init__( self, enable=None, utm_source=None, utm_medium=None, utm_term=None, utm_content=None, utm_campaign=None, ): """Create a GAnalytics to ena...
qltk
bookmarks
# Copyright 2006 Joe Wreschnig # 2016-17 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. # FIXME...
imageserver
stats_util
# # Quru Image Server # # Document: stats_util.py # Date started: 20 Sep 2011 # By: Matt Fozard # Purpose: Statistics manipulation and utility functions # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # i...
migrations
0051_auto_20210316_1950
# Generated by Django 3.0.7 on 2021-03-16 19:50 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0050_auto_20210313_0030"), ] operations = [ migrations.RemoveConstraint( model_name=...
autolayout
pydot
from __future__ import annotations from functools import singledispatch from typing import Iterable, Iterator import gaphor.UML.interactions import pydot from gaphas.connector import ConnectionSink, Connector from gaphas.geometry import Point, Rect from gaphas.item import NW from gaphas.matrix import Matrix from gaph...
management
plugins
from itertools import chain from flask_allows import Permission from pluggy import HookimplMarker impl = HookimplMarker("flaskbb") @impl(hookwrapper=True, tryfirst=True) def flaskbb_tpl_admin_settings_menu(user): """ Flattens the lists that come back from the hook into a single iterable that can be used...
plugin
rack
try: from sg_py_vendor.pymarshal import type_assert, type_assert_dict, type_assert_iter except ImportError: from pymarshal import type_assert, type_assert_dict, type_assert_iter class PluginRack: def __init__( self, uid, name, plugin_uids, tags=None, ): ...
multialarmclock
cellrenderers
# Copyright (C) 2010 by Brian Parma # # 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 1, or (at your option) # any later version. # # This program is distributed in the hope that ...
rest
rest
# 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 ...
components
advanced_search
# This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the ...
lib
custom_handlers
import logging.config import logging.handlers import os import sys class GroupWriteRotatingFileHandler(logging.handlers.RotatingFileHandler): def _open(self): prevumask = os.umask(0o002) try: rtv = logging.handlers.RotatingFileHandler._open(self) return rtv finally:...
internal
playlists
import configparser import io from xml.etree import ElementTree from mopidy.internal import validation def parse(data): handlers = { detect_extm3u_header: parse_extm3u, detect_pls_header: parse_pls, detect_asx_header: parse_asx, detect_xspf_header: parse_xspf, } for detect...
extractor
toypics
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class ToypicsIE(InfoExtractor): IE_DESC = "Toypics video" _VALID_URL = r"https?://videos\.toypics\.net/view/(?P<id>[0-9]+)" _TEST = { "url": "http://videos.toypics.net/view/514/chancebulged,-2-1/"...
util
versions
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2014 Lukáš Lalinský # Copyright (C) 2014-2015, 2017-2018, 2020-2021 Laurent Monin # Copyright (C) 2016 Sambhav Kothari # Copyright (C) 2018-2019, 2021 Philipp Wolfer # # This program is free software; you can redistribute ...
frescobaldi-app
musicpos
# 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 ...
devtools
fetch
# DO NOT EDIT THIS FILE! # # This file is generated from the CDP specification. If you need to make # changes, edit the generator and regenerate all modules. # # CDP version: v0.0.1156692 # CDP domain: Fetch from __future__ import annotations import enum # noqa import typing from dataclasses import dataclass # noqa...
disabled-Bootstrapper
BootstrapperPlugin
import time from Config import config from Crypt import CryptRsa from Plugin import PluginManager from util import helper from .BootstrapperDb import BootstrapperDb if "db" not in locals().keys(): # Share during reloads db = BootstrapperDb() @PluginManager.registerTo("FileRequest") class FileRequestPlugin(obj...
TrimeshReader
TrimeshReader
# Copyright (c) 2019-2022 Ultimaker B.V., fieldOfView # Cura is released under the terms of the LGPLv3 or higher. # The _toMeshData function is taken from the AMFReader class which was built by fieldOfView. import os.path # To create the mesh name for the resulting mesh. from typing import TYPE_CHECKING, Any, List...
fec
qa_fecapi_dummy
#!/usr/bin/env python # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import numpy as np from _qa_helper import _qa_helper from _qa_helper_async import _qa_helper_async from gnuradio import blocks, fec, gr, gr_unittest from gnuradi...
migrations
0322_auto_20230531_1904
# Generated by Django 3.2.18 on 2023-05-31 19:04 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0321_add_exception_autocapture_optin"), ] operations = [ migrations.CreateModel( nam...
core
platform
# Copyright 2008-2016 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # import logging import os import re from codecs import open from collections import namedtuple from itertools import chain from . import Constants, Messages, blocks, errors, params, po...
TechDraw
TestTechDrawApp
# ************************************************************************** # Copyright (c) 2015 WandererFan <wandererfan@gmail.com> * # * # This file is part of the FreeCAD CAx development system. * # ...
module
projectedRemove
import eos.db import wx from gui.fitCommands.helpers import ModuleInfo, restoreCheckedStates from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcRemoveProjectedModuleCommand(wx.Command): def __init__(self, fitID, position, recalc=True): wx.Command.__init__(self, Tr...
zeromq
qa_zeromq_pub
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import threading from gnuradio import blocks, eng_notation, gr, gr_unittest, zeromq class qa_zeromq_pub(gr_unittest.TestCase): def...
extractors
screenshot
__package__ = "archivebox.extractors" from pathlib import Path from typing import Optional from ..config import CHROME_VERSION, SAVE_SCREENSHOT, TIMEOUT from ..index.schema import ArchiveError, ArchiveOutput, ArchiveResult, Link from ..logging_util import TimedProgress from ..system import chmod_file, run from ..util...
babybuddy
forms
# -*- coding: utf-8 -*- from django import forms from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.forms import PasswordChangeForm, UserCreationForm from django.contrib.auth.models import Group from django.utils.translation import gettext_lazy as _ from .models im...
extractor
youtube
# coding: utf-8 from __future__ import unicode_literals import itertools import json import os.path import random import re import traceback from ..compat import compat_chr, compat_HTTPError from ..compat import compat_map as map from ..compat import compat_str, compat_urllib_parse from ..compat import compat_urllib...
lastfmlove
cellrenderertoggleimage
# -*- coding: utf-8 -*- from gi.repository import Gdk, GdkPixbuf, GObject, Gtk from xlgui import icons class CellRendererToggleImage(Gtk.CellRendererToggle): """ Renders a toggleable state as an image """ __gproperties__ = { "icon-name": ( GObject.TYPE_STRING, "icon n...
game
SongChoosingScene
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
pyinstaller-hooks
hook_sounddevice
# ------------------------------------------------------------------ # Copyright (c) 2020 PyInstaller Development Team. # # This file is distributed under the terms of the GNU General Public # License (version 2.0 or later). # # The full license is available in LICENSE.GPL.txt, distributed with # this software. # # SPD...
ui
ui_options
# -*- 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_Dialog(object): def setupUi(self, Dialog): Dialog.setObjectName("Dialog") Dialog.resize(800, 450) self.vboxlayout = QtWidget...
db
database
from pathlib import Path from typing import List, Optional, Union from pony.orm import count, db_session, desc, select from tribler.core.components.bandwidth_accounting.db import history, misc from tribler.core.components.bandwidth_accounting.db import ( transaction as db_transaction, ) from tribler.core.component...
extractor
godtube
from __future__ import unicode_literals import re from ..utils import parse_duration, parse_iso8601 from .common import InfoExtractor class GodTubeIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?godtube\.com/watch/\?v=(?P<id>[\da-zA-Z]+)" _TESTS = [ { "url": "https://www.godtube.com...
decrypters
CriptTo
# -*- coding: utf-8 -*- import base64 import json import re from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from pyload.core.utils.convert import to_str from ..anticaptchas.ReCaptcha import ReCaptcha from ..anticaptchas.SolveMedia ...
schema
person_overrides
from typing import Any, Dict, List from posthog.hogql.database.argmax import argmax_select from posthog.hogql.database.models import ( DateTimeDatabaseField, FieldOrTable, IntegerDatabaseField, StringDatabaseField, Table, ) from posthog.hogql.errors import HogQLException PERSON_OVERRIDES_FIELDS: D...
widgets
clut_imagedata
import functools import math import wx HISTOGRAM_LINE_COLOUR = (128, 128, 128) HISTOGRAM_FILL_COLOUR = (64, 64, 64) HISTOGRAM_LINE_WIDTH = 1 DEFAULT_COLOUR = (0, 0, 0) TEXT_COLOUR = (255, 255, 255) BACKGROUND_TEXT_COLOUR_RGBA = (255, 0, 0, 128) GRADIENT_RGBA = 0.75 * 255 LINE_COLOUR = (128, 128, 128) LINE_WIDTH =...