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
----- | |
>cf restart hello | |
Stopping hello... OK | |
Preparing to start hello... OK | |
Checking status of app 'hello'... | |
0 of 1 instances running (1 starting) | |
0 of 1 instances running (1 down) | |
0 of 1 instances running (1 down) |
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 on Mar 10, 2014 | |
@author: jimhorng | |
''' | |
from apns import APNs, Payload | |
import time | |
import logging | |
import sys |
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
def gen_dict(key_tree, value): | |
if len(key_tree) == 1: | |
return "%s = \"%s\";" %(key_tree[0], value) | |
else: | |
return (gen_dict(key_tree[1:], value) + | |
"\n" + "{key1} = {{}};\n{key1}['{key2}'] = {key2};".format(key1=key_tree[0], | |
key2=key_tree[1])) | |
print gen_dict(key_tree="a.b.c.d".split("."), value="haha") | |
# input: a.b.c.d = "haha" |
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
func makeThumbnails6(filenames <-chan string) int64 { | |
sizes := make(chan int64) | |
var wg sync.WaitGroup // number of working goroutines | |
for f := range filenames { | |
wg.Add(1) | |
// worker | |
go func(f string) { | |
defer wg.Done() | |
thumb, err := thumbnail.ImageFile(f) |
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
Please let me know if you or your friends are interested in this position, thanks :) | |
✔ Company: Digital River https://www.104.com.tw/jobbank/custjob/index.php?r=cust&j=384a426d3c463f6952583a1d1d1d1d5f2443a363189j56 | |
✔ Title: Principal Software Engineer | |
✔ Mission: | |
Build End-to-End Large-scale Machine Learning Systems for improving value proposition for E-commerce. e.g. Increase payment success rate, Fraud detection, Resource utilizations | |
✔ Package: Negotiable, can up to 2-2.5M |
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
class Solution: | |
def day24(self, input: str) -> int: | |
def input_to_state(input): | |
input = input.strip() | |
grid = [] | |
for line in input.split("\n"): | |
row = [] | |
for c in line: | |
if c == '.': |
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
import java.util.*; | |
public class Solution { | |
private int nr, nc; | |
public int maximumSafenessFactor(List<List<Integer>> grid) { | |
nr = grid.size(); | |
nc = grid.get(0).size(); | |