text
stringlengths
12
6.59M
import os import re # from orator import DatabaseManager from aioweb import ConfigReader from aioweb.conf import settings # from orator import Model as OratorModel from aioweb.core.model import Model def get_dbconfig(): conf = ConfigReader('config/database.yml') dbconfig = conf.get('databases') envir...
#!/usr/bin/env python from keras.models import Sequential from keras.layers import Dense, Dropout, Activation from keras.optimizers import SGD from keras.utils import np_utils #from sklearn.datasets import load_svmlight_file import sklearn as sk import sklearn.cross_validation import numpy as np import cleartk_io as c...
#!/usr/bin/env python3 # # Framewor for testing web aplications - proof of concept # Authors: Roman Vais <rvais@redhat.com> # import sys # arguments accessed by sys.argv import os # environment variables of the shell/machine import errno # errno for mkdirs function import subprocess # for launching another appl...
#!/usr/bin/env python # -*- coding: utf8 -*- # Copyright (c) 2014 unfoldingWord # http://creativecommons.org/licenses/MIT/ # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software withou...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
import os import sys import requests import shutil import glob import pkg_resources import yaml import hashlib PACKAGE = 'activitysim' EXAMPLES_DIR = 'examples' MANIFEST = 'example_manifest.yaml' def _example_path(resource): resource = os.path.join(EXAMPLES_DIR, resource) path = pkg_resources.resource_filena...
"""Config flow to configure Denon AVR receivers using their HTTP interface.""" from __future__ import annotations import logging from typing import Any from urllib.parse import urlparse import denonavr from denonavr.exceptions import AvrNetworkError, AvrTimoutError import voluptuous as vol from homeassistant import ...
# Tim Cornwell <realtimcornwell@gmail.com> # """ Functions that define and manipulate images. Images are just data and a World Coordinate System. """ import numpy import matplotlib.pyplot as plt from astropy.io import fits from astropy.wcs import WCS from reproject import reproject_interp # from reproject import re...
# 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...
# -*- coding: utf-8 -*- import hashlib import requests import time import json from xml.dom import minidom from .messages import MESSAGE_TYPES, UnknownMessage from .exceptions import ParseError, NeedParseError, NeedParamError, OfficialAPIError from .reply import TextReply, ImageReply, VoiceReply, VideoReply, MusicRe...
#!/usr/bin/python2.5 # # Copyright 2009 the Melange 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...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
"""Constants for the Forecast.Solar integration.""" from __future__ import annotations from datetime import timedelta from typing import Final from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT from homeassistant.const import ( DEVICE_CLASS_ENERGY, DEVICE_CLASS_POWER, DEVICE_CLASS_TIMESTA...
# -*- coding: utf-8 -*- """ Action Primitives for Deployment Orchestration. Used by Mayor to resolve deployment sequences Warnings: Experimental """ from __future__ import absolute_import as _absolute_import import logging as _logging import copy from datetime import datetime as _datetime from whoville import de...
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
# -*- coding: utf-8 -*- from __future__ import print_function import logging import os import signal import socket import time import traceback from datetime import datetime from multiprocessing import Process from os.path import abspath from os.path import dirname from os.path import expanduser from os.path import j...
# Copyright (c) 2014-2015 Matthias Geier # # 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,...
"""Shared acceptance test functions.""" from random import choice from time import sleep import requests import json from splinter.driver.webdriver import WebDriverElement from adhocracy_core.testing import god_login from adhocracy_core.testing import god_password from adhocracy_core.testing import annotator_password...
"""Support for Nest devices.""" # mypy: ignore-errors from datetime import datetime, timedelta import logging import threading from nest import Nest from nest.nest import APIError, AuthorizationError import voluptuous as vol from homeassistant import config_entries from homeassistant.config_entries import ConfigEntr...
""" Web application based on Flask. """ import datetime import os import json import pickle import logging import hashlib from functools import wraps from flask import Flask, g, session, render_template, flash, redirect, request, url_for, abort, make_response, jsonify from flask.ext.openid import OpenID from flas...
"""Support for Notion binary sensors.""" from __future__ import annotations from dataclasses import dataclass from typing import Literal from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_CONNECTIVITY, DEVICE_CLASS_DOOR, DEVICE_CLASS_GARAGE_DOOR, DEVICE_CLASS_M...
#__BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance ...
# Copyright (c) 2013 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. """Top-level presubmit script for Skia. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmi...
""" Module for managing the climate within a room. * It reads/listens to a temperature address from KNX bus. * Manages and sends the desired setpoint to KNX bus. """ import time import datetime import asyncio from enum import Enum from xknx.knx import Address, DPTBinary, DPTArray, DPTTemperature from xknx.exceptions i...
# -*- coding: UTF-8 -*- import numpy as np ## This module handles the task of computing the hitting times, points and ## subcrossings for continuous processes def xtree_integer_crossings( T, X, y_eps = 0.0 ) : ## Compute movement directions X_direction = np.sign( np.diff( X ) ) ## 2015-05-11 : Having studied the or...
# -*- coding: utf-8 -*- """ solace.utils.formatting ~~~~~~~~~~~~~~~~~~~~~~~ Implements the formatting. Uses creoleparser internally. :copyright: (c) 2009 by Plurk Inc., see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import re i...
"""Support for Songpal-enabled (Sony) media devices.""" import asyncio import logging from collections import OrderedDict import voluptuous as vol from songpal import ( Device, SongpalException, VolumeChange, ContentChange, PowerChange, ConnectChange, ) from homeassistant.components.media_play...
from boards.table import BoardTable from django import template register = template.Library() @register.inclusion_tag('menu_main.html', takes_context=True) def menu_main(context): """Main navigation menu""" user = context['request'].user logo = context['SITE_LOGO'] info = context['SITE_INFO'] my...
#!/usr/bin/python import cgi import os import sys import json import urllib import networkx as nx from networkx.readwrite import json_graph from flask import Flask, render_template, url_for, request, redirect import settings app = Flask(__name__) enable_ganglia=settings.enable_ganglia ganglia_url=settings.ganglia_url...
from collections import defaultdict import logging from seqr.utils.elasticsearch.constants import MAX_COMPOUND_HET_GENES, HAS_ALT_FIELD_KEYS from seqr.utils.elasticsearch.es_search import EsSearch logger = logging.getLogger(__name__) class EsGeneAggSearch(EsSearch): AGGREGATION_NAME = 'gene aggregation' CAC...
# Copyright (c) 2013 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. """Top-level presubmit script for Skia. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmi...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext import json from frappe import _, throw from frappe.utils import today, flt, cint, fmt_money, formatdate, getdate, add_days, add_...
#!/usr/bin/env python from django.core.management import execute_manager import imp try: imp.find_module('settings') # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized t...
import numbers import re from django.conf import settings from django.contrib.auth.models import User from django.core.cache import cache from django.utils import html, safestring from couchdbkit import ResourceNotFound from django_prbac.utils import has_privilege from casexml.apps.case.const import ( ARCHIVED_C...
# # Copyright (c), 2016-2018, SISSA (International School for Advanced Studies). # All rights reserved. # This file is distributed under the terms of the MIT License. # See the file 'LICENSE' in the root directory of the present # distribution, or http://opensource.org/licenses/MIT. # # @author Davide Brunato <brunato@...
# Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Documentation on PRESUBMIT.py can be found at: # http://www.chromium.org/developers/how-tos/depottools/presubmit-scripts import os.path import sy...
# Copyright: Damien Elmes <anki@ichi2.net> # -*- coding: utf-8 -*- # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import os, sys, re, traceback, signal import zipfile from aqt.qt import * QtConfig = pyqtconfig.Configuration() from anki import Collection from anki.utils import isWin,...
#!/usr/local/bin/python3.5 # -*- coding: utf-8 -*- # import python libs from pprint import pprint as pp import base64 import json import logging import random # import project libs import ner_pipeline import nltk_tree_converter # defining globals & constants NEW_DOCUMENTS_LIMIT = 0 # methods def process_iterati...
from urllib import urlencode from django.core.urlresolvers import reverse from django.http import Http404 from django.utils.safestring import mark_safe, mark_for_escaping from django.utils.translation import ugettext_noop, ugettext as _, ugettext_lazy from corehq import privileges, toggles from corehq.apps.accounting.d...
from flask import Flask import requests import os import re import json import urllib app = Flask('hurtle-cc-api') def get_auth_heads(): uri = os.environ.get('URI', False) if not uri: raise AttributeError('No URI defined!') response = requests.get(uri + '/oauth/authorize?response_type=token&clie...
import functools import json import logging import os import traceback import uuid from collections import defaultdict, namedtuple from contextlib import ExitStack, contextmanager from datetime import datetime, timedelta from functools import wraps from io import StringIO, open from textwrap import indent, wrap from ti...
import glob import os import time from PyAnalysisTools.base import _logger from PyAnalysisTools.base.ShellUtils import remove_file, change_dir class BatchJob(object): def __init__(self): pass class BatchHandle(object): """ Class to handle submission and monitoring to batch system """ de...
# -*- coding: utf-8 -*- """ Created on Mon May 18 14:30:15 2015 @author: Alexander """ import unittest import PropensityScoreMatching as PSM import pandas as pd import numpy as np import os LOCAL_DIR = os.path.dirname(__file__) FILENAMES = [os.path.join('results', 'nsw_all_random1_pscoresimple.csv'), os....
""" This is the cmdset for Account (OOC) commands. These are stored on the Account object and should thus be able to handle getting an Account object as caller rather than a Character. Note - in order for session-rerouting (in MULTISESSION_MODE=2) to function, all commands in this cmdset should use the self.msg() co...
import os import re import json try: import cPickle as pickle except ImportError: import pickle try: from urllib import unquote except ImportError: from urllib.parse import unquote import fnmatch from gzip import GzipFile from dateutil.tz import tzlocal try: from cStringIO import StringIO except...
#!/usr/bin/env python from pyon.util.containers import DotDict from pyon.core.bootstrap import get_sys_name from gevent.event import AsyncResult from interface.services.coi.iresource_registry_service import ResourceRegistryServiceClient from interface.services.dm.ipubsub_management_service import PubsubManagementServ...
from __future__ import absolute_import from __future__ import print_function import locale try: locale.setlocale(locale.LC_ALL, '') except locale.Error: pass import pkg_resources __version__ = pkg_resources.get_distribution('jarn.viewdoc').version import sys import os import getopt import shutil import webbr...
import wx import wx.richtext as rtc import prefs import re from window.basepane import BasePane from utility import platform from theme import Theme class InputPane(BasePane): def __init__(self, parent, connection): BasePane.__init__(self, parent, connection, style = wx.TE_PROCESS_ENTER | wx.T...
"""Tests for validatorfuncs """ from django.test import TestCase from evennia.utils import validatorfuncs import mock import datetime import pytz class TestValidatorFuncs(TestCase): def test_text_ok(self): for val in [None, -123, 'abc', 1.234, {1:True, 2:False}, ['a', 1]]: self.assertEqual(s...
# -*- coding: utf-8 -*- # # Copyright (c) 2008-2009 Benoit Chesneau <benoitc@e-engura.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTW...
from django.db.models import Q from django.template import Library, Node, TemplateSyntaxError, resolve_variable from farms.models import Farm, CropSeason from operator import itemgetter, attrgetter, methodcaller from sys import stdout, stderr register = Library() class ContextNode(Node): def __init__(self, func): ...
#!/usr/bin/env python3 import sys, os, unittest, logging, inspect # Extend PYTHONPATH with local 'lib' folder if __name__ == "__main__": jasyroot = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir, os.pardir, os.pardir)) sys.path.insert(0, jasyroot) print("Running from %s.....
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
# 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...
#!/usr/bin/python """ Python source code - This is a program thingy to do things and stuff """ # kegor's functions: http://z15.invisionfree.com/Triterium_BBS/index.php?showforum=161 # python tutorial: http://docs.python.org/2/tutorial/index.html # database walkthrough: http://zetcode.com/db/postgresqlpythontutorial/ ...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import fields,osv class res_partner(osv.osv): """ Inherits partner and adds CRM information in the partner form """ _inherit = 'res.partner' def _opportunity_meeting_count(self, cr, uid, id...
#!/usr/bin/python -u # # pagekite.py, Copyright 2010, the Beanstalks Project ehf. # and Bjarni Runar Einarsson # # 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 Found...
# # Copyright (c) 2014 ThoughtWorks, Inc. # # Pixelated 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 option) any later version. # # Pixelated is distrib...
""" Online learning of a dictionary of parts of faces ================================================= This example uses a large dataset of faces to learn a set of 20 x 20 images patches that constitute faces. From the programming standpoint, it is interesting because it shows how to use the online API of the scikit...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module includes helper functions for array operations. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np __all__ = ['extract_array', 'add_array', 'subpixel_indices...
from __future__ import (absolute_import, division, print_function, unicode_literals) from ..extern import six from ..extern.six.moves import zip as izip import platform import warnings import numpy as np from ..utils.exceptions import AstropyUserWarning __all__ = ['TableGroups', 'ColumnGrou...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst import fnmatch import time import re import datetime import warnings from decimal import Decimal from collections import OrderedDict, defaultdict from pathlib import Path import numpy as np import erfa from astropy.utils.decorator...
#!/usr/bin/env python # -*- coding: utf-8 -*- __name__ = "crawtext" __version__ = "4.3.1" __doc__ = '''Crawtext. Description: A simple crawler in command line for targeted websearch. Usage: crawtext.py (<name>) crawtext.py <name> --query=<query> --key=<key> [--nb=<nb>] [--lang=<lang>] [--user=<email>] [--depth=<dep...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function import time import sys import os.path import webbrowser import getpass import warnings import keyring import numpy as np import re from bs4 import BeautifulSoup from astropy.extern.six import BytesIO from astropy.exte...
# Licensed under a 3-clause BSD style license - see LICENSE.rst import StringIO import requests import numpy as np from astropy.table import Table __all__ = ['query'] URL = "http://ogle.astrouw.edu.pl/cgi-ogle/getext.py?" ALGORITHMS = ['NG', 'NN'] QUALITIES = ['GOOD', 'ALL'] COORD_SYS = ['RD', 'LB'] RESULT_DTYPE = [...
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
import os from ..common import chdir from ..student import stash, pull, checkout_date from ..student.markdownify.process_file import process_file from PyInquirer import style_from_dict, Token, prompt def check_student(student, spec, basedir): files = [] if os.path.exists('{}/{}'.format(student, spec['assignm...
# Copyright 2014 The Swarming Authors. All rights reserved. # Use of this source code is governed by the Apache v2.0 license that can be # found in the LICENSE file. """Swarming bot management. Includes management of the swarming_bot.zip code and the list of known bots. """ import datetime import hashlib import os.p...
# Copyright (C) 2013 Jaedyn K. Draper # # 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, di...
#!/usr/bin/env python from __future__ import print_function """ Copyright (c) 2013-2015 Roberto Christopher Salgado Bjerre, Miroslav Stampar. 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 witho...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import api, models, fields from openerp.exceptions import UserError, Warning import base64 import tempfile import openpyxl class SimpleMeliPublishing(models.TransientModel): _name = "simple_meli_publish...
# -*- coding: utf-8 -*- from flask import Blueprint, Response, request, g, current_app, url_for, safe_join, make_response from flask import render_template, redirect from jinja2 import Template import json, re from functools import wraps import sys import traceback from ..workspace import Workspace, SLICER_INFO_KEYS f...
from corehq.apps.userreports.specs import TypeProperty from corehq.form_processor.interfaces.dbaccessors import CaseAccessors, FormAccessors from dimagi.ext.jsonobject import JsonObject, StringProperty STATUSES = { (1, 0): "Improved", (0, 1): "**Declined**", (1, 1): "Satisfactory", (0, 0): "**needs im...
from functools import wraps from django.utils.safestring import mark_safe from django.utils.translation import ugettext_lazy, ugettext as _ from django.conf import settings from corehq import toggles from corehq.apps.hqwebapp.views import no_permissions from custom.icds.const import ICDS_DOMAIN, IS_ICDS_ENVIRONMENT f...
import json import traceback from functools import wraps from collections import OrderedDict from flask import Blueprint, make_response, request, url_for, jsonify, current_app from flask_cors import cross_origin from appcomposer.db import db from appcomposer.models import RepositoryApp from appcomposer.login import ...
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # ---------------------...
import warnings import numpy as np from scipy import linalg from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_greater from sklearn import linear_model, datasets diabetes = d...
#! /usr/bin/env python3 import sqlite3 import subprocess import os import bcrypt import hashlib from Crypto.Cipher import AES import codecs import cherrypy import time pwdatabase = 'passwords.db' # pwdatabase = ':memory:' authKeys = dict() login_attempts = [] login_attempt_window = 60 * 5 login_attempts_allowed = 3...
from bs4 import BeautifulSoup import json from application import app from models import * from config import * from datetime import date, datetime, timedelta def addLogEvent(eventText): e = Logs(eventText) db.session.add(e) db.session.commit() def getSettings(): d = {} settings = Settings.query....
#!/usr/bin/env python """ Uses the `soundfile <http://pysoundfile.readthedocs.io>`_ and `sounddevice <http://python-sounddevice.readthedocs.io>`_ libraries to playback, record, or simultaneously playback and record audio files. Notes:: + 24-bit streaming is currently not supported (typically 32-bit streaming gets ...
from flask import ( Blueprint, current_app, flash, redirect, render_template, request, session, url_for ) from flask.ext.security.utils import login_user, logout_user import requests from application.extensions import user_datastore from application.frontend.forms import LoginForm from ...
import os import re import subprocess as sp import sys from paver.easy import task, needs, path, sh from paver.setuputils import setup import conda_helpers as ch import path_helpers as ph import platformio_helpers as pioh # add the current directory as the first listing on the python path # so that we import the corr...
#!/usr/bin/env python2 #coding: UTF-8 import subprocess import os import zlib import argparse import json import re import textract import hashlib import sys from time import time INDEX_PATH = os.path.expanduser("~/.pdfindex") """ Index is zlib of json: hash is sha256 files[filename]: hash modified: modified time...
from __future__ import absolute_import from django.contrib.auth import authenticate from django.contrib.auth.models import User from hq.authentication import get_username_password from hq.utils import get_dates try: from threading import local except ImportError: from django.utils._threading_local import loca...
#!/usr/bin/python """Utilities to facilitate out-of-core learning in sklearn""" import collections import ctypes import multiprocessing as mp import numpy as np import scipy import Queue from joblib.parallel import SafeFunction import sklearn.base class Streamer(object): '''A wrapper class for reusable generat...
from apps.bluebottle_utils.managers import GenericForeignKeyManagerMixin from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.text import Truncator from django.utils.translation import ugettext_lazy as _ from django.con...
import difflib import datetime import time import random import re import math import mongoengine as mongo import zlib import hashlib import redis from urlparse import urlparse from utils.feed_functions import Counter from collections import defaultdict from operator import itemgetter from bson.objectid import ObjectId...
""" pgp.py """ import re import collections import base64 import hashlib import calendar from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes from cryptography.hazmat.backends import default_backend from .fileloader import FileLoader from .reg import * from .util import bytes_to_int, int_to_b...
import difflib import requests import datetime import time import random import re import math import mongoengine as mongo import zlib import hashlib import redis import pymongo import HTMLParser import urlparse from collections import defaultdict from operator import itemgetter from bson.objectid import ObjectId from ...
import difflib import datetime import time import random import re import math import mongoengine as mongo import zlib import hashlib import redis import pymongo from collections import defaultdict from operator import itemgetter from bson.objectid import ObjectId from BeautifulSoup import BeautifulSoup # from nltk.col...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for the SkyCoord class. Note that there are also SkyCoord tests in test_api_ape5.py """ import copy from copy import deepcopy import pytest import numpy as np import numpy.testing as npt from erfa import ErfaWarning f...
import difflib import datetime import time import random import re import math import mongoengine as mongo import zlib import hashlib import redis import pymongo from collections import defaultdict from operator import itemgetter from bson.objectid import ObjectId from BeautifulSoup import BeautifulSoup # from nltk.col...
# The purpose of these tests are to ensure that calling ufuncs with quantities # returns quantities with the right units, or raises exceptions. import warnings import pytest import numpy as np from numpy.testing.utils import assert_allclose from collections import namedtuple from ... import units as u from ...tests....
''' ARCHES - a program developed to inventory and manage immovable cultural heritage. Copyright (C) 2013 J. Paul Getty Trust and World Monuments Fund 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 ...
__package__ = 'archivebox.core' from io import StringIO from pathlib import Path from contextlib import redirect_stdout from django.contrib import admin from django.urls import path from django.utils.html import format_html from django.utils.safestring import mark_safe from django.shortcuts import render, redirect fr...
__package__ = 'archivebox.core' from django import forms from ..util import URL_REGEX from .utils_taggit import edit_string_for_tags, parse_tags CHOICES = ( ('0', 'depth = 0 (archive just these URLs)'), ('1', 'depth = 1 (archive these URLs and all URLs one hop away)'), ) ARCHIVE_METHODS = [ ('title', 't...
from django.shortcuts import render, render_to_response from django.http import HttpResponse, Http404 from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django import forms from models import Resource from models import REvent from models import RLibrary from models import ROnline from models...
# # Copyright 2019 The FATE 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...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from filer.settings import FILER_IMAGE_MODEL import filer.fields.folder import filer.fields.file import filer.fields.image class Migration(migrations.Migration): if FILER_IMAGE_MODEL: dependencies = ...
################################################################################ #This software was developed by the University of Tennessee as part of the #Distributed Data Analysis of Neutron Scattering Experiments (DANSE) #project funded by the US National Science Foundation. # #See the license text in lic...