Before you going to coming paragraphs of this article, I recommend you to watch following youtube video so you will get what is going to describe here:
As Claudio (GOOGLE) mentioned in the above video, (http://youtu.be/zJVCKvXtHtE?t=12m18s), we need to use some logic (client library) to sort your crendentials for reusing. Other wise on every execution of ‘quickstart.py’ script, you need human interaction for getting tokens. I added 6 lines to google’s ‘quickstart.py’ to keep authorization code for reusing. So as long as the user has not revoked the access granted initially to the application, you don’t need a human interaction.
So, you got the idea how to deal with Google API and authentication to Google drive without human interaction. Now, you just need to apply your modifications to the script, suitable to your environment and then just put a cron job.
memcached is an open source project designed to make use of the spare RAM in multiple servers to act as a cache for frequently accessed bits of information. For example, consider a typical website; a web site served up dynamically will have certain components or information constant throughout the life of the page. Loading this information each time through a query to the database is very unnecessary. In this point the importance of caching is coming to the picture. If you have a caching mechanism on RAM rather than on a Hard Disk, you can imagine how fast it will be.
For demonstrating the performance of memcached powered application, I wrote a script called memcached_demo.py.
You can clone this script from my github repository using following:
I wrote a small python digital clock which can run on terminals. You can make use this as sleep in a finite or infinite loop in your program (If have a situation where you want a sleep ). In that case, instead of showing inactive terminal, can display this digital clock.
You can clone this digital_clock from git using following:
#!/usr/bin/python
# Author : Suku
import sys
import time
while True:
sys.stdout.write("\r%s" % time.ctime()) # what is '\r' ? Its a terminal control code, carriage return
sys.stdout.flush()
time.sleep(1)
sys.stdout.write("\n")
If you are in Linux Administration field, you must study Python. There are lot off discussions we can see in Internet about Python v/s Perl. I don’t want to talk anything about it. Python will help you to automate lot of stuffs in very easy way. Python have lot of modules, built in as well as external. I usually do automation using Bash. But bash have always certain limitations and so decided to study python. I wrote a small python script for converting currency values among different currencies. You can always download latest version of it from my GitHub account using following command.
sgeorge-mba:~ sgeorge$ currency_converter.py --help
usage: Example: currency_converter.py 1 USD INR
positional arguments:
COUNT how many count you want to convert
CURRENCY which CURRENCY (code) you want to convert from
CURRENCY which CURRENCY (code) you want to convert to
optional arguments:
-h, --help show this help message and exit
-l, --list print all available currency code
-v, --version show program's version number and exit
$* and $@, both these variables expands to the positional parameters, starting from the first one.
These variables are same (expand positional parameters in same way) when using without double quotes. If these variables are using inside double qoutes, will expand positional parameters differently.
In this article I am explaining the Encapsulation part of a TCP/IP network model.
The process of sending data can be viewed as a five-step process in TCP/IP model.
Note: For understanding the things explained in this article you need to have a good idea about TCP/IP network model.
Step 1:
Create and encapsulate the application data with any required application layer headers.
For example, the HTTP OK message can be returned in an HTTP header, followed by part of the contents of a web.
“/proc” contains many files critical to a Linux OS. In “/proc” there is a file named “filesystems”. And as the name implies, it contains what all filesystems are supported by a running kernel.
Data in MySQL is stored in files (or memory) using a variety of different techniques. Each of these techniques employ different storage mechanisms, indexing facilities, locking levels and ultimately provide a range of different functions and capabilities. By choosing a different technique you can gain additional speed or functionality benefits that will improve the overall functionality of your application.
Comparison between the MyISAM and InnoDB storage engines of MySQL.
innodb
myisam
1
row-level locking
table-level locking
2
supports transaction
does not support transactions
3
foreign key constraints
no foreign key constraints
4
row count is not stored internally and so slow COUNT(*)s
row count is stored internally and so fast COUNT(*)s
5
automatic crash recovery
no automatic crash recovery, but it does offer repair table functionality
6
stores both data and indexes in one file
stores indexes in one file and data in another
7
uses a buffer pool (innodb_buffer_pool_size) to cache both data and indexes
uses key buffers (key_buffer) for caching indexes and leaves the data caching management to the operating system
8
ACID(Atomicity, Consistency, Isolation and Durability) compliant
Before you going to coming paragraphs of this article, I recommend you to watch following youtube video so you will get what is going to describe here: Read following links to learn more about the authentication mechanism google API is using : https://developers.google.com/accounts/docs/OAuth2 https://developers.google.com/api-client-library/python/guide/aaa […]
memcached is an open source project designed to make use of the spare RAM in multiple servers to act as a cache for frequently accessed bits of information. For example, consider a typical website; a web site served up dynamically will have certain components or information constant throughout the life of the page. Loading this […]
I wrote a small python digital clock which can run on terminals. You can make use this as sleep in a finite or infinite loop in your program (If have a situation where you want a sleep ). In that case, instead of showing inactive terminal, can display this digital clock. You can clone this […]
If you are in Linux Administration field, you must study Python. There are lot off discussions we can see in Internet about Python v/s Perl. I don’t want to talk anything about it. Python will help you to automate lot of stuffs in very easy way. Python have lot of modules, built in as well […]
$* and $@, both these variables expands to the positional parameters, starting from the first one. These variables are same (expand positional parameters in same way) when using without double quotes. If these variables are using inside double qoutes, will expand positional parameters differently. $* within double quotes (“$*”) is equivalent to the list of [ […]
In this article I am explaining IPv4 subnetting in following two situations. 1. Subnetting when given a required number of networks [Example 1] 2. Subnetting when given a required number of hosts [Example 2] Note : You need to have basics of IPv4 address types and basics of subnetting Example 1 : You have a Class […]
In this article I am explaining the Encapsulation part of a TCP/IP network model. The process of sending data can be viewed as a five-step process in TCP/IP model. Note: For understanding the things explained in this article you need to have a good idea about TCP/IP network model. Step 1: Create and encapsulate the […]
“/proc” contains many files critical to a Linux OS. In “/proc” there is a file named “filesystems”. And as the name implies, it contains what all filesystems are supported by a running kernel. laptop:~ # cat /proc/filesystems nodev sysfs nodev rootfs nodev bdev nodev proc nodev cgroup nodev cpuset nodev tmpfs nodev devtmpfs nodev debugfs […]
This article will help you to utilize the power of bash scripting for “test”ing conditions. File tests -e True if exists -f True, if exists and is a regular file -d True, if exists and is a directory -c True, if exists and is a character special file -b True, if exists and is a block […]
Data in MySQL is stored in files (or memory) using a variety of different techniques. Each of these techniques employ different storage mechanisms, indexing facilities, locking levels and ultimately provide a range of different functions and capabilities. By choosing a different technique you can gain additional speed or functionality benefits that will impr […]