Skip to content

Instantly share code, notes, and snippets.

Utsav Krishnan ketankr9

Block or report user

Report or block ketankr9

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@ketankr9
ketankr9 / contest_bot.py
Last active Jul 23, 2019
Telegram bot which sends the schedule of programming contests held at various hosts.
View contest_bot.py
TOKEN='****DECLARE YOUR TOKEN HERE****'
import time
import random
import telepot
from telepot.loop import MessageLoop
import requests
from datetime import datetime, timezone, date
import pytz
"""
@ketankr9
ketankr9 / iitbhulogin.service
Created Jun 7, 2019
hotspot login script at boot when the network is ready
View iitbhulogin.service
#sudo systemctl edit --force --full iitlogin.service
#enter the below script and make sure ```sudo chmod u+x /usr/local/bin/forti```
----------------------------------------------------
[Unit]
Description=IIT Lan Login
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
@ketankr9
ketankr9 / dovecot_dovecot.conf
Created Feb 1, 2019
mailserver postfix configuration and dovecot imap/pop3 setup
View dovecot_dovecot.conf
#$$$ cat /etc/dovecot/dovecot.conf
## Dovecot configuration file
# If you're in a hurry, see http://wiki2.dovecot.org/QuickConfiguration
# "doveconf -n" command gives a clean output of the changed settings. Use it
# instead of copy&pasting files when posting to the Dovecot mailing list.
# '#' character and everything after it is treated as comments. Extra spaces
# and tabs are ignored. If you want to use either of these explicitly, put the
View Argos_GPU.sh
#!/usr/bin/env bash
USED=$(ssh pratik@172.16.16.19 nvidia-smi | head -n9 | tail -n1 | awk {'print $9'})
echo "GPU:$USED"
echo "---"
echo "$USED/12195MiB"
#SCRIPT_STATE=$(ssh pratik@172.16.16.19 'pgrep -fa "python\sNeuralStyleTransfer"')
#if [ -z "$SCRIPT_STATE" ]; then
# echo "Exit"
#else
@ketankr9
ketankr9 / SimpleTCPClient.java
Created Sep 16, 2018
Java Socket implementation of Client.
View SimpleTCPClient.java
import java.io.*;
import java.net.*;
import java.util.ArrayList;
import java.util.List;
class SimpleTCPClient
{
private static Socket socket;
private static InputStream input;
View stackoverflow_tags_scrape.py
import requests
from bs4 import BeautifulSoup as bs
import re
import csv
TAGS=["python"]
MAX_PAGES_PER_TAGS = 20 #int
FILENAME_PREFIX = "Dataset_"
# def writeToCSV(fileName):
View ca.crt
-----BEGIN CERTIFICATE-----
MIIDxDCCAqygAwIBAgIJAPzAhlECYUXxMA0GCSqGSIb3DQEBCwUAMHcxCzAJBgNV
BAYTAklOMQswCQYDVQQIDAJVUDEOMAwGA1UEBwwFTm9pZGExEDAOBgNVBAoMB1Nh
bXN1bmcxDDAKBgNVBAsMA0lNUzEMMAoGA1UEAwwDd3M0MR0wGwYJKoZIhvcNAQkB
Fg50ZXN0QGdtYWlsLmNvbTAeFw0xODA2MDUxNzI1MjNaFw0yMzA2MDUxNzI1MjNa
MHcxCzAJBgNVBAYTAklOMQswCQYDVQQIDAJVUDEOMAwGA1UEBwwFTm9pZGExEDAO
BgNVBAoMB1NhbXN1bmcxDDAKBgNVBAsMA0lNUzEMMAoGA1UEAwwDd3M0MR0wGwYJ
KoZIhvcNAQkBFg50ZXN0QGdtYWlsLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP
ADCCAQoCggEBAND0QRodc1yM8Vu9BImDdCqpeBe0OFC9alZDx9fSLmAA0fndXO4Z
4iSdbKbbDUnlikNvVwydy/UY/xyZ5zSczJBPuZwCKiaMqEFsi4t/ybJN4UDYaJqX
@ketankr9
ketankr9 / kali_wifi_crack.sh
Created May 18, 2018
Automated Wifi Password Crack Using airmon-ng
View kali_wifi_crack.sh
#!/bin/bash
# start in monitor mode
airmon-ng start wlan0
# dump all traffic data
airodump-ng wlan0mon
# start capturing packets, looking for deauth
@ketankr9
ketankr9 / scraper.py
Last active Jun 1, 2019 — forked from marcoqu/scraper.py
Script for scraping public instagram profile's timeline photos.
View scraper.py
# pylint: skip-file
import time
import re
import md5
import requests
import json
INSTAGRAM_URL = "https://www.instagram.com"
HASHTAG_ENDPOINT = "/graphql/query/?query_hash={}&variables={}"
@ketankr9
ketankr9 / instagram_tags.py
Last active May 10, 2018
A python script to scrape both "Most Recent" and "Top Posts" associated with any tag from Instagram.
View instagram_tags.py
import requests, json
class HashTag:
"""
This class helps in extracting image links associated with instagram hashtag, both recent and top posts.
"""
def __init__(self, tag, tagType="top_posts"):
"""
tag := the tag you are concerned with scraping
"""
You can’t perform that action at this time.