section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
extractor | huajiao | # coding: utf-8
from __future__ import unicode_literals
from ..utils import parse_duration, parse_iso8601
from .common import InfoExtractor
class HuajiaoIE(InfoExtractor):
IE_DESC = "花椒直播"
_VALID_URL = r"https?://(?:www\.)?huajiao\.com/l/(?P<id>[0-9]+)"
_TEST = {
"url": "http://www.huajiao.com/l/... |
parsers | tikaparser | import io
import re
from jnius import autoclass
from parsers.binarystringparser import BinaryStringParser
from parsers.contenttypeanalyzer import ContentTypeAnalyzer
from parsers.fileparserresponse import FileParserResponse
from parsers.ocrproxy import OCRProxy, OCRProxyResponse
from PIL import Image
class TikaParse... |
config | devel | __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 enum import Enum
from octoprint.schema import BaseModel
from octoprint.vendor.with_attrs_docs import with_attrs_docs
cl... |
QT | PantallaArbol | import collections
import LCEngine4 as LCEngine
from Code import ControlPosicion, Partida, TrListas, Util, VarGen
from Code.QT import (
Colocacion,
Controles,
FormLayout,
Iconos,
PantallaAnalisisParam,
QTUtil,
QTUtil2,
QTVarios,
Tablero,
)
from PyQt4 import QtCore, QtGui
SIN_VALORA... |
grc | compiler | # Copyright 2016 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
import argparse
import os
import subprocess
from gnuradio import gr
from .core import Messages
from .core.platform import Platform
def argument_parser():
parser = argparse.Argumen... |
neubot | defer | #!/usr/bin/env python
#
# Copyright (c) 2012 Simone Basso <bassosimone@gmail.com>,
# NEXA Center for Internet & Society at Politecnico di Torino
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public L... |
api | role | from typing import List, cast
from django.db import IntegrityError
from ee.models.feature_flag_role_access import FeatureFlagRoleAccess
from ee.models.organization_resource_access import OrganizationResourceAccess
from ee.models.role import Role, RoleMembership
from posthog.api.routing import StructuredViewSetMixin
fr... |
projectedDrone | add | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.drone.projectedAdd import CalcAddProjectedDroneCommand
from gui.fitCommands.helpers import DroneInfo, InternalCommandHistory
from service.fit import Fit
class GuiAddProjectedDroneCommand(wx.Command):
def __in... |
views | dataset | # encoding: utf-8
from __future__ import annotations
import inspect
import logging
from collections import OrderedDict
from functools import partial
from typing import Any, Iterable, Optional, Union
from urllib.parse import urlencode
import ckan.authz as authz
import ckan.lib.base as base
import ckan.lib.helpers as h... |
qt | sip | # pylint: disable=wildcard-import,unused-wildcard-import
"""Wrapped Qt imports for PyQt5.sip/PyQt6.sip.
All code in qutebrowser should use this module instead of importing from
PyQt/sip directly. This allows supporting both Qt 5 and Qt 6.
See machinery.py for details on how Qt wrapper selection works.
Any API expor... |
QT | PantallaGM | import os
import shutil
import urllib
import zipfile
from Code import GM, Books, Util, VarGen
from Code.QT import (
Colocacion,
Columnas,
Controles,
Grid,
Iconos,
PantallaAperturas,
QTUtil2,
QTVarios,
)
from PyQt4 import QtCore, QtGui
class WGM(QTVarios.WDialogo):
def __init__(sel... |
posthog | jwt | from datetime import datetime, timedelta, timezone
from enum import Enum
from typing import Any, Dict
import jwt
from django.conf import settings
class PosthogJwtAudience(Enum):
UNSUBSCRIBE = "posthog:unsubscribe"
EXPORTED_ASSET = "posthog:exported_asset"
IMPERSONATED_USER = "posthog:impersonted_user" #... |
utils | pager_test | """Tests for pager code.
"""
__copyright__ = "Copyright (C) 2014-2016 Martin Blais"
__license__ = "GNU GPLv2"
import unittest
from beancount.utils import pager, test_utils
class TestPager(unittest.TestCase):
def test_pager_nothreshold(self):
with test_utils.capture() as stdout:
with pager.C... |
gui | compatconfig | # -*- coding: utf-8 -*-
# This file is part of MyPaint.
# Copyright (C) 2019 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 License, or... |
extractor | lifenews | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_str, compat_urlparse
from ..utils import (
ExtractorError,
determine_ext,
int_or_none,
parse_iso8601,
remove_end,
)
from .common import InfoExtractor
class LifeNewsIE(InfoExtractor):
IE_NAME = "life... |
downloaders | KingfilesNet | # -*- coding: utf-8 -*-
import re
from ..anticaptchas.SolveMedia import SolveMedia
from ..base.simple_downloader import SimpleDownloader
class KingfilesNet(SimpleDownloader):
__name__ = "KingfilesNet"
__type__ = "downloader"
__version__ = "0.13"
__status__ = "testing"
__pattern__ = r"http://(?:w... |
windows | export | """
@file
@brief This file loads the Video Export dialog (i.e where is all preferences)
@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-... |
transformer | html | import contextlib
import functools
import logging
import sys
import six
logger = logging.getLogger(__name__)
class SoupOps:
def __init__(self, selector=None, select_all=False):
self.selector = selector
self.select_all = select_all
def tag_selector(self, html):
with soup(html) as doc... |
gpodder | dbusproxy | # -*- 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... |
downloaders | SimplyPremiumCom | # -*- coding: utf-8 -*-
import re
from pyload.core.utils import seconds
from ..base.multi_downloader import MultiDownloader
class SimplyPremiumCom(MultiDownloader):
__name__ = "SimplyPremiumCom"
__type__ = "downloader"
__version__ = "0.17"
__status__ = "testing"
__pattern__ = r"https?://.+simp... |
PyObjCTest | test_signatures | """
Test some basic features of signature strings.
"""
import objc
from PyObjCTools.TestSupport import *
class PyOCTestTypeStr(TestCase):
def testSelectorSignatures(self):
self.assertIsInstance(
objc.selector(lambda x, y: 1, signature=b"ii"), objc.selector
)
self.assertIsInstan... |
fonts | preview | # 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 | telebruxelles | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
class TeleBruxellesIE(InfoExtractor):
_VALID_URL = (
r"https?://(?:www\.)?(?:telebruxelles|bx1)\.be/(?:[^/]+/)*(?P<id>[^/#?]+)"
)
_TESTS = [
{
"url": "http://bx1.be/news/que-ri... |
extractor | apa | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import determine_ext, int_or_none, url_or_none
from .common import InfoExtractor
class APAIE(InfoExtractor):
_VALID_URL = r"(?P<base_url>https?://[^/]+\.apa\.at)/embed/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12})"
... |
AppKit | _metadata | # This file is generated by objective.metadata
#
# Last update: Tue Oct 2 22:04:22 2012
import sys
import objc
if sys.maxsize > 2**32:
def sel32or64(a, b):
return b
else:
def sel32or64(a, b):
return a
if sys.byteorder == "little":
def littleOrBig(a, b):
return a
else:
... |
sk1 | appconst | # -*- 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.... |
scripts | jtech_post | # ***************************************************************************
# * Copyright (c) 2018 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
extractors | ifeng | #!/usr/bin/env python
__all__ = ["ifeng_download", "ifeng_download_by_id"]
from ..common import *
def ifeng_download_by_id(id, title=None, output_dir=".", merge=True, info_only=False):
assert r1(r"([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})", id), id
url = "http://vxml.ifengimg.com/video_... |
models | flair | # 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, ... |
draftmake | make_clone | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 FreeCAD Developers *
# * ... |
settings | test | # flake8: noqa
# This file is part of Archivematica.
#
# Copyright 2010-2018 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 ve... |
SupportEraser | SupportEraser | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import numpy
from cura.CuraApplication import CuraApplication
from cura.Operations.SetParentOperation import SetParentOperation
from cura.PickingPass import PickingPass
from cura.Scene.BuildPlateDecorator import BuildPlateD... |
draftmake | make_shape2dview | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 FreeCAD Developers *
# * ... |
mail | spam_check | class SpamCheck(object):
"""This allows you to test the content of your email for spam."""
def __init__(self, enable=None, threshold=None, post_to_url=None):
"""Create a SpamCheck to test the content of your email for spam.
:param enable: If this setting is applied.
:type enable: boole... |
blocks | qa_sample_and_hold | #!/usr/bin/env python
#
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import time
from gnuradio import blocks, gr, gr_unittest
class test_sample_and_hold(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block... |
navl | dictization_functions | # encoding: utf-8
from __future__ import annotations
import copy
import json
from typing import Any, Callable, Iterable, Optional, Sequence, Union
from ckan.common import _
from ckan.types import Context, FlattenDataDict, FlattenErrorDict, FlattenKey, Schema
class Missing(object):
def __str__(self):
rai... |
qltk | data_editors | # Copyright 2012-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 typing import Iterable
from ... |
QT | FormLayout | """
formlayout adapted to Lucas Chess
=================================
Original formlayout License Agreement (MIT License)
---------------------------------------------------
Copyright (c) 2009 Pierre Raybaut
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associate... |
midiinput | elements | """
Elements that can be inserted by MIDI events
"""
import ly.pitch
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QApplication
class Note:
LastPitch = ly.pitch.Pitch()
def __init__(self, midinote, notemapping):
# get correct note 0...11 = c...b
# and octave corresponding to octave... |
audioscrobbler | _scrobbler | """
A pure-python library to assist sending data to AudioScrobbler (the Last.fm
backend)
"""
import logging
import urllib.parse
import urllib.request
from datetime import datetime, timedelta
from hashlib import md5
from time import mktime
logger = logging.getLogger(__name__)
SESSION_ID = None
INITIAL_URL = None
POST_... |
gdist | shortcuts | # Copyright 2007-2008 Joe Wreschnig
# 2009,2012-2016 Christoph Reiter
#
# 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 right... |
plugins | wasd | """
$description Russian live-streaming social platform.
$url wasd.tv
$type live
"""
import logging
import re
from streamlink.plugin import Plugin, PluginError, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import HLSStream
log = logging.getLogger(__name__)
@pluginmatcher(
... |
loaders | file_loader | #!/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 datetime import datetime
from os import fstat
from os.path impo... |
Utils | Threading | import functools
import threading
from cura.CuraApplication import CuraApplication
#
# HACK:
#
# In project loading, when override the existing machine is selected, the stacks and containers that are currently
# active in the system will be overridden at runtime. Because the project loading is done in a different th... |
network | bucket | # -*- coding: utf-8 -*-
import time
from threading import Lock
from ..utils.struct.lock import lock
class Bucket:
MIN_RATE = 10 << 10 # 10kb minimum rate
def __init__(self):
self._rate = 0
self.token = 0
self.timestamp = time.time()
self.lock = Lock()
def __bool__(self... |
funnels | funnel_strict | from typing import List
from posthog.queries.funnels.base import ClickhouseFunnelBase
class ClickhouseFunnelStrict(ClickhouseFunnelBase):
QUERY_TYPE = "funnel_strict"
def get_query(self):
max_steps = len(self._filter.entities)
breakdown_clause = self._get_breakdown_prop()
return f"... |
sunflower | notifications | from __future__ import absolute_import
import os
import sys
try:
import gi
gi.require_version("Notify", "0.7")
from gi.repository import Notify
except:
Notify = None
from sunflower import common
class NotificationManager:
"""Notification manager provides OS specific notification
methods to... |
panel | menus | # Copyright (C) 2014 Dustin Spicuzza <dustin@virtualroadside.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, or (at your option)
# any later version.
#
# This program is... |
forum | models | """Models for the Forum.
Note: a few features are planned but not implemented yet, and are commented
out.
"""
from __future__ import annotations
from collections import Counter
from datetime import datetime
from itertools import chain
from typing import Any
from abilian.core.entities import SEARCHABLE, Entity
from a... |
plugins | query | # Copyright 2016 Ryan Dellenbaugh
# 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.
from... |
components | helpers | # 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 ... |
borg | cache | import configparser
import os
import shutil
import stat
from binascii import unhexlify
from collections import namedtuple
from time import perf_counter
from .logger import create_logger
logger = create_logger()
files_cache_logger = create_logger("borg.debug.files_cache")
from .constants import CACHE_README, FILES_C... |
core | prefetcher_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... |
PyObjCTest | test_cfmachport | """
FIXME: None of these tests actually use the MachPort
"""
import Foundation
from CoreFoundation import *
from PyObjCTools.TestSupport import *
try:
long
except NameError:
long = int
class TestMachPort(TestCase):
def testTypes(self):
self.assertIsCFType(CFMachPortRef)
def testTypeID(self):... |
Test | TestGui | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2001,2002 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system.... |
draftgeoutils | circle_inversion | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * *
# * Th... |
migrations | 0011_auto_20230329_1617 | # Generated by Django 3.2.18 on 2023-03-29 16:17
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("webhooks", "0002_auto_20230320_1604"),
("alerts", "0010_channelfilter_filtering_term_type"),
]
operations =... |
sabnzbd | newsunpack | #!/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... |
api | organization_invite | from typing import Any, Dict, cast
from posthog.api.routing import StructuredViewSetMixin
from posthog.api.shared import UserBasicSerializer
from posthog.email import is_email_available
from posthog.event_usage import report_bulk_invited, report_team_member_invited
from posthog.models import OrganizationInvite, Organi... |
chardet | mbcsgroupprober | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
base | messaging | from django.conf import settings
from django.utils.module_loading import import_string
class BaseMessagingBackend:
backend_id = "SOMEID"
label = "The Backend"
short_label = "Backend"
available_for_use = False
templater = None
template_fields = ("title", "message", "image_url")
def __init... |
blocks | dummy | # Copyright 2016 Free Software Foundation, Inc.
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
from . import Block, register_build_in
from ._build import build_params
@register_build_in
class DummyBlock(Block):
is_dummy_block = True
label = "Missing Block"
key = "_dumm... |
social-auth | backends | from urllib.parse import urljoin
from apps.auth_token.constants import SLACK_AUTH_TOKEN_NAME
from apps.auth_token.models import SlackAuthToken
from social_core.backends.slack import SlackOAuth2
from social_core.utils import handle_http_errors
# Scopes for slack user token.
# It is main purpose - retrieve user data in... |
MonitorStage | MonitorStage | # Copyright (c) 2017 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os.path
from cura.Stages.CuraStage import CuraStage
from UM.Application import Application
class MonitorStage(CuraStage):
"""Stage for monitoring a 3D printing while it's printing."""
def __init__(self, pa... |
PathTests | TestPathHelpers | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2021 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
extractor | egghead | # coding: utf-8
from __future__ import unicode_literals
from ..compat import compat_str
from ..utils import determine_ext, int_or_none, try_get, unified_timestamp, url_or_none
from .common import InfoExtractor
class EggheadBaseIE(InfoExtractor):
def _call_api(self, path, video_id, resource, fatal=True):
... |
gui | test_update_all_gui | # SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2022 FreeCAD Project Association *
# * ... |
clientScripts | trim_restructure_for_compliance | #!/usr/bin/env python
# This file is part of Archivematica.
#
# Copyright 2010-2017 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... |
models | antispam | """ Lets try NOT to sell viagra """
import operator
from functools import reduce
from bookwyrm.tasks import MISC, app
from django.apps import apps
from django.core.exceptions import PermissionDenied
from django.db import models, transaction
from django.db.models import Q
from django.utils.translation import gettext_la... |
src | class_smtpDeliver | """
SMTP client thread for delivering emails
"""
# pylint: disable=unused-variable
import smtplib
from email.header import Header
from email.mime.text import MIMEText
import queues
import state
import urlparse
from bmconfigparser import config
from network.threads import StoppableThread
SMTPDOMAIN = "bmaddr.lan"
c... |
covers | lastfm | # Copyright 2013 Simonas Kazlauskas
# 2018 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.
fr... |
gpodder | vimeo | # -*- 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... |
frescobaldi-app | lilychooser | # 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
... |
models | federated_server | """ connections to external ActivityPub servers """
from urllib.parse import urlparse
from django.apps import apps
from django.db import models
from django.utils.translation import gettext_lazy as _
from .base_model import BookWyrmModel
FederationStatus = [
("federated", _("Federated")),
("blocked", _("Block... |
cron | fields | """Fields represent CronTrigger options which map to :class:`~datetime.datetime` fields."""
from calendar import monthrange
from apscheduler.triggers.cron.expressions import (
AllExpression,
LastDayOfMonthExpression,
RangeExpression,
WeekdayPositionExpression,
WeekdayRangeExpression,
)
__all__ = ... |
cura | LayerPolygon | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Optional, cast
import numpy
from UM.Logger import Logger
from UM.Qt.Bindings.Theme import Theme
from UM.Qt.QtApplication import QtApplication
class LayerPolygon:
NoneType = 0
Inset0Type = 1
... |
mylar | sabnzbd | #!/usr/bin/python
# 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 distribute... |
migrations | 0004_twiliophonecall_twiliosms | # Generated by Django 3.2.18 on 2023-05-24 03:54
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("phone_notifications", "0001_initial"),
("twilioapp", "0003_auto_20230408_0711"),
]
operations = [
m... |
downloaders | EdiskCz | # -*- coding: utf-8 -*-
import re
from ..base.simple_downloader import SimpleDownloader
class EdiskCz(SimpleDownloader):
__name__ = "EdiskCz"
__type__ = "downloader"
__version__ = "0.28"
__status__ = "testing"
__pattern__ = (
r"http://(?:www\.)?edisk\.(cz|sk|eu)/(stahni|sk/stahni|en/down... |
dissemin | fasttestrunner | # -*- encoding: utf-8 -*-
# taken from https://www.caktusgroup.com/blog/2013/10/02/skipping-test-db-creation/
import logging
from django.test import TransactionTestCase
try:
from django.test.runner import DiscoverRunner as BaseRunner
except ImportError:
# Django < 1.6 fallback
from django.test.simple i... |
performance | sql | """https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry"""
from posthog import settings
from posthog.clickhouse.kafka_engine import (
KAFKA_COLUMNS_WITH_PARTITION,
STORAGE_POLICY,
kafka_engine,
ttl_period,
)
from posthog.clickhouse.table_engines import (
Distributed,
MergeTreeEngine... |
views | changelog_treeview | """
@file
@brief This file contains the changelog treeview, used by the about window
@author Noah Figg <eggmunkee@hotmail.com>
@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 Ed... |
queries | enterprise_cohort_query | from typing import Any, Dict, List, Tuple, cast
from posthog.constants import PropertyOperatorType
from posthog.models.cohort.util import get_count_operator
from posthog.models.filters.mixins.utils import cached_property
from posthog.models.property.property import Property, PropertyGroup
from posthog.queries.foss_coh... |
autocomplete | analyzer | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2011 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... |
femtaskpanels | task_mesh_boundarylayer | # ***************************************************************************
# * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
migrations | 0011_auto_20200813_0238 | # Generated by Django 3.1 on 2020-08-13 02:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("babybuddy", "0010_auto_20200609_0649"),
]
operations = [
migrations.AlterField(
model_name="settings",
name="language",... |
SimpleService | ServiceTest | import objc
from AppKit import *
from Foundation import *
def serviceSelector(fn):
# this is the signature of service selectors
return objc.selector(fn, signature="v@:@@o^@")
def ERROR(s):
# NSLog(u"ERROR: %s", s)
return s
class ServiceTest(NSObject):
@serviceSelector
def doOpenFileService... |
WebServicesTool | WSTConnectionWindowControllerClass | """
Instances of WSTConnectionWindowController are the controlling object
for the document windows for the Web Services Tool application.
Implements a standard toolbar.
"""
# Note about multi-threading.
# Although WST does its network stuff in a background thread, with Python 2.2
# there are still moments where the a... |
downloader | dash | from __future__ import unicode_literals
import itertools
from ..compat import compat_urllib_error
from ..utils import DownloadError, urljoin
from .fragment import FragmentFD
class DashSegmentsFD(FragmentFD):
"""
Download segments in a DASH manifest
"""
FD_NAME = "dashsegments"
def real_downloa... |
misc | earlyinit | # SPDX-FileCopyrightText: Florian Bruhin (The-Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Things which need to be done really early (e.g. before importing Qt).
At this point we can be sure we have all python 3.8 features available.
"""
try:
# Importing hunter to register its... |
plugins | indihometv | """
$description Live TV channels and video on-demand service from IndiHome TV, owned by Telkom Indonesia.
$url indihometv.com
$type live, vod
$region Indonesia
"""
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.dash import DASHStream
fr... |
PathTests | TestPathDressupHoldingTags | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
plugins | autocmd | # Autocmd Plugin
# by Jack Miller
# v1.0
# This plugin allows you to automatically do commands on canto-curses startup
# Useful for machine-specific or environment-specific configuration
# Commands should be added to this list.
# They should be single commands (i.e. no &)
cmds = []
# Examples
# Setting browser / b... |
SentryLogger | SentryLogger | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Set
from cura.CrashHandler import CrashHandler
from UM.Logger import LogOutput
try:
from sentry_sdk import add_breadcrumb
except ImportError:
pass
from typing import Optional
class SentryLogge... |
classes | logger | """
@file
@brief This file sets the default logging settings
@author Noah Figg <eggmunkee@hotmail.com>
@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.opensho... |
fingerprint | submit | # Copyright 2011,2013 Christoph Reiter
# 2016-22 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 vers... |
extractor | breakcom | from __future__ import unicode_literals
import re
from ..utils import int_or_none, url_or_none
from .common import InfoExtractor
from .youtube import YoutubeIE
class BreakIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?break\.com/video/(?P<display_id>[^/]+?)(?:-(?P<id>\d+))?(?:[/?#&]|$)"
_TESTS = [
... |
Arch | ArchSpace | # -*- coding: utf8 -*-
# ***************************************************************************
# * Copyright (c) 2013 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it an... |
extractor | nerdcubed | # coding: utf-8
from __future__ import unicode_literals
import datetime
from .common import InfoExtractor
class NerdCubedFeedIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?nerdcubed\.co\.uk/feed\.json"
_TEST = {
"url": "http://www.nerdcubed.co.uk/feed.json",
"info_dict": {
... |
scripts | cksum | #!/usr/bin/env python
#
# Copyright (c) 2011 Simone Basso <bassosimone@gmail.com>,
# NEXA Center for Internet & Society at Politecnico di Torino
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public L... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.