Skip to content

Instantly share code, notes, and snippets.

View vigneshgarrapally's full-sized avatar
🎯
Focusing

Vignesh Garrapally vigneshgarrapally

🎯
Focusing
View GitHub Profile
@vigneshgarrapally
vigneshgarrapally / get_zenodo_datases.py
Created January 12, 2024 09:09
Download Zenodo User Restricted Datasets
"""
Script below downloads large datasets from the Zenodo Api and also verifies the size, checksum as mentioned in the api.
Below Script requires two files files-links.json and zenodo.or_cookies.txt. Use below steps to generate two files
1. Download the cookies file by looging into zenodo from chrome and export cookies using any exporter that does.
I have used get cookies.txt locally extension
2. Download the meta data of files as json. Change the record number as per your requirement.
curl --cookie zenodo.org_cookies.txt https://zenodo.org/api/records/4467455/files > files-links.json
@vigneshgarrapally
vigneshgarrapally / work-with-multiple-github-accounts.md
Last active July 10, 2023 16:34 — forked from rahularity/work-with-multiple-github-accounts.md
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@vigneshgarrapally
vigneshgarrapally / pylon_to_opencv.cpp
Created June 10, 2022 19:54
Convert images from Pylon to Opencv in c++
#source: https://stackoverflow.com/a/45352869/15374191
int main(int argc, char* argv[])
{
// The exit code of the sample application.
int exitCode = 0;
Pylon::PylonAutoInitTerm autoInitTerm;//me
try
{
// Get the transport layer factory.
@vigneshgarrapally
vigneshgarrapally / bayer_to_rgb.py
Created June 10, 2022 19:51
Convert an Image Bayer to RGB(basic method)
#!/usr/bin/env python3
#source: https://stackoverflow.com/a/58693798/15374191
import numpy as np
from skimage.io import imsave
# Width and height of Bayer image, not original which is w/2 x h/2
w, h = 1013, 672
ow, oh = w//2, h//2
# Load in Bayer8 image, assumed raw 8-bit GBRG
@vigneshgarrapally
vigneshgarrapally / kaggle_setup.sh
Created September 15, 2021 10:45
Bash Script to run before downloading Kaggle datasets
#!/bin/bash
error_handler() {
echo "******* FAILED *******" 1>&2
echo "Make sure kaggle.json is in the current directory"
echo "Open script and uncomment to debug"
exit 1
}
trap error_handler ERR
mkdir -p ~/.kaggle
#echo "directory created"