section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
workflow
workflow
from __future__ import division import logging import subprocess from csv import writer from pathlib import Path import numpy as np import png from app.gpio import Gpio from app.sketch import SketchGizeh class Workflow(object): """controls execution of app""" def __init__(self, dataset, imageprocessor, cam...
canto-curses
config
# -*- coding: utf-8 -*- # Canto-curses - ncurses RSS reader # Copyright (C) 2016 Jack Miller <jack@codezen.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # The CantoCu...
ipc
wave_edit
from sglib.lib.util import bool_to_int from .abstract import AbstractIPC class WaveEditIPC(AbstractIPC): def __init__( self, transport, a_with_audio=False, a_configure_path="/stargate/wave_edit", ): AbstractIPC.__init__( self, transport, ...
draftguitools
gui_shapestrings
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * (c) 2009, 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
draftguitools
gui_setstyle
# *************************************************************************** # * Copyright (c) 2020 Yorik van Havre <yorik@uncreated.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
midiinput
widget
""" MIDI input controls """ import weakref import app import midiinput from PyQt5.QtCore import QSettings, Qt from PyQt5.QtWidgets import ( QCheckBox, QComboBox, QGridLayout, QGroupBox, QHBoxLayout, QLabel, QRadioButton, QToolButton, QVBoxLayout, QWidget, ) class Widget(QWid...
Tools
updatecrowdin
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2015 Yorik van Havre <yorik@uncreated.net> * # * Copyright (...
network
tcp_source
# # Copyright 2009,2019,2020 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later ve...
clientScripts
create_aic_mets
#!/usr/bin/env python import argparse import os import re import uuid from datetime import datetime import django from django.db import transaction from lxml import etree from lxml.builder import ElementMaker django.setup() import create_mets_v2 # archivematicaCommon import databaseFunctions import fileOperations im...
administration
views_dip_upload
from components.administration.forms_dip_upload import ( ArchivesSpaceConfigForm, AtomConfigForm, ) from django.contrib import messages from django.shortcuts import render from django.utils.translation import ugettext as _ from main.models import DashboardSetting _AS_DICTNAME = "upload-archivesspace_v0.0" _ATO...
localModule
swap
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.module.localSwap import CalcSwapLocalModuleCommand from gui.fitCommands.helpers import InternalCommandHistory class GuiSwapLocalModulesCommand(wx.Command): def __init__(self, fitID, position1, position2): ...
clientScripts
create_sips_from_trim_transfer_containers
#!/usr/bin/env python # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, ei...
avr-isp
ispBase
""" General interface for Isp based AVR programmers. The ISP AVR programmer can load firmware into AVR chips. Which are commonly used on 3D printers. Needs to be subclassed to support different programmers. Currently only the stk500v2 subclass exists. This is a python 3 conversion of the code created by David Braam...
options
releases
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006 Lukáš Lalinský # Copyright (C) 2011-2014 Michael Wiencek # Copyright (C) 2012 Frederik “Freso” S. Olesen # Copyright (C) 2013-2015, 2018-2022 Laurent Monin # Copyright (C) 2016-2017 Sambhav Kothari # Copyright (C) 2017 Suh...
plugins
stv
""" $description Live TV channels from STV, a Scottish free-to-air broadcaster. $url player.stv.tv $type live $metadata title $region United Kingdom """ import logging import re from streamlink.plugin import Plugin, PluginError, pluginmatcher from streamlink.stream.hls import HLSStream log = logging.getLogger(__name...
extractor
heise
# coding: utf-8 from __future__ import unicode_literals from ..utils import ( NO_DEFAULT, determine_ext, int_or_none, parse_iso8601, smuggle_url, xpath_text, ) from .common import InfoExtractor from .kaltura import KalturaIE from .youtube import YoutubeIE class HeiseIE(InfoExtractor): _VA...
gui
picker
# This file is part of MyPaint. # -*- coding: utf-8 -*- # Copyright (C) 2015 by Andrew Chadwick <a.t.chadwick@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 of the...
player
track_fader
# Copyright (C) 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. # # This program is distributed in the hope that...
youtube-dl
setup
#!/usr/bin/env python # coding: utf-8 from __future__ import print_function import os.path import sys import warnings try: from setuptools import Command, setup setuptools_available = True except ImportError: from distutils.core import Command, setup setuptools_available = False from distutils.spaw...
parser
booking
"""Algorithms for 'booking' inventory, that is, the process of finding a matching lot when reducing the content of an inventory. """ __copyright__ = "Copyright (C) 2015-2016 Martin Blais" __license__ = "GNU GPLv2" import collections from beancount.core import amount, data, inventory, position from beancount.core.num...
nyaa
utils
import functools import hashlib import random import string from collections import OrderedDict import flask def sha1_hash(input_bytes): """Hash given bytes with hashlib.sha1 and return the digest (as bytes)""" return hashlib.sha1(input_bytes).digest() def sorted_pathdict(input_dict): """Sorts a parsed...
gtk3
listview
# # Copyright (C) 2007, 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 del...
base
xfs_downloader
# -*- coding: utf-8 -*- import re from datetime import timedelta from urllib.parse import urljoin from pyload.core.utils import parse from pyload.core.utils.web.purge import unescape as html_unescape from ..anticaptchas.HCaptcha import HCaptcha from ..anticaptchas.ReCaptcha import ReCaptcha from ..anticaptchas.Solve...
deluge-notifications
test
# vim: sw=4 ts=4 fenc=utf-8 et # ============================================================================== # Copyright © 2009-2010 UfSoft.org - Pedro Algarvio <pedro@algarvio.me> # # License: BSD - Please view the LICENSE file for additional information. # ==========================================================...
NSIS
create_windows_installer
# Copyright (c) 2022 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. import argparse # Command line arguments parsing and help. import os import shutil import subprocess from datetime import datetime from pathlib import Path from jinja2 import Template def generate_nsi(source_path: str, dist...
browser
signalfilter
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """A filter for signals which either filters or passes them.""" import functools from qutebrowser.qt.core import QObject from qutebrowser.utils import debug, log, objreg class SignalFilter(Q...
resources
mainwindow
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'raw/main.ui' # # Created by: PyQt5 UI code generator 5.10.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWi...
PyObjCTest
test_cfbundle
import Foundation from CoreFoundation import * from PyObjCTools.TestSupport import * try: long except NameError: long = int try: unicode except NameError: unicode = str class TestCFBundle(TestCase): def testTypes(self): self.assertIsCFType(CFBundleRef) def testMainBundle(self): ...
views
slack_channels
from apps.auth_token.auth import ApiTokenAuthentication from apps.public_api.serializers.slack_channel import SlackChannelSerializer from apps.public_api.throttlers.user_throttle import UserThrottle from apps.slack.models import SlackChannel from common.api_helpers.mixins import RateLimitHeadersMixin from common.api_he...
pynocchio
utility
import os from PyQt5 import QtGui IMAGE_FILE_FORMATS = [ "." + str(ext, encoding="utf8") for ext in QtGui.QImageReader.supportedImageFormats() ] COMPACT_FILE_FORMATS = [".cbr", ".cbz", ".rar", ".zip", ".tar", ".cbt"] SUPPORTED_FILES = IMAGE_FILE_FORMATS + COMPACT_FILE_FORMATS def get_file_extension(filena...
lib
stats
# 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
ImageSegmentation
__version__ = "1.0" from meshroom.core import desc class ImageSegmentation(desc.AVCommandLineNode): commandLine = "aliceVision_imageSegmentation {allParams}" size = desc.DynamicNodeSize("input") gpu = desc.Level.INTENSIVE parallelization = desc.Parallelization(blockSize=50) commandLineRange = "--...
extractor
meipai
# coding: utf-8 from __future__ import unicode_literals from ..utils import int_or_none, parse_duration, unified_timestamp from .common import InfoExtractor class MeipaiIE(InfoExtractor): IE_DESC = "美拍" _VALID_URL = r"https?://(?:www\.)?meipai\.com/media/(?P<id>[0-9]+)" _TESTS = [ { #...
gui
polezero_plot
# Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import sys from math import cos, pi, sin import pyqtgraph as pg from numpy import delete from numpy import float_ as Float from numpy import vectorize, zeros from PyQt5 import Qt, QtCor...
dev
build_release
#!/usr/bin/env python3 # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Build a new release.""" import argparse import collections import dataclasses import os import pathlib import re import shutil import subprocess import sys import ta...
util
webassets
__author__ = "Gina Häußge <gina@octoprint.org>" __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html" __copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms of the AGPLv3 License" import gzip import logging import os import re import threading from urllib imp...
fighter
projectedAdd
import wx from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcAddProjectedFighterCommand(wx.Command): def __init__(self, fitID, fighterInfo, position=None): wx.Command.__init__(self, True, "Add Projected Fighter") self.fitID = fitID self.fighterInfo...
models
dashboard
from typing import Any, Dict from django.contrib.postgres.fields import ArrayField from django.db import models from posthog.models.utils import sane_repr from posthog.utils import absolute_uri class DashboardManager(models.Manager): def get_queryset(self): return super().get_queryset().exclude(deleted=T...
widgets
searchresultswidget
import logging import time import uuid from dataclasses import dataclass, field from PyQt5 import uic from tribler.core.components.metadata_store.db.serialization import REGULAR_TORRENT from tribler.core.utilities.utilities import Query, to_fts_query from tribler.gui.network.request_manager import request_manager from...
meshes
mesh_canticcx_quad8
def create_nodes(femmesh): # nodes femmesh.addNode(0.0, 500.0, 0.0, 1) femmesh.addNode(0.0, 500.00000000000324, 1000.0, 2) femmesh.addNode(8000.0, 500.0, 0.0, 3) femmesh.addNode(8000.0, 500.00000000000324, 1000.0, 4) femmesh.addNode(0.0, 500.0000000000001, 500.0, 5) femmesh.addNode(0.0, 500....
draftguitools
gui_texts
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * (c) 2009, 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
api
view_link
from typing import Optional from posthog.api.routing import StructuredViewSetMixin from posthog.api.shared import UserBasicSerializer from posthog.hogql.database.database import create_hogql_database from posthog.models import User from posthog.permissions import OrganizationMemberPermissions from posthog.warehouse.mo...
deluge-webui
gtkui
# # Copyright (C) 2009 Damien Churchill <damoxc@gmail.com> # # Basic plugin template created by: # Copyright (C) 2008 Martijn Voncken <mvoncken@gmail.com> # Copyright (C) 2007-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 #...
PyObjCTest
test_cfbitvector
from CoreFoundation import * from PyObjCTools.TestSupport import * try: long except NameError: long = int def byte2bits(val): result = [] for i in range(7, -1, -1): if val & (1 << i): result.append(1) else: result.append(0) return result class TestBitVect...
gui
debug_window
import datetime import json import logging import os import socket import sys from binascii import unhexlify from time import localtime, strftime, time from typing import Dict import libtorrent import psutil from PyQt5 import QtGui, uic from PyQt5.QtCore import Qt, QTimer, pyqtSignal from PyQt5.QtGui import QBrush, QC...
sbe
boot
"""Static configuration for the application. TODO: add more (runtime) flexibility in plugin discovery, selection and activation. NB: not used anymore. """ from __future__ import annotations import logging import os import subprocess import sys from pathlib import Path from flask import current_app from werkzeug.ser...
browser
hints
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """A HintManager to draw hints over links.""" import collections import dataclasses import enum import functools import html import os import re from string import ascii_lowercase from typing i...
ui
checkbox_list_item
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2018 Sambhav Kothari # Copyright (C) 2018, 2020-2022 Laurent Monin # Copyright (C) 2022 Philipp Wolfer # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Lice...
base
defs
# ============================================================================= # 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 ...
alerts
paging
import enum import typing from uuid import uuid4 from apps.alerts.models import ( Alert, AlertGroup, AlertGroupLogRecord, AlertReceiveChannel, ChannelFilter, EscalationChain, UserHasNotification, ) from apps.alerts.tasks.notify_user import notify_user_task from apps.schedules.ical_utils imp...
auxiliary
log_server
# # Quru Image Server # # Document: log_server.py # Date started: 03 Aug 2011 # By: Matt Fozard # Purpose: Logging server # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Af...
PartDesign
TestPartDesignApp
# ************************************************************************** # Copyright (c) 2011 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * # This file is part of the FreeCAD CAx development system. * # ...
decrypters
MirrorcreatorCom
# -*- coding: utf-8 -*- import os import re from ..base.decrypter import BaseDecrypter from ..helpers import replace_patterns class MirrorcreatorCom(BaseDecrypter): __name__ = "MirrorcreatorCom" __type__ = "decrypter" __version__ = "0.03" __status__ = "testing" __pattern__ = r"https?://(?:www\....
paths
paths_event_query
from typing import Any, Dict, List, Tuple from posthog.constants import ( FUNNEL_PATH_AFTER_STEP, FUNNEL_PATH_BEFORE_STEP, FUNNEL_PATH_BETWEEN_STEPS, HOGQL, PAGEVIEW_EVENT, SCREEN_EVENT, ) from posthog.hogql.hogql import translate_hogql from posthog.models.filters.path_filter import PathFilter ...
downloaders
EasybytezCom
# -*- coding: utf-8 -*- from ..base.xfs_downloader import XFSDownloader class EasybytezCom(XFSDownloader): __name__ = "EasybytezCom" __type__ = "downloader" __version__ = "0.32" __status__ = "testing" __pattern__ = r"http://(?:www\.)?easybytez\.com/\w{12}" __config__ = [ ("enabled", ...
mac-osx
make_cert_pem
# -*- coding: utf-8 -*- """ A script to initialize our bundled openssl CA trust store based on your System's keychain Released under the same licence as gPodder (GPL3 or later) Copyright (c) 2016 Eric Le Lay """ import argparse import re import subprocess import sys import traceback from subprocess import...
lib
rising
# 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, ...
sequencer
_shared
from sglib import constants from sglib.lib import util from sglib.lib.translate import _ from sglib.math import clip_min, clip_value from sglib.models.daw import * from sgui import shared as glbl_shared from sgui.daw import shared from sgui.sgqt import * from . import _shared DRAW_SEQUENCER_GRAPHS = True CACHED_SEQ_L...
digital
qa_packet_headerparser_b
#!/usr/bin/env python # Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import random import pmt from gnuradio import blocks, digital, gr, gr_unittest from gnuradio.digital.utils import tagged_streams class qa_packet_headerparser_b(g...
tornado
router
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals """ sockjs.tornado.router ~~~~~~~~~~~~~~~~~~~~~ SockJS protocol router implementation. """ from octoprint.vendor.sockjs.tornado import ( proto, session, sessioncontainer, static, ...
cssutils
tokenize2
#!/usr/bin/env python # -*- coding: utf-8 -*- """New CSS Tokenizer (a generator) """ __all__ = ['Tokenizer', 'CSSProductions'] __docformat__ = 'restructuredtext' __version__ = '$Id$' import itertools import re import sys from cssproductions import * from helper import normalize _TOKENIZER_CACHE = {} class Tokenizer...
comic
gufengbase
#!/usr/bin/env python3 # encoding: utf-8 # https://www.gufengmh8.com或者https://m.gufengmh8.com网站的免费漫画的基类,简单提供几个信息实现一个子类即可推送特定的漫画 # Author: insert0003 <https://github.com/insert0003> import imghdr import json import re import urllib from base64 import b64decode, b64encode import urllib2 from books.base import BaseComicB...
migrations
0006_i18n_models
import autoslug.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("fpr", "0005_update_tool_versions")] operations = [ migrations.AlterModelOptions( name="formatgroup", options={"ordering": ["description"], "verbose_name": "...
PathTests
TestPathOpDeburr
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2018 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
tasks
notify_group
from apps.slack.scenarios import scenario_step from apps.slack.tasks import check_slack_message_exists_before_post_message_to_thread from common.custom_celery_tasks import shared_dedicated_queue_retry_task from django.conf import settings from .notify_user import notify_user_task from .task_logger import task_logger ...
ui
ui_passworddialog
# -*- 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_PasswordDialog(object): def setupUi(self, PasswordDialog): PasswordDialog.setObjectName("PasswordDialog") PasswordDialog.setWindowMo...
protos
box_coder_pb2
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: object_detection/protos/box_coder.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pb2 from google.protobuf...
feminout
importCcxFrdResults
# *************************************************************************** # * Copyright (c) 2013 Joachim Zettler * # * Copyright (c) 2013 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> * # * ...
femobjects
constraint_initialflowvelocity
# *************************************************************************** # * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> * # * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * Th...
Show
Containers
# /*************************************************************************** # * Copyright (c) 2018 Victor Titov (DeepSOIC) <vv.titov@gmail.com> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
widgets
freq_splitter
from sgui.sgqt import QGridLayout, QGroupBox from . import _shared from .control import combobox_control, knob_control class FreqSplitter: """COntrols for splitting audio by frequency""" def __init__( self, knob_size: int, combobox_width: int, first_port: int, combobo...
deluge
event
# # 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. # """ Event module. This module...
addons
AntiCaptcha
# -*- coding: utf-8 -*- import base64 import json import time import urllib.parse from pyload.core.utils.convert import to_str from ..base.addon import BaseAddon, threaded class AntiCaptcha(BaseAddon): __name__ = "AntiCaptcha" __type__ = "addon" __version__ = "0.02" __status__ = "testing" __co...
songsmenu
splitting
# Copyright 2005 Joe Wreschnig # 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 License, or # (at your option) any later version. from qu...
configmanager
autostart
# Copyright (C) 2018 Thomas Hess <thomas.hess@udo.edu> # 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 program ...
formatters
json
import json from ...plugins import FormatterPlugin class JSONFormatter(FormatterPlugin): def __init__(self, **kwargs): super().__init__(**kwargs) self.enabled = self.format_options["json"]["format"] def format_body(self, body: str, mime: str) -> str: maybe_json = [ "json"...
aliceVision
ImageMatching
__version__ = "2.0" import os from meshroom.core import desc class ImageMatching(desc.AVCommandLineNode): commandLine = "aliceVision_imageMatching {allParams}" size = desc.DynamicNodeSize("input") category = "Sparse Reconstruction" documentation = """ The goal of this node is to select the image pa...
communities
common
"""Forum views.""" from __future__ import annotations from datetime import datetime from abilian.i18n import _l from abilian.sbe.apps.communities.security import is_manager from abilian.sbe.apps.documents.models import Document from abilian.sbe.apps.wiki.models import WikiPage from abilian.services.viewtracker impor...
models
list
""" make a list of books!! """ import uuid from bookwyrm import activitypub from bookwyrm.settings import DOMAIN from django.core.exceptions import PermissionDenied from django.db import models from django.db.models import Q from django.utils import timezone from . import fields from .activitypub_mixin import Collect...
api
views_pages
# # Quru Image Server # # Document: views_pages.py # Date started: 06 Dec 2011 # By: Matt Fozard # Purpose: API web page URLs and views # Requires: Flask # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it unde...
admin
statistics
from CTFd.admin import admin from CTFd.models import Challenges, Fails, Solves, Teams, Tracking, Users, db from CTFd.utils.decorators import admins_only from CTFd.utils.modes import get_model from CTFd.utils.updates import update_check from flask import render_template @admin.route("/admin/statistics", methods=["GET"...
source
conf
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # buku documentation build configuration file, created by # sphinx-quickstart on Thu Sep 7 12:54:59 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autog...
migrations
0005_reingest
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("main", "0004_rights")] operations = [ migrations.AddField( model_name="dublincore", name="status", field=models.CharField( default="ORIGINAL", ...
doxyxml
base
# # Copyright 2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ A base class is created. Classes based upon this are used to make more user-friendly interfaces to the doxygen xml docs than the generated classes provide. """ import os import p...
blocks
qa_vco
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import math from gnuradio import blocks, gr, gr_unittest def sig_source_f(samp_rate, freq, amp, N): t = [float(x) / samp_rate for x in range(N)] y = [...
thumbor
config
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com import tempfile from os.path import expanduser, join from derpconf ...
diagram
connectors
"""Connector adapters. To register connectors implemented in this module, it is imported in gaphor.adapter package. """ from __future__ import annotations import functools import itertools from typing import Iterator, Protocol, TypeVar from gaphas.connections import Connection from gaphas.connector import Connectio...
examples
fmtest
#!/usr/bin/env python # # Copyright 2009,2012,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 time import numpy from gnuradio import analog, blocks, channels, filter, gr from gnuradio.fft import window try: imp...
drafttaskpanels
task_selectplane
# *************************************************************************** # * Copyright (c) 2019 Yorik van Havre <yorik@uncreated.net> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
api
insight_serializers
import json from typing import get_args from posthog.api.documentation import ( FilterActionSerializer, FilterEventSerializer, OpenApiTypes, PropertySerializer, extend_schema_field, property_help_text, ) from posthog.constants import ( ACTIONS, BREAKDOWN_TYPES, DISPLAY_TYPES, EV...
senf
_fsnative
# -*- coding: utf-8 -*- # Copyright 2016 Christoph Reiter # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify...
downloaders
DailymotionCom
# -*- coding: utf-8 -*- import json import random import re from pyload.core.datatypes.pyfile import status_map from pyload.core.network.request_factory import get_url from ..base.downloader import BaseDownloader def get_info(urls): result = [] m = re.compile(DailymotionCom.__pattern__) for url in urls...
utils
stats
# =============================================================================== # 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, ...
aliceVision
CameraRigLocalization
__version__ = "1.0" import os from meshroom.core import desc class CameraRigLocalization(desc.AVCommandLineNode): commandLine = "aliceVision_rigLocalization {allParams}" category = "Utils" documentation = """ """ inputs = [ desc.File( name="sfmdata", label="SfMD...
protos
box_predictor_pb2
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: object_detection/protos/box_predictor.proto import sys _b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1")) from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pb2 from google.prot...
context
units
# -*- coding: utf-8 -*- # # Copyright (C) 2013 by Ihor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
engines
opensemantic
# SPDX-License-Identifier: AGPL-3.0-or-later """ Open Semantic Search """ from json import loads from urllib.parse import quote from dateutil import parser # about about = { "website": "https://www.opensemanticsearch.org/", "wikidata_id": None, "official_api_documentation": "https://www.opensemanticsear...
migration
revision_legacy_code
# encoding: utf-8 # This file is code to do with vdm revisions, which was removed from CKAN after # version 2.8. It is only used by a migration and its tests. import datetime import uuid from typing import Any import ckan.lib.dictization as d import ckan.logic as logic import six import sqlalchemy.orm.properties fro...
versions
070_cfb544112fa7_add_activity_and_resource_indexes
# encoding: utf-8 """070 Add activity and resource_indexes Revision ID: cfb544112fa7 Revises: e7524c675cdb Create Date: 2018-09-04 18:49:13.010411 """ from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used by Alembic. revision = "cfb544112fa7" down_revision...
PyObjCTest
test_nstextfield
from AppKit import * from PyObjCTools.TestSupport import * class TestNSTextField(TestCase): def testMethods(self): self.assertResultIsBOOL(NSTextField.drawsBackground) self.assertArgIsBOOL(NSTextField.setDrawsBackground_, 0) self.assertResultIsBOOL(NSTextField.isBordered) self.asse...