_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 |
|---|---|---|---|---|---|---|---|---|
2ef8f51e116fd22341d31b7668ee1a3d8277f58cf936ea9cd903a758cd3af5f2 | mbj/stratosphere | FieldToMatchProperty.hs | module Stratosphere.WAFv2.WebACL.FieldToMatchProperty (
module Exports, FieldToMatchProperty(..), mkFieldToMatchProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.WAFv2.WebACL.BodyProperty as E... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafv2/gen/Stratosphere/WAFv2/WebACL/FieldToMatchProperty.hs | haskell | # SOURCE #
# SOURCE #
# SOURCE #
# SOURCE #
# SOURCE #
# SOURCE # | module Stratosphere.WAFv2.WebACL.FieldToMatchProperty (
module Exports, FieldToMatchProperty(..), mkFieldToMatchProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
data FieldToMatchProperty
... |
43e7850264f0a0fdbb87d954dc005513558d9b4a8675f6b002196ffcb3b27b9b | brianium/tomaat | tray.cljs | (ns tomaat.main.tray
(:require [electron :refer [Tray nativeImage]]
[tomaat.util :as u]))
(defonce *tray (atom nil))
(defn update-tray!
[event url]
(let [img (.createFromDataURL nativeImage url)]
(when (nil? @*tray)
(reset! *tray (Tray. img)))
(.setImage @*tray img)))
(defn remove-tra... | null | https://raw.githubusercontent.com/brianium/tomaat/990cb7c496796c567613ec7ea8c9855f397c45c2/src/tomaat/main/tray.cljs | clojure | (ns tomaat.main.tray
(:require [electron :refer [Tray nativeImage]]
[tomaat.util :as u]))
(defonce *tray (atom nil))
(defn update-tray!
[event url]
(let [img (.createFromDataURL nativeImage url)]
(when (nil? @*tray)
(reset! *tray (Tray. img)))
(.setImage @*tray img)))
(defn remove-tra... | |
3e70f88727909e5050214bf7a0ddda8b303ea487e488ba3643da0adc6808629b | mentat-collective/emmy | covariant.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.calculus.covariant
(:require [emmy.calculus.basis :as b]
[emmy.calculus.derivative :refer [D]]
[emmy.calculus.form-field :as ff]
[emmy.calculus.indexed :as ci]
[emmy.calculus.manifold :as manifold]
[emmy.calculu... | null | https://raw.githubusercontent.com/mentat-collective/emmy/535b237a8e3fd7067b9c0ade8b2a4b3419f9f132/src/emmy/calculus/covariant.cljc | clojure | This comes from `Lie.scm`.
## From ODE.scm:
Let (sigma t) be the state of a system at time t. Let the
this state be:
((D sigma) t) = (R (sigma t))
or (D sigma) = (compose R sigma)
i.e. R is a system derivative.
Let F be any function of state, then a differential equation for the
= (compose (* (D F) R) sigma... | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.calculus.covariant
(:require [emmy.calculus.basis :as b]
[emmy.calculus.derivative :refer [D]]
[emmy.calculus.form-field :as ff]
[emmy.calculus.indexed :as ci]
[emmy.calculus.manifold :as manifold]
[emmy.calculu... |
e470a0cd9d59d2c8d916753fccbfea7e21135efaa207ae202086a9436169947a | scarvalhojr/haskellbook | huttons.hs |
data Expr = Lit Integer | Add Expr Expr deriving Show
eval :: Expr -> Integer
eval (Lit i) = i
eval (Add x y) = (eval x) + (eval y)
printExpr :: Expr -> String
printExpr (Lit i)
| i < 0 = "(" ++ show i ++ ")"
| otherwise = show i
printExpr (Add x y) = "(" ++ (printExpr x) ++ " + " ++ (printExpr y) ++ ")"
... | null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter11/huttons.hs | haskell |
data Expr = Lit Integer | Add Expr Expr deriving Show
eval :: Expr -> Integer
eval (Lit i) = i
eval (Add x y) = (eval x) + (eval y)
printExpr :: Expr -> String
printExpr (Lit i)
| i < 0 = "(" ++ show i ++ ")"
| otherwise = show i
printExpr (Add x y) = "(" ++ (printExpr x) ++ " + " ++ (printExpr y) ++ ")"
... | |
60ddcf0d5c31c76e3fceaabbcc4b1764d0b4f0e04ebc5348f831e75f6246d1c3 | realworldocaml/examples | github_org_j.mli | (* Auto-generated from "github_org.atd" *)
type org = Github_org_t.org = {
login: string;
id: int;
url: string;
name: string option;
blog: string option;
email: string option;
public_repos: int
}
val write_org :
Bi_outbuf.t -> org -> unit
(** Output a JSON value of type {!org}. *)
val string_of_or... | null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/json/github_org_j.mli | ocaml | Auto-generated from "github_org.atd"
* Output a JSON value of type {!org}.
* Input JSON data of type {!org}. |
type org = Github_org_t.org = {
login: string;
id: int;
url: string;
name: string option;
blog: string option;
email: string option;
public_repos: int
}
val write_org :
Bi_outbuf.t -> org -> unit
val string_of_org :
?len:int -> org -> string
* Serialize a value of type { ! org }
into a JSO... |
5c5aad65019a116937f8542f72a9167b8fa5b58fe0acea99bae1d2814a4cdf82 | donaldsonjw/bigloo | main.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Init / main.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/Init/main.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The main entry point. */
*===========================... | * serrano / prgm / project / bigloo / comptime / Init / main.scm * /
* Author : * /
* Creation : We d Mar 17 09:51:40 1993 * /
* Last change : Fri Nov 5 14:57:52 2004 ( serrano ) * /
* Co... |
419f6e7903b00de0ecf4390d5d772b87bb1b3515340ab726112ebe018ea06c39 | roosta/herb | project.clj | (defproject herb "0.10.1"
:description "ClojureScript styling using functions"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
: plugins [ [ " 0.10.7 " ] ]
:source-paths ["src"]
;; :codox {:language :clojurescript
;; :metadata {:doc/format :markdown}
;; ... | null | https://raw.githubusercontent.com/roosta/herb/30d1c28a267675d87a4ae2567e35e26619f8e86f/project.clj | clojure | :codox {:language :clojurescript
:metadata {:doc/format :markdown}
:output-path "docs"
:source-paths ["src"]} | (defproject herb "0.10.1"
:description "ClojureScript styling using functions"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
: plugins [ [ " 0.10.7 " ] ]
:source-paths ["src"]
:min-lein-version "2.5.0"
:clean-targets ^{:protect false} ["target"]
:resource-paths ... |
f9acc65c0798f383efb3bcc7448724b6aa34a3c319c53f3b4ba7f368fb3bebb0 | c-cube/ocaml-avro | zip_helper.ml |
type error = Truncated of string | Compression_error of string
let pp_error fmt error =
match error with
| Truncated content ->
Format.fprintf fmt "Truncated content after %d bytes"
(String.length content)
| Compression_error msg -> Format.fprintf fmt "Compression error: %s" msg
let pp_zlib_erro... | null | https://raw.githubusercontent.com/c-cube/ocaml-avro/a37639a5fda2848495e9155700bfaf72686fd037/src/zip_helper.ml | ocaml |
type error = Truncated of string | Compression_error of string
let pp_error fmt error =
match error with
| Truncated content ->
Format.fprintf fmt "Truncated content after %d bytes"
(String.length content)
| Compression_error msg -> Format.fprintf fmt "Compression error: %s" msg
let pp_zlib_erro... | |
a86db215cc7f8884a96c9a64fa39c5c31949f24faae48a935cf33a8be3c24811 | composewell/unicode-data | IdentifiersBench.hs | module Unicode.Char.IdentifiersBench
( benchmarks
) where
import Test.Tasty.Bench ( bgroup, Benchmark )
import Unicode.Char.Bench (CharRange, benchChars)
import qualified Unicode.Char.Identifiers as I
# NOINLINE benchmarks #
benchmarks :: CharRange -> Benchmark
benchmarks charRange = bgroup "Unicode.Char.Ide... | null | https://raw.githubusercontent.com/composewell/unicode-data/3dac84295d5a0eaf620f33a7dab19943df84956b/unicode-data/bench/Unicode/Char/IdentifiersBench.hs | haskell | module Unicode.Char.IdentifiersBench
( benchmarks
) where
import Test.Tasty.Bench ( bgroup, Benchmark )
import Unicode.Char.Bench (CharRange, benchChars)
import qualified Unicode.Char.Identifiers as I
# NOINLINE benchmarks #
benchmarks :: CharRange -> Benchmark
benchmarks charRange = bgroup "Unicode.Char.Ide... | |
990f628678dd4f94b404b46190895877de02e1bbb7b08b40eef906f1b81ff19c | fredlund/McErlang | scenarios.erl | -module(scenarios).
-export([scenarios/0,default_scenario/0]).
default_scenario() ->
{4,2,
[{scheduler,f_button_pressed,[1]},
{scheduler,e_button_pressed,[2,1]},
{scheduler,f_button_pressed,[1]}]}.
scenarios() ->
[{3,2,
[{scheduler,e_button_pressed,[2,2]},
{scheduler,f_button_pressed,[2]},
... | null | https://raw.githubusercontent.com/fredlund/McErlang/25b38a38a729fdb3c3d2afb9be016bbb14237792/examples/Elevator/src/scenarios.erl | erlang | -module(scenarios).
-export([scenarios/0,default_scenario/0]).
default_scenario() ->
{4,2,
[{scheduler,f_button_pressed,[1]},
{scheduler,e_button_pressed,[2,1]},
{scheduler,f_button_pressed,[1]}]}.
scenarios() ->
[{3,2,
[{scheduler,e_button_pressed,[2,2]},
{scheduler,f_button_pressed,[2]},
... | |
dcd3c639f6e0132d747d2acb511248c65dfc4749e87754f9e3f8b258f9754b5e | realworldocaml/examples | extended_fqueue.ml | include Fqueue
include Foldable.Extend(Fqueue)
| null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/functors/extended_fqueue.ml | ocaml | include Fqueue
include Foldable.Extend(Fqueue)
| |
22beb44f96fec8a20adb61e9d0aa43ba45379012ef118696de6ec09372d1d459 | blockchain-unica/defi-workbench | test1.ml | open State
let a = Address.addr "A"
let b = Address.addr "B"
let t0 = Token.init "t0"
let t1 = Token.init "t1"
module S = State(
struct
let coll_min = 1.5
let r_liq = 1.1
let intr _ = 0.14
end)
let s = S.(
empty
|> px t0 1.
|> px t1 1.
|> id_print
|> add_wallet a [(t0,100)]
|> id_print
... | null | https://raw.githubusercontent.com/blockchain-unica/defi-workbench/a3606bf425cef8e81d1f12b13dc1410a48f3e860/test/test1.ml | ocaml |
print_string "A's value of collateralized tokens: ";
print_float (State.val_collateralized a s);;
print_newline ();;
print_string "B's value of collateralized tokens: ";
print_float (State.val_collateralized b s);;
print_newline ();;
| open State
let a = Address.addr "A"
let b = Address.addr "B"
let t0 = Token.init "t0"
let t1 = Token.init "t1"
module S = State(
struct
let coll_min = 1.5
let r_liq = 1.1
let intr _ = 0.14
end)
let s = S.(
empty
|> px t0 1.
|> px t1 1.
|> id_print
|> add_wallet a [(t0,100)]
|> id_print
... |
4defe64aa20d1b6289263793ff0c1beabc5d75cc3263477e961e9ff21a3186ac | input-output-hk/ouroboros-network | DerivingVia.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE QuantifiedConstraints #
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
module Ouroboros.Con... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/c82309f403e99d916a76bb4d96d6812fb0a9db81/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/Util/DerivingVia.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
------------------------------------------------------------------------------
Auxiliary
------------------------------------------------------------------------------
----------... | # LANGUAGE GADTs #
# LANGUAGE KindSignatures #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE TypeApplications #
module Ouroboros.Consensus.HardFork.Combinator.Util.DerivingVia (
LiftMismatch (..)
, LiftNP (..)
, LiftNS (..)
, LiftNamedMismatch (..)
, LiftNamedNP (..)
, Lift... |
708f94ae3951043cac07562605f5aef54f1f370af4602157c54d37cb363b5a18 | c4-project/c4f | expr_const.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fir_gen/src/expr_const.mli | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
8c597f72a39e4ed10e3d5e0cf7557a7cb6f66fc31c4e983f5cc5e73bf3d2f3e8 | open-company/open-company-auth | jwtoken.clj | (ns oc.auth.util.jwtoken
"Commandline client to create a JWToken for OpenCompany API use."
(:require [clojure.string :as s]
[clj-time.core :as t]
[clj-time.format :as format]
[clojure.tools.cli :refer (parse-opts)]
[oc.auth.config :as config]
[oc.lib.jwt :... | null | https://raw.githubusercontent.com/open-company/open-company-auth/79275bd3b877e70048a80960d7fa2d14be0abfe9/src/oc/auth/util/jwtoken.clj | clojure | Handle help and error conditions | (ns oc.auth.util.jwtoken
"Commandline client to create a JWToken for OpenCompany API use."
(:require [clojure.string :as s]
[clj-time.core :as t]
[clj-time.format :as format]
[clojure.tools.cli :refer (parse-opts)]
[oc.auth.config :as config]
[oc.lib.jwt :... |
5363b64957d7f1a565accdc02b6a2c62c4b6240ea6f570ca7978c162e4806589 | prg-titech/baccaml | typing.ml | (* type inference/reconstruction *)
open Syntax
exception Unify of Type.t * Type.t
exception Error of t * Type.t * Type.t
let extenv = ref M.empty
(* for pretty printing (and type normalization) *)
let rec deref_typ = function
(* 型変数を中身でおきかえる関数 (caml2html: typing_deref) *)
| Type.Fun (t1s, t2) -> Type.Fun (List... | null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/base/typing.ml | ocaml | type inference/reconstruction
for pretty printing (and type normalization)
型変数を中身でおきかえる関数 (caml2html: typing_deref)
occur check (caml2html: typing_occur)
型が合うように、型変数への代入をする (caml2html: typing_unify)
一方が未定義の型変数の場合 (caml2html: typing_undef)
letの型推論 (caml2html: typing_let)
外部変数の型推論 (caml2html: typing_extvar... |
open Syntax
exception Unify of Type.t * Type.t
exception Error of t * Type.t * Type.t
let extenv = ref M.empty
let rec deref_typ = function
| Type.Fun (t1s, t2) -> Type.Fun (List.map deref_typ t1s, deref_typ t2)
| Type.Tuple ts -> Type.Tuple (List.map deref_typ ts)
| Type.Array t -> Type.Array (deref_typ t)
... |
f5af666849ec3454e0ea97eb671e9efd43c9c70f37611506a0fd334dd1634799 | mdebski/zpf-outsidein | Solve.hs | module Solve where
import Data.List
import OIDefs
import OIMonad
import Subs
simpleConstraints :: [OIConstraint] -> [OIConstraint]
simpleConstraints = concatMap (fst . splitConstraint)
properConstraints :: [OIConstraint] -> [OIConstraint]
properConstraints = concatMap (snd . splitConstraint)
splitConstraints :: [OIC... | null | https://raw.githubusercontent.com/mdebski/zpf-outsidein/10b0ed6c4346b348c188c582a4b0381d34f28f2d/Solve.hs | haskell | module Solve where
import Data.List
import OIDefs
import OIMonad
import Subs
simpleConstraints :: [OIConstraint] -> [OIConstraint]
simpleConstraints = concatMap (fst . splitConstraint)
properConstraints :: [OIConstraint] -> [OIConstraint]
properConstraints = concatMap (snd . splitConstraint)
splitConstraints :: [OIC... | |
89adec7c870a16d0a6f42342ddb50f9359914114222cd1f2750273acf8a052f9 | Decentralized-Pictures/T4L3NT | plugin.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Nomadic Development . < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_007_PsDELPH1/lib_plugin/plugin.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Nomadic Development . < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER... |
1a936a8924d482a3601e8bf17ec2fc7702c10db3b0d60817285bba87b25da51f | coccinelle/herodotos | hybrid.ml |
let verbose = ref false
let gnudiff = ref ""
let gumtree = ref ""
let gumtree_cmd = ref []
let register_cmd list =
gumtree_cmd := list
let parse_config v f =
verbose := v;
gnudiff := f ^ Global.patchext;
gumtree := f ^ Global.gumtreeext
let make_path prefix ver file =
prefix ^ Filename.dir_sep ^ ver ^ Fil... | null | https://raw.githubusercontent.com/coccinelle/herodotos/5da230a18962ca445ed2368bc21abe0a8402e00f/herodotos/diff/hybrid.ml | ocaml | If the file is already in the cache, the command will not be in the list.
Called by Occ_correl |
let verbose = ref false
let gnudiff = ref ""
let gumtree = ref ""
let gumtree_cmd = ref []
let register_cmd list =
gumtree_cmd := list
let parse_config v f =
verbose := v;
gnudiff := f ^ Global.patchext;
gumtree := f ^ Global.gumtreeext
let make_path prefix ver file =
prefix ^ Filename.dir_sep ^ ver ^ Fil... |
429d30cd29b140c5effc65858f41b6f6f8aa1a96dae7095c5573c1d01e895cfe | MaskRay/OJHaskell | tower-breakers.hs | import Control.Monad
main = do
cases <- readLn
replicateM cases $ do
[n, m] <- fmap (map read . words) getLine :: IO [Int]
print $ if odd n && m > 1 then 1 else 2
| null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/HackerRank/contests/5-days-of-game-theory/tower-breakers.hs | haskell | import Control.Monad
main = do
cases <- readLn
replicateM cases $ do
[n, m] <- fmap (map read . words) getLine :: IO [Int]
print $ if odd n && m > 1 then 1 else 2
| |
0deb872111f7cae5b4b580bd3f5f3304eb20169ba409ef064eda0d60443df3eb | kmi/irs | run-tests.lisp | ;;; Copyright © 2007,2008 The Open University
(load "scripts/irs")
(require :irs)
(require :irs-tests)
(irs:start)
(tests:setup)
(tests:run-all-tests)
(quit)
| null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/scripts/run-tests.lisp | lisp | Copyright © 2007,2008 The Open University |
(load "scripts/irs")
(require :irs)
(require :irs-tests)
(irs:start)
(tests:setup)
(tests:run-all-tests)
(quit)
|
43a50101a261b8ee11d2482200bf416d72f27048feb194ebf1e65ed17429d895 | hakaru-dev/hakaru | Maple.hs | # LANGUAGE CPP
, FlexibleInstances
, FlexibleContexts
, DeriveDataTypeable
, , ScopedTypeVariables
, RecordWildCards
, ViewPatterns
, LambdaCase
, KindSignatures
, TypeOperators
, GADTs
... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/Maple.hs | haskell | # OPTIONS_GHC -Wall -fwarn-tabs #
|
Module : Language.Hakaru.Maple
License : BSD3
Stability : experimental
in a type-safe way.
--------------------------------------------------------------
--------------------------------------------------------------
of the error on the line above. The derived s... | # LANGUAGE CPP
, FlexibleInstances
, FlexibleContexts
, DeriveDataTypeable
, , ScopedTypeVariables
, RecordWildCards
, ViewPatterns
, LambdaCase
, KindSignatures
, TypeOperators
, GADTs
... |
7e34d01197a5978a08eddb4c22d14e2edd33ff0b379f9ca3af9fef4e65822bf0 | dabcoder/stocks | Market.hs | # LANGUAGE DeriveGeneric #
module Net.IEX.Market (Market(..)) where
import Data.Maybe
import Data.Aeson
import GHC.Generics
data Market = Market {
mic :: String,
tapeId :: String,
venueName :: String,
volume :: Integer,
tapeA :: Integer,
tapeB :: Integer,
tapeC :: Integer,
marketPercent :: Double,
... | null | https://raw.githubusercontent.com/dabcoder/stocks/aad9bb3e74b2abf54cc09dd10dc66152881a32b8/src/Net/IEX/Market.hs | haskell | # LANGUAGE DeriveGeneric #
module Net.IEX.Market (Market(..)) where
import Data.Maybe
import Data.Aeson
import GHC.Generics
data Market = Market {
mic :: String,
tapeId :: String,
venueName :: String,
volume :: Integer,
tapeA :: Integer,
tapeB :: Integer,
tapeC :: Integer,
marketPercent :: Double,
... | |
707fcf0a6565be0fe93c44cf7907c83dbb7c72c85892c87407db115f57f4d253 | phylogeography/spread | search.cljs | (ns ui.component.search
(:require [reagent.core :as reagent]))
(defn search-bar [_]
(let [val (reagent/atom "")]
(fn [{:keys [on-change placeholder]}]
[:div.search-bar
[:input {:type :text
:placeholder placeholder
:value @val
:on-change (fn [e]
... | null | https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/ui/component/search.cljs | clojure | (ns ui.component.search
(:require [reagent.core :as reagent]))
(defn search-bar [_]
(let [val (reagent/atom "")]
(fn [{:keys [on-change placeholder]}]
[:div.search-bar
[:input {:type :text
:placeholder placeholder
:value @val
:on-change (fn [e]
... | |
ab99027eb894e6198c34cc1542aa6d2d4ba4141e80049052e1c2e6a6fc32cdac | jimcrayne/jhc | tcfail206.hs | # LANGUAGE TupleSections , UnboxedTuples #
module Main where
a :: Bool -> (Int, Bool)
a = ( , True)
b :: Int -> Bool -> (Int, Bool)
b = (1, )
c :: a -> (a, Bool)
c = (True || False, )
d :: Bool -> (#Int, Bool#)
d = (# , True#)
e :: Int -> Bool -> (#Int, Bool#)
e = (#1, #)
f :: a -> (#a, Bool#)
f = (#True || False... | null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/4_fail/ghc/tcfail206.hs | haskell | # LANGUAGE TupleSections , UnboxedTuples #
module Main where
a :: Bool -> (Int, Bool)
a = ( , True)
b :: Int -> Bool -> (Int, Bool)
b = (1, )
c :: a -> (a, Bool)
c = (True || False, )
d :: Bool -> (#Int, Bool#)
d = (# , True#)
e :: Int -> Bool -> (#Int, Bool#)
e = (#1, #)
f :: a -> (#a, Bool#)
f = (#True || False... | |
ee0cccc8e8f7c9ddfe290588876ea68d4db563e1c10c61240a46c4ea026d809c | bobzhang/ocaml-book | aparser.ml | open Printf
open Aast
open Camlp4.PreCast
open Util
let t,t_eoi = Gram.Entry.mk "t" , Gram.Entry.mk "t_eoi"
let t_of_string _loc str =
try
Gram.parse_string t_eoi _loc str
with
Loc.Exc_located(t,exn) ->
prerr_endline ^$ Loc.to_string t ;
raise exn
let _ = begin
EXTEND Gram GLOBAL:t ... | null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/camlp4/json/aparser.ml | ocaml | open Printf
open Aast
open Camlp4.PreCast
open Util
let t,t_eoi = Gram.Entry.mk "t" , Gram.Entry.mk "t_eoi"
let t_of_string _loc str =
try
Gram.parse_string t_eoi _loc str
with
Loc.Exc_located(t,exn) ->
prerr_endline ^$ Loc.to_string t ;
raise exn
let _ = begin
EXTEND Gram GLOBAL:t ... | |
f380dc033b7bc0d4bf11f8ec3a3dc6e8c1391e7b139199f4e1818af82b63d198 | vascokk/NumEr | numer_nifs.erl | -module(numer_nifs).
-define(NIF_API_VERSION, 2).
-define(MISSING_NIF, throw({error, missing_nif})).
-include_lib("eunit/include/eunit.hrl").
-include("include/numer.hrl").
-on_load(init/0).
-export([init/0]).
%% API
-export([new_context/0,
new_context/1,
destroy_context/1]).
-export([new_float_... | null | https://raw.githubusercontent.com/vascokk/NumEr/0d22c31633ef2ab43dde50809a9dbbb6a736f5b7/src/numer_nifs.erl | erlang | API
Matrices | -module(numer_nifs).
-define(NIF_API_VERSION, 2).
-define(MISSING_NIF, throw({error, missing_nif})).
-include_lib("eunit/include/eunit.hrl").
-include("include/numer.hrl").
-on_load(init/0).
-export([init/0]).
-export([new_context/0,
new_context/1,
destroy_context/1]).
-export([new_float_buffer/... |
314b3225adc9128fe42b82cf7ed67b34cc9eb5c374fcbba93322f73c0b1d9b05 | LaurentMazare/ocaml-jupyter-async | complete.mli | val reset : unit -> unit
val complete : string -> int * (string * string) list
| null | https://raw.githubusercontent.com/LaurentMazare/ocaml-jupyter-async/c7a4e237c108ffa8be9ccfe560ff4758ff6bf74c/src/toploop/complete.mli | ocaml | val reset : unit -> unit
val complete : string -> int * (string * string) list
| |
4e6d511577a0139a24f94d194957b32fa4b367f74b75fbd41d5e675a2bda5df7 | Nibre/BlamScript-Research | 01b_spacestation_mission.lisp | ; 01b_SPACESTATION Mission Script
;=================================
;======== Globals =========
;=================================
(global short seconds 30)
(global boolean mark_1st_waves_end FALSE)
(global boolean mark_bomb2_objective FALSE)
(global boolean mark_1st_blast FALSE)
(global short time... | null | https://raw.githubusercontent.com/Nibre/BlamScript-Research/dd17538dcbdc78f391effb341846fbaf9a1f8643/h2v/01b_spacestation/01b_spacestation_mission.lisp | lisp | 01b_SPACESTATION Mission Script
=================================
======== Globals =========
=================================
========== Checkpoint Scripts ==========
=================================
======== Flavor Scripts =========
=================================
backrhodes
"Brace for impact!"
"All ha... |
(global short seconds 30)
(global boolean mark_1st_waves_end FALSE)
(global boolean mark_bomb2_objective FALSE)
(global boolean mark_1st_blast FALSE)
(global short timer_flavor 0)
(global short global_flavor_delay (* 20 seconds))
(global boolean mark_flavor_disable FALSE)
(global boolean mark_fla... |
0d0902b04a4030a44838aac3d26b5861890386d1017de5aaf2880c5fb02a0756 | OCamlPro/OCamlPro-OCaml-Branch | clflags.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/utils/clflags.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2005 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$
val objfiles : string list ref... |
5781eb52593486beee7a32becfc6999ed75371fc2aab2722e97462525eb2ee3d | ryanpbrewster/haskell | P201.hs | # LANGUAGE FlexibleContexts #
module Problems.P201
( solve
) where
- For any set A of numbers , let sum(A ) be the sum of the elements of A.
- Consider the set B = { 1,3,6,8,10,11 } .
- There are 20 subsets of B containing three elements , and their sums are :
-
- sum({1,3,6 } ) = 10 ,
- sum({1,... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Problems/P201.hs | haskell | solve = show $ solveProblem 100 50
the empty subset | # LANGUAGE FlexibleContexts #
module Problems.P201
( solve
) where
- For any set A of numbers , let sum(A ) be the sum of the elements of A.
- Consider the set B = { 1,3,6,8,10,11 } .
- There are 20 subsets of B containing three elements , and their sums are :
-
- sum({1,3,6 } ) = 10 ,
- sum({1,... |
841c515dc89ae9e2f4040e2227335be6cc44e31277580a5ca0b10f6a87a9fc6c | Clojure2D/clojure2d-examples | P_2_2_3_01.clj | (ns GG.P.P-2-2-3-01
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.random :as r]
[fastmath.vector :as v]))
(def wname "P_2_2_3_01")
(def ^:const ^int form-resolution 15)
(def ^:const ^double step-size 2.0)
(def ^:const ^double init-radius 150.0)
(def ^:con... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/GG/P/P_2_2_3_01.clj | clojure | (ns GG.P.P-2-2-3-01
(:require [clojure2d.core :refer :all]
[fastmath.core :as m]
[fastmath.random :as r]
[fastmath.vector :as v]))
(def wname "P_2_2_3_01")
(def ^:const ^int form-resolution 15)
(def ^:const ^double step-size 2.0)
(def ^:const ^double init-radius 150.0)
(def ^:con... | |
8e8c68dfb4208726be57e2c2e1932f77873a15792e8b69275a50ed3bddc9e659 | eslick/cl-stdutils | shorthand.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: shorthand.lisp
;;;; Purpose: Abbreviations and other shortcuts; symbol manipulation
Programm... | null | https://raw.githubusercontent.com/eslick/cl-stdutils/4a4e5a4036b815318282da5dee2a22825369137b/src/shorthand.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : utils -*-
*************************************************************************
FILE IDENTIFICATION
Name: shorthand.lisp
Purpose: Abbreviations and other shortcuts; symbol manipulation
=====================
Standard abbreviati... | Programmer :
Date Started : August 2004
Author :
With thanks to
(in-package :stdutils)
(defmacro-exported abbrev (short long)
"Create an abbreviation for an existing function or macro via macro instantiation"
`(defmacro ,short (&body args)
`(,',long ,@args)))
(defmacro... |
cd8a93b0521fc156389504ac4a6228435e6d6ea84cce4b537d2b2ace9a7738c3 | TheLortex/mirage-monorepo | seq_alias.mli |
include module type of Stdlib.Seq
| null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/seq/src/seq_alias.mli | ocaml |
include module type of Stdlib.Seq
| |
4b6c05c2ce7d2b343bfcd1035e75dc2fb00b018d976a9fd81c42c61cbf65b2bf | sethalves/snow2-client | misc.scm | ;; misc.scm -- miscellaneous list utilities
Copyright ( c ) 2009 - 2012 . All rights reserved .
;; BSD-style license:
(define (map-onto proc ls init)
(let lp ((ls (reverse ls)) (res init))
(if (null? ls) res (lp (cdr ls) (cons (proc (car ls)) res)))))
(define (append! . lists) (concatenate! lists))
(def... | null | https://raw.githubusercontent.com/sethalves/snow2-client/b70c3ca5522a666a71a4c8992f771d5faaceccd6/srfi/srfi-1/misc.scm | scheme | misc.scm -- miscellaneous list utilities
BSD-style license: | Copyright ( c ) 2009 - 2012 . All rights reserved .
(define (map-onto proc ls init)
(let lp ((ls (reverse ls)) (res init))
(if (null? ls) res (lp (cdr ls) (cons (proc (car ls)) res)))))
(define (append! . lists) (concatenate! lists))
(define (reverse! lis)
(let lp ((lis lis) (ans '()))
(if (null-li... |
55e5a4b7bbf381f5662041be8adc25b072a325815fbcb9f01eb31ca556752add | elisehuard/game-in-haskell | CommandLine.hs | module Testing.CommandLine (
interactiveCommandLine
) where
import Testing.GameTypes
import Testing.Internals.CommandParser
import System.Console.Haskeline
import Control.Concurrent (MVar, putMVar)
import Control.Monad.IO.Class
import Data.Text (pack)
interactiveCommandLine :: MVar Command -> IO ()
interactiveComma... | null | https://raw.githubusercontent.com/elisehuard/game-in-haskell/b755c42d63ff5dc9246b46590fb23ebcc1d455b1/src/Testing/CommandLine.hs | haskell | module Testing.CommandLine (
interactiveCommandLine
) where
import Testing.GameTypes
import Testing.Internals.CommandParser
import System.Console.Haskeline
import Control.Concurrent (MVar, putMVar)
import Control.Monad.IO.Class
import Data.Text (pack)
interactiveCommandLine :: MVar Command -> IO ()
interactiveComma... | |
132cf1eb50633ee64d2d527924fe519ee48ab9e66558572334579540dd26b534 | manuel-serrano/bigloo | error.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / / comptime / Tools / error.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/comptime/Tools/error.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Error utilities */
*===========================... | * serrano / prgm / project / bigloo / / comptime / Tools / error.scm * /
* Author : * /
* Creation : Sun Dec 25 10:47:51 1994 * /
* Last change : Fri Apr 12 11:04:42 2019 ( serrano ) * /
* Copyrigh... |
37e8bf3eb63c51d23e3201d1b9450e21323268cd2d77a766ccf42cff69672969 | bsansouci/bsb-native | minidoc.ml | open Asttypes
open Parsetree
open Typedtree
open Longident
let pendings = ref []
let doc ppf = function
| ({txt="doc";_}, PStr [{pstr_desc=Pstr_eval(e, _); _}]) ->
begin match e.pexp_desc with
| Pexp_constant(Const_string (s, _)) ->
Format.fprintf ppf " --> %s@." s
| Pexp_apply({pexp_... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/experimental/frisch/minidoc.ml | ocaml | open Asttypes
open Parsetree
open Typedtree
open Longident
let pendings = ref []
let doc ppf = function
| ({txt="doc";_}, PStr [{pstr_desc=Pstr_eval(e, _); _}]) ->
begin match e.pexp_desc with
| Pexp_constant(Const_string (s, _)) ->
Format.fprintf ppf " --> %s@." s
| Pexp_apply({pexp_... | |
ed1aa0b07ae611ecaade6b37d004c6607384aba510e9112eccbabd28f3594502 | krdlab/haskell-oidc-client | CodeFlow.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Web . OIDC.Client . CodeFlow
Maintainer :
Stability : experimental
Module: Web.OIDC.Client.CodeFlow
Maintainer:
Stability: experimental
-}
module Web.OIDC.Client.CodeFlow
(
getAuthenticationRequestUrl
, getValidTokens
, pr... | null | https://raw.githubusercontent.com/krdlab/haskell-oidc-client/35f567836613cd5f2849e41313e0e34e45264c5d/src/Web/OIDC/Client/CodeFlow.hs | haskell | # LANGUAGE OverloadedStrings #
* For testing
| Make URL for Authorization Request after generating state and nonce from 'SessionStore'.
^ Optional parameters
| Get and validate access token and with code and state stored in the 'SessionStore'.
Then deletes session info by 'sessionStoreDelete'.
| Make URL for Au... | |
Module : Web . OIDC.Client . CodeFlow
Maintainer :
Stability : experimental
Module: Web.OIDC.Client.CodeFlow
Maintainer:
Stability: experimental
-}
module Web.OIDC.Client.CodeFlow
(
getAuthenticationRequestUrl
, getValidTokens
, prepareAuthenticationRequestUrl
,... |
accc2e90af188180d02309bf6916c8a45ef67f8f733fc140d83ad023fd663902 | Smoltbob/Caml-Est-Belle | if2.ml | if 5<=9.4 then
print_int(9)
else
print_int(5)
| null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/typechecking/invalid/if2.ml | ocaml | if 5<=9.4 then
print_int(9)
else
print_int(5)
| |
f09f53de4e10b4f7f44af2fdee268e96a7b2a6f18ca8925c315861fbe6530b6a | KestrelInstitute/Specware | defsum.lisp | Defsum : a macro for defining recursive data types
by Sol Swords &
Please email bug reports to .
;
; For primary documentation of the content of this book, see the :doc
topics defsum , defsums , and pattern - match .
;
; This book defines the macros defsum and defsums which can be used to
; define recursive... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Languages/ACL2/defsum.lisp | lisp |
For primary documentation of the content of this book, see the :doc
This book defines the macros defsum and defsums which can be used to
define recursive data types analogous to type definitions in
Haskell. These types are recursive labeled sums of products.
Proofs written using the new type are based on the ab... | Defsum : a macro for defining recursive data types
by Sol Swords &
Please email bug reports to .
topics defsum , defsums , and pattern - match .
type itself , not its representation . Unlike records , but like ,
( defsum my - list
( my - cons car ( my - list - ) ) )
The first item of each list... |
4dec8ad9ccd22ce6f1e60e5234b184afae450ab286f2efa1875974e00f4dc1d3 | nuvla/api-server | callback_deployment_update_test.clj | (ns sixsq.nuvla.server.resources.callback-deployment-update-test
(:require
[clojure.data.json :as json]
[clojure.test :refer [deftest is use-fixtures]]
[peridot.core :refer [content-type header request session]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.middleware.authn-info :refer... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/callback_deployment_update_test.clj | clojure | setup a module that can be referenced from the deployment
create deployment
start the deployment
verify that the state has changed
the deployment would be set to "STARTED" via the job
for the tests, set this manually to continue with the workflow
create callback
notification exist
execute callback and check cr... | (ns sixsq.nuvla.server.resources.callback-deployment-update-test
(:require
[clojure.data.json :as json]
[clojure.test :refer [deftest is use-fixtures]]
[peridot.core :refer [content-type header request session]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.middleware.authn-info :refer... |
48d1fba00ec01286f2c39f069e79bb25d18175da18532a125868734c1e093a77 | djblue/portal | filter.cljc | (ns ^:no-doc portal.ui.filter
(:require [clojure.string :as str]))
(defn match [value text]
(cond
(or (nil? value)
(boolean? value)
(number? value)
(string? value)
(keyword? value)
(symbol? value))
(str/includes? (str value) text)
(map? value)
(some
(fn... | null | https://raw.githubusercontent.com/djblue/portal/fb726a3784f97bea8151114358496240fcd388b7/src/portal/ui/filter.cljc | clojure | (ns ^:no-doc portal.ui.filter
(:require [clojure.string :as str]))
(defn match [value text]
(cond
(or (nil? value)
(boolean? value)
(number? value)
(string? value)
(keyword? value)
(symbol? value))
(str/includes? (str value) text)
(map? value)
(some
(fn... | |
89525a3fe8bd4fede622d041af92a620920a6de7bba5143c811925ee46872eaa | AshleyYakeley/Truth | Dependent.hs | module Changes.Core.Types.Tuple.Dependent
( DependentSelector(..)
, DependentUpdate
, dependentChangeLens
) where
import Changes.Core.Edit
import Changes.Core.Import
import Changes.Core.Lens
import Changes.Core.Read
import Changes.Core.Types.Tuple.Tuple
import Changes.Core.Types.Whole
data DependentSe... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/9296c5fe5c311be11f237714229c78319e9431bb/Changes/changes-core/lib/Changes/Core/Types/Tuple/Dependent.hs | haskell | module Changes.Core.Types.Tuple.Dependent
( DependentSelector(..)
, DependentUpdate
, dependentChangeLens
) where
import Changes.Core.Edit
import Changes.Core.Import
import Changes.Core.Lens
import Changes.Core.Read
import Changes.Core.Types.Tuple.Tuple
import Changes.Core.Types.Whole
data DependentSe... | |
160bcbc6e8bfae014e4decd972b094daaa36362bf56b16ff09b1aa4e664bb39d | t-sin/rosa | basis.lisp | (in-package :cl-user)
(uiop:define-package :rosa/tests/basis
(:use :cl
:rosa
:rosa/tests/util
:prove)
(:import-from :alexandria
:set-equal)
(:import-from :flexi-streams
:make-flexi-stream
:string-to-octets
:with-input-from-seq... | null | https://raw.githubusercontent.com/t-sin/rosa/dfa505fa035ccc1811e575034ba79dbb36d9c159/tests/basis.lisp | lisp | NOTE: To run this test file, execute `(asdf:test-system :rosa)' in your Lisp.
comment
peruse API; all data read at once.
comment
peruse API; return eazy-to-use structure
comment
indexing API; listing labels.
picking up API; pickinck up body(ies) with specified label.
rosa write data into a string
indite can take... | (in-package :cl-user)
(uiop:define-package :rosa/tests/basis
(:use :cl
:rosa
:rosa/tests/util
:prove)
(:import-from :alexandria
:set-equal)
(:import-from :flexi-streams
:make-flexi-stream
:string-to-octets
:with-input-from-seq... |
414e170e83e06cf655b880bfe99565e55854b760b5dc1165c2a1fb72408d986b | rufus-lang/rufus | rufus_error.erl | %% rufus_error converts data from compilation errors into human-readable
%% strings.
-module(rufus_error).
-include_lib("rufus_type.hrl").
%% API exports
-export([message/2]).
%% API
-spec message(unmatched_return_type_error(), map()) -> binary().
message(unmatched_return_type, Data) ->
Actual = maps:get(actua... | null | https://raw.githubusercontent.com/rufus-lang/rufus/fb3ec8f67c06e8d656c6aa6c4297461559ee168f/rf/src/rufus_error.erl | erlang | rufus_error converts data from compilation errors into human-readable
strings.
API exports
API | -module(rufus_error).
-include_lib("rufus_type.hrl").
-export([message/2]).
-spec message(unmatched_return_type_error(), map()) -> binary().
message(unmatched_return_type, Data) ->
Actual = maps:get(actual, Data),
Expected = maps:get(expected, Data),
Message = io_lib:format("mismatched return type, got... |
ab0f2637b70e06d12d63c2c8d3c9e254ea4862f133f9d620bdf78bb2cc1843f9 | nonguix/nonguix | version-control.scm | SPDX - License - Identifier : GPL-3.0 - or - later
Copyright © 2022 dan < >
Copyright © 2022 < >
(define-module (nongnu packages version-control)
#:use-module (gnu packages base)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (nonguix build-system binary)
#:use-module (nongu... | null | https://raw.githubusercontent.com/nonguix/nonguix/71252d2d9d1908a1f1b005d2025b0907d5d5c377/nongnu/packages/version-control.scm | scheme | SPDX - License - Identifier : GPL-3.0 - or - later
Copyright © 2022 dan < >
Copyright © 2022 < >
(define-module (nongnu packages version-control)
#:use-module (gnu packages base)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (nonguix build-system binary)
#:use-module (nongu... | |
d96f79a98cfdc96743a4c697513b8397457d302524d3e43c07b2f6ea1842c844 | chef/chef-server | oc_chef_wm_named_user.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
%% ex: ts=4 sw=4 et
@author < >
@author < >
Copyright 2012 - 2014 Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this ... | null | https://raw.githubusercontent.com/chef/chef-server/4b2ac09ed59219d41352aa414ae42e275c96ade4/src/oc_erchef/apps/oc_chef_wm/src/oc_chef_wm_named_user.erl | erlang | ex: ts=4 sw=4 et
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
chef_wm beh... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92-*-
@author < >
@author < >
Copyright 2012 - 2014 Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distri... |
c34e79e078a8b162e9a3d6ff2873e23fb412b137fb27b3074ffe359e4d8e60e2 | pallet/pallet | debug_test.clj | (ns pallet.debug-test
(:require
[clojure.string :as string]
[clojure.test :refer :all]
[pallet.common.logging.logutils :as logutils]
[pallet.core.session :refer [with-session]]
[pallet.debug :refer :all]
[pallet.test-utils :as test-utils]))
(deftest print-session-test
(let [m {:a 1 :b "2"}]
(... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/test/pallet/debug_test.clj | clojure | (ns pallet.debug-test
(:require
[clojure.string :as string]
[clojure.test :refer :all]
[pallet.common.logging.logutils :as logutils]
[pallet.core.session :refer [with-session]]
[pallet.debug :refer :all]
[pallet.test-utils :as test-utils]))
(deftest print-session-test
(let [m {:a 1 :b "2"}]
(... | |
e3045c328b7fee8c4afc42aade2587c28318b28f0c8dd3d51d515c141bad6941 | berkeley-cs164-2021/164-class-compiler | constant_folding.ml | open Ast
let rec fold : expr -> expr = function
| Num n ->
Num n
| Prim1 (Add1, e) -> (
let e = fold e in
match e with Num n -> Num (n + 1) | _ -> Prim1 (Add1, e) )
| Prim1 (Sub1, e) -> (
let e = fold e in
match e with Num n -> Num (n - 1) | _ -> Prim1 (Sub1, e) )
| Prim1 (p, e) -... | null | https://raw.githubusercontent.com/berkeley-cs164-2021/164-class-compiler/cda9b790e7df8654bcf693241230f003692fba41/lib/constant_folding.ml | ocaml | open Ast
let rec fold : expr -> expr = function
| Num n ->
Num n
| Prim1 (Add1, e) -> (
let e = fold e in
match e with Num n -> Num (n + 1) | _ -> Prim1 (Add1, e) )
| Prim1 (Sub1, e) -> (
let e = fold e in
match e with Num n -> Num (n - 1) | _ -> Prim1 (Sub1, e) )
| Prim1 (p, e) -... | |
9aed0e26f35c0c761f206a02ce8292282ed875b8a0532a7c917a30016996494a | opencog/opencog | run-chatbot.scm | #! /usr/local/bin/guile \
-L /usr/local/share/opencog/scm --
!#
; For users who are not aware of readline ...
(use-modules (ice-9 readline))
(activate-readline)
; Stuff actually needed to get the chatbot running...
(use-modules (opencog) (opencog cogserver))
(use-modules (opencog nlp) (opencog nlp oc) (opencog nlp ... | null | https://raw.githubusercontent.com/opencog/opencog/482a93b34c2eeaac0e773731d61c31558710f93d/opencog/nlp/chatbot/run-chatbot.scm | scheme | For users who are not aware of readline ...
Stuff actually needed to get the chatbot running...
must be public, and cannot be loaded in the relex2logic or chatbot
modules above. So we work around this here.
See | #! /usr/local/bin/guile \
-L /usr/local/share/opencog/scm --
!#
(use-modules (ice-9 readline))
(activate-readline)
(use-modules (opencog) (opencog cogserver))
(use-modules (opencog nlp) (opencog nlp oc) (opencog nlp chatbot))
(use-modules (opencog nlp relex2logic))
Unfortunately , due to the design of the URE , ... |
b940d3a7a22b3fc92d6f808e8968a9e8057adc52e1167100afd2d37c57623940 | SahilKang/cl-rdkafka | consumer.lisp | Copyright ( C ) 2018 - 2020 < >
Copyright 2022 Google LLC
;;;
;;; This file is part of cl-rdkafka.
;;;
;;; cl-rdkafka is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , o... | null | https://raw.githubusercontent.com/SahilKang/cl-rdkafka/267e18399351ec5b6a282c9dbd9b194145ff454b/test/high-level/consumer.lisp | lisp |
This file is part of cl-rdkafka.
cl-rdkafka is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-rdkafka 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 PURPOS... | Copyright ( C ) 2018 - 2020 < >
Copyright 2022 Google LLC
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:cl-user)
(defpackage #:test/hi... |
42acc310a16dcc89f131f42615f39def3a6e4cd4022493be26e5495932f71cd3 | donut-party/datapotato | visiting_functions.clj | (ns donut.datapotato-tutorial.visiting-functions
(:require [donut.datapotato.core :as dc]))
(def schema
{:user {:prefix :u}
:topic {:prefix :t
:relations {:owner-id [:user :id]}}
:post {:prefix :p
:relations {:topic-id [:topic :id]}}})
(defn announce
[_potato-db {:keys [ent-n... | null | https://raw.githubusercontent.com/donut-party/datapotato/e63297583ecbdd9784e6cabc15a63d373fe4e2f5/docs/tutorial/donut/datapotato_tutorial/visiting_functions.clj | clojure | => | (ns donut.datapotato-tutorial.visiting-functions
(:require [donut.datapotato.core :as dc]))
(def schema
{:user {:prefix :u}
:topic {:prefix :t
:relations {:owner-id [:user :id]}}
:post {:prefix :p
:relations {:topic-id [:topic :id]}}})
(defn announce
[_potato-db {:keys [ent-n... |
1053f814b4f558dbed5f8887c1123041a0b9d297a4eace560e0b687dd3e2604b | jiangpengnju/htdp2e | concrete-time-abstract-time.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 concrete-time-abstract-time) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t ... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/intermezzo-the-cost-of-computation/concrete-time-abstract-time.rkt | racket | about the language level of this file in a form that our tools can easily process.
O(n)
O(n)
O(n*n) | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname concrete-time-abstract-time) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define (how-many a-list)
(cond... |
a55b7c51f5088bf40207af26f010dd5f2454c3d357febc634164b41badab319a | malcolmreynolds/GSLL | probability-distribution.lisp | ;; Histogram probability distribution.
, Mon Jan 1 2007 - 17:51
Time - stamp : < 2009 - 05 - 24 16:28:15EDT probability-distribution.lisp >
$ Id$
(in-package :gsl)
/usr / include / gsl / gsl_histogram.h
;;; /usr/include/gsl/gsl_histogram2d.h
(defmobject histogram-pdf
"gsl_histogram_pdf"
((number-of... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/histogram/probability-distribution.lisp | lisp | Histogram probability distribution.
/usr/include/gsl/gsl_histogram2d.h | , Mon Jan 1 2007 - 17:51
Time - stamp : < 2009 - 05 - 24 16:28:15EDT probability-distribution.lisp >
$ Id$
(in-package :gsl)
/usr / include / gsl / gsl_histogram.h
(defmobject histogram-pdf
"gsl_histogram_pdf"
((number-of-bins sizet))
"one-dimensional histogram PDF"
:documentation
"Optionally... |
c24d7c19c5ab658de3e2b921e647c95a8453b437c1fce22967e92b9d298f358e | sky-big/RabbitMQ | rabbit_mgmt_wm_permissions.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITH... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-management/src/rabbit_mgmt_wm_permissions.erl | erlang | compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
--------------------------------------------------------------------
---... | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Management Plugin .
The Initial Developer of the Original Code... |
47fa14ef3f2272d44a3d3e4ecab81d30e54126676f7dea5543d40b12e69702c4 | ygrek/mldonkey | gui_cdget.ml | Copyright 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at y... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/gtk/gui/gui_cdget.ml | ocaml | blues classical country data folk jazzs misc newage reggae rock soundtrack
lprintf "DOWNLOAD FINISHED"; lprint_newline ();
**********************************************************************
IMDB Bot
**********************************************************************
let ... | Copyright 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at y... |
402fa248d588b70598c0ef8ee8d62b12d2c54fcde7d9909dab25745f3b714219 | janestreet/incr_map | incr_map_collate.mli | open! Core
module Collate = Collate
module Collated = Collated
module Map_list = Incr_map_erase_key
module Store_params = Incr_memoize.Store_params
module Compare : sig
(** Note: [Unchanged] and [Reversed] is with respect to ['cmp]. *)
type ('k, 'v, 'cmp) t =
| Unchanged
| Reversed
| Custom_by_value of... | null | https://raw.githubusercontent.com/janestreet/incr_map/fe0db64862f027a826cf172e0a74a01d36ab50c7/collate/src/incr_map_collate.mli | ocaml | * Note: [Unchanged] and [Reversed] is with respect to ['cmp].
* Partial orders are supported in Custom_by_*, i.e. returning 0 shouldn't cause
issues. Rows will be then sorted by key.
* Like [collate__sort_first], but also gives an opportunity to perform a fold over
the post-filtered, pre-range-restricte... | open! Core
module Collate = Collate
module Collated = Collated
module Map_list = Incr_map_erase_key
module Store_params = Incr_memoize.Store_params
module Compare : sig
type ('k, 'v, 'cmp) t =
| Unchanged
| Reversed
| Custom_by_value of { compare : 'v -> 'v -> int }
| Custom_by_key_and_value of { com... |
fd26da8e7f34a28566fe790f9cb9c42fe8193b54f88d020f74a8cf8dc0aca715 | Bogdanp/racket-component | info.rkt | #lang info
(define license 'BSD-3-Clause)
(define collection 'multi)
(define deps '("component-doc"
"component-lib"))
(define implies '("component-doc"
"component-lib"))
| null | https://raw.githubusercontent.com/Bogdanp/racket-component/ed1d2b24a548b4652d3d0fd60588301026acb4c2/component/info.rkt | racket | #lang info
(define license 'BSD-3-Clause)
(define collection 'multi)
(define deps '("component-doc"
"component-lib"))
(define implies '("component-doc"
"component-lib"))
| |
fcd6b74e843035aa51dddd5740fbc5f76c250f4ce59d3bbe1b35b47f10890fda | 05st/capri | Typecheck.hs | # LANGUAGE TupleSections #
module Analyzer.Typecheck where
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.Text as T
import Data.Generics.Uniplate.Data
import Data.Text (pack)
import Data.Maybe
import Data.Foldable
import Control.Monad.Except
import Control.Monad.State
import qua... | null | https://raw.githubusercontent.com/05st/capri/a98b7a5bbefb1b04a87eaac4285d5c3503e8b1ac/src/Analyzer/Typecheck.hs | haskell | Only for top level declarations
Don't add to mutSet so default mutability is false
generalize for parametric polymorphism
Not generalized
Returns type of literal
Utility
^ THIS IS PROBABLY INCORRECT
Environment lookup
is this correct?
Doesn't check temp env for top levels
Looks up the type for the variant co... | # LANGUAGE TupleSections #
module Analyzer.Typecheck where
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.Text as T
import Data.Generics.Uniplate.Data
import Data.Text (pack)
import Data.Maybe
import Data.Foldable
import Control.Monad.Except
import Control.Monad.State
import qua... |
64feda035e043bf922e5fcc506884757e557b880c06807f047446ffa79c9b31b | jasonstolaruk/CurryMUD | Login.hs | # LANGUAGE LambdaCase , MonadComprehensions , MultiWayIf , NamedFieldPuns , OverloadedStrings , RecordWildCards , TupleSections , TypeApplications , ViewPatterns #
module Mud.Interp.Login ( interpName
, promptName ) where
import Mud.Cmds.Msgs.Misc
import Mud.Cmds.Msgs.Sorry... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Interp/Login.hs | haskell | ---
==================================================
---
---
---
==================================================
==================================================
==================================================
==================================================
===========================================... | # LANGUAGE LambdaCase , MonadComprehensions , MultiWayIf , NamedFieldPuns , OverloadedStrings , RecordWildCards , TupleSections , TypeApplications , ViewPatterns #
module Mud.Interp.Login ( interpName
, promptName ) where
import Mud.Cmds.Msgs.Misc
import Mud.Cmds.Msgs.Sorry... |
c8aca4bbe3c1083284438da3f83f92aabc014279acd5d2033dfde4137affdaa7 | quchen/stgi | Types.hs | {-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE MultiWayIf ... | null | https://raw.githubusercontent.com/quchen/stgi/dacd45cb0247f73889713dc92a911aaa835afd19/src/Stg/Machine/Types.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
* State information
^ The stack stores not-yet-used arguments (argument stack part),
computations to return to once case evaluation has finished
(return stack part), and instructions to update hea... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedLists #
# LANGUAGE TypeFamilies ... |
b2802a537733f72def09730ae8e1276774506c252d1ae1c4720caf510913b478 | BinaryAnalysisPlatform/bap-plugins | main.mli | open Bap.Std
val run : project -> project
| null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-plugins/2e9aa5c7c24ef494d0e7db1b43c5ceedcb4196a8/fold_consts/main.mli | ocaml | open Bap.Std
val run : project -> project
| |
b280635f87b2a4ae6729b5676456c5cca8d4a317bac26b61de5270f59d998a54 | facebook/flow | transaction.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/8d9850a82f1e3094aed7e46acab5c2b120d10a31/src/common/transaction/transaction.ml | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
6ca95691865318b7937eb929745fdf6edfba6860bcbd009517bd15db41d17898 | robert-stuttaford/bridge | ui.cljs | (ns bridge.ui
(:require bridge.person.ui
bridge.event.ui
[bridge.ui.base :as ui.base]
[bridge.ui.spec :as ui.spec]
[cljs.reader :as edn]
[re-frame.core :as rf]))
(def app-routes
["/app"
(merge {"" :home}
bridge.person.ui/routes
brid... | null | https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/src/bridge/ui.cljs | clojure | (ns bridge.ui
(:require bridge.person.ui
bridge.event.ui
[bridge.ui.base :as ui.base]
[bridge.ui.spec :as ui.spec]
[cljs.reader :as edn]
[re-frame.core :as rf]))
(def app-routes
["/app"
(merge {"" :home}
bridge.person.ui/routes
brid... | |
2788a272c23cc2808a4fb572a2ff7ed4c3559d3f0e4b72e421f7c2ea5295221f | SonyCSLParis/cl-pcp | utilities.lisp | Copyright 2021 - present Sony Computer Science Laboratories Paris
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;; -2.0
;; Unless required by applicable law or agreed to in w... | null | https://raw.githubusercontent.com/SonyCSLParis/cl-pcp/3072f272ce9b46e391cc1c3d84b0aa97fdfd0b23/utilities.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permis... | Copyright 2021 - present Sony Computer Science Laboratories Paris
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package :cl-pcp)
(defun read-from-stream (stream)
"Reads s-expression from stream or returns nil if end-of-stream."
(read stream nil))
(defun read-line-from-stream (i... |
ba98ae445513a1790c9238a9a47d61ccb3001ac424649525890e1b4895ec8e3c | chrra/htiled | Xml.hs | {-# LANGUAGE OverloadedStrings #-}
module Data.Tiled.Test.Xml where
import Data.ByteString.Lazy.Char8 as BS
import Data.Char
import Data.String
import qualified Prelude
import Prelude hiding (show)
import Text.XML.Generator
import Text.XML.HXT.Core
import ... | null | https://raw.githubusercontent.com/chrra/htiled/bc93b7c508a571edf73f952559ff2b903df4bc56/tests/Data/Tiled/Test/Xml.hs | haskell | # LANGUAGE OverloadedStrings # |
module Data.Tiled.Test.Xml where
import Data.ByteString.Lazy.Char8 as BS
import Data.Char
import Data.String
import qualified Prelude
import Prelude hiding (show)
import Text.XML.Generator
import Text.XML.HXT.Core
import Data.Tiled.Load
import ... |
bacc18ba312b132c4ac070c6580d1ca7d3d860421826dcd11cbdbd6b6ecc6376 | aryx/xix | sha1.mli | (*s: version_control/sha1.mli *)
(*s: type [[Sha1.t]] *)
a 20 bytes number ( really a string of length 20 )
type t = bytes
(*e: type [[Sha1.t]] *)
s : signature [ [ Sha1.sha1 ] ]
computes of a series of bytes
val sha1: bytes -> t
e : signature [ [ Sha1.sha1 ] ]
(*s: signature [[Sha1.read]] *)
val read: IO.input ... | null | https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/version_control/sha1.mli | ocaml | s: version_control/sha1.mli
s: type [[Sha1.t]]
e: type [[Sha1.t]]
s: signature [[Sha1.read]]
e: signature [[Sha1.read]]
s: signature [[Sha1.write]]
e: signature [[Sha1.write]]
s: signature [[Sha1.is_sha]]
e: signature [[Sha1.is_sha]]
e: version_control/sha1.mli | a 20 bytes number ( really a string of length 20 )
type t = bytes
s : signature [ [ Sha1.sha1 ] ]
computes of a series of bytes
val sha1: bytes -> t
e : signature [ [ Sha1.sha1 ] ]
val read: IO.input -> t
val write: 'a IO.output -> t -> unit
val is_sha: t -> bool
|
101a8668791fd2ea64dea84c83d657efe6efa6cb2da39b2f2f315e6096a5f85e | hasktorch/hasktorch | Device.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
... | null | https://raw.githubusercontent.com/hasktorch/hasktorch/9560d149b06af17e2d4e73d1e116afd2b0baff86/hasktorch/src/Torch/Typed/Device.hs | haskell | # LANGUAGE RankNTypes #
# OVERLAPS #
# OVERLAPS #
# OVERLAPS #
# OVERLAPS #
# OVERLAPS #
# OVERLAPPABLE #
= 'Just '( 'D.CUDA, 0)
= '[ '( 'D.CUDA, 0), '( 'D.CUDA, 1)]
class HasChunk chunks f gs | chunks f -> gs where
class GHasChunk
(f :: Type -> Type)
(gs :: [Type]) | chunks f -> gs where
class GZipChunks... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
#... |
95379f24ee70229954eb7bf63123b5b77c8bf8c553a55418bff859f437ebd1bd | davidlazar/ocaml-semantics | let08.ml | let y = 10 in let y = 12 and f x = x + y in 22 - f y
| null | https://raw.githubusercontent.com/davidlazar/ocaml-semantics/6f302c6b9cced0407d501d70ad25c2d2aefbb77d/tests/unit/let08.ml | ocaml | let y = 10 in let y = 12 and f x = x + y in 22 - f y
| |
9268b435e5af44e611065c83096e23e826fcb8d52a9744c279968a05441829be | Chris00/ocaml-docker | ps.ml | open Printf
module C = Docker.Container
let () =
Common.install_image "alpine" ~tag:"latest";
let cmd = ["sleep"; "0.3"] in
let c = C.create "alpine:latest" ~name:"waiting_container" cmd in
printf "Created container id: %s\n%!" c;
(try C.start c
with Docker.Failure(_, m) -> printf "Docker.Container.start:... | null | https://raw.githubusercontent.com/Chris00/ocaml-docker/ec5a4c430085f7956e5c41ea3c28567846fab335/test/ps.ml | ocaml | open Printf
module C = Docker.Container
let () =
Common.install_image "alpine" ~tag:"latest";
let cmd = ["sleep"; "0.3"] in
let c = C.create "alpine:latest" ~name:"waiting_container" cmd in
printf "Created container id: %s\n%!" c;
(try C.start c
with Docker.Failure(_, m) -> printf "Docker.Container.start:... | |
a554c3969f0df0d238ba5cf170f737729f6884b7e38a9058a77e11c4b94230a6 | Bodigrim/chimera | WheelMapping.hs | -- |
-- Module: Data.Chimera.WheelMapping
Copyright : ( c ) 2017
Licence : MIT
Maintainer : < >
--
-- Helpers for mapping to < rough numbers>
-- and back. This has various applications in number theory.
--
-- __Example__
--
-- Let @isPrime@ be an expensive predicate,
-- which checks whether it... | null | https://raw.githubusercontent.com/Bodigrim/chimera/11e00b1096f01c59d627c8c7f2b7f1db883df8bd/Data/Chimera/WheelMapping.hs | haskell | |
Module: Data.Chimera.WheelMapping
Helpers for mapping to < rough numbers>
and back. This has various applications in number theory.
__Example__
Let @isPrime@ be an expensive predicate,
which checks whether its argument is a prime number.
We can memoize it as usual:
>
> isPrime1 :: Word -> Bool
it... | Copyright : ( c ) 2017
Licence : MIT
Maintainer : < >
> isPrimeCache1 : : UChimera Bool
> isPrimeCache1 = tabulate isPrime
> isPrime1 = index isPrimeCache1
But one may argue that since the only even prime number is 2 ,
So we can save half the space by it for odd
> | n = = 2 = Tr... |
e7af703eb3dc24c3c7ec39fce233c7bd19339e53935c053e0abbc24b845203a1 | liquidz/antq | shadow_test.clj | (ns antq.upgrade.shadow-test
(:require
[antq.dep.shadow :as dep.shadow]
[antq.record :as r]
[antq.test-helper :as h]
[antq.upgrade :as upgrade]
[antq.upgrade.shadow]
[clojure.java.io :as io]
[clojure.test :as t]))
(def ^:private dummy-java-dep
(r/map->Dependency {:project :shadow-cljs
... | null | https://raw.githubusercontent.com/liquidz/antq/4b7eba8128f421d1741c7f266cf6154272e17df1/test/antq/upgrade/shadow_test.clj | clojure | (ns antq.upgrade.shadow-test
(:require
[antq.dep.shadow :as dep.shadow]
[antq.record :as r]
[antq.test-helper :as h]
[antq.upgrade :as upgrade]
[antq.upgrade.shadow]
[clojure.java.io :as io]
[clojure.test :as t]))
(def ^:private dummy-java-dep
(r/map->Dependency {:project :shadow-cljs
... | |
ff0727daa286954e64e16ab61df9ff296afac3f31575b7999750dcd957537fba | alanzplus/EOPL | env-data-structure.rkt | #lang eopl
(define empty-env
(lambda () (list 'empty-env)))
(define extend-env
(lambda (val var env)
(list 'extend-env val var env)))
(define apply-env
(lambda (env var)
(cond
((eqv? (car env) 'empty-env)
(eopl:error "No bindg for ~s" var))
((eqv? (car env) 'extend-env)
(let ... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch2/env-data-structure.rkt | racket | #lang eopl
(define empty-env
(lambda () (list 'empty-env)))
(define extend-env
(lambda (val var env)
(list 'extend-env val var env)))
(define apply-env
(lambda (env var)
(cond
((eqv? (car env) 'empty-env)
(eopl:error "No bindg for ~s" var))
((eqv? (car env) 'extend-env)
(let ... | |
01860c0273148fc010bb1a14ecd6bbefae7f8c7fcd9bbac55e0dec6ffa65e0be | a9032676/Codewars-Haskell | Foldmap.hs | module Foldmap where
import Data.Foldable (foldMap, Foldable)
import Data.Monoid
import Data.List
myToList :: Foldable t => t a -> [a]
myToList = foldMap (:[])
myMinimum :: (Ord a, Foldable t) => t a -> Maybe a
myMinimum ta = case sort $ foldMap (:[]) ta of
[] -... | null | https://raw.githubusercontent.com/a9032676/Codewars-Haskell/6eccd81e9b6ae31b5c0a28ecc16b933f3abae1a5/src/Foldmap.hs | haskell | module Foldmap where
import Data.Foldable (foldMap, Foldable)
import Data.Monoid
import Data.List
myToList :: Foldable t => t a -> [a]
myToList = foldMap (:[])
myMinimum :: (Ord a, Foldable t) => t a -> Maybe a
myMinimum ta = case sort $ foldMap (:[]) ta of
[] -... | |
d82585d67e06abfc5a0a822fa2f1cb7690af10969be42b354a71dc81080f30a4 | RedPRL/algaett | Token.ml | [@@@warning "-39"] (* the preprocessor sometimes generates useless 'rec' *)
open Earley_core
open KeywordClass
let keyword = Earley.alternatives [AsciiToken.keyword; EmojiToken.keyword]
let name = Earley.alternatives [AsciiToken.name; EmojiToken.name]
let pos_num = Earley.alternatives [AsciiToken.pos_num; EmojiToken... | null | https://raw.githubusercontent.com/RedPRL/algaett/513e0cdb04a2a72fa7bd079bbe3f5c9b2e5d55e8/src/parser/Token.ml | ocaml | the preprocessor sometimes generates useless 'rec' |
open Earley_core
open KeywordClass
let keyword = Earley.alternatives [AsciiToken.keyword; EmojiToken.keyword]
let name = Earley.alternatives [AsciiToken.name; EmojiToken.name]
let pos_num = Earley.alternatives [AsciiToken.pos_num; EmojiToken.pos_num]
let num = Earley.alternatives [AsciiToken.num; EmojiToken.num]
ty... |
36a33929b2a53f1dac72ce46bed551be99124f018258354dabf201ca73ce83fd | jordanthayer/ocaml-search | astar_est.ml | (**
A* search algorithm that estimates progress
*)
type fp_values = {
g : float;
h : float;
f : float;
d : float;
}
type int_values = {
depth : int;
generated: int;
mutable pos : int;
}
type 'a node = {
Data Payload
fpv : fp_values;
iv : int_values;
}
let wrap f =
(** takes a function to b... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/progress_estimate/astar_est.ml | ocaml | *
A* search algorithm that estimates progress
* takes a function to be applied to the data payload
such as the goal-test or the domain heuristic and
wraps it so that it can be applied to the entire
node
* Unwraps a solution which is in the form of a search node and presents
it in the format... |
type fp_values = {
g : float;
h : float;
f : float;
d : float;
}
type int_values = {
depth : int;
generated: int;
mutable pos : int;
}
type 'a node = {
Data Payload
fpv : fp_values;
iv : int_values;
}
let wrap f =
(fun n -> f n.data)
let unwrap_sol s =
match s with
| Limit.Nothing -> ... |
94ebce10ed68bd8333ca88b308eb14c86603675d40c00199ba1640c13030adaa | brownplt/LambdaS5 | builder.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/lib/ocamlgraph/builder.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
$ I d :... |
69b9641d7b3791bca50ea3b22261509a720b12f7a72c4b0219a88a4330b6977c | magnusjonsson/opti | simplify.ml | open Expr
let smart_neg e
=
match e with
| Expr_const c -> Expr_const (-. c)
| Expr_unop(Unop_neg, e1) -> e1
| _ -> Expr_unop(Unop_neg, e)
let smart_mul e1 e2
=
match e1, e2 with
| Expr_const 0.0, _ -> Expr_const 0.0
| _, Expr_const 0.0 -> Expr_const 0.0
| Expr_const 1.0, _ -> e2
| _, Expr_c... | null | https://raw.githubusercontent.com/magnusjonsson/opti/dffb7b86b81c8059276b038313ddd88d2e9ff67e/lib/simplify.ml | ocaml | open Expr
let smart_neg e
=
match e with
| Expr_const c -> Expr_const (-. c)
| Expr_unop(Unop_neg, e1) -> e1
| _ -> Expr_unop(Unop_neg, e)
let smart_mul e1 e2
=
match e1, e2 with
| Expr_const 0.0, _ -> Expr_const 0.0
| _, Expr_const 0.0 -> Expr_const 0.0
| Expr_const 1.0, _ -> e2
| _, Expr_c... | |
296bd4e367f4332475bdd592b551127564f5d399a87cfa44c7bc5f5b712e5638 | archimag/mongo-cl-driver | suite.lisp | ;;;; suite.lisp
;;;;
;;;; This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL.
;;;; See file COPYING for details.
;;;;
Author : < >
(defpackage #:mongo-cl-driver.test
(:use #:cl #:iter #:lift #:alexandria
#:mongo-cl-driver.bson
#:mongo-cl-driver.wire
#:mongo-cl-dri... | null | https://raw.githubusercontent.com/archimag/mongo-cl-driver/300c10bd3d0b3ca3a82c8b32087bddbc7b6a86c3/t/suite.lisp | lisp | suite.lisp
This file is part of the MONGO-CL-DRIVER library, released under Lisp-LGPL.
See file COPYING for details.
| Author : < >
(defpackage #:mongo-cl-driver.test
(:use #:cl #:iter #:lift #:alexandria
#:mongo-cl-driver.bson
#:mongo-cl-driver.wire
#:mongo-cl-driver.sugar)
(:export #:run-mongo-cl-driver-tests))
(in-package #:mongo-cl-driver.test)
(deftestsuite mogno-cl-driver-test () ())
(defun ru... |
9b07d23d36c47376f1fe5aa7fa46a5d100e35b900cd52a6b6ef075d45d1db4aa | infinisil/on-demand-minecraft | State.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE GADTs #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module State where
import Connection
import DigitalOcean
import Config
import Text.Read
import Polysemy
import Polysemy.Async
import Polysemy.Error
... | null | https://raw.githubusercontent.com/infinisil/on-demand-minecraft/303367d49057eed7a4a8889fe5232394934b3923/lib/State.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE GADTs #
TODO: Failed state? | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module State where
import Connection
import DigitalOcean
import Config
import Text.Read
import Polysemy
import Polysemy.Async
import Polysemy.Error
import Polysemy.Trace
import Polysemy.Reader
import... |
aeafa985b4a79f795a89db249d20b7be2a930ef08bd32561007c546baf99b09f | johnwickerson/memalloy | value.ml |
MIT License
Copyright ( c ) 2017 by and .
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 , modi... | null | https://raw.githubusercontent.com/johnwickerson/memalloy/aa15776873fe3440cb7f5dae8e174466689d4fba/src/value.ml | ocaml | * Represents a value in memory |
MIT License
Copyright ( c ) 2017 by and .
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 , modi... |
dc509f9d37a4f9ce706f0c36938d931ddae7df75b458857bea47c78f4be12dff | janestreet/bonsai | main.ml | open Core
open Bonsai_web
open Bonsai.Let_syntax
module Attribute = struct
module T = struct
type t =
| Name
| Department
| Office
[@@deriving sexp, compare, enumerate]
end
include T
include Sexpable.To_stringable (T)
include Comparable.Make (T)
let name_singular = "attribute"
... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/multi_select/main.ml | ocaml | open Core
open Bonsai_web
open Bonsai.Let_syntax
module Attribute = struct
module T = struct
type t =
| Name
| Department
| Office
[@@deriving sexp, compare, enumerate]
end
include T
include Sexpable.To_stringable (T)
include Comparable.Make (T)
let name_singular = "attribute"
... | |
7142f18440fa25fe8cc5828f2acd3b42fac32fa7ef5ec89ada9afad91eb046a8 | BranchTaken/Hemlock | test_rel.ml | open! Basis.Rudiments
open! Basis
open U16
let pp_x x formatter =
formatter |> fmt ~alt:true ~zpad:true ~width:4L ~radix:Radix.Hex ~pretty:true x
let test () =
let fn x y formatter = begin
let f_cmp cmp_s x y cmp formatter = begin
formatter |> Fmt.fmt cmp_s |> Fmt.fmt " " |> pp_x x |> Fmt.fmt " " |> pp_... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u16/test_rel.ml | ocaml | open! Basis.Rudiments
open! Basis
open U16
let pp_x x formatter =
formatter |> fmt ~alt:true ~zpad:true ~width:4L ~radix:Radix.Hex ~pretty:true x
let test () =
let fn x y formatter = begin
let f_cmp cmp_s x y cmp formatter = begin
formatter |> Fmt.fmt cmp_s |> Fmt.fmt " " |> pp_x x |> Fmt.fmt " " |> pp_... | |
2e6200255112cfc57222eee2e36f2f43befd824f1110ef39b12e9aa81e76cdcb | k-bx/protocol-buffers | list_people_haskell.hs | module Main where
import Control.Monad(when)
import qualified Data.ByteString.Lazy as L(readFile)
import qualified Data.Foldable as F(forM_)
import System.Environment(getArgs,getProgName)
import qualified Data.ByteString.Lazy.UTF8 as U(toString)
import qualified System.IO.UTF8 as U(putStrLn)
import Text.ProtocolBuffe... | null | https://raw.githubusercontent.com/k-bx/protocol-buffers/89425795ac2d560c5d690714e7d206ba9f97aff2/examples/list_people_haskell.hs | haskell | module Main where
import Control.Monad(when)
import qualified Data.ByteString.Lazy as L(readFile)
import qualified Data.Foldable as F(forM_)
import System.Environment(getArgs,getProgName)
import qualified Data.ByteString.Lazy.UTF8 as U(toString)
import qualified System.IO.UTF8 as U(putStrLn)
import Text.ProtocolBuffe... | |
e360387348dee3461a78c13d2050035fbc91320f2678f1dfb0f441bda455e286 | andersfugmann/aws-s3 | aws_s3.ml | module S3 = S3
module Types = Types
module Credentials = Credentials
module Region = Region
module Authorization = Authorization
| null | https://raw.githubusercontent.com/andersfugmann/aws-s3/84af629119e313ba46cf3eab9dd7b914e6bae5e9/aws-s3/aws_s3.ml | ocaml | module S3 = S3
module Types = Types
module Credentials = Credentials
module Region = Region
module Authorization = Authorization
| |
45bf33974f58aa7a79de388c998906730778f677180b9c6dc1f28ad5b2220015 | 2600hz/kazoo | kzt_receiver.erl | %%%-----------------------------------------------------------------------------
( C ) 2012 - 2020 , 2600Hz
%%% @doc Receive call events for various scenarios
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
fi... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_translator/src/kzt_receiver.erl | erlang | -----------------------------------------------------------------------------
@doc Receive call events for various scenarios
@end
----------------------------------------------------------------------------- | ( C ) 2012 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kzt_receiver).
-include("kzt.hrl").
-export([wait_for_offnet/1, wait_for_offnet/2
,w... |
32c633ab273497664ff551ce1b0fb360afdabbb9d4926552171f2df47fa7e7fd | kayceesrk/httpaf | method.ml | ----------------------------------------------------------------------------
Copyright ( c ) 2016 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... | null | https://raw.githubusercontent.com/kayceesrk/httpaf/791593e0f576a54a6eb37534abde2df60a8370e8/lib/method.ml | ocaml | ----------------------------------------------------------------------------
Copyright ( c ) 2016 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... | |
9393176e6aa52845cc17aed96384dd12c4f3e7754b1ef8472ae155cac9ae91e4 | spurious/sagittarius-scheme-mirror | closure-cache.scm | (library (closure-cache)
(export *bar* *bar2*)
(import (core))
(define (foo-proc) #t)
(define foo-proc2
(let ((free #f))
(lambda () (set! free #t) free)))
(define *bar* (list foo-proc))
(define *bar2* (list foo-proc2))
)
| null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/lib/closure-cache.scm | scheme | (library (closure-cache)
(export *bar* *bar2*)
(import (core))
(define (foo-proc) #t)
(define foo-proc2
(let ((free #f))
(lambda () (set! free #t) free)))
(define *bar* (list foo-proc))
(define *bar2* (list foo-proc2))
)
| |
97182605c7162ee77a3d2380385116cbd0f7852456f1e8b82226401ebcf0bc62 | racket/htdp | print-width.rkt | #lang racket/base
;; this parameter is used by the global port
;; print handler in the #lang htdp/* languages
;; in order to have a default that works better,
;; but to still give the opportunity to change it
;; in situations when that's needed.
(define htdp-print-columns (make-parameter 'infinity))
(provide htdp-prin... | null | https://raw.githubusercontent.com/racket/htdp/aa78794fa1788358d6abd11dad54b3c9f4f5a80b/htdp-lib/htdp/bsl/print-width.rkt | racket | this parameter is used by the global port
print handler in the #lang htdp/* languages
in order to have a default that works better,
but to still give the opportunity to change it
in situations when that's needed. | #lang racket/base
(define htdp-print-columns (make-parameter 'infinity))
(provide htdp-print-columns) |
e06ad231c005bbb971c8e0ee66356c67fe7cb38b4b7c7b81fbbf81f64b61e270 | robert-strandh/Acclimation | oven-temperature.lisp | (cl:in-package #:acclimation-temperature)
(defclass oven-temperature ()
((%decimal-count
:initform 0 :initarg :decimal-count :accessor decimal-count)))
(defclass oven-temperature-celsius (oven-temperature)
())
(defclass oven-temperature-fahrenheit (oven-temperature)
())
(defgeneric format-oven-temperature... | null | https://raw.githubusercontent.com/robert-strandh/Acclimation/8b4418c5760a377b5e82d821658b7fd7ac494fb1/Temperature/oven-temperature.lisp | lisp | (cl:in-package #:acclimation-temperature)
(defclass oven-temperature ()
((%decimal-count
:initform 0 :initarg :decimal-count :accessor decimal-count)))
(defclass oven-temperature-celsius (oven-temperature)
())
(defclass oven-temperature-fahrenheit (oven-temperature)
())
(defgeneric format-oven-temperature... | |
af3ba3e3cdbb3e9325908d1c74324ad3b77336d9d74905087df15db97387543b | GaloisInc/renovate | BSS.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
-- | This module contains the code that fixes up the .bss for our rewritten binaries
module Renovate.BinaryFormat.ELF.BSS (
expandBSS
) where
impo... | null | https://raw.githubusercontent.com/GaloisInc/renovate/89b82366f84be894c3437852e39c9b4e28666a37/renovate/src/Renovate/BinaryFormat/ELF/BSS.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| This module contains the code that fixes up the .bss for our rewritten binaries
Since the data is known, it doesn't need to be explicitly present in the
binary, saving space. Normally, the kernel maps and initializes the .bss for
us. Unfo... | # LANGUAGE FlexibleContexts #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module Renovate.BinaryFormat.ELF.BSS (
expandBSS
) where
import qualified Control.Lens as L
import Control.Monad ( unless )
import qualified Control.Monad.State.Strict as S
import qualified Data.ByteString as B
import qual... |
6fe1e3fb2ab7140109731a670e37c47a7b9666a8d39761c758295305d43d8b1b | tweag/ormolu | newlines-between-methods-out.hs | instance (Num a) => Num (Diff a) where
D u dudx + D v dvdx = D (u + v) (dudx + dvdx)
D u dudx - D v dvdx = D (u - v) (dudx - dvdx)
D u dudx * D v dvdx = D (u * v) (u * dvdx + v * dudx)
-- Comment before definition
negate (D u dudx) = D (-u) (-dudx)
negate (Z u dudx) = undefined
-- Comment after definiti... | null | https://raw.githubusercontent.com/tweag/ormolu/a4a9f4500b6c25f104cfbde82d9c16c6875b6d1e/data/examples/declaration/instance/newlines-between-methods-out.hs | haskell | Comment before definition
Comment after definition
Separator
Comment between unrelated definitions | instance (Num a) => Num (Diff a) where
D u dudx + D v dvdx = D (u + v) (dudx + dvdx)
D u dudx - D v dvdx = D (u - v) (dudx - dvdx)
D u dudx * D v dvdx = D (u * v) (u * dvdx + v * dudx)
negate (D u dudx) = D (-u) (-dudx)
negate (Z u dudx) = undefined
abs (D u _) = D (abs u) (signum u)
signum (D u _) = ... |
aec1c65a68f1435c104b046052ec84d8288b4ba858c3413fd3583aba885bdd65 | motoshira/lib_for_competitive_programming | bidirectional-link-list.lisp | ;;;
BOF
;;;
;;; 双方向連結リスト
TODO
;;; - 非破壊な操作(できる?)
;;; - nth
;;; - マクロでコードを短くする
;;; - テスト
;;; - inline
(defpackage #:bidirectional-linked-list
(:use #:cl)
(:nicknames #:blist)
(:shadow #:first
#:last)
(:export #:make-blist
#:first
#:last
#:dump
#:get-si... | null | https://raw.githubusercontent.com/motoshira/lib_for_competitive_programming/e7d466918ef52affa24cb5b19304dc7985eee6f1/src/bidirectional-link-list.lisp | lisp |
双方向連結リスト
- 非破壊な操作(できる?)
- nth
- マクロでコードを短くする
- テスト
- inline
| BOF
TODO
(defpackage #:bidirectional-linked-list
(:use #:cl)
(:nicknames #:blist)
(:shadow #:first
#:last)
(:export #:make-blist
#:first
#:last
#:dump
#:get-size
#:empty-p
#:pop-front
#:pop-back
#:push-front... |
dcc59189719e93beee1ab80b330c0c1bd9d53b9365c9cac1110612ccd88675e9 | takikawa/racket-ppa | codesign.rkt | #lang racket/base
(require racket/cmdline
compiler/private/mach-o)
(define remove? #f)
(define file
(command-line
#:once-each
[("--remove-signature") "Remove signature"
(set! remove? #t)]
[("-s") identity "Add ad hoc-signature"
(unless (equal? identity "-")
... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/5f2031309f6359c61a8dfd1fec0b77bbf9fb78df/src/mac/codesign.rkt | racket | #lang racket/base
(require racket/cmdline
compiler/private/mach-o)
(define remove? #f)
(define file
(command-line
#:once-each
[("--remove-signature") "Remove signature"
(set! remove? #t)]
[("-s") identity "Add ad hoc-signature"
(unless (equal? identity "-")
... | |
672305696e654217a215ae9de6ff3e6afc8dbd617c7432633ca68aebb512e6b1 | aloiscochard/git-sanity | Sanity.hs | {-# LANGUAGE Rank2Types #-}
module Git.Sanity where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Data.ByteString.Char8 (ByteString)
import Data.Machine
import Safe
import System.Exit (ExitCode)
import System.IO.Machine (IODataMode(..), byLine)
import System.Process (CreateProces... | null | https://raw.githubusercontent.com/aloiscochard/git-sanity/02e4dd1f6a04590cf2263d3cce01f8fea9c7a963/src/Git/Sanity.hs | haskell | # LANGUAGE Rank2Types #
parents ` command output and return a stream of commit parents hashes | module Git.Sanity where
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class
import Data.ByteString.Char8 (ByteString)
import Data.Machine
import Safe
import System.Exit (ExitCode)
import System.IO.Machine (IODataMode(..), byLine)
import System.Process (CreateProcess(..), StdStream(CreatePipe)... |
f325f38cc2742d89aaddb557ac65ae38e6cce92c81b0e5b0288d0fb6b48c1d4d | rizo/snowflake-os | selection.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/asmcomp/ia64/selection.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2000 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 Misc
open Cmm
open Reg
o... |
014ac3343d9e76aef846c9c7f75ec82cc049c76914a336d265437951a043fedc | kuis-isle3sw/IoPLMaterials | mySet.mli | type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
val singleton : 'a -> 'a t
val from_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val insert : 'a -> 'a t -> 'a t
val union : 'a t -> 'a t -> 'a t
val remove : 'a -> 'a t -> 'a t
val diff : 'a t -> 'a t -> 'a t
val member : 'a -> 'a t -> bool
val map : ('a... | null | https://raw.githubusercontent.com/kuis-isle3sw/IoPLMaterials/fa328e92fdaaf6986394f832ef689689930647cd/misc/miniml-compiler/mySet.mli | ocaml | type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
val singleton : 'a -> 'a t
val from_list : 'a list -> 'a t
val to_list : 'a t -> 'a list
val insert : 'a -> 'a t -> 'a t
val union : 'a t -> 'a t -> 'a t
val remove : 'a -> 'a t -> 'a t
val diff : 'a t -> 'a t -> 'a t
val member : 'a -> 'a t -> bool
val map : ('a... | |
fdacfba0987f1c69bb0e5751e8e4f94d498c658f60df88b2db4c9629b07ef19d | pgj/mirage-kfreebsd | filename.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-stdlib/src/filename.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 GNU Library General Public License , with
$ I d : filename.mli 10957 2011 - 02 ... |
5982086704bcb24ab441f1c80851cf049461f1601dd152a28092b913c8dade74 | pa-ba/compdata | Arbitrary.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeOperators #
{-# LANGUAGE TypeSynonymInstances #-}
--------------------------------------------------------------------------------
-- |
-- Module : Data.Comp.Arbitrary
Copyright ... | null | https://raw.githubusercontent.com/pa-ba/compdata/5783d0e11129097e045cabba61643114b154e3f2/src/Data/Comp/Arbitrary.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeSynonymInstances #
------------------------------------------------------------------------------
|
Module : Data.Comp.Arbitrary
License : BSD3
Stability : experimental
This module defines generation of arbitrary valu... | # LANGUAGE FlexibleInstances #
# LANGUAGE TypeOperators #
Copyright : ( c ) 2011
Maintainer : < >
Portability : non - portable ( GHC Extensions )
module Data.Comp.Arbitrary
( ArbitraryF(..)
)where
import Data.Comp.Derive
import Data.Comp.Derive.Utils
import Data.Comp.Ops
impo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.