section stringlengths 2 30 | filename stringlengths 1 82 | text stringlengths 783 28M |
|---|---|---|
versions | b79d2fcafd88_comment_text | """Change comment text field from VARCHAR(255) to mysql.TEXT
Revision ID: b79d2fcafd88
Revises: ffd23e570f92
Create Date: 2017-08-14 18:57:44.165168
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = "b79d2fcafd88"
down_revisio... |
extractor | franceinter | # coding: utf-8
from __future__ import unicode_literals
from ..utils import month_by_name
from .common import InfoExtractor
class FranceInterIE(InfoExtractor):
_VALID_URL = r"https?://(?:www\.)?franceinter\.fr/emissions/(?P<id>[^?#]+)"
_TEST = {
"url": "https://www.franceinter.fr/emissions/affaires-... |
preferences | editor | # 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
... |
cactus | template_tags | # coding:utf-8
import logging
import os
from django.conf import settings
from django.template.base import Library
from django.utils.encoding import force_text
from django.utils.safestring import mark_safe
logger = logging.getLogger(__name__)
register = Library()
def static(context, link_url):
"""
Get the p... |
gdist | gettextutil | # Copyright 2015-2017 Christoph Reiter
# 2019-21 Nick Boultbee
#
# 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 ... |
executors | tornado | from __future__ import absolute_import
import sys
from concurrent.futures import ThreadPoolExecutor
from apscheduler.executors.base import BaseExecutor, run_job
from tornado.gen import convert_yielded
try:
from inspect import iscoroutinefunction
from apscheduler.executors.base_py3 import run_coroutine_job
e... |
service | implantSet | # =============================================================================
# Copyright (C) 2016 Ryan Holmes
#
# This file is part of pyfa.
#
# pyfa is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either v... |
StartPage | LoadNew | # ***************************************************************************
# * Copyright (c) 2018 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
util | artresizer | # This file is part of beets.
# Copyright 2016, Fabrice Laporte
#
# 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, ... |
doc | mocks | """
Provided so that we can build docs without needing to have any
dependencies installed (such as for RTFD).
Derived from https://read-the-docs.readthedocs.org/en/latest/faq.html
"""
import sys
class MockGiModule:
def __init__(self, *args, **kwargs):
pass
def __call__(self, *args, **kw... |
util | functemplate | # This file is part of beets.
# Copyright 2016, Adrian Sampson.
#
# 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, ... |
core | cmgl | #####################################################################
# -*- coding: utf-8 -*- #
# #
# Frets on Fire #
# Copyright (C) 2010 John Stumpo ... |
migrations | 0147_alter_user_preferred_language | # Generated by Django 3.2.12 on 2022-03-26 16:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("bookwyrm", "0146_auto_20220316_2352"),
]
operations = [
migrations.AlterField(
model_name="user",
name="preferred_la... |
decrypters | TusfilesNetFolder | # -*- coding: utf-8 -*-
import math
import re
import urllib.parse
from ..base.xfs_decrypter import XFSDecrypter
class TusfilesNetFolder(XFSDecrypter):
__name__ = "TusfilesNetFolder"
__type__ = "decrypter"
__version__ = "0.17"
__status__ = "testing"
__pattern__ = r"https?://(?:www\.)?tusfiles\.n... |
tunnel-community | speed_test_exit | import argparse
import asyncio
import os
from pathlib import Path
from ipv8.messaging.anonymization.tunnel import EXIT_NODE, ORIGINATOR
from ipv8.messaging.anonymization.utils import run_speed_test
from ipv8.taskmanager import TaskManager
from tribler.core.components.ipv8.ipv8_component import Ipv8Component
from tribl... |
forms | helpers | import hashlib
import json
import uuid
from urllib.parse import urljoin, urlparse
import hashids
import requests
import werkzeug.datastructures
from flask import g, jsonify, request
from flask_login import current_user
from formspree import settings
from formspree.stuff import DB, redis_store
CAPTCHA_URL = "https://w... |
utils | version | # SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
"""Utilities to show various version information."""
import configparser
import dataclasses
import datetime
import enum
import functools
import getpass
import glob
import importlib
import impor... |
views | alert_receive_channel_template | from apps.alerts.models import AlertReceiveChannel
from apps.api.permissions import RBACPermission
from apps.api.serializers.alert_receive_channel import (
AlertReceiveChannelTemplatesSerializer,
)
from apps.auth_token.auth import PluginAuthentication
from common.api_helpers.mixins import PublicPrimaryKeyMixin, Tea... |
plugins | soundcloud | # -*- 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... |
scripts | deps | """Check the installation dependencies and report the version numbers of each.
This is meant to be used as an error diagnostic tool.
"""
__copyright__ = "Copyright (C) 2016 Martin Blais"
__license__ = "GNU GPLv2"
import sys
import types
# pylint: disable=import-outside-toplevel
def list_dependencies(file=sys.stde... |
migrations | 0021_checksum_algorithms | from django.db import migrations, models
def data_migration(apps, schema_editor):
File = apps.get_model("main", "File")
DashboardSetting = apps.get_model("main", "DashboardSetting")
StandardTaskConfig = apps.get_model("main", "StandardTaskConfig")
File.objects.filter(checksumtype="").update(checksumt... |
mackup | utils | """System static utilities being used by the modules."""
import base64
import os
import platform
import shutil
import sqlite3
import stat
import subprocess
import sys
from six.moves import input
from . import constants
# Flag that controls how user confirmation works.
# If True, the user wants to say "yes" to everyt... |
OptionalManager | ContentDbPlugin | import collections
import itertools
import re
import time
import gevent
from Config import config
from Debug import Debug
from Plugin import PluginManager
from util import helper
if "content_db" not in locals().keys(): # To keep between module reloads
content_db = None
@PluginManager.registerTo("ContentDb")
cl... |
thumbor | build | # https://github.com/python-poetry/poetry/issues/11
import glob
import os
from distutils.command.build_ext import build_ext
from distutils.core import Extension
from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError
def filter_extension_module(name, lib_objs, lib_headers):
return... |
viewers | documents | # 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
... |
ui | ui_provider_options_caa | # -*- coding: utf-8 -*-
# Automatically generated - don't edit.
# Use `python setup.py build_ui` to update it.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_CaaOptions(object):
def setupUi(self, CaaOptions):
CaaOptions.setObjectName("CaaOptions")
CaaOptions.resize(660, 194)
self.v... |
chardet | langturkishmodel | # -*- coding: utf-8 -*-
######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial... |
custom-widgets | status_bar | from PyQt5 import QtCore, QtWidgets
class StatusBar(QtWidgets.QStatusBar):
def __init__(self, parent=None):
super(StatusBar, self).__init__(parent)
self.page_number = None
self.page_resolution = None
self.comic_path = None
self.progress_bar = None
self.slider = Non... |
events | thumbrating | # Copyright (C) 2018 Eoin O'Neill (eoinoneill1991@gmail.com)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
from gi.... |
migrations | 0127_stricter_team_data | # Generated by Django 3.0.6 on 2021-02-09 09:11
from django.db import migrations, models
def adjust_teams_for_stricter_requirements(apps, schema_editor):
Team = apps.get_model("posthog", "Team")
Organization = apps.get_model("posthog", "Organization")
first_organization = Organization.objects.order_by("i... |
mp-sched | wfm_rcv_pll_to_wav | #!/usr/bin/env python
#
# Copyright 2005,2006,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import math
import sys
from argparse import ArgumentParser
from gnuradio import analog, audio, blocks, eng_notation, filter, gr
from gnuradio.eng_arg i... |
disc | utils | # -*- coding: utf-8 -*-
#
# fix-header: nolicense
# MIT License
#
# Copyright(c) 2018 Konstantin Mochalov
# Copyright(c) 2022 Philipp Wolfer
#
# Original code from https://gist.github.com/kolen/765526
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated docu... |
examples | fft_filter_ccc | #!/usr/bin/env python
#
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import sys
from argparse import ArgumentParser
import numpy
from gnuradio import analog, blocks, eng_notation, filter, gr
from gnuradio.eng_arg import eng_float,... |
models | traffic | # 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, ... |
VersionUpgrade44to45 | VersionUpgrade44to45 | # Copyright (c) 2022 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
import configparser
import fnmatch # To filter files that we need to delete.
import io
import os # To get the path to check for hidden stacks to delete.
import re # To filter directories to search for hidden stacks to de... |
bittorrent | peer | # neubot/bittorrent/peer.py
#
# Copyright (c) 2011 Simone Basso <bassosimone@gmail.com>,
# NEXA Center for Internet & Society at Politecnico di Torino
#
# This file is part of Neubot <http://www.neubot.org/>.
#
# Neubot is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Pu... |
extractor | porn91 | # coding: utf-8
from __future__ import unicode_literals
from ..utils import ExtractorError, int_or_none, parse_duration
from .common import InfoExtractor
class Porn91IE(InfoExtractor):
IE_NAME = "91porn"
_VALID_URL = r"(?:https?://)(?:www\.|)91porn\.com/.+?\?viewkey=(?P<id>[\w\d]+)"
_TEST = {
"u... |
extractor | pluralsight | from __future__ import unicode_literals
import collections
import json
import os
import random
import re
from ..compat import compat_str, compat_urlparse
from ..utils import (
ExtractorError,
dict_get,
float_or_none,
int_or_none,
parse_duration,
qualities,
srt_subtitles_timecode,
try_g... |
migrations | 0007_dashboard_permissions | # Generated by Django 3.2.5 on 2022-01-31 20:50
import django.db.models.deletion
import posthog.models.utils
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("posthog", "0203_dashboard_permissions"),
migrations.swap... |
diagram | group | """Grouping functionality allows nesting of one item within another item
(parent item). This is useful in several use cases.
- artifact deployed within a node
- a class within a package, or a component
- composite structures (i.e. component within a node)
"""
from __future__ import annotations
import itertools
from ... |
BOPTools | ShapeMerge | # /***************************************************************************
# * Copyright (c) 2016 Victor Titov (DeepSOIC) <vv.titov@gmail.com> *
# * *
# * This file is part of the FreeCAD CAx development system. *
# * ... |
sunflower | keyring | from __future__ import absolute_import
try:
import gi
gi.require_version("GnomeKeyring", "1.0")
from gi.repository import GnomeKeyring as keyring
except:
keyring = None
else:
from gi.repository import GObject, Gtk
from sunflower.gui.input_dialog import InputDialog, PasswordDialog
class Entry... |
plugins | drdk | """
$description Live TV channels from DR, a Danish public, state-owned broadcaster.
$url dr.dk
$type live
$region Denmark
"""
import logging
import re
from streamlink.plugin import Plugin, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream.hls import HLSStream
log = logging.getLogger(__... |
contentprocessors | autotagger | import re
from apiproxy import ApiProxy
from logger import AmbarLogger
from model import AmbarTaggingRule
from parsers.contenttypeanalyzer import ContentTypeAnalyzer
class AutoTagger:
def __init__(self, Logger, ApiProxy):
self.logger = Logger
self.apiProxy = ApiProxy
self.AUTO_TAG_TYPE = ... |
PathTests | TestPathProfile | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2023 Robert Schöftner <rs@unfoo.net> *
# * Copyright (c) 2021 Russell Johnson (russ4262) <russ4262@gmail.com> *
# * ... |
implementation | core | import time
from collections import deque
import psutil
from ipv8.taskmanager import TaskManager
from tribler.core import notifications
from tribler.core.components.resource_monitor.implementation.base import ResourceMonitor
from tribler.core.components.resource_monitor.implementation.profiler import (
YappiProfil... |
config | file | # coding:utf-8
import json
import logging
logger = logging.getLogger(__name__)
class ConfigFile(object):
"""
A single config file, as present on the filesystem.
"""
_dirty = None
def __init__(self, path):
self.path = path
self.load()
def get(self, key, default=None):
... |
widgets | filter | # Filter Widget/Dialog
# Copyright (C) 2006 Johannes Sasongko <sasongko@gmail.com>
# 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... |
gui | gtkexcepthook | # -*- coding: utf-8 -*-
# (c) 2003 Gustavo J A M Carneiro gjc at inescporto.pt
# 2004-2005 Filip Van Raemdonck
#
# http://www.daa.com.au/pipermail/pygtk/2003-August/005775.html
# Message-ID: <1062087716.1196.5.camel@emperor.homelinux.net>
# "The license is whatever you want."
#
# This file was downloaded from h... |
covergrid | main | # Copyright 2004-2007 Joe Wreschnig, Michael Urman, Iñigo Serna
# 2009-2010 Steven Robertson
# 2012-2022 Nick Boultbee
# 2009-2014 Christoph Reiter
# 2022 Thomas Leberbauer
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Ge... |
cli | tracking | # encoding: utf-8
import csv
import datetime
from typing import NamedTuple, Optional
import ckan.logic as logic
import ckan.model as model
import click
from ckan.cli import error_shout
class ViewCount(NamedTuple):
id: str
name: str
count: int
@click.group(name="tracking", short_help="Update tracking s... |
config | server | __license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2022 The OctoPrint Project - Released under terms of the AGPLv3 License"
from enum import Enum
from typing import Dict, List, Optional
from octoprint.schema import BaseModel
from octoprint.vendor.wit... |
meshes | mesh_canticcx_seg2 | def create_nodes(femmesh):
# nodes
femmesh.addNode(0.0, 500.0, 500.0, 1)
femmesh.addNode(8000.0, 500.0, 500.0, 2)
femmesh.addNode(148.14814814814792, 500.0, 500.0, 3)
femmesh.addNode(296.29629629629585, 500.0, 500.0, 4)
femmesh.addNode(444.4444444444438, 500.0, 500.0, 5)
femmesh.addNode(592.... |
handlers | logging | """
raven.handlers.logging
~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
import datetime
import logging
import sys
import traceback
from raven.base import Clie... |
aliceVision | CameraRigCalibration | __version__ = "1.0"
import os
from meshroom.core import desc
class CameraRigCalibration(desc.AVCommandLineNode):
commandLine = "aliceVision_rigCalibration {allParams}"
category = "Utils"
documentation = """
"""
inputs = [
desc.File(
name="sfmdata",
label="SfMDat... |
core | compare_test | __copyright__ = "Copyright (C) 2014-2016 Martin Blais"
__license__ = "GNU GPLv2"
import unittest
from beancount import loader
from beancount.core import compare, data
TEST_INPUT = """
2012-02-01 open Assets:US:Cash
2012-02-01 open Assets:US:Credit-Card
2012-02-01 open Expenses:Grocery
2012-02-01 open Expenses:Coff... |
migrations | 0006_auto_20210321_1625 | # Generated by Django 3.0.7 on 2021-03-21 16:25
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("photos", "0005_auto_20210206_1032"),
]
operations = [
migrations.RemoveField(
model_name="photof... |
aliceVision | TracksBuilding | __version__ = "1.0"
from meshroom.core import desc
class TracksBuilding(desc.AVCommandLineNode):
commandLine = "aliceVision_tracksBuilding {allParams}"
size = desc.DynamicNodeSize("input")
category = "Sparse Reconstruction"
documentation = """
It fuses all feature matches between image pairs into tr... |
PyObjCTest | test_nsaffinetransform | #
# Tests for the struct-wrapper for NSAffineTransformStruct
#
import operator
from Foundation import *
from PyObjCTools.TestSupport import *
class TestNSAffineTransformStruct(TestCase):
def testConstructor(self):
p = NSAffineTransformStruct()
self.assert_(isinstance(p, NSAffineTransformStruct))
... |
downloaders | UploadgigCom | # -*- coding: utf-8 -*-
import json
import re
from pyload.core.utils.misc import eval_js
from ..anticaptchas.ReCaptcha import ReCaptcha
from ..base.simple_downloader import SimpleDownloader
class UploadgigCom(SimpleDownloader):
__name__ = "UploadgigCom"
__type__ = "downloader"
__version__ = "0.10"
... |
util | RateLimit | import logging
import time
import gevent
log = logging.getLogger("RateLimit")
called_db = {} # Holds events last call time
queue_db = {} # Commands queued to run
# Register event as called
# Return: None
def called(event, penalty=0):
called_db[event] = time.time() + penalty
# Check if calling event is all... |
find-file-extensions | contents | from __future__ import absolute_import
from gi.repository import Gtk
from sunflower.plugin_base.find_extension import FindExtension
from sunflower.plugin_base.provider import FileType, Mode
class ContentsFindFiles(FindExtension):
"""Extension for finding specified contents in files"""
def __init__(self, par... |
blocks | qa_copy | #!/usr/bin/env python
#
# Copyright 2009,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, gr, gr_unittest
class test_copy(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block()
def te... |
fingerprint | util | # Copyright 2011,2013,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.
import threading
import t... |
engines | flickr | # SPDX-License-Identifier: AGPL-3.0-or-later
"""
Flickr (Images)
More info on api-key : https://www.flickr.com/services/apps/create/
"""
from json import loads
from urllib.parse import urlencode
# about
about = {
"website": "https://www.flickr.com",
"wikidata_id": "Q103204",
"official_api_documentation... |
mackup | main | """Mackup.
Keep your application settings in sync.
Copyright (C) 2013-2021 Laurent Raufaste <http://glop.org/>
Usage:
mackup list
mackup [options] backup
mackup [options] restore
mackup show <application>
mackup [options] uninstall
mackup (-h | --help)
mackup --version
Options:
-h --help Show thi... |
utils | ops | # 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... |
friture | statisticswidget | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2013 Timoth�e Lecomte
# This file is part of Friture.
#
# Friture is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as published by
# the Free Software Foundation.
#
# Friture is distri... |
comictaggerlib | imagefetcher | """A class to manage fetching and caching of images by URL"""
# 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/LICEN... |
api | access | __author__ = "Marc Hannappel <salandora@gmail.com>"
__license__ = "GNU Affero General Public License http://www.gnu.org/licenses/agpl.html"
__copyright__ = "Copyright (C) 2017 The OctoPrint Project - Released under terms of the AGPLv3 License"
import octoprint.access.groups as groups
import octoprint.access.users as u... |
migrations | upgrade25 | """
Migration 25
- Converts T3C fitting configurations based on the spreadsheet noted here:
https://community.eveonline.com/news/patch-notes/patch-notes-for-july-2017-release
(csv copies can be found on the pyfa repo in case the official documents are deleted)
- For fits that don't have 5 subsystems, or for fits tha... |
utils | stacks | """
raven.utils.stacks
~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, division
import inspect
import linecache
import os
import re
import sys
from raven.utils.compat import... |
ui | coreconfig | #
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import logging
import deluge.... |
downloaders | FikperCom | # -*- coding: utf-8 -*-
import json
import re
from ..anticaptchas.HCaptcha import HCaptcha
from ..base.simple_downloader import SimpleDownloader
class FikperCom(SimpleDownloader):
__name__ = "FikperCom"
__type__ = "downloader"
__version__ = "0.01"
__status__ = "testing"
__pattern__ = r"https?:/... |
api | authentication | import datetime
import time
from typing import Any, Dict, Optional, cast
from uuid import uuid4
from django.conf import settings
from django.contrib.auth import authenticate, login
from django.contrib.auth import views as auth_views
from django.contrib.auth.password_validation import validate_password
from django.cont... |
addons | AppriseNotify | # -*- coding: utf-8 -*-
from ..base.notifier import Notifier
from ..helpers import check_module
class AppriseNotify(Notifier):
__name__ = "AppriseNotify"
__type__ = "addon"
__version__ = "0.02"
__status__ = "testing"
__config__ = [
("enabled", "bool", "Activated", False),
("confi... |
prototypes | jsarray | import six
if six.PY3:
xrange = range
import functools
def to_arr(this):
"""Returns Python array from Js array"""
return [this.get(str(e)) for e in xrange(len(this))]
ARR_STACK = set({})
class ArrayPrototype:
def toString():
# this function is wrong but I will leave it here fore debug... |
data | volume_widgets | # --------------------------------------------------------------------------
# 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... |
lector | threaded | # 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... |
extractors | tudou | #!/usr/bin/env python
__all__ = [
"tudou_download",
"tudou_download_playlist",
"tudou_download_by_id",
"tudou_download_by_iid",
]
from xml.dom.minidom import parseString
import you_get.extractors.acfun
from ..common import *
def tudou_download_by_iid(iid, title, output_dir=".", merge=True, info_on... |
data | styles | # --------------------------------------------------------------------------
# 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... |
digital | qa_constellation_soft_decoder_cf | #!/usr/bin/env python
#
# Copyright 2013-2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
from math import sqrt
from gnuradio import blocks, digital, gr, gr_unittest
from numpy import random, vectorize
class test_constellation_soft_decoder(gr_... |
previewdevice | previewprefs | # Copyright (C) 2012 Dustin Spicuzza
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... |
SimpleService | setup | """
Script for building the example.
Usage:
python setup.py py2app
"""
from distutils.core import setup
import py2app
plist = dict(
CFBundleIdentifier="net.sf.pyobjc.PyObjCSimpleService",
CFBundleName="PyObjCSimpleService",
LSBackgroundOnly=1,
NSServices=[
dict(
NSKeyEquivalen... |
WizardShaft | Shaft | # -*- coding: utf-8 -*-
# /******************************************************************************
# * Copyright (c) 2012 Jan Rheinländer <jrheinlaender@users.sourceforge.net> *
# * *
# * This file is part of the FreeCAD CAx developme... |
Part | JoinFeatures | # ***************************************************************************
# * Copyright (c) 2016 Victor Titov (DeepSOIC) <vv.titov@gmail.com> *
# * *
# * This program is free software; you can redistribute it and/or modify *
# * it... |
extractor | sunporno | from __future__ import unicode_literals
import re
from ..utils import determine_ext, int_or_none, parse_duration, qualities
from .common import InfoExtractor
class SunPornoIE(InfoExtractor):
_VALID_URL = r"https?://(?:(?:www\.)?sunporno\.com/videos|embeds\.sunporno\.com/embed)/(?P<id>\d+)"
_TESTS = [
... |
blocks | qa_tag_gate | #!/usr/bin/env python
#
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
import pmt
from gnuradio import blocks, gr, gr_unittest
class qa_tag_gate(gr_unittest.TestCase):
def setUp(self):
self.tb = gr.top_block()
def... |
scripts | check_test | __copyright__ = "Copyright (C) 2014, 2016 Martin Blais"
__license__ = "GNU GPLv2"
import unittest
import click.testing
from beancount.scripts import check
from beancount.utils import test_utils
class TestScriptCheck(test_utils.ClickTestCase):
@test_utils.docfile
def test_success(self, filename):
""... |
extractor | cloudy | # coding: utf-8
from __future__ import unicode_literals
from ..utils import str_to_int, unified_strdate
from .common import InfoExtractor
class CloudyIE(InfoExtractor):
_IE_DESC = "cloudy.ec"
_VALID_URL = (
r"https?://(?:www\.)?cloudy\.ec/(?:v/|embed\.php\?.*?\bid=)(?P<id>[A-Za-z0-9]+)"
)
_TE... |
draftmake | make_circle | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 FreeCAD Developers *
# * ... |
gui-qt | main_window | import json
import os
import subprocess
from functools import partial
from plover import _, log
from plover.gui_qt.about_dialog import AboutDialog
from plover.gui_qt.config_window import ConfigWindow
from plover.gui_qt.log_qt import NotificationHandler
from plover.gui_qt.main_window_ui import Ui_MainWindow
from plover... |
doxygen | update_pydoc | #
# Copyright 2010-2012 Free Software Foundation, Inc.
#
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gnuradio
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""
Updates the *pydoc_h files for a module
Execute using: python update_pydoc.py xml_path outputfilen... |
Part | MakeBottle | #! python
# -*- coding: utf-8 -*-
# (c) 2008 Werner Mayer LGPL
import math
import FreeCAD
import FreeCADGui
import Part
App = FreeCAD
Gui = FreeCADGui
from FreeCAD import Base
def makeBottle(myWidth=50.0, myHeight=70.0, myThickness=30.0):
aPnt1 = Base.Vector(-myWidth / 2.0, 0, 0)
aPnt2 = Base.Vector(-myWi... |
lib | subreddit_search | # 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, ... |
v1 | pages | 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.cache import clear_pages
from CTFd.constants import RawEnum
from CTFd.models import P... |
forum | locals | # -*- coding: utf-8 -*-
"""
flaskbb.forum.locals
~~~~~~~~~~~~~~~~~~~~
Thread local helpers for FlaskBB
:copyright: 2017, the FlaskBB Team
:license: BSD, see license for more details
"""
from flask import _request_ctx_stack, has_request_context, request
from werkzeug.local import LocalProxy
from .... |
gtk3 | new_release_dialog | #
# Copyright (C) 2008 Andrew Resch <andrewresch@gmail.com>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
import deluge.common
import de... |
gui | preferenceDialog | # =============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either ... |
download-manager | dht_health_manager | import math
from asyncio import Future
from typing import Awaitable
from ipv8.taskmanager import TaskManager
from tribler.core.components.libtorrent.utils.libtorrent_helper import libtorrent as lt
from tribler.core.components.torrent_checker.torrent_checker.dataclasses import (
HealthInfo,
)
from tribler.core.util... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.