_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 |
|---|---|---|---|---|---|---|---|---|
2ff5c74578812cffeae0ae289669a8680cf2cc87632a6dfe5f1e574a2190c995 | fterrier/pylos | strategy.clj | (ns game.strategy)
(defprotocol Strategy
(choose-next-move [this game-position] "Returns a channel where the next move for the given game will be put, returns a {:next-move :additional-infos :next-game-position (optional)} object")
(get-input-channel [this])
(notify-end-game [this] "Called when a game is over, ... | null | https://raw.githubusercontent.com/fterrier/pylos/f9283cf58a32000ed271e768ab6151ac081ed37d/src/clj/game/strategy.clj | clojure | (ns game.strategy)
(defprotocol Strategy
(choose-next-move [this game-position] "Returns a channel where the next move for the given game will be put, returns a {:next-move :additional-infos :next-game-position (optional)} object")
(get-input-channel [this])
(notify-end-game [this] "Called when a game is over, ... | |
c5fdc91c49c196128982886b98248d4f6c41785341b992b435beec9ba77eee4d | Helium4Haskell/helium | Nonnesting-instance2.hs |
-- instances can be declared in an instance scope
instance Z Bool where
instance X Int
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClassesParse/Nonnesting-instance2.hs | haskell | instances can be declared in an instance scope |
instance Z Bool where
instance X Int
|
a4ed2bc43d2c496ea1be6f4f94be94b1fa2b08adced86b2eca486b083d465875 | mbj/stratosphere | PushTemplate.hs | module Stratosphere.Pinpoint.PushTemplate (
module Exports, PushTemplate(..), mkPushTemplate
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Pinpoint.PushTemplate.APNSPushNotificationTemplateProperty... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/pinpoint/gen/Stratosphere/Pinpoint/PushTemplate.hs | haskell | # SOURCE #
# SOURCE #
# SOURCE # | module Stratosphere.Pinpoint.PushTemplate (
module Exports, PushTemplate(..), mkPushTemplate
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.Value
data PushTemplate
= PushTe... |
eb0ee9fbefc79861fe357f1ef632cb714d7eda826d92740107ce8934ef22b650 | lisp-mirror/cl-tar | pax.lisp | (in-package #:tar-create-test)
(para:define-test create-pax
(with-temp-dir ()
(nix:mkdir (merge-pathnames "test/") (logior nix:s-irwxu
#-windows nix:s-irgrp #-windows nix:s-ixgrp
#-windows nix:s-iroth #-windows nix:... | null | https://raw.githubusercontent.com/lisp-mirror/cl-tar/7c6e07a10c93d9e311f087b5f6328cddd481669a/test/create/pax.lisp | lisp | (in-package #:tar-create-test)
(para:define-test create-pax
(with-temp-dir ()
(nix:mkdir (merge-pathnames "test/") (logior nix:s-irwxu
#-windows nix:s-irgrp #-windows nix:s-ixgrp
#-windows nix:s-iroth #-windows nix:... | |
8091a0ef00507d5b9478b0c3c4136505f07b1b14c74c0b0321b0a65b8c56794f | ghcjs/ghcjs-base | Blob.hs | module JavaScript.Web.Blob ( Blob
, size
, contentType
, slice
, isClosed
, close
) where
import JavaScript.Web.Blob.Internal
| null | https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/JavaScript/Web/Blob.hs | haskell | module JavaScript.Web.Blob ( Blob
, size
, contentType
, slice
, isClosed
, close
) where
import JavaScript.Web.Blob.Internal
| |
450da859ba22275cbf055326182dfb24f2072492fcf2700f50a5419989de0d6b | clash-lang/clash-compiler | Floating.hs | |
Copyright : ( C ) 2021 , QBayLogic B.V. ,
2022 , Google Inc. ,
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Support for the [ Xilinx Floating - Point LogiCORE IP v7.1]( / support / documentation / ip_documentation / floating_point / v7_1... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/ca0449ba58bed122bd511cb75959de2b0cea29a3/clash-cores/src/Clash/Cores/Xilinx/Floating.hs | haskell | * Instantiating IP
* Customizing IP
| Customizable floating point addition.
| Floating point addition with default settings.
| Customizable floating point subtraction.
| Floating point subtraction with default settings.
| Customizable floating point multiplication.
| Floating point multiplication with default s... | |
Copyright : ( C ) 2021 , QBayLogic B.V. ,
2022 , Google Inc. ,
License : BSD2 ( see the file LICENSE )
Maintainer : QBayLogic B.V. < >
Support for the [ Xilinx Floating - Point LogiCORE IP v7.1]( / support / documentation / ip_documentation / floating_point / v7_1... |
a987a20302d0ad394087168b176b4196f79d8cf6cdb4574c2dd94c57c0da35c9 | kmerz/noodle | Edit.hs | {-# LANGUAGE OverloadedStrings #-}
module Noodle.Views.Edit where
import Text.Blaze.Html5 as H
import Text.Blaze.Html5.Attributes as A
import Text.Blaze.Html.Renderer.Text
render (pollId, pollName, pollDesc) options errors =
H.html $ do
H.head $ do
H.title "Noodle - The doodle"
H.link ! A.rel "styl... | null | https://raw.githubusercontent.com/kmerz/noodle/b632b3611f65545101d15798250e0ecbc479b147/src/Noodle/Views/Edit.hs | haskell | # LANGUAGE OverloadedStrings # |
module Noodle.Views.Edit where
import Text.Blaze.Html5 as H
import Text.Blaze.Html5.Attributes as A
import Text.Blaze.Html.Renderer.Text
render (pollId, pollName, pollDesc) options errors =
H.html $ do
H.head $ do
H.title "Noodle - The doodle"
H.link ! A.rel "stylesheet" ! A.type_ "text/css" ! A.hr... |
83d15c8ec713829143b2eb6527685fd0751afcea1f49f25ec016987146b090ec | aroemers/sibiro | core_test.cljc | (ns sibiro.core-test
(:require [sibiro.core :refer (compile-routes match-uri uri-for)]
#?@(:clj [[clojure.test :refer (deftest testing is)]]
:cljs [[cljs.test :refer-macros (deftest testing is)]
[doo.runner :refer-macros [doo-tests]]])))
(def routes (compile-routes... | null | https://raw.githubusercontent.com/aroemers/sibiro/fd4728d1e496af2fbb60e37524f67faf17abb26e/test/sibiro/core_test.cljc | clojure | (ns sibiro.core-test
(:require [sibiro.core :refer (compile-routes match-uri uri-for)]
#?@(:clj [[clojure.test :refer (deftest testing is)]]
:cljs [[cljs.test :refer-macros (deftest testing is)]
[doo.runner :refer-macros [doo-tests]]])))
(def routes (compile-routes... | |
f7fb2d89f94ee8efad7c1f5d15e666d706699fafb6d138d693e1ab9dc2febfee | aigarashi/copl-tools | macroVars.ml | let v = []
| null | https://raw.githubusercontent.com/aigarashi/copl-tools/3c4da117083a0870334c8eef270206b11060514e/checker/While/macroVars.ml | ocaml | let v = []
| |
232c4a6bb86e6037536f6b1b6ab7a86968648a400457d85c2a03ff3b265f84ec | josephwilk/musical-creativity | t_sonify_data.clj | (ns musical-creativity.integration.t-sonify-data
(:require
[midje.sweet :refer :all]
[musical-creativity.composers.sonify-data :as sonify]))
(facts "it should generate events"
(let [events (sonify/compose)
all-keys (reduce concat [] (map keys events))]
(distinct all-keys) => '(:time :log :pitc... | null | https://raw.githubusercontent.com/josephwilk/musical-creativity/c2e6aab2a26d69ee2e51f4fad84fa3a71805e6ca/test/musical_creativity/integration/t_sonify_data.clj | clojure | (ns musical-creativity.integration.t-sonify-data
(:require
[midje.sweet :refer :all]
[musical-creativity.composers.sonify-data :as sonify]))
(facts "it should generate events"
(let [events (sonify/compose)
all-keys (reduce concat [] (map keys events))]
(distinct all-keys) => '(:time :log :pitc... | |
f0e92c82ce8697e3b04f15068f16cb985bf1aa7bf9db1efa5441b5463fc76199 | cmsc430/www | ast.rkt | #lang racket
(provide (all-defined-out))
type Prog = ( Prog ( ) Expr )
(struct Prog (ds e) #:prefab)
type = ( Defn I d ( I d ) Expr )
(struct Defn (f xs e) #:prefab)
type = ( Eof )
;; | (Empty)
;; | (Int Integer)
| ( )
| ( )
| ( )
|... | null | https://raw.githubusercontent.com/cmsc430/www/b75b81f1b388d9b124b323d6fdc5bed833fb9daa/langs/knock/ast.rkt | racket | | (Empty)
| (Int Integer)
| (Var Id)
type Id = Symbol
type Op0 = 'read-byte
| 'write-byte | 'eof-object?
| 'box | 'car | 'cdr | 'unbox
| 'empty? | 'cons? | 'box?
| 'vector? | vector-length
| 'string? | string-length
type Op2 ... | #lang racket
(provide (all-defined-out))
type Prog = ( Prog ( ) Expr )
(struct Prog (ds e) #:prefab)
type = ( Defn I d ( I d ) Expr )
(struct Defn (f xs e) #:prefab)
type = ( Eof )
| ( )
| ( )
| ( )
| ( )
| ( Prim1 )
| ( Pri... |
48fcd7e60fda40835ed043954514eaefa01ae2b78dbaf4a452ffa58717d15d2f | blindglobe/clocc | defsystem-protocol.lisp | ;;; -*- Mode: Lisp -*-
DEFSYSTEM 4.0
;;; defsystem-protocol.lisp --
(in-package "MK4")
;;;---------------------------------------------------------------------------
;;; Global variables (many of which will disappear).
(defvar *default-sysdef-file-extension* "system")
(defvar *oos-test* t)
(defvar *oos-verbos... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/defsystem-4/src/defsystem-protocol.lisp | lisp | -*- Mode: Lisp -*-
defsystem-protocol.lisp --
---------------------------------------------------------------------------
Global variables (many of which will disappear).
---------------------------------------------------------------------------
PRINT-OBJECT etc. etc.
----------------------------------------------... |
DEFSYSTEM 4.0
(in-package "MK4")
(defvar *default-sysdef-file-extension* "system")
(defvar *oos-test* t)
(defvar *oos-verbose* nil)
(defvar *load-source-instead-of-binary* nil)
(defvar *load-source-if-no-binary* nil)
(defvar *bother-user-if-no-binary* t)
(defvar *compile-during-load* :query)
(defvar *com... |
5730a555380607a2a2cf3422dd0e16368e52613da05594b297a05902f3dceb6c | issuu/ocaml-protoc-plugin | oneof2_test.ml | open Oneof2
let%expect_test _ =
let module T = Oneof.Test in
let t = T.{ y = 5; x = `I 7} in
Test_lib.test_encode ~dump:true (module T) t;
[%expect {|
Buffer: '08-05-50-07'
y: 5
i: 7 |}]
let%expect_test _ =
let module T = Oneof.Test2 in
let t = `F3 "test" in
Test_lib.test_encode (module T) t;... | null | https://raw.githubusercontent.com/issuu/ocaml-protoc-plugin/3d8b3eeb48e2a58dc80fbfdf9d749e69676625ab/test/oneof2_test.ml | ocaml | open Oneof2
let%expect_test _ =
let module T = Oneof.Test in
let t = T.{ y = 5; x = `I 7} in
Test_lib.test_encode ~dump:true (module T) t;
[%expect {|
Buffer: '08-05-50-07'
y: 5
i: 7 |}]
let%expect_test _ =
let module T = Oneof.Test2 in
let t = `F3 "test" in
Test_lib.test_encode (module T) t;... | |
18c8659535544efe49dab4909684b14f039173d226fdb260eba44ab85cda6077 | qkrgud55/ocamlmulti | frx_lbutton.mli | (***********************************************************************)
(* *)
MLTk , Tcl / Tk interface of OCaml
(* *)
, , and ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/otherlibs/labltk/frx/frx_lbutton.mli | ocaml | *********************************************************************
described in file LICENSE found in the... | MLTk , Tcl / Tk interface of OCaml
, , and
projet Cristal , INRIA Rocquencourt
, Kyoto University RIMS
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique and... |
33c84643335bd97ff7fceffc79b6e8780a8acd1e50b991a7dd385694517ab7da | Mattiemus/LaneWars | Base.hs | {-# LANGUAGE Arrows #-}
module Game.Server.Objects.Base where
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Safe
import IdentityList
import Network.Socket
import Data.Maybe
import Numeric.IEEE
import Game.Shared.Types
import Game.Shared.Networking
import Game.Shared.Arrows
import Game.... | null | https://raw.githubusercontent.com/Mattiemus/LaneWars/4c4a0a11f49cbd9ff722aedf3e0f352e49b140fe/Game/Server/Objects/Base.hs | haskell | # LANGUAGE Arrows #
|Game object representing a player base
^Position of the base
^Game team of the base
Components
Spawn minions
Object representation
Return object state |
module Game.Server.Objects.Base where
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Safe
import IdentityList
import Network.Socket
import Data.Maybe
import Numeric.IEEE
import Game.Shared.Types
import Game.Shared.Networking
import Game.Shared.Arrows
import Game.Shared.Object
import Gam... |
1b9457b9d78c9bdf3bd3eab0750cd3eb996bbacc9561e75a7d7c7d4bd331d882 | l29ah/hatexmpp3 | Avatar.hs | -- |
Stability : Ultra - Violence
-- Portability : I'm too young to die
-- XEP-0084: User Avatar
{-# LANGUAGE OverloadedStrings #-}
module Network.Xmpp.Extras.Avatar
( MUCHistoryReq(..)
, joinMUC
, sendMUC
) where
import Data.Default
import Data.Maybe
import Data.Text as T
import Data.Time
import Data.XM... | null | https://raw.githubusercontent.com/l29ah/hatexmpp3/9d3e25c6acf4c0978a2c1d88b3572ad20b1c228d/Network/Xmpp/Extras/Avatar.hs | haskell | |
Portability : I'm too young to die
XEP-0084: User Avatar
# LANGUAGE OverloadedStrings #
data MUCJID = MUCJID
{ mjService :: Text
} deriving Show
| Stability : Ultra - Violence
module Network.Xmpp.Extras.Avatar
( MUCHistoryReq(..)
, joinMUC
, sendMUC
) where
import Data.Default
import Data.Maybe
import Data.Text as T
import Data.Time
import Data.XML.Types
import Network.Xmpp.Extras.DateTime
import Network.Xmpp.Internal hiding (priority, status)
, ... |
3aae7b54837fa3236596ca127db4aa450d75464b7385a3a7100d8c1d5b86cb24 | mzp/bs-lwt | lwt_log_rules.mli | Lightweight thread library for OCaml
*
* Interface Lwt_log_rules
* 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 exc... | null | https://raw.githubusercontent.com/mzp/bs-lwt/f37a3c47d038f4efcd65912c41fab95d1e6633ce/lwt/src/logger/lwt_log_rules.mli | ocaml | * Logging rules parsing
* [parse lexbuf] returns the list of rules contained in
[lexbuf] or None in case of parsing error | Lightweight thread library for OCaml
*
* Interface Lwt_log_rules
* 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 exc... |
8ab404794b3e0da447a6acbed5e62576ed139b21569c04e9f153edb4d3e638fd | nubank/vessel | compilation_error.clj | (ns my-app.compilation-error
(:gen-class))
;; Intentionally has a compilation error
(boom!)
| null | https://raw.githubusercontent.com/nubank/vessel/40036928d20cfd07b31b99bb2389d5421c49d26d/test/resources/my-app/src/my_app/compilation_error.clj | clojure | Intentionally has a compilation error | (ns my-app.compilation-error
(:gen-class))
(boom!)
|
4547cebfc727992fb8643aefff9c702c563d9fa0006c9f8ea4bd6b205dba9284 | ocaml-ppx/ppx | path_intf.ml | module type S = sig
type t
val hash : t -> int
val to_string : t -> string
val of_string : string -> t
val parse_string_exn : loc:Loc0.t -> string -> t
val pp : Format.formatter -> t -> unit
(** a directory is smaller than its descendants *)
include Comparable.S with type t := t
include Comparabl... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/stdppx/path_intf.ml | ocaml | * a directory is smaller than its descendants
* [set_extension path ~ext] replaces extension of [path] by [ext] | module type S = sig
type t
val hash : t -> int
val to_string : t -> string
val of_string : string -> t
val parse_string_exn : loc:Loc0.t -> string -> t
val pp : Format.formatter -> t -> unit
include Comparable.S with type t := t
include Comparable.OPS with type t := t
val to_dyn : t -> Dyn.t
v... |
9c5d2c3793e27fa65e760d7b73361b6362029ecbf3962b84d5989fef698e8177 | zwizwa/erl_tools | player.erl | -module(player).
-export([start_link/1, handle/2, stream_handle/2,
ensure_index/2, ensure_index/1,
take/2,
convert/3,
bisect/2,
stamp/2, stamp_st/2,
%% local_time_to_timestamp/1,
bisect_local_time/2,
%% RPC calls
spans/1, tree/1, lookup/2]... | null | https://raw.githubusercontent.com/zwizwa/erl_tools/07645992e968c1456c9d0212f380afd1ffce4c1f/src/player.erl | erlang | local_time_to_timestamp/1,
RPC calls
Player for recorder.erl structures.
- Each chunk is accompanied by a flat file with packet offsets
stored as 32/little. The recorder can produce these, but if
necessary we can re-generate.
- Chunk spans are stored in a binary search tree in memory,
reconstructed at... | -module(player).
-export([start_link/1, handle/2, stream_handle/2,
ensure_index/2, ensure_index/1,
take/2,
convert/3,
bisect/2,
stamp/2, stamp_st/2,
bisect_local_time/2,
spans/1, tree/1, lookup/2]).
Two levels of indexing are used :
start_link(Init = #... |
5bc65db2bbbb8826a0d89e5b732feaa329cdd7d563063adc77f042621bc9d7a3 | dgrnbrg/spyscope | repl.cljc | (ns spyscope.repl
"This contains the query functions suitable for inspecting traces
from the repl."
(:require [clojure.string :as str])
(:use [spyscope.core :only [trace-storage]]))
(defn trace-query
"Prints information about trace results.
With no arguments, this prints every trace from the current ge... | null | https://raw.githubusercontent.com/dgrnbrg/spyscope/3d9adbbc1dee703f679d0af87ce10c163f258488/src/spyscope/repl.cljc | clojure | (ns spyscope.repl
"This contains the query functions suitable for inspecting traces
from the repl."
(:require [clojure.string :as str])
(:use [spyscope.core :only [trace-storage]]))
(defn trace-query
"Prints information about trace results.
With no arguments, this prints every trace from the current ge... | |
ea56107085d3d5fd7e6fab7490b39150618d99b6cd342f42886281a449240bed | janestreet/command_rpc | test_state_conv.ml | open! Core
open! Async
open! Import
module Versions = struct
type t =
{ client : int
; server_min : int
; server_max : int
}
end
let test new_fds_for_rpc (versions : Versions.t) =
let n = 3 in
let get_all_responses conn =
let rpc =
Command_rpc_test_protocol.Heartbeat_state_rpc.client ~... | null | https://raw.githubusercontent.com/janestreet/command_rpc/78d8469a74068de6bf3a57767d2e03c323c6922d/test/src/test_state_conv.ml | ocaml | open! Core
open! Async
open! Import
module Versions = struct
type t =
{ client : int
; server_min : int
; server_max : int
}
end
let test new_fds_for_rpc (versions : Versions.t) =
let n = 3 in
let get_all_responses conn =
let rpc =
Command_rpc_test_protocol.Heartbeat_state_rpc.client ~... | |
18b15ca418680e77fcdc3e319a6625b6ae70a5c7441793ce92067e6d9481447f | codinuum/cca | unparsing_base.ml |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... | null | https://raw.githubusercontent.com/codinuum/cca/c22bbe5b4d8824695a5844b23309a8652d371e70/src/ast/analyzing/langs/common/unparsing_base.ml | ocaml | of class Unparsing_base.ppbox |
Copyright 2012 - 2020 Codinuum Software Lab < >
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 wri... |
3029340de5ec0c3ef0a31fc2a368ac5c4dcf18e1cedefdb69582e52ce10e8954 | Holmusk/servant-docs-simple | Parse.hs | -- | Unit tests for generating documentation of api
module Test.Servant.Docs.Simple.Parse (parseSpec) where
import Servant.API (EmptyAPI)
import Servant.API.ContentTypes (JSON, PlainText)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Servant.Docs.Simple.Samples (ApiComplete, ApiMultiple, apiCompleteP... | null | https://raw.githubusercontent.com/Holmusk/servant-docs-simple/6f6d4e35cbce4d0dc0254a4799322ba5904f0b4b/test/Test/Servant/Docs/Simple/Parse.hs | haskell | | Unit tests for generating documentation of api |
module Test.Servant.Docs.Simple.Parse (parseSpec) where
import Servant.API (EmptyAPI)
import Servant.API.ContentTypes (JSON, PlainText)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Servant.Docs.Simple.Samples (ApiComplete, ApiMultiple, apiCompleteParsed,
apiM... |
7f7a07cc3e5b6943c906a5b33d064281c789f9e2d94599516f592a7505fdaf3c | nuprl/gradual-typing-performance | language-info.rkt | #lang scheme/base
(provide get-info)
(define ((get-info options) key default)
(case key
[(configure-runtime) `(#(htdp/bsl/runtime configure ,options))]
[else default]))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/htdp/bsl/language-info.rkt | racket | #lang scheme/base
(provide get-info)
(define ((get-info options) key default)
(case key
[(configure-runtime) `(#(htdp/bsl/runtime configure ,options))]
[else default]))
| |
9c052597f5805aebf4e1ae3737e2054c1459b3f3cc2f38f7ff3d75f18dba3525 | reflectionalist/S9fES | package.scm | Scheme 9 from Empty Space , Function Library
By , 2010
; Placed in the Public Domain
;
; (package <name> <option> ... <body>) ==> unspecific
;
; PACKAGE packages the definitions in its <body> in such a
; way that they are not visible outside of its body, i.e.
; the scope of each definition is the <body> of the... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/package.scm | scheme | Placed in the Public Domain
(package <name> <option> ... <body>) ==> unspecific
PACKAGE packages the definitions in its <body> in such a
way that they are not visible outside of its body, i.e.
the scope of each definition is the <body> of the package.
There may be any number of <option>s preceding the defini... | Scheme 9 from Empty Space , Function Library
By , 2010
There must be at least one definition in < body > .
beginning with a # \ : in their first positions . The following
package . When the name X of a definition occurs in : , a
(: export foo2 foo3 )
( if ( zero ? n )
... |
4757d2f1df2e6fdb4ef470818ef255226fc9fda7adea27165aec98e738cd8f9e | gregcman/lem-opengl | example.lisp | (defpackage #:lem-sucle
(:use :cl))
(in-package :lem-sucle)
(setf lem-sucle::*run-sucle* t)
(lem-paredit-mode:paredit-mode)
(dotimes (x 100)
(print x))
(defparameter *an-overlay*
(our-make-overlay
(lem:current-point)
(lem:save-excursion
(lem:forward-char 100)
(lem:copy-point (lem:current-point... | null | https://raw.githubusercontent.com/gregcman/lem-opengl/006316d611b5eca0546e1bb2fd94ee7b11a3c365/other/example.lisp | lisp | data is stored in the overlay plist? | (defpackage #:lem-sucle
(:use :cl))
(in-package :lem-sucle)
(setf lem-sucle::*run-sucle* t)
(lem-paredit-mode:paredit-mode)
(dotimes (x 100)
(print x))
(defparameter *an-overlay*
(our-make-overlay
(lem:current-point)
(lem:save-excursion
(lem:forward-char 100)
(lem:copy-point (lem:current-point... |
78965df181b67f5de5abc170323c6969bd4987812519af8856fb2f9c060b1f0f | rtoal/ple | monads.hs | data City = City { cityName :: String
, population :: Maybe Integer
} deriving (Eq, Show)
data Address = Address { postalCode :: String
, city :: Maybe City
, indicator :: Maybe String
} deriving (Eq, Show)
data Perso... | null | https://raw.githubusercontent.com/rtoal/ple/b24cab4de2beca6970833a09d05af6ef96ec3921/haskell/monads.hs | haskell | data City = City { cityName :: String
, population :: Maybe Integer
} deriving (Eq, Show)
data Address = Address { postalCode :: String
, city :: Maybe City
, indicator :: Maybe String
} deriving (Eq, Show)
data Perso... | |
4a054e0889599a4da28cc79d5b6d095e29562890da63a4a2a807266b9196b6e3 | esl/MongooseIM | mongoose_listener_config.erl | @doc Utilities related to listener configuration options
-module(mongoose_listener_config).
-export([ensure_ip_options/1,
verify_unique_listeners/1,
address_family/1,
listener_id/1]).
%% @doc Fill in IP-related options that can be calculated automatically.
%% Apart from these options, th... | null | https://raw.githubusercontent.com/esl/MongooseIM/6d1c24b37a47c38ccdc3331baa7a1d863985f4cd/src/mongoose_listener_config.erl | erlang | @doc Fill in IP-related options that can be calculated automatically.
Apart from these options, the input should be a complete listener configuration.
@doc Verify that all listeners have unique socket addresses
@doc Create a unique ID based on the listening socket address | @doc Utilities related to listener configuration options
-module(mongoose_listener_config).
-export([ensure_ip_options/1,
verify_unique_listeners/1,
address_family/1,
listener_id/1]).
-spec ensure_ip_options(map()) -> mongoose_listener:options().
ensure_ip_options(Opts = #{ip_address := ... |
35ffe66af8bf8468ed696ffb1ede0e53dbcaf1e900b7227eaa77a8e7b0fdc851 | benjaminselfridge/logix | Parse.hs | |
Module :
Description : Parsing .
Copyright : ( c ) , 2017
License : :
Stability : experimental
Module : Parse
Description : Parsing.
Copyright : (c) Ben Selfridge, 2017
License : BSD3
Maintainer :
Stability : experimental
-}
module Parse where
import Calculus
... | null | https://raw.githubusercontent.com/benjaminselfridge/logix/4c19c1cf036b1d4ceb4fe05e7d43c9cff32e80a1/src/Parse.hs | haskell | Are these instances valid?
------------------------------------------------------------------------------
combinators
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Terms
-----------------------------------... | |
Module :
Description : Parsing .
Copyright : ( c ) , 2017
License : :
Stability : experimental
Module : Parse
Description : Parsing.
Copyright : (c) Ben Selfridge, 2017
License : BSD3
Maintainer :
Stability : experimental
-}
module Parse where
import Calculus
... |
461c9197c7f335f66d80475c08d90513da0dfdb102b66cb4d812d53898bd208e | lichenscript/lichenscript | lichenscript_js.ml |
let codegen ~prog ~preclude ~init_calls tree =
let env = Transpile.transpile_program ~prog ~preclude ~init_calls tree in
Transpile.contents env
| null | https://raw.githubusercontent.com/lichenscript/lichenscript/b6c6e44e3cba5047bf720a881efefa90101e8d60/lib/js_backend/lichenscript_js.ml | ocaml |
let codegen ~prog ~preclude ~init_calls tree =
let env = Transpile.transpile_program ~prog ~preclude ~init_calls tree in
Transpile.contents env
| |
11562e70864c3f367215fd453c5fe5e60cdc3b9fbe812fbd6c94389a754176b9 | Octachron/rational_in_types | integer.ml | module N = Natural
module L = Logic_gates
open L
type +'a t = 'a N.t
constraint
'a = < b0:'b0; b1:'b1; b2:'b2; s:'s; overflow:'o >
type tautology = True
let assert_no_overflow : <overflow: 'any z; .. > t -> 'a t = fun n -> n
let z : < b0:'b0 z; b1:'b1 z; b2:'b2 z; s:'s z; overflow:'o z > t = N.create 0
let on... | null | https://raw.githubusercontent.com/Octachron/rational_in_types/c4351c805cbeff2c2843f8ea1e7899bfc3859be5/src/integer.ml | ocaml | module N = Natural
module L = Logic_gates
open L
type +'a t = 'a N.t
constraint
'a = < b0:'b0; b1:'b1; b2:'b2; s:'s; overflow:'o >
type tautology = True
let assert_no_overflow : <overflow: 'any z; .. > t -> 'a t = fun n -> n
let z : < b0:'b0 z; b1:'b1 z; b2:'b2 z; s:'s z; overflow:'o z > t = N.create 0
let on... | |
4127bcc5f6391a617c53c092cfbd13826195318234054c18cd5405d19fec6a53 | tlaplus/tlapm | optable.ml |
* optable.ml --- operator table
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* optable.ml --- operator table
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
open Builtin
type fixity =
| Nonfix
| Prefix | Postfix
| Infix of assoc
and assoc =
| Left ... | null | https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/optable.ml | ocaml | primitive operators
user-definable operators
* Mapping from builtins to standard tlaops |
* optable.ml --- operator table
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* optable.ml --- operator table
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
open Builtin
type fixity =
| Nonfix
| Prefix | Postfix
| Infix of assoc
and assoc =
| Left ... |
8ac27d30780e4c5ebda0bb8f497940eb6c09ed2445bb7bc87897c2f5ca2ad5c5 | disco-lang/disco | Typecheck.hs | {-# LANGUAGE MultiWayIf #-}
# LANGUAGE NondecreasingIndentation #
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
Module : Disco .
-- Copyright : disco team and contributors
-- Maintainer :
--
SPDX - License -... | null | https://raw.githubusercontent.com/disco-lang/disco/a855e854850a00e5cae06a1aa3076e53531d261b/src/Disco/Typecheck.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Copyright : disco team and contributors
Maintainer :
---------------------------------------------------------------------------
-------------------------... | # LANGUAGE NondecreasingIndentation #
Module : Disco .
SPDX - License - Identifier : BSD-3 - Clause
the Disco surface language and transform it into a
type - annotated AST .
module Disco.Typecheck where
import Control.Arrow ((&&&))
import Control.Lens ... |
cbaf82a5dc50e4eb68d029b24b6bb20a09e1083eb80233087fa19763fe3002e1 | music-suite/music-suite | Types.hs | -- | Common (Western classical) pitches, intervals and related types.
module Music.Pitch.Common.Types
( -- * Even octaves and steps
Octaves,
DiatonicSteps,
ChromaticSteps,
Semitones,
-- * Intervals
Number,
Quality (..),
QualityType (..),
IntervalBasis (..),
Interval,
-- *... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Pitch/Common/Types.hs | haskell | | Common (Western classical) pitches, intervals and related types.
* Even octaves and steps
* Intervals
* Pitch | module Music.Pitch.Common.Types
Octaves,
DiatonicSteps,
ChromaticSteps,
Semitones,
Number,
Quality (..),
QualityType (..),
IntervalBasis (..),
Interval,
Name (..),
Accidental,
Pitch,
)
where
import Music.Pitch.Common.Internal
|
3fb713e5584ff35f4cda497e56cb720e33e6d03e33000964d159a491dc0a101f | NorfairKing/smos | Contents.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
module Smos.Cursor.Contents
( ContentsCursor (..),
makeContentsCursor,
makeContentsCursorWithSelection,
rebuildContentsCursor,
emptyContentsCursor,
nullContentsCursor,
contentsCursorSelection,
contentsCursorSelectPrevLine,
conten... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos-cursor/src/Smos/Cursor/Contents.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE RecordWildCards #
module Smos.Cursor.Contents
( ContentsCursor (..),
makeContentsCursor,
makeContentsCursorWithSelection,
rebuildContentsCursor,
emptyContentsCursor,
nullContentsCursor,
contentsCursorSelection,
contentsCursorSelectPrevLine,
conten... | |
c49aadc5121b04bae1732698ec4c255d224aa454e44edc6e8d646d98445d7260 | odis-labs/helix | Conditional.ml | open Helix
let test_simple () =
let open Html in
div []
[ div [ View.conditional ~on:(Signal.make true) ] [ text "present" ]
; footer [ View.conditional ~on:(Signal.make false) ] [ text "missing" ]
]
let test_toggle_simple () =
let is_present = Signal.make true in
let open Html in
div []
[ b... | null | https://raw.githubusercontent.com/odis-labs/helix/adcdc2581b788fe6e4a28ae0e4b82a4adada94f3/tests/Conditional.ml | ocaml | open Helix
let test_simple () =
let open Html in
div []
[ div [ View.conditional ~on:(Signal.make true) ] [ text "present" ]
; footer [ View.conditional ~on:(Signal.make false) ] [ text "missing" ]
]
let test_toggle_simple () =
let is_present = Signal.make true in
let open Html in
div []
[ b... | |
ad03186bec3639408a0f513c5b8f2bf894d700cc1fda91ca1a4e7ec2de57be87 | grasswire/chat-app | MessageLike.hs | # LANGUAGE TypeFamilies , OverloadedStrings , TypeSynonymInstances , FlexibleContexts #
module Handler.MessageLike where
import Import
import qualified Server as S
import qualified Types as TP
import Model.Instances ()
import Taplike.Schema
import Control.Concurrent (forkIO)
import Database.Persis... | null | https://raw.githubusercontent.com/grasswire/chat-app/a8ae4e782cacd902d7ec9c68c40a939cc5cabb0a/backend/Handler/MessageLike.hs | haskell | # LANGUAGE TypeFamilies , OverloadedStrings , TypeSynonymInstances , FlexibleContexts #
module Handler.MessageLike where
import Import
import qualified Server as S
import qualified Types as TP
import Model.Instances ()
import Taplike.Schema
import Control.Concurrent (forkIO)
import Database.Persis... | |
6d8daff1806ba7a91a35e2aac546f7227761f94d5a1973c12d9fcef1b913c231 | debasishg/hask | Lib.hs | {-# LANGUAGE OverloadedStrings #-}
module Lib ( main ) where
import Data.Text (pack)
import Data.Time (UTCTime, addUTCTime, getCurrentTime)
import Lib.App (AppEnv, Env (..))
import Lib.Config (Config (..), loadConfig)
import Lib.Core.Account (Account, mkAccount)
impor... | null | https://raw.githubusercontent.com/debasishg/hask/1745ed50c8175cd035e8070c9cb988f4f5063653/h3layer/src/Lib.hs | haskell | # LANGUAGE OverloadedStrings #
txns <- getTransactionsByEmail email
return $ accountNo <$> txns
mkApp = ((accountNo <$>) `fmap`) . getTransactionsByEmail
main =
mkAppEnv >>=
flip runAppLogIO (mkApp $ Email "") >>=
print
|
module Lib ( main ) where
import Data.Text (pack)
import Data.Time (UTCTime, addUTCTime, getCurrentTime)
import Lib.App (AppEnv, Env (..))
import Lib.Config (Config (..), loadConfig)
import Lib.Core.Account (Account, mkAccount)
import Lib.Core.Email (Email (... |
36c1f58575245714762212d226860e9c72818d902e05fccfbfb5b85e2f110aad | haskell-opengl/OpenGLRaw | VertexStreams.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ATI.VertexStreams
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ATI/VertexStreams.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ATI.VertexStreams
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ATI.VertexStreams (
glGetATIVertexStreams,
gl_ATI_vertex_streams,
pattern GL_MAX_VERTEX_STREAMS_ATI,
pattern GL_VERTEX_SOURCE_ATI,
pattern GL_VERTEX_STREAM0_ATI,
pattern GL_VERTEX_STREAM1_ATI,
patter... |
8431bd08b887f3146bb862043f5112f79d8d4e13da9d79fe77bd968877afc400 | bos/rwh | numsimple.hs | {-- snippet all --}
-- The "operators" that we're going to support
data Op = Plus | Minus | Mul | Div | Pow
deriving (Eq, Show)
{- The core symbolic manipulation type -}
data SymbolicManip a =
Simple number , such as 5
| Arith Op (SymbolicManip a) (SymbolicManip a)
deriving (Eq, Show)
S... | null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch13/numsimple.hs | haskell | - snippet all -
The "operators" that we're going to support
The core symbolic manipulation type
- /snippet all - | data Op = Plus | Minus | Mul | Div | Pow
deriving (Eq, Show)
data SymbolicManip a =
Simple number , such as 5
| Arith Op (SymbolicManip a) (SymbolicManip a)
deriving (Eq, Show)
SymbolicManip will be an instance of . Define how the
operations are handled over a SymbolicManip . Th... |
5606523d57f22027e6859858483e338048467aaee51de88676c372e3ee8adf90 | project-oak/hafnium-verification | IContainer.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/istd/IContainer.ml | ocaml | Extension of Base.Container, i.e. generic definitions of container operations in terms of fold. |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
37f9a8649d848792c469dc9facc58eceaeed0080f75803d5856149a7c231d302 | samirose/sicp-compiler-project | pattern-match.scm | (define-library (pattern-match)
(export pattern-match? ?? ??*)
(import (scheme base))
(begin
(define (pattern-match? pat exp)
(cond
((null? pat) (null? exp))
((pair? pat)
(let ((pat-head (car pat)))
(cond
((memq pat-head list-matchers)
(and (or (pair? e... | null | https://raw.githubusercontent.com/samirose/sicp-compiler-project/2bc8a481044b5a653408f8595b2a2396600b8ad6/pattern-match.scm | scheme | (define-library (pattern-match)
(export pattern-match? ?? ??*)
(import (scheme base))
(begin
(define (pattern-match? pat exp)
(cond
((null? pat) (null? exp))
((pair? pat)
(let ((pat-head (car pat)))
(cond
((memq pat-head list-matchers)
(and (or (pair? e... | |
e1a4bd9c3b8df0224a33898766e3d65e0823c070bfea81fdc168352af931221e | anton-k/sharc-timbre | TromboneMuted.hs | module Sharc.Instruments.TromboneMuted (tromboneMuted) where
import Sharc.Types
tromboneMuted :: Instr
tromboneMuted = Instr
"trombone_muted"
"Trombone (muted)"
(Legend "McGill" "2" "23")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 82.4 28 "e2"))
(Pitch 82.4 28 "e2")
... | null | https://raw.githubusercontent.com/anton-k/sharc-timbre/14be260021c02f31905b3e63269f582030a45c8d/src/Sharc/Instruments/TromboneMuted.hs | haskell | module Sharc.Instruments.TromboneMuted (tromboneMuted) where
import Sharc.Types
tromboneMuted :: Instr
tromboneMuted = Instr
"trombone_muted"
"Trombone (muted)"
(Legend "McGill" "2" "23")
(Range
(InstrRange
(HarmonicFreq 1 (Pitch 82.4 28 "e2"))
(Pitch 82.4 28 "e2")
... | |
18db1698eca696025449c7055ac05e545685a522b9751ddabbb503d1ac486401 | clojure-interop/google-cloud-clients | VideoIntelligenceServiceClient.clj | (ns com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceClient
"Service Description: Service that implements Google Cloud Video Intelligence API.
This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get started:
... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.videointelligence/src/com/google/cloud/videointelligence/v1p3beta1/VideoIntelligenceServiceClient.clj | clojure |
"
| (ns com.google.cloud.videointelligence.v1p3beta1.VideoIntelligenceServiceClient
"Service Description: Service that implements Google Cloud Video Intelligence API.
This class provides the ability to make remote calls to the backing service through method
calls that map to API methods. Sample code to get started:
... |
37f9f01fcc2dcf0197fc1bb19c928eb3b537e38513ccd315673aeb98de864248 | PrincetonUniversity/lucid | InputChecks.ml | (* check that all event parameters are byte-aligned *)
open CoreSyntax
let fail_report str =
Console.show_message str ANSITerminal.Red "Tofino Checker"
;;
let report_err span msg : unit =
Console.show_message_position span msg ANSITerminal.Red "Tofino Checker"
;;
let params_wid params =
List.fold_left (fu... | null | https://raw.githubusercontent.com/PrincetonUniversity/lucid/8ca93fd803caaa80cf2e301154791564dd3fed7e/src/lib/backend/analysis/InputChecks.ml | ocaml | check that all event parameters are byte-aligned
** old code to align parameters automatically. This is not a good idea currently,
because events represent packet headers in their wire format. We don't want
to pad between tcp flag fields, for example. So if we want to do something
automatic, it has ... |
open CoreSyntax
let fail_report str =
Console.show_message str ANSITerminal.Red "Tofino Checker"
;;
let report_err span msg : unit =
Console.show_message_position span msg ANSITerminal.Red "Tofino Checker"
;;
let params_wid params =
List.fold_left (fun tot_wid (_, pty) ->
match pty.raw_ty with
... |
a3e04d96f402e963a8e335e5be35a53d5db51a664b9cc46659875fa64bc8ec6f | korya/efuns | bar.ml | (***********************************************************************)
(* *)
xlib for
(* *)
Fabrice Le Fessant , projet Para / SOR , INRIA Rocq... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/gwml/bar.ml | ocaml | *********************************************************************
... | xlib for
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Xtypes
open Gwml
open Wob
let broadcast wobs e =
... |
d7d992efbadb710f4d5df7570afd9bb6acd93048c988d6dfbcd4c38aceea4291 | clojure/core.typed | cast.clj | (ns clojure.core.typed.test.cast
(:refer-clojure :exclude [update cast])
(:require
[clojure.core.typed.test.test-utils :refer :all]
[clojure.test :refer :all]
[clojure.core.typed :as tc :refer [Int cast]]
))
(deftest typed-cast-test
(is-tc-e (cast Int 1) Int)
(is-tc-err #(cast Int (inc 'a)))
... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/cast.clj | clojure | runtime errors | (ns clojure.core.typed.test.cast
(:refer-clojure :exclude [update cast])
(:require
[clojure.core.typed.test.test-utils :refer :all]
[clojure.test :refer :all]
[clojure.core.typed :as tc :refer [Int cast]]
))
(deftest typed-cast-test
(is-tc-e (cast Int 1) Int)
(is-tc-err #(cast Int (inc 'a)))
... |
ac712b7341fa91f5630f25a3c194e9519babe1034c8e04443e46458f6891a483 | swaywm/wlroots-ocaml | types.ml | open Ctypes
module Make (S : Cstubs_structs.TYPE) = struct
open S
module Wl_list = struct
type t = [`wl_list] structure
let t : t typ = structure "wl_list"
let prev = field t "prev" (ptr t)
let next = field t "next" (ptr t)
let () = seal t
end
module Wl_signal = struct
type t = [`wl_s... | null | https://raw.githubusercontent.com/swaywm/wlroots-ocaml/a4a36121a331c14b0f2ab363a6a59065513985e5/types/types.ml | ocaml | open Ctypes
module Make (S : Cstubs_structs.TYPE) = struct
open S
module Wl_list = struct
type t = [`wl_list] structure
let t : t typ = structure "wl_list"
let prev = field t "prev" (ptr t)
let next = field t "next" (ptr t)
let () = seal t
end
module Wl_signal = struct
type t = [`wl_s... | |
d9a2afeb7d667f273b9b30f31c11b882681aa5803c4b4022d8f9a8c95ebe44f0 | chetmurthy/utjson | uttestutil.ml | open OUnit2
open OUnitTest
open Pa_ppx_testutils
Pa_ppx_base.Pp_MLast.Ploc.pp_loc_verbose := true ;;
let warning s = Fmt.(pf stderr "%s\n%!" s)
let matches ~pattern text =
match Str.search_forward (Str.regexp (Str.quote pattern)) text 0 with
_ -> true
| exception Not_found -> false
let assert_raises_exn_pat... | null | https://raw.githubusercontent.com/chetmurthy/utjson/d797d3e6a5ab353968dd9d20008d642af52e01be/uttestutil.ml | ocaml | "typeof" ? wazzat?
;"electron-builder.json"
| open OUnit2
open OUnitTest
open Pa_ppx_testutils
Pa_ppx_base.Pp_MLast.Ploc.pp_loc_verbose := true ;;
let warning s = Fmt.(pf stderr "%s\n%!" s)
let matches ~pattern text =
match Str.search_forward (Str.regexp (Str.quote pattern)) text 0 with
_ -> true
| exception Not_found -> false
let assert_raises_exn_pat... |
eb8bfd68ad6eb4396c0c85356fb9c21c9abafb30529016e419b80b7ee03ca474 | turquoise-hexagon/euler | solution.scm | (import
(euler)
(srfi 1))
(define (valid? a b)
(if (= (remainder a 10)
(quotient b 10))
(let ((q (quotient a 10))
(r (remainder b 10)))
(if (= r 0)
#f
(= (/ a b) (/ q r))))
#f))
(define (solve)
(let ((_ (filter
(lambda (pair)
(appl... | null | https://raw.githubusercontent.com/turquoise-hexagon/euler/592c5f4f45fe8e8b82102be9fe11b3b1134d98fc/src/033/solution.scm | scheme | (import
(euler)
(srfi 1))
(define (valid? a b)
(if (= (remainder a 10)
(quotient b 10))
(let ((q (quotient a 10))
(r (remainder b 10)))
(if (= r 0)
#f
(= (/ a b) (/ q r))))
#f))
(define (solve)
(let ((_ (filter
(lambda (pair)
(appl... | |
2265aebf5586d689f5eebd69e8278bd65805f42f93ed4f50419ac3a4c78c8e0c | anwarmamat/cmsc330spring19-public | interpreter.ml | open Parser
let rec eval (ast : expr) : int =
failwith "unimplemented"
| null | https://raw.githubusercontent.com/anwarmamat/cmsc330spring19-public/98af1e8efc3d8756972731eaca19e55fe8febb69/discussions/discussion9/src/interpreter.ml | ocaml | open Parser
let rec eval (ast : expr) : int =
failwith "unimplemented"
| |
0c6b1a4dcbb279723ede928fe3f2465e783495d81f8b2120be977b1279938551 | athensresearch/athens | events.cljs | (ns athens.views.left-sidebar.events
(:require
[athens.common-db :as common-db]
[athens.common-events :as common-events]
[athens.common-events.graph.atomic :as atomic-graph-ops]
[athens.common-events.graph.ops :as graph-ops]
[athens.common.logging :as log]
[athens.db :as db]
[athens.interc... | null | https://raw.githubusercontent.com/athensresearch/athens/8302846d6ca9a7591f1a931d6705a34038c9a732/src/cljs/athens/views/left_sidebar/events.cljs | clojure | Shortcuts
Tasks
todo: good place to be using a number primitive type
Widgets | (ns athens.views.left-sidebar.events
(:require
[athens.common-db :as common-db]
[athens.common-events :as common-events]
[athens.common-events.graph.atomic :as atomic-graph-ops]
[athens.common-events.graph.ops :as graph-ops]
[athens.common.logging :as log]
[athens.db :as db]
[athens.interc... |
1678092bc95583987dd3b3ff4e6aa0bb991a3244c030da7a23c5c0347e722e92 | janestreet/memtrace_viewer | string_input.mli | open! Core
open Bonsai_web
val component : string option And_view.t Bonsai.Computation.t
| null | https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/client/src/string_input.mli | ocaml | open! Core
open Bonsai_web
val component : string option And_view.t Bonsai.Computation.t
| |
03bd769e610f8e8f487b4337e98b1963c2132be10e1920f8df22bdff688c087c | ayamada/copy-of-svn.tir.jp | misc.scm | #!/usr/bin/env gosh
;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme ts=8 sts=2 sw=2 et:
$ Id$
;;; note : このモジュールは、一つのモジュールにまとめる前の、
;;; 一時的な状態の関数等を保存するモジュールとする。
(define-module tir.misc
;(use srfi-2) ; and-let*
(export
hes
html-tree-make
make-webpage-main
cgi-metavariables->ht... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-tir/branches/Gauche-tir01/tags/0.0.1/lib/tir/misc.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme ts=8 sts=2 sw=2 et:
note : このモジュールは、一つのモジュールにまとめる前の、
一時的な状態の関数等を保存するモジュールとする。
(use srfi-2) ; and-let*
----
tir.cgi?
cgi-mainの代わりに使えるwebpage-main関数を生成する高階関数。
キーワード引数としてencodingとon-errorを指定する事。
procは、通常のtext.treeの代わりに、以下のようなlistを返す事。
'(
:http-header (... | #!/usr/bin/env gosh
$ Id$
(define-module tir.misc
(export
hes
html-tree-make
make-webpage-main
cgi-metavariables->html
number->string-japanese-weekday
number->string-japanese-wday
time->japanese-date-string
))
(select-module tir.misc)
(use gauche.parameter)
(use text.html-li... |
04125b971adbcd0393abebe3a9097793f1cbcd1fd187a67b7a8432b7d9ff03d6 | AndrewMagerman/wizard-book-study | ch5-compiler.rkt | COMPILER FROM SECTION 5.5 OF
;;;; STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS
;;;;Matches code in ch5.scm
;;;;This file can be loaded into Scheme as a whole.
;;;;**NOTE**This file loads the metacircular evaluator's syntax procedures
from section 4.1.2
;;;; You may need to change the (load ...) expression to... | null | https://raw.githubusercontent.com/AndrewMagerman/wizard-book-study/e9a4591b5db4163f581a633f310a71c3c04dc760/missing_files/week_17/ch5-compiler.rkt | racket | STRUCTURE AND INTERPRETATION OF COMPUTER PROGRAMS
Matches code in ch5.scm
This file can be loaded into Scheme as a whole.
**NOTE**This file loads the metacircular evaluator's syntax procedures
You may need to change the (load ...) expression to work in your
version of Scheme.
**implementation-dependent loading of ... | COMPILER FROM SECTION 5.5 OF
from section 4.1.2
Then you can compile Scheme programs as shown in section 5.5.5
SECTION 5.5.1
(define (compile exp target linkage)
(cond ((self-evaluating? exp)
(compile-self-evaluating exp target linkage))
((quoted? exp) (compile-quoted exp target linkage))
... |
9c1b2a1f1cc982fe942d8977eac4ee06e2e66bd7f175bb63be411595543e39b6 | takikawa/drracket-vim-tool | text.rkt | #lang racket/gui
The main GUI code for the vim plugin
;;
;; How to add a new command:
;; * Add parsing logic for the command in "commands.rkt" which
;; will produce a representation of a command.
;;
;; * Add handling code in the vim-emulation-mixin that dispatches
;; on the command representation. (see ... | null | https://raw.githubusercontent.com/takikawa/drracket-vim-tool/c347e8f8dcb0d89efd44755587b108e1f420912a/private/text.rkt | racket |
How to add a new command:
* Add parsing logic for the command in "commands.rkt" which
will produce a representation of a command.
* Add handling code in the vim-emulation-mixin that dispatches
on the command representation. (see methods that start with `handle-`)
constants for coloring
==== public ... | #lang racket/gui
The main GUI code for the vim plugin
(require "commands.rkt"
"utils.rkt"
data/gvector
data/queue
framework
racket/control
racket/function)
(define on-local-char/c
(->m (is-a?/c key-event%) void?))
(define on-paint/c
(->m any/c (is-a?/c dc... |
da37a9e65737a4e4e40ec1c9c86b24e9a9bf947aa3d2d9a208afb29d3c22d187 | composewell/streamly | Expand.hs | -- |
Module : Streamly . Internal . Data . Stream . Expand
Copyright : ( c ) 2017 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer :
-- Stability : experimental
Portability : GHC
--
Expand a stream by combining two or more streams or by combining streams
-- with unfolds.
module... | null | https://raw.githubusercontent.com/composewell/streamly/8629a0e806f5eea87d23650c540aa04176f25c43/core/src/Streamly/Internal/Data/Stream/Expand.hs | haskell | |
License : BSD-3-Clause
Maintainer :
Stability : experimental
with unfolds.
* Binary Combinators (Linear)
| Functions ending in the shape:
@Stream m a -> Stream m a -> Stream m a@.
The functions in this section have a linear or flat n-ary combining
b `serial` c ...@) the resulting expression will ... | Module : Streamly . Internal . Data . Stream . Expand
Copyright : ( c ) 2017 Composewell Technologies
Portability : GHC
Expand a stream by combining two or more streams or by combining streams
module Streamly.Internal.Data.Stream.Expand
(
characterstics . It means that when combined @n@ times ( ... |
70bd815a3a72ab53a4b83df53dc2e0215493211334655520c42ce7328bfde005 | dQuadrant/cardano-marketplace | Test.hs | import qualified Test.ReferenceScriptTest as ReferenceScriptTest
import Test.Tasty
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "cardano-marketplace" [
ReferenceScriptTest.tests
] | null | https://raw.githubusercontent.com/dQuadrant/cardano-marketplace/9cfd09fdfa4f4232d18bd82f2095fc3720045a86/test/Test.hs | haskell | import qualified Test.ReferenceScriptTest as ReferenceScriptTest
import Test.Tasty
main :: IO ()
main = defaultMain tests
tests :: TestTree
tests = testGroup "cardano-marketplace" [
ReferenceScriptTest.tests
] | |
965f17a49d08c4f28efcdbd8a2903aad967a465b33868b4b7d46143f42f55ae0 | spawnfest/eep49ers | systools_lib.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 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 applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/sasl/src/systools_lib.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 l... | Copyright Ericsson AB 1996 - 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(systools_lib).
Purpose : Internal stuff called by systools.erl
-export([file_term2binary/2, read_term/1, ... |
43cc9f8acf2db0fda79d690648388d92e3adf74f35f25e80e705937d21d4e5bf | takikawa/tr-pfds | treap-tests.rkt | #lang typed/racket
(require pfds/treap)
(require typed/test-engine/racket-tests)
(: str-less-than? : (String String -> Boolean))
(define (str-less-than? a b)
(string<=? a b))
(check-expect (find-min/max (treap < 1 2 3 4)) 1)
(check-expect (find-min/max (treap < 1 2 3 0)) 0)
(check-expect (find-min/max (treap < 1 2 ... | null | https://raw.githubusercontent.com/takikawa/tr-pfds/a08810bdfc760bb9ed68d08ea222a59135d9a203/pfds/tests/treap-tests.rkt | racket |
(append int-list int-list1))
contains?
treap/priority
insert/priority
root
root/priority
delete-root | #lang typed/racket
(require pfds/treap)
(require typed/test-engine/racket-tests)
(: str-less-than? : (String String -> Boolean))
(define (str-less-than? a b)
(string<=? a b))
(check-expect (find-min/max (treap < 1 2 3 4)) 1)
(check-expect (find-min/max (treap < 1 2 3 0)) 0)
(check-expect (find-min/max (treap < 1 2 ... |
5fd48976751bf3f8bef7235185bc3f8ff3871b8659c659e20a17bf26f0441067 | tonsky/Clojure-Sublimed | socket_repl.clj | (ns clojure-sublimed.socket-repl
(:require
[clojure.string :as str]
[clojure-sublimed.exception :as exception]))
(def ^:dynamic *out-fn*
prn)
(def ^:dynamic *context*
nil)
(defonce *evals
(atom {}))
(defn stop! []
(throw (ex-info "Stop" {::stop true})))
(defn read-command [in]
(let [[form s] (r... | null | https://raw.githubusercontent.com/tonsky/Clojure-Sublimed/a447377873702c8f4da0351eabc274517a3cc499/src_clojure/clojure_sublimed/socket_repl.clj | clojure | code' (binding [*read-eval* false]
(read-string {:read-cond :preserve} code)) | (ns clojure-sublimed.socket-repl
(:require
[clojure.string :as str]
[clojure-sublimed.exception :as exception]))
(def ^:dynamic *out-fn*
prn)
(def ^:dynamic *context*
nil)
(defonce *evals
(atom {}))
(defn stop! []
(throw (ex-info "Stop" {::stop true})))
(defn read-command [in]
(let [[form s] (r... |
bfcf54d736c86a66dbb63b1fdba766a468ca15adfe2433e2cf7ded3b7d813e4f | RefactoringTools/wrangler | eqc_new_macro.erl | -module(eqc_new_macro).
-compile(export_all).
-include_lib("eqc/include/eqc.hrl").
collect_expr_locs(AST) ->
F1 = fun (T,S) ->
case api_refac:is_expr(T) of
true -> Range = api_refac:start_end_loc(T),
[Range| S];
_ -> S
end
end,
F = fun (T, S) ->
case wrangler_sy... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/qc_test/eqc_new_macro.erl | erlang | Default function names.
Collect atoms in an AST.
filename newerator
Properties for 'generalise a function'
generate 'gen a macroction' commands.
test_new_macro7(),
test_new_macro8().
| -module(eqc_new_macro).
-compile(export_all).
-include_lib("eqc/include/eqc.hrl").
collect_expr_locs(AST) ->
F1 = fun (T,S) ->
case api_refac:is_expr(T) of
true -> Range = api_refac:start_end_loc(T),
[Range| S];
_ -> S
end
end,
F = fun (T, S) ->
case wrangler_sy... |
7de73110253776072361429650fc1fdf713deff61f29b26f536a8651a835f2d9 | zcaudate/hara | logic_test.clj | (ns hara.test.checker.logic-test
(:use [hara.test :exclude [any all is-not]])
(:require [hara.test.checker.logic :refer :all]
[hara.test.common :as common]))
^{:refer hara.test.checker.logic/is-not :added "3.0"}
(fact "checker that allows negative composition of checkers"
(mapv (is-not even?)
... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/test/checker/logic_test.clj | clojure | (ns hara.test.checker.logic-test
(:use [hara.test :exclude [any all is-not]])
(:require [hara.test.checker.logic :refer :all]
[hara.test.common :as common]))
^{:refer hara.test.checker.logic/is-not :added "3.0"}
(fact "checker that allows negative composition of checkers"
(mapv (is-not even?)
... | |
265998f31704f476915b8d6a6042b488367866357c42600637719ecaae2e84a2 | blamario/grampa | Ambiguous.hs | # Language FlexibleInstances , RankNTypes , RecordWildCards , TemplateHaskell #
module Test.Ambiguous where
import Control.Applicative ((<|>), empty, liftA2)
import Data.Foldable (fold)
import Data.Semigroup ((<>))
import qualified Rank2.TH
import Text.Grampa
import Text.Grampa.Combinators
import Text.Grampa.ContextF... | null | https://raw.githubusercontent.com/blamario/grampa/cae7fc65d8d8ad2f54a070170896735c7518eed7/grammatical-parsers/test/Test/Ambiguous.hs | haskell | # Language FlexibleInstances , RankNTypes , RecordWildCards , TemplateHaskell #
module Test.Ambiguous where
import Control.Applicative ((<|>), empty, liftA2)
import Data.Foldable (fold)
import Data.Semigroup ((<>))
import qualified Rank2.TH
import Text.Grampa
import Text.Grampa.Combinators
import Text.Grampa.ContextF... | |
b656dee86ce5c1da10982bcc80c4907df9623d2a0f9bfcb06bce8c11571621f2 | Clojure2D/clojure2d-examples | aabb.clj | (ns rt4.the-next-week.ch07a.aabb
(:require [rt4.the-next-week.ch07a.interval :as interval]
[fastmath.vector :as v]
[fastmath.core :as m])
(:import [fastmath.vector Vec3]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol AABBP... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch07a/aabb.clj | clojure | (ns rt4.the-next-week.ch07a.aabb
(:require [rt4.the-next-week.ch07a.interval :as interval]
[fastmath.vector :as v]
[fastmath.core :as m])
(:import [fastmath.vector Vec3]))
(set! *warn-on-reflection* true)
(set! *unchecked-math* :warn-on-boxed)
(m/use-primitive-operators)
(defprotocol AABBP... | |
055f70ec304101ccff0b8f5a337591b1fb9a98af7cbd5858663804df89e98aef | elaforge/karya | Mridangam2022.hs | Copyright 2022
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Solkattu.Score.Mridangam2022 where
import Prelude hiding ((.), repeat)
import Solkattu.Dsl.Mridangam
e_n_dd_dd :: Korvai
e_n_dd_dd = date 2022 2 6 $ exercise... | null | https://raw.githubusercontent.com/elaforge/karya/b4a5700868f4409c8d4f246bf93a31fc81662341/Solkattu/Score/Mridangam2022.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
From dream where I was singing with a large group. Later switched
to mridangam but couldn't get a comfortable seat. Famous player was
next to me. After that a dream where I was doing something like this
s... | Copyright 2022
module Solkattu.Score.Mridangam2022 where
import Prelude hiding ((.), repeat)
import Solkattu.Dsl.Mridangam
e_n_dd_dd :: Korvai
e_n_dd_dd = date 2022 2 6 $ exercise $ ganesh $ korvaiS adi
[ r2 "N.dD.dD." . "N.dd.dd. n.dD.dD."
, "N.dD.dD. dN.D.dD. N.dd.dd. n.dD.dD."
... |
45475949f267bb057bc821873f970d47b1dc0b0b83005b889f2b498257440c42 | pdarragh/parsing-with-zippers-paper-artifact | pwz_nary_list_interface.ml | module PwzNaryListParserInterface = struct
type tok = Pytokens.token_pair
type res = Pwz_nary_list.exp list
let process_tokens (tokens : Pytokens.token list) : tok list =
List.map Pytokens.token_pair_of_token tokens
let parse (tokens : tok list) : res =
Pwz_nary_list.parse tokens Pwz_nary_list_pygram.... | null | https://raw.githubusercontent.com/pdarragh/parsing-with-zippers-paper-artifact/c5c08306cfe4eec588237c7fa45b794649ccb68a/benchmark/pwz_bench/generate/static/pwz_nary_list/pwz_nary_list_interface.ml | ocaml | module PwzNaryListParserInterface = struct
type tok = Pytokens.token_pair
type res = Pwz_nary_list.exp list
let process_tokens (tokens : Pytokens.token list) : tok list =
List.map Pytokens.token_pair_of_token tokens
let parse (tokens : tok list) : res =
Pwz_nary_list.parse tokens Pwz_nary_list_pygram.... | |
b27768ccc03559acc6533dc2132d98979bc4292493845f83949e29c84fae3934 | qiao/sicp-solutions | 3.39.scm | ;; Result Description
;;
101 P1 sets x to 100 and then P2 increments x to 101
121 P2 increments x to 11 and then P1 sets it to 121
100 P1 computes ( * x x ) , then P2 sets x to 11 , then P1 sets x to 100
| null | https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter3/3.39.scm | scheme | Result Description
| 101 P1 sets x to 100 and then P2 increments x to 101
121 P2 increments x to 11 and then P1 sets it to 121
100 P1 computes ( * x x ) , then P2 sets x to 11 , then P1 sets x to 100
|
dd2f7a937375bf82dffdc8936a56836f46d03e5b31c933105be49bd51f1a8e35 | exercism/ocaml | robot_name.ml | type robot
let new_robot =
failwith "'new_robot' is missing"
let name =
failwith "'name' is missing"
let reset =
failwith "'reset' is missing"
| null | https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/robot-name/robot_name.ml | ocaml | type robot
let new_robot =
failwith "'new_robot' is missing"
let name =
failwith "'name' is missing"
let reset =
failwith "'reset' is missing"
| |
12cce109c8cd4ed20d4bb958bf6f42f62f7c3768de48887ff37681cabce8f717 | findmyway/reinforcement-learning-an-introduction | car_rental.clj | gorilla-repl.fileformat = 1
;; @@
(ns rl.chapter04.car-rental
(:require [incanter.stats :refer [pdf-poisson]]
[clojure.core.matrix :as m]
[rl.util :refer [argmax]]
[clojure.string :as string])
(:use [plotly-clj.core]))
;; @@
;; =>
;;; {"type":"html","content":"<span class='clj... | null | https://raw.githubusercontent.com/findmyway/reinforcement-learning-an-introduction/6911efbe7a6478658b188022ebad542751146ddd/src/rl/chapter04/car_rental.clj | clojure | @@
@@
=>
{"type":"html","content":"<span class='clj-nil'>nil</span>","value":"nil"}
<=
@@
@@
=>
{"type":"html","content":"<script src=\"-latest.min.js\" type=\"text/javascript\"></script>","value":"pr'ed value"}
<=
@@
@@
@@
@@
=>
{"type":"html","content":"<iframe height=\"600\" src=\"//plot.ly/~findmywa... | gorilla-repl.fileformat = 1
(ns rl.chapter04.car-rental
(:require [incanter.stats :refer [pdf-poisson]]
[clojure.core.matrix :as m]
[rl.util :refer [argmax]]
[clojure.string :as string])
(:use [plotly-clj.core]))
(online-init)
(def max-cars 20)
(def max-move 5)
(def lambda... |
44e0213d201027dba7378efd95fafbbc23a67428c46d6c50ce4631efe6987698 | yogthos/components-example | user.clj | (ns user
(:require [mount.core :as mount]
[components-example.figwheel :refer [start-fw stop-fw cljs]]
components-example.core))
(defn start []
(mount/start-without #'components-example.core/repl-server))
(defn stop []
(mount/stop-except #'components-example.core/repl-server))
(defn res... | null | https://raw.githubusercontent.com/yogthos/components-example/c369bde7916b6d15cb6a8b4ab05c562e16755b2a/env/dev/clj/user.clj | clojure | (ns user
(:require [mount.core :as mount]
[components-example.figwheel :refer [start-fw stop-fw cljs]]
components-example.core))
(defn start []
(mount/start-without #'components-example.core/repl-server))
(defn stop []
(mount/stop-except #'components-example.core/repl-server))
(defn res... | |
1979029c26c791ec02882bb3b6019b19c83ce94dfb4411e68dc503ec4df61c40 | samply/blaze | local_spec.clj | (ns blaze.db.tx-log.local-spec
(:require
[blaze.async.comp-spec]
[blaze.db.impl.iterators-spec]
[blaze.db.kv.spec]
[blaze.db.resource-store.spec]
[blaze.db.spec]
[blaze.db.tx-log.local]
[blaze.spec]))
| null | https://raw.githubusercontent.com/samply/blaze/cbf6431a254f347a704f1abe1de4f4fe8a249ac9/modules/db/test/blaze/db/tx_log/local_spec.clj | clojure | (ns blaze.db.tx-log.local-spec
(:require
[blaze.async.comp-spec]
[blaze.db.impl.iterators-spec]
[blaze.db.kv.spec]
[blaze.db.resource-store.spec]
[blaze.db.spec]
[blaze.db.tx-log.local]
[blaze.spec]))
| |
2cd46af8a2d87cd68b1ac84292ddddf60db704f617d732bbaa55bf92f902f424 | evilmartians/foundry | not.ml | let _ =
let prog = Sys.argv.(1)
and args = Array.sub Sys.argv 1 ((Array.length Sys.argv) - 1) in
if Unix.fork () = 0 then
Unix.execv prog args
else
let pid, status = Unix.wait () in
if status = Unix.WEXITED 0 then
exit 1
else
exit 0
| null | https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/src/tools/not.ml | ocaml | let _ =
let prog = Sys.argv.(1)
and args = Array.sub Sys.argv 1 ((Array.length Sys.argv) - 1) in
if Unix.fork () = 0 then
Unix.execv prog args
else
let pid, status = Unix.wait () in
if status = Unix.WEXITED 0 then
exit 1
else
exit 0
| |
be13292dc279514a4bb9f9850a91d2e4b6065fd93ed0757b3f911fa8c6fe7ab0 | elastic/eui-cljs | find_test_subject.cljs | (ns eui.test.find-test-subject
(:require ["@elastic/eui/lib/test/find_test_subject.js" :as eui]))
(def findTestSubject eui/findTestSubject)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/test/find_test_subject.cljs | clojure | (ns eui.test.find-test-subject
(:require ["@elastic/eui/lib/test/find_test_subject.js" :as eui]))
(def findTestSubject eui/findTestSubject)
| |
722bfcd278fd66c83511a2d016bc8ce93631e59bd81471d81de5f045db357633 | 8c6794b6/guile-tjit | t-box-03.scm | ;;; Simple loop with box, updating float value.
(define (loop n)
(let ((b1 0)
(b2 0)
(b3 0))
(let lp ((n n))
(if (< 0 n)
(begin
(set! b1 (+ b1 n))
(set! b2 (+ b1 0.1234567))
(set! b3 (+ b1 b2))
(lp (- n 1)))
(list b1 b2 b3)... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-box-03.scm | scheme | Simple loop with box, updating float value. |
(define (loop n)
(let ((b1 0)
(b2 0)
(b3 0))
(let lp ((n n))
(if (< 0 n)
(begin
(set! b1 (+ b1 n))
(set! b2 (+ b1 0.1234567))
(set! b3 (+ b1 b2))
(lp (- n 1)))
(list b1 b2 b3)))))
(loop #e1e3)
|
783206bc11f83115319ac6a7b589f1daf16a0f2df8342dc3fc098b87b3c5ecd9 | jiangpengnju/htdp2e | ex200.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-abbr-reader.ss" "lang")((modname ex200) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decima... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/arbitrarily-large-data/extended-exercises-lists/ex200.rkt | racket | about the language level of this file in a form that our tools can easily process.
After making sure that the entire suite of tests passes, run it
on some of your favorite examples.
constants
On OS X:
A Word is one of:
- '()
(cons 1String Word)
interpretation: a String as a list of single Strings (letters)
- ... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex200) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Integrate arrangements with the partial program from Word G... |
9fd39f5aee3e45ad78033896cda2844d1808a54074ba880d608e5a8fb98f73a4 | haskell/aeson | Issue673.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Issue673 where
import Bench
import Prelude.Compat
import Data.Int (Int64)
import Data.Scientific (Scientific)
import Data.Aeson.Parser (scientific)
import qualified Data.Attoparsec.ByteString.Lazy as AttoL
import qualified Data.Attoparsec.ByteS... | null | https://raw.githubusercontent.com/haskell/aeson/78c2338c20d31ba5dd46036d10d6c4815c12185d/benchmarks/bench/Issue673.hs | haskell | # LANGUAGE OverloadedStrings #
works on 64bit
other disabled, they are interesting for comparison only.
, bench "Optim" $ whnf bsToInteger (LBS.toStrict input)
, bench "Read" $ whnf decodeViaRead input
, bench "Scientific" $ whnf decodeScientific input
, bench "parserA" $ whnf decodeAtto input
, b... | # LANGUAGE NoImplicitPrelude #
module Issue673 where
import Bench
import Prelude.Compat
import Data.Int (Int64)
import Data.Scientific (Scientific)
import Data.Aeson.Parser (scientific)
import qualified Data.Attoparsec.ByteString.Lazy as AttoL
import qualified Data.Attoparsec.ByteString.Char8 as Atto8
import qualifi... |
f998de3fc816cb3f7288ee360e5e2b3bc84772eb4942bcd84c2915f306dd9dc5 | mzp/scheme-abc | swfIn.mli | module type TagType = sig
type t
val read : int -> int Stream.t -> t
end
module Make: functor (Tag:TagType) -> sig
val read : int Stream.t -> Tag.t SwfType.t
(* for debug *)
val to_tag : int Stream.t -> Tag.t
end
| null | https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/swflib/swfIn.mli | ocaml | for debug | module type TagType = sig
type t
val read : int -> int Stream.t -> t
end
module Make: functor (Tag:TagType) -> sig
val read : int Stream.t -> Tag.t SwfType.t
val to_tag : int Stream.t -> Tag.t
end
|
5f39e0bdcf29183a0fc10b48498824565651be0605adf73fa082a113761e564a | JHU-PL-Lab/jaylang | unrolls.ml | open Core
module type X_int = sig val x : int end ; ;
utop # let rec = ( module struct let x = y end : X_int ) and y = 4 ; ;
val mm : ( module X_int ) = < module >
module type X_int = sig val x : int end;;
utop # let rec mm = (module struct let x = y end : X_int) and y = 4;;
val mm : (modu... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/dbmc/unrolls.ml | ocaml | && (Ast.equal_value v1 v2) | open Core
module type X_int = sig val x : int end ; ;
utop # let rec = ( module struct let x = y end : X_int ) and y = 4 ; ;
val mm : ( module X_int ) = < module >
module type X_int = sig val x : int end;;
utop # let rec mm = (module struct let x = y end : X_int) and y = 4;;
val mm : (modu... |
9eca11f468712be3f15791a01cbc93a081146dccdd9ccf146fd6c64b98e140a0 | bcc32/projecteuler-ocaml | sol_549.ml | open! Core
open! Import
let limit =
match Sys.getenv "LIMIT" with
| Some x -> Int.of_string x
| None -> 100_000_000
;;
let divide n p =
let rec loop n ac = if n mod p = 0 then loop (n / p) (ac + 1) else ac in
loop n 0
;;
Sieve inspired by 's solution at
#235492 .
#235492. *)
let sieve n =
let ... | null | https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/sol/sol_549.ml | ocaml | prime
loop invariant: [smallest] is the smallest multiple of [p] such that
[power | smallest!]. [k] is incremented each loop and serves to
adjust [smallest] when needed. | open! Core
open! Import
let limit =
match Sys.getenv "LIMIT" with
| Some x -> Int.of_string x
| None -> 100_000_000
;;
let divide n p =
let rec loop n ac = if n mod p = 0 then loop (n / p) (ac + 1) else ac in
loop n 0
;;
Sieve inspired by 's solution at
#235492 .
#235492. *)
let sieve n =
let ... |
d915561dbf1b0704f8545a1f287ee2647198b0b34c785e83d6e9598abf5ce42f | solita/mnt-teet | asset_db.clj | (ns teet.asset.asset-db
"Asset database Datomic queries.
See [[teet.asset.asset-model]] namespace docstring for domain concept
documentation."
(:require [clojure.walk :as walk]
[datomic.client.api :as d]
[teet.util.datomic :as du]
[teet.util.collection :as cu]
[c... | null | https://raw.githubusercontent.com/solita/mnt-teet/ba73b495da9974f28adb9ec3eccfa31e95df2b4c/app/backend/src/clj/teet/asset/asset_db.clj | clojure | Determine THK project match for asset/component
Recursively the parent has the project
Get a location attr for entity
entity has location directly, use this
component inherits location, use parent
Find the entity where location attr is missing
- entity is asset, check if it is missing
- entity does not inherit ... | (ns teet.asset.asset-db
"Asset database Datomic queries.
See [[teet.asset.asset-model]] namespace docstring for domain concept
documentation."
(:require [clojure.walk :as walk]
[datomic.client.api :as d]
[teet.util.datomic :as du]
[teet.util.collection :as cu]
[c... |
c5af1d3dbfa0066476ee9bb9f7f28d55357ef465938561c48792ec4fa75002d3 | antoniogarrote/levanzo | indexing.clj | (ns issues.indexing
(:require [levanzo.indexing :as indexing]
[levanzo.payload :as payload]
[levanzo.routing :as routing]
[issues.api :as api]
[issues.db :as db]
[issues.config :as config]
[monger.core :as mg]
[monger.collection :as m... | null | https://raw.githubusercontent.com/antoniogarrote/levanzo/53a8fa134099b3ad6310bfc3493cc1fb9eb38f2f/examples/issues/indexing.clj | clojure | indices
resource look-up
collection joins | (ns issues.indexing
(:require [levanzo.indexing :as indexing]
[levanzo.payload :as payload]
[levanzo.routing :as routing]
[issues.api :as api]
[issues.db :as db]
[issues.config :as config]
[monger.core :as mg]
[monger.collection :as m... |
023dd1a625485bba9b738ed4b28d513ecd7eed21d5152a1821b99c94417004b1 | atlas-engineer/closure | dep-openmcl.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: CL-USER; -*-
;;; ---------------------------------------------------------------------------
Title : OpenMCL dependent stuff + fixups
Created : 2005 - 08 - 25 11:50
;;; Author:
License : MIT style ( see below )
;;; -------------------------------------... | null | https://raw.githubusercontent.com/atlas-engineer/closure/539ce81dbcb5fb46e19818a9bb35eeaf86042219/src/glisp/dep-openmcl.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: CL-USER; -*-
---------------------------------------------------------------------------
Author:
---------------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining
a copy of this soft... | Title : OpenMCL dependent stuff + fixups
Created : 2005 - 08 - 25 11:50
License : MIT style ( see below )
( c ) copyright 1999 by
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to ... |
abfae862559489036dc64a8c09e487a871de0619998afd648b39ae57560b0c3b | mpieva/biohazard-tools | bam-mangle.hs | -- Generic bam mangler. Mostly filters, some mutating operations, some
-- extraction of data. Simple expression language, comparable to Unix
-- 'find', but not to 'awk'.
import Bio.Adna
import Bio.Bam hiding ( ParseError )
import Bio.Prelude hiding ( try, many )
import... | null | https://raw.githubusercontent.com/mpieva/biohazard-tools/93959b6ad0dde2a760559fe82853ab78497f0452/src/bam-mangle.hs | haskell | Generic bam mangler. Mostly filters, some mutating operations, some
extraction of data. Simple expression language, comparable to Unix
'find', but not to 'awk'.
The plan: We take a filter expression and a number of input files. Inputs
expression to extract some data, which we may want to sum up. Where
do we ... |
import Bio.Adna
import Bio.Bam hiding ( ParseError )
import Bio.Prelude hiding ( try, many )
import Control.Monad.Trans.RWS.Strict
import Data.HashMap.Strict ( lookupDefault, fromList )
import GHC.Float ( float2Double )... |
99bb0b30899a15bb7260a504d983d8ab07189c169fa69d40a984932751b24c72 | meetalik8/pcpf | mapf.hs | higher order function in haskell
mapf::(a->b)->[a]->[b]
mapf f xs=[f x | x <-xs]
main = do
print(mapf (*2)[1,4,6])
print(mapf (+2)[1,4,6])
| null | https://raw.githubusercontent.com/meetalik8/pcpf/3abe95c61c03ae07d1147032db45e70734c33dee/haskell/mapf.hs | haskell | higher order function in haskell
mapf::(a->b)->[a]->[b]
mapf f xs=[f x | x <-xs]
main = do
print(mapf (*2)[1,4,6])
print(mapf (+2)[1,4,6])
| |
2d14635f53ec75c874afadddf2993065c0d87f9cd3eb598371c276fdfbeb38ce | CryptoKami/cryptokami-core | Common.hs | # LANGUAGE AllowAmbiguousTypes #
-- | Common methods/datatypes across Delegation.Logic.*
module Pos.Delegation.Logic.Common
(
-- * Exceptions
DelegationError(..)
-- * Modifying memstate
, DelegationStateAction
, runDelegationStateAction
-- * Common helpers
,... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/delegation/src/Pos/Delegation/Logic/Common.hs | haskell | | Common methods/datatypes across Delegation.Logic.*
* Exceptions
* Modifying memstate
* Common helpers
--------------------------------------------------------------------------
Exceptions
--------------------------------------------------------------------------
| Can't apply blocks to state of transactions pro... | # LANGUAGE AllowAmbiguousTypes #
module Pos.Delegation.Logic.Common
(
DelegationError(..)
, DelegationStateAction
, runDelegationStateAction
, getDlgTransPsk
) where
import Universum
import Control.Exception.Safe (Exception (..))
import qualified Dat... |
779aee296732f0d55d122ff14197a83ce107823ae6d7d3b83f971ec578315bad | nuprl/gradual-typing-performance | world-landed-on-blocks.rkt | #lang racket/base
(provide landed-on-blocks?)
(require benchmark-util
"data-block.rkt"
"data-world.rkt"
"data-tetra.rkt")
(require "tetras-tetra-overlaps-blocks.rkt")
(require "tetras-tetra-move.rkt")
;; =============================================================================
;; Has ... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/tetris/untyped/world-landed-on-blocks.rkt | racket | =============================================================================
Has the current tetra landed on blocks? | #lang racket/base
(provide landed-on-blocks?)
(require benchmark-util
"data-block.rkt"
"data-world.rkt"
"data-tetra.rkt")
(require "tetras-tetra-overlaps-blocks.rkt")
(require "tetras-tetra-move.rkt")
I.e. , if we move the tetra down 1 , will it touch any existing blocks ?
(define (land... |
3422280bda9efaf196bff6f38928f542d75f3669be29f767167dc1854b861270 | arcadia-unity/ArcadiaGodot | core_proxy.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/arcadia-unity/ArcadiaGodot/d9881c8132c46f21efde4eb4eb9a534d808cdb20/Clojure/clojure/core_proxy.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(in-ns 'clojure.core)
DM : This is one of the few bootstrap * .clj files where I did not even try to do a line - by - line
modification of the JVM version . Too many differences .
I put more of the support into C # rather than in Clojure , just so I could bang... |
d01b258ff46ca2a65203f7dc653e5a8b7aedd6b0cd4766db768d1bd34b7f15ba | Et7f3/ocalc | lien.ml | module GrandEntier = Modules.GrandEntier_on
module GrandReel = Modules.GrandReel_on
module GrandRationnel = Modules.GrandRationnel_on
module GrandNum = Modules.GrandNum_on
| null | https://raw.githubusercontent.com/Et7f3/ocalc/667da625676829307fc59542906ed2075fe818bd/src/noyau/lien.ml | ocaml | module GrandEntier = Modules.GrandEntier_on
module GrandReel = Modules.GrandReel_on
module GrandRationnel = Modules.GrandRationnel_on
module GrandNum = Modules.GrandNum_on
| |
6c2098b52fcfd2092226633bb11c3d6e94f90f8b261a180023bb2353f59b4fc6 | TyOverby/mono | test_rewrite.ml | open Core
let () =
let tmp_file = Filename_unix.temp_file "version_util" "" in
Exn.protect
~finally:(fun () -> Sys_unix.remove tmp_file)
~f:(fun () ->
let initial_contents_of_exe = In_channel.read_all "main.exe" in
let new_exe_contents =
Option.value
~default:initial_contents_... | null | https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/janestreet-core_kernel/version_util/test/bin/test_rewrite.ml | ocaml | If the exe had version util already, both rewrites should have have failed. If
not, both should have succeeded. Either way, we should end up with the initial
exe. | open Core
let () =
let tmp_file = Filename_unix.temp_file "version_util" "" in
Exn.protect
~finally:(fun () -> Sys_unix.remove tmp_file)
~f:(fun () ->
let initial_contents_of_exe = In_channel.read_all "main.exe" in
let new_exe_contents =
Option.value
~default:initial_contents_... |
b18eed4086801be831c0ea64e9c73094fcdc44390e1cc1b100aa3789d9e1a243 | dsheets/ocaml-osx-cf | test.ml |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/dsheets/ocaml-osx-cf/d5285b70a37d5620fba8327bf44204de511009f8/lib_test/test.ml | ocaml |
* Copyright ( c ) 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
bac1f4012192057a54433c0854da6b707be21cf7003e1fbad3a364951272cdff | gafiatulin/codewars | Braces.hs | -- Valid Braces
-- /
module Codewars.Kata.Braces where
import Data.Maybe (fromMaybe, listToMaybe)
validBraces :: String -> Bool
validBraces = f []
where g '{' = '}'
g '[' = ']'
g '(' = ')'
g x = ' '
f [] [] = True
f _ [] = False
f l (x:xs) | x ... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/4%20kyu/Braces.hs | haskell | Valid Braces
/ |
module Codewars.Kata.Braces where
import Data.Maybe (fromMaybe, listToMaybe)
validBraces :: String -> Bool
validBraces = f []
where g '{' = '}'
g '[' = ']'
g '(' = ')'
g x = ' '
f [] [] = True
f _ [] = False
f l (x:xs) | x `elem` "({[" = f (x:l... |
3f4dc08be10f787ee75b2f2b7f29537198ae4d13a5785ce41eced09506e660a6 | simingwang/emqx-plugin-kafkav5 | heart.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2021 . 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/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/kernel-8.3/src/heart.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 - 2021 . 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(heart).
This is a rewrite of pre_heart from BS.3 .
of the entire erlang - system . This ' heart ' beats... |
c05f92842ef95f85683318daae44e6a5da36b1d5e35e28725977c33c599d3bd5 | input-output-hk/plutus-apps | RequestHandler.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DerivingVia #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE MonoLocalBinds #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeOperators #-}
module Plutus.... | null | https://raw.githubusercontent.com/input-output-hk/plutus-apps/b80116b9dd97e83b61f016924f83ad4284212796/plutus-contract/src/Plutus/Contract/Trace/RequestHandler.hs | haskell | # LANGUAGE DerivingVia #
# LANGUAGE MonoLocalBinds #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
* handlers for common requests
| Request handlers that can choose whether to handle an effect (using
'Alternative'). This is usef... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
module Plutus.Contract.Trace.RequestHandler(
RequestHandler(..)
, RequestHandlerLogMsg(..)
, tryHandler
, tryHandler'
, wrapHandler
, extract
, maybeToHandler
, generalise
, handleAdjustUn... |
cb5fe3b75d5b557a90782e23540670006b66d1faafaaa1008032d187b668d6d9 | daveyarwood/music-theory | chord_test.cljc | (ns music-theory.chord-test
(:require #?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros (deftest testing is)])
[music-theory.chord :as chord]))
(deftest octave-span-tests
(testing "determining the octave span of a chord"
(is (= 1 (chord/octave-span [:D4 :F#4 :A4])))
... | null | https://raw.githubusercontent.com/daveyarwood/music-theory/c58beb9fa6d290900afeff78ee4f86c875e393d7/test/music_theory/chord_test.cljc | clojure | (ns music-theory.chord-test
(:require #?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros (deftest testing is)])
[music-theory.chord :as chord]))
(deftest octave-span-tests
(testing "determining the octave span of a chord"
(is (= 1 (chord/octave-span [:D4 :F#4 :A4])))
... | |
b32c0fc826410f52dfe112638e487cfe29510cfd1a5cb60e17f14d59202d3bea | khotyn/4clojure-answer | 66-greatest-common-divisor.clj | (fn [a b]
(apply
max
(filter
#(and
(= (rem a %) 0)
(= (rem b %) 0))
(range
1
(+
(min a b)
1)))))
| null | https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/66-greatest-common-divisor.clj | clojure | (fn [a b]
(apply
max
(filter
#(and
(= (rem a %) 0)
(= (rem b %) 0))
(range
1
(+
(min a b)
1)))))
| |
5a1fe61b8ca6f1a866b57c1a9dcb47a04f6b04b5bd291b56b0d876e10889c2a7 | bowswung/voobly-scraper | Deserialise.hs | {-# OPTIONS -fno-warn-deprecations #-}
module Data.Mgz.Deserialise (
module Data.Mgz.Deserialise,
module Data.Mgz.Deserialise.BasicTypes,
module Data.Mgz.Deserialise.Commands
) where
import RIO
import qualified RIO.List as L
import Control.Monad (replicateM)
import qualified RIO.ByteString.Lazy as BL
import qu... | null | https://raw.githubusercontent.com/bowswung/voobly-scraper/a6c330010455ab607b1803ae576e688b737ca536/src/Data/Mgz/Deserialise.hs | haskell | # OPTIONS -fno-warn-deprecations #
traceM $ displayShowT (L.sort cmdTypes)
skip visibility mapSizeX2 | module Data.Mgz.Deserialise (
module Data.Mgz.Deserialise,
module Data.Mgz.Deserialise.BasicTypes,
module Data.Mgz.Deserialise.Commands
) where
import RIO
import qualified RIO.List as L
import Control.Monad (replicateM)
import qualified RIO.ByteString.Lazy as BL
import qualified Data.Binary.Get as G
import qua... |
670544a2bb9436c982b58b832dc9c8e868470d8ee3357808f7631cfaa984e55a | jordwalke/rehp | b64.mli |
* Copyright ( c ) 2006 - 2009 Citrix Systems Inc.
* Copyright ( c ) 2010 < >
* Copyright ( c ) 2014 - 2016 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright not... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/toplevel/examples/lwt_toplevel/b64.mli | ocaml |
* Copyright ( c ) 2006 - 2009 Citrix Systems Inc.
* Copyright ( c ) 2010 < >
* Copyright ( c ) 2014 - 2016 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright not... | |
0e7bbb5fc513b4d77d135a835fa52ba4f043ab8ada120ea6d36c475d94570049 | mmontone/cl-rest-server | implementation.lisp | (in-package :rest-server-demo)
(implement-resource-operation users-demo-api
(list-users
(:logging :enabled t)
(:error-handling :enabled t))
(&rest args &key expand (page 1))
(declare (ignorable args))
(let ((serializer (rest-server::accept-serializer)))
(set-reply-content-type (generic-serial... | null | https://raw.githubusercontent.com/mmontone/cl-rest-server/cd3a08681a1c3215866fedcd36a6bc98d223d52d/demo/implementation.lisp | lisp | else
else | (in-package :rest-server-demo)
(implement-resource-operation users-demo-api
(list-users
(:logging :enabled t)
(:error-handling :enabled t))
(&rest args &key expand (page 1))
(declare (ignorable args))
(let ((serializer (rest-server::accept-serializer)))
(set-reply-content-type (generic-serial... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.