_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
31a0d4c9a5ba82b09649f9693194b394ab4d80587948c67c432e1f3aea679716
ryanpbrewster/haskell
P117Test.hs
module Problems.P117Test ( case_117_main ) where import Problems.P117 import Test.Tasty.Discover (Assertion, (@?=)) case_117_main :: Assertion case_117_main = solve @?= "100808458960497"
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P117Test.hs
haskell
module Problems.P117Test ( case_117_main ) where import Problems.P117 import Test.Tasty.Discover (Assertion, (@?=)) case_117_main :: Assertion case_117_main = solve @?= "100808458960497"
34312d043a3544a3606b6db77578845a8ddb35a13db5b80052e86d5c2fc725d2
ymilky/franzy-admin
schema.clj
(ns franzy.admin.schema (:require [schema.core :as s] [franzy.common.schema :as fs] [franzy.common.models.schema :as fms])) TODO : implement any schema not in Franzy - Common used for admin ;;TODO: all these schemas need heavy tweaking and stricter definitions, but this is a start (def Repl...
null
https://raw.githubusercontent.com/ymilky/franzy-admin/94588c5ce1b50f4a61b2fb4a4ec4d47568b83287/src/franzy/admin/schema.clj
clojure
TODO: all these schemas need heavy tweaking and stricter definitions, but this is a start
(ns franzy.admin.schema (:require [schema.core :as s] [franzy.common.schema :as fs] [franzy.common.models.schema :as fms])) TODO : implement any schema not in Franzy - Common used for admin (def ReplicaAssignments [fs/SPosInt]) (def Endpoint "Schema for a Kafka endpoint." {(s/require...
f7b980b1c5fb32b2ec6b91352e9b24e613ee441a744393da7b71286e97ca55d7
hypernumbers/hypernumbers
iso639.erl
%%%------------------------------------------------------------------- Created : 9 Mar 2004 by < > Description : ISO 639 2- and 3 - letter codes . %%%------------------------------------------------------------------- -module(iso639). -export([lc2lang/1, all2lang/0, lc3lang/1, all3lang/0]). %%%------------...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/gettext/src/iso639.erl
erlang
------------------------------------------------------------------- ------------------------------------------------------------------- --------------------------------------------------------------------- --------------------------------------------------------------------- ??? lc3lang("ine") -> "Interlingue";
Created : 9 Mar 2004 by < > Description : ISO 639 2- and 3 - letter codes . -module(iso639). -export([lc2lang/1, all2lang/0, lc3lang/1, all3lang/0]). We should only be using 3 - letter codes . However , a couple of languages seems to only have a 2 - letter code . lc3lang("abk") -> "Abkhazian"; lc3lang...
c4a6fc39e2f5abe8975181a4492958991b49f1cda20944b6e3027aba59a35019
sellout/LOOM
printer.lisp
(loom.internals:defpackage printer (:use #:cl) (:export #:copy-pprint-dispatch #:formatter #:pprint-dispatch #:pprint-exit-if-list-exhausted #:pprint-fill #:pprint-linear #:pprint-tabular #:pprint-indent #:pprint-logical-block #:pprint-new...
null
https://raw.githubusercontent.com/sellout/LOOM/b34b0590e82a8ba41ca1e58a8a825dd889285c1d/src/printer.lisp
lisp
(loom.internals:defpackage printer (:use #:cl) (:export #:copy-pprint-dispatch #:formatter #:pprint-dispatch #:pprint-exit-if-list-exhausted #:pprint-fill #:pprint-linear #:pprint-tabular #:pprint-indent #:pprint-logical-block #:pprint-new...
9299a363c0fc98e9899adbd41eaf4347823dda7d2accb99f5070f53a2842f07d
binaryage/chromex
chrome_port.cljs
(ns chromex.chrome-port (:require [chromex.protocols.chrome-port :refer [IChromePort]] [chromex.protocols.chrome-port-state :refer [IChromePortState]] [chromex.support :refer [call-hook get-hook]] [cljs.core.async :refer [chan put!]] [cljs.core.async.impl.protocols :as ...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/lib/chromex/chrome_port.cljs
clojure
-- ChromePort ------------------------------------------------------------------------------------------------------------- wrapping #type-Port -- constructor ------------------------------------------------------------------------------------------------------------
(ns chromex.chrome-port (:require [chromex.protocols.chrome-port :refer [IChromePort]] [chromex.protocols.chrome-port-state :refer [IChromePortState]] [chromex.support :refer [call-hook get-hook]] [cljs.core.async :refer [chan put!]] [cljs.core.async.impl.protocols :as ...
30f45d44f4200666291b6866a21e88ed6843999e73a82400b51e100d1bebf08a
ml4tp/tcoq
constr.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/kernel/constr.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This defines the strategy to use fo...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * File initially created by ...
83a8cc7e0384ea679d3ecd4fce4a3becd962c5004eb890ede6367d5104903ff4
c4-project/c4f
litmus_id.ml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/common/src/litmus_id.ml
ocaml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
2cf21d2b3b3b59e307b01c8891f09c15b2f7ceb78fdcaf2e24aa1c570afe6d50
jashmenn/clover-algorithms
stochastic_hill_climbing.clj
Stochastic Hill Climbingin the Clojure Programming Language by < > Adapted from ' Clever Algorithms ' Project : (ns clover.algorithms.stochastic.stochastic-hill-climbing (:require [clojure.contrib.math :as math])) (defn random-between [min max] (+ min (* (- max min) (Math/random)))) (defn random-bit...
null
https://raw.githubusercontent.com/jashmenn/clover-algorithms/16ae7669958b438bdc288f82e404bc7baedb0c6a/src/clj/clover/algorithms/stochastic/stochastic_hill_climbing.clj
clojure
Stochastic Hill Climbingin the Clojure Programming Language by < > Adapted from ' Clever Algorithms ' Project : (ns clover.algorithms.stochastic.stochastic-hill-climbing (:require [clojure.contrib.math :as math])) (defn random-between [min max] (+ min (* (- max min) (Math/random)))) (defn random-bit...
fef58e6ea1f62c92fd671a398304b5243c6cc6419c7544b1c3e7f56a28836dab
donaldsonjw/bigloo
win32_base.scm
; Win32 API - basic declarations (module win32-base (extern (include "windows.h") ; ***** types ***** (type BYTE uchar "BYTE") (type LPBYTE (pointer BYTE) "LPBYTE") (type LONG long "LONG") (type DWORD ulong "DWORD") (type LPDWORD (pointer DWORD) "LPDWORD") (type LPSTR string "LPSTR") (typ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/pnet2ms/win32_base.scm
scheme
Win32 API - basic declarations ***** types ***** ***** functions ***** ***** FormatMessage flags ***** ***** error codes *****
(module win32-base (extern (include "windows.h") (type BYTE uchar "BYTE") (type LPBYTE (pointer BYTE) "LPBYTE") (type LONG long "LONG") (type DWORD ulong "DWORD") (type LPDWORD (pointer DWORD) "LPDWORD") (type LPSTR string "LPSTR") (type LPCSTR string "LPCSTR") (type LPVOID (pointer void) "...
411f344e9c8ce344d1b1607b19292b6a32790d12029cfa13b5640dd8b5d5cfde
nezavisimost/wgctrl
balancer.clj
(ns wgctrl.cluster.balancer (:require [clojure.core.async :refer [chan timeout go-loop <! >! >!! <!!]] [clojure.core.async.impl.channels :as ch] [clojure.core.async.impl.protocols :as p] [wgctrl.cluster.selectors :as s] [wgctrl.cluster.transforms :as t])) (defn weight...
null
https://raw.githubusercontent.com/nezavisimost/wgctrl/2d5929bfaddcb87f844ea3fe856328376b499536/src/wgctrl/cluster/balancer.clj
clojure
todo - sort nodes by weight
(ns wgctrl.cluster.balancer (:require [clojure.core.async :refer [chan timeout go-loop <! >! >!! <!!]] [clojure.core.async.impl.channels :as ch] [clojure.core.async.impl.protocols :as p] [wgctrl.cluster.selectors :as s] [wgctrl.cluster.transforms :as t])) (defn weight...
e6f40ebb09568d570455b38093a685e4339c9ffacac7767f664a76bdc2d9eb61
ghc/ghc
ExprCtx.hs
# LANGUAGE TupleSections # ----------------------------------------------------------------------------- -- | -- Module : GHC.StgToJS.ExprCtx Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > Luite Stegeman <...
null
https://raw.githubusercontent.com/ghc/ghc/cc25d52e0f65d54c052908c7d91d5946342ab88a/compiler/GHC/StgToJS/ExprCtx.hs
haskell
--------------------------------------------------------------------------- | Module : GHC.StgToJS.ExprCtx License : BSD-style (see the file LICENSE) Stability : experimental TODO: Write my description! --------------------------------------------------------------------------- * Let-no-escape | ...
# LANGUAGE TupleSections # Copyright : ( c ) The University of Glasgow 2001 Maintainer : < > Luite Stegeman < > > < > module GHC.StgToJS.ExprCtx ( ExprCtx , initExprCtx , ctxAssertEvaluated , ctxIsEvaluated , ctxSetSrcSpan , c...
c1acecddae76963300cb9ec4e17c96633f2c9827d2d841845a79d81ceee71411
johnlawrenceaspden/hobby-code
regex.clj
Regular Expressions in Clojure ;; Every time I want to use a regex in clojure I find myself having to ;; learn how to do it again. ;; for some reason the functions just won't stick in my mind. There are six functions starting with re- in clojure.core : (def d (with-out-str (doc re-seq) (doc r...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/regex.clj
clojure
Every time I want to use a regex in clojure I find myself having to learn how to do it again. for some reason the functions just won't stick in my mind. This is probably the function that you want: -> ("find" "find" "find" "find" "find") re-pattern is for making regular expressions out of strings -> #"f.nd" But n...
Regular Expressions in Clojure There are six functions starting with re- in clojure.core : (def d (with-out-str (doc re-seq) (doc re-pattern) (doc re-find) (doc re-groups) (doc re-matcher) (doc re-matches))) (def greek "alpha beta gamma delta epsil...
efd7a9b4cf5c118e50b542c49030ecac2a528f983b53db98706c7ef150691899
christiankissig/ocaml99
problem35.ml
# P35 ( * # # Construct a flat list containing the prime factors in ascending order. # Example: # * (prime-factors 315) # (3 3 5 7)*) let prime_factors n = let rec iterate i n = if ( i * i > n ) then [n] else if ( ( n mod i ) = 0 ) then i :: ( iterate i ( n / i ) ) else iterate ( i + 1 ) n in itera...
null
https://raw.githubusercontent.com/christiankissig/ocaml99/c25f1790f695f9dd68b23abb472dc7c860d840f8/problem35.ml
ocaml
# P35 ( * # # Construct a flat list containing the prime factors in ascending order. # Example: # * (prime-factors 315) # (3 3 5 7)*) let prime_factors n = let rec iterate i n = if ( i * i > n ) then [n] else if ( ( n mod i ) = 0 ) then i :: ( iterate i ( n / i ) ) else iterate ( i + 1 ) n in itera...
8f92de1515114dfb792340abb20e5014ad09918f8f54eed6ec6b5c0c59b32560
billosys/sockets
server.clj
(ns examples.udp.echo-server.server (:require [clojure.core.async :as async] [clojure.java.io :as io] [examples.common :as common] [inet.address :as inet] [sockets.datagram.packet :as packet] [sockets.datagram.socket :as socket])) (defn echo-service "For any in-coming message, simply return...
null
https://raw.githubusercontent.com/billosys/sockets/21a8949c6a0ed8c52ac590753e95354dc4629777/examples/src/examples/udp/echo_server/server.clj
clojure
-)"
(ns examples.udp.echo-server.server (:require [clojure.core.async :as async] [clojure.java.io :as io] [examples.common :as common] [inet.address :as inet] [sockets.datagram.packet :as packet] [sockets.datagram.socket :as socket])) (defn echo-service "For any in-coming message, simply return...
596d858b23cc629623a8e9c14e71855c629002f8844eef818861333d6c0d19d6
BinaryAnalysisPlatform/bap
x86_opcode_stos.ml
open Core_kernel[@@warning "-D"] type stos = [ | `STOSB | `STOSW | `STOSD | `STOSQ ] [@@deriving bin_io, sexp, compare, enumerate]
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/plugins/x86/x86_opcode_stos.ml
ocaml
open Core_kernel[@@warning "-D"] type stos = [ | `STOSB | `STOSW | `STOSD | `STOSQ ] [@@deriving bin_io, sexp, compare, enumerate]
769ffe74ba0e699f608d36b3e6871b17bd7d563523cf5f4345b740cd20b58208
ekmett/algebra
Units.hs
# LANGUAGE ConstrainedClassMethods # module Numeric.Decidable.Units ( DecidableUnits(..) , recipUnitIntegral , recipUnitWhole ) where import Data.Maybe (isJust) import Data.Int import Data.Word import Numeric.Algebra.Class import Numeric.Algebra.Unital import Numeric.Natural import Control.Applicative import ...
null
https://raw.githubusercontent.com/ekmett/algebra/12dd33e848f406dd53d19b69b4f14c93ba6e352b/src/Numeric/Decidable/Units.hs
haskell
# LANGUAGE ConstrainedClassMethods # module Numeric.Decidable.Units ( DecidableUnits(..) , recipUnitIntegral , recipUnitWhole ) where import Data.Maybe (isJust) import Data.Int import Data.Word import Numeric.Algebra.Class import Numeric.Algebra.Unital import Numeric.Natural import Control.Applicative import ...
009e1027ee413bac3b470c68d4d07b8d3d22b425f4cdc1ad6e7cf22af2d53851
dtgoitia/civil-autolisp
_LongitudinalSections.lsp
; TODO: - unify DT : , DT : DrawFoulInvertLevelBoxLine , and DT : DrawOtherInvertLevelBoxLine ; to have a single function to which you pass the distance to the datum as an argument. (defun DT:DrawExtractedManholesOnLongSection ( / ent_name startPoint datum verticalExageration) ; Draw manholes stored in globalVar...
null
https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/_LongitudinalSections.lsp
lisp
TODO: to have a single function to which you pass the distance to the datum as an argument. Draw manholes stored in globalVariableManholesData on a longitudinal section SAVE SETTINGS CHANGE SETTINGS END while END while END while OPERATION - Execute the function END progn END if END if RESTORE SETTINGS v0.1 - ...
- unify DT : , DT : DrawFoulInvertLevelBoxLine , and DT : DrawOtherInvertLevelBoxLine (defun DT:DrawExtractedManholesOnLongSection ( / ent_name startPoint datum verticalExageration) (save_environment (list "osmode" "attdia" "attreq")) (setvar "osmode" 0) (setvar "attdia" 0) (setvar "attreq" 1) (setq ...
b43190a6fe4934f8aa95bb856e66a265ba2bdab232f6e269fde0a8e52e219a14
xapi-project/xenvm
lv_wrapper.ml
type t = Lvm.Lv.t let rpc_of_t x = Rpc.rpc_of_string (Sexplib.Sexp.to_string (Lvm.Lv.sexp_of_t x)) let t_of_rpc rpc = Lvm.Lv.t_of_sexp (Sexplib.Sexp.of_string (Rpc.string_of_rpc rpc))
null
https://raw.githubusercontent.com/xapi-project/xenvm/401754dfb05376b5fc78c9290453b006f6f38aa1/idl/lv_wrapper.ml
ocaml
type t = Lvm.Lv.t let rpc_of_t x = Rpc.rpc_of_string (Sexplib.Sexp.to_string (Lvm.Lv.sexp_of_t x)) let t_of_rpc rpc = Lvm.Lv.t_of_sexp (Sexplib.Sexp.of_string (Rpc.string_of_rpc rpc))
356ad6f089d49f96a983a151991ce1f8ecaee5c3846103909543b7ff799321fc
lambe-lang/compiler
expr.ml
module Render = struct let rec pp ppf = let open Lambe_ast.Expr in function | Variable (n, _) -> Format.fprintf ppf "%s" n | Lambda ("_", e, _) -> Format.fprintf ppf "{ %a }" pp e | Lambda (n, e, _) -> Format.fprintf ppf "{ %s -> %a }" n pp e | Method (e, _) -> Format.fprintf ppf "@{ %a }" pp ...
null
https://raw.githubusercontent.com/lambe-lang/compiler/6dd0718bf34850c7fc9807d019f1a7e375d73714/lib/render/expr.ml
ocaml
module Render = struct let rec pp ppf = let open Lambe_ast.Expr in function | Variable (n, _) -> Format.fprintf ppf "%s" n | Lambda ("_", e, _) -> Format.fprintf ppf "{ %a }" pp e | Lambda (n, e, _) -> Format.fprintf ppf "{ %s -> %a }" n pp e | Method (e, _) -> Format.fprintf ppf "@{ %a }" pp ...
a757ec7095a5e89d52ecbffe127b12e29404e553762ffc150def0dd57a20d740
con-kitty/categorifier-c
DataLayout.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE QuasiQuotes # module Categorifier.C.CTypes.Codegen.DataLayout ( toDataLayoutModule, toDataLayoutFunctionName, -- for TryDataLayouts ) where import Categorifier.C.CTypes.Codegen.Helpers (CStructOrUnion (..)) import Categorifier.C.CTypes...
null
https://raw.githubusercontent.com/con-kitty/categorifier-c/c8796772eaf8d0cbdd1866e927833367b044ed4a/Categorifier/C/CTypes/Codegen/DataLayout.hs
haskell
# LANGUAGE OverloadedStrings # for TryDataLayouts For offsetof. For arrays, all calls are the same because they are called recursively. TODO: this is a nightmare ;) The c version looks like sizeof fakeFieldValue == n * sizeof elemType Can be done but not worth it. | A wrapper for C @sizeof@ expression on a T...
# LANGUAGE PatternSynonyms # # LANGUAGE QuasiQuotes # module Categorifier.C.CTypes.Codegen.DataLayout ( toDataLayoutModule, ) where import Categorifier.C.CTypes.Codegen.Helpers (CStructOrUnion (..)) import Categorifier.C.CTypes.Codegen.Render.Utils ( staticAssert, staticAssertTriviallyCopyable, staticAs...
309a1ad692c3c433876ee1c98ef150913efe0f8df7e70204af40a53332b9adc8
cognitect-labs/day-of-datomic-cloud
log.clj
Copyright ( c ) Cognitect , Inc. All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be...
null
https://raw.githubusercontent.com/cognitect-labs/day-of-datomic-cloud/b1684c8d131942f0451185288ed65bc51ee2b81d/tutorial/log.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) Cognitect , Inc. All rights reserved . (require '[datomic.client.api :as d]) (def client (d/client {:server-type :dev-local :system "datomic-samples"})) (def conn (d/connect client {:db-name "streets"})) (def db (d/db conn)) What do we know about now ? (d/pull db '[*] [...
8290a724e08da6e6673d77e28d506b3d06c88f9804948804e8de8a499b62c3c3
fjames86/ftw
dragdrop.lisp
Copyright ( c ) 2016 < > This code is licensed under the MIT license . (defpackage #:ftw.dragdrop (:use #:cl #:cffi #:ftw) (:export #:dragdrop)) (in-package #:ftw.dragdrop) ;;; We define an empty gui and wait for wm_dropfiles message. ;;; When we receive it we issue a messagebox to display t...
null
https://raw.githubusercontent.com/fjames86/ftw/adcad8a10b31d127643adba37f7c376eb28abf01/examples/dragdrop/dragdrop.lisp
lisp
We define an empty gui and wait for wm_dropfiles message. When we receive it we issue a messagebox to display them ----------- TODO -----------------------
Copyright ( c ) 2016 < > This code is licensed under the MIT license . (defpackage #:ftw.dragdrop (:use #:cl #:cffi #:ftw) (:export #:dragdrop)) (in-package #:ftw.dragdrop) (defwndproc dragdrop-wndproc (hwnd msg wparam lparam) (switch msg ((const +wm-create+) (drag-accept-file...
7f70023934fb1dbec16fded521c04b3d1767ac24a7a97673e2fcdd80fcf1d790
basho/riak_kv
riak_kv_stat.erl
%% ------------------------------------------------------------------- %% %% riak_stat: collect, aggregate, and provide stats about the local node %% Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"...
null
https://raw.githubusercontent.com/basho/riak_kv/fbb53630645e53af053228d526caa3c86f304066/src/riak_kv_stat.erl
erlang
------------------------------------------------------------------- riak_stat: collect, aggregate, and provide stats about the local node 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 ...
Copyright ( c ) 2007 - 2010 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 ...
43b0f4dc53c68be1751f6bd63c4a0b185277b062286aa24f8206436b862644b0
spechub/Hets
Sign.hs
{-# LANGUAGE DeriveDataTypeable #-} | Module : ./THF / Sign.hs Description : Signature for THF Copyright : ( c ) , DFKI Bremen 2011 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable Data structures and function...
null
https://raw.githubusercontent.com/spechub/Hets/bbaa9dd2d2e5eb1f2fd3ec6c799a6dde7dee6da2/THF/Sign.hs
haskell
# LANGUAGE DeriveDataTypeable # ----------------------------------------------------------------------------- Definitions and instances of data structures ----------------------------------------------------------------------------- A signature is a container for types and constants. In addition they are stored in a...
| Module : ./THF / Sign.hs Description : Signature for THF Copyright : ( c ) , DFKI Bremen 2011 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : portable Data structures and functions for thf THF Signatures . Note : ...
f1a9327aac4548a20cf2b5e402ab956c43487f7d1799def35ef41ee4ca454dae
grin-compiler/ghc-wpc-sample-programs
Bounded.hs
-- | -- Module : Basement.Block -- License : BSD-style Maintainer : Haskell Foundation -- Types to represent ℤ/nℤ. -- -- ℤ/nℤ is a finite field and is defined as the set of natural number: { 0 , 1 , ... , n − 1 } . -- # LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE UndecidableInstanc...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/basement-0.0.11/Basement/Bounded.hs
haskell
| Module : Basement.Block License : BSD-style ℤ/nℤ is a finite field and is defined as the set of natural number: | A type level bounded natural backed by a Word64 | Create an element of ℤ/nℤ from a Word64 If the value is greater than n, then the value is normalized by using the integer modulus n ...
Maintainer : Haskell Foundation Types to represent ℤ/nℤ. { 0 , 1 , ... , n − 1 } . # LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE UndecidableInstances # module Basement.Bounded ( Zn64 , unZn64 , Zn , unZn , zn64 , zn , zn64Nat , znNat ) where import ...
4c24041b94da4c6c7b62e3f8294ae38efbb9679359e8b251af74250b2a86c8fb
dgiot/dgiot
dgiot_rule_engine_sup.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. 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 o...
null
https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot/src/rules/dgiot_rule_engine_sup.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd. 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(dgiot_rule_engine_sup). -behaviour(supervisor). -include_lib("emqx_rule_engine/include...
be7fd3e190be0f1a13d64f2348633b2f7c1bbbc49dee07f9ca166522d8e34a1f
orbitz/opass
forms.mli
val password : ?name:string -> ?p:Db.Row.password -> unit -> Editable_form.t val note : ?name:string -> ?n:Db.Row.note -> unit -> Editable_form.t
null
https://raw.githubusercontent.com/orbitz/opass/5b7e3009a67662d98ea0cb69fbdac0c736c69c1d/src/opass/forms.mli
ocaml
val password : ?name:string -> ?p:Db.Row.password -> unit -> Editable_form.t val note : ?name:string -> ?n:Db.Row.note -> unit -> Editable_form.t
4d9fe9f9b8a30c9609e6db3330a85a659096b9605059051bbd98f65f771690fa
brownplt/LambdaS5
dot.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and (* ...
null
https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/ocamlgraph-1.8.1/src/dot.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking * for DO...
8a0818dccb086e4150041b0ab0f67d3839272b2a8197ca59cb3c54ea55e88087
haskell/parsec
Language.hs
{-# LANGUAGE Safe #-} ----------------------------------------------------------------------------- -- | Module : Text . Parsec . Language Copyright : ( c ) 1999 - 2001 , ( c ) 2007 -- License : BSD-style (see the LICENSE file) -- -- Maintainer : -- Stability : provisional Portability...
null
https://raw.githubusercontent.com/haskell/parsec/88cc9e006ddf944da74285471bd7120237d8c191/src/Text/Parsec/Language.hs
haskell
# LANGUAGE Safe # --------------------------------------------------------------------------- | License : BSD-style (see the LICENSE file) Maintainer : Stability : provisional A helper module that defines some language definitions that can be used -----------------------------------------------------...
Module : Text . Parsec . Language Copyright : ( c ) 1999 - 2001 , ( c ) 2007 Portability : non - portable ( uses non - portable module Text . Parsec . Token ) to instantiate a token parser ( see " Text . Parsec . Token " ) . module Text.Parsec.Language ( haskellDef, haskell , mondri...
842b90a9f3a908c795a8d38cffc88e7cc40f00021caca7eb69ce617c0632110f
softlab-ntua/bencherl
class_Oak.erl
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca 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 ) a...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/mock-simulators/ssi-test/src/class_Oak.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the If not, see </>. This file is part of forest ecosystem test case, which is a Sim-Diasca integration test example. The purpose ...
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Sim - Diasca is distributed in the hope tha...
942f6dd4763ef60130cf3426f1d165282966d9ad1324e39d4e20bde9823dbaff
Clozure/ccl-tests
generator.lsp
;-*- Mode: Lisp -*- Author : Created : Fri Jun 6 18:15:50 2003 ;;;; Contains: Generator class and associated generic function definitions (in-package :rctest) (compile-and-load "rctest-util.lsp") (defvar *prototype-class-table* (make-hash-table) "Contains a map from names of classes to prototype i...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/rctest/generator.lsp
lisp
-*- Mode: Lisp -*- Contains: Generator class and associated generic function definitions *prototype-class-table*. Generators are objects that are used to create random instances. Replace POSITION call with a binary search if necessary the generator to return (nil nil).
Author : Created : Fri Jun 6 18:15:50 2003 (in-package :rctest) (compile-and-load "rctest-util.lsp") (defvar *prototype-class-table* (make-hash-table) "Contains a map from names of classes to prototype instances for those classes.") (defgeneric prototype (class) Map a class to a prototype instan...
36035c39bb75d4ab713282976045c7ff1629eca80f2351eaa9761a8e9d9af2ac
hyperfiddle/electric
seven_gui_1_counter.cljc
(ns user.seven-gui-1-counter (:require [hyperfiddle.electric :as e] [hyperfiddle.electric-dom2 :as dom] [hyperfiddle.electric-ui4 :as ui])) ;; #counter (e/defn Counter [] (e/client (let [!state (atom 0)] (dom/p (dom/text (e/watch !state))) (ui/button (e/fn [] (swap! !state inc)) ...
null
https://raw.githubusercontent.com/hyperfiddle/electric/c9c2d8504092d4a034c6f1cb9e85423964e1299c/src-docs/user/seven_gui_1_counter.cljc
clojure
#counter
(ns user.seven-gui-1-counter (:require [hyperfiddle.electric :as e] [hyperfiddle.electric-dom2 :as dom] [hyperfiddle.electric-ui4 :as ui])) (e/defn Counter [] (e/client (let [!state (atom 0)] (dom/p (dom/text (e/watch !state))) (ui/button (e/fn [] (swap! !state inc)) (dom/text ...
ef9d20e93c798fa719e417226b5d01307d012c52fc6a0a8c28df3e22e0a79e59
ocaml-multicore/tezos
baking.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/tezt/tests/baking.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
be2642f9e2e97f052ff33c74b75ce5b07f6b3b20632716f308f2a4cfe8a81527
jepsen-io/jepsen
bank.clj
(ns yugabyte.ysql.bank (:require [clojure.java.jdbc :as j] [clojure.string :as str] [clojure.tools.logging :refer [debug info warn]] [jepsen.client :as client] [jepsen.reconnect :as rc] [yugabyte.ysql.client :as c])) (def table-name "accounts") ; ; Single-...
null
https://raw.githubusercontent.com/jepsen-io/jepsen/a75d5a50dd5fa8d639a622c124bf61253460b754/yugabyte/src/yugabyte/ysql/bank.clj
clojure
Single-table bank test Multi-table bank test
(ns yugabyte.ysql.bank (:require [clojure.java.jdbc :as j] [clojure.string :as str] [clojure.tools.logging :refer [debug info warn]] [jepsen.client :as client] [jepsen.reconnect :as rc] [yugabyte.ysql.client :as c])) (def table-name "accounts") (defn- rea...
ce2154d944d6e4798502db9b44b11ca0d47bd30a2ba9c3ab05139172db45256c
jxv/dino-rush
Title.hs
# LANGUAGE TemplateHaskell # module DinoRush.Scene.Title where import qualified Animate import Control.Lens import Control.Monad (when) import Control.Monad.Reader (MonadReader(..)) import Control.Monad.State (MonadState(..), modify, gets) import KeyState import DinoRush.Config import DinoRush.Effect.Renderer import ...
null
https://raw.githubusercontent.com/jxv/dino-rush/f888bc05fe734ced2c49bec81f9c804b47c81069/library/DinoRush/Scene/Title.hs
haskell
# LANGUAGE TemplateHaskell # module DinoRush.Scene.Title where import qualified Animate import Control.Lens import Control.Monad (when) import Control.Monad.Reader (MonadReader(..)) import Control.Monad.State (MonadState(..), modify, gets) import KeyState import DinoRush.Config import DinoRush.Effect.Renderer import ...
88cbf082e5929455dc92e9f38368b430c73fad804e5e668c6fa17613191b17d7
c-cube/ocaml-avro
parse_print_parse.ml
open Avro_compiler_lib let unwrap_ = function | Ok x -> x | Error e -> failwith e let () = let file = Sys.argv.(1) in Printf.printf "file: %S\n" file; let schema = Schema.parse_file file |> unwrap_ in Printf.printf "parsed schema\n"; let s = Schema.to_string schema in Printf.printf "re-encoded schema...
null
https://raw.githubusercontent.com/c-cube/ocaml-avro/a37639a5fda2848495e9155700bfaf72686fd037/tests/bin/parse_print_parse.ml
ocaml
open Avro_compiler_lib let unwrap_ = function | Ok x -> x | Error e -> failwith e let () = let file = Sys.argv.(1) in Printf.printf "file: %S\n" file; let schema = Schema.parse_file file |> unwrap_ in Printf.printf "parsed schema\n"; let s = Schema.to_string schema in Printf.printf "re-encoded schema...
3433ea9037442e226e95473ecb95165a87225a2b6d2f1df3333b9e7156abb6d3
Elzair/nazghul
scrolls.scm
;; ============================================================================ ;; scrolls.scm -- useable scrolls ;; ============================================================================ (kern-mk-sprite-set 'ss_scrolls 32 32 3 4 0 0 "scrolls.png") (kern-mk-sprite 's_an_tym_scroll ss_scrolls 1 0 #f 0) ...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/scrolls.scm
scheme
============================================================================ scrolls.scm -- useable scrolls ============================================================================ stop time resurrect gate travel kill invisibility clone tremor charm negate unlock magic great heal reveal xray monste...
(kern-mk-sprite-set 'ss_scrolls 32 32 3 4 0 0 "scrolls.png") (define (mk-scroll tag name sprite spell) (mk-usable-item tag name sprite norm (lambda (kscrolltype kuser) (apply spell (list kuser))))) (define (in-wilderness? caster) (let ((place (loc-place (kern-obj-get-lo...
02f2062686eb94b9dcba07c87b7ca0d1e34ade66b2e69b1cacbd8f3847d06713
kyleburton/sandbox
core.clj
(ns mongo-start.core (:require [clojure.tools.nrepl.server :refer [start-server stop-server]] [cider.nrepl :refer [cider-nrepl-handler]] [clojure.tools.logging :as log] [schema.core :as s])) (defonce nrepl-...
null
https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/mongodb/mongo-start/src/mongo_start/core.clj
clojure
(ns mongo-start.core (:require [clojure.tools.nrepl.server :refer [start-server stop-server]] [cider.nrepl :refer [cider-nrepl-handler]] [clojure.tools.logging :as log] [schema.core :as s])) (defonce nrepl-...
7bdd49163992f4589ef703cb0debc11f333972d0ad4593f07ff41e0461d38e88
jamesdabbs/pi-base.hs
Serialization.hs
{-# LANGUAGE TypeSynonymInstances, FlexibleInstances #-} module DB.Serialization ( dump , load ) where import Prelude import Data.Aeson (FromJSON, ToJSON, encode, decode) import qualified Data.ByteString.Lazy as LBS import Data.Text (Text) import Data.Text.Encoding (encodeUtf8, decodeUtf8) import Database.Persist (Pe...
null
https://raw.githubusercontent.com/jamesdabbs/pi-base.hs/1c7cb1f87c6525bd4844842b3f9442634f8dccd3/DB/Serialization.hs
haskell
# LANGUAGE TypeSynonymInstances, FlexibleInstances #
module DB.Serialization ( dump , load ) where import Prelude import Data.Aeson (FromJSON, ToJSON, encode, decode) import qualified Data.ByteString.Lazy as LBS import Data.Text (Text) import Data.Text.Encoding (encodeUtf8, decodeUtf8) import Database.Persist (PersistValue (PersistText), PersistField (..)) dump :: To...
32d0c0034adfa1bacbef16abd9b4f9561904efb6fbd10d32ad63cf33646ca6ff
SimulaVR/godot-haskell
AudioEffectDistortion.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.AudioEffectDistortion (Godot.Core.AudioEffectDistort...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/AudioEffectDistortion.hs
haskell
| Distortion type. | Distortion type. | Distortion type. | Distortion type. # NOINLINE bindAudioEffectDistortion_set_pre_gain #
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.AudioEffectDistortion (Godot.Core.AudioEffectDistort...
ccacb78f02d4a523d3265dee4c33896fa6a6efede8fda73d94f1396daa0a4276
runexec/chp
text-mime-only.clj
(defn text-mime-only [handler] (fn [req] (let [resp (handler req) header "Content-Type" -type (as-> (:headers resp) h (get h header))] (if (re-find #"text/\w+" -type) resp (-> resp (assoc-in [:headers header] "text/plain;") (a...
null
https://raw.githubusercontent.com/runexec/chp/9059399c46fb4106a73631c741f1e557af541a8b/resources/modules/middleware/text-mime-only.clj
clojure
(defn text-mime-only [handler] (fn [req] (let [resp (handler req) header "Content-Type" -type (as-> (:headers resp) h (get h header))] (if (re-find #"text/\w+" -type) resp (-> resp (assoc-in [:headers header] "text/plain;") (a...
a55487c73653a0c925b00dcd6c97d394762141bb821163d26cdefe1731131a00
master/ejabberd
ejabberd_auth_anonymous.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_auth_anonymous.erl Author : < > %%% Purpose : Anonymous feature support in ejabberd Created : 17 Feb 2006 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne %%% %%% This program is free softwa...
null
https://raw.githubusercontent.com/master/ejabberd/9c31874d5a9d1852ece1b8ae70dd4b7e5eef7cf7/src/ejabberd_auth_anonymous.erl
erlang
---------------------------------------------------------------------- File : ejabberd_auth_anonymous.erl Purpose : Anonymous feature support in ejabberd This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that...
Author : < > Created : 17 Feb 2006 by < > ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License Founda...
959d2d533a733e6661383ef7074ccfb2570553b5ad21bc35138473ba974bcb70
yanatan16/fyra
types.cljc
(ns fyra.impl.memory.types (:refer-clojure :exclude [update format]) (:require [clojure.set :as set] [clojure.string :as string] [schema.core :as s] [fyra.impl.memory.util :refer [map-values format]])) (defprotocol WrappedRelation (unwrap-rel [this] "Get the underlying relati...
null
https://raw.githubusercontent.com/yanatan16/fyra/50e7272fd5e704d41cd077fe4c8655584c8ce908/src/fyra/impl/memory/types.cljc
clojure
(ns fyra.impl.memory.types (:refer-clojure :exclude [update format]) (:require [clojure.set :as set] [clojure.string :as string] [schema.core :as s] [fyra.impl.memory.util :refer [map-values format]])) (defprotocol WrappedRelation (unwrap-rel [this] "Get the underlying relati...
ab756524be3a44be2692405f90400897ddd5f6dcaaf1aa3e457d96088db19603
fogfish/oauth2
authorize.erl
-module(authorize). -compile({parse_transform, category}). -compile({parse_transform, generic}). -export([main/1]). %% %% main(Opts) -> {ok, _} = application:ensure_all_started(?MODULE), serverless:spawn(fun api/1, Opts). %% %% -spec api(map()) -> datum:either(map()). api(#{ <<"httpMethod">> := <<"POST">>...
null
https://raw.githubusercontent.com/fogfish/oauth2/f758bf689833aa97947e7740e64cbb9211dfa5c2/apps/authorize/src/authorize.erl
erlang
-module(authorize). -compile({parse_transform, category}). -compile({parse_transform, generic}). -export([main/1]). main(Opts) -> {ok, _} = application:ensure_all_started(?MODULE), serverless:spawn(fun api/1, Opts). -spec api(map()) -> datum:either(map()). api(#{ <<"httpMethod">> := <<"POST">> } = Json) -...
2e51ac2ebb65ce5550491949e3f83f1c5fd8745e3dbe0033d557b6d04c76c4e5
juspay/atlas
ExternalAPI.hs
# LANGUAGE OverloadedLabels # | Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agree...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/driver-offer-bpp/src/ExternalAPI.hs
haskell
# LANGUAGE OverloadedLabels # | Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agree...
7ed31e7fbe5424622b8926bed40240e7ef22982a5a9dfdd6580a34fab4c3ce68
iamFIREcracker/adventofcode
day13.lisp
(defpackage :aoc/2019/13 #.cl-user::*aoc-use*) (in-package :aoc/2019/13) (defparameter *interactive* NIL) (defstruct (game (:constructor make-game%)) program in out screen score) (defun make-game (program) (let* ((program (intcode:make-program (copy-hash-table (intcode:program-memory program))))) (ma...
null
https://raw.githubusercontent.com/iamFIREcracker/adventofcode/c395df5e15657f0b9be6ec555e68dc777b0eb7ab/src/2019/day13.lisp
lisp
(defpackage :aoc/2019/13 #.cl-user::*aoc-use*) (in-package :aoc/2019/13) (defparameter *interactive* NIL) (defstruct (game (:constructor make-game%)) program in out screen score) (defun make-game (program) (let* ((program (intcode:make-program (copy-hash-table (intcode:program-memory program))))) (ma...
8e0361aafa6eb7e0401c63d097d229f2bad5d151a14e29078dd9bf578f4ebdc1
data61/Mirza
Utils.hs
module Mirza.OrgRegistry.Tests.Utils where import Mirza.Common.Utils (readJWK) import Crypto.JOSE (JWK) -- Gets a good PEM RSA key from file to use from test cases. goodRsaPublicKey :: IO (Maybe JWK) goodRsaPublicKey = readJWK "./test/Mirza/Common/TestData/testKeys/goodJWKs/4096bit_rsa_pu...
null
https://raw.githubusercontent.com/data61/Mirza/24e5ccddfc307cceebcc5ce26d35e91020b8ee10/projects/or_scs/test/Mirza/OrgRegistry/Tests/Utils.hs
haskell
Gets a good PEM RSA key from file to use from test cases. Gets a good PEM RSA private key from file to use from test cases.
module Mirza.OrgRegistry.Tests.Utils where import Mirza.Common.Utils (readJWK) import Crypto.JOSE (JWK) goodRsaPublicKey :: IO (Maybe JWK) goodRsaPublicKey = readJWK "./test/Mirza/Common/TestData/testKeys/goodJWKs/4096bit_rsa_pub.json" goodRsaPrivateKey :: IO (Maybe JWK) goodRsaPrivateKe...
f9e27476491ab22c7f5e7294658e69e7649ebe8598e10fda802c63f17ebaf748
hanshuebner/bknr-web
blog.lisp
(in-package :bknr.text) (define-persistent-class blog-article (article rss-item) ((keywords :read :initform nil :index-type hash-list-index) (blog :update :initform nil))) (defmethod rss-item-channel ((article blog-article)) (blog-article-blog article)) (define-persistent-class blog (rss-channel) ((bk...
null
https://raw.githubusercontent.com/hanshuebner/bknr-web/5c30b61818a2f02f6f2e5dc69fd77396ec3afc51/modules/text/blog.lisp
lisp
(in-package :bknr.text) (define-persistent-class blog-article (article rss-item) ((keywords :read :initform nil :index-type hash-list-index) (blog :update :initform nil))) (defmethod rss-item-channel ((article blog-article)) (blog-article-blog article)) (define-persistent-class blog (rss-channel) ((bk...
e0c8a343fc65cf6c0c4f29e04cd3614aaf5ccc1a4631d5c74aecb7da38f3b126
kcsongor/symbols
Ascii.hs
# LANGUAGE TypeOperators # {-# LANGUAGE TypeInType #-} # LANGUAGE UndecidableInstances # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 806 # LANGUAGE NoStarIsType # #endif module Data.Symbol.Ascii ( Head , ToList , ToUpper , ToLowe...
null
https://raw.githubusercontent.com/kcsongor/symbols/48d4a348946b2de7fd9661c8010fc06538623007/src/Data/Symbol/Ascii.hs
haskell
# LANGUAGE TypeInType # ------------------------------------------------------------------------------ | Convert the symbol to uppercase ------------------------------------------------------------------------------ | Convert the symbol to lowercase --------------------------------------------------------------------...
# LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # LANGUAGE CPP # #if __GLASGOW_HASKELL__ >= 806 # LANGUAGE NoStarIsType # #endif module Data.Symbol.Ascii ( Head , ToList , ToUpper , ToLower , ReadNat ) where imp...
866fb748d0aef77e0c013881152eb11bac9b5cb8b15e9c465e4cc73c88d48083
michaelwittig/erlang-q
q_ipcp.erl
%%%----------------------------------------------------------------------------- @author < > %%% @todo decompression of received bytes if they are compressed %%% @doc Implements the Q ipc protocol %%% @end %%%----------------------------------------------------------------------------- -module(q_ipcp). -include(...
null
https://raw.githubusercontent.com/michaelwittig/erlang-q/58e3d81763f378583f84241cf2ba226e820089eb/src/q_ipcp.erl
erlang
----------------------------------------------------------------------------- @todo decompression of received bytes if they are compressed @doc Implements the Q ipc protocol @end ----------------------------------------------------------------------------- API ------------------------------------------------------...
@author < > -module(q_ipcp). -include("global.hrl"). -export([deserialize/1, deserialize_header/1]). -export([serialize/2]). -export([serialize_boolean/1, serialize_booleans/1]). -export([serialize_guid/1, serialize_guids/1]). -export([serialize_byte/1, serialize_bytes/1]). -export([serialize_short/1, serialize_...
ca269850a90a13f063644ed94a7105112f989579b54688ce95d83f3ae07ef0d8
bugczw/Introduction-to-Functional-Programming-in-OCaml
headexc.ml
exception Empty_list;; (* define a head function that uses the exception *) let head = function a::r -> a | [] -> raise Empty_list;; (* let's test *) head ['a';'b'];; head [];;
null
https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W5_ALL/headexc.ml
ocaml
define a head function that uses the exception let's test
exception Empty_list;; let head = function a::r -> a | [] -> raise Empty_list;; head ['a';'b'];; head [];;
e254119571e043753f18e9f67362f02beafab0f5e720c2057c6c040357f39111
Tclv/HaskellBook
PoemLines.hs
module PoemLines where firstSen = "Tyger Tyger, burning bright\n" secondSen = "In the forests of the night\n" thirdSen = "What immortal hand or eye\n" fourthSen = "Could frame thy fearful symmetry?" sentences = firstSen ++ secondSen ++ thirdSen ++ fourthSen myLines :: String -> [String] myLines "" = [] myLines inp ...
null
https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch9/PoemLines.hs
haskell
module PoemLines where firstSen = "Tyger Tyger, burning bright\n" secondSen = "In the forests of the night\n" thirdSen = "What immortal hand or eye\n" fourthSen = "Could frame thy fearful symmetry?" sentences = firstSen ++ secondSen ++ thirdSen ++ fourthSen myLines :: String -> [String] myLines "" = [] myLines inp ...
a9c71bba6f2d978405c74c16e7beb6e93c6c47d4c18d7035782fbf8ff47ce668
lesguillemets/sicp-haskell
1.46.hs
{-# LANGUAGE BangPatterns #-} module OneFortysix where -- $setup -- >>> import Text.Printf iterativeImprove :: (a -> Bool) -> (a -> a) -> a -> a iterativeImprove test improve !guess = if test guess then guess else iterativeImprove test improve (improve guess) -- these constraints for Dou...
null
https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap01/sect3/1.46.hs
haskell
# LANGUAGE BangPatterns # $setup >>> import Text.Printf these constraints for Double come from `threshold` | |
module OneFortysix where iterativeImprove :: (a -> Bool) -> (a -> a) -> a -> a iterativeImprove test improve !guess = if test guess then guess else iterativeImprove test improve (improve guess) sqrt' :: Double -> Double sqrt' x = iterativeImprove closeEnough next 1.0 where cl...
248202479eb1c54e8f6425cb58a4072ffeab08dcf48199a1f9621b231ca8d399
lemmaandrew/CodingBatHaskell
squirrelPlay.hs
From The squirrels in Palo Alto spend most of the day playing . In particular , they play if the temperature is between 60 and 90 ( inclusive ) . Unless it is summer , then the upper limit is 100 instead of 90 . Given an int temperature and a boolean isSummer , return true if the squirrels play and false oth...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Logic-1/squirrelPlay.hs
haskell
From The squirrels in Palo Alto spend most of the day playing . In particular , they play if the temperature is between 60 and 90 ( inclusive ) . Unless it is summer , then the upper limit is 100 instead of 90 . Given an int temperature and a boolean isSummer , return true if the squirrels play and false oth...
f850961f22e5e0ebbb542c0eb8fe5fb292496a4a8f2c651c2a4c06ab9f4c7df1
tomas-abrahamsson/gpb
gpb_tests.erl
Copyright ( C ) 2010 - 2011 %%% Author : < > %%% %%% 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 of the License , or ( at your option ) any later vers...
null
https://raw.githubusercontent.com/tomas-abrahamsson/gpb/5557e3117235b7df70a302c4f18267ec95777803/test/gpb_tests.erl
erlang
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
Copyright ( C ) 2010 - 2011 Author : < > License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston ...
10dfc4478a6bf5f727bec3c85fb0eb0c485ec76f9ec55fa083cddd2567a05676
UBTECH-Walker/WalkerSimulationFor2020WAIC
_package_EcatGetPVT.lisp
(cl:in-package servo_ctrl-srv) (cl:export '(SERVO-VAL SERVO POS-VAL POS VEL-VAL VEL TRQ-VAL TRQ ERRCODE-VAL ERRCODE ))
null
https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_18.04_v1.2_20200616/walker_install/share/common-lisp/ros/servo_ctrl/srv/_package_EcatGetPVT.lisp
lisp
(cl:in-package servo_ctrl-srv) (cl:export '(SERVO-VAL SERVO POS-VAL POS VEL-VAL VEL TRQ-VAL TRQ ERRCODE-VAL ERRCODE ))
229a28ae50affb6babb3e075b8e8ca71d9f5c086137bfb2630f09884d72afe6b
joeyadams/haskell-iocp
recv-bench.hs
{-# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing #-} import Prelude hiding (log) import Control.Concurrent import Control.Monad (forever, void) import Criterion.Main import Network (PortID(..)) import Network.Socket (Family(..), SocketType(..), PortNumber, SockAddr(..),...
null
https://raw.githubusercontent.com/joeyadams/haskell-iocp/67b65759b3d1473770533f782ca7a42131ae2ca7/testing/recv-bench.hs
haskell
# OPTIONS -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing #
import Prelude hiding (log) import Control.Concurrent import Control.Monad (forever, void) import Criterion.Main import Network (PortID(..)) import Network.Socket (Family(..), SocketType(..), PortNumber, SockAddr(..), defaultProtocol, inet_addr) import System.IO i...
3e78a80b698a0c86634e10f3c83710f742cd5938bb9ca86b23e6f9cc81961e7b
zenspider/schemers
exercise.2.31.scm
#lang racket/base (require "../lib/test.rkt") Exercise 2.31 . Abstract your answer to exercise 2.30 to produce a procedure ;; tree-map with the property that square-tree could be defined as ;; ;; (define (square-tree tree) (tree-map square tree)) (define (square n) (* n n)) (define (tree-map f l) (map (lambd...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.31.scm
scheme
tree-map with the property that square-tree could be defined as (define (square-tree tree) (tree-map square tree))
#lang racket/base (require "../lib/test.rkt") Exercise 2.31 . Abstract your answer to exercise 2.30 to produce a procedure (define (square n) (* n n)) (define (tree-map f l) (map (lambda (x) (if (list? x) (tree-map f x) (f x))) l)) (define (square-tree tree) (tree-map square tree)) (assert-equal '() (sq...
e8c3e5a65136f4028855b9cca60f8a98c07f8f4a8d3a1cd4a530c103e0072b22
evrim/core-server
rest.lisp
(in-package :core-server) ;; ------------------------------------------------------------------------- ;; Rest API ;; ------------------------------------------------------------------------- ;; ------------------------------------------------------------------------- ;; Rest+ Meta Class ;; --------------------------...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/web/rest.lisp
lisp
------------------------------------------------------------------------- Rest API ------------------------------------------------------------------------- ------------------------------------------------------------------------- Rest+ Meta Class ------------------------------------------------------------------...
(in-package :core-server) (defclass+ rest+ (component+) ((url :initarg :url) (authenticate :initarg :authenticate :initform nil) (data-class :initarg :data-class :initform nil) (rest-class :initarg :rest-class :initform nil) (prefix :initarg :prefix :initform nil))) (defmethod validate-superclass ((cla...
66c9245b3e3cd223cd42d5d0c8b62a52c4e1ce2bd01698e7b83acb8ce86f5377
input-output-hk/cardano-base
Main.hs
module Main ( main , tests ) where import Test.Tasty import qualified Test.Data.Measure (tests) main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "measures package" [ Test.Data.Measure.tests ]
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/843ad1a6c00d1b9443d83dae059ed5f0b01cc6c9/measures/test/Main.hs
haskell
module Main ( main , tests ) where import Test.Tasty import qualified Test.Data.Measure (tests) main :: IO () main = defaultMain tests tests :: TestTree tests = testGroup "measures package" [ Test.Data.Measure.tests ]
68c5b935682ab8fea7d89065b80a90637c5996914e91e3def704e7645b45efe4
Tener/deeplearning-thesis
main.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoMonomorphismRestriction # # OPTIONS_GHC -fno - warn - orphans # module Main where import Import import Yesod.Default.Config import Yesod.Test import Application (makeFoundation) import HomeTest main :: IO () main = do conf <- loadConfig $ (configSettings Testing) ...
null
https://raw.githubusercontent.com/Tener/deeplearning-thesis/c56866bf6f48db3185b4b62348d292bf39a7a2af/yesod/abaloney/tests/main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoMonomorphismRestriction # # OPTIONS_GHC -fno - warn - orphans # module Main where import Import import Yesod.Default.Config import Yesod.Test import Application (makeFoundation) import HomeTest main :: IO () main = do conf <- loadConfig $ (configSettings Testing) { csParseExtra = parseExtra } f...
2c15034522b67e8af261b194066a5bc948773237e408cfe79cd6a6a4e5dc50fb
google/codeworld
source.hs
Copyright 2020 The CodeWorld Authors . 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 applicable law or agreed to ...
null
https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-compiler/test/testcases/wrongTypeAnnotation/source.hs
haskell
Copyright 2020 The CodeWorld Authors . 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 applicable law or agreed to ...
972ee67cc1fd7433f3d209408acd978d95f1e60b6695c06a6869afb64669b4aa
hachreak/swagger_routerl
swagger_routerl_cowboy_ws_dispatcher_tests.erl
@author < > ( C ) 2016 %%% %%% This software 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) any later version. %%% %%% This software is dist...
null
https://raw.githubusercontent.com/hachreak/swagger_routerl/3005b789f8c09b58894b15fe31ee699630553338/test/swagger_routerl_cowboy_ws_dispatcher_tests.erl
erlang
This software is free software; you can redistribute it and/or License, or (at your option) any later version. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General...
@author < > ( C ) 2016 modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License along with this software ; if not , write to the Free Software Foundation , Inc....
02e6ab41d6f2553984ea698f556cfd494f1ac08cfac381b02b720a19b4361e28
glguy/advent2019
Day24.hs
| Module : Main Description : Day 24 solution Copyright : ( c ) , 2019 License : ISC Maintainer : < > Module : Main Description : Day 24 solution Copyright : (c) Eric Mertens, 2019 License : ISC Maintainer : <> -} module Main (main) where import Advent (getI...
null
https://raw.githubusercontent.com/glguy/advent2019/13f3be89535c12cbae761a6d4165432a2459ccd5/execs/Day24.hs
haskell
| Apply automata rule to set of bug coordinates. around the origin. ---------------------------------------------------------------------- ----------------------------------------------------------------------
| Module : Main Description : Day 24 solution Copyright : ( c ) , 2019 License : ISC Maintainer : < > Module : Main Description : Day 24 solution Copyright : (c) Eric Mertens, 2019 License : ISC Maintainer : <> -} module Main (main) where import Advent (getI...
1c758d4952cc84e2959ecfa2a540481a61022a47c0a6cd75c20416dc6bdae811
HunterYIboHu/htdp2-solution
ex71-game.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex71-game) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section5/ex71-game.rkt
racket
about the language level of this file in a form that our tools can easily process. This program is to test the struct type. run Test
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex71-game) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal #f #t none #f...
19b47939b71810e623ffdaa1c664f223248c5bd7108d0150992e1d87047c869d
haskell-opengl/OpenGLRaw
FramebufferObjectCore.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.ARB.FramebufferObjectCore Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- ----------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ARB/FramebufferObjectCore.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.ARB.FramebufferObjectCore License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums * F...
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.ARB.FramebufferObjectCore ( glGetARBFramebufferObject, gl_ARB_framebuffer_object, pattern GL_COLOR_ATTACHMENT0, pattern GL_COLOR_ATTACHMENT1, pattern GL_COLOR_ATTACHMENT10, pattern GL_COLOR_ATTACHMENT1...
ec8ba473b9991a9378660e3b48fbe8353b80df57322c2f65e0c0156072cc5c74
tud-fop/vanda-haskell
TreesContexts.hs
| Module : . Algorithms . . Parser Description : Implementation of tree contexts for the MAT Learner Copyright : ( c ) Technische Universität Dresden 2015 License : BSD - style Maintainer : < > Stability : unknown Module: Vanda.Algorithms.MATLearner.Parser Description: Impleme...
null
https://raw.githubusercontent.com/tud-fop/vanda-haskell/3214966361b6dbf178155950c94423eee7f9453e/library/Vanda/Algorithms/MATLearner/TreesContexts.hs
haskell
|returns all trees that should be mapped | i.e. the contexts are of the form a(t_1,...,X,...t_n) | return a list of lists with exactly one X in it > [ [ X , t_1,t_2],[t_1,X , t_2],[t_1,t_2,X ] ] * tree funtions | transform the tree into a list in praefix order | transform normal tree into context | insert the t...
| Module : . Algorithms . . Parser Description : Implementation of tree contexts for the MAT Learner Copyright : ( c ) Technische Universität Dresden 2015 License : BSD - style Maintainer : < > Stability : unknown Module: Vanda.Algorithms.MATLearner.Parser Description: Impleme...
1fc7c9737693b0b3e75d7e43eb49f307a6c1f61ebd4e7012fcf4a0d345d32063
eugeneia/athens
expand.lisp
(in-package :cl-user) (defpackage cl-annot.expand (:nicknames :annot.expand) (:use :cl :annot.util :annot.core) (:export :expand-annotation)) (in-package :annot.expand) (defun expand-annotation (annot args) "Expand ANNOT. ARGS will be expanded prior to this form (call-by-value)." (let ((args ...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/cl-annot-20150608-git/src/main/expand.lisp
lisp
(in-package :cl-user) (defpackage cl-annot.expand (:nicknames :annot.expand) (:use :cl :annot.util :annot.core) (:export :expand-annotation)) (in-package :annot.expand) (defun expand-annotation (annot args) "Expand ANNOT. ARGS will be expanded prior to this form (call-by-value)." (let ((args ...
e7eadbc974e2485a87fba8921725eb30a4498476594ab63c470854af18e4663b
charlesneimog/OM-CKN
OM-CKN.lisp
;; by University of São Paulo ( 2021 - 2022 ) (in-package :om) (defun lib-src-file (file) (merge-pathnames file (om-make-pathname :directory *load-pathname*))) (mapcar #'(lambda (file) (compile&load (lib-src-file file) t t)) '( "Sources/Sapa-FFT/fft" ...
null
https://raw.githubusercontent.com/charlesneimog/OM-CKN/cea7174ecd88eb739507052169eb3cb8c5d4d108/OM-CKN.lisp
lisp
"Sources/Utilities/sinusoidal-modeling" "Sources/Score/functions" "Sources/Score/om2music21" "Sources/Python/py" "Sources/Python/vamp"
by University of São Paulo ( 2021 - 2022 ) (in-package :om) (defun lib-src-file (file) (merge-pathnames file (om-make-pathname :directory *load-pathname*))) (mapcar #'(lambda (file) (compile&load (lib-src-file file) t t)) '( "Sources/Sapa-FFT/fft" ...
ec51af4a9b9c93f103387fc32643d08ed8b5343cf3c53b74bed859c9481ffb2f
igarnier/vplot
cmds.ml
open Vlayout Instantiate the Vlayout . Commands functor module Name = struct type t = int let compare (x : int) (y : int) = if x > y then 1 else if x = y then 0 else -1 let pp = Format.pp_print_int end include Commands.Make (Name)
null
https://raw.githubusercontent.com/igarnier/vplot/146467257f110f71d48415fc3ddaf0f46a71035a/lib/cmds.ml
ocaml
open Vlayout Instantiate the Vlayout . Commands functor module Name = struct type t = int let compare (x : int) (y : int) = if x > y then 1 else if x = y then 0 else -1 let pp = Format.pp_print_int end include Commands.Make (Name)
6aeb192970d83ea5b34fbac83ed1d37917dc737e18d87308a979c717df277efb
Ptival/language-ocaml
StructureItem.hs
# LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Language.OCaml.PrettyPrinter.StructureItem ( structureItemPP, ) where import Language.OCaml.Definitions.Parsing.ParseTree ( Payload, StructureItem (pstrDesc), ) import Language.OCaml.PrettyPrinter....
null
https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/PrettyPrinter/StructureItem.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - orphans # module Language.OCaml.PrettyPrinter.StructureItem ( structureItemPP, ) where import Language.OCaml.Definitions.Parsing.ParseTree ( Payload, StructureItem (pstrDesc), ) import Language.OCaml.PrettyPrinter....
da47c8c63287f89c4f623e681ce0ab3d850e4e3328dc3839da1cd2e7da4d66a5
commercialhaskell/stack
Upgrade.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE OverloadedStrings # module Stack.Upgrade ( upgrade , UpgradeOpts , upgradeOpts ) where import qualified Data.Text as T import Options.Applicative ( Parser, flag', help, long, showDefault, strOption, switch , va...
null
https://raw.githubusercontent.com/commercialhaskell/stack/80429690da92c634cb129f99f1507dbc47a70d45/src/Stack/Upgrade.hs
haskell
| Type representing exceptions thrown by functions exported by the ^ force a download, even if the downloaded version is older than what we are ^ specific version to download repo and branch ^ git hash at time of building, if known FIXME It would be far nicer to capture this case in the options parser itself so...
# LANGUAGE NoImplicitPrelude # # LANGUAGE OverloadedStrings # module Stack.Upgrade ( upgrade , UpgradeOpts , upgradeOpts ) where import qualified Data.Text as T import Options.Applicative ( Parser, flag', help, long, showDefault, strOption, switch , va...
eab32b4449b55d359f0f7bd6bf33f808dbac5fca59de4a85b47aee74781769c8
astro/prittorrent
dev.erl
-module(dev). -export([init/0, start_deps/0]). init() -> R1 = add_app_paths("deps") ++ add_app_paths("apps"), R2 = start_deps(), R3 = lists:map(fun application:start/1, [shared, model]), R1 ++ R2 ++ R3. add_app_paths(BaseDir) -> {ok, Filenames} = file:list_dir(BaseDir), lists:map(fun("." ...
null
https://raw.githubusercontent.com/astro/prittorrent/5173eeb8b00fd9ab7c0d347c9e361052023faebd/dev.erl
erlang
-module(dev). -export([init/0, start_deps/0]). init() -> R1 = add_app_paths("deps") ++ add_app_paths("apps"), R2 = start_deps(), R3 = lists:map(fun application:start/1, [shared, model]), R1 ++ R2 ++ R3. add_app_paths(BaseDir) -> {ok, Filenames} = file:list_dir(BaseDir), lists:map(fun("." ...
60fd74825ca6c810378e034eecbf8bca1ff8c3ecbb0d66b6c2eacbcac4d27638
mabragor/cl-yaclyaml
composing.lisp
This file is one of components of CL - YACLYAML system , licenced under GPL , see COPYING for details (in-package #:cl-yaclyaml) ;;; Composing representation graph (defparameter anchors (make-hash-table :test #'equal)) (defun property-node-p (node) (handler-case (assoc :properties node) (error () nil))) (d...
null
https://raw.githubusercontent.com/mabragor/cl-yaclyaml/56b02e3574b00613e5f2cc70a0ffb9d6da76e158/composing.lisp
lisp
Composing representation graph
This file is one of components of CL - YACLYAML system , licenced under GPL , see COPYING for details (in-package #:cl-yaclyaml) (defparameter anchors (make-hash-table :test #'equal)) (defun property-node-p (node) (handler-case (assoc :properties node) (error () nil))) (defun mapping-node-p (node) (eql (...
df7967c395871d789c2bd920c81222adc042f582b32b1812d04ab289ac21a111
cstar/ejabberd-old
idna.erl
%%%---------------------------------------------------------------------- %%% File : idna.erl Author : < > %%% Purpose : Support for IDNA (RFC3490) Created : 10 Apr 2004 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne %%% %%% This program is free software; you can redistribute it an...
null
https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/idna.erl
erlang
---------------------------------------------------------------------- File : idna.erl Purpose : Support for IDNA (RFC3490) This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHO...
Author : < > Created : 10 Apr 2004 by < > ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License Founda...
f0edfb7d16b2cb156c1840e116420b190c6345ff732bb62d52b7b749bf452930
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
ReceivedCreditsResourceStatusTransitions.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} | Contains the types generated from the schema module StripeAPI.Types.ReceivedCreditsResourceStatusTransitions where impo...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/ReceivedCreditsResourceStatusTransitions.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | posted_at: Timestamp describing when the CreditReversal changed status to \`posted\`
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . | Contains the types generated from the schema module StripeAPI.Types.ReceivedCreditsResourceStatusTransitions where import qualified Control.Monad.Fail import qualified Data.Aeson imp...
e6ff0d24966d40d5879b35f8b2b3b5bb9d31ad57ee4acccf7e5d2bc2a4fb4e4a
cubicle-model-checker/cubicle
arith.mli
(**************************************************************************) (* *) Cubicle (* *) ...
null
https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/smt/arith.mli
ocaml
************************************************************************ ...
Cubicle Copyright ( C ) 2011 - 2014 and Universite Paris - Sud 11 This file is distributed under the terms ...
6389f97850af827c47fdb496c642e75bc6ee7ddcf0d05f5141bc66e06a109b41
fetburner/Coq2SML
extrawit.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/parsing/extrawit.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This file defines extra argument ty...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Genarg let ...
7b57828c39a5438f49112257a7d907e8ea89052dd1dc323b1ab1bb28bf137430
spell-music/csound-catalog
Catalog.hs
-- | The implementation of the instruments that I've found in the Csound catalog and collection of Csond - algorithmic composition ( by ) and -- some other sources. -- -- Requirements: -- -- * Library strives for modularity and simplicity. -- * It must be possible to use all instruments live with midi , so the ...
null
https://raw.githubusercontent.com/spell-music/csound-catalog/2a4e12227bd6e27bc0eac05b3465e9a7f1f4bdbf/src/Csound/Catalog.hs
haskell
| The implementation of the instruments that I've found in the Csound catalog some other sources. Requirements: * Library strives for modularity and simplicity.
and collection of Csond - algorithmic composition ( by ) and * It must be possible to use all instruments live with midi , so the function ' Csound.Base.idur ' is forbidden . module Csound.Catalog ( module Csound.Catalog.Drum , module Csound.Catalog.Effect , module Csound.Catalog.Envelope , modul...
38c7d0e9edeb07dd1412bf756bfca37b43678de1d62b5f822d25801c1ee8c0f7
hirokai/PaperServer
NatureCommon.hs
# LANGUAGE QuasiQuotes # -- NatureCommon.hs -- {-# LANGUAGE DoAndIfThenElse #-} module Parser.Publisher.NatureCommon where import Parser.Import import Text.XML.Cursor import Parser.Utils (inner,innert,(<||>)) import qualified Data.Text as T import Control.Applicative ((<|>)) _doi :: ReaderElement' Text _title,...
null
https://raw.githubusercontent.com/hirokai/PaperServer/b577955af08660253d0cd11282cf141d1c174bc0/Parser/Publisher/NatureCommon.hs
haskell
# LANGUAGE DoAndIfThenElse #
# LANGUAGE QuasiQuotes # NatureCommon.hs module Parser.Publisher.NatureCommon where import Parser.Import import Text.XML.Cursor import Parser.Utils (inner,innert,(<||>)) import qualified Data.Text as T import Control.Applicative ((<|>)) _doi :: ReaderElement' Text _title, _journal, _volume, _pageFrom, _pageTo ...
fd4d15f7ca157837aa2eca031c931b32489138e4dc3df30555f098d33ce43bdb
argp/bap
pa_ulex.ml
open Camlp4.PreCast open Syntax let _loc = Loc.ghost (* Named regexp *) let named_regexps = (Hashtbl.create 13 : (string, Ulex.regexp) Hashtbl.t) let () = List.iter (fun (n,c) -> Hashtbl.add named_regexps n (Ulex.chars c)) [ "eof", Cset.eof; "xml_letter", Cset.letter; "xml_digit", Cset.dig...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/libtracewrap/libtrace/piqi/piqi/deps/ulex-1.1/pa_ulex.ml
ocaml
Named regexp Decision tree for partitions Code generation for the automata
open Camlp4.PreCast open Syntax let _loc = Loc.ghost let named_regexps = (Hashtbl.create 13 : (string, Ulex.regexp) Hashtbl.t) let () = List.iter (fun (n,c) -> Hashtbl.add named_regexps n (Ulex.chars c)) [ "eof", Cset.eof; "xml_letter", Cset.letter; "xml_digit", Cset.digit; "xml_exte...
f0d80ad3cfcc5cfb55a389ae5b9774127272d1a1b881d4896143530e8c499bfa
OCamlPro/drom
commandInstall.ml
(**************************************************************************) (* *) Copyright 2020 OCamlPro & Origin Labs (* *) (* All rights ...
null
https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/drom_lib/commandInstall.ml
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2020 OCamlPro & Origin Labs GNU Lesser General Public License version 2.1 , with the special open Ezcmd.V2 open Ez_file.V1 open EzFile.OP let cmd_name = "install" let action ~args ~packages () = if Misc.vendor_packages () <> [] then Error.raise "Cannot in...
e048952359da9c62e56e2f3a38f6a82ef386578a253d1fdfd77612db8d8a8c09
emqx/emqx
emqx_slow_subs_sup.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. 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 o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_slow_subs/src/emqx_slow_subs_sup.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. 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(emqx_slow_subs_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1...
51094150498b7c01d1591fdd904b052ae23f9197d5db93ea72afa496a2f47e1c
aryx/xix
opcode.ml
Operations generated by the compiler . * * Semantic of comments below : * - Arguments on stack ( ... ) * - Arguments in line [ ... ] * - Code in line with jump around { ... } * * alt : type operation = ( ( unit - > unit ) * string ) * * Semantic of comments below: * - Arguments on ...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/shell/opcode.ml
ocaml
[string] (value) (name) (name) Globbing (value?) Variable (name)(val) (name) ??? (name)(val) Functions (name) Process! (args) [addr] While are compiled in jumps (pat, value){...} Boolean return status {...} {...} (file)[fd] (file)[fd] (file)[fd] (file)[fd] [fd] [f...
Operations generated by the compiler . * * Semantic of comments below : * - Arguments on stack ( ... ) * - Arguments in line [ ... ] * - Code in line with jump around { ... } * * alt : type operation = ( ( unit - > unit ) * string ) * * Semantic of comments below: * - Arguments on ...
f32b8db9a4ff1a44fb63703af73aafd191ca38a6e7039dbf2cb38a03da0650c6
datacraft-sciences/confuse
binary_class_metrics_test.clj
(ns confuse.binary-class-metrics-test (:require [confuse.binary-class-metrics :refer :all] [clojure.test :refer [is testing deftest]] [clojure.core.matrix :as m] [clojure.core.matrix.impl.pprint :refer [pm]] [clojure.core.matrix.dataset :as cd] [confuse.util :refer [approx]])) ;;taken from #Worked_...
null
https://raw.githubusercontent.com/datacraft-sciences/confuse/d6c908cde9d5e47aa2b32bb416b352fa44aa72b7/test/confuse/binary_class_metrics_test.clj
clojure
taken from #Worked_example define the positive class
(ns confuse.binary-class-metrics-test (:require [confuse.binary-class-metrics :refer :all] [clojure.test :refer [is testing deftest]] [clojure.core.matrix :as m] [clojure.core.matrix.impl.pprint :refer [pm]] [clojure.core.matrix.dataset :as cd] [confuse.util :refer [approx]])) (def fixt (vec (con...
bc227178a78efcd37fbe3aab8446a2276add646fba749016aba87a9f23860453
modular-macros/ocaml-macros
a.ml
let (a : M.a) = 2
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-missing-cmi/a.ml
ocaml
let (a : M.a) = 2
5d2849d89d2224d6fe57bcfc74e15076de1a0695a2b15d3ad1ccf40251a083a6
Twinside/Eq
Sexpr.hs
module Language.Eq.Renderer.Sexpr( sexprRender, sexprRenderS ) where import Data.Ratio import Language.Eq.Types import Language.Eq.Polynome import Language.Eq.Algorithm.Utils sexprRender :: Formula anyForm -> String sexprRender f = sexprRenderS f "" sexprRenderS :: Formula anyForm -> ShowS sexprRenderS (Formula f) =...
null
https://raw.githubusercontent.com/Twinside/Eq/60105372d55420735b722245db7021c239c812f4/Language/Eq/Renderer/Sexpr.hs
haskell
module Language.Eq.Renderer.Sexpr( sexprRender, sexprRenderS ) where import Data.Ratio import Language.Eq.Types import Language.Eq.Polynome import Language.Eq.Algorithm.Utils sexprRender :: Formula anyForm -> String sexprRender f = sexprRenderS f "" sexprRenderS :: Formula anyForm -> ShowS sexprRenderS (Formula f) =...
95034c711e18e40f3f8af71450c5d7464567c151cee4a4943eed3183d9843879
TorchedSammy/Evergreen.lxl
highlights.scm
[ "default" "enum" "struct" "typedef" "union" "goto" ] @keyword "sizeof" @keyword.operator "return" @keyword.return [ "while" "for" "do" "continue" "break" ] @repeat [ "if" "else" "case" "switch" ] @conditional [ "#if" "#ifdef" "#ifndef" "#else" "#elif" "#endif" (preproc_dir...
null
https://raw.githubusercontent.com/TorchedSammy/Evergreen.lxl/f21857a9594a7a91a433c0ab2c3e0d6a75aee53a/queries/c/highlights.scm
scheme
Make sure the comma operator is given a highlight group after the comma punctuator so the operator is highlighted properly. (escape_sequence) @string.escape Preproc def / undef Fields Parameters this is so sad should be a temporary fix :sob:
[ "default" "enum" "struct" "typedef" "union" "goto" ] @keyword "sizeof" @keyword.operator "return" @keyword.return [ "while" "for" "do" "continue" "break" ] @repeat [ "if" "else" "case" "switch" ] @conditional [ "#if" "#ifdef" "#ifndef" "#else" "#elif" "#endif" (preproc_dir...
55b167431b21268ead0f872091587e8ff40837ef174c9f9cb0f53cc2afd23215
janestreet/bonsai
compose_message.ml
open! Core open! Bonsai_web let build_result send_message (textbox_content, set_textbox_content) = let submit_and_then_clear = Vdom.Effect.Many [ send_message textbox_content; set_textbox_content "" ] in let on_ret = let is_key_ret key = String.equal "Enter" (key##.code |> ...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/open_source/rpc_chat/client/compose_message.ml
ocaml
open! Core open! Bonsai_web let build_result send_message (textbox_content, set_textbox_content) = let submit_and_then_clear = Vdom.Effect.Many [ send_message textbox_content; set_textbox_content "" ] in let on_ret = let is_key_ret key = String.equal "Enter" (key##.code |> ...
c5dbad20a971181c6994d881b04884b89b3498394f75dc567dd133b99631e31b
Elastifile/git-sling
Git.hs
{-# LANGUAGE OverloadedStrings #-} module Sling.Git where import Control.Applicative (optional, (<|>)) import Control.Monad (join, when) import Control.Monad.Except (MonadError (..)) import Data.Maybe (mapMaybe, catMaybes) import Data.Monoid ...
null
https://raw.githubusercontent.com/Elastifile/git-sling/a92f1836910c0a4d8105ca0dff9d1bd08e9bb181/server/src/Sling/Git.hs
haskell
# LANGUAGE OverloadedStrings # todo handle escaping shortenRef :: Ref -> EShell Ref shortenRef = refTraverseHash shortenHash Trying going back to previous branch, if there wasn't any or it was deleted just go to that ref hash shouldn't happen Run git log with trailing '--' to avoid ambiguity between branch and fi...
module Sling.Git where import Control.Applicative (optional, (<|>)) import Control.Monad (join, when) import Control.Monad.Except (MonadError (..)) import Data.Maybe (mapMaybe, catMaybes) import Data.Monoid ((<>)) import ...
c5aaf227e4508c2de39a5fe2a5cc57e5d4c594bd50d168842cfb7a077635a016
openmusic-project/OMChroma
wt-frz.lisp
;***************************************************************************** ;-------| PULS SYSTEM ;-------| This file is: $LLpls/wt-frz.ll -------| Version V1.0 : Aug 19 , 1991 / -------| By -------| Copyright 1991 IRCAM ;***************************************************************************** (in-package :...
null
https://raw.githubusercontent.com/openmusic-project/OMChroma/5ded34f22b59a1a93ea7b87e182c9dbdfa95e047/sources/chroma/pls/wt-frz.lisp
lisp
***************************************************************************** -------| PULS SYSTEM -------| This file is: $LLpls/wt-frz.ll ***************************************************************************** SPECIFICATION AND CONTROL OF A FREEZING ALGORITHM FOR WT OBJECTS MUST BE ASSOCIATED T...
-------| Version V1.0 : Aug 19 , 1991 / -------| By -------| Copyright 1991 IRCAM (in-package :cr) algorithm embedded by the function " freeze " in WTsys.ll . The algorithm was designed and implemented by at IRCAM in 1991 . The algorithm is controlled by two parameters : FRZ - CTL , FRZ - MODE . ...
fa79f49785e1b7c784ca3355343ad6306e5169d56a406e3afb4a22fbeb1fa7c5
ryukzak/nitta
Tests.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} | Module : NITTA.Intermediate . Functions . Accum . Tests Description : Accum function Copyright : ( c ) , 2019 License : : Stability : experimental Module : NITTA.Intermediate.Functions.Accum.Tests Description : Accu...
null
https://raw.githubusercontent.com/ryukzak/nitta/6d5cab0465ff5bcccfe419b8d8553266c530f7b7/test/NITTA/Intermediate/Functions/Accum/Tests.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # | Module : NITTA.Intermediate . Functions . Accum . Tests Description : Accum function Copyright : ( c ) , 2019 License : : Stability : experimental Module : NITTA.Intermediate.Functions.Accum.Tests Description : Accum function Copyright : (c) Daniil...
96dccd3643b5517cac3dd4e13bdd29589c81d862fc74e0eb947223ca1091ebe2
kayceesrk/Quelea
LoadBalancingBroker.hs
{-# LANGUAGE OverloadedStrings #-} module Quelea.NameService.LoadBalancingBroker ( mkNameService, startBroker ) where import qualified System.ZMQ4 as ZMQ4 import System.ZMQ4.Monadic import Control.Concurrent import Control.Monad import Data.ByteString.Char8 (unpack, pack) import System.Directory import System.Pos...
null
https://raw.githubusercontent.com/kayceesrk/Quelea/73db79a5d5513b9aeeb475867a67bacb6a5313d0/src/Quelea/NameService/LoadBalancingBroker.hs
haskell
# LANGUAGE OverloadedStrings # ip Port# Create a router socket and connect with the backend Create a dealer socket, bind it to a local ipc file Start proxy to distribute requests to workers Backend ip (only for sticky) Backend port (only for sticky)
module Quelea.NameService.LoadBalancingBroker ( mkNameService, startBroker ) where import qualified System.ZMQ4 as ZMQ4 import System.ZMQ4.Monadic import Control.Concurrent import Control.Monad import Data.ByteString.Char8 (unpack, pack) import System.Directory import System.Posix.Process import Control.Monad.Tra...
8cb8825a614e551c1dd9159028b09fb42bb90d631db3ed25fc57cc8212c90b67
lascar-pacagi/MiniJava
lmj2mj.mli
(** Transforms an abstract syntax tree with position informations to an abstract syntax tree without position informations. *) (** [translate_program p] gets rid of position informations in [p]. *) val translate_program : LMJ.program -> MJ.program
null
https://raw.githubusercontent.com/lascar-pacagi/MiniJava/9ac4e851667421ea92e9924bc374b4b450387e56/lmj2mj.mli
ocaml
* Transforms an abstract syntax tree with position informations to an abstract syntax tree without position informations. * [translate_program p] gets rid of position informations in [p].
val translate_program : LMJ.program -> MJ.program
1bafae20dca3715ad103b9ec443c2a006c9db5cb4d23fb6f3c7868854b771264
spawnfest/eep49ers
beam_lib_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2020 . 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/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/test/beam_lib_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 1997 - 2020 . 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(beam_lib_SUITE). -ifdef(debug). -define(format(S, A), io:format(S, A)). -define(line, put(line, ?LINE), ). ...
5f21e4960dd51334bd32e5e7f429a8c79beae8e1ba519cbe7f23f6812cb1c980
Gandalf-/coreutils
Wc.hs
{-# LANGUAGE BangPatterns #-} module Coreutils.Wc where -- wc, word count -- -- -l lines -- -w words -- -c chars import Control.Monad import qualified Data.ByteString.Lazy.Char8 as L import Data.List (foldl', transpose) import GHC.Int (Int64) impor...
null
https://raw.githubusercontent.com/Gandalf-/coreutils/59afa0254a40cd6c3a24396340dbd257ba691491/Coreutils/Wc.hs
haskell
# LANGUAGE BangPatterns # wc, word count -l lines -w words -c chars boilerplate ^ parse arguments, do the work sneak default behavior in here main path implementation build a strict accumulation of counts over a lazy iteration of the input ^ accummulate totals from every line in the input stream ^ sum ...
module Coreutils.Wc where import Control.Monad import qualified Data.ByteString.Lazy.Char8 as L import Data.List (foldl', transpose) import GHC.Int (Int64) import System.Console.GetOpt import System.Exit import Coreutils...
31dd1853fe58ef285dbec283a39e7e5e10fb7035b2da86dfb11137ab1cb3afb8
sharplispers/slitch
binary-types-extra.lisp
(in-package binary-types) (export '(define-binary-vector define-binary-bitfield-struct define-unsigned-bitint bitflag binary-vector binary-vector-input-state)) (defun binary-vector-input-state (stream) "Returns two values: the vector being read, and the current input position." (values (cdr stream) (...
null
https://raw.githubusercontent.com/sharplispers/slitch/edd96fde7722ed4ce4678d7041aad69eb0762c9f/src/binary-types-extra.lisp
lisp
---------------------------------------------------------------------- Vectors ---------------------------------------------------------------------- Define the binary type 'bit' ---------------------------------------------------------------------- have to be individually byte aligned. clisp seems to require th...
(in-package binary-types) (export '(define-binary-vector define-binary-bitfield-struct define-unsigned-bitint bitflag binary-vector binary-vector-input-state)) (defun binary-vector-input-state (stream) "Returns two values: the vector being read, and the current input position." (values (cdr stream) (...
6dfa54749493596528aa9187d66f17a62c112506d43336d57230e341754d79a4
wavewave/hxournal
Window.hs
# LANGUAGE ScopedTypeVariables # ----------------------------------------------------------------------------- -- | -- Module : Application.HXournal.ModelAction.Window Copyright : ( c ) 2011 , 2012 -- -- License : BSD3 Maintainer : < > -- Stability : experimental Portability : GHC -- --...
null
https://raw.githubusercontent.com/wavewave/hxournal/b8eb538a2d1a474cc74bc0b5f5c7f251dafe75b9/lib/Application/HXournal/ModelAction/Window.hs
haskell
--------------------------------------------------------------------------- | Module : Application.HXournal.ModelAction.Window License : BSD3 Stability : experimental --------------------------------------------------------------------------- | set frame title according to file name | | only creat...
# LANGUAGE ScopedTypeVariables # Copyright : ( c ) 2011 , 2012 Maintainer : < > Portability : GHC module Application.HXournal.ModelAction.Window where import Application.HXournal.Type.Canvas import Application.HXournal.Type.Event import Application.HXournal.Type.PageArrangement import Application...
644d9b3be561e53433b7de1bb1e414b01321fee0549596b9b59bcb396e3f38bc
rtoy/ansi-cl-tests
streamp.lsp
;-*- Mode: Lisp -*- Author : Created : Sat Jan 17 17:12:38 2004 ;;;; Contains: Tests for STREAMP (in-package :cl-test) (deftest streamp.1 (loop for s in (list *debug-io* *error-output* *query-io* *standard-input* *standard-output* *trace-output* *terminal...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/streamp.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for STREAMP Error tests
Author : Created : Sat Jan 17 17:12:38 2004 (in-package :cl-test) (deftest streamp.1 (loop for s in (list *debug-io* *error-output* *query-io* *standard-input* *standard-output* *trace-output* *terminal-io*) unless (equal (multiple-value-list (notnot-...
3da019e58ce339c9e34953b72a6eb4ec4a2f0b6c07545b2a76f557c5c90a6832
jedimahdi/soltan
RecordErrorFormat.hs
# LANGUAGE UndecidableInstances # module Hokm.Api.Data.Aeson.RecordErrorFormat ( RecordErrorFormat (..) ) where import Data.Aeson ( FromJSON, ToJSON ) import qualified Data.Aeson as Aeson import GHC.Generics ( Rep ) newtype RecordErrorFormat (error :: Type) = RecordErrorFormat error...
null
https://raw.githubusercontent.com/jedimahdi/soltan/bc2f9c040854420b8964ad011205d6a251872fe0/backend/hokm-api/src/Hokm/Api/Data/Aeson/RecordErrorFormat.hs
haskell
# LANGUAGE UndecidableInstances # module Hokm.Api.Data.Aeson.RecordErrorFormat ( RecordErrorFormat (..) ) where import Data.Aeson ( FromJSON, ToJSON ) import qualified Data.Aeson as Aeson import GHC.Generics ( Rep ) newtype RecordErrorFormat (error :: Type) = RecordErrorFormat error...