section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
draftguitools
gui_snapper
# *************************************************************************** # * Copyright (c) 2011 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
natsort
_main_
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # Std. lib imports. import sys from natsort._version import __version__ from natsort.compat.py23 import py23_str # Local imports. from natsort.natsort import natsorted, ns from natsort.utils import _regex_choos...
views
cloud_heartbeat
from apps.api.permissions import RBACPermission from apps.auth_token.auth import PluginAuthentication from apps.oss_installation.cloud_heartbeat import ( get_heartbeat_link, setup_heartbeat_integration, ) from apps.oss_installation.models import CloudConnector, CloudHeartbeat from rest_framework import status f...
gui
vector
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ...
models
slack_message
import logging import time import typing import uuid from apps.slack.client import SlackClient from apps.slack.errors import ( SlackAPIChannelArchivedError, SlackAPIError, SlackAPIFetchMembersFailedError, SlackAPIMethodNotSupportedForChannelTypeError, SlackAPITokenError, ) from django.db import mod...
api
server
# neubot/api/server.py # # 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 ...
gstbe
plugins
# Copyright 2011 Christoph Reiter # 2014 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...
radio-crawler
crawler_bing
#!/usr/bin/env python2 # Copyright 2011,2014 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. from __...
gtk3
details_tab
# # Copyright (C) 2008 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. # import logging from xml.sax.sa...
term2048
setup
# -*- coding: UTF-8 -*- # http://stackoverflow.com/a/7071358/735926 import re import sys from distutils.core import setup from os.path import dirname import setuptools VERSIONFILE = "term2048/__init__.py" verstrline = open(VERSIONFILE, "rt").read() VSRE = r'^__version__\s+=\s+[\'"]([^\'"]+)[\'"]' mo = re.search(VSRE...
schema
events
from typing import Dict from posthog.hogql.database.models import ( DateTimeDatabaseField, FieldOrTable, FieldTraverser, IntegerDatabaseField, LazyJoin, StringDatabaseField, StringJSONDatabaseField, Table, VirtualTable, ) from posthog.hogql.database.schema.person_distinct_ids import...
examples
cvsd_audio_loopback
#!/usr/bin/env python # # Copyright 2007,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import audio, blocks, filter, gr, vocoder def build_graph(): sample_rate = 8000 scale_factor = 32000 tb = gr.top_block() src...
metadata
ape
# Copyright (C) 2008-2010 Adam Olsen # # 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 distributed in the hope that...
portmidi
pm_ctypes
# This script embeds the PortMidi Portable MIDI library via ctypes. # It is based on Grant Yoshida's 2007 version with some updates from # Christopher Arndt from 2009 with some bugs fixed and restructured a bit. import os import platform import sys from ctypes import ( CDLL, CFUNCTYPE, POINTER, Struct...
plugins
close_tree_test
import unittest from beancount import loader from beancount.parser import cmptest, options from beancount.plugins import close_tree class TestCloseTree(cmptest.TestCase): def test_empty_entries(self): new_entries, _ = close_tree.close_tree([], options.OPTIONS_DEFAULTS.copy()) self.assertEqual([],...
soundgrain
SoundGrain
#!/usr/bin/env python # encoding: utf-8 """ Copyright 2009-2017 Olivier Belanger This file is part of SoundGrain. SoundGrain 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 (a...
requests
sessions
# -*- coding: utf-8 -*- """ requests.session ~~~~~~~~~~~~~~~~ This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). """ import os from collections import Mapping from datetime import datetime from .adapters import HTTPAdapter from .auth import _basic_auth_str...
XRayView
XRayView
# Copyright (c) 2020 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os.path from cura import XRayPass from cura.CuraApplication import CuraApplication from cura.CuraView import CuraView from cura.Scene.ConvexHullNode import ConvexHullNode from PyQt6.QtGui import QImage, QOpenGLConte...
models
ssd_mobilenet_v1_feature_extractor
# 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
sky
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import extract_attributes, smuggle_url, strip_or_none, urljoin from .common import InfoExtractor class SkyBaseIE(InfoExtractor): BRIGHTCOVE_URL_TEMPLATE = ( "http://players.brightcove.net/%s/%s_default/index.html?videoId=%s" ...
gui
preferences
import os import sys from functools import partial import invesalius.constants as const import invesalius.data.vtk_utils as vtk_utils import invesalius.gui.dialogs as dlg import invesalius.session as ses import nibabel as nb import numpy as np import wx from invesalius import inv_paths, utils from invesalius.gui.langu...
scripts
precache
# # Quru Image Server # # Document: precache.py # Date started: 09 May 2011 # By: Matt Fozard # Purpose: Pre-caches templated images by walking a directory tree # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modi...
aliceVision
CameraCalibration
__version__ = "1.0" from meshroom.core import desc class CameraCalibration(desc.AVCommandLineNode): commandLine = "aliceVision_cameraCalibration {allParams}" category = "Utils" documentation = """ """ inputs = [ desc.File( name="input", label="Input", ...
bookwyrm
suggested_users
""" store recommended follows in redis """ import logging import math from bookwyrm import models from bookwyrm.redis_store import RedisStore, r from bookwyrm.tasks import SUGGESTED_USERS, app from bookwyrm.telemetry import open_telemetry from django.db import transaction from django.db.models import Case, Count, Inte...
PathTests
TestGrblPost
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2022 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
audioinfo
constants
from mutagen.id3 import TCON GENRES = sorted(TCON.GENRES) DIRNAME = "__dirname" DIRPATH = "__dirpath" EXTENSION = "__ext" FILENAME = "__filename" FILENAME_NO_EXT = "__filename_no_ext" IMAGE_FIELD = "__image" IMAGE_MIMETYPE = "__image_mimetype" IMAGE_TYPE_FIELD = "__image_type" NUM_IMAGES = "__num_images" PARENT_DIR =...
chardet
langhungarianmodel
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
tornado
basehandler
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.basehandler ~~~~~~~~~~~~~~~~~~~~~~~~~~ Various base http handlers """ import datetime import logging import socket from urllib.parse import urlparse from tornado.gen import corou...
scripts
rml_post
# *************************************************************************** # * Copyright (c) 2015 Jon Nordby <jononor@gmail.com> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
css
cssfontfacerule
"""CSSFontFaceRule implements DOM Level 2 CSS CSSFontFaceRule. From cssutils 0.9.6 additions from CSS Fonts Module Level 3 are added http://www.w3.org/TR/css3-fonts/. """ __all__ = ["CSSFontFaceRule"] __docformat__ = "restructuredtext" __version__ = "$Id$" import xml.dom import cssrule import cssutils from cssstyled...
PathTests
TestPathUtil
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
errorreport
main
# Copyright 2017 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 os import platform import sy...
baseclass
network
# pylint: disable=unused-argument, consider-using-f-string # pylint: disable=no-name-in-module, too-few-public-methods """ Network status """ import os from kivy.clock import Clock from kivy.properties import StringProperty from kivy.uix.screenmanager import Screen from pybitmessage import state if os.environ.ge...
transforms
manglecase
""" CSS case-mangling transform. """ from __future__ import with_statement __license__ = "GPL v3" __copyright__ = "2008, Marshall T. Vandegrift <llasram@gmail.com>" from calibre.ebooks.oeb.base import CSS_MIME, XHTML, XHTML_NS, namespace from calibre.ebooks.oeb.stylizer import Stylizer from lxml import etree CASE_MA...
digital
qa_probe_density
#!/usr/bin/env python # # Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from gnuradio import blocks, digital, gr, gr_unittest class test_probe_density(gr_unittest.TestCase): def setUp(self): self.tb = gr.top_block(...
extractors
qie_video
import json import math from ..common import * from ..extractor import VideoExtractor from ..util.log import * class QieVideo(VideoExtractor): name = "QiE Video" vid_patt = r'"stream_name":"(\d+)"' title_patt = r'"title":"([^\"]+)"' cdn = "http://qietv-play.wcs.8686c.com/" ep = "http://api.qiecdn...
lib
util
import ctypes import json import math import os import platform import random import re import subprocess import sys import tempfile import time import psutil import yaml from sg_py_vendor import wavefile from sglib.constants import * from sglib.hardware.rpi import is_rpi from sglib.log import LOG from sglib.math impo...
config-integrations
legacy_grafana_alerting
# Main enabled = True title = "(Legacy) Grafana Alerting" slug = "legacy_grafana_alerting" short_description = "Why I am legacy?" is_displayed_on_web = True is_featured = False featured_tag_name = None is_able_to_autoresolve = True is_demo_alert_enabled = True based_on_alertmanager = True description = """ \ Alerts fr...
gadgets
matcher
# 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 ...
comictaggerlib
cbltransformer
"""A class to manage modifying metadata specifically for CBL/CBI""" # Copyright 2012-2014 Anthony Beville # 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...
pkg
MakeFoFiXInstaller
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire X (FoFiX) # # Copyright (C) 2009 myfingershurt ...
models
slack_usergroup
import logging import typing import requests from apps.api.permissions import RBACPermission from apps.slack.client import SlackClient from apps.slack.errors import SlackAPIError, SlackAPIPermissionDeniedError from apps.slack.models import SlackTeamIdentity from apps.user_management.models.user import User from common...
sbe
extension
from __future__ import annotations import logging import uuid from pathlib import Path from typing import TYPE_CHECKING, Callable import pkg_resources from abilian.core.util import fqcn if TYPE_CHECKING: from abilian.sbe.app import Application logger = logging.getLogger(__name__) STATIC_DIR = pkg_resources.re...
aliceVision
DepthMapFilter
__version__ = "3.0" from meshroom.core import desc class DepthMapFilter(desc.AVCommandLineNode): commandLine = "aliceVision_depthMapFiltering {allParams}" gpu = desc.Level.NORMAL size = desc.DynamicNodeSize("input") parallelization = desc.Parallelization(blockSize=10) commandLineRange = "--rangeS...
draftutils
init_tools
# *************************************************************************** # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * Copyright (c) 2021 FreeCAD Developers * # * * # * Th...
neubot
sslstream
# neubot/sslstream.py # # Copyright (c) 2010-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 Pub...
plover
steno
# Copyright (c) 2010-2011 Joshua Harlan Lifton. # See LICENSE.txt for details. """Generic stenography data models. This module contains the following class: Stroke -- A data model class that encapsulates a sequence of steno keys. """ from plover_stroke import BaseStroke class Stroke(BaseStroke): """A standa...
extractor
medaltv
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_str from ..utils import ExtractorError, float_or_none, int_or_none, str_or_none, try_get from .common import InfoExtractor class MedalTVIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?medal\.tv/clips/(?P<id>[^/?#&...
api
team
import json from functools import cached_property from typing import Any, Dict, List, Optional, Type, cast from django.core.cache import cache from django.shortcuts import get_object_or_404 from posthog.api.geoip import get_geoip_properties from posthog.api.shared import TeamBasicSerializer from posthog.constants impo...
plugin
manager
# coding:utf-8 import functools from cactus.plugin import defaults from cactus.utils.internal import getargspec class PluginManager(object): def __init__(self, site, loaders): self.site = site self.loaders = loaders self.reload() for plugin_method in defaults.DEFAULTS: ...
lib
six
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
song
song
#!/usr/bin/env python # -*- coding: utf-8 -*- ##################################################################### # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä # # 2008 myfingershurt ...
bindings
bind_oot_file
import argparse import sys import tempfile import warnings from gnuradio.bindtool import BindingGenerator parser = argparse.ArgumentParser(description="Bind a GR Out of Tree Block") parser.add_argument( "--module", type=str, help="Name of gr module containing file to bind (e.g. fft digital analog)", ) pa...
bitmessageqt
languagebox
"""Language Box Module for Locale Settings""" # pylint: disable=too-few-public-methods,bad-continuation import glob import os import paths from bmconfigparser import config from PyQt4 import QtCore, QtGui class LanguageBox(QtGui.QComboBox): """LanguageBox class for Qt UI""" languageName = { "system"...
builtinContextMenus
itemRemove
import math import gui.fitCommands as cmd import gui.mainFrame import wx from eos.saveddata.drone import Drone as EosDrone from eos.saveddata.fighter import Fighter as EosFighter from eos.saveddata.fit import Fit as EosFit from eos.saveddata.module import Module as EosModule from gui.contextMenu import ContextMenuComb...
Stages
CuraStage
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from PyQt6.QtCore import QUrl, pyqtProperty from UM.Stage import Stage # Since Cura has a few pre-defined "space claims" for the locations of certain components, we've provided some structure # to indicate this. # * The S...
PyObjCTest
test_threading
import sys import time import objc from Foundation import * from PyObjCTest.testhelper import PyObjC_TestClass4 from PyObjCTools.TestSupport import * class ThreadingTest(TestCase): def setUp(self): # Set a very small check interval, this will make it more likely # that the interpreter crashes whe...
src
bmconfigparser
""" BMConfigParser class definition and default configuration settings """ import os import shutil from datetime import datetime from threading import Event from six import string_types from six.moves import configparser try: import state except ImportError: from pybitmessage import state SafeConfigParser =...
TechDrawTools
TaskMoveView
# *************************************************************************** # * Copyright (c) 2022 Wanderer Fan <wandererfan@gmail.com> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
Marketplace
CloudApiModel
from typing import Union from cura import ApplicationMetadata from cura.UltimakerCloud import UltimakerCloudConstants class CloudApiModel: sdk_version: Union[str, int] = ApplicationMetadata.CuraSDKVersion cloud_api_version: str = UltimakerCloudConstants.CuraCloudAPIVersion cloud_api_root: str = Ultimaker...
migrations
0042_add_type_dashboarditems
# Generated by Django 3.0.5 on 2020-04-09 10:55 from django.db import migrations from posthog.constants import TREND_FILTER_TYPE_ACTIONS, TREND_FILTER_TYPE_EVENTS def update_filter_types(apps, schema_editor): DashboardItem = apps.get_model("posthog", "DashboardItem") for item in DashboardItem.objects.filter(...
simplejson
ordered_dict
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger http://code.activestate.com/recipes/576693/ """ from UserDict import DictMixin # Modified from original to support Python 2.4, see # http://code.google.com/p/simplejson/issues/detail?id=53 try: all except NameError: def all(seq): ...
plugins
tv3cat
""" $description Live TV channels and video on-demand service from CCMA, a Catalan public, state-owned broadcaster. $url ccma.cat $type live, vod $region Spain """ import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamlink.stream.hls import ...
internal
models
from mopidy.internal import validation from mopidy.models import Ref, TlTrack, fields from mopidy.models.immutable import ValidatedImmutableObject class HistoryTrack(ValidatedImmutableObject): """ A history track. Wraps a :class:`Ref` and its timestamp. :param timestamp: the timestamp :type timestamp...
plugins
eq
# -*- coding: utf-8 -*- """ This file is part of the Stargate project, Copyright Stargate 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 version 3 of the License. This program is distributed in...
extractor
defense
from __future__ import unicode_literals from .common import InfoExtractor class DefenseGouvFrIE(InfoExtractor): IE_NAME = "defense.gouv.fr" _VALID_URL = r"https?://.*?\.defense\.gouv\.fr/layout/set/ligthboxvideo/base-de-medias/webtv/(?P<id>[^/?#]*)" _TEST = { "url": "http://www.defense.gouv.fr/l...
image
image
# -*- Mode: Python; test-case-name: whipper.test.test_image_image -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (C) 2009 Thomas Vander Stichele # This file is part of whipper. # # whipper is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
polar
common
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # SPDX-License-Identifier: GPL-3.0-or-later # # import numpy as np from .helper_functions import bit_reverse_vector, is_power_of_two """ PolarCommon holds value checks and common initializer code for both Encoder and Decoder. """ class Pola...
utils
colors
# # 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. # See LICENSE for more details. # import logging import re from...
player
player
# Copyright (C) 2008-2010 Adam Olsen # Copyright (C) 2014-2015 Dustin Spicuzza # # 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. # # Th...
dialogs
dashedit_dlg
# -*- coding: utf-8 -*- # # Copyright (C) 2015 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....
web
test
"""test utilities (part of web.py) """ import os import sys import unittest import web TestCase = unittest.TestCase TestSuite = unittest.TestSuite def load_modules(names): return [__import__(name, None, None, "x") for name in names] def module_suite(module, classnames=None): """Makes a suite from a module...
module
changeSpool
import wx from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcChangeModuleSpoolCommand(wx.Command): def __init__(self, fitID, projected, position, spoolType, spoolAmount): wx.Command.__init__(self, True, "Change Module Spool") self.fitID = fitID sel...
accounts
UptoboxCom
# -*- coding: utf-8 -*- import re import time from ..base.account import BaseAccount class UptoboxCom(BaseAccount): __name__ = "UptoboxCom" __type__ = "account" __version__ = "0.29" __status__ = "testing" __description__ = """Uptobox.com account plugin""" __license__ = "GPLv3" __authors...
hosts
makeHosts
#!/usr/bin/env python # Script by gfyoung # https://github.com/gfyoung # # This Python script will generate hosts files and update the readme file. from __future__ import print_function import argparse import subprocess import sys def print_failure(msg): """ Print a failure message. Parameters ---...
lib
nymph
# 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, ...
bandwidth-accounting
bandwidth_accounting_component
from tribler.core.components.bandwidth_accounting.community.bandwidth_accounting_community import ( BandwidthAccountingCommunity, BandwidthAccountingTestnetCommunity, ) from tribler.core.components.bandwidth_accounting.db.database import BandwidthDatabase from tribler.core.components.component import Component ...
neubot
api_data
# neubot/api_data.py # # Copyright (c) 2011, 2013 # Nexa Center for Internet & Society, Politecnico di Torino (DAUIN) # and Simone Basso <bassosimone@gmail.com> # # Copyright (c) 2012 Marco Scopesi <marco.scopesi@gmail.com> # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: ...
cargo
add
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.cargo.add import CalcAddCargoCommand from gui.fitCommands.helpers import CargoInfo, InternalCommandHistory from service.market import Market class GuiAddCargoCommand(wx.Command): def __init__(self, fitID, ite...
ui
rich_help
import re import textwrap from typing import AbstractSet, Iterable, Optional, Tuple from httpie.cli.constants import SEPARATOR_GROUP_ALL_ITEMS from httpie.cli.options import Argument, ParserSpec, Qualifiers from httpie.output.ui.palette import GenericColor from rich.console import RenderableType from rich.highlighter ...
plugins
gstelement
# Copyright 2012 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. class GStreamerPlugin: """GStr...
util
files
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2021 The OctoPrint Project - Released under terms of the AGPLv3 License" import datetime import itertools import logging import os.path import re def _sfn_really_universal(name): from octoprint....
settings
ingestion
import os import structlog from posthog.settings.utils import get_from_env, get_list from posthog.utils import str_to_bool logger = structlog.get_logger(__name__) INGESTION_LAG_METRIC_TEAM_IDS = get_list(os.getenv("INGESTION_LAG_METRIC_TEAM_IDS", "")) # KEEP IN SYNC WITH plugin-server/src/config/config.ts BUFFER_CO...
PyObjCTest
test_nsmatrix
from AppKit import * from PyObjCTools.TestSupport import * class TestNSMatrix(TestCase): def testConstants(self): self.assertEqual(NSRadioModeMatrix, 0) self.assertEqual(NSHighlightModeMatrix, 1) self.assertEqual(NSListModeMatrix, 2) self.assertEqual(NSTrackModeMatrix, 3) def ...
Arch
ArchRebar
# *************************************************************************** # * Copyright (c) 2013 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
materialtools
MaterialModels
# *************************************************************************** # * Copyright (c) 2023 David Carter <dcarter@david.carter.ca> * # * * # * This file is part of FreeCAD. * # * ...
struct
base
# -*- coding: utf-8 -*- from collections.abc import Mapping, MutableMapping class Singleton(type): """A metaclass that creates a Singleton base class when called.""" _inst = {} def __call__(cls, *args, **kwargs): if cls not in cls._inst: cls._inst[cls] = super(Singleton, cls).__call...
models
event_definition
from django.contrib.postgres.fields import ArrayField from django.db import models from posthog.models.event_definition import EventDefinition class EnterpriseEventDefinition(EventDefinition): owner = models.ForeignKey( "posthog.User", null=True, on_delete=models.SET_NULL, related_...
equations
deformation_writer
# *************************************************************************** # * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
mod-dash
server_glue
# mod_dash/server_glue.py # # Copyright (c) 2010-2013 # 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 ...
executors
pool
import concurrent.futures from abc import abstractmethod from apscheduler.executors.base import BaseExecutor, run_job class BasePoolExecutor(BaseExecutor): @abstractmethod def __init__(self, pool): super(BasePoolExecutor, self).__init__() self._pool = pool def _do_submit_job(self, job, r...
feminout
writeFenicsXML
# *************************************************************************** # * Copyright (c) 2017-2023 Johannes Hartung <j.hartung@gmx.net> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
pbpb
pbpb_protos_test
"""Isolated test for proto conversion. bazel test --test_env=LEDGER=<filename.beancount> //experiments/v3/protos:expose_protos_test """ import functools import os import pprint import sys import tempfile import time import unittest from os import path from absl.testing import absltest from experiments.v3.protos_new ...
models
insight
from typing import Optional import structlog from django.contrib.postgres.fields import ArrayField from django.db import models from django.utils import timezone from django_deprecate_fields import deprecate_field from posthog.logging.timing import timed from posthog.models.dashboard import Dashboard from posthog.mode...
extractor
nuevo
# coding: utf-8 from __future__ import unicode_literals from ..utils import float_or_none, xpath_text from .common import InfoExtractor class NuevoBaseIE(InfoExtractor): def _extract_nuevo(self, config_url, video_id, headers={}): config = self._download_xml( config_url, video_id, transform_so...
extractor
audiomack
# coding: utf-8 from __future__ import unicode_literals import itertools import time from ..compat import compat_str from ..utils import ExtractorError, url_basename from .common import InfoExtractor from .soundcloud import SoundcloudIE class AudiomackIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\...
textview
plugin
# encoding: utf-8 from __future__ import annotations import logging from typing import Any import ckan.lib.datapreview as datapreview import ckan.plugins as p import ckanext.resourceproxy.plugin as proxy from ckan.common import CKANConfig, json from ckan.types import Context log = logging.getLogger(__name__) def g...
CoreGraphics
_metadata
# This file is generated by objective.metadata # # Last update: Fri Dec 7 15:14:45 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: ...
devtools
debugger
# 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: Debugger from __future__ import annotations import enum # noqa import typing from dataclasses import dataclass # n...
ui
ui_options_matching
# -*- coding: utf-8 -*- # Automatically generated - don't edit. # Use `python setup.py build_ui` to update it. from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MatchingOptionsPage(object): def setupUi(self, MatchingOptionsPage): MatchingOptionsPage.setObjectName("MatchingOptionsPage") Matchi...