This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pylab | |
from math import exp | |
def scatter_plot(x, y, r, color='b'): | |
for i in range(len(x)): | |
pylab.scatter(x[i], y[i], s=r, c=color) | |
#x1 = [0, 1., 0.1, 2, 3, 2.3, 3.1, 1.7, 1.9] | |
#y1 = [0.1, 0.2, 0.8, 1, 1.5, 1.9, 2.1, 1.7, 1.9] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple generic algorithm | |
# Authors: Valeriya Guseva and Dmitrii Golub | |
# Date: March 2010 | |
import numpy | |
import pylab | |
from math import * | |
from random import randint, random | |
# Constants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
houdini@mozart:~/cassandra_gem$ rake cassandra | |
(in /usr/lib/ruby/gems/1.8/gems/cassandra-0.8.0) | |
tar xzf apache-cassandra-0.6.0-beta2-bin.tar.gz | |
mv apache-cassandra-0.6.0-beta2 server | |
ant ivy-retrieve | |
Buildfile: /home/houdini/cassandra/server/build.xml | |
ivy-download: | |
[echo] Downloading Ivy... | |
[mkdir] Created dir: /home/houdini/cassandra/server/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#sudo geany /usr/lib/ruby1.9.1/gems/1.9.1/gems/mail-2.1.5.3/lib/mail/patterns.rb | |
#houdini@mozart:~/RoR/dv-news$ RUBYOPT="-Ku" ruby1.9.1 ./script/rails server | |
#/usr/lib/ruby1.9.1/gems/1.9.1/gems/mail-2.1.5.3/lib/mail/patterns.rb:27:in `<module:Patterns>': invalid multibyte character #(ArgumentError) | |
# encoding: binary | |
module Mail | |
module Patterns | |
white_space = %Q|\x9\x20| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (String) highlight_text:(String)input_string { | |
if (search_string !== '') { //search_string id defined before | |
var regex = new RegExp(search_string, 'ig'); | |
var start_index = input_string.search(regex); | |
var new_substring = '<strong>' + intput_string.substring(start_index, search_string.length) + '</strong>'; | |
return input_string(0, start_index) + new_substring + input_string(search_string.length + start_index, input_string.length); | |
} else { | |
return ''; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (String) highlight_text:input_string { | |
return input_string | |
if (search_string !== '') { | |
var regex = new RegExp(search_string, 'ig'); | |
var start_index = input_string.search(regex); | |
var new_substring = '<strong>' + input_string.substring(start_index, search_string.length) + '</strong>'; | |
return input_string.substring(0, start_index) + new_substring + input_string.substring(search_string.length + start_index, input_string.length); | |
} else { | |
return ''; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def round_math a | |
(a*100).round.to_f/100 | |
end | |
def ceil_math a | |
(a*100).ceil.to_f/100 | |
end | |
def floor_math a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/RubymineProjects/fun-images (master) $ brew install libwmf ==> Downloading http://downloads.sourceforge.net/project/wvware/libwmf/0.2.8.4/libwmf-0.2.8.4.tar.gz File already downloaded and cached to /Users/houdini/Library/Caches/Homebrew | |
==> ./configure --disable-debug --disable-dependency-tracking --prefix=/usr/local/Cellar/libwmf/0.2.8.4 --with-freetype=/usr/X11 ==> make make all-recursive | |
Making all in . | |
make[2]: Nothing to be done for all-am'. Making all in src Making all in extra Making all in trio make[4]: Nothing to be done forall'. | |
Making all in gd | |
/bin/sh ../../../libtool --mode=compile --tag=CC /usr/bin/cc -DHAVE_CONFIG_H -DHAVE_UNISTD_H -DHAVE_LIBFREETYPE -DHAVE_LIBPNG -I. -I. -I../../.. -I. -I/usr/X11R6/include -O3 -w -pipe -I/usr/X11/include/freetype2 -I/usr/X11/include -I/usr/X11/include -c -o gd.lo gd.c /bin/sh ../../../libtool --mode=compile --tag=CC /usr/bin/cc -DHAVE_CONFIG_H -DHAVE_UNISTD_H -DHAVE_LIBFREETYPE -DHAVE_LIBPNG -I. -I. -I../../.. -I. -I/usr/X11R6/include -O3 -w -pipe -I/usr/X11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~/RubymineProjects/do_admin (master) $ brew install mysql | |
==> Downloading http://downloads.mysql.com/archives/mysql-5.5/mysql-5.5.10.tar.gz | |
File already downloaded and cached to /Users/houdini/Library/Caches/Homebrew | |
==> Downloading patches | |
==> Patching | |
patching file scripts/mysqld_safe.sh | |
Hunk #1 succeeded at 555 (offset 172 lines). | |
patching file scripts/mysql_config.sh | |
Hunk #1 succeeded at 137 (offset 5 lines). | |
==> cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/mysql/5.5.10 -DMYSQL_DATADIR=/usr/local/var/mysql -DINSTALL_MANDIR=/usr/local/Cellar/mysql/5.5.10/share/man -DINSTALL_DOCDIR=/us |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 require 'formula' | |
2 | |
3 class Libwmf < Formula | |
4 url 'http://downloads.sourceforge.net/project/wvware/libwmf/0.2.8.4/libwmf-0.2.8.4.tar.gz' | |
5 homepage 'http://wvware.sourceforge.net/libwmf.html' | |
6 md5 'd1177739bf1ceb07f57421f0cee191e0' | |
7 | |
8 depends_on 'pkg-config' => :build | |
9 depends_on 'gd' | |
10 |
OlderNewer