Skip to content

Instantly share code, notes, and snippets.

View rahulnegi20's full-sized avatar
🎯
Focusing

rahul negi rahulnegi20

🎯
Focusing
View GitHub Profile
@echo off
@REM Provide your system's address to the putty.exe here
set putty="C:\Program Files\PuTTY\putty.exe
@REM Provide your username@address here
set id=eclairs@192.xxx.xx.174
set /p password="Enter password: "
%putty% -pw %password% %id%
@echo off
@REM Provide your username@address here
set id1=hello@192.168.xx.145
set id2=candy@192.xxx.xxx.173
set id3=eclairs@192.xxx.xx.174
@REM Provide your password here
set password1=passwrd@123
set password2=mypassword@123
@echo off
@REM Enter last three number of your server's IP address only to login.
@REM Provide your system's address to the putty.exe here
set putty="C:\Program Files\PuTTY\putty.exe
@REM Provide your username@address here
set id=eclairs@192.xxx.xx.174
@echo off
@REM Use this if you have single server to login only, provide your sysyem address to puty.exe below.
@REM Provide your system's address to the putty.exe here
set putty="C:\Program Files\PuTTY\putty.exe
@REM Provide your username@address here
set id=eclairs@192.xxx.xx.174
@REM Provide your password here
#!/bin/bash
word="$1"
export word
python /home/rahulnegi/projects/scripts/dict/dict.py "word"
def get_synonyms(title):
try :
url = 'https://api.dictionaryapi.dev/api/v2/entries/en_US/'+title
result = json.load(urllib.request.urlopen(url))
except urllib.error.HTTPError as e: ResponseData = 'failed'
except :
print('Connect to Internet!!', sys.exc_info()[0])
os._exit(0)
try :
get_meaning(title)
while flag == 0:
print('-----------------------------------')
print(' ``Press 1 to get synonyms`` ')
print(' ``Press 2 to get an example `` ')
print(' ``Press 9 to quit ``')
print('-----------------------------------')
try :
char = int(input())
import os
import sys
import urllib.request, urllib.parse, urllib.error
import json
print('++++++++++Terminal Based google-dictionary++++++++++\n')
title=os.environ["word"]
flag = 0
print('\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\START\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \n')
print ("Word: ",title )
def get_meaning(title):
"""
This function will return the meaning of the word
"""
try :
url = 'https://api.dictionaryapi.dev/api/v2/entries/en_US/'+title
result = json.load(urllib.request.urlopen(url))
except urllib.error.HTTPError as e: ResponseData = 'failed'
except :
print('Connect to Internet!!', sys.exc_info()[0])