_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
8459d5963b250cf6a36e258d460e02f377fcef09bf173203817369a1aefaa136
calyau/maxima
defint.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/src/defint.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; ; ; this...
(in-package :maxima) (macsyma-module defint) appropriate method for the integral in question . the first thing that References are to " Evaluation of Definite Integrals by Symbolic Manipulation " , by , dintegrate . this program first sees if the limits of integration are 0,inf or , . if so it send...
576173afe0f4e1569daf1bd14cc0d195259f1bab714548a23d08c7e75d7d013c
TrustInSoft/tis-kernel
mem_dependencies.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/from/mem_dependencies.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
76f3070ec1a538186c6bdc081fb4a2db16ff0c782dcfaa8b56d063c619843ed9
iand675/hs-opentelemetry
Spec.hs
# OPTIONS_GHC -F - discover -optF --module - name = Spec #
null
https://raw.githubusercontent.com/iand675/hs-opentelemetry/9d839a51792bdf4f675e3f95ae7597dcd950c97c/vendors/honeycomb/test/Spec.hs
haskell
module - name = Spec #
6cf7fb3fb0399f9a60f4878bb5082975eb246748c3ad6f91c584ab39ddc4e907
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
BankConnectionsResourceLinkAccountSessionFilters.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the types generated from the schema BankConnectionsResourceLinkAccountSessionFilters module StripeAPI.Types.Ban...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/BankConnectionsResourceLinkAccountSessionFilters.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the types generated from the schema BankConnectionsResourceLinkAccountSessionFilters | countries: List of countries from which to filter accounts. | Create a new 'BankConnectionsResourceLinkAccountSessionFilters' with all required fields.
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Types.BankConnectionsResourceLinkAccountSessionFilters where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Enc...
549ca588f02a41936646b3285c2c74400dd0d00160250346808d53aae46239cc
waldheinz/ads
Network.hs
module Network ( MsgPassNet, mkMsgPassNet, MsgPassAddress, mkAddress ) where import Control.Concurrent ( forkIO ) import Control.Concurrent.STM import Control.Monad ( liftM2, void ) import Data.Conduit import Data.Conduit.TQueue import qualified Data.HashMap....
null
https://raw.githubusercontent.com/waldheinz/ads/7695a157d76f35849351b2e039890eae1b419088/src/sandbox/Network.hs
haskell
module Network ( MsgPassNet, mkMsgPassNet, MsgPassAddress, mkAddress ) where import Control.Concurrent ( forkIO ) import Control.Concurrent.STM import Control.Monad ( liftM2, void ) import Data.Conduit import Data.Conduit.TQueue import qualified Data.HashMap....
18b4d1fd4ad51184a39e57983e30c9303945d1c2accefd843fd3b544fe14816a
thheller/shadow-arborist
arborist.cljs
(ns shadow.arborist {:doc "Arborists generally focus on the health and safety of individual plants and trees." :definition ""} (:require-macros [shadow.arborist] [shadow.arborist.fragments]) (:require [shadow.arborist.protocols :as p] [shadow.arborist.fragments :as frag] [shadow.arborist.at...
null
https://raw.githubusercontent.com/thheller/shadow-arborist/39aef8d4361005f3217dc9bab1862aebc56d5990/src/main/shadow/arborist.cljs
clojure
FIXME: this works but shouldn't be used directly? FIXME: to be ->> friendly this should take coll last?
(ns shadow.arborist {:doc "Arborists generally focus on the health and safety of individual plants and trees." :definition ""} (:require-macros [shadow.arborist] [shadow.arborist.fragments]) (:require [shadow.arborist.protocols :as p] [shadow.arborist.fragments :as frag] [shadow.arborist.at...
ce78df68fbd3a61738d252ed4448820e2686ee8b4d7a35e23336852738e76ccd
ucsd-progsys/dsolve
demo_mapreduce.ml
let rec len = function | [] -> 0 | x::xs -> 1 + (len xs) let rec expand f xs = match xs with | [] -> [] | x::xs' -> (f x) @ (expand f xs') let rec insert t x = let (key,value) = x in match t with | [] -> [(key,[value])] | (k,vs)::t' -> if k = key then (k, v...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/demo/demo_mapreduce.ml
ocaml
let rec len = function | [] -> 0 | x::xs -> 1 + (len xs) let rec expand f xs = match xs with | [] -> [] | x::xs' -> (f x) @ (expand f xs') let rec insert t x = let (key,value) = x in match t with | [] -> [(key,[value])] | (k,vs)::t' -> if k = key then (k, v...
b0e1a5337fcabdda6ed0a9611c5fdfd53194c3f8557c92defc4b745f9c7bd9de
dtenny/clj-con
clj-con.lisp
(in-package :clj-con) TBD , whether to support a reader macro for ` @ ` on promises , futures , and so on , ;;; that expands to `deref`. ;;; TBD, if we were to implement `locking`, it'd be nice to implment wait() and notify() ;;; and notifyAll() with some kind of monitor implementation. You could also do a poor ma...
null
https://raw.githubusercontent.com/dtenny/clj-con/78c6c3e1170281506b7d4dae40f467daf071416c/clj-con.lisp
lisp
that expands to `deref`. TBD, if we were to implement `locking`, it'd be nice to implment wait() and notify() and notifyAll() with some kind of monitor implementation. You could also do a poor man's Meanwhile, you'll notice there's no `locking` exported by this module. Behavior of futures with respect to the foll...
(in-package :clj-con) TBD , whether to support a reader macro for ` @ ` on promises , futures , and so on , CLOS inheritance of some kind of ' monitored ' class , which added the support . support has a ' broadcast ' operation to wake them all , but Bordeaux threads does not ( and I 'm trying to stick wit...
67f6160e2a9d739f88c3497c81548ebc541d45f911aab08a0c27520d1490fa42
spurious/sagittarius-scheme-mirror
validators.scm
(import (rnrs) (text json schema validators) (srfi :133) (srfi :64)) (test-begin "JSON Schema validators") (define (test-validator validator . expected*) (define (wrap validator) (lambda (e) (with-exception-handler (lambda (e) #f) (lambda () (validator e))))) (let ((wrapped-validator (w...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/text/json/schema/validators.scm
scheme
core From the specification { "$id": "", "definitions": { "A": { "$id": "#foo" }, "B": { "$id": "other.json", "definitions": { "X": { "$id": "#bar" }, "Y": { "$id": "t/inner.json" } } }, "C": { ...
(import (rnrs) (text json schema validators) (srfi :133) (srfi :64)) (test-begin "JSON Schema validators") (define (test-validator validator . expected*) (define (wrap validator) (lambda (e) (with-exception-handler (lambda (e) #f) (lambda () (validator e))))) (let ((wrapped-validator (w...
01a23e15771f520bd4ea8dbd3f7bf4299b28652add41aa1f1f0771b151f1c6a2
janestreet/async_js
rpc.ml
module Async_js_debug = Debug open Core open Async_kernel open Js_of_ocaml module Uri = struct include Uri let sexp_of_t = Uri_sexp.sexp_of_t end module Websocket_connection = struct module T = Async_rpc_kernel.Rpc.Connection type ('rest, 'implementations) client_t = ?uri:Uri.t -> ?heartbeat_config:...
null
https://raw.githubusercontent.com/janestreet/async_js/62552d1496525871459e8f691c29d89fb76ff71c/src/rpc.ml
ocaml
this can fail if [reason] is too long or contains invalid UTF8 e.g. SECURITY_ERR, though note that e.g. connecting to ws:// from a https:// page in chrome seems to manifest as successful construction but immediate closure (see below). If we haven't connected yet, then connecting just failed. Oth...
module Async_js_debug = Debug open Core open Async_kernel open Js_of_ocaml module Uri = struct include Uri let sexp_of_t = Uri_sexp.sexp_of_t end module Websocket_connection = struct module T = Async_rpc_kernel.Rpc.Connection type ('rest, 'implementations) client_t = ?uri:Uri.t -> ?heartbeat_config:...
1398081a7464c577d73f32b64f7e03704df4f93a412892adb7613e21fff71351
kind2-mc/kind2
hashcons.mli
(**************************************************************************) (* *) Copyright ( C ) (* *) (* This software is free software;...
null
https://raw.githubusercontent.com/kind2-mc/kind2/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/utils/hashcons.mli
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking * Hash tables for hash consing Hash consed values are of the following type [ hash_consed ] . The field...
043fece72376c494be8a922955d925b3c6b9c107d7d2fc38608ce2c9bc273298
GetShopTV/swagger2
TypeShape.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Data.Swagger.Internal.TypeShape where import Data.Proxy import GHC.Generics import GHC.TypeLits import GHC.Exts (Constraint) -- | Shape of a datatype. data TypeShape ...
null
https://raw.githubusercontent.com/GetShopTV/swagger2/51f2108826dff2a0c31b581025e8f9f9b29accb1/src/Data/Swagger/Internal/TypeShape.hs
haskell
# LANGUAGE ConstraintKinds # | Shape of a datatype. ^ A simple enumeration. ^ A product or a sum of non-unit products. ^ Mixed sum type with both unit and non-unit constructors. | A combined shape for a product type. | A combined shape for a sum type. | Infer a 'TypeShape' for a generic representation of a type.
# LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Data.Swagger.Internal.TypeShape where import Data.Proxy import GHC.Generics import GHC.TypeLits import GHC.Exts (Constraint) data TypeShape type family ProdCombine (a :: TypeShape) (b :: TypeShape) :...
d7c3e73112d9bcba15e27b930c6501356213a19a636cefe2cbcc170e6974db74
mirage/mirage-tcpip
tcp_socket.ml
open Lwt type error = [ Tcpip.Tcp.error | `Exn of exn ] type write_error = [ Tcpip.Tcp.write_error | `Exn of exn ] let pp_error ppf = function | #Tcpip.Tcp.error as e -> Tcpip.Tcp.pp_error ppf e | `Exn e -> Fmt.exn ppf e let pp_write_error ppf = function | #Tcpip.Tcp.write_error as e -> Tcpip.Tcp.pp_write_erro...
null
https://raw.githubusercontent.com/mirage/mirage-tcpip/3ab30ab7b43dede75abf7b37838e051e0ddbb23a/src/stack-unix/tcp_socket.ml
ocaml
open Lwt type error = [ Tcpip.Tcp.error | `Exn of exn ] type write_error = [ Tcpip.Tcp.write_error | `Exn of exn ] let pp_error ppf = function | #Tcpip.Tcp.error as e -> Tcpip.Tcp.pp_error ppf e | `Exn e -> Fmt.exn ppf e let pp_write_error ppf = function | #Tcpip.Tcp.write_error as e -> Tcpip.Tcp.pp_write_erro...
c07c363db2a81915e1428af8d5ff396630f7148271ae8c3defeef21574d1d6f4
lasp-lang/lasp-bench
lasp_bench_measurement.erl
%% ------------------------------------------------------------------- %% %% lasp_bench: Benchmarking Suite %% Copyright ( c ) 2009 - 2010 Basho Techonologies %% 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 ...
null
https://raw.githubusercontent.com/lasp-lang/lasp-bench/d9b3e78d64ea4709ca10ec062c7fc969c1c503d4/src/lasp_bench_measurement.erl
erlang
------------------------------------------------------------------- lasp_bench: Benchmarking Suite 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 spec...
Copyright ( c ) 2009 - 2010 Basho Techonologies 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(lasp_bench_measurement)...
c3a873c3638a698cadf304faf2e96b940325679f00a4fac26d6623ca4e7c4336
scrintal/heroicons-reagent
face_frown.cljs
(ns com.scrintal.heroicons.solid.face-frown) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.7...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/face_frown.cljs
clojure
(ns com.scrintal.heroicons.solid.face-frown) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.7...
865b9f6ad65428a652f377bcd5c9c23186634b7cd2d3994d27e1c1fb3660b6d1
gergoerdi/clash-tinybasic
Video.hs
{-# LANGUAGE NumericUnderscores, RecordWildCards #-} # LANGUAGE ViewPatterns , LambdaCase # module Hardware.TinyBASIC.Video where import Clash.Prelude import RetroClash.Utils import RetroClash.VGA import RetroClash.Video import RetroClash.Delayed import RetroClash.Clock import Data.Maybe import Control.Monad.State ...
null
https://raw.githubusercontent.com/gergoerdi/clash-tinybasic/05df681c0478e5d3c3adfcf70af141bf7a5e6115/src/Hardware/TinyBASIC/Video.hs
haskell
# LANGUAGE NumericUnderscores, RecordWildCards # TODO: make these parameters
# LANGUAGE ViewPatterns , LambdaCase # module Hardware.TinyBASIC.Video where import Clash.Prelude import RetroClash.Utils import RetroClash.VGA import RetroClash.Video import RetroClash.Delayed import RetroClash.Clock import Data.Maybe import Control.Monad.State | 25 MHz clock , needed for the VGA mode we use . cr...
5bf4f09aef5136f4613a56d6caeeb7be18867e837fa73ad16aea67dea8c8dd97
fmi/clojure-examples
game.clj
(ns minesweeper.game (:require [clojure.pprint :refer [pprint]])) (defn random-board "Generates wXh board with n mines on random positions and [x][y] access." [w h n] (let [board (->> "_" (repeat h) (vec) (repeat w) (vec)) mines (->> (for [i (range w) ...
null
https://raw.githubusercontent.com/fmi/clojure-examples/46ec0fe7bdfdfccde1ab74a94c64dbd73ea58269/2014/01-minesweeper/src/minesweeper/game.clj
clojure
============================================================================
(ns minesweeper.game (:require [clojure.pprint :refer [pprint]])) (defn random-board "Generates wXh board with n mines on random positions and [x][y] access." [w h n] (let [board (->> "_" (repeat h) (vec) (repeat w) (vec)) mines (->> (for [i (range w) ...
edfefdbbdb7c88946ec476913f6799ea02bf66937747b4b9b6d65f71176017ff
borodust/bodge-nuklear
example.lisp
(cl:defpackage :nuklear.example (:use :cl :cffi-c-ref) (:export run)) (cl:in-package :nuklear.example) (defvar *window-width* 800) (defvar *window-height* 600) (defvar *default-output* *standard-output*) (defclass nuklear-app (bodge-host:window) ((nk-context) (nk-renderer :initform nil) (level :initform...
null
https://raw.githubusercontent.com/borodust/bodge-nuklear/40e78ccd221c9b531b9fc2891ea7ea84fbc3e934/src/example.lisp
lisp
(cl:defpackage :nuklear.example (:use :cl :cffi-c-ref) (:export run)) (cl:in-package :nuklear.example) (defvar *window-width* 800) (defvar *window-height* 600) (defvar *default-output* *standard-output*) (defclass nuklear-app (bodge-host:window) ((nk-context) (nk-renderer :initform nil) (level :initform...
bddcbba6c1969af80c156cc3df73b62aa617db66b7e84251b8bf6d7cd170d37a
sellout/haskerwaul
Decidable.hs
# language UndecidableInstances , UndecidableSuperClasses # , UndecidableSuperClasses #-} module Haskerwaul.Relation.Equality.Decidable ( module Haskerwaul.Relation.Equality.Decidable -- * extended modules , module Haskerwaul.Relation.Equality.Stable ) where import Data.Bool ...
null
https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Relation/Equality/Decidable.hs
haskell
* extended modules | [nLab](+equality)
# language UndecidableInstances , UndecidableSuperClasses # , UndecidableSuperClasses #-} module Haskerwaul.Relation.Equality.Decidable ( module Haskerwaul.Relation.Equality.Decidable , module Haskerwaul.Relation.Equality.Stable ) where import Data.Bool (Bool) import ...
6eac720fa17ebf27cc63b55aab88eebd9740a95ed48cf5cd00e543d87e54e8e2
otakar-smrz/elixir-fm
O.hs
module Elixir.Data.Moony.Foreign.O (section) where import Elixir.Lexicon lexicon = include section cluster_1 = cluster |> ['h','I','n','.','g','I','s'] <| [ _____ `xtra` {- <hIn.gIs> -} [ ['H','i','n','g','i','s'] ] ] cluster_2 = cluster |> ['h','A','w','A','\'','I'] <...
null
https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Data/Moony/Foreign/O.hs
haskell
<hIn.gIs> <hAwA'I> <hAward> <hiyU> <hiyUrAkAn> <hiyUz> <hiyUstun> <hUyAmA> <hiyUn> <hay_tam> <hrIstU> <hrbAtI> <w> <wIb> <wubI> <wUtir^gIt> <wAtirfUrd> <wItUn> <wAd> <wUdrUf> <wArin> <wArsU> <wAr.tAn> <wUrldkUm> <wUrnar> <wA^sin.tUn> <wA^sin.tun> <wIkI> <wIkIbIdi...
module Elixir.Data.Moony.Foreign.O (section) where import Elixir.Lexicon lexicon = include section cluster_1 = cluster |> ['h','I','n','.','g','I','s'] <| [ cluster_2 = cluster |> ['h','A','w','A','\'','I'] <| [ cluster_3 = cluster |> ['h','A','w','a','r','d'] <| [ cluster_4 = cluster |> ...
239e8746bab069a305793e36ded8ec19959f34b7617a22cff2b0ac44c2579897
part-cw/lambdanative
pathfinding.scm
(define very-large-integer 1000000) (define-type grid-node x y walkable? g h (previous unprintable:)) (define (grid-node-reset gn) (grid-node-walkable?-set! gn #t) (grid-node-g-set! gn very-large-integer) (grid-node-h-set! gn very-large-integer) (grid-node-previous-set! #f) gn) (define (grid-node-f grid-node)...
null
https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/pathfinding/pathfinding.scm
scheme
(define (grid-for-each-node f grid) (let ((w (grid-w grid)) (h (grid-w grid))) (let loop-y ((y 0)) (if (< y h) (begin (let loop-x ((x 0)) (if (< x w) (begin (f (grid-ref grid x y)) grid)) (loop-y (+ y 1))) grid)))) (define (grid-walkable-neighbors grid...
(define very-large-integer 1000000) (define-type grid-node x y walkable? g h (previous unprintable:)) (define (grid-node-reset gn) (grid-node-walkable?-set! gn #t) (grid-node-g-set! gn very-large-integer) (grid-node-h-set! gn very-large-integer) (grid-node-previous-set! #f) gn) (define (grid-node-f grid-node)...
6407e3db319fbb3fe541972c748903ed948c0d03977e5ed98b35ba7668acb35c
janestreet/ecaml
hook.mli
* A hook is a variable where you can store a function or functions to be called on a particular occasion by an existing program . Emacs provides hooks for the sake of customization . Hooks installed through Ecaml are wrapped in an exception handler that prints the error to the [ * Messages * ...
null
https://raw.githubusercontent.com/janestreet/ecaml/6828e48c252e7bd756e2e37a5bacefe6c4af4ba9/src/hook.mli
ocaml
* [create here return_type symbol f] defines an emacs function named [symbol] that runs [f] when called. It returns an ['a t] usable for modifying hooks. * [create_with_self here return_type symbol f] works the same as [create], except that the ['a t] it returns is also passed as an argument to [f]. ...
* A hook is a variable where you can store a function or functions to be called on a particular occasion by an existing program . Emacs provides hooks for the sake of customization . Hooks installed through Ecaml are wrapped in an exception handler that prints the error to the [ * Messages * ...
f003079a35051c730c8470abcd6f7f67264ac1559f83668976b60f5738a5a788
rtoy/cmucl
nlx.lisp
;;; -*- Package: HPPA -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/compiler/hppa/nlx.lisp $") ;;; ;;; **...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/hppa/nlx.lisp
lisp
-*- Package: HPPA -*- ********************************************************************** ********************************************************************** This file contains the definitions of VOPs used for non-local exit (throw, lexical exit, etc.) non-local entry. Save and restore dynamic...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/compiler/hppa/nlx.lisp $") Written by (in-package "HPPA") MAKE - NLX - SP - TN -- Interface Make an environment - live stack TN fo...
e0ab56154d5aa85b04c084e6242d3289ac1ccc41b7597744e4874fd3756a2999
tweag/ormolu
op-chain-r-eq-normal-out.hs
Right chain , normal case , 2 operators with p(a ) = = p(b ) e :: Int e = 1 ^^ 2 ^^ 3 ^^ 4 ^ 5 ^^ 6 ^^ 7 ^^ 8
null
https://raw.githubusercontent.com/tweag/ormolu/1f63136d047205f95b7d3c0f6aa34c34bb29ac7f/data/examples/declaration/value/function/infix/op-chain-r-eq-normal-out.hs
haskell
Right chain , normal case , 2 operators with p(a ) = = p(b ) e :: Int e = 1 ^^ 2 ^^ 3 ^^ 4 ^ 5 ^^ 6 ^^ 7 ^^ 8
9d8581851463657f38d0f423836d5790ea8d9d2621e4bdcb03bb6474f0513edd
mfikes/fifth-postulate
ns271.cljs
(ns fifth-postulate.ns271) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns271.cljs
clojure
(ns fifth-postulate.ns271) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
da6c98463cf10fc04032a7c0c449c2ecb614c2655d941346452fa9aa0e485883
spechub/Hets
SMTComparison.hs
| Module : ./CSL / SMTComparison.hs Description : SMT interface for set comparison Copyright : ( c ) , DFKI Bremen 2010 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable This module defines an interface to the...
null
https://raw.githubusercontent.com/spechub/Hets/bbaa9dd2d2e5eb1f2fd3ec6c799a6dde7dee6da2/CSL/SMTComparison.hs
haskell
-------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -} | The result states of the smt solver are translated to the adequate compare outcome. The boolean value is t...
| Module : ./CSL / SMTComparison.hs Description : SMT interface for set comparison Copyright : ( c ) , DFKI Bremen 2010 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : experimental Portability : portable This module defines an interface to the...
c9a4b92ce060708162a70cbb2359d56603a00434a7bcc7e68e232f2b18a95bae
uim/uim
yahoo-jp-key-custom.scm
yahoo-jp-custom.scm : Customization variables for yahoo-jp.scm ;;; Copyright ( c ) 2008 - 2013 uim Project ;;; ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: 1 . Redistribution...
null
https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/yahoo-jp-key-custom.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the documen...
yahoo-jp-custom.scm : Customization variables for yahoo-jp.scm Copyright ( c ) 2008 - 2013 uim Project 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of authors nor the names of its contributors T...
4cf7c8b40487d231916236aca3fa3ac9bee9ebde54ec17d03640d5b793b2119f
brandonchinn178/persistent-migration
Backends.hs
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} module Utils.Backends ( MockDatabase(..) , defaultDatabase , setDatabase , withTestBackend ) where import Control.Monad.IO.Class (liftIO) import Data.Conduit.List (sourceList) import Data.IORef (IORef, ne...
null
https://raw.githubusercontent.com/brandonchinn178/persistent-migration/8c1c1cc2df9f3eee9fe1fdf6de420a15d16daa2b/test/unit/Utils/Backends.hs
haskell
# LANGUAGE OverloadedStrings # Mock test database | The mock database backend for testing. | The default test database. | The global test database. | Set the test database. Mock SqlBackend
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # module Utils.Backends ( MockDatabase(..) , defaultDatabase , setDatabase , withTestBackend ) where import Control.Monad.IO.Class (liftIO) import Data.Conduit.List (sourceList) import Data.IORef (IORef, newIORef, readIORef, writeIORef) impo...
ac9d490d8c3b7ca785ac44a2e1639dd509a6c6114492a8fb5ebca1c29bdfcb35
sionescu/iolib
pkgdcl.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; --- Package definition. ;;; (in-package :iolib/common-lisp-user) (defpackage :iolib/os (:nicknames :iolib.os) (:use :iolib/base :iolib/pathnames :cffi) (:import-from :iolib/syscalls #:defsyscall #:sstring #:mode-t #:pid-t #:u...
null
https://raw.githubusercontent.com/sionescu/iolib/dac715c81db55704db623d8b2cfc399ebcf6175f/src/os/pkgdcl.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- --- Package definition. Evironment Processes Directories Files Symlinks Permissions Temporary files #:open-temporary-file #:with-temporary-file Password entries Specials
(in-package :iolib/common-lisp-user) (defpackage :iolib/os (:nicknames :iolib.os) (:use :iolib/base :iolib/pathnames :cffi) (:import-from :iolib/syscalls #:defsyscall #:sstring #:mode-t #:pid-t #:uid-t #:gid-t #:get-monotonic-time) (:import-from :iolib/pathnames...
aa2f4c3248074fd2f8387419c7e74ff50ad63c22ee7457fef8e5f71f573a04c6
haskellari/postgresql-simple
Copy.hs
# LANGUAGE CPP , DeriveDataTypeable # ------------------------------------------------------------------------------ -- | -- Module: Database.PostgreSQL.Simple.Copy Copyright : ( c ) 2013 License : BSD3 Maintainer : < > -- Stability: experimental -- mid - level support for COPY IN and C...
null
https://raw.githubusercontent.com/haskellari/postgresql-simple/f74cf19a8e3880be950676d7a1a4509b4e594fa7/src/Database/PostgreSQL/Simple/Copy.hs
haskell
---------------------------------------------------------------------------- | Module: Database.PostgreSQL.Simple.Copy Stability: experimental <-copy.html> for more information. To use this binding, first call 'copy' with an appropriate query as documented in the link above. Then, in the case of a @C...
# LANGUAGE CPP , DeriveDataTypeable # Copyright : ( c ) 2013 License : BSD3 Maintainer : < > mid - level support for COPY IN and COPY OUT . See returns ' CopyOutDone ' . In the case of a @COPY FROM STDIN@ module Database.PostgreSQL.Simple.Copy ( copy , copy_ , CopyOutResul...
74db72329026f876f8557922323f16eb90627114d723611abce6c66c67df0d89
ocharles/netwire-classics
Mario.hs
{-# LANGUAGE Arrows #-} # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE MonadComprehensions # import Prelude hiding ((.), id, until) import Control.Lens import Control.Monad (liftM, msum, void) import Control.Monad.Fix (MonadFix) import Control.Monad.IO.Class (MonadIO(..)) import Control.Monad.Loops (u...
null
https://raw.githubusercontent.com/ocharles/netwire-classics/458aeb3f784c67ae5af1e56c49c22e3eee45e364/platformer/Mario.hs
haskell
# LANGUAGE Arrows # # LANGUAGE GADTs # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ --------------------------------------------...
# LANGUAGE FlexibleContexts # # LANGUAGE MonadComprehensions # import Prelude hiding ((.), id, until) import Control.Lens import Control.Monad (liftM, msum, void) import Control.Monad.Fix (MonadFix) import Control.Monad.IO.Class (MonadIO(..)) import Control.Monad.Loops (unfoldM) import Control.Monad.Reader.Class (Mona...
e55828cb1246fa0f03b7ea4cfad5903703c000ecd5470a42c3603df124af9c4f
willijar/LENS
communication.lisp
;; Communications compound module definitions for WSN Copyright ( C ) 2014 Dr. Author : Dr. < > ;; Keywords: ;;; Copying: This file is part of Lisp Educational Network Simulator ( LENS ) ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Publ...
null
https://raw.githubusercontent.com/willijar/LENS/646bc4ca5d4add3fa7e0728f14128e96240a9f36/networks/wsn/core/communication.lisp
lisp
Communications compound module definitions for WSN Keywords: Copying: This program is free software: you can redistribute it and/or modify (at your option) any later version. LENS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or...
Copyright ( C ) 2014 Dr. Author : Dr. < > This file is part of Lisp Educational Network Simulator ( LENS ) 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 ...
9e0f224039065f3dc6ac82a9888d5a4080a0f76032cded138ad72ad05569c24a
softlab-ntua/bencherl
sim_diasca.erl
Copyright ( C ) 2012 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify % it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) a...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/sim-diasca/src/core/src/sim_diasca.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the If not, see </>. hiding the details of the simulation services being used underneath, and offering opportunities for single-pla...
Copyright ( C ) 2012 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Sim - Diasca is distributed in the hope tha...
4726ebc9bea05f21d7a31a288c1f1e5949c5be4b360abecc9d65146588cb7f67
michaelballantyne/ee-lib
same-binding.rkt
#lang racket/base (require rackunit (for-syntax racket/base ee-lib)) (define-syntax (m stx) (define ctx (syntax-local-make-definition-context)) (define id^ (car (syntax-local-bind-syntaxes (list #'x) #'5 ctx))) #``([unbound/unbound #,(same-binding? #'x #'x)] [local/local #,(same-binding? id^ id^)] ...
null
https://raw.githubusercontent.com/michaelballantyne/ee-lib/1fd1f14ca84165055c3e4991543db19cb0a3176a/test/same-binding.rkt
racket
top level, unbound top level, bound
#lang racket/base (require rackunit (for-syntax racket/base ee-lib)) (define-syntax (m stx) (define ctx (syntax-local-make-definition-context)) (define id^ (car (syntax-local-bind-syntaxes (list #'x) #'5 ctx))) #``([unbound/unbound #,(same-binding? #'x #'x)] [local/local #,(same-binding? id^ id^)] ...
77811fa80911fbf5f3e9380783765ba149ac5068bc94b2ae71e291d99bd1d499
grin-compiler/ghc-wpc-sample-programs
Data.hs
| Module : . Elab . Data Description : Code to elaborate data structures . License : : The Idris Community . Module : Idris.Elab.Data Description : Code to elaborate data structures. License : BSD3 Maintainer : The Idris Community. -} # LANGUAGE CPP , PatternGuards # module Idris.El...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Idris/Elab/Data.hs
haskell
temporary, to check cons if n is defined already, make sure it is just a type declaration with the same type we've just elaborated, and no constructors yet temporary, to check cons TI contains information about mutually declared types - this will be updated when the mutual block is complete TMP HACK! Make this ...
| Module : . Elab . Data Description : Code to elaborate data structures . License : : The Idris Community . Module : Idris.Elab.Data Description : Code to elaborate data structures. License : BSD3 Maintainer : The Idris Community. -} # LANGUAGE CPP , PatternGuards # module Idris.El...
951ce737d4c9b61a4eba1b8191e5e575b4cbf29f79eed1a993bae70b7f0abbc0
froggey/Mezzano
peek.lisp
;;;; ;;;; Display basic system information. (defpackage :mezzano.gui.peek (:use :cl) (:export #:spawn)) (in-package :mezzano.gui.peek) (defvar *peek-commands* '((#\? "Help" peek-help "Show a help page.") (#\T "Thread" peek-thread "Show currently active threads.") (#\M "Memory" peek-memory "Show memo...
null
https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/applications/peek.lisp
lisp
Display basic system information. FPU PSE CMPXCHG8B PAT PSE36 MMX Eat unknown events. refresh current window
(defpackage :mezzano.gui.peek (:use :cl) (:export #:spawn)) (in-package :mezzano.gui.peek) (defvar *peek-commands* '((#\? "Help" peek-help "Show a help page.") (#\T "Thread" peek-thread "Show currently active threads.") (#\M "Memory" peek-memory "Show memory information.") (#\N "Network" peek-ne...
ef2fb674fe092e42ea5c77686e97c17f37779483101a62b8ad27f7896eee334d
erszcz/learning
utp_filter.erl
-module(utp_filter). -compile([export_all]). start(ExtraOptions) -> Options = [{event_order, event_ts}, {scale, 2}, {max_actors, 10}, {detail_level, 90}, { actors , [ fred , , hank , ] } , %% Works just as well! {actors, []}, {trace_pattern, {et, max...
null
https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-et/utp_filter.erl
erlang
Works just as well!
-module(utp_filter). -compile([export_all]). start(ExtraOptions) -> Options = [{event_order, event_ts}, {scale, 2}, {max_actors, 10}, {detail_level, 90}, { actors , [ fred , , hank , ] } , {actors, []}, {trace_pattern, {et, max}}, {trace_global, true...
2e0473ec1a306cafa5c245a4aac899077a8c2673fa0aa7495ddf362b52004b0a
hoytech/antiweb
ppcre-tests.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - PPCRE - TEST ; Base : 10 -*- $ Header : /usr / cvs / hcsw / antiweb / bundled / cl - ppcre / ppcre - tests.lisp , v 1.1 2008/04/26 02:40:56 Copyright ( c ) 2002 - 2007 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary for...
null
https://raw.githubusercontent.com/hoytech/antiweb/53c38f78ea01f04f6d1a1ecdca5c012e7a9ae4bb/bundled/cl-ppcre/ppcre-tests.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - PPCRE - TEST ; Base : 10 -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions...
$ Header : /usr / cvs / hcsw / antiweb / bundled / cl - ppcre / ppcre - tests.lisp , v 1.1 2008/04/26 02:40:56 Copyright ( c ) 2002 - 2007 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ...
bd9384ec16905dffc63aae1e1cfd35717313da103a766d14c5cfe3d5107d4dcd
dedbox/racket-voxel
gl-shader.rkt
#lang racket/base (require racket/format racket/list racket/pretty racket/string racket/struct) (provide (all-defined-out)) (struct gl-shader (version in-bufs in-vars out-vars uniform-vars body) #:transparent #:name vx:gl-shader #:constructor-name make-gl-shader #:methods ...
null
https://raw.githubusercontent.com/dedbox/racket-voxel/9c23d1e8e71a80bac6e4251a517f70aef002ab9f/gl-shader.rkt
racket
#lang racket/base (require racket/format racket/list racket/pretty racket/string racket/struct) (provide (all-defined-out)) (struct gl-shader (version in-bufs in-vars out-vars uniform-vars body) #:transparent #:name vx:gl-shader #:constructor-name make-gl-shader #:methods ...
7ad4de05c75268c6fd4204ff90bdb02da8656bd84026e861a263f21addeca943
gethop-dev/payments.stripe
plan_test.clj
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 / (ns dev.gethop.payments.stripe.plan-test (:require [clojure.test :refer :all] [dev.gethop.payments.core :as core] [dev...
null
https://raw.githubusercontent.com/gethop-dev/payments.stripe/2379ba790123d7380ffc397cf4920cbe2936f840/test/dev/gethop/payments/stripe/plan_test.clj
clojure
file, You can obtain one at /
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 (ns dev.gethop.payments.stripe.plan-test (:require [clojure.test :refer :all] [dev.gethop.payments.core :as core] [dev.gethop.payments.stripe] ...
d434ab5a72ed1a4d92a0e1279bdfb29ebff80e833a9d94681f20879b773dddd6
brendanzab/language-garden
Main.ml
(** {0 Compiler CLI} *) module TreeLang = ArithCond.TreeLang module StackLang = ArithCond.StackLang module AnfLang = ArithCond.AnfLang module TreeToStack = ArithCond.TreeToStack module TreeToAnf = ArithCond.TreeToAnf (** {1 Helper functions} *) let print_error (pos : Lexing.position) message = Printf.eprintf "%s:...
null
https://raw.githubusercontent.com/brendanzab/language-garden/1f7eb7afab6c1af2dd21515c80d22bd36a02119d/compile-arithcond/bin/Main.ml
ocaml
* {0 Compiler CLI} * {1 Helper functions} * {1 Main entrypoint}
module TreeLang = ArithCond.TreeLang module StackLang = ArithCond.StackLang module AnfLang = ArithCond.AnfLang module TreeToStack = ArithCond.TreeToStack module TreeToAnf = ArithCond.TreeToAnf let print_error (pos : Lexing.position) message = Printf.eprintf "%s:%d:%d: %s\n" pos.pos_fname pos.pos_lnum ...
65c0ee81f3c30071cbd9da5522782654c5f9ff3f83d04e49fcfc52fa38f16f0a
input-output-hk/plutus-apps
Address.hs
module Plutus.Script.Utils.V1.Address ( mkValidatorAddress , mkValidatorCardanoAddress , mkMintingPolicyCardanoAddress , mkStakeValidatorCardanoAddress ) where import Cardano.Api qualified as Script import Plutus.Script.Utils.V1.Scripts qualified as PV1 import Plutus.V1.Ledger.Api (Address (Addres...
null
https://raw.githubusercontent.com/input-output-hk/plutus-apps/cd70d8acbde66c0f9a637d6b114cb6ca8bc4bb31/plutus-script-utils/src/Plutus/Script/Utils/V1/Address.hs
haskell
# INLINABLE mkValidatorAddress # | The address that should be used by a transaction output locked by the given | Cardano address of a 'PV1.Validator' script. | Cardano address of a 'PV1.MintingPolicy' script. | Cardano address of a 'PV1.MintingPolicy' script. | Convert a 'Script' to a 'cardano-api' address.
module Plutus.Script.Utils.V1.Address ( mkValidatorAddress , mkValidatorCardanoAddress , mkMintingPolicyCardanoAddress , mkStakeValidatorCardanoAddress ) where import Cardano.Api qualified as Script import Plutus.Script.Utils.V1.Scripts qualified as PV1 import Plutus.V1.Ledger.Api (Address (Addres...
c4b825e9a9f4a2e2883d5603e09592ef3dfac0cca5e69690cfb95905c49d2536
kazu-yamamoto/dns
Imports.hs
module Network.DNS.Imports ( ByteString , Int64 , NonEmpty(..) , module Control.Applicative , module Control.Monad , module Data.Bits , module Data.Function , module Data.List , module Data.Maybe , module Data.Monoid , module Data.Ord , module Data.Typeable , module Data.Word , module Nume...
null
https://raw.githubusercontent.com/kazu-yamamoto/dns/067e91ae552d70eaeea890b2c78f983519a824db/internal/Network/DNS/Imports.hs
haskell
module Network.DNS.Imports ( ByteString , Int64 , NonEmpty(..) , module Control.Applicative , module Control.Monad , module Data.Bits , module Data.Function , module Data.List , module Data.Maybe , module Data.Monoid , module Data.Ord , module Data.Typeable , module Data.Word , module Nume...
26e0749793167b66c535f2c59cfd42d2b64d4675f3801bf4c0cec6d857d96d58
backtracking/astro
vsop87.ml
let mercuryL0 = [| 440250710.0 ;0.0 ;0.0 ;40989415.0 ;1.48302034 ;26087.90314157 ;5046294.0 ;4.4778549 ;52175.8062831 ;855347.0 ;1.165203 ;78263.709425 ;165590.0 ;4.119692 ;104351.612566 ;34562.0 ;0.77931 ;130439.51571 ;7583.0 ;3.7135 ;156527.4188 ;3560.0 ;1.512 ;1109.3786 ;1803.0 ;4.1033 ;5661.332 ;...
null
https://raw.githubusercontent.com/backtracking/astro/adb8020b8a56692f3d2b50d26dce2ccc442c6f39/vsop87.ml
ocaml
let mercuryL0 = [| 440250710.0 ;0.0 ;0.0 ;40989415.0 ;1.48302034 ;26087.90314157 ;5046294.0 ;4.4778549 ;52175.8062831 ;855347.0 ;1.165203 ;78263.709425 ;165590.0 ;4.119692 ;104351.612566 ;34562.0 ;0.77931 ;130439.51571 ;7583.0 ;3.7135 ;156527.4188 ;3560.0 ;1.512 ;1109.3786 ;1803.0 ;4.1033 ;5661.332 ;...
e823868cac9b580d5a394ce1af69ff72ba6e1a5eb47a65e66e6e07d173595560
gnuvince/ocaml-tiger
types.ml
open Printf type unique = unit ref type t = | Int | String | Nil | Unit | Record of (Sym.t * t) list * unique | Array of t * unique | Name of Sym.t * t option ref let rec to_string = function | Int -> "int" | String -> "string" | Nil -> "nil" | Unit -> "()" | Name (sym, targ) -> Printf.s...
null
https://raw.githubusercontent.com/gnuvince/ocaml-tiger/42e39cb0d48cf3100fbfb7e51aa88a71e04ec6a4/types.ml
ocaml
Check fields? Check element type?
open Printf type unique = unit ref type t = | Int | String | Nil | Unit | Record of (Sym.t * t) list * unique | Array of t * unique | Name of Sym.t * t option ref let rec to_string = function | Int -> "int" | String -> "string" | Nil -> "nil" | Unit -> "()" | Name (sym, targ) -> Printf.s...
038f718d325385ae5cd97b17976e138f407366eb0c1666250bc5ee9685057428
startalkIM/ejabberd
ejabberd_http_bind.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_http_bind.erl Author : < > Purpose : Implements XMPP over BOSH ( XEP-0206 ) Created : 21 Sep 2005 by < > Modified : may 2009 by , %%% %%% ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne %%% %%% Th...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/ejabberd_http_bind.erl
erlang
---------------------------------------------------------------------- File : ejabberd_http_bind.erl This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without...
Author : < > Purpose : Implements XMPP over BOSH ( XEP-0206 ) Created : 21 Sep 2005 by < > Modified : may 2009 by , ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 o...
ba4e9b641802f2a7fd7ab2a816b7b0d1480261c6ccec9760d1e8b3f7f5c40237
samrushing/irken-compiler
t10.scm
(include "lib/core.scm") (define (plus a b) (+ a b)) (plus 100 (plus 1 (plus 2 (plus 3 4))))
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t10.scm
scheme
(include "lib/core.scm") (define (plus a b) (+ a b)) (plus 100 (plus 1 (plus 2 (plus 3 4))))
cd7e94015ab7807c4f13da43224db32671ba71ffb969fdbb888103b74ad8764f
solita/laundry
alive_test.clj
(ns laundry.alive-test (:require [clojure.test :refer :all] [laundry.test.fixture :as fixture] [ring.mock.request :as mock])) (deftest alive (let [app (fixture/get-app) request (mock/request :get "/alive") response (app request)] (is (= 200 (:status response)))))
null
https://raw.githubusercontent.com/solita/laundry/4e1fe96ebae19cde14c3ba5396929ba1578b7715/test/laundry/alive_test.clj
clojure
(ns laundry.alive-test (:require [clojure.test :refer :all] [laundry.test.fixture :as fixture] [ring.mock.request :as mock])) (deftest alive (let [app (fixture/get-app) request (mock/request :get "/alive") response (app request)] (is (= 200 (:status response)))))
c01d577f6327d5a35cd2ffb82382dace939f412df8cf3c7fec150a031001f6ad
exercism/racket
example.rkt
#lang racket (provide classify) (define (divisor-sum n) (for/sum ([i (in-range 1 (add1 (quotient n 2)))] #:when (zero? (remainder n i))) i)) (define (classify n) (let ([sumdivisors (divisor-sum n)]) (cond [(= n sumdivisors) 'perfect] [(> n sumdivisors) 'deficient] [else 'a...
null
https://raw.githubusercontent.com/exercism/racket/d171a5fb3595cc09d171051a3f5ef45caedad020/exercises/practice/perfect-numbers/.meta/example.rkt
racket
#lang racket (provide classify) (define (divisor-sum n) (for/sum ([i (in-range 1 (add1 (quotient n 2)))] #:when (zero? (remainder n i))) i)) (define (classify n) (let ([sumdivisors (divisor-sum n)]) (cond [(= n sumdivisors) 'perfect] [(> n sumdivisors) 'deficient] [else 'a...
bbb859c0ad9313ac3469e8dc2f0e48493bc1f806ae1fae52954cb90784f1ecc5
census-instrumentation/opencensus-erlang
oc_tracestate.erl
%%%------------------------------------------------------------------------ Copyright 2017 , OpenCensus Authors 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...
null
https://raw.githubusercontent.com/census-instrumentation/opencensus-erlang/7fb276ff73d677c00458922c9180df634f45e018/src/oc_tracestate.erl
erlang
------------------------------------------------------------------------ you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o...
Copyright 2017 , OpenCensus Authors Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @doc ` oc_tracestate ' implements support for the Tracestate header of the W3C TraceContext propagation format . -module(oc_tracestate)...
b3fb8cfa806a61c4e7f554b947246e5e8bd9b70ea99fc26e1ea26082ad725fb2
synduce/Synduce
TestUtils.ml
open Base let test_success ?(name = "test") () = Fmt.(pf stdout "%s success@." name) let test_fail ?(name = "test") () = Fmt.(pf stdout "%s fail@." name) let test_result (s : string) (r : (bool, 'a) Result.t) : unit = match r with | Ok true -> test_success ~name:s () | _ -> test_fail ~name:s ()
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/bin/TestUtils.ml
ocaml
open Base let test_success ?(name = "test") () = Fmt.(pf stdout "%s success@." name) let test_fail ?(name = "test") () = Fmt.(pf stdout "%s fail@." name) let test_result (s : string) (r : (bool, 'a) Result.t) : unit = match r with | Ok true -> test_success ~name:s () | _ -> test_fail ~name:s ()
37e782085706e41684b6965a48ead480f776de249f496d63a4b24cb43341da59
hdevtools/hdevtools
GhcTypes.hs
# LANGUAGE CPP # module GhcTypes ( getModSummaries , TypecheckI , needsTemplateHaskellOrQQ ) where import qualified GHC import qualified HscTypes #if __GLASGOW_HASKELL__ < 804 import qualified Var #endif getModSummaries :: GHC.Ghc [GHC.ModSummary] #if __GLASGOW_HASKELL__ >= 804 getModSummaries = HscTy...
null
https://raw.githubusercontent.com/hdevtools/hdevtools/a866f017b74f4b27fabda0861f635da82e43d9fe/src/GhcTypes.hs
haskell
# LANGUAGE CPP # module GhcTypes ( getModSummaries , TypecheckI , needsTemplateHaskellOrQQ ) where import qualified GHC import qualified HscTypes #if __GLASGOW_HASKELL__ < 804 import qualified Var #endif getModSummaries :: GHC.Ghc [GHC.ModSummary] #if __GLASGOW_HASKELL__ >= 804 getModSummaries = HscTy...
234f64efd06e306028c1c6134ade7a7470245c5fd9aa670308b5377ecd7e5ae7
dongcarl/guix
rust-apps.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2019 , 2020 < > Copyright © 2019 , 2020 , 2021 < > Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 , 2021 < > Copyright © 2021 < > ...
null
https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/rust-apps.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2019 , 2020 < > Copyright © 2019 , 2020 , 2021 < > Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 < > Copyright © 2020 , 2021 < > Copyright © 2021 < > Copyright © 2021 < > Copyright © 2021 < > C...
2a22cf66444e1f733c99820a7bc9b8f916ac8f6a12c406b84a3d9ececd94b1d7
nuprl/gradual-typing-performance
door-tall-open.rkt
#lang racket/base (provide door-tall-open) (require racket/draw racket/runtime-path) (define-runtime-path door-tall-open-img "door-tall-open.png") (define door-tall-open (read-bitmap door-tall-open-img))
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/2htdp/planetcute/door-tall-open.rkt
racket
#lang racket/base (provide door-tall-open) (require racket/draw racket/runtime-path) (define-runtime-path door-tall-open-img "door-tall-open.png") (define door-tall-open (read-bitmap door-tall-open-img))
fc32dc421b56eab106bcbb4b21a21316e3fb10e50abc3492034d71c16398d189
NorfairKing/smos
LogSpec.hs
module Smos.Report.LogSpec (spec) where import Smos.Data import Smos.Data.Gen () import Smos.Report.Log import Test.Syd import Test.Syd.Validity spec :: Spec spec = do describe "makeLogbookLogEntries" $ it "produces valid events" $ producesValid makeLogbookLogEntries describe "makeStateHistoryLogEntries" $ do ...
null
https://raw.githubusercontent.com/NorfairKing/smos/489f5b510c9a30a3c79fef0a0d1a796464705923/smos-report-gen/test/Smos/Report/LogSpec.hs
haskell
module Smos.Report.LogSpec (spec) where import Smos.Data import Smos.Data.Gen () import Smos.Report.Log import Test.Syd import Test.Syd.Validity spec :: Spec spec = do describe "makeLogbookLogEntries" $ it "produces valid events" $ producesValid makeLogbookLogEntries describe "makeStateHistoryLogEntries" $ do ...
317eb16cc0a4d298b8c09b7cb88f5f8dce7a37d99c9a6e8be4b7126c0a1f93b2
AdaCore/why3
statmemprof.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University (* ...
null
https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/src/ide/statmemprof.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University General Public License version 2.1 , with the special exception let () = Statmemprof_emacs.start 1.e-4 10000 30
448d7a814c48567f998942d22ae796e79938915c61c0eede22bf211a0fcf3038
SquircleSpace/shcl
directory.lisp
Copyright 2017 ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software distributed under the Li...
null
https://raw.githubusercontent.com/SquircleSpace/shcl/cc8d3c841b8b64b6715bf8f238fb19cd6093a793/shell/directory.lisp
lisp
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2017 distributed under the License is distributed on an " AS IS " BASIS , (defpackage :shcl/shell/directory (:use :common-lisp :cffi :shcl/core/utility :shcl/core/command :shcl/core/working-directory :shcl/core/fd-table :shcl/core/lisp-interpolation :shcl/core/posix :shcl/core/posix-types) ...
3dba8e13876bf7b5f704998c2999ae09fff438674a3a585823802c433e4a44c7
shaunlebron/parinfer
editor_ui.cljs
(ns parinfer-site.editor-ui (:require [parinfer-site.state :refer [state]] [om.core :as om] [sablono.core :refer-macros [html]] [parinfer-site.parinfer :refer [major-version]] [goog.dom :as gdom])) (defn refresh! "Called after settings are updated to cause the editor to reflect them." [cm] ...
null
https://raw.githubusercontent.com/shaunlebron/parinfer/6705c35adbabc90cc0af3bb4ddf3a60c390f93df/site/src/parinfer_site/editor_ui.cljs
clojure
make sure cursor is still visible
(ns parinfer-site.editor-ui (:require [parinfer-site.state :refer [state]] [om.core :as om] [sablono.core :refer-macros [html]] [parinfer-site.parinfer :refer [major-version]] [goog.dom :as gdom])) (defn refresh! "Called after settings are updated to cause the editor to reflect them." [cm] ...
ec115c73ac5b0df8b29d98947aa3beea4c87a2d5158f4140253721626badd302
thosmos/riverdb
role.cljc
(ns riverdb.rad.model.role (:require [com.fulcrologic.rad.attributes :as attr :refer [defattr]] [com.fulcrologic.rad.attributes-options :as ao] [com.fulcrologic.rad.authorization :as auth] #?(:clj [riverdb.rad.model.db-queries :as queries]) [com.wsscode.pathom.connect :as pc] [theta.log...
null
https://raw.githubusercontent.com/thosmos/riverdb/c0a31710e4430113924178bd0a3b9e8304f58009/src/rad/riverdb/rad/model/role.cljc
clojure
(defattr all-roles :role/all-roles :ref {ao/target :role/uuid ::pc/output [{:role/all-roles [:role/uuid]}] ::pc/resolve (fn [{:keys [query-params] :as env} _] {:role/all-roles (queries/get-all-roles env query-params)}))})
(ns riverdb.rad.model.role (:require [com.fulcrologic.rad.attributes :as attr :refer [defattr]] [com.fulcrologic.rad.attributes-options :as ao] [com.fulcrologic.rad.authorization :as auth] #?(:clj [riverdb.rad.model.db-queries :as queries]) [com.wsscode.pathom.connect :as pc] [theta.log...
0f48606255fa45e00726347d76a905dcdf56a02d512f8daecaec71001e8e29ad
rescript-lang/rescript-compiler
lam_constant.mli
Copyright ( C ) 2018 - Hongbo Zhang , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) an...
null
https://raw.githubusercontent.com/rescript-lang/rescript-compiler/d241c92ebbd65fffabebbcab01ee7575896ebc2e/jscomp/frontend/lam_constant.mli
ocaml
eventually we can remove it, since we know [constant] is [undefined] or not
Copyright ( C ) 2018 - Hongbo Zhang , Authors of ReScript * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or * ( at your option ) an...
4ffd9e16534b91c631b5bc291b20ad92f37b0c85d6846ecb49e254a6f651fa77
dgtized/shimmers
texas_fields.cljs
(ns shimmers.sketches.texas-fields (:require [reagent.core :as r] [shimmers.algorithm.lines :as lines] [shimmers.algorithm.polygon-detection :as poly-detect] [shimmers.algorithm.quadtree :as saq] [shimmers.common.svg :as csvg :include-macros true] [shimmers.common.ui.controls :as ctrl] [shimmers....
null
https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/sketches/texas_fields.cljs
clojure
also roads are more interesting if they extrude outward idea: pick a central circle, then attach a line at a random point tangent to curve, FIXME: sometimes roads in inside of a cell, and despite the fact that the line is scaled to handle edge cases when endpoint is on an edge but counting as inside remove tiny sl...
(ns shimmers.sketches.texas-fields (:require [reagent.core :as r] [shimmers.algorithm.lines :as lines] [shimmers.algorithm.polygon-detection :as poly-detect] [shimmers.algorithm.quadtree :as saq] [shimmers.common.svg :as csvg :include-macros true] [shimmers.common.ui.controls :as ctrl] [shimmers....
e4dc4d9c685befc35697fa3a8d050da3028e607ec778c4deeaf3a2a5a457f727
tonsky/advent2018
day11.clj
(ns advent2018.day11 (:require [clojure.string :as str] [clojure.set :as set] [clojure.walk :as walk] [advent2018.core :refer :all])) (def grid 8561) (defn hundreds [n] (-> n (mod 1000) (quot 100))) (defn cell-power [x y] (-> (+ x 10) (* y) (+ grid) (* (+ x 10)) (hundred...
null
https://raw.githubusercontent.com/tonsky/advent2018/6f8d15bf37a150a288e3447df7766c362f7086e9/src/advent2018/day11.clj
clojure
(ns advent2018.day11 (:require [clojure.string :as str] [clojure.set :as set] [clojure.walk :as walk] [advent2018.core :refer :all])) (def grid 8561) (defn hundreds [n] (-> n (mod 1000) (quot 100))) (defn cell-power [x y] (-> (+ x 10) (* y) (+ grid) (* (+ x 10)) (hundred...
ba00145e3f0d0ca36634655defd2beb34fd81952e4ac4b99d041888b0dd0120d
jfacorro/clojure-lab
window.clj
(ns lab.ui.swing.window (:require [lab.ui.core :as ui] [lab.ui.util :refer [defattributes definitializations]] [lab.ui.swing.util :as util] [lab.ui.protocols :refer [impl Implementation listen ignore abstract]]) (:import [javax.swing JFrame WindowConstants] [java.awt...
null
https://raw.githubusercontent.com/jfacorro/clojure-lab/f0b5a4b78172984fc876f063f66e5e1592178da9/src/clj/lab/ui/swing/window.clj
clojure
(ns lab.ui.swing.window (:require [lab.ui.core :as ui] [lab.ui.util :refer [defattributes definitializations]] [lab.ui.swing.util :as util] [lab.ui.protocols :refer [impl Implementation listen ignore abstract]]) (:import [javax.swing JFrame WindowConstants] [java.awt...
88dfd72433949d783a396c3563977c0a6b872831a95718fb09bb6a0c0302fb30
pixelated-noise/hike
core.clj
(ns hike.core (:require [clojure.spec.alpha :as s] [clojure.math.combinatorics :as comb])) ;;; Unidirectional transformers (s/def ::position integer?) (s/def ::nat (s/and integer? (complement neg?))) (s/def ::action keyword?) (s/def ::index ::position) (s/def ::count ::nat) (s/def ::offset integer?) (de...
null
https://raw.githubusercontent.com/pixelated-noise/hike/0705519e17ce31615acf7e2000346cf8612cdb19/src/hike/core.clj
clojure
Unidirectional transformers `pos` passes if outside the non-inclusive (`min-pass`, `max-pass`) interval, otherwise returns `nil`. overcome the dead-end by following the specified `bypass` direction `pos` passes if outside the non-inclusive (`min-pass`, `max-pass`) interval, `cross-index` marks the start of the co...
(ns hike.core (:require [clojure.spec.alpha :as s] [clojure.math.combinatorics :as comb])) (s/def ::position integer?) (s/def ::nat (s/and integer? (complement neg?))) (s/def ::action keyword?) (s/def ::index ::position) (s/def ::count ::nat) (s/def ::offset integer?) (defmulti ^:private operation :acti...
f80d0cd6eaeb498ecb1962ba99420c4d83a372b06cf706eee071a660410d3814
RDTK/generator
protocol.lisp
;;;; protocol.lisp --- Protocol provided by the commandline-options module. ;;;; Copyright ( C ) 2017 , 2018 , 2019 Jan Moringen ;;;; Author : < > (cl:in-package #:build-generator.commandline-options) ;;; Option info protocol (defgeneric option-multiplicity (info) (:documentation "Return 1 or `*' indicat...
null
https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/commandline-options/protocol.lisp
lisp
protocol.lisp --- Protocol provided by the commandline-options module. Option info protocol Default behavior Option contexts Individual options High-level interface Collect option values. Apply collected values.
Copyright ( C ) 2017 , 2018 , 2019 Jan Moringen Author : < > (cl:in-package #:build-generator.commandline-options) (defgeneric option-multiplicity (info) (:documentation "Return 1 or `*' indicating the multiplicity of INFO.")) (defgeneric option-value (info index designator included-value maybe-value) ...
155352238b44a42a2afc173f65f0eb55ee6f38abe29715963a2a71547c66c1b6
ghcjs/jsaddle-dom
SVGNumber.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SVGNumber (setValue, getValue, SVGNumber(..), gTypeSVGNumber) where import Prelude ((.), (==), (>>=), return, IO, I...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/SVGNumber.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.SVGNumber (setValue, getValue, SVGNumber(..), gTypeSVGNumber) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, O...
f26ea521f9df04a16a9199f2c0e69e368df855ac89bad39ce2fa76d5d6f7ad3a
ninjudd/jiraph
edge_delete_test.clj
(ns flatland.jiraph.edge-delete-test (:use clojure.test flatland.jiraph.core flatland.jiraph.edge-delete) (:require [flatland.jiraph.layer.masai :as masai] [flatland.useful.map :refer [dissoc-in*]])) (defn empty-graph [f] (let [id-layer (masai/make-temp)] (with-graph {:id id-layer ...
null
https://raw.githubusercontent.com/ninjudd/jiraph/e2897cf4770ead40e574261cd294d2c6701703e8/test/flatland/jiraph/edge_delete_test.clj
clojure
(ns flatland.jiraph.edge-delete-test (:use clojure.test flatland.jiraph.core flatland.jiraph.edge-delete) (:require [flatland.jiraph.layer.masai :as masai] [flatland.useful.map :refer [dissoc-in*]])) (defn empty-graph [f] (let [id-layer (masai/make-temp)] (with-graph {:id id-layer ...
34a6847019eea9e385a8b1039b129c81ab6082b5e2c823165755464a957386aa
janestreet/memtrace_viewer_with_deps
weak_pointer.mli
(** A weak pointer is a pointer to a heap block that does not cause the heap block to remain live during garbage collection. If the block would otherwise remain live, then the weak pointer remains pointed to the block. If the block is collected, then the weak pointer is cleared. *) open! Core_kernel typ...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/weak_pointer/src/weak_pointer.mli
ocaml
* A weak pointer is a pointer to a heap block that does not cause the heap block to remain live during garbage collection. If the block would otherwise remain live, then the weak pointer remains pointed to the block. If the block is collected, then the weak pointer is cleared. * [create] creates an empty...
open! Core_kernel type 'a t [@@deriving sexp_of] val create : unit -> _ t val get : 'a t -> 'a Heap_block.t option * [ is_some t = ( get t ) ] . val is_some : _ t -> bool val is_none : _ t -> bool val set : 'a t -> 'a Heap_block.t -> unit
bbbcc309012891d47c0ba3fd8171eec0ab21a2b64ff7af7765e1823d472676b1
radian-software/kalyn
Resolver.hs
module Resolver ( resolveBundle ) where import Data.Char import Data.Int import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Prelude hiding ( mod ) import System.FilePath import AST imp...
null
https://raw.githubusercontent.com/radian-software/kalyn/03d279eee4cf73cd355ed7a13c46340fbb15540b/src/Resolver.hs
haskell
# ANN module "HLint: ignore Use record patterns" # # ANN module "HLint: ignore Use tuple-section" # for now, doesn't handle Derive or Instance
module Resolver ( resolveBundle ) where import Data.Char import Data.Int import qualified Data.Map.Strict as Map import qualified Data.Set as Set import Prelude hiding ( mod ) import System.FilePath import AST imp...
f0772451b7d25acce270c6bfaef8da3c69c211c7ed13bde01e3224cb803d31a3
serhiip/org2any
AppleScriptSpec.hs
{-# LANGUAGE OverloadedStrings #-} module AppleScriptSpec where import Data.OrgMode.Sync.AppleScript.Internal ( createManyScript , deleteManyScript , listAllScript ...
null
https://raw.githubusercontent.com/serhiip/org2any/c8b01a08f371593d3d3d8b1125656dd8e02524ca/test/AppleScriptSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module AppleScriptSpec where import Data.OrgMode.Sync.AppleScript.Internal ( createManyScript , deleteManyScript , listAllScript ...
cee6d0b1b106101e5b361182854c3ee36a7346ec68639340d89cb4aba1627cbc
hopbit/sonic-pi-snippets
background1.sps
# key: bg1 # point_line: 3 # point_index: 0 # -- background = (scale :gs3, :minor_pentatonic) live_loop :background do # stop # sync :metronome use_synth :beep 32.times do play background.choose, release: 0.125, amp: 0.3, cutoff: 70 sleep 0.25 end end
null
https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/backgrounds/background1.sps
scheme
# key: bg1 # point_line: 3 # point_index: 0 # -- background = (scale :gs3, :minor_pentatonic) live_loop :background do # stop # sync :metronome use_synth :beep 32.times do play background.choose, release: 0.125, amp: 0.3, cutoff: 70 sleep 0.25 end end
80ffb3ee5f40189cdb1e289c4355ff4cd0ffc4ad490ba23cfa4cfc77495854c1
byteally/dbrecord
MigSpec.hs
# LANGUAGE DataKinds , TypeOperators , UndecidableInstances , OverloadedLabels , FlexibleInstances , MultiParamTypeClasses , DuplicateRecordFields , GADTs , TypeApplications , KindSignatures , DeriveGeneric , FlexibleContexts , FunctionalDependencies , ExplicitForAll , TypeFamilies , ScopedTypeVariables , OverloadedStr...
null
https://raw.githubusercontent.com/byteally/dbrecord/991efe9a293532ee9242b3e9a26434cf16f5b2a0/dbrecord-migration/dbrecord-migration-tests/Test/MigSpec.hs
haskell
( spec ) = '[ "foo" ] baseDefaults = baseDbDefaults ( #foo "foo_value" :& end ) = 'Just "user" = 'Just "user"
# LANGUAGE DataKinds , TypeOperators , UndecidableInstances , OverloadedLabels , FlexibleInstances , MultiParamTypeClasses , DuplicateRecordFields , GADTs , TypeApplications , KindSignatures , DeriveGeneric , FlexibleContexts , FunctionalDependencies , ExplicitForAll , TypeFamilies , ScopedTypeVariables , OverloadedStr...
fbf6c876dffa731de8d2614f18bd7a853159ff05d4166fb5844f455fedb77b7d
clash-lang/clash-compiler
CounterHalfTupleRev.hs
# LANGUAGE DataKinds # # LANGUAGE NoImplicitPrelude # {-# OPTIONS_GHC -fplugin=GHC.TypeLits.Extra.Solver #-} {-# OPTIONS_GHC -fplugin=GHC.TypeLits.Normalise #-} # OPTIONS_GHC -fplugin = GHC.TypeLits . KnownNat . Solver # module CounterHalfTupleRev where import Data.Int import Debug.Trace import qualified Prelude as ...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Signal/BiSignal/CounterHalfTupleRev.hs
haskell
# OPTIONS_GHC -fplugin=GHC.TypeLits.Extra.Solver # # OPTIONS_GHC -fplugin=GHC.TypeLits.Normalise # | Alternatively read / increment+write ^ Internal flip + previous read ^ Int from inout | Write on odd cyles | Write on even cyles # NOINLINE topEntity #
# LANGUAGE DataKinds # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fplugin = GHC.TypeLits . KnownNat . Solver # module CounterHalfTupleRev where import Data.Int import Debug.Trace import qualified Prelude as P import Clash.Explicit.Prelude import Clash.Explicit.Testbench import Clash.Signal hiding (sampleN) count...
9f25627832cb0b9f1e833829e45d4774cf548becf6efbb08a993b981723559f3
backtracking/mlpost
color.ml
(**************************************************************************) (* *) Copyright ( C ) Johannes Kanig , , and (* *) (* This software is f...
null
https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/src/color.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) Johannes Kanig , , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking open Concrete_types type st = Concrete_types.scolor = | RGB of float * float * float | CMYK of flo...
a9b373c57d3b593af88b9018df6368cbbd854bb82f7d1c65805453a5c4e11f5c
marcoheisig/Typo
primitive-ntype-information.lisp
(in-package #:typo.ntype) ;;; A list whose entry are of the form (type-specifier bits). (defparameter *primitive-ntype-information* (remove-duplicates (append `((nil 0) (single-float ,+single-float-bits+) (double-float ,+double-float-bits+) (short-float ,+short-float-bits+) (long-float...
null
https://raw.githubusercontent.com/marcoheisig/Typo/c0e979b234694b3e50d4374d90560f755725c16d/code/ntype/primitive-ntype-information.lisp
lisp
A list whose entry are of the form (type-specifier bits). The primitive ntype information list should be ordered such that for earlier in the list. There must only be a single primitive array ntype, ARRAY.
(in-package #:typo.ntype) (defparameter *primitive-ntype-information* (remove-duplicates (append `((nil 0) (single-float ,+single-float-bits+) (double-float ,+double-float-bits+) (short-float ,+short-float-bits+) (long-float ,+long-float-bits+) (float ,(max +short-float-bits+ +si...
0464cdb6159d5b5aaf0b42d0344bb75cd60b2b7191ee50b4ec3de339a7cc2b42
amnh/poy5
analyzer.ml
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . (* *) (* This program is free softwa...
null
https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/analyzer.ml
ocaml
This program is free software; you can redistribute it and/or modify (at your option) any later version. This progra...
POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies . Copyright ( C ) 2014 , , , Ward Wheeler , and the American Museum of Natural History . it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
72978de20b44576b91f95d0b375c8cab8542545cf83f2ad76d213571aaa83237
sondresl/AdventOfCode
Coord.hs
module Advent.Coord where import Linear import Control.Lens (over) type Coord = V2 Int type Dir = V2 Int origin, up, down, left, right :: (Traversable t, Applicative t, Num a, Eq (t a), R2 t) => t a origin = pure 0 up = over _y (+1) $ pure 0 down = over _y (subtract 1) $ pure 0 left = over _x (sub...
null
https://raw.githubusercontent.com/sondresl/AdventOfCode/6655b738da398ab9537508674fa25fa3c40ff57d/2022/Haskell/src/Advent/Coord.hs
haskell
module Advent.Coord where import Linear import Control.Lens (over) type Coord = V2 Int type Dir = V2 Int origin, up, down, left, right :: (Traversable t, Applicative t, Num a, Eq (t a), R2 t) => t a origin = pure 0 up = over _y (+1) $ pure 0 down = over _y (subtract 1) $ pure 0 left = over _x (sub...
ae8e81d041fb54660297036d758a5178fc384540bd23377b1d00a2bed697226f
BU-CS320/Fall-2018
Lang.hs
module Lang where import Prelude hiding (lookup) for State import EnvUnsafe -- Here is the abstract syntax tree for our language data Ast = ValBool Bool | And Ast Ast | Or Ast Ast | Not Ast | ValInt Integer | Plus Ast Ast | Minus Ast Ast | Mult Ast Ast | Div Ast Ast | Nil ...
null
https://raw.githubusercontent.com/BU-CS320/Fall-2018/beec3ca88be5c5a62271a45c8053fb1b092e0af1/assignments/week10/hw/src/Lang.hs
haskell
Here is the abstract syntax tree for our language helpful to use this during testing the goal of the program is to return a value no good way to show a function helper function that runs with a standard library of functions: head, tail ... some examples example = let x = Var "x" example2 = let x = Var "x"; y =...
module Lang where import Prelude hiding (lookup) for State import EnvUnsafe data Ast = ValBool Bool | And Ast Ast | Or Ast Ast | Not Ast | ValInt Integer | Plus Ast Ast | Minus Ast Ast | Mult Ast Ast | Div Ast Ast | Nil | Cons Ast Ast | If Ast Ast Ast ...
9aeebf7f4d97acb353ff95fc7f507bbaa9b771439e0b3b98e46c5fe79c5308d0
DrearyLisper/aoc-2022
day02.ml
open Base open Stdio let gameScore hand = match hand with | (Some "A", Some "Y") -> 6 | (Some "A", Some "X") -> 3 | (Some "A", _) -> 0 | (Some "B", Some "Z") -> 6 | (Some "B", Some "Y") -> 3 | (Some "B", _) -> 0 | (Some "C", Some "X") -> 6 | (Some "C", Some "Z") -> 3 | (Some "...
null
https://raw.githubusercontent.com/DrearyLisper/aoc-2022/b4700ed1c404b1310f88ff9fa86dc3369e2671cf/02/day02.ml
ocaml
dune exec --display quiet --no-print-directory ./day02.exe
open Base open Stdio let gameScore hand = match hand with | (Some "A", Some "Y") -> 6 | (Some "A", Some "X") -> 3 | (Some "A", _) -> 0 | (Some "B", Some "Z") -> 6 | (Some "B", Some "Y") -> 3 | (Some "B", _) -> 0 | (Some "C", Some "X") -> 6 | (Some "C", Some "Z") -> 3 | (Some "...
a573d54ebd30174a74572aa50b5f5ab60fac849dbbdd258bc6d8107bcf48f9ae
ilovemysillybanana/hclparser
parser.erl
-module(parser). -export([parse/1, parse_and_scan/1, format_error/1]). -file("src/parser.yrl", 49). unwrap_2({Value}) -> Value. unwrap({_, _, Value}) -> Value. put_tuple({Key, Value}) -> maps:put(Key, Value, #{}). put_tuple({Key, Value}, Other) -> maps:merge(maps:put(Key, Value, #{}), Other). block_processor(Block) -> ...
null
https://raw.githubusercontent.com/ilovemysillybanana/hclparser/5bfd1eb50d7489c4755d6bfcf47044b77a5d18f7/src/parser.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...
-module(parser). -export([parse/1, parse_and_scan/1, format_error/1]). -file("src/parser.yrl", 49). unwrap_2({Value}) -> Value. unwrap({_, _, Value}) -> Value. put_tuple({Key, Value}) -> maps:put(Key, Value, #{}). put_tuple({Key, Value}, Other) -> maps:merge(maps:put(Key, Value, #{}), Other). block_processor(Block) -> ...
f013772e8574b9a18746321e1b233303418f78238f59303ba3093c8dc2c4d9d9
Armael/marracheck
state.ml
open Utils (* Definition of the schema *) module Fmt = struct let raw : string Fs.data_format = Fs.mk_data_format () let cover : Data.Cover.t Fs.data_format = Fs.mk_data_format () let cover_elt_plan_opt : Lib.Cover_elt_plan.t option Fs.data_format = Fs.mk_data_format () let package_report : Data.Package_repor...
null
https://raw.githubusercontent.com/Armael/marracheck/fc5eea6e782275d86581900d3c0f4dd5744f21ef/lib/state.ml
ocaml
Definition of the schema NOTE: this is not a recursive definition; the 'rec'/'and' are used to write declarations in reverse order (which is more natural here). paths higher-level queries we want the *resolved* packages: succeeded, failed, and uninstallable
open Utils module Fmt = struct let raw : string Fs.data_format = Fs.mk_data_format () let cover : Data.Cover.t Fs.data_format = Fs.mk_data_format () let cover_elt_plan_opt : Lib.Cover_elt_plan.t option Fs.data_format = Fs.mk_data_format () let package_report : Data.Package_report.t Fs.data_format = Fs.mk_data...
7e843470effac2dc535b963f95a28e80216f95cfd6d2651141d3f0d351484ed3
martinkersner/cl-ml
k-means.lisp
, 2017/07/16 ;;;; ;;;; k-Means (defclass k-means () ((k :initarg :k ; number of centroids :reader get-k) ; maximum change in position of single centroid to declare convergence (tol :initarg :tol :initform 0.0001 :reader get-tol) (max-iter :initarg :max-iter :initfo...
null
https://raw.githubusercontent.com/martinkersner/cl-ml/f6263b9fb4abd1e069e892a595fe85fbfa5f9c9f/k-means/k-means.lisp
lisp
k-Means number of centroids maximum change in position of single centroid to declare convergence initialize empty clusters update cluster centers
, 2017/07/16 (defclass k-means () :reader get-k) (tol :initarg :tol :initform 0.0001 :reader get-tol) (max-iter :initarg :max-iter :initform 300 :reader get-max-iter) (labels :accessor get-labels) (centroids :accessor get-centroids))) (defmethod rando...
ac1c4d8a53bc740c7e1147313c96e841823b4b63653e1ba73d83cbc3598ebba5
nakagami/efirebirdsql
efirebirdsql_srp_tests.erl
The MIT License ( MIT ) Copyright ( c ) > -module(efirebirdsql_srp_tests). -include_lib("eunit/include/eunit.hrl"). random_test() -> Username = "SYSDBA", Password = "masterkey", Salt = efirebirdsql_srp:get_salt(), ClientPrivate = efirebirdsql_srp:get_private_key(), ClientPublic = efirebird...
null
https://raw.githubusercontent.com/nakagami/efirebirdsql/d28ff4024211cda37f92667bccbaa7af50d2faf0/test/efirebirdsql_srp_tests.erl
erlang
The MIT License ( MIT ) Copyright ( c ) > -module(efirebirdsql_srp_tests). -include_lib("eunit/include/eunit.hrl"). random_test() -> Username = "SYSDBA", Password = "masterkey", Salt = efirebirdsql_srp:get_salt(), ClientPrivate = efirebirdsql_srp:get_private_key(), ClientPublic = efirebird...
22fd878e619c6c06236e055b4be239460e0d1e3f810748a3c555d4b3ed9cbff5
fetburner/Coq2SML
ground.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/firstorder/ground.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** need special backtracking need sp...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Formula open Sequent ope...
190849a7eec88bfc2bd6751212fb259b46cb891f544bf00bec803e5a84e61a2f
ekmett/ekmett.github.com
Diana.hs
{-# OPTIONS_GHC -fglasgow-exts #-} ----------------------------------------------------------------------------- -- | Module : Control . Morphism . Copyright : ( C ) 2008 -- License : BSD-style (see the file LICENSE) -- Maintainer : < > -- Stability : experimental -- Portability : ...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/category-extras/src/Control/Morphism/Diana.hs
haskell
# OPTIONS_GHC -fglasgow-exts # --------------------------------------------------------------------------- | License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable (rank-2 polymorphism) --------------------------------------------------------------------------
Module : Control . Morphism . Copyright : ( C ) 2008 Maintainer : < > module Control.Morphism.Diana ( Dialgebra , NuD(..) , diana ) where import Control.Functor.Algebra import Control.Functor.Fix diana :: Dialgebra f g a -> a -> NuD f g diana = NuD outD :: (Functor f, Functor g) => ...
56e2d93bfbb646ed83002b7f0630fc04a44ea9cafd396ae791ce591742d62ad1
noir-clojure/lib-noir
session_test.clj
(ns noir.session-test (:use clojure.test [noir.session :only [wrap-noir-session*]])) (deftest noir-session (let [base-map {:uri "/foo" :request-method :get }] (testing "Put session value in") (is (= "bar" (get-in ((wrap-noir-session* #(assoc-in % [:session :foo] "bar")) ...
null
https://raw.githubusercontent.com/noir-clojure/lib-noir/20e24641b85fe4bc6c3bb23806be78f3f5419874/test/noir/session_test.clj
clojure
(ns noir.session-test (:use clojure.test [noir.session :only [wrap-noir-session*]])) (deftest noir-session (let [base-map {:uri "/foo" :request-method :get }] (testing "Put session value in") (is (= "bar" (get-in ((wrap-noir-session* #(assoc-in % [:session :foo] "bar")) ...
39fdf29afbbcbd17af47ebcc97e4608c6522d00272c777440de5d1914f94e548
glutamate/bugpan
FitGnuplot.hs
# LANGUAGE GADTs , BangPatterns # module FitGnuplot where import PlotGnuplot import NewSignal import QueryPlots import TNUtils import Data.List import Data.Ord import QueryTypes import Numeric.GSL.Minimization import Math.Probably.GlobalRandoms import Math.Probably.Sampler import qualified Data.StorableVector as SV im...
null
https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/FitGnuplot.hs
haskell
putStrLn format foldl' :: Storable a => (b -> a -> b) -> b -> Vector a -> b
# LANGUAGE GADTs , BangPatterns # module FitGnuplot where import PlotGnuplot import NewSignal import QueryPlots import TNUtils import Data.List import Data.Ord import QueryTypes import Numeric.GSL.Minimization import Math.Probably.GlobalRandoms import Math.Probably.Sampler import qualified Data.StorableVector as SV im...
a6ff9e5f6422db443b9f4dbf288fc5e49cb8e911574f620d225cc82b4e3ab4de
ajhc/ajhc
Numeric.hs
module Numeric(fromRat, showSigned, showIntAtBase, showInt, showOct, showHex, readSigned, readInt, readDec, readOct, readHex, floatToDigits, showEFloat, showFFloat, showGFloat, showFloat, readFloat, lexDigits) where...
null
https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/lib/jhc/Numeric.hs
haskell
This converts a rational to a floating. This should be used in the Fractional instances of Float and Double. Handle exceptional cases first . Conversion process : Scale the rational number by the RealFloat base until it lies in the range of the mantissa ( as used by decodeFloat / encodeFloat ) . Then roun...
module Numeric(fromRat, showSigned, showIntAtBase, showInt, showOct, showHex, readSigned, readInt, readDec, readOct, readHex, floatToDigits, showEFloat, showFFloat, showGFloat, showFloat, readFloat, lexDigits) where...
d3df9b3f0d056ffdc995a3b1dc3719b127d96ce3242f95b016d1541d814fb984
melange-re/melange
test_demo.ml
let f x = x + 1 let rec fib = function | 1 | 2 -> 1 | n -> fib (n - 1 ) + fib (n - 2) type intlist = | Nil | Cons of int * intlist let nil = Nil let cons x y = Cons(x,y) let rec map f = function | Nil -> Nil | Cons (x,xs) -> Cons (f x, map f xs) let sum n = let v = ref 0 in for i = 0 to n do...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/test_demo.ml
ocaml
let f x = x + 1 let rec fib = function | 1 | 2 -> 1 | n -> fib (n - 1 ) + fib (n - 2) type intlist = | Nil | Cons of int * intlist let nil = Nil let cons x y = Cons(x,y) let rec map f = function | Nil -> Nil | Cons (x,xs) -> Cons (f x, map f xs) let sum n = let v = ref 0 in for i = 0 to n do...
cbb89f269b2d526695b19990e32f9a3b6c05c3c3d4b4f3e4ecb89d956c5f8577
aleator/Simple-SVM
Common.hs
module AI.SVM.Common where import Data.Char import System.Random.MWC import Control.Applicative import Control.Monad import System.Directory import Control.Exception -- * Utilities randomName = withSystemRandom $ \gen -> map chr <$> replicateM 16 (uniformR (97,122::Int) gen) ...
null
https://raw.githubusercontent.com/aleator/Simple-SVM/591b86e645e04ac8e7b73246e9a6b573840fb251/AI/SVM/Common.hs
haskell
* Utilities | Get a name for a temporary file, run operation with the filename and erase the file if the operation creates it.
module AI.SVM.Common where import Data.Char import System.Random.MWC import Control.Applicative import Control.Monad import System.Directory import Control.Exception randomName = withSystemRandom $ \gen -> map chr <$> replicateM 16 (uniformR (97,122::Int) gen) :: IO String ...
587cc4490f9735eac60fbdc8ddf936b80278a4b2d55ed90221ca36d24ba059ef
garrigue/lablgtk
gtkFile.ml
(**************************************************************************) (* Lablgtk *) (* *) (* This program is free software; you can redistribute it *) and/or ...
null
https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/src/gtkFile.ml
ocaml
************************************************************************ Lablgtk This program is free software; you can redistribute it comes with the library. ...
and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation version 2 , with the exception described in file COPYING which GNU Library General Public License for more details . You should have r...
14a8cad16474cee2bfc0c5baba28a74ee6e9978256f42314acecfb9d92904d9c
exercism/haskell
Tests.hs
import Data.Time.Clock (UTCTime) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Gigasecond (fromDay) import Data.Time.Format ( ParseTime , TimeLocale , defaultTimeLocale , iso8601DateFormat , parseTimeOrError ) readTime...
null
https://raw.githubusercontent.com/exercism/haskell/2b98084efc7d5ab098975c462f7977ee19c2fd29/exercises/practice/gigasecond/test/Tests.hs
haskell
import Data.Time.Clock (UTCTime) import Test.Hspec (Spec, describe, it, shouldBe) import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith) import Gigasecond (fromDay) import Data.Time.Format ( ParseTime , TimeLocale , defaultTimeLocale , iso8601DateFormat , parseTimeOrError ) readTime...
4e08b20bab685e980a65daa849050182083cc4eabd8f1355572d12888adde1cc
mokus0/junkbox
Smooth.hs
module Math.Smooth where import Control.Monad import Data.List f x | x <= 0 = 0 | x >= 1 = 1 | otherwise = a / (a + b) where a = exp (- recip x) b = exp (- recip (1-x)) g x = 1 - f x ease x0 x1 a = g a * x0 + f a * x1 split r x = (h f, h g) where h side t = side (0.5 ...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Math/Smooth.hs
haskell
Build a smooth partition of unity where every break has radius 'r' and there are breaks at every point in the given list
module Math.Smooth where import Control.Monad import Data.List f x | x <= 0 = 0 | x >= 1 = 1 | otherwise = a / (a + b) where a = exp (- recip x) b = exp (- recip (1-x)) g x = 1 - f x ease x0 x1 a = g a * x0 + f a * x1 split r x = (h f, h g) where h side t = side (0.5 ...
19f1f0326ed34a7784b6357258f4362613136ee928ed6919fa820d64677f02cc
Ericson2314/lighthouse
PixelMap.hs
-------------------------------------------------------------------------------- -- | Module : Graphics . Rendering . OpenGL.GL.PixelRectangles . PixelMap Copyright : ( c ) 2002 - 2006 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : stable ...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/PixelRectangles/PixelMap.hs
haskell
------------------------------------------------------------------------------ | License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : stable Portability : portable ------------------------------------------------------------------------------ ------------------------...
Module : Graphics . Rendering . OpenGL.GL.PixelRectangles . PixelMap Copyright : ( c ) 2002 - 2006 This module corresponds to a part of section 3.6.1 ( Pixel Storage Modes ) of the OpenGL 2.1 specs . module Graphics.Rendering.OpenGL.GL.PixelRectangles.PixelMap ( PixelMapTarget(..), PixelMapCo...
c5d31690f34dbd85f67378f62d4e74c761a3f3eeb6e49925239996d22ed67b52
alexandergunnarson/quantum
information.cljc
(ns quantum.measure.information (:require [quantum.measure.core :refer [defunits-of]])) ; Basic unit of information (entropy). The entropy in bits ; of a random variable over a finite alphabet is defined ; to be the sum of -p(i)*log2(p(i)) over the alphabet where ; p(i) is the probability that the random variab...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/measure/information.cljc
clojure
Basic unit of information (entropy). The entropy in bits of a random variable over a finite alphabet is defined to be the sum of -p(i)*log2(p(i)) over the alphabet where p(i) is the probability that the random variable takes
(ns quantum.measure.information (:require [quantum.measure.core :refer [defunits-of]])) on the value i. (defunits-of information [:bits #{:b}] :nibble [[4 :bits ] #{:nybbles :nybles }] :B [[8 :bits ] #{:bytes :octets }] :kB [[1024 :B ] #{:kilobytes :kib...
f675f6a0652f0e0326fa21d59f916ac9ae3a843a1568213b799242643d52a4f8
utkarshkukreti/reaml
Reaml_Router_Test.ml
open Jest open Expect module R = Reaml.Router let () = describe "Reaml.Router" (fun () -> describe "Url" (fun () -> describe "fromString" (fun () -> let go string url = test ("\"" ^ string ^ "\"") (fun () -> expect (R.Url.fromString st...
null
https://raw.githubusercontent.com/utkarshkukreti/reaml/5640a36293ba2a765171225deddb644f4d6c5d26/tests/Reaml_Router_Test.ml
ocaml
We are not testing this.
open Jest open Expect module R = Reaml.Router let () = describe "Reaml.Router" (fun () -> describe "Url" (fun () -> describe "fromString" (fun () -> let go string url = test ("\"" ^ string ^ "\"") (fun () -> expect (R.Url.fromString st...
d7d788538a5b8e5619f13c9e9083ee2546bd616e36eba5d60d1eb3302088e072
realworldocaml/book
server.mli
open Import type t val create : root:string -> Dune_stats.t option -> t val listening_address : t -> Dune_rpc.Where.t val stats : t -> Dune_stats.t option type pending_build_action = | Build of Dune_rules.Dep_conf.t list * Decl.Build_outcome.t Fiber.Ivar.t val pending_build_action : t -> pending_build_action Fi...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rpc_impl/server.mli
ocaml
* Stop accepting new rpc connections. Fiber returns when all existing connections terminate
open Import type t val create : root:string -> Dune_stats.t option -> t val listening_address : t -> Dune_rpc.Where.t val stats : t -> Dune_stats.t option type pending_build_action = | Build of Dune_rules.Dep_conf.t list * Decl.Build_outcome.t Fiber.Ivar.t val pending_build_action : t -> pending_build_action Fi...
aa54f697457ddb3f7c422941d2047fecd056826dc07c66c9e9660899f4aa0a4c
juxt/fuzz
async_dommy.cljs
(ns fuzz.async-dommy (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cljs.core.async :refer [timeout <!]] [dommy.core :as dommy :refer-macros [sel1]])) (defn- original-snippet [] (str "<div class='juxt-div'><h1>Killing in the name of <span id=\"bleh\"></span></h1></div>")) ...
null
https://raw.githubusercontent.com/juxt/fuzz/688b64b8750137402857e01e89c0c0307ea87425/src/cljs/fuzz/async_dommy.cljs
clojure
(ns fuzz.async-dommy (:require-macros [cljs.core.async.macros :refer [go go-loop]]) (:require [cljs.core.async :refer [timeout <!]] [dommy.core :as dommy :refer-macros [sel1]])) (defn- original-snippet [] (str "<div class='juxt-div'><h1>Killing in the name of <span id=\"bleh\"></span></h1></div>")) ...
cf2f9e81aa9df4d5f14e010c1cd9c167acb1a101d7f22e6721a184b1773c0bf2
singpolyma/wai-session
Session.hs
# LANGUAGE CPP # module Network.Wai.Session (Session, SessionStore, withSession, genSessionId) where import Data.Monoid (mconcat) import Data.String (fromString) import Control.Monad.IO.Class (liftIO) import Network.HTTP.Types (ResponseHeaders) import Network.Wai (Middleware, Request(..)) #if MIN_VERSION_wai(3,0,0) im...
null
https://raw.githubusercontent.com/singpolyma/wai-session/8a2c8e66615969eeec03f41679e4fdbbce0c9393/Network/Wai/Session.hs
haskell
| Type representing a single session (a lookup, insert pair) | A 'SessionStore' takes in the contents of the cookie (if there was one) and returns a ('Session', 'IO' action to get new contents for cookie) pair | Fully parameterised middleware for cookie-based sessions ^ The 'SessionStore' to use for sessions ^ Na...
# LANGUAGE CPP # module Network.Wai.Session (Session, SessionStore, withSession, genSessionId) where import Data.Monoid (mconcat) import Data.String (fromString) import Control.Monad.IO.Class (liftIO) import Network.HTTP.Types (ResponseHeaders) import Network.Wai (Middleware, Request(..)) #if MIN_VERSION_wai(3,0,0) im...
2aa94ba8d534486d981c74af33e706349bcabb6a6ae76bceec142a76d47fdef0
Vortecsmaster/EmurgoAcademyPlutusExamples
Interest.hs
module Interest where import Control.Monad hiding (fmap) import Data.Aeson (ToJSON, FromJSON) import Data.Map as Map hiding (filter) import Data.Text (Text) import Data.Void (Void) import GHC.Gene...
null
https://raw.githubusercontent.com/Vortecsmaster/EmurgoAcademyPlutusExamples/7a360ac043e9ceb6146cf73cbd2a546af492c984/V1/LendingPlatform/src/Interest.hs
haskell
module Interest where import Control.Monad hiding (fmap) import Data.Aeson (ToJSON, FromJSON) import Data.Map as Map hiding (filter) import Data.Text (Text) import Data.Void (Void) import GHC.Gene...