Thanks to antville.org
Monday, 10. September 2018
Google Input tools

Google suddenly stopped download of Input Tools package without giving any reason. And here is official response by Google:
We have been in touch with the Google Input Tools team and have confirmed that the Windows application is no longer available for download or installation. Instead, the team recommends you install the Google Input Tools Chrome extension as an alternative.

This is not expected from a company like google.

... Link (0 comments) ... Comment


Saturday, 18. August 2018
Python objects and methods

Here are important python objects and their methods
int mul, add, eq, ge, mod, pow
float .isinteger()
string .upper(), .endswith(), .split()
bool .numerator .abs()
list .append, .pop, _len
() / slicing
tuple
dict .items(), .keys(), .values() / slicing
pd.Series .sum(), .stack(), .groupby(), .resample(), .sort_values(), .sort_index(), .iloc
pd.DataFrame

... Link (0 comments) ... Comment


Wednesday, 8. August 2018
JSON to DF

Here is how to read a JSON file into pandas dataframe.

import json
import pandas as pd

with open('/tmp/aclImdb/movie_data/gv.json', 'r') as f:
data = json.load(f)

df=pd.DataFrame(data['data'])
df.to_excel('gov.xlsx')

... Link (0 comments) ... Comment


Saturday, 4. August 2018
managing servers using python

Fabric is a high level Python library designed to execute shell commands remotely over SSH, yielding useful Python objects in return:
"""
a#!/usr/bin/env python
from fabric.api import hosts, run, task
from fabric.tasks import execute

@task
@hosts(['shantanu@1.2.3.4:1224'])
def test():
run('hostname -f')

if name == 'main':
execute(test)
"""

... Link (0 comments) ... Comment


Sunday, 20. May 2018
backup mysql users

It is easy to backup mysql users -

wget percona.com/get/pt-show-grants;
perl pt-show-grants

... Link (0 comments) ... Comment


About python

1 everything is an object (class instances)
2 methods depends upon class of the instance
3 int,str and tuple are immutability, dict and list are mutable
4 dict keys are unique but series allows duplicate
5 list comprehension
6 slice of dict, str, list
7 dynamically typed
8 iterables are str, list, dict but int are not
9 functions are first class objects and can be applied just like built-in classes

... Link (0 comments) ... Comment


Wednesday, 16. May 2018
mysql and shell command

date -d"-1 day ago" +'%b%d'

equals to

mysql -Bse"select date_format(date(date_add(now() , interval 1 day)),'%b%d')"

... Link (0 comments) ... Comment


Saturday, 12. May 2018
Preserving comments in Stored Procedure

You can write multi line comments in a stored procedure by following mysql to think that it is a version specific code.

/!9999
Multi line comment, retained by mysql
not executed till it reaches the mysql version 9999 :))
/

... Link (0 comments) ... Comment


Wednesday, 25. April 2018
Custom slack command

Here are 5 steps to add any API to your slack channel.

A) Click on "Build" button on App Directory page of slack.
B) choose "Make a Custom Integration" button
C) select Slash Commands
D) Create a new command called /dest2 and add the URL mentioned above
E) Choose GET Method and save the command.

... Link (0 comments) ... Comment


Wednesday, 10. January 2018
stack bookmarklet

This bookmarklet will help to quickly access stack pages linking to current page

stack link

... Link (0 comments) ... Comment


Online for 5895 days
Last modified: 9/10/18 7:44 AM
Status
Youre not logged in ... Login
Menu
... Home
... Tags

Search
Calendar
October 2018
SunMonTueWedThuFriSat
123456
78910111213
14151617181920
21222324252627
28293031
September
Recent updates
Google Input tools Google suddenly
stopped download of Input Tools package without giving any reason....
by shantanuo (9/10/18 7:44 AM)
Python objects and methods Here
are important python objects and their methods int __mul__, __add__,...
by shantanuo (8/18/18 3:11 PM)
JSON to DF Here is
how to read a JSON file into pandas dataframe. import...
by shantanuo (8/8/18 1:12 PM)
managing servers using python Fabric
is a high level Python library designed to execute shell...
by shantanuo (8/4/18 10:01 AM)
backup mysql users It is
easy to backup mysql users - wget percona.com/get/pt-show-grants; perl pt-show-grants
by shantanuo (5/20/18 3:42 PM)
About python 1 everything is
an object (class instances) 2 methods depends upon class of...
by shantanuo (5/20/18 2:52 PM)
mysql and shell command date
-d"-1 day ago" +'%b%d' equals to mysql -Bse"select date_format(date(date_add(now() ,...
by shantanuo (5/16/18 7:47 AM)
Preserving comments in Stored Procedure
You can write multi line comments in a stored procedure...
by shantanuo (5/12/18 12:56 PM)
Custom slack command Here are
5 steps to add any API to your slack channel....
by shantanuo (4/25/18 6:59 AM)
stack bookmarklet This bookmarklet will
help to quickly access stack pages linking to current page...
by shantanuo (1/10/18 10:47 AM)
Manage S3 like rsync ####
create bucket aws s3 mb s3://johntest123/ #### rsync all files...
by shantanuo (12/22/17 12:04 PM)
apache docker container issues If
apache docker container does not start then make these changes......
by shantanuo (11/10/17 3:00 PM)
Install aws client on centos
If pip is not installed, then the following command will...
by shantanuo (10/26/17 9:51 AM)
Managing Amazon keys Use this
command to convert private key to public key. ssh-keygen -y...
by shantanuo (10/9/17 7:04 AM)
percona utility We can re-create
mysql users using the percona utility. wget percona.com/get/pt-show-grants chmod 777...
by shantanuo (9/6/17 8:22 AM)
mail merge separate file per
record Microsoft Word has an excellent feature called Mail-Merge. If...
by shantanuo (7/6/17 12:09 PM)
find dead processes The 8th
column of ps aux command will list the status of...
by shantanuo (5/28/17 7:39 AM)
Amazon Web Services Here are
some of the important Amazon products to use. cloudTrail...
by shantanuo (5/10/17 11:35 AM)
Self signed security certificate http://www.thegeekstuff.com/2009/07/linux-apache-mod-ssl-generate-key-csr-crt-file/
openssl genrsa -out 34.195.94.88.key 1024 openssl req -new -key 34.195.94.88.key...
by shantanuo (1/16/17 8:02 AM)
docker and aws Before starting
docker daemon, add the aws credentials. vi /etc/init/docker.override env AWS_ACCESS_KEY_ID=...
by shantanuo (11/23/16 3:01 PM)
Turn off Windows Updates in
Windows 10 There is no option to turn off Windows...
by shantanuo (10/30/16 2:43 PM)
RSS extension for chrome RSS
Subscription Extension (by Google) is a must have chrome extension...
by shantanuo (7/9/16 7:28 AM)
use putty for presentation Config
- Change settings... - Window - Colours - Use system...
by shantanuo (5/23/16 1:26 PM)
docker command examples # options
for running docker docker run -d --name abcd2 -p 23:23...
by shantanuo (5/21/16 11:04 AM)

RSS feed

Made with Antville
Helma Object Publisher