_id
stringlengths
64
64
repository
stringlengths
6
84
name
stringlengths
4
110
content
stringlengths
0
248k
license
null
download_url
stringlengths
89
454
language
stringclasses
7 values
comments
stringlengths
0
74.6k
code
stringlengths
0
248k
1f9a66bbe4bb4396492730a5ded2ae87ff4892c77d5b60a0f0938bd792dff919
holyjak/minimalist-fulcro-template-backendless
app.cljs
(ns com.example.app (:require [com.example.mock-server :as mock-server] [com.fulcrologic.fulcro.application :as app] [edn-query-language.core :as eql])) (defn global-eql-transform [ast] (-> ast (app/default-global-eql-transform) Make sure that if Pathom sends : :p / errors , Fulcro does not remo...
null
https://raw.githubusercontent.com/holyjak/minimalist-fulcro-template-backendless/be1630623191d847e14e8854649d58604ca95f5c/src/com/example/app.cljs
clojure
(ns com.example.app (:require [com.example.mock-server :as mock-server] [com.fulcrologic.fulcro.application :as app] [edn-query-language.core :as eql])) (defn global-eql-transform [ast] (-> ast (app/default-global-eql-transform) Make sure that if Pathom sends : :p / errors , Fulcro does not remo...
bbf409ff71bb440d0b034a4557a037337ed6512faf52d98ba9bd362f10c0984f
janestreet/async
tco.ml
open Core open Async Identical in semantics to Deferred.unit but takes a little longer . let tick = Scheduler.schedule' (fun () -> return ()) let bind_upon t f = ignore (t >>= fun a -> f a; Deferred.unit) ;; (* So, there /is/ a subtle difference in semantics between the * bind and upon versio...
null
https://raw.githubusercontent.com/janestreet/async/a42d7fd4d14b2125c4bdf546d03d1a6aedf76b90/bench/tco.ml
ocaml
So, there /is/ a subtle difference in semantics between the * bind and upon versions, as can be seen by the instance of 'ignore' * in bind_upon. It should always be possible to fix bind, but not * necessarily upon (whose callback patterns are unrestricted).
open Core open Async Identical in semantics to Deferred.unit but takes a little longer . let tick = Scheduler.schedule' (fun () -> return ()) let bind_upon t f = ignore (t >>= fun a -> f a; Deferred.unit) ;; let rec bind_loop = function | 0 -> tick | n -> tick >>= fun () -> bind_loop (n -...
8aeb634d7ffe49d067c11593c04de301a7677204364e34893291fb7e9e9f75af
pixlsus/registry.gimp.org_static
fixoverblown.scm
FixOverblown is a script for ; ; This script helps fix overblown areas of an image. ; ; The script is located in "<Image> / Script-Fu / Enhance / Fix Overblown" ; Last changed : 2009 June 18 ; Copyright ( C ) 2009 < > ; ; -------------------------------------------------------------------- ; ; Changelog: ...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/fixoverblown.scm
scheme
This script helps fix overblown areas of an image. The script is located in "<Image> / Script-Fu / Enhance / Fix Overblown" -------------------------------------------------------------------- Changelog: - Created! -------------------------------------------------------------------- This program is f...
FixOverblown is a script for Last changed : 2009 June 18 Copyright ( C ) 2009 < > Version 1.0 ( 2009 June 16 ) it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License License version 3 at the web site -3.0.html Alternati...
8886c6a3df2520fc5042e587508b6d35b45a41652541ce547efdbf7b47ee74ab
rudymatela/conjure
Derive.hs
# LANGUAGE TemplateHaskell , CPP # -- | Module : Conjure . . Derive Copyright : ( c ) 2019 - 2021 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > -- Allows automatic derivation of ' ' typeclass instances . module Conjure.Conjurable.Derive ( deriveConjurable , de...
null
https://raw.githubusercontent.com/rudymatela/conjure/19320ce335f7449c2241e7dd6c7cac6f519b62ca/src/Conjure/Conjurable/Derive.hs
haskell
| If '-:', '->:', '->>:', '->>>:', ... are not in scope, this will derive them as well. For now, this function only derives 'conjureEquality', 'conjureTiers' and and does not derive 'conjureSubTypes', 'conjureArgumentCases' and 'conjureSize'. These will be added in future versions. If you plan to use f...
# LANGUAGE TemplateHaskell , CPP # Module : Conjure . . Derive Copyright : ( c ) 2019 - 2021 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > Allows automatic derivation of ' ' typeclass instances . module Conjure.Conjurable.Derive ( deriveConjurable , deriveConj...
d57711dab8ce777a9d5d6ca268a784ebf2ef44e363a84eeca8ec6873fb05cb4a
wilkerlucio/pathom
index_explorer.cljs
(ns com.wsscode.pathom.book.index-explorer (:require [clojure.reader :refer [read-string]] [clojure.string :as str] [com.wsscode.common.async-cljs :refer [go-catch <?]] [com.wsscode.pathom.book.app-types :as app-types] [com.wsscode.pathom.book.interactive-parser :as ipa...
null
https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/docs-src/modules/ROOT/examples/com/wsscode/pathom/book/index_explorer.cljs
clojure
(ns com.wsscode.pathom.book.index-explorer (:require [clojure.reader :refer [read-string]] [clojure.string :as str] [com.wsscode.common.async-cljs :refer [go-catch <?]] [com.wsscode.pathom.book.app-types :as app-types] [com.wsscode.pathom.book.interactive-parser :as ipa...
c40117fc98cd69775b2a6eb38111bb090d99fc20ce6392689ab40ca3f3a773f2
namin/inc
lib.scm
(define-lib-primitive (length lst) (if (null? lst) 0 (fxadd1 (length (cdr lst))))) (define-lib-primitive (fill args setop) (letrec ([rec (lambda (index args) (unless (null? args) (setop index (car args)) (rec (fxadd1 index) (cdr args))))]) (...
null
https://raw.githubusercontent.com/namin/inc/3f683935e290848485f8d4d165a4f727f6658d1d/src/lib.scm
scheme
This is cheating... should write it in Scheme.
(define-lib-primitive (length lst) (if (null? lst) 0 (fxadd1 (length (cdr lst))))) (define-lib-primitive (fill args setop) (letrec ([rec (lambda (index args) (unless (null? args) (setop index (car args)) (rec (fxadd1 index) (cdr args))))]) (...
16c231f67d392e3fe4b231dde9079b6a5e55fe42aff2197aadd913351a56fccb
gymgle/blockchain-reference
transaction.rkt
#lang racket (require "transaction-io.rkt") (require "utils.rkt") (require (only-in file/sha1 hex-string->bytes)) (require "wallet.rkt") (require crypto) (require crypto/all) (require racket/serialize) (use-all-factories!) (struct transaction (signature from to value inputs outputs) #:prefab) (define (make-tra...
null
https://raw.githubusercontent.com/gymgle/blockchain-reference/bbd73fea390c07081787f70c5faa78ef8000908b/blockchain-demo/racket/transaction.rkt
racket
#lang racket (require "transaction-io.rkt") (require "utils.rkt") (require (only-in file/sha1 hex-string->bytes)) (require "wallet.rkt") (require crypto) (require crypto/all) (require racket/serialize) (use-all-factories!) (struct transaction (signature from to value inputs outputs) #:prefab) (define (make-tra...
074430d4b1c4324f2d557a64e1f5d6f3d315fd0fef190de8abae864c664d21cd
jellelicht/guix
hackage.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the Lice...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/guix/import/hackage.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix import hackage) #:use-module (ice-9 match) #:use-module (srfi srfi-26) #:use-module (sr...
fe27afc6418548985cc291c383fafc5421c12c979687f289437962b3d0d81715
thheller/shadow-cljs
type.cljs
(ns demo.type) (deftype Foo [a b] Object (foo [this x] x))
null
https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/dev/demo/type.cljs
clojure
(ns demo.type) (deftype Foo [a b] Object (foo [this x] x))
71793c15d81386ea90a07671bab4f9e5b3c54ffecb57da849942ef7fed8acb5c
arohner/datomic-compound-index
core.clj
(ns datomic-compound-index.core (:require [clojure.string :as str] [clojure.data.fressian :as fress] [clojure.set :as set] [datomic.api :as d]) (:import java.util.Date datomic.db.Datum java.util.regex.Pattern java.nio.ByteBuffer)) (defprotocol Se...
null
https://raw.githubusercontent.com/arohner/datomic-compound-index/4e5ba120ff43cdb2c2e819cbc0b567ca36d8057c/src/datomic_compound_index/core.clj
clojure
(ns datomic-compound-index.core (:require [clojure.string :as str] [clojure.data.fressian :as fress] [clojure.set :as set] [datomic.api :as d]) (:import java.util.Date datomic.db.Datum java.util.regex.Pattern java.nio.ByteBuffer)) (defprotocol Se...
b6eb6923c6be184ac0d1536301a488bde5cd106c9b0b8246c6455322f109151e
jasonstolaruk/CurryMUD
DbTblPurger.hs
# LANGUAGE LambdaCase , OverloadedStrings # module Mud.Threads.DbTblPurger ( mkDbTblPurgerFuns , mkDbTblPurgerHelpers ) where import Mud.Cmds.Util.Misc import Mud.Data.State.MudData import Mud.Misc.Database import qualified Mud.Misc.Logging as L (logNotice)...
null
https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Threads/DbTblPurger.hs
haskell
================================================== ---
# LANGUAGE LambdaCase , OverloadedStrings # module Mud.Threads.DbTblPurger ( mkDbTblPurgerFuns , mkDbTblPurgerHelpers ) where import Mud.Cmds.Util.Misc import Mud.Data.State.MudData import Mud.Misc.Database import qualified Mud.Misc.Logging as L (logNotice)...
6ddae6405f9cbed151f4bca0abf02e4fb043de9db39e3d292f30b87437ac92e1
KULeuven-CS/CPL
3.8.rkt
#lang eopl (require "LET/syntax.rkt") (require "LET/LET.rkt") Exercise 3.8 ; additions to the syntax and interpreter can be found in the required files (define ex308 (a-program (let-exp 'a (minus-exp (const-exp 10)) (let-exp 'b (diff-exp (const-exp 0) (const-exp 10)) (equal?-exp (var-exp 'a) (var-exp 'b))))))
null
https://raw.githubusercontent.com/KULeuven-CS/CPL/0c62cca832edc43218ac63c4e8233e3c3f05d20a/chapter3/3.8.rkt
racket
additions to the syntax and interpreter can be found in the required files
#lang eopl (require "LET/syntax.rkt") (require "LET/LET.rkt") Exercise 3.8 (define ex308 (a-program (let-exp 'a (minus-exp (const-exp 10)) (let-exp 'b (diff-exp (const-exp 0) (const-exp 10)) (equal?-exp (var-exp 'a) (var-exp 'b))))))
d27475ed67b5784c6c27d7f4caa4a2a185f86813738c715933f0730cbd57324e
denibertovic/denv
Lib.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE GADTs #-} module Denv.Lib where import RIO hiding (exitSuccess) import Control.Monad (unless) import Data.Maybe (fromMaybe) import qualified Data.Text as T import qualified Data.Text.IO as TIO import Prelude (putStrLn) import System.Dir...
null
https://raw.githubusercontent.com/denibertovic/denv/86a3d612d8207daad75ad38a1711ad048e8f6113/src/Denv/Lib.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE GADTs # We only restore the prompt if oldPrompt is present otherwise we would set the prompt to nothing (empty string). This makes the deactivate command idempotent. This is inspired by [direnv]() (all credits to the authors). LICENCE: This is inspired by [direnv]() (all...
# LANGUAGE ScopedTypeVariables # module Denv.Lib where import RIO hiding (exitSuccess) import Control.Monad (unless) import Data.Maybe (fromMaybe) import qualified Data.Text as T import qualified Data.Text.IO as TIO import Prelude (putStrLn) import System.Directory ( doesDirectoryExist , doesFileExist , getCur...
1ea51556a07498ba8c0404b4b352df542d8d6de72e0cc87146ea07c2b9d6baa1
Nazar65/guix-phps-channel
php74.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2016 - 2020 < > Copyright © 2016 < > Copyright © 2018 , 2020 , 2021 < > Copyright © 2018 < > Copyright © 2019 < > Copyright © 2020 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistrib...
null
https://raw.githubusercontent.com/Nazar65/guix-phps-channel/31844889740501a6c80c0ba2f13b623bb95d5c10/packages/php74.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2016 - 2020 < > Copyright © 2016 < > Copyright © 2018 , 2020 , 2021 < > Copyright © 2018 < > Copyright © 2019 < > Copyright © 2020 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License alo...
f3c128c08d5ed0a2f0dfb615573d9afcc35237cf1dd90eb6e2e1d021afc75f2e
cicakhq/potato
api-android.lisp
(in-package :potato.api) (declaim #.potato.common::*compile-decl*) (define-api-method (register-gcm-token "/register-gcm" nil ()) (api-case-method (:post (json-bind ((token "token") (provider "provider")) (parse-and-check-input-as-json) (ecase (potato.gcm:register-gcm (pota...
null
https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/potato/api-android.lisp
lisp
(in-package :potato.api) (declaim #.potato.common::*compile-decl*) (define-api-method (register-gcm-token "/register-gcm" nil ()) (api-case-method (:post (json-bind ((token "token") (provider "provider")) (parse-and-check-input-as-json) (ecase (potato.gcm:register-gcm (pota...
0f025c047e1e70621dbd1799be5fc4ec6d437f1c0e337ae00b10c069a6475e88
jthornber/xdrgen
AST.hs
{-# LANGUAGE DeriveDataTypeable, StandaloneDeriving, FlexibleInstances #-} | Data types for defining the abstract syntax tree of an XDR file . module Data.XDR.AST ( -- * Constant expressions ConstExpr (..) , BinOp (..) , UnOp (..) , evalConstExpr -- * XDR types , Specificat...
null
https://raw.githubusercontent.com/jthornber/xdrgen/1de8c6562ffd6ec38b51d771b421a0d892497145/Data/XDR/AST.hs
haskell
# LANGUAGE DeriveDataTypeable, StandaloneDeriving, FlexibleInstances # * Constant expressions * XDR types | Constants are represented as symbolic expressions to allow the code generators to produce more tractable code. Utility functions can evaluate these expressions. A primary expression is just a reference...
| Data types for defining the abstract syntax tree of an XDR file . module Data.XDR.AST ( ConstExpr (..) , BinOp (..) , UnOp (..) , evalConstExpr , Specification (..) , Module (..) , Definition (..) , Typedef (..) , ConstantDef (..) , TypedefInternal (..) , Decl...
0f88a6254b27eed8648bfb98446563e47c589d563e189df549f07f01d10ee98d
tweag/ormolu
let-single-line-out.hs
foo :: a -> a foo x = let x = x in x foo x = let x = z where z = 2 in x foo x = let x = z where { z = 2 }; a = 3 in x foo x = let g :: Int -> Int; g = id in () let a = b; c = do { foo; bar }; d = baz in b let a = case True of { True -> foo; False -> bar }; b = foo a in b foo x = let ?g = id; ?f = g in x
null
https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/let-single-line-out.hs
haskell
foo :: a -> a foo x = let x = x in x foo x = let x = z where z = 2 in x foo x = let x = z where { z = 2 }; a = 3 in x foo x = let g :: Int -> Int; g = id in () let a = b; c = do { foo; bar }; d = baz in b let a = case True of { True -> foo; False -> bar }; b = foo a in b foo x = let ?g = id; ?f = g in x
296c192b03b1a4b509d5ea1c0ebd24ee651c04c228473a31055b392563d8b524
chenyukang/eopl
static-classes.scm
;;;;;;;;;;;;;;;; method type environments ;;;;;;;;;;;;;;;; ;; a method tenv looks like ((method-name type) ...) ;; each method will have a proc-type ;;;;;;;;;;;;;;;; static classes ;;;;;;;;;;;;;;;; (define identifier? symbol?) (define method-tenv? (list-of (lambda (p) (and (pair? p)...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch9/base/typed-oo/static-classes.scm
scheme
method type environments ;;;;;;;;;;;;;;;; a method tenv looks like ((method-name type) ...) each method will have a proc-type static classes ;;;;;;;;;;;;;;;; method-tenv * id -> (maybe type) class-name * id -> type OR fail the static class environment ;;;;;;;;;;;;;;;; the-static-class-env will look like ...
(define identifier? symbol?) (define method-tenv? (list-of (lambda (p) (and (pair? p) (symbol? (car p)) (type? (cadr p)))))) (define-datatype static-class static-class? (a-static-class (super-name (maybe identifier?)) (interface-names (list-of identifier?)) ...
11d0c92b2663b84ba4822388088b5381664c6e20c425dfba3cd353690bcfc851
haskell-repa/repa
FatName.hs
module Data.Array.Repa.Plugin.FatName ( GhcName (..) , FatName (..)) where import Data.Array.Repa.Plugin.GHC.Pretty () import DDC.Base.Pretty import qualified DDC.Core.Flow.Prim as D import qualified Var as G import qualified Literal as G import qualified ...
null
https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-plugin/Data/Array/Repa/Plugin/FatName.hs
haskell
module Data.Array.Repa.Plugin.FatName ( GhcName (..) , FatName (..)) where import Data.Array.Repa.Plugin.GHC.Pretty () import DDC.Base.Pretty import qualified DDC.Core.Flow.Prim as D import qualified Var as G import qualified Literal as G import qualified ...
b0d2b59aa553081d34dc43b9cae995d513f02b252af13b058148f0e124f34463
nuprl/gradual-typing-performance
consts-block-size.rkt
#lang typed/racket/base (provide block-size) ;; ============================================================================= (: block-size Integer) (define block-size 20)
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/tetris/typed/consts-block-size.rkt
racket
=============================================================================
#lang typed/racket/base (provide block-size) (: block-size Integer) (define block-size 20)
d006bf5599e4f78c162bf31ae2b2ef743d26f5a192f5333b7df89b839794d727
change-metrics/monocle
HTTP.hs
# LANGUAGE DataKinds # -- Generated by monocle-codegen. DO NOT EDIT! -- | Copyright : ( c ) 2021 Monocle authors SPDX - License - Identifier : AGPL-3.0 - only module Monocle.Servant.HTTP (MonocleAPI, server) where import Effectful (Eff) import Effectful qualified as E import Effectful.Concurrent qualified as E i...
null
https://raw.githubusercontent.com/change-metrics/monocle/198177952b54e881376eb0d86f5f7e9f343c165d/src/Monocle/Servant/HTTP.hs
haskell
Generated by monocle-codegen. DO NOT EDIT! |
# LANGUAGE DataKinds # Copyright : ( c ) 2021 Monocle authors SPDX - License - Identifier : AGPL-3.0 - only module Monocle.Servant.HTTP (MonocleAPI, server) where import Effectful (Eff) import Effectful qualified as E import Effectful.Concurrent qualified as E import Monocle.Api.Jwt (AuthenticatedUser) import Mo...
2829ef1ca37b0a2a4c19290b29d144e37b4db5fa11fc2eb8e76f9942a8293b1e
graninas/Hydra
Server.hs
{-# LANGUAGE PackageImports #-} # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE MultiWayIf #-} module Astro.Server ( runAstroServer ) where import Control.Monad import System....
null
https://raw.githubusercontent.com/graninas/Hydra/7ce16e705c2ce166f954dcca3910f258ae9b950c/app/astro/src/Astro/Server.hs
haskell
# LANGUAGE PackageImports # # LANGUAGE FlexibleContexts # # LANGUAGE DeriveAnyClass # # LANGUAGE MultiWayIf # -- Sample of how to do straighforward validation: submitObjectTemplate template@(API.AstroObjectTemplate {..}) = do if | name == Just "" -> throwError $ err400 {errBody = "Name sho...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # module Astro.Server ( runAstroServer ) where import Control.Monad import System.Process (readCreateProcess, shell) import Network.Wai.Handler.Warp (run) import Servant import Hydra.Prelude import q...
69752d53e9782069ab8c97a2303555d0c3d4b2fe627eb506d8c57d38600f7247
wilbowma/cur
inversion.rkt
#lang cur (require ;cur/stdlib/equality (except-in cur/stdlib/equality sym f-equal) (only-in cur/stdlib/equality [sym sym-orig] [f-equal f-equal-orig]) cur/stdlib/sugar cur/stdlib/nat cur/stdlib/prop cur/ntac/base cur/ntac/standard cur/ntac/rewrite...
null
https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/ntac/inversion.rkt
racket
cur/stdlib/equality tests for inversion tactic successors-equal-implies-equal ---------- successors-equal-implies-equal, raw term not suitable for tactic because it does not include intermediate equalities computed by inversion, eg (== n m) successors-equal-implies-equal, raw term, produced by coq elim-False sho...
#lang cur (except-in cur/stdlib/equality sym f-equal) (only-in cur/stdlib/equality [sym sym-orig] [f-equal f-equal-orig]) cur/stdlib/sugar cur/stdlib/nat cur/stdlib/prop cur/ntac/base cur/ntac/standard cur/ntac/rewrite rackunit/turnstile+ ...
3fc54a7aa48c43d65e1762636e337638169c91c4c5efebf6911f79cc84693c07
hercules-ci/hercules-ci-agent
Schema.hs
# LANGUAGE BlockArguments # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # | Types and functions to represent interfaces between N...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/be8142e7f38eba5e3805f21d5b6423ce7239e0f0/hercules-ci-cnix-expr/src/Hercules/CNix/Expr/Schema.hs
haskell
# LANGUAGE ConstraintKinds # code. * Core * Error handling * Alternatives Runtime type matching. Use of @|@ comes from the implicit sum types that * Functions * Simple types * Attribute sets Common type that can represent both simultaneously. * Attribute sets as records * Attribute sets as used as dict...
# LANGUAGE BlockArguments # # LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleInstances # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # | Types and functions to represent interfaces between Nix code and Haskell module Hercul...
e3b8139902a9fc36c18269f70462536d491256a9a21c3463bf6002dc7d0e2279
engineyard/vertebra-erl
entrepot_app.erl
Copyright 2008 , Engine Yard , Inc. % This file is part of Vertebra . % Vertebra is free software : you can redistribute it and/or modify it under the % terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any % lat...
null
https://raw.githubusercontent.com/engineyard/vertebra-erl/cf6e7c84f6dfbf2e31f19c47e9db112ae292ec27/lib/entrepot/src/entrepot_app.erl
erlang
terms of the GNU Lesser General Public License as published by the Free later version. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. Application callbacks ========================================...
Copyright 2008 , Engine Yard , Inc. This file is part of Vertebra . Vertebra is free software : you can redistribute it and/or modify it under the Software Foundation , either version 3 of the License , or ( at your option ) any Vertebra is distributed in the hope that it will be useful , but WITHOUT ANY Yo...
26be5c75219d72731a434a187b788c47122c01efdf562ba9355026e23826b861
janestreet/core
sign_or_nan.mli
* This module extends { { ! Base . Sign_or_nan}[Base . Sign_or_nan ] } with bin_io . open! Import type t = Base.Sign_or_nan.t = | Neg | Zero | Pos | Nan [@@deriving typerep] * @inline * This provides [ to_string]/[of_string ] , sexp / bin_io conversion , Map , , etc . include Identifiable.S with type t := ...
null
https://raw.githubusercontent.com/janestreet/core/b0be1daa71b662bd38ef2bb406f7b3e70d63d05f/core/src/sign_or_nan.mli
ocaml
* This module extends { { ! Base . Sign_or_nan}[Base . Sign_or_nan ] } with bin_io . open! Import type t = Base.Sign_or_nan.t = | Neg | Zero | Pos | Nan [@@deriving typerep] * @inline * This provides [ to_string]/[of_string ] , sexp / bin_io conversion , Map , , etc . include Identifiable.S with type t := ...
b4804003715b409b08b941d3fdc0858cef40c502f4bf802e97f7444e47d77109
con-kitty/categorifier-c
ToCxxType.hs
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE ExistentialQuantification # # LANGUAGE GADTSyntax # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuantifiedConstraints # # LANGUAGE QuasiQuotes # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # | Typeclass with g...
null
https://raw.githubusercontent.com/con-kitty/categorifier-c/167ff5cfdeb60b6fa00b10ec74033c32132d45a0/Categorifier/C/CTypes/ToCxxType.hs
haskell
# LANGUAGE OverloadedStrings # | __TODO__: This should be returned from `toCxxType` instead of thrown in various places. | This constraint is unfortunately needed much further downstream. We would like to be able to wrapper interacts poorly with our parameter @g@ here, and we can't do anything about it at the cons...
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE ExistentialQuantification # # LANGUAGE GADTSyntax # # LANGUAGE QuantifiedConstraints # # LANGUAGE QuasiQuotes # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # | Typeclass with generic defaults for converting dat...
073472dd6a7425af923e9817c5d17d0bbf311d01636d7bc257b826ffc74b489f
facebookarchive/pfff
flag_program_visual.ml
open Common let algo = ref (Treemap.Ordered Treemap.PivotByMiddle) let big_screen = ref false let use_emacsclient = ref false let use_git = ref false let cmdline_flags () = [ "-algorithm", Arg.String (fun s -> algo := Treemap.algo_of_s s; ), (spf " <algo> (choices are: %s, default = %s" ...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/h_program-visual/flag_program_visual.ml
ocaml
open Common let algo = ref (Treemap.Ordered Treemap.PivotByMiddle) let big_screen = ref false let use_emacsclient = ref false let use_git = ref false let cmdline_flags () = [ "-algorithm", Arg.String (fun s -> algo := Treemap.algo_of_s s; ), (spf " <algo> (choices are: %s, default = %s" ...
dcd7cda592a125a7c70df12b6e477ab909bd65e54d5d115f64640211060242fe
pedestal/pedestal-app
map.cljs
Copyright 2013 Relevance , Inc. ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( ) ; which can be found in the file epl-v10.html at the root of this distribution. ; ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this licens...
null
https://raw.githubusercontent.com/pedestal/pedestal-app/509ab766a54921c0fbb2dd7c6a3cb20223b8e1a1/app/src/io/pedestal/app/map.cljs
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. e...
Copyright 2013 Relevance , Inc. Eclipse Public License 1.0 ( ) (ns io.pedestal.app.map "Find functions which map an inform message to transform messages (hereafter named i->t fns) based on patterns in the event entry. Transform messages are vectors of one or more transformation entries: [[target op o...
402c66369129bad89f35085ea3aa0bd9071605812817d45d2285490926cffce9
unnohideyuki/Tiger-in-Haskell
Codegen.hs
module Codegen where import Control.Monad.State import qualified Assem as A import qualified Tree as T import qualified DalvikFrame as F import qualified Temp data CgenState = CgenState { get_insts :: [A.Instr] , get_temp :: Temp.Temp , get_frame :: F.Frame } ...
null
https://raw.githubusercontent.com/unnohideyuki/Tiger-in-Haskell/69fc976e64bfe7abfa842d7179e06eae740d36b9/chap9/src/Codegen.hs
haskell
munchExp Move to (TEMP 0) is special move-object
module Codegen where import Control.Monad.State import qualified Assem as A import qualified Tree as T import qualified DalvikFrame as F import qualified Temp data CgenState = CgenState { get_insts :: [A.Instr] , get_temp :: Temp.Temp , get_frame :: F.Frame } ...
af8465ae12403d4625e7d258228ceee6268adf65d0f95fc0cd4a4ef9a83f46e9
javazquez/arnoldclj_interpreter
arithmetic_test.clj
(ns arnoldclj_s.arithmetic-test (:use midje.sweet) (:use arnoldclj_s.lexr)) (fact "function when a variable is declared" (lights-camera-action "IT'S SHOWTIME HEY CHRISTMAS TREE var YOU SET US UP 123 YOU HAVE BEEN TERMINATED") => [:Program [:begin-main [:statement [:decvar ...
null
https://raw.githubusercontent.com/javazquez/arnoldclj_interpreter/d6860d7063a121103293b10dca65b113ad843d26/test/arnoldclj_s/arithmetic_test.clj
clojure
(ns arnoldclj_s.arithmetic-test (:use midje.sweet) (:use arnoldclj_s.lexr)) (fact "function when a variable is declared" (lights-camera-action "IT'S SHOWTIME HEY CHRISTMAS TREE var YOU SET US UP 123 YOU HAVE BEEN TERMINATED") => [:Program [:begin-main [:statement [:decvar ...
86077c42751151cf9b170779457b337b0964afd288d77d74f5910bd526bb2740
tolysz/prepare-ghcjs
Show.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , BangPatterns , StandaloneDeriving , MagicHash , UnboxedTuples # MagicHash, UnboxedTuples #-} {-# OPTIONS_HADDOCK hide #-} #include "MachDeps.h" #if SIZEOF_HSWORD == 4 #define DIGITS 9 #define BASE 1000000000 #elif S...
null
https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/spec-lts8/base/GHC/Show.hs
haskell
# OPTIONS_HADDOCK hide # DIGITS should be the largest integer such that --------------------------------------------------------------------------- | Module : GHC.Show License : see libraries/base/LICENSE Maintainer : Stability : internal The 'Show' class, and related operations. ------------...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude , BangPatterns , StandaloneDeriving , MagicHash , UnboxedTuples # MagicHash, UnboxedTuples #-} #include "MachDeps.h" #if SIZEOF_HSWORD == 4 #define DIGITS 9 #define BASE 1000000000 #elif SIZEOF_HSWORD == 8 #define DIG...
397a5bd917909b8cb8ab5aa5beac84cb1746538dc9284f1256006861b71b925f
zellige/hs-geojson
GeoMultiLine.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # ------------------------------------------------------------------- -- | -- Module : Data.Geospatial.Internal.Geometry.GeoMultiLine Copyright : ( C ) 2014 - 2021 HS - GeoJSON Project -- License : BSD-style (see th...
null
https://raw.githubusercontent.com/zellige/hs-geojson/fb66e4f1b016d8e73408d9faa0945f61253131fa/src/Data/Geospatial/Internal/Geometry/GeoMultiLine.hs
haskell
# LANGUAGE DeriveAnyClass # ----------------------------------------------------------------- | Module : Data.Geospatial.Internal.Geometry.GeoMultiLine License : BSD-style (see the file LICENSE.md) * Type * Lenses * To Points instances parseJSON :: Value -> Parser a
# LANGUAGE DeriveGeneric # # LANGUAGE TemplateHaskell # Copyright : ( C ) 2014 - 2021 HS - GeoJSON Project Maintainer : module Data.Geospatial.Internal.Geometry.GeoMultiLine GeoMultiLine (..), unGeoMultiLine, splitGeoMultiLine, mergeGeoLines, ) where import Control.DeepSeq import Con...
7a6d85adf2237d69f7ead23d12ced42f75f58f47d55bd89173c3bac06b0b4d78
everpeace/programming-erlang-code
chat_multi.erl
-module(chat_multi). -compile(export_all). %% server: chat_socket : start_chat_server("joe " , " 123 " ) . " " is who I am %% %% client: chat_socket : call("localhost","fred " , " 123 " ) . %% "fred" is who I am %% When we call we don't know the name of who we are calling %% so ...
null
https://raw.githubusercontent.com/everpeace/programming-erlang-code/8ef31aa13d15b41754dda225c50284915c29cb48/code/chat_multi.erl
erlang
server: client: "fred" is who I am When we call we don't know the name of who we are calling so we'll have to wait until the server tells us Secret = none | string Who = the person who owns the server The client is the initiator -----------------------------------------------------------...
-module(chat_multi). -compile(export_all). chat_socket : start_chat_server("joe " , " 123 " ) . " " is who I am chat_socket : call("localhost","fred " , " 123 " ) . start_chat_server(Who, Secret) -> lib_auth_cs:start_server(3030, {?MODULE, chat_server, Who}, Secret, ...
2e12241f50e5604db369bdbef4e9d2deb801f665d7ea3d40e2c8c4baf435c354
bollu/discrete-differential-geometry
Intrinsic.hs
-- | Intrinsic representation of meshes. module Intrinsic where import qualified Data.Map as M type F = Float type Angle = Float data V2 = V2 { v2x :: F, v2y :: F } data V3 = V3 { v3x :: F, v3y :: F, v3z :: F } data Bary = Bary { bx :: F, by :: F, bz :: F } data Tri v = Tri { ta:: v, tb :: v, tc :: v } | Edge , ...
null
https://raw.githubusercontent.com/bollu/discrete-differential-geometry/55eac68884cae4fd7a0a93e4065c048a835ac7c5/Intrinsic.hs
haskell
| Intrinsic representation of meshes. | nmber of edges in the mesh that contain vertex v | create a new vertex in the mesh | erase triangles | add triangles | given the edge lengths and the angle in the middle, return the final angle ^ Starting point ^ direction to walk
module Intrinsic where import qualified Data.Map as M type F = Float type Angle = Float data V2 = V2 { v2x :: F, v2y :: F } data V3 = V3 { v3x :: F, v3y :: F, v3z :: F } data Bary = Bary { bx :: F, by :: F, bz :: F } data Tri v = Tri { ta:: v, tb :: v, tc :: v } | Edge , has two endpoints and a length data Edge ...
4a3e5a991a42eb01af6b81c2e4aca53c2b23883fc3b965f99f278e0e5bd439d2
rzezeski/try-try-try
rts.erl
%% @doc Interface into the Real Time Statistics application. -module(rts). -include("rts.hrl"). -include_lib("riak_core/include/riak_core_vnode.hrl"). -export([ ping/0, entry/2, get/2, get/3, set/3, append/3, incr/2, incrby/3, sadd/3, ...
null
https://raw.githubusercontent.com/rzezeski/try-try-try/c5d99f29fb3380f8653efdd1aa6a8f52143a9717/2011/riak-core-conflict-resolution/rts/src/rts.erl
erlang
@doc Interface into the Real Time Statistics application. =================================================================== API =================================================================== @doc Pings a random vnode to make sure communication is functional @doc Process an entry. @doc Get a stat's value. @...
-module(rts). -include("rts.hrl"). -include_lib("riak_core/include/riak_core_vnode.hrl"). -export([ ping/0, entry/2, get/2, get/3, set/3, append/3, incr/2, incrby/3, sadd/3, srem/3 ]). -export([get_dbg_preflist/2, ...
5a1b42a8c12bc7b68de2a405964fbeee678018d2c4d7a1ee5300f5680353578b
well-typed/large-records
Advanced.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # {-# LANGUAGE LambdaCase #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE PolyKinds ...
null
https://raw.githubusercontent.com/well-typed/large-records/07a01f23b85a2930a6fa252bfe62645acca96f79/large-anon/src/Data/Record/Anon/Internal/Advanced.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # | Full record representation Intended for qualified import. > import D...
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE PolyKinds # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances ...
d57a8f565fbe0e49e4307c92d3d2ed4aa01fdb0a453b7d36907d90648cfac895
philnguyen/soft-contract
kcfa2.rkt
; #lang racket (require soft-contract/fake-contract) ((λ (f1) (let ((a (f1 #t))) (f1 #f))) (λ (x1) ((λ (f2) (let ((b (f2 #t))) (let ((c (f2 #f))) (f2 #t)))) (λ (x2) ((λ (z) (z x1 x2)) (λ (y1 y2) y1))))))
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/sergey/kcfa2.rkt
racket
#lang racket (require soft-contract/fake-contract) ((λ (f1) (let ((a (f1 #t))) (f1 #f))) (λ (x1) ((λ (f2) (let ((b (f2 #t))) (let ((c (f2 #f))) (f2 #t)))) (λ (x2) ((λ (z) (z x1 x2)) (λ (y1 y2) y1))))))
8ffd8dc608c61917669778dcc30031cde087b15d82a0fd4ae81df2f8de49d6b4
bos/rwh
Do.hs
act = undefined act1 = undefined act2 = undefined actN = undefined expr1 = undefined expr2 = undefined exprN = undefined doNotation1, doNotation2, doNotation3, doNotation4 :: Maybe () translated1, translated2, translated3, translated4 :: Maybe () finalTranslation2, semicolon, semicolonTranslated :: Maybe () {-- snip...
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch15/Do.hs
haskell
- snippet doNotation1 - - /snippet doNotation1 - - /snippet translated1 - - snippet doNotation2 - ... etc. - /snippet doNotation2 - - snippet translated2 - ... etc. ... etc. - /snippet translated2 - - snippet doNotation3 - ... etc. - /snippet doNotation3 - ... etc. - /snippet translated3 - - snippet doNotatio...
act = undefined act1 = undefined act2 = undefined actN = undefined expr1 = undefined expr2 = undefined exprN = undefined doNotation1, doNotation2, doNotation3, doNotation4 :: Maybe () translated1, translated2, translated3, translated4 :: Maybe () finalTranslation2, semicolon, semicolonTranslated :: Maybe () doNotati...
aabca0a378dd3179c81723023fd5bc3674c43993fae9f0065f4f74adf8084bd7
jscrane/jvml
project.clj
(defproject jvml "0.5" :repositories [["dev.davidsoergel.com releases" ""]] :dependencies [[org.clojure/clojure "1.8.0"] [incanter/incanter-core "1.4.1"] [incanter/incanter-charts "1.4.1"] [net.sourceforge.parallelcolt/parallelcolt "0.10.1"] [net.sourceforge.jma...
null
https://raw.githubusercontent.com/jscrane/jvml/844eb267150564a3a0f882edbbd505ce94924c8f/project.clj
clojure
(defproject jvml "0.5" :repositories [["dev.davidsoergel.com releases" ""]] :dependencies [[org.clojure/clojure "1.8.0"] [incanter/incanter-core "1.4.1"] [incanter/incanter-charts "1.4.1"] [net.sourceforge.parallelcolt/parallelcolt "0.10.1"] [net.sourceforge.jma...
06ffd0eb912196655b94402334ce0137df08856f22ef97faafa9468bdcab2b14
GaloisInc/tower
Emitter.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Ivory.Tower.AST.Emitter where #if MIN_VERSION_mainland_pretty(0,6,0) import Text.PrettyPrint.Mainland.Class #endif import Text.PrettyPrint.Mainland import Ivory.Tower.AST.SyncChan import Ivory.Tower.Types.Unique data Em...
null
https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower/src/Ivory/Tower/AST/Emitter.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE CPP # # LANGUAGE RecordWildCards # module Ivory.Tower.AST.Emitter where #if MIN_VERSION_mainland_pretty(0,6,0) import Text.PrettyPrint.Mainland.Class #endif import Text.PrettyPrint.Mainland import Ivory.Tower.AST.SyncChan import Ivory.Tower.Types.Unique data Emitter = Emitter { emitter_name ::...
5c06888ace11fd0582a418bb2ca75e6ab2bb0fdcc4b7e12afa83a3475c69c0a1
twosigma/satellite
relay.clj
Copyright 2015 TWO SIGMA OPEN SOURCE , LLC ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ...
null
https://raw.githubusercontent.com/twosigma/satellite/d29d982f054d4f87ff47b4f94d23faa26a9b3fe4/satellite-slave/src/satellite_slave/relay.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2015 TWO SIGMA OPEN SOURCE , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns satellite-slave.relay (:require [clj-http.client :as http] [cheshire.core :as json] [satellite-slave.config :as config])) (defn state-exception [x] (ex-info "not type state" {:arg x}...
5715d7272797529a77849d135c9321f7e569585fbab3b8521f47c9eef2fd3b1b
opencog/pln
or-breakdown.scm
; ===================================================================== ; OrBreakdownRule ; OrLink ; A ; B ; & ; A ; |- ; B ;---------------------------------------------------------------------- (define or-breakdown-rule (BindLink (VariableList (VariableNode "$A") (VariableNode "$B")) (...
null
https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/opencog/pln/rules/wip/or-breakdown.scm
scheme
===================================================================== OrBreakdownRule A B & A |- B ---------------------------------------------------------------------- Name the rule
OrLink (define or-breakdown-rule (BindLink (VariableList (VariableNode "$A") (VariableNode "$B")) (AndLink (OrLink (VariableNode "$A") (VariableNode "$B")) (VariableNode "$A")) (ExecutionOutputLink (GroundedSchemaNode "scm: or-breakdown-formula") (ListLink (OrLink ...
418bfcd27a5e012a9a7b7b87d29a070d745ea9c32a03b04426a5104d05ae1856
luksamuk/cl-rest-server-example
session-controller.lisp
(in-package #:rest-server.db) (defmethod control-store ((type (eql :session)) &optional params) (declare (ignore params)) (let* ((payload (util:get-payload ningle:*request*)) (mail (util:agetf :mail payload)) (pass (util:agetf :password payload))) (if (or (null mail) (null pass)) (uti...
null
https://raw.githubusercontent.com/luksamuk/cl-rest-server-example/e48fc918c30ede66579afb693584b178c83ba683/src/controllers/session-controller.lisp
lisp
(in-package #:rest-server.db) (defmethod control-store ((type (eql :session)) &optional params) (declare (ignore params)) (let* ((payload (util:get-payload ningle:*request*)) (mail (util:agetf :mail payload)) (pass (util:agetf :password payload))) (if (or (null mail) (null pass)) (uti...
6e2995906d4fc8cd66b3b962896f714636ca55cfb7c1e0240649bd36ebbe4108
tezos/tezos-mirror
sc_rollup_costs.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 , < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/8ec9e944344bde6b2cc12332edc6236cbbd9ebc6/src/proto_alpha/lib_protocol/sc_rollup_costs.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 , < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN A...
f3c93a9c55ed31f7382a0a1860cfc1821c27c1ba32f77569ef8852432bdcd551
facebookarchive/pfff
highlight_nw.mli
val visit_program : tag_hook: (Parse_info.info -> Highlight_code.category -> unit) -> Highlight_code.highlighter_preferences -> ( Database_php.id * Common.filename * ) option - > Ast_nw.program * Lexer_nw.token list -> unit
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_nw/analyze/highlight_nw.mli
ocaml
val visit_program : tag_hook: (Parse_info.info -> Highlight_code.category -> unit) -> Highlight_code.highlighter_preferences -> ( Database_php.id * Common.filename * ) option - > Ast_nw.program * Lexer_nw.token list -> unit
37f6260540f3a83ffc656c026385bc783b2b1680a3697bcdf6348994ea040f50
asivitz/Hickory
Animation.hs
{-# LANGUAGE OverloadedStrings #-} module Hickory.ModelLoading.Animation where import Hickory.Math.Vector import Hickory.Math.Matrix import Linear.Quaternion import Data.List import Control.Lens ((^.)) import qualified Hickory.ModelLoading.Bvh as BVH import Data.Text (Text) import Linear (V3(..), zero, liftI2, point,...
null
https://raw.githubusercontent.com/asivitz/Hickory/f45a2109c6bbf6adba1c3ea089d248421599c2e7/core/Hickory/ModelLoading/Animation.hs
haskell
# LANGUAGE OverloadedStrings # worldUp = unit _z angle = vabsangle worldUp modelUp
module Hickory.ModelLoading.Animation where import Hickory.Math.Vector import Hickory.Math.Matrix import Linear.Quaternion import Data.List import Control.Lens ((^.)) import qualified Hickory.ModelLoading.Bvh as BVH import Data.Text (Text) import Linear (V3(..), zero, liftI2, point, unit, (^*), (!*!), (!*), identity,...
c6369912fd2061214270aa7dcd0fd1e1fe464e33482cbf494850c3308e4b5f31
evrim/core-server
controller.lisp
;; ------------------------------------------------------------------------- Coretal Controller ;; ------------------------------------------------------------------------- (in-package :core-server) ;; ------------------------------------------------------------------------- Generic Unauthorized Controller ;; ----...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/web/framework/controller.lisp
lisp
------------------------------------------------------------------------- ------------------------------------------------------------------------- ------------------------------------------------------------------------- ------------------------------------------------------------------------- -------------------...
Coretal Controller (in-package :core-server) Generic Unauthorized Controller (defcomponent <core:controller/unauthorized (secure-object/unauthorized) ((redirect-location :host both :initform "index.html"))) (defmethod/remote init ((self <core:controller/unauthorized)) (alert "Sorry, you are unauthorized.") ...
cd5d860bfdb24b045501de1e7f95bd2d587df3eb3cd2af607ff9d59dd8251183
borodust/alien-works
gltf.lisp
(cl:in-package :alien-works.tools.resources) ;;; ;;; MATERIAL PROVIDER ;;; (defun make-material-provider () (%filament:gltfio+create-jit-shader-provider '(claw-utils:claw-pointer %filament::engine) (%alien-works.graphics:engine-handle) :bool t)) (defun destroy-material-provider (provider) (%filament:gltfio...
null
https://raw.githubusercontent.com/borodust/alien-works/f5902bda1eb18f26358d45e97784ab823392b6f2/tools/resources/gltf.lisp
lisp
MATERIAL PROVIDER GLTF LOADER RESOURCE LOADER
(cl:in-package :alien-works.tools.resources) (defun make-material-provider () (%filament:gltfio+create-jit-shader-provider '(claw-utils:claw-pointer %filament::engine) (%alien-works.graphics:engine-handle) :bool t)) (defun destroy-material-provider (provider) (%filament:gltfio+~material-provider '(claw-...
317c1dfcaf3e374351b2f84514beace5e11ab4938249db9bfaf7b143ec535476
esobchenko/probix
probix_sup.erl
-module(probix_sup). -behaviour(supervisor). -export([start_link/0, init/1]). -ifndef(TEST). -define(REST_PORT_KEY, probix_rest_port). -define(WEB_PORT_KEY, probix_web_port). -else. -define(REST_PORT_KEY, probix_rest_test_port). -define(WEB_PORT_KEY, probix_web_test_port). -endif. start_link() -> supervisor:start...
null
https://raw.githubusercontent.com/esobchenko/probix/d4c955bafb47b20eae0e8ce32bde705bb3a9f72b/src/probix_sup.erl
erlang
init logger configuring rest server
-module(probix_sup). -behaviour(supervisor). -export([start_link/0, init/1]). -ifndef(TEST). -define(REST_PORT_KEY, probix_rest_port). -define(WEB_PORT_KEY, probix_web_port). -else. -define(REST_PORT_KEY, probix_rest_test_port). -define(WEB_PORT_KEY, probix_web_test_port). -endif. start_link() -> supervisor:start...
c97ba1aa127b6e8d497c3632dbdc47a5d01799e5a17087564d435fbcaebf0a84
awslabs/quivela
FIFO.hs
Copyright 2018 Amazon.com , Inc. or its affiliates . All Rights Reserved . SPDX - License - Identifier : Apache-2.0 # LANGUAGE QuasiQuotes # import Prelude import Quivela import qualified System.Exit as E program = prove' emptyVerifyEnv [prog'| method Fifo(n) { new (const n=n, s:int=0, r:int=0, ...
null
https://raw.githubusercontent.com/awslabs/quivela/c58a883c9387c18b51a83ede60fbb131357173e8/examples/FIFO.hs
haskell
Copyright 2018 Amazon.com , Inc. or its affiliates . All Rights Reserved . SPDX - License - Identifier : Apache-2.0 # LANGUAGE QuasiQuotes # import Prelude import Quivela import qualified System.Exit as E program = prove' emptyVerifyEnv [prog'| method Fifo(n) { new (const n=n, s:int=0, r:int=0, ...
f465993cac64b9af4139730db72267bc0523a29df7aaca6817c8452dd1238457
eholk/harlan
lint.scm
(library (harlan front lint) (export lint) (import (elegant-weapons helpers) (elegant-weapons match) (elegant-weapons sets) (rnrs) (util compat) (util color)) The goal of the lint pass is to make sure the program is ;; basically well-formed. It should check for common programmer ;; error...
null
https://raw.githubusercontent.com/eholk/harlan/3afd95b1c3ad02a354481774585e866857a687b8/harlan/front/lint.scm
scheme
basically well-formed. It should check for common programmer errors and report warnings to the user. The warnings should include suggestions for how to fix it. Ideally, a program that passes lint and typechecking should make it all the way through the rest of the compiler. This pass happens early on so that we s...
(library (harlan front lint) (export lint) (import (elegant-weapons helpers) (elegant-weapons match) (elegant-weapons sets) (rnrs) (util compat) (util color)) The goal of the lint pass is to make sure the program is (define (report color header expr message) (with-color color (display...
8887076b0a4048b4c63a46e9e14ed058866e21215551a1a719913bd07b7c1e73
V-Wong/COMP3141
ListMonad.hs
Combinatorial list monad . The standard definition in Haskell . -- Functor methods -- Standard list map. fmap' f [] = [] fmap' f (x : xs) = f x $ fmap' f xs -- Applicative methods -- Wrap up element in a single element list. pure' x = [x] [ ( * 2 ) , ( +1 ) ] < * > ! [ 1 , 2 , 3 , 4 , 5 ] = [ 2 , 4 , 6 , 8 ,...
null
https://raw.githubusercontent.com/V-Wong/COMP3141/f5a92e5833d2bb0a08e68cb2d025e38c8c875563/Functors%2C%20Monads%20and%20Applicatives/ListMonad.hs
haskell
Functor methods Standard list map. Applicative methods Wrap up element in a single element list. or (>>=!) = flip concatMap concatMap takes a function that produces a list from the elements of a list, and concatenates each of the produced lists in order.
Combinatorial list monad . The standard definition in Haskell . fmap' f [] = [] fmap' f (x : xs) = f x $ fmap' f xs pure' x = [x] [ ( * 2 ) , ( +1 ) ] < * > ! [ 1 , 2 , 3 , 4 , 5 ] = [ 2 , 4 , 6 , 8 , 10 ] + + [ 2 , 3 , 4 , 5 , 6 ] (<*>!) [] _ = [] (<*>!) (f : fs) args = map f args ++ fs <*>! args Monad m...
7c6455ffcd53cf443aeeb2bfd6b011d2961efb9115615f696bed3237129ddf72
AndrasKovacs/ELTE-func-lang
Gy03_pre.hs
# options_ghc -Wincomplete - patterns # module Gy03 where import Prelude hiding (Either(..), Functor(..)) Typeclasses : Eq , Ord , Show -- class Show a where -- show :: a -> String class Eq a where -- (==) :: a -> a -> Bool -- (==) a b = not (a /= b) -- (/=) :: a -> a -> Bool -- (/=) a b = not (a == ...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/e3fdac00746e6adff98f00364710b9462305f77b/2022-23-1/gyak3/Gy03_pre.hs
haskell
class Show a where show :: a -> String (==) :: a -> a -> Bool (==) a b = not (a /= b) (/=) :: a -> a -> Bool (/=) a b = not (a == b) (<=) :: a -> a -> Bool (>=) ... ... (Use `:i Ord` for more info) List type + instances - Tree type + instances Either type + instances Here you need to change ...
# options_ghc -Wincomplete - patterns # module Gy03 where import Prelude hiding (Either(..), Functor(..)) Typeclasses : Eq , Ord , Show class Eq a where class a = > Ord a where data List a = Nil | Cons a (List a) instance Show a => Show (List a) where show = undefined instance Eq a => Eq (List a) wh...
6c579f294d38d7d3493d61848778f3094c052f6f0d87f6ae5183df8660604f61
macourtney/Conjure
project.clj
(defproject org.conjure/conjure-script-core "1.0.1-SNAPSHOT" :description "The core namespaces for conjure script." :dependencies [[clojure-tools "1.1.2"] [org.conjure/conjure-plugin "1.0.1-SNAPSHOT"] [org.conjure/conjure-script-plugin "1.0.1-SNAPSHOT"] [org.conjur...
null
https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_script_core/project.clj
clojure
(defproject org.conjure/conjure-script-core "1.0.1-SNAPSHOT" :description "The core namespaces for conjure script." :dependencies [[clojure-tools "1.1.2"] [org.conjure/conjure-plugin "1.0.1-SNAPSHOT"] [org.conjure/conjure-script-plugin "1.0.1-SNAPSHOT"] [org.conjur...
b986483ef0b4f939146b0d0fea22eb1c2dbfcfb3c6835fe12ee294bd4e0bf9ed
soenkehahn/generics-eot
MinBound.hs
# LANGUAGE FlexibleContexts # # LANGUAGE MonoLocalBinds # module MinBound (minBoundG) where import Generics.Eot minBoundG :: (HasEot a, GMinBound (Eot a)) => a minBoundG = fromEot gMinBound class GMinBound a where gMinBound :: a instance GMinBound a => GMinBound (Either a x) where gMinBound = Left gM...
null
https://raw.githubusercontent.com/soenkehahn/generics-eot/cb001556d716deab72472f8c82f1b0eae326c25b/examples/MinBound.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE MonoLocalBinds # module MinBound (minBoundG) where import Generics.Eot minBoundG :: (HasEot a, GMinBound (Eot a)) => a minBoundG = fromEot gMinBound class GMinBound a where gMinBound :: a instance GMinBound a => GMinBound (Either a x) where gMinBound = Left gM...
b15236d18983e92a8630946dff189092b6d8485fd7511d44d76c3484e843be76
pink-gorilla/goldly
build.clj
(ns goldly.app.build (:require [clojure.string] ; side effects [taoensso.timbre :as timbre :refer [debug info warn error]] [modular.config :refer [get-in-config load-config! config-atom resolve-config-key]] [modular.writer :refer [write-status write-target]] [webly.build.profile :refer [setup-profile s...
null
https://raw.githubusercontent.com/pink-gorilla/goldly/56ddb8490b3e544ea775fa35e48df0a3ada732a7/goldly/src/goldly/app/build.clj
clojure
side effects [goldly.static :refer [export-sci-cljs]] for lazy extension css loading (on lazy load) export webly config sci-bindings-info (println "ext-ns" module-name) (println "ext-ns" module-name binding-fns) (println "fns-in-ns-map " ns-def-map) map: {'bar pinkgorilla.ui.viz.sparklines/sparkline-bar 'spo...
(ns goldly.app.build (:require [taoensso.timbre :as timbre :refer [debug info warn error]] [modular.config :refer [get-in-config load-config! config-atom resolve-config-key]] [modular.writer :refer [write-status write-target]] [webly.build.profile :refer [setup-profile server?]] [webly.build.core :as w...
47b712a9a3939c91ebaee303164e4c454266fbeb30ddabef9479138a2ffaa8e3
RisingFisan/Programacao-Funcional
Teste1617.hs
import Data.Maybe (fromMaybe) Exercicio 1 type MSet a = [(a,Int)] ex1 :: MSet Char ex1 = [('b',4),('a',2),('c',1)] cardMSet :: MSet a -> Int cardMSet = foldr ((+) . snd) 0 moda :: MSet a -> [a] moda = fst . foldr (\(x,n) (acc,accn) -> if n >= accn then (if n > accn then [x] else x:acc,n) else (acc,accn)) ([],0)...
null
https://raw.githubusercontent.com/RisingFisan/Programacao-Funcional/fb52a6f256a60e129d8a46e2aa0b36d86117155a/Testes/Teste1617.hs
haskell
import Data.Maybe (fromMaybe) Exercicio 1 type MSet a = [(a,Int)] ex1 :: MSet Char ex1 = [('b',4),('a',2),('c',1)] cardMSet :: MSet a -> Int cardMSet = foldr ((+) . snd) 0 moda :: MSet a -> [a] moda = fst . foldr (\(x,n) (acc,accn) -> if n >= accn then (if n > accn then [x] else x:acc,n) else (acc,accn)) ([],0)...
bc67f7309945f555867cbb75425742540d8b0d4f29073b53df23c8484546d69f
ghcjs/jsaddle-dom
RTCIceCandidate.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.RTCIceCandidate (newRTCIceCandidate, getCandidate, getSdpMid, getSdpMidUnsafe, getSdpMidUnchecked, getSdpML...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/RTCIceCandidate.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/RTCIceCandidate Mozilla RTCIceCandidate documentation> | <-US/docs/Web/API/RTCIceCandidate.sdpMid Mozilla RTCIceCandidate.sdpMid documentation> | <-US/docs/Web/API/RTCIceCandidate.sdpMid Mozilla RTCIceC...
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.RTCIceCandidate (newRTCIceCandidate, getCandidate, getSdpMid, getSdpMidUnsafe, getSdpMidUnchecked, getSdpMLineIndex, getSdpMLineIndexUnsafe, getSdpMLineIndexUnchecked, RTCIceCandidate(..), g...
9699549527b348136dd9f3f282d0fe7f517014094cb46f4406d1635f1e925411
samarthkishor/crafting-interpreters
value.ml
open Base type t = | LoxBool of bool | LoxInt of int | LoxNumber of float | LoxString of string | LoxNil | LoxFunction of lox_function and lox_function = { arity : int ; name : string ; callable : t list -> t [@equal fun _ _ -> false] (* no equality for functions *) } [@@deriving show { with_path ...
null
https://raw.githubusercontent.com/samarthkishor/crafting-interpreters/c95c43516da60fd50cee6856f82833aec7ab2864/lib/value.ml
ocaml
no equality for functions
open Base type t = | LoxBool of bool | LoxInt of int | LoxNumber of float | LoxString of string | LoxNil | LoxFunction of lox_function and lox_function = { arity : int ; name : string } [@@deriving show { with_path = false }, eq] type eval_type = | Bool | Number | String | Nil | Function ...
e12012dc9c24fbea182421fb44a23a78df12913d83390f45c16e766fe83dd49a
deepfire/holotype
Main.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TupleSections # # LANGUAGE UnicodeSyntax # # O...
null
https://raw.githubusercontent.com/deepfire/holotype/d33052f588b74616560b81616ffc4a0142f8a617/experiments/apex/Main.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # shed a layer of C
# LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TupleSections # # LANGUAGE UnicodeSyntax # # OPTIONS_GHC -Wall -Wno - unused - imports -Wno - unticked -...
1e7eb33a8f6247e1cb9428b53c309473e9b069827865d3c0d1fba430166481e3
opencog/opencog
config.scm
; ; config.scm ; ; File path configuration. Edit and modify this file to fit your setup. ; Perl script used for converting bulk - processed files into ; opencog NLP hypergraphs. ; (define cff-to-opencog-exe "/home/linas/src/novamente/src/relex-bzr/src/perl/cff-to-opencog.pl")
null
https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/scm/config.scm
scheme
config.scm File path configuration. Edit and modify this file to fit your setup. opencog NLP hypergraphs.
Perl script used for converting bulk - processed files into (define cff-to-opencog-exe "/home/linas/src/novamente/src/relex-bzr/src/perl/cff-to-opencog.pl")
957f3b44a0fe65b6fa4d3797e3c57e8f37094063510d1662e69ba34e4ad9c5d2
UU-ComputerScience/uhc
FilePath.hs
# LANGUAGE CPP # | Module : System . FilePath Copyright : ( c ) 2005 - 2007 License : BSD - style ( see the file libraries / base / LICENSE ) Maintainer : Stability : stable Portability : portable A library for ' FilePath ' manipulations , using or Windows filepaths...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/filepath/System/FilePath.hs
haskell
# LANGUAGE CPP # | Module : System . FilePath Copyright : ( c ) 2005 - 2007 License : BSD - style ( see the file libraries / base / LICENSE ) Maintainer : Stability : stable Portability : portable A library for ' FilePath ' manipulations , using or Windows filepaths...
45caab47dbe8c2dea10456363eb5b3ba5432d3459713aa18075516f49773b824
spurious/chibi-scheme-mirror
binary-record.scm
(define (read-u16/be in) (let* ((i (read-u8 in)) (j (read-u8 in))) (if (eof-object? j) (error "end of input") (+ (arithmetic-shift i 8) j)))) (define (read-u16/le in) (let* ((i (read-u8 in)) (j (read-u8 in))) (if (eof-object? j) (error "end of input") (+ (...
null
https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/lib/chibi/binary-record.scm
scheme
Record types with user-specified binary formats. A work in progress, but sufficient for tar files.
(define (read-u16/be in) (let* ((i (read-u8 in)) (j (read-u8 in))) (if (eof-object? j) (error "end of input") (+ (arithmetic-shift i 8) j)))) (define (read-u16/le in) (let* ((i (read-u8 in)) (j (read-u8 in))) (if (eof-object? j) (error "end of input") (+ (...
44a777034971ce28a478c5ffd38455c1c0319877a847a100a37607d4ae5e2c82
rtoy/cmucl
copy-prop.lisp
(defun foo (n) (dotimes (i n) (print (+ i 3)))) (defun ident (x) x)
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/tests/copy-prop.lisp
lisp
(defun foo (n) (dotimes (i n) (print (+ i 3)))) (defun ident (x) x)
ecce4294212809a7f7ca5990a1aa255830592102372a0bb35a83e33c1669565f
GillianPlatform/Gillian
Spec.ml
module SSubst = Gillian.Symbolic.Subst module SVal = Gillian.Symbolic.Values module Flag = Gillian.Gil_syntax.Flag module Expr = Gillian.Gil_syntax.Expr module SS = Containers.SS * { b Single JSIL specifications } . type st = { pre : Asrt.t; (** Precondition *) posts : Asrt.t list; (** Postcondition *) flag : ...
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/1c8d65120c04ef87cda689a9d41268e25b5ffa7e/Gillian-JS/lib/JSIL/Spec.ml
ocaml
* Precondition * Postcondition * Return flag ({!type:jsil_return_flag}) * Should the spec be verified? * Procedure/spec name * Procedure/spec parameters * List of single specifications * If the spec is already normalised * If the spec is incomplete * Should the spec be verified?
module SSubst = Gillian.Symbolic.Subst module SVal = Gillian.Symbolic.Values module Flag = Gillian.Gil_syntax.Flag module Expr = Gillian.Gil_syntax.Expr module SS = Containers.SS * { b Single JSIL specifications } . type st = { label : (string * SS.t) option; } * { b Full JSIL specifications } . type t = { } * Cre...
657e361297cb1cf7715b2b2bf6183c55f1e6697847bff80c3b68730a09809848
bobzhang/ocaml-book
myocamlbuild.ml
open Ocamlbuild_plugin open Command open Printf let (^$) f x = f x let (//) = Filename.concat let flip f x y = f y x let prerr_endlinef fmt = ksprintf prerr_endline fmt let run_and_read = Ocamlbuild_pack.My_unix.run_and_read let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings let find_packages () = ...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/ffi/simple/myocamlbuild.ml
ocaml
* list extensions, but not used here * configuration syntax extensions * demo how to use dep dep ["ocamldep"; "file:test/test_string.ml"] ["test/test_data/string.txt"; "test/test_data/char.txt"]; flag ["ocaml"; "pp"; "use_lambda"] (A"pa_lambda.cmo"); dep ["ocamldep"; "use_lambda"] ...
open Ocamlbuild_plugin open Command open Printf let (^$) f x = f x let (//) = Filename.concat let flip f x y = f y x let prerr_endlinef fmt = ksprintf prerr_endline fmt let run_and_read = Ocamlbuild_pack.My_unix.run_and_read let blank_sep_strings = Ocamlbuild_pack.Lexers.blank_sep_strings let find_packages () = ...
6a65751a043385558270d341d1b595c63df6431c00fa6332f1b2c578159864c1
karlhof26/gimp-scheme
JMS-Brickwall.scm
;; *************************************************************************** * Copyright ( C ) 2011 by * ;; * * ;; * * ;; * This program is free software; you can redistribute it ...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/386285494a26e9f60c3015ed2d55651dd7a961e1/JMS-Brickwall.scm
scheme
*************************************************************************** * * * * * This program is free software; you can redistribute it and/or modify * either version 2 of the Lice...
* Copyright ( C ) 2011 by * * it under the terms of the GNU General Public License as published by * * You should have received a copy of the GNU General Public License * * Free Software Foundation , Inc. , * * 59 Temple Place - Suit...
2f36fdea1c7db0a7f77577162ee9ce1fee74d464a7b99491c601368389437e11
metabase/metabase
util.clj
(ns metabase.driver.sql.query-processor.util (:require [metabase.util.honeysql-extensions :as hx])) (defn nfc-field->parent-identifier "Take a nested field column field corresponding to something like an inner key within a JSON column, and then get the parent column's identifier from its own identifier and the n...
null
https://raw.githubusercontent.com/metabase/metabase/9ac7f26ed92ea0dff3474c0f887040549d2d85ad/src/metabase/driver/sql/query_processor/util.clj
clojure
(ns metabase.driver.sql.query-processor.util (:require [metabase.util.honeysql-extensions :as hx])) (defn nfc-field->parent-identifier "Take a nested field column field corresponding to something like an inner key within a JSON column, and then get the parent column's identifier from its own identifier and the n...
d915ec164cfc5fca5dce7e26cdafaa827a0b3e168e59c8c355369c9ca2890dc3
mvoidex/hsdev
Util.hs
module Control.Apply.Util ( (&), chain ) where (&) :: a -> (a -> b) -> b (&) = flip ($) chain :: [a -> a] -> a -> a chain = foldr (.) id
null
https://raw.githubusercontent.com/mvoidex/hsdev/016646080a6859e4d9b4a1935fc1d732e388db1a/src/Control/Apply/Util.hs
haskell
module Control.Apply.Util ( (&), chain ) where (&) :: a -> (a -> b) -> b (&) = flip ($) chain :: [a -> a] -> a -> a chain = foldr (.) id
5b034ad3566857f554772373df1fc34816488dd0114fc6418fe78b0f87e86bf9
OCamlPro/alt-ergo
parsers.mli
(******************************************************************************) (* *) (* The Alt-Ergo theorem prover *) Copyright ( C ) 2006 - 2013 ...
null
https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/src/parsers/parsers.mli
ocaml
**************************************************************************** The Alt-Ergo theorem prover ...
Copyright ( C ) 2006 - 2013 ...
95600d4633a8c00cd37bcb10ca4796fdd733120d546e38258e25911fe868488c
freizl/dive-into-haskell
PicturesSVG.hs
----------------------------------------------------------------------- -- Haskell : The Craft of Functional Programming , 3e ( c ) Addison - Wesley , 1996 - 2011 . -- -- PicturesSVG -- -- The Pictures functionality implemented by translation SVG ( Scalable Vector Graphics ) -- -- These ...
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/lectures/informatics1-FP/tutorials/Labweek/PicturesSVG.hs
haskell
--------------------------------------------------------------------- PicturesSVG The Pictures functionality implemented by translation These Pictures could be rendered by conversion to ASCII art, but instead are rendered into SVG, which can then be viewed in a browser: google chrome d...
Haskell : The Craft of Functional Programming , 3e ( c ) Addison - Wesley , 1996 - 2011 . SVG ( Scalable Vector Graphics ) module PicturesSVG where import System.IO import Test.QuickCheck import Control.Monad (liftM, liftM2) data Picture = Img Image | Above Picture Picture | Beside Picture P...
469071d293fc53cd9dbd01cf5496d56a10e9b79cb0e8e75aa23fbff3482c3599
gigamonkey/monkeylib-utilities
numbers.lisp
(in-package :com.gigamonkeys.utilities) (defun round-to (number n &optional (rounding-function #'round)) "Round to nearest `n'. (round-to x 1) === (round x)" (* (funcall rounding-function (/ number n)) n)) (defun round-unit-fraction (ratio) "Return unit fraction approximation to `ratio'." ;; This function, th...
null
https://raw.githubusercontent.com/gigamonkey/monkeylib-utilities/3920a67b0cdfeb87d738634545c8bf1e7207fdb4/numbers.lisp
lisp
This function, though elegant, doesn't necessarily return the
(in-package :com.gigamonkeys.utilities) (defun round-to (number n &optional (rounding-function #'round)) "Round to nearest `n'. (round-to x 1) === (round x)" (* (funcall rounding-function (/ number n)) n)) (defun round-unit-fraction (ratio) "Return unit fraction approximation to `ratio'." closest unit fractio...
3ab05f0af8bf7fb87806430a558eedb97dc2d51b0f24ad1f997de058d52077af
vmchale/hgis
Types.hs
# LANGUAGE FlexibleInstances # # LANGUAGE TemplateHaskell # -- | Module containing types for various geometrical objects. Lenses included. module GIS.Types where import Text.PrettyPrint.ANSI.Leijen import GHC.Generics import Control.Lens type Point = (Double, Double) type Polygon = [Point] type Projection = (Dou...
null
https://raw.githubusercontent.com/vmchale/hgis/5bd38f150a8d237dc78501859352bf1cf734f92b/src/GIS/Types.hs
haskell
| Module containing types for various geometrical objects. Lenses included. information about the district. possibly get rid of this idk
# LANGUAGE FlexibleInstances # # LANGUAGE TemplateHaskell # module GIS.Types where import Text.PrettyPrint.ANSI.Leijen import GHC.Generics import Control.Lens type Point = (Double, Double) type Polygon = [Point] type Projection = (Double, Double) -> (Double, Double) | Data type for one record in a shape file ,...
42d47abc11020bc684d358baa8f7128c09007760840da4cce643111b0116b108
RedPRL/cooltt
Refiner.mli
* This is the basis of trusted inference rules for cooltt . This module also contains some auxiliary tactics , but these do n't need to be trusted so they should be moved elsewhere . some auxiliary tactics, but these don't need to be trusted so they should be moved elsewhere. *) open CodeUnit module D := Do...
null
https://raw.githubusercontent.com/RedPRL/cooltt/9e37da9d029531b715a2af1d58b5df6a5fe79447/src/core/Refiner.mli
ocaml
* This is the basis of trusted inference rules for cooltt . This module also contains some auxiliary tactics , but these do n't need to be trusted so they should be moved elsewhere . some auxiliary tactics, but these don't need to be trusted so they should be moved elsewhere. *) open CodeUnit module D := Do...
de63108dabafdbc8e0b07d674dcd052c94028c6ea09d5900fd6fe1e0134bdba8
jarohen/clidget
handler.clj
(ns todomvc.handler (:require [ring.util.response :refer [response content-type]] [compojure.core :refer [routes GET]] [compojure.route :refer [resources]] [compojure.handler :refer [api]] [hiccup.page :refer [html5 include-css include-js]] [frodo :refer [re...
null
https://raw.githubusercontent.com/jarohen/clidget/bd67082ad3819908e2d532151417cab436333ad0/todomvc/src/clojure/todomvc/handler.clj
clojure
(ns todomvc.handler (:require [ring.util.response :refer [response content-type]] [compojure.core :refer [routes GET]] [compojure.route :refer [resources]] [compojure.handler :refer [api]] [hiccup.page :refer [html5 include-css include-js]] [frodo :refer [re...
59cd9a531348fce27c4c840a37784953b42becba1929ca24440976c2c6c7e1fc
nasa/Common-Metadata-Repository
provider_ingest_permissions_test.clj
(ns cmr.system-int-test.ingest.provider-ingest-permissions-test "Verifies the correct provider ingest permissions are enforced" (:require [clojure.string :as string] [clojure.test :refer :all] [cmr.common.util :refer [are3]] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.system-int-test.data2.co...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/ef1fdf1dd6e90a5e686a324a4c905e04ba0b8cad/system-int-test/test/cmr/system_int_test/ingest/provider_ingest_permissions_test.clj
clojure
Grant provider admin permission Grant provider admin permission but for a different provider Grant system admin permission - but not provider admin to ingest. So all the ingests should fail. Generic Document Pipeline Generic Document Pipeline it has the INGEST_MANAGEMENT_ACL permissions, it still fails the inges...
(ns cmr.system-int-test.ingest.provider-ingest-permissions-test "Verifies the correct provider ingest permissions are enforced" (:require [clojure.string :as string] [clojure.test :refer :all] [cmr.common.util :refer [are3]] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.system-int-test.data2.co...
515c38db37430c07a2772f5e3918ef5f9ea27dcdf9fe9e70a205b58329171002
8c6794b6/haskell-sc-scratch
SDef.hs
------------------------------------------------------------------------------ -- | -- Module : $Header$ CopyRight : ( c ) 8c6794b6 -- License : BSD3 Maintainer : -- Stability : unstable -- Portability : non-portable -- Attempt to make from function using Template Haskell , take 2 . -- module S...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/SynthFunc/SDef.hs
haskell
---------------------------------------------------------------------------- | Module : $Header$ License : BSD3 Stability : unstable Portability : non-portable | Suppose we have a function like: > where > sig = sinOsc ar freq 0 * amp * e > e = xLine kr 1 1e-9 dur RemoveSynth Problem...
CopyRight : ( c ) 8c6794b6 Maintainer : Attempt to make from function using Template Haskell , take 2 . module SDef where import Language.Haskell.TH import Sound.SC3 import Sound.SC3.Lepton > foo amp out 0 sig And would like to make OSC message for sending synthdef from this function . > $ ( sd...
9ea087fbdb6ae9eea46a50c99324c19c78eebad146b5eade4a83aab634be4eab
facebookarchive/pfff
layer_coverage.mli
val gen_red_green_layer: Coverage_code.lines_coverage -> Layer_code.layer val gen_heatmap_layer: Coverage_code.lines_coverage -> Layer_code.layer val actions : unit -> Common.cmdline_actions
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/h_program-lang/layer_coverage.mli
ocaml
val gen_red_green_layer: Coverage_code.lines_coverage -> Layer_code.layer val gen_heatmap_layer: Coverage_code.lines_coverage -> Layer_code.layer val actions : unit -> Common.cmdline_actions
97c3132130eb8f7f1206d2c37743ddeb6da22d49b765e1ffe53690c1de61a256
hozumi/session-expiry
project.clj
(defproject org.clojars.hozumi/session-expiry "1.0.0-SNAPSHOT" :description "A ring middleware for setting session timeout." :dependencies [[org.clojure/clojure "1.2.0"]] :dev-dependencies [[ring/ring-core "0.3.3"]])
null
https://raw.githubusercontent.com/hozumi/session-expiry/1af076c39916838139dfe9f342d61e78f1413b97/project.clj
clojure
(defproject org.clojars.hozumi/session-expiry "1.0.0-SNAPSHOT" :description "A ring middleware for setting session timeout." :dependencies [[org.clojure/clojure "1.2.0"]] :dev-dependencies [[ring/ring-core "0.3.3"]])
4f5d36dafc47934b38c4964a961c9076d842294f208c94e37ca2921ac3ab1fcd
fcbr/graph-algorithms
shortest-paths.lisp
(in-package #:graph-algorithms) (defun shortest-paths (source vertices neighbors-fn) "Dijkstra's shortest path algorithm. All reachable vertices from SOURCE are computed. Returns DIST and PREV hash tables. As in the other methods, NEIGHBORS-FN is a function that receives a vertex and returns its neighbors as a li...
null
https://raw.githubusercontent.com/fcbr/graph-algorithms/3d9ea220344c2d10db83b99d0571a95904d5bc9a/shortest-paths.lisp
lisp
(in-package #:graph-algorithms) (defun shortest-paths (source vertices neighbors-fn) "Dijkstra's shortest path algorithm. All reachable vertices from SOURCE are computed. Returns DIST and PREV hash tables. As in the other methods, NEIGHBORS-FN is a function that receives a vertex and returns its neighbors as a li...
b8883f3edc0e54c77ea9808bd042a4939b8fb8aa1dc219068fedb708db4c25e0
federkasten/clucie
query.clj
(ns clucie.query (:require [clucie.analysis :as analysis] [clucie.queryparser :as qp] [clucie.utils :refer [stringify-value]]) (:import [org.apache.lucene.index Term] [org.apache.lucene.search BooleanClause BooleanClause$Occur BooleanQuery BooleanQuery$Builder ...
null
https://raw.githubusercontent.com/federkasten/clucie/31552cb928f47926cedf501da2e250034cfb752a/src/clucie/query.clj
clojure
(ns clucie.query (:require [clucie.analysis :as analysis] [clucie.queryparser :as qp] [clucie.utils :refer [stringify-value]]) (:import [org.apache.lucene.index Term] [org.apache.lucene.search BooleanClause BooleanClause$Occur BooleanQuery BooleanQuery$Builder ...
152c6735924d0366d541d28096ef787923e3e230ceaba92cf4d9450dc1b0bde7
rodo/tsung-gis
fill.erl
-module(fill). -export([url/0]). url()-> foo(["toto","titi"], ["64", "66","67"]). foo(Arr, Boo)-> lists:merge(lists:map(fun(X) -> bar(Boo, X) end, Arr)). bar(Arr, Boo)-> lists:map(fun(X) -> X ++ "/" ++ Boo end, Arr).
null
https://raw.githubusercontent.com/rodo/tsung-gis/d6fc43e5c21d7d12f703cf0766dcd0900ab1d6bc/fill.erl
erlang
-module(fill). -export([url/0]). url()-> foo(["toto","titi"], ["64", "66","67"]). foo(Arr, Boo)-> lists:merge(lists:map(fun(X) -> bar(Boo, X) end, Arr)). bar(Arr, Boo)-> lists:map(fun(X) -> X ++ "/" ++ Boo end, Arr).
35c47ed1a9064cd0544b381f5a002bf0bc871046c2a65eeee30c440400848ced
phantomics/seed
package.lisp
package.lisp (defpackage #:seed (:export #:contact-open #:contact-close) (:use #:cl #:seed.contact #:seed.generate #:seed.platform-model.router.base))
null
https://raw.githubusercontent.com/phantomics/seed/f128969c671c078543574395d6b23a1a5f2723f8/package.lisp
lisp
package.lisp (defpackage #:seed (:export #:contact-open #:contact-close) (:use #:cl #:seed.contact #:seed.generate #:seed.platform-model.router.base))
1159aa116b65296ca21b8e495db9f4c881eb7d7355ec1bb19fbf62f3c6259742
clj-commons/rewrite-cljs
coercer.cljs
(ns rewrite-clj.node.coercer (:require [rewrite-clj.node.comment :refer [CommentNode]] [rewrite-clj.node.forms :refer [FormsNode]] [rewrite-clj.node.keyword :refer [KeywordNode]] [rewrite-clj.node.quote :refer [QuoteNode]] [rewrite-clj.node.stringz :refer [StringNode st...
null
https://raw.githubusercontent.com/clj-commons/rewrite-cljs/5b0fdea43a6748519d0b0ad3d7eaa98aa541de35/src/rewrite_clj/node/coercer.cljs
clojure
## Helpers Number Number ## Seqs ## Maps ## Vars (coerce [v] (-> (str v) (symbol) (token-node) (vector) (var-node)))) ## Existing Nodes UnevalNode (coerce [v] v)
(ns rewrite-clj.node.coercer (:require [rewrite-clj.node.comment :refer [CommentNode]] [rewrite-clj.node.forms :refer [FormsNode]] [rewrite-clj.node.keyword :refer [KeywordNode]] [rewrite-clj.node.quote :refer [QuoteNode]] [rewrite-clj.node.stringz :refer [StringNode st...
d958ccf6ac1fdec615bc95fbf4ccc9f8d22d5d4a09a513e2877f37c42fee9c98
janestreet/async_ssl
ssl.mli
* An Async - pipe - based interface with OpenSSL . This module allows you to create an SSL client and server , with encrypted communication between both . This module allows you to create an SSL client and server, with encrypted communication between both. *) open! Core open! Async module Versio...
null
https://raw.githubusercontent.com/janestreet/async_ssl/5a3e7399284305d2b93d16ed6c64a79a22a76895/src/ssl.mli
ocaml
It is your responsibility to check that the session certificate satisfies your expectations (for instance, that the CN (common name) on the certificate matches the domain name you are intending to connect to). Same applies to the negotiated version of the protocol. Becomes determined when the ssl session ha...
* An Async - pipe - based interface with OpenSSL . This module allows you to create an SSL client and server , with encrypted communication between both . This module allows you to create an SSL client and server, with encrypted communication between both. *) open! Core open! Async module Versio...
9369833ea87ebbf4a0bd7bbaabde37a8424427fb0a88d98014ff47b2b42f9fe7
clash-lang/clash-compiler
Moore.hs
| Copyright : ( C ) 2013 - 2016 , University of Twente , 2017 , Google Inc. 2019 , Myrtle Software Ltd License : BSD2 ( see the file LICENSE ) Maintainer : < > Whereas the output of a Mealy machine depends on /current transition/ , th...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/62022223a035d62511d5d0dbc79f28074d68852e/clash-prelude/src/Clash/Explicit/Moore.hs
haskell
# LANGUAGE NoGeneralizedNewtypeDeriving # # LANGUAGE Safe # | Create a synchronous function from a combinational function describing @ macT :: Int -- Current state -> (Int,Int) -- Input -> (Int,Int) -- Updated state macT s (x,y) = x * y + s mac => 'Clock' dom -> 'Reset' dom -> 'Enable'...
| Copyright : ( C ) 2013 - 2016 , University of Twente , 2017 , Google Inc. 2019 , Myrtle Software Ltd License : BSD2 ( see the file LICENSE ) Maintainer : < > Whereas the output of a Mealy machine depends on /current transition/ , th...
8fa1b40e307a6cdea50839537829561703774e124804f456c3ee5d49c9d144d4
shirok/Gauche
librx.scm
;;; ;;; librx.scm - builtin regular-expression procedures ;;; Copyright ( c ) 2000 - 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistributions of source code must r...
null
https://raw.githubusercontent.com/shirok/Gauche/b773899dbe0b2955e1c4f1daa066da874070c1e4/src/librx.scm
scheme
librx.scm - builtin regular-expression procedures Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and th...
Copyright ( c ) 2000 - 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (select-module gauche) (use util.match) (in...
b514f7e4e08b222fff3934dcf7bdb0bfa9209426079de4324e6407a63a82eff4
guicho271828/trivia
ppcre.lisp
(defpackage :trivia.ppcre.test (:use :cl :fiveam :alexandria :trivia.level2 :trivia.ppcre)) (in-package :trivia.ppcre.test) (in-suite :trivia.ppcre) (defmacro is-match (arg pattern) `(is-true (match ,arg (,pattern t)))) (defmacro is-not-match (arg pattern) `(is-false (match ,arg (,pattern t)))...
null
https://raw.githubusercontent.com/guicho271828/trivia/69637801872cc80da4fc727de7ffce402bfb7c8a/test/ppcre.lisp
lisp
Contrib tests
(defpackage :trivia.ppcre.test (:use :cl :fiveam :alexandria :trivia.level2 :trivia.ppcre)) (in-package :trivia.ppcre.test) (in-suite :trivia.ppcre) (defmacro is-match (arg pattern) `(is-true (match ,arg (,pattern t)))) (defmacro is-not-match (arg pattern) `(is-false (match ,arg (,pattern t)))...
16d74c87f2c8bcb660148b48b263b8e3835fb0f539aacc87534d9183bfca6424
lopec/LoPEC
clientSupervisor.erl
%%%------------------------------------------------------------------- @private @author < > ( C ) 2009 , Clusterbusters %%% @doc The client supervisor supervises the client supervision tree %%% @end Created : 29 Sep 2009 by < > %%%------------------------------------------------------------------- -modul...
null
https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/branches/stable-1/lib/slave/src/clientSupervisor.erl
erlang
------------------------------------------------------------------- @doc The client supervisor supervises the client supervision tree @end ------------------------------------------------------------------- API Supervisor callbacks =================================================================== API functions =...
@private @author < > ( C ) 2009 , Clusterbusters Created : 29 Sep 2009 by < > -module(clientSupervisor). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). ( ) - > { ok , Pid } | ignore | { error , Error } start_link() -> chronicler:info("~w : module started~n", [?MODULE]), ...
fccecb1b7512fbcf2afb7f66b80dc81fd7adf7b954f87d2ca96c97484afcce5a
fukamachi/integral
database.lisp
(in-package :cl-user) (defpackage integral.database (:use :cl) (:import-from :integral.connection :get-connection :with-quote-char) (:import-from :dbi :prepare :execute :fetch-all :do-sql) (:import-from :sxql ...
null
https://raw.githubusercontent.com/fukamachi/integral/5fdf506233e9f6aa814a2da529bed0a551183110/src/database.lisp
lisp
(in-package :cl-user) (defpackage integral.database (:use :cl) (:import-from :integral.connection :get-connection :with-quote-char) (:import-from :dbi :prepare :execute :fetch-all :do-sql) (:import-from :sxql ...
e67c76527ecb9bec8a53adc78e7e35bc32f70b8c21a898589ab29aaa04f64c59
lymar/hastache
genericsBig.hs
#!/usr/local/bin/runhaskell {-# LANGUAGE DeriveDataTypeable #-} import Text.Hastache import Text.Hastache.Context import qualified Data.Text.Lazy.IO as TL import Data.Data import Data.Generics main = hastacheStr defaultConfig (encodeStr template) context >>= TL.putStrLn -- begin example data Book = Book { t...
null
https://raw.githubusercontent.com/lymar/hastache/cd299ff1ac4c35259fbd333ea7fa9b3c280b9ff9/examples/genericsBig.hs
haskell
# LANGUAGE DeriveDataTypeable # begin example
#!/usr/local/bin/runhaskell import Text.Hastache import Text.Hastache.Context import qualified Data.Text.Lazy.IO as TL import Data.Data import Data.Generics main = hastacheStr defaultConfig (encodeStr template) context >>= TL.putStrLn data Book = Book { title :: String, publicationYear :: Int...
16e7b21fd75bae37d213b24d89d15642a8225f18a30569821c3ba09c68bb06b8
esl/erlang-web
wpart_integer.erl
The contents of this file are subject to the Erlang Web Public License , Version 1.0 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the Erlang Web Public License along with this software . If not , it can be %% retrieved via the world...
null
https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/wparts-1.4.1/src/wpart_integer.erl
erlang
compliance with the License. You should have received a copy of the retrieved via the world wide web at -consulting.com/. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ---------------------------------...
The contents of this file are subject to the Erlang Web Public License , Version 1.0 , ( the " License " ) ; you may not use this file except in Erlang Web Public License along with this software . If not , it can be Software distributed under the License is distributed on an " AS IS " The Initial Developer o...
183b54894a78556828d0111ddfad139199c27d2e304120667f8c99a91d3dff32
plumatic/grab-bag
core.clj
(ns model-explorer.core "Core protocol for models." (:use plumbing.core) (:require [schema.core :as s] [model-explorer.query :as query])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Schemas (s/defschema Label (s/named String "describes a collection o...
null
https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/service/model-explorer/src/model_explorer/core.clj
clojure
Store for a type of training data. Store for models
(ns model-explorer.core "Core protocol for models." (:use plumbing.core) (:require [schema.core :as s] [model-explorer.query :as query])) Schemas (s/defschema Label (s/named String "describes a collection of training examples")) (s/defschema Labels {Label {:date Long s/Keyword s/Any}}) (s/defschem...
736dbd09b2efed05fed41e22d391ecf8dce75003c32fd72acb18c6a4cd3740d6
janestreet/hardcaml_c
codegen.mli
open! Core open Hardcaml type normal_signal_info = { width : int ; index : [ `Local of int | `Global of int ] } type signal_info = | Const of Bits.t | Normal of normal_signal_info | Virtual of normal_signal_info val word_offset : signal_info -> int val word_size : int val word_bytes : int val width_to_wo...
null
https://raw.githubusercontent.com/janestreet/hardcaml_c/1bf2468801ba9f6a935ffcd08887d9da87bee3f1/lib/codegen.mli
ocaml
open! Core open Hardcaml type normal_signal_info = { width : int ; index : [ `Local of int | `Global of int ] } type signal_info = | Const of Bits.t | Normal of normal_signal_info | Virtual of normal_signal_info val word_offset : signal_info -> int val word_size : int val word_bytes : int val width_to_wo...
c6bfc719db9b409c518694886f4e7c9cfc99e412b58be3b6e05d11f03c0eac99
district0x/cljs-web3-next
settings.cljs
(ns cljs-web3-next.settings (:require [oops.core :refer [ocall oget oset! oapply+]])) (defn settings [web3] (oget web3 "settings")) (defn default-account [web3] (oget web3 "settings" "defaultAccount")) (defn set-default-account! [web3 hex-str] (oset! (settings web3) "defaultAccount" hex-str)) (defn default-...
null
https://raw.githubusercontent.com/district0x/cljs-web3-next/a473ac9c21d994ecb6abfb4899ef5474d5dfc669/src/cljs_web3_next/settings.cljs
clojure
(ns cljs-web3-next.settings (:require [oops.core :refer [ocall oget oset! oapply+]])) (defn settings [web3] (oget web3 "settings")) (defn default-account [web3] (oget web3 "settings" "defaultAccount")) (defn set-default-account! [web3 hex-str] (oset! (settings web3) "defaultAccount" hex-str)) (defn default-...
6c364b41810fba03ef28372056fcabceeacdac1844ddf46d9a1b5de5a110f598
ksseono/the-joy-of-clojure
slice.clj
;; Listing 12.15 ;; (ns joy.slice) (definterface ISliceable (slice [^long s ^long e]) (^int sliceCount [])) ;; ;; Listing 12.16 ;; (def dumb (reify ISliceable (slice [_ s e] [:empty]) (sliceCount [_] 42))) (comment (.slice dumb 1 2) ;;=> [:empty] (.sliceCount dumb) = > 42 ) ;; Listing...
null
https://raw.githubusercontent.com/ksseono/the-joy-of-clojure/4fee3fb2750236b85b59ae9d7a83e0929040e4f0/src/clj/ch12/joy/slice.clj
clojure
Listing 12.16 => [:empty] => [:empty] => "ab"
Listing 12.15 (ns joy.slice) (definterface ISliceable (slice [^long s ^long e]) (^int sliceCount [])) (def dumb (reify ISliceable (slice [_ s e] [:empty]) (sliceCount [_] 42))) (comment (.slice dumb 1 2) (.sliceCount dumb) = > 42 ) Listing 12.17 (defprotocol Sliceable (slice [this s e...
2450aa87266449c6651f50b038510c52ca8956f3b8e62586a1dcbeea386923cc
nasa/PRECiSA
ACSLTypes.hs
-- Notices: -- Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . -- Disclaimers No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTO...
null
https://raw.githubusercontent.com/nasa/PRECiSA/91e1e7543c5888ad5fb123d3462f71d085b99741/PRECiSA/src/FramaC/ACSLTypes.hs
haskell
Notices: Disclaimers
Copyright 2020 United States Government as represented by the Administrator of the National Aeronautics and Space Administration . All Rights Reserved . No Warranty : THE SUBJECT SOFTWARE IS PROVIDED " AS IS " WITHOUT ANY WARRANTY OF ANY KIND , EITHER EXPRESSED , IMPLIED , OR STATUTORY , INCLUDING , BUT NOT LIMIT...
9cec815519a9a32d42a96805f462ea986c49207001b38b46bcdaf4d06a719cb9
ds-wizard/engine-backend
ConfigMigration.hs
module Wizard.Database.Migration.Development.Config.ConfigMigration where import Shared.Constant.Component import Wizard.Database.DAO.Config.AppConfigDAO import Wizard.Database.Migration.Development.Config.Data.AppConfigs import Wizard.Util.Logger runMigration = do logInfo _CMP_MIGRATION "(Config/Config) started" ...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/39d1411252ac15908d3b5af4e06c41bbc6f1c74d/engine-wizard/src/Wizard/Database/Migration/Development/Config/ConfigMigration.hs
haskell
module Wizard.Database.Migration.Development.Config.ConfigMigration where import Shared.Constant.Component import Wizard.Database.DAO.Config.AppConfigDAO import Wizard.Database.Migration.Development.Config.Data.AppConfigs import Wizard.Util.Logger runMigration = do logInfo _CMP_MIGRATION "(Config/Config) started" ...
6b78ae4da1b976b421148f560ac3d002d7bf42bf135419d49c2cc58eaef44e33
andorp/bead
MySQL.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Rank2Types #-} module Bead.Persistence.SQL.MySQL where import Control.Exception import Control.Monad.Logger import Data.String (fromString) import Database.Persist.Sql import Database.Persist.MySQL import qualified Bead....
null
https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/Persistence/SQL/MySQL.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE Rank2Types # * Migration fix If a field is created with longtext utf8mb4 modifier, the persist migrates with alter table, it is probably an issue.
module Bead.Persistence.SQL.MySQL where import Control.Exception import Control.Monad.Logger import Data.String (fromString) import Database.Persist.Sql import Database.Persist.MySQL import qualified Bead.Config as Config import Bead.Domain.Types (Erroneous(...