gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # 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...
""" A simple rdstation client class """ import json import requests __author__ = 'zamboni' class Lead(object): @property def email(self): return self._email @email.setter def email(self, value): self._email = value @property def conversion_id(self): return s...
# 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 (t...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Natural Language Toolkit: Collocations and Association Measures # # Copyright (C) 2001-2017 NLTK Project # Author: Joel Nothman <jnothman@student.usyd.edu.au> # URL: <http://nltk.org> # For license information, see LICENSE.TXT # """ Tools to identify collocations --- words that often appear consecutively --- within c...
from __future__ import division, print_function, absolute_import """ Unit test for constraint conversion """ import numpy as np from numpy.testing import (assert_array_almost_equal, assert_allclose, assert_warns, suppress_warnings) import pytest from scipy.optimize import (NonlinearConstrain...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, os, copy, json, re from frappe import _ from frappe.modules import get_doc_path from jinja2 import TemplateNotFound from frappe.utils import cint, strip_html from...
# -*- coding: utf-8 -*- # Copyright 2017 Interstellar Technologies Inc. All Rights Reserved. from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from OpenGoddard.optimize import Problem, Guess, Condition, Dynamics class Rocket: GMe = 3.986004418 * 10**14 # Earth gravitationa...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division import re import os import json import io import sys import pprint import logging logger = logging.getLogger() logger.setLevel(logging.DEBUG) import requests from requests_oauthlib import OAuth2Session from apiclient import errors from gdcm...
"""Support to interface with Sonos players.""" import asyncio import datetime import functools as ft import logging import socket import urllib import async_timeout import requests import voluptuous as vol from homeassistant.components.media_player import ( PLATFORM_SCHEMA, MediaPlayerDevice) from homeassistant.c...
import os import unittest from unittest.mock import MagicMock from ingenico.connect.sdk.api_exception import ApiException from ingenico.connect.sdk.call_context import CallContext from ingenico.connect.sdk.communication_exception import CommunicationException from ingenico.connect.sdk.connection import Connection fro...
#!/usr/bin/env python """ Attempt dead reckoning (estimating position) from accelerometer data. The accelerometer data are too noisy! Authors: - Arno Klein, 2015 (arno@sagebase.org) http://binarybottle.com Copyright 2015, Sage Bionetworks (http://sagebase.org), Apache v2.0 License """ def velocity_from_acce...
import logging from django.core import exceptions as django_exceptions from django.db import transaction from django.utils.timezone import now from django.utils.translation import ugettext_lazy as _ from rest_framework.exceptions import ValidationError from waldur_core.core.models import StateMixin from . import log...
# 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 # distribu...
from __future__ import unicode_literals from django import VERSION as DJANGO_VERSION from django.contrib.sites.models import Site try: from django.urls import reverse except ImportError: # For Django 1.8 compatibility from django.core.urlresolvers import reverse from django.db import models from django.d...
# 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 applica...
# coding: utf-8 from __future__ import division, unicode_literals """ Created on Mar 15, 2012 """ __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyuep@gmail.com" __date__ = "Mar 15, 2012" import unittest imp...
# -*- coding: utf-8 -*- """ Created on Wed May 10 13:40:47 2017 @author: scram """ import twit_auths as twit_auth import pprint import tweepy import json from bson.son import SON from pymongo import MongoClient from pymongo import errors as mongo_errors from collections import Counter def mongo_tweet_up(id_tweet,db...
# Copyright (c) 2011 Martin Vilcans # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license.php from testcompat import TestCase from screenplain.parsers import fountain from screenplain.types import ( Slug, Action, Dialog, DualDialog, Transition, Section, PageBreak ) from screenplain.ri...
# -*- coding: utf-8 -*- """ Configuration file for the Sphinx documentation builder. For a full list of options see the documentation: http://www.sphinx-doc.org/en/master/config """ import os import sys sys.path.insert(0, os.path.abspath('../src')) from importlib import import_module import version # noqa:E402 ...
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
from __future__ import unicode_literals import logging import sys import types from django import http from django.conf import settings from django.core import urlresolvers from django.core import signals from django.core.exceptions import MiddlewareNotUsed, PermissionDenied, SuspiciousOperation from django.db import...
# 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. """A bare-bones test server for testing cloud policy support. This implements a simple cloud policy test server that can be used to test chrome's device...
from __future__ import print_function from collections import defaultdict import calendar import datetime import re from maka.format.DocumentFormat import DocumentFormat from maka.format.FieldFormat import FieldFormat from maka.format.ObservationFormat import ObservationFormat from maka.util.TokenUtils import NONE_TO...
import pytest import networkx as nx from networkx.testing import * def test_union_all_attributes(): g = nx.Graph() g.add_node(0, x=4) g.add_node(1, x=5) g.add_edge(0, 1, size=5) g.graph['name'] = 'g' h = g.copy() h.graph['name'] = 'h' h.graph['attr'] = 'attr' h.nodes[0]['x'] = 7 ...
from data_wizard.test import WizardTestCase from vera.models import ReportStatus, Parameter from vera.models import Site, Event, EventResult from django.conf import settings class BaseImportTestCase(WizardTestCase): available_apps = ( 'django.contrib.contenttypes', 'django.contrib.auth', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from unittest import TestCase from projects.projectfile import error from projects.projectfile.parser import parse from test.helpers import * class VersionParser(TestCase): def test__valid_version_can_be_parsed_1(self): line = 'from v1.2.3' expected ...
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# (c) 2005 Ian Bicking and contributors; written for Paste # (http://pythonpaste.org) # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license.php """ Routines for testing WSGI applications. Most interesting is TestApp """ from __future__ import unicode_literals import os import re import sy...
# 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 ...
# # Copyright (c) 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
#!/usr/bin/env python2.7 # Copyright 2015, Google 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: # # * Redistributions of source code must retain the above copyright # notice, this lis...
# -*- coding: utf-8 -*- """Parser for Windows Scheduled Task job files.""" import construct from plaso.containers import time_events from plaso.lib import binary from plaso.lib import errors from plaso.lib import eventdata from plaso.lib import timelib from plaso.parsers import interface from plaso.parsers import man...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import os import numpy as np from ....tests.helper import pytest, catch_warnings from ....table import Table, Column try: import h5py except ImportError: HAS_H5PY = False else: HAS_H5PY = True ALL_DT...
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz 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, merg...
""" Implements Autodock Vina's pose-generation in tensorflow. """ from __future__ import print_function from __future__ import division from __future__ import unicode_literals __author__ = "Bharath Ramsundar" __copyright__ = "Copyright 2016, Stanford University" __license__ = "MIT" import warnings import numpy as np ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """build query for doclistview and return results""" import frappe, json from six.moves import range import frappe.permissions from frappe.model.db_query import DatabaseQuery fro...
#!/usr/bin/env python # encoding: utf-8 """ Author(s): Matthew Loper See LICENCE.txt for licensing and contact information. """ __all__ = ['inv', 'svd', 'det', 'slogdet', 'pinv', 'lstsq', 'norm'] import numpy as np import scipy.sparse as sp from .ch import Ch, depends_on from .ch_ops import NanDivide from .ch_ops ...
# -*- coding: utf-8 -*- from pprint import pprint from phixlib import FIX from phixlib.fix import Field, FIXMessage, Group from phixlib.parser import parse_message def test_registry(): assert FIX.FIXMessage assert FIX.FIXMessage.Header assert FIX.FIXMessage.Trailer assert not FIX.FIXMessage.msgcat ...
# 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 th...
# Copyright 2012 Grid Dynamics # 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 python """SciPy: Scientific Library for Python SciPy (pronounced "Sigh Pie") is open-source software for mathematics, science, and engineering. The SciPy library depends on NumPy, which provides convenient and fast N-dimensional array manipulation. The SciPy library is built to work with NumPy arrays, a...
import struct import logging import os.path import sys import getopt from Ensemble.Ensemble import Ensemble from PyCRC.CRCCCITT import CRCCCITT logger = logging.getLogger("Ensemble File Report") logger.setLevel(logging.ERROR) FORMAT = '[%(asctime)-15s][%(levelname)s][%(funcName)s] %(message)s' logging.basicConfig(fo...
from scrapy import signals from scrapy.exceptions import DontCloseSpider from scrapy.spiders import Spider, CrawlSpider from . import connection, defaults from .utils import bytes_to_str class RedisMixin(object): """Mixin class to implement reading urls from a redis queue.""" redis_key = None redis_batch...
#!/usr/bin/env python ''' Copyright 2015 Ivan Sadikov 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...
# -*- coding: utf-8 -*- import operator import warnings from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.models.query_utils import Q from django.template import TemplateSyntaxError, NodeList, Variable, Context, Template, engines from django.template.base import Va...
#!/usr/bin/python # coding: utf-8 ''' Created on July 04, 2013 @author: C.J. Hutto Citation Information If you use any of the VADER sentiment analysis tools (VADER sentiment lexicon or Python code for rule-based sentiment analysis engine) in your work or research, please cite the paper. For example: Hutto, C.J...
# # 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...
from werkzeug.security import generate_password_hash, check_password_hash from flask_login import UserMixin, AnonymousUserMixin from . import login_manager, db from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from flask import current_app, request from datetime import datetime import hashlib cla...
# 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...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- # Copyright 2010 Dirk Holtwick, holtwick.it # # 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 ...
# 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. # Copied and modified from # https://chromium.googlesource.com/chromium/src/+/a3f9d4fac81fc86065d867ab08fa4912ddf662c7/headless/lib/browser/devtools_api/clie...
# help.py - help data for mercurial # # Copyright 2006 Olivia Mackall <olivia@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import itertools import re import textwrap from .i...
from copy import copy import warnings import numpy as np from ..problems.composite import composite, nonsmooth, smooth_conjugate from ..affine import linear_transform, identity as identity_transform, selector from ..identity_quadratic import identity_quadratic from ..atoms import _work_out_conjugate from ..smooth imp...
# BSD Licence # Copyright (c) 2012, Science & Technology Facilities Council (STFC) # All rights reserved. # # See the LICENSE file in the source distribution of this software for # the full license text. """ Provides BaseConfig - a class that makes a config file act like a dictionary myconf = BaseConfig("myfile.i...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.db.utils import ProgrammingError from sentry.utils.db import is_postgres class Migration(SchemaMigration): # Flag to indicate if this m...
# 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...
"""Support for displaying persistent notifications.""" from __future__ import annotations from collections import OrderedDict from collections.abc import Mapping, MutableMapping import logging from typing import Any import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.const ...
"""Tools for connecting to a Veritable API server. See also: https://dev.priorknowledge.com/docs/client/python """ import logging import requests import json import sys from gzip import GzipFile from io import BytesIO from requests.auth import HTTPBasicAuth from .exceptions import VeritableError from .utils import _...
# 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...
# ============================================================================= # # Copyright (c) 2016, Cisco Systems # 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 ...
# 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 re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, workspace from caffe2.python.core import CreatePythonOperator import caffe2.python.hypothesis_test_util as hu from hypothesis import given ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2011 Grid Dynamics # Copyright 2011 Eldar Nugaev, Kirill Shileev, Ilya Alekseyev # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not ...
import xml.etree.ElementTree as ET from xml.dom import minidom from random import shuffle # the number of students in each year, implicitly defines the number of years year_students = [100, 75, 60] # each year has a number of subjects (only count one semester) year_subjects = [5, 5, 10] # the number of subjects in ...
import random from mittab.libs import tab_logic, mwmatching, errors from mittab.apps.tab.models import * def add_judges(pairings, judges, panel_points): # First clear any existing judge assignments for pairing in pairings: pairing.judges.clear() current_round_number = TabSettings.objects.get(key...
# 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 unittest import StringIO import sys from telemetry import benchmark from telemetry import user_story from telemetry.core import exceptions from telem...
# -*- coding: utf-8 -*- # Copyright (C) 2010, 2011 Sebastian Wiesner <lunaryorn@googlemail.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 ...
#!/usr/bin/env python import os import zmq import numpy as np import numpy.matlib from collections import defaultdict from fastcluster import linkage_vector import selfdrive.messaging as messaging from selfdrive.controls.lib.latcontrol import calc_lookahead_offset from selfdrive.controls.lib.pathplanner import PathPl...
# $Filename$ # $Authors$ # Last Changed: $Date$ $Committer$ $Revision-Id$ # # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are #met: # # * Redistr...
from __future__ import division from nose.tools import ( assert_almost_equal, assert_equal, assert_true, assert_raises ) import numpy as np from numpy import allclose import dit from dit.exceptions import ditException from dit.math import LogOperations ops = LogOperations(2) log2 = ops.log exp2 = o...
""" Filename: robustlq.py Authors: Chase Coleman, Spencer Lyon, Thomas Sargent, John Stachurski Solves robust LQ control problems. """ from __future__ import division # Remove for Python 3.sx from textwrap import dedent import numpy as np from .lqcontrol import LQ from .quadsums import var_quadratic_sum from numpy ...
import warnings import numpy as np from .base import _fit_liblinear, BaseSVC, BaseLibSVM from ..base import BaseEstimator, RegressorMixin from ..linear_model.base import LinearClassifierMixin, SparseCoefMixin, \ LinearModel from ..feature_selection.from_model import _LearntSelectorMixin from ..utils import check_X...
#!/usr/bin/env python import numpy as np import os import shutil import mss import matplotlib matplotlib.use('TkAgg') from datetime import datetime from matplotlib.figure import Figure from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg as FigCanvas from PIL import ImageTk, Image import sys PY3_OR_LATER...
# -*- coding: utf-8 -*- """Helper to check for availability and version of dependencies.""" from __future__ import print_function from __future__ import unicode_literals import configparser import re class DependencyDefinition(object): """Dependency definition. Attributes: dpkg_name (str): name of the dpkg...
from __future__ import absolute_import import mock from uuid import UUID from changes.config import db from changes.constants import Result, Status from changes.models import Task from changes.testutils import TestCase from changes.queue.task import tracked_task @tracked_task def success_task(foo='bar'): pass ...
# downloads ALL GRAPHS from PVL into the specific directory import argparse import os import time from datetime import datetime from requests import get from requests_html import HTMLSession from urllib.parse import urljoin def fetch_vodagov_charts(dst_dir, agency, base_url, subpages, datatype_prefix): """ ...
# Lint as: python3 # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# --- # jupyter: # jupytext: # formats: ipynb,.pct.py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.3.3 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% [markdown] ...
import sys import numpy as np import theano import theano.tensor as T import logging import cgml.types from cgml.graph import makeDropoutLayersFromSchema from cgml.graph import makeLayersFromDropoutLayers from cgml.graph import parseGraphFromSchema from cgml.parsers import parseCost from cgml.optimizers import Moment...
# -*- coding: utf-8 -*- """This file contains classes used for preprocessing in plaso.""" from __future__ import unicode_literals import abc from dfwinreg import registry_searcher from artifacts import definitions as artifact_definitions from dfvfs.helpers import file_system_searcher from plaso.lib import errors ...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
# 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 ...
import os import gnupg #also install https://gpgtools.org/gpgsuite.html import urllib import datetime from decimal import Decimal import platform from bitcoinrpc.authproxy import AuthServiceProxy import external_db import time import peerapps.settings import shutil def download_blg(rpc_raw, key, from_address): fo...
#! /usr/bin/env python # standard library imports import argparse from importlib import import_module import textwrap import warnings import os # noqa import re # noqa import sys # noqa import datetime # noqa from pandashells.lib import module_checker_lib def needs_plots(command_list): # define regex to ide...
# # This file is part of LiteX-Boards. # # Copyright (c) 2020 Owen Kirby <oskirby@gmail.com> # SPDX-License-Identifier: BSD-2-Clause # # Logicbone ECP5: # - Design files: https://github.com/oskirby/logicbone # - Bootloader: https://github.com/oskirby/tinydfu-bootloader # from litex.build.generic_platform import * from...
# -*- coding: utf-8 -*- """Importer for Hetionet JSON.""" import bz2 import json import logging from typing import Any, Mapping, Set, Tuple, Union import pystow from tqdm.autonotebook import tqdm from .constants import ( ACTIVATES_ACTIONS, BINDS_ACTIONS, COMPOUND, DSL_MAP, GENE, HETIONET_PUB...
#!/usr/bin/python from frc971.control_loops.python import control_loop from frc971.control_loops.python import controls import numpy import sys import argparse from matplotlib import pylab import gflags import glog FLAGS = gflags.FLAGS gflags.DEFINE_bool('plot', False, 'If true, plot the loop response.') class CIM...
from ctypes import ( POINTER, byref, c_byte, c_char, c_double, c_float, c_int, c_int64, c_short, c_ubyte, c_ushort, c_uint, c_uint64, pointer, ) import datetime import decimal import sys import unittest from comtypes import IUnknown, GUID from comtypes.automation import ( VARIANT, DISPPARAMS, VT_NULL, VT_E...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, unicode_literals, division, print_function) # Dependencies import numpy as np # Project from .. import units as u from ..utils.compat.numpy import broadcast_to as n...
''' Created on Jan 27, 2014 @author: Tea Kolevska @contact: tea.kolevska@gmail.com @organization: ICCLab, Zurich University of Applied Sciences @summary: Module for the periodic counter Copyright 2014 Zuercher Hochschule fuer Angewandte Wissenschaften All Rights Reserved. Licensed under the Apache License, Ve...
# # 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 # ...
# 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 # distrib...
''' @author: frank ''' import sys import os.path import ConfigParser import os import shutil import traceback from zstacklib.utils import shell import tools class BuildError(Exception): '''build error''' def __init__(self, msg): content = traceback.format_exc() msg = '%s\n%s' % (content, msg) ...
from __future__ import print_function import collections from datetime import datetime import functools import os import sys import pytz import re import matplotlib matplotlib.use('Agg') import pylab pylab.rcParams['figure.figsize'] = (35.0, 12.0) import pandas as pd from bcbio import utils from bcbio.graph.collectl...
# pylint: disable=line-too-long, no-member from __future__ import division from builtins import str # pylint: disable=redefined-builtin import calendar import csv import datetime import io import json import os import tempfile import time from zipfile import ZipFile from past.utils import old_div import arrow imp...
from django.shortcuts import render from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse from pastebin import settings from pastebin.util import queryset_to_list from pastes.models import Paste from comments.models import Comment from comments.forms import SubmitCommentForm fro...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ ========================== fMRI: SPM Auditory dataset ========================== Introduction ============ The fmri_spm_auditory.py recreates the classical workflow described in ...