- Client (Customer)
- Load Balancer (Greeter)
- Data Center (Coffee Shop)
- Distributed Message Queue (Bulletin Board w/ Sticky Notes)
- Producer (Cashier)
- Consumer (Barista)
- Database (Ledger Book)
In regular python array, a slice view of an array is actually a copy. Modifiying elements through the slice won't affect the original array.
>>> arr = [0, 1, 2]
>>> arr[0:][0] = 100
>>> arr
[0, 1, 2]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Johnny on 3/9/2018. | |
// Copyright (c) 2018 [email protected]. All rights reserved. | |
// | |
import UIKit | |
import RxCocoa | |
import RxSwift | |
private var prepareForReuseBag: Int8 = 0 |
Preferences > Key Bindings:
[
{ "keys": ["alt+command+l"], "command": "reindent" , "args": {"single_line": false}}
]
Preferences > Settings:
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Spark 2.1 | |
val spark = SparkSession.builder().master("local").getOrCreate() | |
// Given a list of mixture of strings in integers | |
val values = List("20030100013280", 1.0) | |
// Create `Row` from `Seq` | |
val row = Row.fromSeq(values) | |
// Create `RDD` from `Row` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MIT License | |
// | |
// Copyright (c) 2016 stable|kernel | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' people export''' | |
import base64 | |
import csv | |
import sys | |
import time | |
import urllib # for url encoding | |
import urllib2 # for sending requests | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC := g++ | |
CFLAGS := -Wall -g | |
TARGET := test | |
# $(wildcard *.cpp /xxx/xxx/*.cpp): get all .cpp files from the current directory and dir "/xxx/xxx/" | |
SRCS := $(wildcard *.cpp) | |
# $(patsubst %.cpp,%.o,$(SRCS)): substitute all ".cpp" file name strings to ".o" file name strings | |
OBJS := $(patsubst %.cpp,%.o,$(SRCS)) | |
all: $(TARGET) |
NewerOlder