Skip to content

Instantly share code, notes, and snippets.

View jatindhankhar's full-sized avatar
🎯
Focusing

Jatin Dhankhar jatindhankhar

🎯
Focusing
View GitHub Profile
@jatindhankhar
jatindhankhar / mail.py
Created September 22, 2014 16:45
Simple python script to Mail stuff
import os
import smtplib
from email.mime.text import MIMEText import csv
with open('/home/jatin/py.csv', 'rb') as f: # Replace path with your file path
reader = csv.reader(f)
for row in reader:
@jatindhankhar
jatindhankhar / keybase.md
Last active February 11, 2017 17:03
Keybase Identity File

Keybase proof

I hereby claim:

  • I am jatindhankhar on github.
  • I am jatin (https://keybase.io/jatin) on keybase.
  • I have a public key whose fingerprint is 633F 3305 5C51 6A75 CB04 E9A0 5DE6 30E3 4CEF BA46

To claim this, I am signing this object:

@jatindhankhar
jatindhankhar / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jatindhankhar
jatindhankhar / arch_linux_notes
Created January 6, 2015 14:24
Arch Installation guide
Download and install by following the guide by Linux Veda
#systemctl enable NetworkManager
# systemctl start NetworkManager
Disable DHCPCD
systemctl disable dhcpcd.service #Confilcts
Install yaourt
Fix Yaourt error arising due to curl and IPV6
# include <bits/stdc++.h>
using namespace std;
//template<typename T>
void print_power_set(const auto &vec,int n)
{ int sum = 0;
long int power_size = (1 << n);
for(long int counter=1; counter < power_size ; counter++)
{
vector<int> subset;
for(int j=0;j<n;j++)
@jatindhankhar
jatindhankhar / bfs.cpp
Last active February 23, 2022 22:26
Simple BFS implementation in modern C++
//Modified version of http://www.geeksforgeeks.org/breadth-first-traversal-for-a-graph/
# include <iostream>
# include <algorithm>
# include <vector>
# include <list>
using namespace std;
class Graph
{
@jatindhankhar
jatindhankhar / activities.json
Last active May 4, 2017 14:32
Downloads sugar bundles by reading them from a json file. Requires jq to be installed
{"license": "GPLv3+", "description": " There are 4 spaces per row in which you can place a different color, you have ten opportunities to find the correct position of each color.", "name": "Mastermind", "bundle": "mastermind-1.xo", "summary": "Mastermind game for sugar! Drag and drop the colors in correct places for win. ", "directory": "4797", "icon": "activity-mastermind.svg", "developer": "cristian"}
{"description": "Abacus lets the learner explore different representations of numbers using different mechanical counting systems developed by the ancient Romans and Chinese. There are several different variants available for exploration: a suanpan, the traditional Chinese abacus with 2 beads on top and 5 beads below; a soroban, the traditional Japanese abacus with 1 bead on top and 4 beads below; the schety, the traditional Russian abacus, with 10 beads per column, with the exception of one column with just 4 beads used for counting in fourths; and the nepohualtzintzin, the traditional Mayan abacus, with 3 be
from polib import pofile
from glob import glob
import os
from pprint import pprint
translations = {}
def get_language_code(filepath):
basename = os.path.basename(filepath)
return os.path.splitext(basename)[0]
@jatindhankhar
jatindhankhar / has_both_license.txt
Created July 19, 2017 07:10
Script to check for License in Sugar-activities
https://github.com/sugar-activities/4051-activity.git
https://github.com/sugar-activities/4674-activity.git
https://github.com/sugar-activities/4274-activity.git
https://github.com/sugar-activities/4323-activity.git
https://github.com/sugar-activities/4536-activity.git
https://github.com/sugar-activities/4675-activity.git
https://github.com/sugar-activities/4746-activity.git
https://github.com/sugar-activities/4722-activity.git
https://github.com/sugar-activities/4484-activity.git
https://github.com/sugar-activities/4752-activity.git
@jatindhankhar
jatindhankhar / has_both_license.txt
Last active July 27, 2017 14:55
Modified script for analyzing Sugarlabs activities
https://github.com/sugar-activities/4051-activity.git
https://github.com/sugar-activities/4674-activity.git
https://github.com/sugar-activities/4274-activity.git
https://github.com/sugar-activities/4323-activity.git
https://github.com/sugar-activities/4536-activity.git
https://github.com/sugar-activities/4675-activity.git
https://github.com/sugar-activities/4746-activity.git
https://github.com/sugar-activities/4722-activity.git
https://github.com/sugar-activities/4484-activity.git
https://github.com/sugar-activities/4752-activity.git