section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
extractor | mnet | # coding: utf-8
from __future__ import unicode_literals
from ..utils import int_or_none, parse_duration, parse_iso8601
from .common import InfoExtractor
class MnetIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?mnet\.(?:com|interest\.me)/tv/vod/(?:.*?\bclip_id=)?(?P<id>[0-9]+)"
_TESTS = [
{
... |
femexamples | mystran_plate | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
examples | pyqt_time_raster_b | #!/usr/bin/env python
#
# Copyright 2012,2013,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
from gnuradio import blocks, gr
try:
import sip
from gnuradio import qtgui
from PyQt5 import Qt, QtWidgets
except ImportError:
... |
PyObjCTest | test_nsobject_additions | import sys
import Foundation
from PyObjCTools.TestSupport import *
if sys.version_info[0] == 2:
from StringIO import StringIO
def _str(v):
return v
else:
from io import StringIO
def _str(v):
if isinstance(v, str):
return v
return v.decode("ascii")
class Theadin... |
logic | auth | # -*- coding: utf-8 -*-
from __future__ import annotations
from typing import Optional
import ckan.authz as authz
import ckan.plugins.toolkit as tk
from ckan.types import AuthResult, Context, DataDict
from ..model import Activity
def _get_activity_object(
context: Context, data_dict: Optional[DataDict] = None... |
plover-build-utils | download | #!/usr/bin/env python3
import hashlib
import os
import sys
from urllib.parse import urlsplit
from urllib.request import urlopen
DOWNLOADS_DIR = os.path.join(".cache", "downloads")
def download(url, sha1=None, filename=None, downloads_dir=DOWNLOADS_DIR):
if filename is None:
filename = os.path.basename(u... |
tagsources | example | # Copyright (C) 2008-2009 concentricpuddle
# This file is part of puddletag, a semi-good music tag editor.
# 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
#... |
doc | conf | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# OpenShot Video Editor documentation build configuration file, created by
# sphinx-quickstart on Thu Sep 22 22:32:39 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are presen... |
bup | client | from __future__ import absolute_import, print_function
import os
import re
import socket
import struct
import time
import zlib
from binascii import hexlify, unhexlify
from bup import git, ssh, vfs
from bup.compat import environ, pending_raise
from bup.helpers import (
Conn,
DemuxConn,
atomically_replaced_... |
draftviewproviders | view_array | # ***************************************************************************
# * (c) 2019 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
femexamples | ccx_cantilever_ele_tria6 | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
femexamples | equation_flow_elmer_2D | # ***************************************************************************
# * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
downloaders | FileAl | # -*- coding: utf-8 -*-
# ATTENTION: if you cannot see the interactive captcha (on firefox), make sure to activate/install X-Frame-Options Header:
# https://addons.mozilla.org/en-US/firefox/addon/ignore-x-frame-options-header/
import re
from ..base.xfs_downloader import XFSDownloader
class FileAl(XFSDownloader):
... |
decrypters | SafelinkingNet | # -*- coding: utf-8 -*-
import json
import pycurl
from pyload.core.network.http.exceptions import BadHeader
from ..anticaptchas.SolveMedia import SolveMedia
from ..base.decrypter import BaseDecrypter
class SafelinkingNet(BaseDecrypter):
__name__ = "SafelinkingNet"
__type__ = "decrypter"
__version__ = "0... |
saveddata | implant | # ===============================================================================
# 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, ... |
bitmessageqt | addressvalidator | """
Address validator module.
"""
# pylint: disable=too-many-branches,too-many-arguments
from addresses import addBMIfNotPresent, decodeAddress
from bmconfigparser import config
from PyQt4 import QtGui
from Queue import Empty
from queues import addressGeneratorQueue, apiAddressGeneratorReturnQueue
from tr import _tran... |
cherrypy | _cpwsgi_server | """WSGI server interface (see PEP 333). This adds some CP-specific bits to
the framework-agnostic wsgiserver package.
"""
import sys
import cherrypy
from cherrypy import wsgiserver
class CPWSGIServer(wsgiserver.CherryPyWSGIServer):
"""Wrapper for wsgiserver.CherryPyWSGIServer.
wsgiserver has been designed ... |
conversion | utils | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import re
from math import ceil
from calibre.ebooks.conversion.preprocess import Dehyphenator, DocAnalysis
from calibre.ut... |
Code | GestorSingularM | import time
from Code import Gestor, Partida
from Code.Constantes import *
class GestorSingularM(Gestor.Gestor):
def inicio(self, singularMoves):
self.singularMoves = singularMoves
self.pos_bloque = 0
self.tipoJuego = kJugSingularMoves
self.rivalPensando = False
self.si... |
gtkui | shownotes | # -*- 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... |
utils | mreplace | # multiple replace from dictionnary : http://code.activestate.com/recipes/81330/
__license__ = "GPL v3"
__copyright__ = "2010, sengian <sengian1 @ gmail.com>"
__docformat__ = "restructuredtext en"
import re
from UserDict import UserDict
class MReplace(UserDict):
def __init__(self, data=None, case_sensitive=True... |
Pipeline | pipeline | # import jnius_config
# jnius_config.add_options('-Xmx256m')
import base64
import gc
import hashlib
import io
import json
import os
import sys
import time
from datetime import datetime
from hashlib import sha256
import pika
from apiproxy import ApiProxy
from containerprocessors.archiveprocessor import ArchiveProcessor... |
draftfunctions | extrude | # ***************************************************************************
# * 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 | mail | """v3/mail/send response body builder"""
from .email import Email
from .header import Header
from .personalization import Personalization
class Mail(object):
"""A request to be sent with the SendGrid v3 Mail Send API (v3/mail/send).
Use get() to get the request body.
"""
def __init__(self, from_emai... |
schemas | hints | from CTFd.models import Hints, ma
from CTFd.utils import string_types
class HintSchema(ma.ModelSchema):
class Meta:
model = Hints
include_fk = True
dump_only = ("id", "type", "html")
views = {
"locked": ["id", "type", "challenge", "challenge_id", "cost"],
"unlocked": [... |
Show | TVObserver | # /***************************************************************************
# * Copyright (c) 2019 Victor Titov (DeepSOIC) <vv.titov@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
plugins | booyah | """
$description Global live-streaming and video hosting community platform designed for gaming enthusiasts.
$url booyah.live
$type live, vod
$metadata author
$metadata category
$metadata title
"""
import logging
import re
import sys
from urllib.parse import urljoin
from streamlink.plugin import Plugin, pluginmatcher... |
femexamples | material_multiple_tensionrod_twoboxes | # ***************************************************************************
# * Copyright (c) 2019 Bernd Hahnebach <bernd@bimstatik.org> *
# * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com *
# * *
# * Th... |
frescobaldi-app | document | # 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
... |
matchers | bipartite_matcher_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_cvbuffer | from PyObjCTools.TestSupport import *
from Quartz import *
try:
unicode
except NameError:
unicode = str
class TestCVBuffer(TestCase):
def testConstants(self):
self.assertIsInstance(kCVBufferPropagatedAttachmentsKey, unicode)
self.assertIsInstance(kCVBufferNonPropagatedAttachmentsKey, unic... |
frescobaldi-app | fileinfo | # 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 | integration | import hashlib
import hmac
import time
from datetime import timedelta
from typing import Dict, List, Literal
from django.db import models
from posthog.cache_utils import cache_for
from posthog.models.instance_setting import get_instance_settings
from posthog.models.user import User
from rest_framework.request import R... |
PyObjCTest | test3_dict_interface | """
Tests to ensure that NSDictionary and NSMutableDictionary conform
to the python dict interface
These tests are basicly a port of the Python 3.2 tests for dictionaries
and dictionary views.
TODO:
- Port all tests
- Do the same for python 2.x
- Do the same for sets (NSSet) and lists (NSArray)
"""
# Import some of t... |
utils | memo | """Memoization utilities.
"""
__copyright__ = "Copyright (C) 2015-2017 Martin Blais"
__license__ = "GNU GPLv2"
import datetime
import functools
import hashlib
import io
import shelve
import threading
def now():
"Indirection on datetime.datetime.now() for testing."
return datetime.datetime.now()
def memoiz... |
types | common | import enum
import typing
class PayloadType(enum.StrEnum):
INTERACTIVE_MESSAGE = "interactive_message"
SLASH_COMMAND = "slash_command"
EVENT_CALLBACK = "event_callback"
BLOCK_ACTIONS = "block_actions"
DIALOG_SUBMISSION = "dialog_submission"
VIEW_SUBMISSION = "view_submission"
MESSAGE_ACTIO... |
SimulationView | SimulationView | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os.path
import sys
from typing import TYPE_CHECKING, List, Optional, cast
import numpy
from cura.CuraApplication import CuraApplication
from cura.CuraView import CuraView
from cura.LayerPolygon import LayerPolygon ... |
frescobaldi-app | textformats | # 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
... |
archival-storage | forms | # 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 ... |
options | interface_colors | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2019-2022 Laurent Monin
# Copyright (C) 2019-2022 Philipp Wolfer
#
# 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... |
const | appdirs | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2021-2022 Laurent Monin
# Copyright (C) 2021-2022 Philipp Wolfer
#
# 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... |
borg | setup_docs | # Support code for building docs (build_usage, build_man)
import io
import os
import re
import sys
import textwrap
import time
from collections import OrderedDict
from datetime import datetime, timezone
from setuptools import Command
def long_desc_from_readme():
with open("README.rst") as fd:
long_descr... |
widgets | tabbuttonpanel | from PyQt5.QtCore import pyqtSignal
from PyQt5.QtWidgets import QWidget
from tribler.gui import gui_sentry_reporter
from tribler.gui.utilities import connect
class TabButtonPanel(QWidget):
"""
This class manages the tab button panels that can often be found above pages.
"""
clicked_tab_button = pyqtS... |
extractor | myspass | # coding: utf-8
from __future__ import unicode_literals
import re
from ..compat import compat_str
from ..utils import int_or_none, parse_duration, xpath_text
from .common import InfoExtractor
class MySpassIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?myspass\.de/([^/]+/)*(?P<id>\d+)"
_TEST = {
... |
models | ssd_inception_v3_feature_extractor_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... |
extractor | telegraaf | # coding: utf-8
from __future__ import unicode_literals
from ..utils import determine_ext, int_or_none, parse_iso8601, try_get
from .common import InfoExtractor
class TelegraafIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?telegraaf\.nl/video/(?P<id>\d+)"
_TEST = {
"url": "https://www.telegraaf... |
SurfaceTests | TestBlendCurve | # ***************************************************************************
# * *
# * Copyright (c) 2022 Werner Mayer <wmayer[at]users.sourceforge.net> *
# * *
# * Th... |
views | inbox | """ incoming activities """
import json
import logging
import re
import requests
from bookwyrm import activitypub, models
from bookwyrm.signatures import Signature
from bookwyrm.tasks import INBOX, app
from bookwyrm.utils import regex
from django.core.exceptions import BadRequest, PermissionDenied
from django.http imp... |
Crypt | CryptRsa | import base64
import hashlib
def sign(data, privatekey):
import rsa
from rsa import pkcs1
if "BEGIN RSA PRIVATE KEY" not in privatekey:
privatekey = (
"-----BEGIN RSA PRIVATE KEY-----\n%s\n-----END RSA PRIVATE KEY-----"
% privatekey
)
priv = rsa.PrivateKey.loa... |
transport | threaded_requests | """
raven.transport.threaded_requests
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from raven.transport import RequestsHTTPTransport
from raven.transport.base import AsyncTra... |
femobjects | constant_vacuumpermittivity | # ***************************************************************************
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
gamedata | alphaClones | # ===============================================================================
# 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, ... |
fetcher | loader | import logging
import entrypoints
from .base import BasePromoter
logger = logging.getLogger(__name__)
def load_promoters():
"""Return list of available promoters"""
builtins = [
RequestsPromoter,
FirefoxPromoter,
ScriptPromoter,
]
return builtins + load_extensions()
def lo... |
PyObjCTest | test_nsgraphics | from AppKit import *
from PyObjCTools.TestSupport import *
try:
unicode
except NameError:
unicode = str
try:
long
except NameError:
long = int
class TestNSGraphics(TestCase):
def testConstants(self):
self.assertEqual(NSCompositeClear, 0)
self.assertEqual(NSCompositeCopy, 1)
... |
fingerprint | analyze | # Copyright 2011,2013,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.
import multiprocessing
f... |
bookwyrm | book_search | """ using a bookwyrm instance as a source of book data """
from __future__ import annotations
import operator
from dataclasses import asdict, dataclass
from functools import reduce
from typing import Any, Literal, Optional, Union, overload
from bookwyrm import connectors, models
from bookwyrm.settings import MEDIA_FU... |
analog | qa_pll_carriertracking | #!/usr/bin/env python
#
# Copyright 2004,2007,2010-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, gr, gr_unittest
class test_pll_carriertracking(gr_unittest.TestCase):
def setUp(self):
... |
fec | qa_ber_bf | #!/usr/bin/env python
#
# Copyright 2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import copy
import numpy
from gnuradio import blocks, fec, gr, gr_unittest
class test_ber_bf(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.... |
forum | models | # -*- coding: utf-8 -*-
"""
flaskbb.forum.models
~~~~~~~~~~~~~~~~~~~~
It provides the models for the forum
:copyright: (c) 2014 by the FlaskBB Team.
:license: BSD, see LICENSE for more details.
"""
import logging
from datetime import timedelta
from flask import abort, current_app, url_for
from fl... |
PathTests | TestPathHelixGenerator | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2021 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
extractor | ard | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from ..compat import compat_etree_fromstring
from ..utils import (
ExtractorError,
determine_ext,
int_or_none,
parse_duration,
qualities,
str_or_none,
try_get,
unified_strdate,
unified_timestamp,
upda... |
draftgeoutils | circles_apollonius | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * *
# * Th... |
downloaders | ShareplaceCom | # -*- coding: utf-8 -*-
import re
import urllib.parse
from ..base.simple_downloader import SimpleDownloader
class ShareplaceCom(SimpleDownloader):
__name__ = "ShareplaceCom"
__type__ = "downloader"
__version__ = "0.19"
__status__ = "testing"
__pattern__ = r"http://(?:www\.)?shareplace\.(com|org... |
torrent-checker | torrentchecker_session | from __future__ import annotations
import logging
import random
import socket
import struct
import sys
import time
from abc import ABCMeta, abstractmethod
from asyncio import (
DatagramProtocol,
Future,
TimeoutError,
ensure_future,
get_event_loop,
)
from typing import TYPE_CHECKING, List
import as... |
frescobaldi-app | qutil | # qutil.py -- various Qt4-related utility functions
#
# 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
# of the License, or (at... |
utils | pybonjour | ################################################################################
#
# Copyright (c) 2007-2008 Christopher J. Stawarz
#
# 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 r... |
qltk | songlistcolumns | # Copyright 2005 Joe Wreschnig
# 2012 Christoph Reiter
# 2011-2022 Nick Boultbee
# 2014 Jan Path
#
# 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 th... |
printing | prn_events | # -*- coding: utf-8 -*-
#
# Copyright (C) 2016 by Ihor E. Novikov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... |
extractor | bilibili | # coding: utf-8
from __future__ import unicode_literals
import hashlib
import re
from ..compat import compat_parse_qs, compat_urlparse
from ..utils import (
ExtractorError,
float_or_none,
int_or_none,
parse_iso8601,
smuggle_url,
str_or_none,
strip_jsonp,
unified_timestamp,
unsmuggl... |
Test | Init | # ***************************************************************************
# * Copyright (c) 2001,2002 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
neubot | utils_ctl | # neubot/utils_ctl.py
#
# Copyright (c) 2011 Marco Scopesi <marco.scopesi@gmail.com>,
# Politecnico di Torino
# Copyright (c) 2011-2012 Simone Basso <bassosimone@gmail.com>,
# NEXA Center for Internet & Society at Politecnico di Torino
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free soft... |
booster | sideEffectToggleState | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.booster.sideEffectToggleState import (
CalcToggleBoosterSideEffectStateCommand,
)
from gui.fitCommands.helpers import InternalCommandHistory
from service.fit import Fit
class GuiToggleBoosterSideEffectStateCo... |
nfoview | config | # -*- coding: utf-8 -*-
# Copyright (C) 2008 Osmo Salomaa
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This pr... |
materialized-columns | analyze | import re
from collections import defaultdict
from datetime import timedelta
from typing import Dict, Generator, List, Optional, Set, Tuple
import structlog
from ee.clickhouse.materialized_columns.columns import (
DEFAULT_TABLE_COLUMN,
backfill_materialized_columns,
get_materialized_columns,
materializ... |
httpie | sessions | """
Persistent, JSON-serialized sessions.
"""
import os
import re
from http.cookiejar import Cookie
from http.cookies import SimpleCookie
from pathlib import Path
from typing import Any, Dict, List, Optional, Union
from requests.auth import AuthBase
from requests.cookies import RequestsCookieJar, remove_cookie_by_nam... |
readers | read_fb2 | # This file is a part of Lector, a Qt based ebook reader
# Copyright (C) 2017-2019 BasioMeusPuga
# 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 o... |
extractor | spiegel | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from .jwplatform import JWPlatformIE
class SpiegelIE(InfoExtractor):
_UUID_RE = r"[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}"
_VALID_URL = (
r"https?://(?:www\.)?(?:spiegel|manager-magazin)\.de(?:/[... |
modules | mod_notifications | # 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.
def macNotificationsMain():
import AppKit
import utils
from player import PlayerEventC... |
Fem | ObjectsFem | # ***************************************************************************
# * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
modes | cmdline | #
# Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com>
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
#... |
writer2 | resources | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (absolute_import, division, print_function,
unicode_literals)
__license__ = 'GPL v3'
__copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
from calibre.e... |
lib | strings | # 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, ... |
aliceVision | ExportColoredPointCloud | __version__ = "1.0"
from meshroom.core import desc
class ExportColoredPointCloud(desc.AVCommandLineNode):
commandLine = "aliceVision_exportColoredPointCloud {allParams}"
category = "Export"
documentation = """
"""
inputs = [
desc.File(
name="input",
label="Input ... |
QuickLookUI | _metadata | # This file is generated by objective.metadata
#
# Last update: Fri Jun 8 16:58:07 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:
... |
deluge | transfer | #
# Copyright (C) 2012 Bro <bro.development@gmail.com>
# Copyright (C) 2018 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENS... |
invesalius | version | # --------------------------------------------------------------------------
# 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... |
api | property_definition | import dataclasses
import json
from typing import Any, Dict, List, Optional, Type, cast
from django.db import connection
from django.db.models import Prefetch
from posthog.api.documentation import extend_schema
from posthog.api.routing import StructuredViewSetMixin
from posthog.api.tagged_item import TaggedItemSeriali... |
views | groups | from collections import defaultdict
from typing import Dict, List, cast
from django.db.models import Q
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from ee.clickhouse.queries.related_actors_query import RelatedActorsQuery
from posthog.api.documentation import extend... |
events | qlscrobbler | # QLScrobbler: an Audioscrobbler client plugin for Quod Libet.
# version 0.11
# (C) 2005-2016 by Joshua Kwan <joshk@triplehelix.org>,
# Joe Wreschnig <piman@sacredchao.net>,
# Franz Pletyz <fpletz@franz-pletz.org>,
# Nicholas J. Michalek <djphazer@gmail.com>,
# ... |
Http | CloudError | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from typing import Any, Dict, Optional
from ..BaseModel import BaseModel
class CloudError(BaseModel):
"""Class representing errors generated by the cloud servers, according to the JSON-API standard."""
def __init... |
lib | gibindings | # Copyright (C) 2018 by the MyPaint Development Team.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
"""Specifies gi... |
borg | upgrade | from struct import Struct
from .compress import ZLIB, ObfuscateSize, ZLIB_legacy
from .constants import CH_BUZHASH, REQUIRED_ITEM_KEYS
from .helpers import HardLinkManager, join_cmd
from .item import Item
from .logger import create_logger
logger = create_logger(__name__)
class UpgraderNoOp:
def __init__(self, *... |
preferences | terminal | from gi.repository import Gtk
from sunflower.plugin_base.terminal import CursorShape, TerminalType
from sunflower.widgets.settings_page import SettingsPage
class TerminalOptions(SettingsPage):
"""Terminal options extension class"""
def __init__(self, parent, application):
SettingsPage.__init__(self, ... |
Benchmark | BenchmarkPlugin | import hashlib
import io
import math
import os
import re
import sys
import time
from Config import config
from Crypt import CryptHash
from Debug import Debug
from Plugin import PluginManager
from util import helper
plugin_dir = os.path.dirname(__file__)
benchmark_key = None
@PluginManager.registerTo("UiRequest")
c... |
PyObjCTest | test_cgfont | import sys
from PyObjCTools.TestSupport import *
from Quartz.CoreGraphics import *
try:
unicode
except NameError:
unicode = str
try:
long
except NameError:
long = int
if sys.version_info[0] != 2:
def buffer(value):
if isinstance(value, bytes):
return value
return val... |
batch-exports | models | import dataclasses
import datetime as dt
import enum
import typing
from datetime import timedelta
from django.db import models
from posthog.client import sync_execute
from posthog.models.utils import UUIDModel
class BatchExportDestination(UUIDModel):
"""
A model for the destination that a PostHog BatchExport... |
legacy | revenue_data_generator | import random
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,
DashboardTile,
EventDefinition,
Insight,
Person,
PropertyDefinition,
)... |
PyObjCTest | test_object_property | from __future__ import unicode_literals
import copy
import objc
from PyObjCTest.fnd import *
from PyObjCTools.TestSupport import *
objc.registerMetaDataForSelector(
b"NSObject",
b"validateValue:forKey:error:",
dict(
arguments={
2: dict(type_modifier=objc._C_INOUT),
4: dict... |
app | test_importCSG | # ***************************************************************************
# * Copyright (c) 2021 Chris Hennes <chennes@pioneerlibrarysystem.org> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
Tux | NavigationIndicatorGui | # Navigation indicator for FreeCAD
# Copyright (C) 2016, 2017, 2018 triplus @ FreeCAD
#
#
# This library 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; either
# version 2.1 of the License, or (at your ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.