Skip to content

Instantly share code, notes, and snippets.

View scottfrazer's full-sized avatar
👋

Scott Frazer scottfrazer

👋
View GitHub Profile

Using the Deck Of Cards API (https://deckofcardsapi.com/), write a program that does the following:

  1. Create a new shuffled deck
  2. Draw cards one at a time from the deck
  3. When a card is drawn, print it out in any format that includes number and suit (e.g. "JACK of SPADES" or "7H")
  4. If any three consecutive cards add up to a value of 21 using blackjack rules (see below), exit the program
  5. If all cards are drawn from the deck and no three consecutive cards add up to a value of 21, print "no more cards"

The "blackjack value" of a card can be defined as follows:

Using the Deck Of Cards API (https://deckofcardsapi.com/), write a program that does the following:

  1. Create a new shuffled deck
  2. Draw cards one at a time from the deck
  3. When a card is drawn, print it out in any format that includes number and suit (e.g. "JACK of SPADES" or "7H")
  4. If any three consecutive cards add up to a value of 21 using blackjack rules (see below), exit the program
  5. If all cards are drawn from the deck and no three consecutive cards add up to a value of 21, print "no more cards"

The "blackjack value" of a card can be defined as follows:

package main
// Write a HashMap implementation where the get and set operations
// have a runtime of O(1)
import (
"fmt"
"hash/fnv"
)
@scottfrazer
scottfrazer / coding.md
Last active June 30, 2022 12:48
Coding Challenge

Part 1

Using the Deck Of Cards API (https://deckofcardsapi.com/), write a program that does the following:

  1. Create a new shuffled deck
  2. Draw cards one at a time from the deck
  3. When a card is drawn, print it out in any format that includes number and suit (e.g. "JACK of SPADES" or "7H")
  4. If any three consecutive cards add up to a value of 21 using blackjack rules (see below), exit the program
  5. If all cards are drawn from the deck and no three consecutive cards add up to a value of 21, print "no more cards"

combined

concepts_2:

{
    "_id": "UMLS:ICD10CM:C50",
    "category": "Diagnosis",
    "chronicIndicator": "U",
    "code": "C50",
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
npm http GET https://registry.npmjs.org/angular-modal-service
npm http GET https://registry.npmjs.org/angular-ui-router
npm http GET https://registry.npmjs.org/angular-sanitize
npm http GET https://registry.npmjs.org/breakpoint-sass
npm http GET https://registry.npmjs.org/angular-translate
npm http GET https://registry.npmjs.org/d3
npm http GET https://registry.npmjs.org/filesaver.js
npm http GET https://registry.npmjs.org/hopscotch
npm http GET https://registry.npmjs.org/immutable
npm http GET https://registry.npmjs.org/in-viewport

wdl4s wdl_refactor Branch

This was created based on 0.19 code with the goal to clean up the API and push WDL-specific code that existed in Cromwell down into the wdl4s library.

Goals / Implementation Plan

What's currently implemented

  • Cleaner API and separate out lexical vs. graph relationships
  • Nested scatter support
"""
1)
Given a 2D list of integers where each row and column is sorted in ascending
order from left to right and top to bottom...
e.g.
"""
"""
Write a method that checks for the number occurrences of an integer in the matrix.
@scottfrazer
scottfrazer / a.go
Last active July 29, 2016 13:20
Go Examples
/* Go's "hello world" */
package main
import "fmt"
func main() {
fmt.Println("hello world")
}