section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
controllers
buttons
# 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, ...
PeerDb
PeerDbPlugin
import atexit import random import sqlite3 import time import gevent from Plugin import PluginManager @PluginManager.registerTo("ContentDb") class ContentDbPlugin(object): def __init__(self, *args, **kwargs): atexit.register(self.saveAllPeers) super(ContentDbPlugin, self).__init__(*args, **kwargs...
extractor
libraryofcongress
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import determine_ext, float_or_none, int_or_none, parse_filesize from .common import InfoExtractor class LibraryOfCongressIE(InfoExtractor): IE_NAME = "loc" IE_DESC = "Library of Congress" _VALID_URL = r"https?://(?:www\.)?lo...
model
group_extra
# encoding: utf-8 from typing import Any import ckan.model.core as core import ckan.model.domain_object as domain_object import ckan.model.group as group import ckan.model.meta as meta import ckan.model.types as _types from sqlalchemy import Column, ForeignKey, Table, orm, types from sqlalchemy.ext.associationproxy i...
migrations
0012_attachment
# Generated by Django 3.0.7 on 2020-11-24 19:39 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0011_auto_20201113_1727"), ] operations = [ migrations.CreateModel( name="Attachment...
draftutils
utils
# -*- coding: utf-8 -*- # *************************************************************************** # * (c) 2009, 2010 * # * Yorik van Havre <yorik@uncreated.net>, Ken Cline <cline@frii.com> * # * (c) 2019 Eliud Cabrera Castillo <e.cabrera-castillo@tum....
qltk
showfiles
# Copyright 2012-2020 Nick Boultbee # 2012,2014,2018 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...
Gui
Waterline
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2020 sliptonic <shopinthewoods@gmail.com> * # * Copyright (c) 2020 russ4262 <russ4262@gmail.com> * # * ...
builtinContextMenus
shipJump
# noinspection PyPackageRequirements import gui.mainFrame import wx from gui.builtinShipBrowser.events import Stage3Selected from gui.contextMenu import ContextMenuUnconditional from service.fit import Fit _t = wx.GetTranslation class JumpToShip(ContextMenuUnconditional): def __init__(self): self.mainFr...
extractor
cwtv
# coding: utf-8 from __future__ import unicode_literals from ..utils import ( ExtractorError, int_or_none, parse_age_limit, parse_iso8601, smuggle_url, str_or_none, ) from .common import InfoExtractor class CWTVIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?cw(?:tv(?:pr)?|seed)\.com...
accounts
FileboomMe
# -*- coding: utf-8 -*- import json import re from pyload.core.datatypes.pyfile import PyFile from pyload.core.network.http.exceptions import BadHeader from ..anticaptchas.ReCaptcha import ReCaptcha from ..base.account import BaseAccount from ..base.captcha import BaseCaptcha class FileboomMe(BaseAccount): __n...
extractor
beeg
from __future__ import unicode_literals from ..compat import compat_str, compat_urlparse from ..utils import int_or_none, unified_timestamp from .common import InfoExtractor class BeegIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?beeg\.(?:com|porn(?:/video)?)/(?P<id>\d+)" _TESTS = [ { ...
blocks
qa_stream_demux
#!/usr/bin/env python # # Copyright 2020 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
migrations
0145_eventdefinition_propertydefinition
# Generated by Django 3.1.8 on 2021-04-22 01:45 import django.db.models.deletion import posthog.models.utils from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0144_update_django_3_1_8"), ] operations = [ migrations.CreateModel( ...
stream
ffmpegmux
import concurrent.futures import logging import re import subprocess import sys import threading from contextlib import suppress from functools import lru_cache from pathlib import Path from shutil import which from typing import Any, Dict, Generic, List, Optional, Sequence, TextIO, TypeVar, Union from streamlink impo...
TemplatePyMod
DocumentObject
# FreeCAD module providing base classes for document objects and view provider # (c) 2011 Werner Mayer LGPL import FreeCAD class DocumentObject(object): """The Document object is the base class for all FreeCAD objects.""" def __init__(self): self.__object__ = None self.initialised = False ...
migrate
regenerate_query_cache
#!/usr/bin/python from org.apache.pig.scripting import Pig SCRIPT_ROOT = "udfs/dist/lib/" INPUT_ROOT = "input/" OUTPUT_ROOT = "output" relations = { "savehide": ("UserQueryCache", "link"), "inbox_account_comment": ("UserQueryCache", "comment"), "inbox_account_message": ("UserQueryCache", "message"), ...
mako
runtime
# mako/runtime.py # Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """provides runtime services for templates, including Context, Namespace, and various helper funct...
meta-architectures
rfcn_meta_arch_test
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
PySide
ui_mainwindow
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created: Fri Nov 20 18:03:04 2015 # by: pyside-uic 0.2.13 running on PySide 1.1.0 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_MainWindow(object): def setup...
transform-plugin
transforms
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2021 by Ihor E. Novikov # Copyright (C) 2020 fixed by Michael Schorcht # # 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 t...
clientScripts
get_aip_storage_locations
#!/usr/bin/env python import json import django # storageService requires Django to be set up django.setup() # archivematicaCommon import storageService as storage_service from custom_handlers import get_script_logger logger = get_script_logger("archivematica.mcp.client.get_aip_storage_locations") def get_aip_st...
lib
cache_poisoning
import hashlib import hmac from pylons import app_globals as g # A map of cache policies to their respective cache headers # loggedout omitted because loggedout responses are intentionally cacheable CACHE_POLICY_DIRECTIVES = { "loggedin_www": { "cache-control": {"private", "no-cache"}, "pragma": {...
snippet
template
# 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 ...
equations
electrostatic_writer
# *************************************************************************** # * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> * # * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> * # * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> * # * ...
neubot
utils_random
#!/usr/bin/env python # # Copyright (c) 2011 Simone Basso <bassosimone@gmail.com>, # NEXA Center for Internet & Society at Politecnico di Torino # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public L...
cura
ApplicationMetadata
# Copyright (c) 2022 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. # --------- # General constants used in Cura # --------- DEFAULT_CURA_APP_NAME = "cura" DEFAULT_CURA_DISPLAY_NAME = "UltiMaker Cura" DEFAULT_CURA_VERSION = "dev" DEFAULT_CURA_BUILD_TYPE = "" DEFAULT_CURA_DEBUG_MODE = False DEF...
comictaggerlib
comicvinetalker
"""A python class to manage communication with Comic Vine's REST API""" # 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/lice...
ui
rich_progress
from dataclasses import dataclass from typing import TYPE_CHECKING, Optional from httpie.context import Environment if TYPE_CHECKING: from rich.console import Console @dataclass class BaseDisplay: env: Environment def start(self, *, total: Optional[float], at: float, description: str) -> None: ...
protos
square_box_coder_pb2
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: object_detection/protos/square_box_coder.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pb2 from google.p...
prompt
prompt
from django.contrib.postgres.fields import ArrayField from django.db import models from django.utils import timezone class Prompt(models.Model): step: models.IntegerField = models.IntegerField() type: models.CharField = models.CharField(max_length=200) # tooltip, modal, etc title: models.CharField = mode...
core
display_context_test
__copyright__ = "Copyright (C) 2014-2016 Martin Blais" __license__ = "GNU GPLv2" import unittest from decimal import Decimal from beancount.core import display_context from beancount.core.display_context import Align, Precision def decimalize(number_list): decimalized_list = [] for element in number_list: ...
heartbeat
formatted_webhook
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....
dialogs
strokedlg
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 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...
tasks
escalate_alert_group
from common.custom_celery_tasks import shared_dedicated_queue_retry_task from django.conf import settings from django.db import transaction from kombu.utils.uuid import uuid as celery_uuid from .compare_escalations import compare_escalations from .task_logger import task_logger @shared_dedicated_queue_retry_task( ...
VersionUpgrade54to55
VersionUpgrade54to55
# Copyright (c) 2023 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. import configparser import io import re from typing import List, Tuple from UM.VersionUpgrade import VersionUpgrade class VersionUpgrade54to55(VersionUpgrade): profile_regex = re.compile( r"um\_(?P<machine>s(3|5|7...
cli
argparser
import argparse import errno import os import re import sys from argparse import RawDescriptionHelpFormatter from textwrap import dedent from urllib.parse import urlsplit from requests.utils import get_netrc_auth from ..context import Environment from ..plugins.registry import plugin_manager from ..utils import Expli...
extractor
packtpub
from __future__ import unicode_literals import json import re from ..compat import compat_HTTPError # compat_str, from ..utils import ( ExtractorError, clean_html, # remove_end,; urljoin, str_or_none, strip_or_none, unified_timestamp, ) from .common import InfoExtractor class PacktPubBaseIE(In...
pyelliptic
arithmetic
""" Arithmetic Expressions """ import hashlib import re P = 2**256 - 2**32 - 2**9 - 2**8 - 2**7 - 2**6 - 2**4 - 1 A = 0 Gx = 55066263022277343669578718895168534326250603453777594175500187360389116729240 Gy = 32670510020758816978083085130507043184471273380659243275938904335757337482424 G = (Gx, Gy) def inv(a, n): ...
migrator
oncall_api_client
from contextlib import suppress from time import sleep from urllib.parse import urljoin import requests from migrator.config import ONCALL_API_TOKEN, ONCALL_API_URL from requests import HTTPError from requests.adapters import HTTPAdapter, Retry def api_call(method: str, path: str, **kwargs) -> requests.Response: ...
httpie
downloads
""" Download mode implementation. """ import mimetypes import os import re from mailbox import Message from time import monotonic from typing import IO, Optional, Tuple from urllib.parse import urlsplit import requests from .context import Environment from .models import HTTPResponse, OutputOptions from .output.stre...
interaction-payloads
interactive_messages
""" [Documentation](https://api.slack.com/legacy/interactive-messages#receiving-action-invocations) """ import enum import typing from apps.slack.types.common import BaseEvent, Channel, PayloadType class InteractiveMessageActionType(enum.StrEnum): SELECT = "select" BUTTON = "button" class InteractiveMessa...
command
drive
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (C) 2009 Thomas Vander Stichele # This file is part of whipper. # # whipper 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 t...
qltk
appwindow
# Copyright 2016 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. class AppWindow: """The shared...
api
event
import json import urllib from datetime import datetime from typing import Any, Dict, List, Optional, Union from django.db.models.query import Prefetch from drf_spectacular.types import OpenApiTypes from drf_spectacular.utils import OpenApiParameter from posthog.api.documentation import PropertiesSerializer, extend_sc...
ConcurrentLogHandler
cloghandler
# Copyright 2013 Lowell Alleman # # 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 applicable law or agreed to in writin...
schema
session_replay_events
from typing import Dict, List from posthog.hogql.database.models import ( DatabaseField, DateTimeDatabaseField, FieldOrTable, FieldTraverser, IntegerDatabaseField, LazyJoin, LazyTable, StringDatabaseField, Table, ) from posthog.hogql.database.schema.person_distinct_ids import ( ...
util
importhelper
# Copyright 2012,2013 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. import importlib import os imp...
deluge
minify_web_js
#!/usr/bin/env python # # Copyright (C) 2014 Calum Lind <calumlind@gmail.com> # Copyright (C) 2010 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...
scripts
dynamicattributes
#!/usr/bin/env python2.7 """ This script will generate a dynamicItemAttributes.json file using res files """ import argparse import json import os from shutil import copyfile parser = argparse.ArgumentParser( description="This script updates module icons for pyfa" ) parser.add_argument("-e", "--eve", required=T...
USBPrinting
USBPrinterOutputDeviceManager
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import threading import time from os import environ from re import search import serial.tools.list_ports from cura.PrinterOutput.PrinterOutputDevice import ConnectionState from PyQt6.QtCore import QObject, pyqtSignal from ...
src
itunes
# https://github.com/albertz/itunes-scripts # Copyright (c) 2012, Albert Zeyer, www.az2000.de # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain...
core
log_factory
# -*- coding: utf-8 -*- import locale import logging import logging.handlers import os import sys from contextlib import closing try: import colorlog except ImportError: colorlog = None class LogFactory: FILE_EXTENSION = ".log" LINESTYLE = "{" LINEFORMAT = "[{asctime}] {levelname:8} {name:>16...
WebServicesTool-CocoaBindings
RPCMethod
import objc from Foundation import * class RPCMethod(NSObject): def initWithDocument_name_(self, aDocument, aName): self = super(RPCMethod, self).init() self.document = aDocument self.k_methodName = aName self.k_methodSignature = None self.k_methodDescription = None ...
network
pac
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Evaluation of PAC scripts.""" import functools import sys from typing import Optional, cast from qutebrowser.qt import machinery from qutebrowser.qt.core import QObject, QUrl, pyqtSignal, p...
versions
012_e5ca33a5d445_add_resources
# encoding: utf-8 """012 Add resources Revision ID: e5ca33a5d445 Revises: 866f6370b4ac Create Date: 2018-09-04 18:48:52.303211 """ import sqlalchemy as sa from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used by Alembic. revision = "e5ca33a5d445" down_revi...
Gui
FeatureExtension
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2019 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
src
qidenticon
### # qidenticon.py is Licesensed under FreeBSD License. # (http://www.freebsd.org/copyright/freebsd-license.html) # # Copyright 1994-2009 Shin Adachi. All rights reserved. # Copyright 2013 "Sendiulo". All rights reserved. # Copyright 2018-2021 The Bitmessage Developers. All rights reserved. # # Redistribution and use ...
Draft
Init
# *************************************************************************** # * Copyright (c) 2009 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
ui
diagrampage
import functools import importlib import logging from typing import Optional from gaphas.guide import GuidePainter from gaphas.painter import FreeHandPainter, HandlePainter, PainterChain from gaphas.segment import LineSegmentPainter from gaphas.tool.rubberband import RubberbandPainter, RubberbandState from gaphas.view...
options
tags
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2007, 2011 Lukáš Lalinský # Copyright (C) 2009 Nikolai Prokoschenko # Copyright (C) 2009-2010, 2018-2021 Philipp Wolfer # Copyright (C) 2012 Erik Wasser # Copyright (C) 2012 Johannes Weißl # Copyright (C) 2012-2013 Michael...
PyObjCTest
test_cgcolor
from PyObjCTools.TestSupport import * from Quartz.CoreGraphics import * try: long except NameError: long = int try: unicode except NameError: unicode = str class TestCGColor(TestCase): def testTypes(self): self.assertIsCFType(CGColorRef) @min_os_level("10.5") def testFunctions10...
beetsplug
export
# This file is part of beets. # # 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, modify, merge, publish, # distribu...
fta
topevent
"""Top Event item definition.""" from gaphas.geometry import Rectangle from gaphor.core.modeling import DrawContext from gaphor.diagram.presentation import ( Classified, ElementPresentation, from_package_str, ) from gaphor.diagram.shapes import Box, Text, draw_border from gaphor.diagram.support import repr...
extractors
tumblr
#!/usr/bin/env python __all__ = ["tumblr_download"] from ..common import * from .dailymotion import dailymotion_download from .universal import * from .vimeo import vimeo_download from .vine import vine_download def tumblr_download(url, output_dir=".", merge=True, info_only=False, **kwargs): if re.match(r"https...
base
chat_bot
# -*- coding: utf-8 -*- from threading import Thread from pyload.core.api import FileDoesNotExists, PackageDoesNotExists from pyload.core.utils import format from .addon import BaseAddon class ChatBot(Thread, BaseAddon): __name__ = "ChatBot" __type__ = "addon" __version__ = "0.02" __status__ = "tes...
example-iconfigurer
plugin
# encoding: utf-8 import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit import ckanext.example_iconfigurer.blueprint as blueprint from ckan.common import CKANConfig from ckan.types import Schema class ExampleIConfigurerPlugin(plugins.SingletonPlugin): """ An example IConfigurer plugin that sh...
Code
GestorPGN
# -*- coding: latin-1 -*- import os import random import sys import Code.SQL.Base as SQLBase from Code import PGN, Gestor, Partida, Util from Code.Constantes import * from Code.QT import Iconos, PantallaPGN, QTUtil, QTUtil2, QTVarios class GestorPGN(Gestor.Gestor): def inicio(self, opcion): self.tipoJue...
pynocchio
bookmark_manager_dialog
import logging from PyQt5 import QtCore, QtGui, QtSql, QtWidgets from .uic_files import bookmark_manager_dialog_ui from .utility import file_exist, get_dir_name logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) class BookmarkManagerDialog(QtWidgets.QDialog): SCALE_RATIO = 0.25 d...
Import
Init
# FreeCAD init script of the Import module # (c) 2001 Juergen Riegel # *************************************************************************** # * Copyright (c) 2002 Juergen Riegel <juergen.riegel@web.de> * # * * # * This file ...
fallback
aes
import os import pyaes from .._aes import AES __all__ = ["aes"] class AESBackend: def _get_algo_cipher_type(self, algo): if not algo.startswith("aes-") or algo.count("-") != 2: raise ValueError("Unknown cipher algorithm {}".format(algo)) key_length, cipher_type = algo[4:].split("-")...
imports
import_status
""" import books from another app """ from bookwyrm import models from bookwyrm.importers import GoodreadsImporter from bookwyrm.models.import_job import import_item_task from bookwyrm.settings import PAGE_LENGTH from django.contrib.auth.decorators import login_required from django.core.exceptions import PermissionDeni...
validate
_schemas
from typing import Any, Callable, FrozenSet, List, Literal, Optional, Pattern, Sequence, Set, Tuple, Type, Union class SchemaContainer: """ A simple schema container. """ def __init__(self, schema): self.schema = schema class _CollectionSchemaContainer(SchemaContainer): def __init__(sel...
migrations
0046_event_names_properties_to_team
# Generated by Django 3.0.3 on 2020-04-14 18:47 import django.contrib.postgres.fields.jsonb from django.db import migrations, models def migrate_event_names_and_properties(apps, schema_editor): Team = apps.get_model("posthog", "Team") Event = apps.get_model("posthog", "Event") class JsonKeys(models.Func...
forms
endpoint
import json from urllib.parse import urljoin from flask import g, jsonify, redirect, render_template, request from flask_cors import cross_origin from formspree import settings from formspree.forms import errors from formspree.forms.errors import SubmitFormError from formspree.forms.helpers import ( HASH, KEYS...
accounts
PremiumizeMe
# -*- coding: utf-8 -*- import json from ..base.multi_account import MultiAccount class PremiumizeMe(MultiAccount): __name__ = "PremiumizeMe" __type__ = "account" __version__ = "0.32" __status__ = "testing" __config__ = [ ("mh_mode", "all;listed;unlisted", "Filter downloaders to use", "...
widgets
lfo_dialog
from sglib.lib.translate import _ from sgui.sgqt import * from . import _shared from .control import knob_control from .playback_widget import playback_widget def lfo_dialog(a_update_callback, a_save_callback): """Generic dialog for doing event transforms that are LFO-like. The actual transforms are performe...
unihandecode
jadecoder
# coding:utf-8 __license__ = "GPL 3" __copyright__ = "2010, Hiroshi Miura <miurahr@linux.com>" __docformat__ = "restructuredtext en" """ Decode unicode text to an ASCII representation of the text for Japanese. Translate unicode string to ASCII roman string. API is based on the python unidecode, which is based on Rub...
PackageManager
packman
""" Cocoa GUI for the Package Manager This is a first generation of the Cocoa GUI, it inherits some of the nasty features of the current Carbon version: 1. GUI blocks during some operations, such as downloading or installing 2. Checking on GUI packages may crash the application The first item can only be solved by ...
models
plugin_auth_token
import binascii from hmac import compare_digest from typing import Tuple from apps.auth_token import constants from apps.auth_token.crypto import ( generate_plugin_token_string, generate_plugin_token_string_and_salt, hash_token_string, ) from apps.auth_token.exceptions import InvalidToken from apps.auth_to...
comictaggerlib
taggerwindow
# coding=utf-8 """The main window of the ComicTagger app""" # 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...
src
DFFileExportAndUploadManager
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import json import threading from json import JSONDecodeError from typing import Any, Callable, Dict, List, Optional, Union from cura.CuraApplication import CuraApplication from PyQt6.QtCore import QUrl from PyQt6.QtGui im...
models
promo_metrics
# 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, ...
markovify
chain
# markovify # Copyright (c) 2015, Jeremy Singer-Vine # Origin: https://github.com/jsvine/markovify # MIT License: https://github.com/jsvine/markovify/blob/master/LICENSE.txt import bisect import json import operator import random # Python3 compatibility try: # pragma: no cover basestring except NameError: # pra...
builtinAdditionPanes
cargoView
# ============================================================================= # 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 ...
bitmessageqt
bitmessageui
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'bitmessageui.ui' # # Created: Mon Mar 23 22:18:07 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! import settingsmixin from blacklist import Blacklist from bmconfigparser import config...
papers
orcid
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # 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 Licen...
frescobaldi-app
lydocinfo
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2013 - 2014 by Wilbert Berendsen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 ...
pyelliptic
hash
""" Wrappers for hash functions from OpenSSL. """ # Copyright (C) 2011 Yann GUIBET <yannguibet@gmail.com> # See LICENSE for details. from .openssl import OpenSSL # For python3 def _equals_bytes(a, b): if len(a) != len(b): return False result = 0 for x, y in zip(a, b): result |= x ^ y ...
generated
compound
#!/usr/bin/env python """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ import sys from xml.dom import Node, minidom from . import compoundsuper as supermod from .compoundsuper import MixedContainer class DoxygenTypeSub(supermod.DoxygenType): def __init__(self, version=None, compounddef=None): ...
backends
ripgrep
import re from subprocess import PIPE, run from typing import Generator, List from archivebox.config import ARCHIVE_DIR, RIPGREP_VERSION, SEARCH_BACKEND_TIMEOUT from archivebox.util import enforce_types RG_IGNORE_EXTENSIONS = ("css", "js", "orig", "svg") RG_ADD_TYPE = "--type-add" RG_IGNORE_ARGUMENTS = f"ignore:*.{{...
lib
websockets
# 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, ...
gui
preferences_window
from __future__ import absolute_import from gi.repository import Gdk, GObject, Gtk from sunflower.gui.preferences.accelerators import AcceleratorOptions from sunflower.gui.preferences.associations import AssociationsOptions from sunflower.gui.preferences.bookmarks import BookmarksOptions from sunflower.gui.preferences...
extractor
academicearth
from __future__ import unicode_literals import re from .common import InfoExtractor class AcademicEarthCourseIE(InfoExtractor): _VALID_URL = r"^https?://(?:www\.)?academicearth\.org/playlists/(?P<id>[^?#/]+)" IE_NAME = "AcademicEarth:Course" _TEST = { "url": "http://academicearth.org/playlists/l...