section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
tunnel-community
hidden_peer_discovery
import argparse import os import time from binascii import hexlify, unhexlify from pathlib import Path from ipv8.taskmanager import TaskManager from tribler.core.components.ipv8.ipv8_component import Ipv8Component from tribler.core.components.key.key_component import KeyComponent from tribler.core.components.restapi.r...
QT
PantallaHorses
import atexit import datetime import random import time import LCEngine4 as LCEngine from Code import ControlPosicion, Util from Code.QT import ( Colocacion, Columnas, Controles, Grid, Iconos, QTUtil2, QTVarios, Tablero, ) from Code.SQL import Base class HorsesHistorico: def __ini...
caching
utils
from datetime import datetime from typing import Any, Dict, List, Optional, Set, Tuple, Union from zoneinfo import ZoneInfo import posthoganalytics from dateutil.parser import isoparse, parser from posthog.client import sync_execute from posthog.cloud_utils import is_cloud from posthog.datetime import start_of_day, st...
style
model
import os import sys from pathlib import Path import numpy as np import tensorflow as tf from photonix.classifiers.base_model import BaseModel from photonix.photos.utils.redis import redis_connection from photonix.web.utils import logger from redis_lock import Lock GRAPH_FILE = os.path.join("style", "graph.pb") LABEL...
Code
CajonDesastre
import base64 import os import shutil import sqlite3 import cPickle import LCEngine4 as LCEngine from Code import BaseConfig, Util, VarGen def compruebaCambioCarpetas(configuracion): usrdata = configuracion.carpeta def haz(original, nueva): original = os.path.join(usrdata, original) nueva = ...
grafana-alerting-sync-manager
grafana_alerting_sync
import copy import logging from typing import TYPE_CHECKING, Optional, Tuple from apps.grafana_plugin.helpers import GrafanaAPIClient from rest_framework import status logger = logging.getLogger(__name__) if TYPE_CHECKING: from apps.alerts.models import AlertReceiveChannel from apps.user_management.models im...
saveddata
mutatorMod
# =============================================================================== # 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, ...
profiles
metaclasspropertypage
from gaphor import UML from gaphor.core import transactional from gaphor.diagram.propertypages import ( PropertyPageBase, PropertyPages, handler_blocking, new_resource_builder, unsubscribe_all_on_destroy, ) from gi.repository import Gtk new_builder = new_resource_builder("gaphor.UML.profiles") de...
portfolios
views
# # Quru Image Server # # Document: views.py # Date started: 09 Mar 2018 # By: Matt Fozard # Purpose: Portfolio access views # Requires: Flask # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it under the terms...
RemotePyInterpreter
tcpinterpreter
#! /usr/bin/env python """ start socket based minimal readline exec server """ import os import socket import sys def runsocketcode(clientfile, g): try: source = clientfile.readline().rstrip() except Exception, e: raise SystemExit if not source: raise SystemExit source = e...
Site
Site
import base64 import collections import hashlib import json import logging import os import random import re import sys import time import gevent import gevent.pool import util from Config import config from Content import ContentManager from Crypt import CryptHash from Debug import Debug from File import FileServer f...
extractor
servus
# coding: utf-8 from __future__ import unicode_literals from ..utils import ( determine_ext, float_or_none, int_or_none, unified_timestamp, url_or_none, urlencode_postdata, ) from .common import InfoExtractor class ServusIE(InfoExtractor): _VALID_URL = r"""(?x) https?:...
drawbot
setupApp
import datetime import json import os import plistlib import re import shutil import subprocess import sys import tempfile import time from distutils.core import setup from distutils.sysconfig import get_python_lib import pkg_resources import py2app from drawBot.drawBotSettings import __version__ appName = "DrawBot" ...
eos
effectHandlerHelpers
# =============================================================================== # 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, ...
ui
savewarningdialog
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2023 Bob Swift # # 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, o...
calc
fitSystemSecurity
import wx from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcChangeFitSystemSecurityCommand(wx.Command): def __init__(self, fitID, secStatus): wx.Command.__init__(self, True, "Change Fit System Security") self.fitID = fitID self.secStatus = secStat...
preferences
fontscolors
# 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 ...
ops
documents
"""Everything that relates to creating the Document directives. """ __copyright__ = "Copyright (C) 2014-2016 Martin Blais" __license__ = "GNU GPLv2" import datetime import re from collections import namedtuple from os import path from beancount.core import account, data, getters __plugins__ = ("process_documents", ...
hogql-queries
query_runner
from abc import ABC, abstractmethod from datetime import datetime from typing import Any, Dict, Generic, List, Optional, Type, TypeVar from django.conf import settings from django.core.cache import cache from posthog.clickhouse.query_tagging import tag_queries from posthog.hogql import ast from posthog.hogql.context i...
fonts
fontcommand
# 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 ...
api
billing
from typing import Any, Optional import posthoganalytics import requests import structlog from django.conf import settings from django.http import HttpResponse from django.shortcuts import redirect from ee.billing.billing_manager import BillingManager, build_billing_token from ee.models import License from ee.settings...
slack
errors
import typing from apps.slack.constants import SLACK_RATE_LIMIT_DELAY from slack_sdk.web import SlackResponse class UnexpectedResponse(typing.TypedDict): status: int headers: dict[str, typing.Any] body: str class SlackAPIError(Exception): """ Base class for Slack API errors. To add a new error ...
qtgui
auto_correlator_sink
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2020 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import math import sip from gnuradio import blocks, fft, filter, gr, qtgui from PyQt5 import QtGui from PyQt5.QtWidgets import QWidget ...
views
isbn
""" isbn search view """ from bookwyrm import book_search from bookwyrm.settings import PAGE_LENGTH from django.core.paginator import Paginator from django.http import JsonResponse from django.template.response import TemplateResponse from django.views import View from .helpers import is_api_request # pylint: disabl...
network
advanceddispatcher
""" Improved version of asyncore dispatcher """ import socket import threading import time import network.asyncore_pollchoose as asyncore import state from threads import BusyError, nonBlocking class ProcessingError(Exception): """General class for protocol parser exception, use as a base for others.""" ...
core
minibatch_sampler_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...
archivebox
system
__package__ = "archivebox" import os import shutil import signal from json import dump from pathlib import Path from subprocess import ( PIPE, CalledProcessError, CompletedProcess, Popen, TimeoutExpired, _mswindows, ) from typing import Optional, Set, Tuple, Union from crontab import CronTab ...
Settings
ExtruderManager
# Copyright (c) 2022 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union, cast import cura.CuraApplication # To get the global container stack to find the current machine. from cura.Machines.ContainerTree import ContainerTree f...
functions
cohort
from typing import List from posthog.hogql import ast from posthog.hogql.context import HogQLContext from posthog.hogql.errors import HogQLException from posthog.hogql.escape_sql import escape_clickhouse_string from posthog.hogql.parser import parse_expr def cohort_subquery(cohort_id, is_static) -> ast.Expr: if ...
statusbar
percentage
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Scroll percentage displayed in the statusbar.""" from qutebrowser.mainwindow.statusbar import textbase from qutebrowser.misc import throttle from qutebrowser.qt.core import Qt, pyqtSlot from...
core
library
from __future__ import annotations import collections import contextlib import logging import operator import urllib.parse from collections.abc import Generator, Iterable, Mapping from typing import TYPE_CHECKING, Any, Optional, Union, cast from mopidy import exceptions from mopidy.internal import deprecation, valida...
widgets
file_browser
import os import shutil from sglib.constants import USER_HOME from sglib.lib import bookmark, util from sglib.lib.translate import _ from sgui import shared as glbl_shared from sgui.sgqt import * BM_FILE_DIALOG_STRING = "Stargate Bookmarks (*.pybm4)" FILE_BROWSER_WIDGETS = [] def open_bookmarks(): for widget i...
server
processing_config
"""Processing configuration. This module lists the processing configuration fields where the user has the ability to establish predefined choices via the user interface, and handles processing config file operations. """ import abc import logging import os import shutil import storageService as storage_service from d...
clientScripts
identify_dspace_mets_files
#!/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...
core
box_list_ops
# 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...
sk1
modes
# -*- 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....
views
incidents
from apps.alerts.models import AlertGroup from apps.alerts.tasks import delete_alert_group, wipe from apps.auth_token.auth import ApiTokenAuthentication from apps.public_api.constants import VALID_DATE_FOR_DELETE_INCIDENT from apps.public_api.helpers import ( is_valid_group_creation_date, team_has_slack_token_f...
models
activitypub_mixin
""" activitypub model functionality """ import asyncio import json import logging import operator from base64 import b64encode from collections import namedtuple from functools import reduce from typing import Any, Optional from uuid import uuid4 import aiohttp from bookwyrm import activitypub from bookwyrm.models.fie...
filters
fill
#!/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 thumbor.ext.filters import _fill from thumbor.filters import Ba...
Post
Utils
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2022 Larry Woestman <LarryWoestman2@gmail.com> * # * ...
TDTest
DrawViewAnnotationTest
import unittest import FreeCAD from .TechDrawTestUtilities import createPageWithSVGTemplate class DrawViewAnnotationTest(unittest.TestCase): def setUp(self): """Creates a page""" FreeCAD.newDocument("TDAnno") FreeCAD.setActiveDocument("TDAnno") FreeCAD.ActiveDocument = FreeCAD.ge...
utils
draw
# noinspection PyPackageRequirements import wx from . import color def RenderGradientBar( windowColor, width, height, sFactor, eFactor, mFactor=None, fillRatio=2 ): if sFactor == 0 and eFactor == 0 and mFactor is None: return DrawFilledBitmap(width, height, windowColor) gStart = color.GetSuitabl...
extractor
twitter
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import ( compat_HTTPError, compat_parse_qs, compat_urllib_parse_unquote, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, dict_get, float_or_none, int_or_none, strip_or_none, tr...
transmissionrpc
torrent
# -*- coding: utf-8 -*- # Copyright (c) 2008-2013 Erik Svensson <erik.public@gmail.com> # Licensed under the MIT license. import datetime import sys from six import integer_types, iteritems, string_types, text_type from transmissionrpc.constants import IDLE_LIMIT, PRIORITY, RATIO_LIMIT from transmissionrpc.utils impo...
webdav
constants
from __future__ import annotations DAV_PROPS = [ "creationdate", "displayname", "getcontentlanguage", "getcontentlength", "getcontenttype", "getetag", "getlastmodified", "lockdiscovery", "resourcetype", "source", "supportedlock", ] # DAV level 1 # OPTIONS = 'GET, HEAD, COPY...
sabnzbd
powersup
#!/usr/bin/python3 -OO # Copyright 2007-2023 The SABnzbd-Team (sabnzbd.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 2 # of the License, or (at your option) any later ver...
lib
ip_events
from collections import Counter from r2.lib.geoip import location_by_ips, organization_by_ips from r2.lib.utils import tup from r2.models.ip import AccountsByIP, IPsByAccount def ips_by_account_id(account_id, limit=None): ips = IPsByAccount.get(account_id, column_count=limit or 1000) flattened_ips = [j for i...
http
http_request
# -*- coding: utf-8 -*- import codecs import io import mimetypes import os from itertools import chain from logging import getLogger from urllib.parse import quote, urlencode import certifi import pycurl from pyload import APPID from ...utils.check import is_mapping from ...utils.convert import to_bytes, to_str from...
mylar
webstart
#!/usr/bin/env python # -*- coding: utf-8 -*- # 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 vers...
jobstores
redis
from __future__ import absolute_import from datetime import datetime import six from apscheduler.job import Job from apscheduler.jobstores.base import BaseJobStore, ConflictingIdError, JobLookupError from apscheduler.util import datetime_to_utc_timestamp, utc_timestamp_to_datetime from pytz import utc try: impor...
api
tests
# -*- coding: utf-8 -*- from babybuddy.models import get_user_model from core import models from django.urls import reverse from django.utils import timezone from rest_framework import status from rest_framework.test import APITestCase class TestBase: class BabyBuddyAPITestCaseBase(APITestCase): fixtures ...
friture
level_data
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2021 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...
scripts
mach3_mach4_post
# *************************************************************************** # * Copyright (c) 2014 sliptonic <shopinthewoods@gmail.com> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
settings
common
# This file is part of Archivematica. # # Copyright 2010-2015 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, either version 3 of the ...
rest
debug_endpoint
import datetime import logging import sys from io import StringIO from typing import Optional import psutil from aiohttp import web from aiohttp.abc import BaseRequest from aiohttp_apispec import docs from ipv8.REST.schema import schema from marshmallow.fields import Boolean, Float, Integer, String from tribler.core.c...
engines
vimeo
# SPDX-License-Identifier: AGPL-3.0-or-later """ Wikipedia (Web """ from json import loads from urllib.parse import urlencode from dateutil import parser # about about = { "website": "https://vimeo.com/", "wikidata_id": "Q156376", "official_api_documentation": "http://developer.vimeo.com/api", "use_...
cli
common
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License" from importlib import import_module import click from werkzeug.utils import cached_property class LazyGroup(click.Group): ...
Gui
ThreadMilling
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2019 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
services
componentregistry
"""A registry for components (e.g. services) and event handling.""" from typing import Iterator, List, Tuple, Type, TypeVar from gaphor.abc import Service T = TypeVar("T", bound=Service) class ComponentLookupError(LookupError): pass class ComponentRegistry(Service): """The ComponentRegistry provides a ho...
extractor
tumblr
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import ExtractorError, int_or_none, urlencode_postdata from .common import InfoExtractor class TumblrIE(InfoExtractor): _VALID_URL = r"https?://(?P<blog_name>[^/?#&]+)\.tumblr\.com/(?:post|video)/(?P<id>[0-9]+)(?:$|[/?#])" _NETRC...
style
train
# Copyright 2015 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...
invesalius
inv_paths
# -------------------------------------------------------------------- # 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 - GPL...
PyObjCTest
test_nssharingservice
import AppKit from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSSharingService(TestCase): @min_os_level("10.8") def testConstants10_8(self): self.assertIsInstance(AppKit.NSSharingServiceNamePostOnFacebook, unicode) self.assertIsInstance(App...
Arch
Init
# *************************************************************************** # * Copyright (c) 2011 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
channels
qa_fading_model
#!/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 # # import math from gnuradio import analog, blocks, channels, gr, gr_unittest class test_fading_model(gr_unittest.TestCase): def setUp(self): se...
TLayer
ShadowOffsetView
import math import objc from Cocoa import * from Quartz import * ShadowOffsetChanged = "ShadowOffsetChanged" class ShadowOffsetView(NSView): _offset = objc.ivar(type=CGSize.__typestr__) _scale = objc.ivar(type=objc._C_FLT) def scale(self): return self._scale def setScale_(self, scale): ...
net
remote_control
#!/usr/bin/env python3 # -------------------------------------------------------------------------- # 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...
gstreamer
discoverer
#!/usr/bin/python3 # -*- coding: utf-8 -*- # # SoundConverter - GNOME application for converting between audio formats. # Copyright 2004 Lars Wirzenius # Copyright 2005-2020 Gautier Portet # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as ...
VersionUpgrade40to41
VersionUpgrade40to41
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import configparser import io import uuid from typing import Dict, List, Tuple from UM.VersionUpgrade import VersionUpgrade _renamed_quality_profiles = { "gmax15plus_pla_dual_normal": "gmax15plus_global_dual_normal", ...
dev
bloomfiltertest
""" dev/bloomfiltertest.py ====================== """ import sqlite3 from os import getenv, path from time import time from pybloom import BloomFilter as BloomFilter1 # pylint: disable=import-error from pybloomfilter import BloomFilter as BloomFilter2 # pylint: disable=import-error # Ubuntu: apt-get install pytho...
frescobaldi-app
webenginedummy
# 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 ...
aliceVision
ExportDistortion
__version__ = "1.0" from meshroom.core import desc class ExportDistortion(desc.AVCommandLineNode): commandLine = "aliceVision_exportDistortion {allParams}" category = "Export" documentation = """ Export the distortion model and parameters of cameras in a SfM scene. """ inputs = [ desc.File(...
game
Credits
#!/usr/bin/python # -*- coding: utf-8 -*- ##################################################################### # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä # # 2008 myfingershurt ...
graphs
diaperchange_intervals
# -*- coding: utf-8 -*- import plotly.graph_objs as go import plotly.offline as plotly from core.utils import duration_parts from django.db.models import Case, Count, When from django.db.models.functions import TruncDate from django.utils.translation import get_language from django.utils.translation import gettext as _...
extractor
sohu
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_str, compat_urllib_parse_urlencode from ..utils import ExtractorError, int_or_none, try_get from .common import InfoExtractor class SohuIE(InfoExtractor): _VALID_URL = ( r"https?://(?P<mytv>my\.)?tv\.sohu\.com/...
kibitzr
checker
import logging from .fetcher import fetcher_factory from .notifier import notify_factory from .transformer import transform_factory logger = logging.getLogger(__name__) class Checker: def __init__(self, conf): self.conf = conf self.fetch = fetcher_factory(conf) self.transform = transform...
models
organization_domain
import secrets from typing import Optional, Tuple import dns.resolver import structlog from django.db import models from django.utils import timezone from posthog.cloud_utils import is_cloud from posthog.constants import AvailableFeature from posthog.models import Organization from posthog.models.utils import UUIDMode...
config
configinit
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Initialization of the configuration.""" import argparse import os.path import sys from qutebrowser.api import config as configapi from qutebrowser.config import ( config, configcach...
mtcnn
mtcnn
#!/usr/bin/python3 # -*- coding: utf-8 -*- # MIT License # # Copyright (c) 2019 Iván de Paz Centeno # # 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 l...
QT
POLAnalisis
import os import LCEngine4 as LCEngine from Code import Books, ControlPosicion, DBgames, Partida from Code.QT import ( Colocacion, Columnas, Controles, Delegados, Grid, Iconos, QTUtil2, QTVarios, WBG_Summary, ) from PyQt4 import QtCore, QtGui class TabEngine(QtGui.QWidget): de...
extractors
ehow
#!/usr/bin/env python __all__ = ["ehow_download"] from ..common import * def ehow_download(url, output_dir=".", merge=True, info_only=False, **kwargs): assert re.search( r"http://www.ehow.com/video_", url ), "URL you entered is not supported" html = get_html(url) contentid = r1( r'<...
engines
wolframalpha_noapi
# SPDX-License-Identifier: AGPL-3.0-or-later """ Wolfram|Alpha (Science) """ from json import loads from time import time from urllib.parse import urlencode from searx.poolrequests import get as http_get # about about = { "website": "https://www.wolframalpha.com/", "wikidata_id": "Q207006", "official_ap...
anticaptchas
CoinHive
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from ..base.captcha_service import CaptchaService class CoinHive(CaptchaService): __name__ = "CoinHive" __type__ = "anticaptcha" __version__ = "0.01" __status__ = "testing" __description__ = "CoinHive captcha service plugin" __license__...
css
value
"""Value related classes. DOM Level 2 CSS CSSValue, CSSPrimitiveValue and CSSValueList are **no longer** supported and are replaced by these new classes. """ __all__ = ['PropertyValue', 'Value', 'ColorValue', 'DimensionValue', 'URIValue', 'CSSFunction', ...
sandbox
hellogl
#!/usr/bin/env python # -*- coding: utf-8 -*- """PyQt4 port of the opengl/hellogl example from Qt v4.x""" import math import sys from OpenGL import GL from PyQt4 import QtCore, QtGui, QtOpenGL class Window(QtGui.QWidget): def __init__(self): super(Window, self).__init__() self.glWidget = GLWid...
views
titles_listview
""" @file @brief This file contains the titles treeview, used by the title editor window @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...
plugins
editing
# Copyright 2005 Joe Wreschnig # # 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 typing import List from gi.repos...
PyObjCTest
test_nsdateformatter
from Foundation import * from PyObjCTools.TestSupport import * class TestNSDateFormatter(TestCase): def testOutput(self): formatter = NSDateFormatter.alloc().init() formatter.setDateFormat_("yyyy/mm/dd") self.assertResultIsBOOL(NSDateFormatter.getObjectValue_forString_range_error_) ...
scenarios
escalation_delivery
import typing import humanize from apps.slack.scenarios import scenario_step if typing.TYPE_CHECKING: from apps.base.models import UserNotificationPolicy from apps.user_management.models import User class EscalationDeliveryStep(scenario_step.ScenarioStep): """ used for user group and channel notific...
config
parser
# -*- coding: utf-8 -*- import os import re import shutil import time from pyload import PKGDIR from ... import exc_logger # CONFIG_VERSION __version__ = 2 class ConfigParser: """ holds and manage the configuration. current dict layout: { section : { option : { value: ...
actions
pinconnect
from gaphas.connector import Handle, Port from gaphor import UML from gaphor.diagram.connectors import Connector from gaphor.UML.actions.action import ActionItem, ValueSpecificationActionItem from gaphor.UML.actions.pin import InputPinItem, OutputPinItem, PinItem @Connector.register(ActionItem, PinItem) class ActionP...
api
shared
""" This module contains serializers that are used across other serializers for nested representations. """ from typing import Optional from posthog.models import Organization, Team, User from posthog.models.organization import OrganizationMembership from rest_framework import serializers class UserBasicSerializer(...
twilioapp
phone_provider
import logging import urllib.parse from string import digits from apps.base.models import LiveSetting from apps.base.utils import live_settings from apps.phone_notifications.exceptions import ( FailedToFinishVerification, FailedToMakeCall, FailedToSendSMS, FailedToStartVerification, ) from apps.phone_n...
db
tdb_sql
# 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
mainMenuBar
# ============================================================================= # 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 ...
widgets
editablelistview
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2019-2022 Philipp Wolfer # Copyright (C) 2020-2022 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 Softwar...
backlog
urls
# 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, either version 3 of the ...
extractor
googlesearch
from __future__ import unicode_literals import itertools import re from .common import SearchInfoExtractor class GoogleSearchIE(SearchInfoExtractor): IE_DESC = "Google Video search" _MAX_RESULTS = 1000 IE_NAME = "video.google:search" _SEARCH_KEY = "gvsearch" _TEST = { "url": "gvsearch15:...
views
rss_feed
""" serialize user's posts in rss feed """ from django.contrib.syndication.views import Feed from django.template.loader import get_template from django.utils.translation import gettext_lazy as _ from ..models import Comment, Quotation, Review from .helpers import get_user_from_username # pylint: disable=no-self-us...
devscripts
generate_aes_testdata
from __future__ import unicode_literals import codecs import os import subprocess import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.aes import aes_encrypt, key_expansion from youtube_dl.utils import intlist_to_bytes secret_msg = b"Secret message goes here" ...