gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/env python2 # encoding: utf-8 """ blast.py Python interface to the RCSB REST API for BLASTing sequences. The interface uses the BioCache class to reduce repeatedly hitting the RCSB servers. Created by Shane O'Connor 2016. """ import datetime import os import urllib.request, urllib.error, urllib.parse impor...
import gtk import gtk.gdk as gdk import gobject class List(object): def __init__(self, count): self.count = count def __len__(self): return self.count def get_row(self, row): return None def get_item(self, row, col): print "get_data(%d, %d)" % (row, col) return "(%d, %d)" % (row, col) import sqlite3...
import random from collections import namedtuple import pytest from markupsafe import Markup from jinja2 import Environment from jinja2 import StrictUndefined from jinja2 import TemplateRuntimeError from jinja2 import UndefinedError from jinja2.exceptions import TemplateAssertionError class Magic: def __init__(...
# Copyright 2013 Cloudbase Solutions Srl # 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 r...
#!/usr/bin/env python3 import sys if sys.version_info[0] < 3: PY3, Unicode, Bytes = False, unicode, str else: PY3, Unicode, Bytes = True, str, bytes def to_bytes(v, encoding="utf-8", **kwargs): if isinstance(v, Bytes): return v elif isinstance(v, Unicode): return v.encode(encoding) ...
#!/usr/bin/env python3 # # Copyright (c) 2016-2017 Nest Labs, 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/lice...
# -*- coding: utf-8 -*- """ Simple Generic Location Tracking System @copyright: 2011-14 (c) Sahana Software Foundation @license: MIT 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 So...
import sys import pgmagick _EXIF_TAGS = [ "ImageWidth", "ImageLength", "BitsPerSample", "Compression", "PhotometricInterpretation", "ImageDescription", "Make", "Model", "StripOffsets", "Orientation", "SamplesPerPixel", "RowsPerStrip", "StripByteCounts", "XResolut...
# Copyright 2011 NTT # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
# # Secret Labs' Regular Expression Engine # # convert re-style regular expression to sre pattern # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # See the sre.py file for information on usage and redistribution. # """Internal support module for sre (copied from CPython)""" # XXX: show string o...
# Copyright (c) 2012-2014 Tycho Andersen # Copyright (c) 2013 xarvh # Copyright (c) 2013 roger # Copyright (c) 2013 Tao Sauvage # Copyright (c) 2014 ramnes # Copyright (c) 2014 Sean Vig # Copyright (c) 2014 dequis # Copyright (c) 2015 Dario Giovannetti # Copyright (c) 2015 Alexander Lozovskoy # # Permission is hereby g...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright (c) 2011 Piston Cloud Computing, Inc # Copyrig...
# Copyright (c) 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 ...
"""Mountain-car problem simulation library for the reinforcement learning miniproject. """ import pylab as plb import numpy as np class MountainCar(): """A mountain-car problem. For the miniproject, you are not meant to change the default parameters (mass of the car, etc.) Usage: >>> mc = M...
# -*- coding: utf-8 -*- import os from abc import abstractmethod import numpy as np from joblib import delayed, Parallel from .errors import TileExtractionException from .image import Image, TileBuilder, DefaultTileBuilder, SkipBordersTileTopology, FixedSizeTileTopology from .information import WorkflowInformation fr...
from __future__ import division """ Author: Emmett Butler """ __license__ = """ Copyright 2015 Parse.ly, 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/LICE...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
""" Read SAS7BDAT files Based on code written by Jared Hobbs: https://bitbucket.org/jaredhobbs/sas7bdat See also: https://github.com/BioStatMatt/sas7bdat Partial documentation of the file format: https://cran.r-project.org/package=sas7bdat/vignettes/sas7bdat.pdf Reference for binary data compression: http:/...
from gym.spaces import Box from functools import partial import logging import numpy as np import ray import ray.experimental.tf_utils from ray.util.debug import log_once from ray.rllib.agents.ddpg.ddpg_tf_model import DDPGTFModel from ray.rllib.agents.ddpg.ddpg_torch_model import DDPGTorchModel from ray.rllib.agents....
# coding: utf-8 from __future__ import unicode_literals import base64 import hashlib import json import random import re import time from .common import InfoExtractor from ..aes import aes_encrypt from ..compat import compat_str from ..utils import ( bytes_to_intlist, determine_ext, intlist_to_bytes, ...
# Copyright (c) 2005 Allan Saddi <allan@saddi.com> # 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, this list of c...
""" mbed SDK Copyright (c) 2011-2020 ARM Limited SPDX-License-Identifier: Apache-2.0 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 ...
"""Tests for deCONZ config flow.""" import asyncio import pydeconz from homeassistant.components import ssdp from homeassistant.components.deconz import config_flow from .test_gateway import API_KEY, BRIDGEID, setup_deconz_integration from tests.common import MockConfigEntry async def test_flow_1_discovered_bridg...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes import _ from webnotes.utils import cint import webnotes.model.doctype from webnotes.model.doc import validate_name @webnotes.whitelist() def rename_doc(doctype, ...
# 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) 2015-2021 Regents of the University of California # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
import numpy as np import pytest import pandas.util._test_decorators as td import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, ) import pandas._testing as tm class TestDataFrameSubclassing: def test_frame_subclassing_and_slicing(self): # Subclass frame and ensu...
"""Provide some CSV Files first four columns need to be ID,Station,Latitude,Longitude """ import datetime import re import sys try: from zoneinfo import ZoneInfo # type: ignore except ImportError: from backports.zoneinfo import ZoneInfo # third party import requests import ephem import pytz import pandas as...
"""Small plotting-related utility functions.""" from __future__ import print_function, division import colorsys import os import numpy as np from scipy import stats import pandas as pd import matplotlib as mpl import matplotlib.colors as mplcol import matplotlib.pyplot as plt from .external.six.moves.urllib.request i...
# PyAlgoTrade # # Copyright 2011-2015 Gabriel Martin Becedillas Ruiz # # 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 2010-2013 Red Hat, Inc. and/or 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 by applicable...
#!/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...
# -*- python -*- # ex: set syntax=python: import logging import urllib2 import json import string import re from password import * from buildbot.status.web.hooks.github import GitHubEventHandler from dateutil.parser import parse as dateparse from twisted.python import log builders_common="arch," builders_linux="cent...
# 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 2016 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. import collections import logging import numbers from google.appengine.api import taskqueue from google.appengine.ext import ndb from dashboard.pinpoint im...
import abc import uuid import socket import datetime from coilmq.exception import ProtocolError, AuthError from coilmq.util import frames from coilmq.util.frames import Frame, ErrorFrame, ReceiptFrame, ConnectedFrame from coilmq.util.concurrency import CoilThreadingTimer SEND = 'SEND' CONNECT = 'CONNECT' MESSAGE = 'M...
"""Test the Yeelight light.""" import logging from yeelight import ( BulbException, BulbType, HSVTransition, LightType, PowerMode, RGBTransition, SceneClass, SleepTransition, TemperatureTransition, transitions, ) from yeelight.flow import Flow from yeelight.main import _MODEL_SP...
# Copyright 2014 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. import collections import logging import os import plistlib import shutil import signal import tempfile import xml.parsers.expat from telemetry import decor...
from packaging.version import Version import os import numpy as np import pandas as pd import yaml import mlflow from mlflow import pyfunc from mlflow.exceptions import MlflowException from mlflow.models import Model from mlflow.models.model import MLMODEL_FILE_NAME from mlflow.models.signature import ModelSignature ...
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test bitcoind with different proxy configuration. Test plan: - Start bitcoind's with different proxy c...
"""Support for Denon Network Receivers.""" import logging import telnetlib import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity from homeassistant.components.media_player.const import ( SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_PR...
import fastlmm.association as association import scipy as sp from sklearn import linear_model from sklearn import cross_validation from sklearn.grid_search import GridSearchCV #!! from fastlmm.external.sklearn.metrics.scorer import SCORERS, Scorer from fastlmm import inference import fastlmm.util.util as util import pd...
import hashlib import operator from django.db.backends.creation import BaseDatabaseCreation from django.db.backends.utils import truncate_name from django.db.models.fields.related import ManyToManyField from django.db.transaction import atomic from django.utils.encoding import force_bytes from django.utils.log import ...
# -*- coding: utf-8 -*- def talk(data): #ear.startListening() #fix onclick micro if data: if data!="": if data[0:2]=="l ": data=data.replace("l ", "l'") data=data.replace(" l ", " l'") mouth.speak(unicode(data,'utf-8')) if IsInmoovArduino==1 and MoveEyesRandom==1: if random.randint(1,3)=...
#!/usr/bin/python """ Contains the following classes: * LocationWrap * LocationHits * LocationHitsContainer * GeoJSONer * Geocoder * Geolocator * LatLng This file converts a given list of locations into geojson. At a high-level, it does the following: * Retrieves lat/lng coordinates ...
# -*- coding: utf-8 -*- # Copyright 2016 Open Permissions Platform Coalition # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by appl...
# Copyright 2011 OpenStack Foundation. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance w...
# Copyright (c) 2013-2015 University Corporation for Atmospheric Research/Unidata. # Distributed under the terms of the MIT License. # SPDX-License-Identifier: MIT """Support making data requests to the radar data query service (radar server) on a TDS. This includes forming proper queries as well as parsing the return...
""" Python script to generate a Python extension module from a clib header file. """ import sys _class = '' _newclass = 1 def getargs(line): """Get the function name and arguments.""" i1 = line.find('(') i2 = line.find(')') if (i1 < 0 or i2 < 0): raise 'syntax error: missing open or close qu...
# -*- coding: utf-8 -*- # # tree.py # # (c) D.C.-G. 2014 # # Tree widget for albow # from albow.widget import Widget from albow.menu import Menu from albow.fields import IntField, FloatField, TextFieldWrapped from albow.controls import CheckBox, AttrRef, Label, Button from albow.dialogs import ask, alert, input_text_bu...
""" Layered, composite rendering for TileStache. The Sandwich Provider supplies a Photoshop-like rendering pipeline, making it possible to use the output of other configured tile layers as layers or masks to create a combined output. Sandwich is modeled on Lars Ahlzen's TopOSM. The external "Blit" library is required...
import json import os from django.contrib.auth.models import Group, User, Permission from django.conf import settings from django.core.files import File from funfactory.urlresolvers import reverse from nose.tools import eq_, ok_ from airmozilla.main.models import ( Event, Tag, Channel, EventRevision, ...
from functools import partial from itertools import chain from operator import attrgetter import collections.abc import copy import inspect import logging import types import warnings from django.apps import apps from django.conf import settings from django.core import validators from django.db.models import options f...
#!/usr/bin/env python """ Search and Store Tweets utility. Search for tweets in the Twitter API for given search query, then store the tweet and the tweet author data, adding new objects or updating existing ones. The input may be command-line text for easy ad hoc queries, or the name of an existing Campaign in the d...
#----------------------------------------------------------------------------- # 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. #-------------------------------------------------------------------...
# Standard library imports. import sys # System library imports. from pyface.qt import QtCore, QtGui # Enthought library imports. from traits.api import DelegatesTo, Instance, on_trait_change, provides # Local imports. from pyface.tasks.i_advanced_editor_area_pane import IAdvancedEditorAreaPane from pyface.tasks.i_e...
# 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 with the License. You may obtain # a ...
# coding: utf-8 # # 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 requi...
""" :codeauthor: Jayesh Kariya <jayeshk@saltstack.com> """ import sys import salt.states.linux_acl as linux_acl from salt.exceptions import CommandExecutionError from tests.support.mixins import LoaderModuleMockMixin from tests.support.mock import MagicMock, patch from tests.support.unit import TestCase, skipIf ...
import base64 from functools import reduce import operator from django.db.models.query_utils import Q from django.db.transaction import atomic from rest_condition import Or from rest_framework import status from rest_framework.decorators import api_view, permission_classes, list_route from rest_framework.exceptions im...
# 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 applicab...
import datetime from dateutil.parser import parse from django.db import models from django import forms from django.contrib.auth.models import User from django.contrib.auth.hashers import make_password from charityadmin.apps.timeslots.models import days_of_week_choices, days_of_week_list, Client, Volunteer, ClientOpeni...
# Copyright 2012 VMware, 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...
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
"""Reports doit execution status/results""" import sys import time import datetime import json from io import StringIO class ConsoleReporter(object): """Default reporter. print results on console/terminal (stdout/stderr) @ivar show_out (bool): include captured stdout on failure report @ivar show_err (bo...
# Copyright 2012, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. # Handle transport and serialization callbacks for Go-style RPC servers. # # This is pretty simple. The client initiates an HTTP CONNECT and then # hijacks the socket...
# encoding=utf-8 ################################# # Author: ideawu # Link: http://www.ideawu.net/ ################################# import sys, os, shutil, datetime import antlr3 import antlr3.tree from ExprLexer import ExprLexer from ExprParser import ExprParser class CpyEngine: def compile(self, srcfile, base_dir...
#!/usr/bin/env python # To install dependencies, see https://github.com/timrdf/DataFAQs/wiki/Errors import sys from rdflib import * from surf import * from surf.query import a, select import rdflib rdflib.plugin.register('sparql', rdflib.query.Processor, 'rdfextras.sparql.processor', 'Processor') rdflib.plugin.regi...
""" sentry.web.urls ~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import try: from django.conf.urls import include, patterns, url except ImportError: # django < 1.5 compat from dj...
''' Created on Jan 29, 2014 @author: vital ''' import pyfits import CodeTools.vitools as vit import numpy as np import scipy as sp def Fits2Data(FolderName,FileName): #Get the fits file main data and header Data, Header_0 = pyfits.getdata(FolderName + FileName, 1, header=True) if ('WHTJOINW' in He...
"""Matrix factorization with Sparse PCA""" # Author: Vlad Niculae, Gael Varoquaux, Alexandre Gramfort # License: BSD 3 clause import numpy as np from ..utils import check_random_state, check_array from ..linear_model import ridge_regression from ..base import BaseEstimator, TransformerMixin from .dict_learning import...
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Dang Mai <contact@dangmai.net>. # # 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 # with...
import os import sys import struct MY_PATH, _ = os.path.split(os.path.realpath(__file__)) ARSDK_PATH=os.path.join(MY_PATH,'..', 'arsdk-xml') ARCOMMANDS_PATH=os.path.join(ARSDK_PATH, 'xml') sys.path.append(ARSDK_PATH) import arsdkparser _ctx = arsdkparser.ArParserCtx() arsdkparser.parse_xml(_ctx, os.path.join(ARCOMM...
# 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...
import copy from direct.controls.ControlManager import CollisionHandlerRayStart from direct.directnotify import DirectNotifyGlobal from direct.directtools.DirectGeometry import CLAMP from direct.distributed.ClockDelta import * from direct.fsm import ClassicFSM from direct.fsm import State from direct.interval.IntervalG...
__all__ = ['Bloch'] import os from numpy import (ndarray, array, linspace, pi, outer, cos, sin, ones, size, sqrt, real, mod, append, ceil, arange) import numpy as np from packaging.version import parse as parse_version from qutip.qobj import Qobj from qutip.expect import expect from qutip.operato...
# 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...
"""Green wave training experiment.""" from rllab.envs.normalized_env import normalize from rllab.misc.instrument import run_experiment_lite from rllab.algos.trpo import TRPO from rllab.baselines.linear_feature_baseline import LinearFeatureBaseline from rllab.policies.gaussian_mlp_policy import GaussianMLPPolicy from rl...
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2015-2017 Nervana 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 #...
""" Katz centrality. """ # Copyright (C) 2004-2013 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import networkx as nx from networkx.utils import not_implemented_for __author__ = "\n".join(['Aric Hagberg (a...
""" Classes and functions for fitting tensors without free water contamination """ from __future__ import division, print_function, absolute_import import warnings import numpy as np import scipy.optimize as opt from dipy.reconst.base import ReconstModel from dipy.reconst.dti import (TensorFit, design_matrix, deco...
from django.apps import AppConfig from django.apps.registry import Apps from django.db import models from django.db.models.options import DEFAULT_NAMES, normalize_unique_together from django.utils import six from django.utils.module_loading import import_by_path class InvalidBasesError(ValueError): pass class P...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
from datetime import datetime import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, RangeIndex, Series, date_range, ) import pandas._testing as tm class TestResetIndex: def test_reset_index_dti_round_trip(self): dti = date_range(s...
""" The MIT License (MIT) Copyright (c) 2014 - 2015 Jos "Zarthus" Ahrens and contributors 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 rig...
import numpy as np import pytest import pandas as pd from pandas import DataFrame, Series, Timestamp, date_range, timedelta_range import pandas._testing as tm class TestDataFrameAppend: def test_append_multiindex(self, multiindex_dataframe_random_data, frame_or_series): obj = multiindex_dataframe_random_...
# Copyright (c) 2013, Nathan Dunsworth - NFXPlugins # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list...
from typing import Any, List, Dict, Optional, Text from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse, HttpRequest from django.shortcuts import redirect, render from django.utils import translation from django.utils.cache import patc...
from __future__ import print_function # ---------------------------------------------------------------- # Copyright 2016 Cisco Systems # # 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 # # ...
#!/usr/bin/python # decrypt_multibit_classic_walletkeys.py # Extract Private Keys from a MultiBit Classic wallet # Copyright (C) 2017, HCP # All rights reserved. # # Based on decrypt_bitcoinj_seed.pyw # Copyright (C) 2014, 2016 Christopher Gurnee # # Redistribution and use in source and binary forms, with or without #...
# Copyright 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 writing,...
import sys from qt import * from kuralib import kuraapp from kuralib.lng_lex import * from kuragui.guitabdialog import guiTabDialog from kuragui.guilistview import guiListView from kuragui.guidetaillist import guiDetailList from kuragui.guicombobox import guiComboBox from kuragui.constants import * from k...
# # header # coding: utf-8 class Token(object): __slots__ = 'start_mark', 'end_mark', '_comment', def __init__(self, start_mark, end_mark): self.start_mark = start_mark self.end_mark = end_mark def __repr__(self): attributes = [key for key in self.__slots__ if not key.endswith('_...
from __future__ import unicode_literals import re import warnings from django.template.base import ( TOKEN_BLOCK, TOKEN_COMMENT, TOKEN_TEXT, TOKEN_VAR, TRANSLATOR_COMMENT_MARK, Lexer, ) from django.utils import six from django.utils.encoding import force_text from django.utils.six import StringIO from . impo...
"""Numeric integration of data coming from a source sensor over time.""" from decimal import Decimal, DecimalException import logging import voluptuous as vol from homeassistant.components.sensor import ( DEVICE_CLASS_ENERGY, DEVICE_CLASS_POWER, PLATFORM_SCHEMA, STATE_CLASS_TOTAL, SensorEntity, ) ...
from __future__ import absolute_import import mock from bokeh.core.properties import field, value from bokeh.core.validation import check_integrity from bokeh.models.annotations import ( Legend, LegendItem, ColorBar, Arrow, BoxAnnotation, Span, LabelSet, Label, Title, Band, Whisker ) from bokeh.models import (...
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import logging from abc import ABC, abstractmethod from dataclasses import dataclass from typing import Optional from pants.backend.python.goals.coverage_py import ( CoverageConfig, ...
import os import re import sublime import sublime_plugin from statusprocess import * from asyncprocess import * from output_panel import * PROMPT = "jshint:\n" SUPPORTED_SELECTORS = ('source.js', 'source.json', 'source.coffee') ############################################### # Support Functions # def is_supported_vi...
#!/usr/bin/env python """Semantic protocol buffers can be created from proto2 .proto files. For maintaining inter-operatibility with primitive protocol buffer implementations, we can parse the field descriptors created by the standard Google proto implementation, and generate Semantic proto descriptors. This file con...
from etk.timeseries.annotation import utility, block_detector from etk.timeseries.annotation.table_processor import parsed_table from etk.timeseries.annotation import cell_classifier import logging from etk.timeseries.annotation import multi_table_processor class parsed_sheet: def __init__(self, name, index, real_...