Skip to content

Instantly share code, notes, and snippets.

View fhs's full-sized avatar

Fazlul Shahriar fhs

View GitHub Profile
@fhs
fhs / 10-magics.py
Created February 20, 2015 19:10
some ipython magic commands
from __future__ import print_function
def loadnpz_impl(self, params=''):
"""Load a npz file into user namespace.
%loadnpz <filename.npz>
"""
import numpy as np
ip = get_ipython()
@fhs
fhs / tilefigs
Created March 31, 2015 17:31
Tile all open matplotlib figures
#!/bin/bash
#
# Tile all open matplotlib figures
screenoffset=1920
screenwidth=2560
figwidth=640
figheight=534
x=$screenoffset
package main
import "fmt"
type Sequencer interface {
Next() Sequencer
}
type Elem struct {
b int
@fhs
fhs / 1.cpp
Created October 20, 2011 01:35
quiz 1
#include <iostream>
using namespace std;
int
main(void)
{
for(int i = 0; i < 50; i++){
for(int j = 0; j < i+1; j++)
cout << "*";
@fhs
fhs / 1.cpp
Created October 27, 2011 00:45
Assignment #2 solution
// #1. Ex 5.2 question 9 solution
#include <iostream>
#include <iomanip>
#include <cmath>
using namespace std;
int
main(void)
@fhs
fhs / circle.cpp
Created October 28, 2011 04:25
shapes
// Draws a circle
#include <iostream>
using namespace std;
int
main(void)
{
int r; //radius
@fhs
fhs / asmt3.cpp
Created November 24, 2011 19:43
Assignment #3
#include <iostream>
#include <string>
using namespace std;
const int NAccounts = 3;
string Usernames[NAccounts] = {
"alice",
"bob",
"eve",
@fhs
fhs / asmt4.cpp
Created December 13, 2011 22:38
Assignment #4 solution
#include <iostream>
#include <iomanip>
#include <cstdlib>
#include <string>
#include <fstream>
using namespace std;
const int WordListSize = 10000;
const int ParaWidth = 60; // paragraph width
@fhs
fhs / p0.cpp
Created December 26, 2011 19:00
Assignment #5 solution
#include <iostream>
#include <fstream>
#include <iomanip>
#include <cmath>
#include <cstdlib>
#include "p0.h"
using namespace std;
READWRITE::READWRITE(void)
@fhs
fhs / gist:5660054
Last active December 17, 2015 19:19 — forked from anonymous/gist:5659870
# FPR TPR Accuracy Precision
1 0.6250 0.8846 0.8372 0.9324
2 0.3077 0.9178 0.8837 0.9437
3 0.5556 0.9605 0.9059 0.9359
4 0.6111 0.9552 0.8353 0.8533
5 0.3333 0.9143 0.8706 0.9275
6 0.4545 0.9054 0.8588 0.9306
7 0.4615 0.8889 0.8353 0.9143
8 0.6154 0.9028 0.8235 0.8904
9 0.4615 0.9444 0.8824 0.9189