section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
gdist
dbus_services
# Copyright 2013-2016 Christoph Reiter # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, #...
activity
email_notifications
# encoding: utf-8 """ Code for generating email notifications for users (e.g. email notifications for new activities in your dashboard activity stream) and emailing them to the users. """ from __future__ import annotations import datetime import re from typing import Any import ckan.lib.jinja_extensions as jinja_ex...
wikipedia
preferences
# Copyright (C) 2010 Guillaume Lecomte # # 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 th...
qltk
edittags
# Copyright 2004-2012 Joe Wreschnig, Michael Urman, Iñigo Serna # 2011-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...
qltk
tracker
# Copyright 2004-2005 Joe Wreschnig, Michael Urman, Iñigo Serna # 2013 Christoph Reiter # 2020-2021 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; eithe...
src
DigitalFactoryApiClient
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import json import re from json import JSONDecodeError from time import time from typing import ( Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar, Union, cast, ) from cura....
plugins
fm1
# -*- coding: utf-8 -*- """ 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...
extractor
aljazeera
from __future__ import unicode_literals import json import re from .common import InfoExtractor class AlJazeeraIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?aljazeera\.com/(?P<type>program/[^/]+|(?:feature|video)s)/\d{4}/\d{1,2}/\d{1,2}/(?P<id>[^/?&#]+)" _TESTS = [ { "url": "http...
templatetags
core_tags
from typing import Union from django import template from django.contrib.admin.templatetags.base import InclusionAdminNode register = template.Library() @register.filter(name="split") def split(value, separator: str = ","): return (value or "").split(separator) @register.filter def file_size(num_bytes: Union[...
serializers
paging
from apps.alerts.models import AlertGroup from common.api_helpers.custom_fields import TeamPrimaryKeyRelatedField from common.api_helpers.utils import CurrentTeamDefault from django.core.exceptions import ObjectDoesNotExist from rest_framework import serializers class UserReferenceSerializer(serializers.Serializer): ...
bup
vfs
"""Virtual File System interface to bup repository content. This module provides a path-based interface to the content of a bup repository. The VFS is structured like this: /SAVE-NAME/latest/... /SAVE-NAME/SAVE-DATE/... /.tag/TAG-NAME/... Each path is represented by an item that has least an item.meta which m...
QT
WBG_GamesFEN
import codecs import os from Code import DBgamesFEN, Partida, TrListas, Util from Code.QT import ( Colocacion, Columnas, Controles, Grid, Iconos, PantallaPGN, PantallaSolo, QTUtil2, QTVarios, Voyager, ) from PyQt4 import QtCore, QtGui class WGamesFEN(QtGui.QWidget): def __...
scripts
ColorMix
# ColorMix script - 2-1 extruder color mix and blending # This script is specific for the Geeetech A10M dual extruder but should work with other Marlin printers. # It runs with the PostProcessingPlugin which is released under the terms of the LGPLv3 or higher. # This script is licensed under the Creative Commons - Attr...
listener
polling
# coding:utf-8 import logging import os import threading import time import six from cactus.utils.filesystem import fileList from cactus.utils.network import retry class PollingListener(object): def __init__(self, path, f, delay=0.5, ignore=None): self.path = path self.f = f self.delay = ...
v1
teams
import copy 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, PaginatedAPIListSuccessResponse, ) from CTFd.cache import ( clear_challenges, clear_stan...
lib
userdecompress
import math import re from __builtin__ import unichr as chr keyStrBase64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" baseReverseDic = {} class Object(object): def __init__(self, **kwargs): for k, v in kwargs.items(): setattr(self, k, v) def getBaseValue(alphabet, ...
addons
PushOver
# -*- coding: utf-8 -*- from ..base.notifier import Notifier class PushOver(Notifier): __name__ = "PushOver" __type__ = "addon" __version__ = "0.08" __status__ = "testing" __config__ = [ ("enabled", "bool", "Activated", False), ("tokenkey", "str", "Token key", ""), ("user...
nyaa
sync_es
#!/usr/bin/env python """ stream changes in mysql (on the torrents and statistics table) into elasticsearch as they happen on the binlog. This keeps elasticsearch in sync with whatever you do to the database, including stuff like admin queries. Also, because mysql keeps the binlog around for N days before deleting old ...
extractor
cspan
from __future__ import unicode_literals import re from ..utils import ( ExtractorError, determine_ext, extract_attributes, find_xpath_attr, get_element_by_attribute, get_element_by_class, int_or_none, js_to_json, merge_dicts, parse_iso8601, smuggle_url, str_to_int, ...
misc
crashsignal
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Handlers for crashes and OS signals.""" import argparse import bdb import dataclasses import faulthandler import functools import os import os.path import pdb # noqa: T002 import signal imp...
preferences
export
""" Let users export their book data """ import csv import io from bookwyrm import models from django.contrib.auth.decorators import login_required from django.db.models import Q from django.http import HttpResponse from django.template.response import TemplateResponse from django.utils.decorators import method_decora...
etc
gunicorn
# Server mechanics bind = "0.0.0.0:8000" backlog = 2048 daemon = False pidfile = None umask = 0 user = None group = None tmp_upload_dir = None proc_name = None # Logging errorlog = "-" loglevel = "info" accesslog = "-" access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"' # # Worker proces...
Test
TestConnectionServer
import socket import time import gevent import mock import pytest from Config import config from Connection import ConnectionServer from Crypt import CryptConnection @pytest.mark.usefixtures("resetSettings") class TestConnection: def testIpv6(self, file_server6): assert ":" in file_server6.ip cl...
RemovableDriveOutputDevice
LinuxRemovableDrivePlugin
# Copyright (c) 2015 Ultimaker B.V. # Copyright (c) 2013 David Braam # Uranium is released under the terms of the LGPLv3 or higher. import glob import os import subprocess from UM.Logger import Logger from . import RemovableDrivePlugin class LinuxRemovableDrivePlugin(RemovableDrivePlugin.RemovableDrivePlugin): ...
remote-query-community
remote_query_community
import json import struct import time from asyncio import Future from binascii import unhexlify from itertools import count from typing import Any, Dict, List, Optional, Set from ipv8.lazy_community import lazy_wrapper from ipv8.messaging.lazy_payload import VariablePayload, vp_compile from ipv8.requestcache import Nu...
gadgets
cursorkeys
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2016 - 2016 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 ...
src
protocol
""" Low-level protocol-related functions. """ # pylint: disable=too-many-boolean-expressions,too-many-return-statements # pylint: disable=too-many-locals,too-many-statements import base64 import hashlib import random import socket import sys import time from binascii import hexlify from struct import Struct, pack, unp...
rest
utils
""" This file contains some utility methods that are used by the API. """ import linecache import sys import threading from types import FrameType from typing import Dict, Iterator, List, Optional from tribler.core.components.restapi.rest.rest_endpoint import ( HTTP_INTERNAL_SERVER_ERROR, RESTResponse, ) from ...
Models
IntentSelectionModel
# Copyright (c) 2023 UltiMaker # Cura is released under the terms of the LGPLv3 or higher. import collections from typing import Optional import cura from cura.Machines.Models.IntentCategoryModel import IntentCategoryModel from cura.Settings.IntentManager import IntentManager from PyQt6.QtCore import QObject, Qt, QTi...
imageserver
template_attrs
# # Quru Image Server # # Document: template_attrs.py # Date started: 12 May 2011 # By: Matt Fozard # Purpose: Wrapper for an image template definition # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it...
archive-support
zip_provider
from __future__ import absolute_import import datetime import io import os import time import zipfile from sunflower.plugin_base.provider import ( FileInfo, FileInfoExtended, FileType, Mode, Provider, Support, SystemSize, ) class ZipProvider(Provider): """Provider for handling of ZIP...
legecy-translators
exps
""" exp_translate routine: It takes a single line of JS code and returns a SINGLE line of Python code. Note var is not present here because it was removed in previous stages. Also remove this useless void keyword If case of parsing errors it must return a pos of error. 1. Convert all assignment operations to put operat...
builtinPreferenceViews
pyfaContextMenuPreferences
import gui.mainFrame import wx from gui.bitmap_loader import BitmapLoader from gui.preferenceView import PreferenceView from service.settings import ContextMenuSettings _t = wx.GetTranslation class PFContextMenuPref(PreferenceView): def populatePanel(self, panel): self.title = _t("Context Menus") ...
mako
exceptions
# mako/exceptions.py # Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """exception classes""" import sys import traceback from mako import compat, util class Mak...
PyObjCTest
test_set_interface
""" Tests if NSSet conforms to the interface of the python type set() This is a port of the set tests from the Python stdlib for 3.2 """ import operator import objc from PyObjCTools.TestSupport import * NSSet = objc.lookUpClass("NSSet") NSMutableSet = objc.lookUpClass("NSMutableSet") import test.test_set from test....
osf
forms
#!/usr/bin/env python # -*- coding: utf-8 -*- # Dissemin: open access policy enforcement tool # Copyright (C) 2014 Antonin Delpeuch # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License # as published by the Free Software Foundation; eith...
commands
plugin_server_load_test
import dataclasses import datetime as dt import logging import secrets import sys import time from itertools import chain import structlog from django.conf import settings from django.core.management.base import BaseCommand from kafka import KafkaAdminClient, KafkaConsumer, TopicPartition from posthog.api.capture impo...
cli
db
# encoding: utf-8 from __future__ import annotations import contextlib import inspect import logging import os from itertools import groupby from typing import Optional import ckan.migration as migration_repo import ckan.model as model import ckan.plugins as p import click from ckan.common import config from . impor...
tasks
verify_persons_data_in_sync
import json from collections import Counter, defaultdict from datetime import timedelta from typing import Any, Dict, List import structlog from django.db.models.query import Prefetch from django.utils.timezone import now from posthog.celery import app from posthog.client import sync_execute from posthog.models.person...
core
minibatch_sampler
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
ui
ui_options_metadata
# -*- 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_MetadataOptionsPage(object): def setupUi(self, MetadataOptionsPage): MetadataOptionsPage.setObjectName("MetadataOptionsPage") Metada...
youtube-dl
utils
#!/usr/bin/env python # coding: utf-8 from __future__ import unicode_literals import base64 import binascii import calendar import codecs import collections import contextlib import ctypes import datetime import email.header import email.utils import errno import functools import inspect import io import itertools im...
imports
import_data
""" import books from another app """ import datetime from io import TextIOWrapper from bookwyrm import forms, models from bookwyrm.importers import ( CalibreImporter, GoodreadsImporter, LibrarythingImporter, OpenLibraryImporter, StorygraphImporter, ) from bookwyrm.settings import PAGE_LENGTH from ...
downloaders
YoupornCom
# -*- coding: utf-8 -*- import re from ..base.downloader import BaseDownloader class YoupornCom(BaseDownloader): __name__ = "YoupornCom" __type__ = "downloader" __version__ = "0.26" __status__ = "testing" __pattern__ = r"http://(?:www\.)?youporn\.com/watch/.+" __config__ = [("enabled", "boo...
PyObjCTest
test_cfbinaryheap
from CoreFoundation import * from PyObjCTools.TestSupport import * try: long except NameError: long = int class TestCFBinaryHeap(TestCase): def testTypes(self): self.assertIsCFType(CFBinaryHeapRef) def testCreation(self): heap = CFBinaryHeapCreate(None, 0) self.assert_(isinst...
xlgui
collection
# 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...
clientScripts
create_transfer_mets
#!/usr/bin/env python # # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, ...
src
openclpow
""" Module for Proof of Work using OpenCL """ import logging import os from struct import pack import paths from bmconfigparser import config from state import shutdown try: import numpy import pyopencl as cl libAvailable = True except ImportError: libAvailable = False logger = logging.getLogger("d...
builtinItemStatsViews
itemRequirements
# noinspection PyPackageRequirements import wx from gui.bitmap_loader import BitmapLoader class ItemRequirements(wx.Panel): def __init__(self, parent, stuff, item): wx.Panel.__init__(self, parent, style=wx.TAB_TRAVERSAL) # itemId is set by the parent. self.romanNb = [ "0", ...
migrations
0075_announcement
# Generated by Django 3.2 on 2021-05-20 19:34 import bookwyrm.models.fields import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0074_auto_20210511_1829"), ] operations = [...
archiver
benchmark_cmd
import argparse import functools import os import tempfile import time from contextlib import contextmanager from ..constants import * # NOQA from ..crypto.key import FlexiKey from ..helpers import format_file_size, msgpack from ..item import Item from ..platform import SyncFile class BenchmarkMixIn: def do_ben...
tools
generate_unicode_category_regexps
#!/usr/bin/env python3 """Generate code to be inserted into Python or Lex sources containing (parts of) regular expressions matching unicode characters belonging to particular categories. """ __copyright__ = "Copyright (C) 2018 Adrián Medraño Calvo" __license__ = "GNU GPLv2" import argparse import sys import unicoded...
beetsplug
substitute
# This file is part of beets. # Copyright 2023, Daniele Ferone. # # 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, ...
draftviewproviders
view_dimension
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * Co...
widgets
adsr
from sglib import math as sg_math from sglib.lib.translate import _ from sgui.sgqt import * from . import _shared from .control import * class adsr_widget: def __init__( self, a_size, a_sustain_in_db, a_attack_port, a_decay_port, a_sustain_port, a_release_p...
Test
TestCryptBitcoin
from Crypt import CryptBitcoin class TestCryptBitcoin: def testSign(self, crypt_bitcoin_lib): privatekey = "5K9S6dVpufGnroRgFrT6wsKiz2mJRYsC73eWDmajaHserAp3F1C" privatekey_bad = "5Jbm9rrusXyApAoM8YoM4Rja337zMMoBUMRJ1uijiguU2aZRnwC" # Get address by privatekey address = crypt_bitco...
extractors
twitter
#!/usr/bin/env python __all__ = ["twitter_download"] from ..common import * from .universal import * from .vine import vine_download def extract_m3u(source): r1 = get_content(source) s1 = re.findall(r"(/ext_tw_video/.*)", r1) s1 += re.findall(r"(/amplify_video/.*)", r1) r2 = get_content("https://vid...
preferences
preferences
# # 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 from collections i...
Resources
MainFrame
# encoding: utf-8 """ Copyright 2009-2017 Olivier Belanger This file is part of SoundGrain. SoundGrain 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 lat...
sql
session_replay_event_migrations_sql
from django.conf import settings from posthog.session_recordings.sql.session_replay_event_sql import ( SESSION_REPLAY_EVENTS_DATA_TABLE, ) DROP_SESSION_REPLAY_EVENTS_TABLE_MV_SQL = ( lambda: "DROP TABLE IF EXISTS session_replay_events_mv ON CLUSTER {cluster}".format( cluster=settings.CLICKHOUSE_CLUSTER...
views
group
# encoding: utf-8 from __future__ import annotations import logging import re from collections import OrderedDict from typing import Any, Optional, Union from urllib.parse import urlencode import ckan.authz as authz import ckan.lib.base as base import ckan.lib.helpers as h import ckan.lib.navl.dictization_functions a...
desktopcover
desktopcover_preferences
# Copyright (C) 2006-2010 Johannes Sasongko <sasongko@gmail.com> # Copyright (C) 2010 Mathias Brodala <info@noctus.net> # # 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 th...
extractor
bandaichannel
# coding: utf-8 from __future__ import unicode_literals from ..utils import extract_attributes from .brightcove import BrightcoveNewIE class BandaiChannelIE(BrightcoveNewIE): IE_NAME = "bandaichannel" _VALID_URL = r"https?://(?:www\.)?b-ch\.com/titles/(?P<id>\d+/\d+)" _TESTS = [ { "ur...
femtaskpanels
task_material_reinforced
# *************************************************************************** # * Copyright (c) 2019 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
dialogs
show_recent_script_errors
# Copyright (C) 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 option) any later version. # This program ...
sk1
app_insp
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2021 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 ver...
scripting
highlevel
""" Highlevel scripting API, requires xautomation to be installed """ import imghdr import os import struct import subprocess import tempfile import time class PatternNotFound(Exception): """Exception raised by functions""" pass # numeric representation of the mouse buttons. For use in visgrep. LEFT = 1 "...
extractors
wanmen
#!/usr/bin/env python __all__ = [ "wanmen_download", "wanmen_download_by_course", "wanmen_download_by_course_topic", "wanmen_download_by_course_topic_part", ] from json import loads from ..common import * from .bokecc import bokecc_download_by_id ##Helper functions def _wanmen_get_json_api_content_...
localDrone
stackSplit
import eos.db import gui.mainFrame import wx from gui import globalEvents as GE from gui.fitCommands.calc.drone.localAdd import CalcAddLocalDroneCommand from gui.fitCommands.calc.drone.localRemove import CalcRemoveLocalDroneCommand from gui.fitCommands.helpers import DroneInfo, InternalCommandHistory from service.fit i...
user-and-team-management
convert_plugin_json_rbac_roles_into_markdown_table
""" Use this utility script to convert the Grafana OnCall's RBAC roles, defined in its plugin.json, into a Markdown table for public documentation purposes. It will automatically copy the compiled markdown table to your OS's clipboard. You can simply paste it into the docs (NOTE: the clipboard functionality was only t...
network
qa_tcp_sink
#!/usr/bin/env python # # Copyright 2021 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # import socket import threading import time from gnuradio import blocks, gr, gr_unittest, network class qa_tcp_sink(gr_unittest.TestCase): def tcp_receive(sel...
Code
Procesador
import os import random import sys import webbrowser from Code import ( CPU, Albums, AperturasStd, Configuracion, ControlPosicion, Entrenamientos, Everest, GestorAlbum, GestorAnotar, GestorCompeticion, GestorElo, GestorEntMaq, GestorEntPos, GestorEverest, Ges...
migrations
0080_update_dashboard_funnel_filters
# Generated by Django 3.0.7 on 2020-08-06 18:50 from django.db import migrations def forward(apps, schema_editor): Funnel = apps.get_model("posthog", "Funnel") DashboardItem = apps.get_model("posthog", "DashboardItem") Action = apps.get_model("posthog", "Action") for item in DashboardItem.objects.fil...
bleachbit
FileUtilities
# vim: ts=4:sw=4:expandtab # -*- coding: UTF-8 -*- # 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...
commands
setup_dev
from django.core.management.base import BaseCommand from django.db import transaction from posthog.demo.legacy import ORGANIZATION_NAME, TEAM_NAME, create_demo_data from posthog.models import ( EventProperty, PersonalAPIKey, Plugin, PluginConfig, PluginSourceFile, Team, User, ) from posthog....
parsers
generic_html
__package__ = "archivebox.parsers" import re from datetime import datetime, timezone from html.parser import HTMLParser from typing import IO, Iterable, Optional from urllib.parse import urljoin from ..index.schema import Link from ..util import URL_REGEX, enforce_types, htmldecode class HrefParser(HTMLParser): ...
messages
checks
from numbers import Integral, Real from ..py2 import convert_py2_bytes from .specs import ( MAX_PITCHWHEEL, MAX_SONGPOS, MIN_PITCHWHEEL, MIN_SONGPOS, SPEC_BY_TYPE, ) def check_type(type_): if type_ not in SPEC_BY_TYPE: raise ValueError("invalid message type {!r}".format(type_)) def ...
web
python23
"""Python 2.3 compatabilty""" import threading class threadlocal(object): """Implementation of threading.local for python2.3. """ def __getattribute__(self, name): if name == "__dict__": return threadlocal._getd(self) else: try: return object.__getat...
common
mbngs
# -*- Mode: Python; test-case-name: whipper.test.test_common_mbngs -*- # vi:si:et:sw=4:sts=4:ts=4 # Copyright (C) 2009, 2010, 2011 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 publis...
avr-isp
stk500v2
""" STK500v2 protocol implementation for programming AVR chips. The STK500v2 protocol is used by the ArduinoMega2560 and a few other Arduino platforms to load firmware. This is a python 3 conversion of the code created by David Braam for the Cura project. """ import struct import sys import time from serial import Ser...
extractor
vidio
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import int_or_none, parse_iso8601, str_or_none, strip_or_none, try_get from .common import InfoExtractor class VidioIE(InfoExtractor): _VALID_URL = ( r"https?://(?:www\.)?vidio\.com/watch/(?P<id>\d+)-(?P<display_id>[^/?#&]+)"...
extractor
samplefocus
# coding: utf-8 from __future__ import unicode_literals import re from ..utils import extract_attributes, get_element_by_attribute, int_or_none from .common import InfoExtractor class SampleFocusIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?samplefocus\.com/samples/(?P<id>[^/?&#]+)" _TESTS = [ ...
migrations
0010_auto_20200609_0649
# Generated by Django 3.0.7 on 2020-06-09 13:49 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("babybuddy", "0009_settings_timezone"), ] operations = [ migrations.AlterField( model_name="settings", name="timezone"...
admin
submissions
from CTFd.admin import admin from CTFd.models import Challenges, Submissions from CTFd.utils.decorators import admins_only from CTFd.utils.helpers.models import build_model_filters from CTFd.utils.modes import get_model from flask import render_template, request, url_for @admin.route("/admin/submissions", defaults={"...
frescobaldi-app
htmldiff
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2012 - 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 ...
plover
setup
#!/usr/bin/env python3 # Copyright (c) 2010 Joshua Harlan Lifton. # See LICENSE.txt for details. import os import re import subprocess import sys from setuptools import setup try: from setuptools.extern.packaging.version import Version except ImportError: # Handle broken unvendored version of setuptools... ...
downloaders
MegaDebridEu
# -*- coding: utf-8 -*- import json import pycurl from pyload.core.network.http.exceptions import BadHeader from ..base.multi_downloader import MultiDownloader def args(**kwargs): return kwargs class MegaDebridEu(MultiDownloader): __name__ = "MegaDebridEu" __type__ = "downloader" __version__ = "0....
connectors
inventaire
""" inventaire data connector """ import re from typing import Any, Iterable, Iterator, Optional, Union from bookwyrm import models from bookwyrm.book_search import SearchResult from .abstract_connector import AbstractConnector, JsonDict, Mapping, get_data from .connector_manager import ConnectorException, create_edi...
migrations
0101_auto_20210929_1847
# Generated by Django 3.2 on 2021-05-21 00:17 import bookwyrm from bookwyrm.connectors.abstract_connector import infer_physical_format from django.db import migrations def infer_format(app_registry, schema_editor): """set the new physical format field based on existing format data""" db_alias = schema_editor...
gui
mvp
# This file is part of MyPaint. # -*- coding: utf-8 -*- # Copyright (C) 2017 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, o...
api-for-grafana-incident
serializers
import logging from apps.alerts.incident_appearance.renderers.web_renderer import AlertGroupWebRenderer from apps.alerts.models import Alert, AlertGroup from apps.api.serializers.alert_group import AlertGroupFieldsCacheSerializerMixin from rest_framework import serializers logger = logging.getLogger(__name__) class...
src
runserver
# # Quru Image Server # # Document: runserver.py # Date started: 04 Apr 2011 # By: Matt Fozard # Purpose: Runs the development Python web server # Requires: # Copyright: Quru Ltd (www.quru.com) # Licence: # # This program is free software: you can redistribute it and/or modify # it under ...
preferences
item_list
from gi.repository import Gdk, Gtk from sunflower.common import AccessModeFormat from sunflower.gui.input_dialog import InputDialog from sunflower.widgets.breadcrumbs import Breadcrumbs from sunflower.widgets.settings_page import SettingsPage class Column: NAME = 0 SIZE = 1 VISIBLE = 2 FONT_SIZE = 3 ...
QT
QTUtil2
from Code import VarGen from Code.Constantes import * from Code.QT import Colocacion, Controles, Iconos, QTUtil from PyQt4 import QtCore, QtGui def dicTeclas(): dic = { 16777234: kMoverAtras, 16777236: kMoverAdelante, 16777235: kMoverAtras, 16777237: kMoverAdelante, 1677723...
lib
portaudio
""" Created using h2xml and xml2py """ from ctypes import * STRING = c_char_p paFloat32 = int(0x00000001) paInt32 = int(0x00000002) paInt24 = int(0x00000004) paInt16 = int(0x00000008) paInt8 = int(0x00000010) paUInt8 = int(0x00000020) paCustomFormat = int(0x00010000) paNonInterleaved = int(0x80000000) paNotInitiali...
fitEwarStats
getter
# ============================================================================= # 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 ...
migrations
0021_auto_20220914_0934
# Generated by Django 3.1.14 on 2022-09-14 09:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("core", "0020_auto_20210410_1031"), ] operations = [ migrations.AlterField( model_name="archiveresult", name="extract...
extractor
yahoo
# coding: utf-8 from __future__ import unicode_literals import hashlib import itertools import re from ..compat import compat_str, compat_urllib_parse from ..utils import ( ExtractorError, clean_html, int_or_none, mimetype2ext, parse_iso8601, smuggle_url, try_get, url_or_none, ) from ....
QT
WInformacion
import os from Code import PGN, TrListas, VarGen from Code.Constantes import * from Code.QT import Colocacion, Controles, Iconos, QTVarios from PyQt4 import QtCore, QtGui class Variantes(QtGui.QWidget): def __init__(self, owner): self.owner = owner configuracion = VarGen.configuracion sel...
extractor
microsoftvirtualacademy
from __future__ import unicode_literals import re from ..compat import compat_xpath from ..utils import int_or_none, parse_duration, smuggle_url, unsmuggle_url, xpath_text from .common import InfoExtractor class MicrosoftVirtualAcademyBaseIE(InfoExtractor): def _extract_base_url(self, course_id, display_id): ...