Skip to content

Instantly share code, notes, and snippets.

View R1j1t's full-sized avatar

Rajat R1j1t

View GitHub Profile
@R1j1t
R1j1t / degree-on-blockchain.go
Last active May 19, 2022 10:19
[WIP]: Smart contract to store graduating student details on hyperledger fabric
package main
import (
"bytes"
"encoding/json"
"fmt"
"strconv"
"github.com/hyperledger/fabric/core/chaincode/shim"
sc "github.com/hyperledger/fabric/protos/peer"
@R1j1t
R1j1t / pre-commit
Last active April 19, 2024 22:32
Pre-commit hook for python repo: Instead of getting to know whether any lint checks failed in CI, I created this pre-commit hook in git for my python repo. Git Hooks is a powerful utility. You read from the official documentation: https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks. Please ⭑ this Gist if you find it useful! Feel free to co…
#!/bin/sh
# This is a pre-commit hook for python. It checks if black is passed and then if flake8 is passed.
# Feel free to share your updates. It will help use these git feature!
if black . --check; then
echo "Everything is all right in black"
else
echo ""
@R1j1t
R1j1t / NMT-with-OpenNMT-Py.md
Created October 22, 2018 17:42
Gist holds the step by step execution of creating a translator once you have a parallel corpus

Run the following in your terminal

## To download the OpenNMT library
git clone https://github.com/OpenNMT/OpenNMT-py
cd OpenNMT-py

## Installing the requiremnets
pip install -r requirements.txt

## Downloading the data (if wget not avilable, then download using a browser by going to the link)