I hereby claim:
- I am yeukhon on github.
- I am yeukhon (https://keybase.io/yeukhon) on keybase.
- I have a public key whose fingerprint is 8914 C10F 1482 1547 4F7B 8124 86F3 41C6 3285 494D
To claim this, I am signing this object:
| program integral | |
| implicit none | |
| ! we will solve integral of x^2 using the Trapezoidal Rule | |
| integer :: n | |
| real :: a, b, step, delta, coeff, f0, fn, inner_total, x | |
| ! We integrate x^2 from 0 to 4 with n intervals | |
| a = 0.0 | |
| b = 4.0 |
| #!/bin/bash | |
| # This script takes two arguments: rds database identifier and timeout. | |
| DB_ID=$1 | |
| TIMEOUT=$2 | |
| POLL_INTERVAL=60 | |
| OK_STATES=("backing-up" "available" "modifying" "resetting-master-credentials") | |
| seconds_left=$TIMEOUT |
| // NOTE: Ideally we want this kind of output, rather than hardcoing slicing up to 6 chars. | |
| // fmt.Printf("%-13.4f\n", RedIt(StrToNum(stock.Open) - StrToNum(stock.Price))) | |
| // fmt.Printf("%-13s\n", "\x1b[31;1m" + stock.Price + "\x1b[0m") | |
| // I get multiple-value fmt.Printf() in single-value context if: | |
| // fmt.Printf("%-13s\n", "\x1b[31;1m" + fmt.Sprint(fmt.Printf("%.4f", "num)) + "\x1b[0m") |
| package lib | |
| type StockQuoteResponse struct { | |
| Metadata ResponseMetadata `json:"Meta Data"` | |
| BatchQuote BatchQuoteResponse `json:"Stock Batch Quotes"` | |
| } | |
| type ResponseMetadata struct { | |
| Information string `json:"1. Information"` | |
| Notes string `json:"2. Notes"` |
| ... class print(print, print, print, metaclass=print): | |
| ... print = print = print | |
| ... | |
| print (<built-in function print>, <built-in function print>, <built-in function print>) {'__module__': '__main__', 'print': <built-in function print>, '__qualname__': 'print'} | |
| None | |
| None | |
| None |
I hereby claim:
To claim this, I am signing this object:
| // Tired of Python version? Me too. | |
| fn main() { | |
| for x in 1..101 { | |
| match(x%3, x%5) { | |
| // Most specific has to go first | |
| (0, 0) => println!("CracklePop"), | |
| (0, _) => println!("Crackle"), | |
| (_, 0) => println!("Pop"), | |
| (_, _) => { } // do nothing |
jumpie
| #!/bin/sh | |
| # | |
| # Nagios script to check website is up and responding in a timely manner | |
| # Written by Chris Freeman ([email protected]) | |
| # Version 1.1 | |
| # (c) GPLv2 2011 | |
| # | |
| # Special thanks to dkwiebe and Konstantine Vinogradov for suggestions and feedback | |
| # |
| test |