Skip to content

Instantly share code, notes, and snippets.

View shivampip's full-sized avatar
🏡
In Quarantine

Shivam Agrawal shivampip

🏡
In Quarantine
View GitHub Profile
@shivampip
shivampip / README.md
Last active September 7, 2018 12:48
[Ununtu 18.04 Wifi Weak] #ubuntu #wifi #18.04
@shivampip
shivampip / wikibot.py
Last active March 7, 2022 04:22
[Telegram Wikipedia Bot] #telegram #wikipedia #bot #python
from telegram.ext import Updater
from telegram.ext import MessageHandler, Filters
import wikipedia as wiki
# put your toen here
BOT_TOKEN= "641238067:AAEB___d1oM4llx6********************"
updater= Updater(BOT_TOKEN) #Bot Token is given by BotFather on Telegram while creating bot.
def get_wiki(word):
@shivampip
shivampip / draw.py
Created October 6, 2018 07:04
[Dragon Curve] #dragoncurve #dragon #curve #python #turtle
import turtle as t
import math
n= 21 # Number of folds
step= 1 # Step length
l= 2**n - 1
a= [0]*l
def fold(m, start, end, dir):
@shivampip
shivampip / hard_drive_recovery.md
Created March 29, 2019 18:44
[Hard drive data recovery in Ubuntu] #datarecovery #recovery #harddirve #harddisk
  • Open Terminal
  • sudo apt-get install testdisk
  • sudo testdisk /dev/sdb
  • Select drive
  • Select Intel/PC partition
  • Select Analyse
  • Quick Search
  • Select drive
  • Press 'P' to list files
  • Copy with 'c' and paste with 'c' at destination folder
@shivampip
shivampip / RASA_Deployment_on_VPS.md
Last active March 3, 2020 12:21
RASA Bot Deployment on Ubuntu VPS with Telegram (where ssl required)

Configuring Nginx

  • Open /etc/nginx/nginx.conf
  • Add this code block
server{
        listen 80;
        listen [::]:80;

        server_name  www.shivampip.com shivampip.com;
        location / {
@shivampip
shivampip / MongoDB_ubuntu_nginx_ssh.md
Last active October 18, 2022 01:30
MongoDB on Ubuntu 18.04 (nginx) SSH

Just follow these steps and teke ref of Refernce

  • Uninstall previous installation
sudo service mongod stop

sudo apt-get purge mongodb-org*

sudo rm -r /var/log/mongodb
@shivampip
shivampip / Contribute.md
Last active October 11, 2019 07:52
Contribute to Open Source
  • Fork the repo by clicking Fork button
  • Clone the forked repo to local machine
git clone https://www.github.com/shivampip/tenpy
  • Create the branch
git checkout -b my_new_branch
@shivampip
shivampip / telegram.py
Created October 11, 2019 13:35
Telegram Connnector for Rasa Modified
import logging
import json
from copy import deepcopy
from sanic import Blueprint, response
from sanic.request import Request
from telegram import (
Bot,
InlineKeyboardButton,
Update,
InlineKeyboardMarkup,
@shivampip
shivampip / mongodb_pass_reset.md
Created November 6, 2019 16:31
MongoDB shell admin password reset
  • open mongod.conf
cd /etc/mongod.conf
  • Comment security
#security:
#  authroization: "enabled"
import logging
import json
from copy import deepcopy
from sanic import Blueprint, response
from sanic.request import Request
from telegram import (
Bot,
InlineKeyboardButton,
Update,
InlineKeyboardMarkup,