this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

updates

+889 -9
+5
GraphExperiments/CHANGELOG.md
··· 1 + # Revision history for GraphExperiments 2 + 3 + ## 0.1.0.0 -- YYYY-mm-dd 4 + 5 + * First version. Released on an unsuspecting world.
+28
GraphExperiments/GraphExperiments.cabal
··· 1 + cabal-version: 2.4 2 + -- Initial package description 'GraphExperiments.cabal' generated by 'cabal 3 + -- init'. For further documentation, see 4 + -- http://haskell.org/cabal/users-guide/ 5 + 6 + name: GraphExperiments 7 + version: 0.1.0.0 8 + -- synopsis: 9 + -- description: 10 + -- bug-reports: 11 + -- license: 12 + author: Kaushik Chakraborty 13 + maintainer: git@kaushikc.org 14 + -- copyright: 15 + -- category: 16 + extra-source-files: CHANGELOG.md 17 + 18 + library 19 + -- other-modules: 20 + -- other-extensions: 21 + build-depends: base >=4.12 && <4.13, 22 + papa, 23 + containers, 24 + algebraic-graphs, 25 + hmatrix 26 + 27 + -- hs-source-dirs: 28 + default-language: Haskell2010
+2
GraphExperiments/Setup.hs
··· 1 + import Distribution.Simple 2 + main = defaultMain
+12 -3
GraphExperiments/Untitled.ipynb
··· 2 2 "cells": [ 3 3 { 4 4 "cell_type": "code", 5 - "execution_count": 3, 5 + "execution_count": 1, 6 6 "metadata": {}, 7 - "outputs": [], 7 + "outputs": [ 8 + { 9 + "ename": "", 10 + "evalue": "", 11 + "output_type": "error", 12 + "traceback": [ 13 + "<interactive>:1:1: error:\n Could not find module ‘Data.Tuple.Extra’\n Use -v to see a list of the files searched for." 14 + ] 15 + } 16 + ], 8 17 "source": [ 9 18 ":set -XNoImplicitPrelude\n", 10 19 ":set -XTupleSections\n", ··· 200 209 "file_extension": ".hs", 201 210 "name": "haskell", 202 211 "pygments_lexer": "Haskell", 203 - "version": "8.6.4" 212 + "version": "8.6.5" 204 213 } 205 214 }, 206 215 "nbformat": 4,
+2 -2
aoc-2019/AOC19-02.ipynb
··· 137 137 }, 138 138 { 139 139 "cell_type": "code", 140 - "execution_count": 21, 140 + "execution_count": 4, 141 141 "metadata": {}, 142 142 "outputs": [ 143 143 { ··· 161 161 }, 162 162 { 163 163 "cell_type": "code", 164 - "execution_count": 62, 164 + "execution_count": 5, 165 165 "metadata": {}, 166 166 "outputs": [ 167 167 {
+5
optics-book/CHANGELOG.md
··· 1 + # Revision history for optics-book 2 + 3 + ## 0.1.0.0 -- YYYY-mm-dd 4 + 5 + * First version. Released on an unsuspecting world.
+4
optics-book/Main.hs
··· 1 + module Main where 2 + 3 + main :: IO () 4 + main = putStrLn "Hello, Haskell!"
+2
optics-book/Setup.hs
··· 1 + import Distribution.Simple 2 + main = defaultMain
+522
optics-book/Untitled.ipynb
··· 1 + { 2 + "cells": [ 3 + { 4 + "cell_type": "code", 5 + "execution_count": 1, 6 + "metadata": {}, 7 + "outputs": [], 8 + "source": [ 9 + "import Control.Lens\n", 10 + "import Control.Applicative \n", 11 + "import Data.Char\n", 12 + "import qualified Data.Map as M \n", 13 + "import qualified Data.Set as S \n", 14 + "import qualified Data.Text as T" 15 + ] 16 + }, 17 + { 18 + "cell_type": "code", 19 + "execution_count": 2, 20 + "metadata": {}, 21 + "outputs": [], 22 + "source": [ 23 + ":extension TemplateHaskell\n", 24 + ":extension FlexibleInstances\n", 25 + ":extension FlexibleContexts\n", 26 + ":extension RankNTypes\n", 27 + ":extension ScopedTypeVariables\n", 28 + ":extension TypeApplications\n", 29 + ":extension TypeFamilies\n", 30 + ":extension InstanceSigs" 31 + ] 32 + }, 33 + { 34 + "cell_type": "code", 35 + "execution_count": 3, 36 + "metadata": {}, 37 + "outputs": [ 38 + { 39 + "data": { 40 + "text/plain": [ 41 + "Just \"racecar\"" 42 + ] 43 + }, 44 + "metadata": {}, 45 + "output_type": "display_data" 46 + }, 47 + { 48 + "data": { 49 + "text/plain": [ 50 + "True" 51 + ] 52 + }, 53 + "metadata": {}, 54 + "output_type": "display_data" 55 + }, 56 + { 57 + "data": { 58 + "text/plain": [ 59 + "Just (3,\"Be\")" 60 + ] 61 + }, 62 + "metadata": {}, 63 + "output_type": "display_data" 64 + }, 65 + { 66 + "data": { 67 + "text/plain": [ 68 + "Just \"there\"" 69 + ] 70 + }, 71 + "metadata": {}, 72 + "output_type": "display_data" 73 + }, 74 + { 75 + "data": { 76 + "text/plain": [ 77 + "\"cba\"" 78 + ] 79 + }, 80 + "metadata": {}, 81 + "output_type": "display_data" 82 + }, 83 + { 84 + "data": { 85 + "text/plain": [ 86 + "\"54321\"" 87 + ] 88 + }, 89 + "metadata": {}, 90 + "output_type": "display_data" 91 + }, 92 + { 93 + "data": { 94 + "text/plain": [ 95 + "[\"b\",\"d\"]" 96 + ] 97 + }, 98 + "metadata": {}, 99 + "output_type": "display_data" 100 + } 101 + ], 102 + "source": [ 103 + "import Data.Ord (comparing)\n", 104 + "\n", 105 + "checkPalindrome :: String -> Bool\n", 106 + "checkPalindrome s = reverse s == s\n", 107 + "\n", 108 + "input1 = [\"umbrella\", \"olives\", \"racecar\", \"hammer\"]\n", 109 + "findOf folded checkPalindrome input1\n", 110 + "\n", 111 + "input2 = (2, 4, 6)\n", 112 + "allOf each even input2\n", 113 + "\n", 114 + "input3 = [(2, \"I'll\"), (3, \"Be\"), (1, \"Back\")]\n", 115 + "maximumByOf folded (comparing fst) input3\n", 116 + "\n", 117 + "\n", 118 + "countVowels :: String -> Int\n", 119 + "countVowels = length . filter (\\c -> elemOf folded c \"aeiou\")\n", 120 + "\n", 121 + "input4 = \"Do or do not, there is no try.\"\n", 122 + "maximumByOf worded (comparing countVowels) input4\n", 123 + "\n", 124 + "input5 = [\"a\", \"b\", \"c\"]\n", 125 + "foldrOf folded (flip (++)) mempty input5\n", 126 + "\n", 127 + "input6 = [(12, 45, 66), (91, 123, 87)]\n", 128 + "toListOf (folded . _2 . to (reverse . show) . folded) input6\n", 129 + "\n", 130 + "input7 = [(1, \"a\"), (2, \"b\"), (3, \"c\"), (4, \"d\")]\n", 131 + "foldMapOf folded (\\(a , r) -> [r | even a]) input7\n" 132 + ] 133 + }, 134 + { 135 + "cell_type": "code", 136 + "execution_count": 4, 137 + "metadata": {}, 138 + "outputs": [ 139 + { 140 + "data": { 141 + "text/plain": [ 142 + "\"looking at you, kid\"" 143 + ] 144 + }, 145 + "metadata": {}, 146 + "output_type": "display_data" 147 + }, 148 + { 149 + "data": { 150 + "text/plain": [ 151 + "[\"My\",\"Hakuna\",\"No\"]" 152 + ] 153 + }, 154 + "metadata": {}, 155 + "output_type": "display_data" 156 + }, 157 + { 158 + "data": { 159 + "text/plain": [ 160 + "[\"My\"]" 161 + ] 162 + }, 163 + "metadata": {}, 164 + "output_type": "display_data" 165 + }, 166 + { 167 + "data": { 168 + "text/plain": [ 169 + "\"MyHakunaNo\"" 170 + ] 171 + }, 172 + "metadata": {}, 173 + "output_type": "display_data" 174 + }, 175 + { 176 + "data": { 177 + "text/plain": [ 178 + "60" 179 + ] 180 + }, 181 + "metadata": {}, 182 + "output_type": "display_data" 183 + }, 184 + { 185 + "data": { 186 + "text/plain": [ 187 + "[\"evil\",\"guns\",\"stressed\"]" 188 + ] 189 + }, 190 + "metadata": {}, 191 + "output_type": "display_data" 192 + }, 193 + { 194 + "data": { 195 + "text/plain": [ 196 + "[\"live\",\"snug\",\"desserts\"]" 197 + ] 198 + }, 199 + "metadata": {}, 200 + "output_type": "display_data" 201 + }, 202 + { 203 + "data": { 204 + "text/plain": [ 205 + "\"1829420\"" 206 + ] 207 + }, 208 + "metadata": {}, 209 + "output_type": "display_data" 210 + }, 211 + { 212 + "data": { 213 + "text/plain": [ 214 + "2" 215 + ] 216 + }, 217 + "metadata": {}, 218 + "output_type": "display_data" 219 + }, 220 + { 221 + "data": { 222 + "text/plain": [ 223 + "Just 4" 224 + ] 225 + }, 226 + "metadata": {}, 227 + "output_type": "display_data" 228 + }, 229 + { 230 + "data": { 231 + "text/plain": [ 232 + "2" 233 + ] 234 + }, 235 + "metadata": {}, 236 + "output_type": "display_data" 237 + }, 238 + { 239 + "data": { 240 + "text/plain": [ 241 + "[4,3,8,6]" 242 + ] 243 + }, 244 + "metadata": {}, 245 + "output_type": "display_data" 246 + }, 247 + { 248 + "data": { 249 + "text/plain": [ 250 + "[4,3,8,6,-2,3]" 251 + ] 252 + }, 253 + "metadata": {}, 254 + "output_type": "display_data" 255 + }, 256 + { 257 + "data": { 258 + "text/plain": [ 259 + "[4,3,8,6,-2,3]" 260 + ] 261 + }, 262 + "metadata": {}, 263 + "output_type": "display_data" 264 + } 265 + ], 266 + "source": [ 267 + "-- higher order folds\n", 268 + "\n", 269 + "\"Here's looking at you, kid\" ^.. dropping 7 folded\n", 270 + "\n", 271 + "[\"My Precious\", \"Hakuna Matata\", \"No problemo\"] ^.. folded . taking 1 worded\n", 272 + "\n", 273 + "[\"My Precious\", \"Hakuna Matata\", \"No problemo\"] ^.. taking 1 (folded . worded)\n", 274 + "\n", 275 + "[\"My Precious\", \"Hakuna Matata\", \"No problemo\"] ^.. folded . taking 1 worded . folded\n", 276 + "\n", 277 + "sumOf (taking 2 each) (10, 50, 100)\n", 278 + "\n", 279 + "(\"stressed\", \"guns\", \"evil\") ^.. backwards each\n", 280 + "\n", 281 + "(\"stressed\", \"guns\", \"evil\") ^.. backwards each . to reverse\n", 282 + " \n", 283 + "\"blink182 k9 blazeit420\" ^.. worded . droppingWhile isAlpha folded\n", 284 + "\n", 285 + "sample :: [Int]\n", 286 + "sample = [-10, -5, 4, 3, 8, 6, -2, 3, -5, -7]\n", 287 + "\n", 288 + "lengthOf (takingWhile (<= 0) folded) sample\n", 289 + "\n", 290 + "maximumOf (taking 4 folded) sample\n", 291 + "\n", 292 + "(lengthOf . backwards) (takingWhile (<= 0) folded) sample\n", 293 + "\n", 294 + "sample ^.. droppingWhile (<= 0) folded ^.. takingWhile (> 0) folded\n", 295 + "\n", 296 + "(sample ^.. droppingWhile (<= 0) folded) ^.. backwards (droppingWhile (<= 0) (backwards folded))\n", 297 + "\n", 298 + "trimmingWhile :: (a -> Bool) -> Fold s a -> Fold s a\n", 299 + "trimmingWhile f s = backwards $ droppingWhile f $ backwards $ droppingWhile f s\n", 300 + "\n", 301 + "sample ^.. trimmingWhile (<= 0) folded\n" 302 + ] 303 + }, 304 + { 305 + "cell_type": "code", 306 + "execution_count": 44, 307 + "metadata": {}, 308 + "outputs": [ 309 + { 310 + "data": { 311 + "text/plain": [ 312 + "(\"N/A\",\"N/A\")" 313 + ] 314 + }, 315 + "metadata": {}, 316 + "output_type": "display_data" 317 + }, 318 + { 319 + "data": { 320 + "text/plain": [ 321 + "(\"xxxxxxxx\",\"xxxx\")" 322 + ] 323 + }, 324 + "metadata": {}, 325 + "output_type": "display_data" 326 + }, 327 + { 328 + "data": { 329 + "text/plain": [ 330 + "(\"Mal\",[\"Kay\",\"Ina\",\"Jay\"])" 331 + ] 332 + }, 333 + "metadata": {}, 334 + "output_type": "display_data" 335 + }, 336 + { 337 + "data": { 338 + "text/plain": [ 339 + "(\"Malcolm\",[\"Kaylee\",\"River\",\"Jayne\"])" 340 + ] 341 + }, 342 + "metadata": {}, 343 + "output_type": "display_data" 344 + }, 345 + { 346 + "data": { 347 + "text/plain": [ 348 + "[\"Die xxxxxxx Day\",\"Live xxx Let Die\",\"You xxxx Live Twice\"]" 349 + ] 350 + }, 351 + "metadata": {}, 352 + "output_type": "display_data" 353 + }, 354 + { 355 + "data": { 356 + "text/plain": [ 357 + "((2,3),(4,5))" 358 + ] 359 + }, 360 + "metadata": {}, 361 + "output_type": "display_data" 362 + }, 363 + { 364 + "data": { 365 + "text/plain": [ 366 + "(2,(3,[4,5]))" 367 + ] 368 + }, 369 + "metadata": {}, 370 + "output_type": "display_data" 371 + }, 372 + { 373 + "data": { 374 + "text/plain": [ 375 + "((True,\"STRAwberries\"),(False,\"Blueberries\"),(True,\"BLACkberries\"))" 376 + ] 377 + }, 378 + "metadata": {}, 379 + "output_type": "display_data" 380 + }, 381 + { 382 + "data": { 383 + "text/plain": [ 384 + "(\"Strawberries\",\"Blueberries\",\"Blackberries\")" 385 + ] 386 + }, 387 + "metadata": {}, 388 + "output_type": "display_data" 389 + } 390 + ], 391 + "source": [ 392 + "-- simple traversals\n", 393 + "(\"Jurassic\", \"Park\") & both .~ \"N/A\"\n", 394 + "(\"Jurassic\", \"Park\") & both . traversed .~ 'x'\n", 395 + "(\"Malcolm\", [\"Kaylee\", \"Inara\", \"Jayne\"]) & beside id traversed %~ take 3\n", 396 + "(\"Malcolm\", [\"Kaylee\", \"Inara\", \"Jayne\"]) & _2 . element 1 .~ \"River\"\n", 397 + "[\"Die Another Day\", \"Live and Let Die\", \"You Only Live Twice\"] & traversed . elementOf worded 1 . traversed .~ 'x'\n", 398 + "((1, 2), (3, 4)) & both . both +~ 1\n", 399 + "(1, (2, [3, 4])) & beside id (beside id traversed) +~ 1\n", 400 + "\n", 401 + "import Data.Char (toUpper)\n", 402 + "\n", 403 + "((True, \"Strawberries\"), (False, \"Blueberries\"), (True, \"Blackberries\")) \n", 404 + " & each . filtered ( (== True) . fst) . _2 . taking 4 traversed %~ toUpper\n", 405 + " \n", 406 + "((True, \"Strawberries\"), (False, \"Blueberries\"), (True, \"Blackberries\")) & each %~ snd" 407 + ] 408 + }, 409 + { 410 + "cell_type": "code", 411 + "execution_count": 77, 412 + "metadata": {}, 413 + "outputs": [ 414 + { 415 + "data": { 416 + "text/plain": [ 417 + "[[('a',1),('c',2)],[('a',1),('d',2)],[('b',1),('c',2)],[('b',1),('d',2)]]" 418 + ] 419 + }, 420 + "metadata": {}, 421 + "output_type": "display_data" 422 + }, 423 + { 424 + "data": { 425 + "text/plain": [ 426 + "ZipList {getZipList = [[1,3],[2,4]]}" 427 + ] 428 + }, 429 + "metadata": {}, 430 + "output_type": "display_data" 431 + }, 432 + { 433 + "data": { 434 + "text/plain": [ 435 + "ZipList {getZipList = [[('a',1),('b',3)],[('a',2),('b',4)]]}" 436 + ] 437 + }, 438 + "metadata": {}, 439 + "output_type": "display_data" 440 + }, 441 + { 442 + "data": { 443 + "text/plain": [ 444 + "(([1,2,3],(4,5)),5)" 445 + ] 446 + }, 447 + "metadata": {}, 448 + "output_type": "display_data" 449 + } 450 + ], 451 + "source": [ 452 + "-- traversal actions\n", 453 + "sequenceAOf (traversed . _1) [(\"ab\", 1), (\"cd\", 2)]\n", 454 + "\n", 455 + "sequenceAOf traversed [ZipList [1, 2], ZipList [3, 4]]\n", 456 + "sequenceAOf (traversed . _2) [('a', ZipList [1,2]), ('b', ZipList [3,4])]\n", 457 + "\n", 458 + "import Control.Monad.State\n", 459 + "\n", 460 + "let result = traverseOf (beside traversed both)\n", 461 + " (\\n -> modify (+n) >> get) \n", 462 + " ([1, 1, 1], (1, 1))\n", 463 + " \n", 464 + "runState result 0\n", 465 + "\n", 466 + "\n", 467 + "-- data User = User { \n", 468 + "-- _name :: String\n", 469 + "-- , _age :: Int\n", 470 + "-- } deriving Show \n", 471 + "-- makeLenses ''User\n", 472 + "\n", 473 + "-- data Account = Account { \n", 474 + "-- _id :: String\n", 475 + "-- , _user :: User\n", 476 + "-- } deriving Show\n", 477 + "-- makeLenses ''Account\n", 478 + "\n", 479 + "-- validateAge :: Account -> Either String Account \n", 480 + "-- validateAge = (user . age) %%~ (\\u -> if (u > 0 && u < 150) then Right u else Left \"Error\" )\n", 481 + "-- validateAge = _\n", 482 + "\n", 483 + "\n" 484 + ] 485 + }, 486 + { 487 + "cell_type": "code", 488 + "execution_count": 48, 489 + "metadata": {}, 490 + "outputs": [ 491 + { 492 + "data": { 493 + "text/plain": [ 494 + "ZipList {getZipList = [1,2,3]}" 495 + ] 496 + }, 497 + "metadata": {}, 498 + "output_type": "display_data" 499 + } 500 + ], 501 + "source": [ 502 + "ZipList [1,2,3]" 503 + ] 504 + } 505 + ], 506 + "metadata": { 507 + "kernelspec": { 508 + "display_name": "Haskell", 509 + "language": "haskell", 510 + "name": "haskell" 511 + }, 512 + "language_info": { 513 + "codemirror_mode": "ihaskell", 514 + "file_extension": ".hs", 515 + "name": "haskell", 516 + "pygments_lexer": "Haskell", 517 + "version": "8.6.5" 518 + } 519 + }, 520 + "nbformat": 4, 521 + "nbformat_minor": 4 522 + }
+31
optics-book/optics-book.cabal
··· 1 + cabal-version: >=1.10 2 + -- Initial package description 'optics-book.cabal' generated by 'cabal 3 + -- init'. For further documentation, see 4 + -- http://haskell.org/cabal/users-guide/ 5 + 6 + name: optics-book 7 + version: 0.1.0.0 8 + -- synopsis: 9 + -- description: 10 + -- bug-reports: 11 + -- license: 12 + author: Kaushik Chakraborty 13 + maintainer: git@kaushikc.org 14 + -- copyright: 15 + -- category: 16 + build-type: Simple 17 + extra-source-files: CHANGELOG.md 18 + 19 + executable optics-book 20 + main-is: Main.hs 21 + -- other-modules: 22 + -- other-extensions: 23 + build-depends: base >=4.12 && <4.13, 24 + aeson, 25 + containers, 26 + lens, 27 + lens-aeson, 28 + mtl, 29 + text 30 + -- hs-source-dirs: 31 + default-language: Haskell2010
+22
stack.yaml
··· 1 + resolver: lts-14.27 2 + packages: 3 + - stats 4 + - GraphExperiments 5 + - optics-book 6 + extra-deps: 7 + - papa-0.3.1@sha256:4268f247a272a13ee26c2d23cbf39d344127151271e4ae63404bdd8b1750c598,2110 8 + - papa-base-0.3.1@sha256:5ee6f4110973147cb27d129e23a246b8ef31f47b7799bf8f15ed170e30a043e7,1410 9 + - papa-base-export-0.4@sha256:9f61386150363e4219becfb79b9a82267b603b68d428b1055039183ae9ae72f7,2356 10 + - papa-base-implement-0.3.1@sha256:4aebf6c11be41d39af458f2fc3095fe427a577c537caf074d38f4988b1bdc0f5,1843 11 + - papa-bifunctors-0.3.1@sha256:5e23e21e6808d258353cd59f117a2f45aca3295369583703eda484f7742df6b2,1444 12 + - papa-bifunctors-export-0.3.1@sha256:f5cc540d31e0e1563fbf7ebc56133bf4e7b3d1d82fa55d6d5ad36855c6dab2b4,1446 13 + - papa-bifunctors-implement-0.3.1@sha256:76557bbd0de4007a31e9176332fe3c8d67e30a76a2adf5942d0aca2eea76f638,1454 14 + - papa-lens-0.3.1@sha256:9ef95dd7f093d401e7664678d560fd6b52cf4b3851f63f882148e65f2504f949,1410 15 + - papa-lens-export-0.3.1@sha256:597c67c2ac86190204a1b533132867fa0c10b23f706865cdd8308f3cae70574e,1354 16 + - papa-lens-implement-0.3.1@sha256:da2333189ffcd759469796ac61f16ca0d5b40fd6349279d4719e653783893931,1517 17 + - papa-semigroupoids-0.3.1@sha256:7e3812d429a964d6d7a9645b52f96767ce7d5c3eca9837707d26852c9dbe40cf,1455 18 + - papa-semigroupoids-export-0.3.1@sha256:35096c64ce9b1022fa5637c6f113b54e4571077d45063eca0501c54bbf0deb9a,1399 19 + - papa-semigroupoids-implement-0.3.1@sha256:faf05ee1747a9efd40b160be6868e9589c2a6554455903b7511be9b006212c20,1598 20 + - papa-x-0.3.1@sha256:66459325002db9a8568532fcb9d437ae933cdaaf8306fba19772528f52948c16,1407 21 + - papa-x-export-0.3.1@sha256:54b362010532140a66d6db89001175ca3d396d8d6a5ca89606c3bca57cbc0e72,1285 22 + - papa-x-implement-0.3.1@sha256:148ba519294dad3e465a1d85f4d0e217acd1704d594b63e781c2a1d910e91837,1303
+5
stats/CHANGELOG.md
··· 1 + # Revision history for stats 2 + 3 + ## 0.1.0.0 -- YYYY-mm-dd 4 + 5 + * First version. Released on an unsuspecting world.
+202
stats/LICENSE
··· 1 + 2 + Apache License 3 + Version 2.0, January 2004 4 + http://www.apache.org/licenses/ 5 + 6 + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 + 8 + 1. Definitions. 9 + 10 + "License" shall mean the terms and conditions for use, reproduction, 11 + and distribution as defined by Sections 1 through 9 of this document. 12 + 13 + "Licensor" shall mean the copyright owner or entity authorized by 14 + the copyright owner that is granting the License. 15 + 16 + "Legal Entity" shall mean the union of the acting entity and all 17 + other entities that control, are controlled by, or are under common 18 + control with that entity. For the purposes of this definition, 19 + "control" means (i) the power, direct or indirect, to cause the 20 + direction or management of such entity, whether by contract or 21 + otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 + outstanding shares, or (iii) beneficial ownership of such entity. 23 + 24 + "You" (or "Your") shall mean an individual or Legal Entity 25 + exercising permissions granted by this License. 26 + 27 + "Source" form shall mean the preferred form for making modifications, 28 + including but not limited to software source code, documentation 29 + source, and configuration files. 30 + 31 + "Object" form shall mean any form resulting from mechanical 32 + transformation or translation of a Source form, including but 33 + not limited to compiled object code, generated documentation, 34 + and conversions to other media types. 35 + 36 + "Work" shall mean the work of authorship, whether in Source or 37 + Object form, made available under the License, as indicated by a 38 + copyright notice that is included in or attached to the work 39 + (an example is provided in the Appendix below). 40 + 41 + "Derivative Works" shall mean any work, whether in Source or Object 42 + form, that is based on (or derived from) the Work and for which the 43 + editorial revisions, annotations, elaborations, or other modifications 44 + represent, as a whole, an original work of authorship. For the purposes 45 + of this License, Derivative Works shall not include works that remain 46 + separable from, or merely link (or bind by name) to the interfaces of, 47 + the Work and Derivative Works thereof. 48 + 49 + "Contribution" shall mean any work of authorship, including 50 + the original version of the Work and any modifications or additions 51 + to that Work or Derivative Works thereof, that is intentionally 52 + submitted to Licensor for inclusion in the Work by the copyright owner 53 + or by an individual or Legal Entity authorized to submit on behalf of 54 + the copyright owner. For the purposes of this definition, "submitted" 55 + means any form of electronic, verbal, or written communication sent 56 + to the Licensor or its representatives, including but not limited to 57 + communication on electronic mailing lists, source code control systems, 58 + and issue tracking systems that are managed by, or on behalf of, the 59 + Licensor for the purpose of discussing and improving the Work, but 60 + excluding communication that is conspicuously marked or otherwise 61 + designated in writing by the copyright owner as "Not a Contribution." 62 + 63 + "Contributor" shall mean Licensor and any individual or Legal Entity 64 + on behalf of whom a Contribution has been received by Licensor and 65 + subsequently incorporated within the Work. 66 + 67 + 2. Grant of Copyright License. Subject to the terms and conditions of 68 + this License, each Contributor hereby grants to You a perpetual, 69 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 + copyright license to reproduce, prepare Derivative Works of, 71 + publicly display, publicly perform, sublicense, and distribute the 72 + Work and such Derivative Works in Source or Object form. 73 + 74 + 3. Grant of Patent License. Subject to the terms and conditions of 75 + this License, each Contributor hereby grants to You a perpetual, 76 + worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 + (except as stated in this section) patent license to make, have made, 78 + use, offer to sell, sell, import, and otherwise transfer the Work, 79 + where such license applies only to those patent claims licensable 80 + by such Contributor that are necessarily infringed by their 81 + Contribution(s) alone or by combination of their Contribution(s) 82 + with the Work to which such Contribution(s) was submitted. If You 83 + institute patent litigation against any entity (including a 84 + cross-claim or counterclaim in a lawsuit) alleging that the Work 85 + or a Contribution incorporated within the Work constitutes direct 86 + or contributory patent infringement, then any patent licenses 87 + granted to You under this License for that Work shall terminate 88 + as of the date such litigation is filed. 89 + 90 + 4. Redistribution. You may reproduce and distribute copies of the 91 + Work or Derivative Works thereof in any medium, with or without 92 + modifications, and in Source or Object form, provided that You 93 + meet the following conditions: 94 + 95 + (a) You must give any other recipients of the Work or 96 + Derivative Works a copy of this License; and 97 + 98 + (b) You must cause any modified files to carry prominent notices 99 + stating that You changed the files; and 100 + 101 + (c) You must retain, in the Source form of any Derivative Works 102 + that You distribute, all copyright, patent, trademark, and 103 + attribution notices from the Source form of the Work, 104 + excluding those notices that do not pertain to any part of 105 + the Derivative Works; and 106 + 107 + (d) If the Work includes a "NOTICE" text file as part of its 108 + distribution, then any Derivative Works that You distribute must 109 + include a readable copy of the attribution notices contained 110 + within such NOTICE file, excluding those notices that do not 111 + pertain to any part of the Derivative Works, in at least one 112 + of the following places: within a NOTICE text file distributed 113 + as part of the Derivative Works; within the Source form or 114 + documentation, if provided along with the Derivative Works; or, 115 + within a display generated by the Derivative Works, if and 116 + wherever such third-party notices normally appear. The contents 117 + of the NOTICE file are for informational purposes only and 118 + do not modify the License. You may add Your own attribution 119 + notices within Derivative Works that You distribute, alongside 120 + or as an addendum to the NOTICE text from the Work, provided 121 + that such additional attribution notices cannot be construed 122 + as modifying the License. 123 + 124 + You may add Your own copyright statement to Your modifications and 125 + may provide additional or different license terms and conditions 126 + for use, reproduction, or distribution of Your modifications, or 127 + for any such Derivative Works as a whole, provided Your use, 128 + reproduction, and distribution of the Work otherwise complies with 129 + the conditions stated in this License. 130 + 131 + 5. Submission of Contributions. Unless You explicitly state otherwise, 132 + any Contribution intentionally submitted for inclusion in the Work 133 + by You to the Licensor shall be under the terms and conditions of 134 + this License, without any additional terms or conditions. 135 + Notwithstanding the above, nothing herein shall supersede or modify 136 + the terms of any separate license agreement you may have executed 137 + with Licensor regarding such Contributions. 138 + 139 + 6. Trademarks. This License does not grant permission to use the trade 140 + names, trademarks, service marks, or product names of the Licensor, 141 + except as required for reasonable and customary use in describing the 142 + origin of the Work and reproducing the content of the NOTICE file. 143 + 144 + 7. Disclaimer of Warranty. Unless required by applicable law or 145 + agreed to in writing, Licensor provides the Work (and each 146 + Contributor provides its Contributions) on an "AS IS" BASIS, 147 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 + implied, including, without limitation, any warranties or conditions 149 + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 + PARTICULAR PURPOSE. You are solely responsible for determining the 151 + appropriateness of using or redistributing the Work and assume any 152 + risks associated with Your exercise of permissions under this License. 153 + 154 + 8. Limitation of Liability. In no event and under no legal theory, 155 + whether in tort (including negligence), contract, or otherwise, 156 + unless required by applicable law (such as deliberate and grossly 157 + negligent acts) or agreed to in writing, shall any Contributor be 158 + liable to You for damages, including any direct, indirect, special, 159 + incidental, or consequential damages of any character arising as a 160 + result of this License or out of the use or inability to use the 161 + Work (including but not limited to damages for loss of goodwill, 162 + work stoppage, computer failure or malfunction, or any and all 163 + other commercial damages or losses), even if such Contributor 164 + has been advised of the possibility of such damages. 165 + 166 + 9. Accepting Warranty or Additional Liability. While redistributing 167 + the Work or Derivative Works thereof, You may choose to offer, 168 + and charge a fee for, acceptance of support, warranty, indemnity, 169 + or other liability obligations and/or rights consistent with this 170 + License. However, in accepting such obligations, You may act only 171 + on Your own behalf and on Your sole responsibility, not on behalf 172 + of any other Contributor, and only if You agree to indemnify, 173 + defend, and hold each Contributor harmless for any liability 174 + incurred by, or claims asserted against, such Contributor by reason 175 + of your accepting any such warranty or additional liability. 176 + 177 + END OF TERMS AND CONDITIONS 178 + 179 + APPENDIX: How to apply the Apache License to your work. 180 + 181 + To apply the Apache License to your work, attach the following 182 + boilerplate notice, with the fields enclosed by brackets "[]" 183 + replaced with your own identifying information. (Don't include 184 + the brackets!) The text should be enclosed in the appropriate 185 + comment syntax for the file format. We also recommend that a 186 + file or class name and description of purpose be included on the 187 + same "printed page" as the copyright notice for easier 188 + identification within third-party archives. 189 + 190 + Copyright [yyyy] [name of copyright owner] 191 + 192 + Licensed under the Apache License, Version 2.0 (the "License"); 193 + you may not use this file except in compliance with the License. 194 + You may obtain a copy of the License at 195 + 196 + http://www.apache.org/licenses/LICENSE-2.0 197 + 198 + Unless required by applicable law or agreed to in writing, software 199 + distributed under the License is distributed on an "AS IS" BASIS, 200 + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 + See the License for the specific language governing permissions and 202 + limitations under the License.
+4
stats/MyLib.hs
··· 1 + module MyLib (someFunc) where 2 + 3 + someFunc :: IO () 4 + someFunc = putStrLn "someFunc"
+2
stats/Setup.hs
··· 1 + import Distribution.Simple 2 + main = defaultMain
+13 -4
stats/Untitled.ipynb
··· 2 2 "cells": [ 3 3 { 4 4 "cell_type": "code", 5 - "execution_count": 1, 5 + "execution_count": 4, 6 6 "metadata": {}, 7 - "outputs": [], 7 + "outputs": [ 8 + { 9 + "ename": "", 10 + "evalue": "", 11 + "output_type": "error", 12 + "traceback": [ 13 + "<interactive>:1:1: error:\n Could not find module ‘Papa’\n Use -v to see a list of the files searched for." 14 + ] 15 + } 16 + ], 8 17 "source": [ 9 18 "import Data.List\n", 10 - "import Combinatorics" 19 + "import Combinatorics\n" 11 20 ] 12 21 }, 13 22 { ··· 60 69 "file_extension": ".hs", 61 70 "name": "haskell", 62 71 "pygments_lexer": "Haskell", 63 - "version": "8.4.4" 72 + "version": "8.6.5" 64 73 } 65 74 }, 66 75 "nbformat": 4,
+28
stats/stats.cabal
··· 1 + cabal-version: 2.4 2 + -- Initial package description 'stats.cabal' generated by 'cabal init'. 3 + -- For further documentation, see http://haskell.org/cabal/users-guide/ 4 + 5 + name: stats 6 + version: 0.1.0.0 7 + -- synopsis: 8 + -- description: 9 + -- bug-reports: 10 + license: Apache-2.0 11 + license-file: LICENSE 12 + author: Kaushik Chakraborty 13 + maintainer: git@kaushikc.org 14 + -- copyright: 15 + -- category: 16 + extra-source-files: CHANGELOG.md 17 + 18 + library 19 + exposed-modules: MyLib 20 + -- other-modules: 21 + -- other-extensions: 22 + build-depends: base ^>=4.12.0.0, 23 + papa, 24 + linear, 25 + vector, 26 + combinatorial 27 + -- hs-source-dirs: 28 + default-language: Haskell2010