Skip to content

Instantly share code, notes, and snippets.

View orsenthil's full-sized avatar
🏠
Working from home

Senthil Kumaran orsenthil

🏠
Working from home
  • San Francisco
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from itertools import permutations
def diff(a, b):
return abs(a - b) - 1
def all_different(indices):
first, second, third, fourth, fifth = indices
size = len({diff(first, second), diff(first, third), diff(first, fourth), diff(first, fifth),
import numpy as np
total = 1052
k = 10
indices = np.arange(total)
np.random.shuffle(indices)
indices = indices.tolist()
start = 0
import socket
import threading
class ThreadedServer(object):
def __init__(self, host, port):
self.host = host
self.port = port
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
$ make
centos-7 -> FROM centos:7
coreos -> FROM jess/coreos
debian-jessie -> FROM debian:jessie
fedora-23 -> FROM fedora:23
ubuntu-xenial -> FROM ubuntu:xenial
+ Building the centos-7 base image
Sending build context to Docker daemon 3.072kB
Step 1/2 : FROM centos:7
---> 8140d0c64310
@orsenthil
orsenthil / production.py
Created September 12, 2017 20:40
Using Mock
class Production:
def call_one(self, arg1, arg2):
return arg1 + arg2
def call_two(self, arg1, arg2, arg3):
return self.call_one(str(arg1), str(arg2) + str(arg3))
d0cb085a Update version string to 1.8.10
65d66d7f Merge pull request #1663 from mesosphere/1.8.9-train-167
7c21459e Merge #1651
cd817432 upgrade navstar and minuteman to support 1k node cluster
f0b3f784 Merge pull request #1602 from mesosphere/1.8.9-train-166
f612621c Merge #1594
de6384eb Merge #1584
541afd21 Merge #1582
e1f2c91d Merge #1581
670e0bc1 Merge #1570
@orsenthil
orsenthil / Price Breakdown.md
Created November 19, 2017 02:04 — forked from justjanne/Price Breakdown.md
Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

Server Price Breakdown: DigitalOcean, Amazon AWS LightSail, Vultr, Linode, OVH, Hetzner, Scaleway/Online.net:

$5/mo

Provider Type RAM Cores Storage Transfer Network Price
LightSail vps 512MB 1 20GB SSD 1TB 1000M 5.00$
DO vps 512MB 1 20GB SSD 1TB 1000M 5.00$
# dcos-e2e error message
Step 1. Created Python3.5 Virtual Environment
Step 2. Built DC/OS
Step 3. Installed DC/OS E2E
pip3 install --upgrade git+https://github.com/dcos/[email protected]
```