gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from sqlalchemy.interfaces import ConnectionProxy from sqlalchemy.engine.default import DefaultDialect from sqlalchemy.engine.base import Connection from sqlalchemy import util import re class AssertRule(object): def process_execute(self, clauseelement, *multiparams, **params): pass def process_curso...
import contextlib import logging import requests from os.path import join, isfile from django.apps import apps from django.conf import settings from django.db.models import Q from django.http import Http404 from django.template.response import TemplateResponse from django.utils.translation import get_language import ...
""" Copyright (c) 2015 SONATA-NFV and Paderborn University 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 ap...
# ------------------------------------------------------------------------------- # Copyright 2017 Cognizant Technology Solutions # # 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:/...
"""This is a web based inspector for the AI System. It can be accessed via http://hostname.domain:port/inspect The hostname.domain would of course be the computer that the AI is running on. The port will need to be defined when the instance is inited. """ import string, time, direct, inspect, socket from operator im...
import sys import warnings import itertools import operator import platform import pytest import numpy as np from numpy.testing import ( assert_, assert_equal, assert_raises, assert_almost_equal, assert_array_equal, IS_PYPY, suppress_warnings, _gen_alignment_data, assert_warns, assert_raises_regex, ) ...
# Copyright (c) 2012 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. """Base class for running tests on a single device.""" import logging import time from pylib import ports from pylib.chrome_test_server_spawner import ...
"""Module for Context class.""" from seamless import compiler import weakref from weakref import WeakValueDictionary from collections import OrderedDict import json import time import asyncio from contextlib import contextmanager from . import SeamlessBase from .macro_mode import get_macro_mode, curr_macro, register_t...
# -*- coding: utf-8 -*- """ Created on Sat Aug 12 18:08:52 2017 @author: Shaun Werkhoven @purpose: To create a image classification system for the Image Intelligence TakeHome Assignment Licensed under the Apache License, Version 2.0 (the "License"); Simple image classification with flask-based HTTP API, TensorFlow ...
# Copyright 2013 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 # # Unless required by applicabl...
# 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...
# -*- coding: utf-8 -*- import numpy as np import pytest from pygam import * def test_gridsearch_returns_scores(mcycle_X_y): """ check that gridsearch returns the expected number of models """ n = 5 X, y = mcycle_X_y gam = LinearGAM() scores = gam.gridsearch(X, y, lam=np.logspace(-3,3, n...
#!/usr/bin/env python # Copyright (c) 2013 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. """Runs all the buildbot steps for ChromeDriver except for update/compile.""" import bisect import csv import datetime import glob...
# Copyright 2010 OpenStack Foundation # Copyright 2012 University Of Minho # # 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....
# Copyright (C) 2014 eNovance SAS <licensing@enovance.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.0 # # Unless required by applicabl...
#!/usr/bin/env python3 #python import time from os import mkdir, listdir from os.path import isdir, isfile from itertools import chain #from pickle import load #external import numpy as np np.set_printoptions(precision=10, threshold=np.inf) from scipy.optimize import least_squares from matplotlib import pyplot as plt...
import sys import re import os openlist = [] do_power = True # Architecture Properties Fc_in = 0.15 Fc_out = 0.1 power_short_circuit_percentage = 0.0 clb_area = 53894 R_minW_nmos = 8926 R_minW_pmos = 16067 ipin_mux_trans_size = 1.222260 C_ipin_cblock = 1.47e-15 T_ipin_cblock = 7.247e-11 grid_logic_tile_area = 0 ...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2022, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
# coding: utf-8 """ Selectel DNS API Simple Selectel DNS API. OpenAPI spec version: 1.0.1 Contact: info@mdsina.ru Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class Domain(object): """ NOTE: This cl...
# -*- coding: utf-8 -*- from __future__ import with_statement import json from djangocms_text_ckeditor.models import Text from cms.api import create_page, add_plugin from cms.constants import PLUGIN_MOVE_ACTION from cms.models import Page from cms.models.placeholdermodel import Placeholder from cms.models.pluginmodel...
# -*- coding: utf-8 -*- # Copyright (C) 2013 Yahoo! 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...
import datetime from pathlib import Path from unittest import mock import pytest from django.test.utils import override_settings from olympia import amo from olympia.amo.tests import ( TestCase, addon_factory, create_switch, version_factory, ) from olympia.git.utils import AddonGitRepository, Broken...
# Copyright (c) 2012 Lars Hupfeldt Nielsen, Hupfeldt IT # All rights reserved. This work is under a BSD license, see LICENSE.TXT. import sys, os, threading, traceback import types from collections.abc import Mapping from . import envs from .thread_state import thread_local from .values import McInvalidValue from .con...
"""Code quality label generator.""" from fastlog import log import svgwrite MARKS = ['A+++', 'A++', 'A+', 'A', 'B', 'C', 'D', 'E', 'F'] def color(marks, index): """Compute color for given mark index.""" steps_of_color = int(256 / len(marks) * 2) - 1 index_of_yellow_label = int(len(marks) / 2) if i...
""" Quaternion provides a class for manipulating quaternion objects. This class provides: - a convenient constructor to convert to/from Euler Angles (RA,Dec,Roll) to/from quaternions - class methods to multiply and divide quaternions """ """Copyright 2009 Smithsonian Astrophysical Observatory ...
# Copyright 2014 The Oppia 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 ...
#!/usr/bin/env python # Copyright (c) 2012 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. '''Unit tests for grit.format.policy_templates.writers.json_writer''' import os import sys if __name__ == '__main__': sys.path....
import os import glob import tarfile import pkg_resources import ConfigParser from pkgtools.pkg import Dir as DirTools, EggDir from pyg.scripts import script_args from pyg.locations import EASY_INSTALL, INSTALL_DIR, BIN, USER_SITE from pyg.utils import TempDir, ZipFile, call_subprocess, call_setup, run_setup, \ na...
from abc import abstractmethod from collections import Sequence, Mapping from itertools import izip import numpy as np import pytest import tensorflow as tf from keras.engine import Input from keras.layers import Dense from numpy.testing import assert_array_almost_equal from gtd.ml.framework import Feedable, KerasMod...
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
''' // Copyright 2008 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 ...
"""Fallback pure Python implementation of msgpack""" import sys import array import struct if sys.version_info[0] == 3: PY3 = True int_types = int Unicode = str xrange = range def dict_iteritems(d): return d.items() else: PY3 = False int_types = (int, long) Unicode = unicode ...
#!/usr/bin/env python """ Post-process the individual cell output files resulting from running the OpenIFS single column model over a grid of cells. The program takes a single input which is a configuration file in INI format. This is the same configuration file used to run the model that generated the column output f...
import StringIO import sys from pysh.shell.tokenizer import Tokenizer from pysh.shell.parser import Assign from pysh.shell.parser import BinaryOp from pysh.shell.parser import Parser from pysh.shell.parser import Process SIGNATURE = ('# -*- coding: utf-8 -*-\n' '# This file was auto-generated by pysh.\n...
# # Copyright 2014 Cisco Systems,Inc. # # Author: Pradeep Kilambi <pkilambi@cisco.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.0 # # Unles...
from gosubl import gs from gosubl import gsq from gosubl import gsshell from gosubl import mg9 import os import re import sublime import sublime_plugin import threading import time DOMAIN = 'GsLint' CL_DOMAIN = 'GsCompLint' class FileRef(object): def __init__(self, view): self.view = view self.src = '' self.tm...
# Minimal tests for dis module from test.support import captured_stdout from test.bytecode_helper import BytecodeTestCase import unittest import sys import dis import io import re import types import contextlib def get_tb(): def _error(): try: 1 / 0 except Exception as e: t...
"""Description of YANG & YIN grammar.""" import copy import re from . import util from . import error from . import syntax module_header_stmts = [ ('yang-version', '?'), ('namespace', '1'), ('prefix', '1'), ] submodule_header_stmts = [ ('yang-version', '?'), ('belongs-to', '1'), ] linkage_stmts...
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
## # @file density_potential.py # @author Yibo Lin # @date Jun 2018 # @brief Compute density potential according to NTUPlace3 (https://doi.org/10.1109/TCAD.2008.923063) # import math import numpy as np import torch from torch import nn from torch.autograd import Function from torch.nn import functional as F impo...
# _*_ encoding: utf-8 _*_ import calendar from datetime import date,timedelta from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.encoding import force_text from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy as...
# Authors: # Trevor Perrin # Google - parsing subject field # # See the LICENSE file for legal information regarding use of this file. #TODO # Common names # Alternative names # prefix handling # valid from # valid until # key (weak key, debian) # issuer # signature algorithm # extended validation # revocation inf...
"""A thin layer on top of the requests package that provides niceties such as retry policy, rate limit, and more logging. """ __all__ = [ 'HttpError', 'Client', 'ForwardingClient', 'Request', 'Response', ] import functools import time import logging import requests import requests.cookies try: ...
"""Tile class.""" from affine import Affine from shapely.geometry import box import warnings from ._conf import ROUND from ._funcs import _tile_intersecting_tilepyramid from ._types import TileIndex, Shape, Bounds class Tile(object): """ A Tile is a square somewhere on Earth. Each Tile can be identifie...
# Copyright (c) 2015 Red Hat, 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 require...
from collections import OrderedDict, deque from collections.abc import Callable, Iterable, MutableSet, Mapping from functools import reduce import numpy as np from multidict import MultiDict from devito.tools.utils import as_tuple, filter_ordered from devito.tools.algorithms import toposort __all__ = ['Bunch', 'Enri...
# -*- coding: utf-8 -*- """ parser ====== Tools to generate a model class (which derives from `fsic.BaseModel`) from a Python-like model script that describes the equations. Key functions: * `parse_model()` to convert a model script (string) to an intermediate representation: a list of `fsic` `Symbol` objects -...
import os import sys import traceback from _pydev_bundle import pydev_log from _pydevd_bundle import pydevd_traceproperty, pydevd_dont_trace, pydevd_utils import pydevd_tracing import pydevd_file_utils from _pydevd_bundle.pydevd_breakpoints import LineBreakpoint, get_exception_class from _pydevd_bundle.pydevd_comm imp...
#!/usr/bin/env python # Version 19, compute Jacobian matrix import numpy as np from numpy import exp, power import sys from scipy.io import loadmat from scipy.optimize import newton_krylov from scipy.linalg import solve, inv, toeplitz, eigvals from ProgressBar import * import scipy.optimize ''' chang.1166@mbi.osu.edu ...
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
# Copyright 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 requ...
from utils import Util import math import pygame from pygame.locals import * import sound if not pygame.font: print 'Warning, fonts disabled' if not pygame.mixer: print 'Warning, sound disabled' class AircraftSprite(pygame.sprite.Sprite): def __init__(self, img_path, pos, vel, angle, angle_vel): pygame.sprite.S...
from __future__ import division, print_function, absolute_import import numpy as np from numpy.testing import TestCase, run_module_suite, \ assert_array_almost_equal, assert_almost_equal, \ assert_allclose import warnings from scipy.signal import cont2discrete as c2...
""" Functions to operate on polynomials. """ from __future__ import division, absolute_import, print_function __all__ = ['poly', 'roots', 'polyint', 'polyder', 'polyadd', 'polysub', 'polymul', 'polydiv', 'polyval', 'poly1d', 'polyfit', 'RankWarning'] import re import warnings import numpy.core....
import os import json import math import random import sys import time import gflags import numpy as np from spinn.util import afs_safe_logger from spinn.util.data import SimpleProgressBar from spinn.util.blocks import to_gpu from spinn.util.misc import Accumulator, EvalReporter from spinn.util.logging import stats, ...
#!/usr/bin/env python # # Copyright 2007 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 o...
#coding=utf-8 ''' 2 tables: users, usergroup User: id username password avatar nickname description status student_number department truename tel e_mail register_date user_group auth_method Usergroup id name Token expiration can be set in User.genera...
#!/usr/bin/env python # D. Jones - 2/13/14 """This code is from the IDL Astronomy Users Library""" import numpy as np def cntrd(img, x, y, fwhm, silent=False, debug=False, extendbox = False, keepcenter = False): """;+ ; NAME: ; CNTRD ; PURPOSE: ...
import pycb import unittest import requests import json import time def bucket_list(): bucketList = [] r = requests.get("http://localhost:8091/pools/default/buckets") for bucket in r.json(): bucketList.append(bucket['name']) return bucketList class TestPycb(unittest.TestCase): @classmet...
# 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 import itertools import logging import os import random import stat import json import subprocess import sys import tempfile import unittest from unittest import TestCase import lief from utils import get_sample lief.logging.set_level(lief.logging.LOGGING_LEVEL.WARNING) def from_hex(x): ret...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:55883") else: access = Se...
"""Support for Almond.""" from __future__ import annotations import asyncio from datetime import timedelta import logging import time from aiohttp import ClientError, ClientSession import async_timeout from pyalmond import AbstractAlmondWebAuth, AlmondLocalAuth, WebAlmondAPI import voluptuous as vol from homeassista...
""" The MIT License (MIT) Copyright (c) 2014 Trustly Group AB 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, me...
#!/usr/bin/env python3 # Copyright (c) 2014-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 the wallet backup features. Test case is: 4 nodes. 1 2 and 3 send transactions between each other...
#!/usr/bin/env python from interface.services.coi.iresource_registry_service import ResourceRegistryServiceClient from interface.services.dm.ipubsub_management_service import PubsubManagementServiceClient from interface.services.dm.idataset_management_service import DatasetManagementServiceClient from interface.servic...
# Copyright 2013 Google Inc. All Rights Reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file or at # http://opensource.org/licenses/MIT """Parse SVN externals descriptions.""" from __future__ import absolute_import import logging import re import subprocess...
# 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...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from math import ceil from core.utils import error_page from django.conf import settings from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.mail import send_mail from django.db.models i...
# -*- coding: utf-8 -*- import json import os import re import sys import unittest from datetime import datetime import responses from mangopay.utils import timestamp_from_date from tests import settings today = datetime.utcnow().date() today_timestamp = timestamp_from_date(today) def get_fixture(name): path =...
# Copyright (C) 2016 Nippon Telegraph and Telephone 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 appli...
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2018, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
# openioc_10_to_11.py # # Copyright 2013 Mandiant Corporation. # Licensed under the Apache 2.0 license. Developed for Mandiant by William # Gibb. # # Mandiant licenses this file to you under the Apache License, Version # 2.0 (the "License"); you may not use this file except in compliance with the # License. You ma...
""" Author: Joel Rieger October 29, 2016 Description: Classes and functions to perform basic network abstraction and plotting """ from numpy import pi as pi class network(object): """Class for one dimension network (i.e. a matching network).""" element_array=[] def __init__(self): sel...
#!/usr/bin/env python3 # # Copyright (c) 2016-2021, OARC, 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: # # 1. Redistributions of source code must retain the above copyright # notice, ...
from __future__ import absolute_import from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator from django.core.urlresolvers import reverse, reverse_lazy from django.utils.decorators import method_decorator from django.views import generic from .test_forms import AuthorFo...
import logging.config import os import shutil import sys import argparse import yaml from datetime import date from time import mktime from time import strptime from setproctitle import setproctitle from inferno.lib import __version__ from inferno.lib.disco_ext import get_disco_handle from inferno.lib.job import In...
#!/usr/bin/python # Copyright: Ansible Project # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
import vcr import os import pytest import uuid from testobject.client import TestObject from testobject.client import NoPasswordException from .keys import * UPLOAD_APP_PATH = os.environ.get('UPLOAD_APP_PATH',"./README.md") @pytest.fixture def to(): username = os.environ.get('TO_USERNAME', None) api_key = o...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Big Switch Networks, 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....
# # author : jiankaiwang (http://jiankaiwang.no-ip.biz/) # source code in github : seed (https://github.com/jiankaiwang/seed) # document in gitbook : seed (https://www.gitbook.com/book/jiankaiwang/seed/details) # # # example : # # link to postgresql database # p2l = py2psql("127.0.0.1","5432","ckan_default","public.us...
# This is the instrument-specific file for the PS6000 series of instruments. # # pico-python is Copyright (c) 2013-2014 By: # Colin O'Flynn <coflynn@newae.com> # Mark Harfouche <mark.harfouche@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are pe...
# # tested on | Windows native | Linux cross-compilation # ------------------------+-------------------+--------------------------- # MSVS C++ 2010 Express | WORKS | n/a # Mingw-w64 | WORKS | WORKS # Mingw-w32 | WORKS | WORKS # MinGW ...
from PyCA.Core import * import PyCA.Common as common import PyCA.Display as display import numpy as np import matplotlib.pyplot as plt # # Allocate all necessary data # def InitializeData(grid, mType): global scratchI scratchI = Image3D(grid, mType) global dxf dxf = Image3D(grid, mType) global dy...
"""Helpers for data entry flows for config entries.""" from __future__ import annotations import logging from typing import Any, Awaitable, Callable, Union from homeassistant import config_entries from homeassistant.core import HomeAssistant from homeassistant.data_entry_flow import FlowResult from homeassistant.help...
# Copyright (c) 2010-2011 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
# # 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 us...
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
# -*- coding: utf-8 -*- """ pygments.lexers.haskell ~~~~~~~~~~~~~~~~~~~~~~~ Lexers for Haskell and related languages. :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, bygroups, d...
from __future__ import absolute_import from __future__ import unicode_literals import logging import os import re import sys from collections import namedtuple from operator import attrgetter import enum import six from docker.errors import APIError from docker.errors import ImageNotFound from docker.errors import No...
import sys import math lineCount = 0 def codeSplit(line, nPass): line = line.replace("\n", "") line = line.split('\t') if nPass == 1 and line[0] != '.' and line[1] == '': del line[1] return line def readLine(file, nPass=1): global lineCount lineCount = lineCount + 1 return codeS...
# Copyright 2011 Justin Santa Barbara # 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 2015 NEC Corporation. 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 l...
# Natural Language Toolkit: Confusion Matrices # # Copyright (C) 2001-2017 NLTK Project # Author: Edward Loper <edloper@gmail.com> # Steven Bird <stevenbird1@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function, unicode_literals from nltk.probabil...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a cop...
#!/usr/bin/python # # Copyright (c) 2011 The Bitcoin developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # import time import json import pprint import hashlib import struct import re import base64 import httplib import...
# 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 # distributed unde...
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
import errno import jinja2 import json import logging import os import shutil from collections import Mapping from copy import deepcopy from neckbeard.loader import NeckbeardLoader from neckbeard.scaling import MinScalingBackend # TODO: Don't hardcode this logger = logging.getLogger('configuration') class Circula...
#!/usr/bin/env python ###################### # Create Cross validation catalogs for shape distribution tests ####################### import sys, os, unittest import numpy as np, astropy, astropy.io.fits as pyfits import ldac ####################### __cvs_id__ = "$Id: crossval.py,v 1.1 2011/01/11 19:55:35 dapple Exp ...