section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
plugins
clubbingtv
""" $description Television channel dedicated to electronic music, DJs and dance music culture. $url clubbingtv.com $type live, vod $account Login required """ import logging import re from streamlink.plugin import Plugin, pluginargument, pluginmatcher from streamlink.stream.hls import HLSStream log = logging.getLog...
utils
internetspeed
#!/usr/bin/python3 """ Module to measure and report Internet speed Method: get one small and then a bigger reference file, and measure how long it takes, then calculate speed Reports in MB/s (so mega BYTES per seconds), not to be confused with Mbps """ import logging import time import urllib.request SIZE_URL_LIST =...
translators
friendly_nodes
import binascii import six from .pyjsparser import PyJsParser if six.PY3: basestring = str long = int xrange = range unicode = str REGEXP_CONVERTER = PyJsParser() def to_hex(s): return binascii.hexlify(s.encode("utf8")).decode( "utf8" ) # fucking python 3, I hate it so much # ...
draftmake
make_copy
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
gui
freehand
# This file is part of MyPaint. # Copyright (C) 2008-2013 by Martin Renold <martinxyz@gmx.ch> # Copyright (C) 2013-2018 by the MyPaint Development Team. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Fou...
keyinput
modeparsers
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """KeyChainParser for "hint" and "normal" modes. Module attributes: STARTCHARS: Possible chars for starting a commandline input. """ import enum import traceback from typing import TYPE_CH...
BasicDrawing
PDFHandling
import sys import AppDrawing import DataProvidersAndConsumers import FrameworkUtilities import Quartz import Utilities from Quartz import * def createNewPDFRefFromPasteBoard(): # Create a reference to the PDF data on the pasteboard. # The implementation of myCreatePDFDataFromPasteBoard depends # on the a...
migrations
0025_auto_20230718_1042
# Generated by Django 3.2.20 on 2023-07-18 10:42 import django_migration_linter as linter from common.database import ( get_random_readonly_database_key_if_present_otherwise_default, ) from django.db import migrations, models from django.db.models import Count def fix_duplicate_orders(apps, schema_editor): C...
PathTests
TestLinuxCNCPost
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2022 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
script
generate_cdp
#!/usr/bin/env python # initially copied from the "python-chrome-devtools-protocol" project: # https://raw.githubusercontent.com/HyperionGray/python-chrome-devtools-protocol/5463a5f3d201/generator/generate.py # https://raw.githubusercontent.com/HyperionGray/python-chrome-devtools-protocol/5463a5f3d201/cdp/util.py # # ...
views
install
from apps.auth_token.auth import BasePluginAuthentication from apps.user_management.models import Organization from apps.user_management.sync import sync_organization from common.api_helpers.mixins import GrafanaHeadersMixin from rest_framework import status from rest_framework.request import Request from rest_framewor...
extractor
alphaporno
from __future__ import unicode_literals from ..utils import int_or_none, parse_duration, parse_filesize, parse_iso8601 from .common import InfoExtractor class AlphaPornoIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?alphaporno\.com/videos/(?P<id>[^/]+)" _TEST = { "url": "http://www.alphaporno.c...
VersionUpgrade53to54
VersionUpgrade53to54
# Copyright (c) 2023 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. import configparser import io from typing import List, Tuple from UM.VersionUpgrade import VersionUpgrade _REMOVED_SETTINGS = { "wireframe_enabled", "wireframe_height", "wireframe_roof_inset", "wireframe_prints...
Arch
ArchCurtainWall
# -*- coding: utf8 -*- # *************************************************************************** # * Copyright (c) 2020 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it an...
trayicon
prefs
# Copyright 2004-2006 Joe Wreschnig, Michael Urman, Iñigo Serna # 2012 Christoph Reiter # 2013,2017 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 ...
PyObjCTest
test_fsref
from __future__ import unicode_literals import sys import objc from PyObjCTest.fsref import * from PyObjCTools.TestSupport import * if sys.version_info[0] == 3: unicode = str class TestFSRef(TestCase): def testBasicInterface(self): self.assertArgIsIn(OC_TestFSRefHelper.pathForFSRef_, 0) sel...
polar
encoder
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # SPDX-License-Identifier: GPL-3.0-or-later # # import numpy as np from . import helper_functions as hf from .common import PolarCommon class PolarEncoder(PolarCommon): def __init__(self, n, k, frozen_bit_position, frozenbits=None): ...
utils
processoutput
import asyncio from contextlib import suppress from typing import Callable, List, Optional class ProcessOutput: def __init__(self, command: List[str], timeout: Optional[float] = None): self.command = command self.timeout = timeout def run(self) -> bool: # pragma: no cover return asyn...
trayicon
base
# Copyright 2004-2006 Joe Wreschnig, Michael Urman, Iñigo Serna # 2012 Christoph Reiter # 2013 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 ...
UI
MachineSettingsManager
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING, Optional from cura.Machines.ContainerTree import ContainerTree from PyQt6.QtCore import QObject, pyqtSlot from UM.i18n import i18nCatalog if TYPE_CHECKING: from cura.CuraApplication i...
widgets
inv_spinctrl
# -------------------------------------------------------------------------- # 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...
controllers
reddit_base
# 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
Executor
# Copyright 2016 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # import os import shlex import subprocess import threading import time from pathlib import Path from shutil import which as find_executable from gi.repository import GLib from ..core impor...
Path
Log
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
downloaders
SpeedyshareCom
# -*- coding: utf-8 -*- # # Test links: # http://speedy.sh/ep2qY/Zapp-Brannigan.jpg import re from ..base.simple_downloader import SimpleDownloader class SpeedyshareCom(SimpleDownloader): __name__ = "SpeedyshareCom" __type__ = "downloader" __version__ = "0.11" __status__ = "testing" __pattern_...
PathTests
TestPathStock
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
femexamples
ccx_cantilever_base_face
# *************************************************************************** # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
localDrone
mutatedImport
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.drone.localAdd import CalcAddLocalDroneCommand from gui.fitCommands.helpers import DroneInfo, InternalCommandHistory from service.fit import Fit class GuiImportLocalMutatedDroneCommand(wx.Command): def __init...
sunflower
queue
from __future__ import absolute_import from queue import Empty, Queue from threading import Lock from gi.repository import Gtk class OperationQueue: """Generic, multi-name, operation queueing support class.""" _queue_list = {} _active_list = {} _list_store = None _lock = Lock() COLUMN_TEXT...
quodlibet
setup
#!/usr/bin/env python3 # Copyright 2010-2015 Christoph Reiter # 2015 Nick Boultbee # 2010 Steven Robertson # 2007-2008 Joe Wreschnig # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to...
Base
FeedRate
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2021 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
database
table_speedtest
#!/usr/bin/env python # # Copyright (c) 2011 Simone Basso <bassosimone@gmail.com>, # NEXA Center for Internet & Society at Politecnico di Torino # Copyright (c) 2011 Alessio Palmero Aprosio <alessio@apnetwork.it>, # Universita` degli Studi di Milano # # This file is part of Neubot <http://www.neubot.org/>. # # Neubo...
engines
seznam
# SPDX-License-Identifier: AGPL-3.0-or-later """ Seznam """ from urllib.parse import urlencode, urlparse from lxml import html from searx.exceptions import SearxEngineAccessDeniedException from searx.poolrequests import get from searx.utils import eval_xpath, eval_xpath_getindex, eval_xpath_list, extract_text # abo...
legacy
web_data_generator
import json import random from datetime import timedelta from typing import Any, Dict, List from dateutil.relativedelta import relativedelta from django.utils.timezone import now from posthog.constants import TREND_FILTER_TYPE_ACTIONS from posthog.models import ( Action, ActionStep, Dashboard, Dashboar...
frontend
setup_tool
I_TAGNAME = 0 I_ATTRS = 1 I_CHILDREN = 2 I_PARENT = 3 # not in use def build_xpathes(item_tag_ids, html_json): shared_tag_stack = []; def _get_fork_stack(stacks): first = stacks.itervalues().next() # just first stack for i in range(0, len(first)): tag = first[i] for name in stacks: ...
importers
edl
""" @file @brief This file is used to import an EDL (edit decision list) file @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an open-source pro...
beetsplug
mbsync
# This file is part of beets. # Copyright 2016, Jakob Schnitzer. # # 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,...
windows
region
""" @file @brief This file loads the UI for selecting a region of a video (rectangle used for effect processing) @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://w...
webdav
xml
"""Parses and produces XML documents specified by the standard.""" from __future__ import annotations from typing import Any from lxml import etree, objectify from lxml.builder import ElementMaker from lxml.etree import _Element E = ElementMaker(namespace="DAV:") class Propfind: def __init__(self, xml: bytes =...
Code
Traducir
import gettext import os import __builtin__ def _F(txt): return _(txt) if txt else "" def _SP(clave): if not clave: return "" clave = clave.strip() t = _F(clave) if t == clave: li = [] for x in clave.split(" "): if x: li.append(_F(x)) ...
migrations
0349_update_survey_query_name
# Generated by Django 3.2.19 on 2023-09-12 10:35 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0348_alter_datawarehousetable_format"), ] operations = [ migrations.AlterField( mode...
config-integrations
slack_channel
# Main enabled = True title = "Slack Channel" slug = "slack_channel" short_description = None description = None is_displayed_on_web = False is_featured = False is_able_to_autoresolve = False is_demo_alert_enabled = False description = None # Default templates slack_title = """\ {% if source_link -%} *<{{ source_link...
property
property
import json from enum import Enum from typing import Any, Dict, List, Literal, Optional, Tuple, Union, cast from posthog.constants import PropertyOperatorType from posthog.models.filters.mixins.utils import cached_property from posthog.models.filters.utils import GroupTypeIndex, validate_group_type_index from posthog....
metadata
toc
#!/usr/bin/env python __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid at kovidgoyal.net>' import functools import glob import os import re from collections import Counter from urllib import unquote from calibre.constants import __appname__, __version__ from calibre.ebooks.BeautifulSoup import Beau...
parsers
shaarli_rss
__package__ = "archivebox.parsers" from datetime import datetime from typing import IO, Iterable from ..index.schema import Link from ..util import enforce_types, htmldecode, str_between @enforce_types def parse_shaarli_rss_export(rss_file: IO[str], **_kwargs) -> Iterable[Link]: """Parse Shaarli-specific RSS X...
PyObjCTools
TestSupport
""" Helper code for implementing unittests. This module is unsupported and is primairily used in the PyObjC testsuite. """ from __future__ import print_function import gc as _gc import os as _os import plistlib as _pl import re as _re import struct as _struct import subprocess as _subprocess import sys as _sys import...
result-storages
file_storage
#!/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 import hashlib from datetime import datetime from os.path import abs...
Post
UtilsExport
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2014 sliptonic <shopinthewoods@gmail.com> * # * Copyright (c) 2015 Dan Falck <ddfalck@gmail.com> ...
lilydoc
manual
# 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 ...
extractor
wistia
from __future__ import unicode_literals import re from ..utils import ExtractorError, float_or_none, int_or_none, try_get, unescapeHTML from .common import InfoExtractor class WistiaBaseIE(InfoExtractor): _VALID_ID_REGEX = r"(?P<id>[a-z0-9]{10})" _VALID_URL_BASE = r"https?://(?:fast\.)?wistia\.(?:net|com)/e...
radio-crawler
util
#!/usr/bin/python # Copyright 2014 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 __future__ i...
extractor
cracked
from __future__ import unicode_literals import re from ..utils import parse_iso8601, str_to_int from .common import InfoExtractor from .youtube import YoutubeIE class CrackedIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?cracked\.com/video_(?P<id>\d+)_[\da-z-]+\.html" _TESTS = [ { ...
engines
duckduckgo
# SPDX-License-Identifier: AGPL-3.0-or-later # lint: pylint """DuckDuckGo Lite """ from json import loads from lxml.html import fromstring from searx.poolrequests import get from searx.utils import ( dict_subset, eval_xpath, eval_xpath_getindex, extract_text, match_language, ) # about about = { ...
decrypters
SexuriaCom
# -*- coding: utf-8 -*- import re from ..base.decrypter import BaseDecrypter class SexuriaCom(BaseDecrypter): __name__ = "SexuriaCom" __type__ = "decrypter" __version__ = "0.15" __status__ = "testing" __pattern__ = r"http://(?:www\.)?sexuria\.com/(v1/)?(Pornos_Kostenlos_.+?_(\d+)\.html|dl_links_...
gtk3
aboutdialog
# # Copyright (C) 2007 Marcos Mobley ('markybob') <markybob@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # from datetime impor...
tools
disk_usage
from __future__ import absolute_import import os from threading import Event, Lock, Thread from sunflower.plugin_base.monitor import MonitorSignals class DiskUsage: """Dedicated object for counting disk usage for specified directories.""" def __init__(self, application): self._stop_events = {} ...
legecy-translators
objects
""" This module removes all objects/arrays from JS source code and replace them with LVALS. Also it has s function translating removed object/array to python code. Use this module just after removing constants. Later move on to removing functions""" OBJECT_LVAL = 'PyJsLvalObject%d_' ARRAY_LVAL = 'PyJsLvalArray%d_' imp...
plugins
cnews
""" $description French free-to-air news channel, providing 24-hour national and global news coverage. $url cnews.fr $type live, vod """ import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate @pluginmatcher( re.compile( r"https?://(?:www\.)?cnews\.fr", ...
draftviewproviders
view_facebinder
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
rtorrent
peer
# Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.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, modify, ...
network
udp
""" UDP protocol handler """ import logging import socket import time import protocol import state from bmproto import BMProto from constants import MAX_TIME_OFFSET from node import Peer from objectracker import ObjectTracker from queues import receiveDataQueue logger = logging.getLogger("default") class UDPSocket(...
Http
CloudClusterResponse
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import List, Optional from ..BaseModel import BaseModel class CloudClusterResponse(BaseModel): """Class representing a cloud connected cluster.""" def __init__( self, cluster_id: str, ...
extractor
srmediathek
# coding: utf-8 from __future__ import unicode_literals from ..utils import ExtractorError, get_element_by_attribute from .ard import ARDMediathekBaseIE class SRMediathekIE(ARDMediathekBaseIE): IE_NAME = "sr:mediathek" IE_DESC = "Saarländischer Rundfunk" _VALID_URL = ( r"https?://sr-mediathek(?:\...
downloaders
KrakenfilesCom
# -*- coding: utf-8 -*- import json import re import pycurl from ..base.simple_downloader import SimpleDownloader class KrakenfilesCom(SimpleDownloader): __name__ = "KrakenfilesCom" __type__ = "downloader" __version__ = "0.03" __status__ = "testing" __pattern__ = r"https?://(?:www\.)?krakenfil...
migrations
0019_normalization_report
from django.db import migrations def data_migration(apps, schema_editor): MicroServiceChainLink = apps.get_model("main", "MicroServiceChainLink") MicroServiceChainLinkExitCode = apps.get_model( "main", "MicroServiceChainLinkExitCode" ) TaskConfig = apps.get_model("main", "TaskConfig") Stan...
modules
mod_stdinconsole
# MusicPlayer, https://github.com/albertz/music-player # Copyright (c) 2012, Albert Zeyer, www.az2000.de # All rights reserved. # This code is under the 2-clause BSD license, see License.txt in the root directory of this project. import os import sys from Events import OnRequestQueue from utils import * stdinQueue =...
util
SafeRe
import re class UnsafePatternError(Exception): pass cached_patterns = {} def isSafePattern(pattern): if len(pattern) > 255: raise UnsafePatternError( "Pattern too long: %s characters in %s" % (len(pattern), pattern) ) unsafe_pattern_match = re.search( r"[^\.][\*\{\...
gui
copySelectDialog
# ============================================================================= # Copyright (C) 2010 Lucas Thode # # 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 v...
context
transform
# -*- 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....
VersionUpgrade52to53
VersionUpgrade52to53
# Copyright (c) 2023 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. import configparser import io from typing import List, Tuple from UM.VersionUpgrade import VersionUpgrade _REMOVED_SETTINGS = { "limit_support_retractions", "material_flow_dependent_temperature", } _RENAMED_PROFILES =...
app
test_dependency_installer
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022 FreeCAD Project Association * # * ...
sentry-reporter
sentry_tools
""" This a collection of tools for SentryReporter and SentryScrubber aimed to simplify work with several data structures. """ import re from dataclasses import dataclass from typing import Optional from faker import Faker # Find an exception in the string like: "OverflowError: bind(): port must be 0-65535" _re_search...
pykakasi
k2a
# -*- coding: utf-8 -*- # k2a.py # # Copyright 2011 Hiroshi Miura <miurahr@linux.com> # # Original copyright: # * KAKASI (Kanji Kana Simple inversion program) # * $Id: jj2.c,v 1.7 2001-04-12 05:57:34 rug Exp $ # * Copyright (C) 1992 # * Hironobu Takahashi (takahasi@tiny.or.jp) # * # * This program is free software; yo...
extractor
gameinformer
# coding: utf-8 from __future__ import unicode_literals from ..utils import clean_html, get_element_by_class, get_element_by_id from .brightcove import BrightcoveNewIE from .common import InfoExtractor class GameInformerIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?gameinformer\.com/(?:[^/]+/)*(?P<id>[^.?...
extractor
rbmaradio
from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import clean_html, int_or_none, unified_timestamp, update_url_query from .common import InfoExtractor class RBMARadioIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?(?:rbmaradio|redbullradio)\.com/shows/(?P<show_...
meshes
mesh_canticcx_tria6
def create_nodes(femmesh): # nodes femmesh.addNode(0.0, 500.0, 0.0, 1) femmesh.addNode(0.0, 500.00000000000324, 1000.0, 2) femmesh.addNode(8000.0, 500.0, 0.0, 3) femmesh.addNode(8000.0, 500.00000000000324, 1000.0, 4) femmesh.addNode(0.0, 500.0000000000001, 500.0, 5) femmesh.addNode(0.0, 500....
PyObjCTest
test_bundleVariables
from __future__ import absolute_import, unicode_literals import objc from PyObjCTools.TestSupport import * from . import fnd as Foundation class TestBundleVariables(TestCase): def setUp(self): self.bundle = Foundation.NSBundle.bundleForClass_(Foundation.NSBundle) def testStrings(self): d = ...
hogql
hogql
from typing import Dict, Literal, Optional, cast from posthog.hogql import ast from posthog.hogql.context import HogQLContext from posthog.hogql.database.database import create_hogql_database from posthog.hogql.errors import ( HogQLException, NotImplementedException, SyntaxException, ) from posthog.hogql.p...
pdu
qa_tags_to_pdu
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018-2021 National Technology & Engineering Solutions of Sandia, LLC # (NTESS). Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government # retains certain rights in this software. # # SPDX-License-Identifier: GPL-3.0-or-later # import time im...
extractor
bandcamp
# coding: utf-8 from __future__ import unicode_literals import random import re import time from ..compat import compat_str from ..utils import ( KNOWN_EXTENSIONS, ExtractorError, float_or_none, int_or_none, parse_filesize, str_or_none, try_get, unified_strdate, unified_timestamp, ...
extractor
playtvak
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_urllib_parse_urlencode, compat_urlparse from ..utils import ExtractorError, int_or_none, parse_iso8601, qualities from .common import InfoExtractor class PlaytvakIE(InfoExtractor): IE_DESC = "Playtvak.cz, iDNES.cz and Lidovky.cz"...
SketcherTests
TestSketcherSolver
# ************************************************************************** # Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * # This file is part of the FreeCAD CAx development system. * # ...
PyObjCTest
test_specialtypecodes_methdef
""" Test handling of the private typecodes: _C_NSBOOL, _C_CHAR_AS_INT, _C_CHAR_AS_TEXT and _C_UNICHAR These typecodes don't actually exists in the ObjC runtime but are private to PyObjC. We use these to simplify the bridge code while at the same time getting a higher fidelity bridge. These tests ensure that priva...
Code
TrListas
import collections def categoria(key): return { "FUTUROPRINCIPIANTE": _("Future beginner"), "PRINCIPIANTE": _("Beginner"), "AFICIONADO": _("Amateur"), "CANDIDATOMAESTRO": _("Candidate Master"), "MAESTRO": _("Master"), "CANDIDATOGRANMAESTRO": _("International Master"...
papers
utils
# -*- 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...
CTFd
challenges
from CTFd.constants.config import ChallengeVisibilityTypes, Configs from CTFd.utils.config import is_teams_mode from CTFd.utils.dates import ctf_ended, ctf_paused, ctf_started from CTFd.utils.decorators import ( during_ctf_time_only, require_complete_profile, require_verified_emails, ) from CTFd.utils.decor...
plot-tools
plot_data
# # Copyright 2007,2008,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ Utility to help plotting data from files. """ from argparse import ArgumentParser import numpy try: from pylab import ( Button, connect, dr...
extractor
sina
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ( ExtractorError, HEADRequest, clean_html, get_element_by_attribute, int_or_none, qualities, update_url_query, ) from .common import InfoExtractor class SinaIE(InfoExtractor): _VALID_URL = r"""(?x)h...
r2
commands
# 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, ...
OpenSCAD
Init
# *************************************************************************** # * Copyright (c) 2001,2002 Juergen Riegel <juergen.riegel@web.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
bleachbit
GUI
#!/usr/bin/python3 # vim: ts=4:sw=4:expandtab # BleachBit # Copyright (C) 2008-2023 Andrew Ziem # https://www.bleachbit.org # # 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...
datastore
blueprint
# encoding: utf-8 from __future__ import annotations from itertools import zip_longest from typing import Any, Optional, cast import ckan.lib.navl.dictization_functions as dict_fns from ckan.logic import parse_params, tuplize_dict from ckan.plugins.toolkit import ( NotAuthorized, ObjectNotFound, _, ab...
docs
conf
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # hangups documentation build configuration file, created by # sphinx-quickstart on Tue Sep 30 19:42:56 2014. # # 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 # au...
queries
actor_base_query
import uuid from datetime import datetime, timedelta from typing import ( Any, Dict, List, Literal, Optional, Set, Tuple, TypedDict, Union, cast, ) from django.db.models import OuterRef, Subquery from django.db.models.query import Prefetch, QuerySet from posthog.constants import...
baseclass
scan_screen
# pylint: disable=no-member, too-many-arguments, too-few-public-methods # pylint: disable=no-name-in-module, unused-argument, arguments-differ """ QR code Scan Screen used in message composer to get recipient address """ import logging import os import cv2 from kivy.clock import Clock from kivy.lang import Builder ...
plugins
currency_accounts
"""An implementation of currency accounts. This is an automatic implementation of the method described here: https://www.mathstat.dal.ca/~selinger/accounting/tutorial.html You enable it just like this: plugin "beancount.plugins.currency_accounts" "Equity:CurrencyAccounts" Accounts will be automatically created ...
extractor
glide
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class GlideIE(InfoExtractor): IE_DESC = "Glide mobile video messages (glide.me)" _VALID_URL = r"https?://share\.glide\.me/(?P<id>[A-Za-z0-9\-=_+]+)" _TEST = { "url": "http://share.glide.me/UZF8zlmuQbe4mr+7dC...
examples
berawgn
#!/usr/bin/env python # # Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ BER simulation for QPSK signals, compare to theoretical values. Change the N_BITS value to simulate more bits per Eb/N0 value, thus allowing to check for...
extractor
twitch
# coding: utf-8 from __future__ import unicode_literals import collections import itertools import json import random import re from ..compat import ( compat_parse_qs, compat_str, compat_urllib_parse_urlencode, compat_urllib_parse_urlparse, compat_urlparse, ) from ..utils import ( ExtractorErr...
beets
art
# 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, ...