Skip to content

Instantly share code, notes, and snippets.

View Arsh25's full-sized avatar

Arsh Chauhan Arsh25

View GitHub Profile
@Arsh25
Arsh25 / rpi-chef-test.yml
Last active May 15, 2020 01:01
A basic chef recipe to test the new yaml recipe format introduced in Chef 16
resources:
- type: 'file'
name: 'test_file'
content: 'This file is managed by Chef. Do not edit'
mode: '0600'
owner: 'ubuntu'
group: 'ubuntu'
path: '/home/ubuntu/test_file'
- type: 'apt_update'
name: 'apt_update'

Keybase proof

I hereby claim:

  • I am arsh25 on github.
  • I am arshchauhan (https://keybase.io/arshchauhan) on keybase.
  • I have a public key ASAsYsNmC_jhMbZuIt6P9FDm1dkuG9sZ9WIiCpik3UxJZwo

To claim this, I am signing this object:

#!/usr/bin/env python2
# Arsh Chauhan
# 02/28/17
# Last Edited:02/28/17
# replace.py: replace domains of emails with a domain you want
import re
# in_file: File with orginal emails
# out_file: Output file with original email domain replaced with domain
import random
def randommize_wordlist(file_name,out_file):
output = open(out_file,'a')
with open(file_name,'r') as word_list:
words = [line.strip() for line in word_list]
output.write(random.choice(words)+'\n')
if __name__ == "__main__":
for i in range(0,251):
#!/usr/bin/env python
import itertools
import os
def generate_list(lang,max_len):
words = []
for length in range(1,max_len+1):
perms = itertools.product(lang,repeat=length)
for word in perms:
#!/usr/bin/env python
from paramiko import SSHClient
import paramiko
import itertools
import time
import threading
import sys
def connect_ssh(host,port,user,password):
@Arsh25
Arsh25 / anagram.py
Created October 19, 2016 23:18
Semi working vesion of the first 2016 ACM coding challenge
#!/usr/bin/env python2
# Arsh Chauhan
# Find words in an anagram
# Created 10/19/2016
#Dictionary used: http://norvig.com/ngrams/enable1.txt
#FIXME: Keep tarck of how times a letter occurs in the anaram and mark
# words where letter count exceeds the number of times the letter