Skip to content

Instantly share code, notes, and snippets.

View usmanghani's full-sized avatar

Usman Ghani usmanghani

View GitHub Profile
# Pass the Ipopt source directory as the first argument
if [ -z $1 ]
then
echo "Specifiy the location of the Ipopt source directory in the first argument."
exit
fi
cd $1
prefix=/usr/local
srcdir=$PWD

Keybase proof

I hereby claim:

  • I am usmanghani on github.
  • I am usmanghani (https://keybase.io/usmanghani) on keybase.
  • I have a public key ASBmTiSuzUqOKTGDgtJ6ZH1IfrArCSRw-gQxfpSFJaANXwo

To claim this, I am signing this object:

@usmanghani
usmanghani / opencv320.sh
Created August 2, 2017 06:10 — forked from dapperfu/opencv320.sh
Build .deb package for OpenCV 3 w/Python3 bindings.
#!/usr/bin/env bash
# Config
MAINTAINER="Jed Frey"
VERSION=3.2.0
# Adapted from http://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/
apt-get install --yes libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev libavcodec-dev libavformat-dev \
libswscale-dev libxvidcore-dev libx264-dev libv4l-dev liblapacke-dev libgtk-3-dev \
libopenblas-dev libhdf5-dev libtesseract-dev libleptonica-dev \

Keybase proof

I hereby claim:

  • I am usmanghani on github.
  • I am usmanghani (https://keybase.io/usmanghani) on keybase.
  • I have a public key whose fingerprint is 29B1 661C 9367 DD6A D99F 638B E29C 6665 BB40 FE4B

To claim this, I am signing this object:

==> default: Install directory
==> default: This is the directory in which Prince 9.0 will be installed.
==> default: Press Enter to accept the default directory or enter an alternative.
==> default: [/usr/local]:
==> default: Installing Prince 9.0...
==> default: Creating directories...
==> default: Installing files...
==> default: Installation complete.
==> default: Thank you for choosing Prince 9.0, we hope you find it useful.
==> default: Please visit http://www.princexml.com for updates and development news.
/**
* Copyleft usmanghani 2012
*/
package com.flurry.sudoku;
import java.io.IOException;
import java.nio.charset.Charset;
import java.nio.file.Files;
@usmanghani
usmanghani / ec2_ssh_config
Created June 22, 2013 00:25
Create ec2 ssh config (improved to skip null host names)
#!/usr/bin/env python
import os
import sys
import argparse
try:
from boto.ec2.connection import EC2Connection
except ImportError:
sys.stderr.write('Please install boto ( http://docs.pythonboto.org/en/latest/getting_started.html )\n')
sys.exit(1)
@usmanghani
usmanghani / prefix calculator
Created June 10, 2011 02:59
prefix calculator from codeeval.com
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication13
{
class Program
{
private static bool IsOperator(char c)