_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
4a74a0c5e653ea70f367fc453dfe756ff7bfd1f095851342430ccf00907c4771
patricoferris/ocaml-iocp
heap.ml
* Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/patricoferris/ocaml-iocp/7b1f661465acd7ff7c77f013d566182647f626d4/src/heap.ml
ocaml
[extra_data] is for keeping pointers passed to C alive. Free-list allocator Pool of potentially-empty data slots. Invariant: an unfreed pointer [p] into this array is valid iff [free_tail_relation.(p) = slot_taken]. Every slot is free, and all but the last have a free successor. No slot in [free_tail_rel...
* Copyright ( c ) 2021 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
bb60874a218a75d84970bc3168a7449ddef45c21aba9d4793df767500930bd53
backtracking/functory
protocol.mli
(**************************************************************************) (* *) (* Functory: a distributed computing library for OCaml *) Copyright ( C ) 2010- and (* ...
null
https://raw.githubusercontent.com/backtracking/functory/75368305a853a90ebea9e306d82e4ef32649d1ce/protocol.mli
ocaml
************************************************************************ Functory: a distributed computing library for OCaml This software is free soft...
Copyright ( C ) 2010- and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking val set_magic_number : int -> unit exception BadMagicNumber exception BadProtocol module Master : sig type t = | Stop of...
9e295d0b65d9e6f01a4f051fb510f1a2f0bcf9c2aff3c350761dbd16643ac45c
uwplse/oddity
frontend-util.cljs
(ns oddity.frontend-util (:require [goog.string :as gs] [goog.string.format] [alandipert.storage-atom :refer [local-storage]])) (defonce logging-on (local-storage (atom true) :logging)) (defn toggle-logging! [] (swap! logging-on not)) (defn log [& args] (when @logging-on (.log js/cons...
null
https://raw.githubusercontent.com/uwplse/oddity/81c1a6af203a0d8e71138a27655e3c4003357127/oddity/src/cljs/oddity/frontend-util.cljs
clojure
(ns oddity.frontend-util (:require [goog.string :as gs] [goog.string.format] [alandipert.storage-atom :refer [local-storage]])) (defonce logging-on (local-storage (atom true) :logging)) (defn toggle-logging! [] (swap! logging-on not)) (defn log [& args] (when @logging-on (.log js/cons...
bf4d5e5fc421a24541486ac6cb57f3841f01e1e854a0fe34fa4d6a742da80de4
ktakashi/sagittarius-scheme
html.scm
-*- mode : scheme ; coding : utf-8 -*- ;;; ;;; text/markdown/converter/html.scm - Markdown->html converter ;;; Copyright ( c ) 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/46d678da9229eb4f977e00d5f3c4877020d0dd8b/sitelib/text/markdown/converter/html.scm
scheme
coding : utf-8 -*- text/markdown/converter/html.scm - Markdown->html converter Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright ...
Copyright ( c ) 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING #!nounbound (library (text markdown converter html)...
f0be75b09edae0bc9ac7c1ed6c40e111ca9b27a7d21569a5c68c868e99a35021
biegunka/biegunka
RunSpec.hs
{-# LANGUAGE OverloadedStrings #-} module RunSpec (spec) where import Control.Lens import qualified Data.List as List import Data.List.Lens import System.Directory.Layout import Test.Hspec.Lens import Run (find) import SpecHelper (withBiegunkaTempDirectory) ...
null
https://raw.githubusercontent.com/biegunka/biegunka/74fc93326d5f29761125d7047d5418899fa2469d/test/spec/RunSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module RunSpec (spec) where import Control.Lens import qualified Data.List as List import Data.List.Lens import System.Directory.Layout import Test.Hspec.Lens import Run (find) import SpecHelper (withBiegunkaTempDirectory) spec :: Spec spec = describe "f...
0ec40428b03460c2be0ff27782f825c3ece02a3d5cac2dc50fc410218639d463
rmloveland/scheme48-0.53
type-var.scm
Copyright ( c ) 1994 by . See file COPYING . ; Type variables - what a mess (define-record-type uvar (prefix ; a name for debugging (depth) ; lexical depth of the uvar id ; a number (tuple-okay?) ; true if this can be unified with a tuple, set when merged ) ((place ...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/ps-compiler/prescheme/type-var.scm
scheme
Type variables - what a mess a name for debugging lexical depth of the uvar a number true if this can be unified with a tuple, set when merged used in producing type schemes to let the user know where this came from known value of this uvar useful field Could this safely short-circuit the chains? or cause ot...
Copyright ( c ) 1994 by . See file COPYING . (define-record-type uvar ) )) (define-record-discloser type/uvar (lambda (uvar) (list 'uvar (uvar-prefix uvar) (uvar-depth uvar) (uvar-id uvar) (uvar-binding uvar)))) (define (make-uvar prefix depth . maybe-id) (uvar-maker prefix d...
e92ea6df577170b720412047c48c2eb0dd376247cf8da96503047d2a7222f0c9
logicmoo/wam_common_lisp
ibcl-patches.lisp
-*-Mode : LISP ; Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*- ;;; ;;; ************************************************************************* Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . ;;; All rights reserved. ;;; ;;; Use and copying of this software and preparation of d...
null
https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/ibcl-patches.lisp
lisp
Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*- ************************************************************************* All rights reserved. Use and copying of this software and preparation of derivative works based upon this software are permitted. Any distribution of this States export control law...
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation . software or derivative works must comply with all applicable United This software is made available AS IS , and Xerox Corporation makes no CommonLoops Coordinator Xerox PARC 3333 Coyote Hill Rd . Palo Alto , CA 94304 ( o...
2c26de5e922009b96455627631f1d636b1ab0fb07ea3044d69bb5561dcc75188
okuoku/nausicaa
infix.sps
! ;;; ;;;Explanation at: ;;; ;;; <-yard-e.scm> ;;; Original code by : ;;; ;;; <-yard-e.scm> ;;; (import (rnrs) (checks)) (define (shunting-yard expr operands-stack binary-operators-stack) (define (log . args) (when #f (write args) (newline))) (define %precedence-table '((sentinel . 0) ...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/scripts/infix.sps
scheme
Explanation at: <-yard-e.scm> <-yard-e.scm> This consumes the top of the operators stack, and changes the top of the operands stack. Example: expression: (+ a b) before: operators stack (+ sentinel) operands stack (b a) after: operators stack (sentinel) operands stack (+ a b) ^ is right associ...
! Original code by : (import (rnrs) (checks)) (define (shunting-yard expr operands-stack binary-operators-stack) (define (log . args) (when #f (write args) (newline))) (define %precedence-table '((sentinel . 0) (= . 10) (+ . 20) (- . 20) ...
b9dfe421079b9f90c12421392a28a0a091a844064faceaab6fd071a372fa4299
nitrogen/NitrogenProject.com
demos_mobile_panel.erl
% vim: ts=4 sw=4 et -module (demos_mobile_panel). -include_lib ("nitrogen_core/include/wf.hrl"). -compile(export_all). main() -> #template { file="./templates/demosmobile.html" }. title() -> "Mobile Panel". headline() -> "Mobile Panel (toggleable side menu)". panel() -> #mobile_panel{ id=my_menu, ...
null
https://raw.githubusercontent.com/nitrogen/NitrogenProject.com/b4b3a0dbe17394608d2ee6eaa089e3ece1285075/src/demos/demos_mobile_panel.erl
erlang
vim: ts=4 sw=4 et
-module (demos_mobile_panel). -include_lib ("nitrogen_core/include/wf.hrl"). -compile(export_all). main() -> #template { file="./templates/demosmobile.html" }. title() -> "Mobile Panel". headline() -> "Mobile Panel (toggleable side menu)". panel() -> #mobile_panel{ id=my_menu, position=left, ...
cf7156ccfec9c76c93669fd44ab357d1e53b9fbd6fa7f0650c19f00ebf61c761
ghcjs/ghcjs-dom
Comment.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.Comment (js_newComment, newComment, Comment(..), gTypeComment) where import Prelude ((....
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/Comment.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.Comment (js_newComment, newComment, Comment(..), gTypeComment) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, fmap, ...
b86f6c96b060787cb829625d46effd1e6c66fc1785e539a3d7f9b839a28bbcb1
kbdnr/Spednar-code-configuration
helpers.hs
let sc :: [Int] -> Pattern Int sc scale = listToPat scale -- SCALES five notes scales minPent = [0,3,5,7,10] majPent = [0,2,4,7,9] -- another mode of major pentatonic ritusen = [0,2,5,7,9] -- another mode of major pentatonic egyptian = [0,2,5,7,10] -- kumai = [0,2,3,7,9] h...
null
https://raw.githubusercontent.com/kbdnr/Spednar-code-configuration/14aa12b07696a6ee65f63da80de75ab2df308d6d/code/helpers.hs
haskell
SCALES another mode of major pentatonic another mode of major pentatonic hexatonic modes with no tritone raga modes modes of whole tones with added note ->
let sc :: [Int] -> Pattern Int sc scale = listToPat scale five notes scales minPent = [0,3,5,7,10] majPent = [0,2,4,7,9] ritusen = [0,2,5,7,9] egyptian = [0,2,5,7,10] kumai = [0,2,3,7,9] hirajoshi = [0,2,3,7,8] iwato = [0,1,5,6,10] chinese = [0,4,6,7,11] indian = [0,4,5,7,10] ...
0bc4359da8c11aed9fc26f4052af5e6d303c40418bd780e1aa668c4427028a52
synrc/nitro
element_tr.erl
-module(element_tr). -include("nitro.hrl"). -include_lib("nitro/include/event.hrl"). -compile(export_all). render_element(Record) when Record#tr.show_if==false -> [<<>>]; render_element(Record = #tr{postback= Postback}) -> Id = case Record#tr.id of [] -> nitro:temp_id(); I->I end, Cursor = case Postback of [] -> "...
null
https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/table/element_tr.erl
erlang
-module(element_tr). -include("nitro.hrl"). -include_lib("nitro/include/event.hrl"). -compile(export_all). render_element(Record) when Record#tr.show_if==false -> [<<>>]; render_element(Record = #tr{postback= Postback}) -> Id = case Record#tr.id of [] -> nitro:temp_id(); I->I end, Cursor = case Postback of [] -> "...
aef20cbee75252773f580a70b974d1298a95465b45cd6b11412c30b454299e50
plum-umd/c-strider
reachingdefs.ml
Calculate reaching definitions for each instruction . * Determine when it is okay to replace some variables with * expressions . * * After calling computeRDs on a fundec , * ReachingDef.stmtStartData will contain a mapping from * statement ids to data about which definitions reach each * statemen...
null
https://raw.githubusercontent.com/plum-umd/c-strider/3d3a3743bc28456eb6d50e01805ce484ab3c04e6/tools/cil-1.3.7/src/ext/reachingdefs.ml
ocaml
Lookup varinfo in iosh. If the set contains None or is not a singleton, return None, otherwise return Some of the singleton int -> IOS.t -> int option -> int option XXX this function is a performance bottleneck replace an entire set with a singleton. if nothing was there just add the singleton remove d...
Calculate reaching definitions for each instruction . * Determine when it is okay to replace some variables with * expressions . * * After calling computeRDs on a fundec , * ReachingDef.stmtStartData will contain a mapping from * statement ids to data about which definitions reach each * statemen...
dd0e2e7c0df5dbae4f91f153f1e1d079d25a6ec453e39e3ff01756c95ee1a3c4
samply/blaze
cql.clj
(ns blaze.fhir.operation.evaluate-measure.cql (:require [blaze.anomaly :as ba :refer [if-ok when-ok]] [blaze.db.api :as d] [blaze.elm.expression :as expr] [blaze.elm.util :as elm-util] [blaze.fhir.spec :as fhir-spec] [blaze.util :refer [conj-vec]] [clojure.core.reducers :as r] [cognite...
null
https://raw.githubusercontent.com/samply/blaze/948eee38021467fa343c522a644a7fd4b24b6467/modules/operation-measure-evaluate-measure/src/blaze/fhir/operation/evaluate_measure/cql.clj
clojure
only log if the exception hasn't ex-data because exception with ex-data are controlled by us and so are not unexpected
(ns blaze.fhir.operation.evaluate-measure.cql (:require [blaze.anomaly :as ba :refer [if-ok when-ok]] [blaze.db.api :as d] [blaze.elm.expression :as expr] [blaze.elm.util :as elm-util] [blaze.fhir.spec :as fhir-spec] [blaze.util :refer [conj-vec]] [clojure.core.reducers :as r] [cognite...
c8f79d3d92b7b5f6e2c556eb902e6e8f664cdc51352195cc6141d1868f627960
janestreet/vcaml
window.mli
open Core module Type := Nvim_internal.Phantom include module type of struct include Nvim_internal.Window end val get_height : Or_current.t -> int Api_call.Or_error.t val set_height : Or_current.t -> height:int -> unit Api_call.Or_error.t val get_cursor : Or_current.t -> Position.One_indexed_row.t Api_call.Or_error...
null
https://raw.githubusercontent.com/janestreet/vcaml/7a53ff24276ddc3085a9b0b72b1053a6db6936cf/src/window.mli
ocaml
* When [Unload { if_modified = `Abort }] is specified, the buffer will be hidden anyway if ['hidden'] is set, if ['bufhidden'] is ['hide'], or if the [:hide] command modifier is used. If ['confirm'] is set or the [:confirm] command modifier is used, the user will be prompted to see if they want ...
open Core module Type := Nvim_internal.Phantom include module type of struct include Nvim_internal.Window end val get_height : Or_current.t -> int Api_call.Or_error.t val set_height : Or_current.t -> height:int -> unit Api_call.Or_error.t val get_cursor : Or_current.t -> Position.One_indexed_row.t Api_call.Or_error...
fa6feabf643c1d4a81e289d87cc3e1d91e641dbc3f46b0a6680066594f66249c
anuragsoni/poll
kqueue_poll.ml
open! Import type t = { kqueue : Kqueue.t ; eventlist : Kqueue.Event_list.t ; mutable ready_events : int } let backend = Backend.Kqueue let create ?(num_events = 256) () = if num_events < 1 then invalid_arg "Number of events cannot be less than 1"; let eventlist = Kqueue.Event_list.create num_events in ...
null
https://raw.githubusercontent.com/anuragsoni/poll/fc5a98eed478f59c507cabefe072b73fdb633fe8/src/kqueue_poll.ml
ocaml
open! Import type t = { kqueue : Kqueue.t ; eventlist : Kqueue.Event_list.t ; mutable ready_events : int } let backend = Backend.Kqueue let create ?(num_events = 256) () = if num_events < 1 then invalid_arg "Number of events cannot be less than 1"; let eventlist = Kqueue.Event_list.create num_events in ...
6c307c06edce1ea9c704c8b4c878d0194b26ce1e1c94645151f33770b77436b5
ocsigen/js_of_ocaml
js.mli
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
null
https://raw.githubusercontent.com/ocsigen/js_of_ocaml/a2aa561b0c83be5c946336a330a6ed9b553f02ad/lib/js_of_ocaml/js.mli
ocaml
* Javascript binding This module provides types and functions to interoperate with Javascript values, and gives access to Javascript standard objects. * {2 Dealing with [null] and [undefined] values.} * Type of possibly null values. * Type of possibly undefined values. * The [null] value. * Consider a...
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
589157cc63bb98f955be52192f8a38a69c3beab217125d4ec9414cd057e4360b
dysinger/hackamore
test.clj
(ns hackamore.test (:import [org.apache.camel.component.mock MockEndpoint]) (:use [clojure.test] [hackamore.core])) (declare ^:dynamic *ctx*) (defmacro ctx [r & body] `(let [c# (doto (context) (.addRoutes ~r) (.start))] (binding [*ctx* c#] ~@body) (.stop c#))) (defn snd [msg] (-> *ctx* ...
null
https://raw.githubusercontent.com/dysinger/hackamore/e6473004d0527ffc8d11f7d9385c81c733a159d5/test/hackamore/test.clj
clojure
(ns hackamore.test (:import [org.apache.camel.component.mock MockEndpoint]) (:use [clojure.test] [hackamore.core])) (declare ^:dynamic *ctx*) (defmacro ctx [r & body] `(let [c# (doto (context) (.addRoutes ~r) (.start))] (binding [*ctx* c#] ~@body) (.stop c#))) (defn snd [msg] (-> *ctx* ...
8476052858038d12b548b2607ab0c6428e90e2f3e39b4644c7af81aa04c8edee
walkable-server/realworld
article.clj
(ns conduit.boundary.article (:require [clojure.java.jdbc :as jdbc] [duct.database.sql])) (defprotocol Article (article-by-slug [db article]) (create-article [db article]) (destroy-article [db author-id article-slug]) (update-article [db article]) (like [db user-id article-slug]) (unlike [db ...
null
https://raw.githubusercontent.com/walkable-server/realworld/786706f15399b827e2820877ac3e2e26184ee79a/src/conduit/boundary/article.clj
clojure
(ns conduit.boundary.article (:require [clojure.java.jdbc :as jdbc] [duct.database.sql])) (defprotocol Article (article-by-slug [db article]) (create-article [db article]) (destroy-article [db author-id article-slug]) (update-article [db article]) (like [db user-id article-slug]) (unlike [db ...
3860795c47af5fc3e7242c2ffc580dd3db5bc7481de23457b9c25821cd9041f6
goldfirere/singletons
Main.hs
GradingClient.hs ( c ) 2012 This file accesses the database described in Database.hs and performs some basic queries on it . (c) Richard Eisenberg 2012 This file accesses the database described in Database.hs and performs some basic queries on it. -} module Main where import Data.List.Singletons...
null
https://raw.githubusercontent.com/goldfirere/singletons/a169d3f6c0c8e962ea2983f60ed74e507bca9b2b/singletons-base/tests/compile-and-dump/GradingClient/Main.hs
haskell
GradingClient.hs ( c ) 2012 This file accesses the database described in Database.hs and performs some basic queries on it . (c) Richard Eisenberg 2012 This file accesses the database described in Database.hs and performs some basic queries on it. -} module Main where import Data.List.Singletons...
114b8137d13d386d3068bd75c704544d9d5fe22a4f0d4cb612ff37364125307f
shayan-najd/NativeMetaprogramming
TcRun025_B.hs
# LANGUAGE ImplicitParams , TypeSynonymInstances , FlexibleInstances , ConstrainedClassMethods # -- Similar to tc024, but cross module module TcRun025_B where import Data.List( sort ) -- This class has no tyvars in its class op context -- One uses a newtype, the other a data type class C1 a where fc1 :: (?...
null
https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_run/TcRun025_B.hs
haskell
Similar to tc024, but cross module This class has no tyvars in its class op context One uses a newtype, the other a data type This class constrains no new type variables in its class op context
# LANGUAGE ImplicitParams , TypeSynonymInstances , FlexibleInstances , ConstrainedClassMethods # module TcRun025_B where import Data.List( sort ) class C1 a where fc1 :: (?p :: String) => a; class C2 a where fc2 :: (?p :: String) => a; opc :: a instance C1 String where fc1 = ?p; instance C...
cfa6446373a9c1b58a353cb673c7f7ef483cc0109d09450e39d5fd6959cb317d
msp-strath/TypOS
Vector.hs
{-# LANGUAGE GADTs #-} module Vector where import Data.Kind data Nat = Z | S Nat infixr 5 :* data Vector (n :: Nat) (a :: Type) where V0 :: Vector Z a (:*) :: a -> Vector n a -> Vector (S n) a hd :: Vector (S n) a -> a hd (t :* _) = t instance Functor (Vector n) where fmap f V0 = V0 fmap f (x :* xs) = f x ...
null
https://raw.githubusercontent.com/msp-strath/TypOS/8940ec5a5d815fc87fe1b7926a94f2d99baed752/Src/Vector.hs
haskell
# LANGUAGE GADTs #
module Vector where import Data.Kind data Nat = Z | S Nat infixr 5 :* data Vector (n :: Nat) (a :: Type) where V0 :: Vector Z a (:*) :: a -> Vector n a -> Vector (S n) a hd :: Vector (S n) a -> a hd (t :* _) = t instance Functor (Vector n) where fmap f V0 = V0 fmap f (x :* xs) = f x :* fmap f xs
f90ff2db2b2260d36af567ae00a4c48c728eb36ff9e015a871391fb116ca7546
richmit/mjrcalc
use-vec.lisp
;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; @file use-vec.lisp @author < > @brief Mathemat...
null
https://raw.githubusercontent.com/richmit/mjrcalc/0c5bf50a8fe3d9bc6e2636d6629138271b99c1ae/use-vec.lisp
lisp
-*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- @file use-vec.lisp @std Common Lisp @see tst-vec.lisp Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: and/or o...
@author < > @brief Mathematical vectors.@EOL @parblock Copyright ( c ) 1997,1998,2004,2008 - 2013,2015 , < > All rights reserved . 1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer . 2 . Redistributions i...
a9c8c90ddb2e0daa36e002ebf20775cd7742b0256b86bb78c21d714272aa1b04
racket/rhombus-prototype
provide.rkt
#lang racket/base (require (for-syntax racket/base syntax/parse/pre racket/provide-transform)) (provide for-spaces) (define-syntax for-spaces (make-provide-pre-transformer (lambda (stx space+phases) (syntax-parse stx [(_ (space ...) out ...) #`(combin...
null
https://raw.githubusercontent.com/racket/rhombus-prototype/4e66c1361bdde51c2df9332644800baead49e86f/rhombus/private/provide.rkt
racket
#lang racket/base (require (for-syntax racket/base syntax/parse/pre racket/provide-transform)) (provide for-spaces) (define-syntax for-spaces (make-provide-pre-transformer (lambda (stx space+phases) (syntax-parse stx [(_ (space ...) out ...) #`(combin...
bb5acbb1c8d49367a2962f83d62bb81ee4d358aefb3b351d9da910375abc2359
swift-nav/labsat
Parser.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Test.Labsat.Parser ( tests ) where import Data.Attoparsec.ByteString import Data.ByteString import Labsat.Parser import Labsat.Types import Preamble import Test.Tasty import Test.Tasty.HUnit parser :: (Eq a, Show a) => Parser a -> ByteStrin...
null
https://raw.githubusercontent.com/swift-nav/labsat/58ec344fffa6e06c27d30bc3f753103e312040ee/test/Test/Labsat/Parser.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ HELP Parsers ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ MEDIA Parsers -----------------------...
# LANGUAGE NoImplicitPrelude # module Test.Labsat.Parser ( tests ) where import Data.Attoparsec.ByteString import Data.ByteString import Labsat.Parser import Labsat.Types import Preamble import Test.Tasty import Test.Tasty.HUnit parser :: (Eq a, Show a) => Parser a -> ByteString -> Either String a -> Assertion p...
ddde65c463c1e26a13fa6a635e50de1648317c8c036a90ffa2888cc23750e4e9
c-cube/stimsym
Builtins.mli
(* This file is free software. See file "license" for more details. *) (** {1 Builtin Functions} *) type t = Expr.t (** A builtin is just a constant expression *) exception Eval_does_not_apply (** Raised internally when an evaluation function does not apply to the arguments *) * a function definition . Takes [...
null
https://raw.githubusercontent.com/c-cube/stimsym/38c744b5f770b52980abbfe7636a0dc2b91bbeb7/src/core/Builtins.mli
ocaml
This file is free software. See file "license" for more details. * {1 Builtin Functions} * A builtin is just a constant expression * Raised internally when an evaluation function does not apply to the arguments * [make s] makes a new constant and sets some options/handlers on it number of immediate arguments...
type t = Expr.t exception Eval_does_not_apply * a function definition . Takes [ self_cst , eval_fun , t ] and evaluates [ t ] into [ None ] ( fail ) or [ Some t ' ] into [None] (fail) or [Some t'] *) type fun_def = Expr.const -> Expr.prim_fun_args -> Expr.t -> Expr.t option val make : ?doc:Document.t ...
792894760ad766ad4f45dc82e8114a2d86b30fada4cc1a67409c93c5767a6aed
robindar/compil-petitrust
x86_64.mli
* { 0 Bibliothèque pour l'écriture de programmes X86 - 64 } Il s'agit là uniquement d'un fragment relativement petit de l'assembleur X86 - 64 . @author ( CNRS ) @author ( Université Paris Sud ) Il s'agit là uniquement d'un fragment relativement petit de l'assembleur X86-64. ...
null
https://raw.githubusercontent.com/robindar/compil-petitrust/c28ae0df678860613f630b8e09bffabd7aa02c0e/x86_64.mli
ocaml
* du code assembleur se trouvant dans la zone de texte * du code assembleur se trouvant dans la zone de données * les étiquettes d'addresses sont des chaînes de caractères * [print_program fmt p] imprime le code du programme [p] dans le formatter [fmt] * {1 Registres } * type abstrait des registres * {1 Opé...
* { 0 Bibliothèque pour l'écriture de programmes X86 - 64 } Il s'agit là uniquement d'un fragment relativement petit de l'assembleur X86 - 64 . @author ( CNRS ) @author ( Université Paris Sud ) Il s'agit là uniquement d'un fragment relativement petit de l'assembleur X86-64. ...
7e241d11cef4ce2b47928b73d283f08a795d6440ea45dc2ebf33b8a085ba852b
dizengrong/erlang_game
npc_dict.erl
@author dzR < > @doc npc的字典数据模块 -module (npc_dict). -include("map.hrl"). -include("npc.hrl"). -export([init/1, next_npc_id/0]). -export([set_npc_rec/1, get_npc_rec/1]). -export([get_all_npc_id_list/0, set_all_npc_id_list/1]). init(_MapState) -> erlang:put(current_max_npc_uid, 1), set_all_npc_id_list([]), ok....
null
https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/src/map_srv/npc_dict.erl
erlang
@doc 获取当前一个可用的最大的npc id,并递增current_max_npc_uid @doc 操作#r_npc{}的接口
@author dzR < > @doc npc的字典数据模块 -module (npc_dict). -include("map.hrl"). -include("npc.hrl"). -export([init/1, next_npc_id/0]). -export([set_npc_rec/1, get_npc_rec/1]). -export([get_all_npc_id_list/0, set_all_npc_id_list/1]). init(_MapState) -> erlang:put(current_max_npc_uid, 1), set_all_npc_id_list([]), ok....
e5f2a7016a74b19d5531a78d9d7418c5dc6930308b356eea425a135050a50c64
bos/rwh
divby2m.hs
{-- snippet all --} ch20 / divby2m.hs divBy :: Integral a => a -> [a] -> Maybe [a] divBy numerator denominators = mapM (numerator `safeDiv`) denominators where safeDiv _ 0 = Nothing safeDiv x y = x `div` y {-- /snippet all --}
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch20/divby2m.hs
haskell
- snippet all - - /snippet all -
ch20 / divby2m.hs divBy :: Integral a => a -> [a] -> Maybe [a] divBy numerator denominators = mapM (numerator `safeDiv`) denominators where safeDiv _ 0 = Nothing safeDiv x y = x `div` y
e273107c644f7f67e7f01da12505f5a9565e1c26b0450c07624219923a4c85ef
embecosm/cgen
guile.scm
; Guile-specific functions. Copyright ( C ) 2000 , 2004 , 2009 Red Hat , Inc. This file is part of CGEN . ; See file COPYING.CGEN for details. (define *guile-major-version* (string->number (major-version))) (define *guile-minor-version* (string->number (minor-version))) eval takes a module argument in 1.6 and l...
null
https://raw.githubusercontent.com/embecosm/cgen/3fa8809c015376cd0e80018a655d372df3678bc6/cgen/guile.scm
scheme
Guile-specific functions. See file COPYING.CGEN for details. (load-from-path file) FIXME: to be deleted Guile 1.8 no longer has "." in %load-path so relative path loads no longer work. Enabling and disabling debugging features of the host Scheme. For the initial load proces, turn everything on. We'll disable it...
Copyright ( C ) 2000 , 2004 , 2009 Red Hat , Inc. This file is part of CGEN . (define *guile-major-version* (string->number (major-version))) (define *guile-minor-version* (string->number (minor-version))) eval takes a module argument in 1.6 and later (if (or (> *guile-major-version* 1) (>= *guile-minor-versi...
64373f01dd3761bcd1fd611f486c7f52f85e49e9f49fecca8fe7a7233c7980ee
tani/UFO
ufo.lisp
(in-package :cl-user) (defpackage ufo-test (:use :cl :ufo :prove)) (in-package :ufo-test) (when (cl-fad:directory-exists-p #p"~/.ufo") (cl-fad:delete-directory-and-files #p"~/.ufo/")) (plan nil) (ok (not (ufo:ufo "install" "gist"))) (ok (not (ufo:ufo "install" "ql-gists"))) (ok (not (ufo:ufo "remove" "clhs"))) (o...
null
https://raw.githubusercontent.com/tani/UFO/d8f6876bcd6f09fcca679eb6fa56472ae76378cc/t/ufo.lisp
lisp
(in-package :cl-user) (defpackage ufo-test (:use :cl :ufo :prove)) (in-package :ufo-test) (when (cl-fad:directory-exists-p #p"~/.ufo") (cl-fad:delete-directory-and-files #p"~/.ufo/")) (plan nil) (ok (not (ufo:ufo "install" "gist"))) (ok (not (ufo:ufo "install" "ql-gists"))) (ok (not (ufo:ufo "remove" "clhs"))) (o...
4cd0c2341308df1809973888a7f47318902c04ca496246cbdbe3578299591d43
marick/suchwow
readable.clj
(ns such.readable "Stringify nested structures such that all functions - and particular values of your choice - are displayed in a more readable way. [[value-string]] and [[fn-symbol]] are the key functions." (:refer-clojure :exclude [print]) (:require [such.symbols :as symbol] [such.types :as t...
null
https://raw.githubusercontent.com/marick/suchwow/111cd4aa21ee23552742701bfe52e593b65fb0f8/src/such/readable.clj
clojure
(ns such.readable "Stringify nested structures such that all functions - and particular values of your choice - are displayed in a more readable way. [[value-string]] and [[fn-symbol]] are the key functions." (:refer-clojure :exclude [print]) (:require [such.symbols :as symbol] [such.types :as t...
ebda6d5517e50b97ca8d3a061c1c1a730a5909023b4563a588eabdadbdc08a79
YoshikuniJujo/test_haskell
makeEnum.hs
# OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import qualified VulkanExtDebugUtilsMessageEnum main :: IO () main = VulkanExtDebugUtilsMessageEnum.make
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/6694c28f444b99915e7e88dd3b5c38ed44d36466/themes/gui/vulkan/try-vulkan-middle-ext-debug-utils/tools/makeEnum.hs
haskell
# OPTIONS_GHC -Wall -fno - warn - tabs # module Main where import qualified VulkanExtDebugUtilsMessageEnum main :: IO () main = VulkanExtDebugUtilsMessageEnum.make
550ecb86b8b59dbca46f382d2c485e4aed1a0d3709388078c8be14a3375981bf
rwmjones/guestfs-tools
utils.ml
virt - sparsify * Copyright ( C ) 2011 - 2023 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any l...
null
https://raw.githubusercontent.com/rwmjones/guestfs-tools/57423d907270526ea664ff15601cce956353820e/sparsify/utils.ml
ocaml
Return true if the filesystem is a read-only LV (RHBZ#1185561).
virt - sparsify * Copyright ( C ) 2011 - 2023 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any l...
092b54c49af9005485d7fa9350963a018e5812d98475a3d3ba3e73d18261803c
xively/clj-mqtt
suback_test.clj
(ns mqtt.packets.suback-test (:use clojure.test mqtt.test-helpers mqtt.decoder mqtt.encoder mqtt.packets.common mqtt.packets.suback) (:require [mqtt.decoding-utils :as du]) (:import [io.netty.buffer Unpooled] [io.netty.handler.codec EncoderException])) (deftest ...
null
https://raw.githubusercontent.com/xively/clj-mqtt/74964112505da717ea88279b62f239146450528c/test/mqtt/packets/suback_test.clj
clojure
fixed header remaining length message id granted qos(es) fixed header remaining length message id granted qos(es) fixed header remaining length message id granted qos(es) fixed header remaining length message id granted qos(es)
(ns mqtt.packets.suback-test (:use clojure.test mqtt.test-helpers mqtt.decoder mqtt.encoder mqtt.packets.common mqtt.packets.suback) (:require [mqtt.decoding-utils :as du]) (:import [io.netty.buffer Unpooled] [io.netty.handler.codec EncoderException])) (deftest ...
899b924fd0ec7c5d0237ac5950b673e9fc38d38dc48ff446bf2cf30338ac6dbf
skanev/playground
15.scm
SICP exercise 2.15 ; , another user , has also noticed the different intervals computed ; by different but algebraically equivalent expressions. She says that a formula to compute with intervals using 's system will produce tighter ; error bounds if it can be written in such a form that no variable that ; rep...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/15.scm
scheme
by different but algebraically equivalent expressions. She says that a error bounds if it can be written in such a form that no variable that represents an uncertain number is repeated. Thus, she says, par2 is a "better" program for parallel resistances than par1. Is she right? Why? She is definitelly right. op...
SICP exercise 2.15 , another user , has also noticed the different intervals computed formula to compute with intervals using 's system will produce tighter It is easy to see from the results of exercise 2.14 that the more we perform 2A is exactly the same as AA .
1edcb03dbd141aecae78a90d44daffcb23e2f00d7c724db3412bea0abf4293f4
Smoltbob/Caml-Est-Belle
letrec2.ml
let rec f x = print_int(x+1) in f(3.9)
null
https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/typechecking/invalid/letrec2.ml
ocaml
let rec f x = print_int(x+1) in f(3.9)
e1e958c49a6ac4cd1d6991505cb8e9bc6568a870f82681fc7fe221daf073fdb4
8thlight/hyperion
key_spec.clj
(ns hyperion.sql.key-spec (:require [speclj.core :refer :all ] [hyperion.sql.key :refer :all ] [clojure.data.codec.base64 :refer [encode decode]])) (describe "Hyperion SQL Key" (it "creates keys based on kind and id" (should= (compose-key "foo" 1) (compose-key "foo" 1)) (should-not...
null
https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/sql/spec/hyperion/sql/key_spec.clj
clojure
(ns hyperion.sql.key-spec (:require [speclj.core :refer :all ] [hyperion.sql.key :refer :all ] [clojure.data.codec.base64 :refer [encode decode]])) (describe "Hyperion SQL Key" (it "creates keys based on kind and id" (should= (compose-key "foo" 1) (compose-key "foo" 1)) (should-not...
2060e106b4c61a3686af40eac936dd3b890b64f8ff7853d3d4abf6525c335759
kovasb/gamma-driver
test.cljs
(ns gamma.webgl.test (:require [clojure.browser.repl :as repl] )) (enable-console-print!) (defonce conn (repl/connect ":9000/repl")) (comment (ns gamma.webgl.test1 (:require [goog.dom :as gdom] [goog.webgl :as ggl] [gamma.api :as g] [gamma.program :as p] [gamma...
null
https://raw.githubusercontent.com/kovasb/gamma-driver/abe0e1dd01365404342f4e8e04263e48c4648b6e/test/gamma/webgl/test.cljs
clojure
implement:
(ns gamma.webgl.test (:require [clojure.browser.repl :as repl] )) (enable-console-print!) (defonce conn (repl/connect ":9000/repl")) (comment (ns gamma.webgl.test1 (:require [goog.dom :as gdom] [goog.webgl :as ggl] [gamma.api :as g] [gamma.program :as p] [gamma...
a6d2f79adb80a75be729085101a47e8c594b605c8b1d099bf7983a6bc1de764c
greglook/cljstyle
type_test.clj
(ns cljstyle.format.type-test (:require [cljstyle.format.type :as type] [cljstyle.test-util] [clojure.test :refer [deftest testing is]])) (deftest protocol-definitions (testing "basics" (is (rule-reformatted? type/format-protocols {} "(defprotocol Foo)" "(defprotocol ...
null
https://raw.githubusercontent.com/greglook/cljstyle/1f58e2e7af4c193aa77ad0695f6c2b9ac2c5c5ec/test/cljstyle/format/type_test.clj
clojure
an option comment a method comment an option comment a method comment here are some interstitial comments they should be left alone a pre-method comment here are some interstitial comments they should be left alone a pre-method comment
(ns cljstyle.format.type-test (:require [cljstyle.format.type :as type] [cljstyle.test-util] [clojure.test :refer [deftest testing is]])) (deftest protocol-definitions (testing "basics" (is (rule-reformatted? type/format-protocols {} "(defprotocol Foo)" "(defprotocol ...
28da033afcaf6d06c14b8871b81e0140f0e51cd598f4e60559c0ddc053606e7c
ml4tp/tcoq
environ.mli
(************************************************************************) 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/environ.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Unsafe environments. We define her...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Dec...
20f35728ec14439c46d88b1c9daee875e898a14cb1baa7b86cb64a9282640456
laurocaetano/programming-in-haskell
2.hs
-- | Without looking at the definitions from the standard prelude, define the | higher - order functions all , any , takeWhile , and dropWhile . all' :: (a -> Bool) -> [a] -> Bool all' p = and . map p any' :: (a -> Bool) -> [a] -> Bool any' p = or . map p takeWhile' :: (a -> Bool) -> [a] -> [a] take...
null
https://raw.githubusercontent.com/laurocaetano/programming-in-haskell/8b54f802c3949fab8bcb7460ab37229f0c52449a/ch-07/2.hs
haskell
| Without looking at the definitions from the standard prelude, define the
| higher - order functions all , any , takeWhile , and dropWhile . all' :: (a -> Bool) -> [a] -> Bool all' p = and . map p any' :: (a -> Bool) -> [a] -> Bool any' p = or . map p takeWhile' :: (a -> Bool) -> [a] -> [a] takeWhile' p [] = [] takeWhile' p (x:xs) | p x = x : takeWhile' p xs ...
e2ab8d8a9d090e5ab01038d07a0cae1485c136d394431f8325ec08b1b5b716d7
bobbae/gosling-emacs
pascal.ml
(progn ;;; Pretty Brain Damaged at this point! (defun (electric-pascal-mode (use-abbrev-table "Pascal") (use-syntax-table "Pascal") (Do-Pascal-Bindings) (setq mode-string "philips' pascal")) (Make-Pascal-Abbrevs (use-abbrev-table "Pascal") (define-local-abbrev "and" "AND") (define-local-abbrev "array" "...
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/pascal.ml
ocaml
(progn ;;; Pretty Brain Damaged at this point! (defun (electric-pascal-mode (use-abbrev-table "Pascal") (use-syntax-table "Pascal") (Do-Pascal-Bindings) (setq mode-string "philips' pascal")) (Make-Pascal-Abbrevs (use-abbrev-table "Pascal") (define-local-abbrev "and" "AND") (define-local-abbrev "array" "...
32caff3fa91106ef09aafa259549ad8e5c743f89271eb846ae2a11334448f746
AstRonin/sgi
sgi_n2o_fcgi_handler.erl
-module(sgi_n2o_fcgi_handler). -include_lib("n2o/include/wf.hrl"). -include_lib("stdlib/include/ms_transform.hrl"). %% API -export([init/0, send/0, send/1, do_send/3, stop/0]). -define(PROTO_CGI, <<"CGI/1.1">>). -define(PROTO_HTTP, <<"HTTP/1.1">>). -define(DEF_RESP_STATUS, 200). -define(DEF_TIMEOUT, 600000). -define...
null
https://raw.githubusercontent.com/AstRonin/sgi/3854b62b6ce46ba71abd1e76e9cf5200dc0b1df3/src/sgi_n2o_fcgi_handler.erl
erlang
API =========================================================== API =========================================================== @todo Return headers from cgi because cowboy don't give access to resp_headers =========================================================== Prepare Request =============================...
-module(sgi_n2o_fcgi_handler). -include_lib("n2o/include/wf.hrl"). -include_lib("stdlib/include/ms_transform.hrl"). -export([init/0, send/0, send/1, do_send/3, stop/0]). -define(PROTO_CGI, <<"CGI/1.1">>). -define(PROTO_HTTP, <<"HTTP/1.1">>). -define(DEF_RESP_STATUS, 200). -define(DEF_TIMEOUT, 600000). -define(WS_URL...
40667a44573cf7c319a92bbcb33ee984c39a5a3292e957b43e23c33ac9577827
flyingmachine/datomic-junk
datomic_junk.clj
" Eid " is taken from ; -of-datomic/blob/master/src/datomic/samples/query.clj (ns com.flyingmachine.datomic-junk (:require [datomic.api :as d])) (defn max1 [query-result] (assert (< (count query-result) 2)) (assert (< (count (first query-result)) 2)) (ffirst query-result)) Get i d whether from number o...
null
https://raw.githubusercontent.com/flyingmachine/datomic-junk/c5688686cd1a9f4b181e9ffc2478b913f578f347/src/com/flyingmachine/datomic_junk.clj
clojure
-of-datomic/blob/master/src/datomic/samples/query.clj The following functions help when retrieving entities when you don't need to specify their relationships to other entities Transaction helpers
" Eid " is taken from (ns com.flyingmachine.datomic-junk (:require [datomic.api :as d])) (defn max1 [query-result] (assert (< (count query-result) 2)) (assert (< (count (first query-result)) 2)) (ffirst query-result)) Get i d whether from number or datomic ent (defprotocol Eid (e [_])) (extend-proto...
57cd3de29df8a284d5b40b75190328cfd9c0e73e1c0b14175c14e41c21924078
rtoy/ansi-cl-tests
nstring-capitalize.lsp
;-*- Mode: Lisp -*- Author : Created : Thu Oct 3 21:38:49 2002 ;;;; Contains: Tests for NSTRING-CAPITALIZE (in-package :cl-test) (deftest nstring-capitalize.1 (let* ((s (copy-seq "abCd")) (s2 (nstring-capitalize s))) (values (eqt s s2) s)) t "Abcd") (deftest nstring-capitalize.2 (...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/nstring-capitalize.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for NSTRING-CAPITALIZE Order of evaluation tests Error cases
Author : Created : Thu Oct 3 21:38:49 2002 (in-package :cl-test) (deftest nstring-capitalize.1 (let* ((s (copy-seq "abCd")) (s2 (nstring-capitalize s))) (values (eqt s s2) s)) t "Abcd") (deftest nstring-capitalize.2 (let* ((s (copy-seq "0adA2Cdd3wXy")) (s2 (nstring-capitalize...
9138c93f5d4e35823ec8509bbd7a8f2ad31a67731a853d71c8d86febd1e3f882
SahilKang/cl-avro
reinitialization.lisp
Copyright 2022 Google LLC ;;; ;;; This file is part of cl-avro. ;;; ;;; cl-avro is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;...
null
https://raw.githubusercontent.com/SahilKang/cl-avro/34f227936a303f34a94e46480a7172a6171835fa/test/reinitialization.lisp
lisp
This file is part of cl-avro. cl-avro is free software: you can redistribute it and/or modify (at your option) any later version. cl-avro 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 t...
Copyright 2022 Google LLC it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package #:cl-user) (defpackage #:cl-avro/test/reinitialization (:local-nickn...
c9e807fa93b58288f02aeb27948ab1e654a3e8598197bf71a3f14de2209f48d7
leo-project/leofs
leo_gateway_web_tests.erl
%%==================================================================== %% Leo Gateway %% Copyright ( c ) 2012 - 2018 Rakuten , Inc. %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a c...
null
https://raw.githubusercontent.com/leo-project/leofs/4ff701e0f4a4cf39a968dbe078b9c2412a22f995/apps/leo_gateway/test/leo_gateway_web_tests.erl
erlang
==================================================================== Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissi...
Leo Gateway Copyright ( c ) 2012 - 2018 Rakuten , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(leo_gateway_we...
d7a3b0333080bc68f5ac62ba61bf70dc65ee8c88713aa899ac49520234588110
themattchan/advent-of-code
day14.hs
{-# LANGUAGE BangPatterns #-} import Utils input :: Int input = 681901 gen :: [Int] gen = 3 : 7 : go 0 1 2 where go !i !j !l = let ix = (gen !! i) jx = (gen !! j) x = ix + jx (x1, x2) = divMod x 10 f = if x1 == 0 then (x2 :) else ((x1 :) . (x2 :)) l' = l +...
null
https://raw.githubusercontent.com/themattchan/advent-of-code/0b08a4fbadf7e713d40044523af3debb7d0cb6b9/2018/day14/day14.hs
haskell
# LANGUAGE BangPatterns #
import Utils input :: Int input = 681901 gen :: [Int] gen = 3 : 7 : go 0 1 2 where go !i !j !l = let ix = (gen !! i) jx = (gen !! j) x = ix + jx (x1, x2) = divMod x 10 f = if x1 == 0 then (x2 :) else ((x1 :) . (x2 :)) l' = l + if x1 == 0 then 1 else 2 ...
10df439ebc2829ea5b10f719a1ffb04a76d5ad6021d1e65b306156d7c87dd668
evosec/metabase-firebird-driver
firebird.clj
(ns metabase.driver.firebird (:require [clojure [set :as set] [string :as str]] [clojure.java.jdbc :as jdbc] [honeysql.core :as hsql] [honeysql.format :as hformat] [java-time :as t] [metabase.driver :as driver] [metabase...
null
https://raw.githubusercontent.com/evosec/metabase-firebird-driver/2e55040eb7b7d54da2aa9ac723e2b6fda3f22017/src/metabase/driver/firebird.clj
clojure
[metabase.driver.sql-jdbc.sync.describe-database :as sql-jdbc.sync.describe-database] Use pattern matching because some parameters can have a length parameter, e.g. VARCHAR(255) Use "SKIP" instead of "OFFSET" otherwise it will this point. Query completes = we have SELECT privileges Query throws some sort of no p...
(ns metabase.driver.firebird (:require [clojure [set :as set] [string :as str]] [clojure.java.jdbc :as jdbc] [honeysql.core :as hsql] [honeysql.format :as hformat] [java-time :as t] [metabase.driver :as driver] [metabase...
7ccc6b531f9d72cc4042a6db9f2afbfe0b3d96b4cb85a37cc073da029b194c92
gsakkas/rite
20060324-19:59:26-89f2326d390889b438f85e767726a3c5.seminal.ml
exception Unimplemented exception AlreadyDone (*** part a ***) type move = Home | Forward of float | Turn of float | For of int * (move)list (*** part b -- return move***) let makePoly sides len = let fSides = float_of_int sides in let turnAmount = (2.0 *. 3.1416) /. fSides in let rec makeP...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060324-19%3A59%3A26-89f2326d390889b438f85e767726a3c5.seminal.ml
ocaml
** part a ** ** part b -- return move** ::makePolyHelp 0 true ###################### ############# ######################################################## ############ ######### ############################################# ################################################ ###### ** part c ** ** part d ** **...
exception Unimplemented exception AlreadyDone type move = Home | Forward of float | Turn of float | For of int * (move)list let makePoly sides len = let fSides = float_of_int sides in let turnAmount = (2.0 *. 3.1416) /. fSides in let rec makePolyHelp sidesLeft turn = match sidesLeft with...
eb8b7312102625ea93df936742b7b9da4bd9c9bbca7ce5dd1759bd35ca09399d
pgj/mirage-kfreebsd
tcptimer.mli
* Copyright ( c ) 2012 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-net/lib/tcp/tcptimer.mli
ocaml
* Copyright ( c ) 2012 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
38d31342b574d7775fdf7b9571c45acb553c87d4dfe33ac27df17748276363cb
15Galan/asignatura-204
Dictionary.hs
------------------------------------------------------------------------------- -- Dictionaries implemented by using Binary Search Trees -- Data Structures . en Informática . UMA . , 2011 ------------------------------------------------------------------------------- module Dictionary ( Dictionary , empty ...
null
https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Ex%C3%A1menes/2012/Febrero/Haskell/Dictionary.hs
haskell
----------------------------------------------------------------------------- Dictionaries implemented by using Binary Search Trees -----------------------------------------------------------------------------
Data Structures . en Informática . UMA . , 2011 module Dictionary ( Dictionary , empty , isEmpty , insert , valueOf , valueOf' , isDefinedAt , delete , keys , values ) where import Data.Function(on) import Data.List(intercalate) import Data.Maybe(isJust) import qualified BinarySearchTree ...
ae72761681fe7c0734ee47d4acd556c342b60e14af8a837720f8b93ccbc93a05
osstotalsoft/functional-guy
11.Quicksort.hs
quicksort [] = [] quicksort (x : xs) = quicksort smallerThanX ++ [x] ++ quicksort biggerThanX where smallerThanX = filter (<= x) xs biggerThanX = filter (> x) xs test = quicksort $ reverse [1 .. 10]
null
https://raw.githubusercontent.com/osstotalsoft/functional-guy/c02a8b22026c261a9722551f3641228dc02619ba/Chapter2.%20The%20foundation/Exercises/01.Recursion/11.Quicksort.hs
haskell
quicksort [] = [] quicksort (x : xs) = quicksort smallerThanX ++ [x] ++ quicksort biggerThanX where smallerThanX = filter (<= x) xs biggerThanX = filter (> x) xs test = quicksort $ reverse [1 .. 10]
415a62f4e81e2a357c8ade03c71af7138c11f9c57fd4bfc81c5379e5f5b6d736
ners/dosh
Zipper.hs
{-# OPTIONS_GHC -Wno-name-shadowing #-} module Data.Sequence.Zipper where import Control.Applicative ((<|>)) import Data.Sequence (Seq, ViewL (..), ViewR (..), (<|), (|>)) import Data.Sequence qualified as Seq import GHC.Exts (IsList (..)) import GHC.Generics (Generic) import Prelude data SeqZipper t = SeqZipper ...
null
https://raw.githubusercontent.com/ners/dosh/ff0bcbf33ba38bfe3d981b90c815f7e827ee2d33/src/Data/Sequence/Zipper.hs
haskell
# OPTIONS_GHC -Wno-name-shadowing #
module Data.Sequence.Zipper where import Control.Applicative ((<|>)) import Data.Sequence (Seq, ViewL (..), ViewR (..), (<|), (|>)) import Data.Sequence qualified as Seq import GHC.Exts (IsList (..)) import GHC.Generics (Generic) import Prelude data SeqZipper t = SeqZipper { before :: Seq t , after :: Seq t ...
403552ef531826d7b6bc39b1ba902e6696a4a278aa713aae157aa5aa1c996359
NorfairKing/haphviz
Internal.hs
-- | Internal types. -- -- You may want to keep off these. module Text.Dot.Types.Internal ( module Text.Dot.Types.Internal -- * Re-exports , Identity(..) , Monoid(..) ) where import Data.Text (Text) import Control.Monad.Identity (Identity (..)) -- | Internal n...
null
https://raw.githubusercontent.com/NorfairKing/haphviz/90f1e8e0cbcd2a0745cfa66a46e878b473b3cf7e/src/Text/Dot/Types/Internal.hs
haskell
| Internal types. You may want to keep off these. * Re-exports | Internal name of a graph, used to reference graphs and subgraphs | Type of a graph, directed or undirected. This also specifies what edge declarations look like. | Attribute name: just text | Attribute value: just text | Attribute: a tuple of n...
module Text.Dot.Types.Internal ( module Text.Dot.Types.Internal , Identity(..) , Monoid(..) ) where import Data.Text (Text) import Control.Monad.Identity (Identity (..)) type GraphName = Text data GraphType = UndirectedGraph | DirectedGraph der...
1706f57b927d4274cfa3585d9a135b247b4109351af4b9c8d535b19893933120
rlepigre/pml
hval.ml
module Val = struct type t = v ex let equal : t -> t -> bool = fun v1 v2 -> eq_expr (Pos.none v1) (Pos.none v2) let hash t = Hashtbl.hash t end module HVal = Weak.Make(Val) let hval : v ex -> v ex = let tbl = HVal.create 1001 in try HVal.find tbl d with Not_found - > HVal.add tb...
null
https://raw.githubusercontent.com/rlepigre/pml/cdfdea0eecc6767b16edc6a7bef917bc9dd746ed/attic/hval.ml
ocaml
module Val = struct type t = v ex let equal : t -> t -> bool = fun v1 v2 -> eq_expr (Pos.none v1) (Pos.none v2) let hash t = Hashtbl.hash t end module HVal = Weak.Make(Val) let hval : v ex -> v ex = let tbl = HVal.create 1001 in try HVal.find tbl d with Not_found - > HVal.add tb...
0f97fcde6ccce77077258ad3a924bbe84bd477425c36af908315490edb76c531
input-output-hk/cardano-ledger
Chain.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE Undec...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/e0947b0c2e99ef929d20593be03e199560392f42/eras/shelley/impl/src/Cardano/Ledger/Chain.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # | Chain Checks Header Size Block Size protocol version used max protocol version
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Cardano.Ledger.Chain ( ChainChecksPPara...
37b2989388da886a4c1d3c05c040ef85e6090459558360abae8daf19a41b3e02
plum-umd/fundamentals
light-fun.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-intermediate-lambda-reader.ss" "lang")((modname light-fun) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeat...
null
https://raw.githubusercontent.com/plum-umd/fundamentals/eb01ac528d42855be53649991a17d19c025a97ad/2/www/lectures/4/light-fun.rkt
racket
about the language level of this file in a form that our tools can easily process. - "Red" - "Green" - "Yellow" light-function : Light -> ??? next : Light -> Light Next light after the given light
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname light-fun) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) A Light is one of : (define (light-function l) ...
c999d5e0841e3befe9ce5aa548fbb31925c2e9d38b2dd36ff5ed0985b983179d
cxphoe/SICP-solutions
2.79.rkt
(load "2.77.rkt") (define (install-equ?-package) (put 'equ? '(scheme-number scheme-number) (lambda (x y) (= x y))) (put 'equ? '(rational rational) (lambda (x y) (= (* (numer x) (denom y)) (* (numer y) (denom x))))) (put 'equ? '(complex complex) (lambda (x y) (and (= (...
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%202-Building%20Abstractions%20with%20Data/5.Systems%20with%20Generic%20Operations/2.79.rkt
racket
(load "2.77.rkt") (define (install-equ?-package) (put 'equ? '(scheme-number scheme-number) (lambda (x y) (= x y))) (put 'equ? '(rational rational) (lambda (x y) (= (* (numer x) (denom y)) (* (numer y) (denom x))))) (put 'equ? '(complex complex) (lambda (x y) (and (= (...
5d109dc99f24fae1b1646a83aa981f7c2953a5144953052c184bab8e14a08cd8
simingwang/emqx-plugin-kafkav5
logger_disk_log_h.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2017 - 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/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/logger_disk_log_h.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 2017 - 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(logger_disk_log_h). -include("logger.hrl"). -include("logger_internal.hrl"). -include("logger_h_common.hrl")...
c98650fd5d26fff5200d9a9929f1b98ca6b9aae4f78a87a416ed750512556968
mhuebert/chia
jss.cljs
(ns chia.jss (:require ["jss" :as jss] ["reset-jss" :as reset-jss] ["jss-preset-default" :default jss-preset] [applied-science.js-interop :as j] [chia.view.util :as vu] [chia.util :as u])) (defonce JSS (delay (jss/create (jss-preset)))) (defonce glob...
null
https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/jss/src/chia/jss.cljs
clojure
(ns chia.jss (:require ["jss" :as jss] ["reset-jss" :as reset-jss] ["jss-preset-default" :default jss-preset] [applied-science.js-interop :as j] [chia.view.util :as vu] [chia.util :as u])) (defonce JSS (delay (jss/create (jss-preset)))) (defonce glob...
37a1cffd7ecd8a62a0963d93ea42f57ee2e3a9626d6c36d8bc195fa1f7ba18d4
gahag/FSQL
Lang.hs
FSQL : / Lang.hs -- Language definition , lexer and standard parser functions - - Copyright ( C ) 2015 gahag - All rights reserved . - - This software may be modified and distributed under the terms - of the BSD license . See the LICENSE file for details . ...
null
https://raw.githubusercontent.com/gahag/FSQL/5c68cb8af68e7e66876bc2b937b91ddb363b2db7/src/Parser/Lang.hs
haskell
Language definition , lexer and standard parser Quoted. Or not. avoid ambiguity with operators. disallow backslashes. fsql_langDef ------------------------------------------------------------------------ Characters that must be escaped. Characters that must be escaped -----------------------------------------...
functions - - Copyright ( C ) 2015 gahag - All rights reserved . - - This software may be modified and distributed under the terms - of the BSD license . See the LICENSE file for details . functions - - Copyright (C) 2015 gahag - All right...
89d52a6e8c7d1cf7f127e498aa0e51c950599495447989d777a3faa7ab86c294
snapframework/snap-core
Assertions.hs
# LANGUAGE CPP , OverloadedStrings # module Snap.Internal.Test.Assertions where ------------------------------------------------------------------------------ import Control.Monad (liftM) import Data.ByteString.Builder (toLazyByteString) import Data.ByteString.Char8 (...
null
https://raw.githubusercontent.com/snapframework/snap-core/04295679ccf8316fcf4944f2eb65d1b5266587ef/src/Snap/Internal/Test/Assertions.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- | Given a 'Response', return its body as a 'ByteString'. Example: @ ghci> 'getRespo...
# LANGUAGE CPP , OverloadedStrings # module Snap.Internal.Test.Assertions where import Control.Monad (liftM) import Data.ByteString.Builder (toLazyByteString) import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as S import qualified D...
d5e12938c4776a243f13310171a5c74635bc55f2d6d57c91327d6040011f2165
matsen/pplacer
rppr_infer.ml
open Subcommand open Guppy_cmdobjs open Ppatteries open Convex let prune_notax sizemim st = let open Stree in let rec should_prune i = let sizem = IntMap.find i sizemim in ColorMap.cardinal sizem = 1 && ColorMap.mem Tax_id.NoTax sizem and aux = function | Leaf _ as l -> l | Node (i, subtrees) -> ...
null
https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/rppr_infer.ml
ocaml
required to get #write_placefile ... ...
open Subcommand open Guppy_cmdobjs open Ppatteries open Convex let prune_notax sizemim st = let open Stree in let rec should_prune i = let sizem = IntMap.find i sizemim in ColorMap.cardinal sizem = 1 && ColorMap.mem Tax_id.NoTax sizem and aux = function | Leaf _ as l -> l | Node (i, subtrees) -> ...
cc3960ba3d5035ae01a35d64524b70fe972b664e35c0921f1997ea37bc285914
2600hz/kazoo
kapi_callflow.erl
%%%----------------------------------------------------------------------------- ( C ) 2013 - 2020 , 2600Hz %%% @doc @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_amqp/src/api/kapi_callflow.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc Get all API definitions of this module. @end --------------------...
( C ) 2013 - 2020 , 2600Hz @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kapi_callflow). -include_lib("kazoo_stdlib/include/kz_types.hrl"). -include("kz_api_literals....
b7a1777c7dd758209ac0a5ca0faeae155cebe55d41985dfc685b6fe109f031e5
ssadler/zeno
VarInt.hs
module Data.VarInt where import Control.Monad import Data.Aeson import Data.Bits import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import Data.FixedBytes import Data.RLP import Data.Serialize import Data.Word import Text.Printf import qualified Haskoin as H newtype VarInt = VarInt ...
null
https://raw.githubusercontent.com/ssadler/zeno/9f715d7104a7b7b00dee9fe35275fb217532fdb6/src/Data/VarInt.hs
haskell
module Data.VarInt where import Control.Monad import Data.Aeson import Data.Bits import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BSL import Data.FixedBytes import Data.RLP import Data.Serialize import Data.Word import Text.Printf import qualified Haskoin as H newtype VarInt = VarInt ...
948b22584cef5da284c1b9a8f5f86e1a4104753ae210e702389837aae9a6abb0
awslabs/s2n-bignum
instruction.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/01d5ee53066f8a4e820776505d21e4c1b9657637/x86/proofs/instruction.ml
ocaml
========================================================================= Simplified definition of x86 assembly instructions. ========================================================================= ------------------------------------------------------------------------- The general-pur...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) let wordsize_INDUCT,wordsize_RECURSION = define_type "wordsize = Q...
26bd01b223389885c351655b9ffe47972174962a41fb123d140a4e994967a234
biocad/math-grads
CyclesPathsAlignment.hs
-- | Module that is responsible for linking systems of conjugated cycles in graph -- with paths between them. -- module Math.Grads.Drawing.Internal.CyclesPathsAlignment ( alignCyclesAndPaths , bondsToAlignTo , bondsToAlignToExtreme ) where import Control.Arrow (first, second, (**...
null
https://raw.githubusercontent.com/biocad/math-grads/df7bdc48f86f57f3d011991c64188489e8d73bc1/src/Math/Grads/Drawing/Internal/CyclesPathsAlignment.hs
haskell
| Module that is responsible for linking systems of conjugated cycles in graph with paths between them. | Constructs edge that will be used to align to cycle containing given 'Coord's. | If we have complicated situation where we need to calculate bonds to align to Otherwise we use bondsToAlignTo function.
module Math.Grads.Drawing.Internal.CyclesPathsAlignment ( alignCyclesAndPaths , bondsToAlignTo , bondsToAlignToExtreme ) where import Control.Arrow (first, second, (***)) import Data.Either (partitionEithers) import Data.List ...
8ac6dfc55b408ae9fed92eb2eece8dbd8144f02d561e331c2a543b6e47f95cde
caribou/caribou-core
field_map.clj
(ns caribou.migrations.field-map (:require [caribou.config :as config] [caribou.model :as model])) (defn migrate [] (model/update :model (model/models :field :id) {:fields [{:name "Map" :type "boolean"}]})) (defn rollback [])
null
https://raw.githubusercontent.com/caribou/caribou-core/6ebd9db4e14cddb1d6b4e152e771e016fa9c55f6/src/caribou/migrations/field_map.clj
clojure
(ns caribou.migrations.field-map (:require [caribou.config :as config] [caribou.model :as model])) (defn migrate [] (model/update :model (model/models :field :id) {:fields [{:name "Map" :type "boolean"}]})) (defn rollback [])
145ffc7ddb43f778b6aa0ed44b691d10496e09abe22dc11cf320e3d051a2b179
riverford/durable-ref
nippy.clj
(ns riverford.durable-ref.format.nippy (:require [clojure.java.io :as io] [taoensso.nippy :as nippy] [riverford.durable-ref.core :as dref]) (:import (java.io ByteArrayOutputStream))) (defmethod dref/serialize "nippy" [obj _ opts] (nippy/freeze obj (-> opts :format :nippy :write-opts...
null
https://raw.githubusercontent.com/riverford/durable-ref/f18402c07549079fd3a1c8d2595f893a055851de/src/riverford/durable_ref/format/nippy.clj
clojure
(ns riverford.durable-ref.format.nippy (:require [clojure.java.io :as io] [taoensso.nippy :as nippy] [riverford.durable-ref.core :as dref]) (:import (java.io ByteArrayOutputStream))) (defmethod dref/serialize "nippy" [obj _ opts] (nippy/freeze obj (-> opts :format :nippy :write-opts...
ae6ce36715941dde62efc8552963075125c760c7fd231c2f5862cc99ce23fcf6
broadinstitute/wfl
tsv.clj
(ns wfl.tsv "Read and write Terra's tab-separated value (.tsv) files." (:refer-clojure :exclude [read]) (:require [clojure.data.csv :as csv] [clojure.data.json :as json] [clojure.edn :as edn] [clojure.java.io :as io]) (:import [java.io Reader StringReader StringWrite...
null
https://raw.githubusercontent.com/broadinstitute/wfl/a3b3fdff3d351270fcda3ec686f0be13d7c560a3/api/src/wfl/tsv.clj
clojure
HACK: Post-process CSV to avoid writing a full-blown parser.
(ns wfl.tsv "Read and write Terra's tab-separated value (.tsv) files." (:refer-clojure :exclude [read]) (:require [clojure.data.csv :as csv] [clojure.data.json :as json] [clojure.edn :as edn] [clojure.java.io :as io]) (:import [java.io Reader StringReader StringWrite...
553f831f507e9032f424cf85eb02623f432d16ee9a4910625542fc1a5536cb00
bobzhang/ocaml-book
grammar.ml
# require " camlp4.gramlib " ; ; open Camlp4.PreCast module MGram = MakeGram(Lexer) let test = MGram.Entry.mk "test" let p = MGram.Entry.print let _ = begin MGram.Entry.clear test; EXTEND MGram GLOBAL: test; test: ["add" LEFTA [SELF; "+" ; SELF | SELF; "-" ; SELF] | "mult" RIGHTA [SELF; "*" ; S...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/camlp4/code/grammar.ml
ocaml
* output test: [ "add" LEFTA [ SELF; "+"; SELF | SELF; "-"; SELF ] | "mult" RIGHTA [ SELF; "*"; SELF | SELF; "/"; SELF ] | "simple" NONA [ "("; SELF; ")" | INT ((_)) ] ] * output test: [ "add" LEFTA [ SELF; "plus1plus"; SELF | SELF; "+"; SELF | SELF...
# require " camlp4.gramlib " ; ; open Camlp4.PreCast module MGram = MakeGram(Lexer) let test = MGram.Entry.mk "test" let p = MGram.Entry.print let _ = begin MGram.Entry.clear test; EXTEND MGram GLOBAL: test; test: ["add" LEFTA [SELF; "+" ; SELF | SELF; "-" ; SELF] | "mult" RIGHTA [SELF; "*" ; S...
e9037f32db8e5cb0e564845181acc640e932c5a1e1cb0a883bc287677e201b96
nlamirault/climc
commands.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: commands.lisp Purpose : commands for the IM client . Programmer : < > ;;;; ;;;; climc users are granted t...
null
https://raw.githubusercontent.com/nlamirault/climc/35a64a34d17c96708c14c08d1335352f1a4f96ee/src/commands.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- ************************************************************************* FILE IDENTIFICATION Name: commands.lisp climc users are granted the rights to distribute and use this software -license.php *********************************************************...
Purpose : commands for the IM client . Programmer : < > as governed by the terms of the MIT License : (in-package :climc) (define-im-client-command (com-quit :name t :menu nil :keystroke (#\q :control)) () (clim:frame-exit *im-client*)) (define-im-client-comman...
4bc5c49cb8cce72926abb70c29b059045b07ede02095dcd3b63a9a1d4f60b18e
kappelmann/eidi2_repetitorium_tum
Doubly_Ended_List_Impl.ml
let todo _ = failwith "Something is not implemented" open Doubly_Ended_List Achten Sie bei der Implementierung auf eine möglichst effiziente Laufzeit (* module DoublyEndedListImpl ... *) (* few test cases *) open DoublyEndedListImpl let l = empty let rec push op l v = List.fold_left (fun l x -> op l x) l v let ...
null
https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/2017/ocaml/data_structures/exercises/doubly_ended_list/Doubly_Ended_List_Impl.ml
ocaml
module DoublyEndedListImpl ... few test cases
let todo _ = failwith "Something is not implemented" open Doubly_Ended_List Achten Sie bei der Implementierung auf eine möglichst effiziente Laufzeit open DoublyEndedListImpl let l = empty let rec push op l v = List.fold_left (fun l x -> op l x) l v let l = push push_front l [5;4;3;2;1] let l = push push_back l...
f88160344005ea58862734397530142597fc6f4e6b157ff9b349c119f5205240
VisionsGlobalEmpowerment/webchange
teacher.cljc
(ns webchange.validation.specs.teacher (:require [clojure.spec.alpha :as s] [webchange.validation.predicates :as p])) (def email-regex #"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$") (def status? #{"active", "inactive"}) (def type? #{"admin", "teacher"}) (s/def ::first-name p/not-empty-string?) (s/d...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/fac5273065559ac53becf059cfc84054d2e352df/src/cljc/webchange/validation/specs/teacher.cljc
clojure
(ns webchange.validation.specs.teacher (:require [clojure.spec.alpha :as s] [webchange.validation.predicates :as p])) (def email-regex #"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,63}$") (def status? #{"active", "inactive"}) (def type? #{"admin", "teacher"}) (s/def ::first-name p/not-empty-string?) (s/d...
db5f34ea127f6ecde5bb1ade6fd95f5b88fbd68562abea69297cb43ad7cf840d
rabbitmq/rabbitmq-sharding
rabbit_sharding_exchange_decorator.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_sharding_exchange_decorator). -ra...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-sharding/722f8165f156b03ffa2cb7890999b8c37446d3a6/src/rabbit_sharding_exchange_decorator.erl
erlang
---------------------------------------------------------------------------- and then add the new one. ----------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_sharding_exchange_decorator). -rabbit_b...
fd45f75f2f3baadb162a30321b4ae86ac2eea6ee7f8967b7fb44691b06efdb15
RedPRL/asai
Flattened.ml
(** Styles *) type style = Marked.style (** A point with a style. *) type marked_point = {style : style option; position : Asai.Span.position} (** Flattened spans in a block. *) type block = marked_point list * A collection of flattened blocks from a file . ( The first component is the file path . ) type section = s...
null
https://raw.githubusercontent.com/RedPRL/asai/213c2d926bf51c81f209767fd3a1499151cad22e/src/file/Flattened.ml
ocaml
* Styles * A point with a style. * Flattened spans in a block.
type style = Marked.style type marked_point = {style : style option; position : Asai.Span.position} type block = marked_point list * A collection of flattened blocks from a file . ( The first component is the file path . ) type section = string * block list
c9a1e1446ea65422515df968f99f1794e2df8eb29bfa33f327c8daf554cfcca9
hyperfiddle/electric
analyzer1.cljc
(ns leo.analyzer1 (:require [missionary.core :as m] [dustin.trace28 :refer [let-bindings translate-binding]] [minitest :refer [tests]] [clojure.string :as str])) (defn analyze-let [ast {:keys [passives replayer-sym]}] (let [bindings (let-bindings ast) syms (distinct (map first b...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/leo/analyzer1.cljc
clojure
shadowing change this form
(ns leo.analyzer1 (:require [missionary.core :as m] [dustin.trace28 :refer [let-bindings translate-binding]] [minitest :refer [tests]] [clojure.string :as str])) (defn analyze-let [ast {:keys [passives replayer-sym]}] (let [bindings (let-bindings ast) new-bindings (mapcat (partial trans...
3637589a3ef01883b7308f085be5885556d0061611d419daeeb2fe3147c8d0d7
wireapp/wire-server
Client.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE StrictData #-} -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as publishe...
null
https://raw.githubusercontent.com/wireapp/wire-server/6c4b00ec111e853871564687862a19658d04ea4f/libs/wire-api/src/Wire/API/User/Client.hs
haskell
# LANGUAGE StrictData # This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY...
# LANGUAGE GeneralizedNewtypeDeriving # Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public Licens...
de2a17faef92c932e7770ac05bd832149cff6ec0bdd05b210a77156e6824cf3f
CSCfi/rems
test_end_to_end.clj
(ns ^:integration rems.api.test-end-to-end "Go from zero to an approved application via the API. Check that all side-effects happen." (:require [clojure.test :refer :all] [rems.api.testing :refer :all] [rems.application.approver-bot :as approver-bot] [rems.application.bona-fide-b...
null
https://raw.githubusercontent.com/CSCfi/rems/1530afdce724dd6a68b2912bc281dacec39f6cf2/test/clj/rems/api/test_end_to_end.clj
clojure
we could start the pollers normally and wait for them to process the events here for better coverage
(ns ^:integration rems.api.test-end-to-end "Go from zero to an approved application via the API. Check that all side-effects happen." (:require [clojure.test :refer :all] [rems.api.testing :refer :all] [rems.application.approver-bot :as approver-bot] [rems.application.bona-fide-b...
0ecf7c87a3f8218c9d0177a3c9653f61cfa8e261cc9b5d69930e44b587f6a569
hopv/homusat
ACG.ml
(* Abstract Configuration Graph *) (*** Rough sketch of the construction process ***) 0 . Set ( F_{1 } , { q_{0 } } ) as the root 1 . For each node ( F \phi_{1 } ... \phi_{\ell } , P ) , where an equation of the form F X_{1 } ... X_{\ell } = _ { \alpha } \psi_{F } is in the HES , 1.0 . Add bindings of th...
null
https://raw.githubusercontent.com/hopv/homusat/cc05711a3f9d45b253b83ad09a2d0288115cc4f4/ACG.ml
ocaml
Abstract Configuration Graph ** Rough sketch of the construction process ** Might be better to define as a record type { nodes; flows; rev_flows } The set of states reachable through a modal operator Append zss as additional arguments to the formula fml assert (zss = []); Update an old node Already up-to-d...
0 . Set ( F_{1 } , { q_{0 } } ) as the root 1 . For each node ( F \phi_{1 } ... \phi_{\ell } , P ) , where an equation of the form F X_{1 } ... X_{\ell } = _ { \alpha } \psi_{F } is in the HES , 1.0 . Add bindings of the form X_{k } < ~ \phi_{k } 1.1 . Add ( \psi_{F } , P ) as a child node ( if ther...
2c90eea7c06296574ea1447905433da445498d1b43aa09574246c457cca8aaaf
spawngrid/cowboy_session
cowboy_session_server.erl
-module(cowboy_session_server). -behaviour(gen_server). %% API -export([start_link/3, command/2, handler_state/1, session_id/1, session_id/2, touch/1, stop/1]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(sta...
null
https://raw.githubusercontent.com/spawngrid/cowboy_session/515c17c42b414ce516468c3c3236c2f16ca16482/src/cowboy_session_server.erl
erlang
API gen_server callbacks =================================================================== API =================================================================== -------------------------------------------------------------------- @doc Starts the server @end ---------------------------------------------------...
-module(cowboy_session_server). -behaviour(gen_server). -export([start_link/3, command/2, handler_state/1, session_id/1, session_id/2, touch/1, stop/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -record(state, { handler, han...
4069bf1e5bd01778edc6373eaebcfb5d26de20644ecc4b0ce2559bb77e3dd0ac
hopv/MoCHi
set_.ml
open Util open Combinator (** Sets (aka lists modulo permutation and contraction) *) type 'a t = 'a list let subset ?(cmp = (=)) l1 l2 = List.for_all (fun x -> List.mem ~cmp:cmp x l2) l1 let equiv ?(cmp = (=)) l1 l2 = subset ~cmp:cmp l1 l2 && subset ~cmp:cmp l2 l1 let intersects ?(cmp = (=)) l1 l2 = List.exist...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/set_.ml
ocaml
* Sets (aka lists modulo permutation and contraction) let rec diff xs ys = match xs, ys with | [], [] | [], _ | _, [] -> xs | x' :: xs', ys -> if List.mem x' ys then diff xs' ys else x' :: diff xs' ys * @invariant Set_.equiv (s1 @ s2) s
open Util open Combinator type 'a t = 'a list let subset ?(cmp = (=)) l1 l2 = List.for_all (fun x -> List.mem ~cmp:cmp x l2) l1 let equiv ?(cmp = (=)) l1 l2 = subset ~cmp:cmp l1 l2 && subset ~cmp:cmp l2 l1 let intersects ?(cmp = (=)) l1 l2 = List.exists (fun x -> List.mem ~cmp:cmp x l2) l1 let disjoint ?(cmp =...
5356c89342cba2a08496ae06ab66e0b603bda9dda29519d98bd1ba87292d0dff
bgamari/xmonad-config
Property.hs
{-# LANGUAGE OverloadedStrings #-} module Property ( -- * Properties PropertyName , getProperty , setProperty -- * Utilities , safeCall , safeCall_ ) where import DBus import DBus.Client...
null
https://raw.githubusercontent.com/bgamari/xmonad-config/14b93954ef89531161d5a02f94246c3a502fb18d/xmonad-ben/lib/Property.hs
haskell
# LANGUAGE OverloadedStrings # * Properties * Utilities
PropertyName , getProperty , setProperty , safeCall , safeCall_ ) where import DBus import DBus.Client (Client, call) import Data.String (IsString(..)) import Control.Error import Control.Monad (void) newtype PropertyNa...
f9e26dec0135d491098a1c2c14b70c796e258b74232524103dc8e9804d9fa3d9
theosotr/buildfs
syntax.mli
* Copyright ( c ) 2018 - 2020 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , version 3 . * * This program is distributed in the hope that it will be useful , but ...
null
https://raw.githubusercontent.com/theosotr/buildfs/3cd287da0d1184934c1bcd28d301f2545196f44b/src/analysis/syntax.mli
ocaml
* The name of the system call. * The string corresponding to the arguments of the system call. * The return value of the system call. * The error type and message of a failed system call. * The line where the system call appears in traces. * A record that stores all the information of a certain system call trace...
* Copyright ( c ) 2018 - 2020 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , version 3 . * * This program is distributed in the hope that it will be useful , but ...
9971750a712313bbacaf687f6a811fe0aeaebb73e95e6a43a6e6a15453fe61c1
dbuenzli/hyperbib
home_html.mli
--------------------------------------------------------------------------- Copyright ( c ) 2021 University of Bern . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/dbuenzli/hyperbib/04a09ae1036c68a45114c080206364fecb64b7f6/src/html/home_html.mli
ocaml
* The home page.
--------------------------------------------------------------------------- Copyright ( c ) 2021 University of Bern . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
3957e67a98f6192290b8677d7475825a6323dcd6e8aef63e352c10517c09dc10
abarbu/haskell-torch
T11_VAE.hs
# LANGUAGE AllowAmbiguousTypes , CPP , ConstraintKinds , DataKinds , , DeriveGeneric , FlexibleContexts , FlexibleInstances # # LANGUAGE FunctionalDependencies , GADTs , OverloadedLabels , OverloadedStrings , PartialTypeSignatures , PolyKinds , QuasiQuotes # # LANGUAGE RankNTypes , RecordWildCards , ScopedT...
null
https://raw.githubusercontent.com/abarbu/haskell-torch/e0afcaf81b78e9211ba120dcd247f9a6112b57ab/haskell-torch-examples/src/Torch/Tutorial/Intro/T11_VAE.hs
haskell
# OPTIONS_GHC -fconstraint-solver-iterations=10 -fdefer-typed-holes # # OPTIONS_GHC -Wno-partial-type-signatures # Compute reconstruction loss and kl divergence or Sample an image from tha latent space Reconstruct images from the dataset
# LANGUAGE AllowAmbiguousTypes , CPP , ConstraintKinds , DataKinds , , DeriveGeneric , FlexibleContexts , FlexibleInstances # # LANGUAGE FunctionalDependencies , GADTs , OverloadedLabels , OverloadedStrings , PartialTypeSignatures , PolyKinds , QuasiQuotes # # LANGUAGE RankNTypes , RecordWildCards , ScopedT...
5f513a6be54091abece849eb4c7d0192ed28989282716f8c6d8564839b8dd6f6
marick/lein-midje
project.clj
(defproject {{name}} "0.0.1-SNAPSHOT" :description "Cool new project to do things and stuff" :dependencies [[org.clojure/clojure "1.7.0"]] :profiles {:dev {:dependencies [[midje "1.7.0"]]} You can add dependencies that apply to ` ` below . ;; An example would be changing the logging destination f...
null
https://raw.githubusercontent.com/marick/lein-midje/71a98ad1da2b94ed7050cc6b99be798ef3b3837e/src/leiningen/new/midje/project.clj
clojure
An example would be changing the logging destination for test runs. running autotest in the repl.
(defproject {{name}} "0.0.1-SNAPSHOT" :description "Cool new project to do things and stuff" :dependencies [[org.clojure/clojure "1.7.0"]] :profiles {:dev {:dependencies [[midje "1.7.0"]]} You can add dependencies that apply to ` ` below . :midje {}}) Note that itself is in the ` dev ` profile...
2186da18ad7b690d123ec47741a23503379930dbc7002ec52b40311dd2cb03c4
alura-cursos/clojure-introducao
aula5.clj
(ns curso.aula5) (def estoque {"Mochila" 10 "Camiseta" 5}) (println estoque) (def estoque {"Mochila" 10, "Camiseta" 5}) (def estoque {"Mochila" 10 "Camiseta" 5}) (println estoque) (println "Temos" (count estoque) "elementos") (println "Chaves são:" (keys estoque)) (println "Valores são:" (vals estoqu...
null
https://raw.githubusercontent.com/alura-cursos/clojure-introducao/9b37f6cca3c33dd2382a3b44c87896d33e0246ae/src/curso/aula5.clj
clojure
keyword get com valor default THREADING FIRST
(ns curso.aula5) (def estoque {"Mochila" 10 "Camiseta" 5}) (println estoque) (def estoque {"Mochila" 10, "Camiseta" 5}) (def estoque {"Mochila" 10 "Camiseta" 5}) (println estoque) (println "Temos" (count estoque) "elementos") (println "Chaves são:" (keys estoque)) (println "Valores são:" (vals estoqu...
20a42e68baa26b329e130b9c020b4735f151170772d96353f0308e7b1e4ecc48
project-oak/hafnium-verification
Propset.mli
* Copyright ( c ) 2009 - 2013 , Monoidics ltd . * Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2009-2013, Monoidics ltd. * Copyright (c) Facebook, In...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/biabduction/Propset.mli
ocaml
* Functions for Sets of Propositions with and without sharing * Compare propsets * Set membership. * Set union. * Set intersection * Set difference. * The empty set of propositions. * Size of the set * [fold f pset a] computes [(f pN ... (f p2 (f p1 a))...)], where [p1 ... pN] are the elements of pset, in i...
* Copyright ( c ) 2009 - 2013 , Monoidics ltd . * Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) 2009-2013, Monoidics ltd. * Copyright (c) Facebook, In...
047c0138d24ad29f2f822e563bce50a74b1dc13495de94137d43bf71c0b3e511
monadbobo/ocaml-core
constrained_float.ml
open Std_internal module type S = sig type t = private float include Sexpable with type t := t include Binable with type t := t include Comparable_binable with type t := t include Hashable_binable with type t := t include Robustly_comparable with type t := t include Stringable with type t := t include...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/constrained_float.ml
ocaml
open Std_internal module type S = sig type t = private float include Sexpable with type t := t include Binable with type t := t include Comparable_binable with type t := t include Hashable_binable with type t := t include Robustly_comparable with type t := t include Stringable with type t := t include...
8204a5975ddf092be8b47dd2f29a874223fd7d45b129e2aa07839e5063a4d31e
cnr/cgroup-rts-threads
Types.hs
-- | Parsers and types related to cgroups and mounts module System.CGroup.Types ( -- * CPU quotas CPUQuota (..), -- * raw cgroups as viewed in \/proc\/$PID\/cgroup RawCGroup (..), parseCGroups, * mounts as viewed in \/proc\/$PID\/mountinfo Mount (..), parseMountInfo, -- * Parser type Parser, pa...
null
https://raw.githubusercontent.com/cnr/cgroup-rts-threads/02ad7228948339705faeb789702fcbfb3c823ab1/src/System/CGroup/Types.hs
haskell
| Parsers and types related to cgroups and mounts * CPU quotas * raw cgroups as viewed in \/proc\/$PID\/cgroup * Parser type -------- CPU quotas | A CPU quota is the ratio of CPU time our process can use relative to the scheduler period For example: @ | ratio | description | | ---------------- | ...
module System.CGroup.Types ( CPUQuota (..), RawCGroup (..), parseCGroups, * mounts as viewed in \/proc\/$PID\/mountinfo Mount (..), parseMountInfo, Parser, parseFile, ) where import Control.Exception (throwIO) import Data.Char (isSpace) import Data.Ratio import Data.Text (Text) import qualified Data...
3d232477dc0879471926060be408a17b846d2a378221ef55fe3ee0297be3ad54
RedPRL/asai
Syntax.ml
open Asai type tm = tm_ Span.located and tm_ = | Var of string | Lam of string * tm | Ap of tm * tm | Pair of tm * tm | Fst of tm | Snd of tm | Lit of int | Suc of tm | NatRec of tm * tm * tm and tp = | Fun of tp * tp | Tuple of tp * tp | Nat let rec pp_tp fmt = function | Fun (a, b) -> ...
null
https://raw.githubusercontent.com/RedPRL/asai/5b06a62676987923a76729ddc4765505aa2cabf8/examples/stlc/Syntax.ml
ocaml
open Asai type tm = tm_ Span.located and tm_ = | Var of string | Lam of string * tm | Ap of tm * tm | Pair of tm * tm | Fst of tm | Snd of tm | Lit of int | Suc of tm | NatRec of tm * tm * tm and tp = | Fun of tp * tp | Tuple of tp * tp | Nat let rec pp_tp fmt = function | Fun (a, b) -> ...
14953b414097f4ea3b6b68e521a3b21997747385eae715a4ad84ac677f359595
gonzojive/elephant
query-utils.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;; query-utils.lisp -- sets , predicates , etc . ;;; Copyright ( c ) 2009 ;;; <ieslick common-lisp net> ;;; ;;; part of ;;; Elephant : an object - oriented database for Common Lisp ;;; ;;; Elephant users are granted the rights to distribute and...
null
https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/src/elephant/query-utils.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- <ieslick common-lisp net> part of Elephant users are granted the rights to distribute and use this software (), also known as the LLGPL. ================================= Simple query sets ================================= NOTE: Optimize away comparisons w...
query-utils.lisp -- sets , predicates , etc . Copyright ( c ) 2009 Elephant : an object - oriented database for Common Lisp as governed by the terms of the Lisp Lesser GNU Public License (in-package :elephant) (defclass simple-set () ((recs :initarg :recs :accessor set-recs :initform nil) (seq :initar...
54405c5bcbe461b41394d41b8f3eec15173192578df3db7c66d38675f9858c80
zotonic/template_compiler
template_compiler_operators.erl
@author < > 2010 - 2022 %% @doc Operators for expression evaluation in templates Copyright 2010 - 2022 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 ...
null
https://raw.githubusercontent.com/zotonic/template_compiler/a92e9bdac8beba1e4ef68f5151ad528b3f0713fb/src/template_compiler_operators.erl
erlang
@doc Operators for expression evaluation in templates 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. ...
@author < > 2010 - 2022 Copyright 2010 - 2022 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(template_compiler_operators). -author("Marc Worrell <>"). -export([ 'not'/3, 'xor'/4, 'and'/4,...
5d42174bc354e89d00a269ee14fa0dd9a2141570df1527b2d73c7cd49495fac2
mirage/decompress
lzo.mli
type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t type error = [ `Malformed of string | `Invalid_argument of string | `Invalid_dictionary ] val pp_error : Format.formatter -> error -> unit val uncompress : bigstring -> bigstring -> (bigstring, [> error ]) result * [ uncompr...
null
https://raw.githubusercontent.com/mirage/decompress/e7e4804047e796b1da6e5181857b49f9ac1c9d1c/lib/lzo.mli
ocaml
* Type of an internal {i hash-table} used by {!compress}.
type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t type error = [ `Malformed of string | `Invalid_argument of string | `Invalid_dictionary ] val pp_error : Format.formatter -> error -> unit val uncompress : bigstring -> bigstring -> (bigstring, [> error ]) result * [ uncompr...
868112c4e8c429963104d45ef234b3abeded1b8d255d6c9aed56e61ab9bf6353
digitallyinduced/ihp
ApplicationGenerator.hs
module IHP.IDE.CodeGen.ApplicationGenerator (buildPlan) where import IHP.Prelude import IHP.IDE.CodeGen.Types buildPlan :: Text -> IO (Either Text [GeneratorAction]) buildPlan applicationName = if (null applicationName) then do pure $ Left "Application name cannot be empty" else do ...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/ca4691970a130a1589506c66fe8257ac8670e905/IHP/IDE/CodeGen/ApplicationGenerator.hs
haskell
module IHP.IDE.CodeGen.ApplicationGenerator (buildPlan) where import IHP.Prelude import IHP.IDE.CodeGen.Types buildPlan :: Text -> IO (Either Text [GeneratorAction]) buildPlan applicationName = if (null applicationName) then do pure $ Left "Application name cannot be empty" else do ...
ecaa37c483dbb53988f2655ec770051bd7a1873373c5c9b3f23800ffe5d7ce3a
Deducteam/Logipedia
holstt.ml
module BasicHol = struct Defining basic hol structures : terms , types , proofs (* Inspired from HOL Light fusion files *) type tyOp = string type const = string type hol_type = Tyvar of string | Tyapp of tyOp * hol_type list let dummy_type = Tyvar("dummy") type term = Var of string *...
null
https://raw.githubusercontent.com/Deducteam/Logipedia/09797a35ae36ab671e40e615fcdc09a7bba69134/src/sttfa/holstt.ml
ocaml
Inspired from HOL Light fusion files Handling names, namespaces, and basic names coming from sttfa Sequent("TRUTH",[],mk_true_term (), Define conjunction Apply a beta-conversion to the right-hand side/left-hand side of a binary op Beta-reduce right-hand side of the definition of and Same for implication Sa...
module BasicHol = struct Defining basic hol structures : terms , types , proofs type tyOp = string type const = string type hol_type = Tyvar of string | Tyapp of tyOp * hol_type list let dummy_type = Tyvar("dummy") type term = Var of string * hol_type | Const of const * hol_type ...
d6a651e1d0e882237aca29ef8cfcad10215003e01dcc8242e8393a5e89c442aa
ashinn/alschemist
base.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Images - 3D arrays of width*height*color-channel (define-record-type Image (%make-image array color-space) image? (array image-array) (color-space image-color-space)) (define (image-width image) (let ((domain (array-domain (image-a...
null
https://raw.githubusercontent.com/ashinn/alschemist/cffef6903ae5885493088b76b057225ae69e257f/chibi/image/base.scm
scheme
Images - 3D arrays of width*height*color-channel Pixmaps - 2D arrays of single-value pixels TODO: ultra-slow - implement a nearest neighbor lookup in a color cube Conversions Reshaping allows us to flatten the R, G, B components as adjacent values in the same dimension, but for a pixmap we want to join them ...
(define-record-type Image (%make-image array color-space) image? (array image-array) (color-space image-color-space)) (define (image-width image) (let ((domain (array-domain (image-array image)))) (- (interval-upper-bound domain 1) (interval-lower-bound domain 1)))) (define (image-height image) (let...