Skip to content

Instantly share code, notes, and snippets.

@amitsaha
amitsaha / picloud_mock.log
Created March 13, 2012 10:46
python-picloud mock error
Mock Version: 1.1.21
ENTER do(['bash', '--login', '-c', 'rpmbuild -bs --target i686 --nodeps builddir/build/SPECS/python-picloud.spec'], False, '/var/lib/mock/fedora-16-i386/root/', None, 0, True, False, 500, 104, None, False, {'LANG': 'en_US.utf8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'CCACHE_DIR': '/tmp/ccache', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'CCACHE_UMASK': '002'}, logger=<mockbuild.trace_decorator.getLog object at 0x8a4e6cc>)
Executing command: ['bash', '--login', '-c', 'rpmbuild -bs --target i686 --nodeps builddir/build/SPECS/python-picloud.spec'] with env {'LANG': 'en_US.utf8', 'TERM': 'vt100', 'SHELL': '/bin/bash', 'CCACHE_DIR': '/tmp/ccache', 'HOSTNAME': 'mock', 'PROMPT_COMMAND': 'echo -n "<mock-chroot>"', 'HOME': '/builddir', 'PATH': '/usr/bin:/bin:/usr/sbin:/sbin', 'CCACHE_UMASK': '002'}
sh: /usr/bin/python: No such file or directory
Building target platforms: i686
Building for target i686
Wrote: /buil
@amitsaha
amitsaha / pi_mp.py
Created March 14, 2012 12:02
Parallel Pi Calculation using Python's multiprocessing module
''' listing 6: pi_mp.py
Multiprocessing based code to estimate the value of PI
using monte carlo sampling
Ref: http://math.fullerton.edu/mathews/n2003/montecarlopimod.html
Uses workers:
http://docs.python.org/library/multiprocessing.html#module-multiprocessing.pool
'''
import random
@amitsaha
amitsaha / delegator.rb
Created March 25, 2012 12:05
Web based front-end for BoxGrinder Build
# Demo of BoxGrinder build using a web-based interface
# Uses Sinatra
# Amit Saha ([email protected])
require 'rubygems'
require 'sinatra'
require 'dm-core'
require 'yaml'
@amitsaha
amitsaha / circles.m
Created April 6, 2012 12:41
Circles
clear all;close all
% radius
for r=1:10
lines=zeros(361,2);
cx=[];cy=[];
for theta=0:360
@amitsaha
amitsaha / install_owncloud_f16.sh
Created April 9, 2012 03:31
Install ownCloud3 on Fedora 16
#!/bin/bash
# Shell script to setup and install ownCloud3 on Fedora 16 (and later, hopefully)
# You may try on others, but it may not work
# Run it as root/sudo
# Also installs PageKite (http://pagekite.net)
# Any harm to any object animate/inanimate caused by this script
@amitsaha
amitsaha / nhillclimbing.py
Created April 12, 2012 14:54
Hill Climbing with Multiple Solutions
'''Hill climbing search with Multiple solutions
in a continous variable space. (See: http://en.wikipedia.org/wiki/Hill_climbing)
Single variable '''
# Feel free to reuse, modify, play!
# Report errors/suggestions to: [email protected]
# Amit Saha (http://echorand.me)
# 7 April, 2012
@amitsaha
amitsaha / bg_build_file.rb
Created April 15, 2012 03:35
Script for creating a sample virtual appliance using BoxGrinder libraries
#!/bin/env ruby
# Script for creating a sample virtual appliance using
# BoxGrinder libraries.
# See: http://echorand.me/2012/03/18/parallel-computing-test-bed-using-virtual-appliances/
require 'rubygems'
require 'boxgrinder-build'
log = BoxGrinder::LogHelper.new(:level => :trace)
log.info "Building appliance F16-node"
@amitsaha
amitsaha / anaconda.log
Created May 10, 2012 04:15
Anaconda Log: Fedora 17 self-built boot.iso errors
04:00:35,247 INFO anaconda: /usr/sbin/anaconda 17.20
04:00:45,236 INFO anaconda: 1048576 kB (1024 MB) are available
04:00:45,236 INFO anaconda: check_memory(): total:1024, needed:768, graphical:768
04:00:45,284 INFO anaconda: anaconda called with cmdline = ['/usr/sbin/anaconda']
04:00:45,285 INFO anaconda: Default encoding = utf-8
04:00:45,394 INFO anaconda: Display mode = g
04:00:45,400 INFO anaconda: 1048576 kB (1024 MB) are available
04:00:45,400 INFO anaconda: check_memory(): total:1024, needed:768, graphical:768
04:00:47,070 DEBUG anaconda: X server has signalled a successful start.
04:00:47,076 INFO anaconda: Starting window manager, pid 547.
@amitsaha
amitsaha / install_owncloud4_f16.sh
Created May 22, 2012 16:19
Install ownCloud4 on Fedora 16/later
#!/bin/bash
# Shell script to setup and install ownCloud 4 on Fedora 16 (and later, hopefully)
# You may try on others, but it may not work
# Run it as root/sudo
# Also installs PageKite (http://pagekite.net)
# Any harm to any object animate/inanimate caused by this script
@amitsaha
amitsaha / audit.log
Created May 23, 2012 16:32
Audit.log
type=DAEMON_START msg=audit(1337658027.356:3939): auditd start, ver=2.2.1 format=raw kernel=3.3.6-3.fc17.i686 auid=4294967295 pid=447 subj=system_u:system_r:auditd_t:s0 res=success
type=SERVICE_START msg=audit(1337658027.617:4): pid=0 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="plymouth-quit-wait" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=SERVICE_STOP msg=audit(1337658027.621:5): pid=0 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="plymouth-quit-wait" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=SERVICE_START msg=audit(1337658028.184:6): pid=0 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="dbus" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
type=SERVICE_START msg=audit(1337658028.313:7): pid=0 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg=' comm="spice-vdagentd" exe="/usr/lib/syste