Skip to content

Instantly share code, notes, and snippets.

@ffmpbgrnn
ffmpbgrnn / form.php
Last active March 17, 2021 01:04
Lab3
<html>
<head><title>My form</title>
</head>
<body>
<form method="POST" action="postform_submitted.php">
<table>
<tr><td>
My name is : </td><td><input type="text" name="tName"></tr></td>
<tr><td>
My favourite movie is : </td><td><input type="text" name = "tMovie"></tr></td>
import tensorflow as tf
from tensorflow.python.ops import parsing_ops
from tensorflow.contrib.slim.python.slim.data import parallel_reader
import numpy as np
def main():
reader = tf.TFRecordReader
data_sources = ["train-0.tfrecord"]
_, data = parallel_reader.parallel_read(
@ffmpbgrnn
ffmpbgrnn / encoder_norm_center.pkl
Last active June 13, 2016 18:33
activity_net_trained vlad pkls, inception model
This file has been truncated, but you can view the full file.
(dp1
S'kmeans_centers'
p2
cnumpy.core.multiarray
_reconstruct
p3
(cnumpy
ndarray
p4
(I0
@ffmpbgrnn
ffmpbgrnn / install.sh
Created June 2, 2016 06:11 — forked from Reddine/install.sh
Install Theano on Ubuntu 14.04
sudo apt-get install build-essential
sudo apt-get update
# BLAS → LAPACK → ATLAS → numpy → scipy → Theano
# remove numpy and scipy
sudo apt-get remove python-numpy
sudo apt-get remove python-scipy
# Instalation commands
sudo apt-get install gfortran
sudo apt-get install libopenblas-dev
sudo apt-get install liblapack-dev
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev
@ffmpbgrnn
ffmpbgrnn / kmeans.py
Created December 5, 2015 01:08 — forked from dave-andersen/kmeans.py
k-means in Tensorflow
import tensorflow as tf
import numpy as np
import time
N=10000
K=4
MAX_ITERS = 1000
start = time.time()
@ffmpbgrnn
ffmpbgrnn / opencv-2.4.10.sh
Last active October 21, 2019 21:01
opencv-2.4.10 Ubuntu installation
arch=$(uname -m)
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then
flag=1
else
flag=0
fi
echo "Installing OpenCV 2.4.10"
mkdir OpenCV
cd OpenCV
echo "Removing any pre-installed ffmpeg and x264"
@ffmpbgrnn
ffmpbgrnn / matlab_iterates_columns.md
Created October 29, 2015 19:36
MATLAB for Loops Iterate Over Columns, Not Elements

MATLAB's for loop iterates over columns, not individual elements. I've tripped over this too many times.

Consider a matrix.

A = magic(3)

A = ...

     8     1     6
@ffmpbgrnn
ffmpbgrnn / 0_reuse_code.js
Created October 28, 2015 19:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ffmpbgrnn
ffmpbgrnn / cpu.log
Last active August 29, 2015 14:25
theano profile
==================
Message: build/bdist.linux-x86_64/egg/keras/models.py:328
Time in 8 calls to Function.__call__: 1.477107e+02s
Time in Function.fn.__call__: 1.474529e+02s (99.825%)
Time in thunks: 1.470501e+02s (99.553%)
Total compile time: 1.377320e+02s
Number of Apply nodes: 525
Theano Optimizer time: 2.186309e+01s
Theano validate time: 2.525887e-01s
Theano Linker time (includes C, CUDA code generation/compiling): 1.157349e+02s