section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
settings
rating
# 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...
extractor
lnkgo
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import clean_html, compat_str, int_or_none, parse_iso8601 from .common import InfoExtractor class LnkGoIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?lnk(?:go)?\.(?:alfa\.)?lt/(?:visi-video/[^/]+|video)/(?P<id>[A-Za-z0-9-]+)(?:...
sk1
events
# -*- coding: utf-8 -*- # # Copyright (C) 2011-2017 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...
examples
example_fll
#!/usr/bin/env python # # Copyright 2011-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import sys from argparse import ArgumentParser import numpy from gnuradio import blocks, channels, digital, eng_notation, filter, gr from gnuradio.eng_arg ...
clientScripts
extract_zipped_transfer
#!/usr/bin/env python # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, ei...
network
request_manager
from __future__ import annotations import json import logging from collections import deque from time import time from typing import Callable, Dict, Optional, Set from PyQt5.QtCore import QBuffer, QIODevice, QUrl from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest from tribler.gui.defs import BUTTON_TY...
extractors
xinpianchang
#!/usr/bin/env python import json import re from ..common import get_content, playlist_not_supported from ..extractor import VideoExtractor class Xinpianchang(VideoExtractor): name = "xinpianchang" stream_types = [ {"id": "4K", "quality": "超清 4K", "video_profile": "mp4-4K"}, {"id": "2K", "qu...
apiv1
gold
# 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, ...
ctrlport
RPCConnection
# # Copyright 2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ RPCMethods is a dictionary listing RPC transports currently supported by this client. Args: function: the function whose parameter list will be examined excluded_args: func...
canto-next
tag
# Canto - RSS reader backend # Copyright (C) 2016 Jack Miller <jack@codezen.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import logging from .hooks import call_hook...
QT
PantallaAnotar
from Code import Util from Code.QT import Colocacion, Columnas, Controles, Grid, Iconos, QTUtil2, QTVarios class WAnotar(QTVarios.WDialogo): def __init__(self, procesador): self.procesador = procesador self.configuracion = procesador.configuracion self.resultado = None self.db = Ut...
extractor
newgrounds
from __future__ import unicode_literals import re from ..utils import ( extract_attributes, int_or_none, parse_duration, parse_filesize, unified_timestamp, ) from .common import InfoExtractor class NewgroundsIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?newgrounds\.com/(?:audio/listen...
gui
marketBrowser
# ============================================================================= # 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 ...
models
subscription
from dataclasses import dataclass from datetime import timedelta from typing import Any, Dict, Optional from dateutil.rrule import FR, MO, SA, SU, TH, TU, WE, rrule from django.contrib.postgres.fields import ArrayField from django.db import models from django.db.models.signals import post_save from django.dispatch imp...
scripts
dxf_post
# *************************************************************************** # * Copyright (c) 2020 sliptonic <shopinghewoods@gmail.com> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
plugins
filmon
""" $description Live local TV channels and video on-demand service. OTT service from FilmOn. $url filmon.com $type live, vod $notes Some VODs are mp4 which may not stream, use -o to download """ import logging import re import time from typing import Iterator, List, Tuple from urllib.parse import urlparse, urlunparse...
extractor
ctvnews
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import orderedSet from .common import InfoExtractor class CTVNewsIE(InfoExtractor): _VALID_URL = r"https?://(?:.+?\.)?ctvnews\.ca/(?:video\?(?:clip|playlist|bin)Id=|.*?)(?P<id>[0-9.]+)" _TESTS = [ { "url": "ht...
rarfile
dumprar
#! /usr/bin/env python """Dump archive contents, test extraction.""" from __future__ import absolute_import, division, print_function import getopt import io import sys from datetime import datetime import rarfile as rf usage = """ dumprar [switches] [ARC1 ARC2 ...] [@ARCLIST] switches: @file read archive n...
db
queries
# 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, ...
Machines
MachineErrorChecker
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import time from collections import deque from typing import Any, Optional, Set import cura.CuraApplication from PyQt6.QtCore import QObject, QTimer, pyqtProperty, pyqtSignal from UM.Logger import Logger from UM.Settings.S...
nyaa
api_handler
import binascii import functools import json import re import flask from nyaa import backend, forms, models from nyaa.views.torrents import _create_upload_category_choices api_blueprint = flask.Blueprint("api", __name__, url_prefix="/api") # #################################### API HELPERS ##########################...
cli
utils
# -*- coding: utf-8 -*- """ flaskbb.cli.utils ~~~~~~~~~~~~~~~~~ This module contains some utility helpers that are used across commands. :copyright: (c) 2016 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import os import re import sys import click from flask import __v...
lib
auth
import cherrypy from cherrypy.lib import httpauth def check_auth(users, encrypt=None, realm=None): """If an authorization header contains credentials, return True or False.""" request = cherrypy.serving.request if "authorization" in request.headers: # make sure the provided credentials are correct...
midifiles
tracks
from .meta import MetaMessage class MidiTrack(list): @property def name(self): """Name of the track. This will return the name from the first track_name meta message in the track, or '' if there is no such message. Setting this property will update the name field of the first...
extractor
swrmediathek
# coding: utf-8 from __future__ import unicode_literals from ..utils import determine_protocol, int_or_none, parse_duration from .common import InfoExtractor class SWRMediathekIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?swrmediathek\.de/(?:content/)?player\.htm\?show=(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]...
covers
artwork_url
# Copyright 2016-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. from os import path from gi.repo...
meshroom
setupInitScriptUnix
# ------------------------------------------------------------------------------ # ConsoleSetLibPath.py # Initialization script for cx_Freeze which manipulates the path so that the # directory in which the executable is found is searched for extensions but # no other directory is searched. The environment variable LD...
gamedata
item
# =============================================================================== # 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, ...
widgets
preset_browser
from sglib.lib.translate import _ from sgui.sgqt import * class preset_browser_widget: """To eventually replace the legacy preset system""" def __init__( self, a_plugin_name, a_configure_dict=None, a_reconfigure_callback=None, ): self.plugin_name = str(a_plugin_nam...
src
helper_ackPayload
""" This module is for generating ack payload """ from binascii import hexlify from struct import pack import helper_random import highlevelcrypto from addresses import encodeVarint def genAckPayload(streamNumber=1, stealthLevel=0): """ Generate and return payload obj. This function generates payload o...
Material
Init
# *************************************************************************** # * Copyright (c) 2013 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
app
filters
# -*- coding: utf-8 -*- import datetime import os from urllib.parse import quote_plus as _quote_plus from urllib.parse import unquote_plus as _unquote_plus from pyload.core.utils import format _QUOTECHAR = "::%2F" def quotepath(path): try: return path.replace(".." + os.path.sep, _QUOTECHAR) except ...
dataset-tools
oid_tfrecord_creation_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...
localModule
mutatedImport
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.module.localAdd import CalcAddLocalModuleCommand from gui.fitCommands.helpers import ( InternalCommandHistory, ModuleInfo, restoreRemovedDummies, ) from service.fit import Fit class GuiImportLocalMuta...
Code
Entrenamientos
import os import random import shutil import scandir from Code import ( Gestor60, GestorAperturas, GestorBooks, GestorGM, GestorMate, GestorResistance, GestorTacticas, GestorTurnOnLights, Memoria, Resistance, Tacticas, TrListas, TurnOnLights, Util, VarGen, ) ...
lib
bencode
# Copyright (C) 2011 by clueless <clueless.nospam ! mail.com> # # 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, mo...
extractors
soundcloud
#!/usr/bin/env python __all__ = ["sndcd_download"] import json import re import urllib.error from ..common import * def get_sndcd_apikey(): home_page = get_content("https://soundcloud.com") js_url = re.findall(r'script crossorigin src="(.+?)"></script>', home_page)[-1] client_id = get_content(js_url) ...
blocks
qa_min
#!/usr/bin/env python # # Copyright 2014 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import math from gnuradio import blocks, gr, gr_unittest class test_min(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block() def ...
funnels
funnel_persons
from typing import List, Optional from posthog.models.filters.filter import Filter from posthog.models.filters.mixins.utils import cached_property from posthog.queries.actor_base_query import ActorBaseQuery from posthog.queries.funnels.funnel import ClickhouseFunnel from posthog.queries.funnels.sql import FUNNEL_PERSO...
gpodder
youtube
# -*- 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...
plugins
blog_disabled
""" Modify `config.json` to set a custom blog path, default author name, or date pattern used to parse metadata. The defaults are: "blog": { "path": "blog", "author": "Unknown", "date-format": "%d-%m-%Y" } """ import datetime import logging import os ORDER = 999 POSTS = [] from django.template import Con...
frescobaldi-app
scratchdir
# 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 ...
ui
metadatabox
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2004 Robert Kaye # Copyright (C) 2006-2007, 2012 Lukáš Lalinský # Copyright (C) 2011-2014 Michael Wiencek # Copyright (C) 2012 Nikolai Prokoschenko # Copyright (C) 2013-2014, 2017-2022 Laurent Monin # Copyright (C) 2013-2014, 2...
util
marshal
""" """ from typing import Any, Callable, Iterable, Optional, Tuple from .init_args import init_args from .key_swap import key_swap __all__ = [ "ExtraKeysError", "_get_dict", "InitArgsError", "marshal_dict", "unmarshal_dict", "marshal_list", "unmarshal_list", ] def _get_dict( obj: ...
thumbor
context
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from os.path import abspath, exists from thumbor.filters import Fil...
network
audio_sink
#!/usr/bin/env python # # Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import sys from argparse import ArgumentParser from gnuradio import blocks, gr try: from gnuradio import audio except ImportError: sys.stderr....
extractor
sevenplus
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_HTTPError, compat_str from ..utils import ExtractorError, try_get, update_url_query from .brightcove import BrightcoveNewIE class SevenPlusIE(BrightcoveNewIE): IE_NAME = "7plus" _VALID_URL = r"https?://(?:www\.)?7p...
migrations
201606210939_d9530a529b3f_add_timezone_awareness_for_datetime
"""add timezone awareness for datetime objects Revision ID: d9530a529b3f Revises: 221d918aa9f0 Create Date: 2016-06-21 09:39:38.348519 """ import flaskbb import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "d9530a529b3f" down_revision = "221d918aa9f0" def upgrade(): ...
model
user
# encoding: utf-8 from __future__ import annotations import datetime import re from hashlib import md5, sha1 from typing import TYPE_CHECKING, Any, Iterable, Optional import passlib.utils from ckan.common import config, session from ckan.model import core, domain_object, meta from ckan.model import types as _types fr...
lib
glib
# This file is part of MyPaint. # -*- coding: utf-8 -*- # Copyright (C) 2015-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 Licen...
extractors
missevan
""" MIT License Copyright (c) 2019 WaferJay 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, dist...
femviewprovider
view_mesh_boundarylayer
# *************************************************************************** # * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
blocks
connectors
from typing import Union from gaphas.connector import Handle, Port from gaphor import UML from gaphor.diagram.connectors import Connector, RelationshipConnect from gaphor.SysML import sysml from gaphor.SysML.blocks.block import BlockItem from gaphor.SysML.blocks.interfaceblock import InterfaceBlockItem from gaphor.Sys...
mylar
locg
# This file is part of Mylar. # # Mylar is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Mylar is distributed in the hope that...
utils
bisect_key
"""A version of bisect that accepts a custom key function, like the sorting ones do. """ __copyright__ = "Copyright (C) 2013-2014, 2016 Martin Blais" __license__ = "GNU GPLv2" def bisect_left_with_key(sequence, value, key=None): """Find the last element before the given value in a sorted list. Args: s...
cssutils
errorhandler
#!/usr/bin/env python """cssutils ErrorHandler ErrorHandler used as log with usual levels (debug, info, warn, error) if instanciated with ``raiseExceptions=True`` raises exeptions instead of logging log defaults to instance of ErrorHandler for any kind of log message from lexerm, parser etc. ...
gpodder
opml
# -*- 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...
views
cloud_users
from apps.api.permissions import IsOwnerOrHasRBACPermissions, RBACPermission from apps.auth_token.auth import PluginAuthentication from apps.oss_installation.models import CloudConnector, CloudUserIdentity from apps.oss_installation.serializers import CloudUserSerializer from apps.oss_installation.utils import cloud_us...
PyObjCTest
test_nscontrol
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSControlHelper(NSObject): def control_textShouldBeginEditing_(self, c, f): return 1 def control_textShouldEndEditing_(self, c, f): return 1 def control_didFailToFor...
mido
ports
""" Useful tools for working with ports """ from __future__ import unicode_literals import random import threading import time from .messages import Message from .parser import Parser # How many seconds to sleep before polling again. _DEFAULT_SLEEP_TIME = 0.001 _sleep_time = _DEFAULT_SLEEP_TIME # TODO: document th...
hal
protocol
# -*- 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 Affero General Public License # as published by the Free Software Foundation; either version 2 # of th...
extractor
zoom
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ( ExtractorError, int_or_none, js_to_json, parse_filesize, urlencode_postdata, ) from .common import InfoExtractor class ZoomIE(InfoExtractor): IE_NAME = "zoom" _VALID_URL = r"(?P<base_url>https?://(?:[...
OctoPrint
versioneer
# -*- coding: utf-8 -*- # flake8: noqa from __future__ import absolute_import, division, print_function, unicode_literals ### NOTE ################################################################################# # This file has to stay format compatible to Python 2, or pip under Python 2 will # not be able to detect ...
events
language
# 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. from gi.repository import Gtk, Pang...
Gui
GetPoint
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
controllers
generic
# -*- coding: utf-8 -*- # # Copyright (C) 2013 by Ihor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
extractor
rentv
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_str from ..utils import determine_ext, int_or_none, url_or_none from .common import InfoExtractor class RENTVIE(InfoExtractor): _VALID_URL = ( r"(?:rentv:|https?://(?:www\.)?ren\.tv/(?:player|video/epizod)/)(?P<id>\d+)" ...
plugins
twitcasting
""" $description Global live broadcasting and live broadcast archiving social platform. $url twitcasting.tv $type live $metadata id """ import hashlib import logging import re import sys from time import time from streamlink.buffers import RingBuffer from streamlink.plugin import Plugin, pluginargument, pluginmatcher...
ops
lifetimes
"""Given a Beancount ledger, compute time intervals where we hold each commodity. This script computes, for each commodity, which time intervals it is required at. This can then be used to identify a list of dates at which we need to fetch prices in order to properly fill the price database. """ __copyright__ = "Copyr...
migrations
upgrade17
""" Migration 17 - Moves all fleet boosters to the new schema """ def upgrade(saveddata_engine): from eos.db import saveddata_session from eos.db.saveddata.fit import commandFits_table sql = """ SELECT sm.memberID as boostedFit, s.leaderID AS squadBoost, w.leaderID AS wingBoost, g.leaderID AS ...
utils
fs
import errno import os import shutil import tempfile from hashlib import md5 import requests from django.conf import settings def mkdir_p(path): try: os.makedirs(path) except OSError as exc: if exc.errno == errno.EEXIST and os.path.isdir(path): pass else: raise...
usecases
usecasetoolbox
"""The definition for the use cases 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 us...
Messages
CloudFlowMessage
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os from cura.CuraApplication import CuraApplication from PyQt6.QtCore import QUrl from PyQt6.QtGui import QDesktopServices from UM import i18nCatalog from UM.Message import Message I18N_CATALOG = i18nCatalog("cura")...
datapusher
plugin
# encoding: utf-8 from __future__ import annotations import logging from typing import Any, Callable import ckan.model as model import ckan.plugins as p import ckanext.datapusher.helpers as helpers import ckanext.datapusher.logic.action as action import ckanext.datapusher.logic.auth as auth import ckanext.datapusher....
aliceVision
SfMSplitReconstructed
__version__ = "1.0" from meshroom.core import desc class SfMSplitReconstructed(desc.AVCommandLineNode): commandLine = "aliceVision_sfmSplitReconstructed {allParams}" size = desc.DynamicNodeSize("input") category = "Utils" documentation = """ This nodes takes a sfmData file and split it in two ...
Messages
PrintJobAwaitingApprovalMessage
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from PyQt6.QtCore import QUrl from PyQt6.QtGui import QDesktopServices from UM import i18nCatalog from UM.Message import Message I18N_CATALOG = i18nCatalog("cura") class PrintJobPendingApprovalMessage(Message): """Mes...
draftmake
make_text
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
internal
gi
# pyright: reportMissingModuleSource=false import sys import textwrap try: import gi gi.require_version("Gst", "1.0") from gi.repository import GLib, GObject, Gst except ImportError: print( # noqa: T201 textwrap.dedent( """ ERROR: A GObject based library was not found. ...
engines
piratebay
# SPDX-License-Identifier: AGPL-3.0-or-later """ Piratebay (Videos, Music, Files) """ from datetime import datetime from json import loads from operator import itemgetter from urllib.parse import quote from searx.utils import get_torrent_size # about about = { "website": "https://thepiratebay.org", "wikidat...
imageserver
tasks
# # Quru Image Server # # Document: tasks.py # Date started: 21 Dec 2012 # By: Matt Fozard # Purpose: Background tasks, shared by main app and task server # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # ...
friture
exceptionhandler
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009 Timothée 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 distri...
squeezebox
server
# Copyright 2014-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. import socket import time from te...
chardet
langgreekmodel
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
migrations
0094_auto_20210911_1550
# Generated by Django 3.2.4 on 2021-09-11 15:50 from django.db import migrations, models from django.db.models import CharField, F, Value def set_deactivate_date(apps, schema_editor): """best-guess for deactivation date""" db_alias = schema_editor.connection.alias apps.get_model("bookwyrm", "User").objec...
gui
style
# This file is part of MyPaint. # Copyright (C) 2014 by Andrew Chadwick <a.t.chadwick@gmail.com> # # 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 ...
builtinViewColumns
maxRange
# ============================================================================= # 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 ...
extractors
vk
#!/usr/bin/env python __all__ = ["vk_download"] from ..common import * def get_video_info(url): video_page = get_content(url) title = r1(r'<div class="vv_summary">(.[^>]+?)</div', video_page) sources = re.findall(r'<source src=\"(.[^>]+?)"', video_page) for quality in [".1080.", ".720.", ".480.", "...
GraphicsBindings
GraphicsArrayController
# # GraphicsArrayController.py # GraphicsBindings # # Converted by u.fiedler on feb 2005 # with great help from Bob Ippolito - Thank you Bob! # # The original version was written in Objective-C by Malcolm Crawford # http://homepage.mac.com/mmalc/CocoaExamples/controllers.html from math import fabs from random im...
builtinViewColumns
graphLightness
# ============================================================================= # 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 ...
books
TEDxBohaiBay
#!/usr/bin/env python # -*- coding:utf-8 -*- # 抓取传送门网站http://chuansongme.com/的特定微信公众号文章列表, # 将title/description/feeds稍加修改后即可用于其他公众号 # feeds里也可以直接增加几个账号 import datetime from base import BaseFeedBook, string_of_tag from bs4 import BeautifulSoup from lib.urlopener import URLOpener def getBook(): return TEDxBohaiBay...
FieldGraph
CGraphView
from math import cos, pi, sin import objc from AppKit import * from fieldMath import * from Foundation import * # Convience global variables x, y = 0, 1 llc, sze = 0, 1 # Left Lower Corner, Size #____________________________________________________________ class CGraphView(NSView): azmuthSlider = objc.IBOutlet(...
plover
key_combo
# -*- coding: utf-8 -*- import re # Mapping of "standard" keynames (derived from X11 keysym names) to Unicode. KEYNAME_TO_CHAR = { # Generated using: # # from Xlib import XK # from plover.oslayer.linux.keyboardcontrol_x11 import keysym_to_string # for kn, ks in sorted({ # name[3:].lower():...
widgets
control
import collections import math from typing import Optional, Tuple from sglib.lib import util from sglib.lib.translate import _ from sglib.log import LOG from sglib.math import clip_value, pitch_to_hz, pitch_to_ratio, ratio_to_pitch from sgui import shared as glbl_shared from sgui.sgqt import * from . import _shared f...
ui
ui
# # Copyright (C) 2007 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 sys imp...
commands
rm
# # 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. #...
calculix
write_femelement_matgeosets
# *************************************************************************** # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
Network
ClusterApiClient
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import json from json import JSONDecodeError from typing import ( Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar, Union, cast, ) from PyQt6.QtCore import QUrl from PyQt6.Qt...
AttachmentEditor
FrozenClass
# /*************************************************************************** # * Copyright (c) 2016 Victor Titov (DeepSOIC) <vv.titov@gmail.com> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
extractor
melonvod
# coding: utf-8 from __future__ import unicode_literals from ..utils import int_or_none, urljoin from .common import InfoExtractor class MelonVODIE(InfoExtractor): _VALID_URL = ( r"https?://vod\.melon\.com/video/detail2\.html?\?.*?mvId=(?P<id>[0-9]+)" ) _TEST = { "url": "http://vod.melon....
PyObjCTest
test_regr
from __future__ import unicode_literals import sys import objc from PyObjCTest import copying, structargs, testbndl from PyObjCTest.fnd import NSAutoreleasePool, NSObject from PyObjCTools.TestSupport import * rct = structargs.StructArgClass.someRect.__metadata__()["retval"]["type"] class OCTestRegrWithGetItem(NSOb...