gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2012-2013 Ravello Systems, Inc. # # 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 applicable law or agree...
#!/usr/bin/env python """ """ ############################################################################### # Copyright 2016 Hendrix Demers # # 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 ...
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the artifacts file filter functions.""" import unittest from artifacts import reader as artifacts_reader from artifacts import registry as artifacts_registry from dfvfs.helpers import file_system_searcher from dfvfs.lib import definitions as dfvfs_definitions fr...
from __future__ import unicode_literals import re import unicodedata from gzip import GzipFile from io import BytesIO from django.utils.encoding import force_text from django.utils.functional import allow_lazy, SimpleLazyObject from django.utils import six from django.utils.six.moves import html_entities from django....
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Route.agency' db.alter_column('gtfs_route', 'agency_id', self.gf('django.db.models.fields.relat...
# Copyright 2012 VMware, Inc. # 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 ...
#!/usr/bin/env python # # Copyright 2011-2015 Splunk, Inc. # # 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 applicable...
from __future__ import unicode_literals from django.contrib.auth.models import User from django.core import management from django.core.exceptions import ObjectDoesNotExist from django.db.models.manager import Manager from django.test.testcases import TestCase from moderation.register import ModerationManager, Registra...
# # Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
import sys import time from django.conf import settings # The prefix to put on the default database name when creating # the test database. TEST_DATABASE_PREFIX = 'test_' class BaseDatabaseCreation(object): """ This class encapsulates all backend-specific differences that pertain to database *creation*, ...
import io import json import os import sys import time import struct import zipfile import config from ..apk import * from .. import appstore from .. import firmware from .. import installer from ..io import * from ..marketserver.server import * from ..usb import * from ..usb.driver import * from ..usb.sensershell imp...
# -*- coding: utf-8 -*- """ Part of the pyosf package https://github.com/psychopy/pyosf/ Released under MIT license @author: Jon Peirce """ from __future__ import absolute_import, print_function from pyosf import remote, project, constants, tools import time import os from os.path import join import gc import shutil...
# -*- coding: utf-8 -*- ''' Connection module for Amazon CloudWatch .. versionadded:: 2014.7.0 :configuration: This module accepts explicit credentials but can also utilize IAM roles assigned to the instance through Instance Profiles. Dynamic credentials are then automatically obtained from AWS API and no fur...
# Copyright 2012 Nicira, Inc # # 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 applicable law or agr...
import argparse from os.path import join import re from subprocess import CalledProcessError, check_output, STDOUT import sys from packaging.version import Version as V try: import colorama def bright(text): return "%s%s%s" % (colorama.Style.BRIGHT, text, colorama.Style.RESET_ALL) def dim(text): return ...
from django.contrib.auth.models import Permission from django.test import TestCase from django.urls import reverse from wagtail.core.models import Page, Site from wagtail.tests.utils import WagtailTestUtils class TestSiteIndexView(TestCase, WagtailTestUtils): def setUp(self): self.login() self.ho...
# Copyright (c) 2013 OpenStack Foundation # 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 ...
"""SCons.Defaults Builders and other things for the local site. Here's where we'll duplicate the functionality of autoconf until we move it into the installation procedure or use something like qmconf. The code that reads the registry to find MSVC components was borrowed from distutils.msvccompiler. """ # # __COPY...
import reversion import logging import json from django.contrib.gis.db import models as gis_models from rest_framework.exceptions import ValidationError from common.models import AbstractBase, County, Constituency, Ward from facilities.models import Facility LOGGER = logging.getLogger(__name__) class GISAbstractBa...
from __future__ import absolute_import from __future__ import print_function from contextlib import contextmanager from typing import (cast, Any, Callable, Dict, Iterable, Iterator, List, Mapping, Optional, Sized, Tuple, Union) from django.core.urlresolvers import resolve from django.conf import se...
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
""" (nose)tests. """ # HACK import sys import os import inspect from nose.tools import raises from six import iteritems path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) sys.path.append(os.path.join(path, "../../judyz")) from judyz_cffi import Judy1, JudyL, JudySL def test_j1_compil...
# Copyright (c) 2010-2012 OpenStack, LLC. # # 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 applicable law or agreed to ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import os import sys import numpy as np from PIL import Image import chainer from chainer import cuda import chainer.functions as F from chainer.functions import caffe from chainer import Variable, optimizers import pickle def subtract_mean(x0): x ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # 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 ...
# Copyright 2021 Google LLC # # 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 applicable law or agreed to in writing, ...
# Generated from BindPreferenceGrammar.g4 by ANTLR 4.7 # encoding: utf-8 from __future__ import print_function from antlr4 import * from io import StringIO import sys def serializedATN(): with StringIO() as buf: buf.write(u"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3") buf.write(u")\u0097\...
''' ProgressSpinner =============== Android Lollipop style progress spinner. ''' from kivy.lang import Builder from kivy.core.image import Image as CoreImage from kivy.properties import NumericProperty, ListProperty, BoundedNumericProperty, StringProperty, ObjectProperty from kivy.animation import Animation from kivy...
import os import pytest from dvc.dependency.base import DependencyDoesNotExistError from dvc.dvcfile import PIPELINE_FILE from dvc.output import OutputDoesNotExistError from dvc.stage.exceptions import StageCommitError from tests.utils import clean_staging def test_commit_recursive(tmp_dir, dvc): tmp_dir.gen({"...
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
# Copyright 2011 OpenStack Foundation # 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 requ...
""" This script is used to design the design matrix for our linear regression. We explore the influence of linear and quadratic drifts on the model performance. Script for the raw data. Run with: python noise-pca_script.py from this directory """ from __future__ import print_function, division import sys, os,...
""" Render the examples to images and adds them to the documentation. """ # Standard library imports import glob import os import shutil import token, tokenize import textwrap import itertools # Enthought imports from mayavi import mlab # A global counter, for subsitutions. global_counter = itertools.count() EXAMPL...
# 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 applicable law or agreed to in writing, software # d...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
#!/usr/bin/env python # Copyright (c) 2014-2015 Benjamin Althues <benjamin@babab.nl> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS...
# 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 applicable law or agreed to in writing, software # d...
"""Twitter platform for notify component.""" from datetime import datetime, timedelta from functools import partial import json import logging import mimetypes import os from TwitterAPI import TwitterAPI import voluptuous as vol from homeassistant.components.notify import ( ATTR_DATA, PLATFORM_SCHEMA, Bas...
# Copyright 2015-2016 Yelp Inc. # # 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 applicable law or agreed to in writin...
# pylint: skip-file # flake8: noqa class RouterException(Exception): ''' Router exception''' pass class RouterConfig(OpenShiftCLIConfig): ''' RouterConfig is a DTO for the router. ''' def __init__(self, rname, namespace, kubeconfig, router_options): super(RouterConfig, self).__init__(rname,...
# Copyright 2012 OpenStack Foundation # # 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 applicable law or agreed to in...
#!/usr/bin/env python # Copyright (c) 2015. Mark E. Madsen <mark@madsenlab.org> # # This work is licensed under the terms of the Apache Software License, Version 2.0. See the file LICENSE for details. """ Description here """ from mongoengine import * from seriation import idss_version import datetime import loggi...
import time from apps.user_settings.forms import EmailChangeForm from canvas import stickers, bgwork from canvas.models import CommentSticker from canvas.notifications import expander from canvas.notifications.actions import Actions from canvas.notifications.email_channel import EmailChannel from canvas.notifications....
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2007 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
import operator from django import template from django.template.defaultfilters import stringfilter from django.utils.html import escape, format_html from django.utils.safestring import mark_safe register = template.Library() @register.filter @stringfilter def trim(value, num): return value[:num] @register.fi...
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies and contributors # License: MIT. See LICENSE import frappe from frappe import _ import json from frappe.model.document import Document from frappe.desk.doctype.notification_log.notification_log import enqueue_create_notification,\ get_title, get_title_...
#!/usr/bin/python # Takes a list of files as its arguments. These are the JSON data files # from a Twitter archive. So, for example: # python TwitterBookImages.py ~/TwitterArchive/data/js/tweets/*.js # A very early version of this was based on: # http://www.leancrew.com/all-this/2013/01/completing-my-twitter-archive/ ...
#!/usr/bin/env python # # This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # A...
import unittest from mock import patch, Mock import os from sqlalchemy import create_engine from sqlalchemy.exc import OperationalError import ConfigParser from sqla_taskq import command from sqla_taskq.models import ( DBSession, Base, Task, ) import sqla_taskq.models as models import transaction import mul...
# Copyright (c) 2011 Sam Rushing # # key.py - OpenSSL wrapper # # This file is modified from python-korelib. # """ECC secp256k1 crypto routines WARNING: This module does not mlock() secrets; your private keys may end up on disk in swap! Use with caution! """ import ctypes import ctypes.util import hashlib import sys...
########################################################################## # # Copyright (c) 2007-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redis...
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com timehome@corp.globo.com import re from json import loads from pyvows import Vows, expect ctx...
# -*- coding: utf-8 -*- """The FSI for dropbox.""" # this module is named 'DropBox' instead of 'dropbox' to avoid a # naming conflict. import os import logging import stat import tempfile import dropbox from stashutils.fsi.errors import OperationFailure, IsDir, IsFile from stashutils.fsi.errors import AlreadyExists f...
""" The :mod:`sklearn.pls` module implements Partial Least Squares (PLS). """ # Author: Edouard Duchesnay <edouard.duchesnay@cea.fr> # License: BSD 3 clause from distutils.version import LooseVersion from sklearn.utils.extmath import svd_flip from ..base import BaseEstimator, RegressorMixin, TransformerMixin from ..u...
# Copyright 2016 Nexenta Systems, Inc. # 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 req...
import os import logging import threading import base64 import pkgutil import time import re import deluge.configmanager import deluge.component as component from deluge.common import is_url from deluge.event import DelugeEvent from deluge.core.rpcserver import export from deluge.plugins.pluginbase import CorePluginBa...
# Copyright (c) 2015 Mirantis Inc. # # 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 applicable law or agreed to in writ...
""" Game user interface. """ import urwid from arthur.util import MultiDeferred from zope import interface DEFAULT_PALETTE = ( ('header', 'black', 'dark green'), ('foreground', 'dark green', 'black'), ('background', 'dark gray', 'black'), ('alert', 'yellow', 'dark red') ) BACKGROUND = urwid.AttrMap(ur...
from __future__ import generators, print_function import numpy as np from random import shuffle from scipy.io import loadmat from copy import deepcopy import functools import Queue #from multiprocessing import Process, Queue, Manager, Pool import threading import time from collections import defaultdict def async_pre...
import textwrap from .core import ParseException, TreeNode, read_line, read_whitespace, peek_indentation from .elements import read_element from .filters import get_filter XHTML_DOCTYPES = { '1.1': '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">', # noqa 's...
import distutils import django import os from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.core.management import call_command from liquimigrate.settings import LIQUIBASE_JAR, LIQUIBASE_DRIVERS try: # Django 3.7 from django.core.management.sql impo...
# Copyright 2001 by Katharine Lindner. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # standard library import sys import string import copy import array import os import re i...
import os import sys import errno import random import glob import tkinter from tkinter import filedialog import pyautogui import time import configparser root = tkinter.Tk() root.withdraw() #Setting current Dir dir_path = os.path.dirname(os.path.realpath(__file__)) #Move mouse to upper left screen to kill in case ...
# 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import ( Flask, request, render_template, session, redirect, url_for, flash, send_file, send_from_directory, Response ) from flask.ext.admin import Admin from urllib import quote from os import path from os.path import isfile,isdir,dirname,abs...
# searchAgents.py # --------------- # Licensing Information: Please do not distribute or publish solutions to this # project. You are free to use and extend these projects for educational # purposes. The Pacman AI projects were developed at UC Berkeley, primarily by # John DeNero (denero@cs.berkeley.edu) and Dan Klein ...
""" Helper functions for mapping model fields to a dictionary of default keyword arguments that should be used for their equivelent serializer fields. """ from django.core import validators from django.db import models from django.utils.text import capfirst from rest_framework.compat import clean_manytomany_helptext fr...
""" does calculators for statistics and analysis related with food intake """ import re from copy import deepcopy from simulation.food import proteins, carbs, fats, calories, alcoholics class daily_intake_calculator(object): """ object that calculates various stats given a list of daily intake in diction...
from functools import partial import numpy as np from scipy import stats import statsmodels.api as sm from statsmodels.base.model import GenericLikelihoodModel from statsmodels.tools.numdiff import approx_fprime, approx_hess data = sm.datasets.spector.load() data.exog = sm.add_constant(data.exog, prepend=False) # i...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under th...
import sys import io import datetime from pyroman.utils import getkey, varsub from .generic import Generic ## @class Processor # # This class takes a filename, processes it using objects and split out # output. class Processor: ## @fn __init__ # # The initialiser for the Processor class # # @p...
# -*- coding: utf-8 -*- # Copyright 2022 Google LLC # # 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 applicable law or...
''' @author: Frank ''' import zstacktestagent.testagent as testagent import zstacklib.utils.shell as shell import zstacklib.utils.jsonobject as jsonobject import zstacklib.utils.http as http import zstacklib.utils.linux as linux import zstacklib.utils.ssh as ssh import zstacklib.utils.log as log import threading impo...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright (C) 2010-2011 Richard Lincoln # # 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...
"""Copyright (c) 2010-2012 David Rio Vierra Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA...
# Copyright 2016 Capital One Services, LLC # # 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 applicable law or agreed to in...
# [h] hTools2.modules.webfonts ''' A collection of tools for working with webfonts. Some functions in this module require external C libraries: - [ttfautohint](http://freetype.org/ttfautohint/) - [sfnt2woff](http://people.mozilla.org/~jkew/woff/) - [ttf2eot](http://code.google.com/p/ttf2eot/) - [woff2_compress](http...
from __future__ import absolute_import import logging import os import six import subprocess import tempfile import time from email.utils import parseaddr from functools import partial from operator import attrgetter from random import randrange import lxml import toronado from django.conf import settings from djang...
""" EVLANG A mini-language for online coding of Evennia Evennia contribution - Griatch 2012 WARNING: Restricted python execution is a tricky art, and this module -is- partly based on blacklisting techniques, which might be vulnerable to new venues of attack opening up in the future (or existing ones we've misse...
from binascii import b2a_hex try: import cPickle as pickle except ImportError: import pickle from django.contrib.gis.gdal import (OGRGeometry, OGRGeomType, OGRException, OGRIndexError, SpatialReference, CoordTransform, GDAL_VERSION) from django.contrib.gis.gdal.prototypes.geom import GEOJSON from django.co...
import sys import pytest from desmod.config import ( ConfigError, NamedManager, _safe_eval, apply_user_config, apply_user_overrides, factorial_config, fuzzy_lookup, parse_user_factor, parse_user_factors, ) @pytest.fixture def config(): return { 'foo.bar.baz': 17, ...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from collections import OrderedDict from fairseq import utils from fairseq.models import ( FairseqMultiModel, register_model, reg...
# flake8: noqa # Disable Flake8 because of all the sphinx imports # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you un...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
from __future__ import unicode_literals, division, absolute_import import argparse import contextlib from datetime import datetime, timedelta from sqlalchemy import func from flexget import options, plugin from flexget.event import event from flexget.manager import Session from flexget.utils.tools import console try:...
#!/usr/bin/python import pyglet import math import sys import random from collections import namedtuple window = pyglet.window.Window(1024, 768) # or: fullscreen=True) pyglet.resource.path.append('./images') pyglet.resource.reindex() key = pyglet.window.key # Gravity constant - no relation to normal G G = 15000 #...
import copy import re import datetime from taggit.forms import TagWidget from modelcluster.forms import ClusterForm, ClusterFormMetaclass from django.template.loader import render_to_string from django.template.defaultfilters import addslashes from django.utils.safestring import mark_safe from django import forms fro...
# # Copyright (c) SAS Institute Inc. # # 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 applicable law or agreed to in w...
# ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
""" pyKML Utility Module The pykml.utility module provides utility functions that operate on KML documents """ import re def clean_xml_string(input_string): '''removes invalid characters from an XML string''' from curses import ascii return ''.join(c for c in input_string if ascii.isascii(c)) def format...
#!/usr/bin/env python # -*- coding: utf-8 -*- # filename: client.py ''' Client module for Fastdfs 3.08 author: scott yuan scottzer8@gmail.com date: 2012-06-21 ''' import os, sys from fdfs_client.utils import * from fdfs_client.tracker_client import * from fdfs_client.storage_client import * from fdfs_client.exc...
# 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...
from project.utils import auth from flask import Blueprint, request, redirect from project import db, session from project.models import Task from project.utils import utils from sqlalchemy import text from datetime import datetime import json tasks = Blueprint('tasks', __name__) @tasks.route('/retrieve', methods=['...
# -*- coding: utf-8 -*- import random import collections import warnings import numpy as np from uncertainties import ufloat from future.utils import with_metaclass from abc import ABCMeta, abstractmethod, abstractproperty from ..patch.pint import ureg MAXDEPTH = 4 MAXITEMS = 5 NTRIES = 1000 TYPES = "numpy", "uncerta...
{ # Journey Page - journey tab "uidJourneyTabJourneyPanel": { W3Const.w3PropType: W3Const.w3TypePanel, W3Const.w3PropSubUI: [ "uidJourneyTabJourneyQueryPanel", "uidJourneyTabJourneyAddPanel" ] }, # Query "uidJourneyTabJourneyQueryPanel": { ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import logging from oauthlib import oauth2 from oauthlib.oauth2.rfc6749.endpoints import base from pyramid.response import Response from pyramid.compat import native_ log = logging.getLogger(__name__) OAUTH_PARAMS = ( 'access_token'...
#!/usr/bin/env python3 # Copyright (c) 2013-2014, Ruslan Baratov # All rights reserved. help_wiki = "https://github.com/ruslo/sugar/wiki/Examples-testing" import os import argparse import re import sys import subprocess import copy import detail.trash import detail.os_detect import detail.argparse top_dir = os.get...