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
fname=`date +"%d.%m.%Y_%H:%M:%S_%P"`.'_screencast.mp4'
input_width=320 # preselect width an height of video source
input_height=240 # other possible combinations: 640/480; 320/240
ASPECT=43 # '169' (16:9) or '43' (4:3); this value affects video playback with mplayer or vlc only!
V_NORM="pal" # preselect TV-norm 'PAL' oder 'NTSC'
DEV_VIDEO="/dev/video0"
title="Select Recording Type"
INPUT=`zenity --width=710 --height=350 --title="$title" --list --radiolist --column="Choice" \
--column="Mode" --column="Description" \
TRUE "0" "Screen Recording + audio from default speakers" \
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,
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 &
@neerajvashistha
neerajvashistha / dos.py
Last active August 23, 2020 10:19
Multi-Threaded DOS attack
import socket
import random
import Queue
from threading import Thread
import logging
import os
import sys
import time,re,subprocess
reload(sys)
sys.setdefaultencoding('utf8')
@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