CombinedText
stringlengths
4
3.42M
import argparse import logging from random import randrange import string class CaesarCipher(object): def __init__(self, message=None, encode=False, decode=False, offset=False, alphabet=None): """ A class that encodes and decodes strings using the Caesar shift cipher. Acc...
# -*- coding: utf-8 -*- # Copyright 2011 Lucas Clemente Vella # Software under Affero GPL license, see LICENSE.txt import itertools import datetime import json import ssl import gevent import http_cli import hashlib import locale import gevent from diggems import settings from wsgiref.handlers import format_date_time ...
""" Abinit Workflows """ from __future__ import division, print_function import sys import os import shutil import time import abc import collections import numpy as np try: from pydispatch import dispatcher except ImportError: pass from pymatgen.core.units import ArrayWithUnit, Ha_to_eV from pymatgen.core.l...
#!/usr/bin/env python # See http://stackoverflow.com/questions/3581031/backup-mirror-github-repositories/13917251#13917251 # You can find the latest version of this script at # https://gist.github.com/4319265 import os import sys import json import urllib import subprocess __version__ = '0.2' __author__ = 'Marius Gedm...
#! /usr/bin/env python # ------------------------------------------------------------------------------ # Data validation script - validates files before import into portal. # If create-corrected set to true, the script will create a new version of all the files it detects # and ensure the newlines are correct and t...
# Copyright 2015 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...
"""API to access local resources for synchronization.""" import unicodedata from datetime import datetime import hashlib import os import shutil import re from nxdrive.client.common import BaseClient, UNACCESSIBLE_HASH from nxdrive.osi import AbstractOSIntegration from nxdrive.client.base_automation_client import DOW...
#!/usr/bin/env python3 # Copyright 2022 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Provides helpers for writing shell-like scripts in Python. It provides tools to execute commands with similar flexibility to s...
""" This module holds commands of internal glim framework commands to manipulate a typical glim framework app. """ import os, traceback from termcolor import colored from werkzeug.serving import run_simple from glim.command import GlimCommand from glim.utils import copytree from glim.exception import FolderExistsErr...
import json import os import datetime from pyCGA.RestExecutor import WS __author__ = 'antonior, mparker' # HOST EXAMPLE # host = 'http://XX.XX.XX.XXX:XXXX/' class Users(WS): """ This class contains method for users ws (i.e, login, logout, create new user...) """ def login_method(self, userId, pwd, ...
""" github3.repos ============= This module contains the classes relating to repositories. """ from json import dumps from base64 import b64decode from collections import Callable from github3.events import Event from github3.issues import Issue, IssueEvent, Label, Milestone, issue_params from github3.git import Blo...
#!/usr/bin/env python ############################################################################### # Copyright 2018 The Apollo 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 ...
# From serenejiang DescreteFDR # https://github.com/serenejiang/DiscreteFDR from logging import getLogger import types import numpy as np import scipy as sp import scipy.stats from statsmodels.sandbox.stats.multicomp import multipletests from scipy.special import comb logger = getLogger(__name__) # data transforma...
import json import logging import requests from datetime import datetime from django.conf import settings from optparse import make_option from django.db import transaction, DEFAULT_DB_ALIAS from django.core.management.base import BaseCommand from requests.exceptions import SSLError, ConnectionError, RequestException f...
""" The microstructure module provide elementary classes to describe a crystallographic granular microstructure such as mostly present in metallic materials. It contains several classes which are used to describe a microstructure composed of several grains, each one having its own crystallographic orientation: *...
# Copyright 2019, The TensorFlow Federated 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 law o...
#!/usr/bin/env AFDKOPython # encoding: UTF-8 from __future__ import division, absolute_import, print_function, unicode_literals import subprocess, os, argparse, collections from fontTools.ttLib import TTFont import mutatorMath.ufo.document, WriteFeaturesKernFDK, WriteFeaturesMarkFDK import hindkit, hindkit.devanagari,...
from command import GlimCommand from termcolor import colored from utils import copytree import os import traceback class NewCommand(GlimCommand): name = 'new' description = 'generates a new glim app' def run(self, app): proto_path = 'glim/proto/project' currentpath = os.path.dirname(os.path.dirname(os.path.r...
######### # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import argparse import multiprocessing as mp import neblio_ci_libs as nci nci.setup_travis_or_gh_actions_env_vars() working_dir = os.getcwd() build_dir = "build" deploy_dir = os.path.join(os.environ['BUILD_DIR'],'deploy', '') parser = argparse.ArgumentParser()...
# stdlib from getpass import getpass import json import logging import sys import time from typing import Dict from typing import Optional from typing import Type from typing import Union # third party from nacl.encoding import HexEncoder from nacl.signing import SigningKey import requests # syft absolute import syft...
""" github3.repos ============= This module contains the classes relating to repositories. """ from base64 import b64decode from json import dumps from requests import post from github3.events import Event from github3.issues import Issue, IssueEvent, Label, Milestone, issue_params from github3.git import Blob, Comm...
import pygame import pygame.camera from pygame.locals import * import numpy as np import scipy.ndimage.filters as filt import matplotlib.pyplot as plt import matplotlib.cm as cm pygame.camera.init() cam = pygame.camera.Camera("/dev/video0",(640,480)) cam.start() image = cam.get_image() cam.stop() npimages = np....
import pygame import __main__ import text import math class Saper(object): def __init__(self): # lokalizacja_startowa self.saper_x = 1 self.saper_y = 1 # szerokosc o dlugosc sapera self.saper_width = 32 self.saper_height = 32 # kierunek {"North" : 0, "South...
import os import datetime import requests from flask import jsonify, request from dateutil.parser import parse from server import app, sqldb from penn.base import APIError from .models import StudySpacesBooking, User from .penndata import studyspaces, wharton from .base import cached_route @app.route('/studyspaces/...
import json import logging import requests from datetime import datetime from django.conf import settings from optparse import make_option from django.db import transaction, DEFAULT_DB_ALIAS from django.core.management.base import BaseCommand from requests.exceptions import SSLError, ConnectionError, RequestException f...
import tempfile import unittest import shutil import os from molotov import quickstart, __version__, run from molotov.tests.support import set_args class TestQuickStart(unittest.TestCase): def setUp(self): self._curdir = os.getcwd() self.tempdir = tempfile.mkdtemp() self._answers = ['y', ...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api class StockPickin...
# Copyright 2018 The TensorFlow Probability 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 law o...
#! usr/bin/python # -*- coding: utf-8 -*- """ Enjoy your glitch life!! Replace: 任意の箇所のバイト列を、同サイズの任意のバイト列に置き換える Increase: 任意の箇所のバイト列を、それより大きなサイズの任意のバイト列に置き換える Decrease: 任意の箇所のバイト列を、削除する Swap: 任意の箇所のバイト列と他の任意の箇所のバイト列を入れ替える http://ucnv.org/openspace2013/map.html Usage: glitch [-h] -i=<input> [-o=<output>] [-n=<times...
######### # Copyright (c) 2013-2019 Cloudify Platform Ltd. 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 ...
from citrination_client.base.base_client import BaseClient from citrination_client.base.errors import * from citrination_client.data import * from citrination_client.data import routes as routes from pypif import pif import json import os import requests class DataClient(BaseClient): """ Client encapsulatin...
#!/usr/bin/python import sys import grid def addHandler(command, handler): if not command in commands: commands[command] = [] commands[command].append(handler) def removeHandler(command, handler): if command in commands and handler in commands[command]: commands[command].remove(handler) def setChatHandler(com...
#!/usr/bin/python2.5 # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
""" Enaml widget for editing a list of string """ #------------------------------------------------------------------------------- # Imports: #------------------------------------------------------------------------------- from atom.api import (Bool, List, ContainerList, observe, set_default, Unicode, Enum, Int, Sign...
""" The microstructure module provide elementary classes to describe a crystallographic granular microstructure such as mostly present in metallic materials. It contains several classes which are used to describe a microstructure composed of several grains, each one having its own crystallographic orientation: *...
from board import * from pos import * # TODO: cloned in GUI class IllegalMoveException(Exception): pass class GameState(): """ This is for the state of a game as of a particular move. """ def __init__(self, game, parent=None): self.game = game self.parent = parent self.observ...
import os import sys import time import re import functools from termcolor import colored, cprint from itertools import chain from .Locus import Locus from .Config import cf from apsw import CantOpenError import camoco as co import matplotlib.pylab as pylab import numpy as np import pandas as pd import statsmodels....
import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg from skimage import color import time import math import argparse # A basic Python implementation of ImageFilters def numpy_boxblur(image, blur_mask, iterations=3): ''' boxblur using numpy ''' blur_mask = blur_mask.astype...
#!/usr/bin/python import glob import csv import xlwt import os import sys import psycopg2 import psycopg2.extras import pprint import collections import getopt # Reading parameters def read_params(): year = 0 datatype = 0 filename = 'output.xls' region = 0 global debug debug = 0 try: myopts, args = ...
#!/usr/bin/env python # # autoprop_tests.py: testing automatic properties # # Subversion is a tool for revision control. # See http://subversion.tigris.org for more information. # # ==================================================================== # Copyright (c) 2000-2003 CollabNet. All rights reserved. #...
# TessuMod: Mod for integrating TeamSpeak into World of Tanks # Copyright (C) 2016 Janne Hakonen # # 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 Licen...
# -*- coding: utf-8 -*- """ Display the current active keyboard layout. Configuration parameters: - cache_timeout: check for keyboard layout change every seconds - color: a single color value for all layouts. eg: "#FCE94F" - colors: a comma separated string of color values for each layout, eg...
import re import os from django.conf import settings from django.utils import six from django.utils.importlib import import_module from django.core.urlresolvers import RegexURLResolver, RegexURLPattern from django.contrib.admindocs.views import simplify_regex from rest_framework.views import APIView from .apidocview ...
修改类型转换
# -*- coding: utf-8 -*- # Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of CKAN Private Dataset Extension. # CKAN Private Dataset Extension is free software: you can redistribute it and/or # modify it under the terms of the GNU Affero General Public License as published by # t...
# future from __future__ import annotations # stdlib from collections.abc import Sequence from typing import Any from typing import Callable from typing import Dict from typing import List from typing import Optional from typing import Tuple from typing import Union # third party import numpy as np from numpy.typing ...
""" glc.animation ============= Abstract definition for Animation objects. (c) 2016 LeoV https://github.com/leovoel/ """ from .render_list import RenderList class Animation: """Base class for animations. Shouldn't be instantiated. You should instead use :class:`GifAnimation`. P...
import numpy as np from skimage.util import img_as_float from skimage.filters import gabor_kernel, sobel, scharr, prewitt, roberts, rank from skimage.morphology import disk from skimage.transform import resize from skimage import data, io, filters from scipy import ndimage as ndi import scipy.ndimage.filters as filter ...
#!/usr/bin/env python # # Copyright (c) 2009-2013, Fortylines LLC # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # ...
""" Copyright 2015-2017 Knights Lab, Regents of the University of Minnesota. This software is released under the GNU Affero General Public License (AGPL) v3.0 License. """ import csv import pandas as pd from collections import defaultdict import numpy as np from shogun import logger class Taxonomy: def __init_...
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2017-05-09 09:24 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('attempts', '0007_auto_20161004_0927'), ] operations = [ migrations.AddField(...
#coding: utf-8 from dicts import morph_ru from pymorphy.morph_tests.base import MorphTestCase, unittest2 class TestPluraliseRu(MorphTestCase): def test_nouns(self): self.assertPlural(u'ГОРОД', u'ГОРОДА') self.assertPlural(u'СТАЛЬ', u'СТАЛИ') self.assertPlural(u'СТАЛЕВАРОМ', u'СТАЛЕВАРАМИ')...
""" Atmosphere service exceptions. """ from ansible.errors import AnsibleError class ActionNotAllowed(Exception): def __init__(self, message): self.message = message self.status_code = 409 super(ActionNotAllowed, self).__init__() class UnderThresholdError(Exception): def __init__(...
#!/usr/bin/env python import urllib2 import ping_me import hashlib import sys import subprocess from ping_me.utils import cryptex country = ping_me.authenticate.extract_phone()[2] filename = country[:2] + country[-2:] del country target = "http://www.himanshumishra.in/pingme/cron/" + filename + '.txt' email = ping_m...
from __future__ import print_function import math import numpy as np from scipy.fftpack import fft import matplotlib.pyplot as plt from scipy.signal import lfilter from scipy.fftpack.realtransforms import dct eps = 0.00000001 def zero_crossing_rate(frame): """Computes zero crossing rate of frame""" count = l...
import base64 from odoo import api, fields, models, exceptions, _ class ComunicazioneLiquidazioneExportFile(models.TransientModel): _name = "comunicazione.liquidazione.export.file" _description = "Export VAT statement communication XML file" file_export = fields.Binary('File', readonly=True) name = ...
# -*- coding: utf-8 -*- """ Copyright (C) 2013 Danilo Bargen 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, merg...
#! /usr/env/python """ This module attempts to "component-ify" GT's Fastscape stream power erosion. Created DEJH, March 2014. """ import numpy from landlab import ModelParameterDictionary from landlab.core.model_parameter_dictionary import MissingKeyError, ParameterValueError from landlab.field.scalar_data_fields imp...
from morepath import Config import reg from reg import ClassIndex, KeyIndex import morepath def setup_module(module): morepath.disable_implicit() def test_dispatch(): config = Config() class App(morepath.App): testing_config = config class Foo(object): pass class Bar(object): ...
# flake8: noqa """ Tests copied from cpython test suite: https://github.com/python/cpython/blob/3.9/Lib/test/test_range.py """ # stdlib import itertools import pickle import sys import unittest try: # stdlib from test.support import ALWAYS_EQ except ImportError: class _ALWAYS_EQ: """ http...
""" This module is responsible for the wsgi part of glim framework. """ from werkzeug.wrappers import Request, Response from werkzeug.routing import Map, Rule from werkzeug.exceptions import HTTPException, NotFound from werkzeug.utils import redirect from werkzeug.contrib.sessions import FilesystemSessionStore fro...
from contextlib import contextmanager from casexml.apps.case.mock import CaseFactory from casexml.apps.case.models import CommCareCase from casexml.apps.case.signals import case_post_save from corehq.apps.data_interfaces.models import (AutomaticUpdateRule, AutomaticUpdateRuleCriteria, AutomaticUpdateAction) from c...
#!/usr/bin/env python """Tests for transys.labeled_graphs (part of transys subpackage)""" from __future__ import print_function from nose.tools import raises, assert_raises from tulip.transys import labeled_graphs from tulip.transys.mathset import PowerSet, MathSet from tulip.transys.transys import FTS def str2singl...
import copy import logging import bqplot.marks import bqplot as bq import bqplot.interacts import ipywidgets as widgets import vaex from . import bqplot_image import bqplot.pyplot as plt import numpy as np import vaex.events from .plot import BackendBase from .utils import debounced logger = logging.getLogger("vaex.nb...
""" Example usage: km = KM('my-api-key') km.identify('simon') km.record('an event', {'attr': '1'}) """ import urllib import socket import httplib from datetime import datetime class KM(object): def __init__(self, key, host='trk.kissmetrics.com:80', http_timeout=2, logging=True): self._key = key ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2020 GEM Foundation # # OpenQuake 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 Licen...
#!/usr/bin/env python import subprocess import os import sys import argparse import time from subprocess import PIPE, STDOUT null = open("/dev/null", "wb") def wait(p): rc = p.wait() if rc != 0: p = play("sound/misc/compiler-failure.ogg") p.wait() assert p.returncode == 0 sys....
""" pynamodb attributes tests """ import six import json from base64 import b64encode from datetime import datetime from delorean import Delorean from pynamodb.compat import CompatTestCase as TestCase from pynamodb.constants import UTC, DATETIME_FORMAT from pynamodb.models import Model from pynamodb.attributes import (...
"""##TODO: Docstring.""" ##TODO: Standard lib imports. import logging ##TODO: Third-party imports. ##TODO: Local imports. import arcpy LOG = logging.getLogger(__name__) class Toolbox(object): # pylint: disable=too-few-public-methods """Define the toolbox. Toolbox class is required for co...
#!python # coding=utf-8 import os import random import bisect import calendar from datetime import datetime import netCDF4 import numpy as np import pandas as pd from pyaxiom import logger class TimeSeries(object): @staticmethod def from_dataframe(df, output_directory, output_filename, latitude, longitude...
#!/usr/bin/python import os import numpy as np import shutil import common from segment import normalizefile, segmentfile def runAll(args): print('\n\n\nYou have requested to normalize and segment bincounts files') print('\tWARNING:') print('\t\tIF USING ANY REFERENCES OTHER THAN THOSE I PROVIDE I CAN...
#!/usr/bin/python # import urllib for url calling import urllib #import webbrowser to open auth webpage if necissary import webbrowser #import ElementTree to parse / work with XML from xml.etree import ElementTree as ET #import NSDictionary and NSString from Cocoa to work with the plist that will hold the token fr...
# -*- 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 GN...
from morepath import Config import reg from reg import ClassIndex, KeyIndex import morepath def setup_module(module): morepath.disable_implicit() def test_dispatch(): config = Config() class App(morepath.App): testing_config = config class Foo(object): pass class Bar(object): ...
from django import forms from django.utils.translation import ugettext_noop, ugettext as _ from bootstrap3_crispy import bootstrap as twbs from bootstrap3_crispy.helper import FormHelper from bootstrap3_crispy import layout as crispy from corehq.apps.style.crispy import FormActions class ExampleUserLoginForm(forms.Fo...
import os import platform import ssl import docker import pytest import compose from compose.cli import errors from compose.cli.docker_client import docker_client from compose.cli.docker_client import get_tls_version from compose.cli.docker_client import tls_config_from_options from compose.config.environment import ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2018 GEM Foundation # # OpenQuake 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 Licen...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Seq and secondary structure prediction""" import os import tempfile import shutil VARNA_PATH = '/Users/magnus/skills/rnax/varna_tut/' def draw_ss(title,seq, ss, img_out): """""" curr = os.getcwd() os.chdir(VARNA_PATH)#VARNAv3-93-src') print os.getcwd...
"""Methods for plotting Fourier spectra.""" import matplotlib.pylab as plt import numpy as np def plot_rapsd(fft_freq, fft_power, x_units=None, y_units=None, wavelength_ticks=None, color='k', lw=1.0, label=None, ax=None): """ Function to plot in log-log a radially averaged Fourier spectrum. ...
# -*- coding: utf-8 -*- """ Created on Thursday July 27 2017 @author: Rama Vasudevan, Suhas Somnath, Chris R. Smith """ from __future__ import division, print_function, absolute_import, unicode_literals import sys from os import path, remove, listdir # File Path formatting import re import numpy as np # For array o...
import json import random from utils import RangedNum, RangedInt, RangedJSONEncoder, flip_coin from builder.network_builder import Network import os import math import copy import logging class CandidateNN: # ---------------------- Static class attributes ---------------------- OPTIMIZER_CHOICES = ('AdamOpti...
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
# -*- coding: utf-8 -*- # Copyright 2019 New Vector Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
from __future__ import print_function, absolute_import import contextlib from functools import partial import itertools from Qt import QtWidgets from Qt.QtCore import Qt from pymel.core import cmds from ... import add from . import cardRigging ''' class Cell(QtWidgets.QTableWidgetItem): ...
from django.test import TestCase from corehq.apps.accounting.bootstrap.config.testing import BOOTSTRAP_CONFIG_TESTING from corehq.apps.accounting.models import SoftwarePlanEdition, FeatureType from corehq.apps.accounting.tests.utils import DomainSubscriptionMixin from corehq.apps.domain.shortcuts import create_domain ...
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Rupesh Tare <rupesht@saltstack.com>` ''' # Import Python libs from __future__ import absolute_import, print_function, unicode_literals # Import Salt Testing Libs from tests.support.mixins import LoaderModuleMockMixin from tests.support.unit import TestCase, skipIf ...
#!/usr/bin/env python #-*- coding: utf-8 -*- #This software is distributed under the Creative Commons license (CC0) version 1.0. A copy of this license should have been distributed with this software. #The license can also be read online: <https://creativecommons.org/publicdomain/zero/1.0/>. If this online license dif...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2013-2021 GEM Foundation # # OpenQuake 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 Licen...
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
# -*- coding: utf-8 -*- """ Created on Thursday July 27 2017 @author: Rama Vasudevan, Suhas Somnath, Chris R. Smith """ from __future__ import division, print_function, absolute_import, unicode_literals import sys from os import path, remove, listdir # File Path formatting import re import numpy as np # For array o...
import numpy as np from .small_classes import Strings, Numbers from .posyarray import PosyArray from .varkey import VarKey from .small_scripts import diff, mono_approx from .small_scripts import latex_num from .small_scripts import sort_and_simplify from .small_scripts import locate_vars from .small_scripts import in...
#!/usr/bin/python ## Binary Analysis Tool ## Copyright 2009-2015 Armijn Hemel for Tjaldur Software Governance Solutions ## Licensed under Apache 2.0, see LICENSE file for details ''' This script tries to analyse binary blobs, using a "brute force" approach and pretty print the analysis in a simple XML format. The sc...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
# -*- coding: utf-8 -*- import csv, datetime, json, logging, pprint from django.http import HttpResponse class CatalogingCSVwriter( object ): def __init__( self ): pass def get_csv_response( self, context ): response = HttpResponse( content_type='text/csv; charset=utf-8' ) retur...
# -*- coding: utf-8 -*- # Import python libs from __future__ import absolute_import, unicode_literals, print_function import os # Import Salt Testing libs from tests.support.helpers import requires_network from tests.support.paths import FILES from tests.support.runtests import RUNTIME_VARS from tests.support.unit im...
from subprocess import * from time import sleep from timeit import default_timer as clock from tempfile import TemporaryFile #from Queue import Queue from collections import deque from Tester import Tester from signal import SIGTERM import os, sys ## This class provides an interface to run commands in parallel # # T...
from nltk import corpus from collections import Counter from math import log, pow, sqrt from re import sub class PreprocessLog: def __init__(self, logfile): self.logfile = logfile self.logs = [] self.loglength = 0 self.events_list = [] self.events_unique = [] def read_...
#!/usr/bin/env python from pupa.utils import JSONEncoderPlus from contextlib import contextmanager from pymongo import Connection import argparse import json import os parser = argparse.ArgumentParser(description='Re-convert a jurisdiction.') parser.add_argument('--server', type=str, help='Mongo Server', ...
http->https for element queries