$mod
refers to the modifier key (alt by default)
startx i3
start i3 from command line$mod+<Enter>
open a terminal$mod+d
open dmenu (text based program launcher)$mod+r
resize mode ( or to leave resize mode)$mod+shift+e
exit i3
package main | |
import ( | |
"fmt" | |
) | |
type Stack struct { | |
top *Element | |
size int | |
} |
data = [] | |
base_url="https://<elasticsearch-cluster-name>.us-west-2.es.amazonaws.com/" | |
payload = { | |
"size":10000, | |
"query":{ | |
"match_all": {} | |
} | |
} | |
response = requests.post(base_url+"<index-name>/_search?scroll=1m", json=payload) | |
response = json.loads(response.content.decode()) |
import boto3 | |
from boto3.dynamodb.conditions import Key, Key | |
import decimal | |
import json | |
AccessKey= "xxxxxxxxxxxxxxxxxxxxx" #aws access keys | |
SecretKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" | |
session = boto3.Session( | |
aws_access_key_id=AccessKey, | |
aws_secret_access_key=SecretKey, |
#include <opencv/cv.h> | |
#include <opencv/highgui.h> | |
#include <opencv/ml.h> | |
void doMosaic(IplImage* in, int x, int y, | |
int width, int height, int size); | |
int main (int argc, char **argv) | |
{ | |
int i, c; |
from bs4 import BeautifulSoup | |
from urllib.request import urlopen | |
import re | |
try: | |
html=urlopen("http://www.amazon.in/b/ref=BizStrategy?_encoding=UTF8&node=1318070031&pf_rd_m=A1VBAL9TL5WCBF&pf_rd_s=merchandised-search-4&pf_rd_r=175CVN4B0C6BS94WK9BH&pf_rd_t=101&pf_rd_p=799588247&pf_rd_i=976389031").read() | |
except: | |
print("Connection Error") | |
else: | |
bsobj=BeautifulSoup(html,"html.parser") | |
for tag in bsobj.findAll('h2',{"class":"a-size-medium a-color-null s-inline s-access-title a-text-normal"}): |
"""Author : Utkarsh Malik | |
Monday , 21st Dec 2015 9:46PM | |
""" | |
from random import randint | |
print("Welcome to the rock paper scissor game\a\n") | |
repeat="Y" | |
y=1 | |
while y==1: | |
print("For Player vs Cpu enter 1.\nFor Player1 vs Player2 enter 2\n") | |
try: |
try: | |
val1=int(input("Enter a whole no : ")) | |
except ValueError: | |
print("pls enter a whole integer ") | |
except KeyboardInterrupt: | |
print("As your wish") | |
else: | |
for e in range(1,100): | |
"""using 1 in range(1,100) to avoid ZeroDivisionError""" |
list1=[1,2,3,4,5,6,7,8,9,10,11,2,3,4,5,1,12,34,45,67,78,89,90] | |
list2=[] | |
list1.sort() | |
for e in list1 : | |
if e < 5: | |
list2.append(e) | |
print() | |
print(list2) | |
print() | |
lessthan=int(input("Enter a integer\n")) |
try: | |
val1=int(input("Enter a whole no : ")) | |
except ValueError: | |
print("pls enter a whole integer ") | |
except KeyboardInterrupt: | |
print("As your wish") | |
else: | |
if val1 % 2 == 0 : | |
print(val1,"is even.") | |
else: |