Skip to content

Instantly share code, notes, and snippets.

View mahendrakalkura's full-sized avatar

Mahendra Kalkura mahendrakalkura

View GitHub Profile
@mahendrakalkura
mahendrakalkura / tumblr.py
Last active August 29, 2015 14:10
For http://kittenskittenskittens.tumblr.com/: python tumblr.py kittenskittenskittens
# -*- coding: utf-8 -*-
from multiprocessing import JoinableQueue, Process
from os import makedirs
from os.path import dirname, isdir, isfile, join
from requests import get
from simplejson import loads
from sys import argv, exit, stdout
# -*- coding: utf-8 -*-
from itertools import permutations
words = [
'abel',
'able',
'appel',
'apple',
'bale',
# -*- coding: utf-8 -*-
from collections import Counter
from random import randint
def solution(A):
unique_integers = [
integer
for integer, count in Counter(A).iteritems()
# -*- coding: utf-8 -*-
def get_next_direction(direction):
if direction == 'North':
return 'East'
if direction == 'East':
return 'South'
if direction == 'South':
return 'West'
@mahendrakalkura
mahendrakalkura / algorithms_unnamed.py
Last active August 29, 2015 14:10
An algorithm whose name I cannot remember!
# -*- coding: utf-8 -*-
def is_valid(s, q, p):
for k in xrange(0, q - p):
if s[k] != s[k + p]:
return False
return True
# -*- coding: utf-8 -*-
def formatter(n):
n = list(str(n))[::-1]
n = ','.join([
''.join(n[index:index+3])
for index in range(0, len(n), 3)
])[::-1]
print n
<?php
function get_password()
{
$one = array(
'A',
'B',
'C',
'D',
'E',
# -*- coding: utf-8 -*-
from os import system
from time import sleep
try:
while True:
system('DISPLAY=:0 XAUTHORITY=/home/mahendra/.Xauthority xdotool click 1')
system('DISPLAY=:0 XAUTHORITY=/home/mahendra/.Xauthority xdotool key super')
sleep(1)
+---------------------+-----------------------------+----------------+--------------+---------------+----------+
| Users | Architecture | Cost |
+---------------------+-----------------------------+----------------+--------------+---------------+----------+
| | | Infrastructure | Others | Total | Per User |
+---------------------+-----------------------------+----------------+--------------+---------------+----------+
| Up to 12,500 | Current (Azure + Rackspace) | 2,750.00 USD | 2,850.00 USD | 5,600.00 USD | 0.45 USD |
| 12,501 to 25,000 | Current (Azure + Rackspace) | 5,500.00 USD | 2,850.00 USD | | 0.33 USD |
+---------------------+-----------------------------+----------------+--------------+---------------+----------+
| Up to 25,000 | Option #1 (1x) | 5,000.00 USD | 2,850.00 USD | 7,850.00 USD | 0.31 USD |
| 25,00
rabbitmqctl list_queues
rabbitmqctl list_queues && rabbitmqctl stop_app && rabbitmqctl reset && rabbitmqctl start_app && rabbitmqctl list_queues