text
stringlengths
12
6.59M
# Authors: Tal Linzen <linzen@nyu.edu> # Teon Brooks <teon.brooks@gmail.com> # Denis A. Engemann <denis.engemann@gmail.com> # # License: BSD (3-clause) from collections import namedtuple from inspect import isgenerator import warnings import numpy as np from scipy import linalg from ..source_estima...
# -*- coding: utf-8 -*- # see: # https://github.com/carthage-college/django-djpsilobus/blob/2841d7aa2e9a7e41fcbfd12533f3266b1966778b/djpsilobus/core/data.py # for last stable version of this file before the archivist moved all of the collections # around and all of the collection IDs changed as a result. # DIVISIONS ...
try: import cPickle as pickle except ImportError: import pickle from threading import local from django.core.cache.backends.memcached import BaseMemcachedCache from . import client def serialize_pickle(key, value): if isinstance(value, str): return value, 1 return pickle.dumps(value), 2 def...
import attr from couchexport.export import export_raw from couchexport.models import Format PROPERTIES_PREFIX = 'properties.' ACTIONS_PREFIX = 'actions.' PREFIX_MAP = { 0: PROPERTIES_PREFIX, 1: '', 2: ACTIONS_PREFIX, } @attr.s class DETConfig: tables = attr.ib(type=list) @property def table...
""" Defines basic traits and functions for the data model. """ # Standard library imports from math import radians, sqrt # Major library imports from numpy import (array, argsort, concatenate, column_stack, cos, dot, empty, nonzero, pi, searchsorted, sin, take, ndarray) # Enthought library imports...
import logging import uuid from datetime import timedelta from typing import List, Optional import stripe from django.apps import apps from django.db import IntegrityError, models, transaction from django.utils import dateformat, timezone from django.utils.encoding import smart_str from stripe.api_resources.abstract.a...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import logging from dimagi.ext.couchdbkit import * from datetime import datetime from django.db import models from corehq.apps.app_manager.models import Form from corehq.apps.users.models import CouchUser from casexml.apps.case.models import CommCareCase from dimagi.u...
#!/usr/bin/env python import node as N import functools import cStringIO def CreateStringFromList(words, level_space, indent_level): leading_whitespace = " " * (level_space * indent_level) if type(words) is str: return leading_whitespace + words stream = cStringIO.StringIO() stream.write(leading_whitespac...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013 Ted Neykov # 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 ...
import decimal import warnings import stripe from django.db import models from django.utils import timezone from django.utils.functional import cached_property from stripe.error import InvalidRequestError from .. import enums from .. import settings as djstripe_settings from .. import webhooks from ..exceptions impor...
#! /usr/bin/env python import datetime import time from time import strftime import threading from threading import Timer import redis import traceback import datetime import argparse from dataprovider.dataprovider import RedisLiveDataProvider from api.util.settings import RedisLiveSettings class Monitor(object): ...
import collections import copy from contextlib import contextmanager import matplotlib.pyplot as plt import numpy as np import pandas as pd from astromodels.core.parameter import Parameter from astromodels.functions.priors import Uniform_prior from astromodels.utils.valid_variable import is_valid_variable_name from ...
from corehq.apps.accounting.utils.subscription import is_domain_enterprise from corehq.apps.enterprise.dispatcher import EnterpriseReportDispatcher from django.conf import settings from django.http import Http404 from django.urls import reverse from django.utils.html import format_html, strip_tags from django.utils.tra...
from copy import deepcopy import logging import subprocess from jinja2 import Environment, FileSystemLoader import os import re import utils class Vpn: def __init__(self, config): self.config = config self.jinja_env = Environment( loader=FileSystemLoader('/opt/cosmic/router/bin/cs/te...
from __future__ import unicode_literals from collections import defaultdict from moto.core.responses import BaseResponse from moto.ec2.models import ec2_backends from .models import rds2_backends from .exceptions import DBParameterGroupNotFoundError class RDS2Response(BaseResponse): @property def backend(se...
# -*- coding: utf-8 -*- from collections import OrderedDict import os import io import zipfile import csv import datetime import logging import re import pytz from lxml import etree from widukind_common import errors from dlstats import constants from dlstats.utils import Downloader, get_ordinal_from_period from dl...
""" module __EffectiveProperty__: Base class to estimate transport properties =============================================================================== """ import OpenPNM import scipy as sp import scipy.signal as spsg import scipy.spatial as sptl from .__GenericAlgorithm__ import GenericAlgorithm class Effecti...
#!/usr/bin/python3 # Copyright © 2013, 2014 Jakub Wilk <jwilk@jwilk.net> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the “Software”), to deal # in the Software without restriction, including without limitation the rights # to u...
# Copyright (c) 2012 Spotify AB # # 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, s...
import os from thumbnails.models import Source, ThumbnailMeta from thumbnails.conf import settings class ImageMeta: def __init__(self, name, size): self.name = name self.size = size class BaseBackend: def add_source(name): raise NotImplementedError def delete_source(name): ...
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, unicode_literals, absolute_import import json import logging import sys from functools import wraps f...
# A Neural Network Architecture Combining Gated Recurrent Unit (GRU) and # Support Vector Machine (SVM) for Intrusion Detection in Network Traffic Data # Copyright (C) 2017 Abien Fred Agarap # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
#!/usr/bin/env python import argparse import os import sys import subprocess from datetime import datetime import dxpy import dxencode import json # NOTES: This command-line utility will run the DNA methylation for a single replicate # - All results will be written to a folder /RESULT_FOLDER_DEFAULT/<expId>/<bio...
import os import re import json import cPickle import urllib import fnmatch from gzip import GzipFile from dateutil.tz import tzlocal from cStringIO import StringIO import logging import boto3 import botocore from botocore.utils import fix_s3_host import numpy as np from scipy.sparse import (coo_matrix, ...
""" The main command-line entry point. """ from __future__ import print_function import sys import importlib from argparse import _StoreTrueAction, SUPPRESS from rez.cli._util import subcommands, LazyArgumentParser, _env_var_true from rez.utils.logging_ import print_error from rez.exceptions import RezError, RezSystem...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, unicode_literals, absolute_import from collections import namedtuple import json import logging import...
''' Based on the paper: http://arxiv.org/pdf/1601.06581v2.pdf This model is: acoustic RNN trained with ctc loss ''' import tensorflow as tf try: from tensorflow.models.rnn import rnn_cell, rnn except: from tensorflow.python.ops import rnn_cell, rnn import tensorflow.contrib.ctc as ctc import util.audioproce...
from django.db import models from django.contrib.auth.models import User class Source(models.Model): """ The source from which a registation originates. The user foreignkey is used to identify the source based on the user's api token. """ name = models.CharField(max_length=100, null=False,...
r""" Rez configuration settings. Do not change this file. Settings are determined in the following way (higher number means higher precedence): 1) The setting is first read from this file; 2) The setting is then overridden if it is present in another settings file pointed at by the $REZ_CONFIG_FILE environment var...
from __future__ import absolute_import import json import os import uuid import base64 import six import matplotlib.pyplot as plt from .mplexporter.exporter import Exporter from jinja2 import Environment, PackageLoader from .leaflet_renderer import LeafletRenderer from .links import JavascriptLink, CssLink from . i...
# -*- coding: utf-8 -*- try: from thread import start_new_thread, get_ident except ImportError: # Python 3? from _thread import start_new_thread, get_ident import threading import unittest import time import sys import gc import lupa IS_PYTHON3 = sys.version_info[0] >= 3 try: _next = next except Nam...
""" A model (``RegistrationProfile``) for storing user-registration data, and an associated custom manager (``RegistrationManager``). """ import datetime, random, re, sha from django.conf import settings from django.db import models from django.template.loader import render_to_string from django.utils.translation i...
# Author: Matthew Harrigan <matthew.harrigan@outlook.com> # Contributors: # Copyright (c) 2016, Stanford University # All rights reserved. import os import pickle import shutil import warnings import mdtraj as md import numpy as np import pandas as pd def backup(fn): if not os.path.exists(fn): return ...
import pyglet from pyglet.gl import * glEnable(GL_BLEND) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) from pyglet.window import key import numpy as np import numpy.random as nprand import itertools import bisect import random TILE_SIZE_X = 64 TILE_SIZE_Y = 32 I_MAX = 9 J_MAX = 9 X_MAX = 2*(I_MAX+1)*TILE_SIZE_X ...
from elasticsearch import helpers from . import ElasticTestCase class TestBulkIndex(ElasticTestCase): def test_all_documents_get_inserted(self): docs = [{"answer": x} for x in range(100)] success, failed = helpers.bulk_index(self.client, docs, index='test-index', doc_type='answers', refresh=True) ...
''' Script to check the correctness of the analysis. The analysis is done on raw data and all results are compared to a recorded analysis. ''' import os import unittest from testbeam_analysis import hit_analysis from testbeam_analysis.tools import test_tools # Get package path testing_path = os.path.dirname(__file__...
import logging import random import sys from abc import abstractmethod import syft as sy from syft.frameworks.torch.tensors.interpreters import PointerTensor from syft.frameworks.torch.tensors.interpreters import AbstractTensor from syft.exceptions import WorkerNotFoundException from syft.exceptions import ResponseSi...
r""" This module contains :py:meth:`~sympy.solvers.ode.dsolve` and different helper functions that it uses. :py:meth:`~sympy.solvers.ode.dsolve` solves ordinary differential equations. See the docstring on the various functions for their uses. Note that partial differential equations support is in ``pde.py``. Note t...
# # Copyright (c) 2015 SUSE Linux GmbH # # 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 library is di...
# -*- coding: utf-8 -*- ''' This module contains an opionated gateway for the capakey webservice. .. versionadded:: 0.2.0 ''' from crabpy.client import capakey_request from suds import WebFault from crabpy.gateway.exception import ( GatewayRuntimeException, GatewayAuthenticationException ) from dogpile.cac...
""" :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from base64 import b64encode import pytest from byceps.services.tourney.models.match import MatchComment from byceps.services.tourney import match_service from tests.api.helpers import assemble_authorization_header f...
""" Created on May 2, 2014 @author: Steve """ import maya.cmds as cmds import mGui.events as events import mGui.properties as properties class ScriptJobEvent(events.Event): """ A derivative of the Event class that is attached to a Maya scriptJob Typical usage: def handle_new_object(*args, **kw...
# coding:utf8 from syncplay import constants en = { "LANGUAGE" : "English", # Client notifications "config-cleared-notification" : "Settings cleared. Changes will be saved when you store a valid configuration.", "relative-config-notification" : "Loaded relative configuration file(s): {}...
"""Status codes for autoimporting documents""" # pylint: disable=C0301 CODES = { 'ACK': ('Acknowledgement Letter', 'processed', 'An acknowledgement letter, stating the request is being processed.'), 'NRD': ('No Responsive Documents', 'no_docs', 'A no responsive documents response.'), 'NRD-T': ('No Responsive Docum...
#coding:utf8 en = { # Client notifications "connection-attempt-notification" : "Attempting to connect to {}:{}", #Port, IP "reconnection-attempt-notification" : "Connection with server lost, attempting to reconnect", "disconnection-notification" : "Disconnected from server", ...
"""Celery Tasks for the FOIA application""" from celery.signals import task_failure from celery.schedules import crontab from celery.task import periodic_task, task from django.conf import settings from django.contrib.auth.models import User from django.core.mail import send_mail from django.template.defaultfilters im...
#coding:utf8 en = { # Client notifications "connection-attempt-notification" : "Attempting to connect to {}:{}", #Port, IP "reconnection-attempt-notification" : "Connection with server lost, attempting to reconnect", "disconnection-notification" : "Disconnected from server", ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # CREATED:2015-02-02 10:09:43 by Brian McFee <brian.mcfee@nyu.edu> '''Time stretching deformations''' import jams import librosa import pyrubberband as pyrb import numpy as np import pandas as pd from ..base import BaseTransformer __all__ = ['TimeStretch', '...
import codecs import os from utils import enum __all__ = ['MultiInstanceError', 'NoChartError', 'Param', 'Notes', 'Simfile'] # Special exceptions class MultiInstanceError(Exception): pass class NoChartError(Exception): pass class Param(list): def __str__(self): if self[0].upper() == 'NOTES': ...
# -*- coding: utf-8 -*- # Copyright (C) 2014 ibu@radempa.de # # 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,...
import os.path from decimal import Decimal from munge import config from munge.csv_util import import_csv, unicode_csv_reader from munge.sa_util import results_dict, get_result_fields DIRECTORY = 'vao' IMPORTER = 'vao' VAO_LIST_TABLE = 'vao_list_raw' VAO_LIST_FILE = 'LIST_2010_MERGED.dta.30Sep2015' VAO_FILE = 'SMV_...
from __future__ import print_function import os import sys import pprint from utils import ProgressBar, Symbol from settings import Settings from vendor import storable def discover_from_datafile(settings): """ /var/lib/munin/htmlconf.storable contains a copy of all informations required to build the graph (...
# Copyright (c) 2014 Mirantis, 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...
import tarfile import os from os.path import join import shutil import subprocess import sys import mx import mx_findbugs import re from mx_unittest import unittest, add_config_participant from mx_gate import Task, add_gate_runner, gate_clean from mx_gitlogcheck import logCheck _suite = mx.suite('sulong') _mx = join...
# phonenumber.py - phone number validation & normalization module # coding: utf-8 # The MIT License (MIT) # Copyright 2016 Melomap (www.melomap.com) # Copyright 2018 Thura Hlaing (trhura@gmail.com) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documen...
# Copyright 2017 Mycroft AI 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...
from mysite.base.tests import make_twill_url, TwillTests import mysite.account.tests from mysite.profile.models import Person import mysite.customs.miro import mysite.search.controllers import django.test from mysite.search.models import Project, Bug from mysite.search import views import lpb2json import datetime imp...
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
""" This class encapsulates the interactions with the SWS Enrollment resource. """ import logging from uw_sws.enrollment import (get_enrollment_by_regid_and_term, enrollment_search_by_regid) from myuw.logger.timer import Timer from myuw.logger.logback import log_resp_time, log_exception,...
import datetime import sys import subprocess import os import numpy as np import rasterio sys.path.append('../') import constants_and_names as cn import universal_util as uu def create_BGC(tile_id, mang_BGB_AGB_ratio): start = datetime.datetime.now() # Names of the input tiles. Creates the names even if the ...
"""Tests projects that use isort to see if any differences are found between their current imports and what isort suggest on the develop branch. This is an important early warning signal of regressions. NOTE: If you use isort within a public repository, please feel empowered to add your project here! It is important t...
from django.conf import settings import traceback import logging import sys from restclients.gws import GWS from myuw_mobile.user import UserService from myuw_mobile.logger.timer import Timer from myuw_mobile.logger.logback import log_resp_time, log_exception class Member: """ The Member class encapsulates the...
import copy import cPickle import io import json import os import re import ConfigParser from urllib import quote, unquote import mailpile.util from mailpile.commands import Rescan from mailpile.httpd import HttpWorker from mailpile.mailutils import MBX_ID_LEN, OpenMailbox, IncrementalMaildir from mailpile.search imp...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Tests pertaining to line/branch test coverage for the Firecracker code base. # TODO - Put the coverage in `s3://spec.firecracker` and update it automatically. target should be put in `s3://spec.firecra...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # SPDX-License-Identifier: Apache-2.0 """Tests pertaining to line/branch test coverage for the Firecracker code base. # TODO - Put the coverage in `s3://spec.firecracker` and update it automatically. target should be put in `s3://spec.firecra...
""" Demands: * starter når den første _done folder er markeret * hvis filscan indhenter exchange download skal filscan vente indtil en ny folder er markeret med _done. * Når alt exchange indhold er downloadet skal filscan vide at der ikke er mere indhold at scanne. """ import os import time import queue import multipro...
# Create a script to run a random hyperparameter search. import copy import getpass import os import random import numpy as np LIN = "LIN" EXP = "EXP" # Instructions: Configure the variables in this block, then run # the following on a machine with qsub access: # python make_sweep.py > my_sweep.sh # bash my_sweep.sh...
# Copyright 2016 Dravetech AB. All rights reserved. # # The contents of this file are 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 req...
''' Project: Farnsworth Author: Karandeep Singh Nagra ''' from django.conf import settings from django.db import models from social.utils import setting_name from threads.models import UserProfile class Manager(models.Model): ''' The Manager model. Contains title, incumbent, and duties. ''' title = models.Cha...
# -*- coding: utf-8 -*- # # Copyright (C) 2006 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://markup.edgewall.org/wiki/License. # # This software consists of ...
#!/usr/bin/env python #ckwg +5 # Copyright 2011 by Kitware, Inc. All Rights Reserved. Please refer to # KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, # Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. def log(msg): import sys sys.stderr.write("%s\n" % msg) def test_imp...
# Copyright (C) 2010 rPath, Inc. import testsuite testsuite.setup() import uuid import wmiclient import wmi_forwarding_plugin from testtaskhandler import TestBase class WmiTest(TestBase): # These cannot be defined in setUp, they are needed in the base class taskDispatcher = wmi_forwarding_plugin.WmiForwa...
"""Collate an assignment and answer Jupyter notebooks into a single notebook. This script is designed to support active reading. It takes as input a set of ipython notebook as well as some target cells which define a set of reading exercises. The script processes the collection of notebooks and builds a notebook whi...
#!/usr/bin/env python import os import subprocess import yaml def get_environments(project_folder): file_path = os.path.join( project_folder, 'config', 'environments.yml') file = open(file_path, 'r') return yaml.load(file) def get_credentials(project_folder): file_path = os.p...
from __future__ import print_function import json import requests import luigi import datetime import re from slack import * ## WIP - conversations have to be sampled by date, topic or something else class GenerateChatterbotCorpusFromSlackChannel(luigi.Task): channel_name = luigi.Parameter() date = luigi.Date...
#!/usr/bin/env python # encoding: utf-8 import csv import os from textwrap import dedent from traitlets import default, Unicode, Bool from . import NbGrader from ..api import Gradebook, MissingEntry aliases = { 'log-level': 'Application.log_level', 'course-dir': 'NbGrader.course_directory', 'db': 'NbGra...
#!/usr/bin/env python # -*- coding: utf-8 -*- # encoding=utf8 """ IRC Brana pro chat na Chatujme.cz Projekt vychazi z lidegw v46 ( http://sourceforge.net/projects/lidegw/ ) @license MIT @author LuRy <lury@lury.cz>, <lury@chatujme.cz> rfc-codes https://www.alien.net.au/irc/irc2numerics.html rfc https...
if __name__ == '__main__': from os import sys, path sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from generic_helpers import section from random import randrange as rr # Definitions of set from http://en.wikipedia.org/wiki/Aleph_number class Set(object): def __init__(self, items...
from nose.tools import assert_equal, assert_greater from numpy.testing import assert_almost_equal import numpy as np from otdet.evaluation import TopListEvaluator class TestAddResult: def setUp(self): self.sample_result = [(5.0, True), (4.0, False), (3.0, True), (2.0, False)...
import numpy as np import bqplot as bq import ipywidgets as widgets from IPython.display import display __all__ = ['hist', 'bar', 'scatter'] def hist(hist_function, title=None, **kwargs): """ Generates an interactive histogram that allows users to interact with parameters of hist_function and visualize c...
import os import bz2 import cStringIO import time from django.template import loader, Context import paramiko import gjfwriter import fileparser def write_job(**kwargs): if "cluster" in kwargs and kwargs["cluster"] in "bcgbht": template = "chem/jobs/%sjob.txt" % kwargs["cluster"] c = Context({ ...
from __future__ import absolute_import import tempfile from ndio.ramon.RAMONBase import * from ndio.ramon.RAMONGeneric import * from ndio.ramon.RAMONNeuron import * from ndio.ramon.RAMONOrganelle import * from ndio.ramon.RAMONSegment import * from ndio.ramon.RAMONSynapse import * from ndio.ramon.RAMONVolume import * ...
import os import urllib import zipfile from django.shortcuts import render, redirect from django.template import Context, RequestContext from django.template.loader import render_to_string from django.http import HttpResponse, HttpResponseRedirect from django.core.servers.basehttp import FileWrapper from django.core.u...
from django.test import TestCase from django.contrib.auth import get_user_model from jsonapi.api import API from jsonapi.resource import Resource from jsonapi.model_inspector import ModelInspector, Field from ..models import ( AAbstractOne, AAbstractManyToMany, AAbstract, AA, AOne, AManyToMany, A, B, BMany, BM...
from __future__ import absolute_import import tempfile import json as jsonlib import copy import six from ndio.ramon.RAMONBase import * from ndio.ramon.RAMONGeneric import * from ndio.ramon.RAMONNeuron import * from ndio.ramon.RAMONOrganelle import * from ndio.ramon.RAMONSegment import * from ndio.ramon.RAMONSynapse i...
""" Test if 1-1 tubes support is properly disabled. This test should be removed as soon as we re-enable 1-1 tubes support. """ from saluttest import exec_test from avahitest import AvahiAnnouncer, AvahiListener from avahitest import get_host_name import avahi import dbus import os import errno import string from xmpps...
# Copyright 2016 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
import __builtin__ from pytest import fail from mock import MagicMock, patch, call from pygit2 import (Repository as _Repository, GIT_CHECKOUT_SAFE_CREATE, GIT_CHECKOUT_FORCE, GIT_BRANCH_REMOTE) from .base import RepositoryBaseTest from gitfs.utils import Repository class TestRepository(Repositor...
from clay.multimethod import multimethod from clay.error import raise_error __all__ = ["Type", "bool_type", "int_type", "char_type", "void_type", "TupleType", "ArrayType", "ArrayValueType", "RefType", "RecordType", "StructType", "is_primitive_type", "is_bool_type", "is_int_type", "is_c...
import logging _logger = logging.getLogger( "CLF_%s" % __name__ ) SC_OK = 000 + 0 SC_WALK_THREW_EXCEPTION = 400 + 1 SC_CRAWL_THREW_EXCEPTION = SC_WALK_THREW_EXCEPTION SC_SPIDER_NOT_FOUND = 400 + 2 SC_SPIDER_...
"""This module declares :py:class:`Spider` which is an abstract base class from which all spider classes are derived. In addition, :py:class:`CrawlResponse` is declared.""" import hashlib import inspect import logging import sys import jsonschema _logger = logging.getLogger("CLF_%s" % __name__) """Used to simplify ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2017 Oleg Dolgikh <aristarkh@aristarkh.net> # """The script for the initial setup of a freshly installed Linux.""" import apt import os import os.path import pwd import shutil import subprocess from getpass import getpass def is_root(): """Require run...
# -*- coding: utf-8 -*- # # tinyrpc documentation build configuration file, created by # sphinx-quickstart on Wed Jan 23 19:15:13 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
# -*- coding: utf-8 -*- # # Graf documentation build configuration file, created by # sphinx-quickstart on Mon Nov 11 13:01:44 2013. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
# -*- coding: utf-8 -*- # # Matador documentation build configuration file, created by # sphinx-quickstart on Mon Nov 30 14:18:09 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
# -*- coding: utf-8 -*- # # Django Facebook documentation build configuration file, created by # sphinx-quickstart on Mon Apr 11 12:43:17 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
# -*- coding: utf-8 -*- # # isochrones documentation build configuration file, created by # sphinx-quickstart on Tue Mar 10 22:12:18 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
# -*- coding: utf-8 -*- # # django-assets documentation build configuration file, created by # sphinx-quickstart on Fri May 08 06:02:25 2009. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated...
# -*- coding: utf-8 -*- # # Django documentation build configuration file, created by # sphinx-quickstart on Thu Mar 27 09:06:53 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...