_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 |
|---|---|---|---|---|---|---|---|---|
54275382b566d58a9d4b5e3e7c21686515d48a42bbd6f0a7a229efefd2c47353 | input-output-hk/cardano-wallet-legacy | Interpreter.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ImplicitParams #
# LANGUAGE InstanceSigs #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
{-# LANGUAGE UndecidableInstances #-}
-- | Interpreter from the D... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/test/unit/UTxO/ToCardano/Interpreter.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
| Interpreter from the DSL to Cardano types
* Interpretation context
opaque
* Interpretation monad
* Interpreter proper
* Re-exported
------------------------------------------------------------------------------
Interpretation cont... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ImplicitParams #
# LANGUAGE InstanceSigs #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
module UTxO.ToCardano.Interpreter (
, initIntCtxt
, IntT
, runIntT
, runIntT'
, runIntBoot
, runIntBoot... |
c11c1aa9a0d88e2b8438f01d0f6565c10ef97925fd945843c925cd87a278503a | mstksg/advent-of-code-2017 | Day23.hs | module AOC2017.Day23 (day23a, day23b) where
import AOC2017.Types (Challenge)
import AOC2017.Util.Tape (Tape(..), HasTape(..), unsafeTape, move)
import Control.Applicative (many)
import Control.Lens (set, use, at,... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2017/f9e97680726e87be175cf423241da3048ef6564d/src/AOC2017/Day23.hs | haskell | split by prefix and suffx
| Context in which Tape commands are run. Writer parameter records
number of Mul's
Nothing = program terminates by running out of bounds
| Single step through program tape.
stepTape until program terminates | module AOC2017.Day23 (day23a, day23b) where
import AOC2017.Types (Challenge)
import AOC2017.Util.Tape (Tape(..), HasTape(..), unsafeTape, move)
import Control.Applicative (many)
import Control.Lens (set, use, at,... |
91e5b38718cb120825e3fb782eb43f5cd0f1ad9e416babce3a2ccfaffd80ef07 | dyzsr/ocaml-selectml | functors.ml | (* TEST
flags = "-dshape"
* expect
*)
module type S = sig
type t
val x : t
end
[%%expect{|
{
"S"[module type] -> <.2>;
}
module type S = sig type t val x : t end
|}]
module Falias (X : S) = X
[%%expect{|
{
"Falias"[module] -> Abs<.4>(X/293, X/293<.3>);
}
module Falias : functor (X : S) -> sig type t = X... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/3495de07186fd9e5e1c6b5802ede00199fb1900a/testsuite/tests/shapes/functors.ml | ocaml | TEST
flags = "-dshape"
* expect
*************************************************************************
Make sure we restrict shapes even when constraints imply [Tcoerce_none]
************************************************************************* |
module type S = sig
type t
val x : t
end
[%%expect{|
{
"S"[module type] -> <.2>;
}
module type S = sig type t val x : t end
|}]
module Falias (X : S) = X
[%%expect{|
{
"Falias"[module] -> Abs<.4>(X/293, X/293<.3>);
}
module Falias : functor (X : S) -> sig type t = X.t val x : t end
|}]
module Finclude (X : S... |
c3c14dc99d529056ff41583086bea72f496ca9c43693c7637e40722d6c4483de | BinaryAnalysisPlatform/bap | powerpc_cr_tests.ml | open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
open Powerpc_tests_helpers
let crand arch ctxt =
let name = "CRAND" in
let bytes = make_insn ~name `XL [19; 1; 2; 3; 257; 0] in
let cr1 = cr_bit 1 in
let cr2 = cr_bit 2 in
let cr3 = cr_bit 3 in
let init = Bil.[
cr2 := int Word.b1;
cr3 :... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib_test/powerpc/powerpc_cr_tests.ml | ocaml | open Core_kernel[@@warning "-D"]
open Bap.Std
open OUnit2
open Powerpc_tests_helpers
let crand arch ctxt =
let name = "CRAND" in
let bytes = make_insn ~name `XL [19; 1; 2; 3; 257; 0] in
let cr1 = cr_bit 1 in
let cr2 = cr_bit 2 in
let cr3 = cr_bit 3 in
let init = Bil.[
cr2 := int Word.b1;
cr3 :... | |
aa1f01e575a1b897aa3a33b06443e8216759caafd8414e44b28439b85b6fad6f | janegca/htdp2e | Exercise-069-DifferentFn.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-beginner-reader.ss" "lang")((modname Exercise-069-DifferentFn) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp")... | null | https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/01-FixedSizeData/Exercise-069-DifferentFn.rkt | racket | about the language level of this file in a form that our tools can easily process.
otherwise it uses the marker " * " . Note The problem
letters marked by an asterisk
String String -> String
returns s2 if s1 and s2 are equal, otherwise, returns "*" | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname Exercise-069-DifferentFn) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor repeating-... |
fe6dcdde53d4c30b85f1f350d576f2e8018f48d35e0feefe72c42356d2e84e0e | apatil/aplomb | interactive_splom.ml |
To run interactively :
utop -require aplomb.ppx_deriving , aplomb , ppx_deriving_yojson , yojson , aplomb.browser -init examples / interactive_splom.ml
To run interactively:
utop -require aplomb.ppx_deriving,aplomb,ppx_deriving_yojson,yojson,aplomb.browser -init examples/interactive_splom.ml
*)
type r... | null | https://raw.githubusercontent.com/apatil/aplomb/2b9a6150c22093217661cb927ebec1e609ecf973/examples/interactive_splom.ml | ocaml | Data reading will be streamlined in future, once OCaml gets dataframe support.
Configure interaction with the plot. See -lite/docs/selection.html |
To run interactively :
utop -require aplomb.ppx_deriving , aplomb , ppx_deriving_yojson , yojson , aplomb.browser -init examples / interactive_splom.ml
To run interactively:
utop -require aplomb.ppx_deriving,aplomb,ppx_deriving_yojson,yojson,aplomb.browser -init examples/interactive_splom.ml
*)
type r... |
5417a5b79a82e683940ea8ce00cb026787caec1ad1af0db8e88a58d870198fd4 | vouillon/osm | hierholzer.ml | OSM tools
* Copyright ( C ) 2013
*
* 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 exception ;
* either version 2.1 of the License , or ( at your opti... | null | https://raw.githubusercontent.com/vouillon/osm/a42d1bcc82a4ad73c26c81ac7a75f9f1c7470344/not_used/hierholzer.ml | ocaml | 6 edges, no odd => 1 path with 7 nodes
**
**
**
Reference point
Number of categories
cat + lay
no more path | OSM tools
* Copyright ( C ) 2013
*
* 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 exception ;
* either version 2.1 of the License , or ( at your opti... |
63bf9460028eb86774be6e2a5d92912597e56504b58f20120ad730531d8ccc51 | dyzsr/ocaml-selectml | pr7284_bad.ml | TEST
flags = " -w -a "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a "
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
module type S = sig
type o1 = < ba... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-objects-bugs/pr7284_bad.ml | ocaml | TEST
flags = " -w -a "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a "
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
module type S = sig
type o1 = < ba... | |
7684ebc70e477c2f29f8f0763487d37498ae723f0f4b87341bb98906f55c901d | kunstmusik/score | beats.clj | (ns score.beats
"Functions for working with beat patterns and sets.")
(defn str->pat
"Converts beat string of 1's and 0's to sequence of 1's and 0's."
[beat-str]
(let [num-one {\1 1 \0 0}]
(map num-one beat-str)))
(defn pat->set
"Converts a sequence of 1's and 0's into a beat set whose
members include... | null | https://raw.githubusercontent.com/kunstmusik/score/87b532ec2e3e273f077be9bdd878427a25d0534c/src/main/score/beats.clj | clojure | (ns score.beats
"Functions for working with beat patterns and sets.")
(defn str->pat
"Converts beat string of 1's and 0's to sequence of 1's and 0's."
[beat-str]
(let [num-one {\1 1 \0 0}]
(map num-one beat-str)))
(defn pat->set
"Converts a sequence of 1's and 0's into a beat set whose
members include... | |
184a40158a7bdcbeb7da90d3f8f2a0d6ad59087e73fad3bca2ed24db6d0d2168 | windorg/app-old | Edit.hs | module Web.View.Board.Edit where
import Web.Helper.View
import Web.View.Prelude
data EditView = EditView {owner :: User, board :: Board}
instance View EditView where
beforeRender EditView{..} = do
setTitle (get #title board <> " / wind of change")
html EditView{..} =
[hsx|
<nav>
... | null | https://raw.githubusercontent.com/windorg/app-old/ed9c5322c8ab8a0275bdcd479be12a3f230da8c9/Web/View/Board/Edit.hs | haskell | module Web.View.Board.Edit where
import Web.Helper.View
import Web.View.Prelude
data EditView = EditView {owner :: User, board :: Board}
instance View EditView where
beforeRender EditView{..} = do
setTitle (get #title board <> " / wind of change")
html EditView{..} =
[hsx|
<nav>
... | |
64fc7e09f6467d9cade6291aeb447e0085e5886c15680a1c1f93a02c37c06586 | nasa/pvslib | patch-20220902-manip-syntax-matching.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;; -*- Mode: Lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
syntax-matching.lisp -- Syntax matching functions for Manip package
Author : < >
Created On : 19 Sep 2005 ( excerpted from manip-strategies.lisp )
Last Modified By : < >
Last Modified On : 03 Sep 2019
Last Mo... | null | https://raw.githubusercontent.com/nasa/pvslib/e7cdff5f70cc32cf7e440bba8b24b5e28bd3e0b1/pvs-patches/patch-20220902-manip-syntax-matching.lisp | lisp | -*- Mode: Lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;
Status : Stable
------------ Support for syntax matching features ------------
Following structure returned by spec-items parser.
only for match strategy form
only for match strategy form
only for extended expression form
only for match strategy form
Co... | syntax-matching.lisp -- Syntax matching functions for Manip package
Author : < >
Created On : 19 Sep 2005 ( excerpted from manip-strategies.lisp )
Last Modified By : < >
Last Modified On : 03 Sep 2019
Last Modified On : 29 Nov 2005 ( v1.2 - beta )
Last Modified On : 17 Nov 2007 ( v1... |
52ebcbb843c01a7b4df29da8b3a715a2d1462abae76c1a48b73375c2881c5eb7 | a-sassmannshausen/guile-config | hall.scm | (hall-description
(name "config")
(prefix "guile")
(version "0.3")
(author "Alex Sassmannshausen")
(copyright (2016 2017 2018))
(synopsis
"Guile application configuration parsing library.")
(description
"Guile Config is a library providing a declarative approach to application configuration specif... | null | https://raw.githubusercontent.com/a-sassmannshausen/guile-config/b05957743ee8ab8d111683697a56e46a82429b6f/hall.scm | scheme | (hall-description
(name "config")
(prefix "guile")
(version "0.3")
(author "Alex Sassmannshausen")
(copyright (2016 2017 2018))
(synopsis
"Guile application configuration parsing library.")
(description
"Guile Config is a library providing a declarative approach to application configuration specif... | |
636038b68297fe6da2a00f424bad124c1974ae4fb1f3d6f3608222277bf2397e | xapix-io/axel-f | stat.cljc | (ns axel-f.excel.stat
(:require [axel-f.excel.math :as math]
[axel-f.excel.coerce :as coerce]))
(defn- flatten-numbers [tr-coercer]
(comp (mapcat #(cond
(string? %) [(not-empty %)]
(sequential? %) (not-empty %)
(boolean? %) [%]
... | null | https://raw.githubusercontent.com/xapix-io/axel-f/ec8fca880033e0ae78a8d9f42538d4a71fba29bd/src/axel_f/excel/stat.cljc | clojure | (ns axel-f.excel.stat
(:require [axel-f.excel.math :as math]
[axel-f.excel.coerce :as coerce]))
(defn- flatten-numbers [tr-coercer]
(comp (mapcat #(cond
(string? %) [(not-empty %)]
(sequential? %) (not-empty %)
(boolean? %) [%]
... | |
e64056bbc75fce602ccab1805d62ff1c08e429e9cbd46f11e48c9977cbe36e88 | coord-e/mlml | array.ml | external _get : 'a array * int -> 'a = "_mlml_get_array"
external _set : 'a array * int * 'a -> unit = "_mlml_set_array"
external _create_uninitialized : int -> 'a array = "_mlml_create_array"
let get a n = _get (a, n)
let set a n x = _set (a, n, x)
external length : 'a array -> int = "_mlml_length_array"
let init n... | null | https://raw.githubusercontent.com/coord-e/mlml/ec34b1fe8766901fab6842b790267f32b77a2861/stdlib/array.ml | ocaml | external _get : 'a array * int -> 'a = "_mlml_get_array"
external _set : 'a array * int * 'a -> unit = "_mlml_set_array"
external _create_uninitialized : int -> 'a array = "_mlml_create_array"
let get a n = _get (a, n)
let set a n x = _set (a, n, x)
external length : 'a array -> int = "_mlml_length_array"
let init n... | |
7fe6c70240a148f9684b87141e0dd783136fae35f9a47df218c5807ec35e357e | hypernumbers/hypernumbers | twilio.erl | %%%-------------------------------------------------------------------
@author < >
2011 ,
@doc Twilio REST API library . Uses API version " 2010 - 04 - 01 " .
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(twilio).
-export([make_call/5,
send_sms/5]).
-... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/twilio/src/twilio.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
to twilio. The list of accepted parameters can be found
at [].
Add "From" and "To" parameters to send to twilio
to twilio. The list of accepted parameters can be found
at... | @author < >
2011 ,
@doc Twilio REST API library . Uses API version " 2010 - 04 - 01 " .
-module(twilio).
-export([make_call/5,
send_sms/5]).
-export([request/5]).
-define(BASE_URL, "api.twilio.com").
-define(API_VERSION_2010, "2010-04-01").
-type twilio_response() :: any().
-type twilio_param()... |
858b0f2d5912795190ec85217b8577d7920885d6c266f84b727cd351ad726773 | nvim-treesitter/nvim-treesitter | highlights.scm | (comment) @comment
(tag_name) @tag
(
(tag_name) @constant.builtin
(#any-of? @constant.builtin
"head" "title" "base" "link" "meta" "style"
"body" "article" "section" "nav" "aside" "h1" "h2" "h3" "h4" "h5" "h6" "hgroup" "header" "footer" "address"
"p" "hr" "pre" "blockquote" "ol" "ul" "menu" "li" "dl" "dt... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/675ecbb0bd676a4e0e9e2ab89fc85825f08759a4/queries/pug/highlights.scm | scheme | (comment) @comment
(tag_name) @tag
(
(tag_name) @constant.builtin
(#any-of? @constant.builtin
"head" "title" "base" "link" "meta" "style"
"body" "article" "section" "nav" "aside" "h1" "h2" "h3" "h4" "h5" "h6" "hgroup" "header" "footer" "address"
"p" "hr" "pre" "blockquote" "ol" "ul" "menu" "li" "dl" "dt... | |
f5f26a5099dca797f4920148b093b6bf47c53614ffb001c7749c62c30a4500b6 | fetburner/Coq2SML | tacmach.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/proofs/tacmach.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Names
... |
413ac276a42315ba90a766ff83d6ee258f01411d2586afdba5b45b72098a31a6 | rems-project/cerberus | pp_symbolic.ml | open Symbolic
open Pp_prelude
let pp_symbolic_name = function
| SYMBfsym sym -> !^ (Pp_symbol.to_string_pretty sym)
| SYMBimpl iCst -> !^ (Implementation_.string_of_implementation_constant iCst)
let rec pp_symbolic ppA ppB = function
| SYMBtrue ->
!^ "true"
| SYMBfalse ->
!^ "false"
| SYMBconst... | null | https://raw.githubusercontent.com/rems-project/cerberus/124c93f10cb4c235f6396adec82ebf9563daeb7e/ocaml_frontend/pprinters/pp_symbolic.ml | ocaml | open Symbolic
open Pp_prelude
let pp_symbolic_name = function
| SYMBfsym sym -> !^ (Pp_symbol.to_string_pretty sym)
| SYMBimpl iCst -> !^ (Implementation_.string_of_implementation_constant iCst)
let rec pp_symbolic ppA ppB = function
| SYMBtrue ->
!^ "true"
| SYMBfalse ->
!^ "false"
| SYMBconst... | |
9dedd947b7fd018aad82bb83d1a4fe2dd306af01d5c1d93883c0f1faf6a1c46d | robert-strandh/Flexichain | flexichain-package.lisp | ;;; Flexichain
;;; Package definition
;;;
Copyright ( C ) 2003 - 2004 ( )
Copyright ( C ) 2003 - 2004 ( )
;;;
THIS LIBRARY IS FREE software ; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
ve... | null | https://raw.githubusercontent.com/robert-strandh/Flexichain/9af644a6323f303a936a391b956babcbfe7b0c67/flexichain-package.lisp | lisp | Flexichain
Package definition
you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. S... | Copyright ( C ) 2003 - 2004 ( )
Copyright ( C ) 2003 - 2004 ( )
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA
(cl:in-package #:com... |
cc3624dc9eab01da27d5883a6f536306b9929034cfefa658025179606a677d5b | fjames86/frpc2 | test2.lisp | Copyright ( c ) 2016 < >
This code is licensed under the MIT license .
(defpackage #:frpc2.test2
(:use #:cl #:drx #:frpc2))
(in-package #:frpc2.test2)
(defparameter *client* (make-instance 'udp-client))
(defun test-call-null (addr)
(setf (udp-transport-addr *client*... | null | https://raw.githubusercontent.com/fjames86/frpc2/6b7ec2c7d57a0918ecc3755af75ff183e24d7e85/test/test2.lisp | lisp | Copyright ( c ) 2016 < >
This code is licensed under the MIT license .
(defpackage #:frpc2.test2
(:use #:cl #:drx #:frpc2))
(in-package #:frpc2.test2)
(defparameter *client* (make-instance 'udp-client))
(defun test-call-null (addr)
(setf (udp-transport-addr *client*... | |
1560d74c0747c1540d226b6d9d7e3fc91257bba1a2f8fcd4fae1997d2fd27a66 | esumii/min-caml | join-reg.ml | let rec f _ = 123 in
let rec g _ = 456 in
let rec h _ = 789 in
let x = f () in
let y = g () in
print_int ((if h () = 0 then x - y else y - x) + x + y)
(* then節ではxがr0でyがr1に、else節ではyがr0でxがr1にある *)
| null | https://raw.githubusercontent.com/esumii/min-caml/8860b6fbc50786a27963aff1f7639b94c244618a/test/join-reg.ml | ocaml | then節ではxがr0でyがr1に、else節ではyがr0でxがr1にある | let rec f _ = 123 in
let rec g _ = 456 in
let rec h _ = 789 in
let x = f () in
let y = g () in
print_int ((if h () = 0 then x - y else y - x) + x + y)
|
9474030e1c38630da4184498a9fcdc03ccccd9e2bf7f5b041e9edea12de3499c | chumsley/jwacs | test-shift-decls-transformation.lisp | ;;;; test-shift-function-decls.lisp
;;;
;;; Tests for the shift-decls transformation
;;;
Copyright ( c ) 2005
;;; See LICENSE for full licensing details.
;;;
(in-package :jwacs-tests)
(defnote shift-decls "Tests for the shift-decls transformation")
(deftest shift-decls/1 :notes shift-decls
(transform 'shift-dec... | null | https://raw.githubusercontent.com/chumsley/jwacs/c25adb3bb31fc2dc6e8c8a58346949ee400633d7/tests/test-shift-decls-transformation.lisp | lisp | test-shift-function-decls.lisp
Tests for the shift-decls transformation
See LICENSE for full licensing details.
}"))
}
"))
only function decls move
} // Moves up within functionExpression's body only
}
}};
}};"))
| Copyright ( c ) 2005
(in-package :jwacs-tests)
(defnote shift-decls "Tests for the shift-decls transformation")
(deftest shift-decls/1 :notes shift-decls
(transform 'shift-decls (test-parse "
function foo()
{
function inner(h)
{
}
}
#.(test-parse "
function foo()
{
... |
d7accd9d330837481fb5b08daa5027698e054856547d1ea01b7ce25d1ec9f31f | nvim-treesitter/nvim-treesitter | highlights.scm | [
(line_comment)
(block_comment)
] @comment
; Keywords
;---------
[
"if"
"then"
"else"
(case)
(of)
] @conditional
[
"let"
"in"
(as)
(port)
(alias)
(infix)
(module)
(type)
] @keyword
[
(import)
(exposing)
] @include
; Punctuation
;------------
[
(double_dot)
] @punctuation.spe... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/e4042553bda83baa3d908d7873e3308b4680cdd4/queries/elm/highlights.scm | scheme | Keywords
---------
Punctuation
------------
Variables
----------
Functions
----------
----------
Modules
--------
Types
------
Literals
--------- | [
(line_comment)
(block_comment)
] @comment
[
"if"
"then"
"else"
(case)
(of)
] @conditional
[
"let"
"in"
(as)
(port)
(alias)
(infix)
(module)
(type)
] @keyword
[
(import)
(exposing)
] @include
[
(double_dot)
] @punctuation.special
[
","
"|"
(dot)
] @punctuation.delimit... |
22f6b406a57fee6f8beaea6a5f474d9380d6b277f6579a81eb87424d17e2ca63 | avsm/eeww | odoc_texi.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
, ... | null | https://raw.githubusercontent.com/avsm/eeww/651d8da20a3cc9e88354ed0c8da270632b9c0c19/boot/ocaml/ocamldoc/odoc_texi.ml | ocaml | ************************************************************************
OCaml
... | , base sur du code de Maxence Guesdon
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Generation of Texinfo documentation .
open Odoc_info
open Value
open Type
open Extension
open Exception
op... |
3f14b50d8d5ec8522892e5376ef362d6a417f5bd6f55facea1b6af624c18f7f1 | jonromero/music-as-data | mad.clj | 07/03/2011
;;
(ns music-as-data.mad
(:import [ddf.minim AudioOutput AudioSample])
(:import (processing.core PApplet PImage PGraphics PFont))
(:use [music-as-data.globals]
[music-as-data.mfunctions])
(:use [quil.core]
[quil.applet]))
(defn p
[elements]
(doseq [element elements]
(play-eleme... | null | https://raw.githubusercontent.com/jonromero/music-as-data/6f84689a650a877dd508952aa521f47973070296/src/music_as_data/mad.clj | clojure |
Maybe a reduce could clean it up more?
small tempo drums demo | 07/03/2011
(ns music-as-data.mad
(:import [ddf.minim AudioOutput AudioSample])
(:import (processing.core PApplet PImage PGraphics PFont))
(:use [music-as-data.globals]
[music-as-data.mfunctions])
(:use [quil.core]
[quil.applet]))
(defn p
[elements]
(doseq [element elements]
(play-element e... |
d91daeec91d61483536e6046334b5ba0f397206e8308748098d45fc3df09c341 | ocamllabs/ocaml-modular-implicits | main.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/lib-dynlink-bytecode/main.ml | ocaml | *********************************************************************
OCaml
... | , LexiFi
Copyright 2007 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
let f x = print_string "This is Main.f\n... |
14cbe73d39ac76b90fbf8ccd173782028d32eef03958edc025049f52c2116580 | Chris00/color_brewery | color_brewery.ml | open Printf
type rgba = Gg.color
type cmyk = Gg.v4
Convert x ∈ [ 0,1 ] into an integer in [ 0 , 255 ] .
let to_hex x =
if x <= 0. then 0
else if x >= 1. then 0xFF
else truncate(x *. 255. +. 0x1.FFFFFFFFFFFFFp-2)
let to_int c =
(to_hex(Gg.Color.r c) lsl 16) lor (to_hex(Gg.Color.g c) lsl 8)
lor (to_hex(Gg.... | null | https://raw.githubusercontent.com/Chris00/color_brewery/7de55522118565c82bed22aa6286f42843a8d708/src/color_brewery.ml | ocaml | FIXME: generate color ranges between arbitrary colors.
The important types are defined in the included module.
do not allow modifying the array
-simulation/
/ — -oracle-java
| open Printf
type rgba = Gg.color
type cmyk = Gg.v4
Convert x ∈ [ 0,1 ] into an integer in [ 0 , 255 ] .
let to_hex x =
if x <= 0. then 0
else if x >= 1. then 0xFF
else truncate(x *. 255. +. 0x1.FFFFFFFFFFFFFp-2)
let to_int c =
(to_hex(Gg.Color.r c) lsl 16) lor (to_hex(Gg.Color.g c) lsl 8)
lor (to_hex(Gg.... |
0d7e2294b262424c321d28d0126e51731c354ca54aa7040d0c6166ad044c751d | vikram/lisplibraries | definitions.lisp | (in-package #:metashell)
(defparameter *bourne-compatible-shell* "/bin/sh"
"The path to a Bourne compatible command shell in physical pathname notation.")
(defvar *shell-search-paths* '("/usr/bin/" "/usr/local/bin"))
(defparameter *ticks-per-second*
#+openmcl
ccl:*ticks-per-second*
#+digitool
60
#-(or di... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/trivial-shell/dev/definitions.lisp | lisp | (in-package #:metashell)
(defparameter *bourne-compatible-shell* "/bin/sh"
"The path to a Bourne compatible command shell in physical pathname notation.")
(defvar *shell-search-paths* '("/usr/bin/" "/usr/local/bin"))
(defparameter *ticks-per-second*
#+openmcl
ccl:*ticks-per-second*
#+digitool
60
#-(or di... | |
db663f08ce5607bf6878bace85e8af7b4116d64a95be65ceee93c26aba2527de | PrincetonUniversity/lucid | Input.mli | open Syntax
val parse : string -> decls
val get_includes : string -> string list
val get_all_source_filenames : string -> string list | null | https://raw.githubusercontent.com/PrincetonUniversity/lucid/ae9fd967225486b1ac848f7318c08e7379832b61/src/lib/frontend/Input.mli | ocaml | open Syntax
val parse : string -> decls
val get_includes : string -> string list
val get_all_source_filenames : string -> string list | |
9e270a5140fa887bd00520c41811446eba0c05b81b8112abdea52842f1de2626 | grin-compiler/ghc-wpc-sample-programs | Interface.hs | -- ------------------------------------------------------------
|
Module : Text . XML.HXT.DOM.Interface
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : stable
Portability : portable
The interface to the primitive DOM data types and c... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/hxt-9.3.1.18/src/Text/XML/HXT/DOM/Interface.hs | haskell | ------------------------------------------------------------
------------------------------------------------------------
constants
XML Tree types
mime types related stuff
char encoding names for readDocument
------------------------------------------------------------ |
|
Module : Text . XML.HXT.DOM.Interface
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : stable
Portability : portable
The interface to the primitive DOM data types and constants
and utility functions
Module : Text.XML.... |
6bd7b0588e6bca65268f7a08d82182b90e7d2172dad5d8f8262fcac4153494fb | vikram/lisplibraries | xml-binding.lisp | ;;;;
Copyright ( c ) 2008 , All Rights Reserved
;;;;
;;;; Redistribution and use in source and binary forms, with or without
;;;; modification, are permitted provided that the following conditions
;;;; are met:
;;;;
;;;; * Redistributions of source code must retain the above copyright
;;;; notice, this list o... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/zs3-1.0.4/xml-binding.lisp | lisp |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form... | Copyright ( c ) 2008 , All Rights Reserved
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package #:zs3)
(defun skip-document-start (source)
(let ((type (klacks:peek source)))
(when (eql :start-document type)
... |
def3dc80b99ffcd85e254d1fcd66cd98ab92d737306be59fe838ddbd78c3e0a7 | fantasytree/fancy_game_server | global_timer.erl | %%----------------------------------------------------
%% 全局定时器管理
@author yankai
%% @end
%%----------------------------------------------------
-module(global_timer).
-behaviour(gen_server).
-export([
start_link/0
]
).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/... | null | https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/src/mod/misc/global_timer.erl | erlang | ----------------------------------------------------
全局定时器管理
@end
----------------------------------------------------
----------------------------------------------------
外部接口
----------------------------------------------------
@doc 启动
----------------------------------------------------
内部处理
---------------... | @author yankai
-module(global_timer).
-behaviour(gen_server).
-export([
start_link/0
]
).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-include("common.hrl").
-include("role.hrl").
-include("timer.hrl").
-record(state, {
}
).
-spec start_link() -> {ok,... |
e590e0dda39b97f5b895d9c42aa0b00005e860f83ff93572f4f648648d75dca5 | Kappa-Dev/KappaTools | contact_map.mli | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/term/contact_map.mli | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
type t = (Mods.IntSet.t * Mods.Int2Set.t) array array
val print_kappa :
noCounters:bool -> Signature.s -> Format.formatter -> t -> unit
val print_cycles : Signature.s -> Format.formatter -> t -> unit
val to_yojson : t -> Yojson.Basic.... |
69b3c583d97b1dbdad7d4a9a7e3e8c9b8892a7a1f59f3fbc78f3555bc28297f0 | bitemyapp/bloodhound | Import.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Import
( module X,
module Test.Import,
)
where
import Control.Applicative as X
import Control.Exception as X (evaluate)
import Control.Monad as X
import Control.Monad.Catch as X
import Control.Monad.Reader as X
import Data.Aeson as X
import Data.Aeson.TH as X
imp... | null | https://raw.githubusercontent.com/bitemyapp/bloodhound/c5a10dd2922e0a2debaeb8985e53112700a1998b/tests/Test/Import.hs | haskell | # LANGUAGE OverloadedStrings # |
module Test.Import
( module X,
module Test.Import,
)
where
import Control.Applicative as X
import Control.Exception as X (evaluate)
import Control.Monad as X
import Control.Monad.Catch as X
import Control.Monad.Reader as X
import Data.Aeson as X
import Data.Aeson.TH as X
import Data.Aeson.Types as X (parseEit... |
679ea33fd9c0461f2115f241ae38a21c3160bc7b5f22aca66fe7b9f6dbe00024 | kmi/irs | load.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(eval-when (eval load)
(ensure-ontology wsmo domain "ocml:library;domains;wsmo;load.lisp" ))
(def-ontology luisa-domain :includes (wsmo)
:type :domain
:author "wsmo" :allowed-editors ("nil")) | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/luisa-domain/load.lisp | lisp | Package : |
File created in WebOnto
(in-package "OCML")
(eval-when (eval load)
(ensure-ontology wsmo domain "ocml:library;domains;wsmo;load.lisp" ))
(def-ontology luisa-domain :includes (wsmo)
:type :domain
:author "wsmo" :allowed-editors ("nil")) |
7031ac10c82d02bded08e6a1487ffe7c3879692529dab8bd1b8df9d6e737526a | ff-notes/ff | Config.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module FF.Config where
import Control.Exception (throw)
import Data.Aeson (FromJSON, withObject, (.!=), (.:?))
import qualified Data.Aeson as JSON
import Data.Aeson.TH (defaultOptions, deriveJSON... | null | https://raw.githubusercontent.com/ff-notes/ff/101b4d503ac33910d3d1fe8f65b7921ff6f58eb5/ff-core/lib/FF/Config.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module FF.Config where
import Control.Exception (throw)
import Data.Aeson (FromJSON, withObject, (.!=), (.:?))
import qualified Data.Aeson as JSON
import Data.Aeson.TH (defaultOptions, deriveJSON, deriveToJSON)
import qualified Da... |
9dea00a94c2c46d3d11390efdb4602857ae047f84328487d2c247cdf790d8fc1 | bjornbm/astro | AD.hs | module Astro.AD (Lift (..), FAD) where
import Astro.Time (E (E)) -- For the Lift instance.
import Numeric.Units.Dimensional.AD
-- List instance for epochs. TODO Move!
instance Lift (E t) where lift (E t) = E (lift t)
| null | https://raw.githubusercontent.com/bjornbm/astro/f4fb2c4b739a0a8f68f51aa154285120d2230c30/src/Astro/AD.hs | haskell | For the Lift instance.
List instance for epochs. TODO Move! | module Astro.AD (Lift (..), FAD) where
import Numeric.Units.Dimensional.AD
instance Lift (E t) where lift (E t) = E (lift t)
|
99c488f041ea3b4200df84c51f2dc207fb15532baf6796e1acca278f3a998a86 | axch/rules | rules.scm | ;;; This file is part of Rules, an extensible pattern matching,
pattern dispatch , and term rewriting system for MIT Scheme .
Copyright 2010 - 2013 , Massachusetts Institute of
;;; Technology
;;;
;;; Rules is free software; you can redistribute it and/or modify it
under the terms of the GNU Affero General Publi... | null | https://raw.githubusercontent.com/axch/rules/21f25c86c19fcb0500e9f6f3905de86d59225d8e/rules.scm | scheme | This file is part of Rules, an extensible pattern matching,
Technology
Rules is free software; you can redistribute it and/or modify it
either version 3 of the
License, or (at your option) any later version.
This code is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the... | pattern dispatch , and term rewriting system for MIT Scheme .
Copyright 2010 - 2013 , Massachusetts Institute of
under the terms of the GNU Affero General Public License as
You should have received a copy of the GNU Affero General Public
(declare (usual-integrations))
The handler can reject a putative m... |
c5b2d1218fa7b4a5c222f12999ba8a26d56606d2d30fbc85f7fdc64a94f1b97b | RolfRolles/PandemicML | disasm.ml | let set_cursor _ = ()
let disassemble ea =
set_cursor ea;
match consume_byte () with
| 0x00l -> Nop
| 0x01l -> Break
| 0x02l -> Ldarg_0
| 0x03l -> Ldarg_1
| 0x04l -> Ldarg_2
| 0x05l -> Ldarg_3
| 0x06l -> Ldloc_0
| 0x07l -> Ldloc_1
| 0x08l -> Ldloc_2
| 0x09l -> Ldloc_3
| 0x0Al -> Stloc_0
| ... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Incubator/DotNET/disasm.ml | ocaml | let set_cursor _ = ()
let disassemble ea =
set_cursor ea;
match consume_byte () with
| 0x00l -> Nop
| 0x01l -> Break
| 0x02l -> Ldarg_0
| 0x03l -> Ldarg_1
| 0x04l -> Ldarg_2
| 0x05l -> Ldarg_3
| 0x06l -> Ldloc_0
| 0x07l -> Ldloc_1
| 0x08l -> Ldloc_2
| 0x09l -> Ldloc_3
| 0x0Al -> Stloc_0
| ... | |
55cdff1019ca27cc168519383677e8f97ed5148a3f944b828a4418db05505960 | threatgrid/ctim | asset_mapping.cljc | (ns ctim.schemas.asset-mapping
(:require
#?(:clj [flanders.core :as f :refer [def-entity-type def-eq def-enum-type]]
:cljs [flanders.core :as f :refer-macros [def-entity-type def-eq def-enum-type]])
[clojure.spec.alpha :as cs]
[ctim.schemas.common :as c]
[ctim.schemas.vocabularies :as v]
[ctim.s... | null | https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/src/ctim/schemas/asset_mapping.cljc | clojure | (ns ctim.schemas.asset-mapping
(:require
#?(:clj [flanders.core :as f :refer [def-entity-type def-eq def-enum-type]]
:cljs [flanders.core :as f :refer-macros [def-entity-type def-eq def-enum-type]])
[clojure.spec.alpha :as cs]
[ctim.schemas.common :as c]
[ctim.schemas.vocabularies :as v]
[ctim.s... | |
787ddb63a3712abfbd535ab32e29ce1e1d02f62363ef4bace3c899cddfcc2fcb | gklijs/bkes-demo | db.clj | (ns nl.openweb.command-handler.db
(:require [nl.openweb.command-handler.bkes :as bkes]))
(defonce bank-accounts (atom {}))
(defonce bank-transfers (atom {}))
(defonce bank-transfers-running (atom {}))
(defonce users (atom {}))
(defonce db-type-bkes-mapping {:bank-accounts :bank
:users... | null | https://raw.githubusercontent.com/gklijs/bkes-demo/b567f6b32ffb9b5fcb9ee3f73b20f653720a2915/command-handler/src/nl/openweb/command_handler/db.clj | clojure | (ns nl.openweb.command-handler.db
(:require [nl.openweb.command-handler.bkes :as bkes]))
(defonce bank-accounts (atom {}))
(defonce bank-transfers (atom {}))
(defonce bank-transfers-running (atom {}))
(defonce users (atom {}))
(defonce db-type-bkes-mapping {:bank-accounts :bank
:users... | |
d932625e26a8466d3250bd7213679da3d94dac04b359d4d9c2e0d4a7c57d58fa | pmh/funkyweb | cookies.clj | (ns funkyweb.helpers.cookies
(:require [funkyweb.helpers.response :as response]
[funkyweb.helpers.request :as request ]))
(defn cookies-get [k]
(if-let [cookies (request/request-get :cookies)]
(cookies k)))
(defn cookies-set
([k v] (cookies-set k v {}))
([k v options]
(response/response-... | null | https://raw.githubusercontent.com/pmh/funkyweb/b3731c5664c3b6a40db32a1fef18a59777d9156d/src/funkyweb/helpers/cookies.clj | clojure | (ns funkyweb.helpers.cookies
(:require [funkyweb.helpers.response :as response]
[funkyweb.helpers.request :as request ]))
(defn cookies-get [k]
(if-let [cookies (request/request-get :cookies)]
(cookies k)))
(defn cookies-set
([k v] (cookies-set k v {}))
([k v options]
(response/response-... | |
e44f1e424c1550fc30bfaca1e7d3f33565dbde9567174cd0104574d6cc206e9a | hipsleek/hipsleek | old_sa2.ml | #include "xdebug.cppo"
open VarGen
open Globals
open Others
open Gen
module DD = Debug
module Err = Error
module CA = Cast
module CP = Cpure
module CF = Cformula
module MCP = Mcpure
module CEQ = Checkeq
module TP = Tpdispatcher
module SAC = Sacore
module = Sautility
module IC = Icontext
let step_change = new Ge... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/old_sa2.ml | ocaml | outcome from shape_infer
*************************************************************
**************************************************************
let tmp = (check_is_classic ()) in
let () = Wrapper.set_classic true in
let () = Wrapper.set_classic tmp in
input in fb
output: true,susbs: can subst
if this... | #include "xdebug.cppo"
open VarGen
open Globals
open Others
open Gen
module DD = Debug
module Err = Error
module CA = Cast
module CP = Cpure
module CF = Cformula
module MCP = Mcpure
module CEQ = Checkeq
module TP = Tpdispatcher
module SAC = Sacore
module = Sautility
module IC = Icontext
let step_change = new Ge... |
c1a756011b35725a4a1b79d7b4871d0c4bfaad872b90bdf40accdb8c9e623b9f | steveshogren/10-minute-vim-exercises | BookCalendar.hs | module BookCalendar where
import Data.Time
import Data.Time.Calendar.WeekDate
currentWordCount :: Integer
currentWordCount = 11326
wordsPerDay :: Integer
wordsPerDay = 333
isNotWeekDay :: Day -> Bool
isNotWeekDay d =
let (_,_,dow) = toWeekDate d
in dow > 5
addToDay :: UTCTime -> Integer -> Day
addToDay today d... | null | https://raw.githubusercontent.com/steveshogren/10-minute-vim-exercises/fda5a360e71d0b4d00c7727281231790f14fe1df/BookCalendar.hs | haskell | module BookCalendar where
import Data.Time
import Data.Time.Calendar.WeekDate
currentWordCount :: Integer
currentWordCount = 11326
wordsPerDay :: Integer
wordsPerDay = 333
isNotWeekDay :: Day -> Bool
isNotWeekDay d =
let (_,_,dow) = toWeekDate d
in dow > 5
addToDay :: UTCTime -> Integer -> Day
addToDay today d... | |
74136c30f055354344e1f20f798df7a4d147e80d30e750ef8f2053355f12649a | nvim-treesitter/nvim-treesitter | locals.scm | (
(function_declaration
name: (identifier) @definition.function) ;@function
)
(
(method_declaration
name: (field_identifier) @definition.method); @method
)
(short_var_declaration
left: (expression_list
(identifier) @definition.var))
(var_spec
name: (identifier) @definition.v... | null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/ddc0f1b606472b6a1ab85ee9becfd4877507627d/queries/go/locals.scm | scheme | @function
@method
reference
Call references
Scopes | (
(function_declaration
)
(
(method_declaration
)
(short_var_declaration
left: (expression_list
(identifier) @definition.var))
(var_spec
name: (identifier) @definition.var)
(parameter_declaration (identifier) @definition.var)
(variadic_parameter_declaration (identifier) @definition.var)
(f... |
b4ae19d31bdaa9d8b2a9c94310f4717e048ad019aff2bc51bffbc9be9d0d8827 | Covariance/hi-language | Evaluator.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
module HI.Evaluator (
eval
) where
import Codec.Compression.Zlib (CompressParams (compressLevel), bestCompression, compressWith,
decompressWith, defaul... | null | https://raw.githubusercontent.com/Covariance/hi-language/a395277811fdc7a9853c4241ff6ec07d6130480a/src/HI/Evaluator.hs | haskell | # LANGUAGE OverloadedStrings #
| HiSlice is an object that can be sliced, i.e., used with indexing.
To provide that functionality we want each of those objects to be able to
convert itself to the list, which we would then slice.
| checkHiFunArity checks whether provided number of arguments will satisfy
the provide... | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE OverloadedLists #
module HI.Evaluator (
eval
) where
import Codec.Compression.Zlib (CompressParams (compressLevel), bestCompression, compressWith,
decompressWith, defaultCompressParams, defaultDecompressP... |
04c210395c47397c123c66f1f0efb92dbd3db34fc81fddde58d2e97b99b710cb | devaspot/brace | jxat_try.erl | -module(jxat_try).
-export([given/3, 'when'/3, then/3]).
-include_lib("eunit/include/eunit.hrl").
given([a,module,that,has,a,function,that,contains,'\'try\''], _State, _) ->
Source = <<"(ns jxat-try-test
(require erlang io
(joxa-core :as core)))
... | null | https://raw.githubusercontent.com/devaspot/brace/8494573efef63f4b2f39dd36e8c651a487223f20/test/jxat_try.erl | erlang | -module(jxat_try).
-export([given/3, 'when'/3, then/3]).
-include_lib("eunit/include/eunit.hrl").
given([a,module,that,has,a,function,that,contains,'\'try\''], _State, _) ->
Source = <<"(ns jxat-try-test
(require erlang io
(joxa-core :as core)))
... | |
ff69ac1705fd454a1242742bd0d1bd884fcb74e5f56e19ad268235d69ad2157a | plum-umd/c-strider | cabs.ml |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistribution... | null | https://raw.githubusercontent.com/plum-umd/c-strider/3d3a3743bc28456eb6d50e01805ce484ab3c04e6/tools/cil-1.3.7/src/frontc/cabs.ml | ocaml |
** Types
Type specifier elements. These appear at the start of a declaration
Everywhere they appear in this file, they appear as a 'spec_elem list',
which is not interpreted by cabs -- rather, this "word soup" is passed
on to the compiler. Thus, we can represent e.g. 'int long float x' even
though the compi... |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistribution... |
035d8a14f5d7e081cc7d6600e33ee7af43e890e06a4bec2a8ee6dd8937c22a61 | svenpanne/EOPL3 | exercise-2-21.rkt | #lang eopl
; ------------------------------------------------------------------------------
Exercise 2.21
(define-datatype env env?
(empty-env)
(extend-env
(saved-var var?)
(saved-val scheme-value?)
(saved-env env?)))
(define var? symbol?)
(define scheme-value? (lambda (s) #t))
(define apply-env
(la... | null | https://raw.githubusercontent.com/svenpanne/EOPL3/3fc14c4dbb1c53a37bd67399eba34cea8f8234cc/chapter2/exercise-2-21.rkt | racket | ------------------------------------------------------------------------------ | #lang eopl
Exercise 2.21
(define-datatype env env?
(empty-env)
(extend-env
(saved-var var?)
(saved-val scheme-value?)
(saved-env env?)))
(define var? symbol?)
(define scheme-value? (lambda (s) #t))
(define apply-env
(lambda (environment search-var)
(cases env environment
(empty-env ()
... |
3d4a874ad3e76eddac8de2b0c340819115620c719ffe7043e0541823f0331f80 | thheller/shadow-cljsjs | ca.cljs | (ns cljsjs.moment.locale.ca
(:require ["moment/locale/ca"]))
| null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/ca.cljs | clojure | (ns cljsjs.moment.locale.ca
(:require ["moment/locale/ca"]))
| |
122770b8c04c4f356700b45accd6773c50f73d7c6cafe15b7981e65070fdda67 | HIPERFIT/accelerate-opencl | Hash.hs | # LANGUAGE CPP , GADTs #
-- |
-- Module : Data.Array.Accelerate.OpenCL.Analysis.Hash
Copyright : [ 2008 .. 2011 ] , , ,
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - partable ( GHC extensions )
--
module Data.Array.Accelerate.OpenCL.Analysis... | null | https://raw.githubusercontent.com/HIPERFIT/accelerate-opencl/7ec05ba9d4d5461ffcf952bed6d0dcc4b1915099/Data/Array/Accelerate/OpenCL/Analysis/Hash.hs | haskell | |
Module : Data.Array.Accelerate.OpenCL.Analysis.Hash
License : BSD3
Stability : experimental
bytestring rather than a list of characters.
| Generate a unique key for each kernel computation
sequence A000978), followed by the salient features that parameterise
skeleton instantiation.
dummy
du... | # LANGUAGE CPP , GADTs #
Copyright : [ 2008 .. 2011 ] , , ,
Maintainer : < >
Portability : non - partable ( GHC extensions )
module Data.Array.Accelerate.OpenCL.Analysis.Hash (
AccKey, accToKey, hashAccKey
) where
import Data.Char
import Language . C hiding ( Index , Exp )
import Text.P... |
719d4fffa74d88d057d70e33f9f1701ce67bf8fe11cf9b3b9ef65acffc0ed354 | matsen/pplacer | tax_map.ml | Taxonomic routines for gtrees .
*
* The purpose of this module is to make a " mrcam " . A mrcam can be thought of as
* the map that generates the taxonomic annotations in pplacer . Thus , it is a
* map from an internal node to the taxid that is the MRCA of the nodes distal
* to that internal node .
... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/pplacer_src/tax_map.ml | ocaml | Make a map of leaf taxonomic annotations from the leaf names on the tree and
* a seqinfo map (sim).
Propogate the taxonomic information up the tree according to common ancestry,
* starting with a map that only has taxonomic information at the tips.
* | Taxonomic routines for gtrees .
*
* The purpose of this module is to make a " mrcam " . A mrcam can be thought of as
* the map that generates the taxonomic annotations in pplacer . Thus , it is a
* map from an internal node to the taxid that is the MRCA of the nodes distal
* to that internal node .
... |
5959c1c649c89fbbe3ecff7ca0692f799e380ba25f81065d1cd28de41bb6c236 | batebobo/fp1819 | 5-matrix-map.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
Искаме да приложим функция на всеки
(define tests
(test-suite "Mat matrix tests"
(test-case "" (check-equal? (map-matrix (lambda (x) (* x x)) '((1 2 3) (4 5 6) (7 8 9)))
'((1 4 9) (16 25 36) (49 64 81))))
)
)
(run-tests tests 'verbose)
| null | https://raw.githubusercontent.com/batebobo/fp1819/2061b7e62a1a9ade3a5fff9753f9fe0da5684275/scheme/6/5-matrix-map.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
Искаме да приложим функция на всеки
(define tests
(test-suite "Mat matrix tests"
(test-case "" (check-equal? (map-matrix (lambda (x) (* x x)) '((1 2 3) (4 5 6) (7 8 9)))
'((1 4 9) (16 25 36) (49 64 81))))
)
)
(run-tests tests 'verbose)
| |
223f09380d2d256b60b16f70a2be11703c7719cd41fe29d4c8cf6927bbc5a739 | fumieval/liszt | client.hs | # LANGUAGE LambdaCase , RecordWildCards #
module Main where
import Database.Liszt
import Control.Monad
import Data.Function (fix)
import qualified Data.ByteString.Char8 as B
import Data.String
import System.Environment
import System.IO
import System.Console.GetOpt
import System.Exit
parseHostPort :: String -> (String... | null | https://raw.githubusercontent.com/fumieval/liszt/44195372034b397a5a109899330995fba0152e1b/app/client.hs | haskell | # LANGUAGE LambdaCase , RecordWildCards #
module Main where
import Database.Liszt
import Control.Monad
import Data.Function (fix)
import qualified Data.ByteString.Char8 as B
import Data.String
import System.Environment
import System.IO
import System.Console.GetOpt
import System.Exit
parseHostPort :: String -> (String... | |
ab0f4eeb69c0af8137a5a7bb4becb8eee386b7ecaec4931afebeba9a672a15d9 | databrary/databrary | Contrib.hs | {-# LANGUAGE OverloadedStrings #-}
module Data.Csv.Contrib
( getHeaders
, extractColumnsInitialRows
, extractColumnsDistinctSample
, extractColumnDefaulting
, extractColumn
, decodeCsvByNameWith
, parseCsvWithHeader
, removeBomPrefixText
-- for testing only
, removeBomPrefix
, repairDuplicateLineE... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Data/Csv/Contrib.hs | haskell | # LANGUAGE OverloadedStrings #
for testing only
similar to decodeByName with except make parser parameter explicity
| some programs introduce a byte order mark when generating a CSV, remove this per cassava issue recipe
| some programs introduce a byte order mark when generating a CSV, remove this per cassava issue... | module Data.Csv.Contrib
( getHeaders
, extractColumnsInitialRows
, extractColumnsDistinctSample
, extractColumnDefaulting
, extractColumn
, decodeCsvByNameWith
, parseCsvWithHeader
, removeBomPrefixText
, removeBomPrefix
, repairDuplicateLineEndings
, repairCarriageReturnOnly
) where
import qua... |
53a173cc1484c46b4711deb9eedb3141d8fd1994856cbc81c5fefc819d97659e | skanev/playground | 64-tests.scm | (require rackunit rackunit/text-ui)
(load "../64.scm")
(define sicp-3.64-tests
(test-suite
"Tests for SICP exercise 3.64"
(check-= (sqrt-tolerance 2 0.0000000001) 1.41421356237 0.0000000001)
))
(run-tests sicp-3.64-tests)
| null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/tests/64-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../64.scm")
(define sicp-3.64-tests
(test-suite
"Tests for SICP exercise 3.64"
(check-= (sqrt-tolerance 2 0.0000000001) 1.41421356237 0.0000000001)
))
(run-tests sicp-3.64-tests)
| |
ae0edb82a92a8dc9410afc2bcbad0c79eb20cc49ef98c5ab80c418b60afd0a4c | cburgmer/greenyet | styleguide.clj | (ns greenyet.view.styleguide
(:require [clojure.string :as str]
[greenyet.view.host-component :as host-component]
[hiccup.core :refer [html]]))
(defn- in-template [html template]
(str/replace template
"<!-- BODY -->"
html))
(defn- a-component-status [color nam... | null | https://raw.githubusercontent.com/cburgmer/greenyet/b07e8257cafb779bbfe172de2c53db1053cfc495/src/greenyet/view/styleguide.clj | clojure | (ns greenyet.view.styleguide
(:require [clojure.string :as str]
[greenyet.view.host-component :as host-component]
[hiccup.core :refer [html]]))
(defn- in-template [html template]
(str/replace template
"<!-- BODY -->"
html))
(defn- a-component-status [color nam... | |
97fdde4ee57e16ed1835815f351bdf13a802acebfbf25a1825be193dab30ea3d | adaliu-gh/htdp | for-loop.rkt | (require 2htdp/abstraction)
;;========================
305
;; [List-of Number] -> [List-of Number]
(check-expect (convert-euro '(1 2))
'(1.22 2.44))
(define (convert-euro l)
(for/list ( [x l] ) (* 1.22 x)))
;;=======================
306
;; N -> [List-of N]
(check-expect (build-list1 3) '(0 1 2))
(def... | null | https://raw.githubusercontent.com/adaliu-gh/htdp/a0fca8af2ae8bdcef40d56f6f45021dd92df2995/14-18%20Abstraction/for-loop.rkt | racket | ========================
[List-of Number] -> [List-of Number]
=======================
N -> [List-of N]
N -> [List-of N]
N -> [List-of N]
N -> [List-of N]
N -> [List-of [List-of N]]
N N -> [List-of N]
========================
String [List-of String] -> Boolean
Number [List-of String]-> Boolean | (require 2htdp/abstraction)
305
(check-expect (convert-euro '(1 2))
'(1.22 2.44))
(define (convert-euro l)
(for/list ( [x l] ) (* 1.22 x)))
306
(check-expect (build-list1 3) '(0 1 2))
(define (build-list1 n)
(for/list ( [i n] ) i))
(check-expect (build-list2 3) '(1 2 3))
(define (build-list2 n)
... |
a2fc408905cfc3ddae74163c740877019fe11aa2c1ad7475c2828e8c20f3fe2f | mlemerre/l-lang | parser.ml | Copyright 2013
let definition_stream = Parserpack.Definition.definition_stream
include Parserpack.Parsetree
| null | https://raw.githubusercontent.com/mlemerre/l-lang/88201e861c6cc30bb3b9510d7f55c681eded4085/src/parser.ml | ocaml | Copyright 2013
let definition_stream = Parserpack.Definition.definition_stream
include Parserpack.Parsetree
| |
730cabe2ea5db0485f09256fc24ddda6cf363e0eca4e962cc454e5522ef15859 | jaredly/reason-language-server | ctype.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/402/ctype.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
Operations on core types
open Asttyp... |
265750797488ee6d516b3039c0113f0cb088b01bd2a6af42ebe58de6e1567338 | ocaml/ocaml | annot.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml/ocaml/04ddddd0e1d2bf2acb5091f434b93387243d4624/typing/annot.mli | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Rocquencourt
Copyright 2007 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type call = Tail | Stack | Inline
type ident =
| Iref_external
|
0a84ce7c3b54f008bfa93928228a5241269719b9da0d60f3d4ea0cf31a49f6ee | jtod/Hydra | SigStepperGit.hs | module HDL.Hydra.Core.SigStepper where
-- In src/circuits:
$ runghc HDL / Hydra / Core / SigStepper
import Data.IORef
import HDL.Hydra.Core.Signal
main :: IO ()
main = do
putStrLn "hello"
putStrLn "bye"
data StepperValue a = StepperValue
{ current :: IORef (Maybe a)
, next :: StepperValue a
, inputs ::... | null | https://raw.githubusercontent.com/jtod/Hydra/b63d54612392565f451fd074a606d1ca9e978a73/src/HDL/Hydra/Core/SigStepperGit.hs | haskell | In src/circuits: | module HDL.Hydra.Core.SigStepper where
$ runghc HDL / Hydra / Core / SigStepper
import Data.IORef
import HDL.Hydra.Core.Signal
main :: IO ()
main = do
putStrLn "hello"
putStrLn "bye"
data StepperValue a = StepperValue
{ current :: IORef (Maybe a)
, next :: StepperValue a
, inputs :: [StepperValue a]
... |
ae8ac2963cbe6573c02dc33f6c2131716eea11f892195d0d1b1017feb22953c9 | metaocaml/ber-metaocaml | test.ml | TEST
files = " unknown - file "
* setup - ocamlc.byte - build - env
compiler_output = " compiler-output.raw "
* * ocamlc.byte
all_modules = " "
flags = " unknown - file "
ocamlc_byte_exit_status = " 2 "
* * * script
script = " grep ' know what to do with unknown - file ' compiler-output.raw "
ou... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-command-line/test.ml | ocaml | TEST
files = " unknown - file "
* setup - ocamlc.byte - build - env
compiler_output = " compiler-output.raw "
* * ocamlc.byte
all_modules = " "
flags = " unknown - file "
ocamlc_byte_exit_status = " 2 "
* * * script
script = " grep ' know what to do with unknown - file ' compiler-output.raw "
ou... | |
0a5dc0b17e78b14b9c26f5eefb7a69157e90da6e93dd0985b80079ed5f2c1751 | huangz1990/SICP-answers | test-39-tan-cf.scm | (load "test-manager/load.scm")
(load "39-tan-cf.scm")
(define-each-check
(= (tan 25)
(tan-cf 25 100))
)
(run-registered-tests)
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/test-39-tan-cf.scm | scheme | (load "test-manager/load.scm")
(load "39-tan-cf.scm")
(define-each-check
(= (tan 25)
(tan-cf 25 100))
)
(run-registered-tests)
| |
f54baaa0c499cc09c0aa34d839878526cbb740b1225cd65c3e5d6b6b0e579924 | hypernumbers/hypernumbers | sysmon_sup.erl | %%%-------------------------------------------------------------------
@author
( C ) 2011 - 2014 , Hypernumbers Ltd
%%% @doc
%%%
%%% @end
Created : 5 Jun 2011 by
%%%-------------------------------------------------------------------
%%%-------------------------------------------------------------------... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/sysmon-1.0/src/sysmon_sup.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
-------------------------------------------------------------------
LICENSE
This program is free software: you can redistribute it and/or modify
This program is dist... | @author
( C ) 2011 - 2014 , Hypernumbers Ltd
Created : 5 Jun 2011 by
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3
You should have received a copy of the GNU Affero General Public License
-module(sysmon_sup).
-behaviour(superv... |
c00462c370504cc4ea4d3e6e334ae1f08b01cabe97ba53408257a62ec3929261 | GaloisInc/pate | Override.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Pate.Verification.Override (
Override(..)
, SomeOverride(..)
, ArgumentMapping(..)
, buildArgumentRegisterAssignment
) where
import qualified Data.Parameterized.Classes as PC
import qualified Data.Parameterized.Conte... | null | https://raw.githubusercontent.com/GaloisInc/pate/66ba078d53b0acc09ae5874862ad748665dadcb8/src/Pate/Verification/Override.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| An 'Override' captures the information necessary to call a crucible
override with "natural" arguments (i.e., a C-like argument list, rather than
machine code register argument lists).
| An existential wrapper around an 'Override' that quantifies out the
argument and ret... | # LANGUAGE ScopedTypeVariables #
module Pate.Verification.Override (
Override(..)
, SomeOverride(..)
, ArgumentMapping(..)
, buildArgumentRegisterAssignment
) where
import qualified Data.Parameterized.Classes as PC
import qualified Data.Parameterized.Context as Ctx
import qualified Data.Parameterized.NatRe... |
b7f0bb6956ff79d46a5462e55069dcc27556893bad91d0c2ac6416f6b498600a | default-kramer/plisqin | statements.rkt | #lang racket
(require plisqin
"schema.rkt")
(define-statement (get-category #:name [name String?])
(from cat ProductCategory
(where (.= (Name cat)
(?? name /void)))
(select (ProductCategoryID cat))
(select (Name cat))
(select (ModifiedDate cat))))
| null | https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/plisqin-examples/adventure-works/statements.rkt | racket | #lang racket
(require plisqin
"schema.rkt")
(define-statement (get-category #:name [name String?])
(from cat ProductCategory
(where (.= (Name cat)
(?? name /void)))
(select (ProductCategoryID cat))
(select (Name cat))
(select (ModifiedDate cat))))
| |
37915bf20602ea77c80e6ff7817307e39f128b436434f673d978c11d5c8ff3cf | w3ntao/sicp-solution | 3-53.rkt | #lang racket
(require (only-in "../ToolBox/AbstractionOfData/stream.rkt"
cons-stream
add-streams
display-stream-until))
(define s
(cons-stream 1
(add-streams s s)))
(display-stream-until s 10) | null | https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-3/3-53.rkt | racket | #lang racket
(require (only-in "../ToolBox/AbstractionOfData/stream.rkt"
cons-stream
add-streams
display-stream-until))
(define s
(cons-stream 1
(add-streams s s)))
(display-stream-until s 10) | |
a6578f022621f54dfbc36edd885b4f2cdb212dce9beb43a2eccdbfdb78a7aa1b | onedata/op-worker | replica_deletion_changes.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%%--------------------------------------------------------------------
%%% @doc
%%% This module is used to handle changes of r... | null | https://raw.githubusercontent.com/onedata/op-worker/b810c9c7143211ccc70d567cc99b77303e9704e9/src/modules/replica_deletion/replica_deletion_changes.erl | erlang | -------------------------------------------------------------------
--------------------------------------------------------------------
@doc
This module is used to handle changes of replica_deletion model.
@end
-------------------------------------------------------------------
API
exported for test
=============... | @author
( C ) 2018 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(replica_deletion_changes).
-author("Jakub Kudzia").
-include("modules/datastore/datastore_models.hrl").
-include("modules/datastore/datastore_runner.hrl").
-include("modules/datastore/trans... |
cd619a8830aef544378322dc11373db3dd6e5604270d3f3629dd7925b23b332c | Metaxal/MrEd-Designer | preview.rkt | #lang racket
(require "../../mred-id.rkt"
"../../controller.rkt"
"../../toolbox-frame.rkt"
racket/gui/base)
(provide preview-frame%)
(define preview-frame%
(class frame%
(init parent)
(init-field [show-at-init #t])
(super-new [parent (or (and (is-a? parent frame%) parent) tool... | null | https://raw.githubusercontent.com/Metaxal/MrEd-Designer/220833b738a1d46fbe309ea124ef61b825e42e68/mred-designer/widgets/frame/preview.rkt | racket | #t;#f ; don't propagate the event down the chain; (?)
Every widget is a mred-widget%%, so this works...
(define/override (on-move x y)
(send (send this get-mred-id) change-property-value 'x x)
(send (send this get-mred-id) change-property-value 'y y)
)
(define/override (on-size w h)
(send (send this ge... | #lang racket
(require "../../mred-id.rkt"
"../../controller.rkt"
"../../toolbox-frame.rkt"
racket/gui/base)
(provide preview-frame%)
(define preview-frame%
(class frame%
(init parent)
(init-field [show-at-init #t])
(super-new [parent (or (and (is-a? parent frame%) parent) tool... |
c21550235d8a68f43596d8b6f8e65abf55b0bd768ee800054343353fcae695f0 | SamirTalwar/advent-of-code | AOC_10_1.hs | # LANGUAGE ScopedTypeVariables #
import Data.Array
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as IO
import Text.Parsec
import Text.Parsec.Text
data Instruction
= Sta... | null | https://raw.githubusercontent.com/SamirTalwar/advent-of-code/66bd9e31f078c9b81ece0264fb869e48964afa63/2016/AOC_10_1.hs | haskell | # LANGUAGE ScopedTypeVariables #
import Data.Array
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as IO
import Text.Parsec
import Text.Parsec.Text
data Instruction
= Sta... | |
98a309f45a80e69bf36723c8a02c4299e8ddc9231efcc798404b1c460d6778e6 | aantron/dream | message.ml | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
(* Type abbreviations and modules used in defining the primary types *)
type 'a promise = 'a Lwt.t
type 'a field_metadat... | null | https://raw.githubusercontent.com/aantron/dream/2162ec7e37cd715fec5110fa874650988a017b53/src/pure/message.ml | ocaml | Type abbreviations and modules used in defining the primary types
Messages (requests and responses)
Functions of messages
Requests
Responses
Headers
Whole-body access
Streams
TODO Test what happens on end of stream without FIN set. The next read should
still gracefully return None.
Custom fields | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
type 'a promise = 'a Lwt.t
type 'a field_metadata = {
name : string option;
show_value : ('a -> string) option;
}
mo... |
31e8e50a88ac6f4167827b6c0bb895a2ea6050dcc90be7934c73c25826e8a9e6 | Eventuria/demonstration-gsd | Greetings.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NamedFieldPuns #
module Eventuria.GSD.CLI.UI.Greetings where
import Control.Monad (void)
import System.Console.Byline
import Eventuria.GSD.CLI.Dependencies
greetings :: Dependencies -> IO (Dependencies)
greetings dependencies = do
(void $ runByline $ do
sayLn $ fg... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/GSD/CLI/UI/Greetings.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NamedFieldPuns #
module Eventuria.GSD.CLI.UI.Greetings where
import Control.Monad (void)
import System.Console.Byline
import Eventuria.GSD.CLI.Dependencies
greetings :: Dependencies -> IO (Dependencies)
greetings dependencies = do
(void $ runByline $ do
sayLn $ fg green <> "########################... |
16776a7abd7cd26796bd2427fae445019e2df617c337d24b8f68a4072e4b17c9 | hypernumbers/hypernumbers | curie.erl | @author
@author
( C ) 2011 - 2014 , Hypernumbers Ltd
%%% @doc
Implements famous paper " A User - Centred Approach to Functions in Excel "
by , and
%%% @end
Created : 15 Jun 2011
%%%-------------------------------------------------------------------
%%%
%%% LICENSE
%%%
%%% This progr... | null | https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/lib/hypernumbers-1.0/src/curie.erl | erlang | @doc
@end
-------------------------------------------------------------------
LICENSE
This program is free software: you can redistribute it and/or modify
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... | @author
@author
( C ) 2011 - 2014 , Hypernumbers Ltd
Implements famous paper " A User - Centred Approach to Functions in Excel "
by , and
Created : 15 Jun 2011
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation version 3
Yo... |
bcc512f6bb9ed66c3ad2ffc95f15f9a2e05e0ed37000449eb47a20b4b456a3dd | siclait/6.824-cljlabs-2020 | sync.clj | (ns go.sync
"A reimplemntation of a subset of Golang's \"sync\" package."
(:refer-clojure :exclude [do])
(:require
[clojure.core.async :as async]))
(defprotocol Waitable
(wait! [this]
"Blocks until the wait is released."))
(defprotocol IWaitGroup
(add [this delta]
"Adds a delta, which may be nega... | null | https://raw.githubusercontent.com/siclait/6.824-cljlabs-2020/0c7ad7ae07d7617b1eb7240080c65f1937ca8a2d/go/src/go/sync.clj | clojure | (ns go.sync
"A reimplemntation of a subset of Golang's \"sync\" package."
(:refer-clojure :exclude [do])
(:require
[clojure.core.async :as async]))
(defprotocol Waitable
(wait! [this]
"Blocks until the wait is released."))
(defprotocol IWaitGroup
(add [this delta]
"Adds a delta, which may be nega... | |
4c944996126fbe252da2c92b710b9f0dfb9d340ddce496900308e73856bf86cf | numberten/genetic_library | HelloNumber.hs | import Genetics2
import Text.Regex
import qualified Data.ByteString as B
config = defaultConfig { populationSize = 100,
fitnessFunction = f,
geneSize = 4,
chromosomeSize = 9,
targetFitness = 50.0,
... | null | https://raw.githubusercontent.com/numberten/genetic_library/b16f57115ee26adced963884e4d21d1faab37dc0/tests/HelloNumber.hs | haskell | import Genetics2
import Text.Regex
import qualified Data.ByteString as B
config = defaultConfig { populationSize = 100,
fitnessFunction = f,
geneSize = 4,
chromosomeSize = 9,
targetFitness = 50.0,
... | |
34e8dc1f0aca2cbd353f7c9d3437c5b01dffd027d510179c1d41d2efc3775672 | pixlsus/registry.gimp.org_static | Eg-DuotoneSimulation.scm | ;
Duotone / Tritone Simulation , V2.8
;
( )
( C ) 2012 , Bern , Switzerland
;
; You can find more about toning at
; /
;
This script was tested with
;
; New versions will be distributed from / only
;
; This program is free software; you can redistribute it and/or modify
it under the ter... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/Eg-DuotoneSimulation.scm | scheme |
You can find more about toning at
/
New versions will be distributed from / only
This program is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
b... | Duotone / Tritone Simulation , V2.8
( )
( C ) 2012 , Bern , Switzerland
This script was tested with
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(define (script-fu-Eg-DuotoneSimulation InImage InLayer ... |
2a7f58032f7ce1737bc0f845a5d08d284b993f06e1adefd7a50a63e03a6f09f9 | ocsigen/eliom | eliom_config.server.ml | Ocsigen
*
* Copyright ( C ) 2010
*
* 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 exception ;
* either version 2.1 of the License , or ( at your ... | null | https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_config.server.ml | ocaml | Ocsigen
*
* Copyright ( C ) 2010
*
* 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 exception ;
* either version 2.1 of the License , or ( at your ... | |
c7f5633e9c18f4cf8b370db0309d21020781a9330b672cbfb8d40b5535319bac | declanoller/haskell-vae | Utils.hs | module Utils
( roundToStr
, print_grads
, save_batch_to_file
, save_labels_to_file
, save_list_to_file
, save_vae_to_file
, load_vae_from_file
, get_random_batch
, get_random_batch_with_labels
, get_beta_KL
, get_contents_as_mat_from_fname
, get_contents_from_fname
) where
import Text.Printf
import Data.Array.IO
impor... | null | https://raw.githubusercontent.com/declanoller/haskell-vae/08c54e37be8592e699dac412c6859a775eb92460/Utils.hs | haskell | Get the contents of a single data file from an integer index
let fname = "mnist_data/" ++ (show fname_ind) ++ ".txt"
let fname = "mnist_data/" ++ (show fname_ind) ++ ".txt"
Get a random batch from the data dir
Same as get_random_batch but with labels
------------------- Saving data to file
----------------- Saving a... | module Utils
( roundToStr
, print_grads
, save_batch_to_file
, save_labels_to_file
, save_list_to_file
, save_vae_to_file
, load_vae_from_file
, get_random_batch
, get_random_batch_with_labels
, get_beta_KL
, get_contents_as_mat_from_fname
, get_contents_from_fname
) where
import Text.Printf
import Data.Array.IO
impor... |
dc0ede09e4bc55e30bd06aa2a4f67595e3c086f0e920930f888512f40590b5c7 | kendroe/CoqRewriter | rtrie.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* REWRITELIB
*
* trie.mli
*
* This file contains the trie data structure implementation
*
* ( C ) 2017 ,
*
* This program is free so... | null | https://raw.githubusercontent.com/kendroe/CoqRewriter/ddf5dc2ea51105d5a2dc87c99f0d364cf2b8ebf5/plugin/src/rtrie.ml | ocaml | require "trie-s.sml" ; | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* REWRITELIB
*
* trie.mli
*
* This file contains the trie data structure implementation
*
* ( C ) 2017 ,
*
* This program is free so... |
b206c69d7be21718f5c83385df28bc3716ec78aaae0b4f90fa3735d56c733048 | 97jaz/gregor | minute.rkt | #lang racket/base
(require racket/contract/base
racket/match
"../../generics.rkt"
"../../core/math.rkt"
"../ast.rkt"
"../parse-state.rkt"
"../l10n/numbers.rkt")
(provide (struct-out Minute))
(define (minute-fmt ast t loc)
(match ast
[(Minute _ n) (num-fmt l... | null | https://raw.githubusercontent.com/97jaz/gregor/91d71c6082fec4197aaf9ade57aceb148116c11c/gregor-lib/gregor/private/pattern/ast/minute.rkt | racket | #lang racket/base
(require racket/contract/base
racket/match
"../../generics.rkt"
"../../core/math.rkt"
"../ast.rkt"
"../parse-state.rkt"
"../l10n/numbers.rkt")
(provide (struct-out Minute))
(define (minute-fmt ast t loc)
(match ast
[(Minute _ n) (num-fmt l... | |
8551d72e26f4bb5d4c2c26e66352c87d0e35ebd67b59b6911b94d06279a9ae07 | noinia/hgeometry | Sweep.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
--------------------------------------------------------------------------------
-- |
-- Module : Algorithms.Geometry.Sweep
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
--
Helper types and functions for ... | null | https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-old/remove-by-2021-06-01/src/Algorithms/Geometry/Sweep.hs | haskell | ------------------------------------------------------------------------------
|
Module : Algorithms.Geometry.Sweep
License : see the LICENSE file
------------------------------------------------------------------------------
------------------------------------------------------------------------------... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
Copyright : ( C )
Maintainer :
Helper types and functions for implementing Sweep line algorithms .
module Algorithms.Geometry.Sweep where
import Data.Coerce
import Data.Map (Map)
import qualified Data.Map as Map
i... |
2554e8356691c08f2e0c93c11d26a3da9d8849c25d6d6114706df99d2b84bffb | mzp/coq-ruby | genarg.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/interp/genarg.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Basic types
Specific types
Dyna... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : genarg.ml 11481 2... |
b5b6ce9e5e16f6ac532df84f17f333f55fa24aa4ccf8cabd6ae677e8f45b075d | herbelin/coq-hh | declare.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/library/declare.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* This module is about the low-level... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Util
open Names... |
794e4364185086551dbb5b3f19261f3d270a7d294aadc561be2ab511dd01eaf7 | sealchain-project/sealchain | API.hs | # LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE RecordWildCards #
{-# LANGUAGE TypeOperators #-}
# OPTIONS_GHC -fno - warn... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/lib/src/Pos/Node/API.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE TypeOperators #
TODO: Stuff that was pulled upstream. Likely to be factored out into other modules.
^ Prefix to drop on each constructor tag
^ Callback update to attach descriptions to underlying properties
^ Und... | # LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -fno - warn - orphans #
module Pos.Node.API where
import Universum
import Control.Lens (At, Index, IxValue, at, ix, make... |
a5ddbe3806b363e004695d381c9730672fae51d4932a554732b23c1d56eb9ac5 | priestjim/gen_rpc | local_SUITE.erl | -*-mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et :
%%%
Copyright 2015 . All Rights Reserved .
%%%
-module(local_SUITE).
-author("Panagiotis Papadomitsos <>").
CT Macros
-include_lib("test/include/ct.hrl").
%%% TCP settings
-... | null | https://raw.githubusercontent.com/priestjim/gen_rpc/6e17cac4e886f36ecb35bbda91e6bb3293aaa723/test/ct/local_SUITE.erl | erlang |
TCP settings
No need to export anything, everything is automatically exported
as part of the test profile
===================================================
CT callback functions
===================================================
Starting Distributed Erlang on local node
Setup the app locally
=============... | -*-mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*-
ex : set utf-8 sts=4 ts=4 sw=4 et :
Copyright 2015 . All Rights Reserved .
-module(local_SUITE).
-author("Panagiotis Papadomitsos <>").
CT Macros
-include_lib("test/include/ct.hrl").
-include("tcp.hrl").
all... |
86d0abb9ea07063d6c07cbf45cede24226f59b5d673164d4fef187bcd9a35687 | Stylitics/corona | schema.clj | (ns corona.schema
(:require
[org.httpkit.client :as http]
[jsonista.core :as json]
[clojure.string :as string]
[corona.utils :as utils]))
TODO : integrate more fns and helpers from -api.html
To use Solr 's implicit default behavior if no schemaFactory is explicitly defined . Add the following to ... | null | https://raw.githubusercontent.com/Stylitics/corona/901e224f9a491e3d7f1378c4624010c85b5b8b0f/src/corona/schema.clj | clojure | <schemaFactory class="ManagedIndexSchemaFactory">
<bool name="mutable">true</bool>
<str name="managedSchemaResourceName">managed-schema</str>
</schemaFactory>
Then create your project core/collection:
paste them in <your-clj-project>/resources/solr/conf/<core-name>
inside lang copied folder you can only keep _en... | (ns corona.schema
(:require
[org.httpkit.client :as http]
[jsonista.core :as json]
[clojure.string :as string]
[corona.utils :as utils]))
TODO : integrate more fns and helpers from -api.html
To use Solr 's implicit default behavior if no schemaFactory is explicitly defined . Add the following to ... |
7ef25e1ea4059d9c827adcf5848a9f79957c19e441164078160e9086056fcf7d | tonsky/advent-of-code | day7.clj | (ns advent-of-code.year2021.day7
(:require
[advent-of-code.core :as core]
[clojure.java.io :as io]
[clojure.java.math :as math]
[clojure.string :as str]
[clojure.set :as set]
#_[clj-async-profiler.core :as profiler]))
(def example "16,1,2,0,4,2,7,1,2,14")
(def input (slurp "inputs/year2021/day7"))... | null | https://raw.githubusercontent.com/tonsky/advent-of-code/eb95757458817535332780f7e24add9296e8f095/src/advent_of_code/year2021/day7.clj | clojure | (ns advent-of-code.year2021.day7
(:require
[advent-of-code.core :as core]
[clojure.java.io :as io]
[clojure.java.math :as math]
[clojure.string :as str]
[clojure.set :as set]
#_[clj-async-profiler.core :as profiler]))
(def example "16,1,2,0,4,2,7,1,2,14")
(def input (slurp "inputs/year2021/day7"))... | |
9377d6f196cb42ca64a3a6cccf62e9d7b68d75d78d3162e2359d1caedfc7da7c | maxsnyder2000/TheRelationalParser | test-english.scm | (load "load-parser.scm")
(display
(run-staged 1 (q)
(fresh (d1 d2 n1 n2 v1 v2)
(evalo-staged
(the-relational-parser
`(parse
(list
(list 'D ; determiner
(list ',d1)
(list ',d2))
(list 'N ; noun
(list ',n1)
(list ',n2))
(list 'V ; verb... | null | https://raw.githubusercontent.com/maxsnyder2000/TheRelationalParser/5fb0aef78db2c75fe988cf478b955e8f13ace08d/test-english.scm | scheme | determiner
noun
verb
determiner phrase
noun phrase
verb phrase
sentence | (load "load-parser.scm")
(display
(run-staged 1 (q)
(fresh (d1 d2 n1 n2 v1 v2)
(evalo-staged
(the-relational-parser
`(parse
(list
(list ',d1)
(list ',d2))
(list ',n1)
(list ',n2))
(list ',v1)
(list ',v2))
(list '(: d (... |
0aaab4f0b28859d3666dae7226f6396dac094a986c4ee002573ff3f1816393a0 | esl/lager_graylog | lager_graylog_gelf_formatter.erl | -module(lager_graylog_gelf_formatter).
-export([
init/1,
format/3
]).
-export_type([option/0]).
-behaviour(lager_graylog_formatter).
-type option() :: {metadata, all | [atom()], {module(), Function :: atom()}}
| {include_timestamp, boolean()}
| {override_hos... | null | https://raw.githubusercontent.com/esl/lager_graylog/6ed0f8d5b5aa5b63702944a585ed8ac0ae51c0eb/src/lager_graylog_gelf_formatter.erl | erlang | API
Helpers | -module(lager_graylog_gelf_formatter).
-export([
init/1,
format/3
]).
-export_type([option/0]).
-behaviour(lager_graylog_formatter).
-type option() :: {metadata, all | [atom()], {module(), Function :: atom()}}
| {include_timestamp, boolean()}
| {override_hos... |
a11901faa47831dfceeb05892f8fc138d6603a1df05abef7685fbcf2c29c246e | epiccastle/bbssh | utils.clj | (ns pod.epiccastle.bbssh.impl.utils
(:require [pod.epiccastle.bbssh.pod.callbacks :as callbacks]
[pod.epiccastle.bbssh.impl.cleaner :as cleaner]
[babashka.fs :as fs]
[clojure.string :as string]
)
(:import [java.nio.file.attribute PosixFilePermission FileTime]))
(def ... | null | https://raw.githubusercontent.com/epiccastle/bbssh/89dd42e7a73488dee042f622a92d5ded22ffa9b7/src/bb/pod/epiccastle/bbssh/impl/utils.clj | clojure | the returned object
a callback message
without the future here I get into a deadlock
function gets blocked forever by the success
callback
and then it can't process any more async
responses.
(utils/last-access-time (.getCanonicalPath file)))
(utils/last-modified-time (.getCanonicalPath file)))
(utils/fi... | (ns pod.epiccastle.bbssh.impl.utils
(:require [pod.epiccastle.bbssh.pod.callbacks :as callbacks]
[pod.epiccastle.bbssh.impl.cleaner :as cleaner]
[babashka.fs :as fs]
[clojure.string :as string]
)
(:import [java.nio.file.attribute PosixFilePermission FileTime]))
(def ... |
9dca180b67a6d8ecb9a42d51353f60d356726b7faf41d4aa9b3e13fbdf612f59 | lambduli/frea | Types.hs | module Compiler.TypeAnalyzer.Types where
import Compiler.Syntax (Type(..))
| Assuming that will be defined in the Prelude .
t'Bool = TyCon "Bool"
t'Int = TyCon "Int"
t'Double = TyCon "Double"
t'Char = TyCon "Char"
| null | https://raw.githubusercontent.com/lambduli/frea/f240a1a4a57996dcc2ab685e2bd499ad0cdb5dfc/src/Compiler/TypeAnalyzer/Types.hs | haskell | module Compiler.TypeAnalyzer.Types where
import Compiler.Syntax (Type(..))
| Assuming that will be defined in the Prelude .
t'Bool = TyCon "Bool"
t'Int = TyCon "Int"
t'Double = TyCon "Double"
t'Char = TyCon "Char"
| |
cf622b8f66a3872b3fd7d63d496b6135dd542b562bdfa014ba3f3cafec79388e | WorksHub/client | issue_published.cljc | (ns wh.components.activities.issue-published
(:require [wh.components.activities.components :as components]
[wh.components.activities.issue :as issue]))
(defn card [{:keys [body] :as issue} actor type opts]
[components/card type
[components/header
[components/company-info actor :issue type]
... | null | https://raw.githubusercontent.com/WorksHub/client/274ed87485ae911d98f3d639b67c2a4235ce5b8a/common/src/wh/components/activities/issue_published.cljc | clojure | (ns wh.components.activities.issue-published
(:require [wh.components.activities.components :as components]
[wh.components.activities.issue :as issue]))
(defn card [{:keys [body] :as issue} actor type opts]
[components/card type
[components/header
[components/company-info actor :issue type]
... | |
1262cf86dc43035bf06759fb1496059d95abb58c8e54992193d243264e19efef | emqx/emqx | emqx_plugins_tests.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2019 - 2023 EMQ 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 o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_plugins/test/emqx_plugins_tests.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 ) 2019 - 2023 EMQ 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(emqx_plugins_tests).
-include_lib("eunit/include/eunit.hrl").
-compile(nowarn_export_a... |
ca78cdd6f014c6e20d1b1ddbfcd4e4d8c0d0e682d3bdd81e331ea458601cb1b7 | luizperes/small-lisp | unparser.hs | module Unparser where
import Parser
import Data.Char (isAlpha)
unparse :: SExpression -> [Char]
unparse (List lst) = "(" ++ (foldl (\acc l -> acc ++ " " ++ (unparse l)) "" lst) ++ " )"
unparse (SymAtom s) = s
unparse (NumAtom n) = show n
| null | https://raw.githubusercontent.com/luizperes/small-lisp/fd9b5b67b26a40b6e92bd54a1ee049e4d6dc20ae/unparser.hs | haskell | module Unparser where
import Parser
import Data.Char (isAlpha)
unparse :: SExpression -> [Char]
unparse (List lst) = "(" ++ (foldl (\acc l -> acc ++ " " ++ (unparse l)) "" lst) ++ " )"
unparse (SymAtom s) = s
unparse (NumAtom n) = show n
| |
7a34760f73854b29a06e2768f438f65fa7a03dd547aa41b4ee13b38da674f2b0 | tari3x/csec-modex | termslinks.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/termslinks.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | |
dd969fd43e363979069b1e3c883da0eda7266aa0ca36019c85a0a76eacb5a2c6 | fused-effects/diffused-effects | Fail.hs | # LANGUAGE KindSignatures #
module Effect.Fail
( -- * Fail effect
fail
, Fail(..)
) where
import Algebra
import Prelude hiding (fail)
fail :: Has Fail m => String -> m a
fail = send . Fail
newtype Fail (m :: * -> *) k = Fail String
| null | https://raw.githubusercontent.com/fused-effects/diffused-effects/83e070da3232d9a909e06d775f3f245eabb70a84/src/Effect/Fail.hs | haskell | * Fail effect | # LANGUAGE KindSignatures #
module Effect.Fail
fail
, Fail(..)
) where
import Algebra
import Prelude hiding (fail)
fail :: Has Fail m => String -> m a
fail = send . Fail
newtype Fail (m :: * -> *) k = Fail String
|
541dfb591f460da358d6df45faedacc8c95f1d735071e6c9d091f3302c3cfe2b | well-typed/visualize-cbn | Style.hs | module CBN.Util.Doc.Style (
Style(..)
, Color(..)
, groupByStyle
) where
import Data.Default
import Data.List (groupBy)
data Style = Style {
styleForeground :: Maybe Color
, styleBackground :: Maybe Color
, styleBold :: Bool
, styleItalic :: Bool
}
de... | null | https://raw.githubusercontent.com/well-typed/visualize-cbn/499a8bc806ce03ce6d1bc12df1ea6e6df7768817/src/CBN/Util/Doc/Style.hs | haskell |
We regard padding as having a different style from everything else;
although it doesn't really matter what style we use for padding, if
we don't do this then something like
After grouping, find each group and its style | module CBN.Util.Doc.Style (
Style(..)
, Color(..)
, groupByStyle
) where
import Data.Default
import Data.List (groupBy)
data Style = Style {
styleForeground :: Maybe Color
, styleBackground :: Maybe Color
, styleBold :: Bool
, styleItalic :: Bool
}
de... |
2c35e7aa92c5a49a3752836adfe4849fa9e71c05f9207333be3e1743cf41009f | LuisThiamNye/chic | macros.clj | (ns chic.clj-editor.parser.macros
(:require
[chic.bifurcan :as b]
[chic.util :as util]
[chic.clj-editor.parser.shared :as pshared
:refer [append-new-node! read-char]]
[chic.clj-editor.ast :as ast]
[farolero.core :as far])
(:import
(tech.v3.datatype CharReader)))
(defn read-string! [parser par... | null | https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/clj_editor/parser/macros.clj | clojure | (ns chic.clj-editor.parser.macros
(:require
[chic.bifurcan :as b]
[chic.util :as util]
[chic.clj-editor.parser.shared :as pshared
:refer [append-new-node! read-char]]
[chic.clj-editor.ast :as ast]
[farolero.core :as far])
(:import
(tech.v3.datatype CharReader)))
(defn read-string! [parser par... | |
198915bc739d3d65e59535243a49915c55c5c4ca1a920e1df76edda837b21032 | Carnap/Carnap | EbelsDuggan.hs | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
module Carnap.Languages.PurePropositional.Logic.EbelsDuggan
(parseEbelsDugganTFL, EbelsDugganTFL, ebelsDugganTFLCalc) where
import Data.Map as M (lookup, Map)
import Text.Parsec
import Carnap.Core.Data.Types (Form)
import Carnap.Languages.... | null | https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap/src/Carnap/Languages/PurePropositional/Logic/EbelsDuggan.hs | haskell | # LANGUAGE FlexibleContexts , FlexibleInstances , MultiParamTypeClasses #
module Carnap.Languages.PurePropositional.Logic.EbelsDuggan
(parseEbelsDugganTFL, EbelsDugganTFL, ebelsDugganTFLCalc) where
import Data.Map as M (lookup, Map)
import Text.Parsec
import Carnap.Core.Data.Types (Form)
import Carnap.Languages.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.