section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
parsers
generic_txt
__package__ = "archivebox.parsers" __description__ = "Plain Text" import re from datetime import datetime, timezone from pathlib import Path from typing import IO, Iterable from ..index.schema import Link from ..util import URL_REGEX, enforce_types, htmldecode @enforce_types def parse_generic_txt_export(text_file: ...
friture
widgetdict
#!/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...
cmd
restore
from __future__ import absolute_import import copy import errno import os import re import stat import sys from stat import S_ISDIR from bup import git, options, vfs from bup._helpers import write_sparsely from bup.compat import argv_bytes, fsencode from bup.helpers import ( add_error, chunkyreader, die_i...
filter
qa_pfb_decimator
#!/usr/bin/env python # # Copyright 2012-2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import math from gnuradio import blocks, fft, filter, gr, gr_unittest def sig_source_c(samp_rate, freq, amp, N): t = [float(x) / samp_rate for x in r...
searx
preferences
# SPDX-License-Identifier: AGPL-3.0-or-later """Searx preferences implementation. """ # pylint: disable=useless-object-inheritance from base64 import urlsafe_b64decode, urlsafe_b64encode from urllib.parse import parse_qs, urlencode from zlib import compress, decompress from searx import autocomplete, settings from s...
digital
qa_crc16_async_bb
#!/usr/bin/env python # Copyright 2022 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import pmt from gnuradio import blocks, digital, gr, gr_unittest class qa_crc16_async_bb(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_blo...
PyObjCTest
test_nstextcheckingresult
from Foundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSTextCheckingResult(TestCase): @min_os_level("10.6") def testConstants(self): self.assertEqual(NSTextCheckingTypeOrthography, 1 << 0) self.assertEqual(NSTextCheckingT...
plugins
cover
# Copyright 2013 Simonas Kazlauskas # 2022 Nick Boultbee # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. fr...
models
configmodel
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Functions that return config-related completion models.""" from qutebrowser.commands import cmdexc, parser from qutebrowser.completion.models import completionmodel, listcategory, util from ...
deployments
deploymentstoolbox
"""The definition for the components section of the toolbox.""" from gaphas.item import SE from gaphor import UML from gaphor.core import gettext from gaphor.diagram.diagramtoolbox import ToolDef, ToolSection, new_item_factory from gaphor.UML import diagramitems from gaphor.UML.toolboxconfig import namespace_config d...
core
post_processing
# 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...
gaphor
event
"""Application lifecycle events are managed here.""" from __future__ import annotations from pathlib import Path from gaphor.abc import Service class ServiceEvent: """An event emitted by a service.""" def __init__(self, service: Service): self.service = service class ServiceInitializedEvent(Serv...
comic
pufeibase
#!/usr/bin/env python3 # encoding: utf-8 # http://www.pufei.net或者http://m.pufei.net网站的免费漫画的基类,简单提供几个信息实现一个子类即可推送特定的漫画 # Author: insert0003 <https://github.com/insert0003> import imghdr import json import re import urllib from base64 import b64decode, b64encode import urllib2 from books.base import BaseComicBook from b...
cli
archivebox_oneshot
#!/usr/bin/env python3 __package__ = "archivebox.cli" __command__ = "archivebox oneshot" import argparse import sys from pathlib import Path from typing import IO, List, Optional from ..config import OUTPUT_DIR from ..logging_util import SmartFormatter, accept_stdin, stderr from ..main import oneshot from ..util imp...
generateBase
generateTools
#! python # -*- coding: utf-8 -*- # (c) 2007 Jürgen Riegel import os def ensureDir(path, mode=0o777): try: os.makedirs(path, mode) except OSError as err: # https://docs.python.org/3/tutorial/errors.html # raise an error unless it's about an already existing directory print("D...
plugins
abematv
""" $description Japanese live TV streaming website with multiple channels including news, sports, entertainment and anime. $url abema.tv $type live, vod $region Japan """ import hashlib import hmac import logging import re import struct import time import uuid from base64 import urlsafe_b64encode from binascii import...
Arch
ArchBuildingPart
# -*- coding: utf8 -*- # *************************************************************************** # * Copyright (c) 2018 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it an...
PyObjCTest
test_cgdirectdisplay
from PyObjCTools.TestSupport import * from Quartz import CoreGraphics from Quartz.CoreGraphics import * try: long except NameError: long = int try: unicode except NameError: unicode = str class TestCGDirectDisplay(TestCase): @min_os_level("10.8") def testConstants10_8(self): self.ass...
lib
covercp
"""Code-coverage tools for CherryPy. To use this module, or the coverage tools in the test suite, you need to download 'coverage.py', either Gareth Rees' `original implementation <http://www.garethrees.org/2001/12/04/python-coverage/>`_ or Ned Batchelder's `enhanced version: <http://www.nedbatchelder.com/code/modules/...
sentry-reporter
sentry_scrubber
import re from typing import Any, Dict, List, Union from tribler.core.sentry_reporter.sentry_reporter import BREADCRUMBS, RELEASE from tribler.core.sentry_reporter.sentry_tools import ( delete_item, format_version, modify_value, obfuscate_string, ) class SentryScrubber: """This class has been cre...
example-idatasetform
plugin_v4
# encoding: utf-8 from __future__ import annotations from typing import Any, cast import ckan.plugins as p import ckan.plugins.toolkit as tk from ckan.common import CKANConfig from ckan.types import Context, Schema, ValidatorFactory def create_country_codes(): user = tk.get_action("get_site_user")({"ignore_auth...
migrations
0296_team_allow_blank_fields
# Generated by Django 3.2.16 on 2023-01-26 00:05 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0295_plugin_allow_blank_config_schema"), ] operations = [ migrations.AlterField( mod...
VersionUpgrade21to22
Preferences
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import configparser # To read config files. import io # To output config files to string. from typing import List, Optional, Tuple import UM.VersionUpgrade # To indicate that a file is of the wrong format. ## Creates...
gui
colortools
# 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...
declaration
describe
# -*- coding: utf-8 -*- """This module defines the ways to describe the definition of config declaration. We expect that definition produced by describers can be loaded into exactly the same declaration, that was used for definition. I.e: Given: config_declaration = ... config_definition = describe(config_declara...
http
message
# neubot/http/message.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 ...
migrations
0007_element
# Generated by Django 2.2.7 on 2020-01-25 23:30 import django.contrib.postgres.fields.jsonb import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0006_person_distinct_ids"), ] operations = [ migratio...
formats
mod
# Copyright 2004-2005 Joe Wreschnig, Michael Urman # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. import ctypes impo...
Pyfa
pyfa
#!/usr/bin/env python3 # ============================================================================== # 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 Soft...
base
multi_downloader
# -*- coding: utf-8 -*- import re from pyload.core.network.exceptions import Fail from ..helpers import replace_patterns from .simple_downloader import SimpleDownloader class MultiDownloader(SimpleDownloader): __name__ = "MultiDownloader" __type__ = "downloader" __version__ = "0.72" __status__ = "st...
preferences
delete_user
""" edit your own account """ import time from bookwyrm import forms, models from django.contrib.auth import login, logout from django.contrib.auth.decorators import login_required from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.decorator...
util
fifo
# Copyright 2014 Christoph Reiter # 2017-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. ...
scripts
deb
#!/usr/bin/env python3 """ Script for creating Debian packages """ import argparse import json import os import shutil import subprocess import tempfile def parse_args(): parser = argparse.ArgumentParser( description="Debian package creator script", ) parser.add_argument( "-i", ...
fitRemoteReps
calc
# ============================================================================= # 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 ...
decrypters
RealdebridComTorrent
# -*- coding: utf-8 -*- import fnmatch import json import os import time import urllib.request import pycurl from pyload.core.network.http.exceptions import BadHeader from pyload.core.utils.old import safejoin from pyload.core.utils.purge import uniquify from ..base.simple_decrypter import SimpleDecrypter from ..hel...
PyObjCTest
test_appkit_protocols
import Cocoa from PyObjCTools.TestSupport import * class TestProtocolsExisting(TestCase): @min_os_level("10.6") def testProtocols10_6(self): objc.protocolNamed("NSAlertDelegate") objc.protocolNamed("NSAnimatablePropertyContainer") objc.protocolNamed("NSAnimationDelegate") objc....
extractor
tv2dk
# coding: utf-8 from __future__ import unicode_literals import json import re from ..utils import determine_ext, extract_attributes, js_to_json, url_or_none from .common import InfoExtractor class TV2DKIE(InfoExtractor): _VALID_URL = r"""(?x) https?:// (?:www\.)? ...
scripts
check
__copyright__ = "Copyright (C) 2014, 2016-2017 Martin Blais" __license__ = "GNU GPLv2" import logging import sys import click from beancount import loader from beancount.ops import validation from beancount.parser.version import VERSION from beancount.utils import misc_utils @click.command() @click.argument("filen...
vidcutter
updater
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ####################################################################### # # VidCutter - media cutter & joiner # # copyright © 2018 Pete Alexandrou # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
implant
changeLocation
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.implant.changeLocation import CalcChangeImplantLocationCommand from gui.fitCommands.helpers import InternalCommandHistory from service.fit import Fit class GuiChangeImplantLocationCommand(wx.Command): def __i...
classes
assets
""" @file @brief This file generates the path for a project's assets @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an open-source project ded...
migrations
0118_alter_user_preferred_language
# Generated by Django 3.2.5 on 2021-11-17 18:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0117_alter_user_preferred_language"), ] operations = [ migrations.AlterField( model_name="user", name="pr...
snippet
highlight
# 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 ...
views
on_call_shifts
from apps.auth_token.auth import ApiTokenAuthentication from apps.public_api.serializers import ( CustomOnCallShiftSerializer, CustomOnCallShiftUpdateSerializer, ) from apps.public_api.throttlers.user_throttle import UserThrottle from apps.schedules.models import CustomOnCallShift from common.api_helpers.filter...
writer8
tbs
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import absolute_import, division, print_function, unicode_literals __license__ = "GPL v3" __copyright__ = "2012, Kovid Goyal <kovid@kovidgoyal.net>" __docformat__ = "restructuredtext en" DOC = """ Trailing Byte Sequences contain ...
CTFd
serve
import argparse parser = argparse.ArgumentParser() parser.add_argument("--port", help="Port for debug server to listen on", default=4000) parser.add_argument( "--profile", help="Enable flask_profiler profiling", action="store_true" ) parser.add_argument( "--disable-gevent", help="Disable importing gevent a...
saveddata
user
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, ...
migrations
0304_store_dashboard_template_in_db
# Generated by Django 3.2.16 on 2023-02-27 18:11 import django.contrib.postgres.fields import django.db.models.deletion from django.conf import settings from django.db import migrations, models # :KLUDGE: Work around test_migrations_are_safe class AlterFieldNullSafe(migrations.AlterField): def describe(self): ...
versions
034_6c600693af5b_resource_group_table
# encoding: utf-8 """034 Resource group table Revision ID: 6c600693af5b Revises: 6da92ef2df15 Create Date: 2018-09-04 18:49:00.683101 """ import sqlalchemy as sa from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used by Alembic. revision = "6c600693af5b" do...
kafka-partition-stats
sql
from posthog.clickhouse.kafka_engine import kafka_engine from posthog.clickhouse.table_engines import AggregatingMergeTree from posthog.kafka_client.topics import KAFKA_EVENTS_PLUGIN_INGESTION from posthog.settings import CLICKHOUSE_CLUSTER, CLICKHOUSE_DATABASE CREATE_PARTITION_STATISTICS_KAFKA_TABLE = ( lambda mo...
validate
_validators
from typing import Any, Callable, Dict, Optional, Tuple from urllib.parse import urlparse from lxml.etree import XPathError, iselement from streamlink.plugin.api.validate._exception import ValidationError from streamlink.plugin.api.validate._schemas import AllSchema, AnySchema, TransformSchema from streamlink.plugin.a...
Code
Personalidades
from Code.Constantes import * from Code.QT import Controles, FormLayout, Iconos, QTUtil2, QTVarios class Personalidades: def __init__(self, owner, configuracion): self.owner = owner self.configuracion = configuracion def listaAjustes(self, siTodos): liAjustes = [ (_("Best ...
migrations
0001_initial
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-08-28 11:43 import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER...
engrave
result_menu
# 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 ...
AnnounceShare
AnnounceSharePlugin
import atexit import json import logging import os import time import gevent from Config import config from Plugin import PluginManager from util import helper class TrackerStorage(object): def __init__(self): self.log = logging.getLogger("TrackerStorage") self.file_path = "%s/trackers.json" % co...
generator
Generator
# Copyright 2008-2016 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # from .cpp_hier_block import CppHierBlockGenerator from .cpp_top_block import CppTopBlockGenerator from .hier_block import HierBlockGenerator, QtHierBlockGenerator from .top_block impor...
Code
Sonido
import audioop import sys import time import wave import pyaudio import StringIO from Code import Util, VarGen from Code.QT import QTUtil from PyQt4 import QtCore DATABASE = "D" PLAY_ESPERA = "P" PLAY_SINESPERA = "N" STOP = "S" TERMINAR = "T" class RunSound: def __init__(self): VarGen.runSound = self ...
scenarios
shift_swap_requests
import json import logging import typing import humanize from apps.slack.models import SlackMessage from apps.slack.scenarios import scenario_step from apps.slack.types import ( Block, BlockActionType, EventPayload, PayloadType, ScenarioRoute, ) from apps.slack.utils import ( SlackDateFormat, ...
examples
pyqt_time_raster_f
#!/usr/bin/env python # # Copyright 2012,2013,2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import sys from gnuradio import blocks, gr try: import sip from gnuradio import qtgui from PyQt5 import Qt, QtWidgets except ImportError: ...
draftobjects
hatch
# *************************************************************************** # * * # * Copyright (c) 2021 Yorik van Havre <yorik@uncreated.net> * # * * # * Th...
deluge
msgfmt
#!/usr/bin/env python # Written by Martin v. Lwis <loewis@informatik.hu-berlin.de> # Plural forms support added by alexander smishlajev <alex@tycobka.lv> """ Generate binary message catalog from textual translation description. This program converts a textual Uniforum-style message catalog (.po file) into a binary GNU...
doc
conf
# Configuration file for the Sphinx documentation builder. # -- Project information ----------------------------------------------------- project = "Plover" copyright = "Open Steno Project" author = copyright release = "4.0.0-rc2" version = release # -- General configuration ----------------------------------------...
billing
billing_types
from decimal import Decimal from typing import Dict, List, Optional, TypedDict from posthog.constants import AvailableFeature class Tier(TypedDict): flat_amount_usd: Decimal unit_amount_usd: Decimal current_amount_usd: Decimal up_to: Optional[int] class CustomerProduct(TypedDict): name: str ...
ops
pad_test
__copyright__ = "Copyright (C) 2014-2016 Martin Blais" __license__ = "GNU GPLv2" import datetime import unittest from beancount import loader from beancount.core import data, inventory, realization from beancount.core.amount import A from beancount.ops import balance, pad from beancount.parser import cmptest class...
conversion
mobioutput
#!/usr/bin/env python # -*- coding:utf-8 -*- from __future__ import with_statement __license__ = "GPL v3" __copyright__ = "2009, Kovid Goyal <kovid@kovidgoyal.net>" __docformat__ = "restructuredtext en" def remove_html_cover(oeb, log): from calibre.ebooks.oeb.base import OEB_DOCS if not oeb.metadata.cover o...
conversions
releaseFeb2020
""" Conversion pack for February 2020 release """ CONVERSIONS = { # Renamed items "Small Asymmetric Remote Capacitor Transmitter": "Small Radiative Scoped Remote Capacitor Transmitter", "Small 'Regard' Remote Capacitor Transmitter": "Small Inductive Compact Remote Capacitor Transmitter", "Medium Asymme...
modelmerge
organize
from __future__ import annotations from itertools import groupby from typing import Iterable, Sequence from gaphor.core.changeset.apply import applicable from gaphor.core.modeling import ( Diagram, ElementChange, PendingChange, Presentation, RefChange, ValueChange, ) from gaphor.i18n import ge...
ui
actiongroup
from __future__ import annotations import sys from typing import NamedTuple from gaphor.abc import ActionProvider from gaphor.action import action from gi.repository import Gio, GLib, Gtk def apply_application_actions(component_registry, gtk_app): scope = "app" for _name, provider in component_registry.all(...
pynocchio
comic_file_loader_dir
import glob import logging from .comic import Page from .comic_file_loader import ComicLoader from .exception import NoDataFindException from .utility import IMAGE_FILE_FORMATS, get_file_extension, is_dir, join_path logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def is_directory(dirname): ""...
projectedFighter
add
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.helpers import FighterInfo, InternalCommandHistory from service.fit import Fit class GuiAddProjectedFighterCommand(wx.Command): ...
decrypters
FreetexthostCom
# -*- coding: utf-8 -*- import re from ..base.simple_decrypter import SimpleDecrypter class FreetexthostCom(SimpleDecrypter): __name__ = "FreetexthostCom" __type__ = "decrypter" __version__ = "0.06" __status__ = "testing" __pattern__ = r"http://(?:www\.)?freetexthost\.com/\w+" __config__ = [...
Gui
Tags
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
serializers
alert_group
import datetime import logging from apps.alerts.incident_appearance.renderers.classic_markdown_renderer import ( AlertGroupClassicMarkdownRenderer, ) from apps.alerts.incident_appearance.renderers.web_renderer import AlertGroupWebRenderer from apps.alerts.models import AlertGroup from common.api_helpers.custom_fie...
data
transformations
# -*- coding: utf-8 -*- # transformations.py # Copyright (c) 2006-2015, Christoph Gohlke # Copyright (c) 2006-2015, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modifica...
migrations
0079_move_funnels_to_insights
# Generated by Django 3.0.7 on 2020-08-06 17:05 from django.db import migrations def forward(apps, schema_editor): Funnel = apps.get_model("posthog", "Funnel") Action = apps.get_model("posthog", "Action") DashboardItem = apps.get_model("posthog", "DashboardItem") for item in Funnel.objects.all(): ...
util
tagsfrompath
# Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna # # 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. impor...
templatetags
statuses
# -*- encoding: utf-8 -*- from statistics.models import PDF_STATUS_CHOICES, STATUS_TO_COLOR from django import template from django.utils.safestring import mark_safe from django.utils.translation import ugettext as _ from publishers.models import OA_STATUS_CHOICES register = template.Library() @register.filter(is_...
reader
headers
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import absolute_import, print_function __license__ = "GPL v3" __copyright__ = "2012, Kovid Goyal <kovid@kovidgoyal.net>" __docformat__ = "restructuredtext en" import os import re import struct from calibre import replace_entitie...
migrations
0001_initial
# -*- coding: utf-8 -*- from django.db import migrations, models class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name="AccessStatistics", fields=[ ( "id", models.AutoField...
draftguitools
gui_scale
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * (c) 2009, 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
models
award
# The contents of this file are subject to the Common Public Attribution # License Version 1.0. (the "License"); you may not use this file except in # compliance with the License. You may obtain a copy of the License at # http://code.reddit.com/LICENSE. The License is based on the Mozilla Public # License Version 1.1, ...
internal
xdg
import configparser import os import pathlib def get_dirs(): """Returns a dict of all the known XDG Base Directories for the current user. The keys ``XDG_CACHE_DIR``, ``XDG_CONFIG_DIR``, and ``XDG_DATA_DIR`` is always available. Additional keys, like ``XDG_MUSIC_DIR``, may be available if the ``...
pwidgets
surfaces
# -*- coding: utf-8 -*- # # Copyright (C) 2018 by Ihor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
User
UserManager
# Included modules import json import logging import time from Config import config from Plugin import PluginManager # ZeroNet Modules from .User import User @PluginManager.acceptPlugins class UserManager(object): def __init__(self): self.users = {} self.log = logging.getLogger("UserManager") ...
books
base
#!/usr/bin/env python # -*- coding:utf-8 -*- """ KindleEar电子书基类,每本投递到kindle的书籍抽象为这里的一个类。 可以继承BaseFeedBook类而实现自己的定制书籍。 cdhigh <https://github.com/cdhigh> """ import datetime import hashlib import imghdr import os import re import urllib import urlparse from apps.dbModels import LastDelivered from bs4 import BeautifulSo...
extractors
wget
__package__ = "archivebox.extractors" import re from datetime import datetime, timezone from pathlib import Path from typing import Optional from ..config import ( CHECK_SSL_VALIDITY, COOKIES_FILE, RESTRICT_FILE_NAMES, SAVE_WARC, SAVE_WGET, SAVE_WGET_REQUISITES, TIMEOUT, WGET_ARGS, ...
cssutils
serialize
#!/usr/bin/env python # -*- coding: utf-8 -*- """cssutils serializer""" __all__ = ['CSSSerializer', 'Preferences'] __docformat__ = 'restructuredtext' __version__ = '$Id$' import codecs import re import xml.dom import cssutils import helper from cssutils.helper import normalize def _escapecss(e): """ Escapes...
comic
seven33sobase
#!/usr/bin/env python3 # encoding: utf-8 # https://www.733.so或者https://m.733.so网站的免费漫画的基类,简单提供几个信息实现一个子类即可推送特定的漫画 # Author: insert0003 <https://github.com/insert0003> import imghdr import json import re import time import urllib from base64 import b64decode, b64encode import urllib2 import urlparse from books.base imp...
cactus
cli
#!/usr/bin/env python # encoding: utf-8 import argparse import os import socket import sys import time import colorama from six.moves import input # No cactus imports here! There's no logging in place (or anything really). # It's best to wait until we've ran setup_logging before running imports (some import soft erro...
socks5
client
import ipaddress import logging import socket from asyncio import DatagramProtocol, Protocol, Queue, get_event_loop from ipv8.messaging.interfaces.udp.endpoint import DomainAddress from ipv8.messaging.serialization import PackError from tribler.core.components.socks_servers.socks5.conversion import ( REQ_CMD_CONNE...
api
organization
from typing import Any, Dict, List, Optional, Union, cast from django.db.models import Model, QuerySet from django.shortcuts import get_object_or_404 from posthog import settings from posthog.api.shared import TeamBasicSerializer from posthog.cloud_utils import is_cloud from posthog.constants import AvailableFeature f...
exports
image_exporter
import json import os import uuid from datetime import timedelta from typing import Literal, Optional import structlog from django.conf import settings from posthog.caching.fetch_from_cache import synchronously_update_cache from posthog.models.exported_asset import ( ExportedAsset, get_public_access_token, ...
apps
usrp_display_qtgui
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'usrp_display_qtgui.ui' # # Created: Thu Jul 16 22:06:24 2009 # by: PyQt4 UI code generator 4.4.3 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui class Ui_MainWindow(object): def setupUi(se...
builtinContextMenus
itemVariationChange
# noinspection PyPackageRequirements import gui.fitCommands as cmd import gui.mainFrame import wx from gui.contextMenu import ContextMenuCombined from gui.fitCommands.helpers import getSimilarFighters, getSimilarModPositions from service.fit import Fit from service.market import Market _t = wx.GetTranslation class ...
femexamples
buckling_lateraltorsionalbuckling
# *************************************************************************** # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
migrations
0001_populate_license_chooser
# Generated by Django 2.2.1 on 2019-05-27 11:18 from django.db import migrations def create_zenodo_license_choosers(apps, schema_editor): """ Creates LicenseChooser objects for zenodo repositories as they were hard-coded before introduced model. """ License = apps.get_model("deposit", "License") ...
TemplatePyMod
Tests
# FreeCAD TemplatePyMod module # (c) 2007 Juergen Riegel LGPL import unittest import FreeCAD # --------------------------------------------------------------------------- # define the test cases for this module # --------------------------------------------------------------------------- class ParameterTestCase(u...
KindleUnpack
mobi_header
#!/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 MobiHeader.metadata."...
PerObjectSettingsTool
PerObjectSettingVisibilityHandler
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import UM.Settings.Models.SettingVisibilityHandler from cura.Settings.ExtruderManager import ( ExtruderManager, ) # To get global-inherits-stack setting values from different extruders. from cura.Settings.SettingOverri...
components
hostblock
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Functions related to host blocking.""" import logging import os.path import pathlib import posixpath import zipfile from typing import IO, Set, cast from qutebrowser.api import apitypes, co...