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
''' | |
mine_sweeper | |
board: 2D array | |
cell | |
state: mine or not | |
revealed: revealed or not | |
value: number of mines in surrounding zone | |
reveal(x,y): reveal the cell | |
game_over(): exit the game |
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
# 4 in a row game | |
# https://en.wikipedia.org/wiki/Connect_Four | |
''' | |
Game | |
board: a 2D array of cells | |
check_winner(): check who won the game every input from player1 or player2 | |
game_over(): terminates a game | |
place_checker(x, y, player): takes an input and update a cell | |
print_board() |
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
Verifying my Blockstack ID is secured with the address 1MDjAKK1ySkgQkSNULf467H5jdwqvpTinF https://explorer.blockstack.org/address/1MDjAKK1ySkgQkSNULf467H5jdwqvpTinF |
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
1. Go to https://golang.org/dl/ and get download based on your OS. | |
2. Get VSCode | |
3. Get all the installs that VSCode recommends for Go. |
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
go run - compiles and excutes one or two files | |
go build - compiles a bunch of go source code files | |
go fmt - formats all the code in each file in the current directory | |
go install - compiles and installs a package | |
go get - downloads the raw source code of someone else's package | |
go test - runs any tests associated with the current project |
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
version: 2 | |
jobs: | |
build: | |
working_directory: ~/firebase-functions-hello-world | |
docker: | |
# specify the version you desire here | |
- image: circleci/node:7.10 | |
steps: | |
- checkout | |
- restore_cache: |
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
// | |
// Item.swift | |
// todosy | |
// | |
// Created by Stephen lee on 3/6/18. | |
// Copyright © 2018 Stephen Lee. All rights reserved. | |
// | |
import Foundation | |
class Item: Codable { |
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
// | |
// OnboardingViewController.swift | |
// PWMe | |
// | |
// Created by Stephen lee on 8/22/19. | |
// Copyright © 2019 Stephen lee. All rights reserved. | |
// | |
import UIKit |
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
// Repository | |
class BasePublicChatRepository { | |
@Published var publicChats = [PublicChat]() | |
} | |
// In repository, I load data from firebase. Like, | |
self.db.collection(self.publicChatsPath) | |
.whereField(...) | |
.getDocuments(completion: { (querySnapshot, error) in | |
if let querySnapshot = querySnapshot { |
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 json | |
import csv | |
import sys | |
def process(): | |
arguments = sys.argv | |
if len(arguments) != 2: | |
print('please pass your json file as argument i.e. python json_to_csv.py [FILENAME].json') | |
return | |
json_file = arguments[1] |
OlderNewer