Skip to content

Instantly share code, notes, and snippets.

View neerajvashistha's full-sized avatar
🏠
Working from home

Neeraj Vashistha neerajvashistha

🏠
Working from home
View GitHub Profile
@neerajvashistha
neerajvashistha / wallpaperchanger.sh
Last active May 15, 2016 17:04
A simple script to change wallpapers
#######settings##########
#select which site to download from
wallhaven=0
imgur=1
#seclect term/blog to search.
wallhavenSearchTerm=Minimalist
imgurSearchBlog=aGWwf
#set purity level
purityLevel=110
#set wallpaper change and download time
import unicodedata
my_text ="\U0001F602 and all of this \U0001F605"
for char in range(ord("\U0001F602"),ord("\U0001F64F")):
my_text=my_text.replace(chr(char),unicodedata.name(chr(char),"NOTHING"))
print(my_text)
{u'_id': u'scusr-0830fdaa-7188-41c3-a04c-ec0dec3b6a7c',
u'value': {u'active': 1.0,
u'appversion': u'5.6',
u'appversioncode': u'38',
u'campaign': None,
u'cat_count': [{u'key': u'other', u'value': 3.0},
{u'key': u'phone', u'value': 1.0}],
u'city': None,
u'clickout_conv': 0.0, #? trans:clickout
u'clickout_count': 0.0,
{u'_id': u'scusr-0830fdaa-7188-41c3-a04c-ec0dec3b6a7c',
u'value': {u'active': 1.0,
u'appversion': u'5.6',
u'appversioncode': u'38',
u'campaign': None,
u'cat_count': [{u'key': u'other', u'value': 3.0},
{u'key': u'phone', u'value': 1.0}],
u'city': None,
u'clickout_conv': 0.0, #? trans:clickout
u'clickout_count': 0.0,
@neerajvashistha
neerajvashistha / tictactoe.py
Created September 13, 2018 12:55
TicTacToe just a fun game when i am bored
import numpy as np
import random
import time
import matplotlib.pyplot as plt
def create_board():
return np.zeros((3,3))
board = create_board()
# coding: utf-8
# In[29]:
import pandas as pd
import numpy as np
from sklearn.feature_selection import RFE
from sklearn.linear_model import LogisticRegression
from sklearn import metrics
from sklearn.ensemble import RandomForestClassifier
model = LogisticRegression()
rfe = RFE(model,12)
rfe = rfe.fit(emp_train[x],emp_train[y])
print(rfe.support_)
# Common Internet File System utilities
# Wed Aug 8 12:34:05 IST 2018
sudo apt-get install cifs-utils
# Modern music player and library organiser inspired by Amarok 1.4
# Tue May 22 13:21:25 IST 2018
sudo apt-get install clementine
# cross-platform, open-source make system
# Sun Feb 18 17:55:21 IST 2018
while true; do score=`python -c 'import requests,re;from bs4 import BeautifulSoup; print(re.search(r"([A-Z]{3})([0-9]+\/[0-9]+ \([0-9]+.[0-9]\/[0-9]+ ov\))", BeautifulSoup(requests.get("http://www.espncricinfo.com/ci/engine/match/index.html").text[46695:48995],"lxml").text.strip()).group())'`; notify-send -t 10000 "Live match Score" "$score"; sleep 60; done &
import string
alphabet = ' '+ string.ascii_lowercase
count = 0
positions=dict()
for a in alphabet:
positions[a] = count
count = count + 1
def shift_encode(message,key):
encoding_list = []