Skip to content

Instantly share code, notes, and snippets.

View NISH1001's full-sized avatar
💭
Staring into the abyss...

Nish NISH1001

💭
Staring into the abyss...
View GitHub Profile
@NISH1001
NISH1001 / han.py
Last active September 6, 2018 06:49
## model creation on Keras
from keras.models import Model
from keras.layers import Input, Merge, Layer
from keras.layers import Dense, Dropout
from keras.layers import Embedding
from keras.layers import LSTM, GRU, Conv1D, MaxPooling1D, Bidirectional, Concatenate, TimeDistributed, Masking, Lambda
from keras import backend as K
from keras import initializers as initializations
We can't make this file beautiful and searchable because it's too large.
#AUTHID,text,ext,neu,agr,con,opn
1997_504851.txt,"Well, right now I just woke up from a mid-day nap. It's sort of weird, but ever since I moved to Texas, I have had problems concentrating on things. I remember starting my homework in 10th grade as soon as the clock struck 4 and not stopping until it was done. Of course it was easier, but I still did it. But when I moved here, the homework got a little more challenging and there was a lot more busy work, and so I decided not to spend hours doing it, and just getting by. But the thing was that I always paid attention in class and just plain out knew the stuff, and now that I look back, if I had really worked hard and stayed on track the last two years without getting lazy, I would have been a genius, but hey, that's all good. It's too late to correct the past, but I don't really know how to stay focused n the future. The one thing I know is that when people say that b/c they live on campus they can't concentrate, it's b. s. For me it would be easier there, b

-c("Concurrency")

Indicates how many clients (people/users) will be hitting the site at the same time. While ab runs, there will be -c clients hitting the site. This is what actually decides the amount of stress your site will suffer during the benchmark.

-n

Indicates how many requests are going to be made. This just decides the length of the benchmark. A high -n value with a -c value that your server can support is a good idea to ensure that things don't break under sustained stress: it's not the same to support stress for 5 seconds than for 5 hours.

-k

This does the "KeepAlive" funcionality browsers do by nature. You don't need to pass a value for -k as it it "boolean" (meaning: it indicates that you desire for your test to use the Keep Alive header from HTTP and sustain the connection). Since browsers do this and you're likely to want to simulate the stress and flow that your site will have from browsers, it is recommended you do a benchmark with this.

a simple text file with timestamp

vim +'r!date' ~/did.txt

a simple text file with timestamp and automatic insert mode at the end of the file

vim +'normal Go' +'r!date' ~/did.txt

Finally! Create alias

alias did="vim +'normal Go' +'r!date' ~/did.txt"

create new session

tmux new -s session_name

attach to existing session

tmux a -t session_name

kill session

tmux kill-session -t session_name

Note : Do not do

We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 5 columns, instead of 2 in line 1.
A very, very, very slow-moving, aimless movie about a distressed, drifting young man. 0
Not sure who was more lost - the flat characters or the audience, nearly half of whom walked out. 0
Attempting artiness with black & white and clever camera angles, the movie disappointed - became even more ridiculous - as the acting was poor and the plot and lines almost non-existent. 0
Very little music or anything to speak of. 0
The best scene in the movie was when Gerardo is trying to find a song that keeps running through his head. 1
The rest of the movie lacks art, charm, meaning... If it's about emptiness, it works I guess because it's empty. 0
Wasted two hours. 0
Saw the movie today and thought it was a good effort, good messages for kids. 1
A bit predictable. 0
Loved the casting of Jimmy Buffet as the science teacher. 1
[
{
"name" : "paradox",
"age" : 0,
"location" : "nowhere"
},
{
"name" : "nishan",
"age" : 0,
@NISH1001
NISH1001 / i-am-a-strange-loop
Created September 16, 2018 15:53
i-am-a-strange-loop
This file has been truncated, but you can view the full file.
Table of Contents
Praise
Title Page
Dedication
A note from the Publisher
WORDS OF THANKS
PREFACE
PROLOGUE
CHAPTER 1 - On Souls and Their Sizes
Soul-Shards
@NISH1001
NISH1001 / matplotlib.md
Last active November 14, 2018 08:04
matplotlib configuration tutorial

Change backend from Code

import matplotlib

# first check which backend
maplotlib.get_backend()

# change
matplotlib.rcParams['backend'] = 'GTK3Agg'
@NISH1001
NISH1001 / yolo.sh
Created September 20, 2018 05:58
yolo command
./darknet classify ../../tiny-yolo/tiny.cfg ../../tiny-yolo/tiny.weights data/dog.jpg
./darknet detect ../../tiny-yolo/tiny.cfg ../../tiny-yolo/tiny.weights data/dog.jpg