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
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
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
For the Schelling model, there is one file of interest, https://github.com/jxxcarlson/schelling/blob/master/src/Schelling.elm. | |
The main data structures are Cell, an opaque type, and Array Cell. | |
I use 1D arrays, but process them as if they were 2D arrays using | |
the functions | |
location :(Int, Int) -> Int | |
location (row, col) = | |
nRows * row + col |
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
-- Apply the transformation field -> updated field for | |
-- a discrete temperature field f)i,j) | |
-- | |
-- f'(i,j) = (1-beta)*f(i,j) + beta*average(i,j) | |
-- | |
-- where average(i,j) is the average of the | |
-- temperatures of the cells to the North, South, | |
-- East. and West. | |
-- This example is adapted from blur.fut |
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
#!/bin/sh | |
STD_LIB=/usr/local/lib/agda/src/ | |
IAL_LIB=/Users/carlson/dev/agda/ial/ | |
case $1 in | |
show) cat ~/.agda/defaults | |
;; |
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
#!/usr/bin/env python3 | |
""" | |
I have hacked the code at | |
https://gist.github.com/bradmontgomery/2219997#file-dummy-web-server-py | |
to make a server that responds to get requests by returning | |
a random integer generated using the /dev/random hardware | |
random number generator. Assuming that this file is named | |
"server.py", just do |
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
Made the changed indicated below | |
newAttributes : Random.Seed -> Float -> Float -> ClientStatus -> (ClientAttributes, Random.Seed) | |
newAttributes seed maxX maxY clientStatus = | |
let | |
(handle, seed1) = map String.toUpper (word 3 seed) | |
(x, seed2) = Random.step (Random.float 0 maxX) seed1 | |
(y, seed3) = Random.step (Random.float 0 maxY) seed2 | |
(k, seed4) = Random.step (Random.int 0 11) seed3 | |
(color, fontColor) = getColors k |
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
emote: It appears you're all set to deploy v32 of 'chattest'. | |
remote: | |
remote: There are no Evergreen type changes for this version. | |
remote: [============================================ ] - 16 / 18-- TYPE MISMATCH --------------------------------- src/Evergreen/Migrate/V31.elm | |
remote: | |
remote: Something is off with the body of the `frontendModel` definition: | |
remote: | |
remote: 23|> ModelMigrated | |
remote: 24|> ( { key = old.key | |
remote: 25|> , userId = "" |
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
export const addDocument = async ({ | |
request, | |
response, | |
}: { | |
request: any | |
response: any | |
}) => { | |
response.headers.set('Access-Control-Allow-Origin', '*') | |
console.log("processing POST request") |
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
module Parse exposing (AST(..), toAST) | |
{- | |
Parse a string of Lisp text, return Just AST if it is legal, Nothing if not. | |
-} | |
import Parser exposing (..) | |
import ParserHelpers exposing (..) |
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
# Elm Warrior: Notes | |
## Overall comments | |
The Dev.to article is very clear. Just a few very minor suggestions/comments below. | |
I did get some errors running `npm` (what's new?). The second error was | |
especially misleading/disconcerting, but it turns out that if you ignore it, | |
all is good. I was able to play the game. |
OlderNewer