_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 |
|---|---|---|---|---|---|---|---|---|
94e5a8023edd5bfda42ba3fefe29a66fb6a9dcb25025f419f973183c8a10542b | mikeplavsky/athena-cmd | core_test.clj | (ns athena-cmd.core-test
(:require [clojure.test :refer :all]
[athena-cmd.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/mikeplavsky/athena-cmd/7a4bdd7e2a6e8bff749cdc5fd92653fba9debcd5/test/athena_cmd/core_test.clj | clojure | (ns athena-cmd.core-test
(:require [clojure.test :refer :all]
[athena-cmd.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
f9683576ddc6ddd93a06876f9608ad5ecec46edf97ca9dfba240ca109853c5f5 | ZHaskell/stdio | Text.hs | # LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Text (text) where
import Criterion.Main
import qualified Data.ByteString as BS
import qualified Data.Text as T
import qualified Std.Data.Text as S
import qualified Std.Data.Vector as V
import Control.Dee... | null | https://raw.githubusercontent.com/ZHaskell/stdio/7887b9413dc9feb957ddcbea96184f904cf37c12/bench/data/Text.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Text (text) where
import Criterion.Main
import qualified Data.ByteString as BS
import qualified Data.Text as T
import qualified Std.Data.Text as S
import qualified Std.Data.Vector as V
import Control.Dee... | |
6737f05f20fa5dda9f914b55f5e037d5a62ee46be01b35211cec52bca57b33d2 | rtoy/cmucl | freebsd-features.lisp | e.g. for FreeBSD on x86 you probably want :
( : * features * )
( : elf * features * )
(setf *features* (remove :freebsd4 *features*))
| null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/tools/setenv-scripts/freebsd-features.lisp | lisp | e.g. for FreeBSD on x86 you probably want :
( : * features * )
( : elf * features * )
(setf *features* (remove :freebsd4 *features*))
| |
ab46337e875ec0b834b6d5eecf707b0cba69fe761a78fbebb3217759e5acd339 | bobatkey/CS316-17 | Lec21.hs | module Main where
LECTURE 21 : CONCURRENCY
import Control.Concurrent
import Control.Monad (forever, forM_)
import Network
import System.IO
import Text.Printf
forkIO : : IO ( ) - > IO ThreadId
muddle :: IO ()
muddle = do
hSetBuffering stdout NoBuffering
forkIO (forM_ [1..1000] (\_ -> putChar ' '))
for... | null | https://raw.githubusercontent.com/bobatkey/CS316-17/36eb67c335cd0e6f5b7a4b8eafdea3cd4b715e0c/lectures/Lec21.hs | haskell | threadDelay :: Int -> IO ()
Logger example
--------------------------------------------------------------------
A server | module Main where
LECTURE 21 : CONCURRENCY
import Control.Concurrent
import Control.Monad (forever, forM_)
import Network
import System.IO
import Text.Printf
forkIO : : IO ( ) - > IO ThreadId
muddle :: IO ()
muddle = do
hSetBuffering stdout NoBuffering
forkIO (forM_ [1..1000] (\_ -> putChar ' '))
for... |
16c542c6c8078e1413ca9102c8b7e77260e13d07bffd075dcac49d5d3df224a9 | dparis/gen-phzr | ms_pointer.cljs | (ns phzr.impl.accessors.ms-pointer)
(def ms-pointer-get-properties
{:button "button"
:callback-context "callbackContext"
:capture "capture"
:enabled "enabled"
:event "event"
:game "game"
:pointer-down-callback "pointerDownCallback"
:pointer-move-callback "pointerMoveCallback"
:pointer-up-call... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/ms_pointer.cljs | clojure | (ns phzr.impl.accessors.ms-pointer)
(def ms-pointer-get-properties
{:button "button"
:callback-context "callbackContext"
:capture "capture"
:enabled "enabled"
:event "event"
:game "game"
:pointer-down-callback "pointerDownCallback"
:pointer-move-callback "pointerMoveCallback"
:pointer-up-call... | |
63b20060c1925dfaad16ea9e212489ef958d726657eec4a4a84d280994f66283 | mewhhaha/apecs-unity-tutorial-haskell | World.hs | # LANGUAGE TemplateHaskell #
module World where
import Apecs
import Relude
import Types (Command, Tick)
import World.Component
makeWorld "World" [''CResources, ''CLevel, ''CScene, ''CPosition, ''CPlayer, ''CEnemy, ''CFood, ''CHappenings, ''CAnimation, ''CLife, ''CDead, ''CLerpPosition]
type System' a = (SystemT Wor... | null | https://raw.githubusercontent.com/mewhhaha/apecs-unity-tutorial-haskell/d995e5311210b4c186ededbd38c64f6861f5eae1/src/World.hs | haskell | # LANGUAGE TemplateHaskell #
module World where
import Apecs
import Relude
import Types (Command, Tick)
import World.Component
makeWorld "World" [''CResources, ''CLevel, ''CScene, ''CPosition, ''CPlayer, ''CEnemy, ''CFood, ''CHappenings, ''CAnimation, ''CLife, ''CDead, ''CLerpPosition]
type System' a = (SystemT Wor... | |
fbe204a8cb59d47f45ebdabacbfead230875d2a9cc882a0b8f340c0cfcb9942f | janestreet/merlin-jst | includemod_errorprinter.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/ocaml/typing/includemod_errorprinter.ml | ocaml | ************************************************************************
OCaml
... | , projet Cambium , Inria Paris
Copyright 2021 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Context = struct
type pos =
| Module of Ident.t
| Modtype of Ident.t
| Arg of Types.func... |
87a01f5aa9b8d816b68241c3c83095a69dd2fc7f19ad365df62dd404bfc31608 | e-bigmoon/haskell-blog | Main.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
module Main where
import Chat
import Chat.Data
import Control.Concur... | null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/examples/ex3/chat/app/Main.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell #
the homepage
note the multipiece for the wiki hierarchy
the chat subsite
get a working login link
Our custom defaultLayout will add the chat widget to every page.
We'll also add login and logout links to the top.
excercise
can create any name... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
module Main where
import Chat
import Chat.Data
import Control.Concurrent.Chan (newChan)
import Data.IORef
import Data.Map ... |
2778634f5803a1bb0a96346c182e0ad861bd6501e41ebc2209ad4fcbf6686ab2 | crategus/cl-cffi-gtk | custom-drawing.lisp | ;;;; Example Custom Drawing - 2021-11-30
;;;;
Many applications can not use GTK widgets , for a variety of reasons , but
;;;; still want their user interface to appear integrated with the rest of the
desktop , and follow GTK themes . This demo shows how to use
and the gtk - render APIs to achieve this .
;;;;
;;;... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/demo/gtk-example/custom-drawing.lisp | lisp | Example Custom Drawing - 2021-11-30
still want their user interface to appear integrated with the rest of the
Note that this is a simple, non-interactive example.
We have to explicitly set the state again here for it to take effect
Check the width and height
Render background and frame
Return new values for x,... | Many applications can not use GTK widgets , for a variety of reasons , but
desktop , and follow GTK themes . This demo shows how to use
and the gtk - render APIs to achieve this .
(in-package :gtk-example)
(defun append-element (path selector)
(let* ((next (position-if (lambda (x) (member x '(#\# #\. #\:))) ... |
6389d3cf933045ba785980efc991e37699c2ffd2d5a27eb54aa5a38eb14fef9c | arianvp/generics-mrsop-diff | TwoThreetree.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE GADTs #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications... | null | https://raw.githubusercontent.com/arianvp/generics-mrsop-diff/242f90dfbe7c99e12d374832811d970868845e7c/src/Examples/TwoThreetree.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE RankNTypes #
Conflict
the zipper representation of the function
do n't zip at all
we can delete subtree and insert with subtree
however , we can be more ' precise ' as well
we only pinpoint the part that matters , the other leafs are just copied... | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
# LANGUAGE StandaloneDeriving #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeFamilies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
m... |
8703c9f9a0a3e6c0636677ada14da527be1e2c4d7595d39dc41344461c8ca558 | PacktWorkshops/The-Clojure-Workshop | test_api.clj | (ns packt-clj.tennis.test-api
(:require
[clj-http.client :as client]
[clojure.test :refer :all]
[packt-clj.tennis.api :as api]
[packt-clj.tennis.elo :as elo]
[packt-clj.tennis.database :as database]
[packt-clj.tennis.ingest :as ingest]
[clojure.java.jdbc :as jdbc]
[clojure.edn :as edn]... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter14/tests/Activity14.01/packt_clj/tennis/test_api.clj | clojure | (ns packt-clj.tennis.test-api
(:require
[clj-http.client :as client]
[clojure.test :refer :all]
[packt-clj.tennis.api :as api]
[packt-clj.tennis.elo :as elo]
[packt-clj.tennis.database :as database]
[packt-clj.tennis.ingest :as ingest]
[clojure.java.jdbc :as jdbc]
[clojure.edn :as edn]... | |
dc80ae55f6ee80f8257cc40f7f223db3eae5519487c2e420c6ec957827008631 | 0install/0install | distro.mli | Copyright ( C ) 2017 , the README file for details , or visit .
* See the README file for details, or visit .
*)
(** Generic code for interacting with distribution package managers. *)
module Query : sig
type t
(** Details of a query and a place to collect the results. *)
val package : t -> string... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/zeroinstall/distro.mli | ocaml | * Generic code for interacting with distribution package managers.
* Details of a query and a place to collect the results.
* [package t] is the name of the package being queried.
* Add a warning message to the query.
* [add_result t id impl] adds [id -> impl] to the result map.
* [results t] is the current result... | Copyright ( C ) 2017 , the README file for details , or visit .
* See the README file for details, or visit .
*)
module Query : sig
type t
val package : t -> string
val problem : t -> ('a, Format.formatter, unit) format -> 'a
val add_result : t -> string -> Impl.distro_implementation -> unit
... |
d60ba7d10e9ce67dcb54b60c4ab9ffab3035e476c67e6054a45299eb7fcf8690 | kowainik/life-sync | Path.hs | # LANGUAGE TemplateHaskell #
|
Copyright : ( c ) 2017 - 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
This module contains utility functions to work with shell .
Copyright: (c) 2017-2020 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
This module contains uti... | null | https://raw.githubusercontent.com/kowainik/life-sync/ea80581a6735d2f3e2df0fda1d1bc0b0b41ad6d0/src/Life/Path.hs | haskell | * Constants
* Functions
--------------------------------------------------------------------------
Global constants
--------------------------------------------------------------------------
| Name for life configuration file.
TODO: consistent naming with @lifePath@ ?
| Default repository name for life configurat... | # LANGUAGE TemplateHaskell #
|
Copyright : ( c ) 2017 - 2020 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
This module contains utility functions to work with shell .
Copyright: (c) 2017-2020 Kowainik
SPDX-License-Identifier: MPL-2.0
Maintainer: Kowainik <>
This module contains uti... |
2adb75407c306b1597d638463a60dd422f3596a1214ec5542703a9a33bc5cbdb | anoma/juvix | Negative.hs | module Arity.Negative (allTests) where
import Base
import Juvix.Compiler.Builtins (iniState)
import Juvix.Compiler.Internal.Translation.FromInternal.Analysis.ArityChecking.Error
import Juvix.Compiler.Pipeline
type FailMsg = String
data NegTest = NegTest
{ _name :: String,
_relDir :: Path Rel Dir,
_file :: ... | null | https://raw.githubusercontent.com/anoma/juvix/c1d85c451e447dd8b1b82fe2fd4677d8ee9a117b/test/Arity/Negative.hs | haskell | module Arity.Negative (allTests) where
import Base
import Juvix.Compiler.Builtins (iniState)
import Juvix.Compiler.Internal.Translation.FromInternal.Analysis.ArityChecking.Error
import Juvix.Compiler.Pipeline
type FailMsg = String
data NegTest = NegTest
{ _name :: String,
_relDir :: Path Rel Dir,
_file :: ... | |
641c6827b6f79548d6ad32664bca56c0591142a9cda7ae2f7f9d87e456485f34 | purebred-mua/purebred | TestAddressBook.hs | -- This file is part of purebred
Copyright ( C ) 2022
--
-- purebred is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later version.
--
-... | null | https://raw.githubusercontent.com/purebred-mua/purebred/14f50e8406dd81f6f506f1352f623948a1ea63ed/test/TestAddressBook.hs | haskell | This file is part of purebred
purebred is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... | Copyright ( C ) 2022
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
module TestAddressBook (
addressbookTests
) where
import Test.Tas... |
1ff44ca2c83c19a2c48163e91f403fea9f5aba1068181886907ac08a5a604700 | garrigue/lablgl | texload.ml |
texture.c - by , SGI
texload is a simplistic routine for reading an SGI .rgb image file .
ported to OCaml by Issac Trotts Sep 19 , 2002
typedef struct _ImageRec {
unsigned short imagic;
unsigned short type;
unsigned short dim;
unsigned short xsize, ysize, zsize;
unsigned int min, max;
... | null | https://raw.githubusercontent.com/garrigue/lablgl/d76e4ac834b6d803e7a6c07c3b71bff0e534614f/LablGlut/examples/glut3.7/demos/underwater/texload.ml | ocaml | height)=image->ysize;
if (image->zsize != 1) {
ImageClose(image);
return NULL;
}
base = (unsigned char
height)=image->ysize;
if (image->zsize != 3 && image->zsize != 4) {
ImageClose(image);
return NULL;
}
base = (unsigned char |
texture.c - by , SGI
texload is a simplistic routine for reading an SGI .rgb image file .
ported to OCaml by Issac Trotts Sep 19 , 2002
typedef struct _ImageRec {
unsigned short imagic;
unsigned short type;
unsigned short dim;
unsigned short xsize, ysize, zsize;
unsigned int min, max;
... |
e483899aad3114d79c2c95d0141f2548f276b682258f636e8aa00c25b7c5e94b | haskell-lisp/yale-haskell | annotation-parser.scm |
(define *annotation-escape* '())
(define (parse-annotations)
(let ((save-layout (dynamic *layout-stack*)))
(setf (dynamic *layout-stack*) '())
(advance-token)
(let/cc annotation-escape
(setf *annotation-escape* (lambda ()
(setf (dynamic *layout-stack*) save-layout)
(advance-to-annotatio... | null | https://raw.githubusercontent.com/haskell-lisp/yale-haskell/4e987026148fe65c323afbc93cd560c07bf06b3f/parser/annotation-parser.scm | scheme | (cons d (parse-annotation-list-1 in-layout?)))
(cons d (parse-annotation-list-1 in-layout?)))
This routine can invoke special parsers for the arguments
The following is for a datatype import/export. It is
Type(Con1(strs),Con2(strs),...)
leave the ) to end the args |
(define *annotation-escape* '())
(define (parse-annotations)
(let ((save-layout (dynamic *layout-stack*)))
(setf (dynamic *layout-stack*) '())
(advance-token)
(let/cc annotation-escape
(setf *annotation-escape* (lambda ()
(setf (dynamic *layout-stack*) save-layout)
(advance-to-annotatio... |
aaa532a160509613efbb29bc115505323a4c1695cf64dc6d8db8a7e8c8c469f3 | madvas/cljs-react-material-ui | rum.cljs | (ns cljs-react-material-ui.chip-input.rum
(:require [cljsjs.material-ui-chip-input])
(:require-macros [cljs-react-material-ui.core]))
(def chip-input (cljs-react-material-ui.core/adapt-rum-class (aget js/window "MaterialUIChipInput")))
| null | https://raw.githubusercontent.com/madvas/cljs-react-material-ui/5908740b78ee8463a68afc889aee729bd9d56766/src/cljs_react_material_ui/chip_input/rum.cljs | clojure | (ns cljs-react-material-ui.chip-input.rum
(:require [cljsjs.material-ui-chip-input])
(:require-macros [cljs-react-material-ui.core]))
(def chip-input (cljs-react-material-ui.core/adapt-rum-class (aget js/window "MaterialUIChipInput")))
| |
53391f0984ad69fd8f4a6d1a26cc5e2dc355eca0cbcb23c2b6b1d98ba8f2162a | jablo/cablesim | netconfig.erl | -module(netconfig).
-export([network_config/3]).
-include("debug.hrl").
network_config(Interface, _Gi = {I1, I2, I3, I4}, _Mask = {M1, M2, M3, M4}) ->
?debug("network_config(~p, ~p, ~p)~n", [Interface, _Gi, _Mask]),
PD = priv_dir(?MODULE),
?debug("priv_dir: ~p~n", [PD]),
os_cmd_exitstatus("netifcfg",... | null | https://raw.githubusercontent.com/jablo/cablesim/da6628190f9ec5c426df73e921ff575470d1a078/src/netconfig.erl | erlang | in module util | -module(netconfig).
-export([network_config/3]).
-include("debug.hrl").
network_config(Interface, _Gi = {I1, I2, I3, I4}, _Mask = {M1, M2, M3, M4}) ->
?debug("network_config(~p, ~p, ~p)~n", [Interface, _Gi, _Mask]),
PD = priv_dir(?MODULE),
?debug("priv_dir: ~p~n", [PD]),
os_cmd_exitstatus("netifcfg",... |
c42afbf7c43096d6ea0cb8530cbabf8329a7200b6437da05ea482cda09c4003e | marcelog/erlami | reader_test.erl | -module(reader_test).
-include_lib("eunit/include/eunit.hrl").
start() ->
[{transport, ssl},
{host, "127.0.0.1"},
{port, 5039},
{username, "username"},
{secret, "secret"}].
stop(_SetupData) ->
ok.
server_config_test_() ->
{setup,
fun start/0,
fun stop/1,
fun(SetupD... | null | https://raw.githubusercontent.com/marcelog/erlami/c2d9c46c9de987431b382a19ad883d597a2abf26/test/reader_test.erl | erlang | -module(reader_test).
-include_lib("eunit/include/eunit.hrl").
start() ->
[{transport, ssl},
{host, "127.0.0.1"},
{port, 5039},
{username, "username"},
{secret, "secret"}].
stop(_SetupData) ->
ok.
server_config_test_() ->
{setup,
fun start/0,
fun stop/1,
fun(SetupD... | |
5f45b0d16848cac4a3ef36ddee553dc2dd44c6c5dc5d3db66eef7acd88f8a95c | ZHaskell/z-io | Threaded.hs | |
Module : Z.IO.FileSystem . Threaded
Description : Filesystem IO using threadpool
Copyright : ( c ) , 2017 - 2020
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module provides filesystem API exactly same with ` Z.IO.FileSystem . Base ` ,
... | null | https://raw.githubusercontent.com/ZHaskell/z-io/7b3cdcc6f07a4b4c5bc1baf39f85d7af88b444e5/Z/IO/FileSystem/Threaded.hs | haskell | FIXME: An elegant way to keep this module's API same with 'Z.IO.FileSystem.Base'
automatically.
* Regular file devices
* File offset bundle
* Filesystem operations
** File stats
* opening constant
** AccessMode
** file type constant
** FileFlag
** SymlinkFlag
-------------------------------------------------... | |
Module : Z.IO.FileSystem . Threaded
Description : Filesystem IO using threadpool
Copyright : ( c ) , 2017 - 2020
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
This module provides filesystem API exactly same with ` Z.IO.FileSystem . Base ` ,
... |
5ded5ee1203689473dd775156c6640f400dc072e93a3ddd769a6a9dc91ec0cfd | uzh/guardian | sqlite3_backend.ml | exception Exception of string
let get_or_exn m = m |> CCResult.get_or_failwith |> Lwt.return
(** TODO: optional [ctx] arguments are ignored by sqlite backend *)
module Make (A : Guardian.RoleSig) (T : Guardian.RoleSig) = struct
module Guardian = Guardian.Make (A) (T)
module Uuid = Guardian.Uuid
(** TODO: gener... | null | https://raw.githubusercontent.com/uzh/guardian/99c2e20374f419d63c1177870c2e36bb5d0df497/backend/sqlite3_backend.ml | ocaml | * TODO: optional [ctx] arguments are ignored by sqlite backend
* TODO: generalize this. right now it's fine because this backend should
really only be used for testing purposes, but in the future it would be
nice to have actual sqlite3 support.
* [find_migrations ()] returns a list of all migrations as a ... | exception Exception of string
let get_or_exn m = m |> CCResult.get_or_failwith |> Lwt.return
module Make (A : Guardian.RoleSig) (T : Guardian.RoleSig) = struct
module Guardian = Guardian.Make (A) (T)
module Uuid = Guardian.Uuid
module ActorSet = Guardian.ActorRoleSet
module TargetSet = Guardian.TargetRoleSe... |
32ab405a0e70ab084398e3ea7ed1e4322db85e3b0c3780987a225e358bda0dab | nh2/network-house | IO.hs | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
module Net.IO(module Net) where
import qualified Control.Concurrent as IO
import Data.IORef
import Net.Concurrent as Net
instance ForkIO IO where
fork = IO.forkIO
kill = IO.killThread
instance DelayIO IO where
delay = IO.threadDelay
... | null | https://raw.githubusercontent.com/nh2/network-house/f31b6af230069f21928aae2b7242eb2c53e4d678/Net/IO.hs | haskell | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
module Net.IO(module Net) where
import qualified Control.Concurrent as IO
import Data.IORef
import Net.Concurrent as Net
instance ForkIO IO where
fork = IO.forkIO
kill = IO.killThread
instance DelayIO IO where
delay = IO.threadDelay
... | |
5fa0a49e7327c66e4cc5849b4ac540787f9936e3aa767034101abe2b46bdd77f | jedimahdi/soltan | Game.hs | module Test.Hokm.Api.Data.Game
( tests
) where
import Data.List ( (!!) )
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Data.Text as Text
import Data.UUID.Util ( Unpack... | null | https://raw.githubusercontent.com/jedimahdi/soltan/aae10d954d01d31b155d78aa095bd1149a74f8c7/backend/hokm-api/test/Test/Hokm/Api/Data/Game.hs | haskell | module Test.Hokm.Api.Data.Game
( tests
) where
import Data.List ( (!!) )
import qualified Data.Map as Map
import qualified Data.Set as Set
import qualified Data.Text as Text
import Data.UUID.Util ( Unpack... | |
4ce32ccf20eec1cdc70e18db297b7b9edbddd60c456c00e18f2790d00fc52d91 | wfnuser/sicp-solutions | e3-4.scm | (define (make-account balance password max-wrong-times)
(let ((consecutive-wrong-times 0))
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance (- balance amount)) balance)
"Insufficient funds"))
(define (deposit amount)
(s... | null | https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch3/e3-4.scm | scheme | (define (make-account balance password max-wrong-times)
(let ((consecutive-wrong-times 0))
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance (- balance amount)) balance)
"Insufficient funds"))
(define (deposit amount)
(s... | |
fea350ca0a0000957ce446ee25e86588fd258866084b10cc444abf139c19bdc2 | ml4tp/tcoq | explore.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/lib/explore.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* A search problem implements the fo... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* { 6 Search strategies . }
... |
eec42612ffae1519626574b1614d136c55c4ad0437c0986cfebe76d786a6a080 | jamesdbrock/replace-attoparsec | TestByteString.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
# LANGUAGE CPP #
module TestByteString ( tests ) where
import Distribution.TestSuite as TestSuite
import Data.Attoparsec.ByteString as A
import Data.Attoparsec.Combinator
import qualified Data.ByteString as B
import Data.... | null | https://raw.githubusercontent.com/jamesdbrock/replace-attoparsec/0502043dcf963894cca163427db4f3bf4e44e6c1/tests/TestByteString.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE PackageImports #
and succeeds. | # LANGUAGE FlexibleContexts #
# LANGUAGE CPP #
module TestByteString ( tests ) where
import Distribution.TestSuite as TestSuite
import Data.Attoparsec.ByteString as A
import Data.Attoparsec.Combinator
import qualified Data.ByteString as B
import Data.ByteString.Internal (c2w)
import "parsers" Text.Parser.Token
import... |
7ca5a1a0c14e33be58aae254a63d978c307a39176e1ceeeb9b4d20ce3154296c | choptastic/sql_bridge | sql_bridge_test.erl | %% vim: ts=4 sw=4 et sts=4
-module(sql_bridge_test).
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
-define(P(X), (sql_bridge_utils:create_placeholder(X))).
-define(P1, ?P(1)).
-define(P2, ?P(2)).
-define(P3, ?P(3)).
-define(P4, ?P(4)).
-define(P5, ?P(5)).
-define(P6, ?P(6)).
-define(P7, ?P(7)).
-defin... | null | https://raw.githubusercontent.com/choptastic/sql_bridge/079858a2cecb3f6d052c211e1d7ef12fd9aced74/src/sql_bridge_test.erl | erlang | vim: ts=4 sw=4 et sts=4
^&*()\\//\\//';[]<>./-=-=+")),
", "//\\//\\", "blah","123","-=--=-!+'\"'''''''''''''''''"])), | -module(sql_bridge_test).
-include_lib("eunit/include/eunit.hrl").
-compile(export_all).
-define(P(X), (sql_bridge_utils:create_placeholder(X))).
-define(P1, ?P(1)).
-define(P2, ?P(2)).
-define(P3, ?P(3)).
-define(P4, ?P(4)).
-define(P5, ?P(5)).
-define(P6, ?P(6)).
-define(P7, ?P(7)).
-define(P8, ?P(8)).
-define(P9, ?... |
225ebe5de82ef7835a78a8d9e0447d08ddec8bce4189ef0b0dda5fa4aaa727dc | snowleopard/hadrian | QuickCross.hs | module Settings.Flavours.QuickCross (quickCrossFlavour) where
import Expression
import Flavour
import Oracles.Flag
import {-# SOURCE #-} Settings.Default
import Settings.Flavours.Common
-- Please update doc/flavours.md when changing this file.
quickCrossFlavour :: Flavour
quickCrossFlavour = defaultFlavour
{ name... | null | https://raw.githubusercontent.com/snowleopard/hadrian/b9a3f9521b315942e1dabb006688ee7c9902f5fe/src/Settings/Flavours/QuickCross.hs | haskell | # SOURCE #
Please update doc/flavours.md when changing this file. | module Settings.Flavours.QuickCross (quickCrossFlavour) where
import Expression
import Flavour
import Oracles.Flag
import Settings.Flavours.Common
quickCrossFlavour :: Flavour
quickCrossFlavour = defaultFlavour
{ name = "quick-cross"
, args = defaultBuilderArgs <> quickCrossArgs <> defaultPackag... |
52ac5b81aa1d1868097862b8e7d86b3f32a873b3696ce916b93f7f6f497c9769 | bobbae/gosling-emacs | mh-list.ml | ; This autoloaded file implements the "l" command of mhe
(defun
(&mh-list msgn sm fn
(setq msgn (&mh-get-msgnum))
(message "Listing message " msgn) (sit-for 0)
(if
(error-occured
(pop-to-buffer (concat "+" mh-folder))
(setq fn (&mh-get-fname))
(setq sm (concat mh-print-filter
(if (= mh-print-... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/mh-list.ml | ocaml | ; This autoloaded file implements the "l" command of mhe
(defun
(&mh-list msgn sm fn
(setq msgn (&mh-get-msgnum))
(message "Listing message " msgn) (sit-for 0)
(if
(error-occured
(pop-to-buffer (concat "+" mh-folder))
(setq fn (&mh-get-fname))
(setq sm (concat mh-print-filter
(if (= mh-print-... | |
54a5533f66b883ce94dcfa364142c93407fde2d807acc2550f2de3f67976086b | camlp4/camlp4 | Camlp4OCamlRevisedPrinter.ml | (****************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/camlp4/camlp4/9b3314ea63288decb857239bd94f0c3342136844/camlp4/Camlp4Printers/Camlp4OCamlRevisedPrinter.ml | ocaml | **************************************************************************
OCaml
... | Copyright 2006 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed under
the terms of the GNU Library General Public License , with the special
Authors :
* - : initial version
* - Nicolas Pouillard: initial version
... |
a1ed9bf3eeae2cc410b9c0698d45731e459bf6126012e48dbda97e184c3626bf | SquidDev/illuaminate | span.mli | (** A file, with both a display name and absolute path *)
module Filename : sig
type t = private
{ name : string; (** A "display" name of the file, which can be shown to the user. *)
path : Fpath.t option; (** An absolute path this file may exist at. *)
id : string;
(** A unique identifier... | null | https://raw.githubusercontent.com/SquidDev/illuaminate/cd06555892d353f8dd6672c484d6455dac4c8ee5/src/core/span.mli | ocaml | * A file, with both a display name and absolute path
* A "display" name of the file, which can be shown to the user.
* An absolute path this file may exist at.
* A unique identifier for this file. This may be the path, or some other piece of data.
Generally the meaning/contents of this will vary depen... | module Filename : sig
type t = private
id : string;
}
val pp : Format.formatter -> t -> unit
include Hashtbl.HashedType with type t := t
include Set.OrderedType with type t := t
val mk : ?path:Fpath.t -> ?name:string -> string -> t
end
type filename = Filename.t = private
{ name : string;
... |
15be690e568556a5c3393ea19d7feeb132ed13a4d4103a05d3e19c1532884eb1 | xh4/web-toolkit | common-lisp.lisp | ;;;; -------------------------------------------------------------------------
;;;; Handle compatibility with multiple implementations.
;;; This file is for papering over the deficiencies and peculiarities
;;; of various Common Lisp implementations.
;;; For implementation-specific access to the system, see os.lisp inst... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/uiop-3.3.3/common-lisp.lisp | lisp | -------------------------------------------------------------------------
Handle compatibility with multiple implementations.
This file is for papering over the deficiencies and peculiarities
of various Common Lisp implementations.
For implementation-specific access to the system, see os.lisp instead.
A few funct... |
(uiop/package:define-package :uiop/common-lisp
(:nicknames :uoip/cl)
(:use :uiop/package)
(:use-reexport #-genera :common-lisp #+genera :future-common-lisp)
#+allegro (:intern #:*acl-warn-save*)
#+cormanlisp (:shadow #:user-homedir-pathname)
#+cormanlisp
(:export
#:logical-pathname #:translate-logical... |
107c27815f4e90f1bae0fee53d266456189db4a84e08e6160e6c3ea095f55549 | racket/old-plt | compiler.scm | , July 2000
;;
The main function to call the Java compiler is java - compile - file .
;; Consult the description of that function.
;;
Define JAVACOMPHOME to point where the compiler was untared .
;; ( No need to worry about the trailing slash. )
(define JAVACOMPHOME "/home/latendre/java/")
(if (not (my-direct... | null | https://raw.githubusercontent.com/racket/old-plt/a580d75deae2a0d2f3d8a93bc3c4f8f1f619b5b7/collects/java/compiler.scm | scheme |
Consult the description of that function.
( No need to worry about the trailing slash. )
Define the global variable CLASSPATH to point to the locations of
the java libraries and personal packages.
Compile a .java file into a .class file. Package name is added to
type names in the class file.
I: dir, a directo... | , July 2000
The main function to call the Java compiler is java - compile - file .
Define JAVACOMPHOME to point where the compiler was untared .
(define JAVACOMPHOME "/home/latendre/java/")
(if (not (my-directory-exists? JAVACOMPHOME))
(error "The variable JAVACOMPHOME points to a non-existing directory. ... |
c5774934d1626e1d93e618c475b7ccaf5b636555277cece8eeb20121680c78ec | 3b/cl-vulkan | extra-types.lisp | ;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
Copyright ( c ) 2016 , < >
;;; All rights reserved.
;;;
;;; 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
;... | null | https://raw.githubusercontent.com/3b/cl-vulkan/6514a1dfd168ac8d50acd923044bea79881a2685/vk/extra-types.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
All rights reserved.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, an... | Copyright ( c ) 2016 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-pack... |
7dc4cce39d7cd5f49fd7957ef6ec0ffffce3fd29ea6b59a6c06b90206d5e6648 | ghc/packages-dph | Vector.hs | {-# LANGUAGE BangPatterns #-}
module Vector (treeLookup) where
import Data.Vector.Unboxed (Vector)
import qualified Data.Vector.Unboxed as U
treeLookup :: Vector Int -> Vector Int -> Vector Int
treeLookup table xx
| U.length xx == 1
= U.singleton (table U.! (xx U.! 0))
| otherwise
= let ... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/smoke/sharing/Indices/Vector.hs | haskell | # LANGUAGE BangPatterns # | module Vector (treeLookup) where
import Data.Vector.Unboxed (Vector)
import qualified Data.Vector.Unboxed as U
treeLookup :: Vector Int -> Vector Int -> Vector Int
treeLookup table xx
| U.length xx == 1
= U.singleton (table U.! (xx U.! 0))
| otherwise
= let len = U.length xx
... |
2a4a4f9c1152ecbc9c667767b8f56daf39c0d6b9c1a890b4dc816e5e73d161bf | sim642/odep | opam_findlib.ml | (* From -dune-lint/blob/master/index.ml *)
open Common
open Std.Common_syntax
open Std.Option_syntax
module String_map = Map.Make (String)
let extract_changes_libraries findlib_map changes ~pkg =
OpamStd.String.Map.fold (fun file op findlib_map ->
match op with
| OpamDirTrack.Added _ ->
(* -1.9.... | null | https://raw.githubusercontent.com/sim642/odep/5f3c65a97946e6e07e9e4144d533aeb6fe165eaf/src/depgraph/opam_findlib.ml | ocaml | From -dune-lint/blob/master/index.ml
-1.9.6/doc/ref-html/r759.html#AEN780
-dune-lint/issues/22 | open Common
open Std.Common_syntax
open Std.Option_syntax
module String_map = Map.Make (String)
let extract_changes_libraries findlib_map changes ~pkg =
OpamStd.String.Map.fold (fun file op findlib_map ->
match op with
| OpamDirTrack.Added _ ->
begin match String.split_on_char '/' file with
... |
5b7deb904701a690052539a4a0ac839150f048895d7c06da6d7d32b583b3df94 | erikd/http-proxy | test-io.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
------------------------------------------------------------
Copyright : < >
-- License : BSD3
------------------------------------------------------------
import Control.Concurrent.Async
import Control.Exception
import Control.Monad
import Data.Conduit
import... | null | https://raw.githubusercontent.com/erikd/http-proxy/fe136a6399fd47f8b8fe15c725aabe5e69337584/test/test-io.hs | haskell | # LANGUAGE OverloadedStrings #
----------------------------------------------------------
License : BSD3
----------------------------------------------------------
Clear the `http_proxy` enviroment variable.
-----------------------------------------------------------------------------
Test the HTTP and HTTPS server... | # LANGUAGE CPP #
Copyright : < >
import Control.Concurrent.Async
import Control.Exception
import Control.Monad
import Data.Conduit
import Data.Int (Int64)
#if ! MIN_VERSION_base(4,11,0)
import Data.Monoid ((<>))
#endif
import System.Environment
import Test.Hspec
import qualified Data.ByteString.Char8 as BS
imp... |
016bbcba8790170054949e91f688e0325ddd73e9d8e61d19b5b0b2ced88e8b8a | wilbowma/cur | leb.rkt | #lang cur
(require cur/stdlib/nat
cur/stdlib/bool
cur/stdlib/sugar
cur/stdlib/equality
cur/ntac/base
cur/ntac/standard
cur/ntac/ML-rewrite
rackunit/turnstile+)
;; <= (example needing recursion on more than on arg)
(define/rec/match leb : Nat Nat -> Bool
... | null | https://raw.githubusercontent.com/wilbowma/cur/e039c98941b3d272c6e462387df22846e10b0128/cur-test/cur/tests/ntac/leb.rkt | racket | <= (example needing recursion on more than on arg) | #lang cur
(require cur/stdlib/nat
cur/stdlib/bool
cur/stdlib/sugar
cur/stdlib/equality
cur/ntac/base
cur/ntac/standard
cur/ntac/ML-rewrite
rackunit/turnstile+)
(define/rec/match leb : Nat Nat -> Bool
[z z => true]
[z (s _) => true]
[(s _) z => false]... |
75a513d5c17d19f28e93a2bc952ac1a559f1047584f31451b765fd13968ec4c3 | glguy/ssh-hans | PubKey.hs | {-# LANGUAGE OverloadedStrings #-}
module Network.SSH.PubKey where
import Control.Applicative
import qualified Data.ByteString as S
import Data.Serialize (Get, Putter, runGet, runPut)
import Crypto.Error
import Crypto.Number.Basic (numBytes)
import Crypto.Number.Seria... | null | https://raw.githubusercontent.com/glguy/ssh-hans/25d05366d4655eb249bfb13f9a6d473b49885bd9/src/Network/SSH/PubKey.hs | haskell | # LANGUAGE OverloadedStrings #
XXX TODO implement these!
no compression
| Verify server signature (in client) using server public key.
TODO(conathan): factor out the construction of the client signature
(the 'token') for reuse in the client.
^ session ID
^ username
^ initial service ... | module Network.SSH.PubKey where
import Control.Applicative
import qualified Data.ByteString as S
import Data.Serialize (Get, Putter, runGet, runPut)
import Crypto.Error
import Crypto.Number.Basic (numBytes)
import Crypto.Number.Serialize (os2ip, i2ospOf_)
import quali... |
8e42bac6dd957cf8551e84d2c6e3b52d84fecfcc96b7fb643631b273582ca909 | input-output-hk/rscoin-core | WorkMode.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- | WorkMode type class.
module RSCoin.Core.WorkMode
( WorkMode
, RealMode
, EmulationMode
, runRealModeBa... | null | https://raw.githubusercontent.com/input-output-hk/rscoin-core/5b3fde8de1bdce71ee6ea0e8f1582ea28f451171/src/RSCoin/Core/WorkMode.hs | haskell | # LANGUAGE FlexibleContexts #
| WorkMode type class. | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module RSCoin.Core.WorkMode
( WorkMode
, RealMode
, EmulationMode
, runRealModeBank
, runRealModeUntrusted
, runRealModeWithContext
... |
b6cd31d64b350414d751f43c65beaff3928048cb08e405ebac0eb57c9de3ff73 | danw/erlsom | erlsom_pass2.erl | Copyright ( C ) 2006 - 2008
%%%
This file is part of Erlsom .
%%%
Erlsom is free software : you can redistribute it and/or modify
%%% it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later... | null | https://raw.githubusercontent.com/danw/erlsom/84fed075d689e7cbe98e53c701b2fb5c51a35d12/src/erlsom_pass2.erl | erlang |
it under the terms of the GNU Lesser General Public License as
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
</>.
Author contact:
====================================================================
erlsom_parse.
=============... | Copyright ( C ) 2006 - 2008
This file is part of Erlsom .
Erlsom is free software : you can redistribute it and/or modify
published by the Free Software Foundation , either version 3 of
the License , or ( at your option ) any later version .
Erlsom is distributed in the hope that it will be useful ,
GN... |
0b18cd8aab14171643a94ecebd7ec2c9c9a7a0ba91c4c3ad4d4e738c9d55069c | roehst/tapl-implementations | core.mli | module Core
Core typechecking and evaluation functions
Core typechecking and evaluation functions
*)
open Syntax
open Support.Error
val eval : term -> term
| null | https://raw.githubusercontent.com/roehst/tapl-implementations/23c0dc505a8c0b0a797201a7e4e3e5b939dd8fdb/arith/core.mli | ocaml | module Core
Core typechecking and evaluation functions
Core typechecking and evaluation functions
*)
open Syntax
open Support.Error
val eval : term -> term
| |
2b3e9b0af69a1d5eec69566c9183040f722e7f4681df69a3a2871bf31e532ae4 | ucsd-progsys/dsolve | arraymax.ml | let max x y =
if x > y then x else y
let foldn n b f =
let rec loop i c =
if i < n then loop (i+1) (f i c) else c in
loop 0 b
let arraymax a =
let am l m = max (Array.get a l) m in
foldn (Array.length a) 0 am
let vec = Array.make (Random.int 40) max_int
let _ = arraymax vec
| null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/arraymax.ml | ocaml | let max x y =
if x > y then x else y
let foldn n b f =
let rec loop i c =
if i < n then loop (i+1) (f i c) else c in
loop 0 b
let arraymax a =
let am l m = max (Array.get a l) m in
foldn (Array.length a) 0 am
let vec = Array.make (Random.int 40) max_int
let _ = arraymax vec
| |
239d481ecd3259dc4921d1bfc0cbcd1e55d739db93214ae318bc2710a1e61e82 | alexandroid000/improv | String.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Std_msgs.String where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Std_msgs/Ros/Std_msgs/String.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Std_msgs.String where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generics as G
import qua... |
0035506243ef7429cd952bc6a8af4cbd6dfd677e007550223dcdc963cc13612b | Michaelt293/isotope | BaseSpec.hs | # LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleInstances #
module Isotope.BaseSpec (spec) where
import Isotope
import Test.Hspec
import Test.QuickCheck
import Control.Monad
import Data.Char
import Data.List
spec :: Spec
spec = do
describe "ElementSymbol" $ do
it "should not have more than two characters" $
... | null | https://raw.githubusercontent.com/Michaelt293/isotope/61d2bba5cb98ef5e85cf9fc4cc6f0e88aa5c3368/test/Isotope/BaseSpec.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE FlexibleInstances #
module Isotope.BaseSpec (spec) where
import Isotope
import Test.Hspec
import Test.QuickCheck
import Control.Monad
import Data.Char
import Data.List
spec :: Spec
spec = do
describe "ElementSymbol" $ do
it "should not have more than two characters" $
... | |
ccdd9a538e982b74106edd563d17eaedead1c36bec7a70e145533eb18e8eadfb | johnswanson/tictag | users.clj | (ns tictag.users
(:require [tictag.db :as db]
[tictag.jwt :as jwt]))
| null | https://raw.githubusercontent.com/johnswanson/tictag/89140b5084817690ec417b07b7d095ba7677f4e0/src/clj/tictag/users.clj | clojure | (ns tictag.users
(:require [tictag.db :as db]
[tictag.jwt :as jwt]))
| |
8ac41e75f782a2832331ab73abb739bf95d3ba1b73fa6174d712c1d3439235b0 | TImada/mirage_iperf | config.ml | open Mirage
let sv4v6 =
generic_stackv4v6 default_network
let packages = [ package "rresult" ]
let main = main ~packages "Unikernel.Main" (stackv4v6 @-> mclock @-> job)
let () =
register "iperf_server" [
main $ sv4v6 $ default_monotonic_clock
]
| null | https://raw.githubusercontent.com/TImada/mirage_iperf/83cbb7ca0310d5e8aadc57e3f11106ab17a04517/iperf_server/config.ml | ocaml | open Mirage
let sv4v6 =
generic_stackv4v6 default_network
let packages = [ package "rresult" ]
let main = main ~packages "Unikernel.Main" (stackv4v6 @-> mclock @-> job)
let () =
register "iperf_server" [
main $ sv4v6 $ default_monotonic_clock
]
| |
e6089d78bc32ac0496c410998af7e4a60e21f043f2d555ba464b5e1f964e97b6 | diku-dk/futhark | SegScan.hs | | Code generation for ' SegScan ' . Dispatches to either a
single - pass or two - pass implementation , depending on the nature of
-- the scan and the chosen abckend.
module Futhark.CodeGen.ImpGen.GPU.SegScan (compileSegScan) where
import Futhark.CodeGen.ImpCode.GPU qualified as Imp
import Futhark.CodeGen.ImpGen... | null | https://raw.githubusercontent.com/diku-dk/futhark/98e4a75e4de7042afe030837084764bbf3c6c66e/src/Futhark/CodeGen/ImpGen/GPU/SegScan.hs | haskell | the scan and the chosen abckend.
The single-pass scan does not support multiple operators, so jam
them together here.
Assumed
various kernels. | | Code generation for ' SegScan ' . Dispatches to either a
single - pass or two - pass implementation , depending on the nature of
module Futhark.CodeGen.ImpGen.GPU.SegScan (compileSegScan) where
import Futhark.CodeGen.ImpCode.GPU qualified as Imp
import Futhark.CodeGen.ImpGen hiding (compileProg)
import Futhark... |
ff7310ec581e67c99b466b88bd800cb7b99f70d964f0925262b708c04a62483a | vincenthz/hs-connection | SocksConnection.hs | import qualified Data.ByteString as B
import Network.Connection
main = do
ctx <- initConnectionContext
con <- connectTo ctx $ ConnectionParams
{ connectionHostname = "www.example.com"
, connectionPort = 4567
, conne... | null | https://raw.githubusercontent.com/vincenthz/hs-connection/8bb6062629eff93aef6324120bc9399f24050390/examples/SocksConnection.hs | haskell | import qualified Data.ByteString as B
import Network.Connection
main = do
ctx <- initConnectionContext
con <- connectTo ctx $ ConnectionParams
{ connectionHostname = "www.example.com"
, connectionPort = 4567
, conne... | |
920fea89ce15211cc886da780ae822f099d1c2a7965c357c9e8de0cd261bf36c | v-kolesnikov/sicp | 1_12.clj | (ns sicp.chapter01.1-12)
(defn pascal-triangle-element [n k]
(cond
(or (neg? k)
(neg? n)
(< n k)) nil
(or (zero? k)
(= k n)) 1
(or (= k 1)
(= k (dec n))) n
:else (+ (pascal-triangle-element (dec n)
(dec k))
(pascal-tri... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter01/1_12.clj | clojure | (ns sicp.chapter01.1-12)
(defn pascal-triangle-element [n k]
(cond
(or (neg? k)
(neg? n)
(< n k)) nil
(or (zero? k)
(= k n)) 1
(or (= k 1)
(= k (dec n))) n
:else (+ (pascal-triangle-element (dec n)
(dec k))
(pascal-tri... | |
cbf6dbc1de17489da5893f8baf4d6805a652319527175ab3e16fb2e07719e916 | mefyl/dune-cache-daemon | local.ml | open Stdune
type t =
{ cache : Cache.Local.t
; throttle : unit Async.Throttle.t
; tmp : Path.t
}
let make cache =
{ cache
; throttle =
Async.Throttle.create ~continue_on_error:true ~max_concurrent_jobs:128
; tmp = Cache.Local.tmp_path cache "dune-cache-daemon"
}
let tmp { tmp; _ } = tmp
let th... | null | https://raw.githubusercontent.com/mefyl/dune-cache-daemon/f6debe2598aaa97e31e37c93b3aa2fbff55f3137/src/sietch/local.ml | ocaml | open Stdune
type t =
{ cache : Cache.Local.t
; throttle : unit Async.Throttle.t
; tmp : Path.t
}
let make cache =
{ cache
; throttle =
Async.Throttle.create ~continue_on_error:true ~max_concurrent_jobs:128
; tmp = Cache.Local.tmp_path cache "dune-cache-daemon"
}
let tmp { tmp; _ } = tmp
let th... | |
07b2f698a6da3cd43d2cd034217e69760d48819aec9e79fa456e3fcb56c270d2 | thheller/shadow-cljsjs | pl.cljs | (ns cljsjs.moment.locale.pl
(:require ["moment/locale/pl"]))
| null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/pl.cljs | clojure | (ns cljsjs.moment.locale.pl
(:require ["moment/locale/pl"]))
| |
3d21ef6bc21b3218b891e4c2894fab6932e7806a4991abc4f8c5504493c7e56b | thi-ng/demos | shaders.cljs | (ns ex06.shaders
(:require
[thi.ng.geom.matrix :as mat]
[thi.ng.geom.gl.fx :as fx]
[thi.ng.glsl.core :as glsl :include-macros true]
[thi.ng.glsl.color :as col]
[thi.ng.glsl.vertex :as vertex]
[thi.ng.dstruct.core :as d]))
(def threshold-shader-spec
(d/merge-deep
fx/shader-spec
{:fs (->> "vo... | null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-8/day3/ex06/src/ex06/shaders.cljs | clojure |
:blend true
:blend-fn [glc/src-alpha glc/one] | (ns ex06.shaders
(:require
[thi.ng.geom.matrix :as mat]
[thi.ng.geom.gl.fx :as fx]
[thi.ng.glsl.core :as glsl :include-macros true]
[thi.ng.glsl.color :as col]
[thi.ng.glsl.vertex :as vertex]
[thi.ng.dstruct.core :as d]))
(def threshold-shader-spec
(d/merge-deep
fx/shader-spec
{:fs (->> "vo... |
e8ca6287d954d63726d1ebaa30519578c31558837e98c72397f1260ad6dc805f | ghc/nofib | Main.hs | module Main where
import Control.Monad (replicateM_)
import System.Environment (getArgs)
import Prog (prog)
# ifdef PAR
-- main input = prog input
-- #else
suspect : main ~((Str str ): _ ) = [ ReadChan stdin , AppendChan stdout ( prog str ) ]
main = do
(n:_) <- getArgs
replicateM_ (read n) $ do
(s:_) <- getAr... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/minimax/Main.hs | haskell | main input = prog input
#else
#endif | module Main where
import Control.Monad (replicateM_)
import System.Environment (getArgs)
import Prog (prog)
# ifdef PAR
suspect : main ~((Str str ): _ ) = [ ReadChan stdin , AppendChan stdout ( prog str ) ]
main = do
(n:_) <- getArgs
replicateM_ (read n) $ do
(s:_) <- getArgs
length (prog s) `seq` return ()... |
d52c1fcc1761f679e8f47f81294d92efe11e2485a609465ff482c1520ec32d76 | Ptival/chick | Term.hs | module Examples.Term
( terms,
)
where
import Examples.Inductive (inductives)
import Inductive.Eliminator (mkEliminatorRawType)
import Parsing.Unsafe (unsafeParseTerm)
import qualified StandardLibrary as STDLIB
import qualified Term.Raw as Raw
import Term.Variable (Variable)
terms :: [Raw.Term Variable]
terms =
... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Examples/Term.hs | haskell | These contain duplicates:
++ [ constructorRawType True c | i <- inductives
, c <- inductiveConstructors i
] | module Examples.Term
( terms,
)
where
import Examples.Inductive (inductives)
import Inductive.Eliminator (mkEliminatorRawType)
import Parsing.Unsafe (unsafeParseTerm)
import qualified StandardLibrary as STDLIB
import qualified Term.Raw as Raw
import Term.Variable (Variable)
terms :: [Raw.Term Variable]
terms =
... |
c760546f7dd343d8bb60db63f7d5664bf5de3646ac8589fe78ed7c6abfb1bcaa | 2600hz-archive/whistle | rabbit_version.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/rabbitmq_server-2.4.1/src/rabbit_version.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
---------------... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2007 - 2011 VMware , Inc. All rights reserved .
-module(rabbi... |
c55a89142b5878ccb102d5bf94526572fb4109ab36826a66c24f8b89b947bab7 | bgusach/exercises-htdp2e | ex-271.rkt | #lang htdp/isl
(require test-engine/racket-tests)
# # # Constants
# # # Data Definitions
# # # Functions
; String [List-of String] -> Boolean
Returns whether any string in los starts with str
(check-expect (find-name "john" '("matt" "paco" "sven")) #false)
(check-expect (find-name "john" '("matt" "johnny" ... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-271.rkt | racket | String [List-of String] -> Boolean
String -> Boolean
Returns whether some-str starts with str
-- IN --
[List-of String] -> [List-of String]
Checks whether all names of list start with "a"
String -> Boolean
-- IN --
ensures that no name on some list exceeds some given width?
| #lang htdp/isl
(require test-engine/racket-tests)
# # # Constants
# # # Data Definitions
# # # Functions
Returns whether any string in los starts with str
(check-expect (find-name "john" '("matt" "paco" "sven")) #false)
(check-expect (find-name "john" '("matt" "johnny" "sven", "joe")) #true)
(define (find-... |
3e86d546b67a1517d2dd89fea16ebfb77d8d8c0821dae5f0757ebe0d549d29a9 | Deep-Symmetry/afterglow | movement.clj | (ns afterglow.effects.movement
"Effects pipeline functions for working with direction assignments
to fixtures and heads."
{:author "James Elliott"}
(:require [afterglow.channels :as channels]
[afterglow.effects.channel :as chan-fx]
[afterglow.effects.params :as params]
[after... | null | https://raw.githubusercontent.com/Deep-Symmetry/afterglow/12b8c90f22c591549adc4d89b8a19853f5e9e3a5/src/afterglow/effects/movement.clj | clojure | Resolve in case assignment is still frame dynamic
We are blending, so we need to resolve any remaining dynamic parameters now, and make sure
Resolve in case assignment is still frame dynamic
We are blending, so we need to resolve any remaining dynamic parameters now, and make sure
Resolve in case assignment is sti... | (ns afterglow.effects.movement
"Effects pipeline functions for working with direction assignments
to fixtures and heads."
{:author "James Elliott"}
(:require [afterglow.channels :as channels]
[afterglow.effects.channel :as chan-fx]
[afterglow.effects.params :as params]
[after... |
67eb8847fadcca9141ad6f7438b8d7a5e36c4c40999d7add2c66264602ef46e3 | mlabs-haskell/ogmios-datum-cache | Env.hs | module App.Env (
Env (..),
ControlApiToken (..),
) where
import Control.Concurrent.MVar (MVar)
import Control.Monad.Reader.Has (Has)
import Data.String (IsString (fromString))
import GHC.Generics (Generic)
import Hasql.Connection qualified as Hasql
import Block.Fetch (BlockFetcherEnv, BlockProcessorEnv)
data Env... | null | https://raw.githubusercontent.com/mlabs-haskell/ogmios-datum-cache/f7c748ef240b83ca1f1415d5cb7dd8f87400a426/src/App/Env.hs | haskell | TODO: Switch to pool of connections | module App.Env (
Env (..),
ControlApiToken (..),
) where
import Control.Concurrent.MVar (MVar)
import Control.Monad.Reader.Has (Has)
import Data.String (IsString (fromString))
import GHC.Generics (Generic)
import Hasql.Connection qualified as Hasql
import Block.Fetch (BlockFetcherEnv, BlockProcessorEnv)
data Env... |
9d2374f7765b2086ce11ce69f044589eee8986ec290ea540111e6c09c5d9cea7 | satos---jp/mincaml_self_hosting | closure_buggy.ml | (let rec f x = x + 123 in
let rec g y = f in
print_int ((g 456) 789));
(let rec f n =
if n < 0 then () else
(print_int n;
let a = create_array 1 f in
a.(0) (n - 1)) in
f 9);
(* 自由変数のある再帰関数 *)
(let x = 10 in
let rec f y =
if y = 0 then 0 else
x + f (y - 1) in
print_int (f 123));
(let rec h p =
let ... | null | https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/test/closure_buggy.ml | ocaml | 自由変数のある再帰関数 | (let rec f x = x + 123 in
let rec g y = f in
print_int ((g 456) 789));
(let rec f n =
if n < 0 then () else
(print_int n;
let a = create_array 1 f in
a.(0) (n - 1)) in
f 9);
(let x = 10 in
let rec f y =
if y = 0 then 0 else
x + f (y - 1) in
print_int (f 123));
(let rec h p =
let (v1,v2,v3,v4,v5,v6... |
ed23c1c96ce10c26384b2e1a46db5006cd4717c896c14c1fb9f0fceb8f6ebdf5 | nasser/magic | test_fixtures.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/tests/clojure/test_clojure/test_fixtures.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
by
March 28 , 2009
(ns clojure.test-clojure.test-fixtures
(:use clojure.test))
(declare ^:dynamic *a* ^:dynamic *b* ^:dynamic *c* ^:dynamic *d*)
(def ^:dynamic *n* 0)
(defn fixture-a [f]
(binding [*a* 3] (f)))
(defn fixture-b [f]
(binding [*b* 5] (f)))
(... |
e0ccecddb73faacc92de4961fd031fbe2fe239ac8f3ff5cde8685b8b11613c0e | parsimony-ide/parsimony | brics.clj | (ns parsimony.rdag.xform.brics
"Conversion of Parsimony AST to BRICS regular expression input string"
(:import [parsimony.rdag.xform.common Named])
(:require [clojure.edn :as edn]
[instaparse.core :as insta]
[clojure.pprint :refer [pprint]]
[parsimony.rdag.tree-visitor :refer [... | null | https://raw.githubusercontent.com/parsimony-ide/parsimony/1744e8b4a921a50dfbd0815499cf3af1059590c8/src/parsimony/rdag/xform/brics.clj | clojure |
Semantic Checks
things not allowed inside negations: !,?,*,+,{},&,concat
Main
keep the backslash on everything else (i.e., \< stays \<)
This construct is added by the bang-negate rewrite rule. It is never part of the initial concrete parse tree. | (ns parsimony.rdag.xform.brics
"Conversion of Parsimony AST to BRICS regular expression input string"
(:import [parsimony.rdag.xform.common Named])
(:require [clojure.edn :as edn]
[instaparse.core :as insta]
[clojure.pprint :refer [pprint]]
[parsimony.rdag.tree-visitor :refer [... |
6040a751ad1cd62cf62b736a64a66cf3fb45ea4c90afe9b90ed850f786f4fc87 | tisnik/clojure-examples | details.clj | {:aliases {"downgrade" "upgrade"},
:checkout-deps-shares
[:source-paths
:test-paths
:resource-paths
:compile-path
"#'leiningen.core.classpath/checkout-deps-paths"],
:clean-targets [:target-path],
:compile-path
"/home/ptisnovs/src/clojure/clojure-examples/webapp1/target/default/classes",
:dependencies
([o... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/3c49a9cb32fa4511f925956644cc477c7123532c/webapp1/doc/details.clj | clojure | {:aliases {"downgrade" "upgrade"},
:checkout-deps-shares
[:source-paths
:test-paths
:resource-paths
:compile-path
"#'leiningen.core.classpath/checkout-deps-paths"],
:clean-targets [:target-path],
:compile-path
"/home/ptisnovs/src/clojure/clojure-examples/webapp1/target/default/classes",
:dependencies
([o... | |
e0edc0653b735b2499ff612fb4ddc2023efeb80528b5629c6a942b7791ab9590 | fourmolu/fourmolu | output-LetInline-InLeftAlign-indent=2.hs | {-- should be the same in every option --}
let_oneline_empty =
let in 10
let_oneline_single =
let a = 1 in a + 2
let_oneline_multi =
let a = 1; b = 2 in a + b
{-- pure let expressions --}
let_empty =
let
in 10
let_single =
let a = 1
in a + 2
let_single_sig =
let a :: Int
a = 1
in a + 2... | null | https://raw.githubusercontent.com/fourmolu/fourmolu/f47860f01cb3cac3b973c5df6ecbae48bbb4c295/data/fourmolu/let-style/output-LetInline-InLeftAlign-indent%3D2.hs | haskell | - should be the same in every option -
- pure let expressions -
a comment
- do-block -
- list comprehension - |
let_oneline_empty =
let in 10
let_oneline_single =
let a = 1 in a + 2
let_oneline_multi =
let a = 1; b = 2 in a + b
let_empty =
let
in 10
let_single =
let a = 1
in a + 2
let_single_sig =
let a :: Int
a = 1
in a + 2
let_single_comment =
a = 1
in a + 2
let_multi =
let a = 1
... |
2ef75ee2125b4d56ab7e63737fa10e63e1b2a84df4563ac0b7cca6c69488b4cf | cstar/ejabberd-old | mod_offline_odbc.erl | %%%----------------------------------------------------------------------
File :
Author : < >
%%% Purpose : Store and manage offline messages in relational database.
Created : 5 Jan 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
%%%
%%% This program is free software; you... | null | https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/mod_offline_odbc.erl | erlang | ----------------------------------------------------------------------
Purpose : Store and manage offline messages in relational database.
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,... | File :
Author : < >
Created : 5 Jan 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public L... |
2d2adc3fb2e786b5eef772f043aa64f662d0ed25d5e1c14e81cbb2593835dac9 | racket/redex | test-util.rkt | #lang scheme
(require redex/private/matcher
redex/private/lang-struct
(for-syntax syntax/parse redex/private/keyword-macros)
racket/runtime-path)
(provide test tests reset-count
print-tests-passed
equal/bindings?
test-contract-violation
test/proc)
(define... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-test/redex/tests/private/test-util.rkt | racket | equal/bindings? : any any -> boolean
uses an order-insensitive comparison for the bindings
rib-lt : rib rib -> boolean | #lang scheme
(require redex/private/matcher
redex/private/lang-struct
(for-syntax syntax/parse redex/private/keyword-macros)
racket/runtime-path)
(provide test tests reset-count
print-tests-passed
equal/bindings?
test-contract-violation
test/proc)
(define... |
756d0349a29bdf967f8ce0659fa7a4e82382cb70d2d39bc7cc4372be28eebabc | tqtezos/stablecoin | External.hs | SPDX - FileCopyrightText : 2021 Oxhead Alpha
SPDX - License - Identifier : MIT
-- | This a dummy file that resembles lorentz-contract-transferlist parameter needed for origination.
--
-- For more information you can refer to
-- -contract-transferlist/tree/476c0429adf74041ed7d26c44e5e8e73f5a54f36
module Indigo.Con... | null | https://raw.githubusercontent.com/tqtezos/stablecoin/0780ec8f3784c107742b266fcd11ee8ee5442ff6/haskell/src/Indigo/Contracts/Transferlist/External.hs | haskell | | This a dummy file that resembles lorentz-contract-transferlist parameter needed for origination.
For more information you can refer to
-contract-transferlist/tree/476c0429adf74041ed7d26c44e5e8e73f5a54f36
| Construct an external whitelist storage from our internal one.
This function basically converts `Set (from... | SPDX - FileCopyrightText : 2021 Oxhead Alpha
SPDX - License - Identifier : MIT
module Indigo.Contracts.Transferlist.External
( Storage (..)
, convertToExternalStorage
) where
import Data.List qualified as List
import Data.Map qualified as Map
import Data.Set qualified as Set
import Indigo.Contracts.Transf... |
9e4f47683b9be2169738d64207d59da012ab9eb1a8a7d752462c4a54d92691bc | ajhc/ajhc | Gen.hs |
| similar to GenUtil but can rely on non - haskell 98 features
module Util.Gen(module Util.Gen, module GenUtil, intercalate) where
import Control.Monad.Writer
import Data.List
import Data.Maybe
import System.Directory
import Control.Applicative
import Text.ParserCombinators.ReadP
import GenUtil hiding(replicateM, ... | null | https://raw.githubusercontent.com/ajhc/ajhc/8ef784a6a3b5998cfcd95d0142d627da9576f264/src/Util/Gen.hs | haskell |
| similar to GenUtil but can rely on non - haskell 98 features
module Util.Gen(module Util.Gen, module GenUtil, intercalate) where
import Control.Monad.Writer
import Data.List
import Data.Maybe
import System.Directory
import Control.Applicative
import Text.ParserCombinators.ReadP
import GenUtil hiding(replicateM, ... | |
063363a61c35f6472c1de53f13e4091384e2687eb66d0f5f49abd228a15e7428 | 3b/learnopengl | shaders.lisp | (defpackage learning-opengl-shaders
(:use #:3bgl-glsl/cl))
(in-package learning-opengl-shaders)
;; "in" variables are defined with (input name type &key location stage)
(input position :vec3 :location 0)
(input color :vec3 :location 1)
;; if we want to use the same name for different things in different
;; stages, w... | null | https://raw.githubusercontent.com/3b/learnopengl/30f910895ef336ac5ff0b4cc676af506413bb953/getting-started/shaders.lisp | lisp | "in" variables are defined with (input name type &key location stage)
if we want to use the same name for different things in different
stages, we need to specify which we mean. If a stage isn't
specified, the definition will be included in any stage that uses
the variable.
"out" variables use (output ...)
uni... | (defpackage learning-opengl-shaders
(:use #:3bgl-glsl/cl))
(in-package learning-opengl-shaders)
(input position :vec3 :location 0)
(input color :vec3 :location 1)
(output color :vec4 :stage :fragment)
(uniform our-color :vec3 :stage :fragment)
(defun shaders-uniform-vertex ()
(setf gl-position (vec4 position 1)... |
4df8f2cf78e2781cdeee087f51498fb494e1dde9fb92af88ad50a91de49c986e | pa-ba/Rattus | Dependency.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE CPP #
{-# LANGUAGE GADTs #-}
-- | This module is used to perform a dependency analysis of top-level
function definitions , i.e. to find out which defintions are
-- (mutual) recursive. To this end, this module al... | null | https://raw.githubusercontent.com/pa-ba/Rattus/df89c371010a543ead9733026bad6ab3d44d6af0/src/Rattus/Plugin/Dependency.hs | haskell | # LANGUAGE GADTs #
| This module is used to perform a dependency analysis of top-level
(mutual) recursive. To this end, this module also provides a
functions to compute, bound variables and variable occurrences.
| Compute the dependencies of a bag of bindings, returning a list
of the strongly-connected components.... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE CPP #
function definitions , i.e. to find out which defintions are
module Rattus.Plugin.Dependency (dependency, HasBV (..),printBinds) where
#if __GLASGOW_HASKELL__ >= 900
import GHC.Plugins
import GHC.Data.Ba... |
173aa167f5d9d996655b301855c749be4c725443d5ab805f78f88c24b1622686 | jrh13/hol-light | Wellfounded_induction.ml | let NSQRT_2 = prove
(`!p q. p * p = 2 * q * q ==> q = 0`,
MATCH_MP_TAC num_WF THEN REWRITE_TAC[RIGHT_IMP_FORALL_THM] THEN
REPEAT STRIP_TAC THEN FIRST_ASSUM(MP_TAC o AP_TERM `EVEN`) THEN
REWRITE_TAC[EVEN_MULT; ARITH] THEN REWRITE_TAC[EVEN_EXISTS] THEN
DISCH_THEN(X_CHOOSE_THEN `m:num` SUBST_ALL_TAC) THEN
FIRST... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Tutorial/Wellfounded_induction.ml | ocaml | let NSQRT_2 = prove
(`!p q. p * p = 2 * q * q ==> q = 0`,
MATCH_MP_TAC num_WF THEN REWRITE_TAC[RIGHT_IMP_FORALL_THM] THEN
REPEAT STRIP_TAC THEN FIRST_ASSUM(MP_TAC o AP_TERM `EVEN`) THEN
REWRITE_TAC[EVEN_MULT; ARITH] THEN REWRITE_TAC[EVEN_EXISTS] THEN
DISCH_THEN(X_CHOOSE_THEN `m:num` SUBST_ALL_TAC) THEN
FIRST... | |
5e580019452235b8d93147a82c7b979062539d2e226a2f301458157007b4a657 | spurious/chibi-scheme-mirror | srfi-27-tests.scm |
(import (chibi)
(srfi 27)
(chibi test))
(test-begin "srfi-27")
(define (test-random rand n)
(test-assert (<= 0 (rand n) (- n 1))))
(let ((rs (make-random-source)))
;; chosen by fair dice roll. guaranteed to be random
(random-source-pseudo-randomize! rs 4 4)
(let ((rand (random-source-make-i... | null | https://raw.githubusercontent.com/spurious/chibi-scheme-mirror/49168ab073f64a95c834b5f584a9aaea3469594d/tests/srfi-27-tests.scm | scheme | chosen by fair dice roll. guaranteed to be random
the next int won't be the same, but it will be after
resetting the state |
(import (chibi)
(srfi 27)
(chibi test))
(test-begin "srfi-27")
(define (test-random rand n)
(test-assert (<= 0 (rand n) (- n 1))))
(let ((rs (make-random-source)))
(random-source-pseudo-randomize! rs 4 4)
(let ((rand (random-source-make-integers rs)))
(do ((k 0 (+ k 5))
(n 1 (* n ... |
26c03475daacbc4ebce5218c6401f3d90e0e6ff6b04b7fa0879ffbc4240ad5e1 | bmeurer/ocaml-experimental | tsort.ml | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of Objective Caml
(* *)
, , and ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/compiler/tsort.ml | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of Objective Caml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
7e7dcecafec0383a44fd359d5992aa986945f02e671a9d2a7feffaaa7dcde4ea | AbstractMachinesLab/caramel | queue.mli | type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit
val pop : 'a t -> 'a option
val pop_exn : 'a t -> 'a
val peek : 'a t -> 'a option
val peek_exn : 'a t -> 'a
val clear : 'a t -> unit
val copy : 'a t -> 'a t
val is_empty : 'a t -> bool
val length : 'a t -> int
val iter : 'a t -> f:('a -> unit)... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/queue.mli | ocaml | type 'a t
val create : unit -> 'a t
val push : 'a t -> 'a -> unit
val pop : 'a t -> 'a option
val pop_exn : 'a t -> 'a
val peek : 'a t -> 'a option
val peek_exn : 'a t -> 'a
val clear : 'a t -> unit
val copy : 'a t -> 'a t
val is_empty : 'a t -> bool
val length : 'a t -> int
val iter : 'a t -> f:('a -> unit)... | |
30f1bbc3e9076a75043aa5323c4e0a36442e8fb1b8103fa4313ed93a36074062 | coq-community/coqffi | gen_shim.ml | open Format
open Coqffi.Translation
let rec ( -- ) x y = if x < y then x :: (x + 1 -- y) else [ y ]
let pp_tuple_def fmt n =
let pp_poly_type fmt n = fprintf fmt "'a%d" n in
fprintf fmt "@[<v 2>type (%a) tuple%n =@ %a@]"
(pp_print_list ~pp_sep:(fun fmt _ -> pp_print_string fmt ", ") pp_poly_type)
(1 -- n)... | null | https://raw.githubusercontent.com/coq-community/coqffi/55d9f75170e7b023c486a1d0826a81a0d62ac3de/shim/gen_shim.ml | ocaml | open Format
open Coqffi.Translation
let rec ( -- ) x y = if x < y then x :: (x + 1 -- y) else [ y ]
let pp_tuple_def fmt n =
let pp_poly_type fmt n = fprintf fmt "'a%d" n in
fprintf fmt "@[<v 2>type (%a) tuple%n =@ %a@]"
(pp_print_list ~pp_sep:(fun fmt _ -> pp_print_string fmt ", ") pp_poly_type)
(1 -- n)... | |
34ea18e84152d6683a9c76e4b9a4ecc0cc47c8dc7a809b3c91f52289a7e08445 | racket/typed-racket | with-input-from-file.rkt | #lang typed/racket/base/shallow
;; Test 'with-input-from-file'
(: main (-> Path-String Void))
(define (main filename)
(define q (with-input-from-file filename (lambda () (read))))
(void))
| null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/with-input-from-file.rkt | racket | Test 'with-input-from-file' | #lang typed/racket/base/shallow
(: main (-> Path-String Void))
(define (main filename)
(define q (with-input-from-file filename (lambda () (read))))
(void))
|
82b7bae9a3f2141ef39b70632f82d74d8101eaf5bbcb45be59e85522115af45c | ocaml/oasis-db | ODBVFSUnion.ml |
* unionfs , use a list of VFS to create a new filesystem
@author
@author Sylvain Le Gall
*)
open Lwt
open OASISUtils
class read_only lst =
object (self)
inherit ODBVFS.read_only
method id =
Printf.sprintf
"union(%s)://"
(String.concat ", " (List.map (fun fs -> fs... | null | https://raw.githubusercontent.com/ocaml/oasis-db/f8b19d431102b5c5b7dced00a5242a5366ad263f/src/lib/ODBVFSUnion.ml | ocaml |
* unionfs , use a list of VFS to create a new filesystem
@author
@author Sylvain Le Gall
*)
open Lwt
open OASISUtils
class read_only lst =
object (self)
inherit ODBVFS.read_only
method id =
Printf.sprintf
"union(%s)://"
(String.concat ", " (List.map (fun fs -> fs... | |
74b39e9edf800e1cb69d5fd732c165f8520d6822055868bcc8bfc8fc12d252e3 | jabber-at/ejabberd-contrib | scram2.erl | %%%----------------------------------------------------------------------
File : scram.erl
Author : < >
Purpose : SCRAM ( RFC 5802 )
Created : 7 Aug 2011 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2013 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modi... | null | https://raw.githubusercontent.com/jabber-at/ejabberd-contrib/d5eb036b786c822d9fd56f881d27e31688ec6e91/ejabberd_auth_http/src/scram2.erl | erlang | ----------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | File : scram.erl
Author : < >
Purpose : SCRAM ( RFC 5802 )
Created : 7 Aug 2011 by < >
ejabberd , Copyright ( C ) 2002 - 2013 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have recei... |
1565dc8ccabbca97e59ab2847d7a9adf391f15fdb03d759e9225a898f1a39335 | ormf/cm | ms2-answers.lisp |
(in-package :cm)
THIS FILE REQUIRES MSUTILS.LISP
(defparameter *ms* (midishare-open))
MS : OUTPUT is a low - level function that sends a MidiEv to
Midishare : ( ms : output ev to & optional ahead )
(ms:output (ms:new typeNote :port *dk* :chan 0
:pitch 60 :vel 90 :dur 1000)
:t... | null | https://raw.githubusercontent.com/ormf/cm/26843eec009bd6c214992a8e67c49fffa16d9530/doc/404B-SoundSynth-AlgoComp/www-camil.music.uiuc.edu_16080/classes/404B/lisp/ms2-answers.lisp | lisp | TODO: Write a LOOP that plays a fast C-minor scale on the disklavier:
MIDI THRU hooks
inside a SET-RECEIVER! hook. The hook will "respond" to input by
sending output, possibly based on conditional tests.
TODO: Set JV in LOCAL OFF MODE
TODO: Write a thru hook that simply plays whatever key you press on
(defun ji... |
(in-package :cm)
THIS FILE REQUIRES MSUTILS.LISP
(defparameter *ms* (midishare-open))
MS : OUTPUT is a low - level function that sends a MidiEv to
Midishare : ( ms : output ev to & optional ahead )
(ms:output (ms:new typeNote :port *dk* :chan 0
:pitch 60 :vel 90 :dur 1000)
:t... |
d70e08d91fb29966052d8c4b8689d3ce87503a275d1728d85ed76d051962c911 | MMagueta/MMaguetaGuix | discord.scm | (define-module (nongnu packages discord)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system trivial)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages compression)
#:use-module (gnu packages cups)
#:use-module (gnu pa... | null | https://raw.githubusercontent.com/MMagueta/MMaguetaGuix/d4cd3abf4a0dd0f60cc788f5e9ad0bc29a1611a6/nongnu/packages/discord.scm | scheme | ("systemd" ,systemd) | (define-module (nongnu packages discord)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system trivial)
#:use-module (gnu packages base)
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages compression)
#:use-module (gnu packages cups)
#:use-module (gnu pa... |
80844ad33d29965c333b83e0dfeb9d74e46e567070956a0c8f4497873ad16de2 | acl2/acl2 | svex-reduce-with-env@useless-runes.lsp | (SV::4VEC->UPPER-AND-LOWER-EQUIVALANCE
(1 1 (:REWRITE INTEGER-LISTP-IMPLIES-INTEGERP))
)
(SVL::SVEX-P-OF-CONSED
(28 2 (:REWRITE SV::SVEX-P-WHEN-MAYBE-SVEX-P))
(25 1 (:REWRITE SV::MAYBE-SVEX-P-WHEN-SVEX-P))
(10 10 (:REWRITE SV::SVEXLIST-P-WHEN-SUBSETP-EQUAL))
(6 6 (:REWRITE DEFAULT-CAR))
(5 5 (:REWRITE SV::SVEXLI... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/centaur/svl/svex-reduce/.sys/svex-reduce-with-env%40useless-runes.lsp | lisp | (SV::4VEC->UPPER-AND-LOWER-EQUIVALANCE
(1 1 (:REWRITE INTEGER-LISTP-IMPLIES-INTEGERP))
)
(SVL::SVEX-P-OF-CONSED
(28 2 (:REWRITE SV::SVEX-P-WHEN-MAYBE-SVEX-P))
(25 1 (:REWRITE SV::MAYBE-SVEX-P-WHEN-SVEX-P))
(10 10 (:REWRITE SV::SVEXLIST-P-WHEN-SUBSETP-EQUAL))
(6 6 (:REWRITE DEFAULT-CAR))
(5 5 (:REWRITE SV::SVEXLI... | |
648abd873016f479541962fddf0f4a7a8ef1446bef5d370bc1b4bb0e96500418 | haskell-mafia/mafia | Script.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Test.Mafia.Script where
import qualified Data.Attoparsec.Text as Atto
import qualified Data.Text as T
import Mafia.Script
import P
import System.IO (IO)
import Test.QuickChe... | null | https://raw.githubusercontent.com/haskell-mafia/mafia/529440246ee571bf1473615e6218f52cd1e990ae/test/Test/Mafia/Script.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Test.Mafia.Script where
import qualified Data.Attoparsec.Text as Atto
import qualified Data.Text as T
import Mafia.Script
import P
import System.IO (IO)
import Test.QuickCheck
import Test.QuickCheck... |
5d654482b48bb4765c484e0f4f56b7564b05838e7ad06f62d08bf3440943c500 | basho/riak_cs | storage_stats_detailed_test.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/riak_test/tests/storage_stats_detailed_test.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2014 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
666bb6594c65160c18f7e3ecc5e1f2d77a236cbf46bdc082b7d2121053c1246d | srid/slownews | Backend.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Backend where
import Backend.Entrypoint (start)
import Common.Route
import Control.Lens
import Control.Monad.IO.Class (liftIO)
import Data.Aeson
import qualified Data.ByteString.Lazy as BSL
imp... | null | https://raw.githubusercontent.com/srid/slownews/a84801872b61042afe9d6a5676dc40b101d0f857/backend/src/Backend.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Backend where
import Backend.Entrypoint (start)
import Common.Route
import Control.Lens
import Control.Monad.IO.Class (liftIO)
import Data.Aeson
import qualified Data.ByteString.Lazy as BSL
import Data.Dependent.Sum (DSum (..))
... |
6c3b546fe17fc389aba0dc798c9c67cef17108368d070c73af65bfbfcff5b8a1 | neonsquare/mel-base | multiparts.lisp | ;;
Code Contributed by < >
;;
(defpackage :com.streamfocus.mel.mime
(:use :cl)
(:export
"SAVE-ATTACHMENT-FILE"
"EML-MESSAGE->VIEWABLE-PART"))
(in-package :com.streamfocus.mel.mime)
(defun save-attachment-file (part filename)
(let* ((attach (mel.mime:part-body-string part))
(length (length
... | null | https://raw.githubusercontent.com/neonsquare/mel-base/7edc8fb94f30d29637bae0831c55825b0021e0f8/contribs/fredgibson/multiparts.lisp | lisp | Code Contributed by < >
(defpackage :com.streamfocus.mel.mime
(:use :cl)
(:export
"SAVE-ATTACHMENT-FILE"
"EML-MESSAGE->VIEWABLE-PART"))
(in-package :com.streamfocus.mel.mime)
(defun save-attachment-file (part filename)
(let* ((attach (mel.mime:part-body-string part))
(length (length
... | |
2b33e1dd87e355df371e293e9f0c9ac5389620677841f1a57625fc4d778498fb | futurice/haskell-mega-repo | Ctx.hs | module Futurice.App.Avatar.Ctx where
import Futurice.Prelude
import Futurice.Servant
import Prelude ()
import qualified Network.AWS as AWS
import Futurice.App.Avatar.Config
data Ctx = Ctx
{ ctxCache :: !Cache
, ctxLogger :: !Logger
, ctxManager :: !Manager
, ctxConfig :: !Config
, ctxAwsEnv ... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/avatar-app/src/Futurice/App/Avatar/Ctx.hs | haskell | module Futurice.App.Avatar.Ctx where
import Futurice.Prelude
import Futurice.Servant
import Prelude ()
import qualified Network.AWS as AWS
import Futurice.App.Avatar.Config
data Ctx = Ctx
{ ctxCache :: !Cache
, ctxLogger :: !Logger
, ctxManager :: !Manager
, ctxConfig :: !Config
, ctxAwsEnv ... | |
118c9cc149d17c40dcddec2c5455cba41dac99bdcea45dc36e729aa9f28d8a6a | RunOrg/RunOrg | queries.ml | (* © 2014 RunOrg *)
open Std
(* Short profile
============= *)
type short = <
id : PId.t ;
label : String.Label.t ;
pic : string ;
gender : [`F|`M] option ;
>
let format_short pid short = object
method id = pid
method label = short # label
method gender = short # gender
method pi... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/personLib/queries.ml | ocaml | © 2014 RunOrg
Short profile
=============
Unfiltered access
=================
Filtered access
===============
[id, n] where n is the number of times id was returned by a search
Cannot be returned by List.group
Full profile
============ |
open Std
type short = <
id : PId.t ;
label : String.Label.t ;
pic : string ;
gender : [`F|`M] option ;
>
let format_short pid short = object
method id = pid
method label = short # label
method gender = short # gender
method pic = Gravatar.pic_of_email (String.Label.to_string (shor... |
d9100872a72634df0484d73c09c9766ef5eb4671bc38af3c7a4662f6d156108e | Liam-Eagen/BulletproofsPP | Spec.hs | # LANGUAGE NoImplicitPrelude , BangPatterns , DataKinds , OverloadedStrings #
{ - # LANGUAGE BangPatterns , DataKinds , OverloadedStrings # - }
# LANGUAGE MagicHash , UnboxedTuples #
--module Main where
import Protolude hiding (hash, fromStrict)
import Data.List (zip3, zip4, zipWith3, zipWith4, unzip3, unzip4, unz... | null | https://raw.githubusercontent.com/Liam-Eagen/BulletproofsPP/0494201e2048f5c679f4ce3ee0cc6ac0ff9d3ef7/test/Spec.hs | haskell | module Main where
Given some seed generates a lazy list of random points
Hash to scalar for convenience
Deterministically generated base points and blinding randomness for proofs
NOTE the range proofs ignore the basis elements and just use the witness
data. Committing to these values directly will yield different ... | # LANGUAGE NoImplicitPrelude , BangPatterns , DataKinds , OverloadedStrings #
{ - # LANGUAGE BangPatterns , DataKinds , OverloadedStrings # - }
# LANGUAGE MagicHash , UnboxedTuples #
import Protolude hiding (hash, fromStrict)
import Data.List (zip3, zip4, zipWith3, zipWith4, unzip3, unzip4, unzip5, zipWith6)
impor... |
d4f5d1bb3c925ddb348709df075e2a4953c32f9802565df5bce42aa76f38fe3c | dongweiming/lisp-koans-answer | hash-tables.lsp | Copyright 2013 Google Inc.
;;
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
... | null | https://raw.githubusercontent.com/dongweiming/lisp-koans-answer/33eb6e38c7179c677db0df0a31cadd49617ae8db/koans/hash-tables.lsp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language g... | Copyright 2013 Google Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(define-test test-create-hash-table
"make hash table with make-hash-table"
(let ((my-hash-table))
(setf my-hash-table (make-hash-table))
(true-or-false? t (typep my-hash-table 'hash-table))
(true-... |
030f7ca3fd6ee4af4b03b0d0b14a67822209217f90c3786e51b022bfe26d0821 | uw-unsat/jitsynth | queries.rkt | #lang rosette
(require "../gensketch/gensketch-rws.rkt"
"../common/data-structures.rkt"
"../common/data-utils.rkt"
"../common/symbolic-ops.rkt"
"../synthesis/query-utils.rkt"
"machine.rkt")
(require (only-in "../common/debug.rkt" [debugln common:debugln]))
(require rosette/... | null | https://raw.githubusercontent.com/uw-unsat/jitsynth/69529e18d4a8d4dace884bfde91aa26b549523fa/ams/queries.rkt | racket | NOTE: This one is kinda special since the PC can change,
NOTE: So that this is only called once,
the same symbolic should be used for all source instructions
NOTE: tgt-regs are a list of reigsters that the source instruction uses
NOTE: tgt-regs are a list of reigsters that the source instruction uses | #lang rosette
(require "../gensketch/gensketch-rws.rkt"
"../common/data-structures.rkt"
"../common/data-utils.rkt"
"../common/symbolic-ops.rkt"
"../synthesis/query-utils.rkt"
"machine.rkt")
(require (only-in "../common/debug.rkt" [debugln common:debugln]))
(require rosette/... |
caf6a2e0c4ea40ad2961a07455a7fa3f5a8631837519c9bd7500ebb097f819c0 | russ/openpoker | t.erl | Copyright ( C ) 2005 - 2008 Wager Labs , SA
%%%%
%%%% THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
%%%% PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
%%%% THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICE... | null | https://raw.githubusercontent.com/russ/openpoker/62edd72a35b9ef52f55da9303cf1e06142e95895/src/t.erl | erlang |
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS
PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF
THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT
LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT
AND AGREE TO BE BOUND BY THE TERM... | Copyright ( C ) 2005 - 2008 Wager Labs , SA
CREATIVE COMMONS PUBLIC LICENSE ( " CCPL " OR " LICENSE " ) . THE WORK IS
-nc-sa/3.0/us/
-module(t).
-compile([export_all]).
-include_lib("stdlib/include/ms_transform.hrl").
ut() ->
dbg:ctp().
t(What) ->
dbg:tracer(),
dbg:p(all, [call]),
t1(What).
... |
e8151213e786b33318bf8f56e9eb734994e319a3538280ad8b297259889d57a0 | radian628/lispsmos | main-NUMBERMATRICES.lisp | ; Configure procedural/action code
(procedureConfig
(desmosEntryPoint main)
(pointerStack ps)
(programCounter pc)
)
(inlineJS "
compiler.macroState.desmosPlane = {};
return [];
")
(evalMacro withAssetPath
"
let url = '\u0022:8080/desmos-plane/assets/' + args[2].slice(1, args[2].length-1) + '\u0022';
conso... | null | https://raw.githubusercontent.com/radian628/lispsmos/d876f7e81129c1990ea1007dadb04cf5d1641d9d/test/desmos-plane/main-NUMBERMATRICES.lisp | lisp | Configure procedural/action code
(= PointLight1 (withAssetPath importPLYStats "point_light_1.ply"))
Define starting viewport
Choose which terrain to load.
FIX THIS
(evalMacro addTerrainSlotOpacities "
let terrains = args[1];
let index = args[2];
});
return result;
")
fade color
... | (procedureConfig
(desmosEntryPoint main)
(pointerStack ps)
(programCounter pc)
)
(inlineJS "
")
(evalMacro withAssetPath
"
"
)
(evalMacro withRootPath
"
"
)
(folder ((title "PLY Stuff"))
(defineFindAndReplace PLYGet fileVar elementType propertyType
((concatTokens fileVar ELEM elementType PROP pro... |
f3f0c0655e12486e3b6e69d7e31283869c47d88d1939c3f332ba2eaf445726a9 | city41/mario-review | activatable_video_view.clj | (ns mario.style.desktop.activatable-video-view
(:require [mario.style.desktop.variables :as v]
[garden.def :refer [defstyles]]
[garden.color :refer [rgba]]
[garden.units :refer [px em]]))
(defn export []
[[:.activatable-video-container
{:position "relative"
:display "... | null | https://raw.githubusercontent.com/city41/mario-review/1b6ebfff88ad778a52865a062204cabb8deed0f9/review-app/src/garden/mario/style/desktop/activatable_video_view.clj | clojure | (ns mario.style.desktop.activatable-video-view
(:require [mario.style.desktop.variables :as v]
[garden.def :refer [defstyles]]
[garden.color :refer [rgba]]
[garden.units :refer [px em]]))
(defn export []
[[:.activatable-video-container
{:position "relative"
:display "... | |
c5466d9a11c92e2f7c8a6e4bbe69fef8f3bca97e887abb696b8c4d4f40dc6c46 | boxp/sorcerer | deploy.clj | (ns sorcerer.domain.usecase.deploy
(:import (io.fabric8.kubernetes.api.model IntOrString)
(io.fabric8.kubernetes.api.model.extensions IngressRule HTTPIngressRuleValue HTTPIngressPath IngressBackend))
(:require [sorcerer.util :refer [->app subdomain->host ->host ->service-name]]
[com.stuartsie... | null | https://raw.githubusercontent.com/boxp/sorcerer/38fa7706439c35613cba7e04d715f5340e8a404c/src/sorcerer/domain/usecase/deploy.clj | clojure | (ns sorcerer.domain.usecase.deploy
(:import (io.fabric8.kubernetes.api.model IntOrString)
(io.fabric8.kubernetes.api.model.extensions IngressRule HTTPIngressRuleValue HTTPIngressPath IngressBackend))
(:require [sorcerer.util :refer [->app subdomain->host ->host ->service-name]]
[com.stuartsie... | |
3fd4273b5e95e90586c63b5c0ed24e20101f5a97d0faf486a72e9d943ac6009b | open-telemetry/opentelemetry-erlang | otel_tracer_server_sup.erl | %%%------------------------------------------------------------------------
Copyright 2022 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unl... | null | https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/2ff5849d01f77fc143c83aa13f1d64fe2a7e5c48/apps/opentelemetry/src/otel_tracer_server_sup.erl | erlang | ------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o... | Copyright 2022 , OpenTelemetry Authors
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(otel_tracer_server_sup).
-behaviour(supervisor).
-export([start_link/2]).
-export([init/1]).
-include_lib("opentelemetry_api... |
3fe9fdf141b06e9767cb69e400a26b71cbf535622870e08c3198d48192a76263 | sru-systems/protobuf-simple | ZigZagSpec.hs | module Data.ProtoBuf.ZigZagSpec
( main
, spec
) where
import Data.ProtoBuf.ZigZag (decode32, decode64, encode32, encode64)
import Test.Hspec (Spec, hspec, describe, it)
import Test.QuickCheck (Testable(property))
import Test.QuickCheck.Instances ()
main :: IO ()
main = hspec spec
spec :: Spec
spec =
... | null | https://raw.githubusercontent.com/sru-systems/protobuf-simple/8d19dfc68466c1ce69e9d3af6e75df16fffd32cc/test/Data/ProtoBuf/ZigZagSpec.hs | haskell | module Data.ProtoBuf.ZigZagSpec
( main
, spec
) where
import Data.ProtoBuf.ZigZag (decode32, decode64, encode32, encode64)
import Test.Hspec (Spec, hspec, describe, it)
import Test.QuickCheck (Testable(property))
import Test.QuickCheck.Instances ()
main :: IO ()
main = hspec spec
spec :: Spec
spec =
... | |
a5637741fc3982ad172f112663d147ce697c8788ff16b650bcd3f5c8b1d239a5 | sifbiri/project-resources-operations | account.cljs | (ns app.model.account
(:require
[taoensso.timbre :as log]
[com.fulcrologic.fulcro.mutations :as m :refer [defmutation]]
[com.fulcrologic.fulcro.algorithms.merge :as merge]
[com.fulcrologic.fulcro.algorithms.data-targeting :as targeting]))
(defn user-path
"Normalized path to a user entity or field i... | null | https://raw.githubusercontent.com/sifbiri/project-resources-operations/b08adb09ef03f123ca7ad19ec1c2bdc070a66291/src/main/app/model/account.cljs | clojure | (ns app.model.account
(:require
[taoensso.timbre :as log]
[com.fulcrologic.fulcro.mutations :as m :refer [defmutation]]
[com.fulcrologic.fulcro.algorithms.merge :as merge]
[com.fulcrologic.fulcro.algorithms.data-targeting :as targeting]))
(defn user-path
"Normalized path to a user entity or field i... | |
546df735fadf9fc30493c35bdcdea75364397e25cc1dd05474cc375605e4f0a9 | Elzair/nazghul | sample-char.scm | ;;----------------------------------------------------------------------------
gregor.scm - read - only data for Gregor the Charcoal Burner
;;----------------------------------------------------------------------------
;;----------------------------------------------------------------------------
;; Schedule
(kern-mk... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/template/people/sample-char.scm | scheme | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
Schedule
----------------------------------------------------------------------------
G... | gregor.scm - read - only data for Gregor the Charcoal Burner
(kern-mk-sched 'sch_gregor
(list 0 0 mgc-cave "sleeping")
(list 6 0 mgc-cave "idle")
(list 7 0 mgc-roadbend "idle")
(list 13 0 mgc-cave "eating")
(list 14 0 m... |
e2d192ef017f2602dd38091a06f8ad9cd9427affe5289154c4209cf092132443 | day8/re-frame-10x | util.cljs | (ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.reagent.v1v0v0.reagent.impl.util
(:require [clojure.string :as string]
[clojure.walk :refer [prewalk]]
[goog.object :as gobj]
[day8.re-frame-10x.inlined-deps.reagent.v1v0v0.reagent.debug :refer-macros [dev?]]))
(def is... | null | https://raw.githubusercontent.com/day8/re-frame-10x/d8dcb17e217449aba2cf64b9f843b0e9f86cfcb6/gen-src/day8/re_frame_10x/inlined_deps/reagent/v1v0v0/reagent/impl/util.cljs | clojure | Props accessors
Misc utilities
Normalize :class even if there are no merging
TODO: Doesn't look like correct place for this
React key
try catch to avoid clojurescript peculiarity with
sorted-maps with keys that are numbers
element of the vector.
TODO: Instead of checking all places for the props, select correc... | (ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.reagent.v1v0v0.reagent.impl.util
(:require [clojure.string :as string]
[clojure.walk :refer [prewalk]]
[goog.object :as gobj]
[day8.re-frame-10x.inlined-deps.reagent.v1v0v0.reagent.debug :refer-macros [dev?]]))
(def is... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.