_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 |
|---|---|---|---|---|---|---|---|---|
378f924bc0d4bf6edf82e0a4b56327b7b5e5c40be9498cb7c2dd08b908389913 | input-output-hk/plutus-apps | GameStateMachine.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE ImportQualifiedPost #
# LANGUAGE LambdaCase ... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/8251cdf87c90b5257f5eec36827a925907010f7e/plutus-use-cases/test/Spec/GameStateMachine.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE GADTs #
# LANGUAGE MultiWayIf #
# LANGUAGE NumericUnderscores #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE Tem... | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ImportQualifiedPost #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Spec.GameStateMachine
( tests, s... |
2e5a77153d33308ed12f7237286f618a20d7bd52e6e4e08a26e932833a3a2aad | solita/mnt-teet | integration_email.clj | (ns teet.integration.integration-email
"Email integration through AWS Simple Email Service"
(:require [cognitect.aws.client.api :as aws]
[clojure.string :as str]
[teet.environment :as environment]
postal.core
[teet.localization :refer [with-language tr]])
(:import (... | null | https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/backend/src/clj/teet/integration/integration_email.clj | clojure | Multipart message, separate parts with boundary
Single part, add part headers to email headers | (ns teet.integration.integration-email
"Email integration through AWS Simple Email Service"
(:require [cognitect.aws.client.api :as aws]
[clojure.string :as str]
[teet.environment :as environment]
postal.core
[teet.localization :refer [with-language tr]])
(:import (... |
b9c54526daaf558c91a2ce6e46f839705b9161e37a8ff3a076550f4ef7ed116c | grin-compiler/ghc-grin | key.hs | keys :: [String]
keys = ["case","class","data","default","deriving","else","hiding", "if","import","in","infix","infixl","instance","interface","let","module","of","renaming","then","to","type","where"]
| null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-grin-benchmark/boquist-grin-bench/spectral/cichelli/key.hs | haskell | keys :: [String]
keys = ["case","class","data","default","deriving","else","hiding", "if","import","in","infix","infixl","instance","interface","let","module","of","renaming","then","to","type","where"]
| |
978f1282a61c35b0de6d21fda8cadf4ad620f60075829a626dfee264bc839823 | AndreaCrotti/elo | config.cljs | (ns byf.config)
;; TODO: could be moved to the config.cljc with a conditional compilation thing
(defn value
[k]
(-> (.-cfg js/window)
(js->clj :keywordize-keys true)
k))
| null | https://raw.githubusercontent.com/AndreaCrotti/elo/98c4b13b2c4e0605015d5d17a8be6cbb78c3f3f6/src/cljs/byf/config.cljs | clojure | TODO: could be moved to the config.cljc with a conditional compilation thing | (ns byf.config)
(defn value
[k]
(-> (.-cfg js/window)
(js->clj :keywordize-keys true)
k))
|
335afa8bf569773fc87d0533e91f5027d30d96ffc168749aa4890d24e0314d55 | darach/cake-erl | cake.erl | -module(cake).
-export([fg/2]).
-export([bg/2]).
-export([ta/2]).
-type color() ::
default |
black |
red |
green |
yellow |
blue |
magenta |
cyan |
lightgray |
darkgray |
lightred |
lightgreen |
lightyellow |
lightblue |
lightmagenta |
lightcyan |
... | null | https://raw.githubusercontent.com/darach/cake-erl/aa0a7c433bafcea4248f0726d932eabff1e8eb42/src/cake.erl | erlang | -module(cake).
-export([fg/2]).
-export([bg/2]).
-export([ta/2]).
-type color() ::
default |
black |
red |
green |
yellow |
blue |
magenta |
cyan |
lightgray |
darkgray |
lightred |
lightgreen |
lightyellow |
lightblue |
lightmagenta |
lightcyan |
... | |
f01ea98e10eb2fc386a6c312b2fcfd33fdbd0223b743fb514db20cd87b5c2f4d | privet-kitty/cl-competitive | count-set-bit-at.lisp | (defpackage :cp/count-set-bit-at
(:use :cl)
(:export #:count-set-bit-at))
(in-package :cp/count-set-bit-at)
(declaim (inline count-set-bit-at))
(defun count-set-bit-at (n pos)
"Returns the number of 1's at POS-th bit of all the integers in {0, 1, ...,
N}."
(declare (unsigned-byte n pos))
(let ((mask (ash 1 (... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/b4c2286775a4338c783bd911ca03d931d4bd10a0/module/count-set-bit-at.lisp | lisp | (floor n mask)
(ceiling n mask) | (defpackage :cp/count-set-bit-at
(:use :cl)
(:export #:count-set-bit-at))
(in-package :cp/count-set-bit-at)
(declaim (inline count-set-bit-at))
(defun count-set-bit-at (n pos)
"Returns the number of 1's at POS-th bit of all the integers in {0, 1, ...,
N}."
(declare (unsigned-byte n pos))
(let ((mask (ash 1 (... |
a4284ddc0586ce9b8c2f398c078d99b72b6aeaccad18d45d4d8d861fe9e8a278 | ghc/ghc | Javascript.hs | # LANGUAGE JavaScriptFFI #
module System.CPUTime.Javascript
( getCPUTime
, getCpuTimePrecision
)
where
import qualified System.CPUTime.Unsupported as I
getCpuTimePrecision :: IO Integer
getCpuTimePrecision = toInteger <$> js_cpuTimePrecision
getCPUTime :: IO Integer
getCPUTime = do
t <- js_getCPUTime
if t... | null | https://raw.githubusercontent.com/ghc/ghc/cc25d52e0f65d54c052908c7d91d5946342ab88a/libraries/base/System/CPUTime/Javascript.hs | haskell | # LANGUAGE JavaScriptFFI #
module System.CPUTime.Javascript
( getCPUTime
, getCpuTimePrecision
)
where
import qualified System.CPUTime.Unsupported as I
getCpuTimePrecision :: IO Integer
getCpuTimePrecision = toInteger <$> js_cpuTimePrecision
getCPUTime :: IO Integer
getCPUTime = do
t <- js_getCPUTime
if t... | |
47f0bfd174dfa5b7166739515bbce5ec8c752e846c6ee0d305c098ea179a712a | synrc/active | active_events.erl | -module(active_events).
-include_lib("active/include/active.hrl").
-behaviour(gen_event).
-export([start_link/0, subscribe_onload/1, subscribe_onnew/1, notify_reload/1, subscribe/2]).
-export([init/1, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]).
start_link() -> gen_event:st... | null | https://raw.githubusercontent.com/synrc/active/ff285cc458a709405b9e166938e29286acf8e6da/src/active_events.erl | erlang | -module(active_events).
-include_lib("active/include/active.hrl").
-behaviour(gen_event).
-export([start_link/0, subscribe_onload/1, subscribe_onnew/1, notify_reload/1, subscribe/2]).
-export([init/1, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]).
start_link() -> gen_event:st... | |
734d2381cbb592d1cc6d90364497a869e7e6f58aa2e3356db43e7b6ac24d2441 | appleshan/cl-http | cl-http-70-163.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
Patch file for CL - HTTP version 70.163
Reason : Function HTTP::JPEG - IMAGE - SIZE : Fix error message on incorrect first mark .
;;; DEFINE-MIME-CONTENT-TYPE :IMAGE: update some image types.
;;; Define export type :ic... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-163.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
DEFINE-MIME-CONTENT-TYPE :IMAGE: update some image types.
Define export type :ico-image
Variable HTTP:*USER-AGENT-CAPABILITIES*: update browser capabilities.
Patch TCP hang on close when client drops connection. (from HTTP:LISPM;SERVER;TC... | Patch file for CL - HTTP version 70.163
Reason : Function HTTP::JPEG - IMAGE - SIZE : Fix error message on incorrect first mark .
Written by JCMa , 9/01/03 23:45:59
while running on from FUJI:/usr / lib / symbolics / vlmlmfs2.vlod
with Open Genera 2.0 , Genera 8.5 , Logical Pathnames Translation Files NEWE... |
bf6bb875d039604ab14e728cd58f9b35a49543d8d0c32b52f590108efc3e2285 | awslabs/s2n-bignum | bignum_mod_p521_9.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_mod_p521_9.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "arm/p521/bignum_mod_p521_9.o";;
***
-------------------------------------------------------------------------
Proof. ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Reduction modulo p_521 , the field characteristic of the NIST curv... |
45e4f898afee132f812185aeab8457f13c9869d400e4164dc4c77af21bc987c5 | armedbear/abcl | package.lisp | (in-package :cl-user)
(defpackage abcl/documentation
(:use :cl)
(:export
#:index
#:grovel-docstrings-as-tex))
| null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/doc/manual/package.lisp | lisp | (in-package :cl-user)
(defpackage abcl/documentation
(:use :cl)
(:export
#:index
#:grovel-docstrings-as-tex))
| |
420c6e9134a9cf50fbd231e784e63990e37555e9e968ab9f2dd2a7bac4b74e2c | chrishowejones/blog-film-ratings | index.clj | (ns film-ratings.handler.index
(:require [ataraxy.core :as ataraxy]
[ataraxy.response :as response]
[film-ratings.views.index :as views.index]
[integrant.core :as ig]))
(defmethod ig/init-key :film-ratings.handler/index [_ _]
(fn [{[_] :ataraxy/result}]
[::response/ok (views... | null | https://raw.githubusercontent.com/chrishowejones/blog-film-ratings/652ca2aec583db4b91e60ef4008b08b388cca80a/src/film_ratings/handler/index.clj | clojure | (ns film-ratings.handler.index
(:require [ataraxy.core :as ataraxy]
[ataraxy.response :as response]
[film-ratings.views.index :as views.index]
[integrant.core :as ig]))
(defmethod ig/init-key :film-ratings.handler/index [_ _]
(fn [{[_] :ataraxy/result}]
[::response/ok (views... | |
03f85390477e5a05873924e78a6c35bc90bcc4b502e841ca13a790e63dcd7cef | mirage/cactus | syscalls.mli | module Int63 = Optint.Int63
type int63 = Int63.t
val pread :
fd:Unix.file_descr -> fd_offset:int63 -> buffer:bytes -> buffer_offset:int -> length:int -> int
(** Reads up to [length] bytes from [fd] (starting at position [fd_offset]) into [buffer] (starting
at position [buffer_offset]). Returns the number of byt... | null | https://raw.githubusercontent.com/mirage/cactus/3eb2a4abee79bf8f20de5b4b12a57c3421c3e2fe/src/syscalls.mli | ocaml | * Reads up to [length] bytes from [fd] (starting at position [fd_offset]) into [buffer] (starting
at position [buffer_offset]). Returns the number of bytes actually read. [fd]'s cursor position
is unchanged.
* Writes up to [length] bytes from [buffer] (starting at position [buffer_offset]) to the file
desc... | module Int63 = Optint.Int63
type int63 = Int63.t
val pread :
fd:Unix.file_descr -> fd_offset:int63 -> buffer:bytes -> buffer_offset:int -> length:int -> int
val pwrite :
fd:Unix.file_descr -> fd_offset:int63 -> buffer:bytes -> buffer_offset:int -> length:int -> int
|
0a524ef3038b497433df3663e525344bf96c971a293694b70865d9c00b59b57c | elaforge/karya | Im_test.hs | Copyright 2016
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Cmd.Im_test where
import qualified Data.Map as Map
import qualified Cmd.Cmd as Cmd
import qualified Cmd.ResponderTest as ResponderTest
import qualified Derive.DeriveTest as Derive... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Cmd/Im_test.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt | Copyright 2016
module Cmd.Im_test where
import qualified Data.Map as Map
import qualified Cmd.Cmd as Cmd
import qualified Cmd.ResponderTest as ResponderTest
import qualified Derive.DeriveTest as DeriveTest
import qualified Instrument.Inst as Inst
import qualified Instrument.InstT as InstT
import qualified Perform... |
57f824abef43f22691395484639b1e90e95a440edbc2a26916047382181326f0 | OCamlPro/typerex-lldb | main.ml | (**************************************************************************)
(* *)
(* OCamlPro TypeRex *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lldb/3be12b69f30127bbf8a5dd483a6bfbbd6045ba0e/tests/ocp-lldb-tests/main.ml | ocaml | ************************************************************************
OCamlPro TypeRex
This file is distributed ... | Copyright OCamlPro 2011 - 2016 . All rights reserved .
( GNU Public Licence version 3.0 ) .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE... |
50e4bea8c89883d5e4bd84ccba34e1b70ed96c71dba3908cda4776fe62881e0b | OtpChatBot/Ybot | ybot_history.erl | %%%-----------------------------------------------------------------------------
%%% @author 0xAX <>
%%% @doc
%%% Provides Ybot history storage.
%%% @end
%%%-----------------------------------------------------------------------------
-module(ybot_history).
-behaviour(gen_server).
-export([start_link/1, stop/0]).
... | null | https://raw.githubusercontent.com/OtpChatBot/Ybot/5ce05fea0eb9001d1c0ff89702729f4c80743872/src/ybot_history.erl | erlang | -----------------------------------------------------------------------------
@author 0xAX <>
@doc
Provides Ybot history storage.
@end
-----------------------------------------------------------------------------
gen_server callbacks
@doc internal state
history command limit
command history list
===============... | -module(ybot_history).
-behaviour(gen_server).
-export([start_link/1, stop/0]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-record(state, {
limit = 0,
history = []
}).
start_link(HistoryLimit) ->
gen_s... |
03a87d2bffc5b5f46554ca6b8926f9d3bdde14c224e1f93035cdbf81eadb11fa | Clojure2D/clojure2d-examples | M_1_2_01.clj | (ns GG.M.M-1-2-01
(:require [clojure2d.core :refer :all]
[fastmath.random :as r]
[fastmath.core :as m]))
(def ^:const wname "M_1_2_01")
(def ^:const cnt 150)
(def ^:const ^double angle (m/radians (/ 360.0 cnt)))
(defn draw
"Draw dots"
[canvas window _ last-fader-x]
(let [rng (r/rng :i... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/GG/M/M_1_2_01.clj | clojure | (ns GG.M.M-1-2-01
(:require [clojure2d.core :refer :all]
[fastmath.random :as r]
[fastmath.core :as m]))
(def ^:const wname "M_1_2_01")
(def ^:const cnt 150)
(def ^:const ^double angle (m/radians (/ 360.0 cnt)))
(defn draw
"Draw dots"
[canvas window _ last-fader-x]
(let [rng (r/rng :i... | |
fb4382c1f7350f51fae0d31649a7b0f9a14fdb506c1fc65cb4989d55d19c48d1 | GaloisInc/llvm-verifier | Codebase.hs | |
Module : $ Header$
Description : Collection of LLVM Symbolic code
License : BSD3
Stability : provisional
Point - of - contact :
Module : $Header$
Description : Collection of LLVM Symbolic code
License : BSD3
Stability : provisional
Point-... | null | https://raw.githubusercontent.com/GaloisInc/llvm-verifier/d97ee6d2e731f48db833cc451326e737e1e39963/src/Verifier/LLVM/Codebase.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE ImplicitParams #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
* Translation utilities.
* Loading utilities.
* AST re-exports.
that we can resolve later).
| Returns definitions in codebase.
| Return all functions that are declared, but not defined.
| Re... | |
Module : $ Header$
Description : Collection of LLVM Symbolic code
License : BSD3
Stability : provisional
Point - of - contact :
Module : $Header$
Description : Collection of LLVM Symbolic code
License : BSD3
Stability : provisional
Point-... |
d8812143f461ac89d750e601ddf2e41f9699307fb91c6ff2e3450c927dda13d2 | rubenbarroso/EOPL | 5_23.scm | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
;The changed code is marked with ;''
;;;;;;;;;;;;;;;; top level and tests ;;;;;;;;;;;;;;;;
(define run
(lambda (string)
(eval-prog... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter5/5_23.scm | scheme | The changed code is marked with ;''
top level and tests ;;;;;;;;;;;;;;;;
needed for testing
^;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;;
''
^;;;;;;;;;;;;;;; new productions for oop ;;;;;;;;;;;;;;;;
method ids
^;;;;;;;;;;;;;;; end new productions for oop ;;;;;;;;;;;;;;;;
^;;;;;;;;;;;;;;; the interprete... | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(define run
(lambda (string)
(eval-program (scan&parse string))))
(define functional-groups '(lang3-5 lang3-6 lang3-7))
(define ... |
cbcfa1bcf8da9443ba07244d23ab1c5977ffeeefaee94bb2aafec792595e572b | ejgallego/HOARe2 | env.mli | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
open Parsetree
t... | null | https://raw.githubusercontent.com/ejgallego/HOARe2/48d8760696fdf4b8a3eda5a4d2a53eeba53072d8/src/env.mli | ocaml | All of the constructors
List of constructors for a type
All of the types | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
All rights reserved.
LICENSE: 3-clause BSD style.
See the LICENSE file for details on licensing.
*)
open Parsetree
t... |
11a01d2151b4345f3367f377cb2d1b7471fe604e7fefa085679aba45f7a670eb | jeffreyrosenbluth/wallpaper | Rosette.hs | # LANGUAGE ScopedTypeVariables #
module Main where
import Portrait
import Types
import Complextra
import Data.Yaml (ParseException, decodeFileEither)
import System.Environment
main :: IO ()
main = do
[yamlFile] <- getArgs
(rs :: Either ParseException Ro... | null | https://raw.githubusercontent.com/jeffreyrosenbluth/wallpaper/b3c78025e7dff46a409830751ec8bbc22ba9d84f/app/Rosette.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Main where
import Portrait
import Types
import Complextra
import Data.Yaml (ParseException, decodeFileEither)
import System.Environment
main :: IO ()
main = do
[yamlFile] <- getArgs
(rs :: Either ParseException Ro... | |
fb53667ebc9216f9d5d4b5c680fe7dd37b382c5cb98cba42a3b80d7d7dc769a7 | exercism/ocaml | hello_world.ml | let hello = "Goodbye, Mars!"
| null | https://raw.githubusercontent.com/exercism/ocaml/194070accab64cbeb9770af9771f7bbbcd479a79/exercises/practice/hello-world/hello_world.ml | ocaml | let hello = "Goodbye, Mars!"
| |
016255ef035c03808c40ed6ea800eec90e4699625e6656141e320e223fdb50fe | metosin/ring-swagger | extension_test.clj | (ns ring.swagger.extension-test
(:require [midje.sweet :refer :all]
[ring.swagger.extension :as extension]))
(extension/defextension enabled (true? true))
(extension/defextension disabled (true? false))
(fact "defextension wrappers"
(let [evals (atom [])]
(fact "do not evaluate the body if the ext... | null | https://raw.githubusercontent.com/metosin/ring-swagger/0ef9046174dec0ebd4cbf97d6cc5c6846ef11996/test/ring/swagger/extension_test.clj | clojure | (ns ring.swagger.extension-test
(:require [midje.sweet :refer :all]
[ring.swagger.extension :as extension]))
(extension/defextension enabled (true? true))
(extension/defextension disabled (true? false))
(fact "defextension wrappers"
(let [evals (atom [])]
(fact "do not evaluate the body if the ext... | |
db8141e3be48663fc49dab561bd94bd1bfd4d7e4b0af87b26adb8e36b18acfff | sylane/erod | erod_sessions_sup.erl | %%% ==========================================================================
Copyright ( c ) 2014 < >
%%%
%%% This file is part of erod.
%%%
%%% Erod is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , eit... | null | https://raw.githubusercontent.com/sylane/erod/b0c435f8546ea38b1501d3e22614fe7951c61c9a/apps/erod/src/erod_sessions_sup.erl | erlang | ==========================================================================
This file is part of erod.
Erod 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 impli... | Copyright ( c ) 2014 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
2014 < >
@author < >
@private
-module(erod_sessions_sup).
-author(... |
176f3a5836589788da95edf04970dff02e48379e1ce21e8138655868e3228796 | alessiostalla/doplus | doplus.lisp | Copyright ( C ) 2011 - 2014
;;;
;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any later version.
;;;
;;; This program is distri... | null | https://raw.githubusercontent.com/alessiostalla/doplus/d64b13b3f0aadc8eb3e6a01ccbd728598798eb3a/doplus.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public... | Copyright ( C ) 2011 - 2014
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package :doplus)
(defstruct generator name clauses)
(defstruct terminatio... |
7b3e6bc20b99f1c040c453f75dbe28d3a051428394ea22070a2a68224c4bcb7e | jacekschae/learn-reitit-course-files | router.clj | (ns cheffy.router
(:require [reitit.ring :as ring]
[cheffy.recipe.routes :as recipe]
[reitit.swagger :as swagger]
[reitit.swagger-ui :as swagger-ui]
[muuntaja.core :as m]
[reitit.ring.middleware.muuntaja :as muuntaja]
[reitit.coercion.spec :as co... | null | https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/30-jwt-middleware/src/cheffy/router.clj | clojure | (ns cheffy.router
(:require [reitit.ring :as ring]
[cheffy.recipe.routes :as recipe]
[reitit.swagger :as swagger]
[reitit.swagger-ui :as swagger-ui]
[muuntaja.core :as m]
[reitit.ring.middleware.muuntaja :as muuntaja]
[reitit.coercion.spec :as co... | |
e6afb6020c24de2bf23576e02e831796f6e67f4e6f438e0862fa8c6dda8139ff | chapmanb/r-var | templates.clj | (comment "
HTML templates for web page display.
")
(ns rvar.templates
(:use [hiccup.core]
[hiccup.form-helpers :only [form-to file-upload]]
[rvar.variant]
[rvar.model]
[rvar.external])
(:require [clojure.contrib.str-utils2 :as str2]
[gaka [core :as gaka]]))
(defn std-... | null | https://raw.githubusercontent.com/chapmanb/r-var/6fce17dd0460c78c3a210a95f16aacbdd70ccf0a/src/rvar/templates.clj | clojure | :class "ui-icon ui-icon-circle-arrow-e"}]
"
")]])
more information is good but it is not a | (comment "
HTML templates for web page display.
")
(ns rvar.templates
(:use [hiccup.core]
[hiccup.form-helpers :only [form-to file-upload]]
[rvar.variant]
[rvar.model]
[rvar.external])
(:require [clojure.contrib.str-utils2 :as str2]
[gaka [core :as gaka]]))
(defn std-... |
41da4cd6eb9220e406b77a32e55dd0acb02ac080c7c7bdaf1e303f50e4ed7c37 | ailisp/Graphic-Forms | event-source.lisp | (in-package :graphic-forms.uitoolkit.widgets)
(defparameter *callback-info* '((gfw:event-activate . (gfw:event-source))
(gfw:event-arm . (gfw:event-source))
(gfw:event-modify . (gfw:event-source))
(gfw:event-select ... | null | https://raw.githubusercontent.com/ailisp/Graphic-Forms/1e0723d07e1e4e02b8ae375db8f3d65d1b444f11/src/uitoolkit/widgets/event-source.lisp | lisp |
methods
| (in-package :graphic-forms.uitoolkit.widgets)
(defparameter *callback-info* '((gfw:event-activate . (gfw:event-source))
(gfw:event-arm . (gfw:event-source))
(gfw:event-modify . (gfw:event-source))
(gfw:event-select ... |
c66e25af17e8e4d86275ec0b18dffc31d94c701b2618267197d28b517e0bd9da | chrisdone/prana | Typeable.hs | # LANGUAGE Trustworthy #
{-# LANGUAGE GADTs #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeOperators #
-----------------------------------------------------------------------------
-- |
-- Module ... | null | https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/base-4.11.1.0/Data/Typeable.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE ConstraintKinds #
---------------------------------------------------------------------------
|
Module : Data.Typeable
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : portable
representations to types.... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE PatternSynonyms #
# LANGUAGE TypeOperators #
Copyright : ( c ) The University of Glasgow , CWI 2001 - -2004
The ' ' class reifies types to some extent by associating type
equivalence .... |
e20252f3052a40b6c038bfc5aeb85ffce7ef76a495b32f7b04db90cf9df2954f | spawnfest/eep49ers | snmp_usm.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applica... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/snmp/src/misc/snmp_usm.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific la... | Copyright Ericsson AB 2004 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
AES : RFC 3826
-module(snmp_usm).
Avoid warning for local function error/1 clashing with autoimported BIF .
-co... |
499ebb33bf8dd4d052d3fae54497a3ce0c2d11d9538ead538639de518254aace | skanev/playground | 03.scm | SICP exercise 5.03
;
Design a machine to compute square roots using Newton 's method , as described
; in section 1.1.7:
;
; (define (sqrt x)
; (define (good-enough? guess)
( < ( abs ( - ( square guess ) x ) ) 0.001 ) )
; (define (improve guess)
; (average guess (/ x guess)))
; (define (sqrt-iter gue... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/03.scm | scheme |
in section 1.1.7:
(define (sqrt x)
(define (good-enough? guess)
(define (improve guess)
(average guess (/ x guess)))
(define (sqrt-iter guess)
(if (good-enough? guess)
guess
(sqrt-iter (improve guess))))
(sqrt-iter 1.0))
Begin by assuming that good-enough? and improve opera... | SICP exercise 5.03
Design a machine to compute square roots using Newton 's method , as described
( < ( abs ( - ( square guess ) x ) ) 0.001 ) )
(define (square x)
(* x x))
(define (average x y)
(/ (+ x y) 2))
(define (good-enough? guess x)
(< (abs (- (square guess) x)) 0.001))
(define (improve gue... |
8380e8b963d5726bb2c4a62610b8d4dd5fa21086682a1621396aa1e02950668c | ayamada/copy-of-svn.tir.jp | eval-sv.scm | #!/usr/bin/env gosh
;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme ts=8 sts=2 sw=2 et:
$ Id$
(use gauche.test)
(use gauche.parameter)
(use srfi-1)
(use util.list)
普通にtest caseを書く
;;; (問題があるかどうかはあとで考える)
;;; TODO: バージョンアップ時のチェックの為に、
;;; (map car (hash-table->alist (module-table (find-module 'gauc... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/eval-sv/trunk/test/eval-sv.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme ts=8 sts=2 sw=2 et:
(問題があるかどうかはあとで考える)
TODO: バージョンアップ時のチェックの為に、
(map car (hash-table->alist (module-table (find-module 'gauche))))
等を使って、束縛やsyntax等の過不足が無い事をチェックしたい
----
----
このeval/svは、param-handlerを変更する事で、
ある程度挙動を左右できる。
---
eval/svで、実体が中と外で同じものはq... | #!/usr/bin/env gosh
$ Id$
(use gauche.test)
(use gauche.parameter)
(use srfi-1)
(use util.list)
普通にtest caseを書く
(set! *test-report-error* #f)
(debug-print-width *test-report-error*)
(define param-handler
(make-parameter (lambda args #f)))
(test-start "eval-sv")
(use eval-sv)
(test-module 'eval-sv)
メイン... |
a1359a75bb4e3bcf6265299caf2fa9b19368b4b3e1a7573d0227fb9ddf49b4d0 | scrintal/heroicons-reagent | eye.cljs | (ns com.scrintal.heroicons.outline.eye)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/eye.cljs | clojure | (ns com.scrintal.heroicons.outline.eye)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"
... | |
5df26bd6153c0569cdec276b90fcdb8728eba488546657cc3ad6ee44b2311795 | re-path/studio | styles.cljs | (ns repath.studio.window.styles
(:require [stylefy.core :as stylefy]
[repath.studio.styles :as styles]))
(stylefy/class "window-control-button" {:padding "7px 14px"})
(stylefy/class "title-bar" {:flex "1 1 100%"
:color "#888"
... | null | https://raw.githubusercontent.com/re-path/studio/8e58ce071d0d4ff1f111fb898f29c016ff664151/src/repath/studio/window/styles.cljs | clojure | (ns repath.studio.window.styles
(:require [stylefy.core :as stylefy]
[repath.studio.styles :as styles]))
(stylefy/class "window-control-button" {:padding "7px 14px"})
(stylefy/class "title-bar" {:flex "1 1 100%"
:color "#888"
... | |
2e7c2f892b1c12085f762bff6223c969c9dd15f82a77591016b66d4d9199c739 | Clozure/ccl | package.lisp | ;;; -*- Lisp -*-
;;;
Copyright 2008
;;;
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, softwar... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/tools/advice-profiler/package.lisp | lisp | -*- Lisp -*-
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific languag... | Copyright 2008
distributed under the License is distributed on an " AS IS " BASIS ,
(in-package "CL-USER")
(defpackage "PROFILER"
(:nicknames "PROF")
(:use "COMMON-LISP" "CCL")
(:export "PROFILE" "UNPROFILE"
"UNPROFILE-ALL"
"PROFILE-PACKAGE" "UNPROFILE-PACKAGE"
"ENABLE-PRO... |
1883a5c86edc615b2e02dcd81e895d296b9c9b9808254db42944268dd99d8eb2 | engstrand-config/farg | utils.scm | (define-module (farg utils)
#:use-module (srfi srfi-1)
#:use-module (guix gexp)
#:use-module (gnu services))
(define-public (list-of-services? lst)
(every service? lst))
(define-public (maybe-string? str)
(or (string? str) (eq? str #f)))
(define-public (serialize-string str)
(if str str ""))
(define-pub... | null | https://raw.githubusercontent.com/engstrand-config/farg/1f9e91c74dab3d9536920a2057afaa8a2af7d3e9/farg/utils.scm | scheme | returning a number based on same argument. This can be used for e.g.
setting saturation or alpha dynamically based on light/dark themes. | (define-module (farg utils)
#:use-module (srfi srfi-1)
#:use-module (guix gexp)
#:use-module (gnu services))
(define-public (list-of-services? lst)
(every service? lst))
(define-public (maybe-string? str)
(or (string? str) (eq? str #f)))
(define-public (serialize-string str)
(if str str ""))
(define-pub... |
541a7a8d1ff424e38860a8443dc2c1cfefef2578999ee2fc7c6136b9ed39fd1f | bazqux/bazqux-urweb | API.hs | # LANGUAGE OverloadedStrings , ViewPatterns , RecordWildCards , TupleSections ,
BangPatterns , TransformListComp , ScopedTypeVariables #
BangPatterns, TransformListComp, ScopedTypeVariables #-}
# OPTIONS_GHC -fwarn - incomplete - patterns -fwarn - unused - imports #
module API
( api0user... | null | https://raw.githubusercontent.com/bazqux/bazqux-urweb/012f56b8fe1847b3b4841054183f663b000f09c0/crawler/API.hs | haskell | ----------------------------------------------------------------------------
Mr.Reader перестает видеть папки
даже если есть папка с таким же именем
| /subscription/list
непрочитанными), также игнорируем.
userCheckSubscriptions user
apiObj [( "id", apiStr "lhn-prefs")
,( "value"
... | # LANGUAGE OverloadedStrings , ViewPatterns , RecordWildCards , TupleSections ,
BangPatterns , TransformListComp , ScopedTypeVariables #
BangPatterns, TransformListComp, ScopedTypeVariables #-}
# OPTIONS_GHC -fwarn - incomplete - patterns -fwarn - unused - imports #
module API
( api0user... |
b841d172d63731aa665f5071b4c9aca2a3ab518785ec1f706dab8938cd745b93 | skeuchel/needle | RelationCast.hs |
module KnotCore.Elaboration.RelationCast where
import Coq.StdLib
import Coq.Syntax
import KnotCore.Elaboration.Core
import KnotCore.Elaboration.Fresh
import Control.Monad
import Data.Maybe
import Data.Traversable (Traversable(..))
lemmas :: Elab... | null | https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotCore/Elaboration/RelationCast.hs | haskell |
module KnotCore.Elaboration.RelationCast where
import Coq.StdLib
import Coq.Syntax
import KnotCore.Elaboration.Core
import KnotCore.Elaboration.Fresh
import Control.Monad
import Data.Maybe
import Data.Traversable (Traversable(..))
lemmas :: Elab... | |
85cf78ea21410904514676300a068feaa3f081a0045b4ec41b2a128c430079d0 | tonyfloatersu/solution-haskell-craft-of-FP | CodeTable.hs | -------------------------------------------------------------------------
--
--
Converting a tree to a ord table .
--
( c ) Addison - Wesley , 1996 - 2011 .
-- ... | null | https://raw.githubusercontent.com/tonyfloatersu/solution-haskell-craft-of-FP/0d4090ef28417c82a7b01e4a764f657641cb83f3/Chapter15/CodeTable.hs | haskell | -----------------------------------------------------------------------
-----------------------------------------------------------------------
codeTable is initialised with an empty such sequence.
Show functions ... |
Converting a tree to a ord table .
( c ) Addison - Wesley , 1996 - 2011 .
module CodeTable ( codeTable ) where
import Types ( Tree(Leaf,Node), Bit(L,R), HCode, Table )
Making a table from a tree .
codeTable :: T... |
c70bfe3cf0dff586509a9377a29ca8f631480afb165fee479ac4f75c6864118c | kiranshila/Doplarr | interaction_state_machine.clj | (ns doplarr.interaction-state-machine
(:require
[clojure.core.async :as a]
[clojure.string :as str]
[com.rpl.specter :as s]
[discljord.messaging :as m]
[doplarr.discord :as discord]
[doplarr.state :as state]
[doplarr.utils :as utils :refer [log-on-error]]
[fmnoise.flow :refer [else then]]
[... | null | https://raw.githubusercontent.com/kiranshila/Doplarr/ef6a218007ce524b20ea3f3773d083cf9861c7af/src/doplarr/interaction_state_machine.clj | clojure | Send the ack for delayed response
Search for results
Create dropdown for search results
Start setting up the payload
Merge in the opts that are already satisfied
Send the ack
Check last modified
Update interaction with timeout message
Move through the state machine to update cache side effecting new components | (ns doplarr.interaction-state-machine
(:require
[clojure.core.async :as a]
[clojure.string :as str]
[com.rpl.specter :as s]
[discljord.messaging :as m]
[doplarr.discord :as discord]
[doplarr.state :as state]
[doplarr.utils :as utils :refer [log-on-error]]
[fmnoise.flow :refer [else then]]
[... |
02c33551a6e595bd81b607aeae5eeccec21d73e9deda88df4680ea2d4517e296 | unison-code/unison | InstructionScheduling.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Contributing authors :
< >
< >
Th... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Tools/Model/InstructionScheduling.hs | haskell | set of blocks
set of operations
block of each operation
estimation of the execution frequency of each block
example: freq[4]: estimated execution frequency of b4
minimum live range duration of each temporary
example: minlive[7]: minimum live range duration of t7
fixed dependency graph
instructions that activat... | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Contributing authors :
< >
< >
Th... |
9c99ff95da7e557f24e92319d5a94a9a3b4e8ebd37de357a5847e25602b1366d | glebec/haskell-programming-allen-moronuki | BadMonad.hs | module BadMonad where
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
import Test.Hspec
data CountMe a = CountMe Integer a deriving (Eq, Show)
instance Functor CountMe where
fmap f (CountMe i a) = CountMe (i + 1) (f a)
instance Applicative CountMe where
pure = CountMe 0... | null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/18-monad/exercises/src/BadMonad.hs | haskell | module BadMonad where
import Test.QuickCheck
import Test.QuickCheck.Checkers
import Test.QuickCheck.Classes
import Test.Hspec
data CountMe a = CountMe Integer a deriving (Eq, Show)
instance Functor CountMe where
fmap f (CountMe i a) = CountMe (i + 1) (f a)
instance Applicative CountMe where
pure = CountMe 0... | |
f7e677f9311bd5cf2234bc8d5755874fb11ac7678f6ebf3ece92d1ac8267b252 | metaocaml/ber-metaocaml | t142-switch-9.ml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
type t =
| A
| B of int
| C of int
;;
match B 0 with
| B _ -> (... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t142-switch-9.ml | ocaml | TEST
include tool - ocaml - lib
flags = " -w a "
ocaml_script_as_argument = " true "
* setup - ocaml - build - env
* *
include tool-ocaml-lib
flags = "-w a"
ocaml_script_as_argument = "true"
* setup-ocaml-build-env
** ocaml
*)
open Lib;;
type t =
| A
| B of int
| C of int
;;
match B 0 with
| B _ -> (... | |
f5380ccf58da1153fb3f8ee0b4d28aa599ff06869cb66d69d889b60dff8cc9f7 | athos/symbol-analyzer | project.clj | (defproject symbol-analyzer "0.1.1"
:description "Clojure code analyzer that tells us how each symbol is being used in the code"
:url "-analyzer"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojars.trptcolin/sjacket "0... | null | https://raw.githubusercontent.com/athos/symbol-analyzer/99c7090f5fda52ccd40404c8823614ea343e5a51/project.clj | clojure | (defproject symbol-analyzer "0.1.1"
:description "Clojure code analyzer that tells us how each symbol is being used in the code"
:url "-analyzer"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojars.trptcolin/sjacket "0... | |
d5ace2d99e3104d9c8dfdf4a8c737cc27adb2ab10343300b5fa1c0924cf742c9 | tonyg/kali-scheme | interfaces.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; Some interfaces. Order of presentation is a bit random.
(define-interface scheme-level-0-interface
(export ((if begin lambda letrec quote set!
define define-syntax let-syntax letrec-... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/interfaces.scm | scheme | Some interfaces. Order of presentation is a bit random.
The basic derived expression types.
Data manipulation
Unnecessarily primitive
New in Revised^5 Scheme
Things aren't primitive at the VM level, but they have
to be defined using VM primitives.
Miscellaneous primitives.
,collect command
fluids threads
i/o-i... | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
(define-interface scheme-level-0-interface
(export ((if begin lambda letrec quote set!
define define-syntax let-syntax letrec-syntax)
:syntax)
((and cond do let let* or) :syn... |
588547655be324e361e94bca85f4f50212a59dc19ef63cc087ba2e658b2851ef | rotatef/cl-html5-parser | test-parser.lisp | ;;;; HTML5 parser for Common Lisp
;;;;
Copyright ( C ) 2012 < >
Copyright ( C ) 2012 < >
Copyright ( C ) 2012
Copyright ( C ) 2012 < >
;;;;
;;;; This library is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU Lesser General Public License as published
... | null | https://raw.githubusercontent.com/rotatef/cl-html5-parser/74a92eb3a183a0afd089ea33350e816e6b9aeefa/tests/test-parser.lisp | lisp | HTML5 parser for Common Lisp
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without ... | Copyright ( C ) 2012 < >
Copyright ( C ) 2012 < >
Copyright ( C ) 2012
Copyright ( C ) 2012 < >
by the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package :html5-parser-tests)
(defun print-node (nod... |
a73d935b401cce330a808f0e3243cd62a4fa3719421d311a3700d5220becccc0 | avsm/eeww | resume_client.ml |
open Lwt
open Ex_common
let http_client ?ca ?fp hostname port =
let port = int_of_string port in
auth ?ca ?fp () >>= fun authenticator ->
let config = Tls.Config.client ~authenticator () in
Tls_lwt.Unix.connect config (hostname, port) >>= fun t ->
Tls_lwt.Unix.write t (Cstruct.of_string "foo\n") >>... | null | https://raw.githubusercontent.com/avsm/eeww/49cbc7b7250611c1e909d4defde0027a5ef28157/lib/tls/lwt/examples/resume_client.ml | ocaml |
open Lwt
open Ex_common
let http_client ?ca ?fp hostname port =
let port = int_of_string port in
auth ?ca ?fp () >>= fun authenticator ->
let config = Tls.Config.client ~authenticator () in
Tls_lwt.Unix.connect config (hostname, port) >>= fun t ->
Tls_lwt.Unix.write t (Cstruct.of_string "foo\n") >>... | |
f2ef61e5148cc8449a6829c5a93146feb71fd79df0bbb42b96ddc61701558892 | kevinlynx/ext-blog | blog-data.lisp | ;;;;
blog-data.lisp
;;;; This is a helper file, to provide some util functions to write a theme.
6.8.2011
;;;;
(in-package #:ext-blog)
(export '(get-post-time-desc
get-post-data
get-page-posts-data
get-page-data
has-post-p
get-blog-data
get-title-dat... | null | https://raw.githubusercontent.com/kevinlynx/ext-blog/4f6a6f0ab64f9384d53d41d1208ebaa7b9575534/theme/blog-data.lisp | lisp |
This is a helper file, to provide some util functions to write a theme.
:new (restas:genurl 'new-post) | blog-data.lisp
6.8.2011
(in-package #:ext-blog)
(export '(get-post-time-desc
get-post-data
get-page-posts-data
get-page-data
has-post-p
get-blog-data
get-title-data
get-head-data
get-page-nav-url
get-themes-data
... |
fbe12ca79167ca5f2cd5836d603d2b9aec064dafe2adaf9762a42aa1e54f85aa | olleharstedt/subsetphp | parser_hack.mli | *
* Copyright ( c ) 2014 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " hack " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory . ... | null | https://raw.githubusercontent.com/olleharstedt/subsetphp/37f7967594bdda38531f4fbde6ffc5ae33a307a3/parser_hack.mli | ocaml | None if PHP
Parses a file | *
* Copyright ( c ) 2014 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " hack " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory . ... |
99e68cabde1547d83aa7d3cb6a14285edda6b48e3b70e19cafa0d9fc2431ca9a | nonguix/nonguix | scanner.scm | SPDX - License - Identifier : GPL-3.0 - or - later
Copyright © 2020 < >
(define-module (nongnu packages scanner)
#:use-module (ice-9 match)
#:use-module (guix packages)
#:use-module (nonguix build-system binary)
#:use-module (guix download)
#:use-module (gnu packages avahi)
#:use-module (gnu package... | null | https://raw.githubusercontent.com/nonguix/nonguix/71252d2d9d1908a1f1b005d2025b0907d5d5c377/nongnu/packages/scanner.scm | scheme | the Brother MFC-J5335DW to work. There may be something wrong with my
See
open64() calls to `/opt/brother/scanner/brscan4`.
FIXME: For some reason glibc32 has higher | SPDX - License - Identifier : GPL-3.0 - or - later
Copyright © 2020 < >
(define-module (nongnu packages scanner)
#:use-module (ice-9 match)
#:use-module (guix packages)
#:use-module (nonguix build-system binary)
#:use-module (guix download)
#:use-module (gnu packages avahi)
#:use-module (gnu package... |
82271aa290ceb46a647ca524be70e259f178bc4e440f042d55a9babb65d17518 | chriskiehl/MyBlog | markdown.clj | (ns myblog.markdown
(:require [myblog.types :as t]
[hiccup.core :as hiccup]
[cljs.spec.alpha :as s])
(:import (myblog.types ImageSrcSet RemoteSrc Gif RemoteSrcSet Mp4 Other Mp3 Webm)))
(defn srcset-entry [{:keys [url size] :as data}]
{:pre [(instance? RemoteSrc data)]}
(format "%s %sw... | null | https://raw.githubusercontent.com/chriskiehl/MyBlog/3e24e1c1f5d3716e6249edcda20c2f31c47c5c39/src/clj/myblog/markdown.clj | clojure | (ns myblog.markdown
(:require [myblog.types :as t]
[hiccup.core :as hiccup]
[cljs.spec.alpha :as s])
(:import (myblog.types ImageSrcSet RemoteSrc Gif RemoteSrcSet Mp4 Other Mp3 Webm)))
(defn srcset-entry [{:keys [url size] :as data}]
{:pre [(instance? RemoteSrc data)]}
(format "%s %sw... | |
d6b7123aca604537590ca413c976a2dbe7870a3b36d2ab387c51e93fc84e059e | Helium4Haskell/helium | Qual7.hs | module Qual7(module Qual1, f, Listt3(..)) where
import qualified Qual1 as Q
import qualified Prelude as P
f :: Int
f = 2
(/**) :: a -> Int -> Int
12 * z
where
6
where
k = 2
infixr 5 /**
data Listt3 a = a :>>< (Listt3 a)
| Emptyy | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/exports/Qual7.hs | haskell | module Qual7(module Qual1, f, Listt3(..)) where
import qualified Qual1 as Q
import qualified Prelude as P
f :: Int
f = 2
(/**) :: a -> Int -> Int
12 * z
where
6
where
k = 2
infixr 5 /**
data Listt3 a = a :>>< (Listt3 a)
| Emptyy | |
7871eba9c85b06e800428d6b44b43c50e5859375ab1a03ca4586d087b29c9d68 | dgiot/dgiot | dgiot_meter_tcp.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 DGIOT Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_meter/src/dgiot_meter_tcp.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2020 DGIOT Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dgiot_meter_tcp).
-author("johnliu").
-include_lib("dgiot/include/dgiot_socket.hrl").
-include... |
796fa5087f28a0e2b6b5ef5f6465fa8026c87bad3b47e279d4df5bb7deb31e4a | oscoin/oscoin | TestClient.hs | -- | Provide a 'Client' object for a WAI Test 'Session'.
--
Re - exports " Oscoin . API.Client " .
--
-- @
import qualified Oscoin . Test . as Client
--
flip runSession app $ do
-- result <- Client.submitTransaction Client.session tx
-- @
--
module Oscoin.Test.API.HTTP.TestClient
( module Oscoin.API.Clie... | null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/test/Oscoin/Test/API/HTTP/TestClient.hs | haskell | | Provide a 'Client' object for a WAI Test 'Session'.
@
result <- Client.submitTransaction Client.session tx
@
| Re - exports " Oscoin . API.Client " .
import qualified Oscoin . Test . as Client
flip runSession app $ do
module Oscoin.Test.API.HTTP.TestClient
( module Oscoin.API.Client
, session
) where
import Oscoin.Prelude
import Oscoin.API.Client
import Oscoin.API.Client.HTTP
i... |
d0ed3572007a654d46c290f4ae1b8f83f522226a64f529bdd48a15b79f63105a | huangz1990/SICP-answers | 11-make-account.scm | 11-make-account.scm
(define (make-account balance)
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance (- balance amount))
balance)
"Insufficient funds"))
(define (deposit amount)
(set! balance (+ balance amount)))
(define (dis... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/11-make-account.scm | scheme | 11-make-account.scm
(define (make-account balance)
(define (withdraw amount)
(if (>= balance amount)
(begin (set! balance (- balance amount))
balance)
"Insufficient funds"))
(define (deposit amount)
(set! balance (+ balance amount)))
(define (dis... | |
14118c9bbf22f1ae20d3455649e763f590346c395f0aacbf1237830f0db24295 | yallop/metaocaml-letrec | genletrec.ml |
* Copyright ( c ) 2018 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2018 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
Rewrite :
let : var ... | null | https://raw.githubusercontent.com/yallop/metaocaml-letrec/5e140aebf81840e55e04e3ffc65e1741454f6037/lib/genletrec.ml | ocaml | let x = ref dummy in e
x := rhs; e
ref (fun _ -> assert false) |
* Copyright ( c ) 2018 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2018 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
Rewrite :
let : var ... |
ec1d2d8ed0dc78dbc01251ca77a0eeafecacebbd73cedbab2b63e0afe25d959b | huangjs/cl | trigi.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/trigi.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
Arithmetic ut... |
(in-package :maxima)
(macsyma-module trigi)
(load-macsyma-macros mrgmac)
(declare-top (special varlist errorsw $demoivre))
(defmvar $%piargs t)
(defmvar $%iargs t)
(defmvar $triginverses t)
(defmvar $trigexpand nil)
(defmvar $trigexpandplus t)
(defmvar $trigexpandtimes t)
(defmvar $trigsign t)
(defmvar $exponentia... |
4ea85277f0c45520bb304efae142991bdc690b8fbc215edbd1104877f7048e6f | rwilcox/my-learnings-docs | book_notes_seeing_organizational_patterns.md.rkt | #lang scribble/text
@(require "scribble-utils.rkt")
---
path: "/book_notes/seeing_organizational_patterns"
title: "Book Notes: Seeing Organizational Patterns"
---
# Table Of Contents
<!-- toc -->
# Book summary
The way an organization behaves can be broken into a [project mangement triangle](-management-triangle) ... | null | https://raw.githubusercontent.com/rwilcox/my-learnings-docs/20880eef7510f3b7c4564df83fc31cb3fe10cc3b/book_notes_seeing_organizational_patterns.md.rkt | racket | they live in a shades of gray world.
they live in a world of black and white.}
without quesion, the absense of such cooperation has sunk many a matrix.}
what the organization expects from its people, and what the people in turn expect from their organization. Finally character is expressed in terms of an organizati... | #lang scribble/text
@(require "scribble-utils.rkt")
---
path: "/book_notes/seeing_organizational_patterns"
title: "Book Notes: Seeing Organizational Patterns"
---
# Table Of Contents
<!-- toc -->
# Book summary
The way an organization behaves can be broken into a [project mangement triangle](-management-triangle) ... |
4e27b3a7335273ce130f5fc643575d7b8ad15904b2a4eb9dd76339202c9627c6 | ghcjs/ghcjs-boot | Ptr.hs | # LANGUAGE Unsafe #
# LANGUAGE CPP , NoImplicitPrelude , MagicHash , RoleAnnotations #
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : GHC.Ptr
Copyright : ( c ) The FFI Task Force , 2000 - 2002
-- License : see libraries/base... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/GHC/Ptr.hs | haskell | # OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
Module : GHC.Ptr
License : see libraries/base/LICENSE
Stability : internal
The 'Ptr' and 'FunPtr' types and operations.
---------------------------------------------------------------------------... | # LANGUAGE Unsafe #
# LANGUAGE CPP , NoImplicitPrelude , MagicHash , RoleAnnotations #
Copyright : ( c ) The FFI Task Force , 2000 - 2002
Maintainer :
Portability : non - portable ( GHC Extensions )
module GHC.Ptr (
Ptr(..), FunPtr(..),
nullPtr, castPtr, plusPtr, alignPtr, minusPtr,
... |
a6b1740bfe48c16bcde3ed8fc9ad1e8b8870526dc2895362945d43386288d472 | pykello/racket-visualization | svg-animation-01.rkt | #lang racket
(require "common.rkt"
pict
racket/dict
"../svg/svg-transform.rkt"
rsvg)
(define (svg-animate time svg-in anims)
(define txs
(make-hash
(for/list ([element-anim anims])
(element-anim->tx time element-anim))))
(transform-svg svg-in txs))
(define (ele... | null | https://raw.githubusercontent.com/pykello/racket-visualization/7c4dccfd59123fcb7c144ad8ed89dffdc57290df/animations/svg-animation-01.rkt | racket | add a sentinel last key-frame | #lang racket
(require "common.rkt"
pict
racket/dict
"../svg/svg-transform.rkt"
rsvg)
(define (svg-animate time svg-in anims)
(define txs
(make-hash
(for/list ([element-anim anims])
(element-anim->tx time element-anim))))
(transform-svg svg-in txs))
(define (ele... |
4cc0d4ae352de8e83f8b69609d9375d4724de9cb73c423f48eede7d33c9273a7 | simon-brooke/dog-and-duck | picky.clj | (ns dog-and-duck.quack.picky "Fault-finder for ActivityPub documents.
Generally, each `-faults` function will return:
1. `nil` if no faults were found;
2. a sequence o... | null | https://raw.githubusercontent.com/simon-brooke/dog-and-duck/d26300f8c440c7faf352f6935bc507dbe531caf1/src/dog_and_duck/quack/picky.clj | clojure |
This program is free software; you can redistribute it and/or
either version 2
of the 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
MERCHANTABILITY or FITNESS F... | (ns dog-and-duck.quack.picky "Fault-finder for ActivityPub documents.
Generally, each `-faults` function will return:
2. a sequence of fault objects if faults were found.
... |
41155269ec11e5ca63c18bce787a55bbd548629b82adde82023bd60cebce46e9 | acl2/acl2 | static-variable-pointers.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "C")
(i... | null | https://raw.githubusercontent.com/acl2/acl2/c2d69bad0ed3132cc19a00cb632de8b73558b1f9/books/kestrel/c/atc/symbolic-execution-rules/static-variable-pointers.lisp | lisp | C Library
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "C")
(include-book "../../language/pointer-operations")
(local (xdoc::set-default-parents atc... | |
1849bfd18e8caa4bb7770de38cf92a271e19fdcd5ec4de5a6b4c8199a80ed4c3 | juliannagele/ebso | word.ml | Copyright 2019 and under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under ... | null | https://raw.githubusercontent.com/juliannagele/ebso/8e516036fcb98074b6be14fc81ae020f76977712/lib/word.ml | ocaml | truncate back to word size, safe because mod denom brings us back to range
truncate back to word size, safe because mod denom brings us back to range | Copyright 2019 and under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
distributed under ... |
6bc6d644c78a4fa8f14f236cb1e2e2206eecd69c3675b686de81b281fa95dd04 | janestreet/merlin-jst | parmatch.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/src/ocaml/typing/parmatch.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Asttypes
open Typedtree
open Types
val const_compare : constant -> constant -> int
* [ const_compa... |
83d157c2dced45ba42151d5625964e11df8a0ef6140fca958553f3886cdb7dc1 | potatosalad/erlang-jose | jose_jwe_alg_xc20p_kw.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
%%% @doc
%%%
%%% @end
Created : 14 Sep 2019 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/src/jwe/jose_jwe_alg_xc20p_kw.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
jose_jwe callbacks
jose_jwe_alg callbacks
API
Types
====================================================================
jose_jwe callb... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 14 Sep 2019 by < >
-module(jose_jwe_alg_xc20p_kw).
-behaviour(jose_jwe).
-behaviour(jose_jwe_alg).
-include("jose_jwk.hrl").
-export([from_map/1]).
-export([to_map/2]).
-exp... |
72b2e2fcffc884b1106faa9bbd314e24eba79a7843a87427778ef38b4c1d1c47 | ocaml-multicore/tezos | client_sapling_commands.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2019 - 2020 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_client_sapling/client_sapling_commands.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2019 - 2020 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN ... |
a6bcf566da72028ca74bdbbfb8a71ba39dc0bd24bf26106c06c67393fce37662 | nyu-acsys/drift | app-nonrec.ml |
let apply (ab:int) (af: int->unit) ax = af ax
let check (cx:int) (cy:int) = assert (cx = cy)
let main (n:int(*-:{v:Int | true}*)) =
apply n (check n) n
| null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/DOrder/high/app-nonrec.ml | ocaml | -:{v:Int | true} |
let apply (ab:int) (af: int->unit) ax = af ax
let check (cx:int) (cy:int) = assert (cx = cy)
apply n (check n) n
|
6e4198df9ceb39904b03ab88d6c95be2b3f7a050e87c972f81d89436c95fb1d9 | yzh44yzh/practical_erlang | mylib_app.erl | -module(mylib_app).
-behaviour(application).
| null | https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/13_application/exercise/src/mylib_app.erl | erlang | -module(mylib_app).
-behaviour(application).
| |
ba3b13e164230cec0cf0de3de84e276189c9a12189caa141fea3649a7a1988fe | kelamg/HtDP2e-workthrough | ex435.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex435) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Generative-Recursion/ex435.rkt | racket | about the language level of this file in a form that our tools can easily process.
[List-of Number] [X X -> Boolean] -> [List-of Number]
produces a sorted version of alon based on cmp
assume the numbers are all distinct
[List-of Number] N -> [List-of Number]
returns all the numbers equal to pivot
[List-of Number... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex435) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(check-expect
(quick-sort< '()) '())
(check-expect
... |
3b19e1492fe40fae6570715d0d45d619a59b511da97692de5ebd953d895354e0 | pgourlain/vscode_erlang | vscode_erlfmt_format.erl | Copyright ( c ) Facebook , Inc. and its affiliates .
%%
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,... | null | https://raw.githubusercontent.com/pgourlain/vscode_erlang/866f56a35dfa3cf6c98589d570e5162af45e27a8/apps/erlangbridge/src/vscode_erlfmt_format.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 or implied.
See the License for the specific language governing perm... | Copyright ( c ) Facebook , Inc. and its affiliates .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vscode_erlfmt_format).
-include("vscode_erlfmt_scan.hrl").
-export([to_algebra/1, comments/1, comments_with_pre_... |
cc272977903af398b5609d511de3cbeaf70ffba91503a11f00a768d963649528 | racket/gui | list-box.rkt | #lang racket/base
(require ffi/unsafe
ffi/unsafe/define
racket/class
(only-in racket/list take drop)
"../../syntax.rkt"
"../../lock.rkt"
"item.rkt"
"utils.rkt"
"types.rkt"
"window.rkt"
"const.rkt"
"panel.rkt"
"../common/even... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/gtk/list-box.rkt | racket | ----------------------------------------
(_cpointer 'GtkTreeViewColumn)
For consistency with other platforms,
don't try to select an item initially.
See `panel%` for information on why an extra
event-box layer is needed here.
Called from event-handling thread | #lang racket/base
(require ffi/unsafe
ffi/unsafe/define
racket/class
(only-in racket/list take drop)
"../../syntax.rkt"
"../../lock.rkt"
"item.rkt"
"utils.rkt"
"types.rkt"
"window.rkt"
"const.rkt"
"panel.rkt"
"../common/even... |
e0d7dc1a81d5e157e0b74a24df63a31e5356a61ef51715abe183c940544ba1cf | Incanus3/ExiL | symbols.lisp | (in-package :exil-utils)
(defun to-keyword (symbol)
"get keyword form of symbol"
(intern (symbol-name symbol) :keyword))
;; (to-keyword 'a) => :a
(defun gensymedp (symbol)
(not (symbol-package symbol)))
( gensymedp ' abc ) = > nil
;; (gensymedp '#:abc) => t
( gensymedp ( " abc " ) = > t
(defgeneric symnam... | null | https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/utils/symbols.lisp | lisp | (to-keyword 'a) => :a
(gensymedp '#:abc) => t
(symname 'a) => "A"
(symname "a") => "A"
these are used by env-slots (slot-initform) and env-udno (copy-slot)
(symbol-append (list "copy-" 'facts) :exil-env) => exil-env:copy-facts
compares symbols or lists of symbols | (in-package :exil-utils)
(defun to-keyword (symbol)
"get keyword form of symbol"
(intern (symbol-name symbol) :keyword))
(defun gensymedp (symbol)
(not (symbol-package symbol)))
( gensymedp ' abc ) = > nil
( gensymedp ( " abc " ) = > t
(defgeneric symname (object)
(:method ((symbol symbol)) (symbol-name... |
7ae3b24a1d77eea20cf44a503973a789daff2d56768907e4c0d06437106ecaf7 | mdgeorge4153/sorts | main.ml | open Util
open Sorts
open Animation
(******************************************************************************)
(** {2 Drawing} *)
(******************************************************************************)
let white = "\027[38;5;15m"
let blue =... | null | https://raw.githubusercontent.com/mdgeorge4153/sorts/d5c3feacde70985443fe9c7ceb44037813e7786d/main.ml | ocaml | ****************************************************************************
* {2 Drawing}
****************************************************************************
* returns a line of spaces of length n, with the string s at position i
* returna a stri... | open Util
open Sorts
open Animation
let white = "\027[38;5;15m"
let blue = "\027[38;5;33m"
let red = "\027[38;5;124m"
let green = "\027[38;5;34m"
let clear = "\027[2J\027[1;1H"
let line n s i =
(String.make i ' ') ^ s ^ (String.make (n - i) ' ')
let center s rlen =
let slen = String.length s in
if sle... |
4f6615a8c954173858c5b4e23942888a796a6bcdab2f88805862ca27c98dfacb | reborg/clojure-essential-reference | 7.clj | (require '[criterium.core :refer [quick-bench]])
< 1 >
(lazy-seq (cons x (iterate* f (f x)))))
< 2 >
Execution time mean : 97.414648 ms
(quick-bench (into [] (take 1e6) (iterate inc 0))) ; <3>
Execution time mean : 44.920465 ms | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/Sequences/AbstractGenerators/iterate/7.clj | clojure | <3> | (require '[criterium.core :refer [quick-bench]])
< 1 >
(lazy-seq (cons x (iterate* f (f x)))))
< 2 >
Execution time mean : 97.414648 ms
Execution time mean : 44.920465 ms |
3861eb3c2fe2f1fc23afc0145ad35fc155afd086b08ca8c8f671584d439930fb | vereis/jarlang | dets.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2017 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/vereis/jarlang/72105b79c1861aa6c4f51c3b50ba695338aafba4/src/erl/lib/stdlib/dets.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1996 - 2017 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dets).
-export([all/0,
bchunk/2,
close/1,
delete/2,
delete_all_objects/1,
... |
c47b2d62c5bf1c61794e76bb7c247f38ea9ce17f143918ba4b49e01bcfe1aa4e | foreverbell/project-euler-solutions | 310.hs |
import Data.Bits (xor)
import Data.Array.Unboxed
import Data.Array.ST
import Control.Monad
import Control.Monad.ST
import Data.List (sort, nub)
grundy :: Int -> UArray Int Int
grundy n = runSTUArray $ do
ret <- newArray (0, n) 0
forM_ [1 .. n] $ \i -> do
sgs <- forM [1 .. (isqrt i)] $ \j -> readArray ... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/310.hs | haskell |
import Data.Bits (xor)
import Data.Array.Unboxed
import Data.Array.ST
import Control.Monad
import Control.Monad.ST
import Data.List (sort, nub)
grundy :: Int -> UArray Int Int
grundy n = runSTUArray $ do
ret <- newArray (0, n) 0
forM_ [1 .. n] $ \i -> do
sgs <- forM [1 .. (isqrt i)] $ \j -> readArray ... | |
0e79a9e172a7c54df327ff827265f0353e2bfa1953b4a1ed858d63f299523cf0 | fukamachi/event-emitter | event-emitter.lisp | (in-package :cl-user)
(defpackage event-emitter-test
(:use :cl
:event-emitter
:cl-test-more))
(in-package :event-emitter-test)
(plan 13)
(defclass person (event-emitter)
((name :initarg :name
:reader name)))
(defparameter *user*
(make-instance 'person :name "Eitaro Fukamachi"))
(defun... | null | https://raw.githubusercontent.com/fukamachi/event-emitter/cb0e15f9de4c617cef3f5d5a22a41e28f9613d0b/t/event-emitter.lisp | lisp | Attach a event listener for an event ':say-hi'.
*user* says 'Hi!' when an event ':say-hi' is invoked.
'Hi!' and "How's it going?" will be printed. | (in-package :cl-user)
(defpackage event-emitter-test
(:use :cl
:event-emitter
:cl-test-more))
(in-package :event-emitter-test)
(plan 13)
(defclass person (event-emitter)
((name :initarg :name
:reader name)))
(defparameter *user*
(make-instance 'person :name "Eitaro Fukamachi"))
(defun... |
534d056ea756efc2023a4d8d73be075e8a68911c9d381d9c33eb0c4994701cd8 | Bogdanp/racket-http-easy | response.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse
"common.rkt")
json
racket/contract
racket/match
racket/port
xml
"common.rkt"
"logger.rkt"
"port.rkt")
(provide
status-code/c
make-response... | null | https://raw.githubusercontent.com/Bogdanp/racket-http-easy/630a982a282a51fd7fd85dc5e2f3f581c564b5e4/http-easy-lib/http-easy/private/response.rkt | racket | match expanders ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | #lang racket/base
(require (for-syntax racket/base
syntax/parse
"common.rkt")
json
racket/contract
racket/match
racket/port
xml
"common.rkt"
"logger.rkt"
"port.rkt")
(provide
status-code/c
make-response... |
5565935e7fb2341e1c99685b0702956a80d6b0e458f4ddbcf965b9106afd60cd | karamellpelle/grid | ShadePath.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/Grid/Output/Plain/ShadePath.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module Game.Grid.Output.Plain.ShadePath
(
sha... |
fbf073539ef826e4009251200956c9fae3158a1ed9b32b2983c2460838c00dda | ymherklotz/verismith | Shuffle.hs | # LANGUAGE QuasiQuotes #
-- |
Module : . Shuffle
Description : Shuffle Verilog around .
Copyright : ( c ) 2021 ,
-- License : GPL-3
-- Maintainer : yann [at] yannherklotz [dot] com
-- Stability : experimental
-- Portability : POSIX
--
Shuffles the Verilog file around a bit .
module Verismit... | null | https://raw.githubusercontent.com/ymherklotz/verismith/5e2a3ca343da105c589f41da6208349d6788edb6/src/Verismith/Shuffle.hs | haskell | |
License : GPL-3
Maintainer : yann [at] yannherklotz [dot] com
Stability : experimental
Portability : POSIX
| # LANGUAGE QuasiQuotes #
Module : . Shuffle
Description : Shuffle Verilog around .
Copyright : ( c ) 2021 ,
Shuffles the Verilog file around a bit .
module Verismith.Shuffle where
import Control.Lens hiding (Context)
import Control.Monad (replicateM)
import Control.Monad.Reader
import Control.Mon... |
e748d63dde28b2c9ed4ddc724b411dc4f9bf721ee93d094875a639cccc608da8 | witan-org/witan | unit.mli | (*************************************************************************)
This file is part of Witan .
(* *)
Copyright ( C ) 2017
CEA ( Commi... | null | https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/popop_lib/unit.mli | ocaml | ***********************************************************************
alternatives)
Automatique)
... | This file is part of Witan .
Copyright ( C ) 2017
CEA ( Commissariat à l'énergie atomique et aux énergies
( Institut National de Recherche en Informatique et en
CNRS ( Centre nation... |
be113e4a98718cc920f4bd340ce62b7d1f35574910f09caaa912357e7e5750e4 | funcool/potok | deploy.clj | (require '[clojure.java.shell :as shell]
'[clojure.main])
(require '[badigeon.jar]
'[badigeon.deploy])
(defmulti task first)
(defmethod task "jar"
[args]
(badigeon.jar/jar 'funcool/potok
{:mvn/version "2.6.0"}
{:out-path "target/potok.jar"
... | null | https://raw.githubusercontent.com/funcool/potok/e6ece6f74e47261a23e77a97330c80a5d26321f7/deploy.clj | clojure | Build script entrypoint. This should be the last expression. | (require '[clojure.java.shell :as shell]
'[clojure.main])
(require '[badigeon.jar]
'[badigeon.deploy])
(defmulti task first)
(defmethod task "jar"
[args]
(badigeon.jar/jar 'funcool/potok
{:mvn/version "2.6.0"}
{:out-path "target/potok.jar"
... |
87f515fd147f18cfd3a9557b43dc2bd37b814540a9b2be60929447a9dc49f78e | michaelw/cl-dot | class-example.lisp | (defpackage class-hierarchy
(:use :cl :cl-dot
#+sbcl :sb-mop
#-sbcl :closer-mop))
(in-package class-hierarchy)
(defmethod graph-object-node ((graph (eql 'class-example)) (object class))
(make-instance 'node
:attributes (list :label (class-name object)
... | null | https://raw.githubusercontent.com/michaelw/cl-dot/d32808109952faf8e4d342c0ff4f5a2587b315cb/examples/class-example.lisp | lisp | (defpackage class-hierarchy
(:use :cl :cl-dot
#+sbcl :sb-mop
#-sbcl :closer-mop))
(in-package class-hierarchy)
(defmethod graph-object-node ((graph (eql 'class-example)) (object class))
(make-instance 'node
:attributes (list :label (class-name object)
... | |
62ce4ede9e58c46b55f09e6cce9e2f45b07f0e6f43e4d2d9d7cfe51fcbe68bbb | ertugrulcetin/ClojureNews | newest.cljs | (ns view.list.newest
(:require [util.view]
[cljc.page-util :as page-util]))
(declare owner?
upvoted?)
(defn component-list-newest
[entries page]
[:table {:class "itemlist" :border "0" :cellPadding "0" :cellSpacing "0"}
[:tbody
(let [page-as-int (.parseInt js/window page)
... | null | https://raw.githubusercontent.com/ertugrulcetin/ClojureNews/28002f6b620fa4977d561b0cfca0c7f6a635057b/src/cljs/view/list/newest.cljs | clojure | (ns view.list.newest
(:require [util.view]
[cljc.page-util :as page-util]))
(declare owner?
upvoted?)
(defn component-list-newest
[entries page]
[:table {:class "itemlist" :border "0" :cellPadding "0" :cellSpacing "0"}
[:tbody
(let [page-as-int (.parseInt js/window page)
... | |
35d1cfcfe7523c1b2fd31d0a70312b14473621a5087987712633ae3ff12c4ff6 | wesen/ruinwesen | ajax.lisp | (in-package :md)
(defun prototype-reader (stream char2)
(let ((char (peek-char nil stream)))
(if (not (eql char #\())
(let ((char (read-char stream))
(second (read stream t nil)))
`(,(intern (format nil "$~A" char) (find-package :keyword))
,@second))
`(,(make-keyword-from-string (format nil "~A... | null | https://raw.githubusercontent.com/wesen/ruinwesen/9f3ccea85425cf46b57e76144b3114ca342bad0f/md-uw/src/web/ajax.lisp | lisp | (in-package :md)
(defun prototype-reader (stream char2)
(let ((char (peek-char nil stream)))
(if (not (eql char #\())
(let ((char (read-char stream))
(second (read stream t nil)))
`(,(intern (format nil "$~A" char) (find-package :keyword))
,@second))
`(,(make-keyword-from-string (format nil "~A... | |
01a0a2202e3171d7a1100bf5936cd830aac84c2792509e3040ded23c82a07b0c | anoma/juvix | FromCore.hs | module Juvix.Compiler.Backend.Geb.Translation.FromCore where
import Data.HashMap.Strict qualified as HashMap
import Data.List qualified as List
import Juvix.Compiler.Backend.Geb.Extra
import Juvix.Compiler.Backend.Geb.Language
import Juvix.Compiler.Core.Data.InfoTable qualified as Core
import Juvix.Compiler.Core.Extra... | null | https://raw.githubusercontent.com/anoma/juvix/0ef464668da2211e52725a73f36f342c52e37489/src/Juvix/Compiler/Backend/Geb/Translation/FromCore.hs | haskell | | binder was inserted
LetRecs should be lifted out beforehand
Pattern matching should be compiled beforehand
`_caseDefault` is the body of those branches which were not present in
`_caseBranches`.
`v` which is a product (right-nested)
no polymorphism yet | module Juvix.Compiler.Backend.Geb.Translation.FromCore where
import Data.HashMap.Strict qualified as HashMap
import Data.List qualified as List
import Juvix.Compiler.Backend.Geb.Extra
import Juvix.Compiler.Backend.Geb.Language
import Juvix.Compiler.Core.Data.InfoTable qualified as Core
import Juvix.Compiler.Core.Extra... |
50a8bfadc3a5d294076a3c815fe5a3fab65f13e40ad314d340521e59948e44a6 | mirage/capnp-rpc | echo.ml | module Api = Echo_api.MakeRPC(Capnp_rpc_lwt)
open Lwt.Infix
open Capnp_rpc_lwt
(*-- Server ----------------------------------------*)
let local =
let module Echo = Api.Service.Echo in
Echo.local @@ object
inherit Echo.service
method ping_impl params release_param_caps =
let open Echo.Ping in
... | null | https://raw.githubusercontent.com/mirage/capnp-rpc/f04fa96a583994b71731bc1288833f8304c9ce81/test-bin/echo/echo.ml | ocaml | -- Server ----------------------------------------
-- Client ----------------------------------------
(rough estimate) | module Api = Echo_api.MakeRPC(Capnp_rpc_lwt)
open Lwt.Infix
open Capnp_rpc_lwt
let local =
let module Echo = Api.Service.Echo in
Echo.local @@ object
inherit Echo.service
method ping_impl params release_param_caps =
let open Echo.Ping in
let msg = Params.msg_get params in
release_param... |
275565ecaf17fc02e8d0edc04b936a249c89ac5af29a97ff62b6a627ef3e63ed | Helkafen/wai-middleware-metrics | tests.hs | {-# LANGUAGE OverloadedStrings #-}
module Main where
import Control.Concurrent (threadDelay)
import Control.Monad (liftM, replicateM_)
import Control.Monad.IO.Class (liftIO)
import Data.Int (Int64)
import qualified Data.ByteString... | null | https://raw.githubusercontent.com/Helkafen/wai-middleware-metrics/2d2d9fd6ade1e07b2bae129da6af0a9fa5c5a9e5/tests.hs | haskell | # LANGUAGE OverloadedStrings #
an action over a fresh scotty server
Return the number of requests after running n times
an action over a fresh scotty server
Return the number of server errors after running n times
an action over a fresh scotty server
Return the response time distribution after running n times
an... |
module Main where
import Control.Concurrent (threadDelay)
import Control.Monad (liftM, replicateM_)
import Control.Monad.IO.Class (liftIO)
import Data.Int (Int64)
import qualified Data.ByteString as BS
import qualified... |
d3e23147587c62a10c1448ccfa1d3351f062dd64ffe27d3b0f8a27bfc1ad3ce2 | stritzinger/opcua | opcua_space_test.erl | -module(opcua_space_test).
-include_lib("eunit/include/eunit.hrl").
-include("opcua.hrl").
-include("opcua_internal.hrl").
-import(opcua_space, [add_nodes/2]).
-import(opcua_space, [del_nodes/2]).
-import(opcua_space, [add_references/2]).
-import(opcua_space, [del_references/2]).
-import(opcua_space, [data_type/2]).... | null | https://raw.githubusercontent.com/stritzinger/opcua/a9802f829f80e6961871653f4d3c932f9496ba99/test/opcua_space_test.erl | erlang | % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
TESTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | -module(opcua_space_test).
-include_lib("eunit/include/eunit.hrl").
-include("opcua.hrl").
-include("opcua_internal.hrl").
-import(opcua_space, [add_nodes/2]).
-import(opcua_space, [del_nodes/2]).
-import(opcua_space, [add_references/2]).
-import(opcua_space, [del_references/2]).
-import(opcua_space, [data_type/2]).... |
0c9f1a5c377379404e43b7273431b3faf5c87bfb7e8b1e6e59a9659e8302e70b | nklein/FFT | test.lisp | (require :asdf)
#+sbcl
(require :sb-sprof)
(pushnew #P"/usr/local/asdf-install/site-systems/" asdf:*central-registry*)
(pushnew #P"./" asdf:*central-registry*)
(defpackage #:fft-test
(:use :cl))
(in-package :fft-test)
(defmacro load-package (package &optional verbosity)
(declare (ignorable verbosity))
#+(or... | null | https://raw.githubusercontent.com/nklein/FFT/5cf6132c49f3868cac4ce20284fbb6c1b4a62ba0/test.lisp | lisp | run once to get the coefficients arrays initialized, then time it
if we've got threading, then time the parallel version, too.
run once to get the coefficients arrays initialized, then time it
maybe we want to do profiling, too... I dunno... | (require :asdf)
#+sbcl
(require :sb-sprof)
(pushnew #P"/usr/local/asdf-install/site-systems/" asdf:*central-registry*)
(pushnew #P"./" asdf:*central-registry*)
(defpackage #:fft-test
(:use :cl))
(in-package :fft-test)
(defmacro load-package (package &optional verbosity)
(declare (ignorable verbosity))
#+(or... |
9036a8f26fcccd5a8f75a595027ea617835bd27ffb29a749e2546adcab785ed2 | Yuppiechef/cqrs-server | async_test.clj | (ns cqrs-server.async-test
(:require
[clojure.core.async :as a]
[schema.core :as s]
[cqrs-server.async :as async]
[cqrs-server.onyx :as onyx]
[cqrs-server.cqrs :as cqrs]
[onyx.plugin.core-async]
[clojure.test :refer :all]
[clojure.tools.logging :as log]))
A fully self - contained cqrs test... | null | https://raw.githubusercontent.com/Yuppiechef/cqrs-server/57621f52e8f4a9de9f2e06fff16b4b918a81228a/test/cqrs_server/async_test.clj | clojure | This differs from the other tests in that it uses internal zookeeper - the rest use seperate
Our super lightweight 'database'
:user/create
Need onyx dep to run | (ns cqrs-server.async-test
(:require
[clojure.core.async :as a]
[schema.core :as s]
[cqrs-server.async :as async]
[cqrs-server.onyx :as onyx]
[cqrs-server.cqrs :as cqrs]
[onyx.plugin.core-async]
[clojure.test :refer :all]
[clojure.tools.logging :as log]))
A fully self - contained cqrs test... |
d34ee01e7f510e7ea4ebd05d2b99e835a59359ee173efacbd49e20563c772abb | jordwalke/rehp | toplevel.ml | Js_of_ocaml toplevel
* /
* Copyright ( C ) 2011
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/toplevel/examples/lwt_toplevel/toplevel.ml | ocaml | load file using a synchronous XMLHttpRequest
we need to compute the hash form href to avoid different encoding behavior
across browser. see Url.get_fragment
get all ocaml code
setup handlers
Run initial code if any | Js_of_ocaml toplevel
* /
* Copyright ( C ) 2011
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... |
f9394d177807e171eec311cb72ad589113121f23d89a7f81f9d76cdacfe7072e | rcmgleite/reward-system | utils.clj | (ns nubank.utils
(:require [clojure.java.io :as io]))
(defn exp [x n]
"Math exp function"
(reduce * (repeat n x)))
(defn foreach-line-in-file [file-path callback]
"For each line of the given file, executes a callback on it"
(with-open [r (io/reader file-path)]
(doseq [line (line-seq r)]
(callback ... | null | https://raw.githubusercontent.com/rcmgleite/reward-system/cf8644c6fc6fd989de5a5db59a216a7bcd5ac0a8/src/nubank/utils.clj | clojure | (ns nubank.utils
(:require [clojure.java.io :as io]))
(defn exp [x n]
"Math exp function"
(reduce * (repeat n x)))
(defn foreach-line-in-file [file-path callback]
"For each line of the given file, executes a callback on it"
(with-open [r (io/reader file-path)]
(doseq [line (line-seq r)]
(callback ... | |
ce781c26548058e42a1cfb9c921d51ea8f4c9eea11fba1c1528ce6ea7a8673aa | reflex-frp/reflex-native | UILabel.hs | # LANGUAGE FlexibleContexts #
|Class and instance methods of the class .
module UIKit.UILabel
(
-- * Class methods
new
-- * Instance methods
, setFont, setText, setTextColor
-- * Raw FFI bindings
, uiLabel_new, uiLabel_setFont, uiLabel_setText, uiLabel_setTextColor
) where
import Control.Monad ((=... | null | https://raw.githubusercontent.com/reflex-frp/reflex-native/5fb6a07845e4f7c51f97e9c8ce1a48009f341246/hs-uikit/src/UIKit/UILabel.hs | haskell | * Class methods
* Instance methods
* Raw FFI bindings
|@UILabel - setFont:@ - set the font of the label, overriding any font information given in string attributes if any.
|@UILabel - setText:@ - set the text rendered by the label. | # LANGUAGE FlexibleContexts #
|Class and instance methods of the class .
module UIKit.UILabel
(
new
, setFont, setText, setTextColor
, uiLabel_new, uiLabel_setFont, uiLabel_setText, uiLabel_setTextColor
) where
import Control.Monad ((=<<))
import Foreign.Ptr (Ptr)
import Foundation.Types (NSString, NSSt... |
68fac05e04dff909112a25b8e5977b2fb33f25ebacc2aac8bd857e3e106570f1 | NicklasBoto/signe | Error.hs | module Type.Error where
import Frontend.SAST.Abs
import Frontend.SAST.Print ()
data TypeError
= TypeMismatch Type Type
| InfiniteType Id Type
| VariableNotInScope Id
| ScalarNotNormalized Expr
instance Show TypeError where
show (TypeMismatch e a) =
"Couldn't match expected type '" ++ show... | null | https://raw.githubusercontent.com/NicklasBoto/signe/5f9185e4e20675dec8cfb05ce6e956d923ac4271/src/Type/Error.hs | haskell | module Type.Error where
import Frontend.SAST.Abs
import Frontend.SAST.Print ()
data TypeError
= TypeMismatch Type Type
| InfiniteType Id Type
| VariableNotInScope Id
| ScalarNotNormalized Expr
instance Show TypeError where
show (TypeMismatch e a) =
"Couldn't match expected type '" ++ show... | |
d568e901e2f6bf9c4d5b172e8bd1e878b977911dbf6f5c84e441c4b1e0c23046 | babashka/obb | progress.cljs | #!/usr/bin/env obb
(def app (js/Application.currentApplication))
(set! (.-includeStandardAdditions app) true)
(def images
(.chooseFile app
#js {:withPrompt "Please select some images to process:"
:ofType #js ["public.image"]
:multipleSelectionsAllowed true}))
... | null | https://raw.githubusercontent.com/babashka/obb/65a174b1fbe30f9da32318f1fb0e1e6efea817b6/examples/progress.cljs | clojure | Update the initial progress information
Update the progress detail
Process the image
Increment the progress
Pause for demonstration purposes, so progress can be seen
There’s no need to call a dedicated command to actually display progress
information. The act of setting values for the progress properties mention... | #!/usr/bin/env obb
(def app (js/Application.currentApplication))
(set! (.-includeStandardAdditions app) true)
(def images
(.chooseFile app
#js {:withPrompt "Please select some images to process:"
:ofType #js ["public.image"]
:multipleSelectionsAllowed true}))
... |
624b3c2fa7bddd761827db8dc210ff8fb7ea91e3012c763c6b1de68b82d61a03 | helium/blockchain-core | path_v2_target_eqc.erl | -module(path_v2_target_eqc).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("include/blockchain_vars.hrl").
-export([prop_target_check/0]).
prop_target_check() ->
?FORALL({Hash, ChallengerIndex}, {gen_hash(), gen_challenger_index()},
begin
Ledg... | null | https://raw.githubusercontent.com/helium/blockchain-core/6d7658a369e896ab21b8d22c26130637c51881a4/eqc/path_v2_target_eqc.erl | erlang | erlang:convert_time_unit(Time, microsecond, millisecond)]),
{ok, ChallengerName} = erl_angry_purple_tiger:animal_name(libp2p_crypto:bin_to_b58(Challenger)),
ok = file:write_file("/tmp/challenger_targets",
[append]),
Ensure priv dir exists
Path to static le... | -module(path_v2_target_eqc).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("include/blockchain_vars.hrl").
-export([prop_target_check/0]).
prop_target_check() ->
?FORALL({Hash, ChallengerIndex}, {gen_hash(), gen_challenger_index()},
begin
Ledg... |
46f0a4803ab33a2c5086cd9dd6b68eb6fc675851c37446cd7e044bba6255f3f1 | mirkov/cl-grammar-of-graphics | data-functions.lisp |
Time - stamp : < 2011 - 10 - 06 20:26:30 >
;;
Copyright 2011
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Fou... | null | https://raw.githubusercontent.com/mirkov/cl-grammar-of-graphics/5499ae4f3e1d3fd248dc73f7c4f8cbf535acbe35/obsolete/cl-gg-base/data-functions.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Ge... |
Time - stamp : < 2011 - 10 - 06 20:26:30 >
Copyright 2011
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy ... |
d54d8c7534e1d4f8eacc2db2eb097a7641849b71964060f83414dd24442fedfc | awslabs/s2n-bignum | bignum_demont_p384_alt.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_demont_p384_alt.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "x86/p384/bignum_demont_p384_alt.o";;
***
PUSH (% r12)
PUSH (% r13)
ADD (% rcx) (% r8)
ADD (% r8) (% rax)
SUB (% r9) (% r8)
ADD (... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Mapping out of Montgomery representation modulo p_384 . ... |
a0eb3ed5e4a722c87e15bbe94c62b952083baadc18040ea95e2df4b4b6311001 | cracauer/sbcl-ita | system.lisp | ;;;; x86 VM definitions of various system hacking operations
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is i... | null | https://raw.githubusercontent.com/cracauer/sbcl-ita/f85a8cf0d1fb6e8c7b258e898b7af3233713e0b9/src/compiler/x86-64/system.lisp | lisp | x86 VM definitions of various system hacking operations
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
type frobbing VOPs
Pick off fixnums.
Pick off structures and list pointers.
must be... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(define-vop (lowtag-of)
(:translate lowtag-of)
(:policy :fast-safe)
(:args (object :scs (any-re... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.