This file contains hidden or 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
| """ | |
| When writing Python scripts, you often want to track how long a block of code | |
| takes. The `timer` context manager provides a simple way to do this, with | |
| automatic logging. | |
| The `progress` context manager extends this functionality to track completion | |
| of a set integer number of tasks which take roughly equal time to complete. | |
| Additionally, tasks can be skipped without skewing the average time per task. |
This file contains hidden or 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
| [core] | |
| # Use a global gitignore file to ignore files in all repositories. | |
| excludesFile = ~/.gitignore_global | |
| [apply] | |
| # Ignore whitespace when applying patches. | |
| ignoreWhitespace = change | |
| [branch] | |
| # When creating a new branch, set it to track the remote branch with the | |
| # same name. Equivalent to adding `--track` to `git branch` and related | |
| # commands. |
This file contains hidden or 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
| {-# LANGUAGE ConstraintKinds #-} | |
| {-# LANGUAGE ImplicitParams #-} | |
| -- Reproducer for a GHC bug: https://gitlab.haskell.org/ghc/ghc/-/issues/25529 | |
| module Main where | |
| import GHC.Stack (HasCallStack, CallStack, SrcLoc(srcLocStartLine, srcLocStartCol), callStack, getCallStack) | |
| main :: IO () |
This file contains hidden or 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
| source-repository-package | |
| type: git | |
| location: https://github.com/9999years/hs-certificate.git | |
| tag: 20aef750c8e3411bd61e553fa37f98c2696adf6f | |
| subdir: x509 | |
| source-repository-package | |
| type: git | |
| location: https://github.com/9999years/hs-certificate.git | |
| tag: 20aef750c8e3411bd61e553fa37f98c2696adf6f |
This file contains hidden or 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
| // .--------------------------------------------------------------------------. | |
| // | Send a daily Slack alert for Google Calendar events which need an RSVP | | |
| // `--------------------------------------------------------------------------' | |
| // | |
| // # What and why | |
| // | |
| // I kept getting surprised by interviews and other meetings the morning they | |
| // happened. Here's instructions for a Zapier "Zap" that checks if you haven't | |
| // RSVP'd to any of the next 50 events (by default) on your primary calendar, | |
| // and sends you a Slack DM alerting you of the events in question. It runs |
This file contains hidden or 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
| /* Given these variables: | |
| * | |
| * a: 2*b$ b: 7*d+c+2$ c: d+2$ d: 31*%e$ | |
| * | |
| * What's the symbolic representation of a? try "a, expand;". You'll get | |
| * 14d + 2c + 4. Evaluate it again and you'll get 2d + 434e + 8 -- oh no! One | |
| * of the variables has been substituted for its numeric value, and it's no | |
| * longer a value-independent *generic* equation. You'll have to evaluate that | |
| * another 3 times to get the decimal approximation (1356.268...), and you'll | |
| * never get a generic equation for a in terms of the other variables. |
This file contains hidden or 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
| /* functions for trapezoidal, midpoint, and | |
| * right/left endpoint approximations of integrals | |
| * arguments: | |
| * f(t): function to be approximated | |
| * t: dependent variable of f(t) | |
| * bottom: bottom limit of integration | |
| * top: top limit of integration | |
| * n: number of samples/slices to be used in approximation | |
| */ |
This file contains hidden or 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
| #lang r5rs | |
| (#%require schemeunit) | |
| (define ** expt) | |
| (define (!= x y) (not (= x y))) | |
| (define (^^ a b) (or (and a (not b)) | |
| (and b (not a)))) | |
| ; can you believe they made && and || special forms??? | |
| (define (&& a b) (and a b)) | |
| (define (|| a b) (or a b)) |
This file contains hidden or 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
| <# | |
| .DESCRIPTION | |
| Fetches wttr.in for a terminal weather report. | |
| .LINK | |
| http://stknohg.hatenablog.jp/entry/2016/02/22/195644 | |
| .LINK | |
| http://www.nivot.org/blog/post/2016/02/04/Windows-10-TH2-(v1511)-Console-Host-Enhancements |
NewerOlder