Skip to content

Instantly share code, notes, and snippets.

Avatar

Steven Yang yangchenyun

  • Google Inc.
  • San Jose, CA
View GitHub Profile
View dev-zenoc from device box_30315
openssl s_client -servername dev-zenoc.turingvideo.com -showcerts -connect dev-zenoc.turingvideo.com:443
CONNECTED(00000005)
depth=0 CN = *.turingvideo.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 CN = *.turingvideo.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
View okr.org

OKRs

Launch device management solutions to support operations for 30k+ devices

Deliver E2E on-demand OTA experience on mobile/web according to prod roadmap

Longxiang He Yang Song Zhongjie Chen

Deliver software to enable scheduled batch push OTA update.

Longxiang He Yang Song

@yangchenyun
yangchenyun / vote.json
Last active Sep 30, 2021
Voting result
View vote.json
"voters": [
{
"name": "Carl S",
"saw_poll_at": 1632974245048,
"unique_vote_token": 0.9393235830993898,
"voted_at": 1632974249247,
"votes": {
"-MkY6MA7d7o_yUIpqVsN": {
"value": 0
},
@yangchenyun
yangchenyun / test_auth.js
Created Aug 17, 2020
Test Authentication for JD
View test_auth.js
function UnauthorizedError(msg) {
return new Error(msg);
}
let runrule = function (user, context, callback) {
// do not restrict social login users
if (user.identities[0].isSocial){
return callback(null, user, context);
}
// if the user has meta data
@yangchenyun
yangchenyun / binding.json
Last active Jun 25, 2019
Reviewable_Shortcuts
View binding.json
[
["f", "Show next/latest diffs", "setProposedDiffBounds()"],
["n", "Next unreviewed file", "nextUnreviewedFile()"],
["p", "Previous unreviewed file", "prevUnreviewedFile()"],
[null, "Next personally unreviewed file", "nextPersonallyUnreviewedFile()"],
[null, "Previous personally unreviewed file", "prevPersonallyUnreviewedFile()"],
["shift+n", "Next changed file", "nextChangedFile()"],
["shift+p", "Previous changed file", "prevChangedFile()"],
[null, "Next visible file", "nextVisibleFile()"],
[null, "Previous visible file", "prevVisibleFile()"],
View solution.go
// # Determine Winning Poker Hand
// Design a program to determine the winner of a
// [poker](https://en.wikipedia.org/wiki/Poker) game.
// The order of a card would be described as "23456789TJQKA", the suit of a card
// would be described as "HSCD" (**H**eart, **S**pade, **C**lub, **D**iamond). Each card
// would be presented by two characters, i.e. "9D", "KC" etc.
// You would be given a list of hands as a text file, each line represents a
View *scratch*.py
# Two problems to solve:
# Q: How to pass state in a DAG
# A: ???
# Q: How to pass between DAGs?
# A: Use event payload.
# Q: How to early terminate a running DAG?
# A: Using priority to terminate existing DAGs.
View zolando.py
# Interesting problems solved for Zolando case.
# Q: How to pass state in a DAG
# A: We got variables already. EventOperation could take a variable as well!
# Q: How to pass state between DAGs?
# A: Use event payload.
# Q: How to early terminate a running DAG?
# A: Using priority to terminate existing DAGs.
@yangchenyun
yangchenyun / solution.go
Last active Mar 12, 2019
order_tree.go
View solution.go
package solution
// Performance result:
// N = 30000, weighted 3x. ✔OK
// 1. 0.004 s OK
// 2. 0.004 s OK
// 3. 0.004 s OK
// 4. 0.004 s OK
// 5. 0.004 s OK
View gist:1f5ece4b28af3671572f44a92390fd85

Determine Winning Poker Hand

Design a program to determine the winner of a poker game.

The order of a card would be described as "23456789TJQKA", the suit of a card would be described as "HSCD" (Heart, Spade, Club, Diamond). Each card would be presented by two characters, i.e. "9D", "KC" etc.

You would be given a list of hands as a text file, each line represents a