gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# This file is part of beets.
# Copyright 2013, Adrian Sampson.
#
# 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, ... | |
from relay.warnings.models import *
from datetime import datetime
import sys
def warn(msg):
sys.stderr.write(msg)
#----Sync labels / notes to all races occuring at a certain location ----
def syncLabels(lab, loc):
pass
def syncNotes(lab, loc):
pass
#--------------- 'Bulk-load' code base info & function... | |
"""The tests for the androidtv platform."""
import base64
import copy
import logging
from androidtv.exceptions import LockNotAcquiredException
import pytest
from homeassistant.components.androidtv.media_player import (
ANDROIDTV_DOMAIN,
ATTR_COMMAND,
ATTR_DEVICE_PATH,
ATTR_LOCAL_PATH,
CONF_ADB_SER... | |
# -*- coding: utf-8 -*-
# Copyright 2010 Mats Ekberg
#
# 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... | |
"""Riemannian Metric learning utilities and algorithms.
To use the "geometric" Laplacian from geometry.py for statistically
consistent results.
"""
# Author: Marina Meila <mmp@stat.washington.edu>
# after the Matlab function rmetric.m by Dominique Perrault-Joncas
# LICENSE: Simplified BSD https://githu... | |
#!/usr/bin/env python
'''
APM DataFlash log file reader
Copyright Andrew Tridgell 2011
Released under GNU GPL version 3 or later
Partly based on SDLog2Parser by Anton Babushkin
'''
import struct, time, os
from . import mavutil
FORMAT_TO_STRUCT = {
"b": ("b", None, int),
"B": ("B", None, int),
"h": ("h",... | |
# encoding: utf-8
"""
Composers for default chart XML for various chart types.
"""
from __future__ import absolute_import, print_function, unicode_literals
from copy import deepcopy
from xml.sax.saxutils import escape
from ..compat import to_unicode
from ..enum.chart import XL_CHART_TYPE
from ..oxml import parse_xm... | |
import numpy as np
import openpnm.models.misc as misc
from openpnm.phase import GenericPhase as GenericPhase
from openpnm.utils import logging, SettingsAttr, Docorator, TypedList
logger = logging.getLogger(__name__)
docstr = Docorator()
@docstr.dedent
class MultiPhaseSettings:
r"""
Parameters
----------... | |
# Copyright 2019 Matthew Treinish
# Copyright (c) 2009 testtools 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | |
"""Reverse complement reads with Seqtk."""
import os
from plumbum import TEE
from resolwe.process import (
Cmd,
DataField,
FileField,
FileHtmlField,
ListField,
Process,
StringField,
)
class ReverseComplementSingle(Process):
"""Reverse complement single-end FASTQ reads file using Seqt... | |
#
# 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... | |
import unittest
from testlib import testutil, PygrTestProgram
import ConfigParser, sys, os, string, glob
import pygr.Data
try:
import hashlib
except ImportError:
import md5 as hashlib
config = ConfigParser.ConfigParser({'testOutputBaseDir' : '.', 'smallSampleKey': ''})
config.read([ os.path.join(os.path.expa... | |
import json
from collections import defaultdict
from django.conf import settings
from django.contrib import messages
from django.core.paginator import EmptyPage, Paginator, PageNotAnInteger
from django.db.models import Q
from django.http import HttpResponse, HttpResponseBadRequest, Http404
from django.shortcuts impor... | |
# Copyright (c) 2012 The Khronos Group Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publis... | |
from __future__ import absolute_import
import itertools
import pytz
from datetime import datetime, timedelta
import mock
import six
from sentry import tsdb
from sentry.models import Rule
from sentry.rules.conditions.event_frequency import (
EventFrequencyCondition, EventUniqueUserFrequencyCondition
)
from sentry... | |
#!/usr/bin/env python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... | |
# Copyright 2017 Fortinet, 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 ... | |
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.core.urlresolvers import reverse as django_reverse
from django.utils.http import urlquote
from django.conf import settings
import jingo
from spark.models import City
from spark.urlresolvers import reverse, absolute... | |
#!/usr/bin/env python2.7
# Copyright 2015 gRPC 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 applicable la... | |
import json
import os
from contextlib import contextmanager
from typing import Iterator
from unittest import mock
import airflow.configuration
import airflow.version
import pytest
from airflow.lineage import apply_lineage, prepare_lineage
from airflow.models import DAG, Connection, DagBag, TaskInstance
from airflow.ut... | |
import logging
import os
import os.path as op
import sys
from copy import copy, deepcopy
import cobra.flux_analysis
import cobra.manipulation
import numpy as np
import pandas as pd
from Bio import SeqIO
from cobra.core import DictList
from slugify import Slugify
import ssbio.core.modelpro
import ssbio.databases.ncbi
... | |
"""
This class is defined to override standard pickle functionality
The goals of it follow:
-Serialize lambdas and nested functions to compiled byte code
-Deal with main module correctly
-Deal with other non-serializable objects
It does not include an unpickler, as standard python unpickling suffices.
This module wa... | |
#
# Author: Pearu Peterson, March 2002
#
# w/ additions by Travis Oliphant, March 2002
# and Jake Vanderplas, August 2012
from __future__ import division, print_function, absolute_import
__all__ = ['solve', 'solve_triangular', 'solveh_banded', 'solve_banded',
'solve_toeplitz', 'solve_circulant... | |
#
# 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 string
import random
from MuseParse.classes.ObjectHierarchy.ItemClasses import BaseClass
class Text(BaseClass.Base):
"""
A class representing any kind of text
# Optional inputs
- font: the font to use. If this isn't in the list of fonts in lilypond, a random one will be picked.
... | |
# Copyright (c) 2006-2011 Mitch Garnaat http://garnaat.org/
#
# 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, modi... | |
from collections import defaultdict
import json
import logging
from twisted.internet import threads
from lbrynet.core.client.StandaloneBlobDownloader import StandaloneBlobDownloader
from lbrynet.core.Error import UnknownStreamTypeError, InvalidStreamDescriptorError
log = logging.getLogger(__name__)
class StreamDesc... | |
"""
Cluster of helper functions.
"""
import pickle
from glob import glob
import cv2
import numpy as np
from scipy.misc import imresize, imread
import os
# Constants
OUTPUT_DIR = os.path.abspath('output')
CALIBRATION_PATH_PICKLE = os.path.abspath('output' + os.sep + 'calibration.p')
CAL_IMAGE_PATH = os.path.abspath('... | |
#!/usr/bin/python
import binascii, re, json, copy, sys
from bitcoin.main import *
from _functools import reduce
### Hex to bin converter and vice versa for objects
def json_is_base(obj, base):
if not is_python2 and isinstance(obj, bytes):
return False
alpha = get_code_string(base)
if isinsta... | |
#!/usr/bin/env python
__author__ = 'Stephen P. Henrie'
import pickle
from pyon.core.bootstrap import CFG
from pyon.core.governance.governance_interceptor import BaseInternalGovernanceInterceptor
from pyon.core.governance.governance_dispatcher import GovernanceDispatcher
from pyon.core.object import IonObjectBas... | |
# -*- coding: UTF-8 -*-
# -- FILE GENERATED BY: convert_i18n_yaml.py with i18n.yml
# pylint: disable=line-too-long
languages = \
{'ar': {'and': [u'*', u'\u0648'],
'background': [u'\u0627\u0644\u062e\u0644\u0641\u064a\u0629'],
'but': [u'*', u'\u0644\u0643\u0646'],
'examples': [u'\u0627\u0645\u06... | |
"""
kombu.connection
================
Broker connection and pools.
"""
from __future__ import absolute_import
import os
import socket
from contextlib import contextmanager
from functools import partial
from itertools import count, cycle
from operator import itemgetter
try:
from urllib.parse import quote
except ... | |
"""Interface to Sailthru API."""
import hashlib
import itertools
import socket
import urllib
import urllib2
try:
# Prefer simplejson as it's usually faster
import simplejson as json
except ImportError:
import json
try:
import settings
except ImportError:
class settings:
class services:
... | |
import os
import re
import tempfile
import time
import threading
import unittest
from interruptingcow import timeout, Quota, StateException
class TimeoutError(Exception):
pass
class TestInterrupt(unittest.TestCase):
def test_interrupt(self):
with timeout(0.5):
self.assertRaises(RuntimeEr... | |
from telegram.ext import MessageHandler, CommandHandler, ConversationHandler, Filters, RegexHandler
from telegram import ReplyKeyboardMarkup, ReplyKeyboardHide
from database import list_events, add_event, get_event, add_order, list_orders, get_order, add_user, get_user
from includes import Event, User, Order
YesNoKbd ... | |
# Copyright 2013,2017 James McCauley
#
# 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 ... | |
import datetime
import logging
from datetime import timedelta
from django import forms
from django.db.models import Q
from django.forms import widgets
from django.utils.translation import get_language
import happyforms
import jinja2
from tower import ugettext as _, ugettext_lazy as _lazy
from olympia import amo
from... | |
# -*- coding: iso-8859-1 -*-
def rebin_factor( a, newshape ):
'''Rebin an array to a new shape.
newshape must be a factor of a.shape.
Source: http://wiki.scipy.org/Cookbook/Rebinning
'''
assert len(a.shape) == len(newshape)
assert not sometrue(mod( a.shape, newshape ))
slices = [ slice(None,N... | |
"""Dynamic Imaging of Coherent Sources (DICS).
"""
# Authors: Roman Goj <roman.goj@gmail.com>
#
# License: BSD (3-clause)
import warnings
from copy import deepcopy
import numpy as np
from scipy import linalg
from ..utils import logger, verbose
from ..forward import _subject_from_forward
from ..minimum_norm.inverse ... | |
# Copyright 2017 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 ag... | |
import enum
import mimetypes
from datetime import datetime
from typing import Dict, List, NamedTuple, Optional, Tuple
import pygments
import pygments.lexer
import pygments.lexers
from django.db import models, transaction
from django.http import HttpResponse
from django.shortcuts import reverse
from django.utils import... | |
import logging
from pyVmomi import vim
class Host:
""" Represents an ESXi host in a VMware vSphere environment. """
def __init__(self, host):
"""
:param host: The host to use
:type host: vim.HostSystem
"""
self._log = logging.getLogger('Host')
self.host = host... | |
# Copyright (c) 2010-2014 Bo Lin
# Copyright (c) 2010-2014 Yanhong Annie Liu
# Copyright (c) 2010-2014 Stony Brook University
# Copyright (c) 2010-2014 The Research Foundation of SUNY
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
#... | |
"""
@file SVM.py
@brief SVM, Support Vector Machines
@author Ernest Yeung
@email ernestyalumni dot gmail dot com
"""
import theano
import numpy as np
import theano.tensor as T
from theano import sandbox
# other people had this problem too: it's a problem INHERENT with Python
# max recusion limit #689
# https://gi... | |
# 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... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Hasura Platform documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 30 19:38:30 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 t... | |
#!/usr/bin/python
#
# Copyright (c) Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview... | |
#!/usr/bin/env python
# -*- coding: ascii -*-
u"""
=========================
Write benchmark results
=========================
Write benchmark results.
:Copyright:
Copyright 2014 - 2021
Andr\xe9 Malo or his licensors, as applicable
:License:
Licensed under the Apache License, Version 2.0 (the "License");
you ... | |
# coding: utf-8
from __future__ import absolute_import
import ui
import console
import clipboard
dbo = None
class FlowCreationView(object):
def __init__(self, elements, saveCallBack, addElementAction, saveFlowAction, runFlowAction, showElementRuntimeView, thememanager, flowType, flowTypeSelection, saveToHomeScreenAc... | |
#!/usr/bin/env python2.7
# Copyright 2017 gRPC 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 applicable la... | |
"""
Restructured dialogs for Robofab
dialog file dialogs
* FontLab 5.04 10.6 dialogKit fl internal * theoretically that should work under windows as well, untested
* FontLab 5.1 10.6 dialogKit fl in... | |
from slackclient._slackrequest import SlackRequest
from slackclient._channel import Channel
from slackclient._user import User
from slackclient._util import SearchList, SearchDict
from ssl import SSLError
from websocket import create_connection
import json
class Server(object):
'''
The Server object owns the... | |
"""
Snuggs are s-expressions for Numpy.
"""
import functools
import itertools
import operator
import re
import sys
from pyparsing import (
alphanums, ZeroOrMore, nums, oneOf, Word, Literal, Combine, QuotedString,
ParseException, Forward, Group, CaselessLiteral, Optional, alphas,
OneOrMore, ParseResults, P... | |
# Copyright 2018 the authors.
# This file is part of Hy, which is free software licensed under the Expat
# license. See the LICENSE.
from __future__ import print_function
import argparse
import code
import ast
import sys
import os
import importlib
import astor.code_gen
import hy
from hy.lex import LexException, Pr... | |
# Copyright 2022 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | |
import os
import json
import requests
from flask import Flask,Blueprint,session, redirect, render_template, g, url_for, request
from datetime import datetime
from HitchHike.config import GOOGLE_API_KEY
from flask_login import login_required, current_user
from flask_socketio import SocketIO, send, emit, join_room, leav... | |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://genshi.edgewall.org/wiki/License.
#
# This software consist... | |
#!/usr/bin/env python3
# Copyright (C) 2007 Giampaolo Rodola' <g.rodola@gmail.com>.
# Use of this source code is governed by MIT license that can be
# found in the LICENSE file.
import contextlib
import ftplib
import os
import socket
import ssl
import sys
import OpenSSL # requires "pip install pyopenssl"
from pyft... | |
import hashlib
import binascii
import random
import time
from Crypto.Cipher import AES
rng = random.SystemRandom()
def init_key_generation(keylengthbits):
if keylengthbits < 8:
keylengthbits = 8
elif keylengthbits % 8 != 0:
keylengthbits += ( 8 - keylengthbits % 8)
key = ""
iter... | |
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: device.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflec... | |
#!/usr/bin/env python2.7
# Copyright 2015-2016, 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, thi... | |
# Copyright [2015] Hewlett-Packard Development Company, L.P.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | |
from __future__ import annotations
from ssl import SSLContext
from types import SimpleNamespace
from typing import (
TYPE_CHECKING,
Any,
Callable,
Dict,
Iterable,
Optional,
Type,
Union,
)
from sanic.touchup.meta import TouchUpMeta
if TYPE_CHECKING:
from sanic.app import Sanic
im... | |
"""Test event helpers."""
# pylint: disable=protected-access,too-many-public-methods
# pylint: disable=too-few-public-methods
import unittest
from datetime import datetime, timedelta
from astral import Astral
import homeassistant.core as ha
from homeassistant.const import MATCH_ALL
from homeassistant.helpers.event im... | |
from __future__ import absolute_import
import xml_models
import xml_models.rest_client as rest_client
from lxml import etree
from xml_models.xpath_finder import MultipleNodesReturnedException
try:
from StringIO import StringIO
except ImportError:
from io import BytesIO as StringIO
class ModelManager(object):
... | |
import importlib
import pytest
from unittest import mock
from google.cloud import aiplatform
from google.cloud.aiplatform import datasets
from google.cloud.aiplatform import initializer
from google.cloud.aiplatform import schema
from google.cloud.aiplatform import training_jobs
from google.cloud.aiplatform_v1.servic... | |
# vim: ft=python fileencoding=utf-8 sw=4 et sts=4
"""The commandline completion for vimiv."""
import os
import re
from itertools import takewhile
from string import digits
from gi.repository import GLib, Gtk
from vimiv.fileactions import is_image
from vimiv.helpers import listdir_wrapper, read_info_from_man
from vimi... | |
# 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... | |
# Copyright 2014 Mellanox Technologies, Ltd
#
# 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 t... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Michael Still and Canonical 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:... | |
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
from future.utils import python_2_unicode_compatible
import logging
import textwrap
import requests
from copy import deepcopy
from functools import lru_cache
from protmapper.api import ProtMapper, default_site_map
fr... | |
"""Experiment run logging manager.
:copyright: Copyright 2011 Marshall Ward, see AUTHORS for details.
:license: Apache License, Version 2.0, see LICENSE for details.
"""
# Standard Library
import datetime
import getpass
import json
import os
import shlex
import subprocess
import sys
# Third party
import requests
# ... | |
# -*- coding: utf-8 -*-
'''
Copyright (C) 2012-2018 Diego Torres Milano
Created on Jan 5, 2015
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
Un... | |
# -*- coding: utf-8 -*-
# Example init.py for documentation purposes
#
# Use this file as a template/example for creating an
# initialization/configuration script for PyCmd. Scripts are loaded and applied
# based on the following rules:
#
# * If present, an init.py script in PyCmd's installation directory is
# auto... | |
# Copyright 2017-present Open Networking 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 agr... | |
import codecs, json, os, codecs, logging
from pprint import pprint
from collections import namedtuple
import itertools
import operator
from git import Repo
from git.remote import RemoteProgress
from requests import get
import whatthepatch
from sh import git
from github3 import GitHub
from github3.pulls import PullRequ... | |
import numpy as np
from numpy.fft import ifftshift, fftshift, fftn
from astropy.io import fits
import astropy.constants as const
from astropy.modeling import models, fitting
from ..utils.conversion import gaussian_fwhm2std
from ..utils.data import gen_radial_mask, gen_radius_array
def gen_psf(uv, pad=True, unnormali... | |
#! /usr/bin/env python3
# SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2018, ARM Limited and contributors.
#
# 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/l... | |
# -*- coding: utf-8 -*-
###
# (C) Copyright (2012-2017) Hewlett Packard Enterprise Development LP
#
# 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 limi... | |
import os
import datetime
import numpy as np
import xarray as xr
import requests
import logging
log=logging.getLogger('noaa_coops')
from ... import utils
from .common import periods
all_products=dict(
water_level="water_level",
air_temperature="air_temperature",
water_temperature="water_temperature",
... | |
# Copyright 2014: Mirantis 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... | |
from __future__ import division
from ImportTrackMateData import *
import TrackClassGlobals as TCG
import TrackFilterFunctions as TFF
from Serializers import *
from General import *
import sys, traceback, datetime, os.path, math
import numpy as np
import pylab as P
from copy import deepcopy
import matplotlib.cm as cm
fr... | |
import math
from collections import namedtuple
import logging
import os
import re
import subprocess
import sys
import ray
import ray.ray_constants as ray_constants
logger = logging.getLogger(__name__)
# Prefix for the node id resource that is automatically added to each node.
# For example, a node may have id `node:... | |
from __future__ import absolute_import
import errno
import os
import sys
import signal
from celery import _find_option_with_arg
from celery import platforms
from celery.five import open_fqdn
from celery.platforms import (
get_fdmax,
ignore_errno,
set_process_title,
signals,
maybe_drop_privileges,
... | |
"""Script to trail along the Echelle slit during an exposure.
To do:
- When the hub supports it, get the slit length from the hub.
History:
2004-10-01 ROwen
2005-01-05 ROwen Modified for RO.Wdg.Label state -> severity.
2006-04-19 ROwen Changed to a class.
2006-04-27 ROwen Require # of trails >= 1.
... | |
import itertools
import numpy as np
import pandas as pd
try:
from ortools.graph import pywrapgraph
except ModuleNotFoundError:
print('Could not import ortools')
# import networkx as nx
from .loading import subset2vec, vec2subset, compressSubsets
__all__ = ['DenseICSDist',
'pwICSDist',
... | |
#!/usr/bin/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 or a... | |
import requests
import glob
import re
import yaml
import dill
import os
import string
from bs4 import BeautifulSoup
from slackclient import SlackClient
#initialize lists pertaining to ouputs to be passed to rtmbot.py
crontable = []
outputs = []
#Grab configuration options for slackbot
config = yaml.load(file('rtmbot.... | |
# Copyright 2014 Kevin L. Mitchell
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | |
"""
Implements the class SwcImplementationParser
"""
import sys
from autosar.base import splitRef, hasAdminData, parseAdminDataNode
import autosar.component
from autosar.parser.parser_base import ElementParser
class SwcImplementationParser(ElementParser):
"""
ComponentType parser
"""
def __init__(self... | |
# -*- coding: utf-8; fill-column: 78 -*-
"""Network address and URL validation."""
import re
import urlparse
from base import N_, Validator
class IsEmail(Validator):
"""Validates email addresses.
The default behavior takes a very permissive stance on allowed characters
in the **local-part** and a relati... | |
"""
Author: Ashley S (MarieAshley)
Versions: Oracle 12c, ArcGIS for Desktop 10.3.1
"""
import cx_Oracle
class IterationError(Exception):
pass
class TableError(Exception):
pass
class InvalidSpan(Exception):
pass
class sierpinski(object):
"""
Contains methods to create two spatial tables. The f... | |
#!/usr/bin/env python
# Copyright 2015 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.
"""Rolls DEPS controlled dependency.
Works only with git checkout and git dependencies. Currently this
script will always roll to the... | |
"""File selection dialog classes.
Classes:
- FileDialog
- LoadFileDialog
- SaveFileDialog
This module also presents tk common file dialogues, it provides interfaces
to the native file dialogues available in Tk 4.2 and newer, and the
directory dialogue available in Tk 8.3 and newer.
These interfaces were written by F... | |
#!/usr/bin/env python
# coding=utf-8
import ctypes
import ctypes.util
import collections
libneo = ctypes.cdll.LoadLibrary(ctypes.util.find_library('neo'))
libneo.neo_get_version.restype = ctypes.c_int32
libneo.neo_get_version.argtypes = None
libneo.neo_is_abi_compatible.restype = ctypes.c_bool
libneo.neo_is_abi_com... | |
# Copyright 2021 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... | |
# -*- coding: utf-8 -*-
"""
pygments.formatters.html
~~~~~~~~~~~~~~~~~~~~~~~~
Formatter for HTML output.
:copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import sys
import StringIO
from pygments.formatter import Formatter
fr... | |
# 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... | |
#!/usr/bin/env python
"""
mbed SDK
Copyright (c) 2011-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable ... | |
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.