section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
beets
mediafile
# 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, ...
AddonManager
manage_python_dependencies
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022-2023 FreeCAD Project Association * # * ...
util
natsort
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2019-2020, 2022 Philipp Wolfer # Copyright (C) 2020-2021 Laurent Monin # # 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 S...
lib
pixbufsurface
# This file is part of MyPaint. # Copyright (C) 2011-2018 by the MyPaint Development Team. # Copyright (C) 2008-2012 by Martin Renold <martinxyz@gmx.ch> # # 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 Fou...
canvas
port
""" Copyright 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio SPDX-License-Identifier: GPL-2.0-or-later """ import math from gi.repository import Gtk, Pango, PangoCairo from ...core.ports import Port as CorePort from ...core.utils.descriptors import nop_write from .. import Actions,...
gamedata
marketGroup
# =============================================================================== # 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, ...
neubot
config_api
# neubot/config_api.py # # Copyright (c) 2011-2012 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 Pu...
draftguitools
gui_patharray
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2013 WandererFan <wandererfan@gmail.com> * # * Co...
TDTest
DLeaderRText
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # test script for TechDraw module # creates a page and a view # adds 1 leader to view1 # adds 1 RTA to leader1 import os import FreeCAD def DLeaderTest(): path = os.path.dirname(os.path.abspath(__file__)) print("TDLead path: " + path) templateFileSpec = p...
draftobjects
pathtwistedarray
# *************************************************************************** # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
audio
listener
from __future__ import annotations from typing import TYPE_CHECKING, Any, Literal, Optional from mopidy import listener if TYPE_CHECKING: from mopidy.audio import PlaybackState from mopidy.types import DurationMs, Uri from typing_extensions import TypeAlias AudioEvent: TypeAlias = Literal[ "positio...
Code
AnalisisIndexes
import LCEngine4 as LCEngine from Code import Partida, VarGen def calc_formula(cual, cp, mrm): # , limit=200.0): with open("./IntFiles/Formulas/%s.formula" % cual, "rb") as f: formula = f.read() piew = pieb = 0 mat = 0.0 matw = matb = 0.0 dmat = {"k": 3.0, "q": 9.9, "r": 5.5, "b": 3.5, "n...
net
pedal_connection
# -------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: GNU...
ui
treesearch
import functools from typing import Iterable from unicodedata import normalize from gaphor.ui.treemodel import TreeItem, tree_item_sort """ Inputs: 1. Text changing -> return first match from start_tree_item 2. "next" -> return first match from start_tree_item update start_tree_item 3. selected item cha...
miditool
widget
# 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 ...
util
fs
#!/usr/bin/env python from .os import detect_os def legitimize(text, os=detect_os()): """Converts a string to a valid filename.""" # POSIX systems text = text.translate( { 0: None, ord("/"): "-", ord("|"): "-", } ) # FIXME: do some filesystem ...
SCL
SimpleReader
# Copyright (c) 2014, Juergen Riegel (FreeCAD@juergen-riegel.net) # All rights reserved. # This file is part of the StepClassLibrary (SCL). # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sourc...
lib
language
import re from collections import Counter, namedtuple CharRange = namedtuple("CharRange", "name start end") NONCHAR = re.compile(r"\W+") def charset_name(name, start, end): if name.lower() == "undefined": return "_".join([name.title(), start, end]) else: return NONCHAR.sub("_", name.title())...
models
explicit_team_membership
from typing import TYPE_CHECKING from django.db import models from posthog.models.utils import UUIDModel, sane_repr if TYPE_CHECKING: from posthog.models.organization import OrganizationMembership # We call models that grant a user access to some grouping of users a "membership" class ExplicitTeamMembership(UUI...
Test
BaseTests
# *************************************************************************** # * Copyright (c) 2004 Juergen Riegel <juergen.riegel@web.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
ui
ui_options_tags_compatibility_wave
# -*- 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_TagsCompatibilityOptionsPage(object): def setupUi(self, TagsCompatibilityOptionsPage): TagsCompatibilityOptionsPage.setObjectName("TagsCompa...
serializers
schedule_polymorphic
from apps.api.serializers.schedule_calendar import ( ScheduleCalendarCreateSerializer, ScheduleCalendarSerializer, ) from apps.api.serializers.schedule_ical import ( ScheduleICalCreateSerializer, ScheduleICalSerializer, ScheduleICalUpdateSerializer, ) from apps.api.serializers.schedule_web import ( ...
scripts
SearchAndReplace
# Copyright (c) 2017 Ghostkeeper # The PostProcessingPlugin is released under the terms of the LGPLv3 or higher. import re # To perform the search and replace. from ..Script import Script class SearchAndReplace(Script): """Performs a search-and-replace on all g-code. Due to technical limitations, the sear...
lib
redis
# encoding: utf-8 """ Redis utilities. .. versionadded:: 2.7 """ from __future__ import absolute_import import logging from ckan.common import config from redis import ConnectionPool, Redis log = logging.getLogger(__name__) # Redis connection pool. Do not use this directly, use ``connect_to_redis`` # instead. _co...
filters
stickiness_filter
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Union from django.db.models.functions.datetime import ( TruncDay, TruncHour, TruncMonth, TruncWeek, ) from posthog.constants import INSIGHT_STICKINESS from rest_framework.exceptions import ValidationError from rest_framework.request impor...
ipc
daw
""" This file is part of the Stargate project, Copyright Stargate Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 3 of the License. This program is distributed in the hope that it will ...
plugins
turkuvaz
""" $description Turkish live TV channels from Turkuvaz Media Group, including Ahaber, ATV, Minika COCUK and MinikaGO. $url a2tv.com.tr $url ahaber.com.tr $url anews.com.tr $url apara.com.tr $url aspor.com.tr $url atv.com.tr $url atvavrupa.tv $url minikacocuk.com.tr $url minikago.com.tr $url vavtv.com.tr $type live, vo...
baseclass
trash
# pylint: disable=unused-argument, consider-using-f-string, import-error, attribute-defined-outside-init # pylint: disable=unnecessary-comprehension, no-member, no-name-in-module, too-few-public-methods """ Trash screen """ from kivy.app import App from kivy.properties import ListProperty, StringProperty from kiv...
Apple-Mail
main
#!/usr/bin/python import sys import objc from AppKit import * from Foundation import * MessageRuleClass = objc.runtime.MessageRule oldPerformActionsOnMessages_destinationStores_rejectedMessages_messagesToBeDeleted_ = MessageRuleClass.instanceMethodForSelector_( "performActionsOnMessages:destinationStores:rejecte...
dialogs
hotkeysettings
# Copyright (C) 2011 Chris Dekter # Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu> # 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) a...
plugins
mediavitrina
""" $description Russian live streaming platform hosting various Russian live TV channels. $url mediavitrina.ru $type live $region Russia """ import logging import re from urllib.parse import urlparse from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream...
controllers
embed
# 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, ...
metrics-exporter
tasks
import typing from apps.alerts.constants import AlertGroupState from apps.metrics_exporter.constants import ( METRICS_ORGANIZATIONS_IDS, METRICS_ORGANIZATIONS_IDS_CACHE_TIMEOUT, AlertGroupsResponseTimeMetricsDict, AlertGroupsTotalMetricsDict, RecalculateOrgMetricsDict, UserWasNotifiedOfAlertGro...
windows
profile
""" @file @brief This file loads the Choose Profile dialog @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2023 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an open-source project dedicated to ...
simplejson
ordered_dict
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger http://code.activestate.com/recipes/576693/ """ from UserDict import DictMixin # Modified from original to support Python 2.4, see # http://code.google.com/p/simplejson/issues/detail?id=53 try: all except NameError: def all(seq): ...
contrib
simpleflake
# ======================================================================== # simple-flake - https://github.com/SawdustSoftware/simple-flake # ======================================================================== # Copyright (c) 2013 CustomMade Ventures # Permission is hereby granted, free of charge, to any person ...
clientScripts
restructure_for_compliance_sip
#!/usr/bin/env python import argparse import os import shutil import django # fileOperations requires Django to be set up django.setup() # archivematicaCommon import archivematicaFunctions import fileOperations from archivematicaFunctions import OPTIONAL_FILES, REQUIRED_DIRECTORIES from django.db import transaction ...
searx
settings_loader
# SPDX-License-Identifier: AGPL-3.0-or-later from collections.abc import Mapping from itertools import filterfalse from os import environ from os.path import abspath, dirname, isfile, join import yaml from searx.exceptions import SearxSettingsException searx_dir = abspath(dirname(__file__)) def check_settings_yml(...
xl
playlist
# Copyright (C) 2008-2010 Adam Olsen # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that...
Tools
toolbit_attributes
#!/usr/bin/python3 # -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2021 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you ca...
accounts
DatoidCz
# -*- coding: utf-8 -*- import re from ..base.account import BaseAccount class DatoidCz(BaseAccount): __name__ = "DatoidCz" __type__ = "account" __version__ = "0.39" __status__ = "testing" __description__ = """Datoid.cz account plugin""" __license__ = "GPLv3" __authors__ = [("GammaC0de"...
BasicDrawing
UIHandling
# *** Drawing Basics *** kHICommandSimpleRect = 1000 kHICommandStrokedRect = 1001 kHICommandStrokedAndFilledRect = 1002 kHICommandPathRects = 1003 kHICommandAlphaRects = 1004 kHICommandDashed = 1005 kHICommandSimpleClip = 1006 kHICommandPDFDoc = 1007 # *** Coordinate System *** kHICommandRotatedEllipses = 1008 ...
gtkui
popupmenu
# -*- coding: utf-8 -*- # Copyright (C) 2011 Chris Dekter # # 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. # # This pr...
gtk3
mainwindow
# # Copyright (C) 2007-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. # See LICENSE for more details. # import logging import os....
archiver
mount_cmds
import argparse import os from ..constants import * # NOQA from ..helpers import EXIT_ERROR, umount from ..logger import create_logger from ..manifest import Manifest from ..remote import cache_if_remote from ._common import Highlander, with_repository logger = create_logger() class MountMixIn: def do_mount(se...
bup
main
from __future__ import absolute_import, print_function import os import sys import bup_main if bup_main.env_pythonpath: if sys.version_info[0] < 3: os.environ["PYTHONPATH"] = bup_main.env_pythonpath else: os.environb[b"PYTHONPATH"] = bup_main.env_pythonpath else: del os.environ["PYTHONPAT...
lib
cptools
"""Functions for builtin CherryPy tools.""" import logging import re import cherrypy from cherrypy._cpcompat import basestring, md5, set, unicodestr from cherrypy.lib import httputil as _httputil from cherrypy.lib import is_iterator # Conditional HTTP request support # def v...
desktop
preferences
# -*- 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...
apps
dbModels
#!/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 # Author: # cdhigh <https://github.com/cdhigh> # Contributors: # rexdf <https://github.com/rexdf> from operator import attrgetter from app...
downloaders
RgHostNet
# -*- coding: utf-8 -*- from ..base.simple_downloader import SimpleDownloader class RgHostNet(SimpleDownloader): __name__ = "RgHostNet" __type__ = "downloader" __version__ = "0.09" __status__ = "testing" __pattern__ = r"http://(?:www\.)?rghost\.(net|ru)/[\d\-]+" __config__ = [ ("enab...
streamlink-cli
main
import argparse import importlib.metadata import logging import os import platform import re import signal import ssl import sys import warnings from contextlib import closing, suppress from gettext import gettext from pathlib import Path from time import sleep from typing import Any, Dict, List, Optional, Type, Union ...
ops
compress
"""Compress multiple entries into a single one. This can be used during import to compress the effective output, for accounts with a large number of similar entries. For example, I had a trading account which would pay out interest every single day. I have no desire to import the full detail of these daily interests, ...
imageserver
filesystem_manager
# # Quru Image Server # # Document: filesystem_manager.py # Date started: 30 Jun 2011 # By: Matt Fozard # Purpose: File system management # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it under the ter...
deluge
maketorrent
# # 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. # See LICENSE for more details. # import os from hashlib import ...
scripts
dictcli
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Michal Siedlaczek <michal.siedlaczek@gmail.com> # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """A script installing Hunspell dictionaries. Use: python -m scripts.dictcli [-h] {list,update...
builtinViewColumns
state
# ============================================================================= # 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 ...
AddonManager
addonmanager_dependency_installer
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022 FreeCAD Project Association * # * ...
scripts
link_pyqt
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Symlink PyQt into a given virtualenv.""" import argparse import filecmp import json import os import os.path import shutil import subprocess import sys import tempfi...
extractor
vesti
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ExtractorError from .common import InfoExtractor from .rutv import RUTVIE class VestiIE(InfoExtractor): IE_DESC = "Вести.Ru" _VALID_URL = r"https?://(?:.+?\.)?vesti\.ru/(?P<id>.+)" _TESTS = [ { "ur...
builtinViewColumns
droneRegen
# ============================================================================= # 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 ...
imageserver
image_manager
# # Quru Image Server # # Document: image_manager.py # Date started: 07 Mar 2011 # By: Matt Fozard # Purpose: Image management engine and primary class # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it...
downloaders
VidPlayNet
# -*- coding: utf-8 -*- # # Test links: # BigBuckBunny_320x180.mp4 - 61.7 Mb - http://vidplay.net/38lkev0h3jv0 from ..base.xfs_downloader import XFSDownloader class VidPlayNet(XFSDownloader): __name__ = "VidPlayNet" __type__ = "downloader" __version__ = "0.11" __status__ = "testing" __pattern__...
accounts
NoPremiumPl
# -*- coding: utf-8 -*- import datetime import hashlib import json import time from ..base.multi_account import MultiAccount class NoPremiumPl(MultiAccount): __name__ = "NoPremiumPl" __type__ = "account" __version__ = "0.12" __status__ = "testing" __config__ = [ ("mh_mode", "all;listed;...
config
websettings
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Bridge from QWeb(Engine)Settings to our own settings.""" import argparse import dataclasses import functools import re from typing import Any, Callable, Dict, Optional, Union import qutebro...
PyObjCTest
test_cvopengltexture
from PyObjCTools.TestSupport import * from Quartz import * try: long except NameError: long = int class TestCVOpenGLTexture(TestCase): def testTypes(self): self.assertIsCFType(CVOpenGLTextureRef) @expectedFailure def testFunctions(self): self.assertIsInstance(CVOpenGLTextureGetTy...
restapi
restapi_component
from itertools import chain from typing import Type from ipv8.REST.root_endpoint import RootEndpoint as IPV8RootEndpoint from tribler.core.components.bandwidth_accounting.bandwidth_accounting_component import ( BandwidthAccountingComponent, ) from tribler.core.components.bandwidth_accounting.restapi.bandwidth_endp...
fta
ftatoolbox
"""The definition for the FTA section of the RAAML toolbox.""" from functools import partial from gaphor.diagram.diagramtoolbox import ToolDef, ToolSection, new_item_factory from gaphor.i18n import gettext, i18nize from gaphor.RAAML import diagramitems, raaml from gaphor.UML import diagramitems as uml_items from gaph...
manager
cli
from textwrap import dedent from httpie import __version__ from httpie.cli.argparser import HTTPieManagerArgumentParser from httpie.cli.options import ( ARGPARSE_QUALIFIER_MAP, Qualifiers, map_qualifiers, parser_to_parser_spec, ) CLI_SESSION_UPGRADE_FLAGS = [ { "flags": ["--bind-cookies"],...
OLD
mlp
################################################################ ### Native code neural network with backpropagation training. ################################################################ from __future__ import with_statement __all__ = "MLP".split() import os import os.path import random as pyrandom from random ...
oeb
stylizer
# -*- encoding: utf-8 -*- ''' CSS property propagation class. ''' from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Marshall T. Vandegrift <llasram@gmail.com>' import copy import itertools import logging import os import re import unicodedata from weakref import WeakKeyDictionary ...
saveddata
booster
# =============================================================================== # 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, ...
PyObjCTest
test_catransform3d
from Foundation import NSValue from PyObjCTools.TestSupport import * from Quartz import * from Quartz.QuartzCore import * class TestCATransform3D(TestCase): @min_os_level("10.5") def testStructs(self): v = CATransform3D() self.assertIsInstance(v.m11, float) self.assertIsInstance(v.m12,...
urllib3
fields
import email.utils import mimetypes from .packages import six def guess_content_type(filename, default="application/octet-stream"): """ Guess the "Content-Type" of a file. :param filename: The filename to guess the "Content-Type" of using :mod:`mimetypes`. :param default: If no "Cont...
plugins
blazetv
""" $description British live TV channel and video on-demand service from Blaze, owned by A&E Networks UK. $url blaze.tv $type live, vod $metadata id $metadata author $metadata category $metadata title $region United Kingdom """ import logging import re from streamlink.plugin import Plugin, pluginmatcher from streaml...
cssselect
parser
# coding: utf8 """ cssselect.parser ================ Tokenizer, parser and parsed objects for CSS selectors. :copyright: (c) 2007-2012 Ian Bicking and contributors. See AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import operator import re import sy...
Test
TestBigfile
import binascii import io import time import mock import pytest from Bigfile import BigfilePiecefield, BigfilePiecefieldPacked from Connection import ConnectionServer from Content.ContentManager import VerifyError from File import FileRequest, FileServer from Peer import Peer from Test import Spy from util import Msgp...
femviewprovider
view_material_mechanicalnonlinear
# *************************************************************************** # * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
game
Dialogs
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
extractor
morningstar
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class MorningstarIE(InfoExtractor): IE_DESC = "morningstar.com" _VALID_URL = r"https?://(?:(?:www|news)\.)morningstar\.com/[cC]over/video[cC]enter\.aspx\?id=(?P<id>[0-9]+)" _TESTS = [ { ...
commands
connect
# # 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. #...
frescobaldi-app
simplestate
# 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 ...
restapi
bandwidth_endpoint
from aiohttp import web from aiohttp_apispec import docs from ipv8.REST.schema import schema from marshmallow.fields import Integer, String from tribler.core.components.bandwidth_accounting.community.bandwidth_accounting_community import ( BandwidthAccountingCommunity, ) from tribler.core.components.restapi.rest.re...
cmd
server
from __future__ import absolute_import import os import struct import subprocess import sys from binascii import hexlify, unhexlify from bup import git, options, vfs, vint from bup.compat import environ, hexstr, pending_raise from bup.helpers import ( Conn, debug1, debug2, finalized, linereader, ...
baseclass
popup
# pylint: disable=import-error, attribute-defined-outside-init # pylint: disable=no-member, no-name-in-module, unused-argument, too-few-public-methods """ All the popup are managed here. """ import logging from datetime import datetime from kivy.app import App from kivy.clock import Clock from kivy.metrics import dp...
controllers
web
# 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, ...
migrations
0172_alter_user_preferred_language
# Generated by Django 3.2.16 on 2022-12-21 18:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0171_alter_user_preferred_timezone"), ] operations = [ migrations.AlterField( model_name="user", name="p...
datatypes
data
# -*- coding: utf-8 -*- from collections.abc import Mapping class AbstractData(Mapping): __slots__ = [] def __getitem__(self, name): return getattr(self, name) def __setitem__(self, name, value): return setattr(self, name, value) def __iter__(self): for attr in self.__slots...
source
conf
# -*- coding: utf-8 -*- # # Frets On Fire X documentation build configuration file, created by # sphinx-quickstart on Wed Aug 23 22:23:12 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
extractor
pornhd
from __future__ import unicode_literals import re from ..utils import ( ExtractorError, determine_ext, int_or_none, js_to_json, merge_dicts, urljoin, ) from .common import InfoExtractor class PornHdIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?pornhd\.com/(?:[a-z]{2,4}/)?videos/(?...
writer8
exth
#!/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" import re from io import BytesIO from stru...
extractor
eyedotv
# coding: utf-8 from __future__ import unicode_literals from ..utils import ExtractorError, parse_duration, xpath_text from .common import InfoExtractor class EyedoTVIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?eyedo\.tv/[^/]+/(?:#!/)?Live/Detail/(?P<id>[0-9]+)" ) _TEST = { "url...
baseclass
draft
# pylint: disable=unused-argument, import-error, too-many-arguments # pylint: disable=unnecessary-comprehension, no-member, no-name-in-module """ draft.py ============== Draft screen """ import logging from kivy.app import App from kivy.clock import Clock from kivy.properties import ListProperty, StringProperty fro...
gui-qt
engine
from plover.engine import StenoEngine from plover.oslayer.config import PLATFORM from PyQt5.QtCore import QThread, QVariant, pyqtSignal class Engine(StenoEngine, QThread): # Signals. signal_stroked = pyqtSignal(QVariant) signal_translated = pyqtSignal(QVariant, QVariant) signal_machine_state_changed =...
gadgets
borderlayout
# 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 ...
Scripts
simple_kvo
#!/usr/bin/python import objc from Foundation import (NSKeyValueChangeNewKey, NSKeyValueObservingOptionNew, NSObject) class MyClass(NSObject): base = objc.ivar("base", objc._C_INT) power = objc.ivar("power", objc._C_INT) result = objc.ivar("result", objc._C_INT) def result(se...
migrations
0023_update_idtools
from django.db import migrations def data_migration_up(apps, schema_editor): """Update identification tools FIDO and Siegfried to current versions, allowing for integration of PRONOM 94. """ idtool = apps.get_model("fpr", "IDTool") idcommand = apps.get_model("fpr", "IDCommand") # Update Fido ...
libs
videoservice
#!/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...
PyObjCTest
test_ciimageprovider
import os from PyObjCTools.TestSupport import * from Quartz.QuartzCore import * try: unicode except NameError: unicode = str class TestCIImageProviderHelper(NSObject): def provideImageData_bytesPerRow_origin__size__userInfo_( self, data, rowbytes, x, y, width, height, userInfo ): pas...
oslayer
config
# Copyright (c) 2012 Hesky Fisher # See LICENSE.txt for details. """Platform dependent configuration.""" import os import sys import appdirs if sys.platform.startswith("darwin"): PLATFORM = "mac" elif sys.platform.startswith("linux"): PLATFORM = "linux" elif sys.platform.startswith("win"): PLATFORM = "w...
auth
get
# encoding: utf-8 import ckan.authz as authz import ckan.logic as logic from ckan.common import _, asbool, config from ckan.lib.plugins import get_permission_labels from ckan.logic.auth import ( get_group_object, get_package_object, get_resource_object, restrict_anon, ) from ckan.types import AuthResul...