import Control.Concurrent
import Data.Map.Lazy as LM
import Data.Map.Strict as SM
import System.IO.Unsafe
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 functools | |
import types | |
def attrfunc(func=None, **attrs): | |
if not func: | |
return functools.partial(attrfunc, **attrs) | |
return AttrFunc(func, **attrs) | |
class AttrFunc: | |
def __init__(self, func, **attrs): |
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
# switch_0.py | |
# Runs actions/values as they are found | |
class FirstMatchFound(Exception): | |
pass | |
class InvalidResultTypeError(Exception): | |
pass |
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
""" | |
Use this file to write your solution for the Summer Code Jam 2020 Qualifier. | |
Important notes for submission: | |
- Do not change the names of the two classes included below. The test suite we | |
will use to test your submission relies on existence these two classes. | |
- You can leave the `ArticleField` class as-is if you do not wish to tackle the | |
advanced requirements. |
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
let g:old_path = "" | |
function CheckPoetry() | |
let s:poetry = system("poetry env list --full-path") | |
if v:shell_error | |
return "" | |
else | |
return substitute(s:poetry, " (Activated)\n", "", "") . "/bin:" | |
endif |
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
;; Terrible code, I know | |
;; Reference: https://github.com/akermu/emacs-libvterm/issues/24 | |
(after! vterm (progn (defun vterm--kill-vterm-buffer-and-window (process _) | |
"Kill buffer and window on vterm process termination." | |
(when (not (process-live-p process)) | |
(let ((buf (process-buffer process))) | |
(when (buffer-live-p buf) | |
(with-current-buffer buf | |
(kill-buffer) | |
(ignore-errors (delete-window)) |
I hereby claim:
- I am purefunctor on github.
- I am purefunctor (https://keybase.io/purefunctor) on keybase.
- I have a public key ASCMMHUzQ7cIe7K2p0_1VjvWVyy4hUo1ky916apWPEJh3wo
To claim this, I am signing this object:
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
from typing import Generic, overload, Literal, TypeVar, Union | |
_Head = TypeVar("_Head") | |
_Tail = TypeVar("_Tail") | |
class HeadTuple(Generic[_Head, _Tail]): | |
def __init__(self, head: _Head, *tail: _Tail) -> None: | |
self._head = head |
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 Main where | |
import Prelude | |
import Data.Either (Either) | |
import Data.Int (round) | |
import Effect (Effect) | |
import Effect.Aff (Aff, Milliseconds(..), attempt, delay, error, forkAff, joinFiber, killFiber, launchAff_) | |
import Effect.Class (liftEffect) | |
import Effect.Class.Console (logShow) |
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 Main where | |
import Prelude | |
import Effect (Effect) | |
import Effect.Console (log) | |
data Effect_Console = Effect_Console | |
main :: Effect Unit |
OlderNewer