_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
745ee2dc8457ce427cd6ec03d3d3f17e723cc145bd1132c30e26ba38f982dfc8
DSiSc/why3
why3extract.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/tools/why3extract.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception open Format open Why3 open Wstdlib open Pmodule open Compile let usage_msg = sprintf "Usage: %s [option...
b87de9053e7a908ed54ee410fbcd1656678f728ec8682219f2fb1a04534f45ce
jsa-aerial/saite
bostonclojure.clj
(ns bostonclj.examples (:require [clojure.string :as cljstr] [clojure.data.csv :as csv] [clojure.data.json :as json] [clojure.pprint :as pp :refer [pprint]] [aerial.fs :as fs] [aerial.utils.string :as str] [aerial.utils.io :refer [letio] :as io]...
null
https://raw.githubusercontent.com/jsa-aerial/saite/335bb4844a77acf7d0bc051ec04e38b66aa4deaa/examples/bostonclojure.clj
clojure
The ubiquitous simple car scatter plot via template Simple barchart with slider instrument :BOTTOM bottom Overview + Detail Grid example (hc/get-default :TOOLTIP) :TOPTS {:order :col :size "none"} Each element on different chart With and without chart ***NOTE: this won't work for outside users as the da...
(ns bostonclj.examples (:require [clojure.string :as cljstr] [clojure.data.csv :as csv] [clojure.data.json :as json] [clojure.pprint :as pp :refer [pprint]] [aerial.fs :as fs] [aerial.utils.string :as str] [aerial.utils.io :refer [letio] :as io]...
0f652eef03dfde197331e90063cfc6ea6a66764dd46ab932b1d4a4eeb8dd8eb3
Clozure/ccl
gtk2-clock.lisp
-*-Mode : LISP ; Package : CCL -*- ;;; Copyright ( C ) 2006 Clozure Associates ;;; This file is part of OpenMCL. ;;; OpenMCL is licensed under the terms of the Lisp Lesser GNU Public ;;; License , known as the LLGPL and distributed with OpenMCL as the ;;; file "LICENSE". The LLGPL consists of a preambl...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/examples/gtk2-clock.lisp
lisp
Package : CCL -*- This file is part of OpenMCL. License , known as the LLGPL and distributed with OpenMCL as the file "LICENSE". The LLGPL consists of a preamble and the LGPL, which is distributed with OpenMCL as the file "LGPL". Where these conflict, the preamble takes precedence. OpenMCL i...
Copyright ( C ) 2006 Clozure Associates OpenMCL is licensed under the terms of the Lisp Lesser GNU Public (in-package "CL-USER") (eval-when (:compile-toplevel :load-toplevel :execute) (use-interface-dir :gtk2)) (open-shared-library "libgnomeui-2.so") (defloadvar *gdk-threads-inited* nil) (defloadvar *gth...
c5cd8c5689f08c1b2142f2cbae0b02d9d2def28d30e7472c449b80eae242f034
janestreet/ecaml
elisp_gc.mli
(** [(Info-goto-node "(elisp)Garbage Collection")] *) open! Core open! Import (** [(describe-function 'garbage-collect)] *) val garbage_collect : unit -> unit * [ ( describe - variable ' gcs - done ) ] val gcs_done : unit -> int (** [(describe-variable 'gc-elapsed)] *) val gc_elapsed : unit -> Time_ns.Span.t (** [...
null
https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/src/elisp_gc.mli
ocaml
* [(Info-goto-node "(elisp)Garbage Collection")] * [(describe-function 'garbage-collect)] * [(describe-variable 'gc-elapsed)] * [(describe-variable 'post-gc-hook)]
open! Core open! Import val garbage_collect : unit -> unit * [ ( describe - variable ' gcs - done ) ] val gcs_done : unit -> int val gc_elapsed : unit -> Time_ns.Span.t val post_gc_hook : Hook.normal Hook.t
5affe68bad80008c146fc80f73290555796410ba97af2f6cf80d00088b901cfc
bozsahin/ccglab-database
g-en.ccg.lisp
(defparameter *ccg-grammar* '(((KEY 1) (PHON I) (MORPH N) (SYN ((BCAT NP) (FEATS ((AGR |1S|))))) (SEM "I") (PARAM 1.0)) ((KEY 2) (PHON ARRIVES) (MORPH EN) (SYN (((BCAT S) (FEATS NIL)) (DIR BS) (MODAL ALL) ((BCAT NP) (FEATS ((AGR |3S|)))))) (SEM (LAM X ("ARRIVE" X))) (PARAM 1.0)) ((KEY 3) (PHON ARR...
null
https://raw.githubusercontent.com/bozsahin/ccglab-database/f24215aaa4ac8102f6d76c9c0ec5bd58a29743d7/cl-db1/g-en.ccg.lisp
lisp
(defparameter *ccg-grammar* '(((KEY 1) (PHON I) (MORPH N) (SYN ((BCAT NP) (FEATS ((AGR |1S|))))) (SEM "I") (PARAM 1.0)) ((KEY 2) (PHON ARRIVES) (MORPH EN) (SYN (((BCAT S) (FEATS NIL)) (DIR BS) (MODAL ALL) ((BCAT NP) (FEATS ((AGR |3S|)))))) (SEM (LAM X ("ARRIVE" X))) (PARAM 1.0)) ((KEY 3) (PHON ARR...
d32a9b3bfef31491be7cda31f5b6c9f913d7c1fe5858265f4c33a402d566bfa7
acieroid/scala-am
flip.scm
(define flip (let ((state 0)) (lambda () (if (= state 0) (set! state 1) (set! state 0)) state))) (and (= (flip) 1) (= (flip) 0) (= (flip) 1) (= (flip) 0))
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/flip.scm
scheme
(define flip (let ((state 0)) (lambda () (if (= state 0) (set! state 1) (set! state 0)) state))) (and (= (flip) 1) (= (flip) 0) (= (flip) 1) (= (flip) 0))
323c26bd153fb6b837841564832110f01709076cdcabe917ea2526b0aad47849
wz1000/HieDb
Html.hs
{-# LANGUAGE OverloadedStrings #-} module HieDb.Html ( Color (..) , Span (..) , generate ) where import Control.Monad (forM_) import Data.Function (on) import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IM import Data.List (foldl', sortBy)...
null
https://raw.githubusercontent.com/wz1000/HieDb/45c4671db2da8ce5cd11e964573846cfbf3bbec8/src/HieDb/Html.hs
haskell
# LANGUAGE OverloadedStrings #
module HieDb.Html ( Color (..) , Span (..) , generate ) where import Control.Monad (forM_) import Data.Function (on) import Data.IntMap.Strict (IntMap) import qualified Data.IntMap.Strict as IM import Data.List (foldl', sortBy) import Data.Text (Text...
b6f060dcb5570c5fbba2e63fd2600a21e2a4083e5872ac80d14e99b5e6864158
mzp/ocaml-hoogle
controllerTest.ml
open Base open OUnit open Controller open StdLabels let rec sort xs = List.sort xs ~cmp:(fun (x,_) (y,_) -> compare x y) +> List.map ~f:begin fun (name,x) -> match x with Table xs -> (name,Table (List.map ~f:sort xs)) | _ -> (name,x) end let ok x y = assert_equal ~printer:(fun xs -> String.conc...
null
https://raw.githubusercontent.com/mzp/ocaml-hoogle/dbfb2e970d65e41936baa0ba51c7f7596cc6c369/controllerTest.ml
ocaml
open Base open OUnit open Controller open StdLabels let rec sort xs = List.sort xs ~cmp:(fun (x,_) (y,_) -> compare x y) +> List.map ~f:begin fun (name,x) -> match x with Table xs -> (name,Table (List.map ~f:sort xs)) | _ -> (name,x) end let ok x y = assert_equal ~printer:(fun xs -> String.conc...
27c17b7404f1d4c05a9637cb0c1ef3517eaf2474c8308728d0f83f03464ea734
CatalinStefan/Clojure
Exceptions.clj
(ns s04.Exceptions) (defn ExHandling [x] (try (inc x) (catch ClassCastException e (println "Caught exception:" (.getMessage e))) (catch Exception e (println "Caught generic exception")) (finally (println "cleanup and move on")) ) ) (ExHandling "hello")
null
https://raw.githubusercontent.com/CatalinStefan/Clojure/c8a313fffe39ace8f5aae35de435c50f70b57ed9/s04/src/s04/Exceptions.clj
clojure
(ns s04.Exceptions) (defn ExHandling [x] (try (inc x) (catch ClassCastException e (println "Caught exception:" (.getMessage e))) (catch Exception e (println "Caught generic exception")) (finally (println "cleanup and move on")) ) ) (ExHandling "hello")
1aa6ffdd715ebc28fafae93e8a564a36ba582d55c31e13d79650837e9cbc2e57
glguy/advent
01.hs
{-# Language QuasiQuotes #-} | Module : Main Description : Day 1 solution Copyright : ( c ) , 2020 License : ISC Maintainer : < > Find entries in an /expense report/ that sum up to 2020 and return their product . Module : Main Description : Day 1 solution Copyright : (c) ...
null
https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2020/01.hs
haskell
# Language QuasiQuotes # | >>> :main | Given a list of integer inputs, find the product of @count@ entries that sum up to @2020@. ^ inputs ^ count ^ product ^ sorted inputs ^ count ^ target sum ^ current product ^ next alternative ^ final product
| Module : Main Description : Day 1 solution Copyright : ( c ) , 2020 License : ISC Maintainer : < > Find entries in an /expense report/ that sum up to 2020 and return their product . Module : Main Description : Day 1 solution Copyright : (c) Eric Mertens, 2020 License ...
b1ff09dfc0b3769b868db4944a4d4588b50865cb68daa15e6c75539ec09c654a
erlang-ls/erlang_ls
els_text_edit.erl
-module(els_text_edit). -export([ diff_files/2, edit_insert_text/3, edit_replace_text/4 ]). -include("els_lsp.hrl"). %%============================================================================== %% File and module functions %%============================================================================...
null
https://raw.githubusercontent.com/erlang-ls/erlang_ls/2dfb48aca3879e5b44f6fd676f8349525262779f/apps/els_lsp/src/els_text_edit.erl
erlang
============================================================================== File and module functions ============================================================================== Generate a list of text edits to transform `SourceFile' into ========================================================================...
-module(els_text_edit). -export([ diff_files/2, edit_insert_text/3, edit_replace_text/4 ]). -include("els_lsp.hrl"). @doc Construct a [ text_edit ( ) ] from the diff between two files . ` DestinationFile ' -spec diff_files(els_uri:path(), els_uri:path()) -> [text_edit()]. diff_files(SourceFile, Dest...
a299a0e921a661b99b5ed7cea0ae97d46c32750e1eaf02371a02c6f033107fce
AshleyYakeley/Truth
Build.hs
# LANGUAGE ApplicativeDo # module Language.Expression.Dolan.Unifier.Build ( UnifierSolver , unifySubtypeContext , unifyTypes , subsumeSingularTypes ) where import Control.Applicative.Wrapped import Data.Shim import Language.Expression.Common import Language.Expression.Dolan.PShimWit import Languag...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/1fda0e9266e710f15392dc612a837fb87007e3bb/Pinafore/typed-expression/lib/Language/Expression/Dolan/Unifier/Build.hs
haskell
# LANGUAGE ApplicativeDo # module Language.Expression.Dolan.Unifier.Build ( UnifierSolver , unifySubtypeContext , unifyTypes , subsumeSingularTypes ) where import Control.Applicative.Wrapped import Data.Shim import Language.Expression.Common import Language.Expression.Dolan.PShimWit import Languag...
d3c8ccc052a74272812f106d5308ee76cd9e0d79afc99bcff3c463146240a29c
rickbutton/loki
test-runner-simple.body.scm
Copyright ( c ) 2005 , 2006 , 2007 , 2012 , 2013 Per Bothner Added " full " support for Chicken , Gauche , and SISC . , Copyright ( c ) 2005 . Modified for Scheme Spheres by , Copyright ( c ) 2012 . Support for Guile 2 by < > , Copyright ( c ) 2014 . Refactored by , Copyright ( c ) 2014 , ...
null
https://raw.githubusercontent.com/rickbutton/loki/11ae0bac5e311c9b27994100ae8360cc5c242c61/src/srfi/64/test-runner-simple.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 sell copies furnished to do so, subject to the following conditions: ...
Copyright ( c ) 2005 , 2006 , 2007 , 2012 , 2013 Per Bothner Added " full " support for Chicken , Gauche , and SISC . , Copyright ( c ) 2005 . Modified for Scheme Spheres by , Copyright ( c ) 2012 . Support for Guile 2 by < > , Copyright ( c ) 2014 . Refactored by , Copyright ( c ) 2014 , ...
796e63541d5b5b77aebb6eac585686eadb2f3c98b5dc2fc750256863b85449b8
pirapira/coq2rust
pfedit.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/proofs/pfedit.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** spiwack: returning empty evar_map, ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Util open Names ...
76b5cbc27a2d1f34f8f9e536553c6d283847b9e69d6a3a0a8a8e1e223759be82
wdebeaum/step
language.lisp
;;;; ;;;; W::LANGUAGE ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :tags (:base500) :words ( (W::LANGUAGE (SENSES ((meta-data :origin calo :entry-date 20031230 :change-date nil :wn ("language%1:10:00") :comments html-purchasing-corpus) LINGUISTIC - OBJECT ) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/language.lisp
lisp
W::LANGUAGE
(define-words :pos W::n :templ COUNT-PRED-TEMPL :tags (:base500) :words ( (W::LANGUAGE (SENSES ((meta-data :origin calo :entry-date 20031230 :change-date nil :wn ("language%1:10:00") :comments html-purchasing-corpus) LINGUISTIC - OBJECT ) ) ) ) ))
a4d7d78c2790a1191e132005f8d624a94497257b38f2b2d689ac195edaad67fe
transient-haskell/transient-stack
Executor.hs
module Transient.Move.Services.Executor where import Transient.Internals import Transient.Move.Internals import Transient.Logged import Transient.Move.Services import Data.IORef import System.IO.Unsafe import qualified Data.Map as M import qualified Data.ByteString.Lazy.Char8 as BS import qualified Data.B...
null
https://raw.githubusercontent.com/transient-haskell/transient-stack/dde6f6613a946d57bb70879a5c0e7e5a73a91dbe/transient-universe/src/Transient/Move/Services/Executor.hs
haskell
initialize N instances, of the executor service. The monitor would spread them among the nodes available. | execute a command in some node by an executor service, and return the result when the program finishes | execute a process in some machine trough the local monitor and the executor. This call return a proc...
module Transient.Move.Services.Executor where import Transient.Internals import Transient.Move.Internals import Transient.Logged import Transient.Move.Services import Data.IORef import System.IO.Unsafe import qualified Data.Map as M import qualified Data.ByteString.Lazy.Char8 as BS import qualified Data.B...
9581eea305c36f19cbc7e244eb49e58938bb41b930175f1d437df2f78026f21d
ulfsauer0815/ghmm
Main.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Main where import System.Environment import Network.HTTP.Client (Manager, newManager) import Network.HTTP.Client.TLS (tlsManagerSettings) import Control.Monad import Data.Aeson import...
null
https://raw.githubusercontent.com/ulfsauer0815/ghmm/fc81948316156c67f6af9fe08a8a49472e9a42b8/test-live/Main.hs
haskell
# LANGUAGE OverloadedStrings # ---------------------------------------------- ---------------------------------------------- ---------------------------------------------- , ("status.json", "status")
# LANGUAGE RecordWildCards # module Main where import System.Environment import Network.HTTP.Client (Manager, newManager) import Network.HTTP.Client.TLS (tlsManagerSettings) import Control.Monad import Data.Aeson import Data.ByteString.Lazy ...
bb148857dad3d2af021c6680ab5df18e678f679bd19bd639390680be8e5b6884
Maxfield-Chen/liberty-go-logic
Proofs.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE RoleAnnotations # {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeOper...
null
https://raw.githubusercontent.com/Maxfield-Chen/liberty-go-logic/406165d10da0e64150b15dd6f14e29ec4bc04584/src/Proofs.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # Predicates about the possible shapes of positions Relates to Int vs nonspecific ord / num type
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RoleAnnotations # # LANGUAGE ViewPatterns # module Proofs where import Data.The import Game (Pair, bounded) import Logic.Implicit import ...
3058fcb68d1de072126eb8d7f7ae1a159c7b947cc3e1804d9cb1fed4b41d8acf
binaryage/chromex
developer_private.clj
(ns chromex.ext.developer-private "developerPrivate API. This is a private API exposing developing and debugging functionalities for apps and extensions. * available since Chrome 36" (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-help...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts_private/chromex/ext/developer_private.clj
clojure
-- events ----------------------------------------------------------------------------------------------------------------- docs: /#tapping-events -- convenience ------------------------------------------------------------------------------------------------------------ --------------------------------------------...
(ns chromex.ext.developer-private "developerPrivate API. This is a private API exposing developing and debugging functionalities for apps and extensions. * available since Chrome 36" (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [gen-wrap-help...
463c164fbfc73ff9c84a021fbb45c233e90ed5764629e40afa42c40ff247f77c
goldfirere/thesis
Main.hs
# LANGUAGE TemplateHaskell , TypeInType # # OPTIONS_GHC -fno - warn - unused - imports # -- improves error messages during example module Main where import ReadDB import Basics import TH import DB2 hiding ( Schema ) main :: IO () main = withSchema "classes.schema" $ \classes_sch -> withSchema "students.sc...
null
https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/defense/Main.hs
haskell
improves error messages during example
# LANGUAGE TemplateHaskell , TypeInType # # OPTIONS_GHC -fno - warn - unused - imports # module Main where import ReadDB import Basics import TH import DB2 hiding ( Schema ) main :: IO () main = withSchema "classes.schema" $ \classes_sch -> withSchema "students.schema" $ \students_sch -> $(checkSchem...
29d00dd198f99b95f3721d951e4b8b2c4f736a57c49ef472406f047e8a3bb477
Opetushallitus/ataru
pohjakoulutus_ristiriita_schema.cljc
(ns ataru.schema.pohjakoulutus-ristiriita-schema (:require [ataru.schema.element-metadata-schema :as element-metadata-schema] [ataru.schema.localized-schema :as localized-schema] [schema.core :as s])) (s/defschema Pohjakoulutusristiriita {:id s/Str :fieldClass ...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljc/ataru/schema/pohjakoulutus_ristiriita_schema.cljc
clojure
(ns ataru.schema.pohjakoulutus-ristiriita-schema (:require [ataru.schema.element-metadata-schema :as element-metadata-schema] [ataru.schema.localized-schema :as localized-schema] [schema.core :as s])) (s/defschema Pohjakoulutusristiriita {:id s/Str :fieldClass ...
25eb2972dfa1690dd376a5ea13f0ecee81268f0395f2c1bc322b75512f35830e
pascal-knodel/haskell-craft
E'5'12.hs
-- -- -- ----------------- Exercise 5.12 . ----------------- -- -- -- module E'5'12 where import E'5'11 ( NewShape ( NewCircle , NewRectangle , NewTriangle ) ) move :: Float -> Float -> NewShape -> NewShape move x y ( NewCircle r ( posX , posY ) ) = NewCircle r ( posX + x , posY + y ) move x y ( Ne...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'5'12.hs
haskell
--------------- ---------------
Exercise 5.12 . module E'5'12 where import E'5'11 ( NewShape ( NewCircle , NewRectangle , NewTriangle ) ) move :: Float -> Float -> NewShape -> NewShape move x y ( NewCircle r ( posX , posY ) ) = NewCircle r ( posX + x , posY + y ) move x y ( NewRectangle a b ( posX , posY ) ) = NewRectangle a b...
bb831903eb2533d5b73abbd1de49024003c7cf9a2dac2fcd4dbd64f8fa101422
rizo/snowflake-os
cmm.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/asmcomp/cmm.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ type machtype_component = ...
a0acebb57e9299d3e450f13c8863f7a31b2225f1618c80a27fab804cefbfbe44
serokell/haskell-crypto
Salt.hs
SPDX - FileCopyrightText : 2021 -- SPDX - License - Identifier : MPL-2.0 # LANGUAGE MagicHash # # LANGUAGE TemplateHaskell # -- | This module gives different ways of obtaining salts. -- -- A “salt” is additional input provided to certain functions. -- Unlike a nonce, salt is used for “namespacing”, so there is n...
null
https://raw.githubusercontent.com/serokell/haskell-crypto/fdc625ec8bcdb9ce5189a77d420c0e8ba0456850/crypto-sodium/lib/Crypto/Sodium/Salt.hs
haskell
| This module gives different ways of obtaining salts. A “salt” is additional input provided to certain functions. Unlike a nonce, salt is used for “namespacing”, so there is not requirement that it is used only once, instead you use different salts to deisgnate different applications of an algorithm. This is ...
SPDX - FileCopyrightText : 2021 SPDX - License - Identifier : MPL-2.0 # LANGUAGE MagicHash # # LANGUAGE TemplateHaskell # module Crypto.Sodium.Salt ( utf8 , bytes , Crypto.Sodium.Nonce.generate ) where import Control.Monad ((<=<)) import Data.Bits (toIntegralSized) import Data.ByteArray.Sized (Size...
67b9eea6cee1e990bd166fb4d6c187b7f0635895ac40674b1768cac365742c37
lamdu/hypertypes
ST.hs
# LANGUAGE TemplateHaskell # | Unification variables binding in the ' Control . . ST.ST ' monad module Hyper.Unify.Binding.ST ( STUVar (..) , _STUVar , stBinding ) where import Control.Monad.ST.Class (MonadST (..)) import Data.STRef (STRef, newSTRef, readSTRef, writeSTRef) import Hyper.Class.Unify ...
null
https://raw.githubusercontent.com/lamdu/hypertypes/161142e0d9f503194b85fb6f5b2a5907a1ae3783/src/Hyper/Unify/Binding/ST.hs
haskell
| A 'BindingDict' for 'STUVar's
# LANGUAGE TemplateHaskell # | Unification variables binding in the ' Control . . ST.ST ' monad module Hyper.Unify.Binding.ST ( STUVar (..) , _STUVar , stBinding ) where import Control.Monad.ST.Class (MonadST (..)) import Data.STRef (STRef, newSTRef, readSTRef, writeSTRef) import Hyper.Class.Unify ...
684f49e1476f2f5ac944801a13ccd94a793cee3c0e8b284bf9a7801724d0ca25
paulcadman/the-little-typer
nat-elimination-crib.rkt
#lang pie Exercises on using from Chapter 3 of The Little Typer ;; Some exercises are adapted from assignments at Indiana University Exercise 3.1 ;; Define a function called at - least - two ? that takes one argument and evaluates to an Atom . ;; at - least - two ? evaluates to ' t if the is greater tha...
null
https://raw.githubusercontent.com/paulcadman/the-little-typer/0a5c6877a902f26fc7f100de593f44f6a986624c/exercises/nat-elimination-crib.rkt
racket
Exercise 3.4
#lang pie Exercises on using from Chapter 3 of The Little Typer Some exercises are adapted from assignments at Indiana University Exercise 3.1 Define a function called at - least - two ? that takes one argument and evaluates to an Atom . at - least - two ? evaluates to ' t if the is greater than or equa...
b3dadce7cd88995363fc79f958f0cca1ee12e441fb03a6b87749764c4863fbdd
Paczesiowa/virthualenv
virthualenv.hs
import System.Environment (getArgs) import System.IO (stderr, hPutStrLn) import System.Exit (exitFailure) import System.FilePath ((</>)) import Types import MyMonad import Actions import SanityCheck (sanityCheck) import Args (usage, parseArgs) main :: IO () main = do hPutStrLn stderr "virthualenv is deprecated, p...
null
https://raw.githubusercontent.com/Paczesiowa/virthualenv/aab89dad9de7dac5268472eaa50c11eb40b02380/src/virthualenv.hs
haskell
import System.Environment (getArgs) import System.IO (stderr, hPutStrLn) import System.Exit (exitFailure) import System.FilePath ((</>)) import Types import MyMonad import Actions import SanityCheck (sanityCheck) import Args (usage, parseArgs) main :: IO () main = do hPutStrLn stderr "virthualenv is deprecated, p...
86acf73a199b53d0169d810c73d05375a666fc9378fbc5588300fb340f85c116
bohonghuang/cl-gtk4
adw.lisp
;;;; adw.lisp Copyright ( C ) 2022 - 2023 ;;;; ;;;; This program is free software: you can redistribute it and/or modify ;;;; it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;;; (at your option) any later version. ;;...
null
https://raw.githubusercontent.com/bohonghuang/cl-gtk4/30d1a7f9bcb9834b2b5f18f4f80ea59313563d93/adw.lisp
lisp
adw.lisp This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warrant...
Copyright ( C ) 2022 - 2023 the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License (cl:defpackage adw (:use) (:export #:*ns*)) (cl:in-package #:adw) (cl:eval-when ...
eb96fd2ba49f3ae69169252f3cf8d4a3f85dfbe57b47f54f8c3623419dadda63
milinda/ef
core.clj
(ns core-logic.core)
null
https://raw.githubusercontent.com/milinda/ef/60901356e52eba33addfd509e909eaf8f0d2eab5/lerning-clojure/core-logic/src/core_logic/core.clj
clojure
(ns core-logic.core)
71a340b6979a6e5163202f1024c852dc5448e1e51d727dec16f11fb297152bc4
7max/log4cl
layout.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;; Copyright ( c ) 2012 , . All rights reserved . ;;; This file is licensed to You 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 Li...
null
https://raw.githubusercontent.com/7max/log4cl/d6293f9f1b6b8871b0a4417c4bb22afb9910b97f/src/layout.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- you may not use this file except in compliance -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and lim...
Copyright ( c ) 2012 , . All rights reserved . This file is licensed to You under the Apache License , Version 2.0 with the License . You may obtain a copy of the License at distributed under the License is distributed on an " AS IS " BASIS , (in-package #:log4cl) (defclass layout () () (:documentation ...
9b9538aee7abcf247ced2ba6e3ca8fb4cfee08a8866515264c956d7509464d0a
dcavar/schemeNLP
countwords1e.scm
":"; exec mzscheme -r $0 "$@" (require (lib "vector-lib.ss" "srfi" "43")) (require (lib "string.ss" "srfi" "13")) (define load-file (lambda (fname) (printf "Loading file: ~a\n" fname) (call-with-input-file fname (lambda (p) (read-string (file-size fname) p))))) (define count-words (la...
null
https://raw.githubusercontent.com/dcavar/schemeNLP/daa0ddcc4fa67fe00dcf6054c4d30d11a00b2f7f/src/countwords1e.scm
scheme
exec mzscheme -r $0 "$@" main steps
(require (lib "vector-lib.ss" "srfi" "43")) (require (lib "string.ss" "srfi" "13")) (define load-file (lambda (fname) (printf "Loading file: ~a\n" fname) (call-with-input-file fname (lambda (p) (read-string (file-size fname) p))))) (define count-words (lambda (wordlist) (for-each ...
c96ffbcb893fa4d0c2d59901c8c7659fc23b4ef99af4f254ab3c62afc24ef943
Octachron/tensority
small_tensor.mli
module Vec = Small_vec module Matrix = Small_matrix include Signatures.vec_operators with type 'a t := 'a Vec.t include Signatures.matrix_specific_operators with type 'a t := 'a Matrix.t and type 'a vec := 'a Vec.t val vector : 'a Nat.eq -> float array -> 'a Vec.t val matrix : 'a Nat.eq -> 'b Nat.eq -> float arra...
null
https://raw.githubusercontent.com/Octachron/tensority/2689fba0bb9c693ef51bebe9cf92c37ab30ca17e/lib/small_tensor.mli
ocaml
module Vec = Small_vec module Matrix = Small_matrix include Signatures.vec_operators with type 'a t := 'a Vec.t include Signatures.matrix_specific_operators with type 'a t := 'a Matrix.t and type 'a vec := 'a Vec.t val vector : 'a Nat.eq -> float array -> 'a Vec.t val matrix : 'a Nat.eq -> 'b Nat.eq -> float arra...
4e7de9aac971fac8f59d28a632db38da5893572121b294138e4b8c25b5ec936d
jumarko/clojure-experiments
double_down.clj
(ns four-clojure.double-down) (= ((fn double [x] (* x 2)) 2) 4) (= ((fn [x] (* x 2)) 3) 6) (= (#(* % 2) 11) 22) (= ((partial * 2) 7) 14)
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/four_clojure/double_down.clj
clojure
(ns four-clojure.double-down) (= ((fn double [x] (* x 2)) 2) 4) (= ((fn [x] (* x 2)) 3) 6) (= (#(* % 2) 11) 22) (= ((partial * 2) 7) 14)
edcb7a0b0ff262896fe708ee35ebead92f808c3c9ae8489fc659371fd951c25b
ijvcms/chuanqi_dev
lottery_box_db_db.erl
%%%------------------------------------------------------------------- @author apple ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 30 . 十一月 2015 14:11 %%%------------------------------------------------------------------- -module(lottery_box_db_db). -include("common.hrl"). -include("cache.hrl"). %% ...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/lottery/lottery_box_db_db.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions ====================================================================
@author apple ( C ) 2015 , < COMPANY > Created : 30 . 十一月 2015 14:11 -module(lottery_box_db_db). -include("common.hrl"). -include("cache.hrl"). -export([ select_row/1, insert/1, select_all/0, update/2 ]). select_row(LotteryId) -> case db:select_row(lottery_box_db, record_info(fields, db_lottery_box_db),...
1f51f395e2b9d3dd4436f6ebf372a1c8ded95118284ed4af411903ee1c97db13
walck/learn-physics
Learn.hs
# LANGUAGE Trustworthy # # OPTIONS_GHC -Wall # -- | --Module : Physics.Learn Copyright : ( c ) 2014 - 2018 --License : BSD3 (see LICENSE) Maintainer : < > --Stability : experimental -- --Functions for learning physics. module Physics.Learn ( -- * Mechanics TheTime , TimeStep , V...
null
https://raw.githubusercontent.com/walck/learn-physics/5f30d1de269c4b66bca996b0c0bdd0e7a3de56fd/src/Physics/Learn.hs
haskell
| Module : Physics.Learn License : BSD3 (see LICENSE) Stability : experimental Functions for learning physics. * Mechanics ** Many-particle state ** Charge ** Current ** Electric Field ** Electric Flux ** Electric Potential ** Magnetic Field ** Magnetic Flux * Geometry ** Vectors ** Position...
# LANGUAGE Trustworthy # # OPTIONS_GHC -Wall # Copyright : ( c ) 2014 - 2018 Maintainer : < > module Physics.Learn TheTime , TimeStep , Velocity * * Simple one - particle state , SimpleState , SimpleAccelerationFunction , simpleStateDeriv , simpleRungeKuttaStep * * One - particle ...
8362aa26f41399098a135f7e44cda915fe5faa518ce79701179e0cd38805bd9f
hemmi/coq2scala
xml_lexer.mli
* Xml Light , an small Xml parser / printer with DTD support . * Copyright ( C ) 2003 ( ) * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 ...
null
https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/lib/xml_lexer.mli
ocaml
* Xml Light , an small Xml parser / printer with DTD support . * Copyright ( C ) 2003 ( ) * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation ; either * version 2.1 ...
939e312a34e42744c0548cf2cb7b1ca3ea17fbd4756e30235dbeeefb484b1aea
racket/racket7
flatten-begin.rkt
#lang racket/base (require (for-template racket/base)) (provide flatten-begin flatten-all-begins) (define (flatten-begin stx) (let ([l (syntax->list stx)]) (if l (map (lambda (e) (syntax-track-origin e stx (car l))) (cdr l)) (raise-syntax-error #f ...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/syntax/flatten-begin.rkt
racket
Flatten `begin` expressions recursively
#lang racket/base (require (for-template racket/base)) (provide flatten-begin flatten-all-begins) (define (flatten-begin stx) (let ([l (syntax->list stx)]) (if l (map (lambda (e) (syntax-track-origin e stx (car l))) (cdr l)) (raise-syntax-error #f ...
71ce2f0d28a523750c5c8dc4e3e4f134513dc54f00d001fb0c4a7397e05da21b
rsharifnasab/my-learning
8.hs
compress :: String -> String compress [] = [] compress [a] = [a] compress (x:x':xs) = if x==x' then compress $ x':xs else x: (compress $ x':xs) main :: IO () main = undefined
null
https://raw.githubusercontent.com/rsharifnasab/my-learning/8555583a772c96e334e3fdace5a295a21c31ea8b/haskell/99questions/8.hs
haskell
compress :: String -> String compress [] = [] compress [a] = [a] compress (x:x':xs) = if x==x' then compress $ x':xs else x: (compress $ x':xs) main :: IO () main = undefined
95e299ce09cd12e9d232bd1521db44e173a9dd8f7cc52eda71c97592b02b87cb
ConsenSysMesh/Fae
Timeout1.hs
import Control.Monad body :: FaeTX () body = do newContract @(Contract () ()) $ \() -> forever (return 0) >> spend () newContract @(Contract () ()) $ feedback $ const $ release ()
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/samples/Blockchain.Fae/timeouts/Timeout1.hs
haskell
import Control.Monad body :: FaeTX () body = do newContract @(Contract () ()) $ \() -> forever (return 0) >> spend () newContract @(Contract () ()) $ feedback $ const $ release ()
aaf140cc912757eabd0bcc33cf969fbfcf9babce7d0de6f09e6df11a73ad9b7f
Decentralized-Pictures/T4L3NT
internal_pervasives.ml
(** Local “Pervasives” module for flextesa. See also ["docs/tutorials/flextesa.rst"]. *) include Base let ( // ) = Caml.Filename.concat let ksprintf, sprintf = Printf.(ksprintf, sprintf) * Wrapper around the [ EasyFormat ] library to use for console display . module EF = struct type t = Easy_format.t open Easy...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/vendors/flextesa-lib/internal_pervasives.ml
ocaml
* Local “Pervasives” module for flextesa. See also ["docs/tutorials/flextesa.rst"]. * Debug-display module (non-cooperative output to [stderr]). * Little experiment for fun … * An “decorated result type” based on polymorphic variants let error e : (_, _) t = Lwt.return (error e) * The module opened everywhere...
include Base let ( // ) = Caml.Filename.concat let ksprintf, sprintf = Printf.(ksprintf, sprintf) * Wrapper around the [ EasyFormat ] library to use for console display . module EF = struct type t = Easy_format.t open Easy_format let default_list = list let default_atom = atom let default_label = label ...
1f3199c230a57424cd9c824ef7ad879e4517dc42bfea28514e1cd7495c75bd2a
sbcl/sbcl
parms.lisp
;;;; This file contains some parameterizations of various VM attributes for the ARM . This file is separate from other stuff so ;;;; that it can be compiled and loaded earlier. This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU C...
null
https://raw.githubusercontent.com/sbcl/sbcl/a082e5a3ecdb4aced5e748fe8ffe35714999923c/src/compiler/arm64/parms.lisp
lisp
This file contains some parameterizations of various VM that it can be compiled and loaded earlier. more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. The size in bytes of GENCGC cards, i.e. t...
attributes for the ARM . This file is separate from other stuff so This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB-VM") (defconstant sb-assem:assem-sche...
9e27f6663be63978826cd36560e0c21073ca76807d04db0641846e27fa7c22d0
Mathnerd314/stroscot
XXHash.hs
# LANGUAGE ForeignFunctionInterface , GHCForeignImportPrim , MagicHash , UnboxedTuples , UnliftedFFITypes # GHCForeignImportPrim, MagicHash, UnboxedTuples, UnliftedFFITypes #-} import GHC.Exts import GHC.Word # NOINLINE test # test :: Word# -> (# Word#, Word# #) test a = (# case W64# a + W64# a of W64# b -> b...
null
https://raw.githubusercontent.com/Mathnerd314/stroscot/56514ad095b6e7ff1cafa04ef94710cd045cff6b/src/build/hash/XXHash.hs
haskell
# LANGUAGE ForeignFunctionInterface , GHCForeignImportPrim , MagicHash , UnboxedTuples , UnliftedFFITypes # GHCForeignImportPrim, MagicHash, UnboxedTuples, UnliftedFFITypes #-} import GHC.Exts import GHC.Word # NOINLINE test # test :: Word# -> (# Word#, Word# #) test a = (# case W64# a + W64# a of W64# b -> b...
6d47a2898a4470a8477d9dab14674cf63e6a72af281a46493883f7f05c95cd61
sol/logging-facade
Class.hs
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - deprecations # module System.Logging.Facade.Class where import Control.Monad.Trans.Class import Control.Monad.Trans.Cont import Control.Monad.Trans.Identity import Control.Monad.Trans.Maybe import Control.Monad.Trans.RWS.Laz...
null
https://raw.githubusercontent.com/sol/logging-facade/241eb3f23e65638211682fd3e728e7f643e5e0fc/src/System/Logging/Facade/Class.hs
haskell
| A type class for monads with logging support | Log messages that are produced in the `IO` monad are consumed by the global `LogSink`.
# LANGUAGE CPP # # OPTIONS_GHC -fno - warn - deprecations # module System.Logging.Facade.Class where import Control.Monad.Trans.Class import Control.Monad.Trans.Cont import Control.Monad.Trans.Identity import Control.Monad.Trans.Maybe import Control.Monad.Trans.RWS.Laz...
5a0d0ca770b2147f87538707af5052891be52eef1ea39c9fef45abebbf8b565d
2600hz-archive/whistle
delegate.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/delegate.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ----------------...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is VMware , Inc. Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved . -module(deleg...
73b530855f340c5828931f1d744dd8059b40a8e89e2c987d620663f60ae82cb0
KaroshiBee/weevil
dap_launch_mode.ml
type t = [ | `Launch | `Attach | `AttachForSuspendedLaunch ] [@@deriving show]
null
https://raw.githubusercontent.com/KaroshiBee/weevil/1b166ba053062498c1ec05c885e04fba4ae7d831/lib/dapper/dap_launch_mode.ml
ocaml
type t = [ | `Launch | `Attach | `AttachForSuspendedLaunch ] [@@deriving show]
aa7a07521259dcac705eb13eed61173ce00763d388b66b2db49fd37678216a59
ftovagliari/ocamleditor
scripting.ml
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor 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 y...
null
https://raw.githubusercontent.com/ftovagliari/ocamleditor/79669e14163420170e3e2ebb8da54ebe4e5a3dce/tools/scripting.ml
ocaml
deprecated, use Sys.win32 * run sys_command * Copy file * Remove file * substitute * get_command_output * Main
OCamlEditor Copyright ( C ) 2010 - 2014 This file is part of OCamlEditor . OCamlEditor 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 y...
d48c5ceaf43a8f4724944e7c27c0f7a0aae9d8fa181a840d2be8a495669bd494
binaryage/chromex
network.cljs
(ns chromex.ext.devtools.network (:require-macros [chromex.ext.devtools.network :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-har* [config] (gen-wrap :function ::get-har confi...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/devtools/network.cljs
clojure
-- events -----------------------------------------------------------------------------------------------------------------
(ns chromex.ext.devtools.network (:require-macros [chromex.ext.devtools.network :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-har* [config] (gen-wrap :function ::get-har confi...
ea682663a54cac4478a2e85fe25a65e6bea7cf044461be409d432590a8fe600c
gklijs/bkes-demo
templates.cljs
(ns nl.openweb.bank.templates (:require [clojure.string :as string] [nl.openweb.bank.events :as events] [nl.openweb.bank.routes :as routes] [re-frame.core :as re-frame] [re-graph.core :as re-graph])) (defn navbar-item [nav selected-nav] [:a.navbar-item ...
null
https://raw.githubusercontent.com/gklijs/bkes-demo/43d78683b41c2c8a1d06ab9fe4e6bea0c67cf16b/frontend/src/cljs/nl/openweb/bank/templates.cljs
clojure
(ns nl.openweb.bank.templates (:require [clojure.string :as string] [nl.openweb.bank.events :as events] [nl.openweb.bank.routes :as routes] [re-frame.core :as re-frame] [re-graph.core :as re-graph])) (defn navbar-item [nav selected-nav] [:a.navbar-item ...
643bb5610e731f747fca6c9ea04cb5b85881afbcd99ee4911c3c375f225bcb36
bos/rwh
URLParser.hs
# LANGUAGE FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , TypeSynonymInstances # MultiParamTypeClasses, TypeSynonymInstances #-} module URLParser ( URLParser , end , part , (/>) , (</) , (*/) ) where import ApplicativeParsec type URLParser a = CharPar...
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch27/URLParser.hs
haskell
# LANGUAGE FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , TypeSynonymInstances # MultiParamTypeClasses, TypeSynonymInstances #-} module URLParser ( URLParser , end , part , (/>) , (</) , (*/) ) where import ApplicativeParsec type URLParser a = CharPar...
c7e416019c8f068217992ffeed319819ce3aff189ea47e8ffa69ce50de7f25fb
2600hz/kazoo
kzd_temporal_rules.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_temporal_rules.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kzd_temporal_rules). -export([new/0]). -export([cycle/1, cycle/2, set_cycle/2]). -export([days/1, days/2,...
23dc4e63445711715f9da1de4d0e7701eb662c60552cb65c76f04057343efdbb
jrh13/hol-light
fusion.ml
(* ========================================================================= *) kernel of types , terms and theorems . (* *) , University of Cambridge Computer Laboratory (* ...
null
https://raw.githubusercontent.com/jrh13/hol-light/cc46ff318e34c0ed4db4639b76b69eaa37d3af6e/fusion.ml
ocaml
========================================================================= ========================================================================= ---------------...
kernel of types , terms and theorems . , University of Cambridge Computer Laboratory ( c ) Copyright , University of Cambridge 1998 ( c ) Copyright , 1998 - 2007 needs "lib.ml";; module type Hol_k...
b82d225f323abab1ebffca44e28d0341906c4c2b3e83c5badc347595b90aefb3
libguestfs/virt-v2v
input_vddk.ml
helper - v2v - input * Copyright ( C ) 2009 - 2021 Red Hat Inc. * * This program 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 2 of the License , or * ( at your option ) ...
null
https://raw.githubusercontent.com/libguestfs/virt-v2v/d2b01e487ff4ef56d139a5e0f22efd9b2ed9b64c/input/input_vddk.ml
ocaml
Check there are no input options we don't understand. * Also removes the "vddk-" prefix from the internal list. Check no option appears more than once. thumbprint is mandatory. Get the guest name. -ic must be set and it must contain a server. This is * enforced by virt-v2v. It probably n...
helper - v2v - input * Copyright ( C ) 2009 - 2021 Red Hat Inc. * * This program 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 2 of the License , or * ( at your option ) ...
eec7fc1f50d009ea5692bb0b0cab92e02bca1f91d341e0efff592309fc4c47bc
keithfancher/kept
File.hs
module File ( expandDirectories, getUniqueFileName, ) where import Data.Text qualified as T import System.Directory (doesDirectoryExist, doesFileExist, listDirectory) import System.FilePath (dropExtension, takeExtension, (</>)) If any in a list of FilePaths is a directory , replace that directory with a l...
null
https://raw.githubusercontent.com/keithfancher/kept/519fed7caf534fd85f48832424e56384cd768657/src/File.hs
haskell
just left alone. Given a directory, get list of all JSON files in that directory. We need to re-add the directory back to each file to make it a valid path: Case-insensitive check on the file extension. Looks silly, but Text handles unicode sanely so is preferred Checks if the given file name already exists. If i...
module File ( expandDirectories, getUniqueFileName, ) where import Data.Text qualified as T import System.Directory (doesDirectoryExist, doesFileExist, listDirectory) import System.FilePath (dropExtension, takeExtension, (</>)) If any in a list of FilePaths is a directory , replace that directory with a l...
8281019305f0227c2984aa037dc08201e40564d35be7846feee9ac2ee93a7c85
helium/plumtree
plumtree_metadata_hashtree.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 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 . You may ob...
null
https://raw.githubusercontent.com/helium/plumtree/3ef02920bd1e31dd8d9b5d9ca88f49639036ad9b/src/plumtree_metadata_hashtree.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 permissio...
Copyright ( c ) 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 -module(...
174c85c4e118a4fc75a3cf2c23908bbb742e6ca7c7ce76ec45a4cef37035c8b8
karamaan/karamaan-opaleye
HaskellDB.hs
module Karamaan.Opaleye.HaskellDB ( SqlInsertReturning (..) , ppInsertReturning ) where import qualified Database.HaskellDB.Sql.Print as P import qualified Database.HaskellDB.Sql as S import qualified Text.PrettyPrint.HughesPJ as PP import Text.PrettyPrint.HughesPJ ((<+>), ($$)) HaskellDB.hs : Stuff ...
null
https://raw.githubusercontent.com/karamaan/karamaan-opaleye/2863dc1dba9ea1e810cb0860a9b8de53f50af354/Karamaan/Opaleye/HaskellDB.hs
haskell
Why oh why?
module Karamaan.Opaleye.HaskellDB ( SqlInsertReturning (..) , ppInsertReturning ) where import qualified Database.HaskellDB.Sql.Print as P import qualified Database.HaskellDB.Sql as S import qualified Text.PrettyPrint.HughesPJ as PP import Text.PrettyPrint.HughesPJ ((<+>), ($$)) HaskellDB.hs : Stuff ...
e8bb5b36c56efd18f34ff2009cf42efe89b59e4088ac4e24aeab1fc3b94044ba
anoma/juvix-circuits
type-op.lisp
(in-package :alu.spec.type-op) (-> kind-of-pirmitive? (spc:type-reference (-> (spc:primitive) boolean)) boolean) (defun kind-of-pirmitive? (ref predicate) (let* ((name-to-lookup (etypecase-of spc:type-reference ref (spc:reference-type (spc:name ref)) (spc:application (spc:name...
null
https://raw.githubusercontent.com/anoma/juvix-circuits/51f8ea2db5b1200c400ff1bc6d5f51249afc0073/src/spec/type-op.lisp
lisp
(in-package :alu.spec.type-op) (-> kind-of-pirmitive? (spc:type-reference (-> (spc:primitive) boolean)) boolean) (defun kind-of-pirmitive? (ref predicate) (let* ((name-to-lookup (etypecase-of spc:type-reference ref (spc:reference-type (spc:name ref)) (spc:application (spc:name...
38dac6c9740adff9dab2f9a84fca8ce0385d63a03671c3c9dba56def017e5b9a
potatosalad/erlang-jose
jose_chacha20_poly1305.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet %%%------------------------------------------------------------------- @author < > 2014 - 2022 , %%% @doc %%% %%% @end Created : 31 May 2016 by < > %%%---------------------------...
null
https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwa/chacha20_poly1305/jose_chacha20_poly1305.erl
erlang
vim: ts=4 sw=4 ft=erlang noet ------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- Types jose_block_encryptor callbacks jose_chacha20_poly1305 callbacks ===================================================================...
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- @author < > 2014 - 2022 , Created : 31 May 2016 by < > -module(jose_chacha20_poly1305). -behaviour(jose_block_encryptor). -type additional_authenticated_data() :: binary(). -type cipher_text() :: binary(). -ty...
3e7dcd86de6bd69a335d39de179ecd85c3440dbfacc2a699206dbdb101c1b01d
cloudant/twig
twig_sup.erl
Copyright 2011 Cloudant % Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the Lice...
null
https://raw.githubusercontent.com/cloudant/twig/70ee1b57087d07b2dd3425965255d796b3357d87/src/twig_sup.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitation...
Copyright 2011 Cloudant Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(twig_sup). -behaviour(supervisor). -export([start_link/0, init/1]). -define(CHILD(I, Type), {I, {I, start_link, []}, perm...
e93c00619e2cd4a58282146aa9b096cfc5c378fedc3c4165e514a5890160d86b
TheLadders/sqlium
sql.clj
(ns org.purefn.sqlium.sql (:require [clojure.string :as str] [clj-time.coerce :as tc] [clj-time.format :as tf] [org.purefn.sqlium.dsl :as dsl])) (def field-split-str "_sqlfield_") (defn- order-rels "Recursion for `dependency-ordered`. Consumers should generally only call the...
null
https://raw.githubusercontent.com/TheLadders/sqlium/1c0bf62109e5268966c60f8a9b0b22ae9474e577/src/org/purefn/sqlium/sql.clj
clojure
Main API functions
(ns org.purefn.sqlium.sql (:require [clojure.string :as str] [clj-time.coerce :as tc] [clj-time.format :as tf] [org.purefn.sqlium.dsl :as dsl])) (def field-split-str "_sqlfield_") (defn- order-rels "Recursion for `dependency-ordered`. Consumers should generally only call the...
7a45a979422b447f92bb505c2cf61df045db498366d9c13d2504d8d6ec7e3390
SamB/coq
bstack.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/lib/bstack.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** - size is the count of elements ac...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * $ Id$ Queues of a give...
e4c55edb29e55877d9b27b3cb39f05a8f500eb9d874fce857ce028b5a6655a39
augustss/djinn
Help.hs
module Help where verboseHelp :: String verboseHelp = "\ \\n\ \\n\ \Djinn commands explained\n\ \========================\n\ \\n\ \<sym> ? <type>\n\ \ Try to find a function of the specified type. Djinn knows about the\n\ \function type, tuples, Either, Maybe, (), and can be given new type\n\ \definitions. (Djinn al...
null
https://raw.githubusercontent.com/augustss/djinn/c2c2e9413593d953c9ce45886cb086b4f97659de/src/Help.hs
haskell
comments.\n\ return and bind in the state monad\n\
module Help where verboseHelp :: String verboseHelp = "\ \\n\ \\n\ \Djinn commands explained\n\ \========================\n\ \\n\ \<sym> ? <type>\n\ \ Try to find a function of the specified type. Djinn knows about the\n\ \function type, tuples, Either, Maybe, (), and can be given new type\n\ \definitions. (Djinn al...
6b42476bdc303800e5f49045f3f05f1f6db71d0bcc4bcfbcd8b8cabe3f100cbf
gwkkwg/cl-graph
test-connected-components.lisp
(in-package #:cl-graph-test) (deftestsuite test-connected-component () ()) ;;; --------------------------------------------------------------------------- (defun make-connected-component-graph-1 () (let ((g (make-container 'graph-container))) (loop for label in '(wk-6-0 wp-5-1 wp-1-2 wp-2-3 wb-1-1 ...
null
https://raw.githubusercontent.com/gwkkwg/cl-graph/3cb786797b24883d784b7350e7372e8b1e743508/unit-tests/test-connected-components.lisp
lisp
--------------------------------------------------------------------------- --------------------------------------------------------------------------- ---------------------------------------------------------------------------
(in-package #:cl-graph-test) (deftestsuite test-connected-component () ()) (defun make-connected-component-graph-1 () (let ((g (make-container 'graph-container))) (loop for label in '(wk-6-0 wp-5-1 wp-1-2 wp-2-3 wb-1-1 wp-4-4 bp-5-6 bk-6-5 bb-5-7 bp-2-4 bp-2-...
1972f33804943bf1f5e979cfa1066ad952c2f3a7aa1241a1f8cb8a6a31638cf8
haskellari/strict
Optics.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE StandaloneDeriving #-} # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno -...
null
https://raw.githubusercontent.com/haskellari/strict/4691acdfbe95dcd49725baec09127fa0077d93ba/strict-optics/src/Data/Strict/Optics.hs
haskell
# LANGUAGE CPP # # LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveGeneric # # LANGUAGE StandaloneDeriving # * Tuple * Either * Maybe * These * Combinators Lazy variants ----------------------------------------------------------------------------- Tuple ----------------------------...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Data.Strict.Optics ( | See instances , in particular for ' Field1 ' and ' Field2 ' type classes . _Left, _Right, _Just, _...
16d6f826f97d45f4908f46d93699967beab0fa21bdc4ccd7443c3a4193686ac3
PacktPublishing/Haskell-High-Performance-Programming
mvar-reserve.hs
-- file: mvar-reserve.hs import Control.Exception (bracket) import Control.Concurrent (forkIO) import Control.Concurrent.MVar printing lock str = bracket (takeMVar lock) (\i -> putMVar lock $! i+1) (\_ -> print str) main = do lock <- newMVar 1 :: IO (MVar Int) forkIO $ printing lock "output a" forkIO...
null
https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter07/mvar-reserve.hs
haskell
file: mvar-reserve.hs
import Control.Exception (bracket) import Control.Concurrent (forkIO) import Control.Concurrent.MVar printing lock str = bracket (takeMVar lock) (\i -> putMVar lock $! i+1) (\_ -> print str) main = do lock <- newMVar 1 :: IO (MVar Int) forkIO $ printing lock "output a" forkIO $ printing lock "output ...
4f29fc96c528327224b8e1d57cd6c479f7d9f4c2aa9f02be232fe00bc6fd0646
solita/mnt-teet
comment_commands_test.clj
(ns ^:db teet.comment-commands-test (:require [clojure.test :refer :all] [datomic.client.api :as d] teet.comment.comment-commands [teet.comment.comment-model :as comment-model] teet.project.project-commands [teet.test.utils :as tu] [teet.util.dat...
null
https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/backend/test/teet/comment_commands_test.clj
clojure
Boss invites the external consultant to the project Update activity and set manager Create a task for commenting Edna creates comment with tracking on... ... as can be seen here ... ... but the comment status is untracked Only valid test statuses are allowed Create a new task for multi resolve Create a new tas...
(ns ^:db teet.comment-commands-test (:require [clojure.test :refer :all] [datomic.client.api :as d] teet.comment.comment-commands [teet.comment.comment-model :as comment-model] teet.project.project-commands [teet.test.utils :as tu] [teet.util.dat...
b742a68185e3e153a9ebf4d70b96e1cc1ba2432acf0f7ab5ca136fc6a257e9a2
mooreryan/ocaml_python_bindgen
run.ml
open! Base open Lib open Stdio let () = Py.initialize () let () = print_endline @@ Int.to_string @@ Py.Int.to_int @@ Silly.concat1 ~x:(Py.Int.of_int 1) ~y:(Py.Int.of_int 2) () let () = print_endline @@ Int.to_string @@ Py.Int.to_int @@ Silly.concat2 ~x:(Py.Int.of_int 1) ~y:(Py.Int.of_int 2) () let () = pr...
null
https://raw.githubusercontent.com/mooreryan/ocaml_python_bindgen/59cb99cb5b2f108d57d357d0763c52f38d57bec3/test/raw_pyobjects.t/run.ml
ocaml
open! Base open Lib open Stdio let () = Py.initialize () let () = print_endline @@ Int.to_string @@ Py.Int.to_int @@ Silly.concat1 ~x:(Py.Int.of_int 1) ~y:(Py.Int.of_int 2) () let () = print_endline @@ Int.to_string @@ Py.Int.to_int @@ Silly.concat2 ~x:(Py.Int.of_int 1) ~y:(Py.Int.of_int 2) () let () = pr...
e3b0bde31854472b9db6b31d53792cb634b0792c5b6ea3e31583485b017ff76a
RossMeikleham/Potato-Tool
Main.hs
import qualified Data.ByteString.Lazy as BS import Data.Maybe import System.Environment import Text.Printf import VMU import VMUFile import Operations listFiles :: VMU -> String listFiles vmu = printf titleFormat "" "Name" "Type" "Size" "StartBlock" "Copy...
null
https://raw.githubusercontent.com/RossMeikleham/Potato-Tool/18ebe4a6cad38334ad48ebb695203300a139f9a6/src/Main.hs
haskell
| List all files in the file system | Remove a file from the file system | Inject a Nexus DCI save into the file system | Display options
import qualified Data.ByteString.Lazy as BS import Data.Maybe import System.Environment import Text.Printf import VMU import VMUFile import Operations listFiles :: VMU -> String listFiles vmu = printf titleFormat "" "Name" "Type" "Size" "StartBlock" "Copy...
da616b133f7baea66525562e1b81410a84c09f2a139f96ff46808f2ab09ab992
lopec/LoPEC
chronicler.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2009 , %%% @doc %%% %%% logger holds an API for logging messages on the server. It uses %%% error_logger for info, warning and error messages. Don't use %%% it for debugging messages, if needed a debugging function can b...
null
https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/branches/stable-1/lib/chronicler/src/chronicler.erl
erlang
------------------------------------------------------------------- @doc logger holds an API for logging messages on the server. It uses error_logger for info, warning and error messages. Don't use it for debugging messages, if needed a debugging function can be added to the API later on. Currently no nice forma...
@author < > ( C ) 2009 , Created : 29 Sep 2009 by < > -module(chronicler). -behaviour(gen_server). -include("../include/chroniclerState.hrl"). -export([start_link/0, error/1, info/1, warning/1, debug/1, user_info/1, error/2, info/2, warnin...
8d1b644967aad28a9209f4fa854d6ce19bc41e1a84d6396858d14ffb592049eb
AccelerationNet/buildnode
html-def.lisp
;;;; this code was used to build up the html-tags.lisp file, ;;;; it doesn't have much purpose beyond that. (defun create-html-tags () (with-open-file (str "buildnode/src/html-tags.lisp" :direction :output :if-exists :supersede ) (mapc (lambda (cons) (let ((tag-name (string-downcase (car cons))) (tag-...
null
https://raw.githubusercontent.com/AccelerationNet/buildnode/c614ead94d00795c1a862f344d45aef52e568e2b/src/html-def.lisp
lisp
this code was used to build up the html-tags.lisp file, it doesn't have much purpose beyond that.
(defun create-html-tags () (with-open-file (str "buildnode/src/html-tags.lisp" :direction :output :if-exists :supersede ) (mapc (lambda (cons) (let ((tag-name (string-downcase (car cons))) (tag-doc (string-trim '(#\Space #\Tab #\Newline) (cadr cons)))) (let ((tag-name (subseq tag-name ...
f14ee0513e5cb0b59fbc226140061e58fdbfb0523b033de8af9d33ae1e36f87f
ygmpkk/house
Antialiasing.hs
-------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Antialiasing Copyright : ( c ) 2003 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : por...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Antialiasing.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.Rendering.OpenGL.GL.Antialiasing License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : provisional Portability : portable specs. --------------------------------...
Copyright : ( c ) 2003 This module corresponds to section 3.2 ( Antialiasing ) of the OpenGL 1.4 module Graphics.Rendering.OpenGL.GL.Antialiasing ( sampleBuffers, samples, multisample, subpixelBits ) where import Graphics.Rendering.OpenGL.GL.Capability ( EnableCap(CapMultisample), makeCapability ) im...
3c12045837443dff8079fd83ebf4e37a3edf06122faef4af25efb0bcbb651bc0
Asana/kraken
kraken_tcp_acceptor.erl
%% @doc TCP Acceptor process. The actually handling of the data is delegated %% to a callback module so that this can be shared between different API %% protocol implementations. -module(kraken_tcp_acceptor). %%%----------------------------------------------------------------- %%% Exports %%%-------------------------...
null
https://raw.githubusercontent.com/Asana/kraken/51c7a2e334b6f40d7e3614b991dd3c877a07e6dc/src/kraken_tcp_acceptor.erl
erlang
@doc TCP Acceptor process. The actually handling of the data is delegated to a callback module so that this can be shared between different API protocol implementations. ----------------------------------------------------------------- Exports ----------------------------------------------------------------- API -...
-module(kraken_tcp_acceptor). -export([start_link/3, init/3]). Time idle clients out after 1 hour by default . -define(IDLE_TIMEOUT_MS, 1000 * 60 * 60). start_link(TcpServer, ListenSocket, Module) -> proc_lib:spawn_link(?MODULE, init, [TcpServer, ListenSocket, Module]). init(TcpServer, ListenSocket, Module)...
d95581820f9ffd73738edefc8a698e9476ed1b67b3f080d6c0802e503459f7bf
wpfjtmwls/TensorFlOcaml
tfnode.ml
Defines the model of a computational graph node , which are the nodes within the computational graph that you define . The model is defined as a .ml file solely so that the types and definitions are exposed easily to the other parts of Tensorflowcaml . NODE DEFINITION The nodes are defined as a...
null
https://raw.githubusercontent.com/wpfjtmwls/TensorFlOcaml/aa08d5da1f622e40dc0002e3879aab70b928e132/tfnode.ml
ocaml
Type definitions Dimensions of the node matrix Node operations The specific node type Definition of the logger record Definition of the logger. If Helper function. Convert dimension to string Helper function. Convert Arr.shape to string Return true iff n.size matches the shape of ar Updates the node ...
Defines the model of a computational graph node , which are the nodes within the computational graph that you define . The model is defined as a .ml file solely so that the types and definitions are exposed easily to the other parts of Tensorflowcaml . NODE DEFINITION The nodes are defined as a...
d41ab133e9b126914c08539ca2ac6053f660a8436cfb5a30c180f52b54ea137c
pupeno/to-jdbc-uri
core_test.clj
Copyright © 2015 Carousel Apps , Ltd (ns to-jdbc-uri.core-test (:require [clojure.test :refer :all] [to-jdbc-uri.core :refer :all])) (deftest to-jdbc-uri-test (testing "Already JDBC URIs are left alone" (is (= (to-jdbc-uri "jdbc:postgresql:3306/dbname?user=username&password=password") ...
null
https://raw.githubusercontent.com/pupeno/to-jdbc-uri/059885e6fd0c877a3f96b8ed20fd18b7eaffca69/test/to_jdbc_uri/core_test.clj
clojure
Copyright © 2015 Carousel Apps , Ltd (ns to-jdbc-uri.core-test (:require [clojure.test :refer :all] [to-jdbc-uri.core :refer :all])) (deftest to-jdbc-uri-test (testing "Already JDBC URIs are left alone" (is (= (to-jdbc-uri "jdbc:postgresql:3306/dbname?user=username&password=password") ...
d6bc5a3ca5a0f5440f44cdc8e9a5fbd8bd8f4e6469edd954f146c65d10ea52b5
anoma/juvix
Translation.hs
module Juvix.Compiler.Backend.C.Translation ( module Juvix.Compiler.Backend.C.Translation.FromInternal, module Juvix.Compiler.Backend.C.Translation.FromReg, ) where import Juvix.Compiler.Backend.C.Translation.FromInternal import Juvix.Compiler.Backend.C.Translation.FromReg
null
https://raw.githubusercontent.com/anoma/juvix/f5de5faaefa298b608344766e7376f7e48c430b0/src/Juvix/Compiler/Backend/C/Translation.hs
haskell
module Juvix.Compiler.Backend.C.Translation ( module Juvix.Compiler.Backend.C.Translation.FromInternal, module Juvix.Compiler.Backend.C.Translation.FromReg, ) where import Juvix.Compiler.Backend.C.Translation.FromInternal import Juvix.Compiler.Backend.C.Translation.FromReg
8d1124221f948fbf277978dca0a7e5e171cb74c762cac05a4be1b326b465fb15
hasura/kriti-lang
Kriti.hs
module Kriti ( SerializedError (..), ErrorCode (..), AlexSourcePos (..), ValueExt (..), KritiError (..), renderPretty, runKriti, runKritiBS, runKritiWith, runKritiBSWith, ) where import qualified Data.Aeson as J import Data.Bifunctor (first) import qualified Data.ByteString as B...
null
https://raw.githubusercontent.com/hasura/kriti-lang/b37ad9509c0b666e11ee247f47356c208b50e4ef/src/Kriti.hs
haskell
encoded. | The same as 'runKritiBS' but allows use of a custom function map.
module Kriti ( SerializedError (..), ErrorCode (..), AlexSourcePos (..), ValueExt (..), KritiError (..), renderPretty, runKriti, runKritiBS, runKritiWith, runKritiBSWith, ) where import qualified Data.Aeson as J import Data.Bifunctor (first) import qualified Data.ByteString as B...
40c036df1beeba89eff1808f70008e2d81e81792008fccef46d323a4e3ead31d
apache/couchdb-couch
couch_sup.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/apache/couchdb-couch/21c8d37ac6ee1a7fed1de1f54f95a4d3cd9f5248/src/couch_sup.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_sup). -behaviour(supervisor). -vsn(1). -behaviour(config_listener). -export([ start_link/0, init/1, handle_config_change/5, ...
e4f0b87d4dfc4c7670abc1e073224af3c3052f8e1e447bfdb1587d3abc309d1f
IBM-Watson/kale
retrieve_and_rank.clj
;; ( C ) Copyright IBM Corp. 2016 All Rights Reserved . ;; (ns kale.retrieve-and-rank (:require [kale.watson-service :as ws] [kale.common :refer [fail new-line get-command-msg]] [clojure.string :as str] [cheshire.core :as json] [slingshot.slingshot :refer [try+ throw...
null
https://raw.githubusercontent.com/IBM-Watson/kale/f1c5e312e5db0e3fc01c47dfb965f175b5b0a5b6/src/kale/retrieve_and_rank.clj
clojure
( C ) Copyright IBM Corp. 2016 All Rights Reserved . (ns kale.retrieve-and-rank (:require [kale.watson-service :as ws] [kale.common :refer [fail new-line get-command-msg]] [clojure.string :as str] [cheshire.core :as json] [slingshot.slingshot :refer [try+ throw+]])) ...
03968704d1f3f03d8cbd9e4130b0e5fbbd258d3f393d5680cc5cc6c852624e7f
alfreb/church1936
HaskellNumerals.hs
{- | HaskellNumerals : Church numerals defined outside Lambda-calculus. -} module HaskellNumerals ( numeralH, succH, addH, mulH, expH ) where recurse f 0 x = x recurse f n x = f (recurse f (n-1) x) numeralH n = \x y -> recurse x n y expH x y = numeralH y (numeralH x) multiplyH = (.) successorH c a b = a (c a b)...
null
https://raw.githubusercontent.com/alfreb/church1936/f9cb8b485da4bc8006656fa7776ba56d86e99866/src/HaskellNumerals.hs
haskell
| HaskellNumerals : Church numerals defined outside Lambda-calculus.
module HaskellNumerals ( numeralH, succH, addH, mulH, expH ) where recurse f 0 x = x recurse f n x = f (recurse f (n-1) x) numeralH n = \x y -> recurse x n y expH x y = numeralH y (numeralH x) multiplyH = (.) successorH c a b = a (c a b) addH_church33 n m = n successorH m addH_rosser35 a b c d = a c (b c d) su...
485df109f509d9fe24bf448bfd1cb85f75fe48f1d1a0122ced007be629dbcf50
slagyr/joodo
context.clj
(ns joodo.test-view.context (:use [joodo.views]))
null
https://raw.githubusercontent.com/slagyr/joodo/e7edbc707a7901d1a1c5465382dd25db368f4596/joodo/spec/joodo/test_view/context.clj
clojure
(ns joodo.test-view.context (:use [joodo.views]))
6ddaf797a5e50b19ff8ab55f7989b2057ec06f704e11a63be6688f104b9b0b41
yesodweb/yesod
TH.hs
module Yesod.Routes.TH ( module Yesod.Routes.TH.Types -- * Functions , module Yesod.Routes.TH.RenderRoute , module Yesod.Routes.TH.ParseRoute , module Yesod.Routes.TH.RouteAttrs -- ** Dispatch , module Yesod.Routes.TH.Dispatch ) where import Yesod.Routes.TH.Types import Yesod.Routes...
null
https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-core/src/Yesod/Routes/TH.hs
haskell
* Functions ** Dispatch
module Yesod.Routes.TH ( module Yesod.Routes.TH.Types , module Yesod.Routes.TH.RenderRoute , module Yesod.Routes.TH.ParseRoute , module Yesod.Routes.TH.RouteAttrs , module Yesod.Routes.TH.Dispatch ) where import Yesod.Routes.TH.Types import Yesod.Routes.TH.RenderRoute import Yesod.Routes.TH.Par...
41454836ffc5e601e2feae88a6fb4aacb95eabffef9c068d6b3f58bcf7718499
charlieg/Sparser
tokenizer.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- copyright ( c ) 1990 Content Technologies Inc. copyright ( c ) 1992 -- all rights reserved ;;; ;;; File: "tokenizer" ;;; Module: "objects;traces:" Version : 1.0 November 1990 ( v1.5 ) (in-package :sparser) (defpar...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/traces/tokenizer.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*- File: "tokenizer" Module: "objects;traces:"
copyright ( c ) 1990 Content Technologies Inc. copyright ( c ) 1992 -- all rights reserved Version : 1.0 November 1990 ( v1.5 ) (in-package :sparser) (defparameter *trace-next-token* nil) (defparameter *trace-token-&-character-indicies* nil)
e8033184da58748d1eee96fbbd242de0c65d923841a8950bced30cf2f9e612cd
pzque/realword-haskell
Ex3_2.hs
module Ex3_2 where --------------------------------------------------------------------------------------- 1.写一个函数,用来计算一个列表元素的个数.出于测试要求,保证其输出的结果和标准函数 length 保持一致. 2.添加函数的类型签名于你的源文件.出于测试要求,再次加载源文件到ghci. mylen :: [a] -> Int mylen (x:xs) = 1 + (mylen xs) mylen [] = 0 ---------------------------------------------...
null
https://raw.githubusercontent.com/pzque/realword-haskell/1da0188a3293fd417740fe12167eebccef4ba626/exercises/Ex3_2.hs
haskell
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- --------------------------------------------------------------...
module Ex3_2 where 1.写一个函数,用来计算一个列表元素的个数.出于测试要求,保证其输出的结果和标准函数 length 保持一致. 2.添加函数的类型签名于你的源文件.出于测试要求,再次加载源文件到ghci. mylen :: [a] -> Int mylen (x:xs) = 1 + (mylen xs) mylen [] = 0 3.写一个函数,用来计算列表的平均值,即,列表元素的总和除以列表的长度.(你可能需要用到 fromIntegral 函数将列表长度变量从 integer 类型到 float 类型进行转换. ) mysum (x:xs) = x + (mysum xs) mysu...
4cbcd74d0928675afbade8edb3f3d105ed84c767e44f075c767b2e73d7f08b98
WillSewell/pusher-http-haskell
Main.hs
module Main where import Control.Exception (displayException) import qualified Data.HashSet as HS import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Yaml as Y import qualified Network.Pusher as P import qualified Network.Pusher.Protocol as P main :: IO () main = do eitherSettin...
null
https://raw.githubusercontent.com/WillSewell/pusher-http-haskell/393e5d3269095ed3435c5a995bbf2d7ccfe3d80c/example/api/Main.hs
haskell
module Main where import Control.Exception (displayException) import qualified Data.HashSet as HS import qualified Data.Text as T import qualified Data.Text.IO as T import qualified Data.Yaml as Y import qualified Network.Pusher as P import qualified Network.Pusher.Protocol as P main :: IO () main = do eitherSettin...
14433a4739eef0ce61124a213f853fcbdd2c2533eca4c0b37278de9f3765e7fc
tlaitinen/yesod-dsl
GetHandler.hs
# LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module YesodDsl.Generator.GetHandler where import Data.String.Utils (rstrip) import YesodDsl.AST import Text.Shakespeare.Text hiding (toText) import qualified Data.Text as T import Data.List ...
null
https://raw.githubusercontent.com/tlaitinen/yesod-dsl/e248471bc708542dd050d96ac9fde627e9e349ae/YesodDsl/Generator/GetHandler.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE FlexibleInstances # # LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # module YesodDsl.Generator.GetHandler where import Data.String.Utils (rstrip) import YesodDsl.AST import Text.Shakespeare.Text hiding (toText) import qualified Data.Text as T import Data.List import Data.Maybe import YesodDsl.G...
7f29b9dca06bcf5619c8d677506c57842607f083bc286c5aa24bba46e9dcecbe
Clojure2D/clojure2d-examples
material.clj
(ns rt4.in-one-weekend.ch10a.material (:require [rt4.common :as common] [rt4.in-one-weekend.ch10a.ray :as ray] [fastmath.vector :as v] [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol Material...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/in_one_weekend/ch10a/material.clj
clojure
(ns rt4.in-one-weekend.ch10a.material (:require [rt4.common :as common] [rt4.in-one-weekend.ch10a.ray :as ray] [fastmath.vector :as v] [fastmath.core :as m])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defprotocol Material...
32e47fffae0fc17eb59363a15dcb2caf2b84af571f9b5b74a78ba01203e17782
tdbgamer/flink-statefulfun-hs
Main.hs
module Main where import Data.Aeson (FromJSON, ToJSON) import qualified Data.Map as Map import Data.ProtoLens (defMessage, encodeMessage) import Data.Text (Text) import qualified Data.Text as T import GHC.Generics import Lens.Family2 import Network.Flink.Kafka import Network.Flink.Stateful import Network.Wai.Handler.W...
null
https://raw.githubusercontent.com/tdbgamer/flink-statefulfun-hs/702c24987712e8c88897943d8cfe02d864f2aeae/example/greeter/main/Main.hs
haskell
module Main where import Data.Aeson (FromJSON, ToJSON) import qualified Data.Map as Map import Data.ProtoLens (defMessage, encodeMessage) import Data.Text (Text) import qualified Data.Text as T import GHC.Generics import Lens.Family2 import Network.Flink.Kafka import Network.Flink.Stateful import Network.Wai.Handler.W...
957a747eba5ff445d18fc823c91b15219a1d6289f9f0fe84aadd029f0a3d23f0
mstksg/nonempty-containers
NonEmpty.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE PatternSynonyms # # LANGUAGE TupleSections # {-# LANGUAGE ViewPatterns #-} -- | Module : Data . IntSet . NonEmpty -- Copyright : (c) Justin Le 2018 -- License : BSD3 -- Maintainer : -- Stability : experimental -- Portability : non-portable -- = N...
null
https://raw.githubusercontent.com/mstksg/nonempty-containers/ccc4283f48592efe47b41d2f44330cbadfa73e4d/src/Data/IntSet/NonEmpty.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE ViewPatterns # | Copyright : (c) Justin Le 2018 License : BSD3 Stability : experimental Portability : non-portable The 'NEIntSet' type represents a non-empty set of integers. See documentation for 'NEIntSet' for information on how to convert and manipulate ...
# LANGUAGE PatternSynonyms # # LANGUAGE TupleSections # Module : Data . IntSet . NonEmpty Maintainer : = Non - Empty Finite Integer Sets This module essentially re - imports the API of " Data . IntSet " and its ' ' Because ' NEIntSet ' is implemented using ' ' , all of the caveats of using ' ...
98897e1d7db972787d4af3cfef92684de79575c8bf5c3815724ee5cbfbcc7738
MichaelBurge/yxdb-utils
Main.hs
import Test.Framework (defaultMain) import Tests.Data.Binary.C (cBinaryTests) import Tests.Codec.Compression.LZF.ByteString (lzfByteStringTests) import Tests.Database.Alteryx (yxdbTests) main = defaultMain tests tests = [ cBinaryTests, lzfByteStringTests, yxdbTests ]
null
https://raw.githubusercontent.com/MichaelBurge/yxdb-utils/955995a95cf56b7cb3c45e0175e2b574411d1a18/Tests/Main.hs
haskell
import Test.Framework (defaultMain) import Tests.Data.Binary.C (cBinaryTests) import Tests.Codec.Compression.LZF.ByteString (lzfByteStringTests) import Tests.Database.Alteryx (yxdbTests) main = defaultMain tests tests = [ cBinaryTests, lzfByteStringTests, yxdbTests ]
825210b6bf2f02e8f63be64327a9bbb4dcf5cdfd7a1ad2d373dd4c3d9db3140c
ocurrent/ocaml-dockerfile
linux.ml
* Copyright ( c ) 2014 Anil Madhavapeddy < > * * Permission to use , copy , modify , and 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 PROVIDED " AS...
null
https://raw.githubusercontent.com/ocurrent/ocaml-dockerfile/ff2a5ce02d65fbc21f7597d97b11487dd2ff1030/src-opam/linux.ml
ocaml
* RPM rules * Debian rules
* Copyright ( c ) 2014 Anil Madhavapeddy < > * * Permission to use , copy , modify , and 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 PROVIDED " AS...
61d79200a04330b8bc7ab7cf5db590f2a3f047ac9e3d2fe72df7d1cda9a3114a
weblocks-framework/weblocks
gridedit.lisp
(in-package :weblocks-test) ;;; testing create-new-item-widget-gridedit (deftest-html create-new-item-widget-gridedit-1 (let ((weblocks::*presentation-dom-id* "id-123")) (with-request :get nil (render-widget (dataedit-create-n...
null
https://raw.githubusercontent.com/weblocks-framework/weblocks/fe96152458c8eb54d74751b3201db42dafe1708b/test/widgets/gridedit.lisp
lisp
testing create-new-item-widget-gridedit testing gridedit-create-drilldown-widget testing render-widget-body for gridedit click "Add" click "submit" datagrid "Submit" clicked click "Delete" datagrid Drilldown click "submit" datagrid "Drilldown" clicked Submit clicked Drilldown click "Close" datagrid "D...
(in-package :weblocks-test) (deftest-html create-new-item-widget-gridedit-1 (let ((weblocks::*presentation-dom-id* "id-123")) (with-request :get nil (render-widget (dataedit-create-new-item-widget ...
0db20de1714f3a98c5e7df26b9e1cc8273f2be124d17c7f84f712beb6090a856
gwright83/Wheeler
Debug.hs
-- Debug.hs -- -- Display functions calls, arguments and results. -- , 12 June 2011 -- module Math.Symbolic.Wheeler.Debug where import Debug.Trace traceCall :: (Show a, Show b) => String -> (a -> b) -> a -> b traceCall msg fn arg = let retval = fn arg in trace (msg ++ ...
null
https://raw.githubusercontent.com/gwright83/Wheeler/cfc8c66f019de92f087cc8157f2a9be22ae26cf7/src/Math/Symbolic/Wheeler/Debug.hs
haskell
Display functions calls, arguments and results.
Debug.hs , 12 June 2011 module Math.Symbolic.Wheeler.Debug where import Debug.Trace traceCall :: (Show a, Show b) => String -> (a -> b) -> a -> b traceCall msg fn arg = let retval = fn arg in trace (msg ++ " " ++ show arg ++ ...
e124637d14d2af2c877bcb3529174a2fbba77b13d9c336a9e548878b6aeace28
erlang/otp
openssl_mfl_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2020 - 2022 . All Rights Reserved . %% 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 applicab...
null
https://raw.githubusercontent.com/erlang/otp/53ceab1784bbd3a1742f127046c3706817738efa/lib/ssl/test/openssl_mfl_SUITE.erl
erlang
%CopyrightBegin% 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 lan...
Copyright Ericsson AB 2020 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(openssl_mfl_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0, groups/0, ...
a4ce35a1f76f51f682102d3fbe3717c0eecb4ae942ed23b03bbc33a844b71878
patrikja/AFPcourse
NotAFunctor.hs
module NotAFunctor where -- Not a functor type NotAFunctor = Equal newtype Equal a = Equal {runEqual :: a -> a -> Bool} -- Time -> a cofmapEqual :: (b -> a) -> (Equal a -> Equal b) cofmapEqual finv (Equal op) = Equal (\b1 b2 -> op (finv b1) (finv b2) ) -- f :: a -> b -- op :: a ->...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L3/after/src/2015/NotAFunctor.hs
haskell
Not a functor Time -> a f :: a -> b op :: a -> a -> Bool a1, a2 :: a finv :: b -> a Good exercise: -examples-of-not-a-functor-functor-applicative-monad Functor, but not Applicative This is not in general an Applicative for all r.
module NotAFunctor where type NotAFunctor = Equal newtype Equal a = Equal {runEqual :: a -> a -> Bool} cofmapEqual :: (b -> a) -> (Equal a -> Equal b) cofmapEqual finv (Equal op) = Equal (\b1 b2 -> op (finv b1) (finv b2) ) cofmapEqual :: (a -> b) -> Equal b -> Equal a cofmapEqual f (Equal op) = Equ...
e44389569fa8063160b78009b4deb77108fce937bf4476dc77930bc0778ae280
marcoheisig/Typo
packages.lisp
(cl:in-package #:common-lisp-user) (progn (defpackage #:typo (:use #:closer-common-lisp) (:import-from #:trivia #:place #:<> #:access) ;; Handling of Types #1= (:export #:non-nil-symbol #:function-name #:variable-name #:function-designator #:extended-function-designator ...
null
https://raw.githubusercontent.com/marcoheisig/Typo/b16e40099e44e9de464f3a69b4f38bb29c9eff8c/code/packages.lisp
lisp
Handling of Types The Function Database abs.lisp add.lisp array.lisp auxiliary.lisp casts.lisp cmpeq.lisp cmpneq.lisp cmpx.lisp complex.lisp cos.lisp div.lisp log.lisp max.lisp min.lisp sin.lisp sqrt.lisp tan.lisp type-checks.lisp
(cl:in-package #:common-lisp-user) (progn (defpackage #:typo (:use #:closer-common-lisp) (:import-from #:trivia #:place #:<> #:access) #1= (:export #:non-nil-symbol #:function-name #:variable-name #:function-designator #:extended-function-designator #:character-designato...
9c91c1147662cfbb9e10887be6c8ae4669ea496eb75148aaced01c00e39eafbc
haskell-works/hw-dsv
Commands.hs
module App.Commands where import App.Commands.CreateIndex import App.Commands.Generate import App.Commands.IndexWord8s import App.Commands.QueryLazy import App.Commands.QueryStrict import App.Commands.RangeJoin import Options.Applicative HLINT ignore " Monoid law , left identity " commands :: Parser (IO ()) comman...
null
https://raw.githubusercontent.com/haskell-works/hw-dsv/4f1274af383281589165232186f99219479d7898/app/App/Commands.hs
haskell
module App.Commands where import App.Commands.CreateIndex import App.Commands.Generate import App.Commands.IndexWord8s import App.Commands.QueryLazy import App.Commands.QueryStrict import App.Commands.RangeJoin import Options.Applicative HLINT ignore " Monoid law , left identity " commands :: Parser (IO ()) comman...
70b755e240a25c5e137c5ca5efab2cab4918d0dc245cd004dcaf7e6ed99721bb
fujita-y/ypsilon
run-chez.scm
chezscheme run-chez.scm (define warmup #t) (define filename "bench.chez.out") (source-directories '("./gambit-benchmarks")) (define output-port (open-output-string)) (define-syntax time (syntax-rules () ((_ expr) (let ((real-start (real-time)) (cpu-start (cpu-time))) (let ((result (apply (lambda...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/ed117b399ea8153fda9fadc1f731ed03975535ce/bench/run-chez.scm
scheme
chezscheme run-chez.scm (define warmup #t) (define filename "bench.chez.out") (source-directories '("./gambit-benchmarks")) (define output-port (open-output-string)) (define-syntax time (syntax-rules () ((_ expr) (let ((real-start (real-time)) (cpu-start (cpu-time))) (let ((result (apply (lambda...
2bad63228db23c696c172e03be59d8f8fb5b468435056ded3c7634ddbbe82a7b
chrisnc/hvx
Util.hs
module HVX.Internal.Util ( fpequals , infinity , isInteger ) where fpequals :: Double -> Double -> Bool fpequals a b | a == 0 && b == 0 = True | max (abs a) (abs b) < 1e-14 = True | otherwise = abs ( (a - b) / denom) < tolerance where denom = max (abs a) (abs b) tol...
null
https://raw.githubusercontent.com/chrisnc/hvx/4256e83d265c7b6bf9336533c15eae9fecce9a6d/src/HVX/Internal/Util.hs
haskell
module HVX.Internal.Util ( fpequals , infinity , isInteger ) where fpequals :: Double -> Double -> Bool fpequals a b | a == 0 && b == 0 = True | max (abs a) (abs b) < 1e-14 = True | otherwise = abs ( (a - b) / denom) < tolerance where denom = max (abs a) (abs b) tol...
bd970642a95a75b4f2017de726096ba0a4d297ac58ad3c89ea05a5975c6d1119
berkeley-cs164-2021/164-class-compiler
asm.ml
type register = Rax | Rcx | R8 | Rsp | Rbp |Rdi let string_of_register ?(last_byte = false) (reg : register) : string = match (reg, last_byte) with | Rax, false -> "rax" | Rax, true -> "al" | Rcx, false -> "rcx" | Rcx, true -> "cl" | R8, false -> "r8" | R8, true -> "r8...
null
https://raw.githubusercontent.com/berkeley-cs164-2021/164-class-compiler/e8f7b97baf219272a279772b01cd63fee7c899be/asm/asm.ml
ocaml
frontmatter labels actual instructions
type register = Rax | Rcx | R8 | Rsp | Rbp |Rdi let string_of_register ?(last_byte = false) (reg : register) : string = match (reg, last_byte) with | Rax, false -> "rax" | Rax, true -> "al" | Rcx, false -> "rcx" | Rcx, true -> "cl" | R8, false -> "r8" | R8, true -> "r8...
fa546fca823c705d5935435893308d96fb19879d7a5080a629b32174172e9328
haskell-graphql/graphql-api
API.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # {-# LANGUAGE TypeInType #-} # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableI...
null
https://raw.githubusercontent.com/haskell-graphql/graphql-api/8ced344485cd638cee50eeb6b653baecea359406/src/GraphQL/Internal/API.hs
haskell
# LANGUAGE TypeInType # | Exported for testing. $setup >>> :set -XDataKinds -XTypeOperators | Argument operator. Can only be used with 'Field'. someone is an employee, e.g. @ type Company { hasEmployee(employeeName: String!): String! } @ Then we might represent that as: >>> type Company = Object...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # OPTIONS_HADDOCK...
0d5eb661f978809b6d4fc0e8aa343c53118f939574974d011525241451a49d95
haskell/cabal
Var.hs
# LANGUAGE DeriveFunctor # module Distribution.Solver.Modular.Var ( Var(..) , showVar , varPN ) where import Prelude hiding (pi) import Distribution.Solver.Modular.Flag import Distribution.Solver.Types.PackagePath {------------------------------------------------------------------------------- Variables ...
null
https://raw.githubusercontent.com/haskell/cabal/6896c6aa0e4804913aaba0bbbe00649e18f17bb8/cabal-install-solver/src/Distribution/Solver/Modular/Var.hs
haskell
------------------------------------------------------------------------------ Variables ------------------------------------------------------------------------------ | The type of variables that play a role in the solver. Note that the tree currently does not use this type directly, and rather has separate tree ...
# LANGUAGE DeriveFunctor # module Distribution.Solver.Modular.Var ( Var(..) , showVar , varPN ) where import Prelude hiding (pi) import Distribution.Solver.Modular.Flag import Distribution.Solver.Types.PackagePath data Var qpn = P qpn | F (FN qpn) | S (SN qpn) deriving (Eq, Ord, Show, Functor) showVar ...