section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
femviewprovider
view_constraint_initialpressure
# *************************************************************************** # * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
posthog
cloud_utils
from typing import TYPE_CHECKING, Any, Optional from django.conf import settings from django.db.utils import ProgrammingError from sentry_sdk import capture_exception if TYPE_CHECKING: from ee.models.license import License is_cloud_cached: Optional[bool] = None is_instance_licensed_cached: Optional[bool] = None ...
OpenSCAD
importCSG
# -*- coding: utf8 -*- # *************************************************************************** # * Copyright (c) 2012 Keith Sloan <keith@sloan-home.co.uk> * # * * # * This program is free software; you can redistribute it a...
stream
stream
import io import json import logging from streamlink.session import Streamlink log = logging.getLogger(__name__) class Stream: """ This is a base class that should be inherited when implementing different stream types. Should only be created by plugins. """ __shortname__ = "stream" @classm...
lib
configparse
# 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, ...
Post
UtilsParse
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2014 sliptonic <shopinthewoods@gmail.com> * # * Copyright (c) 2015 Dan Falck <ddfalck@gmail.com> ...
meta
attach
from os.path import commonprefix from plover.formatting import ( META_ATTACH_FLAG, META_CARRY_CAPITALIZATION, Case, has_word_boundary, rightmost_word, ) from plover.orthography import add_suffix def meta_attach(ctx, meta): action = ctx.new_action() begin = meta.startswith(META_ATTACH_FLAG...
data
measures
# -*- coding: UTF-8 -*- import math import sys import invesalius.constants as const import invesalius.project as prj import invesalius.session as ses import invesalius.utils as utils import numpy as np from invesalius import math_utils from invesalius.gui.widgets.canvas_renderer import ( CanvasHandlerBase, El...
api
views
# This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the ...
extensions
command_on_download
# -*- coding: utf-8 -*- # # gPodder extension for running a command on successful episode download # import datetime import logging import os import gpodder from gpodder import util logger = logging.getLogger(__name__) _ = gpodder.gettext __title__ = _("Run a Command on Download") __description__ = _("Run a predef...
deployment
file
# coding:utf-8 import io import logging import os from cactus import mime from cactus.utils import ipc from cactus.utils.file import compressString, fileSize from cactus.utils.helpers import checksum, memoize from cactus.utils.url import path_to_url logger = logging.getLogger(__name__) class BaseFile(object): D...
lib
process
import copy import os import shlex import subprocess import threading from sglib.log import LOG from . import util from .pidfile import create_pidfile if "APPDIR" in os.environ: LD_LIBRARY_PATH = ":".join( os.path.join(os.environ["APPDIR"], x) for x in ( "lib/x86_64-linux-gnu", ...
templates
templates
# # Copyright 2013-2014, 2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # """ All the templates for skeleton files (needed by ModToolAdd) """ from datetime import datetime Templates = {} # Default licence Templates["defaultlicense"] = ( """...
Dice3DS
util
# util.py """Utitily function for Dice3DS. Defines some routines for calculating normals and transforming points. """ import numpy # Can push numpy.float64 (or even numpy.float80) into this if you # would like to use higher precision when calculating; results will be # converted back to numpy.float32 _calc_precisi...
brainz
widgets
# Copyright 2005-2010 Joshua Kwan <joshk@triplehelix.org>, # Michael Ball <michael.ball@gmail.com>, # Steven Robertson <steven@strobe.cc> # 2017 Nick Boultbee # # This program is free software; you can redistribute it and/or modify # it under the terms of t...
PyObjCTest
test_nscalendar
import Foundation from Foundation import * from PyObjCTools.TestSupport import * class TestNSCalendar(TestCase): def testConstants(self): self.assertEqual(NSEraCalendarUnit, kCFCalendarUnitEra) self.assertEqual(NSYearCalendarUnit, kCFCalendarUnitYear) self.assertEqual(NSMonthCalendarUnit, ...
frescobaldi-app
signals
# 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 ...
digital
qa_ofdm_sync_sc_cfb
#!/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 # # import random import numpy from gnuradio import analog, blocks, channels, digital, gr, gr_unittest from gnuradio.digital.ofdm_txrx import ofdm_tx from gnur...
metrics
offline_eval_map_corloc
# 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...
ui
newuserdialog
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2023 Bob Swift # # 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, o...
views
features
from apps.auth_token.auth import PluginAuthentication from apps.base.utils import live_settings from django.conf import settings from drf_spectacular.utils import OpenApiExample, extend_schema from rest_framework import serializers from rest_framework.response import Response from rest_framework.views import APIView F...
papers
ajax
# -*- encoding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation; either version 2 # of th...
api
plugin
import json import re from typing import Any, Dict, List, Optional, Set, cast import requests from dateutil.relativedelta import relativedelta from django.core.exceptions import ObjectDoesNotExist from django.core.files.uploadedfile import UploadedFile from django.db import connections, transaction from django.db.mode...
column-optimizer
foss_column_optimizer
from collections import Counter from typing import Counter as TCounter from typing import Generator, List, Set, Union, cast from posthog.clickhouse.materialized_columns import ColumnName, get_materialized_columns from posthog.constants import TREND_FILTER_TYPE_ACTIONS, FunnelCorrelationType from posthog.models.action....
webview-backend
webengine
""" @file @brief WebEngine backend for TimelineWebView @author Jonathan Thomas <jonathan@openshot.org> @author FeRD (Frank Dana) <ferdnyc@gmail.com> @section LICENSE Copyright (c) 2008-2020 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot....
daapclient
test
# This file contains some code to test the DAAPClient as stand-alone application. import logging import sys from .client import DAAPClient log = logging.getLogger(__name__) def main(): connection = DAAPClient() if len(sys.argv) > 1: host = sys.argv[1] else: host = "localhost" if le...
PyObjCTest
test_nstexttable
from AppKit import * from PyObjCTools.TestSupport import * class TestNSTextTable(TestCase): def testConstants(self): self.assertEqual(NSTextBlockAbsoluteValueType, 0) self.assertEqual(NSTextBlockPercentageValueType, 1) self.assertEqual(NSTextBlockWidth, 0) self.assertEqual(NSTextBl...
scorewiz
preview
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 ...
Scene
ConvexHullNode
# Copyright (c) 2015 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING, Optional from UM.Application import Application from UM.Math.Color import Color from UM.Math.Polygon import Polygon from UM.Mesh.MeshBuilder import ( MeshBuilder, ) # To create a mesh ...
scripts
UsePreviousProbeMeasurements
# Cura PostProcessingPlugin # Author: Amanda de Castilho # Date: January 5,2019 # Description: This plugin overrides probing command and inserts code to ensure # previous probe measurements are loaded and bed leveling enabled # (searches for G29 and replaces it with M501 & M420 S1) #...
backends
base
class NotificationBackend(object): def create_message(self, level, payload, date=None): """ Create and return a `Notification` instance. Instance types depends on backends implementation. :param level: a notification level (could be seen as priority) :param payload: a dict p...
Bigfile
BigfilePiecefield
import array def packPiecefield(data): if not isinstance(data, bytes) and not isinstance(data, bytearray): raise Exception("Invalid data type: %s" % type(data)) res = [] if not data: return array.array("H", b"") if data[0] == b"\x00": res.append(0) find = b"\x01" ...
web
webopenid
"""openid.py: an openid library for web.py Notes: - This will create a file called .openid_secret_key in the current directory with your secret key in it. If someone has access to this file they can log in as any user. And if the app can't find this file for any reason (e.g. you moved the app somewhe...
lib
webassets_tools
from __future__ import annotations import logging import os import tempfile from typing import Any from ckan.common import config, g from markupsafe import Markup from typing_extensions import Literal, TypedDict, assert_never from webassets import Environment from webassets.loaders import YAMLLoader log = logging.ge...
fec
qa_polar_encoder_systematic
#!/usr/bin/env python # # Copyright 2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import numpy as np from gnuradio import blocks, fec, gr, gr_unittest from gnuradio.fec.extended_encoder import extended_encoder from gnuradio.fec.polar import ch...
models
plugin_file
from sglib.lib import util from .cc_mapping import CCMapping class plugin_file: """Abstracts an instrument state file. Plugins are not required to implement this and can instead implement their own custom state files, but this should be a sane and well tested way for most plugins to save their state...
apps
module_front
#!/usr/bin/env python # -*- coding:utf-8 -*- # A GAE web application to aggregate rss and send it to your kindle. # Visit https://github.com/cdhigh/KindleEar for the latest version # Author: # cdhigh <https://github.com/cdhigh> # Contributors: # rexdf <https://github.com/rexdf> __Author__ = "cdhigh" import datetime i...
versions
023_87fdd05f0744_add_harvesting
# encoding: utf-8 """023 Add harvesting Revision ID: 87fdd05f0744 Revises: 7b324ca6c0dc Create Date: 2018-09-04 18:48:56.975156 """ import sqlalchemy as sa from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used by Alembic. revision = "87fdd05f0744" down_rev...
compat
locale
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals # Std. lib imports. import sys # Local imports. from natsort.compat.py23 import PY_VERSION, cmp_to_key, py23_unichr # This string should be sorted after any other byte string because # it contains the max unico...
scripts
hashdist
#!/usr/bin/env python2.7 import argparse import logging import multiprocessing import os import re import string import subprocess import sys import threading from Queue import Queue def parse_size(s): def mult(multiplier): return int(s[:-1]) * multiplier if all(x in string.digits for x in s): ...
migrations
0038_fix_workflow_store_dip
"""Migration to change workflow related to DIP upload and storage.""" from django.db import migrations def data_migration(apps, schema_editor): """This migration modifies the workflow related to uploading and storing of DIPs. The end result is the sub-workflow schematized below: ...
fcbt
CreatePyModule
# *************************************************************************** # * Copyright (c) 2003 Werner Mayer <werner.wm.mayer@gmx.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
requirements
requirementstoolbox
"""The definition for the requirements section of the toolbox.""" from gaphas.item import SE from gaphor.core import gettext from gaphor.diagram.diagramtoolbox import ToolDef, ToolSection, new_item_factory from gaphor.SysML import diagramitems as sysml_items from gaphor.SysML import sysml from gaphor.UML.classes impor...
PyObjCTest
test_nsobjcruntime
import sys from Foundation import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str try: long except NameError: long = int class TestNSObjCRuntime(TestCase): def testConstants(self): self.assertEqual(NSFoundationVersionNumber10_0, 397.40) self...
baseclass
inbox
# pylint: disable=unused-import, too-many-public-methods, unused-variable, too-many-ancestors # pylint: disable=no-name-in-module, too-few-public-methods, import-error, unused-argument, too-many-arguments # pylint: disable=attribute-defined-outside-init, global-variable-not-assigned, too-many-instance-attributes """ K...
extractor
pladform
# coding: utf-8 from __future__ import unicode_literals import re from ..compat import compat_urlparse from ..utils import ExtractorError, determine_ext, int_or_none, qualities, xpath_text from .common import InfoExtractor class PladformIE(InfoExtractor): _VALID_URL = r"""(?x) https?:// ...
Interface
Settings
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING if TYPE_CHECKING: from cura.CuraApplication import CuraApplication class Settings: """The Interface.Settings API provides a version-proof bridge between Cura's (currentl...
models
link
""" outlink data """ from urllib.parse import urlparse from bookwyrm import activitypub from django.core.exceptions import PermissionDenied from django.db import models from django.utils.translation import gettext_lazy as _ from . import fields from .activitypub_mixin import ActivitypubMixin from .base_model import B...
checker
impl
# SPDX-License-Identifier: AGPL-3.0-or-later import functools import itertools import re import threading import types import typing from time import time from urllib.parse import urlparse import requests.exceptions from langdetect import detect_langs from langdetect.lang_detect_exception import LangDetectException f...
slack
client
import logging import typing from typing import Optional, Tuple from apps.slack.errors import ( SlackAPIRatelimitError, SlackAPIServerError, SlackAPITokenError, get_error_class, ) from django.utils import timezone from rest_framework import status from slack_sdk.errors import SlackApiError as SlackSDKA...
plugins
nrk
""" $description Live TV channels and video on-demand service from NRK, a Norwegian public, state-owned broadcaster. $url tv.nrk.no $url radio.nrk.no $type live, vod $region Norway """ import logging import re from streamlink.plugin import Plugin, pluginmatcher from streamlink.plugin.api import validate from streamli...
plugins
check_drained_test
__copyright__ = "Copyright (C) 2022 Martin Blais" __license__ = "GNU GPLv2" import unittest from beancount import loader from beancount.parser import cmptest class TestCheckCloseEmpty(cmptest.TestCase): @loader.load_doc() def test_check_drained__absence(self, entries, errors, options_map): """ ...
legecy-translators
constants
from string import ascii_lowercase, digits ################################## StringName = u'PyJsConstantString%d_' NumberName = u'PyJsConstantNumber%d_' RegExpName = u'PyJsConstantRegExp%d_' ################################## ALPHAS = set(ascii_lowercase+ ascii_lowercase.upper()) NUMS = set(digits) IDENTIFIER_START =...
qltk
notif
# Copyright 2010 Steven Robertson # 2020-2022 Nick Boultbee # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. """ ...
src
DigitalFactoryController
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import json import math import os import tempfile import threading from enum import IntEnum from pathlib import Path from typing import Any, Dict, List, Optional, cast from cura.API import Account from cura.CuraApplication...
file-list
plugin
from __future__ import absolute_import from .file_list import FileList from .gio_extension import DavExtension, FtpExtension, SambaExtension, SftpExtension from .gio_provider import ( ArchiveProvider, DavProvider, DavsProvider, FtpProvider, Gphoto2Provider, MtpProvider, NetworkProvider, ...
PathTests
TestPathDrillable
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2021 sliptonic <shopinthewoods@gmail.com> * # * * # * This program is free software; you can redistribute it a...
ebooks
hyphenate
""" Hyphenation, using Frank Liang's algorithm. This module provides a single function to hyphenate words. hyphenate_word takes a string (the word), and returns a list of parts that can be separated by hyphens. >>> hyphenate_word("hyphenation") ['hy', 'phen', 'ation'] >>> hyphenate_word("sup...
downloaders
MegaCoNz
# -*- coding: utf-8 -*- import base64 import json import os import random import re import struct from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from pyload.core.network.http.exceptions import BadHeader from pyload.core.utils.conve...
playlists
util
# Copyright 2014-2022 Nick Boultbee # 2022 TheMelmacian # # 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....
pages
wiki
# 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, ...
extractors
bigthink
#!/usr/bin/env python import json from ..common import * from ..extractor import VideoExtractor class Bigthink(VideoExtractor): name = "Bigthink" stream_types = [ # this is just a sample. Will make it in prepare() # {'id': '1080'}, # {'id': '720'}, # {'id': '360'}, # {'id':...
extractor
spreaker
# coding: utf-8 from __future__ import unicode_literals import itertools from ..compat import compat_str from ..utils import ( float_or_none, int_or_none, str_or_none, try_get, unified_timestamp, url_or_none, ) from .common import InfoExtractor def _extract_episode(data, episode_id=None): ...
qltk
pluginwin
# Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna # 2016-2020 Nick Boultbee # 2022 Jej@github # # 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 vers...
digital
qa_framer_sink
#!/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 default_access_code = "\xAC\xDD\xA4\xE2\xF2\x8C\x20\xFC" def string_to_1_0_list(s): r = [] ...
backfill
gilded_comments
# 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, ...
config
stylesheet
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Handling of Qt qss stylesheets.""" import functools from typing import FrozenSet, Optional from qutebrowser.config import config from qutebrowser.misc import debugcachestats from qutebrowse...
sabnzbd
decoder
#!/usr/bin/python3 -OO # Copyright 2007-2023 The SABnzbd-Team (sabnzbd.org) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later ver...
decrypters
MegadyskPlFolder
# -*- coding: utf-8 -*- import base64 import json import re import urllib.parse from ..base.simple_decrypter import SimpleDecrypter def xor_decrypt(data, key): data = base64.b64decode(data) return "".join( [ chr(ord(x[1]) ^ ord(key[x[0].format(len(key))])) for x in [(i, c) fo...
widgets
channeldescriptionwidget
from pathlib import Path from PyQt5 import QtCore, uic from PyQt5.QtCore import QDir, pyqtSignal, pyqtSlot from PyQt5.QtGui import QIcon, QImage, QPixmap from PyQt5.QtWidgets import QFileDialog, QPushButton from tribler.gui.dialogs.confirmationdialog import ConfirmationDialog from tribler.gui.network.request_manager i...
bin
migrate_kafka_data
#!/usr/bin/env python3 # # This management command is intended to be used to migrate data from one Kafka # cluster to another. It is intended for the use case where the Kafka cluster # has suffered some catastrophic failure that causes us to migrate to a new # cluster. The old cluster may well come back up, and in whic...
hedgebox
models
import datetime as dt import math from dataclasses import dataclass, field from enum import Enum, auto from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, cast from zoneinfo import ZoneInfo import pytz from posthog.demo.matrix.models import Effect, SimPerson, SimSessionIntent from .taxonomy impor...
ports
port
# Copyright 2008-2016 Free Software Foundation, Inc. # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-2.0-or-later # from .. import Constants from ..base import Element from ..utils.descriptors import ( EvaluatedEnum, EvaluatedFlag, EvaluatedPInt, lazy_property, setup_names, ) fro...
models
fields
""" activitypub-aware django model fields """ import re from dataclasses import MISSING from urllib.parse import urljoin from uuid import uuid4 import dateutil.parser from bookwyrm import activitypub from bookwyrm.connectors import get_image from bookwyrm.settings import MEDIA_FULL_URL from bookwyrm.utils.sanitizer im...
libs
ffmetadata
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ####################################################################### # # VidCutter - media cutter & joiner # # copyright © 2018 Pete Alexandrou # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Licen...
extractor
qqmusic
# coding: utf-8 from __future__ import unicode_literals import random import re import time from ..utils import ExtractorError, clean_html, strip_jsonp, unescapeHTML from .common import InfoExtractor class QQMusicIE(InfoExtractor): IE_NAME = "qqmusic" IE_DESC = "QQ音乐" _VALID_URL = r"https?://y\.qq\.com/...
ProfileLib
Hexagon
# *************************************************************************** # * Copyright (c) 2014 Juergen Riegel <FreeCAD@juergen-riegel.net> * # * * # * This program is free software; you can redistribute it and/or modify * # * it...
deluge
decorators
# # Copyright (C) 2010 John Garland <johnnybg+deluge@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 inspect import re i...
lib
cli
# encoding: utf-8 # type: ignore from __future__ import print_function import sys from typing import Any, Optional, cast from urllib.parse import urlparse import ckan.lib.maintain as maintain import ckan.logic as logic import ckan.model as model import click import paste.script # type: ignore import routes # type: ...
core
account_types_test
__copyright__ = "Copyright (C) 2014-2017 Martin Blais" __license__ = "GNU GPLv2" import functools import unittest try: from beancount.core import account_types except ImportError: from beancount.ccore import _core as account_types class TestAccountTypes(unittest.TestCase): def test_basics(self): ...
PyObjCTest
test_nstextattachment
from AppKit import * from PyObjCTools.TestSupport import * try: unichr except NameError: unichr = chr class TestNSTextAttachmentHelper(NSObject): def drawWithFrame_inView_(self, fr, vi): pass def wantsToTrackMouse(self): return 1 def highlight_withFrame_inView_(self, fl, fr, vi)...
utils
np_box_list
# 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...
nyaa
import_to_es
#!/usr/bin/env python """ Bulk load torents from mysql into elasticsearch `nyaav2` index, which is assumed to already exist. This is a one-shot deal, so you'd either need to complement it with a cron job or some binlog-reading thing (TODO) """ import json import sys # This should be progressbar33 import progressbar fr...
extractors
readability
__package__ = "archivebox.extractors" import json from pathlib import Path from tempfile import NamedTemporaryFile from typing import Optional from ..config import ( CURL_BINARY, DEPENDENCIES, READABILITY_VERSION, SAVE_READABILITY, TIMEOUT, ) from ..index.schema import ArchiveError, ArchiveResult,...
pyaes
blockfeeder
# The MIT License (MIT) # # Copyright (c) 2014 Richard Moore # # 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, mod...
clientScripts
upload_archivesspace
#!/usr/bin/env python import argparse import logging import os import django from agentarchives.archivesspace import ArchivesSpaceClient, ArchivesSpaceError from fpr.models import FormatVersion from main.models import ArchivesSpaceDIPObjectResourcePairing, File from xml2obj import mets_file # archivematicaCommon # Th...
metrics
offline_eval_map_corloc_test
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
extractor
reverbnation
from __future__ import unicode_literals from ..utils import qualities, str_or_none from .common import InfoExtractor class ReverbNationIE(InfoExtractor): _VALID_URL = r"^https?://(?:www\.)?reverbnation\.com/.*?/song/(?P<id>\d+).*?$" _TESTS = [ { "url": "http://www.reverbnation.com/alkilad...
migrations
0024_update_fido
from django.db import migrations def data_migration_up(apps, schema_editor): """ Update identification tool FIDO to 1.3.10, correcting a character-spacing issue bug identified in PRONOM94 """ idtool = apps.get_model("fpr", "IDTool") idcommand = apps.get_model("fpr", "IDCommand") # Update...
versions
069_e7524c675cdb_resource_url_and_metadata_modified
# encoding: utf-8 """069 Resource url and metadata_modified Revision ID: e7524c675cdb Revises: e33a5f2b2a84 Create Date: 2018-09-04 18:49:12.639912 """ import sqlalchemy as sa from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used by Alembic. revision = "e7...
cargo
remove
import math import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.cargo.remove import CalcRemoveCargoCommand from gui.fitCommands.helpers import CargoInfo, InternalCommandHistory from service.market import Market class GuiRemoveCargosCommand(wx.Command): def __...
blueprints
cnl_blueprint
# -*- coding: utf-8 -*- import os from base64 import standard_b64decode from functools import wraps from urllib.parse import unquote import flask from cryptography.hazmat.backends import default_backend from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from flask.json import jsonify from py...
chardet
euctwprober
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
migrations
0001_initial
# Generated by Django 3.0.3 on 2020-04-30 14:18 import uuid import django.contrib.auth.models import django.contrib.auth.validators import django.utils.timezone from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("auth", "0011_update_prox...
PyObjCTest
test_nsxmldtdnode
from Foundation import * from PyObjCTools.TestSupport import * class TestXMLDTDNode(TestCase): def testConstants(self): self.assertEqual(NSXMLEntityGeneralKind, 1) self.assertEqual(NSXMLEntityParsedKind, 2) self.assertEqual(NSXMLEntityUnparsedKind, 3) self.assertEqual(NSXMLEntityPa...
service
prereqsCheck
import platform import re import sys version_block = "" class PreCheckException(Exception): pass class PreCheckMessage: def __init__(self, msg): # wx may not be installed, in which case print to console. For all other prechecks, should pop up a MessageDialog try: import wx ...
Assembly
CommandCreateAssembly
# SPDX-License-Identifier: LGPL-2.1-or-later # /**************************************************************************** # * # Copyright (c) 2023 Ondsel <development@ondsel.com> * # ...
meshes
mesh_selfweight_cantilever_tetra10
def create_nodes(femmesh): # nodes femmesh.addNode(0.0, 0.0, 1000.0, 1) femmesh.addNode(0.0, 0.0, 0.0, 2) femmesh.addNode(0.0, 1000.0, 1000.0, 3) femmesh.addNode(0.0, 1000.0, 0.0, 4) femmesh.addNode(0.0, 0.0, 500.0, 5) femmesh.addNode(0.0, 500.0, 1000.0, 6) femmesh.addNode(0.0, 1000.0, 5...
context
image_plgs
# -*- 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....
tools
transform_links_in_docs
#!/usr/bin/env python3 """Transform links embedded in docs. The script is given a doc id and a JSON file with a mapping, like this: { "https://github.com/beancount/beancount/blob/v2/experiments/returns/config.proto": "https://github.com/beancount/beanlabs/blob/master/beanlabs/returns/config.proto", "htt...