This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget https://gist.githubusercontent.com/PCJohn/ccbac70608f44f8c8d18cc4c89f3ab90/raw/8853e386321c61d4b0b6ac58db1bc4ac457574e0/vimrc | |
mv vimrc ~/.vimrc | |
bash | |
# Following: https://askubuntu.com/questions/284957/vi-getting-multiple-sorry-the-command-is-not-available-in-this-version-af | |
sudo apt-get install vim-gui-common | |
sudo apt-get install vim-runtime | |
# Use the Vundle vim plugin manager | |
# See: https://pseudoscripter.wordpress.com/2020/04/26/install-black-on-vim/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The rational analysis of memory: http://gershmanlab.webfactional.com/pubs/RationalAnalysisOfMemory.pdf | |
Rate distortion trade-off in human memory: https://ccneuro.org/2019/proceedings/0000369.pdf | |
Convolutional Neural Associative Memories: https://arxiv.org/pdf/1407.6513.pdf | |
Holographic Reduced Representation: https://www.amazon.com/dp/B0188Y14VS/ref=dp-kindle-redirect?_encoding=UTF8&btkr=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import cv2 | |
import time | |
import numpy as np | |
from matplotlib import pyplot as plt | |
size = 1000 | |
im = np.ones((size,size,3)) | |
def plot(p,sz=3,col=(0,255,0)): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage: | |
srun -p 1080ti-short --mem 100000 --gres=gpu:1 \ | |
python tools/viz_net.py --dataset coco2017 --output_dir tmp \ | |
--cfg configs/context/self-attn/e2e_faster_rcnn_R-50-C4_1x_attn_head-8_lr-long-v3.yaml \ | |
--ckpt data/models/coco-visual-8-head/model_step69999.pth | |
Example (8 heads v3 on COCO): | |
srun -p 1080ti-short --gres=gpu:1 --mem 20000 python tools/viz_net.py \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import division | |
import numpy as np | |
from matplotlib import pyplot as plt | |
import networkx as nx | |
import copy | |
class Graph: | |
def __init__(self,adj,labels): | |
self.adj = adj | |
self.char_list = labels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Attempt to perform integer division by overfitting convolution layers | |
Input: 2 numbers A and C | |
Output: Integer B such that A.B = C | |
Author: Prithvijit Chakrabarty (prithvichakra@gmail.com) | |
""" | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Attempt to run NNMF (Non-negative matrix factorization) for integer matrices by overfitting with a high learning rate on backpropagation. | |
Try to factorize matrices: Find a matrix A such that xA = y for given matrices (x,y) | |
Author: Prithvijit Chakrabarty (prithvichakra@gmail.com) | |
""" | |
import random | |
import numpy as np | |
import tensorflow as tf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This is memory saving sieve that efficiently factorizes integers below an upper limit. | |
It generates a structure that stores the smallest prime factor of all numbers below the limit. | |
Given a number, it divides it by the smallest prime factor and adds the factor to the list of factors. This is repeated till the number is reduced to 1. | |
Bitwise operations are used to save memory while storing the sieve encoded in a list of integers. | |
Author: Prithvijit Chakrabarty (prithvichakra@gmail.com) | |
*/ | |
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Java source to find closed boundaries an array of binary pixels. | |
Author: Prithvijit Chakrabarty (prithvichakra@gmail.com) | |
*/ | |
package projectjava; | |
import java.awt.Color; | |
public class ClosedSurfaceFinder { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*Java source for a simple, text based game of Connect Four. Change the package name as required. | |
Players must enter a number between 0 and 7 (both inclusive) to specify the column in which he/she wants to drop his/her chip. | |
Author: Prithvijit Chakrabarty (prithvichakra@gmail.com)*/ | |
package projectjava; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; |
NewerOlder