section
stringlengths
2
30
filename
stringlengths
1
82
text
stringlengths
783
28M
GenIconos
gentema
# -*- coding: latin-1 -*- import base64 import os.path """Aadido control de repeticiones""" dx = [0] def funcionPNG( qbin, dic, desde, nomFuncion, nomDir, nomFichero ) : cFich = "%s/%s"%(nomDir,nomFichero) if not os.path.isfile( cFich ) : print "No existe " + cFich return "" tt = ( nomDi...
migrations
0002_initial_data
import contextlib from dateutil.parser import parse as parse_date from django.db import connection, migrations @contextlib.contextmanager def suppress_autotime(model, fields): """Turn off auto_now and auto_now_add. Credits to @soulseekah - http://stackoverflow.com/a/35943149. """ _original_values = {...
plugins
implicit_prices
"""This plugin synthesizes Price directives for all Postings with a price or directive or if it is an augmenting posting, has a cost directive. """ __copyright__ = "Copyright (C) 2015-2017 Martin Blais" __license__ = "GNU GPLv2" import collections from beancount.core import amount, data, inventory from beancount.cor...
extractor
drtv
# coding: utf-8 from __future__ import unicode_literals import binascii import hashlib import re from ..aes import aes_cbc_decrypt from ..compat import compat_urllib_parse_unquote from ..utils import ( ExtractorError, bytes_to_intlist, float_or_none, int_or_none, intlist_to_bytes, mimetype2ext...
chardet
sbcharsetprober
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
draftguitools
gui_draft2sketch
# *************************************************************************** # * (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * (c) 2009, 2010 Ken Cline <cline@frii.com> * # * (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> * # * ...
bookwyrm
settings
""" bookwyrm settings and configuration """ import os from typing import AnyStr import requests from django.core.exceptions import ImproperlyConfigured from django.utils.translation import gettext_lazy as _ from environs import Env # pylint: disable=line-too-long env = Env() env.read_env() DOMAIN = env("DOMAIN") VER...
interface
tagcloud
# -*- 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...
builtinShipBrowser
shipItem
import re import gui.builtinShipBrowser.sfBrowserItem as SFItem import gui.mainFrame import gui.utils.color as colorUtils import gui.utils.draw as drawUtils import gui.utils.fonts as fonts import wx from gui.bitmap_loader import BitmapLoader from gui.contextMenu import ContextMenu from logbook import Logger from servi...
game
GameResultsScene
##################################################################### # -*- coding: utf-8 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
views
properties_tableview
""" @file @brief This file contains the properties tableview, used by the main window @author Jonathan Thomas <jonathan@openshot.org> @section LICENSE Copyright (c) 2008-2018 OpenShot Studios, LLC (http://www.openshotstudios.com). This file is part of OpenShot Video Editor (http://www.openshot.org), an open-so...
calculix
write_femelement_geometry
# *************************************************************************** # * Copyright (c) 2021 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
extractor
matchtv
# coding: utf-8 from __future__ import unicode_literals import random from ..utils import xpath_text from .common import InfoExtractor class MatchTVIE(InfoExtractor): _VALID_URL = r"https?://matchtv\.ru(?:/on-air|/?#live-player)" _TESTS = [ { "url": "http://matchtv.ru/#live-player", ...
models
faster_rcnn_inception_v2_feature_extractor_test
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
prefs
prefs_cms
# -*- coding: utf-8 -*- # # Copyright (C) 2015 by Ihor E. Novikov # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
qltk
ccb
# Copyright 2005 Joe Wreschnig, Michael Urman # 2012-22 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 ve...
mylar
newpull
import csv import datetime import fileinput import os import re import sqlite3 import sys import unicodedata from decimal import Decimal from time import strptime import mylar import requests import urllib2 from bs4 import BeautifulSoup, UnicodeDammit from HTMLParser import HTMLParseError from mylar import logger de...
settings
common
# -*- 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-none
add_translation
from plover.engine import StartingStrokeState class AddTranslation: def __init__(self, engine): self._status = None self._engine = engine self._translator_states = [] self._strokes, self._translation = (None, None) engine.hook_connect("add_translation", self.trigger) d...
FirmwareUpdateChecker
FirmwareUpdateChecker
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import Set from PyQt6.QtCore import QUrl from PyQt6.QtGui import QDesktopServices from UM.Application import Application from UM.Extension import Extension from UM.i18n import i18nCatalog from UM.Logger import ...
utils
helpers
# -*- coding: utf-8 -*- """ flaskbb.utils.helpers ~~~~~~~~~~~~~~~~~~~~~ A few helpers that are used by flaskbb :copyright: (c) 2014 by the FlaskBB Team. :license: BSD, see LICENSE for more details. """ import ast import itertools import logging import operator import os import re import time from ...
builder
_htmlparser
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" __all__ = [ 'HTMLParserTreeBuilder', ] from HTMLParser import HTMLParser try: from HTMLParser import HTMLParseError except ImportError, e: # HTMLParseError is removed in Python 3.5. Since it can never be # thrown in 3.5, we...
PyObjCTest
test_nstoolbaritem
from AppKit import * from PyObjCTools.TestSupport import * try: unicode except NameError: unicode = str class TestNSToolbarItemHelper(NSObject): def validateToolbarItem_(self, a): return class TestNSToolbarItem(TestCase): def testConstants(self): self.assertEqual(NSToolbarItemVisibi...
canto-curses
tagcore
# -*- coding: utf-8 -*- # Canto-curses - ncurses RSS reader # Copyright (C) 2016 Jack Miller <jack@codezen.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import loggin...
equations
electrostatic
# *************************************************************************** # * Copyright (c) 2017 Markus Hovorka <m.hovorka@live.de> * # * Copyright (c) 2022 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * Th...
extractor
audimedia
# coding: utf-8 from __future__ import unicode_literals from ..utils import int_or_none, parse_iso8601 from .common import InfoExtractor class AudiMediaIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?audi-mediacenter\.com/(?:en|de)/audimediatv/(?:video/)?(?P<id>[^/?#]+)" _TESTS = [ { ...
utils
np_box_ops_test
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
remote-query-community
payload_checker
import enum from dataclasses import dataclass, field from pony.orm import db_session from tribler.core.components.metadata_store.category_filter.l2_filter import ( is_forbidden, ) from tribler.core.components.metadata_store.db.serialization import ( CHANNEL_DESCRIPTION, CHANNEL_THUMBNAIL, CHANNEL_TORRE...
Tools
MakeNewBuildNbr
# *************************************************************************** # * Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
formspree
create_app
import json import structlog from flask import Flask, g, jsonify, redirect, request, url_for from flask_limiter import Limiter from flask_limiter.util import get_ipaddr from flask_login import LoginManager, current_user from . import routes, settings from .stuff import DB, cdn, celery, redis_store from .users.models ...
social
forms
from __future__ import annotations from abilian.sbe.apps.communities.models import Community from abilian.web.forms import Form from abilian.web.forms import widgets as abilian_widgets from abilian.web.forms.fields import QuerySelect2Field from abilian.web.forms.filters import strip from abilian.web.forms.validators i...
snippet
menu
# 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 ...
extractor
thisamericanlife
from __future__ import unicode_literals from .common import InfoExtractor class ThisAmericanLifeIE(InfoExtractor): _VALID_URL = r"https?://(?:www\.)?thisamericanlife\.org/(?:radio-archives/episode/|play_full\.php\?play=)(?P<id>\d+)" _TESTS = [ { "url": "http://www.thisamericanlife.org/rad...
windows
export_clips
""" @file export_clips.py @brief Behavior for the export clips dialog. @details Takes an array of file objects Allow the user to select a directory to export to. Then export any clips and files to that directory To save time, (and preserve video quality) Any files should only be copied If a clip name already...
diagram
support
"""For ease of creation, maintain a mapping from Element to Diagram Item.""" from typing import Dict from gaphor.core.modeling import Element, Presentation def represents(uml_element, **metadata): """A decorator to assign a default Element type to a diagram item.""" def wrapper(presentation): set_d...
extractor
itv
# coding: utf-8 from __future__ import unicode_literals import json import re import sys from ..compat import ( compat_HTTPError, compat_integer_types, compat_kwargs, compat_urlparse, ) from ..utils import ( ExtractorError, clean_html, determine_ext, error_to_compat_str, extract_at...
utils
date_utils_test
__copyright__ = "Copyright (C) 2014, 2016 Martin Blais" __license__ = "GNU GPLv2" import datetime import unittest from beancount.utils import date_utils class TestDateUtils(unittest.TestCase): def test_iter_dates(self): date1 = datetime.date(2013, 5, 6) date2 = datetime.date(2013, 5, 11) ...
migrations
0001_squashed_initial
# Generated by Django 3.2.5 on 2022-05-31 14:46 import uuid import apps.schedules.models.custom_on_call_shift import apps.schedules.models.on_call_schedule import django.core.validators import django.db.models.deletion import django_migration_linter as linter from django.db import migrations, models class Migration...
extractor
cpac
# coding: utf-8 from __future__ import unicode_literals from ..compat import compat_str from ..utils import ( int_or_none, str_or_none, try_get, unified_timestamp, update_url_query, urljoin, ) from .common import InfoExtractor # compat_range try: if callable(xrange): range = xrange...
lib
item
import os import shutil from collections import defaultdict from sglib import constants from sglib.log import LOG from sglib.math import clip_value from sglib.models.daw.audio_item import DawAudioItem from sglib.models.daw.seq_item import sequencer_item from sglib.models.stargate.midi_events import MIDIControl, MIDINo...
equations
deformation
# *************************************************************************** # * Copyright (c) 2023 Uwe Stöhr <uwestoehr@lyx.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
extractor
generic
# coding: utf-8 from __future__ import unicode_literals import os import re import sys from ..compat import ( compat_etree_fromstring, compat_str, compat_urllib_parse_unquote, compat_urlparse, compat_xml_parse_error, ) from ..utils import ( KNOWN_EXTENSIONS, ExtractorError, HEADReques...
clientScripts
manual_normalization_remove_mn_directories
#!/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, ei...
draftmake
make_point
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
renderers
phone_call_renderer
from apps.alerts.incident_appearance.renderers.base_renderer import ( AlertBaseRenderer, AlertGroupBaseRenderer, ) from apps.alerts.incident_appearance.renderers.constants import DEFAULT_BACKUP_TITLE from apps.alerts.incident_appearance.templaters import AlertPhoneCallTemplater from common.utils import str_or_b...
Models
FavoriteMaterialsModel
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import cura.CuraApplication # To listen to changes to the preferences. from cura.Machines.Models.BaseMaterialsModel import BaseMaterialsModel class FavoriteMaterialsModel(BaseMaterialsModel): """Model that shows the ...
migrations
0174_auto_20230222_1742
# Generated by Django 3.2.18 on 2023-02-22 17:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("bookwyrm", "0174_auto_20230130_1240"), ] operations = [ migrations.AddField( model_name="notification", name="relate...
PyObjCTest
test_exceptions
# # Some more tests for exception handling. # XXX: we should centralize all exception handling tests into this file, this # is now mostly used to check general unicode support in exceptions. # from __future__ import unicode_literals import sys import objc from PyObjCTest.exceptions import * from PyObjCTools.Test...
objc
_category
__all__ = ["classAddMethod", "Category"] from types import FunctionType, MethodType from objc._objc import classAddMethods, ivar, objc_class, selector def classAddMethod(cls, name, method): """ Add a single method to a class. 'name' is the ObjC selector """ if isinstance(method, selector): s...
migrations
201501082314_8ad96e49dc6_init
"""init Revision ID: 8ad96e49dc6 Revises: None Create Date: 2015-01-08 23:14:01.941746 """ import sqlalchemy as sa # revision identifiers, used by Alembic. from alembic import op revision = "8ad96e49dc6" down_revision = None branch_labels = ("default",) def upgrade(): ### commands auto generated by Alembic -...
UltimakerCloud
UltimakerCloudScope
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from typing import TYPE_CHECKING from PyQt6.QtNetwork import QNetworkRequest from UM.Logger import Logger from UM.TaskManagement.HttpRequestScope import DefaultUserAgentScope if TYPE_CHECKING: from cura.API.Account im...
migrations
0144_update_django_3_1_8
# Generated by Django 3.1.8 on 2021-04-15 19:30 import posthog.models.team from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("posthog", "0143_user_uuid"), ] operations = [ migrations.AlterField( model_name="actionstep", ...
migrations
0071_cache_dashboard_items
# Generated by Django 3.0.6 on 2020-06-25 10:24 import secrets from django.db import migrations, models from posthog.models import Filter def forwards_func(apps, schema_editor): Dashboard = apps.get_model("posthog", "Dashboard") DashboardItem = apps.get_model("posthog", "DashboardItem") dashboards = Das...
social-auth
live_setting_django_strategy
import logging from apps.base.utils import live_settings from common.api_helpers.utils import create_engine_url from django.conf import settings from django.shortcuts import resolve_url from django.utils.encoding import force_text from django.utils.functional import Promise from social_django.strategy import DjangoStr...
quodlibet
update
# Copyright 2016 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. """Check for new versions of the ap...
src
Traits
# 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. from contextlib import contextmanager class TraitType: pass # These types just sa...
ui
rich_palette
from collections import ChainMap from typing import TYPE_CHECKING, Any, Optional if TYPE_CHECKING: from rich.theme import Theme from httpie.output.ui.palette import ( ColorString, GenericColor, # noqa PieStyle, Styles, _StyledGenericColor, ) RICH_BOLD = ColorString("bold") # Rich-specific c...
versions
083_f98d8fa2a7f7_remove_related_items
# encoding: utf-8 """083 Remove related items Revision ID: f98d8fa2a7f7 Revises: 8ea886d0ede4 Create Date: 2018-09-04 18:49:17.615242 """ from __future__ import print_function import sqlalchemy as sa from alembic import op from ckan.migration import skip_based_on_legacy_engine_version # revision identifiers, used b...
digital
qa_header_payload_demux
#!/usr/bin/env python # Copyright 2012-2016,2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # import random import time import numpy import pmt from gnuradio import blocks, digital, gr, gr_unittest def make_tag(key, value, offset): """Creat...
util
tags
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2007-2008, 2011 Lukáš Lalinský # Copyright (C) 2008-2009, 2018-2021, 2023 Philipp Wolfer # Copyright (C) 2011 Johannes Weißl # Copyright (C) 2011-2013 Michael Wiencek # Copyright (C) 2012 Chad Wilson # Copyright (C) 2013 Calvin...
integrations
tasks
import logging import random from apps.alerts.models.alert_group_counter import ConcurrentUpdateError from apps.alerts.tasks import resolve_alert_group_by_source_if_needed from apps.slack.client import SlackClient from apps.slack.errors import SlackAPIError from celery import shared_task from celery.utils.log import g...
shift-swaps
slack_messages
from celery.utils.log import get_task_logger from common.custom_celery_tasks import shared_dedicated_queue_retry_task task_logger = get_task_logger(__name__) @shared_dedicated_queue_retry_task() def create_shift_swap_request_message(shift_swap_request_pk: str) -> None: from apps.schedules.models import ShiftSwap...
OAuth2
AuthorizationRequestServer
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. from http.server import HTTPServer from socketserver import ThreadingMixIn from typing import TYPE_CHECKING, Any, Callable if TYPE_CHECKING: from cura.OAuth2.AuthorizationHelpers import AuthorizationHelpers from cu...
posthog
decorators
from enum import Enum from functools import wraps from typing import Any, Callable, Dict, List, TypeVar, Union, cast from django.urls import resolve from django.utils.timezone import now from posthog.caching.utils import is_stale_filter from posthog.clickhouse.query_tagging import tag_queries from posthog.models impor...
tasks
send_update_log_report_signal
from apps.alerts.signals import alert_group_update_log_report_signal from common.custom_celery_tasks import shared_dedicated_queue_retry_task from django.conf import settings from .task_logger import task_logger @shared_dedicated_queue_retry_task( autoretry_for=(Exception,), retry_backoff=True, max_retri...
transport
gevent
""" raven.transport.gevent ~~~~~~~~~~~~~~~~~~~~~~ :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 from raven.transport.base import AsyncTransport from raven.transport.http import HTTPTransport try: ...
module
localChangeMutation
import wx from logbook import Logger from service.fit import Fit pyfalog = Logger(__name__) class CalcChangeLocalModuleMutationCommand(wx.Command): def __init__(self, fitID, position, mutation, oldMutation=None): wx.Command.__init__(self, True, "Change Local Module Mutation") self.fitID = fitID ...
base
utils
import json import re from urllib.parse import urlparse import phonenumbers from common.api_helpers.utils import create_engine_url from django.conf import settings from phonenumbers import NumberParseException from telegram import Bot from twilio.base.exceptions import TwilioException from twilio.rest import Client ...
fta
transferin
"""Transfer In item definition.""" from gaphas.geometry import Rectangle from gaphor.core.modeling import DrawContext from gaphor.diagram.presentation import ( Classified, ElementPresentation, from_package_str, ) from gaphor.diagram.shapes import Box, IconBox, Text, stroke from gaphor.diagram.support impor...
canto-next
plugins
# -*- coding: utf-8 -*- # Canto - RSS reader backend # Copyright (C) 2016 Jack Miller <jack@codezen.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. import logging impo...
feature-flag
flag_analytics
import time from datetime import datetime from typing import TYPE_CHECKING, Tuple from django.conf import settings from posthog.client import sync_execute from posthog.constants import FlagRequestType from posthog.helpers.dashboard_templates import ( add_enriched_insights_to_feature_flag_dashboard, ) from posthog....
invesalius
style
# -------------------------------------------------------------------------- # 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...
printing
msw_print
# -*- 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....
draftobjects
facebinder
# *************************************************************************** # * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> * # * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> * # * Copyright (c) 2020 FreeCAD Developers * # * ...
AddonManager
addonmanager_firstrun
# SPDX-License-Identifier: LGPL-2.1-or-later # *************************************************************************** # * * # * Copyright (c) 2022 FreeCAD Project Association * # * ...
sequencer
playlist
from sglib import constants from sglib.api.daw import api_playlist from sglib.log import LOG from sgui.daw.lib import sequence as sequence_lib from sgui.sgqt import ( QAbstractItemView, QHBoxLayout, QLineEdit, QListWidgetItem, QMessageBox, QPushButton, QtCore, QVBoxLayout, QWidget, )...
pyobjc-core
setup
#!/usr/bin/env python import os import plistlib import re import shutil import subprocess import sys # We need at least Python 2.5 MIN_PYTHON = (2, 6) # FIXME: autodetect default values for USE_* variables: # both should be false by default, unless # 1) python is /usr/bin/python: both should be true # 2) python b...
bittorrent
btsched
#!/usr/bin/env python # # 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 Public L...
mixins
funnel
import datetime import json from typing import TYPE_CHECKING, Dict, List, Literal, Optional, Union from posthog.models.property import Property if TYPE_CHECKING: from posthog.models.entity import Entity from posthog.constants import ( BIN_COUNT, DISPLAY, DROP_OFF, ENTRANCE_PERIOD_START, FUNNE...
femviewprovider
view_mesh_result
# *************************************************************************** # * Copyright (c) 2017 Bernd Hahnebach <bernd@bimstatik.org> * # * * # * This file is part of the FreeCAD CAx development system. * # * ...
quickinsert
buttongroup
# 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 ...
UiConfig
UiConfigPlugin
import io import os from Config import config from Plugin import PluginManager from Translate import Translate from util.Flag import flag plugin_dir = os.path.dirname(__file__) if "_" not in locals(): _ = Translate(plugin_dir + "/languages/") @PluginManager.registerTo("UiRequest") class UiRequestPlugin(object)...
plugins
steam
""" $description Live streaming video game broadcasts from the Steam gaming community. $url steamcommunity.com $url steam.tv $type live $account Some streams require a login """ import base64 import logging import re import time from streamlink.exceptions import FatalPluginError from streamlink.plugin import Plugin, ...
generateTemplates
templateModuleAppFeature
#! python # -*- coding: utf-8 -*- # (c) 2006 Juergen Riegel import generateBase.generateModel_Module import generateBase.generateTools from . import template class TemplateFeature(template.ModelTemplate): def Generate(self): file = open(self.path + self.feature.Name + "Imp.cpp", "w") generateBas...
blocks
blockstoolbox
"""The definition for the blocks section of the toolbox.""" from gaphas.item import SE from gaphor import UML from gaphor.core import gettext from gaphor.diagram.diagramtoolbox import ToolDef, ToolSection, new_item_factory from gaphor.SysML import diagramitems as sysml_items from gaphor.SysML import sysml from gaphor....
paths
paths
from re import escape from typing import Dict, Literal, Optional, Tuple, Union, cast from ee.clickhouse.queries.paths.paths_event_query import ClickhousePathEventQuery from jsonschema import ValidationError from posthog.constants import FUNNEL_PATH_BETWEEN_STEPS from posthog.models import Filter from posthog.models.fi...
QT
Controles
# import datetime from PyQt4 import QtCore, QtGui class ED(QtGui.QLineEdit): """ Control de entrada de texto en una linea. """ def __init__(self, parent, texto=None): """ @param parent: ventana propietaria. @param texto: texto inicial. """ if texto: ...
serializers
schedules_calendar
from apps.public_api.serializers.schedules_base import ScheduleBaseSerializer from apps.schedules.models import CustomOnCallShift, OnCallScheduleCalendar from apps.schedules.tasks import ( drop_cached_ical_task, schedule_notify_about_empty_shifts_in_schedule, schedule_notify_about_gaps_in_schedule, ) from c...
comictaggerlib
pagelisteditor
"""A PyQt4 widget for editing the page list info""" # Copyright 2012-2014 Anthony Beville # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # ...
migrations
0001_initial
# Generated by Django 3.2.18 on 2023-03-09 18:25 import apps.webhooks.models.webhook import django.core.validators import django.db.models.deletion import mirage.fields from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ("user_management",...
BasicDrawing
AppDrawing
import BitmapContext import ColorAndGState import CoordinateSystem import DrawingBasics import EPSPrinting import ImageMasking import Images import PathDrawing import PatternDrawing import QuartzTextDrawing import Shadings import ShadowsAndTransparencyLayers import UIHandling import Utilities from Quartz import * # De...
tasks
email
import uuid from datetime import datetime from typing import List, Optional import structlog from django.conf import settings from django.utils import timezone from posthog.celery import app from posthog.cloud_utils import is_cloud from posthog.email import EmailMessage, is_email_available from posthog.models import (...
commands
userscripts
# SPDX-FileCopyrightText: Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # SPDX-License-Identifier: GPL-3.0-or-later """Functions to execute a userscript.""" import os import os.path import tempfile from typing import Any, MutableMapping, Tuple, cast import qutebrowser from qutebrowser.browser import downloa...
security
signing
import hashlib import hmac as _hmac from CTFd.utils import string_types from flask import current_app from itsdangerous import Signer from itsdangerous.exc import ( BadSignature, BadTimeSignature, # noqa: F401 SignatureExpired, ) from itsdangerous.url_safe import URLSafeTimedSerializer def serialize(dat...
Code
Books
# This code is a translation to python from pg_key.c and pg_show.c released in the public domain by Michel Van den Bergh. # http://alpha.uhasselt.be/Research/Algebra/Toga import os import random from Code import ControlPosicion, Util, VarGen class ListaLibros: def __init__(self): self.lista = [] ...
fec
capillary_threaded_encoder
#!/usr/bin/env python # # Copyright 2014 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 from . import fec_python as fec class capillary_threaded_encoder(gr.hier_block2): def __init__( self,...
migrations
0044_session_replay_events_console_counts
from posthog.clickhouse.client.migration_tools import run_sql_with_exceptions from posthog.session_recordings.sql.session_replay_event_migrations_sql import ( ADD_CONSOLE_COUNTS_DISTRIBUTED_SESSION_REPLAY_EVENTS_TABLE_SQL, ADD_CONSOLE_COUNTS_SESSION_REPLAY_EVENTS_TABLE_SQL, ADD_CONSOLE_COUNTS_WRITABLE_SESSI...
deluge-blocklist
peerguardian
# # Copyright (C) 2007 Steve 'Tarka' Smith (tarka@internode.on.net) # # 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 gzip import log...
models
twilio_sender
from django.db import models from twilio.rest import Client class TwilioAccount(models.Model): name = models.CharField(max_length=100) account_sid = models.CharField(max_length=64, null=False, blank=False, unique=True) auth_token = models.CharField(max_length=64, null=True, default=None) api_key_sid =...
Test
Metadata
# -*- coding: utf-8 -*- # *************************************************************************** # * Copyright (c) 2022 FreeCAD Project Association * # * * # * This file is part of the FreeCAD CAx development system...