Skip to content

Instantly share code, notes, and snippets.

View VahidSaadat's full-sized avatar
🎯
Focusing

Vahid Saadat VahidSaadat

🎯
Focusing
View GitHub Profile
@VahidSaadat
VahidSaadat / installiTorch.sh
Last active August 11, 2016 14:29 — forked from jetsonhacks/installiTorch.sh
Install iTorch and prerequisites
#!/bin/sh
# Install Python prerequisites on NVIDIA Jetson TK1 for iTorch
# This is for https://github.com/facebook/iTorch
# L4T 21.3, Torch 7 (http://torch.ch)
# Python 2.7 or greater must be installed before running this script
# Torch 7 should already be installed before running this script
# iPython is loaded using pip, as repository version is 1.x version, > 2.0 is needed
# Need to compile from source as repository version libzmq3-dev is not the correct revision
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
tar xzvf zeromq-4.0.5.tar.gz
@VahidSaadat
VahidSaadat / TapeEquilibrium
Created November 30, 2016 20:13
TapeEquilibrium :)
class TapeEquilibrium {
public:
int tape_equilibrium( int A[] , int N ){
int sum_1 = 0 , sum_2 = 0 , min_sum;
for ( int i=0 ; i<N ; i++ )
sum_2 += A[i];
//set minimum sum equal first cell for compair with others
min_sum = abs(sum_2 - (2*A[0]));