gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Excel related functions """ from __future__ import absolute_import, print_function from collections import OrderedDict from copy import copy from openpyxl import Workbook, load_workbook from openpyxl.cell import ( Cell, column_index_from_string, coordinate_from_string, get_column_letter, ) from op...
# Copyright 2016-2017 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 ...
# -*- coding: utf-8 -*- from south.v2 import DataMigration from django.contrib.contenttypes.models import ContentType class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." # Note: Don't use "from appname.models import ModelName". # Use orm.ModelName ...
# Copyright (C) 2010 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 writ...
# coding: utf-8 from grumers.apps.web.views import BasePageView from django.utils.decorators import method_decorator from django.contrib.auth.decorators import login_required from django.views.generic import CreateView, UpdateView, DeleteView, FormView from django.views.generic.list import BaseListView from django_tabl...
# Arguments are: # 1. Working directory. # 2. Rope folder import difflib import io import json import os import sys import traceback try: import rope from rope.base import libutils from rope.refactor.rename import Rename from rope.refactor.extract import ExtractMethod, ExtractVariable import rope....
# Copyright (c) 2015 Mellanox 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 # # U...
# Copyright 2018 DeepMind Technologies Limited. # # 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 json import base64 from twisted.internet.defer import inlineCallbacks, DeferredQueue from twisted.web.http import Request, BAD_REQUEST from twisted.web.server import NOT_DONE_YET from vumi.transports.mxit import MxitTransport from vumi.transports.mxit.responses import ResponseParser from vumi.utils import http...
# -*- coding: utf-8 -*- """ codegen ~~~~~~~ Extension to ast that allow ast -> python code generation. :copyright: Copyright 2008 by Armin Ronacher. :license: BSD. """ from ast import * BOOLOP_SYMBOLS = { And: 'and', Or: 'or' } BINOP_SYMBOLS = { Add: '+', Su...
"""CLI arguments definition. NOTE: the CLI interface may change before reaching v1.0. """ from textwrap import dedent, wrap # noinspection PyCompatibility from argparse import (RawDescriptionHelpFormatter, FileType, OPTIONAL, ZERO_OR_MORE, SUPPRESS) from httpie import __doc__, __version__ from ...
import csv import logging import os import sys from itertools import islice from collections import defaultdict import xlrd from common.models import Publication, WebLink, WebResource from django.conf import settings from django.utils.text import slugify from django.core.management.base import BaseCommand, CommandErr...
from itertools import cycle, chain from time import perf_counter from ceed.storage.controller import DataSerializerBase from ceed.analysis import CeedDataReader from ceed.tests.ceed_app import CeedTestApp from ceed.tests.test_app.examples.stages import SerialAllStage, StageWrapper from ceed.tests.test_app.examples.fun...
# -*- test-case-name: twisted.test.test_log -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Logging and metrics infrastructure. """ from __future__ import division, absolute_import import sys import time import warnings from datetime import datetime from zope.interface import Interf...
# Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE). # Copyright (c) 2009-2010 Arista Networks, Inc. # http://www.logilab.fr/ -- mailto:contact@logilab.fr # 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 # ...
import shelve import os import re from resource_api.interfaces import Resource as BaseResource, Link as BaseLink, AbstractUriPolicy from resource_api.schema import StringField, DateTimeField, IntegerField from resource_api.service import Service from resource_api.errors import ValidationError RE_SHA1 = re.compile("^...
# -*- coding: utf-8 -*- """route-ctl entry manager.""" from __future__ import absolute_import, unicode_literals, with_statement import json import re from gettext import translation from logging import getLogger from .builder import RouteBuilder from .parser import RouteParser try: from itertools import ifilter...
#!/usr/bin/python # -*- coding: utf-8 -*- import logging import socket import ssl import struct import time import unittest import re # This code is based upon the Kafka producer/client classes logger = logging.getLogger('crawlutils') DEFAULT_SOCKET_TIMEOUT_SECONDS = 120 class MTGraphiteClient(object): """ ...
""" Test quantity functionality. Copyright 2012, Casey W. Stark. See LICENSE.txt for more information. """ import nose import numpy as np from utils import equal_sigfigs from dimensionful.units import Unit from dimensionful.quantity import Quantity # @todo: global option? required_precision = 4 def test_creatio...
from datetime import datetime import yaml import next.utils as utils from next.database_client.DatabaseAPI import DatabaseAPI db = DatabaseAPI() from next.logging_client.LoggerAPI import LoggerAPI ell = LoggerAPI() class ResourceManager: """ resource_manager Author: Lalit Jain, Kevin Jamieson, Chris Ferna...
#!/usr/bin/env python3 import urllib.request, urllib.error import getopt, sys, os, shutil import WeatherPrinter, BingWallpaperDownloader from FunfactPrinterManager import FunFactManager, FunFactMode ''' Check if internet is on ''' def isInternetOn(): googleUrl = 'http://216.58.192.142' try: urllib.r...
""" Utility functions models code """ import numpy as np import pandas as pd import scipy.linalg from statsmodels.tools.data import _is_using_pandas from statsmodels.tools.validation import array_like def asstr2(s): if isinstance(s, str): return s elif isinstance(s, bytes): return s.decode('l...
# 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...
from __future__ import absolute_import from datetime import timedelta from pickle import loads, dumps from celery import signature from celery import states from celery import group from celery import uuid from celery.datastructures import AttributeDict from celery.exceptions import ImproperlyConfigured from celery....
#!/usr/bin/env python import sys from console import Console from runner import FtpCommands, NmapCommands, WebCommands, DnsCommands, SmbCommands from objects import Project def main_menu(): c = '' while c != '99': print '' print '========================================' print ' ...
# -*- coding: utf-8 -*- """This module contains methods for discovering Sonos devices on the network.""" from __future__ import unicode_literals import logging import socket import select from textwrap import dedent import time import struct from . import config from .utils import really_utf8 _LOG = logging.getLogg...
from pyramid.view import view_config from pyramid_mailer import get_mailer from pyramid_mailer.message import Message import transaction import re from py2neo import neo4j, ogm from database_config import * import os from cuorewebpage.lib.session import * from cuorewebpage.Model.User import * from cuorewebpage.Mod...
# # Copyright 2015 Naver Corp. # # 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...
# -*- coding: utf-8 -*- ''' A salt module for SSL/TLS. Can create a Certificate Authority (CA) or use Self-Signed certificates. :depends: - PyOpenSSL Python module :configuration: Add the following values in /etc/salt/minion for the CA module to function properly:: ca.cert_base_path: '/etc/pki' ''' # p...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.forms import ( CheckboxSelectMultiple, ClearableFileInput, RadioSelect, TextInput, ) from django.forms.widgets import ( ChoiceFieldRenderer, ChoiceInput, RadioFieldR...
# Copyright 2017 Josh Karlin. All rights reserved. # Use of this source code is governed by the Apache license found in the LICENSE # file. import argparse import datetime import getopt import json import sys import tempfile import threading import time import urllib.request import urllib.parse gFileCache = None; # ...
from unittest import TestCase from mock import Mock from qrl.core import config from qrl.core.Indexer import Indexer from qrl.core.misc import logger from qrl.core.State import State from qrl.core.StateContainer import StateContainer from qrl.core.OptimizedAddressState import OptimizedAddressState from qrl.core.Chain...
#Copyright (C) 2013 by Ngan Nguyen # #Released under the MIT license, see LICENSE.txt ''' Object represents a TCR repertoire sample ''' import os import random import copy import time import gzip import cPickle as pickle from jobTree.scriptTree.target import Target from sonLib.bioio import system from sonLib.bioio i...
# 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 # # Unless required by applicable ...
"""Shor's algorithm and helper functions. Todo: * Get the CMod gate working again using the new Gate API. * Fix everything. * Update docstrings and reformat. * Remove print statements. We may want to think about a better API for this. """ import math import random from sympy import Mul, S from sympy import log, sqrt...
# 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 ...
# -*- coding: utf-8 -*- ''' checkrestart functionality for Debian and Red Hat Based systems Identifies services (processes) that are linked against deleted files (for example after downloading an updated binary of a shared library). Based on checkrestart script from debian-goodies (written by Matt Zimmerman for the ...
from collections import OrderedDict from django.urls.exceptions import NoReverseMatch from modelcluster.models import get_all_child_relations from rest_framework import relations, serializers from rest_framework.fields import Field, SkipField from taggit.managers import _TaggableManager from wagtail.core import field...
#Embedded file name: ACEStream\Core\Subtitles\SubtitleHandler\SubsMessageHandler.pyo from ACEStream.Core.BitTornado.BT1.MessageID import SUBS, GET_SUBS from ACEStream.Core.BitTornado.bencode import bencode, bdecode from ACEStream.Core.Subtitles.MetadataDomainObjects.Languages import LanguagesProvider from ACEStream.Cor...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.utils import cint, has_gravatar, format_datetime, now_datetime, get_formatted_email from frappe import throw, ...
''' Functions for handling star formation rates ''' import time import numpy as np # --- local --- import util as UT def LogSFR_sfms(logMstar, z_in, sfms_dict=None): ''' Wrapper for SFMS star formation rates ''' if sfms_dict['name'] == 'constant_offset': # the offset from the average SF...
# Copyright (c) 2012 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 ...
# coding: utf-8 """ flask_wtf.csrf ~~~~~~~~~~~~~~ CSRF protection for Flask. :copyright: (c) 2013 by Hsiaoming Yang. """ import os import hmac import hashlib import time from flask import Blueprint from flask import current_app, session, request, abort from werkzeug.security import safe_str_cmp from ...
# Copyright (c) 2016 IBM Corp. # # 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 ...
from __future__ import print_function, division from lib import * from run import * def testcnl(x): def f(x) : return x**2 + 3*x + 1 def g(x) : return 3*x + 3 return abs(f(x) - g(x)) print(testcnl(-1.39356)) class CurveAndLine(Function): def cells(i): return Have(#T = Time(), x = Aux('...
""" Tests of neo.io.axographio """ from datetime import datetime import unittest from neo.io import AxographIO from neo.test.iotest.common_io_test import BaseTestIO import numpy as np from numpy.testing import assert_equal import quantities as pq class TestAxographIO(BaseTestIO, unittest.TestCase): files_to_te...
from biicode.common.edition.blockprocessor import BlockProcessor from biicode.common.utils.bii_logging import logger from biicode.common.edition import changevalidator from collections import defaultdict from biicode.common.model.symbolic.reference import References from biicode.common.exception import BiiException, No...
# Copyright 2019 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...
# Copyright (C) 2008 The Android Open Source Project # # 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 ...
from collections import namedtuple from itertools import chain from gi.repository import GLib from dbus.exceptions import DBusException from delegates.base import SystemCalcDelegate from delegates.dvcc import Dvcc # Victron packages from ve_utils import exit_on_error # Write temperature this often (in 3-second units)...
# Copyright 2017 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, ...
#!/usr/bin/env python # # Use the raw transactions API to spend sarmacoinss received on particular addresses, # and send any change back to that same address. # # Example usage: # spendfrom.py # Lists available funds # spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 # # Assumes it will talk to a sarmacoinsd ...
# -*- coding: utf-8 - # # This file is part of offset. See the NOTICE for more information. from collections import deque import random from .context import Context from .exc import ChannelError from ..util import six from . import proc class bomb(object): def __init__(self, exp_type=None, exp_value=None, exp_t...
import unittest from flask_sqlalchemy import SQLAlchemy from flask import ( # type: ignore[attr-defined] Flask, _request_ctx_stack, has_request_context, ) import pytest from coaster.auth import ( add_auth_anchor, add_auth_attribute, current_auth, request_has_auth, ) from coaster.sqlalch...
import types import itertools import collections import warnings __all__ = [] class Error(Exception): """ Base class for data-pipe errors. """ def __init__(self, msg): Exception.__init__(self, msg) __all__ += ['Error'] class NoResultError(Error): """ Indicates a pipeline termi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2020-2022 F4PGA 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 # # Unl...
# yellowbrick.classifier.prcurve # Implements Precision-Recall curves for classification models. # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Tue Sep 04 16:47:19 2018 -0400 # # ID: prcurve.py [] benjamin@bengfort.com $ """ Implements Precision-Recall curves for classification models. """ ########...
# Created by Anton Davydov on Apr, 2015 # Copyright (c) 2014-2015 Anton Davydov # 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 #...
#!/usr/bin/python -tt # # Copyright 2009-2010 Facebook, 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 applicab...
# Copyright 2013 Google Inc. All Rights Reserved. """Manage parsing resource arguments for the cloud platform. The Parse() function and Registry.Parse() method are to be used whenever a Google Cloud Platform API resource is indicated in a command-line argument. URLs, bare names with hints, and any other acceptable sp...
# -*- coding: utf-8 -*- # # This file is part of Python-ASN1. Python-ASN1 is free software that is # made available under the MIT license. Consult the file "LICENSE" that is # distributed together with this file for the exact licensing terms. # # Python-ASN1 is copyright (c) 2007-2016 by the Python-ASN1 authors. See th...
from panda3d.core import * from panda3d.direct import * from panda3d.core import * from panda3d.direct import * from direct.interval.IntervalGlobal import * from direct.distributed.ClockDelta import * from toontown.toonbase import ToontownGlobals from direct.directnotify import DirectNotifyGlobal import DistributedDoor...
import datetime, urllib, re from tagging.fields import TagField from tagging.models import Tag from django.contrib.comments.moderation import CommentModerator, moderator from django.conf import settings from django.db.models.signals import post_save, pre_save from django.db.models import permalink from django_yaba.fiel...
# mysql/mysqlconnector.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql+mysqlconnector :name: MySQL Connector/Python ...
"""Examine callable regions following genome mapping of short reads. Identifies callable analysis regions surrounded by larger regions lacking aligned bases. This allows parallelization of smaller chromosome chunks through post-processing and variant calling, with each sub-section mapping handled separately. Regions ...
""" fg.py: fg stands for FunctionGraph Contains the FunctionGraph class and exception types that it can raise. """ from __future__ import absolute_import, print_function, division import sys import time import traceback import theano from theano.gof import graph from theano.gof import utils from theano.gof import too...
from __future__ import print_function, division, absolute_import import itertools import warnings import sys # unittest only added in 3.4 self.subTest() if sys.version_info[0] < 3 or sys.version_info[1] < 4: import unittest2 as unittest else: import unittest # unittest.mock is not available in 2.7 (though unit...
# testing/assertsql.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from ..engine.default import DefaultDialect from .. import util import re impor...
# 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 # vim: set fileencoding=utf-8 : # Andre Anjos <andre.anjos@idiap.ch> # Wed 16 Oct 10:08:42 2013 CEST import os import sys import subprocess import logging from .utils import uniq, uniq_paths, find_executable def call_pkgconfig(cmd, paths=None): """Runs a command as a subprocess and raises if t...
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.test import TestCase from zerver.models import ( get_client, get_realm, get_stream, get_user_profile_by_email, Message, Recipient, ) from zerver.lib.actions import ( apply_events, create_stream_if_needed, do_add_alert_words...
import os import socket import StringIO import tempfile import time import traceback from django.conf import settings import commonware.log import elasticsearch import requests from cache_nuggets.lib import memoize from PIL import Image from lib.crypto import packaged, receipt from lib.crypto.packaged import Signing...
import csv import ntpath from datetime import date from datetime import timedelta import os import os.path import boto3 s3_client = boto3.client('s3') def ML_concat(csv1, csv2): main = open(csv1,"a") for row in open(csv2): main.write(row) def bank_statement_concat(csv1, csv2): main = open(csv1,...
#!/usr/bin/env python """This tutorial introduces the LeNet5 neural network architecture using Theano. LeNet5 is a convolutional neural network, good for classifying images. This tutorial shows how to build the architecture, and comes with all the hyper-parameters you need to reproduce the paper's MNIST results. Thi...
#!/usr/bin/env python from __future__ import print_function from __future__ import absolute_import import os import csv import sys import glob import operator import numpy as np import itertools, functools import matplotlib.pyplot as plt from sklearn import preprocessing from scipy.optimize import curve_fit from wav...
""" Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner try: from simplejson._speedups import scanstring as c_scanstring except ImportError: c_scanstring = None FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): _BYTES = '7FF8...
"""Host Reservation DHCPv4 stored in MySQL database.""" # pylint: disable=invalid-name,line-too-long import pytest import srv_msg import misc import srv_control @pytest.mark.disabled @pytest.mark.host_reservation @pytest.mark.kea_only def test_v4_host_reservation_mysql_one_address_inside_pool(): misc.test_setu...
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest from mock import patch from mock import MagicMock as Mock from pyrax.clouddatabases import CloudDatabaseBackupManager from pyrax.clouddatabases import CloudDatabaseDatabase from pyrax.clouddatabases import CloudDatabaseFlavor from pyrax.clouddatabases imp...
# coding: utf-8 # # Copyright 2010-2014 Ning, Inc. # Copyright 2014-2020 Groupon, Inc # Copyright 2020-2021 Equinix, Inc # Copyright 2014-2021 The Billing Project, LLC # # The Billing Project, LLC licenses this file to you under the Apache License, version 2.0 # (the "License"); you may not use this file except in com...
""" mfparbc module. Contains the ModflowParBc class. Note that the user can access the ModflowParBc class as `flopy.modflow.ModflowParBc`. """ import numpy as np class ModflowParBc(object): """ Class for loading boundary condition parameter data for MODFLOW packages that use list data (WEL, GHB, DRN, e...
# 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...
import hashlib import re from collections import Counter from datetime import timedelta from django.contrib.auth.models import User from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.core.validators import MinValueValidator, MaxVal...
from __future__ import unicode_literals import uuid as uuid from django.contrib.auth.base_user import BaseUserManager, AbstractBaseUser from django.db import models from django.utils import timezone USR_ORGANIZER = 'O' USR_VOLUNTEER = 'V' USR_HACKER = 'H' USR_MENTOR = 'M' USR_SPONSOR = 'S' USR_HACKER_NAME = 'Hacker' ...
""" Python-Markdown Markdown in HTML Extension =============================== An implementation of [PHP Markdown Extra](http://michelf.com/projects/php-markdown/extra/)'s parsing of Markdown syntax in raw HTML. See <https://Python-Markdown.github.io/extensions/raw_html> for documentation. Copyright The Python Markd...
#!/usr/bin/python """ Running on local host, listening on https over tcp and http over unix domain socket for authentication assertions and secure temporary storage of authorization assertions """ import os import sys import struct import socket import SocketServer import ssl import threading import tempfile import l...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import re import requests from django.http import QueryDict from django.utils import six from urlobject import URLObject from filemaker.exceptions import FileMakerConnectionError from filemaker.parser import FMXMLObject OPERATORS = { '...
#################################################################################### # Source: http://www.wildml.com/2015/12/implementing-a-cnn-for-text-classification-in-tensorflow/ # # For Generating and loading data # # Edited by Kim, YoungJun # 1. added more substitutes for generality # 2. applying nltk tokeniz...
from __future__ import print_function, division, absolute_import import numpy as np from numba import types from numba import unittest_support as unittest from numba.compiler import compile_isolated, Flags from .support import TestCase looplift_flags = Flags() looplift_flags.set("enable_pyobject") looplift_flags.set...
# Copyright 2014 DreamHost, LLC # # Author: DreamHost, 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 applicabl...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Ken Pepple # 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 # # U...
#!/usr/bin/env python -OO # encoding: utf-8 ########### # ORP - Open Robotics Platform # # Copyright (c) 2010 John Harrison, William Woodall # # 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 Softwa...
import numpy as np import matplotlib.pyplot as plt import matplotlib.cm as cm import pandas as pd from astropy.io import fits from astropy.table import Table, join from astropy.coordinates import SkyCoord from astropy import units as u from astropy.wcs import WCS from photutils import aperture_photometry from photutil...
# Copyright 2018 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...
# Copyright 2016 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 ...
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
""" MDP planning using *dynamic programming* methods * Policy Iteration (PI) * Value Iteration (VI) """ import numpy as np from six.moves import range from .base import Planner from ..utils.validation import check_random_state __all__ = [ 'PolicyIteration', 'ValueIteration' ] class PolicyItera...
""" Core phyutil model ================== Defines the fundamental accelerator simulation related routines Imported from NSLS II APHLA :author: Lingyun Yang :modified: Guobao Shen """ import logging from .impact import build_result as build_impact_result from phantasy import facility as machine _logger = logging...
import ceGame import ceColor import pygame import random import datetime import urllib.request, urllib.error, urllib.parse class Cell: def __init__(self, ch=0, fg=0, bg=0, gfx=False, flash=False, double=False): self.ch = ch self.fg = fg self.bg = bg self.flash = flash self.d...
# Copyright 2009-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 writin...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Pedro Navarro Perez # 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...