_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 |
|---|---|---|---|---|---|---|---|---|
4335351fd0f52cb1db2184f4790f442e540ec5d0228cdb37a9e9c7f5996c6cbb | BinaryAnalysisPlatform/bap | powerpc_compare.ml | open Powerpc.Std
* Fix - point Compare Immediate
Page 85 of IBM Power ISATM Version 3.0 B
examples :
2f 89 ff ff , r9 , -1
2f a9 ff ff , r9 , -1
Page 85 of IBM Power ISATM Version 3.0 B
examples:
2f 89 ff ff cmpwi cr7, r9, -1
2f a9 ff ff cmpdi cr7, r9, -1 *... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/97fb7fa6a8a90faeae2b077d8ad59b8b882d7c32/plugins/powerpc/powerpc_compare.ml | ocaml | open Powerpc.Std
* Fix - point Compare Immediate
Page 85 of IBM Power ISATM Version 3.0 B
examples :
2f 89 ff ff , r9 , -1
2f a9 ff ff , r9 , -1
Page 85 of IBM Power ISATM Version 3.0 B
examples:
2f 89 ff ff cmpwi cr7, r9, -1
2f a9 ff ff cmpdi cr7, r9, -1 *... | |
2ba424a02d30981cf3ece6bf639b77889f6a72ebe962689dc18ebc296a0ba9c3 | ghc/ghc | Unit.hs | # LANGUAGE FlexibleInstances #
| Units are library components from Cabal packages compiled and installed in
-- a database
module GHC.Unit
( module GHC.Unit.Types
, module GHC.Unit.Info
, module GHC.Unit.Parser
, module GHC.Unit.State
, module GHC.Unit.Module
, module GHC.Unit.Home
)
where
impor... | null | https://raw.githubusercontent.com/ghc/ghc/f11d9c274d728696bc173c62a2ead62b8288836f/compiler/GHC/Unit.hs | haskell | a database
----
------
------------
taken from
------------
- > UnitInfo { exposed modules , package name , package version
-------- > rts-1.0 - hashABC < --
> base-4.1 - hashXYZ --- > ghc - prim-0.5.3 - hashUVW
------------- > rts < --
> base --------------- > ghc - prim
--------------------------------... | # LANGUAGE FlexibleInstances #
| Units are library components from Cabal packages compiled and installed in
module GHC.Unit
( module GHC.Unit.Types
, module GHC.Unit.Info
, module GHC.Unit.Parser
, module GHC.Unit.State
, module GHC.Unit.Module
, module GHC.Unit.Home
)
where
import GHC.Unit.Typ... |
faf2355888b6e928e70fc3d2934d7d1582a45e099f5a99b5fb0ce0ad44f75574 | leon-gondelman/ocaml2lang | paxos_runner.ml | open Ast
open List_code
open Serialization_code
open Paxos_code
open Unix
let list_to_alist l =
Stdlib.List.fold_left
(fun acc x -> list_cons x acc) list_nil l
let ip = (gethostbyname "localhost").h_addr_list.(0)
let a1 = makeAddress (string_of_inet_addr ip) 1081
let a2 = makeAddress (string_of_inet_addr ip) ... | null | https://raw.githubusercontent.com/leon-gondelman/ocaml2lang/f94f02d35b537623b7e4da812d33eb6c29cc9214/test/aneris_examples/ml_sources/consensus/paxos_runner.ml | ocaml | open Ast
open List_code
open Serialization_code
open Paxos_code
open Unix
let list_to_alist l =
Stdlib.List.fold_left
(fun acc x -> list_cons x acc) list_nil l
let ip = (gethostbyname "localhost").h_addr_list.(0)
let a1 = makeAddress (string_of_inet_addr ip) 1081
let a2 = makeAddress (string_of_inet_addr ip) ... | |
17832fc2e184e20da4dc8ec11681791ffa418dcdbd084b83831990affe5b7839 | krestenkrab/hanoidb | hanoidb_writer_tests.erl | %% ----------------------------------------------------------------------------
%%
hanoidb : LSM - trees ( Log - Structured Merge Trees ) Indexed Storage
%%
Copyright 2011 - 2012 ( c ) .
/
%%
Copyright 2012 ( c ) Basho Technologies , Inc. All Rights Reserved .
%% /
%%
This file is provided to you ... | null | https://raw.githubusercontent.com/krestenkrab/hanoidb/68333fa51a6fdf27834fc84f42d4421f9627e3b7/test/hanoidb_writer_tests.erl | erlang | ----------------------------------------------------------------------------
/
"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
WARRANTIES OR CONDITIONS OF ANY KIN... | hanoidb : LSM - trees ( Log - Structured Merge Trees ) Indexed Storage
Copyright 2011 - 2012 ( c ) .
/
Copyright 2012 ( c ) Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an ... |
21a8eb85e40b53ea4f4ce7500690c23ead4f228a46e3b4ec0049e5f11e4d1121 | RosalesJ/tldr-ocaml | common.mli | open Base
type t =
| Error of string
| Success of string
| Missing
module Environment : sig
val system : String.t
end
module Cache : sig
(* Currently unused *)
val download_location : String.t
(* The timeout age of the cache *)
val max_age : Float.t
(* The directory of the cache *)
val directo... | null | https://raw.githubusercontent.com/RosalesJ/tldr-ocaml/f859f3447ce00e0a34dc95f3e29ab8e0b5bcdd60/src/common.mli | ocaml | Currently unused
The timeout age of the cache
The directory of the cache
Gets the location of a command in the cache
Load a page from the cache
Store a page in the cache
An address to the files | open Base
type t =
| Error of string
| Success of string
| Missing
module Environment : sig
val system : String.t
end
module Cache : sig
val download_location : String.t
val max_age : Float.t
val directory : String.t
val get_file_path : String.t -> String.t -> String.t
val load_page : String.t... |
ecfb7e7e021deb0b3606566ff5789ae607e0c4685db3d349cb2f50b2782972b7 | gsakkas/rite | 0035.ml | AppG [LitG,VarG]
sepConcat " " l
min 0.1 l'
max' 0.1 l'
0 :: ns
r_digitalRoot n (-1)
f 2 xs
f 4 xs
f 0 hd
b ^ "]"
helper 0 n
reverseInt n 0
helpFac n 1
0 :: l2
" " ^ x
| null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/clusters/0035.ml | ocaml | AppG [LitG,VarG]
sepConcat " " l
min 0.1 l'
max' 0.1 l'
0 :: ns
r_digitalRoot n (-1)
f 2 xs
f 4 xs
f 0 hd
b ^ "]"
helper 0 n
reverseInt n 0
helpFac n 1
0 :: l2
" " ^ x
| |
44365436ed1db1541eccd60bfc167be133e2d42c2ef189095443af41b0222262 | Happstack/boomerang | Regular.hs | # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances , FlexibleContexts #
# LANGUAGE TypeOperators #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE UndecidableInstances #
module Web.Boomerang.Regular
( mkBoomerangs
, Boomerangs
, BoomerangList(..)
* Re - exported from Generics . Regular
, deriveAll
, PF
) whe... | null | https://raw.githubusercontent.com/Happstack/boomerang/fc819d93181b42002f4733262315a4eb5f1c2781/Text/Boomerang/Regular.hs | haskell | # LANGUAGE RankNTypes #
| # LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances , FlexibleContexts #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Web.Boomerang.Regular
( mkBoomerangs
, Boomerangs
, BoomerangList(..)
* Re - exported from Generics . Regular
, deriveAll
, PF
) where
import Text.Boomerang.Pr... |
1e51003396bed447bad5409779147fdd2c11e3eaf78a02b65ea5fa8fa25e209f | andrejv/cl-simple-tk | bind.lisp | ;;;
Copyright ( c ) 2015 < >
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a copy
;;; of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
;;; to use, copy, modify, merge, publis... | null | https://raw.githubusercontent.com/andrejv/cl-simple-tk/0ef565fedde588caa62148c2551be1520a955567/src/bind.lisp | lisp |
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright notice... | Copyright ( c ) 2015 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
3a857a710a25245b6ffd60c3b7c8483623abab6c513e331a9657cac46151cc03 | namin/reflection-schemes | jit.scm | (define (jit! process)
(instrument! process)
(monitor optimize! process))
(define (counter-of context branch)
(to-id ':hits (cons branch context)))
(define (instrumented-if? process context)
(get (get process ':env) (counter-of context ':consequent) #f))
(define (instrument! process)
(define (gen ast context... | null | https://raw.githubusercontent.com/namin/reflection-schemes/d3fd61aa7edc8af5f7f2c9783b4e3c5356cd2bd5/01-toyos-jit/jit.scm | scheme | rewrite between
(if C A B) [default]
and
(begin (speculate A) (if C (commit) (begin (undo) B))) [if hitsA >> hitsB]
and
(begin (speculate B) (if C (begin (undo) A) (commit))) [if hitsB >> hitsA]
still optimize even if done... | (define (jit! process)
(instrument! process)
(monitor optimize! process))
(define (counter-of context branch)
(to-id ':hits (cons branch context)))
(define (instrumented-if? process context)
(get (get process ':env) (counter-of context ':consequent) #f))
(define (instrument! process)
(define (gen ast context... |
5dd147301b63fc382695f94d8bf1c214b09ae24c5914bb56c7eb5210d853e63f | CyberCat-Institute/open-game-engine | AtomicGames.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE DeriveGeneric #
# LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleContexts #
module OpenGames.Engine.AtomicGames
( decision
, decisionNoObs
, forwardFunction
, backwardFunction
, natureDraw
, liftStochasticForward
) where
import Language.Haskell.TH
import OpenGames.Engine.Bay... | null | https://raw.githubusercontent.com/CyberCat-Institute/open-game-engine/86031c42bf13178554c21cd7ab9e9d18f1ca6963/src/OpenGames/Engine/AtomicGames.hs | haskell | -------------------------------------
0. A single action making a generic -- parameterized -- decision
---:
---:
---:
---:
---:
---:
---:
---:
---:
---:
---:
---:
generateGame "pureDecision2" ["actionSpace","payoffFunction","playerName"] $
(Block ["observation"] []
[mkLine [[|observation|]] [] [|dependen... | # LANGUAGE TemplateHaskell #
# LANGUAGE DeriveGeneric #
# LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleContexts #
module OpenGames.Engine.AtomicGames
( decision
, decisionNoObs
, forwardFunction
, backwardFunction
, natureDraw
, liftStochasticForward
) where
import Language.Haskell.TH
import OpenGames.Engine.Bay... |
ce9bff89267818ebb844f5b75a72f9cc1a1842a10c6ec675dd31695ac573ff7b | dnaeon/cl-ssh-keys | rfc8017.lisp | Copyright ( c ) 2020 - 2021 Nikolov < >
;; 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 . Redistributions of source code must retain the above copyright
;; notice, this lis... | null | https://raw.githubusercontent.com/dnaeon/cl-ssh-keys/6d196974179e3324823d2a30370a5d67300a5186/src/rfc8017.lisp | lisp | 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
in this position and unchanged.
notice, this list of conditions and the fo... | Copyright ( c ) 2020 - 2021 Nikolov < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL ... |
6518441ce3ef9fc4d16d1b23e07c8ada154daa2476f23ebba0c4af7116b7f485 | BranchTaken/Hemlock | test_bit_not.ml | open! Basis.Rudiments
open! Basis
open I32
let test () =
let rec test = function
| [] -> ()
| x :: xs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_not "
|> fmt ~alt:true ~zpad:true ~width:8L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " -> "
|> fmt ~alt:true ~zpad:true ~wi... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/i32/test_bit_not.ml | ocaml | open! Basis.Rudiments
open! Basis
open I32
let test () =
let rec test = function
| [] -> ()
| x :: xs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_not "
|> fmt ~alt:true ~zpad:true ~width:8L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " -> "
|> fmt ~alt:true ~zpad:true ~wi... | |
c0695742887591b7fd94421e76e35f323a55e572e947f98bf9a27a6a5872e5c6 | ocaml/dune | findlib.mli | (** Findlib database *)
open Import
(** Findlib database *)
type t
val meta_fn : string
val create : paths:Path.t list -> lib_config:Lib_config.t -> t Memo.t
val lib_config : t -> Lib_config.t
(** The search path for this DB *)
val paths : t -> Path.t list
(** The builtins packages *)
val builtins : t -> Meta.Si... | null | https://raw.githubusercontent.com/ocaml/dune/ced7471f49683cf6afa582e8d222d11f5b70ec06/src/dune_rules/findlib/findlib.mli | ocaml | * Findlib database
* Findlib database
* The search path for this DB
* The builtins packages
* The package is hidden because it contains an unsatisfied 'exist_if'
clause
* Lookup a whole package, including sub-packages, in the given database.
[root_name] must be a library name without dots.
* List ... |
open Import
type t
val meta_fn : string
val create : paths:Path.t list -> lib_config:Lib_config.t -> t Memo.t
val lib_config : t -> Lib_config.t
val paths : t -> Path.t list
val builtins : t -> Meta.Simplified.t Package.Name.Map.t
val findlib_predicates_set_by_dune : Variant.Set.t
module Unavailable_reason : s... |
27143c358b7424b8575a42c700d0489f5c5f6b5b50bdc9c6b497d77faeb195fd | Apress/practical-common-lisp-11 | packages.lisp | (in-package :cl-user)
(defpackage :com.gigamonkeys.mp3-browser
(:use :common-lisp
:net.aserve
:com.gigamonkeys.html
:com.gigamonkeys.shoutcast
:com.gigamonkeys.url-function
:com.gigamonkeys.mp3-database
:com.gigamonkeys.id3v2)
(:import-from :acl-socket
... | null | https://raw.githubusercontent.com/Apress/practical-common-lisp-11/3e36d8b02b7f0731ad36c31cbbf01f9de0acf003/practicals/Chapter29/packages.lisp | lisp | (in-package :cl-user)
(defpackage :com.gigamonkeys.mp3-browser
(:use :common-lisp
:net.aserve
:com.gigamonkeys.html
:com.gigamonkeys.shoutcast
:com.gigamonkeys.url-function
:com.gigamonkeys.mp3-database
:com.gigamonkeys.id3v2)
(:import-from :acl-socket
... | |
38f9f5b144475116a3da92dc6f2d9464b35e33a7d3c616d6c999b6d3a9699f7c | RichiH/git-annex | Metered.hs | Metered IO and actions
-
- Copyright 2012 - 2016 < >
-
- License : BSD-2 - clause
-
- Copyright 2012-2016 Joey Hess <>
-
- License: BSD-2-clause
-}
# LANGUAGE TypeSynonymInstances , BangPatterns #
module Utility.Metered where
import Common
import Utility.FileSystemEncoding
import Utility.Per... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Utility/Metered.hs | haskell | An action that can be run repeatedly, updating it on the bytes processed.
-
- Note that each call receives the total number of bytes processed, so
- far, *not* an incremental amount since the last call.
Total number of bytes processed so far.
Sends the content of a file to an action, updating the meter as it's
... | Metered IO and actions
-
- Copyright 2012 - 2016 < >
-
- License : BSD-2 - clause
-
- Copyright 2012-2016 Joey Hess <>
-
- License: BSD-2-clause
-}
# LANGUAGE TypeSynonymInstances , BangPatterns #
module Utility.Metered where
import Common
import Utility.FileSystemEncoding
import Utility.Per... |
9ab533c2254afaf939f90034dc89612fb1c4ebed6459ae075e022d62bf543db4 | onyx-platform/onyx | gc.clj | (ns onyx.gc
(:require [clojure.core.async :refer [chan <!!]]
[onyx.log.entry :refer [create-log-entry]]
[onyx.extensions :as extensions]
[onyx.checkpoint :as checkpoint]
[onyx.static.default-vals :refer [arg-or-default]]
[taoensso.timbre :refer [info]]))
(d... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/gc.clj | clojure | It is possible that a crash will cause the coordinates to not be written,
therefore we attempt to delete past the final checkpoint in cases where
we know this is not the final replica-version.
It is safe to do so, as we know there is a next replica-version with a successful checkpoint.
TODO: monitoring component? | (ns onyx.gc
(:require [clojure.core.async :refer [chan <!!]]
[onyx.log.entry :refer [create-log-entry]]
[onyx.extensions :as extensions]
[onyx.checkpoint :as checkpoint]
[onyx.static.default-vals :refer [arg-or-default]]
[taoensso.timbre :refer [info]]))
(d... |
1011180a76ae8ebf3568a2354a492db3a41eec771685cd0e8d7acac71f75a524 | tomjaguarpaw/haskell-opaleye | Manipulation.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
module Opaleye.Internal.Manipulation where
import qualified Control.Applicative as A
import Opaleye.Internal.Column (Field_(Column), Field)
import qualified Opal... | null | https://raw.githubusercontent.com/tomjaguarpaw/haskell-opaleye/2b264ecd62659f568c838a2bbdd796a4f6c3dd1f/src/Opaleye/Internal/Manipulation.hs | haskell | # LANGUAGE FlexibleContexts #
This method of getting hold of the return type feels a bit
suspect. I haven't checked it for validity.
{ Boilerplate instances
this implementation was copied, it does not make sense yet
^
^ Table to delete rows from
^ Predicate function @f@ to choose which rows to delete.
an... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
module Opaleye.Internal.Manipulation where
import qualified Control.Applicative as A
import Opaleye.Internal.Column (Field_(Column), Field)
import qualified Opaleye.Internal.HaskellDB.Sql as HSql
imp... |
6dcc57e58da62283e3fcc1cd452e71fb358e538f5c532e4838353d5c71e25e3c | kind2-mc/kind2 | jkindParser.ml | This file is part of the Kind 2 model checker .
Copyright ( c ) 2014 by the Board of Trustees of the University of Iowa
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 a... | null | https://raw.githubusercontent.com/kind2-mc/kind2/eda98b79c768d34c29b4dfee4c58a47bae16fdb1/src/certif/jkindParser.ml | ocaml | **********************
Useful hconsed names
**********************
************************************
General settings for JKind parsing
************************************
New scope for the JKind system
We use z3 here but any SMT2lib solver would work
if Debug.mode "fec" then [file]
else
***************... | This file is part of the Kind 2 model checker .
Copyright ( c ) 2014 by the Board of Trustees of the University of Iowa
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 a... |
ca4a92b49270b99014b7f0d0930720ebfc5716199ced99bebe21fff051bd5389 | TakaiKinoko/Cornell_CS3110_OCaml | 03fib.ml | type 'a stream =
Cons of 'a * (unit -> 'a stream)
let hd (Cons (hd, _)) = hd
let tl (Cons (_, tf)) = tf ()
let rec take n s =
if n = 0 then []
else hd s::take (n-1) (tl s)
let rec sum (Cons (h1, tf1)) (Cons (h2, tf2)) =
Cons(h1+h2, fun () -> sum (tf1 ()) (tf2 ()))
let rec fibs =
Cons(1, fu... | null | https://raw.githubusercontent.com/TakaiKinoko/Cornell_CS3110_OCaml/0a830bc50a5e39f010074dc289161426294cad1d/Chap8_Advanced_data_structures/03fib.ml | ocaml | * using Lazy
*would take a long time
*instant result, cuz it's memoised | type 'a stream =
Cons of 'a * (unit -> 'a stream)
let hd (Cons (hd, _)) = hd
let tl (Cons (_, tf)) = tf ()
let rec take n s =
if n = 0 then []
else hd s::take (n-1) (tl s)
let rec sum (Cons (h1, tf1)) (Cons (h2, tf2)) =
Cons(h1+h2, fun () -> sum (tf1 ()) (tf2 ()))
let rec fibs =
Cons(1, fu... |
45bbfc4064fba794fb48d0a6be6c796955cdd69d714873ae04aded9d585acb43 | ogri-la/strongbox | gitlab_api_test.clj | (ns strongbox.gitlab-api-test
(:require
[clojure.test :refer [deftest testing is use-fixtures]]
;;[taoensso.timbre :as log :refer [debug info warn error spy]]
[strongbox
[utils :as utils]
[gitlab-api :as gitlab-api]
[test-helper :refer [fixture-path slurp-fixture]]]
[clj-http.fake :refer [with... | null | https://raw.githubusercontent.com/ogri-la/strongbox/44a0ffd78b40615794057362ba60b6b5e43e5d88/test/strongbox/gitlab_api_test.clj | clojure | [taoensso.timbre :as log :refer [debug info warn error spy]]
probably invalid
all of these should yield the above
all valid variations of the above
trailing slash
http
leading 'www'
looser matching we can also support
all valid variations of the above
trailing slash
http
leading 'www'
looser matching we can... | (ns strongbox.gitlab-api-test
(:require
[clojure.test :refer [deftest testing is use-fixtures]]
[strongbox
[utils :as utils]
[gitlab-api :as gitlab-api]
[test-helper :refer [fixture-path slurp-fixture]]]
[clj-http.fake :refer [with-fake-routes-in-isolation]]))
(deftest api-url
(let [cases [[""... |
d3a67cb53bc2f7a93aad9d8454d260601525b1048a4de87b00473ca741f870a4 | tfausak/patrol | Main.hs | import qualified PatrolSpec
import qualified Test.Hspec as Hspec
main :: IO ()
main = Hspec.hspec $ Hspec.parallel PatrolSpec.spec
| null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Main.hs | haskell | import qualified PatrolSpec
import qualified Test.Hspec as Hspec
main :: IO ()
main = Hspec.hspec $ Hspec.parallel PatrolSpec.spec
| |
841db5ba733b4fb7dca3265a9af0a9e33f1d66e1340c4f9c27aee11e1040e3b5 | racket/gui | test-editor-admin.rkt | #lang scheme/base
(require scheme/class
scheme/gui/base)
(provide test-editor-admin%)
(define the-dc
(new (class* bitmap-dc% ()
(super-new)
(define/override (get-text-extent s [font #f] [combine? #f] [offset 0])
(values (* 10.0 (string-length s)) 10.0 1.0 1.0))
(define... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-test/tests/gracket/test-editor-admin.rkt | racket | #lang scheme/base
(require scheme/class
scheme/gui/base)
(provide test-editor-admin%)
(define the-dc
(new (class* bitmap-dc% ()
(super-new)
(define/override (get-text-extent s [font #f] [combine? #f] [offset 0])
(values (* 10.0 (string-length s)) 10.0 1.0 1.0))
(define... | |
afc7d0ddbcccf815ce55c5c3c0cab5d2c7a41a9a0d846e5d63237e49abaf745b | ice1000/learn | church-numbers-add-multiply-exponents.hs | module Haskell.Codewars.Church where
type Lambda a = (a -> a)
type Cnum a = Lambda a -> Lambda a
churchAdd :: Cnum a -> Cnum a -> Cnum a
churchAdd c1 c2 = \x -> c1 x . c2 x
churchMul :: Cnum a -> Cnum a -> Cnum a
churchMul c1 c2 = c1 . c2
-- Extra credit: Why is the type signature different?
churchPow :: Cnum a -> ... | null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/church-numbers-add-multiply-exponents.hs | haskell | Extra credit: Why is the type signature different? | module Haskell.Codewars.Church where
type Lambda a = (a -> a)
type Cnum a = Lambda a -> Lambda a
churchAdd :: Cnum a -> Cnum a -> Cnum a
churchAdd c1 c2 = \x -> c1 x . c2 x
churchMul :: Cnum a -> Cnum a -> Cnum a
churchMul c1 c2 = c1 . c2
churchPow :: Cnum a -> (Cnum a -> Cnum a) -> Cnum a
churchPow cb ce = ce cb
|
31941afa1d31e62af9007bd0db4faae45fe43bcd2faaa03b43c32cf07f7a4335 | larrychristensen/orcpub | ua_sorcerer.cljc | (ns orcpub.dnd.e5.templates.ua-sorcerer
(:require [orcpub.common :as common]
[orcpub.modifiers :as mod]
[orcpub.dnd.e5.modifiers :as mod5e]
[orcpub.dnd.e5.character :as char5e]
[orcpub.dnd.e5.options :as opt5e]
[orcpub.dnd.e5.units :as units5e]
[... | null | https://raw.githubusercontent.com/larrychristensen/orcpub/e83995857f7e64af1798009a45a0b03abcd3a4be/src/cljc/orcpub/dnd/e5/templates/ua_sorcerer.cljc | clojure | (ns orcpub.dnd.e5.templates.ua-sorcerer
(:require [orcpub.common :as common]
[orcpub.modifiers :as mod]
[orcpub.dnd.e5.modifiers :as mod5e]
[orcpub.dnd.e5.character :as char5e]
[orcpub.dnd.e5.options :as opt5e]
[orcpub.dnd.e5.units :as units5e]
[... | |
3d4c5b1bfe30c974f1a35ac80cd7f3e4c1203682e5314a3fa96fe078d301ebd6 | racket/deinprogramm | reader.rkt | #lang s-exp syntax/module-reader
deinprogramm/DMdA-vanilla
| null | https://raw.githubusercontent.com/racket/deinprogramm/e9fb68455641ae7d409ddb48f5e584c9d014ef4f/deinprogramm/deinprogramm/DMdA-vanilla/lang/reader.rkt | racket | #lang s-exp syntax/module-reader
deinprogramm/DMdA-vanilla
| |
46eedc9ff101a3881ed3cca842dce51538e5c3d43762f7860dff2ca9262e75b5 | OpenC2-org/ocas | act_resume.erl | @author
( C ) 2017 , sFractal Consulting LLC
-module(act_resume).
%%%-------------------------------------------------------------------
%%%
%%% All rights reserved.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%%
%%% Redistribution and use in source and binary forms, with or without
... | null | https://raw.githubusercontent.com/OpenC2-org/ocas/c15132d9f37b1e0e29884456a520557c25b22f38/apps/ocas/src/action_servers/act_resume.erl | erlang | -------------------------------------------------------------------
All rights reserved.
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... | @author
( C ) 2017 , sFractal Consulting LLC
-module(act_resume).
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( ... |
2bb57564ee4612db5b14833ca61c5eef715291b443937656681b04412be8eb64 | andersfugmann/amqp-client | thread.ml | (** Async compatibility layer *)
open Amqp_client_lib
open Async
module Deferred = struct
type 'a t = 'a Deferred.t
let all_unit = Deferred.all_unit
let try_with f = Monitor.try_with ~extract_exn:true f >>= function
| Core.Result.Ok v -> return (`Ok v)
| Core.Result.Error exn -> return (`Error exn)
mod... | null | https://raw.githubusercontent.com/andersfugmann/amqp-client/e6e92225b91742fa8777a02ad9b59a1dde45e752/async/src/thread.ml | ocaml | * Async compatibility layer
Use of a predefiend tag allows the caller to disable logging if needed
Pipes | open Amqp_client_lib
open Async
module Deferred = struct
type 'a t = 'a Deferred.t
let all_unit = Deferred.all_unit
let try_with f = Monitor.try_with ~extract_exn:true f >>= function
| Core.Result.Ok v -> return (`Ok v)
| Core.Result.Error exn -> return (`Error exn)
module List = struct
let init ~f... |
7222b8aff93520f932422d299e0ed7b50b12336b3407703aae3c82f81d1e7062 | w3ntao/programming-in-haskell | Exercise_13_11_7.hs | # OPTIONS_GHC -Wall #
module Exercise_13_11_7 where
import Control.Applicative
import Data.Char
newtype Parser a = P (String -> [(a, String)])
parse :: Parser a -> String -> [(a, String)]
parse (P p) inp = p inp
instance Functor Parser where
fmap g p = P (\inp -> case parse p inp of
... | null | https://raw.githubusercontent.com/w3ntao/programming-in-haskell/c2769fa19d8507aad209818c83f67e82c3698f07/Chapter-13/Exercise_13_11_7.hs | haskell | # OPTIONS_GHC -Wall #
module Exercise_13_11_7 where
import Control.Applicative
import Data.Char
newtype Parser a = P (String -> [(a, String)])
parse :: Parser a -> String -> [(a, String)]
parse (P p) inp = p inp
instance Functor Parser where
fmap g p = P (\inp -> case parse p inp of
... | |
e1a35bf445d2690e0c5daf33034e65a11b153451f1f7d9cecf4bf76321fcc5aa | nixeagle/cl-irc | command.lisp | $ Id$
;;;; $Source$
;;;; See LICENSE for licensing information.
(in-package :irc)
(defgeneric pass (connection password))
(defgeneric nick (connection new-nickname))
(defgeneric user- (connection username mode &optional realname))
(defgeneric oper (connection name password))
(defgeneric mode (connection nickname m... | null | https://raw.githubusercontent.com/nixeagle/cl-irc/efaea15f2962107ea9b1a2fad5cd9db492b4247b/tags/cl_irc_0_7/command.lisp | lisp | $Source$
See LICENSE for licensing information.
utility functions not part of the RFCs
utility function not part of the RFC
utility function not part of the RFC
utility functions not part of the RFC
arbitrary port
the use of hostname here is incorrect (it could be a firewall's IP) | $ Id$
(in-package :irc)
(defgeneric pass (connection password))
(defgeneric nick (connection new-nickname))
(defgeneric user- (connection username mode &optional realname))
(defgeneric oper (connection name password))
(defgeneric mode (connection nickname mode))
(defgeneric op (connection channel nickname))
(defge... |
967a3b046bec6977ca5136edd587185bd94c50453cd0e4c1edca9559e701a652 | dschrempf/elynx | ByteString.hs | -- |
-- Module : ELynx.Tools.ByteString
Copyright : 2021
License : GPL-3.0 - or - later
--
-- Maintainer :
-- Stability : unstable
-- Portability : portable
--
Creation date : Thu Feb 14 13:24:53 2019 .
--
indispensable tools for ByteString handling :) .
module ELynx.Tools.ByteString
... | null | https://raw.githubusercontent.com/dschrempf/elynx/f73f4474c61c22c6a9e54c56bdc34b37eff09687/elynx-tools/src/ELynx/Tools/ByteString.hs | haskell | |
Module : ELynx.Tools.ByteString
Maintainer :
Stability : unstable
Portability : portable
* ByteString handling
| For a given width, align string to the right; use given fill character;
trim on the left if string is longer.
| For a given width, align string to the right; trim on the left if st... | Copyright : 2021
License : GPL-3.0 - or - later
Creation date : Thu Feb 14 13:24:53 2019 .
indispensable tools for ByteString handling :) .
module ELynx.Tools.ByteString
alignRightWith,
alignRight,
alignLeftWith,
alignLeft,
)
where
import qualified Data.ByteString.Lazy.Char8 as ... |
8615240acd393794fce2ec300af1ae638196b9a80218adf3124e94bbd774ca5e | REPROSEC/dolev-yao-star | Vale_X64_InsBasic.ml | open Prims
type vale_heap = Vale_Arch_HeapImpl.vale_heap
type vale_stack = Vale_X64_Stack_i.vale_stack
let (va_code_Mov64 :
Vale_X64_Machine_s.operand64 ->
Vale_X64_Machine_s.operand64 ->
(Vale_X64_Decls.ins, Vale_X64_Decls.ocmp) Vale_X64_Machine_s.precode)
=
fun dst ->
fun src ->
Vale_X64_Tai... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_X64_InsBasic.ml | ocaml | open Prims
type vale_heap = Vale_Arch_HeapImpl.vale_heap
type vale_stack = Vale_X64_Stack_i.vale_stack
let (va_code_Mov64 :
Vale_X64_Machine_s.operand64 ->
Vale_X64_Machine_s.operand64 ->
(Vale_X64_Decls.ins, Vale_X64_Decls.ocmp) Vale_X64_Machine_s.precode)
=
fun dst ->
fun src ->
Vale_X64_Tai... | |
c3454cbcff3820e4e9c3b8aa9f10c237909a8148c81f5488d94c5aecf0622192 | AbleEng/hexpacker | haversine.clj | (ns hexpacker.haversine)
Haversine formula
a = sin²(Δφ/2 ) + cos φ1 ⋅ cos φ2 )
c = 2 ( √a , √(1−a ) )
; d = R ⋅ c
where φ is latitude , λ is longitude , R is earth ’s radius ( mean radius = 6,371 km ) ;
(defn haversine
"Implementation of Haversine formula. Takes two sets of latitude/longitude pairs and ... | null | https://raw.githubusercontent.com/AbleEng/hexpacker/41b0d0c224021d6c04cd31b15d38e0301f4f28c1/src/hexpacker/haversine.clj | clojure | d = R ⋅ c
φ2 = asin( (sin φ1 ⋅ cos δ) + (cos φ1 ⋅ sin δ ⋅ cos θ) )
d being the distance travelled , R the earth ’s radius | (ns hexpacker.haversine)
Haversine formula
a = sin²(Δφ/2 ) + cos φ1 ⋅ cos φ2 )
c = 2 ( √a , √(1−a ) )
(defn haversine
"Implementation of Haversine formula. Takes two sets of latitude/longitude pairs and returns the shortest great circle distance between them (in km)"
[{lon1 :lng lat1 :lat} {lon2 :lng la... |
99873cede8a28b1ab9182ff40949929664484401f927578900d4258d78265642 | brainsickcc/bscc | GccArgParse.hs | Copyright © 2012
-- This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later version.
--
-- This program is distributed in th... | null | https://raw.githubusercontent.com/brainsickcc/bscc/f47a83f5c77d0ef483e957032715ac4007fcb44d/Bscc/GccArgParse.hs | haskell | This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General ... | Copyright © 2012
it under the terms of the GNU Affero 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 Affero General Public License
# LANGUAGE TemplateHaskell #
| Support for command line arguments parsi... |
c9b658cb48e1eef27f5cca9168c9ffa55a955306eca6e25965e89838c9d68da5 | finnishtransportagency/harja | ikonit.cljs | (ns harja.ui.ikonit
"Kaikki bootstrap ja muut ikonit."
(:refer-clojure :exclude [remove repeat print list filter sort])
(:require-macros [harja.ui.svg-sprite :refer [maarittele-svg-spritet]]))
(defn euro []
[:span.glyphicon.glyphicon-euro])
(defn eur []
[:span.glyphicon.glyphicon-eur])
(defn minus []
[... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/37dea24dfa3dab4ad933b3126c0a07148444f682/src/cljs/harja/ui/ikonit.cljs | clojure | harja-icons -ikonifontti
Käytetty icomoon.io-työkalua:
-
- yläpalkki: import icons -> dev-resources/images/harja-icons-flat
- alapalkki: generate font
- yläpalkki: preferences
- font name: harja-icons
- class prefix: harja-icon-
- alapalkki: download
- pura zip
- cd harja-icons-v1.0
- kopioi fontit
... | (ns harja.ui.ikonit
"Kaikki bootstrap ja muut ikonit."
(:refer-clojure :exclude [remove repeat print list filter sort])
(:require-macros [harja.ui.svg-sprite :refer [maarittele-svg-spritet]]))
(defn euro []
[:span.glyphicon.glyphicon-euro])
(defn eur []
[:span.glyphicon.glyphicon-eur])
(defn minus []
[... |
bee2f3792207133c2cf470619ad49a3bf5275ffd25236c86dbd4d27e41ca12a3 | vulcanize/purplechain | Tendermint.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Tendermint where
import ... | null | https://raw.githubusercontent.com/vulcanize/purplechain/a5921e6337c8e595cc869224c6051bc70f94799a/purplechain/src/Tendermint.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
CLI
Cannot resume network
-o-a-m/kepler/issues/217 | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Tendermint where
import Control.Concurrent.Async (forConcurrently_, ... |
7c9c38b688c34a6d2a78afb139513731badd20549ae69b1a6f620bc7196eeb82 | akvo/akvo-flow-api | fixtures.clj | (ns org.akvo.flow-api.fixtures
(:require [com.stuartsierra.component :as component]
clj-http.client
[duct.util.system :as duct]))
(def ^:dynamic *system*)
(defmacro try-for [msg how-long & body]
`(let [start-time# (System/currentTimeMillis)]
(loop []
(let [[status# return#] (tr... | null | https://raw.githubusercontent.com/akvo/akvo-flow-api/13c6d87eded631fb0ce268e6acce82c639807da8/api/test/clojure/org/akvo/flow_api/fixtures.clj | clojure | (ns org.akvo.flow-api.fixtures
(:require [com.stuartsierra.component :as component]
clj-http.client
[duct.util.system :as duct]))
(def ^:dynamic *system*)
(defmacro try-for [msg how-long & body]
`(let [start-time# (System/currentTimeMillis)]
(loop []
(let [[status# return#] (tr... | |
ba8b39554af98aa6435244f404a69a95a2f4d21ff2e8330d71990a8f70cf0c1d | atlas-engineer/nyxt | tts.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(nyxt:define-package :nyxt/tts-mode
(:documentation "Mode for interacting with Text-to-Speech (TTS) software."))
(in-package :nyxt/tts-mode)
(define-mode tts-mode ()
"A mode for interacting with Text-to-Speech (TTS) s... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/90cbf46c24dcd8caeeac2fe9b86b0437633ed2a3/source/mode/tts.lisp | lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(nyxt:define-package :nyxt/tts-mode
(:documentation "Mode for interacting with Text-to-Speech (TTS) software."))
(in-package :nyxt/tts-mode)
(define-mode tts-mode ()
"A mode for interacting with Text-to-Speech (TTS) s... | |
5561b874f5e6c0cdebc14cf10621832797a1ab708014024226238f1c29cddfee | replikativ/konserve | indexeddb_test.cljs | (ns konserve.indexeddb-test
(:require [cljs.core.async :refer [go take! <! >! put! take! close!]]
[cljs.test :refer-macros [deftest is testing async]]
[fress.api :as fress]
[konserve.core :as k]
[konserve.indexeddb :as idb]
[konserve.protocols :as p])
(:im... | null | https://raw.githubusercontent.com/replikativ/konserve/92f96100e715d68df8c93544cbd6e0abd74fa965/test/konserve/indexeddb_test.cljs | clojure | assoc-in overwrites | (ns konserve.indexeddb-test
(:require [cljs.core.async :refer [go take! <! >! put! take! close!]]
[cljs.test :refer-macros [deftest is testing async]]
[fress.api :as fress]
[konserve.core :as k]
[konserve.indexeddb :as idb]
[konserve.protocols :as p])
(:im... |
df3ed1d6d7d114c8d8a2681e1092119d8641b91ee408ece48f83785cd2b4a07c | strymonas/strymonas-ocaml | backends.ml | (* Convinient functions for selecting a backend *)
(* MetaOCaml backend
This backend implements the `least-common denominator' of backends:
user actions implemented with this backend would work as they are
if we switch to any other backend, like C.
Beside implementing the backend interface, the module o... | null | https://raw.githubusercontent.com/strymonas/strymonas-ocaml/b45ab87c62e5bb845ff4a989064f30ed6b468f6d/lib/backends.ml | ocaml | Convinient functions for selecting a backend
MetaOCaml backend
This backend implements the `least-common denominator' of backends:
user actions implemented with this backend would work as they are
if we switch to any other backend, like C.
Beside implementing the backend interface, the module offers p... |
module MetaOCamlGen(C: module type of Trx_code) = struct
include Pk_cde.Make(C)
let ident = "MetaOCaml"
let print x =
Codelib.print_code Format.std_formatter (dyn x);
Format.fprintf Format.std_formatter "@."
let to_code : 'a cde -> 'a code = dyn
let one_arg_fun : ('a cde -> 'b cde) -> ('a -> 'b)... |
367eddf4e517c52df92f7d7d251759b79b09f6fe8a71608bdcad01e6ff588ce5 | containium/containium | ring_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 containium.systems.ring-test
(:require [clojure.test :refer :all]
[containium.systems.ring :as ring]))
(deftest config
(le... | null | https://raw.githubusercontent.com/containium/containium/dede4098de928bed9ce8fccfc0a3891655ee162e/test/containium/systems/ring_test.clj | clojure | 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 containium.systems.ring-test
(:require [clojure.test :refer :all]
[containium.systems.ring :as ring]))
(deftest config
(le... | |
88ecf924cc498ad510b27fd1f0a7534be593ed08298f158fa2db7f5adf0a29ad | ashinn/alschemist | operands.scm | operands.scm - Sassy 's operand predicates
Copyright ( C ) 2005
; This library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any lat... | null | https://raw.githubusercontent.com/ashinn/alschemist/13d7105c1291a881b8d8d69c8e60e045428c04b1/jkode/sassy/operands.scm | scheme | This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See t... | operands.scm - Sassy 's operand predicates
Copyright ( C ) 2005
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin St , Fifth Floor , Boston , MA 02110 - 1301 USA
Sunnyside , NY... |
885baccfdcaf8bf24b26e1b83c4fbc2fafb84a356defaa84f14d691df01745d4 | Clozure/ccl-tests | random-type-prop-tests.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun Feb 20 11:50:26 2005
;;;; Contains: Randomized tests of type propagation during compilation
(compile-and-load "random-type-prop.lsp")
(in-package :cl-test)
(load "random-type-prop-tests-01.lsp")
(load "random-type-prop-tests-02.lsp")
(load "random-type-prop-t... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/random-type-prop-tests.lsp | lisp | -*- Mode: Lisp -*-
Contains: Randomized tests of type propagation during compilation | Author :
Created : Sun Feb 20 11:50:26 2005
(compile-and-load "random-type-prop.lsp")
(in-package :cl-test)
(load "random-type-prop-tests-01.lsp")
(load "random-type-prop-tests-02.lsp")
(load "random-type-prop-tests-03.lsp")
(load "random-type-prop-tests-04.lsp")
(load "random-type-prop-tests-05.lsp")
(lo... |
6040f5ebc363a5dc88741ac0ce8b3c78e4bef046a09166dec20157b92fd8e586 | euhmeuh/rilouworld | quest.rkt | #lang racket/base
(provide
(all-from-out rilouworld/private/quest/props)
(all-from-out rilouworld/private/quest/world)
(all-from-out rilouworld/private/quest/loader))
(require
rilouworld/private/quest/props
rilouworld/private/quest/world
rilouworld/private/quest/loader)
(module reader reprovide
rilouworld... | null | https://raw.githubusercontent.com/euhmeuh/rilouworld/184dea6c187f4f94da6616b89ec15cc8ba6bb786/quest.rkt | racket | #lang racket/base
(provide
(all-from-out rilouworld/private/quest/props)
(all-from-out rilouworld/private/quest/world)
(all-from-out rilouworld/private/quest/loader))
(require
rilouworld/private/quest/props
rilouworld/private/quest/world
rilouworld/private/quest/loader)
(module reader reprovide
rilouworld... | |
e220b37ec124fb58aaa6596605f2a0922c99b67dcc0a5a768334a171313fe31e | tweag/asterius | T14702.hs | module Main where
import Control.Monad
import Data.Array.IO.Safe
import Data.Word
import GHC.Stats
import System.Exit
import System.Mem
printAlloc :: String -> IO (Word64, Word64)
printAlloc name = do
performGC
details <- gc <$> getRTSStats
let dat = (gcdetails_live_bytes details, gcdetails_mem_in_use_byt... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/rts/T14702.hs | haskell | do something with memory to prevent it from being GC'ed until now
Now there is no reason to have more memory allocated than at start | module Main where
import Control.Monad
import Data.Array.IO.Safe
import Data.Word
import GHC.Stats
import System.Exit
import System.Mem
printAlloc :: String -> IO (Word64, Word64)
printAlloc name = do
performGC
details <- gc <$> getRTSStats
let dat = (gcdetails_live_bytes details, gcdetails_mem_in_use_byt... |
d8f6f19c33c85106150e9ed35df5e1fcc6d12117d5d5bf99d2d409aab2d30db5 | mukul-rathi/bolt | pprint_parser_tokens.mli | * This module is responsible for pretty - printing the tokens output by the lexer . It is
used in the Alcotest lexer unit tests
used in the Alcotest lexer unit tests*)
val pprint_tokens : Parser.token Fmt.t
| null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/src/frontend/parsing/pprint_parser_tokens.mli | ocaml | * This module is responsible for pretty - printing the tokens output by the lexer . It is
used in the Alcotest lexer unit tests
used in the Alcotest lexer unit tests*)
val pprint_tokens : Parser.token Fmt.t
| |
0d5655c5c612ba6ea0f0788bc48ee998649bd57e7c156d9a2af37cae0b9b94bd | ofmooseandmen/jord | GeodesicSpec.hs | module Data.Geo.Jord.GeodesicSpec
( spec
) where
import Test.Hspec
import Data.Geo.Jord.Angle (Angle)
import qualified Data.Geo.Jord.Angle as Angle
import qualified Data.Geo.Jord.Geodesic as Geodesic
import Data.Geo.Jord.Geodetic (HorizontalPosition)
import qualified Data.Geo.Jord.Geodetic as Geodetic
import ... | null | https://raw.githubusercontent.com/ofmooseandmen/jord/9acd8d9aec817ce05de6ed1d78e025437e1193bf/test/Data/Geo/Jord/GeodesicSpec.hs | haskell | -ellipsoidal-vincenty-tests.js. | module Data.Geo.Jord.GeodesicSpec
( spec
) where
import Test.Hspec
import Data.Geo.Jord.Angle (Angle)
import qualified Data.Geo.Jord.Angle as Angle
import qualified Data.Geo.Jord.Geodesic as Geodesic
import Data.Geo.Jord.Geodetic (HorizontalPosition)
import qualified Data.Geo.Jord.Geodetic as Geodetic
import ... |
1f016ecea71b3f7150c163459f2ccc2c4632b97a6e1b7ba7867504bad34fe88c | BioHaskell/hPDB | PDB.hs | | Default interface for @Bio . PDB@ package .
-- Ideally should expose all commonly used functions and classes.
module Bio.PDB(parse, write, PDBWritable,
Structure(..), Model(..), Chain(..), Residue(..), Atom(..),
Iterable(..),
numAtoms, numResidues, numChains, numModels,
... | null | https://raw.githubusercontent.com/BioHaskell/hPDB/5be747e2f2c57370b498f4c11f9f1887fdab0418/Bio/PDB.hs | haskell | Ideally should expose all commonly used functions and classes. | | Default interface for @Bio . PDB@ package .
module Bio.PDB(parse, write, PDBWritable,
Structure(..), Model(..), Chain(..), Residue(..), Atom(..),
Iterable(..),
numAtoms, numResidues, numChains, numModels,
firstModel,
resname2fastacode, fasta... |
10b0ddff8da85e5141d9ccff9c99b5ef214afdb0bfa2583ff52a3d6fbbddae2a | ocaml-gospel/gospel | cli.ml | (**************************************************************************)
(* *)
GOSPEL -- A Specification Language for OCaml
(* *)
Copyright ( ... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/299f4b351fe5c65474bdead7f388ec7cf55f8f23/bin/cli.ml | ocaml | ************************************************************************
(as described in file LICE... | GOSPEL -- A Specification Language for OCaml
Copyright ( c ) 2018- The VOCaL Project
This software is free software , distributed under the MIT license
open Cmdliner
let ocaml_file =
let parse s =
match Sys.file_exists s with
| true ->... |
45cc4e76b724fa0a0055c36e1e3da37645d680e3742a0011d73a1fe35272e6b5 | hsyl20/haskus-system | Terminal.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
| This module provides some functions to use Linux
-- terminals
module Haskus.System.Linux.Terminal
( stdin
, stdout
, stderr
, writeStr
, writeStrLn
, readChar
)
where
import Haskus.System.Linux.ErrorCode
import Haskus.System.Linux.FileSyste... | null | https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system/src/lib/Haskus/System/Linux/Terminal.hs | haskell | terminals
| Standard input (by convention)
| Standard output (by convention)
| Standard error output (by convention)
| Write a String in the given file descriptor
| Write a String with a newline character in the given
file descriptor
| Read a single character
read | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
| This module provides some functions to use Linux
module Haskus.System.Linux.Terminal
( stdin
, stdout
, stderr
, writeStr
, writeStrLn
, readChar
)
where
import Haskus.System.Linux.ErrorCode
import Haskus.System.Linux.FileSystem.ReadWrite
i... |
06735c9d9eeed4950ca6d2721c2d90fb9eded985f43c469e233158bf4c238347 | binghe/cl-net-snmp | snmpv2-tc.lisp | ;;;; -*- Mode: Lisp -*-
Generated from MIB : IETF;SNMPV2 - TC by CL - NET - SNMP
(in-package :asn.1)
(eval-when (:load-toplevel :execute)
(setf *current-module* '|SNMPv2-TC|))
(defpackage :|ASN.1/SNMPv2-TC|
(:nicknames :|SNMPv2-TC|)
(:use :common-lisp :asn.1)
(:import-from :|ASN.1/SNMPv2-SMI| |TimeTicks|))
... | null | https://raw.githubusercontent.com/binghe/cl-net-snmp/3cf053bce75734097f0d7e2245a53fa0c45f5e05/compiled-mibs/snmpv2-tc.lisp | lisp | -*- Mode: Lisp -*-
SNMPV2 - TC by CL - NET - SNMP
otherwise, the value held by the instance is
'notInService' has
and,
or, it is
creating the conceptual row; initializing any
and,
however, it is also a
otherwise, if there is insufficient
in this case, existing values | (in-package :asn.1)
(eval-when (:load-toplevel :execute)
(setf *current-module* '|SNMPv2-TC|))
(defpackage :|ASN.1/SNMPv2-TC|
(:nicknames :|SNMPv2-TC|)
(:use :common-lisp :asn.1)
(:import-from :|ASN.1/SNMPv2-SMI| |TimeTicks|))
(in-package :|SNMPv2-TC|)
(defmacro textual-convention ())
(define-textual-conve... |
eb32627d691cabaec2e959f38fdaaa9d88d75a16c8a5ffefefdc33b9ff551253 | ocaml-explore/explore | build.mli | val read_and_build :
build:(string * string -> 'a) ->
check:(string -> bool) ->
dir:string ->
'a list
(** [read_collection build check dir] will apply [build] to the contents of each
file in [dir] where [check file] is [true] *)
val build_page : file:string -> Page.t
| null | https://raw.githubusercontent.com/ocaml-explore/explore/117768b378959f18a8d818f37779a750e90f3438/explore/lib/build.mli | ocaml | * [read_collection build check dir] will apply [build] to the contents of each
file in [dir] where [check file] is [true] | val read_and_build :
build:(string * string -> 'a) ->
check:(string -> bool) ->
dir:string ->
'a list
val build_page : file:string -> Page.t
|
862049dc930d3b7f54a80ca4f65c26effc7f0a5ece3311506fd7386131a7a50d | puppetlabs/trapperkeeper-webserver-jetty9 | repl.clj | (ns examples.ring-app.repl
(:require [puppetlabs.trapperkeeper.services.webserver.jetty9-service
:refer [jetty9-service]]
[examples.ring-app.example-services
:refer [count-service bert-service ernie-service]]
[puppetlabs.trapperkeeper.core :as tk]
[puppe... | null | https://raw.githubusercontent.com/puppetlabs/trapperkeeper-webserver-jetty9/98fd16ef3df2b0b753fce743848bc078d9527cb7/examples/ring_app/src/examples/ring_app/repl.clj | clojure | This namespace shows an example of the "reloaded" clojure workflow
( -workflow-reloaded )
( #reloading )
You can load this namespace up into a REPL and then run `(go)` to boot
and run the sample application. Then, you can run `(reset)` at any time
to stop the running app, reload all of the necessary namespaces... | (ns examples.ring-app.repl
(:require [puppetlabs.trapperkeeper.services.webserver.jetty9-service
:refer [jetty9-service]]
[examples.ring-app.example-services
:refer [count-service bert-service ernie-service]]
[puppetlabs.trapperkeeper.core :as tk]
[puppe... |
e91e9e6b7208140a0e162e9ce808f651e559fd726014d1cc5ff358f0c0f228e1 | bos/rwh | myDrop.hs | {-- snippet myDrop.type --}
myDrop :: Int -> [a] -> [a]
{-- /snippet myDrop.type --}
{-- snippet myDrop --}
-- this is a comment, which continues until the end of the line
-- and this is the function definition
myDrop n xs = if n <= 0 || null xs
then xs
else myDrop (n - 1) (tail xs)
{-- /s... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch03/myDrop.hs | haskell | - snippet myDrop.type -
- /snippet myDrop.type -
- snippet myDrop -
this is a comment, which continues until the end of the line
and this is the function definition
- /snippet myDrop -
{-- snippet myDrop1 -
- /snippet myDrop1 -
- snippet myDrop2 -
- /snippet myDrop2 -
- snippet niceDrop -
- /snippet niceDrop - | myDrop :: Int -> [a] -> [a]
myDrop n xs = if n <= 0 || null xs
then xs
else myDrop (n - 1) (tail xs)
myDrop n xs = if n <= 0 || null xs
then xs
else myDrop (n - 1) (tail xs)
-}
myDropX n xs = if n <= 0 || null xs then xs else myDropX (n - 1) (tail xs)
niceDro... |
e549c13c75144b25bd44bf706515d4f7084f7a3032e97ea00b69d188f7d783a6 | spawnfest/eep49ers | xmerl_test_lib.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2006 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/xmerl/test/xmerl_test_lib.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 l... | Copyright Ericsson AB 2006 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < bertil@finrod >
Created : 28 Apr 2006 by < bertil@finrod >
-module(xmerl_test_lib).
-compile(ex... |
9bac58ad55cb0109dd69f7046f8e964291d66d3a8138e1fed312c8bc720fcab1 | zotonic/zotonic | zotonic_model.erl | @author < >
2009 - 2018
%% @doc Model behaviour
Copyright 2009 - 2018
%%
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 applicabl... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_core/src/behaviours/zotonic_model.erl | erlang | @doc Model behaviour
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 l... | @author < >
2009 - 2018
Copyright 2009 - 2018
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(zotonic_model).
-author("Marc Worrell <").
-type opt_msg() :: mqtt_packet_map:mqtt_packet() | undefined.
-... |
3be08fc6168d10b20ec4c66290b06394951aff6715bb30eff16e96495f324a21 | bobot/FetedelascienceINRIAsaclay | init_color.ml | open Graphics
open Printf
open Ppm
open Rubik
module D = Display_base
exception Bad_Encoding
* Initialize the rubik state taking snapshot of the real rubik !
module Color =
struct
type t = Red | Green | Yellow | White | Orange | Blue
let all = [Red ; Green ; Yellow ; White ; Orange ; Blue]
let to_rgb = funct... | null | https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/examples_mindstorm_lab/rubik/init_color.ml | ocaml | according to wikipedia []
we can find the hue from the rbg in this way
red is the maximun
green is the maximum
blue is the maximum
center facelet
returns the color of the element [id] of the face [face]
compute the average vector of a vector list
take face with taking the snapshot manually
used fo... | open Graphics
open Printf
open Ppm
open Rubik
module D = Display_base
exception Bad_Encoding
* Initialize the rubik state taking snapshot of the real rubik !
module Color =
struct
type t = Red | Green | Yellow | White | Orange | Blue
let all = [Red ; Green ; Yellow ; White ; Orange ; Blue]
let to_rgb = funct... |
4ef0c80041b3a231bb2c7838552e41ea7273b0709fd923940e68b1f9e9085bf7 | helvm/helma | EvalParams.hs | module HelVM.HelMA.Automaton.API.EvalParams where
import HelVM.HelMA.Automaton.API.AutoOptions
import HelVM.HelMA.Automaton.API.AutoParams
import HelVM.HelMA.Automaton.API.IOTypes
import HelVM.HelMA.Automaton.Types.CellType
import HelVM.HelMA.Automaton.Types.DumpType
... | null | https://raw.githubusercontent.com/helvm/helma/2ae31668ce11ded53daf01effe25047d5ce471cf/hs/src/HelVM/HelMA/Automaton/API/EvalParams.hs | haskell | | Accessors
| Type | module HelVM.HelMA.Automaton.API.EvalParams where
import HelVM.HelMA.Automaton.API.AutoOptions
import HelVM.HelMA.Automaton.API.AutoParams
import HelVM.HelMA.Automaton.API.IOTypes
import HelVM.HelMA.Automaton.Types.CellType
import HelVM.HelMA.Automaton.Types.DumpType
... |
9f5795b3deb5b787aa59cf295a74a874d7b7abb6c4b2b57ddf68a2973e962738 | bnoordhuis/chicken-core | irregex.import.scm | ;;;; irregex.import.scm - import library for "regex" module (irregex API)
;
Copyright ( c ) 2008 - 2013 , The Chicken Team
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
; conditions are met:
;
; Redistributions o... | null | https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/irregex.import.scm | scheme | irregex.import.scm - import library for "regex" module (irregex API)
All rights reserved.
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 l... | Copyright ( c ) 2008 - 2013 , The Chicken Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE... |
301a3446d2152f9f07a89b3e274a8f4023447d249c37d178a60767747fe0222c | tanders/cluster-engine | 6d.lisp | (in-package cluster-engine) (setf *random-state* (make-random-state t))
(print
(ClusterEngine 10 t nil
(r-rhythm-pitch-one-voice
#'(lambda (x y)
(= (second x)(second y))
)
0 :rhythm/pitch-segment :e... | null | https://raw.githubusercontent.com/tanders/cluster-engine/064ad4fd107f8d9a3dfcaf260524c2ab034c6d3f/test_files/6d.lisp | lisp | (in-package cluster-engine) (setf *random-state* (make-random-state t))
(print
(ClusterEngine 10 t nil
(r-rhythm-pitch-one-voice
#'(lambda (x y)
(= (second x)(second y))
)
0 :rhythm/pitch-segment :e... | |
b39995dd6e44839a969ce676944401e7a74ee23eb9336ea24f556228d7c5f226 | screenshotbot/screenshotbot-oss | test-server.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
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 /.
(defpackage :server/test-server
(:use #:cl
#:fiveam)
(:import-from #:serv... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/e01f84e1c245b106c1c5d109eba9eb9b94b118c3/src/server/test-server.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| 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 /.
(defpackage :server/test-server
(:use #:cl
#:fiveam)
(:import-from #:server
#:with-lparallel-kernel)
(:import-fro... |
ab19ab78819df21e46b778ce371a3fa7b758593e48bbed43077c1ca14895887c | gedge-platform/gedge-platform | rabbit_mgmt_wm_connections.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_connections).
-export([in... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_management/src/rabbit_mgmt_wm_connections.erl | erlang |
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_connections).
-export([init/2, ... |
a4469f1c9ddaec80b50402eb5aa03b5d21f37a7483c2a528580f5f65534d8229 | matterhorn-chat/matterhorn | LastRunState.hs | # LANGUAGE TemplateHaskell #
module Matterhorn.LastRunState
( LastRunState
, lrsHost
, lrsPort
, lrsUserId
, lrsSelectedChannelId
, lrsOpenThread
, writeLastRunStates
, readLastRunState
, isValidLastRunState
)
where
import Prelude ()
import Matterhorn.Prelude
import C... | null | https://raw.githubusercontent.com/matterhorn-chat/matterhorn/19a73ce833a8a8de3616cf884c03e9f08a4db0a7/src/Matterhorn/LastRunState.hs | haskell | | Run state of the program. This is saved in a file on program exit and
| looked up from the file on program startup.
^ Host of the server
^ Post of the server
^ ID of the logged-in user
^ ID of the last selected channel
| Writes the run state to a file. The file is specific to the current team.
| Writes only i... | # LANGUAGE TemplateHaskell #
module Matterhorn.LastRunState
( LastRunState
, lrsHost
, lrsPort
, lrsUserId
, lrsSelectedChannelId
, lrsOpenThread
, writeLastRunStates
, readLastRunState
, isValidLastRunState
)
where
import Prelude ()
import Matterhorn.Prelude
import C... |
8680d4a937f08af13e24f3ef8e325a29b4fbf9263d48302694b3d31259bbe221 | sulami/spielwiese | 092-square-digit-chains.hs | -- Square digit chains
Problem 92
--
-- A number chain is created by continuously adding the square of the digits in
-- a number to form a new number until it has been seen before.
--
-- For example,
--
44 → 32 → 13 → 10 → 1 → 1
85 → 89 → 145 → 42 → 20 → 4 → 16 → 37 → 58 → 89
--
Therefore any chain that arrives... | null | https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hEuler/092-square-digit-chains.hs | haskell | Square digit chains
A number chain is created by continuously adding the square of the digits in
a number to form a new number until it has been seen before.
For example,
loop. What is most amazing is that EVERY starting number will eventually
# OPTIONS_GHC -O2 # | Problem 92
44 → 32 → 13 → 10 → 1 → 1
85 → 89 → 145 → 42 → 20 → 4 → 16 → 37 → 58 → 89
Therefore any chain that arrives at 1 or 89 will become stuck in an endless
arrive at 1 or 89 .
How many starting numbers below ten million will arrive at 89 ?
digits :: Integer -> [Integer]
digits 0 = []
digits n = digit... |
e0f405142d3e9d57a5f74b3e9c1c4c83c4013f26bcfee3de2b7f6d471b919eb9 | lspector/Clojush | dice_game.clj | ;; dice_game.clj
,
;;
;; Problem inspired by:
(ns clojush.problems.psb2.dice-game
(:use clojush.pushgp.pushgp
[clojush pushstate interpreter random util globals]
clojush.instructions.tag
[clojure.math numeric-tower]))
; Atom generators
(def atom-generators
(make-proportional-atom-gen... | null | https://raw.githubusercontent.com/lspector/Clojush/8f8c6dcb181e675a3f514e6c9e9fc92cf76ac566/src/clojush/problems/psb2/dice_game.clj | clojure | dice_game.clj
Problem inspired by:
Atom generators
stacks
tags
inputs
constants
A list of data domains for the problem. Each domain is a vector containing
should be used as training and testing cases respectively. Each "set" of
inputs is either a list or a function that, when called, will create a
random e... | ,
(ns clojush.problems.psb2.dice-game
(:use clojush.pushgp.pushgp
[clojush pushstate interpreter random util globals]
clojush.instructions.tag
[clojure.math numeric-tower]))
(def atom-generators
(make-proportional-atom-generators
(concat
(tagged-instruction-erc 1000)))
... |
8acd16975b88560ee70981f9423b8c7edef6e5499c9a6d81f00ded60bb0ea318 | haskell/haskell-ide-engine | HsImport.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE LambdaCase #
| A tool for extending the import list of a Haskell source file .
-- Provides code actions and commands.
module Haskell.Ide.Engine.Plugin.HsImport where
import Control.Len... | null | https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/src/Haskell/Ide/Engine/Plugin/HsImport.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass #
Provides code actions and commands.
| Type of the symbol to import.
Important to offer the correct import list, or hiding code action.
^ Symbol is a simple function
^ Symbol is a constructor
^ Symbol is a type
| What of the symbol should be taken.
Impor... | # LANGUAGE CPP #
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
| A tool for extending the import list of a Haskell source file .
module Haskell.Ide.Engine.Plugin.HsImport where
import Control.Lens.Operators
import Control.Monad.IO.Class
import Control.Monad
import Data.A... |
1fb5d983412e411243d6fa1477dace6cec1d5def366a03d59b935256e6320b80 | exercism/common-lisp | pangram-test.lisp | ;; Ensures that pangram.lisp and the testing library are always loaded
(eval-when (:compile-toplevel :load-toplevel :execute)
(load "pangram")
(quicklisp-client:quickload :fiveam))
;; Defines the testing package with symbols from pangram and FiveAM in scope
;; The `run-tests` function is exported for use by both t... | null | https://raw.githubusercontent.com/exercism/common-lisp/5d6d9db3e236279fed997766ab173911c18f1b3b/exercises/practice/pangram/pangram-test.lisp | lisp | Ensures that pangram.lisp and the testing library are always loaded
Defines the testing package with symbols from pangram and FiveAM in scope
The `run-tests` function is exported for use by both the user and test-runner
Enter the testing package
Define and enter a new FiveAM test-suite | (eval-when (:compile-toplevel :load-toplevel :execute)
(load "pangram")
(quicklisp-client:quickload :fiveam))
(defpackage :pangram-test
(:use :cl :fiveam)
(:export :run-tests))
(in-package :pangram-test)
(def-suite* pangram-suite)
(test empty-sentence
(let ((sentence ""))
(is-false (pangram:pangra... |
8c6c6b75eacaef5ba4c09663e11c41b4761faf27025685814a6fa06d0607c466 | expipiplus1/vulkan | VK_AMD_shader_explicit_vertex_parameter.hs | {-# language CPP #-}
-- | = Name
--
VK_AMD_shader_explicit_vertex_parameter - device extension
--
-- == VK_AMD_shader_explicit_vertex_parameter
--
-- [__Name String__]
-- @VK_AMD_shader_explicit_vertex_parameter@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
22
-... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_AMD_shader_explicit_vertex_parameter.hs | haskell | # language CPP #
| = Name
== VK_AMD_shader_explicit_vertex_parameter
[__Name String__]
@VK_AMD_shader_explicit_vertex_parameter@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
[__Contact__]
== Other Extension ... | VK_AMD_shader_explicit_vertex_parameter - device extension
22
1
- Requires support for Vulkan 1.0
-
< -Docs/issues/new?body=[VK_AMD_shader_explicit_vertex_parameter ] @linqun%0A*Here describe the issue or question you have about the VK_AMD_shader_explicit_vertex_parameter ext... |
8972724fed055d234d54df1c453ae5192623cfe912e60113452abda18e5c8101 | unison-code/uni-instr-sel | PlotDispatcher.hs | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... | null | https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/uni-is/UniIS/Drivers/PlotDispatcher.hs | haskell | -----------
Functions
-----------
| Function for executing this dispatcher.
| Dispatches execution to the correct driver. | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... |
9d237ee83ac40cc40f3da5143df7fd4446791452982177a17de26fa67d951f95 | cljfx/cljfx | e12_interactive_development.clj |
This file is supposed to be explored from the REPL , evaluating forms one
by one from top to bottom .
(ns e12-interactive-development
(:require [cljfx.api :as fx]))
;; I want to build an interactive chart that shows how bouncing object falls
;; on the ground. I want to be able to edit gravity and friction to s... | null | https://raw.githubusercontent.com/cljfx/cljfx/ec3c34e619b2408026b9f2e2ff8665bebf70bf56/examples/e12_interactive_development.clj | clojure | I want to build an interactive chart that shows how bouncing object falls
on the ground. I want to be able to edit gravity and friction to see how
it affects object's behavior, so I will put it into state:
I want to have map event handlers extensible during runtime to avoid full app
behavior, but I'll go with anot... |
This file is supposed to be explored from the REPL , evaluating forms one
by one from top to bottom .
(ns e12-interactive-development
(:require [cljfx.api :as fx]))
(def *state
(atom {:gravity 10
:friction 0.4}))
restarts . One way is using vars instead of functions to get that kind of
(defmult... |
1a3cf1761adf347d1b708babb3b48a5dc3abca79007f29e3b93b5314c9ce7a72 | thumphries/hgrep | hgrep.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import qualified Language.Haskell.HGrep as HGrep
import qualified Language.Haskell.HGrep.Internal.Data as HGrep
import Language.Haskell.HGrep.Prelude
import qualified Options.Applicative as O
import qualified System.Consol... | null | https://raw.githubusercontent.com/thumphries/hgrep/1d3e49724ef6fba545762bc9c5d5d2cf03455e49/main/hgrep.hs | haskell | # LANGUAGE OverloadedStrings #
if no directory provided -> search in current directory
----------------------------------------------------------------------------- | # LANGUAGE NoImplicitPrelude #
module Main where
import qualified Language.Haskell.HGrep as HGrep
import qualified Language.Haskell.HGrep.Internal.Data as HGrep
import Language.Haskell.HGrep.Prelude
import qualified Options.Applicative as O
import qualified System.Console.ANSI as ANSI
import Sys... |
f35511f4886a08ec67baaca0876d7efc9f8b0cd79d84bc197ea0c985c8bb7c7d | racket/old-plt | aux-contract.scm | (module aux-contract mzscheme
(require-for-syntax (file "aux-syntax.scm"))
(require (lib "contract.ss"))
(provide
define-as-contract ;; <definition>
)
;; (define-as-contract string (id x ...) body ...)
;; introduces Id for export as a contract and
;; is-id? for local testing as a function
... | null | https://raw.githubusercontent.com/racket/old-plt/a580d75deae2a0d2f3d8a93bc3c4f8f1f619b5b7/collects/profjWizard/aux-contract.scm | scheme | <definition>
(define-as-contract string (id x ...) body ...)
introduces Id for export as a contract and
is-id? for local testing as a function | (module aux-contract mzscheme
(require-for-syntax (file "aux-syntax.scm"))
(require (lib "contract.ss"))
(provide
)
(define-syntax (define-as-contract stx)
(syntax-case stx ()
[(_ message (name . args) . body)
(with-syntax ([is-name (prefix-id-suffix "is-" (syntax name) "?")]
... |
6f1ab9cf71033732eb470fcb05202cd3368620a7108e4dc0970f62327b2c6144 | 2600hz-archive/whistle | erlydtl_compiler.erl | %%%-------------------------------------------------------------------
%%% File: erlydtl_compiler.erl
@author < > [ ]
@author < >
2008 ,
%%% @doc
%%% ErlyDTL template compiler
%%% @end
%%%
%%% The MIT License
%%%
Copyright ( c ) 2007 ,
%%%
%%% Permission is hereby granted, free ... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/erlydtl-0.7.0/src/erlydtl_compiler.erl | erlang | -------------------------------------------------------------------
File: erlydtl_compiler.erl
@doc
ErlyDTL template compiler
@end
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal... | @author < > [ ]
@author < >
2008 ,
Copyright ( c ) 2007 ,
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROV... |
af97a0555ea37ed125537b9c48f361c08d464f599bd1f668374f82692eddf7a1 | Frama-C/Frama-C-snapshot | cvalue_transfer.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/domains/cvalue/cvalue_transfer.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
c27e96c0c65b03cfefa5b867e3ac0b521237dbc4745625c55c479d1c2928e0cb | Relph1119/sicp-solutions-manual | p22-factorial.scm | (define (factorial n)
(fact-iter 1 1 n))
(define (fact-iter product counter max-count)
(if (> counter max-count)
product
(fact-iter (* counter product)
(+ counter 1)
max-count)))
| null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/examples/ch01/p22-factorial.scm | scheme | (define (factorial n)
(fact-iter 1 1 n))
(define (fact-iter product counter max-count)
(if (> counter max-count)
product
(fact-iter (* counter product)
(+ counter 1)
max-count)))
| |
cf9250e9c9b1058279c1d7fd9ce9f8b2851ed671f95dbc6b7914af16c798bfef | keera-studios/keera-posture | PreferencesDetectionCamera.hs | -- | Keeps the camera selection in sync between model and view
module Controller.Conditions.PreferencesDetectionCamera where
import Control.Applicative
import CombinedEnvironment
import Data.ReactiveValue
import Graphics.UI.Gtk.Reactive
import Hails.MVC.Model.ProtectedModel.Reactive
installHandlers :: CEnv -> IO()
in... | null | https://raw.githubusercontent.com/keera-studios/keera-posture/9de5095a4a10c0cb54f6191f1a448e96645193ae/src/Controller/Conditions/PreferencesDetectionCamera.hs | haskell | | Keeps the camera selection in sync between model and view
View
Condition | module Controller.Conditions.PreferencesDetectionCamera where
import Control.Applicative
import CombinedEnvironment
import Data.ReactiveValue
import Graphics.UI.Gtk.Reactive
import Hails.MVC.Model.ProtectedModel.Reactive
installHandlers :: CEnv -> IO()
installHandlers cenv = do
cameraEntry <- spinButtonValueIntEdit... |
7f4bab5b241e8cea16b61a67d7cc6e6dac72cea8c96b2213fe25b01ad1a42850 | arttuka/reagent-material-ui | text_field.cljs | (ns reagent-mui.material.text-field
"Imports @mui/material/TextField as a Reagent component.
Original documentation is at -field/ ."
(:require-macros [reagent-mui.util :refer [forward-ref]])
(:require [react :as react]
[reagent.core :as r]
["@mui/material/TextField" :as MuiTextField]
... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/text_field.cljs | clojure | -project/reagent/blob/v1.1.0/doc/examples/material-ui.md | (ns reagent-mui.material.text-field
"Imports @mui/material/TextField as a Reagent component.
Original documentation is at -field/ ."
(:require-macros [reagent-mui.util :refer [forward-ref]])
(:require [react :as react]
[reagent.core :as r]
["@mui/material/TextField" :as MuiTextField]
... |
db25cfc7a415043c2b836f01bc0ac9c7346f87888645383ab8b210627c775215 | RJMetrics/sweet-liberty | t_core.clj | This is a dummy file that lets recurse the other dirs
(ns com.rjmetrics.sweet-liberty.t-core
(:require [midje.sweet :refer :all]))
(fact "bears eat beets"
(let [what-bears-eat #{:rodents :trash :beets :children :leafy-greens}]
(:beets what-bears-eat) => :beets)) | null | https://raw.githubusercontent.com/RJMetrics/sweet-liberty/812a1caee1a6ef2053d0545a9e05d83e03011212/test/com/rjmetrics/sweet_liberty/t_core.clj | clojure | This is a dummy file that lets recurse the other dirs
(ns com.rjmetrics.sweet-liberty.t-core
(:require [midje.sweet :refer :all]))
(fact "bears eat beets"
(let [what-bears-eat #{:rodents :trash :beets :children :leafy-greens}]
(:beets what-bears-eat) => :beets)) | |
22494212193d80eaedf3f2bb44f6d67bb9ef990c1b5a41641f87fa58c32e274f | bmeurer/ocamljit2 | subst.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/typing/subst.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Types
type t
Subs... |
4a2ea4bd75225ff31c31e4810484d4bc4a7308c5527bf69990165db314d675c4 | johannesgerer/blazeT | Attributes.hs | -- !! DO NOT EDIT
|
( Automatically generated by @src\/Util\/GenerateHtmlTCombinators.hs:49@ )
This module simply reexports the corresponding @blaze - html@ module .
(Automatically generated by @src\/Util\/GenerateHtmlTCombinators.hs:49@)
This module simply reexports the corresponding @blaze-html@ module.
-}
mo... | null | https://raw.githubusercontent.com/johannesgerer/blazeT/4dc7c9b2b700d43e6b8550b218b6c67bdf20f565/src/Text/BlazeT/Html4/Transitional/Attributes.hs | haskell | !! DO NOT EDIT | |
( Automatically generated by @src\/Util\/GenerateHtmlTCombinators.hs:49@ )
This module simply reexports the corresponding @blaze - html@ module .
(Automatically generated by @src\/Util\/GenerateHtmlTCombinators.hs:49@)
This module simply reexports the corresponding @blaze-html@ module.
-}
module Text.BlazeT.H... |
a8bee531d856e570c8c9f56e6ac517c3c016a6b1dd2cedf61e84e045c0e5d86d | clj-commons/claypoole | claypoole_test.clj | The Climate Corporation licenses this file to you under 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
;;
;; See the NOTICE file distributed with this work for additional information
;... | null | https://raw.githubusercontent.com/clj-commons/claypoole/a4bd33f3dd50d04a72d4eb81807ed2d050e7e002/test/com/climate/claypoole_test.clj | clojure | License, Version 2.0 (the "License"); you may not use this file except in
-2.0
See the NOTICE file distributed with this work for additional information
regarding copyright ownership. Unless required by applicable law or agreed
or implied. See the License for the specific language governing permissions
and ... | The Climate Corporation licenses this file to you under under the Apache
compliance with the License . You may obtain a copy of the License at
to in writing , software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express
(ns com.cl... |
de62e7f2604ec90cca1fb609b55094c1bea3d0768e0ff84b80355b5f1a2b697d | scicloj/scicloj-data-science-handbook | 06_concat_and_append.clj | (ns scicloj.03-data-manipulation.06-concat-and-append
(:require [notespace.api :as notespace]
[notespace.kinds :as kind]
[clojure.java.io :as io]))
Notespace
^kind/hidden
(comment
;; Manually start an empty notespace
(notespace/init-with-browser)
;; Renders the notes and listens to fi... | null | https://raw.githubusercontent.com/scicloj/scicloj-data-science-handbook/7c0488199ec0a63a9d5e785780c2bbfd102c5978/src/scicloj/03_data_manipulation/06_concat_and_append.clj | clojure | Manually start an empty notespace
Renders the notes and listens to file changes
Clear an existing notespace browser
Evaluating a whole notespace
Generate static html
later we'll dive into more sophisticated in-memory merges
TODO: use hiccup to display multiple dataset
here we've used the more
keep these in min... | (ns scicloj.03-data-manipulation.06-concat-and-append
(:require [notespace.api :as notespace]
[notespace.kinds :as kind]
[clojure.java.io :as io]))
Notespace
^kind/hidden
(comment
(notespace/init-with-browser)
(notespace/listen)
(notespace/init)
(notespace/eval-this-notespace)
(no... |
9c44a34dd67ea4b3eea09c492617c5abf77765eefcaa93b2eaaee3e879ee5f50 | rowangithub/DOrder | btype.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/typing/btype.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : btype.mli 8922 2008 - 07 - 19... |
e99dba11242ddb34fcca722a53143e63631d443f3f87fe07e9d9cd1cc861f626 | kupl/FixML | eval.ml | open Lang
open Util
(*********************************************
Interpreter for our language
*********************************************)
(* Control variables *)
let start_time = ref 0.0
(* Block task *)
let rec is_fun : value -> bool
= fun v ->
match v with
| VList vs -> List.exists is_fun vs
| VTup... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/engine/eval.ml | ocaml | ********************************************
Interpreter for our language
********************************************
Control variables
Block task
Argument binding
Pattern Matching
exp evaluation
base
aop
lop
else
Value binding
Function binding
constant mapping
update each function's closu... | open Lang
open Util
let start_time = ref 0.0
let rec is_fun : value -> bool
= fun v ->
match v with
| VList vs -> List.exists is_fun vs
| VTuple vs -> List.exists is_fun vs
| VCtor (x, vs) -> List.exists is_fun vs
| VFun (x, e, closure) -> true
| VFunRec (f, x, e, closure) -> true
| VBlock (f, vs) -> ... |
d9cba03868318a0d74bafd26eab77f40176e51a9837f1526418fe48572970914 | cicakhq/potato | db.lisp | (in-package :potato.db)
(declaim #.potato.common::*compile-decl*)
(define-condition persist-error (error)
((result :type list
:initarg :result
:reader persist-error/result))
(:documentation "Error that is raised if a persist command fails"))
(define-condition couchdb-missing-value (error)
... | null | https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/potato/db.lisp | lisp | The document was successfully created, update the id slot
The create call failed, report the error unless ERROR-IF-FAIL is false
Update the loaded flag since it is not persisted to memcached
ELSE: Object not found in cache
eval-when (:compile-toplevel :load-toplevel :execute)
Progressively increase the delay betwe... | (in-package :potato.db)
(declaim #.potato.common::*compile-decl*)
(define-condition persist-error (error)
((result :type list
:initarg :result
:reader persist-error/result))
(:documentation "Error that is raised if a persist command fails"))
(define-condition couchdb-missing-value (error)
... |
b511321ff8bc624a0354ace342d321e3191091376dc0a9edaca7bc35c84180bd | rand00/flappy | index_ht.ml |
open Tyxml
module H = Html
let content = [
H.h1 [ H.txt "flap flap" ];
H.div ~a:[H.a_id Constants.html_id] [];
H.noscript [H.txt "Sorry, you need to enable JavaScript to see this page."]
]
let page =
H.html
(H.head
(H.title (H.txt "Typesafe html"))
[ H.meta ~a:[H.a_charset "utf-8"] ();
... | null | https://raw.githubusercontent.com/rand00/flappy/1fe4d2dfd24fdb6131828cb953bf3e2a20db55a4/src/index_ht.ml | ocaml | meta ~a:[a_name "viewport";
* a_content "width=device-width,initial-scale=1.0"] (); |
open Tyxml
module H = Html
let content = [
H.h1 [ H.txt "flap flap" ];
H.div ~a:[H.a_id Constants.html_id] [];
H.noscript [H.txt "Sorry, you need to enable JavaScript to see this page."]
]
let page =
H.html
(H.head
(H.title (H.txt "Typesafe html"))
[ H.meta ~a:[H.a_charset "utf-8"] ();
... |
a7487e9679e88302e61610ae9fce245c9f0e68d8b44cde86722c3d6f6a56ab13 | kelamg/HtDP2e-workthrough | ex380.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex380) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex380.rkt | racket | about the language level of this file in a form that our tools can easily process.
(cons String (cons ExpectsToSee '()))
ExpectsToSee is one of:
– BB
– DD
data examples
[X Y] [List-of [List X Y]] X -> Y
finds the matching Y for the given X in alist | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex380) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(require 2htdp/universe)
An F... |
2ecd3333b9e0ac1b933bf480caf20b90fd72bb57bee083dfa04216fb5f65c4c7 | exercism/clojure | largest_series_product.clj | (ns largest-series-product)
(defn largest-product [] ;; <- arglist goes here
;; your code goes here
)
| null | https://raw.githubusercontent.com/exercism/clojure/7ed96a5ae3c471c37db2602baf3db2be3b5a2d1a/exercises/practice/largest-series-product/src/largest_series_product.clj | clojure | <- arglist goes here
your code goes here | (ns largest-series-product)
)
|
747799043f2232c4533c189eb1ac959dc0955a70cafc07999d5f1398bf599a79 | ghc/ghc | Make.hs |
( c ) The University of Glasgow 2006
( c ) The AQUA Project , Glasgow University , 1998
This module contains definitions for the IdInfo for things that
have a standard form , namely :
- data constructors
- record selectors
- method and superclass selectors
- primitive operations
(c) The University ... | null | https://raw.githubusercontent.com/ghc/ghc/8e765affde37197a6ebc174653171195fcc53003/compiler/GHC/Types/Id/Make.hs | haskell | See Note [magicIds]
See Note [ghcPrimIds (aka pseudoops)]
- a context in a data decl is used to make sure
Wrapper
Worker
Wrapper
Worker
Coercion from family type to representation type
Wrapper
Worker
- a context in a data decl is used to make sure
Wrapper
Worker
Wrapper
Worker
Coercion from family... |
( c ) The University of Glasgow 2006
( c ) The AQUA Project , Glasgow University , 1998
This module contains definitions for the IdInfo for things that
have a standard form , namely :
- data constructors
- record selectors
- method and superclass selectors
- primitive operations
(c) The University ... |
40dfa48177f999ab9d46a42a9a43e90b081650643e19972e17b7c355a4aecb8d | VERIMAG-Polyhedra/VPL | HandelmanOracle.ml | * oracle .
open OraclePattern
open HOtypes
module Debug = OraclePattern.Debug
type prophecy_ = {
vl : Var.t list; (** List of variables in the problem *)
mapP : MapPolyHi.t; (** Map from polynomials to His *)
mapIP : MapIndexP.t; (** Map from indexes to polynomials. *)
mapI : IndexBuild.Map.t; (** M... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/ocaml/lin/oracle/HandelmanOracle.ml | ocaml | * List of variables in the problem
* Map from polynomials to His
* Map from indexes to polynomials.
* Map that decomposes indexes
* Constaints of the input polyhedron.
* A simplex tableau containing constraints of the polyhedron. It is used to determine constant bounds.
* Known bounds for each variable.
* @retur... | * oracle .
open OraclePattern
open HOtypes
module Debug = OraclePattern.Debug
type prophecy_ = {
}
let hi_to_poly : Hi.t -> prophecy_ -> Poly.t * MapIndexP.t * IndexBuild.Map.t
= fun hi pn ->
match hi with
| Hi.Ci i -> MapIndexP.get i pn.mapIP pn.mapI
| Hi.VarCi (j,i) ->
let (pi,mapIP',mapI... |
0106b4446fa932ebf77c2f19064c79e29272b922f6f2b8d9562dd22624746cd9 | SkylineLabs/emqttd_kafka_bridge | emqttd_kafka_bridge.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2015 - 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
%%
%% Unl... | null | https://raw.githubusercontent.com/SkylineLabs/emqttd_kafka_bridge/4c2ebe7acc760725870129954efdb8072bbea928/src/emqttd_kafka_bridge.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2015 - 2017 < > .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqttd_kafka_bridge).
-include_lib("emqttd/include/emqttd.hrl").
-include_lib("emqttd/include/emqttd_protocol.hrl").
-include_... |
ac797f617294cc753da7485849c965c78ae781f369d64d0b0c86918ffb0c8bbb | xclerc/ocamljava | threadGroup.ml |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/concurrent/src/threads/threadGroup.ml | ocaml | Null value
Miscellaneous |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... |
0d1dfe3cb7baa67550369bc26e2001d644c6d547b2462e4e8ad666170f01bae2 | tarides/opam-monorepo | option.ml | include Stdlib.Option
module O = struct
let ( >>= ) = bind
let ( >>| ) opt f = map f opt
let ( let* ) = ( >>= )
let ( let+ ) = ( >>| )
end
| null | https://raw.githubusercontent.com/tarides/opam-monorepo/5b70c915f30fa3d8eb312fadf978b5f1aa9ab5b3/stdext/option.ml | ocaml | include Stdlib.Option
module O = struct
let ( >>= ) = bind
let ( >>| ) opt f = map f opt
let ( let* ) = ( >>= )
let ( let+ ) = ( >>| )
end
| |
fae4ebd3ce6dfa9c71565e46395d7cf93af837e355060dfd2e301094a748e81d | tonsky/advent-of-code | day11.clj | (ns advent-of-code.year2021.day11
(:require
[advent-of-code.core :refer [cond+]]
[clojure.java.io :as io]
[clojure.java.math :as math]
[clojure.string :as str]
[clojure.set :as set]))
(set! *warn-on-reflection* true)
(set! *print-namespace-maps* false)
(def example (slurp "inputs/year2021/day11.exam... | null | https://raw.githubusercontent.com/tonsky/advent-of-code/04d82610afe8acd18a1425c7ed1ef7419b96571e/src/advent_of_code/year2021/day11.clj | clojure | (ns advent-of-code.year2021.day11
(:require
[advent-of-code.core :refer [cond+]]
[clojure.java.io :as io]
[clojure.java.math :as math]
[clojure.string :as str]
[clojure.set :as set]))
(set! *warn-on-reflection* true)
(set! *print-namespace-maps* false)
(def example (slurp "inputs/year2021/day11.exam... | |
7c164dabffe0e47f95f5e221088d2790e2c2de941f902fd40d8ed905337afff5 | ndmitchell/catch | Read.hs |
module Typey.Read(readFuncT) where
import Typey.Type
import Data.Char
import Data.List
import Data.Maybe
import General.General
readFuncT :: String -> FuncT
readFuncT x = FuncT (length free) (init res) (last res)
where
res = combine $ lift lexs
lexs = readLexes x
free = zi... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Typey/Read.hs | haskell | take an item from a string, to a Type
|
module Typey.Read(readFuncT) where
import Typey.Type
import Data.Char
import Data.List
import Data.Maybe
import General.General
readFuncT :: String -> FuncT
readFuncT x = FuncT (length free) (init res) (last res)
where
res = combine $ lift lexs
lexs = readLexes x
free = zi... |
04ce84159ed1cbd9dcbf9de1c42dda6fd53efa57f28568ef8c53ef42d4b84e58 | charlieg/Sparser | basic-mixins.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : co ; Base : 10 -*-
(in-package :co)
;;;
BBN Technologies
;;; A Division of BBN Corporation
;;; Copyright
;;; All Rights Reserved
1999
;;;
THIS FILE CONTAINS UNDERLYING BASIC CLASS MIXINS ....
NAMED - OBJECTS have a NAME and a DES... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/lisp/sfl/basic-mixins.lisp | lisp | Syntax : Common - lisp ; Package : co ; Base : 10 -*-
A Division of BBN Corporation
Copyright
All Rights Reserved
:OBJECT property of their name so that they can be accessed by the NAME.
Note that the names of named objects define a name-space.
They also store themselves under the class-name p... | (in-package :co)
BBN Technologies
1999
THIS FILE CONTAINS UNDERLYING BASIC CLASS MIXINS ....
NAMED - OBJECTS have a NAME and a DESCRIPTION slot . They store themselves on the
(defgeneric name (object))
(defmethod name ((self t))
(class-name (class-of self)))
(defmethod name ((symbol symbol))
... |
bf9a68fffe71d68e0222a1071ced0993235884aa2867c997fe0dccfc6cfc6407 | web-scheme/wsc | serialize.scm | #!sweet
;; Wasm magic.
define MAGIC #u8(#x00 #x61 #x73 #x6d)
;; Wasm version.
define VERSION #u8(#x01 #x00 #x00 #x00)
;; Wasm section IDs.
define CUSTOM-SECTION-ID 0
define TYPE-SECTION-ID 1
define IMPORT-SECTION-ID 2
define FUNCTION-SECTION-ID 3
define TABLE-SECTION-ID 4
define MEMORY-SECTION-ID 5
define GLOBAL-SECT... | null | https://raw.githubusercontent.com/web-scheme/wsc/51bdeb6643f80716051c0b0a3f0c76d0eb9983ad/lib/scheme/base/src/environments-and-evaluation/eval/serialize.scm | scheme | Wasm magic.
Wasm version.
Wasm section IDs.
#name-section
@param library-name The library name (list of symbols and exact non-negative integers).
For executables, it is `()`.
Followed by the section contents.
Vectors are encoded with their `u32` length followed by the encoding of their ele... | #!sweet
define MAGIC #u8(#x00 #x61 #x73 #x6d)
define VERSION #u8(#x01 #x00 #x00 #x00)
define CUSTOM-SECTION-ID 0
define TYPE-SECTION-ID 1
define IMPORT-SECTION-ID 2
define FUNCTION-SECTION-ID 3
define TABLE-SECTION-ID 4
define MEMORY-SECTION-ID 5
define GLOBAL-SECTION-ID 6
define EXPORT-SECTION-ID 7
define START-SECT... |
f2ede155e9b2be9cf6b2a2c55ba7111638f1ccd998f81f019784a16535aadfb6 | soegaard/sci | info.rkt | #lang info
Info file for sci / flomat .
;; Name
; The collection name can be different from the directory name,
; Here they are the same.
(define collection "flomat-doc")
;; Version
(define version "1.0")
;; Dependencies
(define deps '("base"
"flomat"))
(define scribblings '(("man... | null | https://raw.githubusercontent.com/soegaard/sci/274cc201bc0289560522375a50aae88b4c9b1465/flomat-doc/info.rkt | racket | Name
The collection name can be different from the directory name,
Here they are the same.
Version
Dependencies | #lang info
Info file for sci / flomat .
(define collection "flomat-doc")
(define version "1.0")
(define deps '("base"
"flomat"))
(define scribblings '(("manual-flomat.scrbl" () ("Math and Science"))))
(define build-deps '("math-doc"
"racket-doc"
... |
c7397581378c765d68fad75f046f2aa66c3921b283a5478303f05f88b39ef4ad | qnikst/HaskellNet | Compat.hs | module Network.Compat where
import Network.Socket
import Network.BSD (getProtocolNumber)
import System.IO (Handle, IOMode (..))
import qualified Control.Exception as Exception
connectTo :: String -- Hostname
-> PortNumber -- Port Identifier
Connected Socket
connectTo host port = do
... | null | https://raw.githubusercontent.com/qnikst/HaskellNet/34e3ec8fb2e5071ecff574fc951dbfe356f87bed/src/Network/Compat.hs | haskell | Hostname
Port Identifier
only done if there's an error
If all the actions throw exceptions (and the list of actions is not empty),
the last exception is thrown.
The operations are run outside of the catchIO cleanup handler because
catchIO masks asynchronous exceptions in the cleanup handler.
In the case of comp... | module Network.Compat where
import Network.Socket
import Network.BSD (getProtocolNumber)
import System.IO (Handle, IOMode (..))
import qualified Control.Exception as Exception
Connected Socket
connectTo host port = do
proto <- getProtocolNumber "tcp"
let hints = defaultHints { addrFlags = [AI_ADDRCONFIG]
... |
be290a623fe81ac7939853bb1c9cc9ab0404c63292505eec4e401107dd97941d | xvw/preface | semigroupoid.ml | module type LAWS = sig
type ('a, 'b) t
val semigroupoid_1 :
unit -> (('a, 'b) t, ('c, 'a) t -> ('d, 'c) t -> ('d, 'b) t) Law.t
end
module For (S : Preface_specs.SEMIGROUPOID) :
LAWS with type ('a, 'b) t := ('a, 'b) S.t = struct
open Law
let semigroupoid_1 () =
let lhs f g h =
let r = S.(g % h... | null | https://raw.githubusercontent.com/xvw/preface/f908ba45e5d58c330781e61162628bbd7c240145/lib/preface_laws/semigroupoid.ml | ocaml | module type LAWS = sig
type ('a, 'b) t
val semigroupoid_1 :
unit -> (('a, 'b) t, ('c, 'a) t -> ('d, 'c) t -> ('d, 'b) t) Law.t
end
module For (S : Preface_specs.SEMIGROUPOID) :
LAWS with type ('a, 'b) t := ('a, 'b) S.t = struct
open Law
let semigroupoid_1 () =
let lhs f g h =
let r = S.(g % h... | |
b5878d00f40e1cfe6acaa6e937ce99ee426000808efda7df95718d1d90bfbcc8 | tek/ribosome | PromptConfig.hs | module Ribosome.Menu.Prompt.Data.PromptConfig where
data PromptConfig =
StartNormal
|
StartInsert
|
OnlyInsert
deriving stock (Eq, Show)
instance Default PromptConfig where
def =
StartNormal
isStartInsert :: PromptConfig -> Bool
isStartInsert = \case
StartNormal -> False
StartInsert -> True
O... | null | https://raw.githubusercontent.com/tek/ribosome/a676b4f0085916777bfdacdcc761f82d933edb80/packages/menu/lib/Ribosome/Menu/Prompt/Data/PromptConfig.hs | haskell | module Ribosome.Menu.Prompt.Data.PromptConfig where
data PromptConfig =
StartNormal
|
StartInsert
|
OnlyInsert
deriving stock (Eq, Show)
instance Default PromptConfig where
def =
StartNormal
isStartInsert :: PromptConfig -> Bool
isStartInsert = \case
StartNormal -> False
StartInsert -> True
O... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.