section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
feminout | importZ88Mesh | # ***************************************************************************
# * Copyright (c) 2016 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
streamripper | srprefs | # Copyright (C) 2006 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 1, or (at your option)
# any later version.
#
# This program is distributed in the hope that it w... |
gui | quickchoice | # This file is part of MyPaint.
# Copyright (C) 2013-2018 by the MyPaint Development Team.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option... |
admin | pages | from CTFd.admin import admin
from CTFd.models import Pages
from CTFd.schemas.pages import PageSchema
from CTFd.utils import markdown
from CTFd.utils.decorators import admins_only
from flask import render_template, request
@admin.route("/admin/pages")
@admins_only
def pages_listing():
pages = Pages.query.all()
... |
saveddata | drone | # ===============================================================================
# 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, ... |
core | torrentmanager | #
# 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
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
"""TorrentManager handles... |
migrations | 0005_auto_20220312_1215 | # Generated by Django 3.2.12 on 2022-03-12 12:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("accounts", "0004_alter_user_first_name"),
]
operations = [
migrations.RenameField(
model_name="user",
old_name="has_... |
photos | admin | from django.contrib import admin
from .models import (
Camera,
Lens,
Library,
LibraryPath,
LibraryUser,
Photo,
PhotoFile,
PhotoTag,
Tag,
)
class VersionedAdmin(admin.ModelAdmin):
fieldsets = (
(
"Created/Updated",
{"classes": ("collapse",), "fie... |
task | task | # -*- Mode: Python -*-
# 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 Free Software Foundation, either version 3 of t... |
webservice | ratecontrol | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2007 Lukáš Lalinský
# Copyright (C) 2009 Carlin Mangar
# Copyright (C) 2017 Sambhav Kothari
# Copyright (C) 2018, 2020-2021 Laurent Monin
# Copyright (C) 2019, 2022 Philipp Wolfer
#
# This program is free software; you can redi... |
BasicDrawing | FrameworkUtilities | import AppDrawing
from Cocoa import *
from Quartz import *
def myCreatePDFDataFromPasteBoard():
# Obtain the pasteboard to examine.
pboard = NSPasteboard.generalPasteboard()
# Scan the types of data on the pasteboard and return the first type available that is
# listed in the array supplied. Here the... |
slicing | exceptions | """
Slicing related exceptions.
.. autoclass:: SlicingException
.. autoclass:: SlicingCancelled
:show-inheritance:
.. autoclass:: SlicerException
:show-inheritance:
.. autoclass:: UnknownSlicer
:show-inheritance:
.. autoclass:: SlicerNotConfigured
:show-inheritance:
.. autoclass:: ProfileException
..... |
migrations | 0212_alter_persondistinctid_team | # Generated by Django 3.2.5 on 2022-02-17 10:03
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
atomic = False # DROP INDEX CONCURRENTLY cannot be run in a transaction
dependencies = [
("posthog", "0211_async_migrations_errors_length"... |
model | abstract_abbreviation | # Copyright (C) 2011 Chris Dekter
# Copyright (C) 2019-2020 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 opt... |
logging | handlers | import concurrent.futures
import logging.handlers
import os
import re
import time
class AsyncLogHandlerMixin(logging.Handler):
def __init__(self, *args, **kwargs):
self._executor = concurrent.futures.ThreadPoolExecutor(max_workers=1)
super().__init__(*args, **kwargs)
def emit(self, record):
... |
extractor | c56 | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import js_to_json
from .common import InfoExtractor
class C56IE(InfoExtractor):
_VALID_URL = r"https?://(?:(?:www|player)\.)?56\.com/(?:.+?/)?(?:v_|(?:play_album.+-))(?P<textid>.+?)\.(?:html|swf)"
IE_NAME = "56.com"
_TESTS = ... |
api | ee_event_definition | from django.utils import timezone
from ee.models.event_definition import EnterpriseEventDefinition
from posthog.api.shared import UserBasicSerializer
from posthog.api.tagged_item import TaggedItemSerializerMixin
from posthog.models.activity_logging.activity_log import (
Detail,
dict_changes_between,
log_act... |
blocks | msg_pair_to_var | #!/usr/bin/env python
#
# Copyright 2020 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import pmt
from gnuradio import gr
class msg_pair_to_var(gr.sync_block):
"""
This block will take an input message pair and allow you to set a flowgraph... |
src | class_addressGenerator | """
A thread for creating addresses
"""
import hashlib
import time
from binascii import hexlify
import defaults
import highlevelcrypto
import queues
import shared
import state
import tr
from addresses import decodeAddress, encodeAddress, encodeVarint
from bmconfigparser import config
from fallback import RIPEMD160Hash... |
localFighter | changeAmount | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.fighter.changeAmount import CalcChangeFighterAmountCommand
from gui.fitCommands.calc.fighter.localRemove import CalcRemoveLocalFighterCommand
from gui.fitCommands.helpers import InternalCommandHistory
from service.... |
extractors | coub | #!/usr/bin/env python
__all__ = ["coub_download"]
from ..common import *
from ..processor import ffmpeg
from ..util.fs import legitimize
def coub_download(url, output_dir=".", merge=True, info_only=False, **kwargs):
html = get_content(url)
try:
json_data = get_coub_data(html)
title, video_u... |
Benchmark | BenchmarkPack | import io
import os
from collections import OrderedDict
from Config import config
from Plugin import PluginManager
from util import Msgpack
@PluginManager.registerTo("Actions")
class ActionsPlugin:
def createZipFile(self, path):
import zipfile
test_data = b"Test" * 1024
file_name = b"\xc... |
intro-doc | svg | #!/usr/bin/env python3
"""Generate a visual graph of transactions.
"""
__copyright__ = "Copyright (C) 2016-2017 Martin Blais"
__license__ = "GNU GPLv2"
import argparse
import bisect
import collections
import csv
import logging
import math
import random
import re
import textwrap
from os import path
from beancount.cor... |
macro | retrospective | from plover import system
from plover.steno import Stroke
from plover.translation import Translation
def toggle_asterisk(translator, stroke, cmdline):
assert not cmdline
# Toggle asterisk of previous stroke
translations = translator.get_state().translations
if not translations:
return
t = ... |
misc | create_launcher | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2016 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 late... |
helpers | msgpack | """
wrapping msgpack
================
We wrap msgpack here the way we need it - to avoid having lots of clutter in the calling code.
Packing
-------
- use_bin_type = True (used by borg since borg 2.0)
This is used to generate output according to new msgpack 2.0 spec.
This cleanly keeps bytes and str types apart.
... |
utils | classification | import queue
import threading
import traceback
from time import sleep
from django.db import transaction
from django.utils import timezone
from photonix.photos.models import Photo, Task
from photonix.photos.utils.tasks import requeue_stuck_tasks
from photonix.web.utils import logger
CLASSIFIERS = [
"color",
"e... |
migrations | 0317_batch_export_models | # Generated by Django 3.2.18 on 2023-05-30 09:06
import django.db.models.deletion
import posthog.models.utils
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0316_action_href_text_matching"),
]
operations = [
migrations.Create... |
scripting | engine | # Copyright (C) 2011 Chris Dekter
#
# 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 is distributed in t... |
models | user | """ database schema for user data """
import re
from urllib.parse import urlparse
import pytz
from bookwyrm import activitypub
from bookwyrm.connectors import ConnectorException, get_data
from bookwyrm.models.shelf import Shelf
from bookwyrm.models.status import Status
from bookwyrm.preview_images import generate_user... |
build | update_version | import logging
import os
from argparse import ArgumentParser
from pathlib import Path
from time import ctime
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
def parse_arguments():
parser = ArgumentParser(description='Update Tribler Version')
parser.add_argument('-r', '--repo', ty... |
conversions | releaseDec2021 | CONVERSIONS = {
# Renamed items
"Gas Cloud Harvester I": "Gas Cloud Scoop I",
"Gas Cloud Harvester II": "Gas Cloud Scoop II",
"'Crop' Gas Cloud Harvester": "'Crop' Gas Cloud Scoop",
"'Plow' Gas Cloud Harvester": "'Plow' Gas Cloud Scoop",
"Syndicate Gas Cloud Harvester": "Syndicate Gas Cloud Scoo... |
model | follower | # encoding: utf-8
from __future__ import annotations
import datetime as _datetime
from typing import Generic, Optional, Type, TypeVar
import ckan.model
import ckan.model.core as core
import ckan.model.domain_object as domain_object
import ckan.model.meta as meta
import sqlalchemy
import sqlalchemy.orm
from ckan.types... |
daw | project | import copy
import math
import os
import re
import shutil
from sglib import constants
from sglib.lib import history, util
from sglib.lib.translate import _
from sglib.lib.util import *
from sglib.log import LOG
from sglib.math import clip_min, clip_value
from sglib.models.daw.playlist import Playlist
from sglib.models... |
VersionUpgrade22to24 | VersionUpgrade | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import configparser # To get version numbers from config files.
import io
import os
import os.path
from typing import Dict, List, Optional, Tuple
import UM.VersionUpgrade
from UM.Resources import Resources
from UM.Version... |
widgets | subscriptionswidget | from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import QLabel, QWidget
from tribler.gui.sentry_mixin import AddBreadcrumbOnShowMixin
from tribler.gui.utilities import (
connect,
format_votes_rich_text,
get_votes_rating_description,
tr,
)
from tribler.gui.widgets.tableconte... |
extractor | telecinco | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from ..utils import clean_html, int_or_none, str_or_none, try_get
from .common import InfoExtractor
class TelecincoIE(InfoExtractor):
IE_DESC = "telecinco.es, cuatro.com and mediaset.es"
_VALID_URL = r"https?://(?:www\.)?(?:teleci... |
PyObjCTest | test_cvpixelformatdescription | from PyObjCTools.TestSupport import *
from Quartz import *
try:
unicode
except NameError:
unicode = str
try:
long
except NameError:
long = int
class TestCVPixelFormatDescription(TestCase):
def testConstants(self):
self.assertIsInstance(kCVPixelFormatName, unicode)
self.assertIsI... |
widgets | trustpage | from typing import Dict
from PyQt5.QtWidgets import QWidget
from tribler.gui.defs import PB, TB
from tribler.gui.dialogs.trustexplanationdialog import TrustExplanationDialog
from tribler.gui.network.request_manager import request_manager
from tribler.gui.sentry_mixin import AddBreadcrumbOnShowMixin
from tribler.gui.ut... |
scripts | line_length_checker | import re
import sys
def getValue(line: str, key: str, default=None):
"""Convenience function that finds the value in a line of g-code.
When requesting key = x from line "G1 X100" the value 100 is returned.
"""
if not key in line or (";" in line and line.find(key) > line.find(";")):
return def... |
scripts | fablin_post | # ***************************************************************************
# * Copyright (c) 2017 imarin *
# * *
# * Heavily based on gbrl post-procesor by: *
# * Co... |
core | post_processing_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... |
mylar | librarysync | # -*- coding: utf-8 -*-
# This file is part of Mylar.
#
# Mylar 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.
#
# Mylar is dist... |
sword | protocol | import copy
import logging
from datetime import datetime
from io import BytesIO
from itertools import chain
from zipfile import ZipFile
import langdetect
import requests
from deposit.models import DepositRecord
from deposit.protocol import DepositError, DepositResult, RepositoryProtocol
from deposit.registry import pr... |
formats | mp4 | # Copyright 2005 Alexey Bobyakov <claymore.ws@gmail.com>, Joe Wreschnig
# Copyright 2006 Lukas Lalinsky
# 2020 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 ve... |
fcbt | CreateModule | # FreeCAD MakeNewBuildNbr script
# (c) 2003 Werner Mayer
#
# Creates a new application
# ***************************************************************************
# * (c) Werner Mayer (werner.wm.mayer@gmx.de) 2003 *
# * ... |
sgui | transport | import time
from sglib import constants
from sglib.lib import strings as sg_strings
from sglib.lib import util
from sglib.lib.translate import _
from sglib.log import LOG
from sglib.math import db_to_lin
from sglib.models.theme import get_asset_path
from sgui import shared, widgets
from sgui.sgqt import *
class Tran... |
migrations | 0061_featureflag | # Generated by Django 3.0.6 on 2020-06-18 08:59
import django.contrib.postgres.fields.jsonb
import django.db.models.deletion
import django.utils.timezone
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0060_aut... |
session | gnome | # Copyright 2018 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
from gi.repository import Gio, GLib... |
accounts | SmoozedCom | # -*- coding: utf-8 -*-
import hashlib
import json
import time
from ..base.multi_account import MultiAccount
class SmoozedCom(MultiAccount):
__name__ = "SmoozedCom"
__type__ = "account"
__version__ = "0.14"
__status__ = "testing"
__config__ = [
("mh_mode", "all;listed;unlisted", "Filter... |
extras | cairoextras | import ctypes
import cairo
# from: http://cairographics.org/freetypepython/
class PycairoContext(ctypes.Structure):
_fields_ = [
("PyObject_HEAD", ctypes.c_byte * object.__basicsize__),
("ctx", ctypes.c_void_p),
("base", ctypes.c_void_p),
]
_initialized = False
def create_cairo_f... |
Gui | PocketBase | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2017 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
data | serial_port_connection | # --------------------------------------------------------------------------
# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
# Homepage: http://www.softwarepublico.gov.br
# Contact: invesalius@cti.gov.br
# License: GNU... |
mystran | add_con_force | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
draftviewproviders | view_base | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2019 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * ... |
compat | py23 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import functools
import sys
# These functions are used to make the doctests compatible between
# python2 and python3, and also provide uniform functionality between
# the two versions. This code is pretty much ... |
api | app_metrics | from typing import Any
from posthog.api.routing import StructuredViewSetMixin
from posthog.models.plugin import PluginConfig
from posthog.queries.app_metrics.app_metrics import (
AppMetricsErrorDetailsQuery,
AppMetricsErrorsQuery,
AppMetricsQuery,
)
from posthog.queries.app_metrics.historical_exports impor... |
blocks | qa_file_source | #!/usr/bin/env python
#
# Copyright 2018 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import array
import os
import tempfile
import pmt
from gnuradio import blocks, gr, gr_unittest
class test_file_source(gr_unittest.TestCase):
@classmethod
... |
neubot | backend_neubot | # neubot/backend_neubot.py
#
# Copyright (c) 2012-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 term... |
zeromq | probe_manager | #
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio.
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
import time
import numpy
import zmq
class probe_manager(object):
def __init__(self):
self.zmq_context = zmq.Context()
self.poller = zmq.Poller()
self.inte... |
core | constants | #####################################################################
# Frets on Fire X (FoFiX) #
# Copyright (C) 2011 FoFiX Team #
# #
# This program is free software; you can... |
digital | qa_constellation_decoder_cb | #!/usr/bin/env python
#
# Copyright 2004,2007,2010-2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from gnuradio import blocks, digital, gr, gr_unittest
class test_constellation_decoder(gr_unittest.TestCase):
def setUp(self):
self.... |
PathTests | TestPathPost | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> *
# * Copyright (c) 2022 Larry Woestman <LarryWoestman2@gmail.com> *
# * ... |
extractor | vvvvid | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import ExtractorError, int_or_none, str_or_none
from .common import InfoExtractor
from .youtube import YoutubeIE
class VVVVIDIE(InfoExtractor):
_VALID_URL_BASE = (
r"https?://(?:www\.)?vvvvid\.it/(?:#!)?(?:show|anime|film|ser... |
api | urls | # -*- coding: utf-8 -*-
from collections import OrderedDict
from typing import Any, List, NamedTuple
from django.urls import include, path
from rest_framework import routers
from rest_framework.schemas import get_schema_view
from . import views
class ExtraPath(NamedTuple):
path: str
reverese_name: str
r... |
engines | yggtorrent | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Yggtorrent (Videos, Music, Files)
"""
from datetime import datetime
from operator import itemgetter
from urllib.parse import quote
from lxml import html
from searx.poolrequests import get as http_get
from searx.utils import extract_text, get_torrent_size
# about
abou... |
mackup | appsdb | """
The applications database.
The Applications Database provides an easy to use interface to load application
data from the Mackup Database (files).
"""
import os
try:
import configparser
except ImportError:
import ConfigParser as configparser
from .constants import APPS_DIR, CUSTOM_APPS_DIR
class Applica... |
plugins | tvrby | """
$description Live TV channels from BTRC, a Belarusian public, state-owned broadcaster.
$url tvr.by
$type live
$region Belarus
"""
import logging
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import HLSStream
log = logging.getLo... |
PyObjCTest | test_synthesize | """
Tests for objc.synthesize
"""
import objc
from PyObjCTest.fnd import NSObject
from PyObjCTools.TestSupport import *
class TestSynthesizeCopier(NSObject):
def copy(self):
return 42
class TestSynthesizeHelper(NSObject):
objc.synthesize("someTitle", copy=True)
objc.synthesize("stringValue", cop... |
hogql-queries | trends_query_runner | from datetime import timedelta
from itertools import groupby
from math import ceil
from operator import itemgetter
from typing import Any, Dict, List, Optional
from django.utils.timezone import datetime
from posthog.caching.insights_api import (
BASE_MINIMUM_INSIGHT_REFRESH_INTERVAL,
REDUCED_MINIMUM_INSIGHT_RE... |
file-import | abc | # 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
... |
builders | hyperparams_builder | # 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... |
utils | html | # -*- encoding: utf-8 -*-
import html
import bleach
import misaka
class Sanitizer(object):
def __init__(self, elements, attributes):
# attributes found in Sundown's HTML serializer [1]
# - except for <img> tag, because images are not generated anyways.
# - sub and sup added
#
... |
sabnzbd | misc | #!/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... |
plugins | dist_plugin | # 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... |
comictaggerlib | settingswindow | """A PyQT4 dialog to enter app settings"""
# 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/LICENSE-2.0
# Unless re... |
api | files | __author__ = "Gina Häußge <osd@foosel.net>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2014 The OctoPrint Project - Released under terms of the AGPLv3 License"
import hashlib
import logging
import os
import threading
from urllib.parse import q... |
filter | qa_rational_resampler | #!/usr/bin/env python
#
# Copyright 2005-2007,2010,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
import random
import sys
from gnuradio import blocks, filter, gr, gr_unittest
def random_floats(n):
r = []
for x in range(n... |
drone | localToggleStates | import eos.db
import wx
from logbook import Logger
from service.fit import Fit
pyfalog = Logger(__name__)
class CalcToggleLocalDroneStatesCommand(wx.Command):
def __init__(self, fitID, mainPosition, positions, forceActiveAmounts=None):
wx.Command.__init__(self, True, "Toggle Local Drone States")
... |
linters | meshes | from pathlib import Path
from typing import Iterator
from ..diagnostic import Diagnostic
from .linter import Linter
MAX_MESH_FILE_SIZE = 1 * 1024 * 1024 # 1MB
class Meshes(Linter):
def __init__(self, file: Path, settings: dict) -> None:
"""Finds issues in model files, such as incorrect file format or t... |
queries | foss_cohort_query | from typing import Any, Dict, List, Optional, Tuple, Union, cast
from posthog.clickhouse.materialized_columns import ColumnName
from posthog.constants import PropertyOperatorType
from posthog.models import Filter, Team
from posthog.models.action import Action
from posthog.models.cohort import Cohort
from posthog.model... |
access | views | import json
import logging
import os
import uuid
from functools import wraps
import archivematicaFunctions
import components.filesystem_ajax.views as filesystem_views
import django.http
from agentarchives.archivesspace import ArchivesSpaceError, AuthenticationError
from components import helpers
from components.ingest... |
downloader | f4m | from __future__ import division, unicode_literals
import io
import itertools
import time
from ..compat import (
compat_b64decode,
compat_etree_fromstring,
compat_struct_pack,
compat_struct_unpack,
compat_urllib_error,
compat_urllib_parse_urlparse,
compat_urlparse,
)
from ..utils import fix... |
deluge-extractor | core | #
# Copyright (C) 2009 Andrew Resch <andrewresch@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
... |
engines | imdb | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
IMDB - Internet Movie Database
Retrieves results from a basic search
Advanced search options are not supported
"""
import json
about = {
"website": "https://imdb.com/",
"wikidata_id": "Q37312",
"official_api_documentation": None,
"use_official_api": Fa... |
gui | history_list | from __future__ import absolute_import
import os
from gi.repository import Gdk, GObject, Gtk
from sunflower.parameters import Parameters
class Column:
NAME = 0
PATH = 1
TIMESTAMP = 2
class HistoryList(Gtk.Window):
"""History list is used to display complete browsing history."""
def __init__(s... |
lector | logger | # This file is a part of Lector, a Qt based ebook reader
# Copyright (C) 2017-2019 BasioMeusPuga
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... |
deluge | config | #
# 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.
#
"""
Deluge Config Module
This... |
Tools | WinVersion | #! python
# -*- coding: utf-8 -*-
# (c) 2012 Juergen Riegel LGPL
#
# Script to create files used in Windows build
# uses SubWCRev.py for version detection#
import getopt
import string
import sys
import SubWCRev
def main():
input = ""
output = "."
try:
opts, args = getopt.getopt(sys.argv[1:], "d... |
extractor | rtl2 | # coding: utf-8
from __future__ import unicode_literals
import re
from ..aes import aes_cbc_decrypt
from ..compat import compat_b64decode, compat_ord, compat_str
from ..utils import (
ExtractorError,
bytes_to_intlist,
int_or_none,
intlist_to_bytes,
strip_or_none,
)
from .common import InfoExtracto... |
covergrid | models | # Copyright 2022 Thomas Leberbauer
# 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.
fro... |
femobjects | constraint_electrostaticpotential | # ***************************************************************************
# * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> *
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> *
# * ... |
beetsplug | keyfinder | # This file is part of beets.
# Copyright 2016, Thomas Scholtes.
#
# 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,... |
neubot | config | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# 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 ... |
graphs | feeding_amounts | # -*- coding: utf-8 -*-
import plotly.graph_objs as go
import plotly.offline as plotly
from core import models
from django.utils import timezone
from django.utils.translation import gettext as _
from reports import utils
def feeding_amounts(instances):
"""
Create a graph showing daily feeding amounts over tim... |
femtools | checksanalysis | # ***************************************************************************
# * Copyright (c) 2020 Przemo Firszt <przemo@firszt.eu> *
# * Copyright (c) 2020 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
draftmake | make_pointarray | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2018 Benjamin Alterauge (ageeye) *
# * Co... |
LegacyProfileReader | LegacyProfileReader | # Copyright (c) 2018 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import configparser # For reading the legacy profile INI files.
import io
import json # For reading the Dictionary of Doom.
import math # For mathematical operations included in the Dictionary of Doom.
import os.path # ... |
comicapi | filenameparser | """Functions for parsing comic info from filename
This should probably be re-written, but, well, it mostly works!
"""
# 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 t... |
lib | plugin | # 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, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.