text
stringlengths
17
737k
import os import config from flask import Flask class SkyLines(Flask): def __init__(self): # Create Flask instance super(SkyLines, self).__init__(__name__, static_folder='public') # Load default settings and from environment variable self.config.from_pyfile(config.DEFAULT_CONF_PA...
"Smarkets TCP-based session management" # Copyright (C) 2011 Smarkets Limited <support@smarkets.com> # # This module is released under the MIT License: # http://www.opensource.org/licenses/mit-license.php import logging import Queue import socket import types import ssl from google.protobuf import text_format import ...
# NOTE: One issue I can see happening is that checking timers on each call of # manage_timer_modules() is limited by how often the bot or this module # call the function itself. So even though a timer might be set to run # every 30 seconds, the function might not be called until a couple # minu...
import sys from .middleware import Middleware from .base_manager import BaseManager from .pubsub_manager import PubSubManager from .kombu_manager import KombuManager from .redis_manager import RedisManager from .zmq_manager import ZmqManager from .server import Server from .namespace import Namespace if sys.version_in...
# -*- coding: utf-8 -*- import unittest import os from collections import namedtuple import datetime from test_kudago_import.management.mapper import xml class MapperXmlTest(xml.MapperXml): def add_models(self, data, Model): Model = namedtuple('Model', data.keys()) return Model(**data) def a...
""" Tests for UMAP to ensure things are working as expected. """ from nose.tools import assert_less from nose.tools import assert_greater_equal import os.path import numpy as np from scipy.spatial import distance from scipy import sparse from scipy import stats from sklearn.utils.estimator_checks import check_estimator...
from umap.umap_ import ( INT32_MAX, INT32_MIN, make_forest, rptree_leaf_array, nearest_neighbors, smooth_knn_dist, fuzzy_simplicial_set, UMAP, ) from umap.utils import deheap_sort from umap.nndescent import ( make_initialisations, make_initialized_nnd_search, initialise_searc...
import argparse import sys from closeio_api import Client as CloseIO_API parser = argparse.ArgumentParser(description="Change all the opportunities for a given leads' search query to a given status.") parser.add_argument('--query', type=str, required=True, help='Search query.') parser.add_argument('--api_key', type=...
# coding: utf8 from sqlalchemy import and_, null, or_, false, true from sqlalchemy.orm import joinedload, joinedload_all, aliased, contains_eager from clld.web.datatables.base import DataTable, Col, LinkCol, IdCol from clld.web.datatables.parameter import Parameters from clld.web.datatables.value import Values from cl...
#!/usr/bin/env python # coding: utf-8 # Author: Vladimir M. Zaytsev <zaytsev@usc.edu> import os import gc import sys import json import random import logging import argparse from sear.searcher import Searcher from sear.storage import LdbStorage from sear.index import InvertedIndex from sear.lexicon import DictLexico...
#!/usr/bin/env python # # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
# -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals __all__ = ["GPLikelihood"] import numpy as np from emcee.autocorr import integrated_time import george from george.kernels import ExpSquaredKernel from .pipeline import Pipeline class GPLikelihood(Pipeline): query_para...
#!/usr/bin/python # Urwid common display code # Copyright (C) 2004-2007 Ian Ward # # 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 ...
import os import shutil import tempfile import time import unittest import subprocess import sublime_info from sublime_harness import sublime_harness # Set up constants __dir__ = os.path.dirname(os.path.abspath(__file__)) # Outline tests """ sublime-harness running arbitrary Python # write to disk exec...
"""Simple access to Twitter's streaming API""" VERSION = (1, 2) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Rune Halvorsen" __contact__ = "runefh@gmail.com" __homepage__ = "http://bitbucket.org/runeh/tweetstream/" __docformat__ = "restructuredtext" # -eof meta- """ .. data::...
""" Simple Twitter streaming API access """ __version__ = "0.2-dev" __author__ = "Rune Halvorsen <runefh@gmail.com>" __homepage__ = "http://bitbucket.org/runeh/tweetstream/" __docformat__ = "restructuredtext" import urllib import urllib2 import time import anyjson """ .. data:: URLS Mapping between twitter en...
import numpy import pytest import cupy from cupy import testing from cupy_backends.cuda.api import runtime from cupyx import jit class TestThrust: def test_count_shared_memory(self): @jit.rawkernel() def count(x, y): tid = jit.threadIdx.x smem = jit.shared_memory(numpy.in...
# 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 use ...
import os import pytest from vivarium.framework.configuration import build_simulation_configuration from vivarium.framework.components.manager import (ComponentManager, ComponentConfigError, _setup_components, _apply_component_default_configuration) from .mocks impo...
#!/usr/bin/env python3 import os import unittest import logging import shutil import tempfile import ciftify.config from ciftify.utils import run import pytest from pytest import raises from unittest.mock import patch import pandas as pd import numpy as np def get_test_data_path(): return os.path.join(os.path.dirn...
# Copyright 2012 Anton Beloglazov # # 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 writ...
import signal import pytest import paramiko from paramiko_expect import SSHClientInteraction prompt=".*:~#.*" @pytest.fixture(scope="module") def interact(request): # Create a new SSH client object client = paramiko.SSHClient() # Set SSH key parameters to auto accept unknown hosts client.set_missing...
# -*- coding: utf-8 -*- # Copyright (c) 2019 Uber Technologies, 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 ...
#!/usr/bin/env python import logging import time import base import expedition import rebuilding from kcaa import screens from kcaa import kcsapi logger = logging.getLogger('kcaa.manipulators.repair') class RepairShips(base.Manipulator): # TODO: Move this to the preferences. clear_items_before_repair = T...
# -*- coding: utf-8 -*- """ :copyright: Copyright 2013-2017 by the SaltStack Team, see AUTHORS for more details. :license: Apache 2.0, see LICENSE for more details. tests.support.helpers ~~~~~~~~~~~~~~~~~~~~~ Test support helpers """ # pylint: disable=repr-flag-used-in-string,wrong-import-order ...
import utils.lookups as lookups import discord import inspect class InvalidArg: def __init__(self, expected: str, example: str=None): self.expected = expected self.message = f'Invalid argument type. Expected "{self.expected}".' if example: self.message += f'\nExample: "{exampl...
import logging from flask import jsonify, request, render_template import flask_login import datetime from operator import itemgetter from mediacloud.tags import MediaTag, TAG_ACTION_ADD, TAG_ACTION_REMOVE from werkzeug import secure_filename import csv as pycsv import server.util.csv as csv import os from server.views...
import logging from multiprocessing import Pool from operator import itemgetter import flask_login import os from flask import jsonify, request from mediacloud.tags import MediaTag, TAG_ACTION_ADD import server.util.csv as csv from server import app, mc, db from server.auth import user_mediacloud_key, user_admin_media...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import sys import mmap import logging import numpy from numpy import random from theanolm.iterators.batchiterator import BatchIterator def find_sentence_starts(data): """Finds the positions inside a memory-mapped file, where the sentences (lines) start. Text...
# coding=utf-8 """ test doing things with keys/signatures/etc """ import pytest import copy import glob import os import time from contextlib import contextmanager from datetime import datetime, timedelta from warnings import catch_warnings from pgpy import PGPKey from pgpy import PGPMessage from pgpy import PGPSign...
import hashlib import numpy as np from os.path import join import pickle # Logic to categorize face chips into known or unknown people def match_to_faces( vectorized_faces, cropped, box_list, people, frame_number, filename, file_content_hash, tolerance)...
# No shebang line, this module is meant to be imported # # Copyright 2013 Oliver Palmer # # 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 # # U...
"""Test the DotSeparatedNestedMapping base class """ from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import import unittest from collections import OrderedDict from pyexperiment.utils.DotSeparatedNestedMapping \ import ...
import json import math import random import re from datetime import date, datetime, timedelta from uuid import uuid4 from pockets import cached_property, classproperty, groupify, listify, is_listy, readable_join from pockets.autolog import log from pytz import UTC from residue import CoerceUTF8 as UnicodeText, UTCDat...
from django.shortcuts import render, render_to_response, redirect from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.template import RequestContext from django.http import HttpResponse from django....
#!/usr/bin/env python # -*- coding: utf-8 -*- import pymongo as m import unittest as t class test_connection(t.TestCase): def setUp(self): '''We should be able to create a connection''' self.conn = m.MongoClient('localhost',27017,connectTimeoutMS=2000,socketTimeoutMS=2000) def test_create(s...
from __future__ import print_function, unicode_literals import unittest from praw.decorators import _embed_text, restrict_access class DecoratorTest(unittest.TestCase): def test_require_access_failure(self): self.assertRaises(TypeError, restrict_access, scope=None, oauth_only=Tr...
# -*- coding: utf-8 -*- import warnings # pylint: disable=wrong-import-position warnings.simplefilter(action="ignore", category=DeprecationWarning) from collections import Counter, Iterable import os import pickle from itertools import combinations from io import StringIO, BytesIO as stringio import numpy as np imp...
# -*- coding: utf-8 -*- ''' vdirsyncer.cli.utils ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2014 Markus Unterwaditzer & contributors :license: MIT, see LICENSE for more details. ''' import errno import hashlib import json import os import string import sys import threading from itertools import chain from ...
""" Tests for the .functional module. """ from taipan.testing import TestCase import taipan.functional as __unit__ class EnsureCallable(TestCase): def test_none(self): with self.assertRaises(TypeError): __unit__.ensure_callable(None) def test_some_object(self): with self.assertR...
# 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 distributed in the hope that it w...
def get_menu_titles(page) -> list: page.wait_for_load_state() menu_list = page.query_selector_all("//*[@class='toctree-wrapper compound']/ul/li/a") return [title.as_element().inner_text() for title in menu_list] flag = True def test_check_titles(page): global flag if flag: page.goto("in...
# This file is part of python-markups test suite # License: BSD # Copyright: (C) Dmitry Shachnev, 2012-2015 import markups import unittest class APITest(unittest.TestCase): def test_api(self): all_markups = markups.get_all_markups() self.assertIn(markups.MarkdownMarkup, all_markups) self.assertIn(markups.ReStr...
import pytest import tox._quickstart @pytest.fixture() def cleandir(tmpdir): tmpdir.chdir() @pytest.mark.usefixtures("cleandir") class TestToxQuickstartMain(object): def mock_term_input_return_values(self, return_values): for return_val in return_values: yield return_val ...
""" Tests for the NURBS-Python package Released under The MIT License. See LICENSE file for details. Copyright (c) 2018 Onur Rauf Bingol Tests file I/O operations. Requires "pytest" to run. """ import os from geomdl import BSpline, NURBS from geomdl import exchange FILE_NAME = 'testing' SAMPLE_SIZE =...
import mock import os import pytest from dallinger import db class TestRecruiters(object): @pytest.fixture def recruiter(self): from dallinger.recruiters import Recruiter return Recruiter() def test_open_recruitment(self, recruiter): with pytest.raises(NotImplementedError): ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from six.moves.urllib.request import urlopen from six.moves.urllib.error import HTTPError from functools import wraps from gzip import GzipFile from io import BytesIO import zlib import pickle import json import boto import boto3 from bot...
import asyncio import tempfile from pathlib import PurePath from unittest import mock import pytest from aioworkers.core.config import MergeDict from aioworkers.core.context import Context from aioworkers.storage.base import FieldStorageMixin from aioworkers.storage.filesystem import \ HashFileSystemStorage, File...
""" .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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....
""" Module for collecting the utility functions dealing with mostly calendar tasks, processing dates and creating time-based code. Module Functions ++++++++++++++++ ========================= ======================== .. .. ========================= ======================== :func:`get_request...
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Interpreter version: python 2.7 # # Imports ===================================================================== import pytest from aleph import aleph # Tests ======================================================================= def test_variables(): assert "...
#!/usr/bin/python # -*- coding: utf-8 -*- # system import os import sys dir = os.path.split(os.path.split(os.path.split(os.path.realpath(__file__))[0])[0])[0] sys.path.append(os.path.join(dir, 'scripts')) # testing import mock import unittest from mock import patch # program import download_search.query as Query im...
# Django settings for texting_wall project. import os from os import environ DEBUG = True TEMPLATE_DEBUG = DEBUG TEMPLATE_CONTEXT_PROCESSORS = ("django.contrib.auth.context_processors.auth", "django.core.context_processors.debug", "django.core.context_processors.i18n", "django.core.context_processors.med...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2007-2014 Parisson SARL # Copyright (c) 2006-2014 Guillaume Pellerin <pellerin@parisson.com> # Copyright (c) 2010-2014 Paul Brossier <piem@piem.org> # Copyright (c) 2013-2014 Thomas Fillon <thomas@parisson.com> # This file is part of TimeSide. # This program...
from cms.apphook_pool import apphook_pool from cms.appresolver import applications_page_check from cms.utils import get_template_from_request, get_language_from_request from cms.utils.i18n import get_fallback_languages from cms.utils.page_resolver import get_page_from_request from django.conf import settings, settings ...
import pandas as pd import re import sys from collections import namedtuple from random import Random from .generators import BaseGenerator, SeedGenerator from .csv_formatter import CSVFormatter from .csv_formatter_v1 import CSVFormatterV1 __all__ = ["CustomGenerator"] def make_item_class(cg, clsname): """ ...
#!/usr/bin/env python # # cvs2svn: ... # # $LastChangedRevision$ import rcsparse import os import sys import sha import re import time import fileinput import string import getopt import stat import md5 import shutil import anydbm import marshal # Make sure this Python is recent enough. import sys if sys.hexversion ...
import numpy as np import os import sys import time import StringIO, PIL.Image from unrealcv import client import json import cv2 class Dataset(object): def __init__(self,folder,nberOfImages,cameraId): self.folder=folder self.litImage='litImage' self.normalImage='normalImage' self.d...
__version__ = '0.13.0a6'
from axolotl.state.axolotlstore import AxolotlStore from .liteidentitykeystore import LiteIdentityKeyStore from .liteprekeystore import LitePreKeyStore from .litesessionstore import LiteSessionStore from .litesignedprekeystore import LiteSignedPreKeyStore import sqlite3 class LiteAxolotlStore(AxolotlStore): def __i...
# -------------------------------------------------------- # Tensorflow Faster R-CNN # Licensed under The MIT License [see LICENSE for details] # Written by Xinlei Chen # -------------------------------------------------------- from __future__ import absolute_import from __future__ import division from __future__ impor...
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015-2019 OpenCraft <contact@opencraft.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 Fre...
#!/usr/bin/env python """Top-level module for iPlant iRODS operations. See Also -------- CALLED_BY : {iplant.re} Notes ----- Docstring format is adapted from [1]_. `See Also` references file and objects by category: `CALLS`, `CALLED_BY`, `RELATED`. References ---------- .. [1] https://github.com/numpy/numpy/blob/mas...
"""Writes mechanism header and output testing files""" # Python 2 compatibility from __future__ import division from __future__ import print_function # Standard libraries import sys import itertools # Local imports import chem_utilities as chem import utils def __write_kernels(file, have_rev_rxns, have_pdep_rxns):...
import codecs import copy import hashlib import os import pickle import re import logging from lxml import etree from regparser import api_writer, content from regparser.federalregister import fetch_notice_json, fetch_notices from regparser.history.notices import ( applicable as applicable_notices, group_by_eff_d...
import re, logging, json, urllib, datetime import xml.etree.ElementTree, requests import mediacloud class MediaCloud(object): ''' Simple client library for the MediaCloud API v2 ''' V2_API_URL = "https://api.mediacloud.org/api/v2/" SORT_PUBLISH_DATE_ASC = "publish_date_asc" SORT_PUBLISH_DATE_...
""" Filename: plot_zonal_ensemble.py Author: Damien Irving, irving.damien@gmail.com Description: Plot zonal ensemble """ # Import general Python modules import sys, os, pdb import argparse from itertools import groupby from more_itertools import unique_everseen import numpy import iris from iris.experi...
import os import threading import Tkinter as tk import ttk import pafy from pydub import AudioSegment from settings import YtSettings N = tk.N S = tk.S E = tk.E W = tk.W END = tk.END new = YtSettings() class Application(tk.Frame): def __init__(self, parent): tk.Frame.__init__(self, parent) self....
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 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 Lice...
import secrets from discord.ext import commands from pypubg import core class Stats: def __init__(self, statbot): self.statbot = statbot self.api = core.PUBGAPI(secrets.PUBG_STATS_TOKEN) @commands.command(pass_context=False, help="!pubstats <name> <mode> <region>\n\n" ...
from datetime import datetime, time, date, timedelta import json import pymongo from redis import StrictRedis from bson.objectid import ObjectId from bson.timestamp import Timestamp from twisted.internet.defer import inlineCallbacks from twisted.trial.unittest import TestCase from vumi.message import Message, Transp...
import mock from celery.app.task import Context from celery.backends.base import Backend from django.test import testcases class ExecutorTest(testcases.TestCase): def setUp(self): app = mock.Mock(**{ 'conf.result_serializer': 'json', 'conf.accept_content': None }) s...
# # Copyright (c) 2006-2008 rPath, Inc. All Rights Reserved. # """ Classes for extracting and examining authentification methods passed from external servers """ import base64 import fcntl import IN import pwd import sys import os from SimpleXMLRPCServer import (SimpleXMLRPCServer, SimpleXMLRPCRequestHandler, ...
#!/usr/bin/env python # Copyright 2008 Nokia Siemens Networks Oyj # # 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...
#!/usr/bin/env python3 from lxml import etree from collections import OrderedDict from wand.drawing import Drawing from wand.image import Image from wand.font import Font from wand.color import Color import cgi import cgitb import sys import string import random import datetime import codecs import os import pickle...
#!/usr/bin/python # coding: utf-8 from __future__ import print_function, division, unicode_literals, absolute_import import json import os, sys import numpy as np if __name__=="__main__": if(len(sys.argv) < 4) : print("usage: python", sys.argv[0], "TARGET_DIR", "T_MAX", "T_SPAN") exit(1) target...
'''create files contains estimated generalization errors for model INPUT FILE WORKING/transactions-subset2.pickle OUTPUT FILES WORKING/ege_week/YYYY-MM-DD/MODEL-TD/HP-FOLD.pickle dict all_results WORKING/ege_month/YYYY-MM-DD/MODEL-TD/HP-FOLD.pickle dict all_results ''' import collections import cPickle as pickl...
from BaseHTTPServer import BaseHTTPRequestHandler from inspect import getargspec import re import cgi import sys from sqlite3 import OperationalError import traceback from Session import Session, timestamp from Box import ErrorBox from code import showCode, highlightCode from ResponseWriter import ResponseWriter from ...
from conans import ConanFile from conans import tools import os class OpenSSLConan(ConanFile): name = "OpenSSL" version = "1.0.2l" settings = "os", "compiler", "arch", "build_type" url = "http://github.com/lasote/conan-openssl" license = "The current OpenSSL licence is an 'Apache style' license: h...
#!/usr/bin/env python # vim: set sw=4 ts=4 softtabstop=4 expandtab: """ Perform verification of a klee-runner result yaml file and associated working directory. """ import argparse from enum import Enum import logging import os # pylint: disable=wrong-import-position from load_klee_analysis import add_kleeanalysis_to_...
#!/usr/bin/python3 # Eloipool - Python Bitcoin pool server # Copyright (C) 2011-2013 Luke Dashjr <luke-jr+eloipool@utopios.org> # Portions written by Peter Leurs <kinlo@triplemining.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licen...
#!/usr/bin/env python # Copyright 2014 Hewlett-Packard Development Company, L.P. # Copyright 2014 Samsung Electronics # 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 #...
import sublime import sublime_plugin import os import re st_ver = int(sublime.version()) HandlerBase = sublime_plugin.ListInputHandler if st_ver >= 3154 else object def _syntax_name(syntax_res): syntax_file = os.path.basename(os.path.split(syntax_res)[1]) name, ext = os.path.splitext(syntax_file) i...
#!/usr/bin/env python # This file is part of the pyMOR project (http://www.pymor.org). # Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) '''Thermalblock with GUI demo Usage: thermalblock_gui.py [-h] [--estimator-norm=NORM] [--...
# coding: utf-8 from datetime import datetime import boto from boto.ec2 import EC2Connection, get_region from boto.cloudformation import CloudFormationConnection from boto.sqs import connection from boto import sqs from boto.ec2 import elb from boto import cloudformation from boto.ec2.elb import ELBConnection import t...
def comp(): raise NotImplementedError('Interactivity is annoying.') def inc(): print('Just run offlineimap.') def show(thing, showproc = None, showmimeproc = None, nocheckmime: bool = False, noheader: bool = False, draft: bool = False): SHOW_DOC = \ ''' :param thin...
# -*- coding: utf-8 -*- """microcms.admin module, admin site configuration and options. THIS SOFTWARE IS UNDER BSD LICENSE. Copyright (c) 2010 Daniele Tricoli <eriol@mornie.org> Read LICENSE for more informations. """ from django import forms from django.conf import settings from django.contrib import admin from djan...
from copy import deepcopy import curves as c from sys import stderr from micc.cgraph import cdfs def shift(path): ''' init ''' temp = path.index(min(path)) return path[temp:] + path[:temp] def invert(path): ''' init ''' return shift(path[::-1]) def contains(small, big): p...
# coding=utf-8 # Distributed under the MIT software license, see the accompanying # file LICENSE or http://www.opensource.org/licenses/mit-license.php. import os from enum import Enum from typing import Callable, Set, List from ipaddress import IPv4Address import simplejson as json from pyqryptonight.pyqryptonight imp...
""" Author: Justin Cappos, Armon Dadgar Start Date: 27 June 2008 V.2 Start Date: January 14th 2009 Description: This is a collection of functions, etc. that need to be emulated in order to provide the programmer with a reasonable environment. This is used by repy.py to provide a highly restric...
# -*- coding: utf-8 -*- from dicttoxml import dicttoxml from lxml import objectify from totvserprm.auth import create_service_sql from totvserprm.utils import normalize_xml class ConsultSQL(object): def __init__(self, server, username, password): self.service = create_service_sql(server, username, passwor...
#!/usr/bin/env python """ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://pythonhosted.org/setuptools/easy_install.html """ impo...
import calendar import os import time from datetime import datetime import numpy as np import grd __author__ = 'Trond Kristiansen' __email__ = 'trond.kristiansen@niva.no' __created__ = datetime(2009, 1, 30) __modified__ = datetime(2018, 4, 5) __version__ = "1.5" __status__ = "Development" class Model2romsConfig(ob...
# SPDX-License-Identifier: LGPL-2.1+ from __future__ import annotations import argparse import ast import base64 import collections import configparser import contextlib import crypt import ctypes import ctypes.util import dataclasses import datetime import errno import fcntl import functools import getpass import gl...
# -*- coding: utf-8 -*- # © 2016 Comunitea Servicios Tecnologicos (<http://www.comunitea.com>) # Kiko Sanchez (<kiko@comunitea.com>) # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import fields, models, tools, api, _ from odoo.addons import decimal_precision as dp from odoo.exceptions impo...
#!/usr/bin/python3 import os, os.path, textwrap, argparse, sys, shlex, subprocess, tempfile, re from distutils.spawn import find_executable configure_args = str.join(' ', [shlex.quote(x) for x in sys.argv[1:]]) def get_flags(): with open('/proc/cpuinfo') as f: for line in f: if line.strip(): ...
# SPDX-License-Identifier: LGPL-2.1+ from __future__ import annotations import argparse import ast import base64 import collections import configparser import contextlib import crypt import ctypes import ctypes.util import dataclasses import datetime import errno import fcntl import functools import getpass import gl...
#!/usr/bin/env python """ test.py Used to run tests on the test files found in /samples/ From root, execute using `python test/test.py` First, ensure you have fully installed the pypairix package: `pip install pypairix --user` OR `sudo python setup.py install` If you're having trouble running this file, try installing...
# Copyright (C) 2007-2009 Samuel Abels. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2, as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANT...
import xml.etree.ElementTree as ET import sys import os import re # Simple class representing a pin on a component class Pin(object): def __init__(self, ref, number, type=None, net=None): self.number = number self.type = type self.net = net self.ref = ref def __str__(self):...