text
stringlengths
322
761k
import os import datetime import pytest from doit import tools from doit import task def test_create_folder(): def rm_dir(): if os.path.exists(DIR_DEP): os.removedirs(DIR_DEP) DIR_DEP = os.path.join(os.path.dirname(__file__),"parent/child/") rm_dir() assert True == tools.create_...
# Copyright (c) 2015-2016 Vector 35 LLC # # 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, merge, publish, ...
from AG_fft_tools import correlate2d from agpy import gaussfitter import warnings import numpy as np def cross_correlation_shifts_FITS(fitsfile1, fitsfile2, return_cropped_images=False, quiet=True, sigma_cut=False, **kwargs): """ Determine the shift between two FITS images using the cross-correlation techn...
""" Internal tasks are tasks that are started from the teuthology infrastructure. Note that there is no corresponding task defined for this module. All of the calls are made from other modules, most notably teuthology/run.py """ from cStringIO import StringIO import contextlib import logging import os import time impo...
# -*- coding: utf-8 -*- # # pylast - # A Python interface to Last.fm and Libre.fm # # Copyright 2008-2010 Amr Hassan # Copyright 2013-2018 hugovk # # 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 Lice...
{ 'targets': [ { 'target_name': 'compiler', 'type': 'static_library', 'include_dirs': [ 'include', 'src', 'externals/utf8proc', 'externals/json-parser', ], 'sources': [ 'src/compiler/build_tables/build_parse_table.cc', 'src/compiler/bu...
import argparse import os import subprocess import sys import pty import multiprocessing from livereload import Server from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler __version__ = '0.1.0' class _WatchdogHandler(FileSystemEventHandler): def __init__(self, watcher, a...
#!/usr/bin/env python """Run some linters on files of various types.""" USAGE = """%prog [options] [files] ... Run linters over the given files, or the current directory tree. By default -- if no commandline arguments are given -- this runs the linters on all non-blacklisted python file under the current directory...
__version__ = "0.94" import helpers import os, shutil module_dir = os.path.abspath(os.path.dirname(__file__)) default_params_str = """{ 'fasta': '', 'csv': '', 'out_dir': '', 'protocol': 'gram_pos', # 'gram_neg' #### Signal peptide and transmembrane helix prediction 'signalp4_bin': 'signalp_web', # 'sign...
from __future__ import print_function, unicode_literals import re, time, json from collections import defaultdict from twisted.python import log from twisted.internet import protocol from twisted.protocols.basic import LineReceiver from .database import get_db SECONDS = 1.0 MINUTE = 60*SECONDS HOUR = 60*MINUTE DAY = 2...
# Tai Sakuma <sakuma@fnal.gov> import multiprocessing import time from ProgressReport import ProgressReport ##____________________________________________________________________________|| class ProgressReporter(object): def __init__(self, queue, pernevents = 1000): self.queue = queue self.perneve...
# Copyright 2013 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Swarming bot main process. This is the program that communicates with the Swarming server, ensures the code is always up to date and executes ...
#!/usr/bin/python import copy import gyp.common import optparse import os.path import re import shlex import subprocess import sys # A list of types that are treated as linkable. linkable_types = ['executable', 'shared_library', 'loadable_module'] # A list of sections that contain links to other targets. dependency...
#!/bin/env python # Copyright (c) 2014 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...
# -*- coding: utf-8 -*- # Copyright (C) 2014 Johannes Baiter <johannes.baiter@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your ...
# # spyne - Copyright (C) Spyne contributors. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This librar...
# vim: ts=4 sw=4 expandtab import os import tempfile import time from collections import deque from devops import xml from xmlbuilder import XMLBuilder def find(p, seq): for item in seq: if p(item): return item class DeploymentSpec: def __repr__(self): return "<DeploymentSpec arch=\"%s\" os_t...
import logging import Hand, Utilities # There's a few things to do about dragons. # 1. When a card is played that has a triggered effect, >= 1 card in hand must be a dragon. # 1a. If (at some later date) a card is played from that set which is a dragon, no information is known about the remaining cards. # 1b. If (at s...
#!/usr/bin/python3 import json import sys import importlib from importlib.machinery import SourceFileLoader import traceback import configparser import datetime from time import mktime import argparse import time import logging import os import os.path import glob from websocket import create_connection from logging.h...
# Copyright 2018 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function import emcee import fitsio import numpy as np import matplotlib.pyplot as plt from scipy.optimize import minimize from plot_setup import setup, SQUARE_FIGSIZE, COLORS import genrp from genrp import kernels np.random.seed(...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Title: Dumpscript management command Project: Hardytools (queryset-refactor version) Author: Will Hardy (http://willhardy.com.au) Date: June 2008 Usage: python manage.py dumpscript appname > scripts/scriptname.py $Revision: 217 $ Descripti...
# 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. { 'variables': { 'conditions': [ [ 'os_posix == 1 and OS != "mac" and OS != "android"', { # Link to system .so since we already use i...
# -*- coding: utf-8 -*- from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(self, orm): managers = orm['fixmystreet.FMSUser'].objects.filter(manager=True) table_line_format = u"{0:5} {1:30.30} {2:15.15} {3:4} {4:4}" table_line_separator = ''.join(['-' for ...
from __future__ import annotations import os import shutil import subprocess from pathlib import Path version = subprocess.run( ["poetry", "version", "-s"], capture_output=True, text=True ).stdout.rstrip() dir: Path = Path(__file__).resolve().parents[1] dist: Path = dir / "dist" Path(dist / "gaphor").mkdir(paren...
#!/usr/bin/python import copy import gyp.common import optparse import os.path import re import shlex import subprocess # A list of types that are treated as linkable. linkable_types = ['executable', 'shared_library', 'loadable_module'] # A list of sections that contain links to other targets. dependency_sections =...
#!/usr/bin/env python from operator import itemgetter import datetime import sys import usb.core MAX_BYTES = 10 * 1000 * 10 * 1 STARTING_MESSAGE_SIZE = 12 ENDING_MESSAGE_SIZE = 64 MESSAGE_SIZE_STEP = 12 DATA_ENDPOINT = 0x81 PACKET_SIZE = 27 class MessageDeviceBenchmarker(object): def read(self): data =...
import mido from Queue import Queue from threading import Thread import logging from datetime import datetime import os import music path = os.path.realpath(__file__) dir_path = os.path.dirname(os.path.realpath(__file__)) # noinspection PyUnresolvedReferences input_names = mido.get_output_names() REFACE = 'reface DX...
# DESCRIPTION: A script that contains the small, miscellaneous functions and # classes that are used everywhere. Also contains the vector class. # 50726f6772616d6d696e6720697320627265616b696e67206f66206f6e652062696720696d706f # 737369626c65207461736b20696e746f207365766572616c207665727920736d616c6c20706f73 # 73696...
from flask.ext.testing import TestCase import unittest import angular_flask from flask import Flask, json, jsonify from angular_flask import app, db, session from angular_flask.models import User class UserTestCase(TestCase): STATUS_OK = "200 OK" def create_app(self): app = Flask(__name__) app...
#!/usr/bin/env python import datetime import logging import os import re from urllib.parse import urljoin from bs4 import BeautifulSoup from utils import utils, inspector # http://www.archives.gov/oig/ archive = 2005 # options: # standard since/year options for a year range to fetch from. # # Notes for IG's web t...
#!/usr/bin/env python # 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 # d...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Front end tool to manage .isolate files and corresponding tests. Run ./isolate.py --help for more detailed information. See mo...
import json import logging from collections import namedtuple from distutils.version import LooseVersion from django.core.exceptions import ObjectDoesNotExist from django.core.exceptions import PermissionDenied from django.core.exceptions import SuspiciousOperation from django.core.files.storage import default_storage...
import copy import collections import matplotlib.pyplot as plt import numpy as np from matplotlib.ticker import MaxNLocator from mpl_toolkits.axes_grid1 import make_axes_locatable from astromodels.parameter import Parameter from astromodels.utils.valid_variable import is_valid_variable_name from threeML.io.file_utils...
#!/usr/bin/env python import base64 import logging import os import httplib2 import configparser import time import urllib from datetime import date, timedelta from functools import wraps from apiclient import errors from apiclient.discovery import build from oauth2client.client import SignedJwtAssertionCredentials ...
import time import numpy as nm import scipy.linalg as sla from sfepy.base.base import output, get_default, Struct from sfepy.solvers.solvers import make_get_conf, Solver, EigenvalueSolver def eig(mtx_a, mtx_b=None, num=None, eigenvectors=True, return_time=None, method='eig.scipy', **ckwargs): """ Uti...
"""Base objects to be exported for use in Controllers""" from paste.registry import StackedObjectProxy from pylons.config import config from pylons.legacy import h, jsonify, Controller, Response __all__ = ['c', 'g', 'cache', 'request', 'response', 'session', 'jsonify', 'Controller', 'Response'] c = Stacke...
# Copyright 2015-2016 Yelp 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 writin...
#!/usr/bin/env python def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration import os.path as op auto_name = op.split(op.dirname(__file__))[-1] config = Configuration(auto_name, parent_package, top_path) # config.add_data_dir('tests') return ...
import logging import os from dart.client.python.dart_client import Dart from dart.config.config import configuration from dart.engine.redshift.metadata import RedshiftActionTypes from dart.model.engine import Engine, EngineData _logger = logging.getLogger(__name__) def add_redshift_engine(config): engine_config...
import json import re from collections import Iterable from copy import deepcopy from datetime import datetime as dt from datetime import timedelta as td from functools import lru_cache from http.client import HTTPResponse from urllib import error, parse, request from ruz.utils import (EMAIL_DOMAINS, EMAIL_PATTERN, RE...
# importing modules import csv import pytest import player # tests def test_given_player_apps_matches_total_returns_true(): with open('player_history.csv') as csvfile: reader = csv.DictReader(csvfile) for row in reader: po = player.player( row['Player Name'], ...
#!/usr/bin/env python # Copyright (c) 2010 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. """ lastchange.py -- Chromium revision fetching utility. """ import optparse import os import subprocess import sys class Version...
class Event(object): """ Base event for all SQLObject events. In general the sender for these methods is the class, not the instance. """ class ClassCreateEvent(Event): """ Event raised before class creation. The sender is the superclass (in case of multiple superclasses, the first su...
"""Paster Commands, for use with paster in your project The command(s) listed here are for use with Paste to enable easy creation of various core Pylons templates. Currently available commands are:: controller, restcontroller, shell """ import os import sys import paste.fixture import paste.registry import past...
""" An extension of scipy.stats.stats to support masked arrays :author: Pierre GF Gerard-Marchant :contact: pierregm_at_uga_edu """ # TODO : f_value_wilks_lambda looks botched... what are dfnum & dfden for ? # TODO : ttest_reel looks botched: what are x1,x2,v1,v2 for ? # TODO : reimplement ksonesamp from __future__ ...
import matplotlib matplotlib.use('Agg') # ================> Python Standard and third-party <========== from functools import partial from noodles import (gather, schedule) from nac.common import ( Matrix, Vector, change_mol_units, getmass, retrieve_hdf5_data, triang2mtx) from nac.integrals.multipoleIntegrals...
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2013-2014 Alex Forencich 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...
import datetime import itertools from django.db import connection, transaction from django.db.models import Count import commonware.log from celery.messaging import establish_connection from celeryutils import task import amo from amo.utils import chunked, slugify from bandwagon.models import (CollectionWatcher, ...
import os import sys import argparse import glob import textract import textparser def process_arguments(args): parser = argparse.ArgumentParser(description='convert pdfs to text and parse the texts properly') parser.add_argument('--input_path', action='store', help='path to folder with pdf files') pars...
#!/usr/bin/env python """ inputs: TxD matrix of observations T-number of coords D-dimensionality of each observation *Nans treated as missing observations type (specify the type of plot) see http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.plot for available options outputs: 1-, 2-, o...
from django.db import models from share.models.base import ShareObject from share.models.base import TypedShareObjectMeta from share.models.fields import ShareManyToManyField from share.util import ModelGenerator class AbstractAgent(ShareObject, metaclass=TypedShareObjectMeta): """ An Agent is a thing that ...
#!/usr/bin/env python # $Id$ """ A module for reading and writing FITS files and manipulating their contents. A module for reading and writing Flexible Image Transport System (FITS) files. This file format was endorsed by the International Astronomical Union in 1999 and mandated by NASA as the standard format for s...
from rest_framework import permissions from rest_framework.compat import is_authenticated class CustomGroupAPIPermission(permissions.BasePermission): """ Set custom permission for GroupAPI * GET : accessible by admin and user * POST : only accessible by admin """ def has_permission(self, r...
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Views tests for the OSF.''' from __future__ import absolute_import import unittest import json import datetime as dt import mock import httplib as http from nose.tools import * # noqa PEP8 asserts from tests.test_features import requires_search from webtest.app import...
#!/usr/bin/env python # coding=utf-8 # Copyright 2021 The HuggingFace Team 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-...
import asyncio from collections import defaultdict, deque from collections.abc import Mapping, Set from contextlib import suppress from datetime import timedelta from functools import partial import inspect import itertools import json import logging import math from numbers import Number import operator import os impo...
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012 Alex Forencich 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 righ...
# -*- coding: utf-8 -*- # Copyright (c) 2012 Jiri "NoxArt" Petruzelka # # 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,...
""" MMRadar.py """ from ggame import App, Color, LineStyle, Sprite, RectangleAsset, CircleAsset, EllipseAsset, LineAsset from ggame import ImageAsset, PolygonAsset, Frame, Sound, SoundAsset, TextAsset import time import random import math SCREEN_WINDOWX = 1000 SCREEN_WINDOWY = 1000 # colors red = Color(0xff0000, 1.0...
#!/usr/bin/env python import cgi import cgitb; cgitb.enable() import os, sys import magic # implement: # check filesize, disallow too-large filesizes # check for existing file with same name; if exists, add _1... # check filetype - whitelist? # any kind of DoS mitigation? use URL throttling? # thttpd(8) CGI : CGI pro...
import re import logging from lxml import etree from share.normalize import ctx, tools from share.normalize.parsers import Parser from share.normalize.normalizer import Normalizer from share.normalize.utils import format_doi_as_url logger = logging.getLogger(__name__) URL_REGEX = re.compile(r'(https?:\/\/\S*\.[^\s\...
''' iOS target, based on kivy-ios project. (not working yet.) ''' import plistlib from buildozer import BuildozerCommandException from buildozer.target import Target from os.path import join, basename from getpass import getpass class TargetIos(Target): def check_requirements(self): checkbin = self.build...
import collections import logging import snmpy.mibgen class Plugin(object): def __init__(self, conf): self.conf = conf self.name = conf['name'] def update(self): raise(NotImplementedError('plugin module is missing update() method')) class PluginItem(object): def __init__(self, oi...
# -*- coding: utf-8 -*- # Copyright (c) 2012 Jiri "NoxArt" Petruzelka # # 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,...
## ## Author(s): ## - Cedric GESTES <gestes@aldebaran-robotics.com> ## ## Copyright (C) 2009, 2010, 2011 Aldebaran Robotics ## import os import glob import platform import subprocess import logging import qitools.configstore import qitools.qiworktree import qibuild from qibuild.project import Project import qi...
import logging import re from urllib.error import HTTPError, URLError from urllib.parse import quote, quote_plus, urlparse from django import forms from django.core.cache import cache from django.core.exceptions import ValidationError from django.template.loader import render_to_string from django.utils.encoding impor...
#!/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...
import warnings from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, override_settings from django.test.client import RequestFactory from django_filters.filterset import FilterSet, filterset_factory from django_filters.views import FilterView from .models import Book @override_...
""" This module implements the FormRequest class which is a more covenient class (than Request) to generate Requests based on form data. See documentation in docs/topics/request-response.rst """ import urllib import lxml.html from scrapy.http.request import Request from scrapy.utils.python import unicode_to_str cla...
############################################################################ # Joshua R. Boverhof, LBNL # Monte M. Goode, LBNL # See LBNLCopyright for copyright notice! ########################################################################### import sys, re from xml.dom.ext import SplitQName from xml.ns import SOAP, ...
import os,platform class JBCliPy(): """Constructor""" def __init__(self,username=None,password=None,win_suppress=False): if username and password: self.connect = ' --user=' + username + ' --password=' + password else: self.connect = '' ...
from django.conf.urls import patterns, url, include from django.views.generic import TemplateView from profiles.forms import SignupFormExtra from comicsite.admin import projectadminsite urlpatterns = patterns('', url(r'^test/send_email/$','comicsite.views.send_email'), url(r'^test/throw_exception/$...
""" MMRadar.py """ from ggame import App, Color, LineStyle, Sprite, RectangleAsset, CircleAsset, EllipseAsset, LineAsset from ggame import ImageAsset, PolygonAsset, Frame, Sound, SoundAsset, TextAsset import time import random import math SCREEN_WINDOWX = 1000 SCREEN_WINDOWY = 1000 speed = 2 # colors red = Color(0xf...
# Copyright (c) Charl P. Botha, TU Delft. # All rights reserved. # See COPYRIGHT for details. ################################################################### # the following programmes should either be on your path, or you # should specify the full paths here. # Microsoft utility to rebase files. REBASE = "rebase...
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2010 Prof. William H. Green (whgreen@mit.edu) and the # RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of c...
import django.db.models.manipulators import django.db.models.manager from django.core import validators from django.core.exceptions import ObjectDoesNotExist from django.db.models.fields import AutoField, ImageField, FieldDoesNotExist from django.db.models.fields.related import OneToOneRel, ManyToOneRel from django.db....
import os import json import uuid from avro import schema, io import util import pkgutil NAMESPACE = "edu.berkeley.cs.local" SCHEMA_NAMES = schema.Names(default_namespace=NAMESPACE) SCHEMAS = [ # new extension types "uuid", "UnitofTime", "Duration", "ReadingType", "ReadingValue", 'Instrumen...
from nose.tools import * from lust import unix, log from mock import patch, Mock import sys import os import time import signal # These tests use mocks to avoid system calls, with testing that the # functionality works in the tests/server_tests.py using small server # that are launched and confirmed work. def test_ma...
import copy import types import sys import os from itertools import izip try: set except NameError: from sets import Set as set # Python 2.3 fallback. import django.db.models.manager # Imported to register signal handler. from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned, F...
import sys import numpy as np import cv2 import os from PyQt5.QtCore import Qt from PyQt5.QtGui import QPixmap, QImage from PyQt5.QtWidgets import (QWidget, QLabel, QHBoxLayout, QVBoxLayout, QApplication, QPushButton, QSlider, QFileDialog) class Image(QWidget):...
# Copyright 2014 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 agr...
from django.core import validators from django.core.exceptions import PermissionDenied from django.utils.html import escape from django.conf import settings from django.utils.translation import gettext, gettext_lazy, ngettext FORM_FIELD_ID_PREFIX = 'id_' class EmptyValue(Exception): "This is raised when empty dat...
# Copyright 2014 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
import datetime from django.db import models from django.db import IntegrityError from django.db.utils import DatabaseError from django.db.models.signals import post_save from django.conf import settings from django.contrib.auth import authenticate from django.contrib.auth.models import User from django.core.mail impor...
import re import unittest from urlparse import urlsplit, urlunsplit from django.http import QueryDict from django.db import transaction from django.core import mail from django.core.management import call_command from django.test import _doctest as doctest from django.test.client import Client normalize_long_ints = l...
import argparse import configparser import glob import logging import os import pathlib import re import shutil import subprocess import sys import traceback import zipfile import hashlib # A script to execute a main class of a Maven artifact # which is available locally or from Maven Central. # # Works using the mave...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ Furtive. Deal with it! """ import os import hashlib import sys import sqlite3 class Furtive: """ Furtive: file integrity verification system. """ def __init__(self, dir, verbose=False): self.dir = dir self.verbose = verbose...
from django.core.exceptions import Http404, ObjectDoesNotExist from django.core.template import Context, loader from django.models.core import sites from django.utils import httpwrappers def shortcut(request, content_type_id, object_id): from django.models.core import contenttypes try: content_type = c...
# -*- mode: python; coding: utf-8 -*- # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """ Class for reading and writing casa measurement sets. Requires casacore. """ import numpy as np import os import warnings from astropy.time import Time from .uvdata import UVData fro...
# -*- mode: python; coding: utf-8 -*- # Copyright (c) 2018 Radio Astronomy Software Group # Licensed under the 2-clause BSD License """ Class for reading and writing casa measurement sets. Requires casacore. """ import numpy as np import os import warnings from astropy.time import Time from .uvdata import UVData fro...
# # repos.py : various utilities for interacting with the _repos module # ###################################################################### # # Copyright (c) 2000-2004 CollabNet. All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this d...
""" Some CoordinateMaps have input_coords that are 'array' coordinates, hence the function of the CoordinateMap can be evaluated at these 'array' points. This module tries to make these operations easier by defining a class ArrayCoordMap that is essentially a CoordinateMap and a shape. This class has two properties: ...
# -*- coding: utf-8 -*- """The initialization file for the Pywikibot framework.""" # # (C) Pywikibot team, 2008-2018 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals __version__ = __release__ = '3.1.dev0' __url__ = 'https://www.mediawiki.org/wiki/Manual:Pyw...
#! /usr/bin/python3 import sys import pdb import os import argparse import xml_utils as u import datetime from collections import defaultdict from argparse import RawTextHelpFormatter # from ordereddefaultdict import OrderedDefaultdict ##------------------------------------------------------------ ## can be called ...
# -*- coding: utf-8 -*- from django.db import models from django.contrib.auth.models import User from django.db import connection from place import Place import answer import current import prior class KnowledgeUpdater: @staticmethod def on_answer_save(a, knowledge_retriever=None, in_memory=False): i...
"""Binary-type primitives and containers. Some parts of a complex data structure are described at a granularity that is smaller than the atomic "byte" provided by an architecture. This module provides binary primitives to assist with those types of definitions. Within this module are 3 basic types. The atomic type tha...
import re import socket import threading import time import types import logging import gmetric from subprocess import call # from xdrlib import Packer, Unpacker log = logging.getLogger(__name__) try: from setproctitle import setproctitle except ImportError: setproctitle = None from daemon import Daemon __...
#!/usr/bin/env python # # testcase.py: Control of test case execution. # # Subversion is a tool for revision control. # See http://subversion.tigris.org for more information. # # ==================================================================== # Copyright (c) 2000-2004 CollabNet. All rights reserved. # # This ...