Skip to content

Instantly share code, notes, and snippets.

@nkabir
nkabir / .hgignore
Created November 30, 2011 15:18
Mercurial hgignore file
# using glob syntax
# See http://www.selenic.com/mercurial/hgignore.5.html
syntax: glob
*.pyc
@nkabir
nkabir / Market.py
Created December 5, 2011 16:10
alexhawat hw3
class Market(object):
'''
classdocs
'''
### THIS IS NOT NEEDED
#counter is a "Class Variable" for the number of created instances of Currency
counter = 0
def __init__(self, ref_date):
'''
@nkabir
nkabir / DiscountFactor.py
Created December 5, 2011 16:19
alexhawat hw3 discount factor
class DiscountFactor(object):
'''
class that holds a discount factor for a specified interval
'''
### DON'T NEED THIS
#counter is a "Class Variable" for the number of created instances of DiscountFactor
counter = 0
def __init__(self, ref_date, slice_date, factor):
@nkabir
nkabir / DiscountFactor.py
Created December 6, 2011 16:50
Code Review Discount Factor Mayur Patel
class DiscountFactor(object):
'''
Holds the discount factor for a specific date. Includes:
1. referenceDate
2. discountFactorDate
3. factor
'''
def __init__(self, reference_date, discount_factor_date, discount_factor):
'''
@nkabir
nkabir / gist:1570866
Created January 6, 2012 14:40
Ubuntu 10.04 phpbb3 installation
sudo apt-get update
sudo apt-get install tasksel
sudo tasksel install lamp-server
sudo apt-get install phpbb3
cd /etc/apache2/conf.d
sudo ln -s /etc/phpbb3/apache2.conf .
# Add the following to /etc/apache2/apache2.conf under section
# ...
# Include of directories ignores editors' and dpkg's backup files,
@nkabir
nkabir / etc_modprobe.d_bonding.conf
Created January 11, 2012 19:45
Bonded network interfaces
alias bond0 bonding
options bonding mode=0 miimon=100
@nkabir
nkabir / sources.list
Created January 31, 2012 15:47
default sources.list
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
# deb cdrom:[Ubuntu-Server 10.04 LTS _Lucid Lynx_ - Release amd64 (20100427)]/ lucid main restricted
#deb cdrom:[Ubuntu-Server 10.04 LTS _Lucid Lynx_ - Release amd64 (20100427)]/ lucid main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ lucid main restricted
@nkabir
nkabir / interface_example.py
Created February 6, 2012 22:28
fincad_fc_function
import fincad_fc_function_call_builder as fc
from datetime import date
try:
fc.initlib()
print fc.fcBuildInformation()
print fc.fcListFunctions()
discount_curve = [[date(2011,8,2),1],
[date(2011,8,3),0.999993734],
[date(2011,8,4),0.999987467],
@nkabir
nkabir / gist:1888000
Created February 22, 2012 22:30
reviewboard mercurial
[ui]
# change this to your email address
username = Alice Smith <asmith@example.com>
editor=vi
merge=meld
[trusted]
users = www-data
groups = www-data
@nkabir
nkabir / https_proxy
Created February 23, 2012 18:52
Apache Https VirtualHost
NameVirtualHost *:80
Listen 80
<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
NameVirtualHost *:443