text
stringlengths
475
200k
# encoding: utf-8 # 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY;...
import unittest from conans.client.rest.rest_client import RestApiClient from conans.model.ref import ConanFileReference, PackageReference from conans.test.utils.test_files import hello_source_files from conans.paths import CONANFILE, CONAN_MANIFEST, CONANINFO import sys from conans.client.output import ConanOutput, Co...
#!/usr/bin/env python3 from PISMNC import PISMDataset as NC from optparse import OptionParser import numpy as np import subprocess import shlex import sys parser = OptionParser() parser.usage = "%prog [options]" parser.description = "Test the SSAFD solver using various geometric configurations." parser.add_option("-...
from sqlalchemy import types from sqlalchemy_utils.exceptions import ImproperlyConfigured from sqlalchemy_utils.utils import str_coercible from .scalar_coercible import ScalarCoercible try: import phonenumbers from phonenumbers.phonenumber import PhoneNumber as BasePhoneNumber except ImportError: phonenu...
from flask import Blueprint, render_template from flask.views import MethodView from ..exceptions import FormValidationError, LoginRequired, NoError from ..forms.login import LoginForm from ..tasks import add bp = Blueprint('general', __name__) class IndexView(MethodView): def get(self): raise NoError()...
# Copyright (c) 2013 Mark Dickinson # # 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, dist...
# -*- coding: utf-8 -*- dictionary = \ { 'lang': u'fr', #admin fields 'admin': u'Administrateur', 'catalogs': u'Catalogues', 'journals': u'Journaux', 'tables': u'Tables',...
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
#/******************************************************************************* #* Portions Copyright (C) 2008 Novell, 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: #* #* - Redistributi...
#!/usr/bin/env python3.8 # Copyright (C) 2015-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. import asyncio import contextlib import io import os import shutil import tempfile import unittest os.environ["TERM"] = "xterm-256color" import golden import eris.fill3 as fill3 import...
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import six from collections import OrderedDict from ..parser import Parser from .. import exceptions # Module API class InlineParser(Parser): ...
""" The MIT License (MIT) Copyright (c) 2014 Sindre Knudsen Smistad 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, modi...
#!/usr/bin/env python # Authors: Christian Brodbeck <[EMAIL]> """Open the coregistration GUI. Examples -------- .. code-block:: console $ mne coreg """ import os.path as op import mne from mne.utils import ETSContext def run(): """Run command.""" from mne.commands.utils import get_optparser, _add_v...
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Mac OS X Document Versions plugin.""" import unittest # pylint: disable=unused-import from plaso.formatters import mac_document_versions as mac_doc_rev_formatter from plaso.lib import eventdata from plaso.lib import timelib from plaso.parsers.sqlite_plugins i...
from __future__ import division, print_function, absolute_import from numpy.testing import (assert_array_equal, assert_array_almost_equal, run_module_suite) from scipy.interpolate import pade def test_pade_trivial(): nump, denomp = pade([1.0], 0) assert_array_equal(nump.c, [1.0]) ...
# Copyright 2020 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, s...
""" A generalised module to provide phase or the EField through a "Line Of Sight" Line of Sight Object ==================== The module contains a 'lineOfSight' object, which calculates the resulting phase or complex amplitude from propogating through the atmosphere in a given direction. This can be done using either g...
# -*- coding: utf-8 -*- # # test_onetooneconnect.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 Li...
#!/usr/bin/env python3 # Copyright (c) 2019-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test Taproot softfork (BIPs 340-342) from test_framework.blocktools import ( create_coinbase, c...
#!/usr/bin/env python from setuptools import setup from legistar import __version__ long_description = '' setup(name='legistar', version=__version__, packages=['legistar'], author='Forest Gregg', author_email='[EMAIL]', license='BSD', url='http://github.com/opencivicdata/python-leg...
# @author: Michael Vorotyntsev # @email: [EMAIL] # @github: unaxfromsibiria from datetime import date from django.db import connection from django.contrib import admin from django.forms.widgets import TextInput from .models import ( Client, BonusPolicy, Service, Payment, InfoVar, models) _m_list = [ 'Январь'...
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
import tkinter as tk from observables.observable import Observable from observables.observable_message import ObservableMessage from observables.observed_event import ObservedEvent class Menubar(tk.Menu, Observable): def get_menus(self): return [ ("File", [ ("Ne...
from django.db import models from hashlib import sha512 import random from datetime import datetime, timedelta KEY_SIZE = 2048 def create_key(bits=KEY_SIZE): rand = None try: sysrand = random.SystemRandom() rand = sysrand.getrandbits(bits) except NotImplementedError: rand = random...
#!/usr/bin/python # # This is a free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This Ansible library is distributed in the hope that i...
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Benny Malengier # Copyright (C) 2011 Tim G L Lyons # # 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...
# -*- coding: utf-8 -*- # Copyright(C) 2017 Vincent Ardisson # # This file is part of a weboob module. # # This weboob module 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, either version 3 of th...
""" This module implements a conditional MLE for $\sigma$ when a constraint `con` is assumed to have `con.covariance` equal to $\sigma^2 I_{n \times n}$ with $n$ being `con.dim`. It is based on a simple Gibbs scheme to sample from a Gaussian with this covariance constrained to lie in $C$ where $C$ is the region speci...
"""A PolyData file reader object. """ # Author: R.Sreekanth <sreekanth [at] aero.iitb.ac.in> # Suyog Dutt Jain <suyog.jain [at] aero.iitb.ac.in> # Copyright (c) 2009, Enthought, Inc. # License: BSD Style. # Standard library imports. from os.path import basename # Enthought imports. from traits.api imp...
""" Test the session-flushing middleware """ import unittest from django.conf import settings from django.test import Client @unittest.skipUnless(settings.ROOT_URLCONF == 'lms.urls', 'Test only valid in lms') class TestSessionFlushMiddleware(unittest.TestCase): """ Ensure that if the pipeline is exited when ...
# -*- encoding:utf-8 -*- """卖出因子参数以及选择图形可视化""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from abc import abstractmethod import ipywidgets as widgets from ..WidgetBu.ABuWGBase import WidgetFactorBase, WidgetFactorManagerBase, accordion_shut from ..Wi...
# coding:utf-8 __author__ = 'DavidYang' import wx class PictureShowFrame(wx.Frame): """PictureShowFrame""" def __init__(self, parent, title, source): wx.Frame.__init__(self, parent, -1, title) # 成员变量 self.srcTag = 'src' # self.dir_path = r'/Users/davidyang/temp/z' sel...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from __future__ import print_function import os import sys import uuid import logging import simplejson as json import paho.mqtt.client as mqtt from time import sleep try: sys.path.append(os.path.dirname(os.path.realpath(__file__)) + '/../../') from sanji.connect...
# # Copyright (C) 2000-2005 by Yasushi Saito ([EMAIL]) # # Pychart is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2, or (at your option) any # later version. # # Pychart is distributed in the ...
""" Copyright 2015-2017 Red Hat, Inc. and/or its affiliates and other contributors. 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 ...
"""Useful functions for interfacing with condor""" import subprocess import re __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = ["Alborz Geramifard", "Robert H. Klein", "Christoph Dann", "William Dabney", "Jonathan P. How"] __license__ = "BSD 3-Clause" def submitted_jobs_u...
"""Copyright 2014 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 agreed to in ...
# # Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. # from gevent import monkey monkey.patch_all() import os import sys import socket import subprocess import json import time import datetime import platform import select import gevent import ConfigParser from nodemgr.common.event_manager import EventM...
import dialogue import adonthell # -- pygettext support def _(message): return message class sarin_start (dialogue.base): text = [None,\ _("What insolence! $name, do you believe the depths of what they have done to our Lady? To accuse her of common theft, as if she was a human! And to lock her away in this tiny, d...
from contextlib import contextmanager from collections import defaultdict, namedtuple from copy import copy import warnings from numba.core import (errors, types, typing, ir, funcdesc, rewrites, typeinfer, config, lowering) from numba.parfors.parfor import PreParforPass as _parfor_PreParforPas...
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the fundrawtransaction RPC.""" from test_framework.test_framework import BitcoinTestFramework fro...
# -*- coding: utf-8 -*- import sys from classes import Command __author__ = 'trol' def load_line(chip, line): if line.startswith('CHIP['): pins = line[len('CHIP['):] pins = pins[:pins.find(']')] chip.pins = int(pins) name = line[line.find("'"):] if name[0] != "'" or name...
# -*- 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 -*- # 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 Apach...
# Copyright 2017,2018,2019,2020,2021 Sony 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...
#!/usr/bin/python2 # # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # """ General routines to help generate actual/baseline decoders. """ import dgen_core import dgen_output # The list of rebui...
# -*- coding: utf-8 -*- """ database ~~~~~~~~ Interface to database of nummified strings. NummifyDatabase: Interface for interacting with a nummification database. """ import sqlite3 class NummifyDatabase(object): SCHEMA = ''' CREATE TABLE IF NOT EXISTS nummified ( message TEXT, n...
# coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import properties class TestErrors(unittest.TestCase): def test_validation_error(self): with self.assertRaises(TypeError):...
# -*- coding: utf-8 -*- import json from django.conf import settings from django.http import HttpResponse from django.shortcuts import render_to_response from django.template import RequestContext import requests def home(request): context = { "skills": [ ["Recruiting", "Strategic HR", "Custo...
from nose.tools import eq_ from spritecss.css import parser from itertools import izip, starmap def tokenizes_to(css, toks): got = list(parser.css_tokenize_data(css)) expect = list(starmap(parser.Token, toks)) for got_tok, exp_tok in izip(got, expect): eq_(got_tok, exp_tok) def test_tokenize_comme...
# -*- coding: utf-8 -*- ex:set ts=4 et: from exceptions import NotImplementedError import os from novabuild.run import system, check_code from novabuild.colours import blue from novabuild.commands.fetch import fetch class BuildMethod(object): def __init__(self, args): self.args = args # Uncompress t...
import os from gi.repository import Gtk from gi.repository import GObject import pygame import event CANVAS = None class PygameCanvas(Gtk.EventBox): """ mainwindow is the activity intself. """ def __init__(self, mainwindow, pointer_hint = True): GObject.GObject.__init__(self) glo...
#!/usr/bin/python # -*- coding: utf-8 -*- # @author Viktor Zharina <[EMAIL]> # CC-BY-SA License import urllib.request from config.settings import * from config.banks import * import json from bs4 import BeautifulSoup #import MySQLdb from McBase import McBase from decimal import * getcontext().prec = 4 # Описание рабо...
#!/usr/bin/python # # Adagios is a web based Nagios configuration interface # # Copyright (C) 2014, Pall Sigurdsson <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either vers...
# OpenShot Video Editor is a program that creates, modifies, and edits video files. # Copyright (C) 2009 Jonathan Thomas # # This file is part of OpenShot Video Editor (http://launchpad.net/openshot/). # # OpenShot Video Editor is free software: you can redistribute it and/or modify # it under the terms of the GNU G...
#!/usr/bin/python # buildtest.py # # Tests important algorithms after build. # # Sofia Lemons # October 31, 2008 import timeit, sys if len(sys.argv) > 1 and sys.argv[1] == "--help": print "buildtest.py [nthreads] [nbperthread] [weight] [costbound] [min_expand]" exit(0) if len(sys.argv) > 1: nthreads = st...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
#!/usr/bin/env python import unittest from peacock.Input.ExecutableInfo import ExecutableInfo from peacock.utils import Testing class Tests(Testing.PeacockTester): def checkFile(self, output, gold_file, write_output=False): if write_output: with open("tmp_out.txt", "w") as f: f....
# -*- coding: utf-8 -*- # Copyright 2015 Mark Brand - c01db33f (at) gmail.com # # 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....
import sys import json import datetime from reinforcepy.environments import ALEEnvironment from reinforcepy.networks.dqn.tflow.target_dqn import TargetDQN from reinforcepy.learners.dqn.asynchronous.q_thread_learner import QThreadLearner from reinforcepy.learners.dqn.asynchronous.async_thread_host import AsyncThreadHost...
#!/usr/bin/env python #encoding=utf8 #Copyright [2014] [Wei Zhang] #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 ...
#!/usr/bin/env python """Tests for grr.client.client_actions.grr_rekall.""" import functools import os import logging from grr.lib import action_mocks from grr.lib import aff4 from grr.lib import config_lib from grr.lib import flags from grr.lib import test_lib # This test runs flows from these modules. pylint: di...
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import os import operator import sys sys.path.append(os.path.join(os.path.dirname(__file__), '..','..', 'source')) import pytest import lucidity TEST_TEMPLATE_PATH = os.path.join( os.path.dirname(__file__), ...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2013 Contributor # # 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 t...
# -*- coding: utf-8 -*- """ Invoice :copyright: (c) 2014 by Openlabs Technologies & Consulting (P) Limited :license: GPLv3, see LICENSE for more details. """ from trytond.pool import PoolMeta, Pool from nereid import abort __all__ = ['Sale'] __metaclass__ = PoolMeta class Sale: __name__ = 'sale.sale...
""" Copyright 2017-present Airbnb, 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, sof...
from blog.models import Entries, Category from django.views.generic import ListView, DetailView from django.views.generic.dates import MonthArchiveView,YearArchiveView from calendar import month_name class BlogMenuMixin(object): def get_blog_archives(self): edates = Entries.objects.filter(status=Entri...
#!/usr/bin/python # Copyright (C) 2013 Patrick Totzke <[EMAIL]> # This file is released under the GNU GPL, version 3 or a later revision. from example1 import construct_example_tree, palette # example data from decoration import CollapsibleIndentedTree # for Decoration from widgets import TreeBox import urwid if _...
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup setup( name='django-tastypie-with-file-upload-and-model-form-validation', version='0.9.11', description='A fl...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Cask Data, Inc. # # Used to generate documentation media files from .rst sources. # # Currently, uses rst2pdf to generate PDFs. # To be enhanced later to include using landslide to generate slides. # # PDF Generation # -------------- # Pre-processes ...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> import os.path import sys from alembic import command, util, autogenerate as autogen from alembic.config import Config, CommandLine from alembic.environment import EnvironmentContext from alembic.script impo...
# -*- coding: utf-8 -*- from typing import Any from eli5.base import TreeInfo, NodeInfo def tree2text(tree_obj, indent=4): # type: (TreeInfo, int) -> str """ Return text representation of a decision tree. """ parts = [] def _format_node(node, depth=0): # type: (NodeInfo, int) -> None...
""" OsRelease - file ``/etc/os-release`` ==================================== This module provides plugins access to file ``/etc/os-release``. Typical content of file ``/etc/os-release`` is:: NAME="Red Hat Enterprise Linux Server" VERSION="7.2 (Maipo)" ID="rhel" ID_LIKE="fedora" VERSION_ID="7.2" ...
import matplotlib matplotlib.use('Agg') from matplotlib import cm, colors import matplotlib.pyplot as plt import numpy as np import scipy.sparse as sps import argparse import csv import sys from node_learning import * from exponential_families import * from utils import * FIG_FONTSIZE = 18 FIG_TITLE_FONTSIZE = 28 FIG...
""" $Revision: 1.2 $ $Date: 2009/09/14 09:48:02 $ Author: Martin Kuemmel ([EMAIL]) Affiliation: Space Telescope - European Coordinating Facility WWW: http://www.stecf.org/software/slitless_software/axesim/ """ def get_HRC_PR200L_WCS(): """ Defines parameters for the ACS/HRC/PR200L slitless mode @return: sl...
#!/usr/bin/python # -*- coding:utf-8 -*- # Commons Metadata Extractor # Copyright (C) 2015 Wikimedia Deutschland e.V. # Authors: Johannes Kroll # # 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, ...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
# -*- coding: utf-8 -*- # 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 # # Un...
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
#see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/widgets/flags.py # Flag Widgets - a collection of flags as widgets # author: John Precedo ([EMAIL]) __version__=''' $Id: flags.py 3345 2008-12-12 17:55:22Z damian $ ''' __doc__="""This...
"""Unit tests for bluesky.models.fires""" __author__ = "Joel Dubowy" from py.test import raises from bluesky import locationutils class TestLatLng(object): def test_invalid_location_data(self): with raises(ValueError) as e_info: locationutils.LatLng(None) assert e_info.value.args[...
# Eloipool - Python Bitcoin pool server # Copyright (C) 2011-2013 Luke Dashjr <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your o...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # # Unle...
#!/usr/bin/env python # coding=utf-8 """ Runs bcl2fastq creating fastqs and concatenates fastqs across lanes. Intended to be used with NextSeq data and it does not do any cleanup! Original dumped fastqs will remain along with all of the bcl files. """ from __future__ import print_function import fileinput import os i...
#!/usr/bin/env ambari-python-wrap """ 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 # In[ ]: # TensorFlow Linear Model Tutorial #python wide_n_deep_tutorial.py --model_type=wide import tempfile import urllib train_file = tempfile.NamedTemporaryFile() test_file = tempfile.NamedTemporaryFile() urllib.urlretrieve("http://mlr.cs.umass.edu/ml/machine-learning-databases/adult/adult.dat...
# Copyright 2017 datawire. 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 agr...
import asyncio import asyncpg import os import jinja2 from starlette.applications import Starlette from starlette.responses import HTMLResponse, UJSONResponse, PlainTextResponse from starlette.routing import Route from random import randint from operator import itemgetter from urllib.parse import parse_qs READ_ROW_SQ...
# Copyright 2007-2014 University Of Southern California # # 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...
__license__ = 'MIT License <http://www.opensource.org/licenses/mit-license.php>' __author__ = 'Lucas Theis <[EMAIL]>' __docformat__ = 'epytext' from transform import Transform from univariategaussianization import UnivariateGaussianization from numpy.linalg import inv, slogdet from numpy import vstack, dot, zeros cla...
#!/usr/bin/python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # not...
""" Arrows ------ Plotting arrows. """ __tags__ = ['Vector data'] import matplotlib.pyplot as plt import numpy as np import cartopy.crs as ccrs import cartopy.feature as cfeature def sample_data(shape=(20, 30)): """ Return ``(x, y, u, v, crs)`` of some vector data computed mathematically. The returned...
''' Django Model definition for foodcheck_app ''' # Copyright (C) 2013 Timothy James Austen, Eileen Qiuhua Lin, # Richard Esplin <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by...
# -*- coding: utf-8 -*- # # Instant Press. Instant sites. CMS developed in Web2py Framework # Site: http://www.instant2press.com # # Copyright (c) 2010 Mulone, Pablo Martín # # License Code: GPL, General Public License v. 2.0 # License Content: Creative Commons Attribution 3.0 # # Also visit: www.web2py.com # ...
#!/usr/bin/env python import os import sys import dataset import util import run_ofs import run_liblinear import run_fgm import run_mRMR import run_bif #model list model_list = ['mRMR','BIF'] model_list = ['SOFS','PET','SGD+mRMR','SGD+BIF'] model_list = ['SOFS'] #dataset list ds_list = ['caltech_new'] #number of t...
demo = ( ( ( ("workspace", "Workspace"), ("table", "Block"), ("dock-case", "DockCase"), ("dock-case_1", "Block"), ("dock-body", "DockDrawer"), ("dock-body_2", "DockFrontPanel"), ("dock-body_2_1", "Prism"), ("dock-body_2_2", "Block"), ("dock-body_2_3", "Block"), ("dock-body_4", "DockHandle"), ("do...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. import random from django.conf import settings from django.utils i...
# -*- coding: utf-8 -*- from collections import defaultdict from itertools import groupby, starmap from operator import attrgetter, itemgetter from django.shortcuts import get_object_or_404 from django.utils.encoding import force_text from django.utils.six.moves import filter, filterfalse from django.utils.translation...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults from frappe.utils import cint, flt from frappe import _, msgprint, throw from erpnext.accounts.party import get_par...