_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
38bf9980f95550cd80e5f5ade6431248b6573b85b4067b3fa312f42ede48ebbd
rd--/hsc3
s_getn.help.hs
Sound.Sc3.Lang.Help.viewServerHelp "/s_getn"
null
https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Server/s_getn.help.hs
haskell
Sound.Sc3.Lang.Help.viewServerHelp "/s_getn"
97945327311e249374dc80198aacfee5bf70f49a44eec4498337109c37ebf364
malcolmsparks/ciao
core_test.clj
(ns ciao.core-test (:use clojure.test ciao.core)) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/malcolmsparks/ciao/c7512a832433f701899c7160753542c602b706a5/test/ciao/core_test.clj
clojure
(ns ciao.core-test (:use clojure.test ciao.core)) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
a00d6bf1cfb304a4d5d5b36630e3e6265d9f3aed430e68cb47cb58f9e7310767
let-def/cuite
cuite__alloc.ml
{ { { COPYING * ( Copyright ( C ) 2012 < frederic.bour(_)lakaban.net > Permission is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limita...
null
https://raw.githubusercontent.com/let-def/cuite/42629a91c573ecbf1b01f213f1bf35a456d2b1af/lib/cuite__alloc.ml
ocaml
Fill factor too small : grow table Average fill factor, do nothing
{ { { COPYING * ( Copyright ( C ) 2012 < frederic.bour(_)lakaban.net > Permission is hereby granted , free of charge , to any person obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without restriction , including without limita...
1aba79862fdb46c1084a04705af1e075d9d78b5a1efceb1d6636440c9e900804
fadbadml-dev/FADBADml
tadiff.mli
(**************************************************************************) (* *) (* FADBADml *) (* *) ...
null
https://raw.githubusercontent.com/fadbadml-dev/FADBADml/bd5668433b8ad297aa70e91a032953d55923b533/src/tadiff.mli
ocaml
************************************************************************ FADBADml ...
OCaml port by and Based on FADBAD++ , written by and Copyright 2019 - 2020 This file is distributed under the terms of the CeCILL - C license . * Re - define usual operators to compute values and taylor coefficients...
e8b4809c30b89365c3dd705df57d82e4c772f48fbae3291535594bdb9aa33517
Gbury/mSAT
Heap_intf.ml
module type RANKED = sig type t val idx: t -> int (** Index in heap. return -1 if never set *) val set_idx : t -> int -> unit (** Update index in heap *) val cmp : t -> t -> bool end module type S = sig type elt (** Type of elements *) type t (** Heap of {!elt}, whose priority is increased or decreas...
null
https://raw.githubusercontent.com/Gbury/mSAT/b6ea55e7abb71e8fca294a167bf7d8091cbd82a5/src/core/Heap_intf.ml
ocaml
* Index in heap. return -1 if never set * Update index in heap * Type of elements * Heap of {!elt}, whose priority is increased or decreased incrementally (see {!decrease} for instance) * Create a heap * [decrease h x] decreases the value associated to [x] within [h] * Number of integers within the heap * ...
module type RANKED = sig type t val cmp : t -> t -> bool end module type S = sig type elt type t val create : unit -> t val decrease : t -> elt -> unit val in_heap : elt -> bool increase : ( int - > int - > bool ) - > t - > int - > unit val size : t -> int val is_empty : t -> bool val cle...
32c0c0153fb9691621f81c2cdd4946668c81e36c2459477a697e9ea638cb5918
GumTreeDiff/cgum
dumper.ml
Dump an OCaml value into a printable string . * By ( ) . * dumper.ml 1.2 2005/02/06 12:38:21 rich Exp * By Richard W.M. Jones (). * dumper.ml 1.2 2005/02/06 12:38:21 rich Exp *) open Printf open Obj let rec dump r = if is_int r then string_of_int (magic r : int) else ( (* Block. *) le...
null
https://raw.githubusercontent.com/GumTreeDiff/cgum/8521aa80fcf4873a19e60ce8c846c886aaefb41b/commons/ocamlextra/dumper.ml
ocaml
Block. [] h :: t XXX In future, print the address of value 'r'. Not possible in * pure OCaml at the moment. From the tag, determine the type of block. List. Tuple, array, record. Note that [lazy_tag .. forward_tag] are < no_scan_tag. Not * clear if very large constructed values cou...
Dump an OCaml value into a printable string . * By ( ) . * dumper.ml 1.2 2005/02/06 12:38:21 rich Exp * By Richard W.M. Jones (). * dumper.ml 1.2 2005/02/06 12:38:21 rich Exp *) open Printf open Obj let rec dump r = if is_int r then string_of_int (magic r : int) let rec get_fields acc = fu...
53b01ba3c9b5b80c6394723f8257301be964983ce76a3468da00f02291f5696e
iijlab/direct-hs
login.hs
module Main (main) where import qualified Control.Exception as E import qualified Data.ByteString.Lazy as B import qualified Data.Text as T import qualified Data.Text.IO as T import qualified System.Directory as Dir import System.FilePath ((</>)) import Sy...
null
https://raw.githubusercontent.com/iijlab/direct-hs/2422fd6fe008109e8dfb74f31d65b0d5a0330788/direct-hs-examples/src/login.hs
haskell
module Main (main) where import qualified Control.Exception as E import qualified Data.ByteString.Lazy as B import qualified Data.Text as T import qualified Data.Text.IO as T import qualified System.Directory as Dir import System.FilePath ((</>)) import Sy...
8c9ae8be00ddca01788bf362ae3ce4a4ca5f91d90446f542560836cc555b50cc
HugoPeters1024/hs-sleuth
QuickCheckUtils.hs
| This module provides quickcheck utilities , e.g. arbitrary and show -- instances, and comparison functions, so we can focus on the actual properties -- in the 'Tests.Properties' module. -- # LANGUAGE CPP , FlexibleInstances , TypeSynonymInstances # # OPTIONS_GHC -fno - warn - orphans # module Tests.QuickCheckUtils ...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/text-nofusion/tests/Tests/QuickCheckUtils.hs
haskell
instances, and comparison functions, so we can focus on the actual properties in the 'Tests.Properties' module. | For tests that have O(n^2) running times or input sizes, resize their inputs to the square root of the originals. What about with the RHS packed? This test harness is complex! What property are we c...
| This module provides quickcheck utilities , e.g. arbitrary and show # LANGUAGE CPP , FlexibleInstances , TypeSynonymInstances # # OPTIONS_GHC -fno - warn - orphans # module Tests.QuickCheckUtils ( BigBounded(..) , BigInt(..) , NotEmpty(..) , Sqrt(..) , Small(..) , small , Precision(..)...
f244b5d55b1b12297f66bf78a6434a7aa48e8b6327116ad244ba6d38a1d3529e
links-lang/links
moduleUtils.mli
open Utility type module_info = { simple_name : string; (* Note: not fully-qualified *) inner_modules : string list; type_names : string list; decl_names : string list } type term_shadow_table = string list stringmap type type_shadow_table = string list stringmap type shadow_table = string list stri...
null
https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/core/moduleUtils.mli
ocaml
Note: not fully-qualified
open Utility type module_info = { inner_modules : string list; type_names : string list; decl_names : string list } type term_shadow_table = string list stringmap type type_shadow_table = string list stringmap type shadow_table = string list stringmap val module_sep : string val try_parse_file : string...
b75dfb78850f833d41388a5ff0ce098aeb9d4ed7e67785a3ede8a12945e5794b
dwhjames/datomic-linklist
core.clj
Copyright 2014 Pellucid Analytics ;; 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, softwa...
null
https://raw.githubusercontent.com/dwhjames/datomic-linklist/e9086bce37cf24e95a9b1386add3cf3a11e031ed/src/datomic_list/core.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 g...
Copyright 2014 Pellucid Analytics distributed under the License is distributed on an " AS IS " BASIS , (ns datomic-list.core (:require [datomic.api :as d])) (defn is-list-empty "Test if list is empty" [db list-id] (-> db (d/entity list-id) (get :linklist/first) keyword?)) (defn nodes "Get list...
6705209146b461e06311b8cdef8e53f60d530591f272da9fd5d08635dfe0b2b8
hyperfiddle/electric
hfql12.clj
(ns dustin.hfql12 "fmap" (:refer-clojure :exclude [eval]) (:require [clojure.walk :refer [walk prewalk postwalk]] [contrib.do :refer [via* Do-via *this !]] [datomic.api :as d] [dustin.fiddle :refer :all] [dustin.hf-nav :refer :all] [dustin.monad-rw :refer [runRW pure bind fmap]] [hyper...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2020/hfql/hfql12.clj
clojure
name? recursive bind (discardW ma) ; unwind the scope, is this the right way? why do we see the ident in scope here Tests use hf-pull! runner to test what matters, the result, as I de-bug the scope monad ClassCastException query scope result :db/id is a self reference so...
(ns dustin.hfql12 "fmap" (:refer-clojure :exclude [eval]) (:require [clojure.walk :refer [walk prewalk postwalk]] [contrib.do :refer [via* Do-via *this !]] [datomic.api :as d] [dustin.fiddle :refer :all] [dustin.hf-nav :refer :all] [dustin.monad-rw :refer [runRW pure bind fmap]] [hyper...
a3dbf0acf65fcbcec43d50c28895591b8706560dd6816167d8ef122e971f08e0
feeley/pyffi
mocks.scm
;; We have to handle different cases: ;; 1 ) Scheme objects that are passed to python functions 2 ) Python objects that are passed to scheme functions 3 ) Bidirectional objects that support mutation on either side (import (github.com/feeley pyffi)) \import math (define pi \math.pi) (define (py-sqrt n) \math.sqr...
null
https://raw.githubusercontent.com/feeley/pyffi/ea310bbc0d4fc70996c07bb3f3cdf140498c5192/mocks.scm
scheme
We have to handle different cases: \import datetime (define delta (- now then)) (define seconds \\(delta).total_seconds()) (pip install requests) \import requests (define url "") (define r \requests.get(\url)) (define r.json \\(r).json()) (define app \Flask(__name__)) (@ app route (list '/') (define...
1 ) Scheme objects that are passed to python functions 2 ) Python objects that are passed to scheme functions 3 ) Bidirectional objects that support mutation on either side (import (github.com/feeley pyffi)) \import math (define pi \math.pi) (define (py-sqrt n) \math.sqrt(\n)) (define res (py-sqrt 9)) (for-each...
32db19a40778624cf368648b69d87b48973fb73da65be9e2708bde15879921e5
let-def/menhir
derivation.mli
(**************************************************************************) (* *) Menhir (* *) , INRIA Ro...
null
https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/derivation.mli
ocaml
************************************************************************ et en Automatique. All rig...
Menhir , INRIA Rocquencourt , PPS , Université Paris Diderot Copyright 2005 - 2008 Institut National de Recherche en Informatique under the terms of the Q Public License versi...
26a64a7ad851beb242bc9d4c95d7f7ea3b5c75b414c2a6c0ea11a5db3932563a
pink-gorilla/goldly
routes.clj
(ns goldly.routes) (def routes {:app {"" :goldly/no-page "goldly/reload" :goldly/reload-cljs} :api {}})
null
https://raw.githubusercontent.com/pink-gorilla/goldly/c65f789671cedfc5f115191a2a4b51d787492ae5/goldly/src/goldly/routes.clj
clojure
(ns goldly.routes) (def routes {:app {"" :goldly/no-page "goldly/reload" :goldly/reload-cljs} :api {}})
a78a637cfdcb7f0e9c403daeead84e7f06b61a3b4330640f12218a353980115a
mejgun/haskell-tdlib
SetPinnedChats.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Query.SetPinnedChats where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.ChatList as ChatList import qualified Utils as U -- | Changes the order of pinned chats @chat_list Chat list in which to change the order of ...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/SetPinnedChats.hs
haskell
# LANGUAGE OverloadedStrings # | | | |
module TD.Query.SetPinnedChats where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified TD.Data.ChatList as ChatList import qualified Utils as U Changes the order of pinned chats @chat_list Chat list in which to change the order of pinned chats @chat_ids The new list of pinned...
f0af213a0b6d60ddab64cc17124e808f68dc5b1699228e5c5e4a233e8e913d4f
privet-kitty/cl-competitive
incremental-lp.lisp
(defpackage :cp/incremental-lp (:use :cl :cp/two-phase-simplex) (:import-from :cp/two-phase-simplex #:simplex-float #:+zero+ #:%dual-simplex!) (:export #:make-lp #:lp-add-row! #:lp-pop-row! #:lp-render #:lp-solve!) (:documentation "Provides warm-start LP solver for dynamically added constraints, using dual simp...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/6f6abfede7315aecb6142a1d9f65a1be5d0fc3e0/module/incremental-lp.lisp
lisp
new-dict new-b new-mat xj is non-basic xj is basic
(defpackage :cp/incremental-lp (:use :cl :cp/two-phase-simplex) (:import-from :cp/two-phase-simplex #:simplex-float #:+zero+ #:%dual-simplex!) (:export #:make-lp #:lp-add-row! #:lp-pop-row! #:lp-render #:lp-solve!) (:documentation "Provides warm-start LP solver for dynamically added constraints, using dual simp...
7170ef9241f41424d1c6e44a65f34c35dd6b2ec335324c2f2573fcf1299030b6
travitch/foreign-inference
FinalizerTests.hs
module Main ( main ) where import Data.Map ( Map ) import Data.Monoid import Data.Set ( Set ) import System.FilePath ( (<.>) ) import System.Environment ( getArgs, withArgs ) import Test.HUnit ( assertEqual ) import LLVM.Analysis import LLVM.Analysis.CallGraph import LLVM.Analysis.CallGraphSCCTraversal import LLVM.An...
null
https://raw.githubusercontent.com/travitch/foreign-inference/9cc0f7c730f7cd19afbd00d890abbc7109391cc6/tests/FinalizerTests.hs
haskell
module Main ( main ) where import Data.Map ( Map ) import Data.Monoid import Data.Set ( Set ) import System.FilePath ( (<.>) ) import System.Environment ( getArgs, withArgs ) import Test.HUnit ( assertEqual ) import LLVM.Analysis import LLVM.Analysis.CallGraph import LLVM.Analysis.CallGraphSCCTraversal import LLVM.An...
d387ca0402a6bc51fb96a6526c4ef3c9f6ca7a677bcba15504a6189faa262958
victornicolet/parsynt
Beta.ml
* This file is part of Parsynt . Author : < > Parsynt 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 License , or ( at your option ) any later vers...
null
https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/singleloop/Beta.ml
ocaml
* Internal type for building funces Arithmetic only Non-linear operators Not a numeral operator * Base types : only booleans, integers and reals * Type tuple * Other lifted types * A procdedure is a reference to a procedure object * Pairs and lists * Vector and box * User-defined structures Misc Integer...
* This file is part of Parsynt . Author : < > Parsynt 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 License , or ( at your option ) any later vers...
470cfbbb6e6418aa4cdc865bc2c3a1b0aa5d5160a10075268800bd735f4820fc
felipeZ/Haskell-abinitio
GaussElimination.hs
# Language BangPatterns , FlexibleContexts , TypeFamilies # | Module : Science . QuantumChemistry . NumericalTools . GaussElimination Description : Perform a Gauss Elimination Copyright : @2013 - 2015 , It works in a top step ways , first an elimination on the linear independent coeffici...
null
https://raw.githubusercontent.com/felipeZ/Haskell-abinitio/c019bc37c8de78affddf97eb858c1ef18af76d83/Science/QuantumChemistry/NumericalTools/GaussElimination.hs
haskell
( -- gaussElem ) ====================> Internal Modules <======================= ================> Types <===================== ===========================> GAUSS ELIMINATION <==================== ============> Elimination Phase <============== ==============> Subst...
# Language BangPatterns , FlexibleContexts , TypeFamilies # | Module : Science . QuantumChemistry . NumericalTools . GaussElimination Description : Perform a Gauss Elimination Copyright : @2013 - 2015 , It works in a top step ways , first an elimination on the linear independent coeffici...
d450ef71506fcb5d86fa8bcce00dd8886dc9f5e286ab22f109f46a4315fd642b
yokolet/clementine
core.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; 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 ; ...
null
https://raw.githubusercontent.com/yokolet/clementine/b26c2318625e49606b5cc3b95cc9e1f5085ac309/ext/clojure-clojurescript-bef56a7/src/clj/cljs/core.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) 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 ...
Copyright ( c ) . All rights reserved . (ns cljs.core (:refer-clojure :exclude [-> ->> .. amap and areduce alength aclone assert binding bound-fn case comment cond condp declare definline definterface defmethod defmulti defn defn- defonce defprotocol defr...
69fbaa02b2d46da717fd26060fee6e48d64cf6612227d50009c0316ae24c3145
ndmitchell/uniplate
Main.hs
module Main where import System.Environment import System.CPUTime import Control.Monad import Data.List import Data.Char import Data.Maybe import System.IO import qualified Data.Map as Map import Testset import Generate import Data import OperationsAll {- Command line options are: gen - do random generation ex...
null
https://raw.githubusercontent.com/ndmitchell/uniplate/7d3039606d7a083f6d77f9f960c919668788de91/Uniplate/BenchmarkOld/Main.hs
haskell
Command line options are: gen - do random generation expr|stm|par|all - which section to run #n - number of tests to run !n - which test to execute fake resolution a mapping from variants to times
module Main where import System.Environment import System.CPUTime import Control.Monad import Data.List import Data.Char import Data.Maybe import System.IO import qualified Data.Map as Map import Testset import Generate import Data import OperationsAll confidence = let (*) = (,) in ["simplify" * 1000 ...
21d70b0fea6558b2c346688ae0faff34458fbf691bba86e40fe8159d6b8c7a26
SquidDev/illuaminate
lint_unresolved_reference.mli
(** Warns on unknown references within doc comments. *) include Linter.S
null
https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/src/lint/lint_unresolved_reference.mli
ocaml
* Warns on unknown references within doc comments.
include Linter.S
77c19eaec5236901ced74313161d04b4055e87ac34b13af85087bff949808c53
GaloisInc/jvm-verifier
RC564.hs
| Module : Tests . RC564 Description : License : BSD3 Stability : provisional Point - of - contact : atomb Module : Tests.RC564 Description : License : BSD3 Stability : provisional Point-of-contact : atomb -} {-# LANGUAGE ConstraintKinds #...
null
https://raw.githubusercontent.com/GaloisInc/jvm-verifier/3905dda18d0bdd5c595eef49804780f4a48c22f5/test/src/Tests/RC564.hs
haskell
# LANGUAGE ConstraintKinds # _ignore_nouse :: a _ignore_nouse = undefined main main :: IO () main = defaultMain [rc564Tests] ------------------------------------------------------------------------------ RC-564 TODO: add evalAigRC564 etc.
| Module : Tests . RC564 Description : License : BSD3 Stability : provisional Point - of - contact : atomb Module : Tests.RC564 Description : License : BSD3 Stability : provisional Point-of-contact : atomb -} # LANGUAGE CPP # module Tests...
fb12c259cb855863cdedbd616ae5c4f5ee94c75ab692ae0313a4a58a58f8b9b0
locusmath/locus
object.clj
(ns locus.set.copresheaf.topoi.concrete-quiver.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.general....
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/copresheaf/topoi/concrete_quiver/object.clj
clojure
A concrete quiver is the same thing as a copresheaf F: Free(Q) -> Sets, from the free category of a quiver to the topos of Sets. Create a concrete quiver from a function system Convert a concrete quiver into a copresheaf over a free category Multimethods for quivers Ontology of concrete quivers
(ns locus.set.copresheaf.topoi.concrete-quiver.object (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.logic.sequence.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.mapping.general....
de2472519730cca94a16820a8ccaa1b61f379e69213c3c1bb2ae2b7578a5e8b4
gonzojive/elephant
serializer3.lisp
(in-package :elephant-serializer2) ;; Protocol for backend ;; ;; What is a serializer? ;; - Determines a common serial format for objects; custom to common-lisp by helping to bridge two environments and help folks not shoot themselves in the foot . - For example , the class signature can be shot across on the fi...
null
https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/src/contrib/eslick/db-lisp/archive/serializer3.lisp
lisp
Protocol for backend What is a serializer? - Determines a common serial format for objects; custom to common-lisp by helping to to validate against a remote class signature or we can use the local cached signature. - Functions can be extracted and sent over in s-exp form. How about closures? Circularity cac...
(in-package :elephant-serializer2) bridge two environments and help folks not shoot themselves in the foot . - For example , the class signature can be shot across on the first instance of a class (defun serialize (obj bs &aux cache obj-id) (declare (optimize (speed 3) (safety 0)) (type buffer-stream bs))...
80ab98453a39087ddfa64ca1fbe3e13fc58af45ae474da648f686e6f8b1ea35b
CmdrDats/igoki
inferrence.clj
(ns igoki.inferrence (:require [igoki.util :as util] [igoki.sgf :as sgf])) (defn simple-board-view [{:keys [board size]}] (let [[width height] size] (for [y (range height)] (for [x (range width)] (case (get-in board [(sgf/convert-coord x y) :stone]) :white :w :black :b nil))))) ...
null
https://raw.githubusercontent.com/CmdrDats/igoki/9db41e8830b5cd709664d426751c4b6516592579/src/igoki/inferrence.clj
clojure
We need to propagate the final-position backward Go through the board snapshot, ripping off any cells that were previously nil so that only the stuff that stays put for the duration of the game is left Get the result Remove some noise Back to original direction (probably not needed) Convert into [x y c] point ve...
(ns igoki.inferrence (:require [igoki.util :as util] [igoki.sgf :as sgf])) (defn simple-board-view [{:keys [board size]}] (let [[width height] size] (for [y (range height)] (for [x (range width)] (case (get-in board [(sgf/convert-coord x y) :stone]) :white :w :black :b nil))))) ...
3f179b61824cfca0debe4453126f9fe6ed36a58d530edcaa7faab63b47d2b299
nmeum/edward
repl.scm
(define-record-type Read-Eval-Print-Loop (%make-repl prompt-str prompt? stream index) repl? ;; Prompt string used for input prompt. (prompt-str repl-prompt-str) ;; Whether the prompt should be shown or hidden. (prompt? repl-prompt? repl-set-prompt!) Parse stream used for the parser combinator . (stream ...
null
https://raw.githubusercontent.com/nmeum/edward/044d7e30963ce22248a0e3e5be9d24131b6d2115/lib/parse/repl.scm
scheme
Prompt string used for input prompt. Whether the prompt should be shown or hidden. Last index in parse stream. Skip all buffered chunks, i.e. next read will block. inc to go beyond last char. Allow parsing itself (especially of input mode commands) to be
(define-record-type Read-Eval-Print-Loop (%make-repl prompt-str prompt? stream index) repl? (prompt-str repl-prompt-str) (prompt? repl-prompt? repl-set-prompt!) Parse stream used for the parser combinator . (stream repl-stream repl-stream-set!) (index repl-index repl-index-set!)) (define (make-repl promp...
ee53b431db931ccf6c8394ff95a5a1b2b80fe26d5166b490c98f3ab17c4ca788
quicklisp/quicklisp-controller
upstream.lisp
;;;; upstream.lisp (in-package #:quicklisp-controller) (defclass upstream-source () ((source-file :initarg :source-file :accessor source-file) (project-name :initarg :project-name :accessor project-name) (location :initarg :location :accessor location))) (defgeneric github-issue (obje...
null
https://raw.githubusercontent.com/quicklisp/quicklisp-controller/5608e75ec9c4e1f33438c204d37f4d4ca2b21ff6/upstream.lisp
lisp
upstream.lisp
(in-package #:quicklisp-controller) (defclass upstream-source () ((source-file :initarg :source-file :accessor source-file) (project-name :initarg :project-name :accessor project-name) (location :initarg :location :accessor location))) (defgeneric github-issue (object) (:method (sou...
7efa9010037162f20ab5c5bc566b3f7a049929c722e7d7f9e7bad0b82a2198b7
elektronaut/advent-of-code
day14.clj
(ns advent-of-code.2020.14 (:require [clojure.string :as str])) (defn parse-command [str] (let [[cmd value] (str/split str #" = ")] (if (= cmd "mask") [:mask value] [:mem (Long/parseLong (re-find #"[\d]+" cmd)) (Long/parseLong value)]))) (defn bits [n] (map #(if (bit-test n (- 35 %)) \1 \0) (ran...
null
https://raw.githubusercontent.com/elektronaut/advent-of-code/a8bb7bbadc8167ebb1df0d532493317705bb7f0d/2020/day14/day14.clj
clojure
(ns advent-of-code.2020.14 (:require [clojure.string :as str])) (defn parse-command [str] (let [[cmd value] (str/split str #" = ")] (if (= cmd "mask") [:mask value] [:mem (Long/parseLong (re-find #"[\d]+" cmd)) (Long/parseLong value)]))) (defn bits [n] (map #(if (bit-test n (- 35 %)) \1 \0) (ran...
266c2239470c8202efd40e6ecfd08f486d21c5fe1ee07d50165400da7a5d0bf4
yellowbean/Hastructure
ExpTest.hs
module UT.ExpTest(expTests) where import Test.Tasty import Test.Tasty.HUnit import qualified Data.Time as T import qualified Lib as L import qualified Asset as P import qualified Deal as D import qualified UT.DealTest as DT import Expense import Types import qualified Cashflow as CF import Debug.Trace debug = flip t...
null
https://raw.githubusercontent.com/yellowbean/Hastructure/e671cf19d94f2969fba1c26e6ac785b54831cb90/test/UT/ExpTest.hs
haskell
cnVatFeeTest = let vatFeeInt = Fee "VatFee" ] in [ ]
module UT.ExpTest(expTests) where import Test.Tasty import Test.Tasty.HUnit import qualified Data.Time as T import qualified Lib as L import qualified Asset as P import qualified Deal as D import qualified UT.DealTest as DT import Expense import Types import qualified Cashflow as CF import Debug.Trace debug = flip t...
a2c8d5b702435b119411ee14442d49a8ee4f4e8a60db3c0842d28e7e3302d48f
thierry-martinez/stdcompat
arrayLabels.mli
external length : 'a array -> int = "%array_length" external get : 'a array -> int -> 'a = "%array_safe_get" external set : 'a array -> int -> 'a -> unit = "%array_safe_set" external make : int -> 'a -> 'a array = "caml_make_vect" external create : int -> 'a -> 'a array = "caml_make_vect"[@@ocaml.deprecated ...
null
https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/interfaces/4.02/arrayLabels.mli
ocaml
external length : 'a array -> int = "%array_length" external get : 'a array -> int -> 'a = "%array_safe_get" external set : 'a array -> int -> 'a -> unit = "%array_safe_set" external make : int -> 'a -> 'a array = "caml_make_vect" external create : int -> 'a -> 'a array = "caml_make_vect"[@@ocaml.deprecated ...
6e2d58bc9226ed016ae7f220d7bda8499804159d179c15d09783a671c2798fdc
Apress/beg-haskell
Problems.hs
{-# LANGUAGE BangPatterns #-} module Chapter5.Problems where import Chapter5.Infinite sumForce :: [Integer] -> Integer sumForce xs = sumForce' xs 0 where sumForce' [] z = z sumForce' (y:ys) z = sumForce' ys $! (z+y) sumYears :: [TimeMachine] -> Integer sumYears xs = sumYears' x...
null
https://raw.githubusercontent.com/Apress/beg-haskell/aaacbf047d553e6177c38807e662cc465409dffd/chapter5/src/Chapter5/Problems.hs
haskell
# LANGUAGE BangPatterns #
module Chapter5.Problems where import Chapter5.Infinite sumForce :: [Integer] -> Integer sumForce xs = sumForce' xs 0 where sumForce' [] z = z sumForce' (y:ys) z = sumForce' ys $! (z+y) sumYears :: [TimeMachine] -> Integer sumYears xs = sumYears' xs 0 where sumYea...
e58bf03aa887ee0363463b5e7f74ff5dacd884cf8f0fa5e2fa08122e8b51efd2
beerendlauwers/hakyll-extra
Extra.hs
module Hakyll.Core.Identifier.Pattern.Extra where import Hakyll | Matches the first * it encounters and leaves the rest alone . -- -- > fillPattern "*/a/b/*" "test" == test/a/b/* -- fillPattern :: Pattern -> String -> Pattern fillPattern p s = fillPatterns p [s] -- | Matches as many * as there are in 'xs' and leav...
null
https://raw.githubusercontent.com/beerendlauwers/hakyll-extra/cc4741a9781412108926ac2d7cf70f52a5ee68a3/src/Hakyll/Core/Identifier/Pattern/Extra.hs
haskell
> fillPattern "*/a/b/*" "test" == test/a/b/* | Matches as many * as there are in 'xs' and leaves the rest alone. > fillPatterns "*/a/b/*/*" ["test","c"] == test/a/b/c/*
module Hakyll.Core.Identifier.Pattern.Extra where import Hakyll | Matches the first * it encounters and leaves the rest alone . fillPattern :: Pattern -> String -> Pattern fillPattern p s = fillPatterns p [s] fillPatterns :: Pattern -> [String] -> Pattern fillPatterns p xs = fromGlob . show $ fromCaptures p (xs +...
2af64199c30b683f4e8d1a60ed7634615bd37fc6037ad04343203803440b9d9e
ddssff/cabal-debian
Tests.hs
# LANGUAGE CPP , OverloadedStrings , RankNTypes , ScopedTypeVariables , StandaloneDeriving # # OPTIONS_GHC -Wall -fno - warn - orphans # module Main where import Debian.Debianize.Optparse(_flags, parseProgramArguments) import Control.Lens import Data.Algorithm.DiffContext (getContextDiff, prettyContextDiff) import Dat...
null
https://raw.githubusercontent.com/ddssff/cabal-debian/763270aed987f870762e660f243451e9a34e1325/Tests.hs
haskell
, finalizeDebianization , getDebhelperCompatLevel, getDebianStandardsVersion, License(..) , buildDebianVersion | Backward compatibility. Should be fixed. | Create a Debianization based on a changelog entry and a license value. Uses the currently installed versions of debhelper and debian-policy to set the compatib...
# LANGUAGE CPP , OverloadedStrings , RankNTypes , ScopedTypeVariables , StandaloneDeriving # # OPTIONS_GHC -Wall -fno - warn - orphans # module Main where import Debian.Debianize.Optparse(_flags, parseProgramArguments) import Control.Lens import Data.Algorithm.DiffContext (getContextDiff, prettyContextDiff) import Dat...
493f396b3247329bf76089d1f00d4ccff3cca14f7fb82f5ad8eb034173519943
rpav/cl-xcb-xlib
icccm.lisp
(in-package :xlib) (defmacro define-wm-accessor (name atom type format transform-to transform-from &optional (result-type ''list)) `(progn (defun ,name (window) (let ((display (display-for window))) (declare (ignorable display)) (get-property window ,atom ...
null
https://raw.githubusercontent.com/rpav/cl-xcb-xlib/1b00c44d4723b3a8334f36e731906d4679341c0e/src/clx/icccm.lisp
lisp
(in-package :xlib) (defmacro define-wm-accessor (name atom type format transform-to transform-from &optional (result-type ''list)) `(progn (defun ,name (window) (let ((display (display-for window))) (declare (ignorable display)) (get-property window ,atom ...
52ed22de25ad56b91487c0653e105a3630c81db20cb7a81c19c91a4e944220f7
hyperfiddle/electric
hfql23.cljc
(ns dustin.hfql23 (:require [minitest :refer [tests]] [meander.epsilon :as m] [datascript.core :as d] [hyperfiddle.api :refer [*$*]] [dustin.dev :refer [male female m-sm m-md m-lg w-sm w-md w-lg alice bob charlie]] [dustin.fiddle :refer [genders shirt-sizes submissions gender shirt-size submis...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/hfql/hfql23.cljc
clojure
(d/pull *$* [:dustingetz/email :shirt-size :dustingetz/mens-medium} k :db/id or (:db/id %) we have a new list of react keys and a prior list of react keys resulting in a set of additions and removals [:dustingetz/gender [...]] produce reactive list of reactive elements incremental (submis...
(ns dustin.hfql23 (:require [minitest :refer [tests]] [meander.epsilon :as m] [datascript.core :as d] [hyperfiddle.api :refer [*$*]] [dustin.dev :refer [male female m-sm m-md m-lg w-sm w-md w-lg alice bob charlie]] [dustin.fiddle :refer [genders shirt-sizes submissions gender shirt-size submis...
ac0e99f1d57dda26cdf772f16fc867e4dc570164757995a2a9515c2422263033
Motiva-AI/stepwise
model.clj
(ns stepwise.model (:require [bean-dip.core :as bd] [stepwise.serialization :as ser] [clojure.string :as strs]) (:import (com.amazonaws.services.stepfunctions.model CreateActivityRequest CreateActivityResult ...
null
https://raw.githubusercontent.com/Motiva-AI/stepwise/b523491ade748231d17ebcb3b96129257e0d040c/src/stepwise/model.clj
clojure
(ns stepwise.model (:require [bean-dip.core :as bd] [stepwise.serialization :as ser] [clojure.string :as strs]) (:import (com.amazonaws.services.stepfunctions.model CreateActivityRequest CreateActivityResult ...
1add1810fa4b860984aada8a9a8ff8991ab6ab68dcd0111a7de6360662e124b4
ocaml-multicore/tezos
test_double_endorsement.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/test/integration/consensus/test_double_endorsement.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > 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 , WHETH...
7e6c04562e2406932692e6221562c14a51bb0fff9879b03364013c1ef0b9c527
statebox/cql
Graph.hs
SPDX - License - Identifier : AGPL-3.0 - only This file is part of ` statebox / cql ` , the categorical query language . Copyright ( C ) 2019 < This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free So...
null
https://raw.githubusercontent.com/statebox/cql/b155e737ef4977ec753e44790f236686ff6a4558/src/Language/CQL/Graph.hs
haskell
| Topological sort.
SPDX - License - Identifier : AGPL-3.0 - only This file is part of ` statebox / cql ` , the categorical query language . Copyright ( C ) 2019 < This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free So...
0727cec5b90b1a3d2b5c21fc2aa14fd65d5d85e1a748c5cf52c37454bda9d9ab
spectrum-finance/cardano-dex-sdk-haskell
Types.hs
module CardanoTx.Types where import qualified Data.Text as T import Data.Aeson (FromJSON, ToJSON) import GHC.Generics (Generic) -- TX hash32 represented as a hex string newtype TxHash = TxHash { unTxHash :: T.Text } deriving (Eq, Generic) deriving newtype (Show, FromJSON) -- Block hash32 rep...
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-sdk-haskell/3cc76e12591cfa44f0b8af044af276600fa59d86/cardano-tx/src/CardanoTx/Types.hs
haskell
TX hash32 represented as a hex string Block hash32 represented as a hex string
module CardanoTx.Types where import qualified Data.Text as T import Data.Aeson (FromJSON, ToJSON) import GHC.Generics (Generic) newtype TxHash = TxHash { unTxHash :: T.Text } deriving (Eq, Generic) deriving newtype (Show, FromJSON) newtype BlockHash = BlockHash { unBlockHash :: T.Text } de...
63ca50f37341dbae2c10c8169261064c903765b6a758e5948467c7f4b7f98ccc
korya/efuns
pixmap.mli
(***********************************************************************) (* *) xlib for (* *) Fabrice Le Fessant , projet Para / SOR , INRIA Rocq...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/gwml/pixmap.mli
ocaml
********************************************************************* ...
xlib for Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1999 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . val set_shape : Gwml.wob -> Xtypes.pixmap -> int -> int -> u...
c749f9303eeb95dfc54fa0f508463927e7fce29c61913d7d1f33fec7941e9b7d
roddyyaga/ocoi
test_compiles.ml
module M = struct type t = { id: int; name: string; cool: bool; another_id: int } [@@deriving yojson, ocoi] end let f = M.No_id.t_of_yojson let g = M.No_id.yojson_of_t
null
https://raw.githubusercontent.com/roddyyaga/ocoi/0a07e9457add9890cb507ac8bb4e55044d86a640/ocoi/test/ppx/test_compiles.ml
ocaml
module M = struct type t = { id: int; name: string; cool: bool; another_id: int } [@@deriving yojson, ocoi] end let f = M.No_id.t_of_yojson let g = M.No_id.yojson_of_t
778d8e5364c4093f77b328424f8c9a05b431198454956f21b8d61016328450f8
MLstate/opalang
ansi.ml
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/ansi.ml
ocaml
* all call to produce color come from here, so this global propertie is here to enforce that no any production are in color
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
769519b196ee63f907c8e715812be0964fec4c3d987173919e44c50bb2a298c7
VisionsGlobalEmpowerment/webchange
scene_id_in_course_data.clj
(ns webchange.migrations.scene-id-in-course-data (:require [clojure.tools.logging :as log] [java-time :as jt] [clojure.string :as str] [mount.core :as mount] [webchange.course.core :as course] [clojure.java.jdbc :as jdbc] [webchange.db.core :refer [*db*] :as db])) (def owner-id 1) (defn-...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/02be5ba713ea8f00a6e16296ed824865ae839263/src/clj/webchange/migrations/scene_id_in_course_data.clj
clojure
(ns webchange.migrations.scene-id-in-course-data (:require [clojure.tools.logging :as log] [java-time :as jt] [clojure.string :as str] [mount.core :as mount] [webchange.course.core :as course] [clojure.java.jdbc :as jdbc] [webchange.db.core :refer [*db*] :as db])) (def owner-id 1) (defn-...
2f16f7354b7d42c0daaa0738cfa9f49531eb1a6838a71635418c38be1681b4ab
matchwood/acid-world
TH.hs
# LANGUAGE TemplateHaskell # module Shared.TH where import RIO import Language.Haskell.TH import Acid.World eventableNames :: Int -> [String] eventableNames i = map (\s -> "events" ++ show s) [0..i] generateEventables :: [String] -> Q [Dec] generateEventables ss = do res <- fmap concat $ sequence $ map (eventableD...
null
https://raw.githubusercontent.com/matchwood/acid-world/04a3aa39b585a477a68639d81fc27ae04b9e5e35/shared/Shared/TH.hs
haskell
# LANGUAGE TemplateHaskell # module Shared.TH where import RIO import Language.Haskell.TH import Acid.World eventableNames :: Int -> [String] eventableNames i = map (\s -> "events" ++ show s) [0..i] generateEventables :: [String] -> Q [Dec] generateEventables ss = do res <- fmap concat $ sequence $ map (eventableD...
b5611da500647e74704351ae7577befdd146c38c351aef21005b3381d79914d7
mlabs-haskell/bot-plutus-interface
Config.hs
# LANGUAGE ApplicativeDo # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # {-# OPTIONS -fno-warn-orphans #-} module BotPlutusInterface.Config ( docPABConfig, loadPABConfig, savePABConfig, ) where import BotPlutusInterface.Effects ( ShellArgs (..), callLocalCommand, ) import BotPlutusInterface.Ty...
null
https://raw.githubusercontent.com/mlabs-haskell/bot-plutus-interface/67db4a65a5e4474829f3bf53a78591cc64004584/src/BotPlutusInterface/Config.hs
haskell
# OPTIONS -fno-warn-orphans # ORMOLU_DISABLE due to conflict, should be stored in pcProtocolParamsFile .json file due to conflict with pcProtocolParams, should got from pcProtocolParamsFile .json file pcProtocolParams <- sectionWithDefault (pcProtocolParams def) "protocolParams" "" fail fail |Save 'PABCon...
# LANGUAGE ApplicativeDo # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # module BotPlutusInterface.Config ( docPABConfig, loadPABConfig, savePABConfig, ) where import BotPlutusInterface.Effects ( ShellArgs (..), callLocalCommand, ) import BotPlutusInterface.Types ( CLILocation (..), LogLeve...
1077dade99fd82438f2d7fb614352c20f6928c70644183d3f73aa9dbe3042675
ahrefs/atd
test.expected.mli
Auto - generated from " test.atd " [@@@ocaml.warning "-27-32-33-35-39"] (** This is just a test. *) type test_variant = [ `Case1 | `Case2 of int | `Case3 of string | `Case4 of test_variant list ] type ('x, 'y) poly = { fst: 'x list; snd: ('x, 'y) poly option } type 'a p' = A | Bb of 'a p' | Ccccc of 'a...
null
https://raw.githubusercontent.com/ahrefs/atd/65a4534d43dd0fc732164e669624896132c1d238/atdgen/test/test.expected.mli
ocaml
* This is just a test. atd hello atd world atd b0 atd b1 atd b3 atd b4 * \}\}\}abc[def]ghi {v j * j k * k l*l v} {v mno v} [pqr]\{stu\}vwx yz [\} \[ \] \{v] {v \} [x] v\} \{v [ @ v} Writers for type test_variant * Tag used by the writers for type {!test_variant}. Readers ...
Auto - generated from " test.atd " [@@@ocaml.warning "-27-32-33-35-39"] type test_variant = [ `Case1 | `Case2 of int | `Case3 of string | `Case4 of test_variant list ] type ('x, 'y) poly = { fst: 'x list; snd: ('x, 'y) poly option } type 'a p' = A | Bb of 'a p' | Ccccc of 'a type p = [ `A | `B of r |...
ecbe48aa166dd125d12643426e83df14c61308ebb37d0fc341dd7c828d1a0ff2
dcos/dcos-net
dcos_l4lb_mesos_poller.erl
@doc Polls the local mesos agent if { , agent_polling_enabled } is true -module(dcos_l4lb_mesos_poller). -behaviour(gen_server). -include("dcos_l4lb.hrl"). -include_lib("kernel/include/logger.hrl"). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif. %% API -export([ start_link/0, init_metric...
null
https://raw.githubusercontent.com/dcos/dcos-net/7bd01ac237ff4b9a12a020ed443e71c45f7063f4/apps/dcos_l4lb/src/dcos_l4lb_mesos_poller.erl
erlang
API gen_server callbacks =================================================================== gen_server callbacks =================================================================== =================================================================== ===================================================================...
@doc Polls the local mesos agent if { , agent_polling_enabled } is true -module(dcos_l4lb_mesos_poller). -behaviour(gen_server). -include("dcos_l4lb.hrl"). -include_lib("kernel/include/logger.hrl"). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -endif. -export([ start_link/0, init_metrics/0 ])....
1203c87927a3d8308ea7ae414a8b593db360494ae68f8f12ae916a96a7a9ee99
ninenines/cowboy
multipart_h.erl
This module reads a multipart body and echoes it back as an Erlang term . -module(multipart_h). -export([init/2]). init(Req0, State) -> {Result, Req} = case cowboy_req:binding(key, Req0) of undefined -> acc_multipart(Req0, []); <<"skip_body">> -> skip_body_multipart(Req0, []); <<"read_part2">> -> read_part2...
null
https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/handlers/multipart_h.erl
erlang
This module reads a multipart body and echoes it back as an Erlang term . -module(multipart_h). -export([init/2]). init(Req0, State) -> {Result, Req} = case cowboy_req:binding(key, Req0) of undefined -> acc_multipart(Req0, []); <<"skip_body">> -> skip_body_multipart(Req0, []); <<"read_part2">> -> read_part2...
459f31ebb08d64932a8ac0118701c52476787c8218d99818e402697f62591371
hhucn/decide3
http_server.clj
(ns decide.server-components.http-server (:require [decide.server-components.config :refer [config]] [decide.server-components.middleware :refer [middleware]] [mount.core :refer [defstate]] [clojure.pprint :refer [pprint]] [org.httpkit.server :as http-kit] [taoensso.timbre :as log])) (defstat...
null
https://raw.githubusercontent.com/hhucn/decide3/e27ea04033d94a0a61f8118a58050b86ed0f1327/src/main/decide/server_components/http_server.clj
clojure
(ns decide.server-components.http-server (:require [decide.server-components.config :refer [config]] [decide.server-components.middleware :refer [middleware]] [mount.core :refer [defstate]] [clojure.pprint :refer [pprint]] [org.httpkit.server :as http-kit] [taoensso.timbre :as log])) (defstat...
2a65af1883523d3e6cbac5ba0d315f0983cd456d19e25f330a09c1b6296e50be
andrejbauer/alg
config.ml
(* Options for command-line arguments. *) type config = { mutable sizes : int list; mutable indecomposable_only : bool; mutable count_only : bool; mutable products : bool; mutable source : bool; mutable input_filename : string; mutable output_filename : string; mutable format : string; mutable parano...
null
https://raw.githubusercontent.com/andrejbauer/alg/95715bb1bf93fcc534a8d6c7c96c8913dc03de0c/src/config.ml
ocaml
Options for command-line arguments.
type config = { mutable sizes : int list; mutable indecomposable_only : bool; mutable count_only : bool; mutable products : bool; mutable source : bool; mutable input_filename : string; mutable output_filename : string; mutable format : string; mutable paranoid : bool; mutable use_sat : bool; } le...
7e297f1a0fdfa1ff46a4a218cd8fa0da767069a37f72dae1d28c4c6fcb4894ff
deadpendency/deadpendency
SingleRecentAuthorRule.hs
module RG.Effect.AssessDependencies.Backend.Rules.CommitHealth.SingleRecentAuthorRule ( singleRecentAuthorRule, ) where import Common.Model.Assessment.DependencyAssessmentFailure import Common.Model.Assessment.DependencyAssessmentViolation import Common.Model.Assessment.DependencyAssessmentWarning import Common.Mo...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/report-generator/src/RG/Effect/AssessDependencies/Backend/Rules/CommitHealth/SingleRecentAuthorRule.hs
haskell
module RG.Effect.AssessDependencies.Backend.Rules.CommitHealth.SingleRecentAuthorRule ( singleRecentAuthorRule, ) where import Common.Model.Assessment.DependencyAssessmentFailure import Common.Model.Assessment.DependencyAssessmentViolation import Common.Model.Assessment.DependencyAssessmentWarning import Common.Mo...
d52fdf3c47cd19b56bf46b1d0804d25028036fa8d1b3386706bce7d3e54930ad
nyu-acsys/drift
bcopy4.ml
let array1 i = 0 let array2 i = 0 let update a i x j = if j=i then x else a j let rec bcopy_aux m src des i = if i >= m then () else begin assert (0<=i && i<=m); let des = update des i (src i) in bcopy_aux m src des (i+1) end let main (n(*-:{v:Int|true}*)) = let bcopy src des = b...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/high/bcopy4.ml
ocaml
-:{v:Int|true}
let array1 i = 0 let array2 i = 0 let update a i x j = if j=i then x else a j let rec bcopy_aux m src des i = if i >= m then () else begin assert (0<=i && i<=m); let des = update des i (src i) in bcopy_aux m src des (i+1) end let bcopy src des = bcopy_aux n src des 0 in bcopy a...
3c75a3199f4c46096637a139bfdb859674cc1922b7b1642114281be464228425
finnishtransportagency/harja
hoitoluokat.cljc
(ns harja.domain.hoitoluokat "Määrittelee talvihoitoluokat ja soratien hoitoluokat" (:require [harja.pvm :as pvm])) (def ei-talvihoitoluokkaa-nimi "Hoitoluokka puuttuu") (def ^{:doc "Talvihoitoluokat voimaan 1.10.2019 alkaen urakoissa. Tierekisteriin nämä tulivat voimaan jo 14.6.2018 ja AVA:n geometria-aineistoon...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/2f6ad1bbabd403bd8c7e553e2b0950e52c3968a6/src/cljc/harja/domain/hoitoluokat.cljc
clojure
(ns harja.domain.hoitoluokat "Määrittelee talvihoitoluokat ja soratien hoitoluokat" (:require [harja.pvm :as pvm])) (def ei-talvihoitoluokkaa-nimi "Hoitoluokka puuttuu") (def ^{:doc "Talvihoitoluokat voimaan 1.10.2019 alkaen urakoissa. Tierekisteriin nämä tulivat voimaan jo 14.6.2018 ja AVA:n geometria-aineistoon...
883d1a891f616af3c039303d9e694f12026b908b810f426884f809d42cf38bac
fukamachi/webapi
request.lisp
(defpackage #:webapi/request (:use #:cl) (:import-from #:webapi/response #:response) (:import-from #:closer-mop) (:import-from #:dexador) (:import-from #:quri) (:import-from #:kebab) (:export #:*keep-alive* #:request #:request-class #:http-method ...
null
https://raw.githubusercontent.com/fukamachi/webapi/99e64a22566946a937973b3994a28ae9535c9a63/request.lisp
lisp
(defpackage #:webapi/request (:use #:cl) (:import-from #:webapi/response #:response) (:import-from #:closer-mop) (:import-from #:dexador) (:import-from #:quri) (:import-from #:kebab) (:export #:*keep-alive* #:request #:request-class #:http-method ...
371c609b48e7b208537fa0df1352f81d8b50e022a846b4f22ad71196ef8b0013
byorgey/diagrams-play
GtkCoords.hs
# LANGUAGE NoMonomorphismRestriction # import Control.Monad (void) import Control.Monad.IO.Class (liftIO) import Data.IORef import Data.List (intercalate) import Diagrams.Backend.Cairo import Diagrams.Backend.C...
null
https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/GtkCoords.hs
haskell
Ordinary Gtk setup. Make an IORef to hold the transformation from window to diagram coordinates. Render the diagram on the drawing area. renderDiaT returns both a rendering result as well as the transformation from diagram to output coordinates. store the inverse of the diagram -> window coordinate transformatio...
# LANGUAGE NoMonomorphismRestriction # import Control.Monad (void) import Control.Monad.IO.Class (liftIO) import Data.IORef import Data.List (intercalate) import Diagrams.Backend.Cairo import Diagrams.Backend.C...
7b60bd227151053df51cea9abbde37147a1da70febeca78a13bd71e3e9aa6a9e
cedlemo/OCaml-GObject-Introspection
Function_info.mli
* Copyright 2017 - 2019 , * This file is part of OCaml - GObject - Introspection . * * OCaml - GObject - Introspection 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 o...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/lib/Function_info.mli
ocaml
* Function_info — Struct representing a function. * Obtain the symbol of the function. The symbol is the name of the exported function, suitable to be used as an argument to g_module_symbol(). * Obtain the Function_infoFlags for the info . gboolean g_function_info_invoke () GQuark g_invoke_error_quark () * ...
* Copyright 2017 - 2019 , * This file is part of OCaml - GObject - Introspection . * * OCaml - GObject - Introspection 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 o...
2ce6776f5022509a246f865a6a856e214fa1d1b7cc0b869b5749f568db7b1188
hanshuebner/bknr-web
quizz-handlers.lisp
(in-package :bknr-user) (enable-interpol-syntax) (defmethod edit-object-url ((quizz quizz)) (format nil "/edit-quizz/~A" (store-object-id quizz))) (defmethod html-edit-link ((quizz quizz)) (html ((:a :href (edit-object-url quizz)) (:princ-safe (quizz-name quizz))))) (defmethod edit-object-url ((question qu...
null
https://raw.githubusercontent.com/hanshuebner/bknr-web/5c30b61818a2f02f6f2e5dc69fd77396ec3afc51/modules/quizz/quizz-handlers.lisp
lisp
(in-package :bknr-user) (enable-interpol-syntax) (defmethod edit-object-url ((quizz quizz)) (format nil "/edit-quizz/~A" (store-object-id quizz))) (defmethod html-edit-link ((quizz quizz)) (html ((:a :href (edit-object-url quizz)) (:princ-safe (quizz-name quizz))))) (defmethod edit-object-url ((question qu...
bcb5b4d5a2b9572a42e31cebdd4943ca505665eba3986cc88b902b981d7bdf87
crategus/cl-cffi-gtk
gtk.event-box.lisp
;;; ---------------------------------------------------------------------------- ;;; gtk.event-box.lisp ;;; ;;; The documentation of this file is taken from the GTK 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GTK library . ;;; See <>. The API documentation of the Lisp binding is ...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gtk/gtk.event-box.lisp
lisp
---------------------------------------------------------------------------- gtk.event-box.lisp The documentation of this file is taken from the GTK 3 Reference Manual See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of...
Version 3.24 and modified to document the Lisp binding to the GTK library . available from < -cffi-gtk/ > . Copyright ( C ) 2009 - 2011 Copyright ( C ) 2011 - 2021 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public License that clarifies the terms for us...
8352558194732a9c2456831cc77fa634070db0523d431c60ae14b26bd224ef79
biocad/openapi3
OpenApiSpec.hs
# LANGUAGE OverloadedLists # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE QuasiQuotes # module Data.OpenApiSpec where import Prelude () import Prelude.Compat import Control.Lens import Data.Aeson import Data.Aeson.QQ.Simple import Data.HashMap.Strict (HashMap) import qualified Data....
null
https://raw.githubusercontent.com/biocad/openapi3/acc5ea71a3c58e0f8b25861f6b6feab2cf0cb87e/test/Data/OpenApiSpec.hs
haskell
# LANGUAGE OverloadedStrings # ======================================================================= Info object ======================================================================= ======================================================================= Contact object ========================================...
# LANGUAGE OverloadedLists # # LANGUAGE ScopedTypeVariables # # LANGUAGE QuasiQuotes # module Data.OpenApiSpec where import Prelude () import Prelude.Compat import Control.Lens import Data.Aeson import Data.Aeson.QQ.Simple import Data.HashMap.Strict (HashMap) import qualified Data.HashSet.InsOrd as InsOrdHS import D...
14dc0ea190b5f67cf15a44b64775179851ae877221d4dec5dfee4b4c316bb0be
larcenists/larceny
135.body.scm
Copyright ( C ) ( 2016 ) . All Rights Reserved . ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;;; restriction, including without limitation the rights to use, ;;...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/lib/SRFI/srfi/135.body.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or Software is furnished to do so, subject to the following conditions...
Copyright ( C ) ( 2016 ) . All Rights Reserved . files ( the " Software " ) , to deal in the Software without sell copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , ...
139e600b0a42c027029974cd576bb43c7f479dd7d43aa70ca2a5f1c2637d078d
Naupio/pitcp
pitcp_server.erl
-module(pitcp_server). -author("Naupio Z.Y. Huang"). -behaviour(gen_server). -export([start_link/0]). %% gen_server call_back function -export([code_change/3, handle_call/3, handle_cast/2, handle_info/2, init/1, terminate/2]). -define(SERVER, ?MODULE). -define(TABLE, ?SERVER). start_link() -> gen_server:st...
null
https://raw.githubusercontent.com/Naupio/pitcp/59a7da3a8980695f8efdb3697b026ab0f42754cb/apps/pitcp/src/pitcp_server.erl
erlang
gen_server call_back function
-module(pitcp_server). -author("Naupio Z.Y. Huang"). -behaviour(gen_server). -export([start_link/0]). -export([code_change/3, handle_call/3, handle_cast/2, handle_info/2, init/1, terminate/2]). -define(SERVER, ?MODULE). -define(TABLE, ?SERVER). start_link() -> gen_server:start_link({local, ?SERVER}, ?MODUL...
a74078d0463d5da160a520d03c974b391f503662962a4e74a6ce567d94e96fe7
aphyr/tesser
project.clj
(defproject tesser.all "1.0.6" :description "Not a real library; just a placeholder for unifying all the docs." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :repositories {"cloudera" "-repos/"} :dependencies [[tesser.core "1.0.6"] [tesser.math "1.0.6"] ; ...
null
https://raw.githubusercontent.com/aphyr/tesser/ce78dd736a3fd689c38b231b142d689e2b8836c7/all/project.clj
clojure
[tesser.hadoop "1.0.3" :exclusions [org.codehaus.jackson/jackson-mapper-asl org.codehaus.jackson/jackson-core-asl]] "../hadoop/src" :provided {:dependencies [[org.apache.hadoop/hadoop-clien...
(defproject tesser.all "1.0.6" :description "Not a real library; just a placeholder for unifying all the docs." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :repositories {"cloudera" "-repos/"} :dependencies [[tesser.core "1.0.6"] [tesser.math "1.0.6"] ...
069e4b2fa655d3ecb49f4297f5de69e3a97ccb64988ef011e52d5c3e7f5cc6c1
ocramz/thih
PPrint.hs
----------------------------------------------------------------------------- -- PPrint: Print functions -- Part of ` Typing Haskell in ' , version of November 23 , 2000 Copyright ( c ) and the Oregon Graduate Institute of Science and Technology , 1999 - 2000 -- This program is distributed as Fr...
null
https://raw.githubusercontent.com/ocramz/thih/6c34e1ba880c0a662c00d4a1350d36acb8262112/src/PPrint.hs
haskell
--------------------------------------------------------------------------- PPrint: Print functions in the file "License" that is included in the distribution of this software, copies of which may be obtained from: /~mpj/thih/ ---------------------------------------------------------------...
Part of ` Typing Haskell in ' , version of November 23 , 2000 Copyright ( c ) and the Oregon Graduate Institute of Science and Technology , 1999 - 2000 This program is distributed as Free Software under the terms module PPrint (module Text.PrettyPrint, module PPrint) where import Text.PrettyPri...
9e9d9387fde4abdb592f3277d35b9d3f20d6784537fadba7f8e4ce597abbfc58
fortytools/holumbus
NetFile_2.hs
module Main where import Data.Time.Clock.POSIX import GHC.Int import Data.Binary import Holumbus.FileSystem.FileSystem import Holumbus.Network.PortRegistry.PortRegistryPort import qualified Data.ByteString.Lazy as B main :: IO () main = do -- get time t0 <- getPOSIXTime t0 `seq` putStrLn . show $ t0 p <- ...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/storage/Examples/StoragePerformance/NetFile_2.hs
haskell
get time make filesystem get time copy to fs
module Main where import Data.Time.Clock.POSIX import GHC.Int import Data.Binary import Holumbus.FileSystem.FileSystem import Holumbus.Network.PortRegistry.PortRegistryPort import qualified Data.ByteString.Lazy as B main :: IO () main = do t0 <- getPOSIXTime t0 `seq` putStrLn . show $ t0 p <- newPortRegistr...
6b505e3f7db0c2922c2ce0d89d5d60a7f9b5e1e55de8d32c0b0df70c1ae308eb
ocaml/merlin
tast_helper.ml
open Typedtree module Pat = struct let pat_extra = [] let pat_attributes = [] let constant ?(loc=Location.none) pat_env pat_type c = let pat_desc = Tpat_constant c in { pat_desc; pat_loc = loc; pat_extra; pat_attributes; pat_type; pat_env } let var ?loc pat_env pat_type str = let pat_loc = ...
null
https://raw.githubusercontent.com/ocaml/merlin/7607238326a9352cbee9ecf612669e28ae9fa36e/src/ocaml/merlin_specific/tast_helper.ml
ocaml
open Typedtree module Pat = struct let pat_extra = [] let pat_attributes = [] let constant ?(loc=Location.none) pat_env pat_type c = let pat_desc = Tpat_constant c in { pat_desc; pat_loc = loc; pat_extra; pat_attributes; pat_type; pat_env } let var ?loc pat_env pat_type str = let pat_loc = ...
a80892e820addd83c7b3ad7254e3c57d1bb4596af6d31a4f7a53ab3ee3353af6
mstksg/advent-of-code-2019
Day02.hs
-- | Module : AOC.Challenge . Day02 -- License : BSD3 -- -- Stability : experimental -- Portability : non-portable -- Day 2 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day02 ( day02a , day02b ) where import AOC.Common.Intcode (Memory(..), IE...
null
https://raw.githubusercontent.com/mstksg/advent-of-code-2019/df2b1c76ad26ad20306f705e923a09b14d538374/src/AOC/Challenge/Day02.hs
haskell
| License : BSD3 Stability : experimental Portability : non-portable for my code, noun makes big jumps and verb makes small ones search for verb next
Module : AOC.Challenge . Day02 Day 2 . See " AOC.Solver " for the types used in this module ! module AOC.Challenge.Day02 ( day02a , day02b ) where import AOC.Common.Intcode (Memory(..), IErr(..), parseMem, stepForever) import AOC.Common.Search (binaryMinSearch) i...
9495efd6e4d52fbe650c5262ba2aae86c0bfaafd7f68b852377a3596047ab0fb
tidalcycles/tidal-midi
System1M.hs
module Sound.Tidal.MIDI.System1M where import Sound.Tidal.MIDI.Control import Sound.Tidal.Params system1mController :: ControllerShape system1mController = ControllerShape { controls = [ mCC rmod_p 1 , mCC rlpcutoff_p 3 , mCC rport_p 5 , mCC rres_p 9 , mCC rcrush_p 12 , mCC rde...
null
https://raw.githubusercontent.com/tidalcycles/tidal-midi/0f806c31daee46bb54053dc3407349001a0e00b8/Sound/Tidal/MIDI/System1M.hs
haskell
module Sound.Tidal.MIDI.System1M where import Sound.Tidal.MIDI.Control import Sound.Tidal.Params system1mController :: ControllerShape system1mController = ControllerShape { controls = [ mCC rmod_p 1 , mCC rlpcutoff_p 3 , mCC rport_p 5 , mCC rres_p 9 , mCC rcrush_p 12 , mCC rde...
822e83953c4267273ddda2f221914b924218c8575dbea2116f7f4210885bb184
strint/sicpAns
2002_segment.scm
;point (define (make-point x y) (cons x y)) (define (x-point p) (car p)) (define (y-point p) (cdr p)) ;segment (define (make-segment x1 y1 x2 y2) (cons (make-point x1 y1) (make-point x2 y2))) ;-scheme.org/doc/html/guide/Pairs__Lists__and_Scheme_Syntax.html The only thing more confusing to new Schemers...
null
https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/2.1.1-2_DataAbstraction/2002_segment.scm
scheme
point segment -scheme.org/doc/html/guide/Pairs__Lists__and_Scheme_Syntax.html print
(define (make-point x y) (cons x y)) (define (x-point p) (car p)) (define (y-point p) (cdr p)) (define (make-segment x1 y1 x2 y2) (cons (make-point x1 y1) (make-point x2 y2))) The only thing more confusing to new Schemers than non - list pairs is the printing convention for pairs where the second elem...
ea04ace2c79abe74bac4183403907467933a60048429e73b5702c1ed96d5f390
returntocorp/semgrep
Matching_generic.mli
(* In what follows, tin stands for 'type in' and tout for 'type out' *) (* incoming environment *) type tin = { mv : Metavariable_capture.t; stmts_match_span : Stmts_match_span.t; cache : tout Caching.Cache.t option; TODO : this does not have to be in tout ; maybe split tin in 2 ? lang : Lang.t; config : C...
null
https://raw.githubusercontent.com/returntocorp/semgrep/98f6c7e23f1d078a641a11873345e0f6b53e4ece/src/matching/Matching_generic.mli
ocaml
In what follows, tin stands for 'type in' and tout for 'type out' incoming environment * Counts the number of times that we "follow" symbollically propagated * values. This is bound to prevent potential infinite loops. list of possible outcoming matching environments A matcher is something taking an element...
type tin = { mv : Metavariable_capture.t; stmts_match_span : Stmts_match_span.t; cache : tout Caching.Cache.t option; TODO : this does not have to be in tout ; maybe split tin in 2 ? lang : Lang.t; config : Config_semgrep.t; deref_sym_vals : int; } and tout = tin list type 'a matcher = 'a -> 'a -> tin ...
eebf89697168c2d752556afe847e86c3d1ba43a445274c13c182eeaec0b9aabb
velveteer/crossed
handlers.cljs
(ns app.handlers (:require-macros [app.logging :refer [log]]) (:require [re-frame.core :refer [register-handler dispatch dispatch-sync]] [clojure.string :as str] [firebase-cljs.core :as f] [firebase-cljs.database :as fd] [firebase-cljs.database.query :as fdq] ...
null
https://raw.githubusercontent.com/velveteer/crossed/ebcd4260060bfb46ba1da4f722799239ad61d30c/src/app/handlers.cljs
clojure
#.initializeApp -cljs/firebase-cljs.core.html#var-init get database for app #database -cljs/firebase-cljs.core.html#var-get-db get auth object for app #auth -cljs/firebase-cljs.core.html#var-get-auth set up refs to top level namespaces see app.views -- components will not mount until initializing? is false u...
(ns app.handlers (:require-macros [app.logging :refer [log]]) (:require [re-frame.core :refer [register-handler dispatch dispatch-sync]] [clojure.string :as str] [firebase-cljs.core :as f] [firebase-cljs.database :as fd] [firebase-cljs.database.query :as fdq] ...
a64d272d78eb92dfc7d10156d3bb6fadf54dd397b1fb6bda8f53d5739e0000da
artagnon/rhine-ml
main.ml
open Parsetree type action = Pprint | Normal let main () = let action = if Array.length Sys.argv > 1 then try List.assoc Sys.argv.(1) [ ("-p", Pprint) ] with Not_found -> Normal else Normal in let lexbuf = Lexing.from_channel stdin in let prog = Parser.prog Lexer.token lexbuf...
null
https://raw.githubusercontent.com/artagnon/rhine-ml/07b31e7f0bccebef71135db4d6c16a792ce33c7e/main.ml
ocaml
open Parsetree type action = Pprint | Normal let main () = let action = if Array.length Sys.argv > 1 then try List.assoc Sys.argv.(1) [ ("-p", Pprint) ] with Not_found -> Normal else Normal in let lexbuf = Lexing.from_channel stdin in let prog = Parser.prog Lexer.token lexbuf...
77a0bc3c9c7e72d940ba0f5e8e8a2ac06766e3fad43aeacebd0df855ae0cf76b
cognitect-labs/vase
interceptor_test.clj
(ns com.cognitect.vase.interceptor-test (:require [clojure.test :refer :all] [com.cognitect.vase.test-helper :as helper :refer [run-interceptor new-ctx]] [com.cognitect.vase.interceptor :refer :all])) (deftest stock-interceptors (testing "attach-received-time" (is (some-> (run-intercept...
null
https://raw.githubusercontent.com/cognitect-labs/vase/d882bc8f28e8af2077b55c80e069aa2238f646b7/test/com/cognitect/vase/interceptor_test.clj
clojure
(ns com.cognitect.vase.interceptor-test (:require [clojure.test :refer :all] [com.cognitect.vase.test-helper :as helper :refer [run-interceptor new-ctx]] [com.cognitect.vase.interceptor :refer :all])) (deftest stock-interceptors (testing "attach-received-time" (is (some-> (run-intercept...
ed322bb1ee4e3948aa1459cd87cd9bb2f6d68203b71df16052f02f961a8459bf
kzemek/erlang_pmp
erlang_pmp.erl
%%============================================================================== Copyright 2018 Erlang Solutions Ltd. %% 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 %% ...
null
https://raw.githubusercontent.com/kzemek/erlang_pmp/5799827ae1c09037f63dc06ac18813dc931a6e6b/src/erlang_pmp.erl
erlang
============================================================================== 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 ex...
Copyright 2018 Erlang Solutions Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(erlang_pmp). -author(''). -export([profile/1, profile_sync/1]). profile_sync(Opts) -> Duration = proplists:get_value(durat...
fc132550bb4b6585ed7c1ee6aaecb74c1381fd105e99cd7df3b22e58a6707e51
squaresLab/SynthLift
synth_exp.ml
open Core_kernel.Std open Bap.Std open Format module Err = Synth_err open Err module Partial = Synth_partial module Hole = Synth_hole type partial = Partial.t type t = { partial : partial ; vars : int ; imms : int ; sz : int } let destruct_rec (e : exp) pos : t = let vars = ref 0 in let imms = re...
null
https://raw.githubusercontent.com/squaresLab/SynthLift/6831b23db539bfacfcf59acb97d6de04522719db/lib/synth_exp.ml
ocaml
return the 'hole', could be var or int return the 'hole', could be var or int We can't destruct i because it is an int and not an expression. We should use propositions for the types we care about, at some point fill the argument at pos in l
open Core_kernel.Std open Bap.Std open Format module Err = Synth_err open Err module Partial = Synth_partial module Hole = Synth_hole type partial = Partial.t type t = { partial : partial ; vars : int ; imms : int ; sz : int } let destruct_rec (e : exp) pos : t = let vars = ref 0 in let imms = re...
3dd0cfee94d52003e30bc444354499fc0cd29886b064db3e326c925143a8f832
felipereigosa/mock-mechanics
copy.clj
(defn change-keys ([map suffix] (change-keys map suffix nil)) ([map suffix pred] (map-map (fn [[key value]] (let [key (if (or (nil? pred) (pred key)) (join-keywords key suffix) key)] {key value})...
null
https://raw.githubusercontent.com/felipereigosa/mock-mechanics/4049f2543b55c04426c8b5265d3486a6c5e4e8aa/src/mockmechanics/edit/copy.clj
clojure
(defn change-keys ([map suffix] (change-keys map suffix nil)) ([map suffix pred] (map-map (fn [[key value]] (let [key (if (or (nil? pred) (pred key)) (join-keywords key suffix) key)] {key value})...
368a524f3ac3596ff8b09bd388858b658461ad04ccd1c5c23746b0d401e6b5e1
tomlokhorst/AwesomePrelude
Alternative.hs
# LANGUAGE MultiParamTypeClasses # module Generic.Control.Alternative where import Prelude () import Generic.Control.Applicative class Applicative j f => Alternative j f where empty :: j (f a) (<|>) :: j (f a) -> j (f a) -> j (f a)
null
https://raw.githubusercontent.com/tomlokhorst/AwesomePrelude/c06fc73e1489aecdd3556b0395d427065245efee/src/Generic/Control/Alternative.hs
haskell
# LANGUAGE MultiParamTypeClasses # module Generic.Control.Alternative where import Prelude () import Generic.Control.Applicative class Applicative j f => Alternative j f where empty :: j (f a) (<|>) :: j (f a) -> j (f a) -> j (f a)
13e96f75e7093cf9ff41ae157748d3714a6e5ee258a54e9d4d0ccf97bf243bf4
theodormoroianu/SecondYearCourses
LambdaChurch_20210415170748.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415170748.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
005a8a6aa6ea34a9cdcb65f41ffb1338f9ca0566dab7c493208673b646b15453
racket/web-server
dyn-syntax.rkt
#lang web-server/base (require racket/match racket/stxparam "lib.rkt" "syntax.rkt" (for-syntax "lib.rkt" racket/base syntax/parse syntax/strip-context)) (provide formlet* =>*) (define-syntax-parameter =>* (λ (stx) (r...
null
https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/formlets/unsafe/dyn-syntax.rkt
racket
#lang web-server/base (require racket/match racket/stxparam "lib.rkt" "syntax.rkt" (for-syntax "lib.rkt" racket/base syntax/parse syntax/strip-context)) (provide formlet* =>*) (define-syntax-parameter =>* (λ (stx) (r...
0ad685d3774aa5d2801602060ac76047b9f225ad14329c729541621c6f29e2b1
jrh13/hol-light
permutations.ml
(* ========================================================================= *) (* Permutations, both general and specifically on finite sets. *) (* ========================================================================= *) parse_as_infix("permutes",(12,"right"));; let permutes = new_definition `p pe...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Library/permutations.ml
ocaml
========================================================================= Permutations, both general and specifically on finite sets. ========================================================================= ------------------------------------------------------------------------- Inverse functio...
parse_as_infix("permutes",(12,"right"));; let permutes = new_definition `p permutes s <=> (!x. ~(x IN s) ==> p(x) = x) /\ (!y. ?!x. p x = y)`;; let inverse = new_definition `inverse(f) = \y. @x. f x = y`;; let SURJECTIVE_INVERSE = prove (`!f. (!y. ?x. f x = y) <=> !y. f(inverse f y) = y`, REWRITE_TAC[SURJECTI...
a1a6b7c22fb90b30927754e1b093d882fc7aaa51db413445cbc89fb53edc9f0f
FranklinChen/hugs98-plus-Sep2006
Parse.hs
| A non - validating XML parser . For the input grammar , see -- <-xml>. module Text.XML.HaXml.Parse ( * a whole document xmlParse, xmlParse' * just a DTD , dtdParse, dtdParse' * a partial document , xmlParseWith * Individual parsers for use with /xmlParseWith/ and module SAX , document, el...
null
https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/HaXml/src/Text/XML/HaXml/Parse.hs
haskell
<-xml>. * These general utility functions don't belong here An XML parser, written using a slightly extended version of the by the lexer xmlLex. Whilst parsing, we gather a symbol expand their uses as we encounter them, forcing the remainder of the later retrieval. debugging only #define DEBUG (for gener...
| A non - validating XML parser . For the input grammar , see module Text.XML.HaXml.Parse ( * a whole document xmlParse, xmlParse' * just a DTD , dtdParse, dtdParse' * a partial document , xmlParseWith * Individual parsers for use with /xmlParseWith/ and module SAX , document, element, conten...
8e667e3a707aefef7c94bccf83720ce0bb77d07b30fe668bf932c66ff61ae876
basho/riak_cs
riak_cs_manifest_resolution_eqc.erl
%% --------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . Y...
null
https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/test/riak_cs_manifest_resolution_eqc.erl
erlang
--------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permiss...
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
5784516e10097bd57c3ddd8017d8802ad284f0ae37fc5513e5f888c3ceeab185
drewc/druix
druix.scm
(define-module (druix versions druix) #:use-module (druix versions) #:use-module (oop goops) #:export (versions latest)) (define versions (list (make <druix-version-git> #:name "druix" #:major 0 #:minor 1 #:patch #f #:revision 1 #:ymd 20210...
null
https://raw.githubusercontent.com/drewc/druix/b06d41da38629d047c3fb0e1ca078f630195a274/druix/versions/druix.scm
scheme
(define-module (druix versions druix) #:use-module (druix versions) #:use-module (oop goops) #:export (versions latest)) (define versions (list (make <druix-version-git> #:name "druix" #:major 0 #:minor 1 #:patch #f #:revision 1 #:ymd 20210...
5bde19244b34b7f976f70be5a30fdfb21e2b60fd95de5f07cd8f68fd884184b6
unix1/cowboy_fcgi
fcgi_SUITE.erl
Copyright ( c ) 2011 , < > Copyright ( c ) 2017 , Unix One < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVID...
null
https://raw.githubusercontent.com/unix1/cowboy_fcgi/6854a2d1890c8476c51de1e6f2e0f72534240c66/test/fcgi_SUITE.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2011 , < > Copyright ( c ) 2017 , Unix One < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(fcgi_SUITE). ...
96312146d7a778b4a085325ceedb67dd423341478ecb739eca3249de722d387b
philnguyen/soft-contract
collatz-q.rkt
#lang racket/base (require soft-contract/fake-contract) (define (cycle-length n) (cond [(= n 1) 1] [(odd? n) (+ 1 (cycle-length (+ 1 (* 3 n))))] [(even? n) (+ 1 (cycle-length (quotient n 2)))])) (provide (contract-out [cycle-length (exact-nonnegative-integer? . -> . exact-nonnegative-intege...
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/termination/r5rs-ish/collatz-q.rkt
racket
#lang racket/base (require soft-contract/fake-contract) (define (cycle-length n) (cond [(= n 1) 1] [(odd? n) (+ 1 (cycle-length (+ 1 (* 3 n))))] [(even? n) (+ 1 (cycle-length (quotient n 2)))])) (provide (contract-out [cycle-length (exact-nonnegative-integer? . -> . exact-nonnegative-intege...
0c91d50f44e7bfd9a26870b2dcf8fecbe5b059b30d04f9b13717978729248476
hdbc/hdbc-postgresql
SpecificDBTests.hs
module SpecificDBTests where import Database.HDBC import Database.HDBC.PostgreSQL import Database.HDBC.PostgreSQL.Parser(convertSQL) import Test.HUnit testp inp exp = TestCase $ case convertSQL inp of Right x -> assertEqual "" exp x Left y -> assertFailure $ show y tests = TestList [TestLabel...
null
https://raw.githubusercontent.com/hdbc/hdbc-postgresql/bed82fd6c2519fb2b56b3674e1533a666692eb1a/testsrc/SpecificDBTests.hs
haskell
module SpecificDBTests where import Database.HDBC import Database.HDBC.PostgreSQL import Database.HDBC.PostgreSQL.Parser(convertSQL) import Test.HUnit testp inp exp = TestCase $ case convertSQL inp of Right x -> assertEqual "" exp x Left y -> assertFailure $ show y tests = TestList [TestLabel...
86bae8f5f5a2e3ec3dda86c084f961c5fc27f80d1078c170de5b4169834e1b0d
wdebeaum/step
sweats.lisp
;;;; ;;;; w::sweats ;;;; (define-words :pos W::n :words ( (w::sweats (senses ((LF-PARENT ONT::attire) (meta-data :origin caloy3 :entry-date 20070330 :change-date nil :comments nil) ;(TEMPL mass-PRED-TEMPL) (TEMPL COUNT-PRED-3p-TEMPL) (syntax (W::morph (:forms (-none)))) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/sweats.lisp
lisp
w::sweats (TEMPL mass-PRED-TEMPL)
(define-words :pos W::n :words ( (w::sweats (senses ((LF-PARENT ONT::attire) (meta-data :origin caloy3 :entry-date 20070330 :change-date nil :comments nil) (TEMPL COUNT-PRED-3p-TEMPL) (syntax (W::morph (:forms (-none)))) ) ) ) ))
061466a9b18ebd767f589c1a1ecebde1bc0d6c8595163eefe18d8425ae211fc9
spechub/Hets
Proof.hs
| Module : $ EmptyHeader$ Description : < optional short description entry > Copyright : ( c ) < Authors or Affiliations > License : GPLv2 or higher , see LICENSE.txt Maintainer : < email > Stability : unstable | experimental | provisional | stable | frozen Portability : ...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/GMP/Proof.hs
haskell
> ) , ( < -- > ) , ( \/ ) , ( /\ ) , true , false , box , , neg , var , provable ) data type for fomulas variables ¬A [] A A/\B defines a sequent pretty printing (sort of) syntactic sugar >) :: Form -> Form -> Form > ~p\/q >) :: Form -> Form -> Form > > q ) ( q -- > p ) the rank of a modal formula expan...
| Module : $ EmptyHeader$ Description : < optional short description entry > Copyright : ( c ) < Authors or Affiliations > License : GPLv2 or higher , see LICENSE.txt Maintainer : < email > Stability : unstable | experimental | provisional | stable | frozen Portability : ...
e339bcee9597fc81a97b6ba7b0234711d7f5ee0e1609adaeb75fbe4af9aa122d
itchyny/vim-haskell-sort-import
import_only_no_space.in.hs
import C(ca,cb,cc) import B(ba,bb,bc) import A(aa,ab,ac)
null
https://raw.githubusercontent.com/itchyny/vim-haskell-sort-import/bfe4b6a5e212828ef14e611fa8c358b3960d4f9f/test/only/import_only_no_space.in.hs
haskell
import C(ca,cb,cc) import B(ba,bb,bc) import A(aa,ab,ac)
e01d78628900ce5bc2b0fe32bb31b355fbd97840f849a04ed44f2d863013c585
joeltg/mit-scheme-kernel
error.scm
(import-from "../shared" session-pub session-count) (import-from "utils" colorize) (define (error-hook condition) (invoke-restart (find-restart 'jupyter-error) (condition-type/name (condition/type condition)) (condition/report-string condition))) (define ((effector kappa session) name report) (error-resul...
null
https://raw.githubusercontent.com/joeltg/mit-scheme-kernel/b8ed3443a075e46567570062d73d3eb775b8743f/src/kernel/error.scm
scheme
(import-from "../shared" session-pub session-count) (import-from "utils" colorize) (define (error-hook condition) (invoke-restart (find-restart 'jupyter-error) (condition-type/name (condition/type condition)) (condition/report-string condition))) (define ((effector kappa session) name report) (error-resul...
0c6a1eb08ab6d95e4da4f0e983c311260922cd82a2c3033e7b6c53509ab56936
dmvianna/haskellbook
Ch24-Marshalling.hs
# LANGUAGE OverloadedStrings , QuasiQuotes # module Marshalling where import Control.Applicative import Data.Aeson import Data.ByteString.Lazy (ByteString) import qualified Data.Text as T import Data.Text (Text) import Text.RawString.QQ sectionJson :: ByteString sectionJson = [r| { "section": {"host": "wikipedia.org...
null
https://raw.githubusercontent.com/dmvianna/haskellbook/b1fdce66283ccf3e740db0bb1ad9730a7669d1fc/src/Ch24-Marshalling.hs
haskell
# LANGUAGE OverloadedStrings , QuasiQuotes # module Marshalling where import Control.Applicative import Data.Aeson import Data.ByteString.Lazy (ByteString) import qualified Data.Text as T import Data.Text (Text) import Text.RawString.QQ sectionJson :: ByteString sectionJson = [r| { "section": {"host": "wikipedia.org...
332eb82cdd98326668c10f96c75ced572ff8698394d054de36e5ebb95f13be3e
softwarelanguageslab/maf
R5RS_gambit_paraffins-5.scm
; Changes: * removed : 0 * added : 1 * swaps : 0 ; * negated predicates: 0 ; * swapped branches: 0 ; * calls to id fun: 0 (letrec ((gen (lambda (n) (let* ((n/2 (quotient n 2)) (radicals (make-vector (+ n/2 1) (__toplevel_cons 'H ())))) (letrec ((rads-of-si...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_paraffins-5.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0 * calls to id fun: 0
* removed : 0 * added : 1 * swaps : 0 (letrec ((gen (lambda (n) (let* ((n/2 (quotient n 2)) (radicals (make-vector (+ n/2 1) (__toplevel_cons 'H ())))) (letrec ((rads-of-size (lambda (n) ((letrec ((loop1 (lambda ...
9bff947467e3c0043b747458e5baab3ad99fa64f025f9eda6a4d003b6765b280
babashka/sci
profile.clj
(ns sci.profile (:require [sci.impl.main :as main])) (comment) clojure -A : profile " ( prn ( loop [ val 0 cnt 1000000 ] ( if ( pos ? ) ( recur ( inc val ) ( ) ) ) ) ) " " nil " " 100 " (require '[clj-async-profiler.core :as prof]) (defn -main [& options] (prof/profile (apply main/main options)) (shutdo...
null
https://raw.githubusercontent.com/babashka/sci/20616983a8be69f2c28c4ef453e7a4eb644a12ee/bench/sci/profile.clj
clojure
(ns sci.profile (:require [sci.impl.main :as main])) (comment) clojure -A : profile " ( prn ( loop [ val 0 cnt 1000000 ] ( if ( pos ? ) ( recur ( inc val ) ( ) ) ) ) ) " " nil " " 100 " (require '[clj-async-profiler.core :as prof]) (defn -main [& options] (prof/profile (apply main/main options)) (shutdo...
9f019a220b026d71fff89acd5cc1eb59062aeb522e70fc3456d5a24e712fa48c
jyh/metaprl
s4_internal.ml
open Lm_int_set open Lm_symbol open Lm_printf open Term_sig open Refiner.Refiner open Term open RefineError open Hilbert_internal open S4_logic open LP open OrderedFormula type s4_derivation = NegLeft of formula * s4_derivation | NegRight of formula * s4_derivation | AndLeft of formula * s4_derivation | AndRig...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/s4lp/s4_internal.ml
ocaml
let f = Pr(Provisional e, f0) in
open Lm_int_set open Lm_symbol open Lm_printf open Term_sig open Refiner.Refiner open Term open RefineError open Hilbert_internal open S4_logic open LP open OrderedFormula type s4_derivation = NegLeft of formula * s4_derivation | NegRight of formula * s4_derivation | AndLeft of formula * s4_derivation | AndRig...
c8cb047f7e65b96351c41764a47d5bb10290952d2a6b5bc1787146d017c1a717
jaspervdj/psqueues
Tests.hs
module Data.IntPSQ.Tests where import Prelude hiding (lookup) import Test.HUnit (Assertion, assert) import Test.QuickCheck (Property, arbitrary, forAll) import Test.Tasty (TestTree) import Test.Tasty.HUnit (testCase) ...
null
https://raw.githubusercontent.com/jaspervdj/psqueues/f6c8e112a7e6bc3e75303d87473f72e3c34822ec/tests/Data/IntPSQ/Tests.hs
haskell
------------------------------------------------------------------------------ Index of tests ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Unit tests -------------------------------------------------------...
module Data.IntPSQ.Tests where import Prelude hiding (lookup) import Test.HUnit (Assertion, assert) import Test.QuickCheck (Property, arbitrary, forAll) import Test.Tasty (TestTree) import Test.Tasty.HUnit (testCase) ...
ddeeb0a720c8fcb61e7fc8ceaae846572a2f80e40e130a680a9c47f082c1eb36
ygmpkk/house
Unique.hs
----------------------------------------------------------------------------- -- | -- Module : Data.Unique Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : experimental -- Portability : non-portable ...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/base/Data/Unique.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Unique License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : non-portable An abstract interface to a unique symbol generator. -----------------...
Copyright : ( c ) The University of Glasgow 2001 module Data.Unique ( instance ( Eq , Ord ) ) where import Prelude import Control.Concurrent.MVar import System.IO.Unsafe (unsafePerformIO) #ifdef __GLASGOW_HASKELL__ import GHC.Base import GHC.Num ( Integer(..) ) #endif newtype Unique = Unique Integer der...
d63f4ef1cc067514556efefdd55768faa84be50c3ac8f89e2e2bcfbc5cdf5921
wyager/zfs-backup
Regex.hs
module Lib.Regex (Regex, matches) where import qualified Text.Regex.TDFA as RT import Text.Regex.TDFA.Text () import qualified Text.Regex.Base as RB import qualified Options.Applicative as Opt import Options.Generic (ParseField, readField) import Data.Text (Text) newtype Regex = Re...
null
https://raw.githubusercontent.com/wyager/zfs-backup/ba0972a45a996e23c1a665a9626413ee9c5d9b05/src/Lib/Regex.hs
haskell
module Lib.Regex (Regex, matches) where import qualified Text.Regex.TDFA as RT import Text.Regex.TDFA.Text () import qualified Text.Regex.Base as RB import qualified Options.Applicative as Opt import Options.Generic (ParseField, readField) import Data.Text (Text) newtype Regex = Re...
1465853726dc6ad87e19bcaa19a29a780fec2934ab1b33c24776cebc44edf9c8
biocad/math-grads
Sampling.hs
# LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ScopedTypeVariables #-} -- | Module that provides function for sampling of coords of graph. -- module Math.Grads.Drawing.Internal.Sampling ( EdgeFixator , bestSample ) where import Data.List (delete, find, (\\)) import ...
null
https://raw.githubusercontent.com/biocad/math-grads/df7bdc48f86f57f3d011991c64188489e8d73bc1/src/Math/Grads/Drawing/Internal/Sampling.hs
haskell
# LANGUAGE ScopedTypeVariables # | Module that provides function for sampling of coords of graph. | Type alias for function that, given 'CoordMap' of graph, returns modified version of that 'CoordMap' alongside with 'EdgeList' of graph's edges of that shouldn't participate in sampling. | Finds conformation wit...
# LANGUAGE MultiParamTypeClasses # module Math.Grads.Drawing.Internal.Sampling ( EdgeFixator , bestSample ) where import Data.List (delete, find, (\\)) import Data.Maybe (fromJust) import Math.Grads.Algo.Traversals (dfs) impo...
9aad6490c81d2e7f904da8fcc739927bd4da422d95a609e5dabb948669aceaa9
agentm/project-m36
blog.hs
-- a simple example of a blog schema # LANGUAGE DeriveAnyClass , DeriveGeneric , OverloadedStrings , CPP , DerivingVia # import ProjectM36.Client import ProjectM36.Base import ProjectM36.Relation import ProjectM36.Tupleable import ProjectM36.Atom (relationForAtom) import ProjectM36.Tuple (atomForAttributeName) import...
null
https://raw.githubusercontent.com/agentm/project-m36/f5b32001db4be8b4525d4e759e831d35a2c200f0/examples/blog.hs
haskell
a simple example of a blog schema define your data types note that this type is an algebraic data type note that this data type could not be represented by an "enumeration" as found in SQL databases add some short-hand error handling- your application should have proper handling connect to the database create the we...
# LANGUAGE DeriveAnyClass , DeriveGeneric , OverloadedStrings , CPP , DerivingVia # import ProjectM36.Client import ProjectM36.Base import ProjectM36.Relation import ProjectM36.Tupleable import ProjectM36.Atom (relationForAtom) import ProjectM36.Tuple (atomForAttributeName) import Data.Either import GHC.Generics impo...
589479aca44448c6aab7a2e69f16f0519f6c3a2b351df513026219fbb58cd5af
pa-ba/compdata
Functions.hs
module Functions ( module Functions.Comp, module Functions.Standard ) where import Functions.Comp import Functions.Standard
null
https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/benchmark/Functions.hs
haskell
module Functions ( module Functions.Comp, module Functions.Standard ) where import Functions.Comp import Functions.Standard