Skip to content

Instantly share code, notes, and snippets.

View gdevanla's full-sized avatar

Guru Devanla gdevanla

View GitHub Profile
#https://bcb.github.io/airflow/execute-context
from airflow.models import TaskInstance
ti=TaskInstance(task=t, execution_date=datetime.datetime.now())
ti.get_template_context()
@gdevanla
gdevanla / Printf.hs
Created November 12, 2020 04:36 — forked from gergoerdi/Printf.hs
{-# LANGUAGE GADTs, TypeInType, DataKinds, TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeApplications #-}
import GHC.TypeLits
import GHC.Types
import Data.Singletons
import Data.Singletons.Prelude
data Format = Lit Symbol | Str | Shown Type
import typing as tp
class Abstract:
def func1(self, *, x: int, y: str):
raise NotImplementedError()
-- Notes on how to wrap InputT over StateT to maintain the environment around a language repl.
type HaskellLineT = InputT (StateT Env IO) ()
runScriptInteractive = runStateT (runInputT defaultSettings loop) (initEnv Nothing)
where
loop :: HaskellLineT
loop = do
minput <- getInputLine "%"
when (isNothing minput) loop
@gdevanla
gdevanla / parser_combinators.py
Last active October 27, 2021 15:44
Parser Combinator in Python - Notes
import operator
import typing as tp
"""
a. Structure of Parser
p = (s -> Any object)
Partially consuming parser
p1 = (s -> (a, remaining))
@gdevanla
gdevanla / deploy_dolly_v2.ipynb
Created May 26, 2023 03:39 — forked from timesler/deploy_dolly_v2.ipynb
Deploy Dolly v2.0 to SageMaker
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.