Thanks to antville.org
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 (4 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 (6 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 (7 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 (5 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 (5 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 (5 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 (5 comments) ... Comment


Wednesday, 10. January 2018
stack bookmarklet

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

stack link

... Link (10 comments) ... Comment


Friday, 22. December 2017
Manage S3 like rsync

create bucket

aws s3 mb s3://johntest123/

rsync all files from a given folder to S3 bucket:

aws s3 sync /home/ec2-user/ s3://johntest123/

Remove bucket

aws s3 rb --force s3://johntest123/

... Link (7 comments) ... Comment


Friday, 10. November 2017
apache docker container issues

If apache docker container does not start then make these changes...

vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
fs.file-max = 50000000

Reboot or restart service:
sysctl -p

... Link (5 comments) ... Comment


Online for 6297 days
Last modified: 11/21/19 1:09 AM
Status
Youre not logged in ... Login
Menu
... Home
... Tags

Search
Calendar
November 2019
SunMonTueWedThuFriSat
12
3456789
10111213141516
17181920212223
24252627282930
October
Recent updates
Very useful I needed this
thank you! Between the house cleaning and the tow trucks...
by MarbD (11/21/19 1:09 AM)
Bucket list one of my
favorites sites www.drawinnovations.com
by Monica11 (11/20/19 9:04 PM)
Incredible post! This is
greatly amazing. | roofing contractors near me
by Danielperez123 (11/20/19 8:03 PM)
Nice Antville.org is a great
article to be discussed! Thanks. Medical Converting Company
by Danielperez123 (11/20/19 6:26 PM)
Hello, Thank
you soo much for this great code of java. I am trying...
by Martin Moolley (11/20/19 11:37 AM)
Crack software has ultra-current
Vulnerability Shield. Free download Eset brilliant security eight complete break Direct...
by theumar20 (11/19/19 10:33 PM)
This site provides free serial
keys and activation codes. https://serialkeysfree.org This site provides free serial/activation...
by ayatnoor (11/19/19 7:14 PM)
Nice ohh! This is a
great reference. Thanks for sharing. | phillips norelco beard trimmer
by Danielperez123 (11/19/19 7:12 PM)
Bucket list Nice to know
that there is a site like this who are providing...
by Mikmik (11/19/19 2:55 PM)
Microsoft Office 365 Product Key
List for Free Microsoft office 365 Product key Microsoft Office...
by emilyisa bellaamelia1 (11/19/19 1:31 AM)
Bucket list Thank for this
post . this really help me a lot. carpet cleaning...
by Monica11 (11/18/19 8:09 PM)
The backup worked effectively
and effeciently for me. Great post! click here
by brielleluna (11/18/19 7:36 PM)
WinX HD Video Converter Deluxe
Crack WinX HD Video Converter Deluxe 5.15.3 Crack Key...
by meci12 (11/17/19 4:03 PM)
Nice Same here. I used
the same product. Thanks! | junk yards near me
by Danielperez123 (11/15/19 4:12 PM)
tellthebell Nice share. But, am
getting an error whenever I setup . So, what should...
by zenvanik (11/12/19 9:22 AM)
great to learn Thanks I
was needing this. As someone who prefers tree service winnipeg...
by TheManofRight (11/11/19 11:26 PM)
Noted. Got to apply
this over our website. Tampa SEO
by brielleluna (11/11/19 5:22 PM)
Is this another kind of
AWS management console that was posted on the other...
by brielleluna (11/11/19 5:19 PM)
sitelinx great work פרסום
בטאבולה
by sitelinxblog (11/9/19 8:36 PM)
Amazing! Thanks for welcoming
us with your great information. Keep it up! https://thesoutherninstitute.com
by Danielperez123 (11/8/19 4:05 PM)
Great Good to know you
have also provided which file type should it be saved....
by brielleluna (11/7/19 5:35 PM)
I will try to
apply them. cheapest seo services
by louishill6427 (11/6/19 9:19 AM)
I use these amazon
products too. Credit Card Processing Companies
by louishill6427 (11/6/19 9:14 AM)
Thanks for sharing how
to convert private to public key. Outbound Lighting
by louishill6427 (11/6/19 9:07 AM)
Thanks for sharing the
link for bookmarklet. Cincinnati lot for sale
by louishill6427 (11/6/19 8:42 AM)

RSS feed

Made with Antville
Helma Object Publisher