gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python # # Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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...
# -*- 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...
""" Query subclasses which provide extra functionality beyond simple data retrieval. """ from django.core.exceptions import FieldError from django.db import connections from django.db.models.query_utils import Q from django.db.models.sql.constants import ( CURSOR, GET_ITERATOR_CHUNK_SIZE, NO_RESULTS, ) from django...
# LATITUDE is NORTH-SOUTH e.g. 33 deg SOUTH (Sydney) # LONGITUDE is EAST-WEST e.g. 151 deg EAST (Sydney) from optparse import OptionParser import datetime, math, sqlite3, sys import networkx #http://nodedangles.wordpress.com/2010/05/16/measuring-distance-from-a-point-to-a-line-segment/ # Options debug = None dbConn...
# (C) Fractal Industries, Inc. 2016 # (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # std from collections import defaultdict from functools import wraps # 3rd party from pysnmp.entity.rfc3413.oneliner import cmdgen import pysnmp.proto.rfc1902 as snmp_type fro...
import unittest from urllib3._collections import ( HTTPHeaderDict, RecentlyUsedContainer as Container ) from urllib3.packages import six xrange = six.moves.xrange from nose.plugins.skip import SkipTest class TestLRUContainer(unittest.TestCase): def test_maxsize(self): d = Container(5) f...
import numpy as np import pytest from pandas import ( DataFrame, Index, MultiIndex, Series, Timestamp, date_range, to_datetime, ) import pandas._testing as tm from pandas.api.indexers import BaseIndexer from pandas.core.groupby.groupby import get_groupby class TestRolling: def setup_m...
# 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 use ...
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. The classes in this module serve the creation of an ISO for a library creation process. The following tasks need to be performed: * split library layout i...
## # @file dct_unitest.py # @author Yibo Lin # @date Mar 2019 # import pdb import os import sys import numpy as np import unittest import torch from torch.autograd import Function, Variable import time import scipy from scipy import fftpack sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path....
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ frappe.translate ~~~~~~~~~~~~~~~~ Translation tools for frappe """ import frappe, os, re, codecs, json from frappe.utils.jinja import render_include from frappe.utils im...
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- """Unit test for config files.""" import StringIO from grr.lib import flags from grr.lib import test_lib from grr.lib.rdfvalues import anomaly as rdf_anomaly from grr.lib.rdfvalues import client as rdf_client from grr.lib.rdfvalues import config_file as rd...
#!/usr/bin/env python """Django model to DOT (Graphviz) converter by Antonio Cavedoni <antonio@cavedoni.org> Make sure your DJANGO_SETTINGS_MODULE is set to your project or place this script in the same directory of the project and call the script like this: $ python modelviz.py [-h] [-a] [-d] [-g] [-i <model_names>]...
# Copyright 2020 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...
import os from django.utils.translation import ugettext_lazy as _ from openstack_dashboard import exceptions DEBUG = False TEMPLATE_DEBUG = DEBUG COMPRESS_OFFLINE = True ALLOWED_HOSTS = ['*'] # Set SSL proxy settings: # For Django 1.4+ pass this header from the proxy after terminating the SSL, # and don't forget ...
"""Test OpenZWave Websocket API.""" from openzwavemqtt.const import ( ATTR_CODE_SLOT, ATTR_LABEL, ATTR_OPTIONS, ATTR_POSITION, ATTR_VALUE, ValueType, ) from homeassistant.components.ozw.const import ATTR_CONFIG_PARAMETER from homeassistant.components.ozw.lock import ATTR_USERCODE from homeassis...
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # 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...
import functools import sys from sentry_sdk.hub import Hub, _should_send_default_pii from sentry_sdk.utils import ( ContextVar, capture_internal_exceptions, event_from_exception, ) from sentry_sdk._compat import PY2, reraise, iteritems from sentry_sdk.tracing import Span from sentry_sdk.integrations._wsgi_...
"""Tests for the aws component config and setup.""" from asynctest import patch as async_patch, MagicMock, CoroutineMock from homeassistant.components import aws from homeassistant.setup import async_setup_component class MockAioSession: """Mock AioSession.""" def __init__(self, *args, **kwargs): ""...
# Copyright 2016 Google 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 writing,...
# Copyright 2015 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function from __future__ import division from __future__ import absolute_import import unittest import mock import webapp2 imp...
import numpy from srxraylib.sources import srfunc from srxraylib.util.h5_simple_writer import H5SimpleWriter from scipy.interpolate import interp1d from scipy.integrate import cumtrapz import scipy.constants as codata from orangecontrib.xoppy.util.fit_gaussian2d import fit_gaussian2d, info_params, twoD_Gaussian f...
"""tests basic polymorphic mapper loading/saving, minimal relationships""" from sqlalchemy import exc as sa_exc from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy import String from sqlalchemy import Table from sqlalchemy import testing from sqlalchemy.orm import create_session from sqlal...
import os import cv2 import re import time from threading import RLock import numpy as np from codependent_thread import CodependentThread from image_misc import cv2_imshow_rgb, read_cam_frame, crop_to_square from misc import tsplit, get_files_list import caffe class InputImageFetcher(CodependentThread): '''Fetc...
from abc import ABCMeta, abstractmethod from datetime import datetime try: from cdecimal import Decimal except ImportError: from decimal import Decimal from ..tools.lxml_tools import clean_html from ..tools.text import find_number, drop_space from .decorator import default, empty, cached, bind_item from .const...
""" Validation methods for the NAPALM base. See: https://napalm.readthedocs.io/en/latest/validate.html """ import yaml import copy import re from napalm.base.exceptions import ValidationException # We put it here to compile it only once numeric_compare_regex = re.compile(r"^(<|>|<=|>=|==|!=)(\d+(\.\d+){0,1})$") d...
from __future__ import unicode_literals import logging import six import time import traceback from six.moves.urllib_parse import unquote, urlencode from twisted.internet import defer from autobahn.twisted.websocket import WebSocketServerProtocol, WebSocketServerFactory, ConnectionDeny from .utils import parse_x_for...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
# slicer imports from __main__ import vtk, slicer # python includes import sys import time class Helper(object): ''' classdocs ''' @staticmethod def Info(message): ''' ''' print "[VMTK " + time.strftime("%m/%d/%Y %H:%M:%S") + "]: " + str(message) sys.stdout.flush...
###################################################################### # Copyright 2016, 2017 John J. Rofrano. 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 # # https:/...
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors. # # 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 ...
# Copyright 2010 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...
# # Copyright 2014 Rackspace, 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 ...
import requests import xmltodict import json import os class Gateway: '''Gateway class''' def __init__(self): '''Establish a gateway connection using a connection URL and auth credentials''' self.url = 'http://dev.tanklink.com/latlontdg/service.asmx?WSDL' def gateway_request(self, string)...
import numpy as np """ This file defines layer types that are commonly used for recurrent neural networks. """ def rnn_step_forward(x, prev_h, Wx, Wh, b): """ Run the forward pass for a single timestep of a vanilla RNN that uses a tanh activation function. The input data has dimension D, the hidden...
#!/usr/bin/env python # coding=UTF-8 # Title: handler.py # Description: This file contains all tornado.web.RequestHandler classes used in this application # Author David Nellessen <david.nellessen@familo.net> # Date: 12.01.15 # Note: # =========================================================...
"""Generate metafile data for use in BitTorrent applications These data structures are generalizations of the original BitTorrent and BitTornado makemetafile.py behaviors. """ import os import re import time import hashlib from .TypedCollections import TypedDict, TypedList, SplitList from .bencode import BencodedFile...
#!/usr/bin/python # # -*- coding: utf-8 -*- # # web-backup.py # # This script iterates through a config file of web services/apps # that needs backing up, using the workflow: # # # mkdir /tmp/webservice # # service stop webservice # # dbdump db_name /tmp/webservice/db_name.sql # # rsync -a /var/www/webservice /...
""" This module contains several of the most important classes used in cellpy. It also contains functions that are used by readers and utils. And it has the file- version definitions. """ import collections import datetime import importlib import logging import os import pickle import sys import time import warnings ...
"""Provide add-on management.""" from __future__ import annotations import asyncio from dataclasses import dataclass from enum import Enum from functools import partial from typing import Any, Callable, TypeVar, cast from homeassistant.components.hassio import ( async_create_backup, async_get_addon_discovery_...
from django.utils import timezone from fbmbot.models import Item from fbmbot.utils import post_facebook from common import States,Commands from matcher import find_match from processor.utils import get_url,DEFAULT_IMG_URL DEFAULT_DESCRIPTION = "Your Item Description" def fb_helper_btn(title,url,payload,web_url=True)...
import time, sys, os, copy import datetime, pprint import asyncio import logging as loggingmod from functools import wraps, partial from biothings.utils.common import get_timestamp, get_random_string, timesofar, iter_n from biothings.utils.mongo import get_src_conn, get_src_dump from biothings.utils.dataload import me...
# Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright 2013-2014 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/L...
from __future__ import division import random import warnings import numpy as np from numpy.testing import assert_allclose, raises from nose.plugins.attrib import attr from menpo.testing import is_same_array from menpo.image import Image, MaskedImage from menpo.feature import (hog, lbp, es, igo, daisy, no_op, normali...
from neupy import layers from neupy.utils import function_name_scope __all__ = ('resnet50',) @function_name_scope def ResidualUnit(n_input_filters, stride=1, rate=1, has_branch=False, name=None): def bn_name(index): return 'bn' + name + '_branch' + index def conv_name(index): ...
#!/usr/bin/env python # Created by: Robert Cimrman, 05.12.2005 """Benchamrks for umfpack module""" from __future__ import division, print_function, absolute_import from optparse import OptionParser import time import urllib.request, urllib.parse, urllib.error import gzip import numpy as np import sys import scipy...
# Copyright 2015 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 python3 # Copyright (c) 2016-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import re import fnmatch import sys import subprocess import datetime import os ########################...
""" channels.models ~~~~~~~~~~~~~~~ :copyright: (c) 2012 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ from datetime import datetime, timedelta from disqusapi import Paginator from flask import session from channels.app import app, disqusapi, schedule from channels.oauth import api_call from...
#!/usr/bin/env python # encoding: utf-8 from os.path import abspath, expanduser, join as pjoin import sys from importlib import import_module import numpy as np import cv2 import rospy from tf import TransformListener, Exception as TFException from tf.transformations import quaternion_about_axis from rospkg import R...
# 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 u...
# Copyright 2011-2015 MongoDB, 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 writi...
""" The MIT License (MIT) Copyright (c) Serenity Software, LLC 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, m...
# Copyright 2015 Google 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 applicable law or a...
# Copyright (c) 2015-2020 by Rocky Bernstein # Copyright (c) 2005 by Dan Pascu <dan@windowmaker.org> # Copyright (c) 2000-2002 by hartmut Goebel <h.goebel@crazy-compilers.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publishe...
#!/usr/bin/env python ''' left elbow is in upper arm controller Created March, 2012 @author: Peter Heim r_shoulder.py - gateway to Arduino based arm controller Copyright (c) 2011 Peter Heim. All right reserved. Borrowed heavily from Mike Feguson's ArbotiX base_controller.py code. Redistribution and use in s...
#!/usr/bin/env python import sys import os import json import argparse import subprocess import logging import logging.handlers import time import re import requests import tenacity from pexpect import pxssh import pexpect from aeon.opx.device import Device from paramiko import AuthenticationException from paramiko...
from __future__ import print_function import time import os import sys from Foundation import NSObject, NSURL, NSString from AppKit import NSApplication, NSView, NSColor, NSImage, NSCursor, NSSegmentedControl, NSSegmentSwitchTrackingSelectOne, NSRectFill, NSToolbarPrintItemIdentifier, NSToolbarFlexibleSpaceItemIdentifi...
""" Load pp, plot and save 8km difference """ import os, sys #%matplotlib inline #%pylab inline import matplotlib #matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab! from matplotlib import rc from matplotlib.font_manager import FontProperties from matplotlib import rcParams from mpl_t...
# Copyright 2011 OpenStack Foundation. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
# Copyright 2012 NEC Corporation # # 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 ag...
import pygame import time class Background(pygame.sprite.Sprite): def __init__(self, image, location): # Call Sprite initializer pygame.sprite.Sprite.__init__(self) self.image = pygame.image.load(image) self.rect = self.image.get_rect() self.rect.left, self.rect.top = locat...
########################################################################## # # Copyright (c) 2014, Image Engine Design Inc. All rights reserved. # Copyright (c) 2014, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/AllergyIntolerance) on 2017-03-22. # 2017, SMART Health IT. from . import domainresource class AllergyIntolerance(domainresource.DomainResource): """ Allergy or Intolerance (generally: Ris...
# -*- 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 #...
# -*- coding: utf-8 -*- # Script to start deployment api and make request to it. import argparse import base64 import datetime import logging import os import errno import shutil import subprocess import tempfile import threading from functools import partial from multiprocessing import Process from time import sleep f...
# neural.py # # # Created by Phoenix on 10/13/15. # from tools import rotate2D, sum_vector, neg_vector class Brain: def __init__(self,name,num): self.__name = name self.__ring = 1 + num self.__cell_num = 1 + 3*(1+num)*num self.__cells = [Cell(i,(0.,0.)) for i in range(s...
# 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): # Adding field 'FlatValue.indicator_slug' db.add_column(u'profiles_flatvalue', 'indicator_slug', self.gf('...
import socket import logging import traceback from kombu.syn import blocking from kombu.utils.finalize import Finalize from celery import beat from celery import concurrency as _concurrency from celery import registry from celery import platforms from celery import signals from celery.app import app_or_default from c...
#!/usr/bin/env python # Copyright 2016 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 # # Unle...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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.apach...
""" .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import abc import re from collections import OrderedDict from sqlite3 import Cursor from typing import Any, Dict, Generator, List, Optional, Sequence, Type, cast import typepy from typepy.type import AbstractType from .core import SimpleSQLite f...
#!/usr/bin/env python # # 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 "Li...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from ...
import asyncio import json import logging import signal import ssl import time from collections import defaultdict, namedtuple from functools import partial from again.utils import natural_sort from aiohttp import web from .packet import ControlPacket from .pinger import TCPPinger from .protocol_factory import get_tr...
#!/usr/bin/python # -*- coding: utf-8 -*- # # # Copyright 2014 Robert Bird # # 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 requir...
""" Title: Neural Style Transfer with AdaIN Author: [Aritra Roy Gosthipaty](https://twitter.com/arig23498), [Ritwik Raha](https://twitter.com/ritwik_raha) Date created: 2021/11/08 Last modified: 2021/11/08 Description: Neural Style Transfer with Adaptive Instance Normalization. """ """ # Introduction [Neural Style Tra...
# -*- coding: utf-8 -*- """ This scripts reqire a third party module 'requests'. You can get it from PyPI, i.e. you can install it using easy_install or pip. http://docs.python-requests.org/en/v0.10.4/ Original source code is written by shin1ogawa, which is in Java. https://gist.github.com/1899391 Materials f...
#!/usr/bin/python # interpolate scalar gradient onto nedelec space import petsc4py import sys petsc4py.init(sys.argv) from petsc4py import PETSc from dolfin import * Print = PETSc.Sys.Print # from MatrixOperations import * import numpy as np #import matplotlib.pylab as plt import PETScIO as IO import common import ...
import asyncio import pytest from aiohttp import web from aiohttp.web_urldispatcher import UrlDispatcher @pytest.fixture def router(): return UrlDispatcher() def test_get(router): @asyncio.coroutine def handler(request): pass router.add_routes([web.get('/', handler)]) assert len(route...
#!/usr/bin/env python # -*- coding: utf-8 -*- import csv import errno import itertools import os import time from bs4 import BeautifulSoup import click import dataset import funcy as fy import requests HTML_DB_FILENAME = 'scraped_html.db' DATASET = dataset.connect('sqlite:///' + HTML_DB_FILENAME) TABLE = DATASET['r...
from __future__ import absolute_import # Copyright (c) 2010-2017 openpyxl # Builtins styles as defined in Part 4 Annex G.2 from .named_styles import NamedStyle from openpyxl.xml.functions import fromstring normal = """ <namedStyle builtinId="0" name="Normal"> <alignment/> <border> <left/> <rig...
""" Classes and subroutines dealing with network connections and related topics. """ from __future__ import with_statement from functools import wraps import getpass import os import re import time import socket import sys from StringIO import StringIO from fabric.auth import get_password, set_password from fabric....
#!/usr/bin/env python2.7 # tool_versions.py v1.1 Creates "SW" versions json string for a particular DX applet. # Write request to stdout and verbose info to stderr. This allows easy use # in dx app scripts. # # Creates versions json string for a particular applet import ...
#!/usr/bin/env python2 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. import os import sys import time import random import tempfile import subprocess import shutil import argparse # params overwrite priority: # for default: # default_params < {blackbox,whitebox}_default_params < args ...
# 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...
from importlib import machinery import importlib import importlib.abc from .. import abc from .. import util from . import util as source_util import errno import imp import marshal import os import py_compile import shutil import stat import sys import unittest from test.support import make_legacy_pyc class Simple...
#!/usr/bin/env python # -*- coding: utf8 -*- """ @script : test_model.py @created : 2012-11-04 02:28:46.742 @changed : 2012-11-08 10:29:40.844 @creator : mkpy.py --version 0.0.27 @author : Igor A.Vetrov <qprostu@gmail.com> @about : testing application model classes """ import os, sys sys.path.insert( 0, os.path.nor...
"""Event dispatcher sends events.""" from __future__ import absolute_import, unicode_literals import os import threading import time from collections import defaultdict, deque from kombu import Producer from celery.app import app_or_default from celery.five import items from celery.utils.nodenames import anon_nodena...
# Added Fortran compiler support to config. Currently useful only for # try_compile call. try_run works but is untested for most of Fortran # compilers (they must define linker_exe first). # Pearu Peterson from __future__ import division, absolute_import, print_function import os, signal import warnings import sys fr...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
""" .. module:: request.forms. :synopsis: Defines forms used to create FOIL requests. """ from datetime import datetime from flask_login import current_user from flask_wtf import Form from flask_wtf.file import FileField from wtforms import ( StringField, SelectField, TextAreaField, SubmitField, ...
#This script will download all the lyrics from the given site(s) and get info (BPM, genre, etc) about them #Save all to a db from lxml import html import urllib import requests import datetime import sqlite3 import os.path import sys import ast from random import randint network_error_message = "Network error, try a...
"""Some examples for quick testing/demonstrations. All function accept `show` and `draw` arguments * If `draw` is `True` it will return the widgets (Scatter, Volume, Mesh) * If `draw` is `False`, it will return the data * if `show` is `False`, `ipv.show()` will not be called. """ import warnings import numpy a...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_user short_descri...
import csv import errno import heapq import math import os import sqlite3 import time from operator import itemgetter ############################################################################### def create_dirs(file_path): """Create any directories needed for the specified file. If the directories al...
# Copyright 2020 The Weakly-Supervised Control Authors. # # 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 la...
# -*- coding: utf-8 -*- import matplotlib.pyplot as plt import numpy as np import pandas as pd import progressbar import seaborn as sns from sklearn.decomposition import PCA from sklearn.ensemble import GradientBoostingRegressor, RandomForestRegressor from sklearn.linear_model import LinearRegression, LogisticRegressi...
from __future__ import absolute_import import datetime from django.conf import settings from django.contrib.auth import get_user_model from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.db import models from django.utils.timezone import utc from .github_uti...
#!/usr/bin/env python3 from reporter.connections import RedcapInstance from reporter.application_abstract_reports.redcap.percentage_complete import ( RedcapPercentageCompleteReport, ) from reporter.application_abstract_reports.redcap.withdrawn_or_excluded_with_data import ( RedcapWithdrawnOrExcludedWithDataRep...