gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | |
import pytest
from pupa.scrape import Bill as ScrapeBill
from pupa.scrape import Person as ScrapePerson
from pupa.scrape import Organization as ScrapeOrganization
from pupa.importers import BillImporter, OrganizationImporter, PersonImporter
from opencivicdata.models import Bill, Jurisdiction, Person, Organization, Memb... | |
"""
Created on 18/mar/2013
@author: "Giulio Rossetti"
@contact: giulio.rossetti@isti.cnr.it
"""
import networkx as nx
import random
class Demon(object):
"""
Michele Coscia, Giulio Rossetti, Fosca Giannotti, Dino Pedreschi:
DEMON: a local-first discovery method for overlapping communities.
KDD 2012:61... | |
import binascii
import functools
import time
import logging
from typing import Type, TypeVar, overload, Any, Optional
from claripy import backend_manager
from .plugin import SimStatePlugin
from .sim_action_object import ast_stripping_decorator, SimActionObject
l = logging.getLogger(name=__name__)
#pylint:disable=un... | |
from json import loads
from urllib.parse import quote
from collections import OrderedDict
from db.models import objects, Item, Alias, db
from datetime import datetime
from bs4 import BeautifulSoup
import aiohttp as http
import math
import asyncio
import re
STAT_ORDER = ('overall', 'attack', 'defence', 'strength', 'con... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import imp
import os
import sys
import shutil
import six
from migrate import exceptions
from migrate.versioning import version, repository
from migrate.versioning.script import *
from migrate.versioning.util import *
from migrate.tests import fixture
from migrate.tests.f... | |
"""Python wrapper for GTA Orange's player functions
Subscribable built-in events:
+============+========================+===================================+
| name | player-local arguments | global arguments |
+============+========================+===================================+
| connect... | |
"""
Tests common to list and UserList.UserList
"""
import sys
import os
from functools import cmp_to_key
import unittest
from test import support
class CommonTest(unittest.TestCase):
def test_init(self):
# Iterable arg is optional
self.assertEqual(self.type2test([]), self.type2test())
... | |
## 1. Neural networks and iris flowers ##
import pandas
import matplotlib.pyplot as plt
import numpy as np
# Read in dataset
iris = pandas.read_csv("iris.csv")
# shuffle rows
shuffled_rows = np.random.permutation(iris.index)
iris = iris.loc[shuffled_rows,:]
print(iris.head())
# There are 2 species
print(iris.speci... | |
from itertools import product
import numpy as np
import pytest
from pandas import DataFrame, NaT, date_range
import pandas._testing as tm
@pytest.fixture(params=product([True, False], [True, False]))
def close_open_fixture(request):
return request.param
@pytest.fixture
def float_frame_with_na():
"""
F... | |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import collections
i... | |
#!/usr/bin/env python
# (C) Copyright IBM Corporation 2004, 2005
# All Rights Reserved.
#
# 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
# ... | |
""" CISCO_IMAGE_LICENSE_MGMT_MIB
The MIB module for managing the running image level
of a Cisco device. Cisco's licensing mechanism provides
flexibility to run a device on a chosen image level.
This mechanism is referred to as image level licensing.
Image level licensing leverages the universal image
based licensing ... | |
# 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 ... | |
# The Admin4 Project
# (c) 2013-2014 Andreas Pflug
#
# Licensed under the Apache License,
# see LICENSE.TXT for conditions of usage
import adm
import inspect
import wx.xrc as xrc
from wh import xlt, StringType, floatToTime, localTimeMillis
from Validator import Validator
import wx, os
import xmlres
class MenuOwner:... | |
# Arithmetic tests for DataFrame/Series/Index/Array classes that should
# behave identically.
# Specifically for numeric dtypes
from collections import abc
from decimal import Decimal
from itertools import combinations
import operator
import numpy as np
import pytest
import pandas as pd
from pandas import Index, Seri... | |
from __future__ import unicode_literals
from flask import Markup, url_for
from babel.dates import format_date, format_datetime
def _single_get(item, key):
# First, try to lookup the key as if the item were a dict. If
# that fails, lookup the key as an atrribute of an item.
try:
val = item[key]
... | |
"""
Test suite for the ciscoeox.base_api module
"""
import datetime
import json
import os
import pytest
import requests
from requests.models import Response
from app.ciscoeox import base_api
from app.ciscoeox.base_api import CiscoHelloApi, CiscoApiCallFailed, CredentialsNotFoundException, \
InvalidClientCredentials... | |
# Copyright 2012 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 required by... | |
# !/usr/bin/env/python3
# Copyright (c) Facebook, Inc. and its affiliates.
# 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 ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 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/LICEN... | |
# Copyright 2019 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | |
# Copyright 2013 Red Hat, 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... | |
__author__ = 'krishnab'
from operator import neg, truediv
import numpy as np
import pandas as pd
from numpy.random import binomial
from models.Models import Base_model
class Stochastic_model_with_promotion(Base_model):
def __init__(self, **kwds):
Base_model.__init__(self, **kwds)
self.name = "St... | |
"""Provide the device conditions for Z-Wave JS."""
from __future__ import annotations
from typing import cast
import voluptuous as vol
from zwave_js_server.const import CommandClass
from zwave_js_server.model.value import ConfigurationValue
from homeassistant.components.device_automation.exceptions import (
Inva... | |
from docar import fields, Document, Collection
try:
import json
except ImportError:
import simplejson as json
MEDIA_TYPES = {}
def register_media_type(media_type, serializer):
"""Register a media types with their handlers.
:param media_type: The media type, eg: 'application/json'
:param seriali... | |
from rest_framework.reverse import reverse
from rest_framework.test import APITestCase
from rest_framework import status
from talos_rest import constants
from talos.models import ValidationToken
from talos.models import OneTimePasswordCredential
from talos.models import Principal
from talos_rest.serializers import PHO... | |
import random
import unittest
from node import constants, guid, kbucket
class TestKBucket(unittest.TestCase):
@staticmethod
def _mk_contact_by_num(i):
return guid.GUIDMixin(str(i))
@classmethod
def setUpClass(cls):
cls.range_min = 1
cls.range_max = cls.range_min + 16 * const... | |
# coding=utf-8
# pylint: disable-msg=E1101,W0612
import pytz
import pytest
from datetime import timedelta, datetime
from distutils.version import LooseVersion
from numpy import nan
import numpy as np
import pandas as pd
from pandas import (Series, DataFrame, isnull, date_range,
MultiIndex, Index... | |
# -*- coding: utf-8 -*-
def test_assert_false(testdir):
"""Test pytest does not display captured stderr on test failure."""
# create a temporary pytest test module
testdir.makepyfile(
"""
import pytest
import sys
import datetime
import logging
import loggin... | |
#
# Copyright 2016 Sotera Defense Solutions 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 ag... | |
"""
Transparently provides additional functionallity to all ColanderAlchemy models including:
- Updating the model from a Deform appstruct.
- Converting the model to a Deform appstruct
- Copverting the model to XML
"""
from datetime import date
from lxml import etree
import logging
import colander
from colanderalchem... | |
# 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 under t... | |
"""Test the detector reader."""
from os import remove
from unittest import TestCase
from collections import OrderedDict
from numpy import arange, array
from numpy.testing import assert_equal
from serpentTools.parsers import read
from serpentTools.data import getFile
from serpentTools.detectors import (
Cartesian... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from __future__ import division, print_function
from PhloxAR.base import np
import PhloxAR.core.image
import warnings
__all__ = [
'DFT'
]
class DFT(object):
"""
The DFT class is the refactored class to create DFT filters ... | |
#
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
import json
import sys
from enum import Enum
from typing import (
Any,
Callable,
ClassVar,
Dict,
Generic,
List,
Mapping,
Optional,
Sequence,
Tuple,
Type,
TypeVar,
Union,
)
import pytest
from typing_extensions import Annotated, Literal
from pydantic import BaseModel,... | |
# -*- coding: utf-8 -*-
"""
Created on Sun Jan 22 12:36:31 2017
@author: mpqqubec
"""
import locale
# Set to German locale to get comma decimal separater
locale.setlocale(locale.LC_NUMERIC, 'deu_deu')
import Tomography as tom
#import Tomography_old_detection as tom_o
import EIT
import quPy as qp
#from scipy.optimize ... | |
"""Module for records related function.
A records is a dict of multiple sfg2d.SfgRecord objects that are treated
together.
"""
import os
import yaml
from . import plot
from . import fig as sfgfig
from .core import SfgRecord
import matplotlib.pyplot as plt
import logging
from numpy import linspace, array, concatenate
... | |
# 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 ... | |
#!/usr/bin/env python
# coding=utf-8
"""
# repeatedtestframework : Functionality to support the creation of multiple
test cases with the Unittest framework
Summary :
Helper functionality to reduce the amount of boiler plate or repeated
code which is implemented when the same functiona... | |
"""Factor Analysis.
A latent linear variable model.
FactorAnalysis is similar to probabilistic PCA implemented by PCA.score
While PCA assumes Gaussian noise with the same variance for each
feature, the FactorAnalysis model assumes different variances for
each of them.
This implementation is based on David Barber's B... | |
#!/usr/bin/python
#
# Copyright 2009 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 b... | |
#!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Tests the iPOPO decorators.
:author: Thomas Calmant
"""
# Standard library
import code
import os
import sys
try:
import unittest2 as unittest
except ImportError:
import unittest
# Pelix
from pelix.framework import FrameworkFactory
# iPOPO
import peli... | |
# -*- coding: utf-8 -*-
# #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://ete.cgenomics.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public ... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import argparse
import copy
import operator
import os
FASTA_FILE_LAST_POS = None
#################
# Parse methods #
#################
def text_end_of_file(row):
if row == '':
return True
else:
return False
def get_new_line(input_file, generate_er... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import frappe
import unittest, json, sys, os
import time
import importlib
from frappe.modules import load_doctype_module, get_module_name
import frappe.utils.scheduler
import cProfile, pstats
from io import StringIO
from im... | |
# 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 (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
import logging
import os
import unittest
from monty.serialization import loadfn
from pymatgen.core.structure import Molecule
from pymatgen.io.qchem.inputs import QCInput
from pymatgen.util.testing import PymatgenTest
__aut... | |
from __future__ import with_statement
import unittest
from flask import Flask, render_template, jsonify, Request, request
from flaskext.uploads import UploadSet, IMAGES, TEXT, configure_uploads
from werkzeug.test import EnvironBuilder
from wtforms import StringField, HiddenField, SubmitField, FieldList
from wtforms.v... | |
#!/usr/bin/env python2.7
import re
class Token(object):
def __init__(self, value, line, pos, data):
self.value = value
self.line = line
self.pos = pos
self.data = data
def get_value(self):
return self.value
def get_pos(self):
""" return the position in ... | |
# Copyright 2014 PerfKitBenchmarker 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 appli... | |
"""
Support for interfacing to the Logitech SqueezeBox API.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/media_player.squeezebox/
"""
import logging
import asyncio
import urllib.parse
import json
import aiohttp
import async_timeout
import voluptuous a... | |
# Copyright 2016 Twitter. 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 agree... | |
# pylint: disable-msg=R0903,W0142,W0221,W0212,W0104,W0511,C0103,R0901
#
# Copyright 2008 German Aerospace Center (DLR)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apach... | |
"""
Test the pipeline module.
"""
import numpy as np
from scipy import sparse
from sklearn.utils.testing import assert_raises
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_false
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_array_equal
... | |
# Copyright (c) 2011-2014 Greg Holt
# Copyright (c) 2012-2013 John Dickinson
# Copyright (c) 2012 Felipe Reyes
# Copyright (c) 2012 Peter Portante
# Copyright (c) 2012 Victor Rodionov
# Copyright (c) 2013-2014 Samuel Merritt
# Copyright (c) 2013 Chuck Thier
# Copyright (c) 2013 David Goetz
# Copyright (c) 2013 Dirk Mue... | |
import numpy as np
import pandas
from pandas.util.testing import assert_frame_equal
from pytest import fail
from pytest import raises
import cocoscore.ml.cv as cv
import cocoscore.ml.fasttext_helpers as fth
import cocoscore.tagger.co_occurrence_score as cos
import cocoscore.tools.data_tools as data_tools
class TestC... | |
#!/usr/bin/env python
# cmd to run test: pytest ./km --cov=km/
import unittest
import os
import sys
from argparse import Namespace
from km.tools import find_mutation as fm
from km.tools import find_report as fr
from km.tools import linear_kmin as lk
from km.tools import min_cov as mc
from km.utils.Jellyfish import... | |
# Copyright 2019 Alethea Katherine Flowers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# BoardGameBot documentation build configuration file, created by
# sphinx-quickstart on Mon Jul 18 19:51:45 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this... | |
# -*- coding: utf-8 -*-
"""
formlayout
==========
Module creating Qt form dialogs/layouts to edit various type of parameters
formlayout License Agreement (MIT License)
------------------------------------------
Copyright (c) 2009 Pierre Raybaut
Permission is hereby granted, free of charge, to any person
obtaining ... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Invoke tasks. To run a task, run ``$ invoke <COMMAND>``. To see a list of
commands, run ``$ invoke --list``.
"""
import os
import sys
import json
import platform
import subprocess
import logging
from time import sleep
import invoke
from invoke import Collection
from we... | |
"""
base execnet gateway code send to the other side for bootstrapping.
NOTE: aims to be compatible to Python 2.5-3.X, Jython and IronPython
:copyright: 2004-2015
:authors:
- Holger Krekel
- Armin Rigo
- Benjamin Peterson
- Ronny Pfannschmidt
- many others
"""
from __future__ import with_statement... | |
# -* coding: utf-8 -*-
import tornado.escape
import tornado.ioloop
import tornado.web
import json
import random
import os
from handlers.basehandler import BaseHandler, ExceptionHandler
from core.experiment import Experiment
from db.database import Database
from db.mongolog import MongoLog
from db.users import Users
... | |
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.dual import eig
from scipy.misc import comb
from scipy import linspace, pi, exp
from scipy.signal import convolve
__all__ = ['daub', 'qmf', 'cascade', 'morlet', 'ricker', 'cwt']
def daub(p):
"""
The coefficients f... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
import json
import unittest
import pytest
from zarr.attrs import Attributes
from zarr.compat import binary_type, text_type
from zarr.errors import PermissionError
from zarr.tests.util import CountingDict
class TestAttributes(... | |
"""Define tests for the Awair config flow."""
from python_awair.exceptions import AuthError, AwairError
from homeassistant import data_entry_flow
from homeassistant.components.awair.const import DOMAIN
from homeassistant.config_entries import SOURCE_IMPORT, SOURCE_USER
from homeassistant.const import CONF_ACCESS_TOKE... | |
from tg import expose, validate, redirect, flash, request
from urllib import urlencode
from allura.app import Application, SitemapEntry, DefaultAdminController
from allura import model as M
from allura.lib.security import require_access, has_access
from allura.lib import helpers as h
from allura.lib.search import sear... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This module contains a number of utilities for use during
setup/build/packaging that are useful to astropy as a whole.
"""
from __future__ import absolute_import, print_function
import collections
import os
import re
import subprocess
import sys
impo... | |
# -*- coding: utf-8 -*-
from __future__ import print_function
import os.path
import re
import sqlite3
import sys
from djangocms_installer import config, django, install
from djangocms_installer.config.settings import (MIGRATION_MODULES_BASE,
MIGRATION_MODULES_3_1_FILER)... | |
# 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... | |
try:
from django.forms.utils import ValidationError
except ImportError:
from django.forms.util import ValidationError
from django_facebook import settings as facebook_settings, signals
from django_facebook.exceptions import FacebookException
from django_facebook.utils import get_user_model, mass_get_or_create,... | |
#!/usr/bin/env python
"""These flows are system-specific GRR cron flows."""
import collections
from grr_response_core import config
from grr_response_core.lib import rdfvalue
from grr_response_core.lib import utils
from grr_response_core.lib.rdfvalues import stats as rdf_stats
from grr_response_core.lib.util import ... | |
# Copyright 2015 Internap.
#
# 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, so... | |
# main.py
# Aaron Taylor
# Moose Abumeeiz
#
# The main file for our final project. This is a replica of
# the popular game The Binding waof Isaac: Rebirth.
#
from const import *
from pygame import *
from time import time as cTime
from random import *
from func import *
from Game import *
from menu import *
from Joyst... | |
import unittest
import json
import requests
import sys
import string
import random
import config
import core.content.errors as errors
import core.api.main as main
import core.content.content as content
import core.pricing.pricing as pricing
import core.storage as storage
from core.util.test import *
class TestPricin... | |
import os
import numpy as np
import scipy.io
from numpy.testing import (assert_equal, assert_raises, assert_almost_equal,
assert_array_almost_equal)
from skimage.measure import compare_ssim as ssim
import skimage.data
from skimage.io import imread
from skimage import data_dir
from skimage._s... | |
from rest_framework import generics, permissions as drf_permissions
from rest_framework.exceptions import ValidationError, NotFound
from framework.auth.oauth_scopes import CoreScopes
from modularodm import Q
from osf.models import AbstractNode as Node
from api.base import permissions as base_permissions
from api.base.... | |
"""Core views, including the main homepage, post-commit build hook,
documentation and header rendering, and server errors.
"""
from django.core.urlresolvers import reverse
from django.conf import settings
from django.contrib.auth.models import User
from django.http import HttpResponse, HttpResponseRedirect, \
Http... | |
import json
import os
from base64 import b64decode
from subprocess import (
check_call
)
from charmhelpers.fetch import (
apt_install,
filter_installed_packages,
)
from charmhelpers.core.hookenv import (
config,
local_unit,
log,
relation_get,
relation_ids,
related_units,
uni... | |
# -*- coding: utf-8 -*-
from __future__ import with_statement
import difflib
import fnmatch
import os
import re
import sys
import subprocess
import tempfile
import unittest
from xml.etree.ElementTree import fromstring, tostring
import pyboleto
try:
from pyboleto.pdf import BoletoPDF
except ImportError as err:
... | |
import warnings
warnings.filterwarnings('ignore') #because of plotly in pymzml
import os, sys, pandas, pyteomics, glob, numpy, subprocess, shutil, re, optparse
from itertools import izip_longest
from subprocess import Popen, STDOUT
from array import array
import numpy
import sqlite3, zlib
from pymzml import run
######... | |
#-------------------------------------------------------------
#
# 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... | |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division
import theano
import theano.tensor as T
import numpy as np
from collections import OrderedDict
from .. import activations, initializations, regularizers, constraints
from ..utils.theano_utils import shared_zeros, floatX
from ..utils.generic_uti... | |
"""
This module implements a transaction manager that can be used to define
transaction handling in a request or view function. It is used by transaction
control middleware and decorators.
The transaction manager can be in managed or in auto state. Auto state means the
system is using a commit-on-save strategy (actual... | |
from __future__ import print_function, division
import time
from pyqtgraph import ptime
from acq4.util import Qt
class Future(Qt.QObject):
"""Used to track the progress of an asynchronous task.
The simplest subclasses reimplement percentDone() and call _taskDone() when finished.
"""
sigFinished = ... | |
# coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import re
from colle... | |
"""
Interface to Constrained Optimization By Linear Approximation
Functions
---------
.. autosummary::
:toctree: generated/
fmin_cobyla
"""
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy._lib.six import callable
from scipy.optimize import _cobyla
from .optimi... | |
#!/usr/bin/env python
from __future__ import absolute_import
import sys
import os
import unittest
import numpy
import unit_test_idl_hist
# Need to temporarily append to the PYTHONPATH in order to import the
# newly built histogram function
sys.path.append(os.getcwd())
from idl_functions import histogram
class IDL_... | |
# 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 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | |
#!/usr/bin/env python
"""
9P protocol implementation as documented in plan9 intro(5) and <fcall.h>.
"""
import os
import os.path
import sys
import socket
import select
import copy
import traceback
from marshal9p import *
IOHDRSZ = 24
PORT = 564
cmdName = {}
def _enumCmd(*args):
num = 100
ns = globals()
... | |
# Copyright (c) 2011 Jyrki Pulliainen <jyrki@dywypi.org>
# Copyright (c) 2010 Inoi Oy
#
# 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... | |
# -*- coding: utf-8 -*-
import time
import mock
import datetime
import unittest
from nose.tools import * # noqa
import httplib as http
import jwe
import jwt
import furl
import itsdangerous
from modularodm import storage, Q
from framework.auth import cas
from framework.auth import signing
from framework.auth.core im... | |
from __future__ import unicode_literals
from __future__ import print_function
from mpi4py import MPI
import numpy as np
import matplotlib.pyplot as plt
from .XSample import XSample
from .reference_sampfun import normalsamp, shouldersamp
from ..diptest import cum_distr, dip_and_closest_unimodal_from_cdf, dip_from_cdf,... | |
import numpy as np
import pytest
from pandas import (
DatetimeIndex,
Index,
NaT,
PeriodIndex,
TimedeltaIndex,
timedelta_range,
)
import pandas._testing as tm
def check_freq_ascending(ordered, orig, ascending):
"""
Check the expected freq on a PeriodIndex/DatetimeIndex/TimedeltaIndex
... | |
# This is the data access object to be used with a PostgreSQL implementation
# of the logger database
from datetime import timedelta
import csv
from dateutil.parser import parse
from dateutil.tz import tzoffset as tz
from wof.dao import BaseDao
import wof.models as wof_base
import copy
import czo_model
import time
... | |
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.