_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 |
|---|---|---|---|---|---|---|---|---|
b3764c729bdeb42840a07be0a82f6218a5a001fa769c38c45a05ca8eaf17bc22 | plundering/plunder-reference | Print.hs | --
-- # :TODO: Handling Printer Edge-Cases
--
-- Applying the following transformations will ensure that printed
-- output always maintains the same tree structure as the given rex node,
-- though we will deviate from the given formatting style in cases
-- where the input cannot be printed as specified.
--
-- - ... | null | https://raw.githubusercontent.com/plundering/plunder-reference/4cac3717ed5baf7b0b5fd41837a504f6fd33eab2/lib/Rex/Print.hs | haskell |
# :TODO: Handling Printer Edge-Cases
Applying the following transformations will ensure that printed
output always maintains the same tree structure as the given rex node,
though we will deviate from the given formatting style in cases
where the input cannot be printed as specified.
- :TODO: Write a tr... | but we can coerce it to ` ( THIC_CORD Nothing ) . The very
# OPTIONS_GHC -Wall #
# OPTIONS_GHC -Werror #
module Rex.Print
( RexColorScheme(..)
, RexColor
, blocksFile
, rexFile
, rexFileBuilder
, rexLine
, rexLineBuilder
)
where
import PlunderPrelude
import Rex.Types
impor... |
0f2c811aca23065e14ca0d26897fd24314dff6d9b565346f2e1136bcbb0ef3ea | CmdrDats/clj-minecraft | blocks.clj | (ns cljminecraft.blocks
(:require [cljminecraft.logging :as log]
[cljminecraft.items :as i]
[cljminecraft.player :as plr]
[cljminecraft.bukkit :as bk]))
(defn left-face [key]
({:up :up, :down :down
:north :east, :east :south
:south :west, :west :north} key))
(defn right... | null | https://raw.githubusercontent.com/CmdrDats/clj-minecraft/d69a1453e6b3cbb2c08b6a2ba554520a0265c43d/src/cljminecraft/blocks.clj | clojure | If we're negative, do the opposite thing.
to be finished......
(material :air) | (ns cljminecraft.blocks
(:require [cljminecraft.logging :as log]
[cljminecraft.items :as i]
[cljminecraft.player :as plr]
[cljminecraft.bukkit :as bk]))
(defn left-face [key]
({:up :up, :down :down
:north :east, :east :south
:south :west, :west :north} key))
(defn right... |
3e6ae7e5115943de76c4d2fc2113b8ac165b4eb368b0e4156524b9b9af8c0a9e | camllight/camllight | fnat.ml | nat : fonctions auxiliaires et d impression pour le type .
Derive de nats.ml de Caml V3.1 , .
Adapte a Caml Light par Xavier Leroy & .
Portage 64 bits : .
Derive de nats.ml de Caml V3.1, Valerie Menissier.
Adapte a Caml Light par Xavier Leroy & Pierre Weis.
Portage 64 bits: Pierre Weis.... | null | https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/windows/src/lib/fnat.ml | ocaml | Nat temporaries
Sizes of words and strings.
ceiling len / 2
Repeat until
next_cand := rad
next_cand <- next_cand / cand
next_cand (poids fort) <- next_cand (poids fort) + cand,
i.e. next_cand <- cand + rad / cand
next_cand <- next_cand / 2
cand <- next_cand
Power_base_max is used
chec... | nat : fonctions auxiliaires et d impression pour le type .
Derive de nats.ml de Caml V3.1 , .
Adapte a Caml Light par Xavier Leroy & .
Portage 64 bits : .
Derive de nats.ml de Caml V3.1, Valerie Menissier.
Adapte a Caml Light par Xavier Leroy & Pierre Weis.
Portage 64 bits: Pierre Weis.... |
93c741415b6334ab2db2488a3820678baf660ec807df1aadb4698d4022bc7da1 | cloudkj/lambda-ml | binary_tree_test.clj | (ns lambda-ml.data.binary-tree-test
(:require [clojure.test :refer :all]
[lambda-ml.data.binary-tree :refer :all]))
(deftest test-binary-tree-leaf
(let [tree (make-tree 42)]
(is (= (get-value tree) 42))
(is (nil? (get-left tree)))
(is (nil? (get-right tree)))
(is (leaf? tree))))
(defte... | null | https://raw.githubusercontent.com/cloudkj/lambda-ml/a470a375d2b94f5e5e623a5e198ac312b018ffb3/test/lambda_ml/data/binary_tree_test.clj | clojure | (ns lambda-ml.data.binary-tree-test
(:require [clojure.test :refer :all]
[lambda-ml.data.binary-tree :refer :all]))
(deftest test-binary-tree-leaf
(let [tree (make-tree 42)]
(is (= (get-value tree) 42))
(is (nil? (get-left tree)))
(is (nil? (get-right tree)))
(is (leaf? tree))))
(defte... | |
2611376c891722c00f5ada8962b0494d129ef6605dac07857fac7f91dcaab949 | foreverbell/project-euler-solutions | 63.hs |
count base = length $ filter (\(a, b) -> nLength a == b) $ takeWhile (\(a, b) -> nLength a >= b) can where
can = [ (base^i, i) | i <- [1 .. ] ]
nLength = length . show
main = print $ 1 + sum [ count i | i <- [2 .. 9] ]
| null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/63.hs | haskell |
count base = length $ filter (\(a, b) -> nLength a == b) $ takeWhile (\(a, b) -> nLength a >= b) can where
can = [ (base^i, i) | i <- [1 .. ] ]
nLength = length . show
main = print $ 1 + sum [ count i | i <- [2 .. 9] ]
| |
57bae4120d6da8c91ccddf26e186f2d18bec3962d4b80e94884ff13b114256d5 | backtracking/functory | map_fold.ml | (**************************************************************************)
(* *)
(* Functory: a distributed computing library for OCaml *)
Copyright ( C ) 2010- and
(* ... | null | https://raw.githubusercontent.com/backtracking/functory/75368305a853a90ebea9e306d82e4ef32649d1ce/map_fold.ml | ocaml | ************************************************************************
Functory: a distributed computing library for OCaml
This software is free soft... | Copyright ( C ) 2010- and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
type ('a, 'b) map_or_fold =
| Map of 'a
| Fold of 'b
let map_fold_wrapper map fold = function
| Map x -> Map (map x)
| Fold ... |
e4b1d00712c1d63ae40c867a78636062c2a87fc57a42784a535041fc630474ae | orbitz/oort | irc_handlers.erl | -module(irc_handlers).
-export([handle_whois/4, handle_connect/4, handle_join/4]).
-include("irc.hrl").
%% Whois
handle_whois(_Sock, _Client, State, {_, "RPL_WHOISUSER", Args}) ->
State#irc_command{state={whois, [{user, Args}]}};
handle_whois(_Sock, _Client, #irc_command{state={whois, Info}} = State, {_, "RPL_WH... | null | https://raw.githubusercontent.com/orbitz/oort/a61ec85508917ae9a3f6672a0b708d47c23bb260/src/irc_handlers.erl | erlang | Whois
Some servers suppor this (like freenode)
I do nt ' think we need teh ARgs stuff
Connecting
Explicilty want to kill everything
For this, we want to ignore anything else until we are ready
Joining | -module(irc_handlers).
-export([handle_whois/4, handle_connect/4, handle_join/4]).
-include("irc.hrl").
handle_whois(_Sock, _Client, State, {_, "RPL_WHOISUSER", Args}) ->
State#irc_command{state={whois, [{user, Args}]}};
handle_whois(_Sock, _Client, #irc_command{state={whois, Info}} = State, {_, "RPL_WHOISSERVER... |
5d33c11cfb63e4395b576c5acde74ccc9c01fffd0a548fe3213d13f0dae354bd | mpickering/apply-refact | Default28.hs | yes = foo $ \(a, b) -> (a, y + b)
| null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default28.hs | haskell | yes = foo $ \(a, b) -> (a, y + b)
| |
ae937d3f3344bb38f72bff8ba55e7d1e7f28e1a4a3363b8f97dee83f06287082 | marigold-dev/chusai | state.ml | MIT License
Copyright ( c ) 2022 Marigold < >
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
u... | null | https://raw.githubusercontent.com/marigold-dev/chusai/09f798c585121d3b02bf3fed0f52f15c3bdc79a1/layer2/bin/node/state.ml | ocaml | Recompute inboxes at each level | MIT License
Copyright ( c ) 2022 Marigold < >
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
u... |
03955597b0b62d29b17086b7f3c4082ca90e52eccce3f68eb71d2ee96a507c77 | jaredly/reason-language-server | includecore.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/includecore.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Typedtree
open Types
exception Dont_match
type type_mismatch =
Arity
| Privacy
| Kind
|... |
ad1858d3a2d1b7880c074f9fad763c5300ad10f050444bea9b2809d2b6ecadbf | ocaml/merlin | field.ml | type t = { foo : int }
let f t = t.foo
let foo () = 3
let f t = t.foo
module X = struct
type t = { bar : int; baz : bool }
end
let bar = 123
let baz = true
let y = { X.bar ; baz }
| null | https://raw.githubusercontent.com/ocaml/merlin/e576bc75f11323ec8489d2e58a701264f5a7fe0e/tests/test-dirs/locate/context-detection/cd-field.t/field.ml | ocaml | type t = { foo : int }
let f t = t.foo
let foo () = 3
let f t = t.foo
module X = struct
type t = { bar : int; baz : bool }
end
let bar = 123
let baz = true
let y = { X.bar ; baz }
| |
90912121a3192c8b0884700c10f3ac23141a98e01ff09bcff7dc35227e845ed7 | higherkindness/mu-haskell | ProtoBuf.hs | # language CPP #
# language DataKinds #
{-# language DeriveAnyClass #-}
# language DeriveGeneric #
{-# language DerivingVia #-}
# language EmptyCase #
# language FlexibleInstances #
# language MultiParamTypeClasses #
# language OverloadedString... | null | https://raw.githubusercontent.com/higherkindness/mu-haskell/6a5ae74d07d2b2183ccbacf2846983928a5547f6/adapter/protobuf/test/ProtoBuf.hs | haskell | # language DeriveAnyClass #
# language DerivingVia #
# language ScopedTypeVariables #
Obtain the filenames
Read the file produced by Python
Encode a couple of values | # language CPP #
# language DataKinds #
# language DeriveGeneric #
# language EmptyCase #
# language FlexibleInstances #
# language MultiParamTypeClasses #
# language OverloadedStrings #
# language TemplateHaskell #
# language TypeApplications ... |
efde8e295aea5189424c14a1c3b2752bfbac54a33a11a7030c1868c68d758204 | GaloisInc/saw-script | Coq.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
|
Module : Verifier . SAW.Translation . Coq
Copyright : Galois , Inc. 2018
License : :
Stability : experimental
Portability : portable
Module : Verifier.SAW.Translation.Coq
Copyright : Ga... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/9acd534ab65dcc38132675bb412db63a41745932/saw-core-coq/src/Verifier/SAW/Translation/Coq.hs | haskell | # LANGUAGE OverloadedStrings #
import Debug.Trace
showFTermF = show . Unshared . FTermF
mkCoqIdent :: String -> String -> Ident
traceFTermF :: String -> FlatTermF Term -> a -> a
traceFTermF ctx tf = traceTerm ctx (Unshared $ FTermF tf)
traceTerm :: String -> Term -> a -> a
traceTerm ctx t a = trace (ctx ++ ": " ++ ... | # LANGUAGE NamedFieldPuns #
# LANGUAGE QuasiQuotes #
|
Module : Verifier . SAW.Translation . Coq
Copyright : Galois , Inc. 2018
License : :
Stability : experimental
Portability : portable
Module : Verifier.SAW.Translation.Coq
Copyright : Galois, Inc. 2018
License : BSD3
... |
09506d184c8047c66a45148c1236b868e5698fb5158334d27b2d7c99e5c10da3 | argp/bap | cfgDataflow.ml | Dataflow for CFGs
module D = Debug.Make(struct let name = "CfgDataflow" and default = `NoDebug end)
open D
open GraphDataflow
module type CFG =
sig
type exp
type stmt
type lang = stmt list
module G : sig
type t
module V : Graph.Sig.COMPARABLE
module E : Graph.Sig.EDGE with type vertex = V.t and ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/cfgDataflow.ml | ocaml | Dataflow for CFGs
module D = Debug.Make(struct let name = "CfgDataflow" and default = `NoDebug end)
open D
open GraphDataflow
module type CFG =
sig
type exp
type stmt
type lang = stmt list
module G : sig
type t
module V : Graph.Sig.COMPARABLE
module E : Graph.Sig.EDGE with type vertex = V.t and ... | |
7baba83a9472d659eeaffd901049eaf8c0537a97d4e099d8145d31f820645253 | NorfairKing/smos | Entry.hs | {-# LANGUAGE OverloadedStrings #-}
module Smos.Actions.Entry
( allEntryPlainActions,
allEntryUsingCharActions,
entrySelectWhole,
entrySelectHeaderAtStart,
entrySelectHeaderAtEnd,
entrySelectContentsAtStart,
entrySelectContentsAtEnd,
entrySelectProperties,
entrySelectTimestamps,
en... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos/src/Smos/Actions/Entry.hs | haskell | # LANGUAGE OverloadedStrings # |
module Smos.Actions.Entry
( allEntryPlainActions,
allEntryUsingCharActions,
entrySelectWhole,
entrySelectHeaderAtStart,
entrySelectHeaderAtEnd,
entrySelectContentsAtStart,
entrySelectContentsAtEnd,
entrySelectProperties,
entrySelectTimestamps,
entrySelectStateHistory,
entrySel... |
35acd372f027b95c3ccaa3aa371cd9db66adf7ea485cbe5b537b946e86388acd | jackfirth/rebellion | persistent-red-black-tree.rkt | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[persistent-red-black-tree? predicate/c]
[in-persistent-red-black-tree
(->* (persistent-red-black-tree?) (#:descending? boolean?) (sequence/c entry?))]
[in-persistent-red-black-tree-keys
(->* (persistent-red-black-tree?) (#:descend... | null | https://raw.githubusercontent.com/jackfirth/rebellion/206ced365b07d1c6da5dcbe93f892fbb9bd7ba72/collection/private/persistent-red-black-tree.rkt | racket | @----------------------------------------------------------------------------------------------------
We use constants for the red/black color enum instead of define-enum-type to avoid unnecessary
instead of using the symbols directly so that typos are compile-time errors.
To implement deletion, we allow the tree to... | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[persistent-red-black-tree? predicate/c]
[in-persistent-red-black-tree
(->* (persistent-red-black-tree?) (#:descending? boolean?) (sequence/c entry?))]
[in-persistent-red-black-tree-keys
(->* (persistent-red-black-tree?) (#:descend... |
4c3dcdd85bc786f3383258dbc32f7015327bc9202ff399d46e161fca4cbeeadc | kowainik/hit-on | Status.hs | |
Module : Hit . Git . Status
Copyright : ( c ) 2019 - 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
Data types that describe model of the @git diff@ command to ... | null | https://raw.githubusercontent.com/kowainik/hit-on/c6b3fc764a8b6cc69542e935a0715985fe72eba6/src/Hit/Git/Status.hs | haskell | | Enum that represents all possible types of file modifications.
| Output of the @git diff --name-status@ command.
^ file name
^ type of the changed file
| Output of the @git diff --stat@ command.
^ file name
^ number of changed lines
^ + and - stats
stat CHANGELOG.md
stat CHANGELOG.md
it should always be ... | |
Module : Hit . Git . Status
Copyright : ( c ) 2019 - 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
Data types that describe model of the @git diff@ command to ... |
df9daec6d99af5f6ec2d6e28a019a13f96509fca7fcffda69e8f787f2dc56cf8 | tcsprojects/pgsolver | paritygame.ml | open Basics;;
open Tcsbasedata;;
open Tcsarray;;
open Tcsset;;
open Tcslist;;
open Tcsgraph;;
open Pgprofiling ; ;
(**************************************************************
* nodes in a parity game *
**************************************************************)
ty... | null | https://raw.githubusercontent.com/tcsprojects/pgsolver/b0c31a8b367c405baed961385ad645d52f648325/src/paritygame/paritygame.ml | ocaml | *************************************************************
* nodes in a parity game *
*************************************************************
*************************************************************
* access functions for nodes in set-like data structures for *
* su... | open Basics;;
open Tcsbasedata;;
open Tcsarray;;
open Tcsset;;
open Tcslist;;
open Tcsgraph;;
open Pgprofiling ; ;
type node = int
let nd_undef = -1
let nd_make v = v
let nd_reveal v = v
let nd_show = string_of_int
let ns_nodeCompare = compare
type nodeset = node TreeSet.t
let ns_isEmpty = TreeSet.is... |
ea670d72532f8c791ddee756a51df68d6ab72ef7d33545e5a400f6ab3c5cb836 | gregr/racket-misc | microkanren.rkt | #lang racket/base
; variant of: -2013/papers/HemannMuKanren2013.pdf
(provide
==
call/var
let/vars
conj
conj-seq
disj
muk-choices
muk-conj-conc
muk-conj-seq
muk-constraint
muk-cost-goal
muk-disj
muk-evaluator
muk-evaluator-dls
muk-fail
muk-failure
muk-goal
muk-mzero
muk-pause
muk-... | null | https://raw.githubusercontent.com/gregr/racket-misc/0a5c9d4875288795e209d06982b82848c989d08b/microkanren.rkt | racket | variant of: -2013/papers/HemannMuKanren2013.pdf | #lang racket/base
(provide
==
call/var
let/vars
conj
conj-seq
disj
muk-choices
muk-conj-conc
muk-conj-seq
muk-constraint
muk-cost-goal
muk-disj
muk-evaluator
muk-evaluator-dls
muk-fail
muk-failure
muk-goal
muk-mzero
muk-pause
muk-reify-term
muk-state-constraints
muk-state-con... |
bdbba83c94a9b27a937c01bf1a072b818c46e72dfd5880af2b04648dd9c9cbe8 | FranklinChen/hugs98-plus-Sep2006 | System.hs | module System (
ExitCode(ExitSuccess,ExitFailure),
getArgs, getProgName, getEnv, system, exitWith, exitFailure
) where
import System.Exit
import System.Environment
import System.Cmd
| null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/haskell98/System.hs | haskell | module System (
ExitCode(ExitSuccess,ExitFailure),
getArgs, getProgName, getEnv, system, exitWith, exitFailure
) where
import System.Exit
import System.Environment
import System.Cmd
| |
c7f814c563907f8d688c081951dc55f2984bd731db30f3e85a5e5b80f9b86c2b | sondresl/AdventOfCode | Day22.hs | module Day22 where
import Data.Foldable (toList)
import Data.List.Extra (splitOn)
import Data.Sequence (Seq (..), (|>))
import qualified Data.Sequence as Seq
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Tuple.Extra (both)
import Lib (tuple)
score :: Foldable t => t Int -> Int
score = sum . zipWi... | null | https://raw.githubusercontent.com/sondresl/AdventOfCode/51525441795417f31b3eb67a690aa5534d1e699b/2020/Haskell/src/Day22.hs | haskell | module Day22 where
import Data.Foldable (toList)
import Data.List.Extra (splitOn)
import Data.Sequence (Seq (..), (|>))
import qualified Data.Sequence as Seq
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Tuple.Extra (both)
import Lib (tuple)
score :: Foldable t => t Int -> Int
score = sum . zipWi... | |
ed9bf94ec7d39da1580e2709e93a22e9e10eb6d57d227f0ce96dc15951c65585 | Frama-C/Qed | export_whycore.mli | (**************************************************************************)
(* *)
This file is part of Qed Library
(* *)
Copyright ( ... | null | https://raw.githubusercontent.com/Frama-C/Qed/69fa79d9ede7a76f320c935405267a97c660814e/src/export_whycore.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Qed Library
Copyright ( C ) 2007 - 2016
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ver... |
ea920035d0a302c17889164c1b38ec61d340d253252515f86a4f652764ba7149 | discus-lang/ddc | Parser.hs | {-# OPTIONS_HADDOCK hide #-}
| Parser for DDC build spec files .
module DDC.Build.Spec.Parser
( parseBuildSpec
, Error(..) )
where
import DDC.Build.Spec.Base
import Data.List
import Data.Char
import Data.Maybe
import DDC.Data.Pretty as P
import qualified DDC.Core.Module as C
... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-build/DDC/Build/Spec/Parser.hs | haskell | # OPTIONS_HADDOCK hide #
-------------------------------------------------------------------------------------------------
| Problems that can arise when parsing a build spec file.
| Empty Spec file.
| Required field is missing.
----------------------------------------------------------------------------------------... | | Parser for DDC build spec files .
module DDC.Build.Spec.Parser
( parseBuildSpec
, Error(..) )
where
import DDC.Build.Spec.Base
import Data.List
import Data.Char
import Data.Maybe
import DDC.Data.Pretty as P
import qualified DDC.Core.Module as C
data Error
= ErrorEmp... |
7700eca0c9c6aed6ad55ac68bd08e1e7b9deff6c317faccf0fd4b98350a01598 | footprintanalytics/footprint-web | permissions.clj | (ns metabase.query-processor.middleware.permissions
"Middleware for checking that the current user has permissions to run the current query."
(:require [clojure.set :as set]
[clojure.tools.logging :as log]
[metabase.api.common :refer [*current-user-id* *current-user-permissions-set*]]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/query_processor/middleware/permissions.clj | clojure | throw an Exception if they are. Otherwise returns a keyword explaining why the check wasn't done,
check perms for any Cards referenced by this query (if it is a native query)
+----------------------------------------------------------------------------------------------------------------+
+-------------------------... | (ns metabase.query-processor.middleware.permissions
"Middleware for checking that the current user has permissions to run the current query."
(:require [clojure.set :as set]
[clojure.tools.logging :as log]
[metabase.api.common :refer [*current-user-id* *current-user-permissions-set*]]
... |
af4b06457c8466e3cc21a1b8eb29e66dc6c11616c5d9fbe1a95cf82fc35ddf9c | haskell-haskey/haskey | File.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
-- | O... | null | https://raw.githubusercontent.com/haskell-haskey/haskey/299f070fcb0d287404d78399f903cecf7ad48cdd/src/Database/Haskey/Store/File.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
| On-disk storage back-end. Can be used as a storage back-end for the
append-only page allocator (see "Data.BTree.Alloc").
* Storage
* Binary encoding
* Exceptions
------------------------------------------------------------------------------
| Encode a page padd... | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
module Database.Haskey.Store.File (
Page(..)
, FileStoreConfig(... |
745047e6bcd5f1d23c8fdafa87c3f18f5b57958cb013ba6b2891da0364cd0171 | jacekschae/learn-reitit-course-files | user.clj | (ns user
(:require [integrant.repl :as ig-repl]
[integrant.core :as ig]
[integrant.repl.state :as state]
[cheffy.server]
[next.jdbc :as jdbc]
[next.jdbc.sql :as sql]))
(ig-repl/set-prep!
(fn [] (-> "resources/config.edn" slurp ig/read-string)))
(def go i... | null | https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/17-list-all-recipes-refactor/dev/src/user.clj | clojure | (ns user
(:require [integrant.repl :as ig-repl]
[integrant.core :as ig]
[integrant.repl.state :as state]
[cheffy.server]
[next.jdbc :as jdbc]
[next.jdbc.sql :as sql]))
(ig-repl/set-prep!
(fn [] (-> "resources/config.edn" slurp ig/read-string)))
(def go i... | |
31c173d1ffb9a0b9680d6e2628a24c85a321deca92c495859a75aa569f1f1d77 | acl2/acl2 | parse-yul-file@useless-runes.lsp | (YUL::PARSE-YUL-FILE)
(YUL::PARSE-YUL-FILEX)
(YUL::BLOCK-RESULTP-OF-PARSE-YUL-FILEX.YUL-PROG
(13 3 (:REWRITE FTY::RESERRP-WHEN-RESERR-OPTIONP))
(8 1 (:REWRITE YUL::BLOCK-RESULTP-WHEN-RESERRP))
(8 1 (:REWRITE YUL::BLOCK-RESULTP-WHEN-BLOCKP))
(7 2 (:REWRITE FTY::RESERR-OPTIONP-WHEN-RESERRP))
(5 5 (:TYPE-PRESCRIPTION... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/yul/test/language/.sys/parse-yul-file%40useless-runes.lsp | lisp | (YUL::PARSE-YUL-FILE)
(YUL::PARSE-YUL-FILEX)
(YUL::BLOCK-RESULTP-OF-PARSE-YUL-FILEX.YUL-PROG
(13 3 (:REWRITE FTY::RESERRP-WHEN-RESERR-OPTIONP))
(8 1 (:REWRITE YUL::BLOCK-RESULTP-WHEN-RESERRP))
(8 1 (:REWRITE YUL::BLOCK-RESULTP-WHEN-BLOCKP))
(7 2 (:REWRITE FTY::RESERR-OPTIONP-WHEN-RESERRP))
(5 5 (:TYPE-PRESCRIPTION... | |
39d0a9365a8d74f612400cae21e776540c79de66aa74451fdb2c2a6fd61f99c1 | ocaml-flambda/ocaml-jst | flambda_to_clambda.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/7e5a626e4b4e12f1e9106564e1baba4d0ef6309a/middle_end/flambda/flambda_to_clambda.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-4-9-30-40-41-42"]
module V = Backend_var
modu... |
e290decf3d4e93395277cc0f30925ca5b2d25d00704ab23945e28ec57ac7eb1b | yesodweb/persistent | EmbedSpec.hs | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #... | null | https://raw.githubusercontent.com/yesodweb/persistent/eaf9d561a66a7b7a8fcbdf6bd0e9800fa525cc13/persistent/test/Database/Persist/TH/EmbedSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE QuasiQuotes #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LA... |
4a17f5f8e49523a5d2e39da9c29a6fa04280ddbbb5aae5801e40f6337b6e8abf | Kappa-Dev/KappaTools | largeArray.ml | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/dataStructures/largeArray.ml | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
type 'a t = Unary of 'a array | Binary of 'a array array
5
let max_array_size2 =
if float_of_int max_array_size1 > sqrt (float_of_int (max_int))
then max_int
else max_array_size1 * max_array_size1
let euclideen p q = (p / q, p m... |
038e08f0cb61f6c21068aed2ff24bf9e02a8a1b1d2eb979e0f4b0bbc65b69395 | jakemcc/test-refresh | project.clj | (defproject com.jakemccrary/lein-test-refresh #=(eval (read-string (slurp "../version.edn")))
:description "Leiningen plugin for automatically reload code and run clojure.test tests when files change"
:url "-test-refresh"
:developer "Jake McCrary"
:min-lein-version "2.4"
:license {:name "Eclipse Public Licens... | null | https://raw.githubusercontent.com/jakemcc/test-refresh/e793522793c40485fcaacd8c9d9af667c967fc97/lein-test-refresh/project.clj | clojure | (defproject com.jakemccrary/lein-test-refresh #=(eval (read-string (slurp "../version.edn")))
:description "Leiningen plugin for automatically reload code and run clojure.test tests when files change"
:url "-test-refresh"
:developer "Jake McCrary"
:min-lein-version "2.4"
:license {:name "Eclipse Public Licens... | |
5af99da3e5d516c3ef3014fcfdb23fe8a0dfc77e7d5d012deb78012d0da6a2e0 | duelinmarkers/guestbook-clj | servlet.clj | (ns guestbook.servlet
(:gen-class
:extends javax.servlet.http.HttpServlet)
(:use
compojure.http
compojure.html)
(:require
[guestbook.greetings :as greetings]
[guestbook.clj-exercise :as clj-exercise]
[appengine-clj.users :as users]))
(defn show-guestbook [{:keys [user user-service]... | null | https://raw.githubusercontent.com/duelinmarkers/guestbook-clj/d5f64ea5e9868199c32eaa94375bca5ae79070f2/src/guestbook/servlet.clj | clojure | (ns guestbook.servlet
(:gen-class
:extends javax.servlet.http.HttpServlet)
(:use
compojure.http
compojure.html)
(:require
[guestbook.greetings :as greetings]
[guestbook.clj-exercise :as clj-exercise]
[appengine-clj.users :as users]))
(defn show-guestbook [{:keys [user user-service]... | |
05fb98e3b4bce44094a6d46a865c9af079616e329a882df278344ac2cc7e0bf3 | pkel/cpr | resultSyntax.mli | (* applicative *)
val ( let+ ) : ('a, 'c) result -> ('a -> 'b) -> ('b, 'c) result
val ( and+ ) : ('a, 'c) result -> ('b, 'c) result -> ('a * 'b, 'c) result
(* monad *)
val ( let* ) : ('a, 'c) result -> ('a -> ('b, 'c) result) -> ('b, 'c) result
val ( and* ) : ('a, 'c) result -> ('b, 'c) result -> ('a * 'b, 'c) result
| null | https://raw.githubusercontent.com/pkel/cpr/f552ada6297069de73bb7403adf3df0c65e7d5c5/simulator/lib/resultSyntax.mli | ocaml | applicative
monad | val ( let+ ) : ('a, 'c) result -> ('a -> 'b) -> ('b, 'c) result
val ( and+ ) : ('a, 'c) result -> ('b, 'c) result -> ('a * 'b, 'c) result
val ( let* ) : ('a, 'c) result -> ('a -> ('b, 'c) result) -> ('b, 'c) result
val ( and* ) : ('a, 'c) result -> ('b, 'c) result -> ('a * 'b, 'c) result
|
5ff7438ef17e4f75bdf5a55674239aa489f0c1857b2fccdfc5b7eedc778243eb | Bogdanp/racket-forms | run-all-tests.rkt | #lang racket/base
(require rackunit
rackunit/text-ui)
(require "formlet-tests.rkt"
"form-tests.rkt"
"widget-tests.rkt")
(define all-tests
(test-suite
"forms-lib"
formlet-tests
form-tests
widget-tests))
(module+ main
(run-tests all-tests))
| null | https://raw.githubusercontent.com/Bogdanp/racket-forms/80e6dee1184ab4c435678bb3c45fa11bfabf56ee/forms-test/tests/forms/run-all-tests.rkt | racket | #lang racket/base
(require rackunit
rackunit/text-ui)
(require "formlet-tests.rkt"
"form-tests.rkt"
"widget-tests.rkt")
(define all-tests
(test-suite
"forms-lib"
formlet-tests
form-tests
widget-tests))
(module+ main
(run-tests all-tests))
| |
fbc9e417f8a5a0b54ad89d55bccea6c6e83765d24a3e1ef954f3ee8118741d14 | gafiatulin/codewars | MaxSequence.hs | -- Maximum subarray sum
/
module MaxSequence where
import Data.List (inits)
maxSequence :: [Int] -> Int
maxSequence [] = 0
maxSequence (x:xs) = if m < 0 then 0 else m
where m = max (maximum . map ((+x) . sum) . inits $ xs) (maxSequence xs)
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/5%20kyu/MaxSequence.hs | haskell | Maximum subarray sum | /
module MaxSequence where
import Data.List (inits)
maxSequence :: [Int] -> Int
maxSequence [] = 0
maxSequence (x:xs) = if m < 0 then 0 else m
where m = max (maximum . map ((+x) . sum) . inits $ xs) (maxSequence xs)
|
4f24b6002fe3d89371a1b7940e804828da01832da170ef0cb9323e102ba36ff6 | votinginfoproject/data-processor | boolean_test.clj | (ns vip.data-processor.validation.v5.boolean-test
(:require [clojure.test :refer :all]
[vip.data-processor.pipeline :as pipeline]
[vip.data-processor.db.postgres :as psql]
[vip.data-processor.validation.xml :refer :all]
[vip.data-processor.test-helpers :refer :all]... | null | https://raw.githubusercontent.com/votinginfoproject/data-processor/b4baf334b3a6219d12125af8e8c1e3de93ba1dc9/test/vip/data_processor/validation/v5/boolean_test.clj | clojure | (ns vip.data-processor.validation.v5.boolean-test
(:require [clojure.test :refer :all]
[vip.data-processor.pipeline :as pipeline]
[vip.data-processor.db.postgres :as psql]
[vip.data-processor.validation.xml :refer :all]
[vip.data-processor.test-helpers :refer :all]... | |
6ca2ff4b805bd8b1d18c5314a690e9d0cfe9dd6bc18a99d4a21985c42ef3211c | facebook/pyre-check | functionDefinition.mli |
* 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/pyre-check/10c375bea52db5d10b71cb5206fac7da9549eb0c/source/analysis/functionDefinition.mli | 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... | |
a772f43a880834ef12568e55411fb5affb7eb9b5de5cb09c209bf8d021ceb09e | acowley/CLUtil | Load.hs | # LANGUAGE ScopedTypeVariables #
| Utilities for loading OpenCL programs from source .
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
module CLUtil.Load
( OpenCLSource(..)
, CLBuildOption(..)
, loadProgramWOptions
, loadProgram
, loadProgramFastMath
, loadProgramFile
... | null | https://raw.githubusercontent.com/acowley/CLUtil/d57f05cb3419001b3079d4dfd738bf4538a115ce/src/CLUtil/Load.hs | haskell | # LANGUAGE TypeSynonymInstances #
| -------- Preprocessor Options ----------
| -D name=definition or -D name
`#define' directive. In particular, the definition will be truncated by embedded newline characters.
| -I dir
| Add the directory dir to the list of directories to be searched for header files.
| --------... | # LANGUAGE ScopedTypeVariables #
| Utilities for loading OpenCL programs from source .
# LANGUAGE FlexibleInstances #
module CLUtil.Load
( OpenCLSource(..)
, CLBuildOption(..)
, loadProgramWOptions
, loadProgram
, loadProgramFastMath
, loadProgramFile
, kernelFromSourceWOptions
, kerne... |
d75cc8bef24912a106ff3087df5fd82e6dedbf98f069ca1cf6f19b2d6adae5ed | lisp-polymorph/polymorph.access | polymorph.access.lisp | polymorph.access.lisp
(in-package #:polymorph.access)
;;; At
(define-polymorphic-function at (container &rest keys) :overwrite t
:documentation "Return the element of the container specified by the keys.")
(define-polymorphic-function (setf at) (new container &rest keys) :overwrite t
:documentation "Setf the e... | null | https://raw.githubusercontent.com/lisp-polymorph/polymorph.access/7c93d6a0c98fa497c24aea70759fefc4a539608f/src/polymorph.access.lisp | lisp | At
TODO Do I even need this?
Size
TODO Should emptyp use it? Maybe | polymorph.access.lisp
(in-package #:polymorph.access)
(define-polymorphic-function at (container &rest keys) :overwrite t
:documentation "Return the element of the container specified by the keys.")
(define-polymorphic-function (setf at) (new container &rest keys) :overwrite t
:documentation "Setf the element ... |
d5e00314c9463aab01b0619815867bccc9816c3452685b4fbd7e51fb4a02ff11 | chikeabuah/recess | tetris.rkt | #lang racket/base
(require recess)
Tetris
we can represent the Tetris well and the collision
;; structure as a 2D vector (of vectors)
;; the top level vector is vertical
;; the vectors it holds represent the horizontal rows
(define COLS 10)
(define ROWS 24)
Tetris component types
(struct color (r g b)
#:m... | null | https://raw.githubusercontent.com/chikeabuah/recess/d88e8474086dfdaf5af4ea6d12c4665f71dd78cc/examples/tetris/tetris.rkt | racket | structure as a 2D vector (of vectors)
the top level vector is vertical
the vectors it holds represent the horizontal rows
XXX Components
XXX Archetypes
XXX Events
XXX Systems
#:archetype ActiveTetromino
#:archetype Block
#:archetype ActiveTetromino
#:archetype ActiveTetromino
#:archetype ActiveTetromino
#:archet... | #lang racket/base
(require recess)
Tetris
we can represent the Tetris well and the collision
(define COLS 10)
(define ROWS 24)
Tetris component types
(struct color (r g b)
#:methods gen:component-prototype-generic
[(define (init-component component-prototype-generic)
(color 0 0 0))])
(struct posn ... |
7c6305f6c41896df1f4b8707d4fbea1a4f1613dafaa5e1b5106030e366d68259 | triffon/fp-2022-23 | 04-my-reverse.rkt | #lang racket
(define (my-reverse lst)
(if (null? lst)
'()
(append
(my-reverse (cdr lst))
(list (car lst)))))
;; (my-reverse '(1 2 3)) =
( append ( my - reverse ' ( 2 3 ) ) ' ( 1 ) ) =
( append ( append ( my - reverse ' ( 3 ) ) ' ( 2 ) ) ' ( 1 ) ) =
( append ( append ( append ' ( ) ... | null | https://raw.githubusercontent.com/triffon/fp-2022-23/11290d958efee803626cba4019581f0af86aab2f/exercises/inf2/04/04-my-reverse.rkt | racket | (my-reverse '(1 2 3)) =
(my-reverse-iter '(1 2 3)) =
(helper '(1 2 3) '()) = | #lang racket
(define (my-reverse lst)
(if (null? lst)
'()
(append
(my-reverse (cdr lst))
(list (car lst)))))
( append ( my - reverse ' ( 2 3 ) ) ' ( 1 ) ) =
( append ( append ( my - reverse ' ( 3 ) ) ' ( 2 ) ) ' ( 1 ) ) =
( append ( append ( append ' ( ) ' ( 3 ) ) ' ( 2 ) ) ' ( 1 )... |
8f0a03b6978925069c17875f721deabf36d1579caeb87ebe5a7d58b1d9eccb9e | holyjak/fulcro-intro-wshop | solutions_ws.cljs | (ns holyjak.fulcro-exercises.puzzles.solutions-ws
"Solutions to the puzzles - have a look to compare with
your solution or when you get stuck."
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[nubank.workspaces.core :as ws]
[nubank.workspaces.model :as wsm]
[nubank.workspaces... | null | https://raw.githubusercontent.com/holyjak/fulcro-intro-wshop/ef7512d8ebf814b5b8c9be5f770f57bbb630caac/src/holyjak/fulcro_exercises/puzzles/solutions_ws.cljs | clojure | ----------------------------------------------------------------------------------
NOTE: There is also `(m/toggle! <component this> :ui/red?)` so ideally
we would use that *inside* the component instead of the (transact! ...) call
but that is not allowed by the task's specification :-)
----------------... | (ns holyjak.fulcro-exercises.puzzles.solutions-ws
"Solutions to the puzzles - have a look to compare with
your solution or when you get stuck."
(:require
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[nubank.workspaces.core :as ws]
[nubank.workspaces.model :as wsm]
[nubank.workspaces... |
5f9f0183b80eca76a492654bcded07ef1f6dba45a5e249c6041b6ca89c137d66 | stonebuddha/eopl | syntax.ml | type program =
| AProgram of top_level list
and top_level =
| ValTop of string * expression
| FunTop of string * expression
and expression =
| ConstExp of int * Ploc.t
| DiffExp of expression * expression * Ploc.t
| IsZeroExp of expression * Ploc.t
| IfExp of expression * expression * expression * Ploc.... | null | https://raw.githubusercontent.com/stonebuddha/eopl/88ea636110421706f900e753c30240ff1ea26f67/MUTABLE-PAIRS-EXT/syntax.ml | ocaml | type program =
| AProgram of top_level list
and top_level =
| ValTop of string * expression
| FunTop of string * expression
and expression =
| ConstExp of int * Ploc.t
| DiffExp of expression * expression * Ploc.t
| IsZeroExp of expression * Ploc.t
| IfExp of expression * expression * expression * Ploc.... | |
e3bacb425a8353bae64b373b1f3140097f38ed1b15bc3fe652147303270dec06 | garrigue/lablgtk | signal_override.ml | (**************************************************************************)
Lablgtk - Examples
(* *)
(* This code is in the public domain. *)
(* You may f... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/examples/signal_override.ml | ocaml | ************************************************************************
This code is in the public domain.
You may freely copy parts of it in your application.
... | Lablgtk - Examples
module C = Gobject.Closure
let add_closure argv =
Printf.eprintf "invoking overridden ::add closure, %d args, " argv.C.nargs ;
let typ = C.get_type argv 1 in
Printf.eprintf "widget %s\n" (Gobject.Type.name typ) ;
flush stderr ;
GtkSig... |
9c303106050ad4641f6c8eb3034cffd2799f2901731e7e65a9a904c734bf24c1 | parapluu/Concuerror | readers_compare.erl | -module(readers_compare).
-export([scenarios/0,test/0]).
scenarios() ->
[{test, B, DPOR, BoundType} ||
B <- [0, 1, 2, 6],
DPOR <- [optimal, source, persistent],
BoundType <- [bpor, delay],
DPOR =/= optimal orelse BoundType =/= bpor
].
test() -> readers(3).
readers(N) ->
ets:new(tab, [public, ... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/bounding_tests/src/readers_compare.erl | erlang | -module(readers_compare).
-export([scenarios/0,test/0]).
scenarios() ->
[{test, B, DPOR, BoundType} ||
B <- [0, 1, 2, 6],
DPOR <- [optimal, source, persistent],
BoundType <- [bpor, delay],
DPOR =/= optimal orelse BoundType =/= bpor
].
test() -> readers(3).
readers(N) ->
ets:new(tab, [public, ... | |
93a80b6b3fd43558183becf350130099907f41ece8d816b2d96e790eb66e7c93 | ayato-p/mokuhan | parser.cljc | (ns org.panchromatic.mokuhan.parser
(:require [clojure.string :as str]
[fast-zip.core :as zip]
[instaparse.core :as insta]
[org.panchromatic.mokuhan.ast :as ast]
[org.panchromatic.mokuhan.util.misc :as misc]
[org.panchromatic.mokuhan.util.regex :as regex]
... | null | https://raw.githubusercontent.com/ayato-p/mokuhan/8f6de17b5c4a3712aa83ba4f37234de86f3c630b/src/org/panchromatic/mokuhan/parser.cljc | clojure | {{name}} -> variable
{{{name}}} -> unescaped variable
{{&name}} -> unescaped variable
{{#persone}} <-> {{/person}} -> section
false or empty list -> delete
non empty list -> repeat
lambda -> call function
non-false -> context
{{^name}} <-> {{/name}} -> inverted variable
{{! blah }} -> comment
{{> b... | (ns org.panchromatic.mokuhan.parser
(:require [clojure.string :as str]
[fast-zip.core :as zip]
[instaparse.core :as insta]
[org.panchromatic.mokuhan.ast :as ast]
[org.panchromatic.mokuhan.util.misc :as misc]
[org.panchromatic.mokuhan.util.regex :as regex]
... |
62127924b4c7ddb3a19ed0dfbfbfc3cd521fa1d23cf64e1b996d740d23fbff8a | xmonad/xmonad-extras | Brightness.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Util.Brightness
License : MIT
--
-- Stability : unstable
-- Portability : unportable
--
-- Module to control the brightness of the screen in linux en... | null | https://raw.githubusercontent.com/xmonad/xmonad-extras/d45b4cbfadbd8a6c2f0c062e5027a1c800b0e959/XMonad/Util/Brightness.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Util.Brightness
Stability : unstable
Portability : unportable
Module to control the brightness of the screen in linux environments
[@Requirements@]
This module assumes that the following files exists:
... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
License : MIT
[ @Permissions@ ]
* Create a group named xmonad
> $ sudo groupadd xmonad
* Add user root and your user name to the group xmonad .
* The files under _ _ \/sys _ _ are virtual . It 's a RAM based filesystem ... |
733b45e8a0c2199d4f4dc48eb225346e8a585a6e63ce6db58528ca7627da35c2 | bmeurer/ocamljit2 | parser_aux.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/debugger/parser_aux.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Objective Caml port by and
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 .
... |
17f11d31f02704b44fd12980dce2d6367a84bf0a2db3a44b8d8fdd0aa33c10c3 | parapluu/Concuerror | concuerror_callback.erl | @private
%%% @doc
%%% This module contains code for:
- managing and interfacing with processes under Concuerror
%%% - simulating built-in operations in instrumented processes
-module(concuerror_callback).
Interface to concuerror_inspect :
-export([instrumented/4]).
Interface to scheduler :
-export([spawn_firs... | null | https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/src/concuerror_callback.erl | erlang | @doc
This module contains code for:
- simulating built-in operations in instrumented processes
------------------------------------------------------------------------------
DEBUGGING SETTINGS
-define(DEBUG, true).
------------------------------------------------------------------------------
----------------------... | @private
- managing and interfacing with processes under Concuerror
-module(concuerror_callback).
Interface to concuerror_inspect :
-export([instrumented/4]).
Interface to scheduler :
-export([spawn_first_process/1, start_first_process/3,
deliver_message/3, wait_actor_reply/2, collect_deadlock_info/1... |
fc8cb86b907178371869a095766b8fe6e1de049c11c2670512ca5f6dc3090fee | mmontone/cl-rest-server | schemas.lisp | (in-package :rest-server-demo)
(define-schema user
(:object user
((:id :integer :documentation "The user id")
(:realname :string :documentation "The user realname"))))
| null | https://raw.githubusercontent.com/mmontone/cl-rest-server/cd3a08681a1c3215866fedcd36a6bc98d223d52d/demo/schemas.lisp | lisp | (in-package :rest-server-demo)
(define-schema user
(:object user
((:id :integer :documentation "The user id")
(:realname :string :documentation "The user realname"))))
| |
4dacbe3e7302b067c0a08ca37d1da608df9ec54b5be7c2a53c236b87fd07db9b | input-output-hk/hydra | ScriptData.hs | # OPTIONS_GHC -Wno - orphans #
module Hydra.Cardano.Api.ScriptData where
import Hydra.Cardano.Api.Prelude
import Cardano.Api.Byron (TxBody (..))
import qualified Cardano.Ledger.Alonzo.Data as Ledger
import qualified Cardano.Ledger.Alonzo.TxWitness as Ledger
import Codec.Serialise (deserialiseOrFail, serialise)
impor... | null | https://raw.githubusercontent.com/input-output-hk/hydra/b6371379ffc28994300ff8ba9e7c669a640d759c/hydra-cardano-api/src/Hydra/Cardano/Api/ScriptData.hs | haskell | * Extras
| Data-types that can be marshalled into a generic 'ScriptData' structure.
| Data-types that can be unmarshalled from a generic 'ScriptData' structure.
| Get the 'ScriptData' associated to the a 'TxOut'. Note that this requires
the 'CtxTx' context. To get script data in a 'CtxUTxO' context, see
'lookupSc... | # OPTIONS_GHC -Wno - orphans #
module Hydra.Cardano.Api.ScriptData where
import Hydra.Cardano.Api.Prelude
import Cardano.Api.Byron (TxBody (..))
import qualified Cardano.Ledger.Alonzo.Data as Ledger
import qualified Cardano.Ledger.Alonzo.TxWitness as Ledger
import Codec.Serialise (deserialiseOrFail, serialise)
impor... |
e76699fa092875f334cac7ebc719d4d1961e4276134cdb153e1eff6af8dec0fa | robert-strandh/SICL | define-modify-macro-defmacro.lisp | (cl:in-package #:sicl-data-and-control-flow)
(defmacro define-modify-macro
(name lambda-list function &optional documentation)
(let* ((canonicalized-lambda-list
(cleavir-code-utilities:canonicalize-define-modify-macro-lambda-list
lambda-list))
(required
(cleavir-code-ut... | null | https://raw.githubusercontent.com/robert-strandh/SICL/8ce134f4ed030502e38460591e8e61e8aa8269a7/Code/Data-and-control-flow/define-modify-macro-defmacro.lisp | lisp | (cl:in-package #:sicl-data-and-control-flow)
(defmacro define-modify-macro
(name lambda-list function &optional documentation)
(let* ((canonicalized-lambda-list
(cleavir-code-utilities:canonicalize-define-modify-macro-lambda-list
lambda-list))
(required
(cleavir-code-ut... | |
2c20dee22538eb87c83bcedefa82072697490a7fc9bab6ce6e1a39260769e28e | CoNarrative/precept | error.cljc | (ns precept.spec.error
(:require [clojure.spec.alpha :as s]))
(s/def ::unique-identity-conflict string?)
(s/def ::unique-value-conflict string?)
(s/def ::type #{:unique-conflict})
TODO . Should be Tuple but would cause circular dependency when this ns
; is used in util
(s/def ::existing-fact any?)
(s/def ::fai... | null | https://raw.githubusercontent.com/CoNarrative/precept/6078286cae641b924a2bffca4ecba19dcc304dde/src/cljc/precept/spec/error.cljc | clojure | is used in util | (ns precept.spec.error
(:require [clojure.spec.alpha :as s]))
(s/def ::unique-identity-conflict string?)
(s/def ::unique-value-conflict string?)
(s/def ::type #{:unique-conflict})
TODO . Should be Tuple but would cause circular dependency when this ns
(s/def ::existing-fact any?)
(s/def ::failed-insert any?)
|
b21f4bacb644108ad3000ae0e381720b310ebddc1a4fdd7489e3f6b13ab7b24f | lispbuilder/lispbuilder | fireworks.lisp | ;;;;; From Schaf5 at -neues-jahr/
(in-package #:sdl-examples)
(defparameter *width* 640)
(defparameter *height* 480)
(defun fireworks ()
(sdl:WITH-INIT ()
(sdl:WINDOW *width* *height*
:title-caption "Fireworks" :icon-caption "Fireworks")
(setf (sdl:frame-rate) 0)
(let ((world (make-worl... | null | https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/examples/fireworks.lisp | lisp | From Schaf5 at -neues-jahr/ |
(in-package #:sdl-examples)
(defparameter *width* 640)
(defparameter *height* 480)
(defun fireworks ()
(sdl:WITH-INIT ()
(sdl:WINDOW *width* *height*
:title-caption "Fireworks" :icon-caption "Fireworks")
(setf (sdl:frame-rate) 0)
(let ((world (make-world))
(100-frames-p (every-n-fram... |
7dd5049390fb2af4404b6c654d5e43e16fd590c520b072a082cbb34d00ae108d | opencog/benchmark | gene-list.scm |
Basic list of 681 genes
See also lmpd - genes for a list of 1482
(define gene-list (list "TSPAN6" "NDUFAF7" "RBM5" "SLC7A2" "NDUFAB1"
"DVL2" "SKAP2" "DHX33" "MSL3" "BZRAP1" "GTF2IRD1" "IL32" "RPS20" "SCMH1"
"CLCN6" "RNF14" "ATP2C1" "IGF1" "GLRX2" "FAS" "ATP6V0A1" "FBXO42" "JADE2"
"PREX2" "NOP16" "LMO3" "R3HDM1" "E... | null | https://raw.githubusercontent.com/opencog/benchmark/955ee433e847438c0695e4253e0f4b3107bbbec9/query-loop/gene-list.scm | scheme |
Basic list of 681 genes
See also lmpd - genes for a list of 1482
(define gene-list (list "TSPAN6" "NDUFAF7" "RBM5" "SLC7A2" "NDUFAB1"
"DVL2" "SKAP2" "DHX33" "MSL3" "BZRAP1" "GTF2IRD1" "IL32" "RPS20" "SCMH1"
"CLCN6" "RNF14" "ATP2C1" "IGF1" "GLRX2" "FAS" "ATP6V0A1" "FBXO42" "JADE2"
"PREX2" "NOP16" "LMO3" "R3HDM1" "E... | |
d8c6cd041225083685c924683510ba82b81fa26c01306e0a0674c763a4186e14 | samoht/camloo | bio.scm | * Copyright ( C ) 1994 - 2010 INRIA
;*
;* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; version 2 of the License .
;*
;* This program is distributed in the hope that it will be useful,
;* but W... | null | https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/runtime/Llib/bio.scm | scheme | *
* This program is free software; you can redistribute it and/or modify
version 2 of the License .
*
* 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 General Public L... | * Copyright ( C ) 1994 - 2010 INRIA
* it under the terms of the GNU General Public License as published by
(module __caml_bio
(extern (open_descriptor::obj (obj) "open_descriptor")
(flush::obj (obj) "flush")
(output_char::obj (obj obj) "output_char")
(output_... |
ae2a8e87f782f10f11aebea2e9e3dcb2cd66a2d02ebdcd4a2c04bd4c6b93531b | mikera/ironclad | test_gamefactory.clj | (ns ic.test.test-gamefactory
(:use clojure.test)
(:use [ic protocols engine units game gamefactory]))
(deftest t-factory
(let [g (make-game)]
(validate g)))
(defn test-game []
(let [g (new-game)]
(-> g
(assoc :terrain test-map)
(add-player
(player
{:side 0
:is-h... | null | https://raw.githubusercontent.com/mikera/ironclad/ef647bcd097eeaf45f058d43e9e5f53ce910b4b2/src/test/clojure/ic/test/test_gamefactory.clj | clojure | (ns ic.test.test-gamefactory
(:use clojure.test)
(:use [ic protocols engine units game gamefactory]))
(deftest t-factory
(let [g (make-game)]
(validate g)))
(defn test-game []
(let [g (new-game)]
(-> g
(assoc :terrain test-map)
(add-player
(player
{:side 0
:is-h... | |
60402d77165209d16af406a943c79fd9b65de98e3bbde5f35ba79a8543caf03f | esl/erlang-web | ewts_sup.erl | The contents of this file are subject to the Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
Erlang Web Public License along with this software . If not , it can be
%% retrieved via the world... | null | https://raw.githubusercontent.com/esl/erlang-web/2e5c2c9725465fc5b522250c305a9d553b3b8243/lib/ewts-1.0/src/ewts_sup.erl | erlang | compliance with the License. You should have received a copy of the
retrieved via the world wide web at -consulting.com/.
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 Erlang Web Public License ,
Version 1.0 , ( the " License " ) ; you may not use this file except in
Erlang Web Public License along with this software . If not , it can be
Software distributed under the License is distributed on an " AS IS "
The Initial Developer o... |
95721e1aab2494fe478ef3b979a494d6debf05a074d2b5b27642140c53f412d8 | dym/movitz | asm.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2007
;;;;
Description : Assembly syntax etc .
Author : < >
;;;; Distribution: See the accompanying file COPYING.
;;;;
$ I d : asm.lisp , v 1.18 2008 - 03 - 14 11:07:47 ffjeld Exp $... | null | https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/asm.lisp | lisp | ------------------------------------------------------------------
Distribution: See the accompanying file COPYING.
------------------------------------------------------------------
a label?
(warn "correcting ~S from ~D to ~D" instruction (cdr previous-definition) *pc*)
... | Copyright ( C ) 2007
Description : Assembly syntax etc .
Author : < >
$ I d : asm.lisp , v 1.18 2008 - 03 - 14 11:07:47 ffjeld Exp $
(defpackage asm
(:use :common-lisp)
(:export #:symbol-reference-p
#:symbol-reference
#:symbol-reference-symbol
#:immediate-p
#:immediate-... |
99108f1dacc0d0108300ccc1e6b99de731725dfb9a9df7d704c69846f5044cdb | viercc/kitchen-sink-hs | AutoLift.hs | {-# OPTIONS_GHC -Wno-unused-top-binds #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE QuantifiedConstraints #... | null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/5038b17a39e4e6f19e6fb4779a7c8aaddf64d922/autolift/AutoLift.hs | haskell | # OPTIONS_GHC -Wno-unused-top-binds #
# LANGUAGE RankNTypes #
* Automatic Show1 and Show2
| Injected dictionary of Show
Instance of `AdHoc s a` is defined using injected dictionary.
| Automatic Show1(liftShowsPrec)
| Automatic Show1(liftShowList)
| Automatic Show2(liftShowsPrec2)
| Automatic Show2(liftShowList... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE DefaultSignatures #
# LANGUAGE DeriveFunctor #
# LANGUAGE QuantifiedConstraints #
module AutoLift(
Reflected1(..),
Reflected2(..),
Show1(..),
... |
28dc3d101d9d6115710771fb0bfcf9738659f0ed704271d15ba5581288c09322 | chansey97/clprosette-miniKanren | list.rkt | #lang racket
(require "../../../rosette-bridge.rkt")
(require "../../../mk.rkt")
(require "../../../test-check.rkt")
(require "../../../logging.rkt")
;; (current-bitwidth 8)
( output - smt " ./ " )
(current-solver
(z3
#:path "C:/env/z3/z3-4.8.7/z3-4.8.7-x64-win/bin/z3.exe"
#:options (hash ':smt.rand... | null | https://raw.githubusercontent.com/chansey97/clprosette-miniKanren/d322f688312fa9481b22c2729018d383f493cb82/clprosette-miniKanren/tests/rosette/unsolvable/list.rkt | racket | (current-bitwidth 8)
default:2 in z3 - 4.8.7
in z3 - 4.8.12
List is an unsolvable type
As values of unsolvable types, symbolic pairs and lists cannot be created via define-symbolic[*].
-lang.org/rosette-guide/sec_pair.html
Note that unsolvable types doesn't mean that they cannot be synthesized,
| #lang racket
(require "../../../rosette-bridge.rkt")
(require "../../../mk.rkt")
(require "../../../test-check.rkt")
(require "../../../logging.rkt")
( output - smt " ./ " )
(current-solver
(z3
#:path "C:/env/z3/z3-4.8.7/z3-4.8.7-x64-win/bin/z3.exe"
#:options (hash ':smt.random_seed 1
' : smt.rand... |
6f529c53c96e1ce330ee9d072cd09e337f18a9ffcffa78113d1eb10bd06d3158 | scrintal/heroicons-reagent | chevron_up_down.cljs | (ns com.scrintal.heroicons.solid.chevron-up-down)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M11.47 4.72a.75.75 0 011.06 0l3.75 3.75a.75.75 0 01-1.06 1.06L12 6.31 8.78... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/chevron_up_down.cljs | clojure | (ns com.scrintal.heroicons.solid.chevron-up-down)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M11.47 4.72a.75.75 0 011.06 0l3.75 3.75a.75.75 0 01-1.06 1.06L12 6.31 8.78... | |
df81f54b8c9ce7e1706cc22e5e72f6fb8ab947033c2e174e1a962f2fed56092e | clash-lang/ghc-typelits-extra | Operations.hs | |
Copyright : ( C ) 2015 - 2016 , University of Twente ,
2017 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Copyright : (C) 2015-2016, University of Twente,
2017 , QBayLogic B.V.
License : BSD2 (see the file LICENSE)... | null | https://raw.githubusercontent.com/clash-lang/ghc-typelits-extra/dad655b3337f75cc017b4d381077e0ad5d39152c/src/GHC/TypeLits/Extra/Solver/Operations.hs | haskell | # LANGUAGE CPP #
external
| Indicates whether normalisation has occured
| A normalise result contains the ExtraOp and a flag that indicates whether any expression
| was normalised within the ExtraOp.
| \x y -> logBase x y, x > 1 && y > 0, logBase x y == ceiling (logBase x y) | |
Copyright : ( C ) 2015 - 2016 , University of Twente ,
2017 , QBayLogic B.V.
License : BSD2 ( see the file LICENSE )
Maintainer : < >
Copyright : (C) 2015-2016, University of Twente,
2017 , QBayLogic B.V.
License : BSD2 (see the file LICENSE)... |
f28e60123c1c727b89dfcaa9124ee446db0991ac3f48cc119909932009873754 | privet-kitty/cl-competitive | ford-fulkerson.lisp | (defpackage :cp/test/ford-fulkerson
(:use :cl :fiveam :cp/ford-fulkerson :cp/max-flow)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/ford-fulkerson)
(in-suite base-suite)
(test ford-fulkerson
(let ((graph (make-array 2 :element-type 'list :initial-element nil)))
(add-edge graph 0 1 10)
... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/test/ford-fulkerson.lisp | lisp | Example from -flow-problem-introduction/ | (defpackage :cp/test/ford-fulkerson
(:use :cl :fiveam :cp/ford-fulkerson :cp/max-flow)
(:import-from :cp/test/base #:base-suite))
(in-package :cp/test/ford-fulkerson)
(in-suite base-suite)
(test ford-fulkerson
(let ((graph (make-array 2 :element-type 'list :initial-element nil)))
(add-edge graph 0 1 10)
... |
4bdc206895d44e0dc2e63f251d2f8ef3dcc2184b39f6139653df3b4fab9df57d | Spin1Half/Advent-Of-Coalton-2022 | aoc4.lisp | (in-package :coalton-user)
(ql:quickload "cl-ppcre")
(coalton-toplevel
for part 1
(declare nested-interval-p (Integer -> Integer -> Integer -> Integer -> Boolean))
(define (nested-interval-p a b c d)
(OR (AND (<= a c) (>= b d))
(AND (>= a c) (<= b d))))
;;for part2
(declare overlap-p (Integ... | null | https://raw.githubusercontent.com/Spin1Half/Advent-Of-Coalton-2022/5568f02987c3d88d99ff364ff2f2df1f93c006f3/aoc4.lisp | lisp | for part2
(cl:print (cl:parse-integer a))
(cl:print (nested-interval-p 1 2 3 4)) | (in-package :coalton-user)
(ql:quickload "cl-ppcre")
(coalton-toplevel
for part 1
(declare nested-interval-p (Integer -> Integer -> Integer -> Integer -> Boolean))
(define (nested-interval-p a b c d)
(OR (AND (<= a c) (>= b d))
(AND (>= a c) (<= b d))))
(declare overlap-p (Integer -> Integer ... |
960376d4a9eb950ecd87a2f059c006d7dd355efb4d359329c58e661a748b0e63 | flodihn/NextGen | connsrv_app.erl | -module(connsrv_app).
-behaviour(application).
-export([
start/0,
start/2,
stop/1
]).
start() ->
application:start(connsrv).
start(_Type, StartArgs) ->
connsrv_sup:start_link(StartArgs).
stop(_State) ->
ok.
| null | https://raw.githubusercontent.com/flodihn/NextGen/3da1c3ee0d8f658383bdf5fccbdd49ace3cdb323/ConnectionServer/src/connsrv_app.erl | erlang | -module(connsrv_app).
-behaviour(application).
-export([
start/0,
start/2,
stop/1
]).
start() ->
application:start(connsrv).
start(_Type, StartArgs) ->
connsrv_sup:start_link(StartArgs).
stop(_State) ->
ok.
| |
f2211a6117ffe41faa69beb0a72eee3b4750eecdbee6d8fc0ceb8c1d6e302085 | semilin/layoup | zwou.lisp |
(MAKE-LAYOUT :NAME "zwou" :MATRIX
(APPLY #'KEY-MATRIX '("pldfkzwou," "nrthyvsaei" "qjmcgxb';."))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/zwou.lisp | lisp |
(MAKE-LAYOUT :NAME "zwou" :MATRIX
(APPLY #'KEY-MATRIX '("pldfkzwou," "nrthyvsaei" "qjmcgxb';."))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
b636560d519337e52ec32b4e34128c805782a1c4ede42b1f506c5c26f2c72f2a | korya/efuns | imager.mli | (***********************************************************************)
(* *)
(* GwML *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/gwml/imager.mli | ocaml | *********************************************************************
GwML
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
type image_id
type image = {
mutable image_id : image_id;
mutable w : int;
mutable h... |
00be43f168fbcbdf498693a7d6d894626577d84ecd244ef276cf69faf34b1f79 | kit-clj/kit | redis.clj | (ns kit.edge.cache.redis
(:require
[clojure.core.cache :as cache]
[integrant.core :as ig]
[kit.ig-utils :as ig-utils]
[taoensso.carmine :as carmine]))
in seconds , 60 hours
(declare inner-config)
(defmacro wcar*
[config & body]
`(carmine/wcar (inner-config ~config)
~@body))
... | null | https://raw.githubusercontent.com/kit-clj/kit/deee47e8ef67dfd7019fd98af25f5c9da6055705/libs/kit-redis/src/kit/edge/cache/redis.clj | clojure | (ns kit.edge.cache.redis
(:require
[clojure.core.cache :as cache]
[integrant.core :as ig]
[kit.ig-utils :as ig-utils]
[taoensso.carmine :as carmine]))
in seconds , 60 hours
(declare inner-config)
(defmacro wcar*
[config & body]
`(carmine/wcar (inner-config ~config)
~@body))
... | |
a1a8946ab095c09850471ac4fe4308c4a1444cf2d62fa3606c042c890da05372 | input-output-hk/cardano-ledger | Deposits.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Test.Cardano.Ledger.Shelley.Rules.Deposits (
tests,
)
where
import Test.C... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/1e2ff13f02a989241f637fd9413f1852675b74f0/eras/shelley/test-suite/src/Test/Cardano/Ledger/Shelley/Rules/Deposits.hs | haskell | # LANGUAGE ConstraintKinds #
| Tests that redundant Deposit information is consistent
| Check that deposits are always non-negative | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Test.Cardano.Ledger.Shelley.Rules.Deposits (
tests,
)
where
import Test.Cardano.Ledger.Shelley.Rules.TestC... |
d8cb01ce537c1a4f34408d3f87e69a557b2da665cd93bf682fadbc989c3dad43 | c-cube/ocaml-containers | CCNativeint.ml | (* This file is free software, part of containers. See file "license" for more details. *)
open CCShims_
include Nativeint
let min : t -> t -> t = Stdlib.min
let max : t -> t -> t = Stdlib.max
let hash x = Stdlib.abs (to_int x)
let sign i = compare i zero
let pow a b =
let rec aux acc = function
| 1n -> acc
... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/core/CCNativeint.ml | ocaml | This file is free software, part of containers. See file "license" for more details.
abstract printer |
open CCShims_
include Nativeint
let min : t -> t -> t = Stdlib.min
let max : t -> t -> t = Stdlib.max
let hash x = Stdlib.abs (to_int x)
let sign i = compare i zero
let pow a b =
let rec aux acc = function
| 1n -> acc
| n ->
if equal (rem n 2n) zero then
aux (mul acc acc) (div n 2n)
els... |
1a1b40a2eaa2b137040b57d6d280d541e6bd58ea91e8c464237abfa9b0f33f55 | AndrewMagerman/wizard-book-study | register-machine.rkt | #lang racket
Register machine for Chapter 5.2
;; Works in Dr. Racket
;; modifications vs book: needed to define a mutable pair for ins and adjust to mcons mcar and mcdr
(require rnrs/mutable-pairs-6)
(define (make-stack)
(let ((s '()))
(define (push x)
(set! s (cons x s)))
(define (pop)
(if (... | null | https://raw.githubusercontent.com/AndrewMagerman/wizard-book-study/36b5c7ed9ba2935279e17e1e0087b165ff71b193/missing_files/week_16/register-machine.rkt | racket | Works in Dr. Racket
modifications vs book: needed to define a mutable pair for ins and adjust to mcons mcar and mcdr
execution procedure for assign | #lang racket
Register machine for Chapter 5.2
(require rnrs/mutable-pairs-6)
(define (make-stack)
(let ((s '()))
(define (push x)
(set! s (cons x s)))
(define (pop)
(if (null? s)
(error "Empty stack -- POP")
(let ((top (car s)))
(set! s (cdr s))
top... |
6f764b0f5a4eaa13be5b59ad541e4135586c2fbaf6acc6afd76557295f6bbe33 | metosin/lomakkeet | reagent.cljs | (ns lomakkeet.reagent
(:refer-clojure :exclude [update time])
(:require [reagent.core :as r]
[reagent.ratom :as ratom :refer-macros [reaction]]
[lomakkeet.core :as l]
[komponentit.input :as input]
[komponentit.timepicker :refer [timepicker]]
[komponentit.d... | null | https://raw.githubusercontent.com/metosin/lomakkeet/80db30981bcadea219fea03c2ddf356d719cff7f/src/cljs/lomakkeet/reagent.cljs | clojure | Utilies
-project/reagent/issues/135
FORM GROUP ("bootstrap")
Custom inputs
FIXME: hack
HACK: if remove-cb is set, default functionality for emptying the input on backspace is not used
FIXME: hack
HACK: if remove-cb is set, default functionality for emptying the input on backspace is not used
BUILD | (ns lomakkeet.reagent
(:refer-clojure :exclude [update time])
(:require [reagent.core :as r]
[reagent.ratom :as ratom :refer-macros [reaction]]
[lomakkeet.core :as l]
[komponentit.input :as input]
[komponentit.timepicker :refer [timepicker]]
[komponentit.d... |
6567452769d4e6d29d4b3068520fee0654122d70d26dca44752c0cc6c3401e29 | nklein/grid-generators | package.lisp | package.lisp
(defpackage #:grid-generators
(:use #:cl #:list-types)
(:export #:make-grid-generator)
(:export #:taxicab-distance
#:make-taxicab-generator)
(:export #:make-lattice-generator)
(:documentation "This package provides functions useful for
generating the points in grids."))
| null | https://raw.githubusercontent.com/nklein/grid-generators/5f7b790c339123f84710d907ddafdb52c160d44e/src/package.lisp | lisp | package.lisp
(defpackage #:grid-generators
(:use #:cl #:list-types)
(:export #:make-grid-generator)
(:export #:taxicab-distance
#:make-taxicab-generator)
(:export #:make-lattice-generator)
(:documentation "This package provides functions useful for
generating the points in grids."))
| |
16d074e8ad3a98a0603d1fae1dcf8b4c604717ea596c6808cb28c9e798d29163 | hexlet-codebattle/battle_asserts | rock_scissors_paper.clj | (ns battle-asserts.issues.rock-scissors-paper
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections" "hash-maps"])
(def description
{:en "Count your score in a game of rock-paper-scissors.
You are given two arrays: your moves and your opponent’s moves.
You ... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/d05d67e5f995f20264ecad740d4780e7434af8e9/src/battle_asserts/issues/rock_scissors_paper.clj | clojure | (ns battle-asserts.issues.rock-scissors-paper
(:require [clojure.test.check.generators :as gen]))
(def level :easy)
(def tags ["collections" "hash-maps"])
(def description
{:en "Count your score in a game of rock-paper-scissors.
You are given two arrays: your moves and your opponent’s moves.
You ... | |
2519fb1d5f6955380ddd62df4d4c4e98e255824fd31cb9c44927662a0f2dee98 | cedlemo/OCaml-GI-ctypes-bindings-generator | Table_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Table_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Table_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Table_private"
| |
a33ce1a3b0b55a57f0f958338ae38567972f8383224f292afe76638a3b145285 | roburio/openvpn | openvpn_config_parser.ml | open Rresult
open Openvpn.Config
let read_config_file fn =
let string_of_file ~dir filename =
let file =
if Filename.is_relative filename then
Filename.concat dir filename
else
filename
in
try
let fh = open_in file in
let content = really_input_string fh (in_channe... | null | https://raw.githubusercontent.com/roburio/openvpn/1f16dfee982a806cb2dc1702dcbdbf8523af20bd/app/openvpn_config_parser.ml | ocaml | subtract length of this (= 1) below:
at beginning, before padding
between padding and config contents
Testing code for pad_output:
The output was printed, now we generate a warning on stderr
* if our self-testing fails: | open Rresult
open Openvpn.Config
let read_config_file fn =
let string_of_file ~dir filename =
let file =
if Filename.is_relative filename then
Filename.concat dir filename
else
filename
in
try
let fh = open_in file in
let content = really_input_string fh (in_channe... |
0877d75d636656700e2bcd9cf729b1359b766e2ebdc855142492a6dc3ca67694 | fantasytree/fancy_game_server | role_query.erl | %%----------------------------------------------------
%% 角色查询服务
%%----------------------------------------------------
-module(role_query).
-behaviour(gen_server).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-export([
start_link/0
,sync_online_cache/1, cl... | null | https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/src/mod/role/role_query.erl | erlang | ----------------------------------------------------
角色查询服务
----------------------------------------------------
----------------------------------------------------
外部接口
----------------------------------------------------
@doc 启动
@doc 更新在线缓存
@doc 清除在线缓存
@doc 踢所有在线角色下线
----------------------------------------... | -module(role_query).
-behaviour(gen_server).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-export([
start_link/0
,sync_online_cache/1, clean_online_cache/1
,kick_all_role/0
]
).
-include("common.hrl").
-include("role.hrl").
-record(state, {
... |
263773583ecda055bc040f011d4f2c70b6f8b7a167fc1cd76ce784708ebef838 | cchalmers/diagrams | Types.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveFunctor #
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTyp... | null | https://raw.githubusercontent.com/cchalmers/diagrams/d091a3727817905eea8eeabc1e284105f618db21/src/Diagrams/Types.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE EmptyDataDecls #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
---------------------------------------------------------------------------... | # LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE ViewPatterns #
Copyright : ( c ) 2011 - ... |
cbe0b03e091721c1ba101eb59cfc5945fc53faa6f7bbdda0fc50219ec36b2805 | chenyukang/eopl | thread-cases.scm | (define test-list
'(
;; simple arithmetic
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
;; nested arithmetic
(nested-arith-left "-(-(44,33),22)" -11)
(nested-arith-right "-(55, -(22,11))" 44)
;; simple variables
(test-var-1 "x" 10)
(test-... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch5/base/thread-cases.scm | scheme | simple arithmetic
nested arithmetic
simple variables
simple unbound variables
simple conditionals
test dynamic typechecking
make sure that the test and both arms get evaluated
properly.
and make sure the other arm doesn't get evaluated.
simple applications
many more tests imported from previous test suite:
... | (define test-list
'(
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
(nested-arith-left "-(-(44,33),22)" -11)
(nested-arith-right "-(55, -(22,11))" 44)
(test-var-1 "x" 10)
(test-var-2 "-(x,1)" 9)
(test-var-3 "-(1,x)" -9)
(test-unbound-var-1 "f... |
bca5238cf4ca18bca0b30b06ce48fd80ff9f3052e7d1572f5e6ad520c7a89604 | AndrasKovacs/ELTE-func-lang | Notes09.hs |
import Control.Monad -- replicateM_
import Control.Applicative -- Alternative
isLetter , isDigit , isAlpha
Parser monad , parsing
--------------------------------------------------------------------------------
Haskell alkalmazások , ahol a parserek lényegesen szerepelnek :
pandoc ( )
: GHC ... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-2/ea/Notes09.hs | haskell | replicateM_
Alternative
------------------------------------------------------------------------------
case f s of
Nothing -> Nothing
Just (a, s') -> runSM (g a) s'
hibadobás + hibából való visszatérés:
class Applicative f => Alternative f where
" catch " művelet ( kiejtés : choice )
(<|>) asszoc... |
isLetter , isDigit , isAlpha
Parser monad , parsing
Haskell alkalmazások , ahol a parserek lényegesen szerepelnek :
pandoc ( )
: GHC , Elm , PureScript , Agda ,
State + Maybe kombinált monád
newtype SM s a = SM {runSM :: s -> Maybe (a, s)}
instance Functor (SM s) where
fmap f (SM g) = SM $ ... |
62926eaa0dfd002ecea6afdfe33ea01e6fcbcfe367b36faad7d1cb2dfee4041a | BumblebeeBat/FlyingFox | main_handler.erl | -module(main_handler).
-export([init/3, handle/2, terminate/3]).
%example of talking to this handler:
httpc : request(post , { " :3011/ " , [ ] , " application / octet - stream " , " echo " } , [ ] , [ ] ) .
%curl -i -d '[-6,"test"]' :3011
handle(Req, _) ->
{F, _} = cowboy_req:path(Req),
File = << <<"src/web">... | null | https://raw.githubusercontent.com/BumblebeeBat/FlyingFox/0fa039cd2394b08b1a85559f9392086c6be47fa6/src/networking/main_handler.erl | erlang | example of talking to this handler:
curl -i -d '[-6,"test"]' :3011 | -module(main_handler).
-export([init/3, handle/2, terminate/3]).
httpc : request(post , { " :3011/ " , [ ] , " application / octet - stream " , " echo " } , [ ] , [ ] ) .
handle(Req, _) ->
{F, _} = cowboy_req:path(Req),
File = << <<"src/web">>/binary, F/binary>>,
{ok, _Data, _} = cowboy_req:body(Req),
... |
fceae9fb54dde5e96ed32a7bbb3260582c1a51d912bec238e245e8fcdf7453ff | PrincetonUniversity/lucid | Console.ml | open Collections
module T = ANSITerminal
exception Error of string
type file_info =
{ input : string array
; linenums : (int * int) array
}
type info = file_info StringMap.t
let global_info : info ref = ref StringMap.empty
let show_message msg color label =
(* T.print_string [] "\n"; *)
T.print_string [T... | null | https://raw.githubusercontent.com/PrincetonUniversity/lucid/5f461566a2abdba90bfc8272b443d0a1148df6dd/src/lib/frontend/Console.ml | ocaml | T.print_string [] "\n";
print_endline @@ "Line:" ^ line; | open Collections
module T = ANSITerminal
exception Error of string
type file_info =
{ input : string array
; linenums : (int * int) array
}
type info = file_info StringMap.t
let global_info : info ref = ref StringMap.empty
let show_message msg color label =
T.print_string [T.Foreground color; T.Bold] (labe... |
631bb4af3c2d6ebaab8f9ec3f184ca070f39946001dd560735623db1456c4599 | nominolo/lambdachine | MultiReturn2.hs | # LANGUAGE MagicHash , NoImplicitPrelude , UnboxedTuples , BangPatterns #
# OPTIONS_GHC -fobject - code #
module Bc.MultiReturn2 where
import GHC.Prim
import GHC.Types
import GHC.Num
import GHC.Base
# NOINLINE g #
g :: Int# -> State# RealWorld -> (# State# RealWorld, Int #)
g n s = (# s, I# (n +# 1#) #)
test = case ... | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/tests/Bc/MultiReturn2.hs | haskell | # LANGUAGE MagicHash , NoImplicitPrelude , UnboxedTuples , BangPatterns #
# OPTIONS_GHC -fobject - code #
module Bc.MultiReturn2 where
import GHC.Prim
import GHC.Types
import GHC.Num
import GHC.Base
# NOINLINE g #
g :: Int# -> State# RealWorld -> (# State# RealWorld, Int #)
g n s = (# s, I# (n +# 1#) #)
test = case ... | |
d46f9a4ee909f9a8e2ffa29ac577ffcfa3201393829a073868bf64810481122d | logseq/logseq | property.cljs | (ns frontend.util.property
"Property fns needed by the rest of the app and not graph-parser"
(:require [clojure.string :as string]
[frontend.util :as util]
[clojure.set :as set]
[frontend.config :as config]
[logseq.graph-parser.util :as gp-util]
[logseq.gr... | null | https://raw.githubusercontent.com/logseq/logseq/59b924f25d4df5bf70a8d51d71fc9f5ab666c66e/src/main/frontend/util/property.cljs | clojure | TODO: Investigate if this behavior is correct for configured hidden
properties and for editable built in properties
title properties body
FIXME:
FIXME: only remove from the properties area | (ns frontend.util.property
"Property fns needed by the rest of the app and not graph-parser"
(:require [clojure.string :as string]
[frontend.util :as util]
[clojure.set :as set]
[frontend.config :as config]
[logseq.graph-parser.util :as gp-util]
[logseq.gr... |
0362fbb0c7c77eb3eb46876a3a340bcf8c23a1b28aff74e44e3a55d9748f08d4 | AntidoteDB/gingko | antidote_multi_dc_SUITE.erl | %% -------------------------------------------------------------------
%%
Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
%% >
%%
This file is provided... | null | https://raw.githubusercontent.com/AntidoteDB/gingko/a965979aefb2868abcd0b3bf5ed1b5e4f9fdd163/test/multidc/antidote_multi_dc_SUITE.erl | erlang | -------------------------------------------------------------------
>
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either expressed or implied. See the License for the
specific language governing perm... | Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
This file is provided to you under the Apache License ,
except in compliance with the License . You... |
bf60f3ca5013fa12501f47fb6d909c54bd6154a091e8ba2ae1416a251e939b63 | narkisr-deprecated/core | wol.clj | (comment
re-core, Copyright 2012 Ronen Narkis, narkisr.com
Licensed under the Apache License,
Version 2.0 (the "License") you may not use this file except in compliance with the License.
You may obtain a copy of the License at -2.0
Unless required by applicable law or agreed to in writing, software
distri... | null | https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/src/physical/wol.clj | clojure | (comment
re-core, Copyright 2012 Ronen Narkis, narkisr.com
Licensed under the Apache License,
Version 2.0 (the "License") you may not use this file except in compliance with the License.
You may obtain a copy of the License at -2.0
Unless required by applicable law or agreed to in writing, software
distri... | |
c01d85d11967e21e4d69595eed78c1185836eea52c3ba8c2923c8ff79837fda5 | MichaelDrogalis/voluble | property_test.clj | (ns io.mdrogalis.voluble.property-test
(:require [clojure.test :refer :all]
[clojure.test.check :as tc]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.string :as s]... | null | https://raw.githubusercontent.com/MichaelDrogalis/voluble/e3e46f739271de955b50b1e7d9972e5fd593b870/test/io/mdrogalis/voluble/property_test.clj | clojure | If there is a dependency, and that dependency's value
actually exists to match against.
History sizes never outgrow their max.
It doesn't livelock.
Every record is generated for a topic in the props.
Ditto values.
Dependent values pre-exist in the right collection.
Bounded topics have exactly set don't exceed t... | (ns io.mdrogalis.voluble.property-test
(:require [clojure.test :refer :all]
[clojure.test.check :as tc]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.string :as s]... |
2783981326ede0a52fb19673a3566040004b9debeeaa4b93720e2f1043312a2d | matterandvoid-space/todomvc-fulcro-subscriptions | mutations.cljs | (ns space.matterandvoid.todomvc.todo.mutations
(:require
[com.fulcrologic.fulcro.algorithms.form-state :as fs]
[com.fulcrologic.fulcro.algorithms.merge :as merge]
[com.fulcrologic.fulcro.algorithms.normalized-state :as nstate]
[com.fulcrologic.fulcro.data-fetch :as df]
[com.fulcrologic.fulcro.muta... | null | https://raw.githubusercontent.com/matterandvoid-space/todomvc-fulcro-subscriptions/e2e244936efe1005fa2cac204a24758b067aac4e/src/main/space/matterandvoid/todomvc/todo/mutations.cljs | clojure | (ns space.matterandvoid.todomvc.todo.mutations
(:require
[com.fulcrologic.fulcro.algorithms.form-state :as fs]
[com.fulcrologic.fulcro.algorithms.merge :as merge]
[com.fulcrologic.fulcro.algorithms.normalized-state :as nstate]
[com.fulcrologic.fulcro.data-fetch :as df]
[com.fulcrologic.fulcro.muta... | |
2df1991446b3916c70ca94582b1149b03834ca30671a03282bea31ca25f658fe | Clozure/ccl-tests | nstring-capitalize.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Thu Oct 3 21:38:49 2002
;;;; Contains: Tests for NSTRING-CAPITALIZE
(in-package :cl-test)
(deftest nstring-capitalize.1
(let* ((s (copy-seq "abCd"))
(s2 (nstring-capitalize s)))
(values (eqt s s2) s))
t "Abcd")
(deftest nstring-capitalize.2
(let* ((... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/nstring-capitalize.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for NSTRING-CAPITALIZE
Order of evaluation tests
Error cases | Author :
Created : Thu Oct 3 21:38:49 2002
(in-package :cl-test)
(deftest nstring-capitalize.1
(let* ((s (copy-seq "abCd"))
(s2 (nstring-capitalize s)))
(values (eqt s s2) s))
t "Abcd")
(deftest nstring-capitalize.2
(let* ((s (copy-seq "0adA2Cdd3wXy"))
(s2 (nstring-capitalize s)))
(val... |
14378a6b96d0d30e298e54391563fd956f1ffaf841abad4b0b6fb12f47cd0c2a | circuithub/ch-hs-format | Import.hs | {-# language DisambiguateRecordFields #-}
# language NamedFieldPuns #
module CircuitHub.HsFormat.Import where
import ApiAnnotation
import CircuitHub.HsFormat
import Data.Char
import Data.Foldable ( for_ )
import Data.List ( sortOn )
import Data.Maybe
import Data.Traversable ( for )
import FastString ( headFS )
import... | null | https://raw.githubusercontent.com/circuithub/ch-hs-format/81d27fbc7487f6512bafacd817221d8592306502/src/CircuitHub/HsFormat/Import.hs | haskell | # language DisambiguateRecordFields # | # language NamedFieldPuns #
module CircuitHub.HsFormat.Import where
import ApiAnnotation
import CircuitHub.HsFormat
import Data.Char
import Data.Foldable ( for_ )
import Data.List ( sortOn )
import Data.Maybe
import Data.Traversable ( for )
import FastString ( headFS )
import GHC.Hs.Extension ( GhcPs )
import qualifi... |
e695a4cdcfb4d6c7ee6c4c3bb7f17344c5400a8ee4ebd7e458039e5dfcb8386c | wdebeaum/step | watermelon.lisp | ;;;;
;;;; W::WATERMELON
;;;;
(define-words :pos W::n
:words (
(W::WATERMELON
(senses
((LF-PARENT ONT::FRUIT)
(TEMPL COUNT-PRED-TEMPL)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/watermelon.lisp | lisp |
W::WATERMELON
|
(define-words :pos W::n
:words (
(W::WATERMELON
(senses
((LF-PARENT ONT::FRUIT)
(TEMPL COUNT-PRED-TEMPL)
)
)
)
))
|
61f2c4c82641f119baa0243715f222079fc09a5972fae3eebe14614849426eed | SimulaVR/Simula | SimulaController.hs | {-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TemplateHaskell #
module Plugin.SimulaControl... | null | https://raw.githubusercontent.com/SimulaVR/Simula/0a6041c73c419a35fc45c028191ac1c32d4c419f/addons/godot-haskell-plugin/src/Plugin/SimulaController.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE MultiWayIf #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
G.add_child (safeCast arvrController) (safeCast rc) True
G.add_child (safeCast arvrController) (safeCast ctMesh) True
G.add_child (safeCast arvrController) (safeCast laser) True... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE TemplateHaskell #
module Plugin.SimulaController
( GodotSimulaController(..)
, addSimulaController
, isButtonPressed
, pointerWindow
)
where
import Control.Concurrent.STM.TVar
impo... |
53628fe772e1e30094cbe37edef1fa913ac348841462074fbd882cefff81b2df | kubernetes-client/haskell | Extensions.hs |
Kubernetes
No description provided ( generated by Openapi Generator -generator )
OpenAPI Version : 3.0.1
Kubernetes API version : release-1.20
Generated by OpenAPI Generator ( -generator.tech )
Kubernetes
No description provided (generated by Openapi Generator -generator)
OpenAPI... | null | https://raw.githubusercontent.com/kubernetes-client/haskell/edfb4744a40be1d6a4b9d4a7d060069f2367884a/kubernetes/lib/Kubernetes/OpenAPI/API/Extensions.hs | haskell | # LANGUAGE OverloadedStrings #
* Operations
** Extensions
*** getAPIGroup
| @GET \/apis\/extensions\/@
get information of a group
| @application/json@
| @application/vnd.kubernetes.protobuf@
| @application/yaml@ |
Kubernetes
No description provided ( generated by Openapi Generator -generator )
OpenAPI Version : 3.0.1
Kubernetes API version : release-1.20
Generated by OpenAPI Generator ( -generator.tech )
Kubernetes
No description provided (generated by Openapi Generator -generator)
OpenAPI... |
d59dca3ef8df14525631efc026d14cfa2e4c3eb8d9373b6fb9df2500568b6c31 | haskell-opengl/GLUT | MoveLight.hs |
MoveLight.hs ( adapted from movelight.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates when to issue lighting and transformati... | null | https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/MoveLight.hs | haskell |
MoveLight.hs ( adapted from movelight.c which is ( c ) Silicon Graphics , Inc. )
Copyright ( c ) 2002 - 2018 < >
This file is part of HOpenGL and distributed under a BSD - style license
See the file libraries / GLUT / LICENSE
This program demonstrates when to issue lighting and transformati... | |
d6f2bfc2a047e307f6ee48fa223bd7300702b69f0e860c7f0aa958c5eb2e5731 | kyleburton/sandbox | hrm_test.clj | (ns scratchpad.hrm-test
(:require
[scratchpad.hrm :as hrm]
[clojure.test :refer :all]
[scratchpad.core :refer :all]))
(deftest make-new-mem-test
(testing "creating default new memory"
(let [mem (hrm/make-new-mem!)]
(is (= 0 (::hrm/size mem)))
(is (= {} (::hrm/cells mem)))))
(testing... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/clojure/cider-scratchpad/test/scratchpad/hrm_test.clj | clojure | -can-i-undefine-a-function-in-clojure
(.unbindRoot #'a-test)
(ns-unmap 'scratchpad.hrm-test 'a-test)
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1)))) | (ns scratchpad.hrm-test
(:require
[scratchpad.hrm :as hrm]
[clojure.test :refer :all]
[scratchpad.core :refer :all]))
(deftest make-new-mem-test
(testing "creating default new memory"
(let [mem (hrm/make-new-mem!)]
(is (= 0 (::hrm/size mem)))
(is (= {} (::hrm/cells mem)))))
(testing... |
aecfa26ea9f57f6be4410e368a79c4f945595171111d86a8350ca2d9576474f6 | dparis/gen-phzr | circle.cljs | (ns phzr.impl.accessors.circle)
(def circle-get-properties
{:area "area"
:bottom "bottom"
:diameter "diameter"
:empty "empty"
:left "left"
:radius "radius"
:right "right"
:top "top"
:type "type"
:x "x"
:y "y"})
(def circle-set-properties
{:bottom "bottom"
:diameter "diameter"
:... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/circle.cljs | clojure | (ns phzr.impl.accessors.circle)
(def circle-get-properties
{:area "area"
:bottom "bottom"
:diameter "diameter"
:empty "empty"
:left "left"
:radius "radius"
:right "right"
:top "top"
:type "type"
:x "x"
:y "y"})
(def circle-set-properties
{:bottom "bottom"
:diameter "diameter"
:... | |
0058b3da1cd44051d9e50b0fb326730d44fe809a744286702858eee6b7490280 | MLstate/opalang | baseObj.mli |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/baseObj.mli | ocaml | * The original Obj signature
* Additional functions
* creates a string of the runtime representation of value
This function is intented for low level debugging purpose
You should know the internal representation of (at least) algebraic datatypes
to understand the output of this function
* print t... |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
44980ce8f28cfdcb3b6f71ced06bf7ceccd0c92a870e063fd1acc78ef41ff512 | ghc/testsuite | Xml.hs | # LANGUAGE TemplateHaskell , FlexibleInstances , ScopedTypeVariables ,
GADTs , RankNTypes , FlexibleContexts , TypeSynonymInstances ,
MultiParamTypeClasses , DeriveDataTypeable , PatternGuards ,
OverlappingInstances , UndecidableInstances , CPP #
GADTs, RankN... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/T1735_Help/Xml.hs | haskell | Don't do any defaulting here, as these functions can be implemented
differently by the user. We do the defaulting elsewhere instead.
The t' type is thus not used.
XXX Should we flip the result order?
The Xml [a] context is a bit scary, but if we don't have it then
, Xml [a] | # LANGUAGE TemplateHaskell , FlexibleInstances , ScopedTypeVariables ,
GADTs , RankNTypes , FlexibleContexts , TypeSynonymInstances ,
MultiParamTypeClasses , DeriveDataTypeable , PatternGuards ,
OverlappingInstances , UndecidableInstances , CPP #
GADTs, RankN... |
f56428e064df11b3f2d3b95eeb65a51217b4a04afc03818d6efc61990adde348 | zachjs/sv2v | SystemVerilog.hs | sv2v
- Author : < >
-
- A parser for SystemVerilog .
- Author: Tom Hawkins <>
-
- A parser for SystemVerilog.
-}
module Language.SystemVerilog
( module Language.SystemVerilog.AST
, module Language.SystemVerilog.Parser
) where
import Language.SystemVerilog.AST
import Language.SystemVeri... | null | https://raw.githubusercontent.com/zachjs/sv2v/1ba5ab273949c9487c87dcf5ad520bbbe04edac7/src/Language/SystemVerilog.hs | haskell | sv2v
- Author : < >
-
- A parser for SystemVerilog .
- Author: Tom Hawkins <>
-
- A parser for SystemVerilog.
-}
module Language.SystemVerilog
( module Language.SystemVerilog.AST
, module Language.SystemVerilog.Parser
) where
import Language.SystemVerilog.AST
import Language.SystemVeri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.