Skip to content

Instantly share code, notes, and snippets.

View growupboron's full-sized avatar
:octocat:
working.

Shankho Boron Ghosh growupboron

:octocat:
working.
View GitHub Profile
@cobyism
cobyism / gh-pages-deploy.md
Last active July 2, 2024 13:11
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@bhaettasch
bhaettasch / gensim_word2vec_demo.py
Created January 10, 2016 18:41
Use gensim to load a word2vec model pretrained on google news and perform some simple actions with the word vectors.
from gensim.models import Word2Vec
# Load pretrained model (since intermediate data is not included, the model cannot be refined with additional data)
model = Word2Vec.load_word2vec_format('GoogleNews-vectors-negative300.bin', binary=True, norm_only=True)
dog = model['dog']
print(dog.shape)
print(dog[:10])
# Deal with an out of dictionary word: Михаил (Michail)
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active July 1, 2024 08:20
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hackintoshrao
hackintoshrao / find_chess_corner.py
Created December 14, 2017 15:51
Find and draw chess board corners for camera caliberation using Opencv
import numpy as np
import cv2
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import glob
# prepare object points
#Enter the number of inside corners in x
nx = 9
#Enter the number of inside corners in y
@Mathews2115
Mathews2115 / Pis_networking_cheat.md
Last active February 8, 2020 10:53
Pi networking Cheat Sheet

Goals:

  • Eliminate all hotplug/auto networking interfacing on bootup
  • Get 2 RPI3 to talk to each other, one being the Outer Pi and one being the Inner Pi
  • Outer Pi has access to the internet, inner pi can get access to the net through the Outer Pi
  • helpful links
  • (setting up wifi manually, node, etc) https://www.w3schools.com/nodejs/nodejs_raspberrypi.asp

Outer Pi (access to the internet)

  • (disable all AUTO network interfaces…we are manually configuring from here on out)
  • sudo update-rc.d dhcpcd disable
@gilrosenthal
gilrosenthal / Fast.ai install script
Created July 4, 2018 20:14
Fast.ai Install on Google Colab
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
@haakov
haakov / cmdline_converter.py
Last active August 2, 2023 13:07
Standalone GNU Radio XML -> YAML block converter script
#
# Short script for converting GNU Radio XML blocks to YAML blocks
# without having to start GRC
#
# Please note that this program _WILL_ overwrite files.
#
# How to use:
# 1. Save this file to grc/converter/cmdline_converter.py
# 2. Navigate back to the GNU Radio project root
# 3. Run: python3 -m grc.converter.cmdline_converter [name.xml]
@awesomebytes
awesomebytes / qt_serialbus.md
Last active February 1, 2023 09:58
Use qt serialbus in ubuntu 18.04 with qt 5.9

Using the Qt serialbus (to access a CAN bus) in Ubuntu 18.04

I was trying to compile a Qt project that uses the Qt serialbus module and it was not configuring when using qmake, the error was: Unknown module(s) in QT: serialbus. So I needed to build qtserialbus myself.

While trying to build it I ran into: fatal error: private/qobject_p.h: No such file or directory.

# Overkill: get all qt-stuff
sudo apt install qml-module-qt-labs-folderlistmodel qml-module-qtquick-extras qml-module-qtquick-controls2 qt5-default libqt5quickcontrols2-5 qtquickcontrols2-5-dev qtcreator qtcreator-doc libqt5serialport5-dev build-essential qml-module-qt3d qt3d5-dev qtdeclarative5-dev qtconnectivity5-dev qtmultimedia5-dev
@Pyrestone
Pyrestone / setup_noetic.md
Created December 23, 2021 11:16
ROS Noetic Install on NVIDIA Jetson Nano (Ubuntu 18.04)

ROS Noetic Install on jetson nano (Ubuntu 18.04)

This guide is derived from the official Noetic setup page, which can be found here: http://wiki.ros.org/noetic/Installation/Source

This version includes some customizations for missing packages on Ubuntu 18.04 which the jetson nano OS uses. I think this installation should work on most ubuntu 18.04 installations, but I can give no guarantees.

System and python dependencies