_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 |
|---|---|---|---|---|---|---|---|---|
1181c9cd0502066387248e47f9e5561d154ee8622fb817dcd0c439d1414eb349 | rm-hull/markov-chains | algorithmic_music.clj | (ns examples.algorithmic-music
(:require
[markov-chains.core :refer [generate collate]]))
(def first-order-prob-matrix {[:A4] {:A4 0.1 :C#4 0.6 :Eb4 0.3}
[:C#4] {:A4 0.25 :C#4 0.05 :Eb4 0.7}
[:Eb4] {:A4 0.7 :C#4 0.3 :Eb4 0}})
(take 12 (generate fir... | null | https://raw.githubusercontent.com/rm-hull/markov-chains/9b7b7e9ba3c81a4259dd3ecb3a20b1fd27e9b118/test/examples/algorithmic_music.clj | clojure | Row, row, row your boat,
Gently down the stream,
Merrily, merrily, merrily, merrily,
Life is but a dream! | (ns examples.algorithmic-music
(:require
[markov-chains.core :refer [generate collate]]))
(def first-order-prob-matrix {[:A4] {:A4 0.1 :C#4 0.6 :Eb4 0.3}
[:C#4] {:A4 0.25 :C#4 0.05 :Eb4 0.7}
[:Eb4] {:A4 0.7 :C#4 0.3 :Eb4 0}})
(take 12 (generate fir... |
f72af8339ed4a8262db5445642a574298f3788523b06632b02e448dacf36e287 | richmit/mjrcalc | exp-ComplexFunctionViz.lisp | ;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;; @file exp-ComplexFunctionViz.lisp
@author < >
@brie... | null | https://raw.githubusercontent.com/richmit/mjrcalc/96f66d030034754e7d3421688ff201f4f1db4833/exp-ComplexFunctionViz.lisp | lisp | -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*-
@file exp-ComplexFunctionViz.lisp
@std Common Lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
and/or other mater... | @author < >
@brief Complex function visualization via VTK files.@EOL
@parblock
Copyright ( c ) 2010,2011,2015 , < > All rights reserved .
1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer .
2 . Redistribu... |
5d4407b335eef888196f8e57b1a7a84f0453c2ec0e370dac127097542c34c27e | amuletml/amulet | VarMap.hs | # LANGUAGE GeneralizedNewtypeDeriving , DerivingStrategies , FlexibleInstances , TypeFamilies #
module Data.VarMap
( Map
, fromList, toList, null, size
, lookup, member, findWithDefault
, insert, delete
, map, mapWithKey, singleton, union, unionSemigroup
, withoutKeys
, alter
, difference, intersection
... | null | https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/src/Data/VarMap.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving , DerivingStrategies , FlexibleInstances , TypeFamilies #
module Data.VarMap
( Map
, fromList, toList, null, size
, lookup, member, findWithDefault
, insert, delete
, map, mapWithKey, singleton, union, unionSemigroup
, withoutKeys
, alter
, difference, intersection
... | |
a0ca67b7a5b889c0b6d614ee6c4b4e1fe6828e79e848a7ae5cda0aa377795279 | haskell-beam/beam | Types.hs | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE LambdaCase #
# LANGUAGE UndecidableInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PolyKinds #
module Database.Beam.Postgres.Types
( Po... | null | https://raw.githubusercontent.com/haskell-beam/beam/596981a1ea6765b9f311d48a2ec4d8460ebc4b7e/beam-postgres/Database/Beam/Postgres/Types.hs | haskell | # LANGUAGE OverloadedStrings #
| The Postgres backend type, used to parameterize 'MonadBeam'. See the
definitions there for more information. The corresponding query monad is
<-beam.github/beam/ user guide> for more information on using
this backend.
via 'Scientific' if we won't lose data, and then falling back to... | # OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE LambdaCase #
# LANGUAGE UndecidableInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE PolyKinds #
module Database.Beam.Postgres.Types
( Postgres(..)
, fromPgIntegral
, f... |
2ee5dbb11725c21a4287bc9f52966f5c9f7aeafc8a8650195b9616d098a2b432 | gelisam/typelevel-rewrite-rules | Laws.hs | # LANGUAGE ConstraintKinds , TypeFamilies #
module ErrorLocation.Laws where
type family F a b
type FLaw x y = F x (F x y) ~ F x y
| null | https://raw.githubusercontent.com/gelisam/typelevel-rewrite-rules/9a693dacfedd7cccec753b687020fa40364756f9/test/error-messages-cases/error-location/src/ErrorLocation/Laws.hs | haskell | # LANGUAGE ConstraintKinds , TypeFamilies #
module ErrorLocation.Laws where
type family F a b
type FLaw x y = F x (F x y) ~ F x y
| |
be1db62e886573a840ce45b0f165ba915a300beeac5fb4ac87caab30b2156b50 | MLstate/opalang | bslKeySet.mli |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/compilerlib/bslKeySet.mli | ocaml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | |
78d4e8018e778868fa3a729bb485142d679ba06466da75a1aff7132fd8f77e0f | jebberjeb/fsmviz | core.cljs | (ns demo-cljs.core
(:require [fsmviz.core :as fsm]))
(enable-console-print!)
(println "loading")
;; Works
(set! (.-innerHTML (.getElementById js/document "fsm1"))
(fsm/generate-image [[:start :foo :bar]] "fsm1.svg"))
(set! (.-innerHTML (.getElementById js/document "fsm2"))
(fsm/generate-image {:star... | null | https://raw.githubusercontent.com/jebberjeb/fsmviz/05c89fbc29f8bfe76eda74212a85cb2e30369d29/examples/demo-cljs/src/demo_cljs/core.cljs | clojure | Works | (ns demo-cljs.core
(:require [fsmviz.core :as fsm]))
(enable-console-print!)
(println "loading")
(set! (.-innerHTML (.getElementById js/document "fsm1"))
(fsm/generate-image [[:start :foo :bar]] "fsm1.svg"))
(set! (.-innerHTML (.getElementById js/document "fsm2"))
(fsm/generate-image {:start {:foo :... |
531d052c4f67a70da2f4e31249f1e9dfa2316bda3d44d6d652d013390a98bdfa | hjcapple/reading-sicp | exercise_2_18.scm | #lang racket
P69 - [ 练习 2.18 ]
(define (reverse items)
(define (iter items result)
(if (null? items)
result
(iter (cdr items) (cons (car items) result))))
(iter items null))
;;;;;;;;;;;
(reverse (list 1 4 9 16 25))
| null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_2/exercise_2_18.scm | scheme | #lang racket
P69 - [ 练习 2.18 ]
(define (reverse items)
(define (iter items result)
(if (null? items)
result
(iter (cdr items) (cons (car items) result))))
(iter items null))
(reverse (list 1 4 9 16 25))
| |
17a405ce1606ad583b96835d63eaafe25c5c5563ce080728be5b9c14abb0e96d | pallet/pallet | build_actions.clj | (ns pallet.build-actions
"Test utilities for building actions"
(:require
[clojure.string :as string]
[clojure.tools.logging :as logging]
[pallet.action :refer [action-options-key]]
[pallet.action-plan :as action-plan]
[pallet.action-plan :refer [stop-execution-on-error]]
[pallet.api :refer [group-... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/test/pallet/build_actions.clj | clojure | Local Variables:
mode: clojure
End: | (ns pallet.build-actions
"Test utilities for building actions"
(:require
[clojure.string :as string]
[clojure.tools.logging :as logging]
[pallet.action :refer [action-options-key]]
[pallet.action-plan :as action-plan]
[pallet.action-plan :refer [stop-execution-on-error]]
[pallet.api :refer [group-... |
22d8e4a2b6f904599ff842d9e7372c96b4ab314d02e1664dc390919ed4801be1 | mstksg/advent-of-code-2022 | DayXX.hs | {-# OPTIONS_GHC -Wno-unused-imports #-}
{-# OPTIONS_GHC -Wno-unused-top-binds #-}
-- |
Module : AOC.Challenge . Day${day }
-- License : BSD3
--
-- Stability : experimental
-- Portability : non-portable
--
Day $ { day_short } . See " AOC.Solver " for the types used in this module !
--
-- After compl... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2022/51b4b3797273266efb4af440b155cd9548776911/template/DayXX.hs | haskell | # OPTIONS_GHC -Wno-unused-imports #
# OPTIONS_GHC -Wno-unused-top-binds #
|
License : BSD3
Stability : experimental
Portability : non-portable
After completing the challenge, it is recommended to:
* Replace "AOC.Prelude" imports to specific modules (with explicit
imports) for readability.
* ... |
Module : AOC.Challenge . Day${day }
Day $ { day_short } . See " AOC.Solver " for the types used in this module !
solution . You can delete the type signatures completely and GHC
module AOC.Challenge.Day${day} (
, day${day}b
) where
import AOC.Prelude
import qualified Data.Graph.Ind... |
50017e305e7b9f3b553891e8bf046603a504ef5bd642eb5ec7a02c61b8fdebf8 | zwizwa/erl_tools | sink.erl | ( c ) 2018 -- see LICENSE file
%% Sink - parameterized Generators
-module(sink).
-export([gen_to_list/1,gen_tcp/1,print/1,map/2,
buffer/0, buffer/2, no_eof/1, file/1,
%% Misc processors
line_assembler/3
]).
%% Sinks are callbacks that do not return any value.
%% A Generator... | null | https://raw.githubusercontent.com/zwizwa/erl_tools/affd4060ab5b963e0cc8fcfd4a1ca5023aa518d3/src/sink.erl | erlang | Sink - parameterized Generators
Misc processors
Sinks are callbacks that do not return any value.
A Generator is a function that abstracts a sequence by iterating
over the elements and passing them to a function named Sink:
- Sink({data,Data}) for each element of the stream
- Sink(eof) at the end of the... | ( c ) 2018 -- see LICENSE file
-module(sink).
-export([gen_to_list/1,gen_tcp/1,print/1,map/2,
buffer/0, buffer/2, no_eof/1, file/1,
line_assembler/3
]).
map(Fun, Sink) -> fun(Msg) -> Sink(map_msg(Msg, Fun)) end.
map_msg({data, Data}, Fun) -> {data, Fun(Data)};
map_msg(eof,_) -> ... |
812b7b1956d094dbfa7067ea5182a4c8b32babb906c09fa328ead37b7bb69f9d | McParen/croatoan | libc.lisp | (in-package :de.anvi.ncurses)
libc
since SBCL links to libc by default , we do nt have to use - foreign - library explicitely .
;;; C prototypes
;; #include <locale.h>
;; /usr/include/locale.h
;; /usr/include/x86_64-linux-gnu/bits/locale.h
;; -the-Locale.html
;; char* setlocale (int category, const char* loca... | null | https://raw.githubusercontent.com/McParen/croatoan/413e8855b78a2e408f90efc38e8485f880691684/ncurses/libc.lisp | lisp | C prototypes
#include <locale.h>
/usr/include/locale.h
/usr/include/x86_64-linux-gnu/bits/locale.h
-the-Locale.html
char* setlocale (int category, const char* locale);
Low-level CFFI wrappers
ERROR: Trying to access undefined foreign variable "LC_ALL". | (in-package :de.anvi.ncurses)
libc
since SBCL links to libc by default , we do nt have to use - foreign - library explicitely .
(cffi:defcfun ("setlocale" setlocale) :string (category :int) (locale :string))
( cffi : ( " LC_ALL " + LC - ALL+ : read - only t ) : int )
(defconstant +LC-CTYPE+ 0... |
34ef898bbdd9a40e1d90c077b708b793c69593d6856b0a1765bc4f2f9db979f1 | aziem/binaryninja-ocaml | function.ml | open Ctypes
open Foreign
module B = Ffi_bindings.Bindings(Ffi_generated_types)(Ffi_generated)
module U = Utils
open Ffi_bindings
open B
type bn_function = Typedefs.bn_function Ctypes.structure Ctypes_static.ptr
let get_platform f =
B.bn_get_function_platform f
let get_architecture f =
B.bn_get_function_arc... | null | https://raw.githubusercontent.com/aziem/binaryninja-ocaml/5773d791ebb717816b8c47863bce8122f39764b4/lib/function.ml | ocaml | let get_function_lowlevelil f =
B.bnget_function_low_level_il f
let get_function_lowlevelil f =
Lowlevelil.LowFunction.get_function_lowlevel f
let get_stack_var_referenced_by_instr f addr =
let arch = get_architecture f in
let ref = make B.E.bnstack_variable_reference in
ref
in
f ... | open Ctypes
open Foreign
module B = Ffi_bindings.Bindings(Ffi_generated_types)(Ffi_generated)
module U = Utils
open Ffi_bindings
open B
type bn_function = Typedefs.bn_function Ctypes.structure Ctypes_static.ptr
let get_platform f =
B.bn_get_function_platform f
let get_architecture f =
B.bn_get_function_arc... |
73560d627051a1c0082ede9308b1a4d24e108abc962fd013dd4b885a266be57a | ultralisp/ultralisp | version.lisp | (defpackage #:ultralisp/downloader/version
(:use #:cl)
(:import-from #:ultralisp/models/version
#:version)
(:import-from #:ultralisp/downloader/base
#:download)
(:import-from #:ultralisp/models/project
#:get-projects))
(in-package #:ultralisp/downloader/version)
... | null | https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/src/downloader/version.lisp | lisp | (defpackage #:ultralisp/downloader/version
(:use #:cl)
(:import-from #:ultralisp/models/version
#:version)
(:import-from #:ultralisp/downloader/base
#:download)
(:import-from #:ultralisp/models/project
#:get-projects))
(in-package #:ultralisp/downloader/version)
... | |
d82f6594b82270841b6fee1b5769eaf17954a4a166a9047b1438ff6a9538f4ce | kmi/irs | last-tests2.lisp |
(in-package "OCML")
(in-ontology execution-history)
(def-instance #_inputDataValue33f8e6b429a8 #_COBRA:DataValue
(( #_COBRA:hasParameter |-super.org/processes/sbpel/sahelloworld#myVar| )
( #_COBRA:hasValue "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<message><TestPart>Hello World</TestPart></message>" )
))
(def-i... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/execution-history/last-tests2.lisp | lisp |
(in-package "OCML")
(in-ontology execution-history)
(def-instance #_inputDataValue33f8e6b429a8 #_COBRA:DataValue
(( #_COBRA:hasParameter |-super.org/processes/sbpel/sahelloworld#myVar| )
( #_COBRA:hasValue "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<message><TestPart>Hello World</TestPart></message>" )
))
(def-i... | |
eb634447cc5c190bddd56ae1811839a02e604bebea6e96061f9615c7c95199c3 | vibrato-team/vibrato-programming-language | Arquitecture.hs | module Util.Arquitecture where
-- | Arquitecture word
arqWord :: Int
arqWord = 4
halfWord = arqWord `div` 2
doubleWord :: Int
doubleWord = 4*2
arqByte :: Int
arqByte = 1
-- | Calculates next word
nextWord :: Int -> Int -> Int
nextWord offset width = ((offset + width + (arqWord-1)) `div` arqWord) * arqWord
-- Gene... | null | https://raw.githubusercontent.com/vibrato-team/vibrato-programming-language/f6d98c2686604a91cd99307bc3fdc06828c7f538/src/Util/Arquitecture.hs | haskell | | Arquitecture word
| Calculates next word
General purpose registers
--------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
---------------------------------------------------------
-------------... | module Util.Arquitecture where
arqWord :: Int
arqWord = 4
halfWord = arqWord `div` 2
doubleWord :: Int
doubleWord = 4*2
arqByte :: Int
arqByte = 1
nextWord :: Int -> Int -> Int
nextWord offset width = ((offset + width + (arqWord-1)) `div` arqWord) * arqWord
type Reg = Int
generalPurposeRegs :: [Reg]
generalPurpos... |
4d7a5f73effca65a351fb43bb22342d12891b86a7971cef8ed6ac0ce980bb10e | eugeneia/erlangen | node-test.lisp | ;;;; Basic test for node protocol.
(defpackage erlangen.distribution.protocol.node-test
(:use :cl
:erlangen
:erlangen.distribution.protocol.node
:erlangen.distribution.protocol.port-mapper
:erlangen.distribution.id)
(:export :run-tests))
(in-package :erlangen.distribution.protocol.... | null | https://raw.githubusercontent.com/eugeneia/erlangen/204166b33833c49841617bbc6ecfaf4dd77cf6d8/test/node-test.lisp | lisp | Basic test for node protocol.
Test REMOTE-SPAWN
Test REMOTE-SEND
Test REMOTE-LINK
Test REMOTE-UNLINK
Test REMOTE-EXIT |
(defpackage erlangen.distribution.protocol.node-test
(:use :cl
:erlangen
:erlangen.distribution.protocol.node
:erlangen.distribution.protocol.port-mapper
:erlangen.distribution.id)
(:export :run-tests))
(in-package :erlangen.distribution.protocol.node-test)
(let (messages)
(defu... |
61c8c3a8ca09a759633316feed4146cf3fa30f5236a0b191349692a6eb75a588 | slegrand45/mysql_protocol | mp_fetch.ml |
let build_fetch ~handler ?(nb_rows = Int64.one) () =
let%bitstring v =
{|
handler : Mp_bitstring.compute32 : int, unsigned, littleendian;
nb_rows : Mp_bitstring.compute32 : int, unsigned, littleendian
|}
in v
| null | https://raw.githubusercontent.com/slegrand45/mysql_protocol/eb28d33dfbee7b12f88a7f798c2dbb40e1fb1bb0/src/mp_fetch.ml | ocaml |
let build_fetch ~handler ?(nb_rows = Int64.one) () =
let%bitstring v =
{|
handler : Mp_bitstring.compute32 : int, unsigned, littleendian;
nb_rows : Mp_bitstring.compute32 : int, unsigned, littleendian
|}
in v
| |
76a44caa98f4950e9b24196bd66297012567d1d3393d57f9905f0c94a8d67d6a | juspay/atlas | CancellationReason.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/src/Types/API/CancellationReason.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
5687023f33ad2735ccb34df1acc4825e967b4abe345c319ce208afa6f2d33f6f | mejgun/haskell-tdlib | TextParseMode.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.TextParseMode where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- | Describes the way the text needs to be parsed for text entities
data TextParseMode
= -- | The text uses Markdown-style formatting
T... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/e81b9b3096f4b5bb3e10ca9f895ee469efa47a37/src/TD/Data/TextParseMode.hs | haskell | # LANGUAGE OverloadedStrings #
|
| Describes the way the text needs to be parsed for text entities
| The text uses Markdown-style formatting |
module TD.Data.TextParseMode where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
data TextParseMode
TextParseModeMarkdown
| Version of the parser : 0 or 1 - Telegram Bot API " Markdown " parse mode , 2 - Telegram Bot API " MarkdownV2 " parse mode
ve... |
25e70f1f7bda4b34266ca67373e0bebf69e93ac366e88547e7c0edb3c301a730 | devaspot/brace | jxat_peg.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011 ,
%%% @doc
%%%
%%% @end
Created : 29 Dec 2011 by < >
%%%-------------------------------------------------------------------
-module(jxat_peg).
%% API
-include_lib("eunit/include/eunit.hrl").
-define(memo(X)... | null | https://raw.githubusercontent.com/devaspot/brace/8494573efef63f4b2f39dd36e8c651a487223f20/test/jxat_peg.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
===================================================================
Tests
===================================================================
This shouldn't match, ... | @author < >
( C ) 2011 ,
Created : 29 Dec 2011 by < >
-module(jxat_peg).
-include_lib("eunit/include/eunit.hrl").
-define(memo(X),
'joxa-compiler':'setup-memo'(),
X,
'joxa-compiler':'release-memo'()).
line_test() ->
?assertMatch(100, 'joxa-cmp-peg':line({100, 0})),
?... |
bba3493fad986bc5ee47d0132a19c9947ead2e47c40291edc7c69b15c42189e4 | PacktWorkshops/The-Clojure-Workshop | exercise_4_12_test.clj | (ns packt-clj.exercise-4-12-test
(:require
[clojure.test :as t :refer [deftest is testing]]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[semantic-csv.core :as sc]
[packt-clj.chapter-4-tests.exercise-4-12 :as exo]))
;;; For convenience, we reference the csv file as a resource.
(def data (io/fil... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter04/tests/packt-clj.chapter-4-tests/test/packt_clj/chapter_4_tests/exercise_4_12_test.clj | clojure | For convenience, we reference the csv file as a resource. | (ns packt-clj.exercise-4-12-test
(:require
[clojure.test :as t :refer [deftest is testing]]
[clojure.data.csv :as csv]
[clojure.java.io :as io]
[semantic-csv.core :as sc]
[packt-clj.chapter-4-tests.exercise-4-12 :as exo]))
(def data (io/file (io/resource "match_scores_1991-2016_unindexed_csv.csv")))
... |
561ad9a2da557695afc805b37e4721509c1f326a7c7f961686cdc4ef956255f2 | spawnfest/eep49ers | ssl_basic_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2007 - 2019 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssl/test/ssl_basic_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2007 - 2019 . 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(ssl_basic_SUITE).
-behaviour(ct_suite).
-include_lib("common_test/include/ct.hrl").
-include_lib("public_... |
55e0cda20468ac30b90df33c6a08bdf8d65d6a0fb49040ff92e2c1cc52bbeb46 | levand/quiescent | project.clj | (defproject quiescent "0.3.2"
:description "A minimal, functional ClojureScript wrapper for ReactJS"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.7.228"]
[cljsjs/react-w... | null | https://raw.githubusercontent.com/levand/quiescent/2063ebcaffb2c62e48a177c894a10f9066b7f2cc/project.clj | clojure | (defproject quiescent "0.3.2"
:description "A minimal, functional ClojureScript wrapper for ReactJS"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescript "1.7.228"]
[cljsjs/react-w... | |
2949a8f36fdeb706c035fa6c8aefd64418f3e85c480115d996532c928b68953b | sky-big/RabbitMQ | rabbit_upgrade_functions.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/src/rabbit_upgrade_functions.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
If you are temp... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
0ec7917363a6b667db46d9bdc33ff8fc85b36ff63185bc87cf5371f1e1cb6f43 | jiesoul/soul-talk | events.cljs | (ns soul-talk.dash.events
(:require [re-frame.core :refer [reg-event-fx reg-event-db]]
[ajax.core :refer [POST GET]]
[soul-talk.db :refer [api-url]]))
(reg-event-db
:set-dashboard
(fn [db {:keys [message]}]
(assoc db :dashboard message)))
(reg-event-fx
:load-dashboard
(fn [_ _]
... | null | https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/admin/src/soul_talk/dash/events.cljs | clojure | (ns soul-talk.dash.events
(:require [re-frame.core :refer [reg-event-fx reg-event-db]]
[ajax.core :refer [POST GET]]
[soul-talk.db :refer [api-url]]))
(reg-event-db
:set-dashboard
(fn [db {:keys [message]}]
(assoc db :dashboard message)))
(reg-event-fx
:load-dashboard
(fn [_ _]
... | |
d0a02ee6cf740211e9c8c0f9c95d303c0adcdb937b69a7673e85711b4542c753 | bgusach/exercises-htdp2e | ex-180.rkt | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
; CONSTANTS
(define good (explode "good"))
(define all (explode "all"))
(define lla (explode "lla"))
(define DELETE-KEY "\u007F")
(define HEIGHT 20)
(define WIDTH 200)
(define FONT-SIZE 16)
(define FONT-COLOR "black")
(define BACKGROUND (empty-scene... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/ex-180.rkt | racket | CONSTANTS
DATA DEFINITIONS
An Lo1S is one of:
- '()
FUNCTIONS
Lo1S -> Lo1S
Lo1S 1String -> Lo1S
Adds s to the end of lo1s
String String -> Editor
WorldState -> Image
Lo1s -> Image
handles the key events
Editor -> Editor
Editor -> Editor
Editor -> Editor
Editor 1String -> Editor
Editor -> Editor
TEST &... | #lang htdp/bsl
(require 2htdp/image)
(require 2htdp/universe)
(define good (explode "good"))
(define all (explode "all"))
(define lla (explode "lla"))
(define DELETE-KEY "\u007F")
(define HEIGHT 20)
(define WIDTH 200)
(define FONT-SIZE 16)
(define FONT-COLOR "black")
(define BACKGROUND (empty-scene WIDTH HEIGH... |
7e5f8c22e35796d9862cf12c0e1aa4b7f9361dd5524c0a69369b4f967525fbd9 | purebred-mua/purebred | Notifications.hs | -- This file is part of purebred
Copyright ( C ) 2021
--
-- purebred is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later version.
--
-... | null | https://raw.githubusercontent.com/purebred-mua/purebred/c07373e076a5e322616bc99bb4921278e205174d/src/Purebred/UI/Notifications.hs | haskell | This file is part of purebred
purebred is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... | Copyright ( C ) 2021
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
# LANGUAGE FlexibleContexts #
module Purebred.UI.Notifications (
* ... |
09aecf9ef863c7344c3d0e5938f327787fc5486b5390a014681d56cef1e8a356 | hipsleek/hipsleek | env.ml | #include "xdebug.cppo"
open VarGen
(*
Created 19-Feb-2006
Environment:
- Symbol table handling stuff
- Scoping
- Alpha-renaming
- Constant/Enum substitution
*)
open Globals
module H = Hashtbl
module I = Iast
module C = Cast
type sym_tab = (ident, ident_info) H.t
and ident_info =
| VarInfo of var_... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/env.ml | ocaml |
Created 19-Feb-2006
Environment:
- Symbol table handling stuff
- Scoping
- Alpha-renaming
- Constant/Enum substitution
variable and parameter
constants of various types
this must be a constant value
name of the enum constant
enum_name's numeric value
maintain a list of scopes
push/pop sc... | #include "xdebug.cppo"
open VarGen
open Globals
module H = Hashtbl
module I = Iast
module C = Cast
type sym_tab = (ident, ident_info) H.t
and ident_info =
including numeric values , enum name
( two enum values wo n't match if they
have different enum name )
(two enum values won't match... |
f2c6499c940c4bce20661dac82fc8b0311f84d1b547368f7b5b9b3cfb62afad9 | felko/pion | Core.hs | -- | Core syntax.
module Language.Pion.Syntax.Core
( Type(..),
Context,
Sequent(..),
module Language.Pion.Name,
module Language.Pion.Syntax.Common,
module Language.Pion.Type,
)
where
import qualified Data.HashMap.Strict as HashMap
import Language.Pion.SourceSpan
import Language.Pion.Name
import... | null | https://raw.githubusercontent.com/felko/pion/657fb28ebc37fccd76ad25312b299935bbb66d0f/src/Language/Pion/Syntax/Core.hs | haskell | | Core syntax.
| Abstract syntax tree of types.
| A typing context.
| Process types.
| (?L) promote u → x; P
| P; u ← promote x
| weaken u; P
| P; weaken u
| contract u → (u1, u2); P
| P; (u1, u2) ← contract u
| x → y; P
| P; y ← x
| x → ~y; P
| P; y ← ~x
| run p { x ← a, y → b }
| fork z { x : P | y : ... | module Language.Pion.Syntax.Core
( Type(..),
Context,
Sequent(..),
module Language.Pion.Name,
module Language.Pion.Syntax.Common,
module Language.Pion.Type,
)
where
import qualified Data.HashMap.Strict as HashMap
import Language.Pion.SourceSpan
import Language.Pion.Name
import Language.Pion.Syn... |
ca9757273fa120098bb11d361b42526a7c44c0f8b6f1fc62b996e07a33402615 | avsm/mirage-duniverse | test_server.ml |
open Lwt
open Ex_common
let serve_ssl port callback =
let tag = "server" in
X509_lwt.private_of_pems
~cert:server_cert
~priv_key:server_key >>= fun certificate ->
let config =
Tls.Config.(server ~certificates:(`Single certificate) ~ciphers:Ciphers.supported ()) in
let server_s =
let open Lw... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tls/lwt/examples/test_server.ml | ocaml |
open Lwt
open Ex_common
let serve_ssl port callback =
let tag = "server" in
X509_lwt.private_of_pems
~cert:server_cert
~priv_key:server_key >>= fun certificate ->
let config =
Tls.Config.(server ~certificates:(`Single certificate) ~ciphers:Ciphers.supported ()) in
let server_s =
let open Lw... | |
f6acb9d1272875e98bc040a44a60527ccc250b1404ea03f89fe6b23d5c19b677 | HugoPeters1024/hs-sleuth | Arsec.hs | module Arsec
(
Comment
, comment
, semi
, showC
, unichar
, unichars
, module Control.Applicative
, module Control.Monad
, module Data.Char
, module Text.ParserCombinators.Parsec.Char
, module Text.ParserCombinators.Parsec.Combinator
, module Text.ParserCombinators.... | null | https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/text-nofusion/scripts/Arsec.hs | haskell | module Arsec
(
Comment
, comment
, semi
, showC
, unichar
, unichars
, module Control.Applicative
, module Control.Monad
, module Data.Char
, module Text.ParserCombinators.Parsec.Char
, module Text.ParserCombinators.Parsec.Combinator
, module Text.ParserCombinators.... | |
9f99f5ec4f30773cc833a07ca79e039a8a26458decf462188679ef713f68ba71 | awakesecurity/spectacle | AST.hs | {-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Language.Spectacle.AST
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
--
-- Stability : stable
Portability : non - portable ( GHC extensions )
--
-- TODO: docs
--
-- @since 1.0.0
module Lan... | null | https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Language/Spectacle/AST.hs | haskell | # OPTIONS_HADDOCK show-extensions #
|
Module : Language.Spectacle.AST
Stability : stable
TODO: docs
@since 1.0.0
* Actions
* Relations |
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
Portability : non - portable ( GHC extensions )
module Language.Spectacle.AST
type Action,
runAction,
type Temporal,
runTemporal,
)
where
import Language.Spectacle.AST.Action (Action, runA... |
515468a2122ecfc779f37191d94c92e0b130fbc84f5eb6f6fe33e0d1e5d5b9f6 | casperschipper/ocaml-cisp | mem_sq.ml | type 'a t =
{ cache : ('a Array.t) Option.t
; input : 'a Seq.t }
let seqify =
Array.to_seq
let chachingSeq =
let idx = 0 in
let rec aux
let eval cashed =
match cached.cache with
| Some cache -> seqify cache
| None ->
| null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/618b19509c95ff5bd6e442e0a78942d4591a59be/src/mem_sq/mem_sq.ml | ocaml | type 'a t =
{ cache : ('a Array.t) Option.t
; input : 'a Seq.t }
let seqify =
Array.to_seq
let chachingSeq =
let idx = 0 in
let rec aux
let eval cashed =
match cached.cache with
| Some cache -> seqify cache
| None ->
| |
366352f824c726d287a73114062d9da3b9b88f58ef599ad94e968d68c338aadd | spawnfest/eep49ers | make_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2017 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tools/test/make_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1996 - 2017 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(make_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("kernel/includ... |
e7c65857c7f4d47defd45445cd65758c1faf4482f9d19ba1e4ffcc025185b0a4 | emotiq/emotiq | simple-gossip.lisp | simple-gossip.lisp
8 - Mar-2018 SVS
;;; Simple gossip protocol for experimentation.
;;; No crypto. Just for gathering metrics.
(in-package :gossip)
(defparameter *max-message-age* 10 "Messages older than this number of seconds will be ignored")
(defparameter *max-seconds-to-wait* 10 "Max seconds to wait for a... | null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/gossip/simple-gossip.lisp | lisp | Simple gossip protocol for experimentation.
No crypto. Just for gathering metrics.
Note: If you change a message before forwarding it, you need to create a new
automatically ignore it.)
assumes accessors and initargs are named the same
following guarantees a single connected graph
following --probably-- mak... | simple-gossip.lisp
8 - Mar-2018 SVS
(in-package :gossip)
(defparameter *max-message-age* 10 "Messages older than this number of seconds will be ignored")
(defparameter *max-seconds-to-wait* 10 "Max seconds to wait for all replies to come in")
(defparameter *seconds-to-wait* *max-seconds-to-wait* "Seconds to wai... |
2a600b4bb6b96b8aafa6a763e56d3f7c8906f48735562f71716a62c53bcd6766 | input-output-hk/cardano-ledger | HKD.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- | This module contains just the type of protocol parameters.
module Cardano.Ledger.HKD (
HKD,
HKDFunctor (..),
)
where
import Data.Functor.Identity (Identity)
import Data.Maybe.Strict (StrictMaybe ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/libs/cardano-ledger-core/src/Cardano/Ledger/HKD.hs | haskell | | This module contains just the type of protocol parameters.
====================================================================
| Higher Kinded Data | # LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Cardano.Ledger.HKD (
HKD,
HKDFunctor (..),
)
where
import Data.Functor.Identity (Identity)
import Data.Maybe.Strict (StrictMaybe (..))
type family HKD f a where
HKD Identity a = a
HKD f a... |
ff96fedf8008d0a2a6ceaeb2dffefc1b7e861f4173d3411ad18e678123c64c89 | goldfirere/thesis | Mutable.hs | # LANGUAGE MultiParamTypeClasses , FlexibleInstances , ScopedTypeVariables #
-- |
-- Module : Data.Vector.Storable.Mutable
Copyright : ( c ) Roman Leshchinskiy 2009 - 2010
-- License : BSD-style
--
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
Mutable vectors b... | null | https://raw.githubusercontent.com/goldfirere/thesis/22f066bc26b1147530525aabb3df686416b3e4aa/cab/vector-0.10.12.3/Data/Vector/Storable/Mutable.hs | haskell | |
Module : Data.Vector.Storable.Mutable
License : BSD-style
Stability : experimental
Portability : non-portable
* Accessors
** Length information
** Extracting subvectors
** Overlapping
* Construction
** Initialisation
** Growing
** Restricting memory usage
* Accessing individual elements
... | # LANGUAGE MultiParamTypeClasses , FlexibleInstances , ScopedTypeVariables #
Copyright : ( c ) Roman Leshchinskiy 2009 - 2010
Maintainer : < >
Mutable vectors based on .
module Data.Vector.Storable.Mutable(
* Mutable vectors of ' ' types
MVector(..), IOVector, STVector, Storable,
length, null,... |
c32f950958ac8b48fc3cba03225ea1e23bd1e5e3185abcd183d58743e4495218 | danidiaz/really-small-backpack-example | Lesson0.hs | module Lesson0 (whatever) where
import Foo (foo)
whatever :: Int
whatever = foo + 1
| null | https://raw.githubusercontent.com/danidiaz/really-small-backpack-example/50c50649c46a7f06f2eadde106f3502320931fdd/lesson0-convenience-libraries/lib/Lesson0.hs | haskell | module Lesson0 (whatever) where
import Foo (foo)
whatever :: Int
whatever = foo + 1
| |
e163b9e364ffac4f4de277aaa816d7e6cc55baa7e12171817e8a7f87808b2a23 | l04m33/parenscript-react-examples | basic.lisp | (in-package #:react-examples/basic)
(let* ((renderCB (lambda ()
(let* ((elapsed (round (/ (@ this props elapsed) 100.0)))
(sec (/ elapsed 10))
(seconds (+ sec (if (= (mod elapsed 10) 0) ".0" "")))
(message (+ "React has be... | null | https://raw.githubusercontent.com/l04m33/parenscript-react-examples/104063d1b73ef4ed41c04817d8b9bae9a1e0948f/examples/basic/basic.lisp | lisp | (in-package #:react-examples/basic)
(let* ((renderCB (lambda ()
(let* ((elapsed (round (/ (@ this props elapsed) 100.0)))
(sec (/ elapsed 10))
(seconds (+ sec (if (= (mod elapsed 10) 0) ".0" "")))
(message (+ "React has be... | |
db5bb74987b6b090023785e43f8352d15b61de31214f97b3d0b838e262e58142 | skanev/playground | 54-tests.scm | (require rackunit rackunit/text-ui)
(load "../54.scm")
(define sicp-3.54-tests
(test-suite
"Tests for SICP exercise 3.54"
(check-equal? (stream-take factorials 6)
'(1 2 6 24 120 720))
))
(run-tests sicp-3.54-tests)
| null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/tests/54-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../54.scm")
(define sicp-3.54-tests
(test-suite
"Tests for SICP exercise 3.54"
(check-equal? (stream-take factorials 6)
'(1 2 6 24 120 720))
))
(run-tests sicp-3.54-tests)
| |
cf85ca111c3b9370ed3dee08b3a8b23e10d7d6035937adf48a077e0c4337b019 | haskell-repa/repa | Ascii.hs |
module Data.Repa.Convert.Format.Ascii
(FormatAscii (..))
where
import Data.Repa.Convert.Format.Numeric
import Data.Repa.Convert.Format.String
import Data.Repa.Convert.Format.Date32
import Data.Repa.Scalar.Date32 (Date32)
import Data.Repa.Scalar.Product
#include "repa-convert.h"
-- | Class of... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-convert/Data/Repa/Convert/Format/Ascii.hs | haskell | | Class of types that can be formatted in some default human readable
ASCII way.
| The format for values of this type.
| Get the standard ASCII format for a value.
The element value itself is not demanded.
| Empty tuples produce no output.
The values of these type proxies should never be demanded.
| Ints ... |
module Data.Repa.Convert.Format.Ascii
(FormatAscii (..))
where
import Data.Repa.Convert.Format.Numeric
import Data.Repa.Convert.Format.String
import Data.Repa.Convert.Format.Date32
import Data.Repa.Scalar.Date32 (Date32)
import Data.Repa.Scalar.Product
#include "repa-convert.h"
class FormatA... |
bd5d60a1140b7964cbfe77710b7123d790002f0db2e9b2947f39ed2a41dcaa9b | jkrukoff/pipe | test_pipe.erl | %%%-------------------------------------------------------------------
%%% @doc
%%% Tests for src/pipe.erl
%%% @end
%%%-------------------------------------------------------------------
-module(test_pipe).
-include_lib("eunit/include/eunit.hrl").
%%%===================================================================... | null | https://raw.githubusercontent.com/jkrukoff/pipe/f2569811a3ea22d34c7cde0342c063948a285854/test/test_pipe.erl | erlang | -------------------------------------------------------------------
@doc
Tests for src/pipe.erl
@end
-------------------------------------------------------------------
===================================================================
Tests
===================================================================
=====... | -module(test_pipe).
-include_lib("eunit/include/eunit.hrl").
always_test() ->
?assertEqual(value, pipe:always(identity(), value)).
ignore_test() ->
?assertEqual(value, pipe:ignore(constant(computed), value)).
apply_test() ->
?assertEqual(1, pipe:apply(fun erlang:'-'/2, {3, 2})).
if_ok_test_() ->
e... |
bdc7e15d4fe0bb22e364f42325ee4b839ae822778c5c1a4f72b22d82a49ee30a | lambduli/frea | Signature.hs | module Compiler.Syntax.Signature where
import Compiler.Syntax.Type (Type)
data Sig
= TypeSig String Type
instance Show Sig where
show (TypeSig name type')
= name ++ " :: " ++ show type'
| null | https://raw.githubusercontent.com/lambduli/frea/939d8d8efae0147802595af5a9dbf5f2f9a97612/src/Compiler/Syntax/Signature.hs | haskell | module Compiler.Syntax.Signature where
import Compiler.Syntax.Type (Type)
data Sig
= TypeSig String Type
instance Show Sig where
show (TypeSig name type')
= name ++ " :: " ++ show type'
| |
455cc6f286becdb7b31e30a7ec635d75e9daad44c0c1b6212e46d6c595fae275 | pascalpoizat/fbpmn | Json.hs | module Fbpmn.Analysis.Tla.IO.Json where
import Data.Aeson (decode)
import Data.Aeson.Encode.Pretty (encodePretty)
import qualified Data.ByteString.Lazy as BS (ByteString, readFile,
writeFile)
import Fbpmn.Analysis.Tla.Mode... | null | https://raw.githubusercontent.com/pascalpoizat/fbpmn/0e99d26e3ff0a24edc8e3f603fcc47e78fbf209e/src/Fbpmn/Analysis/Tla/IO/Json.hs | haskell | module Fbpmn.Analysis.Tla.IO.Json where
import Data.Aeson (decode)
import Data.Aeson.Encode.Pretty (encodePretty)
import qualified Data.ByteString.Lazy as BS (ByteString, readFile,
writeFile)
import Fbpmn.Analysis.Tla.Mode... | |
941e0c29b7ed00bb0c2c789fcaca1f54cc3b373caca325881613d5a45c7bc6aa | sirherrbatka/statistical-learning | utils.lisp | (cl:in-package #:statistical-learning.optimization)
(declaim (inline weight-at))
(defun weight-at (weights index)
(declare (type (or null weights-data-matrix) weights)
(type fixnum index))
(if (null weights)
1.0d0
(sl.data:mref weights index 0)))
(declaim (inline square))
(defun square (x... | null | https://raw.githubusercontent.com/sirherrbatka/statistical-learning/775108077969779bbfb3aec26b578eb88a952757/source/optimization/utils.lisp | lisp | (cl:in-package #:statistical-learning.optimization)
(declaim (inline weight-at))
(defun weight-at (weights index)
(declare (type (or null weights-data-matrix) weights)
(type fixnum index))
(if (null weights)
1.0d0
(sl.data:mref weights index 0)))
(declaim (inline square))
(defun square (x... | |
ae14a18c7c272a489995671c7633c587f366f801024ffc941709ac22b3fae319 | leptonyu/guiguzi | Rabbitmq.hs | module Base.Rabbitmq where
import Boots
import Network.AMQP
import Network.Socket (PortNumber)
import Salak
instance Monad m => FromProp m PortNumber where
fromProp = fromInteger <$> fromProp
instance FromProp m ConnectionOpts where
fromProp = ConnectionOpts
<$> fmap (... | null | https://raw.githubusercontent.com/leptonyu/guiguzi/9b3cb22f1b0c5387964c0097ef9a789125d2daee/base/base-rabbitmq/src/Base/Rabbitmq.hs | haskell | module Base.Rabbitmq where
import Boots
import Network.AMQP
import Network.Socket (PortNumber)
import Salak
instance Monad m => FromProp m PortNumber where
fromProp = fromInteger <$> fromProp
instance FromProp m ConnectionOpts where
fromProp = ConnectionOpts
<$> fmap (... | |
74159a93c16738f0e009c233bd0bf755f585aafbed68a19f721ec5de422e40f6 | webcrank/webcrank.hs | Internal.hs | module Webcrank.Internal
( module X
) where
import Webcrank.Internal.Parsers as X
import Webcrank.Internal.ReqData as X
import Webcrank.Internal.ResourceData as X
import Webcrank.Internal.Types as X
| null | https://raw.githubusercontent.com/webcrank/webcrank.hs/c611a12ea129383823cc627405819537c31730e4/src/Webcrank/Internal.hs | haskell | module Webcrank.Internal
( module X
) where
import Webcrank.Internal.Parsers as X
import Webcrank.Internal.ReqData as X
import Webcrank.Internal.ResourceData as X
import Webcrank.Internal.Types as X
| |
20504ea9fd6db59e55ee000437b0802c7fe7177c862f3e1e3386009ffba4b357 | norvig/paip-lisp | auxfns.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp -*-
Code from Paradigms of AI Programming
Copyright ( c ) 1991
;;; File auxfns.lisp: Auxiliary functions used by all other programs
;;; Load this file before running any other programs.
;;;; Implementation-Specific Details
(eval-when (eval compile load)
;; Make it ok t... | null | https://raw.githubusercontent.com/norvig/paip-lisp/9d3b83bdae923299aac3132dc4d8540fd57e347f/lisp/auxfns.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp -*-
File auxfns.lisp: Auxiliary functions used by all other programs
Load this file before running any other programs.
Implementation-Specific Details
Make it ok to place a function definition on a built-in LISP symbol.
Don't warn if a function is defined in multiple files --
... | Code from Paradigms of AI Programming
Copyright ( c ) 1991
(eval-when (eval compile load)
#+(or Allegro EXCL)
(dolist (pkg '(excl common-lisp common-lisp-user))
(setf (excl:package-definition-lock (find-package pkg)) nil))
#+Lispworks
(setq *PACKAGES-FOR-WARN-ON-REDEFINITION* nil)
#+LCL
(com... |
8f690eb3021e741056e1db7f5fdec1152fedb31f8f29dbeb0860f4e7834e7b24 | adamrk/llvm-ocaml-tutorial | kaleidoscope.mli | (*_ mli intentionally blank for executable *)
| null | https://raw.githubusercontent.com/adamrk/llvm-ocaml-tutorial/24ad805ad9c37bdb08cc04c0c5a87f2d611941e7/bin/kaleidoscope.mli | ocaml | _ mli intentionally blank for executable | |
337b6d3dcdc2a2b76cb4bb72750769c211c1ec7b0de72f63f4d1875359c7fd80 | mirage/mirage-lambda | unikernel.ml | open Lwt.Infix
module type BLOCK = Mirage_block_lwt.S
module type TCP = Mirage_stack_lwt.V4
[@@@warning "-40"]
let pp_chr =
Fmt.using
(function '\032' .. '\126' as x -> x
| _ -> '.')
Fmt.char
let pp_scalar : type buffer. get:(buffer -> int -> char) -> length:(buffer -> int) -> buffer Fmt.t
=... | null | https://raw.githubusercontent.com/mirage/mirage-lambda/a89b265b552f8b63ff725fc942f41a276fabb4f5/mirage/unikernel.ml | ocaml | XXX(dinosaure): we need to define types at top-level.
XXX(dinosaure): order (and control flow) to set references is __very__
important to know where computation leaks exception - and by this way, be
able to respond the best error message to the client.
TODO(dinosaure): wrap this stuff in result... | open Lwt.Infix
module type BLOCK = Mirage_block_lwt.S
module type TCP = Mirage_stack_lwt.V4
[@@@warning "-40"]
let pp_chr =
Fmt.using
(function '\032' .. '\126' as x -> x
| _ -> '.')
Fmt.char
let pp_scalar : type buffer. get:(buffer -> int -> char) -> length:(buffer -> int) -> buffer Fmt.t
=... |
2d19648f317d22a4b8de0d43fc2c43bbdc0f9ecd4c9e1db044ac62d4faa85c91 | uncomplicate/deep-diamond | regression_test.clj | (ns uncomplicate.diamond.functional.boston-housing-prices.regression-test
(:require [midje.sweet :refer [facts throws => roughly]]
[clojure.java.io :as io]
[clojure.data.csv :as csv]
[clojure.string :as string]
[uncomplicate.commons [core :refer [with-release let-releas... | null | https://raw.githubusercontent.com/uncomplicate/deep-diamond/3f5a034adeb92fe2c3cb1960240990e67afe59c4/test/uncomplicate/diamond/functional/boston_housing_prices/regression_test.clj | clojure | (ns uncomplicate.diamond.functional.boston-housing-prices.regression-test
(:require [midje.sweet :refer [facts throws => roughly]]
[clojure.java.io :as io]
[clojure.data.csv :as csv]
[clojure.string :as string]
[uncomplicate.commons [core :refer [with-release let-releas... | |
23bdea9884d7cb9f6041d9804858e5de5237a5077226587e1bcbcd1ccabda2a1 | typelead/eta | tc016.hs | module ShouldSucceed where
f x@_ y@_ = x
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc016.hs | haskell | module ShouldSucceed where
f x@_ y@_ = x
| |
96f0aebe867bcde55a23ea5bb622f24e27d2ed77d78912339d5a8f0a12f63ff3 | instedd/planwise | common.cljs | (ns planwise.client.ui.common
(:require [reagent.core :as r]
[planwise.client.components.common :refer [icon]]
[planwise.client.ui.rmwc :as m]))
(defn close-button
[{:keys [on-click]}]
[:button.icon-button {:on-click on-click} [m/Icon "close"]])
(defn- secondary-actions-menu
[_ secon... | null | https://raw.githubusercontent.com/instedd/planwise/c4d1912a3d3e4e1099075438c686da28134eba3b/client/src/planwise/client/ui/common.cljs | clojure | (ns planwise.client.ui.common
(:require [reagent.core :as r]
[planwise.client.components.common :refer [icon]]
[planwise.client.ui.rmwc :as m]))
(defn close-button
[{:keys [on-click]}]
[:button.icon-button {:on-click on-click} [m/Icon "close"]])
(defn- secondary-actions-menu
[_ secon... | |
b32182cf411ffda885c25018cb1245b84ef6d30d04346b83bc59abd05699b2f4 | ovotech/ring-jwt | jwt_test_utils.clj | (ns ring.middleware.jwt-test-utils
"Test utility functions for use in writing tests against ring servers that have the
ring-jwt middleware. Not designed for use in production code."
(:require [clojure.test :refer :all]
[clojure.walk :refer [stringify-keys walk]]
[cheshire.core :as json])
... | null | https://raw.githubusercontent.com/ovotech/ring-jwt/793ac1aef8709811b1a48001fa9bf3bf9f631b9e/src/ring/middleware/jwt_test_utils.clj | clojure | The java library refuses to accept maps as claims so we are using reflection here to force maps into the claims | (ns ring.middleware.jwt-test-utils
"Test utility functions for use in writing tests against ring servers that have the
ring-jwt middleware. Not designed for use in production code."
(:require [clojure.test :refer :all]
[clojure.walk :refer [stringify-keys walk]]
[cheshire.core :as json])
... |
0a96c57b819f4284ed6cf25ac710a4f28548c93b53d4affbd08bf7b156fc9d4c | sulami/spielwiese | tsp.hs | -- Some programmatical thoughts about the travelling salesman problem.
Everything below is published under the ISC License , as usually . © 2015
Robin ' sulami ' < > .
Disclaimer : This was before I found out actually has a proper data
-- type for graphs, so this is a bit ghetto, but works.
import Data.Ord ... | null | https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hTSP/tsp.hs | haskell | Some programmatical thoughts about the travelling salesman problem.
type for graphs, so this is a bit ghetto, but works.
cities. The problem is the typical TSP, visit every city excactly once while
optimizing the total distance travelled. The start- and endvertex can be
distance given is measured in kilometres and... |
Everything below is published under the ISC License , as usually . © 2015
Robin ' sulami ' < > .
Disclaimer : This was before I found out actually has a proper data
import Data.Ord (comparing)
import qualified Data.List as L
import qualified Data.Maybe as M
The input data is taken from a friend 's assign... |
0ab4d79e7b385c15c460e435ea4dbdcf8ed798d2fc5b19ad7ee592f35f0e670a | fakedata-haskell/fakedata | RuTextSpec.hs | # LANGUAGE ScopedTypeVariables #
{-# LANGUAGE OverloadedStrings #-}
module RuTextSpec where
import Data.Text (Text)
import qualified Data.Text as T
import Faker hiding (defaultFakerSettings)
import qualified Faker.Address as FA
import Faker.Combinators (listOf)
import qualified Faker.Company as CO
import qualified Fa... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/ea938c38845b274e28abe7f4e8e342f491e83c89/test/RuTextSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
module RuTextSpec where
import Data.Text (Text)
import qualified Data.Text as T
import Faker hiding (defaultFakerSettings)
import qualified Faker.Address as FA
import Faker.Combinators (listOf)
import qualified Faker.Company as CO
import qualified Faker.Commerce as CE
import qualified... |
c6ba903806c1f34aa7182397445cace0269a01c91c6419b58622101594d1e67f | emhoracek/smooch | Kiss.hs | {-# LANGUAGE OverloadedStrings #-}
module Kiss where
import Data.Aeson hiding (Array)
import Data.Array (Array)
data DollData = DollData { dollDirectory :: FilePath,
dollCels :: [KissCel],
dollFiles :: [FilePath] }
data KissDoll = Ki... | null | https://raw.githubusercontent.com/emhoracek/smooch/40f4bd725d3d31f962ad4777378f0eaa06d5ab0e/app/src/Kiss.hs | haskell | # LANGUAGE OverloadedStrings # |
module Kiss where
import Data.Aeson hiding (Array)
import Data.Array (Array)
data DollData = DollData { dollDirectory :: FilePath,
dollCels :: [KissCel],
dollFiles :: [FilePath] }
data KissDoll = KissDoll { kData :: CNFKissData
... |
b2dec7bbbda3c3cadb19ee0d5220dfb5f98b656d168337611ee9fbf581f00cae | OCamlPro/OCamlPro-OCaml-Branch | binarytree.orig.ml | The Computer Language Benchmarks Game
* /
*
* Contributed by Troestler Modified by
* /
*
* Contributed by Troestler Christophe
* Modified by Fabrice Le Fessant
*)
function originally due to
let invoke (f : 'a -> 'b) x =
let input, output = Unix.pipe() in
match Unix.fork() with
... | null | https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/shootout-benchmark/01-binary-tree/binarytree.orig.ml | ocaml | The Computer Language Benchmarks Game
* /
*
* Contributed by Troestler Modified by
* /
*
* Contributed by Troestler Christophe
* Modified by Fabrice Le Fessant
*)
function originally due to
let invoke (f : 'a -> 'b) x =
let input, output = Unix.pipe() in
match Unix.fork() with
... | |
c3d2044fe06cfa8a67ad1755594a48e44f282912853c2327d30562577660ddc7 | Earthen/clj-cb | cluster.clj | (ns earthen.clj-cb.cluster
(:require [earthen.clj-cb.utils :as u])
(:import [com.couchbase.client.java CouchbaseCluster]
[com.couchbase.client.java.bucket BucketManager]
[com.couchbase.client.java.cluster DefaultBucketSettings BucketSettings]))
(defn create
"Create and sets the cluster/s wi... | null | https://raw.githubusercontent.com/Earthen/clj-cb/aaf7db4bfd26a1d6506b980d6cae6399c3776751/src/earthen/clj_cb/cluster.clj | clojure | (ns earthen.clj-cb.cluster
(:require [earthen.clj-cb.utils :as u])
(:import [com.couchbase.client.java CouchbaseCluster]
[com.couchbase.client.java.bucket BucketManager]
[com.couchbase.client.java.cluster DefaultBucketSettings BucketSettings]))
(defn create
"Create and sets the cluster/s wi... | |
543e9cc903a961832cc59b2cded2301de33e2df5a5a1f39658d8eeb029d85c7c | footprintanalytics/footprint-web | common.clj | (ns metabase.driver.common
"Shared definitions and helper functions for use across different drivers."
(:require [clj-time.coerce :as time.coerce]
[clj-time.core :as time]
[clj-time.format :as time.format]
[clojure.string :as str]
[clojure.tools.logging :as log]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/driver/common.clj | clojure | TODO - we should rename these from `default-*-details` to `default-*-connection-property`
this is entirely a UI flag
+----------------------------------------------------------------------------------------------------------------+
| Fetching Current Timezone ... | (ns metabase.driver.common
"Shared definitions and helper functions for use across different drivers."
(:require [clj-time.coerce :as time.coerce]
[clj-time.core :as time]
[clj-time.format :as time.format]
[clojure.string :as str]
[clojure.tools.logging :as log]
... |
6ba1bd90451979268fcb7dd911acba859f252feb81f0800bf5493ca166380898 | TrustInSoft/tis-kernel | int_Intervals_sig.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/abstract_interp/int_Intervals_sig.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
64faf15035c6def36b66c0ab96962f99d83ca0c800169ec50e674aa4a7e9f390 | jirkamarsik/esa-wordseg | adjust.clj | (ns esa-wordseg.adjust
"The Adjustment part of ESA where we discount the frequencies
of proper subsequences of words from the previous Selection."
(:use (esa-wordseg [trie :only [disj-trie]]
[misc :only [flatten-leafs proper-subvecs]])))
(defn discount-subsegs
"Takes the flattened result o... | null | https://raw.githubusercontent.com/jirkamarsik/esa-wordseg/6d03129e308521abb2122533d13e05eef4fe386c/src/esa_wordseg/adjust.clj | clojure | (ns esa-wordseg.adjust
"The Adjustment part of ESA where we discount the frequencies
of proper subsequences of words from the previous Selection."
(:use (esa-wordseg [trie :only [disj-trie]]
[misc :only [flatten-leafs proper-subvecs]])))
(defn discount-subsegs
"Takes the flattened result o... | |
1788c90fa05527be0dac3a88b0a0fb221d2c0786756d2829ffcd957b806b7fb9 | bobzhang/ocaml-book | util.ml | (* Author: *)
Version : $ I d : util.ml , v 0.0 2012/02/16 21:30:48 bobzhang1988 Exp $
open Printf
let (|>) x f = f x
let (^$) f x = f x
let failwithf fmt = ksprintf failwith fmt
| null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/unify/util.ml | ocaml | Author: | Version : $ I d : util.ml , v 0.0 2012/02/16 21:30:48 bobzhang1988 Exp $
open Printf
let (|>) x f = f x
let (^$) f x = f x
let failwithf fmt = ksprintf failwith fmt
|
fc42716d5b1b0e7b79cda92b18467848b574119ff9c2c0f737b252c58669f2f7 | andrewzhurov/brawl-haus | time.cljs | (ns brawl-haus.fit.time
(:require [brawl-haus.fit.state :refer [db]]))
(def fps 30)
(def dt (/ 1000 fps))
(def default-time-flow 25)
(defn relative-time [ent dt]
(cond
(= :player (:id ent)) (* 2 dt)
(= :bullet (:type ent)) (* 3 dt)
:else dt #_(/ dt 4)))
(defn time-passed [{:keys [current-tick angle-... | null | https://raw.githubusercontent.com/andrewzhurov/brawl-haus/7f560c3dcee7b242fda545d87c102471fdb21888/src/cljs/brawl_haus/fit/time.cljs | clojure | (ns brawl-haus.fit.time
(:require [brawl-haus.fit.state :refer [db]]))
(def fps 30)
(def dt (/ 1000 fps))
(def default-time-flow 25)
(defn relative-time [ent dt]
(cond
(= :player (:id ent)) (* 2 dt)
(= :bullet (:type ent)) (* 3 dt)
:else dt #_(/ dt 4)))
(defn time-passed [{:keys [current-tick angle-... | |
4d0ee3a0ee1d30f1e079c160f9260d2129e2478fb5d6aa4a38b6122e17d57f12 | GillianPlatform/Gillian | Chunk.ml | type t = Compcert.AST.memory_chunk =
| Mint8signed
| Mint8unsigned
| Mint16signed
| Mint16unsigned
| Mint32
| Mint64
| Mfloat32
| Mfloat64
| Many32
| Many64
[@@deriving yojson]
let of_string = function
| "int8signed" -> Mint8signed
| "int8unsigned" -> Mint8unsigned
| "int16signed" -> Mint16si... | null | https://raw.githubusercontent.com/GillianPlatform/Gillian/42d0e2aae9fa6b0992a5bc300525cc8d360c3c96/Gillian-C/lib/Chunk.ml | ocaml | type t = Compcert.AST.memory_chunk =
| Mint8signed
| Mint8unsigned
| Mint16signed
| Mint16unsigned
| Mint32
| Mint64
| Mfloat32
| Mfloat64
| Many32
| Many64
[@@deriving yojson]
let of_string = function
| "int8signed" -> Mint8signed
| "int8unsigned" -> Mint8unsigned
| "int16signed" -> Mint16si... | |
553d53269cfad24ce65d444d7054a2d413e3ae7df342a48c25bd326de22fe14f | rtoy/ansi-cl-tests | stream-error-stream.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Feb 14 20:51:33 2004
;;;; Contains: Tests of STREAM-ERROR-STREAM
(in-package :cl-test)
(deftest stream-error-stream.1
(with-input-from-string
(s "")
(handler-case
(read-char s)
(stream-error (c) (eqlt (stream-error-stream c) s))))
t)
;;; Err... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/stream-error-stream.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of STREAM-ERROR-STREAM
Error tests | Author :
Created : Sat Feb 14 20:51:33 2004
(in-package :cl-test)
(deftest stream-error-stream.1
(with-input-from-string
(s "")
(handler-case
(read-char s)
(stream-error (c) (eqlt (stream-error-stream c) s))))
t)
(deftest stream-error-stream.error.1
(signals-error (stream-error-stream... |
baadda098d5790453afa0c6beb55386e76190c872cfcf7ab0f3b8f9b4d4e2ef1 | macourtney/Conjure | project.clj | (defproject org.conjure/conjure-script-view "1.0.1-SNAPSHOT"
:description "The generator and destroyers for the view files."
:dependencies [[clojure-tools "1.1.2"]
[org.conjure/conjure-view "1.0.1-SNAPSHOT"]
[org.conjure/conjure-test "1.0.1-SNAPSHOT"]]
:profiles { :dev { :depe... | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_script_view/project.clj | clojure | (defproject org.conjure/conjure-script-view "1.0.1-SNAPSHOT"
:description "The generator and destroyers for the view files."
:dependencies [[clojure-tools "1.1.2"]
[org.conjure/conjure-view "1.0.1-SNAPSHOT"]
[org.conjure/conjure-test "1.0.1-SNAPSHOT"]]
:profiles { :dev { :depe... | |
4e7d073de0f55d1b92a30a5a0313f635438fcb141c98482bb91d5a164f211171 | Bogdanp/aoc2020 | day12-1.rkt | #lang racket/base
(require racket/match)
(struct instr (cmd n)
#:transparent)
(struct state (dir x y)
#:transparent)
(define instr-re #rx"([NSEWLRF])(.+)")
(define instrs
(call-with-input-file "input12.txt"
(lambda (in)
(for/list ([line (in-lines in)])
(match (regexp-match instr-re line)
... | null | https://raw.githubusercontent.com/Bogdanp/aoc2020/4021ed7a85eb58f655f38a9069656d64aaaa2ace/day12-1.rkt | racket | #lang racket/base
(require racket/match)
(struct instr (cmd n)
#:transparent)
(struct state (dir x y)
#:transparent)
(define instr-re #rx"([NSEWLRF])(.+)")
(define instrs
(call-with-input-file "input12.txt"
(lambda (in)
(for/list ([line (in-lines in)])
(match (regexp-match instr-re line)
... | |
9bdfb24360a957f6cf419a06b9647e75bbebc12bec8033f374577725fbd70cf0 | purescript/spago | TH.hs | # LANGUAGE TemplateHaskell #
module Spago.TH
( embedFileUtf8
) where
import Prelude
import Data.FileEmbed
import Data.Text.Encoding as LT
import Language.Haskell.TH.Syntax (Exp(..), Q)
-- | This is here so that we can embed files as Utf8 Text.
The reason for... | null | https://raw.githubusercontent.com/purescript/spago/f5d1fdc03dbfe18c6bf9824335c324503282a467/src/Spago/TH.hs | haskell | | This is here so that we can embed files as Utf8 Text.
if you compile on a non-unicode system you'll get weirdly encoded stuff.
TL;DR: don't use embedStringFile.
This comes from: | # LANGUAGE TemplateHaskell #
module Spago.TH
( embedFileUtf8
) where
import Prelude
import Data.FileEmbed
import Data.Text.Encoding as LT
import Language.Haskell.TH.Syntax (Exp(..), Q)
The reason for that is that since we have unicode Dhall files ,
embe... |
f120948e505aad898004d82ace37a283d9bcd9f96eb31e439e55b66614bbece4 | rhaberkorn/ermacs | edit_util.erl | -module(edit_util).
-include("edit.hrl").
-export([keyname/1, status_msg/2, status_msg/3, update_minibuffer_window/2,
select_window/2, update/3]).
-compile(export_all).
keyname(263) -> "C-h";
keyname(127) -> "C-h";
keyname(272) -> "C-h";
keyname(C) ->
case ctrl_p(C) of
true ->
"C-" ++ keyname(tolower(un... | null | https://raw.githubusercontent.com/rhaberkorn/ermacs/35c8f9b83ae85e25c646882be6ea6d340a88b05b/src/edit_util.erl | erlang | Eighth bit set means meta
Apply Fun to minibuffer window and put the result in the state.
Fun is fun(Win) -> Win'
e.g.
the status line. Otherwise, a buffer called `Buf' is popped up to
show it.
might be already started, s'ok
Returns: {true, Line} | false
Where Line is the same as the input string, but with no ... | -module(edit_util).
-include("edit.hrl").
-export([keyname/1, status_msg/2, status_msg/3, update_minibuffer_window/2,
select_window/2, update/3]).
-compile(export_all).
keyname(263) -> "C-h";
keyname(127) -> "C-h";
keyname(272) -> "C-h";
keyname(C) ->
case ctrl_p(C) of
true ->
"C-" ++ keyname(tolower(un... |
6c600f3097bb5d6d173a134e4953df2d2d0c86b2ccd0d5681a4c54f090d62342 | algoriffic/lsa4solr | core_test.clj | (ns lsa4solr.core-test
(:use [lsa4solr.core] :reload-all)
(:use [clojure.test]))
(deftest replace-me ;; FIXME: write
(is false))
| null | https://raw.githubusercontent.com/algoriffic/lsa4solr/93231caff612d0a0bf3c418523385af674adae4e/test/lsa4solr/core_test.clj | clojure | FIXME: write | (ns lsa4solr.core-test
(:use [lsa4solr.core] :reload-all)
(:use [clojure.test]))
(is false))
|
29001477f87a2e0f201c51f536e880802b1800062d85879a1873c91446de9dce | ChrisTitusTech/gimphelp | 210_artist_inkpen.scm | 210_artist_inkpen.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
;==================================================
;
; Installation:
; This script should be placed in the user or system-wide script folder.
;
; Windows 7/10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
; or
C:\U... | null | https://raw.githubusercontent.com/ChrisTitusTech/gimphelp/fdbc7e3671ce6bd74cefd83ecf7216e5ee0f1542/gimp_scripts-2.10/210_artist_inkpen.scm | scheme | ==================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 7/10
or
Linux
/home/yourname/.config/GIMP/2.10/scripts
or
Linux system-wide
/usr/share/gimp/2.0/scripts
==================================================
... | 210_artist_inkpen.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts
it under the terms of the GNU General Public License as published by
the Free Software Foundation , eith... |
a91c753b24646a33495f2c99dbd9de8047e1619ff8d187c8a646680ad9f465bf | ice1000/learn | Data.hs | module Data where
data Contact = Mobile String
| Email String
| Name String
valid :: Contact -> Bool
valid (Mobile tel) = (length tel) == 11
valid (Email mail) = elem '@' mail
valid (Name name) =
let
nameLength = length name
in
nameLength >= 5 && nameLength <= 12
... | null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/Data.hs | haskell | true
| module Data where
data Contact = Mobile String
| Email String
| Name String
valid :: Contact -> Bool
valid (Mobile tel) = (length tel) == 11
valid (Email mail) = elem '@' mail
valid (Name name) =
let
nameLength = length name
in
nameLength >= 5 && nameLength <= 12
|
993de5b86320dbd567c90001c0d6ecb553dddb8f2b48848838ff87a04f9e5b43 | Deducteam/CoqInE | encoding.ml | let flags = Hashtbl.create 15
let encodings = Hashtbl.create 15
let flag = Hashtbl.find flags
let symb key =
try
match Hashtbl.find encodings key with
| "" -> failwith ("Symbol [" ^ key ^ "] is not available in this encoding.")
| value -> value
with Not_found -> failwith ("Symbol [" ^ key ^ "] is n... | null | https://raw.githubusercontent.com/Deducteam/CoqInE/c38cca7fa27ee56c3ab2e8712d904b1620f8546d/src/encoding.ml | ocaml | * Translate let-in as simpl beta redices or not ?
* Is (true) polymorphism translation on ?
* Is template polymorphism translation on ?
* Are template polymorphic constructors polymorphic ?
* Should template polymorphic inductives parameter sort-irrelevance
be obtained through lift elimination (false) or ... | let flags = Hashtbl.create 15
let encodings = Hashtbl.create 15
let flag = Hashtbl.find flags
let symb key =
try
match Hashtbl.find encodings key with
| "" -> failwith ("Symbol [" ^ key ^ "] is not available in this encoding.")
| value -> value
with Not_found -> failwith ("Symbol [" ^ key ^ "] is n... |
28e44d3b6f3370d1cfe43225f25bffcf6c53f1dfa7c6cc2dc7a817a1b1773afd | xapi-project/xen-api | test_repository_helpers.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xen-api/a91ff50b3fc7e1abf89dbeeceeca1af4398426cd/ocaml/tests/test_repository_helpers.ml | ocaml | A complete normal case
No old version, old release and updateId
Missing arch
A complete normal case with epoch
( (source_url, binary_url), (need_gpg_check, gpgkey_path) )
Create empty gpgkey file if it is needed
The path of file which will be written by write_yum_config
Update ID in update can... |
* Copyright ( C ) Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking described in file LI... |
b103c518500624f346178690b394fef90b8103441842aed00d73456e395c81d3 | giorgidze/HCodecs | Parser.hs | -----------------------------------------------------------------------------
-- |
Module : Data . ByteString .
Copyright : ,
-- License : BSD3
--
Maintainer : < /~ggg/ >
-- Stability : experimental
-- Portability : Portable
--
-- A monad for efficiently building structures from
encoded ... | null | https://raw.githubusercontent.com/giorgidze/HCodecs/deada21b19b2063a60027535f0f8bb303f08e302/src/Codec/ByteString/Parser.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Portability : Portable
A monad for efficiently building structures from
---------------------------------------------------------------------------
* Parsing
* Utility
* Parsing particu... | Module : Data . ByteString .
Copyright : ,
Maintainer : < /~ggg/ >
encoded lazy ByteStrings .
module Codec.ByteString.Parser (
* The Parser type
Parser
, runParser
, runParserState
, choice
, expect
, skip
, lookAhead
, lookAheadM
, lookAheadE
, ... |
8be648caf248df1c5d0f844797b01b67a1f8de8cbc8806ceb41d75f059b21fee | bioclojure/bio.io.vcf | test_header_parser.clj | (ns org.bioclojure.bio.io.vcf.test-header-parser
(:require [clojure.java.io :as io]
[midje.sweet :refer :all]
[org.bioclojure.bio.io.vcf.test-fixtures :refer :all]
[org.bioclojure.bio.io.vcf.header-parser :refer :all]))
(fact "We can parse a simple key/value header line"
(pa... | null | https://raw.githubusercontent.com/bioclojure/bio.io.vcf/712c8a2bbecd1d8019b44b57d003242d0b31d4c5/test/org/bioclojure/bio/io/vcf/test_header_parser.clj | clojure | (ns org.bioclojure.bio.io.vcf.test-header-parser
(:require [clojure.java.io :as io]
[midje.sweet :refer :all]
[org.bioclojure.bio.io.vcf.test-fixtures :refer :all]
[org.bioclojure.bio.io.vcf.header-parser :refer :all]))
(fact "We can parse a simple key/value header line"
(pa... | |
8eb6341f9f15fac2529adc9d5450c507ad6fc98872acc20c575a29873e1a8a70 | teknql/wing | repl.clj | (ns wing.repl
"REPL namespace for Wing"
(:require [clojure.tools.deps.alpha :as tools.deps]
[cemerick.pomegranate :as pome]))
(defn- deps->class-paths!
"Convert a map of deps into a sequence of class paths.
See `clojure.tools.deps.alpha/resolve-deps` for `arg-maps` documentation."
([deps] (deps-... | null | https://raw.githubusercontent.com/teknql/wing/de8148bf48210eac0c0e3f8e31346b5b2ead39c2/src/wing/repl.clj | clojure | (ns wing.repl
"REPL namespace for Wing"
(:require [clojure.tools.deps.alpha :as tools.deps]
[cemerick.pomegranate :as pome]))
(defn- deps->class-paths!
"Convert a map of deps into a sequence of class paths.
See `clojure.tools.deps.alpha/resolve-deps` for `arg-maps` documentation."
([deps] (deps-... | |
d0e657974edf052d271e257e8f66cf2b584b97b340e8a374b7db76440d318dba | hbrouwer/pdrt-sandbox | Variables.hs | |
Module : Data . DRS.Variables
Copyright : ( c ) and
License : Apache-2.0
Maintainer : ,
Stability : provisional
Portability : portable
DRS variables
Module : Data.DRS.Variables
Copyright : (c) Harm Brouwer and Noortje Venhuizen
License : Apache-2.... | null | https://raw.githubusercontent.com/hbrouwer/pdrt-sandbox/fade311300da16bca98088af1ae7c92ababed84d/src/Data/DRS/Variables.hs | haskell | * Conversion
* New Variables
* Variable Collections
-------------------------------------------------------------------------
* Exported
-------------------------------------------------------------------------
-------------------------------------------------------------------------
** Conversion
----------------... | |
Module : Data . DRS.Variables
Copyright : ( c ) and
License : Apache-2.0
Maintainer : ,
Stability : provisional
Portability : portable
DRS variables
Module : Data.DRS.Variables
Copyright : (c) Harm Brouwer and Noortje Venhuizen
License : Apache-2.... |
43d4f127ccad4d59e3b120ae228861f7f0a5a8de2345a8e03f1f303703782a24 | Yume-Labs/prism | done.clj | (ns prism.done
(:gen-class)
(:require [clojure.core.async :refer [<! go]]
[taoensso.timbre :refer :all]))
(defn done-checker
[config in]
(go (loop [count (get-in config [:config :size])]
(if (> count 0)
(if (nil? (<! in))
(recur count)
(recur (dec count)))
... | null | https://raw.githubusercontent.com/Yume-Labs/prism/1dd2c0f4eac8bbd32877a40617b36c1319d8f114/src/prism/done.clj | clojure | (ns prism.done
(:gen-class)
(:require [clojure.core.async :refer [<! go]]
[taoensso.timbre :refer :all]))
(defn done-checker
[config in]
(go (loop [count (get-in config [:config :size])]
(if (> count 0)
(if (nil? (<! in))
(recur count)
(recur (dec count)))
... | |
f41453367de9d62d309ce603d4294cecf3e8f2fe18d866f37d99d36d321eb623 | Bike/hominy | runtime.lisp | (in-package #:hominy)
;;;; This file defines stuff compiled code uses/depends on.
;;;; It will get more complicated once representation selection allows
;;;; non-stupid calling conventions, among other things.
(defclass compiled-operative (i:operative)
((%fun :initarg :fun :reader compiled-operative-fun :type funct... | null | https://raw.githubusercontent.com/Bike/hominy/ee8bb886d26f9c04eadf978ddbf4141c687b0c74/flowc/runtime.lisp | lisp | This file defines stuff compiled code uses/depends on.
It will get more complicated once representation selection allows
non-stupid calling conventions, among other things.
FIXME: Explicit frame handling | (in-package #:hominy)
(defclass compiled-operative (i:operative)
((%fun :initarg :fun :reader compiled-operative-fun :type function)
(%enclosed :initarg :enclosed :reader enclosed :accessor %enclosed)))
(defmethod i:combine ((combiner compiled-operative) combinand env &optional frame)
(funcall (compiled-opera... |
0831cd4afeb73293d697a90399b79d248060ad066947e47c85354e572d277a6d | argp/bap | pack.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocamlgraph/src/pack.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
$ I d :... |
9a5a30e33de55c1cd6cdf1ead7a6c97eda5030fd2becf7d57f15b213f7a44504 | mkoppmann/eselsohr | Command.hs | module Lib.Ui.Cli.Command
( createCollection
, WithEnv
) where
import qualified Lib.App.Command as Command
import qualified Lib.Ui.Dto.Accesstoken as Accesstoken
import Lib.App.Env
( BaseUrl
, Has
, grab
)
import Lib.App.Port (MonadRandom)
import Lib.Domain.Repo.Collection (CollectionRepo)... | null | https://raw.githubusercontent.com/mkoppmann/eselsohr/3bb8609199c1dfda94935e6dde0c46fc429de84e/src/Lib/Ui/Cli/Command.hs | haskell | module Lib.Ui.Cli.Command
( createCollection
, WithEnv
) where
import qualified Lib.App.Command as Command
import qualified Lib.Ui.Dto.Accesstoken as Accesstoken
import Lib.App.Env
( BaseUrl
, Has
, grab
)
import Lib.App.Port (MonadRandom)
import Lib.Domain.Repo.Collection (CollectionRepo)... | |
ba9d7de3d24396406e35f3542e175610f4ac664f711d7aab9ddd1e7c1aed1c1b | 2600hz-archive/whistle | riak_core_handoff_manager.erl | This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing,
software distributed under the Licens... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/riak_core-0.14.0/src/riak_core_handoff_manager.erl | erlang | Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License. | This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
... |
38d4e4c856f0b65be4726e237e053705b215a7f878544026ca7b9f2a2bff7f0e | nd/bird | 9.2.2.hs | f :: Int -> Int
f undefined = 0
f (x /= undefined) = 1
this function is not monotonic, because:
undefined <= 1 (approximation order)
but
f undefined is not <= f 1
| null | https://raw.githubusercontent.com/nd/bird/06dba97af7cfb11f558eaeb31a75bd04cacf7201/ch09/9.2.2.hs | haskell | f :: Int -> Int
f undefined = 0
f (x /= undefined) = 1
this function is not monotonic, because:
undefined <= 1 (approximation order)
but
f undefined is not <= f 1
| |
47b17f43d65424cbb66b8a64845d80348d7d94facbb8a39a05cb9a572a2270f5 | S8A/htdp-exercises | ex063.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 ex063) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt... | null | https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex063.rkt | racket | about the language level of this file in a form that our tools can easily process.
computes the distance of ap to the origin
(sqrt (+ (sqr 3) (sqr 4)))
(sqrt (+ 9 16))
(sqrt (+ (sqr 6) (sqr 8)))
10)
(+ 13 10) | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex063) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ... |
2335917f3e64fe0844c10955386b923ff9f8e3bbf104dc53f886a075cb17ade4 | PatrickMaier/HdpH | Location.hs | -- Locations; types
--
Author : ,
-----------------------------------------------------------------------------
{-# LANGUAGE DeriveDataTypeable #-} -- for defining exceptions
module Control.Parallel.HdpH.Internal.Type.Location
( -- * node IDs (and their constitutent parts)
Node(..),
-- * node ID exc... | null | https://raw.githubusercontent.com/PatrickMaier/HdpH/e836a5bcf5a6c93239f9c0d0109d7b81b459897f/hdph/src/Control/Parallel/HdpH/Internal/Type/Location.hs | haskell | Locations; types
---------------------------------------------------------------------------
# LANGUAGE DeriveDataTypeable #
for defining exceptions
* node IDs (and their constitutent parts)
* node ID exception
---------------------------------------------------------------------------
node IDs
A 'Node' should b... | Author : ,
module Control.Parallel.HdpH.Internal.Type.Location
Node(..),
instances : Exception , Show ,
) where
import Prelude
import Control.Exception (Exception)
import Data.Typeable (Typeable)
import qualified Network.Transport as NT (EndPointAddress)
| A ' Node ' identifies an node ( that i... |
a2bd9e4e8ec4f41bf46ea06c50ed098e4e79d213fc42b8d06178f82b74f0c523 | quil/quil | manual.cljs | (ns quil.manual
(:require [quil.core :as q :include-macros true]
[quil.middlewares.fun-mode :as fm]
[goog.events :as events]
[goog.events.EventType :as EventType]))
(defn update-looping
"Updates 'Looping' status for the external-control test."
[id]
(q/with-sketch (q/get-sket... | null | https://raw.githubusercontent.com/quil/quil/1f214e712d834ede311fdc652eafe9cc0232c96e/test/cljs/quil/manual.cljs | clojure | Just to try :settings instead of usual :setup
draw ellipse in gr object
draw gr object on screen
draw gr object on screen using get-pixel
set fill color to the same as ellipse and
draw rectangle
point of the screen and draw white rectangle | (ns quil.manual
(:require [quil.core :as q :include-macros true]
[quil.middlewares.fun-mode :as fm]
[goog.events :as events]
[goog.events.EventType :as EventType]))
(defn update-looping
"Updates 'Looping' status for the external-control test."
[id]
(q/with-sketch (q/get-sket... |
98c13172471226efabeecab627d14dd12359c3814b8153a38d5edacd87fc08dc | kawu/nerf | Compare.hs | | Compare two NE - annotated datasets .
module NLP.Nerf.Compare
( Stats (..)
, (.+.)
, compare
) where
import Prelude hiding (span, compare)
import Control.Applicative ((<$>))
import Control.Monad (forM)
import qualified Control.Monad.State.Strict as ST
import qualified Control.Monad... | null | https://raw.githubusercontent.com/kawu/nerf/29ad341368d0869a15c205bda40247d9db2fdea8/src/NLP/Nerf/Compare.hs | haskell | | Statistics.
^ false positive
^ true positive
^ false negative
^ true negative
| A NE represented by its label and a character-level span, over which
the span.
| Add stats.
forest pairs correspond to the same sentences.
| Replace words with character-level position identifiers.
White-spaces are ignored. | | Compare two NE - annotated datasets .
module NLP.Nerf.Compare
( Stats (..)
, (.+.)
, compare
) where
import Prelude hiding (span, compare)
import Control.Applicative ((<$>))
import Control.Monad (forM)
import qualified Control.Monad.State.Strict as ST
import qualified Control.Monad... |
d2495243a0f94c08c967027496061d0abdb4e5718aee2a57657c308f73f157c3 | d-cent/mooncake | sign_in.clj | (ns mooncake.test.view.sign-in
(:require [midje.sweet :refer :all]
[mooncake.routes :as routes]
[mooncake.test.test-helpers.enlive :as eh]
[mooncake.view.sign-in :as si]
[net.cgrand.enlive-html :as html]
[mooncake.translation :as t]))
(fact "sign-in page sh... | null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/test/mooncake/test/view/sign_in.clj | clojure | (ns mooncake.test.view.sign-in
(:require [midje.sweet :refer :all]
[mooncake.routes :as routes]
[mooncake.test.test-helpers.enlive :as eh]
[mooncake.view.sign-in :as si]
[net.cgrand.enlive-html :as html]
[mooncake.translation :as t]))
(fact "sign-in page sh... | |
239051a00d23f348c2f460feced02343ae05e76fb52a495dbcbee33fb0dcaebc | micahasmith/crypto-watch | binance.clj | (ns crypto.services.binance
(:require [gniazdo.core :as ws]
[clojure.core.async :as a]
[clojure.data.json :as json]
[crypto.infra.helpers :refer :all]
[crypto.infra.websockets :as websockets]
[clj-http.client :as http]
[taoensso.timbre :as timbre... | null | https://raw.githubusercontent.com/micahasmith/crypto-watch/265d03148a018e422513a6daee67cf6e58ac12bf/crypto/src/crypto/services/binance.clj | clojure | pause
get data | (ns crypto.services.binance
(:require [gniazdo.core :as ws]
[clojure.core.async :as a]
[clojure.data.json :as json]
[crypto.infra.helpers :refer :all]
[crypto.infra.websockets :as websockets]
[clj-http.client :as http]
[taoensso.timbre :as timbre... |
b2684eb7ed91d5afde388a8e69b6ee233439f7503c4339644c0a4402d54675cb | ashinn/chibi-scheme | procedural.scm |
(define (make-rtd name fields . o)
(let ((parent (and (pair? o) (car o))))
(register-simple-type (if (symbol? name) (symbol->string name) name)
parent
(vector->list fields))))
(define (rtd? x)
(type? x))
(define (rtd-constructor rtd . o)
(let ((fields (ve... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/srfi/99/records/procedural.scm | scheme |
(define (make-rtd name fields . o)
(let ((parent (and (pair? o) (car o))))
(register-simple-type (if (symbol? name) (symbol->string name) name)
parent
(vector->list fields))))
(define (rtd? x)
(type? x))
(define (rtd-constructor rtd . o)
(let ((fields (ve... | |
f1397c5b6250ccd17d442c3812dc2bb078a7ee98756d4866ec90fe34e173993b | colis-anr/morbig | options.ml | (**************************************************************************)
(* -*- tuareg -*- *)
(* *)
Copyright ( C ) 2017 - 2021 , ,
. ... | null | https://raw.githubusercontent.com/colis-anr/morbig/77c2ca402785979c4af351b412fe7be2d521838f/src/options.ml | ocaml | ************************************************************************
-*- tuareg -*-
This is free software: you... | Copyright ( C ) 2017 - 2021 , ,
.
under the terms of the GNU General Public License , version 3 .
type backend =
| Json
| Bin
| SimpleJson
| Dot
| NoSerialisation
let _backend = ref Json
let backend_of_string = funct... |
73196535882f1af382deb6fde84eac095869af7b933290db13415397b1afec46 | drcode/webfui | scrolling.clj | (ns webfui-examples.views.scrolling
(:require [webfui-examples.views.common :as common]
[noir.content.getting-started])
(:use [noir.core :only [defpage]]
[hiccup.core :only [html]]))
(defpage "/scrolling" []
(common/layout "scrolling"))
| null | https://raw.githubusercontent.com/drcode/webfui/e8ba6e9224542755e5780488cb43f0c5510827f9/webfui-examples/src-clj/webfui_examples/views/scrolling.clj | clojure | (ns webfui-examples.views.scrolling
(:require [webfui-examples.views.common :as common]
[noir.content.getting-started])
(:use [noir.core :only [defpage]]
[hiccup.core :only [html]]))
(defpage "/scrolling" []
(common/layout "scrolling"))
| |
c6e98b846ec728f8a8cc218221c08a2ae146cfefc7730ff6ae26be302651ed76 | thheller/shadow-cljsjs | de_ch.cljs | (ns cljsjs.moment.locale.de-ch
(:require ["moment/locale/de-ch"]))
| null | https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/de_ch.cljs | clojure | (ns cljsjs.moment.locale.de-ch
(:require ["moment/locale/de-ch"]))
| |
a442ff2056e7d05bb4f6bb07e7fc5078cb25a75a995f169c06fea00b3846e4d8 | argp/bap | batNativeint.ml |
* BatNativeInt - Extended native ints
* Copyright ( C ) 2005
* 2007 Bluestorm < bluestorm dot dylc on - the - server gmail dot com >
* 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Publ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batNativeint.ml | ocaml |
* BatNativeInt - Extended native ints
* Copyright ( C ) 2005
* 2007 Bluestorm < bluestorm dot dylc on - the - server gmail dot com >
* 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Publ... | |
f5d913d6fab412f8606d3ff206c265311799490d5e8d6cdc7d11c8f390f1b055 | k0ral/hbro | Hbro.hs | module Hbro (module X) where
import Hbro.Boot as X
import . Clipboard
import . Config
import Hbro.Core as X
import Hbro.Defaults as X
import Hbro.Error as X
import Hbro.Event as X
import Hbro.Gdk.K... | null | https://raw.githubusercontent.com/k0ral/hbro/8926b53960eb7136c4dec94eb31f2426fa34c726/library/Hbro.hs | haskell | module Hbro (module X) where
import Hbro.Boot as X
import . Clipboard
import . Config
import Hbro.Core as X
import Hbro.Defaults as X
import Hbro.Error as X
import Hbro.Event as X
import Hbro.Gdk.K... | |
20118954eeb324c76b762de726bd07cacd0c05391495d600ae0fa477b4bb6514 | cbaggers/varjo | types.lisp | (in-package :varjo.internals)
;;----------------------------------------------------------------------
(define-v-type-class v-bool (v-type)
((core :initform t :reader core-typep)
(glsl-string :initform "bool" :reader v-glsl-string)
(tertiary-score :initform 1 :initarg :tertiary-score
:reade... | null | https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/vari.types/types.lisp | lisp | ----------------------------------------------------------------------
----------------------------------------------------------------------
----------------------------------------------------------------------
----------------------------------------------------------------------
Type Stubs
{TODO} look into these... | (in-package :varjo.internals)
(define-v-type-class v-bool (v-type)
((core :initform t :reader core-typep)
(glsl-string :initform "bool" :reader v-glsl-string)
(tertiary-score :initform 1 :initarg :tertiary-score
:reader tertiary-score)))
(define-v-type-class v-number (v-type) ())
(define-... |
a623d9efb35e5aecd4620bf00328de6ee8d462b262e7b178e6f6829f05a987bd | haskell/cabal | GenericPackageDescription.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Distribution.Types.GenericPackageDescription (
GenericPackageDescription(..),
emptyGenericPackageDescription,
) where
import Prelude ()
import Distribution.Compat.Prelude
-- le... | null | https://raw.githubusercontent.com/haskell/cabal/e9b4744a846fcd808a325e288e5486e269f6a52e/Cabal-syntax/src/Distribution/Types/GenericPackageDescription.hs | haskell | # LANGUAGE DeriveDataTypeable #
lens
---------------------------------------------------------------------------
The 'GenericPackageDescription' type
^ This is a version as specified in source.
We populate this field in index reading for dummy GPDs,
have dummy GPDs.
----------------------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
module Distribution.Types.GenericPackageDescription (
GenericPackageDescription(..),
emptyGenericPackageDescription,
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Compat.Lens ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.