section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
neubot | main_win32 | # neubot/main_win32.py
#
# Copyright (c) 2012 Simone Basso <bassosimone@gmail.com>,
# NEXA Center for Internet & Society at Politecnico di Torino
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public ... |
gui | propertyEditor | import csv
import gui.builtinMarketBrowser.pfSearchBox as SBox
import gui.display as d
import gui.globalEvents as GE
# noinspection PyPackageRequirements
import wx
# noinspection PyPackageRequirements
import wx.propgrid as wxpg
from eos.db.gamedata.queries import getAttributeInfo, getItem
from gui.auxWindow import A... |
scripting | keyboard | # 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... |
migrations | 0008_userpreferences | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-23 19:08
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
(... |
ui | lineNumberRulerView | import math
from AppKit import (
NSBezierPath,
NSColor,
NSFont,
NSFontAttributeName,
NSForegroundColorAttributeName,
NSMiniControlSize,
NSNotificationCenter,
NSRectFill,
NSRulerView,
NSTextStorageDidProcessEditingNotification,
NSTextView,
NSViewBoundsDidChangeNotificatio... |
SCL | Rules | # Copyright (c) 2011-2012, Thomas Paviot (tpaviot@gmail.com)
# All rights reserved.
# This file is part of the StepClassLibrary (SCL).
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# Redistributions of source cod... |
ui | caa_types_selector | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2007 Oliver Charles
# Copyright (C) 2007, 2010-2011 Lukáš Lalinský
# Copyright (C) 2007-2011, 2015, 2018-2023 Philipp Wolfer
# Copyright (C) 2011 Michael Wiencek
# Copyright (C) 2011-2012 Wieland Hoffmann
# Copyright (C) 2013-2... |
decrypters | HearthisAtFolder | # -*- coding: utf-8 -*-
import re
import urllib.parse
from ..base.decrypter import BaseDecrypter
class HearthisAtFolder(BaseDecrypter):
__name__ = "HearthisAtFolder"
__type__ = "decrypter"
__version__ = "0.01"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?hearthis\.at/.*(?<!#pyload)$... |
migrations | 0005_twilioaccount_twiliophonecallsender_twiliosmssender_twilioverificationsender | # Generated by Django 3.2.19 on 2023-05-25 15:32
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("twilioapp", "0004_twiliophonecall_twiliosms"),
]
operations = [
migrations.CreateModel(
name="T... |
PartDesign | SprocketFeature | # ***************************************************************************
# * Copyright (c) 2020 Adam Spontarelli <adam@vector-space.org> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
code | planet | #!/usr/bin/env python
"""The Planet aggregator.
A flexible and easy-to-use aggregator for generating websites.
Visit http://www.planetplanet.org/ for more information and to download
the latest version.
Requires Python 2.1, recommends 2.3.
"""
__authors__ = [ "Scott James Remnant <scott@netsplit.com>",
... |
AppImage-builder | create_appimage | # Copyright (c) 2023 UltiMaker
# Cura is released under the terms of the LGPLv3 or higher.
import argparse
import os
import shutil
import subprocess
from pathlib import Path
from jinja2 import Template
def prepare_workspace(dist_path, appimage_filename):
"""
Prepare the workspace for building the AppImage.
... |
lib | strings | """
This file is part of the Stargate project, Copyright Stargate Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation version 3 of the License.
This program is distributed in the hope that it will b... |
accounts | UpleaCom | # -*- coding: utf-8 -*-
import re
import time
from ..base.account import BaseAccount
class UpleaCom(BaseAccount):
__name__ = "UpleaCom"
__type__ = "account"
__version__ = "0.02"
__status__ = "testing"
__description__ = """UpleaCom account plugin"""
__license__ = "GPLv3"
__authors__ = [(... |
gui | toolbar | # This file is part of MyPaint.
# Copyright (C) 2011-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... |
engines | postgresql | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
PostgreSQL database (Offline)
"""
# error is ignored because the admin has to
# install it manually to use the engine
# pylint: disable=import-error
import psycopg2
engine_type = "offline"
host = "127.0.0.1"
port = "5432"
database = ""
username = ""
password = ""
que... |
ofdm | benchmark_add_channel | #!/usr/bin/env python
#
# Copyright 2010,2011 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 optparse import OptionParser
from gnuradio import blocks, channels, eng_notation, gr
from gnuradio.eng_option imp... |
radio-crawler | fetch_cast | #!/usr/bin/env python2
# Copyright 2011,2014 Christoph Reiter
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
"""
Loa... |
clientScripts | identify_file_format | #!/usr/bin/env python
import argparse
import multiprocessing
import uuid
import django
django.setup()
from databaseFunctions import getUTCDate, insertIntoEvents
from django.db import transaction
# archivematicaCommon
from executeOrRunSubProcess import executeOrRun
# dashboard
from fpr.models import FormatVersion, I... |
dissemin | model_gettext | # coding:utf-8
gettext("Computer science, knowledge & systems")
gettext("Bibliographies")
gettext("Library & information sciences")
gettext("Encyclopedias & books of facts")
gettext("Magazines, journals & serials")
gettext("Associations, organizations & museums")
gettext("News media, journalism & publishing")
gettext("... |
aliceVision | PanoramaPostProcessing | __version__ = "2.0"
import json
import os
from meshroom.core import desc
class PanoramaPostProcessing(desc.CommandLineNode):
commandLine = "aliceVision_panoramaPostProcessing {allParams}"
cpu = desc.Level.NORMAL
ram = desc.Level.INTENSIVE
category = "Panorama HDR"
documentation = """
Post proce... |
gui | import_network_panel | # --------------------------------------------------------------------------
# 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... |
minimode | minimode_preferences | # Copyright (C) 2009-2010 Mathias Brodala
#
# 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... |
gamedata | metaData | # ===============================================================================
# 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, ... |
installer | fix_qt5_rpath | """Methods to fix Mac OS X @rpath and /usr/local dependencies, and analyze the
app bundle for OpenShot to find all external dependencies"""
import os
import re
import shutil
import subprocess
from subprocess import call
# Ignore non library/executable extensions
non_executables = [
".py",
".svg",
".png"... |
gui | optionspanel | # 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... |
v1 | notifications | from typing import List
from CTFd.api.v1.helpers.request import validate_args
from CTFd.api.v1.helpers.schemas import sqlalchemy_to_pydantic
from CTFd.api.v1.schemas import APIDetailedSuccessResponse, APIListSuccessResponse
from CTFd.constants import RawEnum
from CTFd.models import Notifications, db
from CTFd.schemas.... |
network | vector_source | #!/usr/bin/env python
#
# Copyright 2006,2010,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from argparse import ArgumentParser
from gnuradio import blocks, gr
class vector_source(gr.top_block):
def __init__(self, host, port, pkt_size, e... |
dialogs | detectdialog | # Copyright (C) 2011 Chris Dekter
# 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) a... |
extractor | parliamentliveuk | from __future__ import unicode_literals
from .common import InfoExtractor
class ParliamentLiveUKIE(InfoExtractor):
IE_NAME = "parliamentlive.tv"
IE_DESC = "UK parliament videos"
_VALID_URL = r"(?i)https?://(?:www\.)?parliamentlive\.tv/Event/Index/(?P<id>[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]... |
femexamples | constraint_centrif | # ***************************************************************************
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
components | filepath | #!/usr/bin/env python
# coding:utf-8
import os
from PySide2.QtCore import QFileInfo, QObject, QUrl, Slot
class FilepathHelper(QObject):
"""
FilepathHelper gives access to file path methods not available from JS.
It should be non-instantiable and expose only static methods, but this is not yet
possib... |
lib | portable | """
Library functions related to special features of the Windows portable
flash drive install.
"""
import os
import pathlib
from sglib.constants import IS_MACOS, IS_WINDOWS, USER_HOME
from sglib.log import LOG
def escape_path(path):
if IS_WINDOWS:
folder_drive = pathlib.Path(path).drive.upper()
... |
backend | utils | # -*- 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 General Public License
# as published by the Free Software Foundation; either version 2
# of the Licen... |
gui-qt | dictionary_editor | from collections import namedtuple
from itertools import chain
from operator import attrgetter, itemgetter
from plover import _
from plover.gui_qt.dictionary_editor_ui import Ui_DictionaryEditor
from plover.gui_qt.steno_validator import StenoValidator
from plover.gui_qt.utils import ToolBar, WindowState
from plover.mi... |
downloaders | FilefoxCc | # -*- coding: utf-8 -*-
import re
import urllib.parse
import pycurl
from ..anticaptchas.HCaptcha import HCaptcha
from ..anticaptchas.ReCaptcha import ReCaptcha
from ..base.xfs_downloader import XFSDownloader
from ..helpers import parse_html_tag_attr_value
class FilefoxCc(XFSDownloader):
__name__ = "FilefoxCc"
... |
PyObjCTest | test_specialtypecodes_charint | """
Test handling of the private typecodes: _C_CHAR_AS_INT
This typecode doesn't actually exists in the ObjC runtime but
are private to PyObjC. We use these to simplify the bridge code
while at the same time getting a higher fidelity bridge.
- Add tests for calling methods from ObjC
"""
import array
import weakref
... |
vidcutter | videocutter | #!/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... |
photocollage | render | # Copyright (C) 2014 Adrien Vergé
#
# 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.
#
# This program is distributed in t... |
draftviewproviders | view_fillet | # ***************************************************************************
# * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
decrypters | GofileIoFolder | # -*- coding: utf-8 -*-
import base64
import json
from pyload.core.network.http.exceptions import BadHeader
from ..base.decrypter import BaseDecrypter
class GofileIoFolder(BaseDecrypter):
__name__ = "GofileIoFolder"
__type__ = "decrypter"
__version__ = "0.02"
__status__ = "testing"
__pattern__... |
frescobaldi-app | recentfiles | # 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
... |
prefs | prefs_fonts | # -*- coding: utf-8 -*-
#
# Copyright (C) 2016 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.... |
profiles | extension | """
ExtensionItem -- Graphical representation of an association.
"""
from gaphor import UML
from gaphor.diagram.presentation import LinePresentation, Named
from gaphor.diagram.shapes import Box, Text
from gaphor.diagram.support import represents
from gaphor.UML.recipes import stereotypes_str
@represents(UML.Extensio... |
archiver | serve_cmd | import argparse
from ..constants import * # NOQA
from ..helpers import EXIT_SUCCESS, parse_storage_quota
from ..logger import create_logger
from ..remote import RepositoryServer
from ._common import Highlander
logger = create_logger()
class ServeMixIn:
def do_serve(self, args):
"""Start in server mode.... |
models | trylater | # 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, ... |
rights | ingest_urls | # 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 ... |
PyObjCTest | test_list_proxy | """
Minimal tests for sequence proxies
NOTE: this file is very, very incomplete and just tests copying at the moment.
"""
import sys
import objc
from PyObjCTest.fnd import NSArray, NSMutableArray, NSNull, NSObject, NSPredicate
from PyObjCTest.pythonset import OC_TestSet
from PyObjCTools.TestSupport import *
OC_Pytho... |
lib | history | #!/usr/bin/env python3
"""
This file is part of the Stargate project, Copyright Stargate Team
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 3 of the License.
This program is distributed i... |
extractor | shahid | # coding: utf-8
from __future__ import unicode_literals
import json
import math
import re
from ..compat import compat_HTTPError
from ..utils import (
ExtractorError,
InAdvancePagedList,
clean_html,
int_or_none,
parse_iso8601,
str_or_none,
urlencode_postdata,
)
from .aws import AWSIE
clas... |
Gui | Hop | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it a... |
controllers | editor_text | # -*- coding: utf-8 -*-
#
# Copyright (C) 2016 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.... |
modules | mod_tracker_lastfm | # MusicPlayer, https://github.com/albertz/music-player
# Copyright (c) 2012, Albert Zeyer, www.az2000.de
# All rights reserved.
# This code is under the 2-clause BSD license, see License.txt in the root directory of this project.
""" This is the Last.fm tracker module. """
import sys
import appinfo
import lastfm
from... |
models | messaging | import hashlib
from django.conf import settings
from django.db import models
from .utils import UUIDModel
def get_email_hash(email: str) -> str:
return hashlib.sha256(f"{settings.SECRET_KEY}_{email}".encode()).hexdigest()
class MessagingRecordManager(models.Manager):
def get_or_create(self, defaults=None,... |
blocks | qa_vector_map | #!/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 math
from gnuradio import blocks, gr, gr_unittest
class test_vector_map(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block... |
downloaders | RedtubeCom | # -*- coding: utf-8 -*-
import json
import re
from ..base.downloader import BaseDownloader
class RedtubeCom(BaseDownloader):
__name__ = "RedtubeCom"
__type__ = "downloader"
__version__ = "0.28"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?redtube\.com/\d+"
__config__ = [("enabl... |
admin | link_domains | """ Manage link domains"""
from bookwyrm import forms, models
from bookwyrm.models.report import APPROVE_DOMAIN, BLOCK_DOMAIN
from bookwyrm.views.helpers import redirect_to_referer
from django.contrib.auth.decorators import login_required, permission_required
from django.shortcuts import get_object_or_404, redirect
fro... |
misc | throttle | # SPDX-FileCopyrightText: Jay Kamat <jaygkamat@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""A throttle for throttling function calls."""
import dataclasses
import time
from typing import Any, Callable, Mapping, Optional, Sequence
from qutebrowser.qt.core import QObject
from qutebrowser.utils import us... |
restapi | downloads_endpoint | from asyncio import CancelledError
from asyncio import TimeoutError as AsyncTimeoutError
from asyncio import wait_for
from binascii import unhexlify
from contextlib import suppress
from pathlib import PurePosixPath
from aiohttp import web
from aiohttp_apispec import docs, json_schema
from ipv8.messaging.anonymization.... |
mtcnn | layer_factory | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2018 Iván de Paz Centeno
#
# 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 l... |
booster | remove | import eos.db
import gui.mainFrame
import wx
from gui import globalEvents as GE
from gui.fitCommands.calc.booster.remove import CalcRemoveBoosterCommand
from gui.fitCommands.helpers import InternalCommandHistory
from service.fit import Fit
from service.market import Market
class GuiRemoveBoostersCommand(wx.Command):
... |
misc | consolewidget | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Debugging console."""
import code
import sys
from typing import MutableSequence
from qutebrowser.config import stylesheet
from qutebrowser.misc import cmdhistory, miscwidgets
from qutebrows... |
modes | connectionmanager | #
# Copyright (C) 2011 Nick Lanham <nick@afternight.org>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import deluge.com... |
extractor | mediasite | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from ..compat import compat_str, compat_urlparse
from ..utils import (
ExtractorError,
float_or_none,
mimetype2ext,
str_or_none,
try_get,
unescapeHTML,
unsmuggle_url,
url_or_none,
urljoin,
)
from .common ... |
extractor | huffpost | from __future__ import unicode_literals
import re
from ..utils import determine_ext, parse_duration, unified_strdate
from .common import InfoExtractor
class HuffPostIE(InfoExtractor):
IE_DESC = "Huffington Post"
_VALID_URL = r"""(?x)
https?://(embed\.)?live\.huffingtonpost\.com/
(?:
... |
browsers | filesystem | # Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna
# 2012-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 yo... |
utils | progress | import os
from collections import deque
from math import floor
from pathlib import PurePath
from shutil import get_terminal_size
from string import Formatter as StringFormatter
from threading import Event, RLock, Thread
from time import time
from typing import Callable, Deque, Dict, Iterable, List, Optional, TextIO, Tu... |
examples | pyqt_histogram_f | #!/usr/bin/env python
#
# Copyright 2013,2015 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
from gnuradio import blocks, gr
try:
import sip
from gnuradio import qtgui
from PyQt5 import Qt, QtWidgets
except ImportError:
s... |
PyObjCTest | test_identity | # Some tests that verify that object identity is correctly retained
# accross the bridge
#
# TODO:
# - Add unittests here for every class that is treated specially by
# the bridge.
# - Add unittests that test for "real-world" scenarios (writing stuff
# to plists, ...)
# - Implement the required functionality
from _... |
extractor | lecturio | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import (
ExtractorError,
clean_html,
determine_ext,
float_or_none,
int_or_none,
str_or_none,
url_or_none,
urlencode_postdata,
urljoin,
)
from .common import InfoExtractor
class LecturioBaseIE(InfoExtra... |
PyObjCTest | test_nsnumberformatter | from Foundation import *
from PyObjCTools.TestSupport import *
class TestNSNumberFormatter(TestCase):
def testConstants(self):
self.assertEqual(NSNumberFormatterNoStyle, kCFNumberFormatterNoStyle)
self.assertEqual(NSNumberFormatterDecimalStyle, kCFNumberFormatterDecimalStyle)
self.assertEq... |
internal | deprecation | import contextlib
import re
import warnings
# Messages used in deprecation warnings are collected here so we can target
# them easily when ignoring warnings.
_MESSAGES = {
# Deprecated features in core playback:
"core.playback.play:tl_track_kwargs": (
'playback.play() with "tl_track" argument is pendin... |
serializers | users | from apps.api.permissions import LegacyAccessControlRole
from apps.slack.models import SlackUserIdentity
from apps.user_management.models import User
from common.api_helpers.mixins import EagerLoadingMixin
from rest_framework import serializers
class SlackUserIdentitySerializer(serializers.ModelSerializer):
user_... |
interface | searchtree | # -*- coding: utf-8 -*-
#
# gPodder - A media aggregator and podcast client
# Copyright (c) 2005-2018 The gPodder Team
#
# gPodder 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 Licens... |
parts | containers | # 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
... |
QT | PantallaBMT | import os.path
import time
from Code import BMT, Analisis, ControlPGN, ControlPosicion, Partida, TrListas, Util
from Code.Constantes import *
from Code.QT import (
Colocacion,
Columnas,
Controles,
Delegados,
FormLayout,
Grid,
Iconos,
QTUtil,
QTUtil2,
QTVarios,
Tablero,
)
fro... |
core | Constants | """
Copyright 2008-2016 Free Software Foundation, Inc.
Copyright 2021 GNU Radio contributors
This file is part of GNU Radio
SPDX-License-Identifier: GPL-2.0-or-later
"""
import numbers
import os
import stat
import numpy
# Data files
DATA_DIR = os.path.dirname(__file__)
BLOCK_DTD = os.path.join(DATA_DIR, "block.dt... |
engines | peertube | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
peertube (Videos)
"""
from datetime import datetime
from json import loads
from urllib.parse import urlencode
from searx.utils import html_to_text
# about
about = {
"website": "https://joinpeertube.org",
"wikidata_id": "Q50938515",
"official_api_documenta... |
deep-learning | segment | import itertools
import multiprocessing
import os
import pathlib
import sys
import tempfile
import traceback
import invesalius.data.slice_ as slc
import numpy as np
from invesalius import inv_paths
from invesalius.data import imagedata_utils
from invesalius.data.converters import to_vtk
from invesalius.net.utils impor... |
plugins | toolkit_sphinx_extension | # encoding: utf-8
"""A Sphinx extension to automatically document CKAN's crazy plugins toolkit,
autodoc-style.
Sphinx's autodoc extension can document modules or classes, but although it
masquerades as a module CKAN's plugins toolkit is actually neither a module nor
a class, it's an object-instance of a class, and it... |
analog | qa_phase_modulator | #!/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 math
from gnuradio import analog, blocks, gr, gr_unittest
def sincos(x):
return math.cos(x) + math.sin(x) * 1j
class test_phase_modulator(gr... |
bleachbit | setup | #!/usr/bin/env python
# vim: ts=4:sw=4:expandtab
# BleachBit
# Copyright (C) 2008-2023 Andrew Ziem
# https://www.bleachbit.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 3... |
puddlestuff | actiondlg | # -*- coding: utf-8 -*-
import os
import sys
from copy import copy, deepcopy
from functools import partial
from pyparsing import Combine, QuotedString, Word, alphanums, delimitedList
from PyQt5.QtCore import Qt, pyqtSignal
from PyQt5.QtWidgets import (
QAbstractItemView,
QAction,
QApplication,
QCheckBo... |
femexamples | material_multiple_bendingbeam_fiveboxes | # ***************************************************************************
# * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com> *
# * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> *
# * *
# * Th... |
formspree | routes | import formspree.forms.api as fa
import formspree.forms.endpoint as fe
import formspree.forms.views as fv
import formspree.static_pages.views as sv
import formspree.users.views as uv
def configure_routes(app):
app.add_url_rule("/", "index", view_func=sv.default, methods=["GET"])
app.add_url_rule("/favicon.ico... |
core | Config | #####################################################################
# -*- coding: utf-8 -*- #
# #
# Frets on Fire #
# Copyright (C) 2006 Sami Kyöstilä ... |
restapi | remote_query_endpoint | import time
from binascii import unhexlify
from aiohttp import web
from aiohttp_apispec import docs, querystring_schema
from ipv8.REST.schema import schema
from marshmallow.fields import List, String
from pony.orm import db_session
from tribler.core.components.gigachannel.community.gigachannel_community import (
G... |
action | create | # encoding: utf-8
"""API functions for adding data to CKAN."""
from __future__ import annotations
import datetime
import logging
import random
import re
from socket import error as socket_error
from typing import Any, Union, cast
import ckan.authz as authz
import ckan.common
import ckan.lib.api_token as api_token
im... |
quodlibet | _init | # Copyright 2012 Christoph Reiter
# 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 version 2 of the License, or
# (at your option) any later version.
impo... |
comic | tencentbase | #!/usr/bin/env python3
# encoding: utf-8
# http://ac.qq.com或者http://m.ac.qq.com网站的免费漫画的基类,简单提供几个信息实现一个子类即可推送特定的漫画
# Author: insert0003 <https://github.com/insert0003>
import base64
import json
import re
import urlparse
from books.base import BaseComicBook
from bs4 import BeautifulSoup
from lib.autodecoder import AutoD... |
extractor | baidu | # coding: utf-8
from __future__ import unicode_literals
import re
from ..utils import unescapeHTML
from .common import InfoExtractor
class BaiduVideoIE(InfoExtractor):
IE_DESC = "百度视频"
_VALID_URL = r"https?://v\.baidu\.com/(?P<type>[a-z]+)/(?P<id>\d+)\.htm"
_TESTS = [
{
"url": "http:... |
Points | Init | # ***************************************************************************
# * Copyright (c) 2004,2005 Juergen Riegel <juergen.riegel@web.de> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
pwidgets | ctxmenu | # -*- coding: utf-8 -*-
#
# Copyright (C) 2018 by Ihor E. Novikov
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... |
internal | update_warnings | import json
from contextlib import nullcontext, suppress
from datetime import datetime, timedelta
from pathlib import Path
from typing import Any, Callable, Optional
import httpie
import requests
from httpie.context import Environment, LogLevel
from httpie.internal.__build_channel__ import BUILD_CHANNEL
from httpie.in... |
gui | properties_window | from __future__ import absolute_import
import grp
import locale
import os
import pwd
import time
from gi.repository import Gdk, Gio, GObject, Gtk, Pango
from sunflower import common
from sunflower.plugin_base.monitor import MonitorSignals
from sunflower.plugin_base.provider import Support
class Column:
SELECTED... |
AddonManager | addonmanager_uninstaller | # SPDX-License-Identifier: LGPL-2.1-or-later
# ***************************************************************************
# * *
# * Copyright (c) 2022 FreeCAD Project Association *
# * ... |
Gui | Preferences | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> *
# * *
# * This program is free software; you can redistribute it a... |
PrinterOutput | PrinterOutputDevice | # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from enum import IntEnum
from typing import Callable, List, Optional, Union
import cura.CuraApplication # Imported like this to prevent circular imports.
from PyQt6.QtCore import QObject, QTimer, QUrl, pyqtProperty, pyqtS... |
analog | wfm_rcv | #
# Copyright 2005,2007,2012,2020 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
from gnuradio import fft, filter, gr
from . import analog_python as analog
from .fm_emph import fm_deemph
class wfm_rcv(gr.hier_block2):
def __init_... |
gst | dynamic_sink | # Copyright (C) 2008-2010 Adam Olsen
# Copyright (C) 2013-2015 Dustin Spicuzza
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# Th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.