section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
engines | ebay | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Ebay (Videos, Music, Files)
"""
from urllib.parse import quote
from lxml import html
from searx.engines.xpath import extract_text
# about
about = {
"website": "https://www.ebay.com",
"wikidata_id": "Q58024",
"official_api_documentation": "https://develope... |
engines | sepiasearch | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
SepiaSearch (Videos)
"""
from datetime import datetime
from json import loads
from urllib.parse import urlencode
from dateutil import parser, relativedelta
# about
about = {
"website": "https://sepiasearch.org",
"wikidata_id": None,
"official_api_document... |
neubot | raw_negotiate | # neubot/raw_negotiate.py
#
# Copyright (c) 2010-2012
# Nexa Center for Internet & Society, Politecnico di Torino (DAUIN)
# and Simone Basso <bassosimone@gmail.com>
#
# 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 ... |
extractor | gamespot | from __future__ import unicode_literals
from ..compat import compat_urllib_parse_unquote
from .once import OnceIE
class GameSpotIE(OnceIE):
_VALID_URL = r"https?://(?:www\.)?gamespot\.com/(?:video|article|review)s/(?:[^/]+/\d+-|embed/)(?P<id>\d+)"
_TESTS = [
{
"url": "http://www.gamespot.... |
UML | umllex | """The lexical analyzer for attributes and operations.
In this module some parse functions are added for attributes and
operations. The regular expressions are constructed based on a series of
"sub-patterns". This makes it easy to identify the autonomy of an
attribute/operation.
"""
import contextlib
__all__ = ["pa... |
tagsources | CDDB | # Module for retrieving CDDB v1 data from CDDB servers via HTTP
# Written 17 Nov 1999 by Ben Gertzfield <che@debian.org>
# This work is released under the GNU GPL, version 2 or later.
# Release version 1.4
# CVS ID: $Id: CDDB.py,v 1.8 2003/08/31 23:18:43 che_fox Exp $
import os
import re
import socket
import urllib.... |
QT | PantallaOpeningLine | import copy
import os
import os.path
import LCEngine4 as LCEngine
from Code import Analisis, Books, EnginesBunch, OpeningLines, Partida, Util
from Code.QT import (
Colocacion,
Columnas,
Delegados,
FormLayout,
Grid,
Iconos,
PantallaAperturas,
PantallaSavePGN,
POLAnalisis,
POLBoar... |
workflows | base | from abc import ABC, abstractmethod
from posthog.batch_exports.service import BatchExportsInputsProtocol
class PostHogWorkflow(ABC):
"""Base class for Temporal Workflows that can be executed in PostHog."""
@classmethod
def get_name(cls) -> str:
"""Get this workflow's name."""
return geta... |
gui | framewindow | # This file is part of MyPaint.
# Copyright (C) 2010-2020 by the MyPaint Development Team
# Copyright (C) 2012-2013 by Martin Renold <martinxyz@gmx.ch>
#
# 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 Foun... |
controllers | post | # 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, ... |
engine | celery | import logging
import os
import time
import celery
from celery import Celery
from celery.app.log import TaskFormatter
from celery.utils.debug import memdump, sample_mem
from celery.utils.log import get_task_logger
from django.conf import settings
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.g... |
migrations | 0051_precalculate_cohorts | # Generated by Django 3.0.5 on 2020-05-07 18:22
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0050_dashboards"),
]
operations = [
... |
imageserver | stats_manager | #
# Quru Image Server
#
# Document: stats_manager.py
# Date started: 31 Aug 2011
# By: Matt Fozard
# Purpose: Provides multi-process statistics recording services
# Requires:
# Copyright: Quru Ltd (www.quru.com)
# Licence:
#
# This program is free software: you can redistribute it and/or mo... |
Idf | Idf | # ***************************************************************************
# * Copyright (c) 2012 Milos Koutny <milos.koutny@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
queries | query_date_range | from datetime import datetime, timedelta
from functools import cached_property
from typing import Dict, Literal, Optional, Tuple
from zoneinfo import ZoneInfo
from dateutil.relativedelta import relativedelta
from django.utils import timezone
from posthog.models.filters import AnyFilter
from posthog.models.filters.base... |
draftfunctions | draftify | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 FreeCAD Developers *
# * ... |
util | copool | # Copyright 2006 Joe Wreschnig, Alexandre Passos
# 2014 Christoph Reiter
# 2016 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 Licens... |
supysonic | jukebox | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2019-2022 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
import logging
import shlex
import time
from datetime import datetime, timedelta
from random import shuffle
from su... |
SysML | diagramlabel | from gaphor.diagram.diagramlabel import diagram_label
from gaphor.SysML.sysml import Block, ConstraintBlock, Requirement, SysMLDiagram
from gaphor.UML.uml import Activity, Interaction, Package, Profile, StateMachine
@diagram_label.register(SysMLDiagram)
def sysml_diagram_label(diagram):
def element_type(el):
... |
PyObjCTest | test_metadata_py2py | """
Tests for the new-style metadata format interface.
Note: Tests for calling from python into ObjC are in test_metadata.py
TODO:
-> OutputOptional version for TestByReference
-> Testcode might need changes, C code definitely needs changes
- Add more testcases: python methods that return the wrong value
- The pytho... |
extractor | radiojavan | from __future__ import unicode_literals
import re
from ..utils import (
parse_resolution,
str_to_int,
unified_strdate,
urlencode_postdata,
urljoin,
)
from .common import InfoExtractor
class RadioJavanIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?radiojavan\.com/videos/video/(?P<id>[^/... |
apiv1 | scopes | # 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, ... |
grc | gen_rfnoc_window_block_yml | """
Copyright 2021 Ettus Research, A National Instruments Brand.
SPDX-License-Identifier: GPL-3.0-or-later
"""
import sys
MAX_NUM_CHANNELS = 16
MAIN_TMPL = """\
id: uhd_rfnoc_window
label: RFNoC Window Block
category: '[Core]/UHD/RFNoC/Blocks'
parameters:
- id: num_chans
label: Channel count
dtype: int
optio... |
extractor | archiveorg | from __future__ import unicode_literals
from ..utils import clean_html, extract_attributes, unified_strdate, unified_timestamp
from .common import InfoExtractor
class ArchiveOrgIE(InfoExtractor):
IE_NAME = "archive.org"
IE_DESC = "archive.org videos"
_VALID_URL = r"https?://(?:www\.)?archive\.org/(?:deta... |
decrypters | XFileSharingFolder | # -*- coding: utf-8 -*-
import re
from ..base.xfs_decrypter import XFSDecrypter
class XFileSharingFolder(XFSDecrypter):
__name__ = "XFileSharingFolder"
__type__ = "decrypter"
__version__ = "0.26"
__status__ = "testing"
__pattern__ = r"^unmatchable$"
__config__ = [
("enabled", "bool"... |
processors | online | # SPDX-License-Identifier: AGPL-3.0-or-later
import threading
from time import time
from urllib.parse import urlparse
import requests.exceptions
import searx.poolrequests as poolrequests
from searx import logger
from searx.engines import settings
from searx.exceptions import (
SearxEngineAccessDeniedException,
... |
scenarios | schedules | import json
import typing
import pytz
from apps.schedules.models import OnCallSchedule
from apps.slack.scenarios import scenario_step
from apps.slack.types import (
Block,
BlockActionType,
CompositionObjectOption,
EventPayload,
ModalView,
PayloadType,
ScenarioRoute,
)
from apps.slack.utils ... |
PyObjCTest | test_cgimageproperties | from PyObjCTools.TestSupport import *
from Quartz import *
try:
unicode
except NameError:
unicode = str
class TestCGImageProperties(TestCase):
def testConstants(self):
self.assertIsInstance(kCGImagePropertyTIFFDictionary, unicode)
self.assertIsInstance(kCGImagePropertyGIFDictionary, unico... |
meshes | mesh_boxes_2_vertikal_tetra10 | def create_nodes(femmesh):
# nodes
femmesh.addNode(0.0, 0.0, 10.0, 1)
femmesh.addNode(0.0, 0.0, 20.0, 2)
femmesh.addNode(0.0, 10.0, 10.0, 3)
femmesh.addNode(0.0, 10.0, 20.0, 4)
femmesh.addNode(10.0, 0.0, 10.0, 5)
femmesh.addNode(10.0, 0.0, 20.0, 6)
femmesh.addNode(10.0, 10.0, 10.0, 7)
... |
digital | qa_constellation | #!/usr/bin/env python
#
# Copyright 2011,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
import random
from cmath import exp, log, pi, sqrt
import numpy
import numpy as np
from gnuradio import blocks, digital, gr, gr_unittest
from g... |
migrations | 0022_alter_settings_language | # Generated by Django 4.0.3 on 2022-04-16 21:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("babybuddy", "0021_alter_settings_language"),
]
operations = [
migrations.AlterField(
model_name="settings",
name="lan... |
gui | profiling | # -*- coding: utf-8 -*-
# This file is part of MyPaint.
# Copyright (C) 2007-2014 by Martin Renold <martinxyz@gmx.ch>
# Copyright (C) 2015 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... |
friture | setup | # -*- coding: utf-8 -*-
from os.path import dirname, join # for README content reading
import friture # for the version number
from setuptools import setup
from setuptools.extension import Extension
# see INSTALL file for details
# to create a source package
# python setup.py sdist --formats=gztar
# to upload... |
deluge-stats | graph | #
# Copyright (C) 2009 Ian Martin <ianmartin@cantab.net>
# Copyright (C) 2008 Damien Churchill <damoxc@gmail.com>
# Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com>
# Copyright (C) 2007 Marcos Mobley <markybob@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or lat... |
jinja-templater | filters | import json
import re
from django.utils.dateparse import parse_datetime
def datetimeformat(value, format="%H:%M / %d-%m-%Y"):
try:
return value.strftime(format)
except AttributeError:
return None
def iso8601_to_time(value):
try:
return parse_datetime(value)
except (ValueErro... |
migrations | 0267_add_text_tiles | # Generated by Django 3.2.15 on 2022-10-07 11:23
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0266_add_is_system_field_to_activity_log"),
]
... |
picard | releasegroup | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2012-2013 Michael Wiencek
# Copyright (C) 2013, 2018-2020 Laurent Monin
# Copyright (C) 2014, 2017 Sophist-UK
# Copyright (C) 2017 Wieland Hoffmann
# Copyright (C) 2017-2018 Sambhav Kothari
# Copyright (C) 2018 Vishal Choudhary... |
photos | schema | import os
import django_filters
import graphene
from django.conf import settings
from django.contrib.auth import get_user_model, load_backend, login
from django.db.models import Case, IntegerField, Value, When
from django.db.models.functions import Lower
from django_filters import CharFilter, OrderingFilter
from graph... |
Scripts | kvo_debugging | #!/usr/bin/env python
"""
Experimental code, attempting to work around Apple's KVO hacks.
"""
import sys
import objc
from Foundation import *
from sets import Set
_kvoclassed = {}
def dumpClass(cls):
print "DUMP", cls
print cls.__bases__
#for k, v in cls.__dict__.items():
# print k, v
print "... |
aliceVision | ExportAnimatedCamera | __version__ = "2.0"
from meshroom.core import desc
class ExportAnimatedCamera(desc.AVCommandLineNode):
commandLine = "aliceVision_exportAnimatedCamera {allParams}"
size = desc.DynamicNodeSize("input")
category = "Export"
documentation = """
Convert cameras from an SfM scene into an animated cameras ... |
Test | TestCached | import time
from util import Cached
class CachedObject:
def __init__(self):
self.num_called_add = 0
self.num_called_multiply = 0
self.num_called_none = 0
@Cached(timeout=1)
def calcAdd(self, a, b):
self.num_called_add += 1
return a + b
@Cached(timeout=1)
... |
widgets | eq | from sglib.lib import util
from sglib.lib.translate import _
from sglib.math import clip_value, hz_to_pitch, pitch_to_hz
from sgui.sgqt import *
from sgui.util import get_font
from . import _shared
from .control import *
from .spectrum import spectrum
class eq_item(QGraphicsEllipseItem):
def __init__(self, a_eq,... |
borg | conftest | import os
from typing import Optional
import pytest
from borg.testsuite.archiver import BORG_EXES
if hasattr(pytest, "register_assert_rewrite"):
pytest.register_assert_rewrite("borg.testsuite")
import borg.cache # noqa: E402
from borg.archiver import Archiver
from borg.logger import setup_logging # noqa: E402... |
PyObjCTest | test_cfset | from CoreFoundation import *
from PyObjCTools.TestSupport import *
try:
long
except NameError:
long = int
class TestSet(TestCase):
def testTypes(self):
self.assertIsCFType(CFSetRef)
def testTypeID(self):
self.assertIsInstance(CFSetGetTypeID(), (int, long))
def testCreation(self)... |
draftguitools | gui_splines | # ***************************************************************************
# * (c) 2009 Yorik van Havre <yorik@uncreated.net> *
# * (c) 2010 Ken Cline <cline@frii.com> *
# * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * ... |
core | exception | #!/usr/bin/env python
# coding:utf-8
class MeshroomException(Exception):
"""Base class for Meshroom exceptions"""
pass
class GraphException(MeshroomException):
"""Base class for Graph exceptions"""
pass
class UnknownNodeTypeError(GraphException):
"""
Raised when asked to create a unknown... |
plover-build-utils | get_pip | #!/usr/bin/env python3
import os
import shutil
import sys
import zipfile
from .download import download
from .install_wheels import WHEELS_CACHE, install_wheels
PIP_VERSION = "21.3.1"
PIP_WHEEL_URL = "https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.... |
deluge | pluginmanagerbase | #
# Copyright (C) 2007 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
"""PluginManagerBase"""
impor... |
sequencer | audio_input | from sglib import constants
from sglib.lib import util
from sglib.lib.strings import NO_AUDIO_INPUTS_INSTRUCTIONS
from sglib.lib.translate import _
from sglib.lib.util import *
from sglib.log import LOG
from sglib.models.daw import *
from sglib.models.stargate import AudioInputTrack, AudioInputTracks
from sgui.daw impo... |
Code | GestorEverest | import copy
import time
from Code import Apertura, Everest, Gestor
from Code.Constantes import *
from Code.QT import PantallaJuicio, QTUtil2
from PyQt4 import QtCore
class GestorEverest(Gestor.Gestor):
def inicio(self, recno):
self.expedition = Everest.Expedition(self.configuracion, recno)
self.e... |
example-idatasetform | plugin_v2 | # encoding: utf-8
from __future__ import annotations
import ckan.plugins as p
import ckan.plugins.toolkit as tk
from ckan.common import CKANConfig
from ckan.types import Schema
class ExampleIDatasetFormPlugin(tk.DefaultDatasetForm, p.SingletonPlugin):
p.implements(p.IDatasetForm)
p.implements(p.IConfigurer)
... |
beetsplug | sonosupdate | # This file is part of beets.
# Copyright 2018, Tobias Sauerwein.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy... |
extractor | weibo | # coding: utf-8
from __future__ import unicode_literals
import json
import random
import re
from ..compat import compat_parse_qs, compat_str
from ..utils import js_to_json, strip_jsonp, urlencode_postdata
from .common import InfoExtractor
class WeiboIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?weibo\.co... |
team | team | import re
from functools import lru_cache
from typing import Any, Dict, List, Optional
from zoneinfo import ZoneInfo
import posthoganalytics
import pytz
from django.conf import settings
from django.contrib.postgres.fields import ArrayField
from django.core.validators import MinLengthValidator
from django.db import mod... |
migrations | 0063_update_idtools | from django.db import migrations
def data_migration_up(apps, schema_editor):
"""Use new FIDO and Siegfried commands."""
mscrd = apps.get_model("main", "MicroServiceChoiceReplacementDic")
fido_idcommand_ids = [
"0db6372b-f507-4db0-9993-e745044a69f9",
"56345ae4-08d1-42df-a2f9-9ba37689d9c3",... |
classes | info | """
@file
@brief This file contains the current version number of OpenShot, along with other global settings.
@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.o... |
src | addresses | """
Operations with addresses
"""
# pylint: disable=inconsistent-return-statements
import hashlib
import logging
from binascii import hexlify, unhexlify
from struct import pack, unpack
logger = logging.getLogger("default")
ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
def encodeBase58(num)... |
qltk | maskedbox | # Copyright 2013 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
from gi.repository import Gtk, Pang... |
widgets | sample_graph | from sglib import constants
from sglib.math import db_to_lin
from sgui.sgqt import *
from sgui.shared import AUDIO_ITEM_SCENE_HEIGHT, AUDIO_ITEM_SCENE_WIDTH
def create_sample_graph(
sample_graph,
a_for_scene=False,
a_width=None,
a_height=None,
a_audio_item=None,
):
if a_audio_item:
f_s... |
torrentlist | add_torrents_popup | #
# Copyright (C) 2011 Nick Lanham <nick@afternight.org>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import deluge.com... |
webengine | darkmode | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Get darkmode arguments to pass to Qt.
Overview of blink setting names based on the Qt version:
Qt 5.10 (UNSUPPORTED)
---------------------
First implementation, called "high contrast mode"... |
narrowband | digital_bert_rx | #!/usr/bin/env python
#
# Copyright 2008,2011,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
import sys
import threading
import time
from optparse import OptionParser
from gnuradio import blocks, digital, eng_notation, gr
from gnur... |
media | s3 | # 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, ... |
devtools | io | # DO NOT EDIT THIS FILE!
#
# This file is generated from the CDP specification. If you need to make
# changes, edit the generator and regenerate all modules.
#
# CDP version: v0.0.1156692
# CDP domain: IO
from __future__ import annotations
import enum # noqa
import typing
from dataclasses import dataclass # noqa
i... |
query | missing | # Copyright 2018 Peter Strulo
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
from gi.repository import Gtk
from quod... |
Settings | ContainerManager | # Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import os
import urllib.parse
import uuid
from typing import TYPE_CHECKING, Any, Dict, List, Union, cast
import cura.CuraApplication
from cura.Machines.ContainerTree import ContainerTree
from cura.Settings.ExtruderStack im... |
plugins | auto_accounts_test | __copyright__ = "Copyright (C) 2015-2016 Martin Blais"
__license__ = "GNU GPLv2"
import unittest
from beancount import loader
from beancount.parser import cmptest
from beancount.plugins import auto_accounts
class TestAutoInsertOpen(cmptest.TestCase):
@loader.load_doc(expect_errors=True)
def test_auto_open(... |
migrations | 0031_update_normalization_rules | """Remove normalization for preservation rules for all video files
and for some common image formats."""
from django.db import migrations
NORMALIZE_TO_MKV_FOR_PRES_COMMANDS = (
"ff6d1894-1798-4b47-9408-79200052810f",
"35334ee7-5392-4356-af48-1db7d4e95748",
"4c915b98-3a45-4185-920e-9f9121b2ad7c",
"0ec74... |
fec | extended_encoder | #!/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
#
#
from gnuradio import blocks, gr
from . import fec_python as fec
from .bitflip import read_bitlist
from .capillary_threaded_encoder import capillary_threaded_enc... |
logger | logger | import logging
import logging.config
import sys
from pathlib import Path
import yaml
LOG_CONFIG_FILENAME = "logger.yaml"
logger = logging.getLogger(__name__)
# note: this class is used by logger.yaml
class StdoutFilter(logging.Filter):
def filter(self, record):
return record.levelno < logging.ERROR
l... |
accounts | MyfastfileCom | # -*- coding: utf-8 -*-
import json
import time
from datetime import timedelta
from ..base.multi_account import MultiAccount
class MyfastfileCom(MultiAccount):
__name__ = "MyfastfileCom"
__type__ = "account"
__version__ = "0.12"
__status__ = "testing"
__config__ = [
("mh_mode", "all;list... |
completion | completionwidget | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Completion view for statusbar command section.
Defines a CompletionView which uses CompletionFiterModel and CompletionModel
subclasses to provide completions.
"""
from typing import TYPE_CH... |
frescobaldi-app | documentinfo | # 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
... |
RemovableDriveOutputDevice | OSXRemovableDrivePlugin | # Copyright (c) 2015 Ultimaker B.V.
# Copyright (c) 2013 David Braam
# Uranium is released under the terms of the LGPLv3 or higher.
import os
import plistlib
import subprocess
from . import RemovableDrivePlugin
class OSXRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin):
"""Support for removable de... |
metadata | mka | # Matroska tagger for Exaile
# Copyright (C) 2010 Johannes Sasongko <sasongko@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later vers... |
extractor | bild | # coding: utf-8
from __future__ import unicode_literals
from ..utils import int_or_none, unescapeHTML
from .common import InfoExtractor
class BildIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?bild\.de/(?:[^/]+/)+(?P<display_id>[^/]+)-(?P<id>\d+)(?:,auto=true)?\.bild\.html"
IE_DESC = "Bild.de"
_TES... |
extractor | laola1tv | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from ..utils import (
ExtractorError,
js_to_json,
unified_strdate,
update_url_query,
urlencode_postdata,
xpath_element,
xpath_text,
)
from .common import InfoExtractor
class Laola1TvEmbedIE(InfoExtractor):
... |
settings | overrides | # Imported before anything else to overwrite env vars!
import os
import sys
"""
There are several options:
1) running in pycharm
second argument is "test"
2) running pytest at the CLI
first argument is the path to pytest and ends pytest
3) running pytest using the script at /bin/tests
first ar... |
picard | tagger | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2004 Robert Kaye
# Copyright (C) 2006-2009, 2011-2014, 2017 Lukáš Lalinský
# Copyright (C) 2008 Gary van der Merwe
# Copyright (C) 2008 amckinle
# Copyright (C) 2008-2010, 2014-2015, 2018-2023 Philipp Wolfer
# Copyright (C) 200... |
SCL | SCLBase | # Copyright (c) 2011, Thomas Paviot (tpaviot@gmail.com)
# All rights reserved.
# This file is part of the StepClassLibrary (SCL).
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source code mus... |
migrations | 0102_remove_connector_local | # Generated by Django 3.2.5 on 2021-09-30 17:46
from bookwyrm.settings import DOMAIN
from django.db import migrations
def remove_self_connector(app_registry, schema_editor):
"""set the new physical format field based on existing format data"""
db_alias = schema_editor.connection.alias
app_registry.get_mo... |
lib | authenticator | # encoding: utf-8
import logging
from typing import Any, Mapping, Optional
import ckan.plugins as plugins
from ckan.model import User
from . import signals
log = logging.getLogger(__name__)
def default_authenticate(identity: "Mapping[str, Any]") -> Optional["User"]:
if not ("login" in identity and "password" ... |
neubot | log | #!/usr/bin/env python
#
# Copyright (c) 2010-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 Pub... |
profiling | run | """
Run the HTTPie benchmark suite with multiple environments.
This script is configured in a way that, it will create
two (or more) isolated environments and compare the *last
commit* of this repository with it's master.
> If you didn't commit yet, it won't be showing results.
You can also pass --fresh, which would... |
parts | plgtabs | # -*- coding: utf-8 -*-
#
# Copyright (C) 2018 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.... |
app-metrics | historical_exports | import json
from datetime import timedelta
from typing import Dict, Optional
from zoneinfo import ZoneInfo
from posthog.models.activity_logging.activity_log import ActivityLog
from posthog.models.plugin import PluginStorage
from posthog.models.team.team import Team
from posthog.queries.app_metrics.app_metrics import (... |
FilteringController | FilteringArrayController | #
# FilteringArrayController.py
# FilteringController
#
# Converted by u.fiedler on 05.02.05.
#
# The original version was written in Objective-C by Malcolm Crawford
# at http://homepage.mac.com/mmalc/CocoaExamples/controllers.html
from AppKit import NSArrayController
from Foundation import *
class FilteringArr... |
lector | widgets | # 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... |
models | feature_map_generators | # 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... |
equations | elasticity | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> *
# * *
# * Th... |
src | binstruct | # binstruct - binary structure serialization
# ------------------------------------------
# https://github.com/albertz/binstruct/,
# Copyright (c) 2012, Albert Zeyer, www.az2000.de
# All rights reserved.
# file created 2012-06-10
# Redistribution and use in source and binary forms, with or without
# modification, a... |
data | slice_ | # --------------------------------------------------------------------------
# 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... |
engines | semantic_scholar | # SPDX-License-Identifier: AGPL-3.0-or-later
# lint: pylint
"""Semantic Scholar (Science)
"""
from datetime import datetime
from json import dumps, loads
about = {
"website": "https://www.semanticscholar.org/",
"wikidata_id": "Q22908627",
"official_api_documentation": "https://api.semanticscholar.org/",
... |
grammar | HogQLLexer | # Generated from HogQLLexer.g4 by ANTLR 4.13.0
import sys
from io import StringIO
from antlr4 import *
if sys.version_info[1] > 5:
from typing import TextIO
else:
from typing.io import TextIO
def serializedATN():
return [
4,0,242,2222,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,
5... |
utils | config_util_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... |
migrations | 0003_publisher_conditions_as_text | # Generated by Django 2.1.7 on 2019-02-20 06:27
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("publishers", "0002_update_aliases"),
]
operations = [
migrations.AlterField(
model_name="journal... |
plugins | close_tree | """This plugin inserts close directives for all of an account's descendants when
an account is closed. Unopened parent accounts can also be closed. Any
explicitly specified close is left untouched.
For example, given this::
2017-11-10 open Assets:Brokerage:AAPL
2017-11-10 open Assets:Brokerage:ORNG
2018-1... |
util | matcher | # Copyright 2021 Joschua Gandert
#
# 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 difflib import SequenceMatcher
... |
macosx | globalmenu | # 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
... |
security | sanitize | from pybluemonday import UGCPolicy
# Copied from lxml:
# https://github.com/lxml/lxml/blob/e986a9cb5d54827c59aefa8803bc90954d67221e/src/lxml/html/defs.py#L38
# fmt: off
SAFE_ATTRS = (
'abbr', 'accept', 'accept-charset', 'accesskey', 'action', 'align',
'alt', 'axis', 'border', 'cellpadding', 'cellspacing', 'cha... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.