Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Probably Coding || ! Probably Coding

Manash Kumar Mandal manashmandal

👨‍💻
Probably Coding || ! Probably Coding
View GitHub Profile
@manashmandal
manashmandal / variable_rnn_torch.py
Created Feb 10, 2020 — forked from dolaameng/variable_rnn_torch.py
Variable Length Sequence for RNN in pytorch Example
View variable_rnn_torch.py
import torch
import torch.nn as nn
from torch.autograd import Variable
batch_size = 3
max_length = 3
hidden_size = 2
n_layers =1
# container
@manashmandal
manashmandal / letsencrypt_2019.md
Created Oct 23, 2019 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)
View letsencrypt_2019.md

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

View download_egghead_videos.md

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});
@manashmandal
manashmandal / build_opencv_ARM_cross
Created Oct 15, 2017 — forked from hrshovon/build_opencv_ARM_cross
Cross compile opencv3.3.0 for your raspberry pi and similar ARM devices with python support
View build_opencv_ARM_cross
This is a note on how to cross compile opencv for pretty much any ARM device(HardFP supported in this case) and deploy. Native
compiling in ARM devices can be painfully slow and they seem to hang often during build(mine got stuck at 43%). So if you happen
to have a desktop/laptop/server running ubuntu or similar linux distro, u can build opencv in fractionth of the time taken for
native compiling without any issues.
Building opencv3 with TBB and NEON and VFP support can boost opencv performance. Thanks to Adrian at pyimagesearch for pointing that out.
Both my PC and target machine aka orange pi zero are running ubuntu 16.04 with python2.7 and python 3.5.
1.Run the following commands in both machines to install the necessary libraries etc.(mine worked with them,so they should be enough
hopefully)
sudo apt-get update && sudo apt-get upgrade
@manashmandal
manashmandal / notebook.ipynb
Created Jul 17, 2017 — forked from eamartin/notebook.ipynb
Understanding & Visualizing Self-Normalizing Neural Networks
View notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@manashmandal
manashmandal / apl-days.py
Created Jul 3, 2017
Generate dates and weekdays excluding weekends
View apl-days.py
#!/usr/bin/env python
# simply do the following to generate dates for month 12
# curl -s apl-days.py | python - 12 2017
from datetime import date
from calendar import monthrange
from sys import argv
# check if any argument is provided
@manashmandal
manashmandal / instructions.md
Created Jun 13, 2017 — forked from mcescalante/instructions.md
Run a Flask application with gunicorn and nginx
View instructions.md

This guide assumes:

  • You have a VPS (something like DigitalOcean, Linode, etc.)
  • You have a Flask application and a basic understanding of command line instructions
  • You've got nginx installed and know where your configuration files are

Instructions

  1. First, you should install gunicorn on your box or virtualenv with pip:
View 0-startup-overview.md
View selenium-webdriver-cheatsheet.md

API workthough

  1. Open a browser

    # start an instance of firefox with selenium-webdriver
    driver = Selenium::WebDriver.for :firefox
    # :chrome -> chrome
    # :ie     -> iexplore
    
  • Go to a specified URL