_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 |
|---|---|---|---|---|---|---|---|---|
f128a57fd38ec4b8f98aff8d79c3efdb30a19fc3cabdeab1e836d71b637b2fff | tolitius/lasync | core_test.clj | (ns lasync.core-test
(:require [clojure.test :refer :all]
[lasync.core :as lasync])
(:import [lasync.limitq ArrayLimitedQueue LinkedLimitedQueue]))
(deftest sanity-test
(testing "checking sanity like size + state"
(let [threads 3
pool (lasync/pool {:threads threads})]
(is (= thre... | null | https://raw.githubusercontent.com/tolitius/lasync/7af8e174c0e86a2da87fb0a875a532502aabe1ec/test/lasync/core_test.clj | clojure | (ns lasync.core-test
(:require [clojure.test :refer :all]
[lasync.core :as lasync])
(:import [lasync.limitq ArrayLimitedQueue LinkedLimitedQueue]))
(deftest sanity-test
(testing "checking sanity like size + state"
(let [threads 3
pool (lasync/pool {:threads threads})]
(is (= thre... | |
26803c7d7ac38a27abe4074fc5c3a358546d50865d9a73dea2606b71d432ed91 | michaelklishin/welle | conversion.clj | Copyright ( c ) 2012 - 2014
;;
;; 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 ... | null | https://raw.githubusercontent.com/michaelklishin/welle/3f3cd24af7c0d95489298e4096b362b6943f85ef/src/clojure/clojurewerkz/welle/conversion.clj | clojure |
The use and distribution terms for this software are covered by the
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 this notice, or any other, from this software.
I... | Copyright ( c ) 2012 - 2014
Eclipse Public License 1.0 ( -1.0.php )
(ns clojurewerkz.welle.conversion
(:require [cheshire.custom :as json]
[cheshire.core :as json2]
[clojure.set :as cs]
[clojure.java.io :as io]
[clojure.walk :refer [stringify-keys]... |
7a475516654003c150a8fb58109c4e56fb8c57cb186a049a0c67f27d359dc867 | Copilot-Language/copilot-libraries | Voting.hs | -- |
-- Module: Voting
-- Description: Implementation of the Boyer-Moore Majority Vote Algorithm
Copyright : ( c ) 2011 National Institute of Aerospace / Galois , Inc.
--
This is an implementation of the Boyer - Moore Majority Vote Algorithm for
-- Copilot, which solves the majority vote problem in linear time and... | null | https://raw.githubusercontent.com/Copilot-Language/copilot-libraries/ae95ad91d5b135769871cb42056908bffba5a009/src/Copilot/Library/Voting.hs | haskell | |
Module: Voting
Description: Implementation of the Boyer-Moore Majority Vote Algorithm
Copilot, which solves the majority vote problem in linear time and constant
the following papers:
In addition, <-discussion/blob/master/tutorial/copilot_tutorial.pdf An Introduction to Copilot> in
<-discussion copilot-di... | Copyright : ( c ) 2011 National Institute of Aerospace / Galois , Inc.
This is an implementation of the Boyer - Moore Majority Vote Algorithm for
memory in two passes . ' majority ' implements the first pass , and ' aMajority '
the second pass . For details of the Boyer - Moore Majority Vote Algorithm see
* <... |
a7fa43ac0e09f99abb51f3232879bcd47c330f56f52e3f73b0f9d91991e365f0 | bgamari/nanomsg-haskell | BinaryProperties.hs | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Nanomsg.Binary
import Test.Framework.TH (defaultMainGenerator)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
import Test.QuickCheck.Monadic
import Data.ByteString (ByteString)
import qualifie... | null | https://raw.githubusercontent.com/bgamari/nanomsg-haskell/a532268191bf75f0ad40cb0fe2b3a82e05b9a429/tests/BinaryProperties.hs | haskell | dummy test
test Pub and Sub sockets
test Pair sockets
Send message from s1 to s2, then back from s2 to s1, then make sure it hasn't changed
test Bus socket | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - orphans #
module Main where
import Nanomsg.Binary
import Test.Framework.TH (defaultMainGenerator)
import Test.Framework.Providers.QuickCheck2 (testProperty)
import Test.QuickCheck
import Test.QuickCheck.Monadic
import Data.ByteString (ByteString)
import qualifie... |
f397400c5927a26e4e726959347ba7a15e8c708e72563c3695baa3727eb5600b | SRI-CSL/yices2_ocaml_bindings | test.ml | [%%import "gmp.mlh"]
open Yices2.High
let () = Printexc.record_backtrace true
module EH1 = Make(ExceptionsErrorHandling)
let () =
print_endline "First test, using exceptions for error handling";
let open EH1 in
let open Global in
print_endline("Initialising Yices version "^version);
init();
print_en... | null | https://raw.githubusercontent.com/SRI-CSL/yices2_ocaml_bindings/16e91100f82079576d63cbc3c49962178b79dfb9/src_tests/test.ml | ocaml | [%%import "gmp.mlh"]
open Yices2.High
let () = Printexc.record_backtrace true
module EH1 = Make(ExceptionsErrorHandling)
let () =
print_endline "First test, using exceptions for error handling";
let open EH1 in
let open Global in
print_endline("Initialising Yices version "^version);
init();
print_en... | |
b5f37c03a05be095a7bca87edbaac6ef7325ac5addaed2a55238b4b635387a38 | Workiva/eva | attribute.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/attribute.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.attribute
(:require [eva.error :as err]
[schema.core :as s]
[map-experiments.smart-maps.bijection :refer [bijection]]
[clojure.string :as cstr]
[plumbing... |
17f5f0d0bb822aebddb812e7a7c1e45fd7ac7b2cdd1372406a5dab41954c0c2b | semilin/layoup | Neo.lisp |
(MAKE-LAYOUT :NAME "Neo" :MATRIX
(APPLY #'KEY-MATRIX '("xvlcwkhgfq" "uiaeosnrtd" "üöäpzbm,.j"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/Neo.lisp | lisp |
(MAKE-LAYOUT :NAME "Neo" :MATRIX
(APPLY #'KEY-MATRIX '("xvlcwkhgfq" "uiaeosnrtd" "üöäpzbm,.j"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
8c9109326858a3eb9cb91dec23c0fabeb6faff19667f5e4e3c933a4194b706de | abdulapopoola/SICPBook | 5.2.helpers.scm | (define (tagged-list? exp tag)
(if (pair? exp)
(eq? (car exp) tag)
false))
(define (make-machine register-names
ops
controller-text)
(let ((machine (make-new-machine)))
(for-each (lambda (register-name)
((machine 'allocate-register)
... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%205/5.2/5.2.helpers.scm | scheme | execution procedure
for assign | (define (tagged-list? exp tag)
(if (pair? exp)
(eq? (car exp) tag)
false))
(define (make-machine register-names
ops
controller-text)
(let ((machine (make-new-machine)))
(for-each (lambda (register-name)
((machine 'allocate-register)
... |
788fcf2e8e17d6aa897393766c7e4205aecf870f1ac8d738fc89294f343533de | typelead/eta | RecursiveFib1.hs | module Main where
main :: IO ()
main = do
putStrLn $ show $ fibonacci <$> arr
where
arr = [0..10]
fibrecursive 0 sum presum = sum
fibrecursive n sum presum = fibrecursive (n-1) (sum+presum) sum
fibonacci n = fibrecursive n 1 0 | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/codegen/run/RecursiveFib1.hs | haskell | module Main where
main :: IO ()
main = do
putStrLn $ show $ fibonacci <$> arr
where
arr = [0..10]
fibrecursive 0 sum presum = sum
fibrecursive n sum presum = fibrecursive (n-1) (sum+presum) sum
fibonacci n = fibrecursive n 1 0 | |
a24f6735d689d936b06b57849b5772d02ce5bfa859584dffa17653eff4822879 | haskellari/indexed-traversable | traversals.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import Criterion.Main (bench, bgroup, defaultMain, nf)
import qualified Data.HashMap.Lazy as HM
import qualified Data.Map ... | null | https://raw.githubusercontent.com/haskellari/indexed-traversable/db6cfcb44f381197536deda8a5aa6de7b0da73e2/indexed-traversable-benchmarks/bench/traversals.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE RankNTypes # | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
module Main (main) where
import Criterion.Main (bench, bgroup, defaultMain, nf)
import qualified Data.HashMap.Lazy as HM
import qualified Data.Map as Map
import qualified Data.Sequence as Seq
import qualifi... |
dfd95a27a2f135946a0622acfd15f796ddbfcbb9890a7b67e15dfcf5eb62ca0c | kishanov/re-frame-datatable | views.cljs | (ns re-frame-datatable.views
(:require [re-frame.core :as re-frame]
[re-frame-datatable.core :as dt]))
(defn default-pagination-controls [db-id data-sub]
(let [pagination-state (re-frame/subscribe [::dt/pagination-state db-id data-sub])]
(fn []
(let [{:keys [::dt/cur-page ::dt/pages]} @pagi... | null | https://raw.githubusercontent.com/kishanov/re-frame-datatable/d17f8fc7e5834e777b5bc3fbc257d1f7d5b74b3a/src/re_frame_datatable/views.cljs | clojure | (ns re-frame-datatable.views
(:require [re-frame.core :as re-frame]
[re-frame-datatable.core :as dt]))
(defn default-pagination-controls [db-id data-sub]
(let [pagination-state (re-frame/subscribe [::dt/pagination-state db-id data-sub])]
(fn []
(let [{:keys [::dt/cur-page ::dt/pages]} @pagi... | |
c8487b877403f08cb3034fe75b5f4afa5c5829315ba6d8e54d5026f8e170da51 | sadiqj/ocaml-esp32 | isatty_tty.ml | let console =
try
Unix.(openfile "/dev/tty" [O_RDWR] 0)
with _ ->
Unix.(openfile "CONIN$" [O_RDWR] 0)
in
Printf.printf "/dev/tty = %b\n" (Unix.isatty console)
| null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/lib-unix/isatty/isatty_tty.ml | ocaml | let console =
try
Unix.(openfile "/dev/tty" [O_RDWR] 0)
with _ ->
Unix.(openfile "CONIN$" [O_RDWR] 0)
in
Printf.printf "/dev/tty = %b\n" (Unix.isatty console)
| |
15943519a8d55bc52f2a305217f35f226c9bb6a75908fef66a0896b1f3700a04 | graninas/Functional-Design-and-Architecture | Service.hs | module Andromeda.Hardware.Impl.Service
( HardwareService (..)
) where
import Andromeda.Hardware.Language.Hdl (Hdl, ComponentIndex)
import Andromeda.Hardware.Impl.Device.Types (Device, DevicePart)
data HardwareService = HardwareService
{ makeDevice :: Hdl -> IO Device
, getBlankDevice :: IO Device
, get... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/5046a3b9cd1d0ef90054c99933c846dc5068c7ad/Second-Edition-Manning-Publications/BookSamples/CH04/Section4p2/src/Andromeda/Hardware/Impl/Service.hs | haskell | module Andromeda.Hardware.Impl.Service
( HardwareService (..)
) where
import Andromeda.Hardware.Language.Hdl (Hdl, ComponentIndex)
import Andromeda.Hardware.Impl.Device.Types (Device, DevicePart)
data HardwareService = HardwareService
{ makeDevice :: Hdl -> IO Device
, getBlankDevice :: IO Device
, get... | |
ed00204b74b62148b74fe01f1bd1ec185e450204b8b0d2c6e5aee15579523fbe | csabahruska/jhc-components | Binary.hs | module Info.Binary(putInfo, Info.Binary.getInfo) where
import Data.Dynamic
import qualified Data.Map as Map
import C.FFI(FfiExport)
import Data.Binary
import E.CPR
import GenUtil
import Info.Info
import Info.Types
import Util.BitSet as BS
import qualified E.Demand
data Binable = forall a . (Typeable a, Binary a, Sho... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-core/src/Info/Binary.hs | haskell | Ho.Binary and invalidate all old files. | module Info.Binary(putInfo, Info.Binary.getInfo) where
import Data.Dynamic
import qualified Data.Map as Map
import C.FFI(FfiExport)
import Data.Binary
import E.CPR
import GenUtil
import Info.Info
import Info.Types
import Util.BitSet as BS
import qualified E.Demand
data Binable = forall a . (Typeable a, Binary a, Sho... |
de6035c9d50fd4fe6c8d67c21d2d8b821b37373070cf9aed01771f6da6bfd02a | ocaml-ppx/ocamlformat | profiles.ml | let a = aaaaaaaaaa aaaaaaaaa
let b = bbbbbbbbbb bbbbbbbbb
| null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/profiles.ml | ocaml | let a = aaaaaaaaaa aaaaaaaaa
let b = bbbbbbbbbb bbbbbbbbb
| |
fcb75e146d47fc5cc9047b8d5a41c1f7af41b6bd1511508d3664283c756f8fef | songyahui/AlgebraicEffect | t0_foo.ml | effect Foo : (unit -> unit)
let f g
(*@ requires eff(g) = emp, true, emp @*)
@ ensures @
= perform Foo
let h n
@ requires . Q(Foo 1 ) @
@ ensures @
= perform Foo ()
let h n
@ requires emp , 1 + ( 2 - 1 ) < 1 @
(*@ ensures emp @*)
= perform Foo ()
(*
Current effects |- Pre condition
Pre condit
*)
let res... | null | https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/programs.t/t0_foo.ml | ocaml | @ requires eff(g) = emp, true, emp @
@ ensures emp @
Current effects |- Pre condition
Pre condit
@ requires emp @ | effect Foo : (unit -> unit)
let f g
@ ensures @
= perform Foo
let h n
@ requires . Q(Foo 1 ) @
@ ensures @
= perform Foo ()
let h n
@ requires emp , 1 + ( 2 - 1 ) < 1 @
= perform Foo ()
let res_f
@ ensures
=
match f () with
| _ -> ()
| effect Foo k ->
continue k (fun () -> ())
f : : in... |
e314b06e29af0705e04e026850f7b88f5650956baa9b1fa85664c74f6c03a916 | rizo/snowflake-os | bitBuffer.ml |
ALAC : Bit Buffer
(* we're not using pointers, so don't need the "end" pointer *)
type t = {
buffer : string;
mutable current : int;
mutable bit_index : int;
byte_size : int;
}
let get bits offset =
Char.code bits.buffer.[bits.current + offset]
let empty = { buffer = ""; current = 0; bit_index = 0; byte_si... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/alac/bitBuffer.ml | ocaml | we're not using pointers, so don't need the "end" pointer
the compare after step; this works because the initial value passes test
step
not sure if the above is correct; this one more closely resembles original |
ALAC : Bit Buffer
type t = {
buffer : string;
mutable current : int;
mutable bit_index : int;
byte_size : int;
}
let get bits offset =
Char.code bits.buffer.[bits.current + offset]
let empty = { buffer = ""; current = 0; bit_index = 0; byte_size = 0 }
let create buffer byte_size =
{ buffer = buffer; curr... |
6719f00e89aa4c0d65a5500805654dc0ceca942908db97f3efd00f442e8cafa0 | robstewart57/hdph-rs | HdpH.hs |
HdpH programming interface
--
Author : ,
-----------------------------------------------------------------------------
# LANGUAGE GeneralizedNewtypeDeriving #
for ' Par '
for ' Par '
# LANGUAGE TemplateHaskell #
{-# LANGUAGE RankNTypes #-} -- for 'mkClosure', etc.
# LANGUAGE NoMonomorphismRes... | null | https://raw.githubusercontent.com/robstewart57/hdph-rs/5074e7de02ec13707361b1c117fa25c8a796b59e/src/Control/Parallel/HdpH.hs | haskell |
---------------------------------------------------------------------------
# LANGUAGE RankNTypes #
for 'mkClosure', etc.
* runtime system
:: RTSConf -> RTS () -> IO ()
:: RTS Bool
:: RTS ()
:: IO a -> RTS a
* runtime system configuration
:: Par a -> RTS a
:: RTSConf -> Par () -> IO ()
:: RTSConf -> Par a ->... |
HdpH programming interface
Author : ,
# LANGUAGE GeneralizedNewtypeDeriving #
for ' Par '
for ' Par '
# LANGUAGE TemplateHaskell #
# LANGUAGE NoMonomorphismRestriction #
module Control.Parallel.HdpH
* - > * ; instances : Functor , Monad
module Control.Parallel.HdpH.Conf,
* Par monad
* - > * ... |
31d2cbd7f5f6b99cbe5f28ffd8a5149a8a974091449787fc9acd9c88bd02e333 | kiselgra/chipotle | laplace.lisp | (require :chipotle)
(in-package :chipotle)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Helper functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(lisp
(defun LoG (x y sigma)
(* (- (/ 1 (* (float pi 1.00000) (expt sigma 4))))
(- 1 (/ (+ (* x x) (* y y))
(* 2 sigma sigma)))
(exp (- (/ (+ (* x x) (* y y))
(* 2 s... | null | https://raw.githubusercontent.com/kiselgra/chipotle/392525f14433c334f817ba71c7090fda05e41ef7/examples/src/laplace.lisp | lisp |
Helper functions
no proper integration, just a normalized hack.
Filter definition
| (require :chipotle)
(in-package :chipotle)
(lisp
(defun LoG (x y sigma)
(* (- (/ 1 (* (float pi 1.00000) (expt sigma 4))))
(- 1 (/ (+ (* x x) (* y y))
(* 2 sigma sigma)))
(exp (- (/ (+ (* x x) (* y y))
(* 2 sigma sigma))))))
(defun gaussian (x y sigma)
(* (/ 1 (* 2 (float pi 1.00000) s... |
ed219a5a34d6322e79a23da097db2971e8d3d739ee814c0abdd02d5375a13c18 | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.admin.widgets.page.content.views
(:require
[reagent.core :as r]
[webchange.admin.widgets.page.block.views :refer [block]]
[webchange.ui.index :refer [get-class-name]]))
(def component-class-name "widget--side-bar-page--main-content")
(defn content
[{:keys [class-name class-name-content t... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/5d5b492712fe34db3ea3b23230c8ad87f94e5865/src/cljs/webchange/admin/widgets/page/content/views.cljs | clojure | (ns webchange.admin.widgets.page.content.views
(:require
[reagent.core :as r]
[webchange.admin.widgets.page.block.views :refer [block]]
[webchange.ui.index :refer [get-class-name]]))
(def component-class-name "widget--side-bar-page--main-content")
(defn content
[{:keys [class-name class-name-content t... | |
401927e559a3f1105e45e1d5ce137fa4a567339f06b8c9e9758fbe0663c66113 | clojerl/clojerl | clojerl.Vector.erl | -module('clojerl.Vector').
-include("clojerl.hrl").
-include("clojerl_int.hrl").
-behavior('clojerl.IAssociative').
-behavior('clojerl.ICounted').
-behavior('clojerl.IColl').
-behavior('clojerl.IEquiv').
-behavior('clojerl.IEncodeErlang').
-behavior('clojerl.IFn').
-behavior('clojerl.IHash').
-behavior('clojerl.ILook... | null | https://raw.githubusercontent.com/clojerl/clojerl/506000465581d6349659898dd5025fa259d5cf28/src/erl/lang/collections/clojerl.Vector.erl | erlang | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
clojerl.IAssociative
clojerl.ICounted
clojerl.IEquiv
clojerl.IFn
clojerl.IIndexed
clojerl.IStack
clojerl.IStringable
--------------------------------------... | -module('clojerl.Vector').
-include("clojerl.hrl").
-include("clojerl_int.hrl").
-behavior('clojerl.IAssociative').
-behavior('clojerl.ICounted').
-behavior('clojerl.IColl').
-behavior('clojerl.IEquiv').
-behavior('clojerl.IEncodeErlang').
-behavior('clojerl.IFn').
-behavior('clojerl.IHash').
-behavior('clojerl.ILook... |
d8a2963924c82b0c29094050dba3662b690a07c51fcbb596067020165b6b22f2 | yqrashawn/GokuRakuJoudo | misc.clj | (ns karabiner-configurator.misc
(:require [cheshire.core :as json]
[clojure.edn :as edn]
[clojure.java.io :as io]))
(defn massert
"Assert without stacktrace"
[exp error-str]
(let [error-str (str "ERROR: " error-str)]
(if (= (System/getenv "GOKU_IS_DEV") "1")
(assert exp error-... | null | https://raw.githubusercontent.com/yqrashawn/GokuRakuJoudo/9bcdb16b3b9a0ec61a8f29c6d595c6280df87e66/src/karabiner_configurator/misc.clj | clojure | (defmacro when-let*
"Multiple binding version of when-let"
[bindings & body]
(if (seq bindings)
`(do ~@body))) | (ns karabiner-configurator.misc
(:require [cheshire.core :as json]
[clojure.edn :as edn]
[clojure.java.io :as io]))
(defn massert
"Assert without stacktrace"
[exp error-str]
(let [error-str (str "ERROR: " error-str)]
(if (= (System/getenv "GOKU_IS_DEV") "1")
(assert exp error-... |
b349203106034908e3b75867fa32479f1acf90174a53e94da3bef7ba3c658101 | andreasabel/miniagda | License.hs | -- This file was autogenerated from LICENSE, do not edit!!
# LANGUAGE QuasiQuotes #
module License where
import Data.String.QQ
copyright :: String
copyright = head (lines license)
license :: String
license = [s|
Copyright (c) 2007-2014 Andreas Abel and Karl Mehltretter.
Permission is hereby granted, free of charg... | null | https://raw.githubusercontent.com/andreasabel/miniagda/ada2cffa427e835f0fed39c64cdde0fbc03febab/src/License.hs | haskell | This file was autogenerated from LICENSE, do not edit!! |
# LANGUAGE QuasiQuotes #
module License where
import Data.String.QQ
copyright :: String
copyright = head (lines license)
license :: String
license = [s|
Copyright (c) 2007-2014 Andreas Abel and Karl Mehltretter.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and asso... |
93f6225aad17689578e7397a0478f5c3a6a54316c0846e14e2b38fda695c6318 | maximedenes/native-coq | nametab.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/library/nametab.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* This module contains the tables fo... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Errors
open Util
open Pp... |
fa77fa71b533ff267b529f487a38825c5d7c8fc8dc48515aef00713e031da487 | FranklinChen/hugs98-plus-Sep2006 | Queue.hs | module Data.Graph.Inductive.Internal.Queue(
-- * Type
Queue(..),
-- * Operations
mkQueue, queuePut, queuePutList, queueGet, queueEmpty
) where
data Queue a = MkQueue [a] [a]
mkQueue :: Queue a
mkQueue = MkQueue [] []
queuePut :: a -> Queue a -> Queue a
queuePut item (MkQueue ins outs) = MkQueue (ite... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/fgl/Data/Graph/Inductive/Internal/Queue.hs | haskell | * Type
* Operations | module Data.Graph.Inductive.Internal.Queue(
Queue(..),
mkQueue, queuePut, queuePutList, queueGet, queueEmpty
) where
data Queue a = MkQueue [a] [a]
mkQueue :: Queue a
mkQueue = MkQueue [] []
queuePut :: a -> Queue a -> Queue a
queuePut item (MkQueue ins outs) = MkQueue (item:ins) outs
queuePutList :: [a] -... |
c7c522ad3a38bb1095063c84cf974ca6c043a053262634362824aee0f01e735c | theodormoroianu/SecondYearCourses | HaskellChurch_20210415163326.hs | {-# LANGUAGE RankNTypes #-}
module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = "cBool " <> show (cIf b True False)
The boolean constant true always ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163326.hs | haskell | # LANGUAGE RankNTypes #
The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply i... | module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = "cBool " <> show (cIf b True False)
The boolean constant true always chooses the first alternativ... |
f9391cbe88a89ae231aaa7d06b53a7e04a270be51fd13d7a9415a44b7a9e5ad1 | huangz1990/SICP-answers | 41-double.scm | 41-double.scm
(define (double f)
(lambda (x)
(f (f x))))
| null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp1/code/41-double.scm | scheme | 41-double.scm
(define (double f)
(lambda (x)
(f (f x))))
| |
b100ddba25632af540b26f7640be912d60fad3fd0b1403ea0d5ca945348f2112 | fulcrologic/fulcro | ident_optimized_render.cljc | (ns com.fulcrologic.fulcro.rendering.ident-optimized-render
"A render optimization algorithm for refreshing the UI via props tunnelling (setting new props on a component's
state in a pre-agreed location). This algorithm analyzes database changes and on-screen components to update
components (by ident) whose props... | null | https://raw.githubusercontent.com/fulcrologic/fulcro/3d6442da84d240f0dbbe2338aa43349dcaca6f03/src/main/com/fulcrologic/fulcro/rendering/ident_optimized_render.cljc | clojure | otherwise | (ns com.fulcrologic.fulcro.rendering.ident-optimized-render
"A render optimization algorithm for refreshing the UI via props tunnelling (setting new props on a component's
state in a pre-agreed location). This algorithm analyzes database changes and on-screen components to update
components (by ident) whose props... |
ff96ec92af1cc986771a020a953650e1b8cfdb50a2ed76ca0236e3c8556d99e1 | ghc/nofib | Main.hs | The Game of Life
( from )
import Control.Monad
import System.Environment
start :: [[Int]]
start = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[0,0,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0]]
-- Calculating the next generation
gen n board = map row (shift (copy n 0) board)
row (last,this,next... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/life/Main.hs | haskell | Calculating the next generation
Test to see if we have reached a fixpoint
Generating and displaying a sequence of generations. Rather than
display all the generations, we just display the number of generations
it takes to reach a fixpoint, plus the last generations. | The Game of Life
( from )
import Control.Monad
import System.Environment
start :: [[Int]]
start = [[],[],[],[],[],[],[],[],[],[],[],[],[],[],
[0,0,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0,1,1,1,1,1,0]]
gen n board = map row (shift (copy n 0) board)
row (last,this,next)
= zipWith3 elt (shift 0 last) (... |
1d73ac9fd389b4559e7c29b837c8e10cb0be78939b0e273e7d3dceab0911f435 | ofmooseandmen/jord | Rotation.hs | -- |
Module : Data . Geo . . Rotation
Copyright : ( c ) 2020
License : BSD3
Maintainer : < >
-- Stability: experimental
-- Portability: portable
--
Rotation matrices from / to 3 angles about new axes .
--
-- In order to use this module you should start with the following imports:
--
--... | null | https://raw.githubusercontent.com/ofmooseandmen/jord/9acd8d9aec817ce05de6ed1d78e025437e1193bf/src/Data/Geo/Jord/Rotation.hs | haskell | |
Stability: experimental
Portability: portable
In order to use this module you should start with the following imports:
@
@
All functions are implemented using the vector-based approached described in
| Angles about new axes in the xyz-order from a rotation matrix.
defined by the following procedure o... | Module : Data . Geo . . Rotation
Copyright : ( c ) 2020
License : BSD3
Maintainer : < >
Rotation matrices from / to 3 angles about new axes .
import qualified Data . Geo . . Angle as Angle
import Data . Geo . Jord . Math3d ( V3 ( .. ) )
import qualified Data . Geo . . Rotation as... |
7aa6299eefc8abcc64c2a4907c4d54f8815fd65b16e6e57322b6ea667eae1fb1 | ocamllabs/ocaml-effects | typedtree.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/typing/typedtree.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
open Misc
open Asttypes
open Types
t... |
12012460e62b323e2b7627ea5e4c7a87d045ffec0b9ce6cdbc41d26f938016e2 | realworldocaml/book | ppx_disable_unused_warnings.ml | open Base
open Ppxlib
open Ast_builder.Default
let disabled_warnings = "-26-27-32-33-34-35-36-37-38-39-60-66-67"
let payload ~loc = PStr [ pstr_eval ~loc (estring ~loc disabled_warnings) [] ]
let expand_disabled_unused_warnings_attribute attr =
assert (String.equal attr.attr_name.txt "disable_unused_warnings");
l... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_disable_unused_warnings/src/ppx_disable_unused_warnings.ml | ocaml | The ~rules argument isn't expressive enough to use here (it can't handle attributes
in all positions | open Base
open Ppxlib
open Ast_builder.Default
let disabled_warnings = "-26-27-32-33-34-35-36-37-38-39-60-66-67"
let payload ~loc = PStr [ pstr_eval ~loc (estring ~loc disabled_warnings) [] ]
let expand_disabled_unused_warnings_attribute attr =
assert (String.equal attr.attr_name.txt "disable_unused_warnings");
l... |
a31f5624fbc94669219a3bb8f28cab34fc7fc4ee05982dc1adaacfe7fa909d51 | linearray/mealstrom | FSMStore.hs | # LANGUAGE MultiParamTypeClasses #
|
Module : .
Description : for FSMStores
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Module : Mealstrom.FSMStore
Description : Typeclass for FSMStores
Copyright : (c) Max Amanshauser, 2016
License : MIT
Maintainer :
-}
module Me... | null | https://raw.githubusercontent.com/linearray/mealstrom/802bc8c06734d447c1193359a6a853da9c578176/src/Mealstrom/FSMStore.hs | haskell | |Even the Read method needs type parameters 'e' and 'a' because it needs to deserialise the entry from storage.
Implementations are expected to not throw exceptions in fsmRead/fsmCreate. | # LANGUAGE MultiParamTypeClasses #
|
Module : .
Description : for FSMStores
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Module : Mealstrom.FSMStore
Description : Typeclass for FSMStores
Copyright : (c) Max Amanshauser, 2016
License : MIT
Maintainer :
-}
module Me... |
e6b14f2e5ed2f7856370f1f00edab502439ea886e2462aa384fc7c8da18951d0 | TempusMUD/cl-tempus | structs.lisp | (in-package :tempus)
(defclass extra-descr-data ()
((keyword :accessor keyword-of :initarg :keyword :initform nil)
(description :accessor description-of :initarg :description :initform nil)))
(defparameter +special-cmd+ 0) ; special command response
(defparameter +special-tick+ 1) ; special peri... | null | https://raw.githubusercontent.com/TempusMUD/cl-tempus/c5008c8d782ba44373d89b77c23abaefec3aa6ff/src/definitions/structs.lisp | lisp | special command response
special periodic action
special death notification
special fight starting
special in-combat ability
special upon entrance
special upon exit
zone reset | (in-package :tempus)
(defclass extra-descr-data ()
((keyword :accessor keyword-of :initarg :keyword :initform nil)
(description :accessor description-of :initarg :description :initform nil)))
(defvar *special-funcs* (make-hash-table :test 'equal))
(defvar *special-flags* (make-hash-table :test 'equal))
|
ef6156db2d8a21e2da4d6367bcde98b76ba0e8ecc70e0041aad97fde9edf54b5 | openmusic-project/RQ | heap.lisp | ;;; Priority Queue ;;;
Author :
(use-package :om :rq)
(in-package :rq)
;; A heap used to hold all the candidates
(defstruct (heap (:print-function print-queue))
(elts) ; a list of all the elements that have already been created. Used to forbid duplicates.
(queue)) ; the queue containing a... | null | https://raw.githubusercontent.com/openmusic-project/RQ/d6b1274a4462c1500dfc2edab81a4425a6dfcda7/src/algorithm/structure/heap.lisp | lisp | Priority Queue ;;;
A heap used to hold all the candidates
a list of all the elements that have already been created. Used to forbid duplicates.
the queue containing all the elements and their weights. It is a node structure.
weight of the candidate (see weight.lisp)
the run associated to the candidate (see run.li... | Author :
(use-package :om :rq)
(in-package :rq)
(defstruct (heap (:print-function print-queue))
(defstruct (node
(:constructor make-node ( w elt left right &optional (empty nil)))
(:constructor empty-node (&optional (w nil) (elt nil) (left nil) (right nil) (empty t)))
(... |
db9ef27a3acb133852065948e83150c43122cd3ba61b3aa676db85d5ce6c27b8 | gwathlobal/CotD | ai-common.lisp | (in-package :cotd)
(defgeneric ai-function (mob))
(defparameter *ms-inside-path* 0)
(defparameter *ms-inside-path-start* 0)
(defun check-move-for-ai (mob dx dy dz cx cy cz &key (final-dst nil))
(declare (optimize (speed 3))
(type fixnum dx dy dz cx cy cz))
(let ((sx 0) (sy 0) (move-resul... | null | https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/ai/ai-common.lisp | lisp | calculate the coords of the mob's NE corner
cant move beyond level borders
can move if not impassable
can move if a door (not important if open or closed)
can move if a window & you can open windows
can go anywhere horizontally or directly up/below if the current tile is water
can go from down to up if ... | (in-package :cotd)
(defgeneric ai-function (mob))
(defparameter *ms-inside-path* 0)
(defparameter *ms-inside-path-start* 0)
(defun check-move-for-ai (mob dx dy dz cx cy cz &key (final-dst nil))
(declare (optimize (speed 3))
(type fixnum dx dy dz cx cy cz))
(let ((sx 0) (sy 0) (move-resul... |
c0e1807731678be45934d4e75af8ed072c9be2e8f8a109a6091c0ba0e29b04b8 | aib/Project-Euler | euler104.hs | import Data.Digits
import Common
pandigitalFirst = (pandigital 9) . (take 9) . (digits 10)
pandigitalLast = (pandigital 9) . (take 9) . reverse . (digits 10)
main =
print $ head $ Prelude.filter (\(x,y) -> pandigitalFirst y && pandigitalLast y) fibI
| null | https://raw.githubusercontent.com/aib/Project-Euler/a01a142d360f3a30fcea69ab29d4d198160ee921/euler104.hs | haskell | import Data.Digits
import Common
pandigitalFirst = (pandigital 9) . (take 9) . (digits 10)
pandigitalLast = (pandigital 9) . (take 9) . reverse . (digits 10)
main =
print $ head $ Prelude.filter (\(x,y) -> pandigitalFirst y && pandigitalLast y) fibI
| |
065e0b32d6283e79a5a591ec1ea06f1b8a2990757e94115fe83172583c47c0a9 | racket/plai | mv.rkt | #lang plai/gc2/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 40)
(define (f x y)
(values (+ x 11) (+ y 3)))
(let-values ([(x y) (values 1 2)])
(let-values ([(a b) (f x y)])
(let-values ([(a b) (f a b)])
(+ a b))))
(values 1 2)
(values 3 4 5 6 7) | null | https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc2/good-mutators/mv.rkt | racket | #lang plai/gc2/mutator
(allocator-setup "../good-collectors/good-collector.rkt" 40)
(define (f x y)
(values (+ x 11) (+ y 3)))
(let-values ([(x y) (values 1 2)])
(let-values ([(a b) (f x y)])
(let-values ([(a b) (f a b)])
(+ a b))))
(values 1 2)
(values 3 4 5 6 7) | |
db25bf5fb95e66307ec14939c94b747e661fe49f1427324731e34894bfecfc87 | lambda-fairy/robot | Jack.hs | -- | A simple typing automaton. Supports ASCII letters, spaces and newlines.
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class (liftIO)
import Data.Ratio ((%))
import System.Random (randomRIO)
import Test.Robot
main :: IO ()
main = runRobot . forever $ do
typeText fudge "All work and n... | null | https://raw.githubusercontent.com/lambda-fairy/robot/3b851d733c5835f04a7c4538e5fca1e1f42a7665/examples/Jack.hs | haskell | | A simple typing automaton. Supports ASCII letters, spaces and newlines.
This program is a horrible typist
^ Action to perform between each key press
^ Input string |
import Control.Applicative
import Control.Monad
import Control.Monad.IO.Class (liftIO)
import Data.Ratio ((%))
import System.Random (randomRIO)
import Test.Robot
main :: IO ()
main = runRobot . forever $ do
typeText fudge "All work and no play makes Jack a dull boy\n"
sleep . (% 5) =<< rand (1, 10)
where
... |
f84530a1ad1daccfb2165140426964d7450c1dcc3d50e3a9a1247c26ebd86fe8 | MyDataFlow/ttalk-server | directory_handler.erl | %% Feel free to use, reuse and abuse the code in this file.
%% @doc Directory handler.
-module(directory_handler).
%% REST Callbacks
-export([init/3]).
-export([rest_init/2]).
-export([allowed_methods/2]).
-export([resource_exists/2]).
-export([content_types_provided/2]).
%% Callback Callbacks
-export([list_json/2])... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/web_server/src/directory_handler.erl | erlang | Feel free to use, reuse and abuse the code in this file.
@doc Directory handler.
REST Callbacks
Callback Callbacks |
-module(directory_handler).
-export([init/3]).
-export([rest_init/2]).
-export([allowed_methods/2]).
-export([resource_exists/2]).
-export([content_types_provided/2]).
-export([list_json/2]).
-export([list_html/2]).
init(_Transport, _Req, _Paths) ->
{upgrade, protocol, cowboy_rest}.
rest_init(Req, Paths) ->
{ok,... |
e867d4289b88df5814a88a1a48e85b6a35ded26f4d627516f348a6b7f3ccd56d | mbutterick/beautiful-racket | test.rkt | #lang passthrough-demo
"hello world"
(+ 1 (* 2 (- 3))) | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/passthrough-demo/test.rkt | racket | #lang passthrough-demo
"hello world"
(+ 1 (* 2 (- 3))) | |
7cfe44182a1f5ae09342ebbd27c60bbbb3afd3d34e0857ca5fd64ed5ef0cca8f | jixiuf/helloerlang | start_pong.erl | -module(start_pong).
-export([start/0]).
% starts pong
start() ->
register(flood_pong, spawn(fun() -> pong_loop() end)).
pong_loop() ->
receive
{{Sender, SenderNode}, Any} ->
% pong back
{Sender, SenderNode} ! {pong, Any},
pong_loop();
shutdown ->
... | null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/benchmark/src/start_pong.erl | erlang | starts pong
pong back | -module(start_pong).
-export([start/0]).
start() ->
register(flood_pong, spawn(fun() -> pong_loop() end)).
pong_loop() ->
receive
{{Sender, SenderNode}, Any} ->
{Sender, SenderNode} ! {pong, Any},
pong_loop();
shutdown ->
io:format("pong shutdown~n",[]);
... |
ca40188a76affb28162fec99b6c5e21438f67f7a9a414ff800c725dafb15d200 | fwcd/curry-language-server | Concurrent.hs | # LANGUAGE LambdaCase #
module Curry.LanguageServer.Utils.Concurrent
( Debouncer
, ConstDebouncer
, debounce
, debounceConst
) where
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (async, race, cancel)
import Control.Concurrent.Chan (newChan, readChan, writeChan)
import Con... | null | https://raw.githubusercontent.com/fwcd/curry-language-server/993106098b4b9ed3aa13fbc2618db79624e560a9/src/Curry/LanguageServer/Utils/Concurrent.hs | haskell | | A simple debouncer that fires when n microseconds have passed since the last call.
Source:
Wait until no more entries arrive for 'delay' microseconds, then fire with the last entry
| Debounces an action without parameters. | # LANGUAGE LambdaCase #
module Curry.LanguageServer.Utils.Concurrent
( Debouncer
, ConstDebouncer
, debounce
, debounceConst
) where
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async (async, race, cancel)
import Control.Concurrent.Chan (newChan, readChan, writeChan)
import Con... |
5bced3469f2aa1154d5a3221e8e20d7d4a72c94d688ee5a3277fdf9dc4c9f6cf | iokasimov/pandora | Day.hs | # LANGUAGE UndecidableInstances #
module Pandora.Paradigm.Primary.Transformer.Day where
import Pandora.Pattern.Semigroupoid ((.))
import Pandora.Pattern.Category ((<--), (<---), (<----))
import Pandora.Pattern.Kernel (constant)
import Pandora.Pattern.Functor.Covariant (Covariant ((<-|-)))
import Pandora.Pattern.Functo... | null | https://raw.githubusercontent.com/iokasimov/pandora/68662a508749f1cf02d0178679435a24f07dcaf2/Pandora/Paradigm/Primary/Transformer/Day.hs | haskell | ), (<---), (<----))
-- f .:.. g
- constant . constant <-- f day
bca | # LANGUAGE UndecidableInstances #
module Pandora.Paradigm.Primary.Transformer.Day where
import Pandora.Pattern.Semigroupoid ((.))
import Pandora.Pattern.Kernel (constant)
import Pandora.Pattern.Functor.Covariant (Covariant ((<-|-)))
import Pandora.Pattern.Functor.Extendable (Extendable ((<<=)))
import Pandora.Pattern.... |
2e8d85a1a134363fbc89b1d22d9efb4e1116ddfd4f111c74b25cc493577104b7 | bmeurer/ocaml-arm | boyer.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/testsuite/tests/misc/boyer.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
type term =
Var of int
... |
7b4bbd5e6235c6602d16373771ee0aa6f8fd942bd69252b20cf60e219cb4e22e | tsloughter/rebar3_tests | single_app_hooks.erl | -module('single_app_hooks').
%% API exports
-export([]).
%%====================================================================
%% API functions
%%====================================================================
%%====================================================================
Internal functions
%%======... | null | https://raw.githubusercontent.com/tsloughter/rebar3_tests/090bfef7d3a4790bb6b16e4c38df6e4c0460b4b2/single_app_hooks/src/single_app_hooks.erl | erlang | API exports
====================================================================
API functions
====================================================================
====================================================================
==================================================================== | -module('single_app_hooks').
-export([]).
Internal functions
|
dad8b63474e172d3e29e9f05a428bc890d23e2d252295af6c8839c50c989af43 | samaaron/arnold | beats.clj | (ns arnold.beats
(:use [overtone.core]
[arnold rhythm synths]))
(defonce beats-bus (audio-bus 2))
;;(kill (:id synths))
(do
(def mixers (group "beat-mixers" :tail (main-synth-group)))
(def synths (group "beat-synths" :head (main-synth-group)))
(def beat-mixer (arnold-mixer :tgt mixers beats-bus 0))... | null | https://raw.githubusercontent.com/samaaron/arnold/e8daa3ba14dc0d654740750d6cf02ef42cd0fc2e/src/arnold/beats.clj | clojure | (kill (:id synths))
(kill-beats)
(short-snare)
(stick)
(crash)
(lp)
(wind)
(ring-hat)
(kick )
(wind) | (ns arnold.beats
(:use [overtone.core]
[arnold rhythm synths]))
(defonce beats-bus (audio-bus 2))
(do
(def mixers (group "beat-mixers" :tail (main-synth-group)))
(def synths (group "beat-synths" :head (main-synth-group)))
(def beat-mixer (arnold-mixer :tgt mixers beats-bus 0)))
(ctl 38 :amp 0.5)
... |
e266e486e45a6e0755bec46ade072fc5bd024cb06e66139b391580b4b4669e4f | project-oak/hafnium-verification | stop.mli |
* 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/sledge/src/stop.mli | ocaml | * Stop analysis when encountering issues |
* 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
... |
79400449d9f044b81726a4e822b2490b9cd7dc620dd4bda0c57fb8a3f28af768 | tari3x/csec-modex | imltrace.ml |
Copyright ( c ) ( ) .
This file is distributed as part of csec - tools under a BSD license .
See LICENSE file for copyright notice .
Copyright (c) Mihhail Aizatulin ().
This file is distributed as part of csec-tools under a BSD license.
See LICENSE file for copyright notice.
*)
open ... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/src/symtrace/imltrace.ml | ocaml | || at_most_n_under 0 "rewrite"
|| under "rewrite"
Iml.Exp.clip_enabled := false;
if debug_enabled () then prerr_endline "";
if debug_enabled () then List.iter (fun s -> prerr_endline (Stmt.dump s)) client;
if debug_enabled () then List.iter (fun s -> prerr_endline (Stmt.dump s)) server;
Wit... |
Copyright ( c ) ( ) .
This file is distributed as part of csec - tools under a BSD license .
See LICENSE file for copyright notice .
Copyright (c) Mihhail Aizatulin ().
This file is distributed as part of csec-tools under a BSD license.
See LICENSE file for copyright notice.
*)
open ... |
c581b9872f290dd22db625996966ce82f99876e5d6f4b6da64a574ac39e7abdc | green-coder/girouette | app.cljc | (ns acme.frontend.app
(:require [reagent.dom :as rdom]
["@radix-ui/react-icons" :as Icons]))
(defn simple-example []
[:main
[:div.bg-white.dark:bg-gray-800.p-10
[:h1.text-3xl.text-gray-600.dark:text-gray-100 "Dark Mode Test"]]
;; Demonstrates the use of arbitrary values in flex layouts
[:... | null | https://raw.githubusercontent.com/green-coder/girouette/6cd448d3e7442efcd6587d5fcb62be037b03ef7a/example/reagent-demo/src/acme/frontend/app.cljc | clojure | Demonstrates the use of arbitrary values in flex layouts
Demonstrates the use of custom colors (e.g. cat-white, cat-orange, cat-black)
Demonstrates a fix on the `divide-x` class.
Demonstrates the `divide-x-reverse` class.
Demonstrates a fix on the `divide-y` class.
Demonstrates the `divide-y-reverse` class.
Demo... | (ns acme.frontend.app
(:require [reagent.dom :as rdom]
["@radix-ui/react-icons" :as Icons]))
(defn simple-example []
[:main
[:div.bg-white.dark:bg-gray-800.p-10
[:h1.text-3xl.text-gray-600.dark:text-gray-100 "Dark Mode Test"]]
[:h1.flex.space-x-2
[:div.flex-1.p-4.text-center.rounded-lg.b... |
43b8661afde6e57b5645b3c810324838f478b0ed39b25b5708020bdd339c462f | fossas/fossa-cli | Attribution.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
module App.Fossa.Report.Attribution (
Attribution (..),
CopyrightText (..),
Dependency (..),
License (..),
LicenseContents (..),
LicenseName (..),
Project (..),
) where
import Data.Aeson
import Data.Map.Strict (Map)
import Data.Maybe (... | null | https://raw.githubusercontent.com/fossas/fossa-cli/f4111a81e978b34fad6c4bb176dc69d5f0245e17/src/App/Fossa/Report/Attribution.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
module App.Fossa.Report.Attribution (
Attribution (..),
CopyrightText (..),
Dependency (..),
License (..),
LicenseContents (..),
LicenseName (..),
Project (..),
) where
import Data.Aeson
import Data.Map.Strict (Map)
import Data.Maybe (... | |
bfc32d6364c34a3f6ddad8578d737d4cd1a515b7782c04976fcd81d9edd63502 | yannick-cw/notion-ocr | AppM.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleContexts #
module AppM where
import Control.Monad.Except
import Data.Text
import Control.Monad.Reader
import CliParser
import GHC.IO.Exception ( ioe_description )
import Control.Monad.C... | null | https://raw.githubusercontent.com/yannick-cw/notion-ocr/e67af0fa5db08e4b28cb90549b524b73ed53b6c1/src/AppM.hs | haskell | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleContexts #
module AppM where
import Control.Monad.Except
import Data.Text
import Control.Monad.Reader
import CliParser
import GHC.IO.Exception ( ioe_description )
import Control.Monad.C... | |
749da555c893a32c13d97d90f8bde7391437323bc7ce250d137f92a497b0af4b | borkdude/speculative | coal_mine_runner.cljc | (ns speculative.coal-mine-runner
(:require
coal-mine.problem-1
coal-mine.problem-2
coal-mine.problem-3
coal-mine.problem-4
coal-mine.problem-5
coal-mine.problem-6
coal-mine.problem-7
coal-mine.problem-8
coal-mine.problem-9
coal-mine.problem-10
coal-mine.problem-11
coal-mine.problem... | null | https://raw.githubusercontent.com/borkdude/speculative/4e773794a4065a84bdadd997516e52c76ab51b1f/test/speculative/coal_mine_runner.cljc | clojure | coal-mine.problem-21
coal-mine.problem-22
coal-mine.problem-23
coal-mine.problem-24
coal-mine.problem-25
coal-mine.problem-26
coal-mine.problem-27
coal-mine.problem-28
coal-mine.problem-29
coal-mine.problem-30
coal-mine.problem-31
coal-mine.problem-32
coal-mine.problem-33
coal-mine.problem-34
coal-mine.p... | (ns speculative.coal-mine-runner
(:require
coal-mine.problem-1
coal-mine.problem-2
coal-mine.problem-3
coal-mine.problem-4
coal-mine.problem-5
coal-mine.problem-6
coal-mine.problem-7
coal-mine.problem-8
coal-mine.problem-9
coal-mine.problem-10
coal-mine.problem-11
coal-mine.problem... |
ad1a650b92f064d7ff1b3ffda9f64de1f78eaa2bf83949797913c402cd9044ea | lemmaandrew/CodingBatHaskell | topping1.hs | From
Given a map of food keys and topping values , modify and return the map as follows :
if the key \"ice cream\ " is present , set its value to \"cherry\ " . In all cases , set
the key \"bread\ " to have the value \"butter\ " .
Given a map of food keys and topping values, modify and return the map as follo... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Map-1/topping1.hs | haskell | From
Given a map of food keys and topping values , modify and return the map as follows :
if the key \"ice cream\ " is present , set its value to \"cherry\ " . In all cases , set
the key \"bread\ " to have the value \"butter\ " .
Given a map of food keys and topping values, modify and return the map as follo... | |
3a0a0c0d10217c88beca1e215ad1d1add95cf2df16a4e5b1efccb1d2ed7e5b90 | mmn80/muesli | Query.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
{-# OPTIONS_HADDOCK show-extensions #-}
-----------------------------------------------------------------------------
-- |
-- Module : Database.Muesli.Query
Copyright : ( c ) 2015 - 16
License : ... | null | https://raw.githubusercontent.com/mmn80/muesli/1cb6d3baeab871e2d0232dc0201835f5e8e2b39e/src/Database/Muesli/Query.hs | haskell | # LANGUAGE FlexibleContexts #
# OPTIONS_HADDOCK show-extensions #
---------------------------------------------------------------------------
|
Module : Database.Muesli.Query
Stability : experimental
Portability : portable
The 'Transaction' monad and its primitive queries.
All queries in this module ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
Copyright : ( c ) 2015 - 16
License : MIT
Maintainer : < >
module Database.Muesli.Query
( module Database.Muesli.Types
, module Database.Muesli.Backend.Types
, Transaction
, runQuery
, TransactionAbort (..)
, lookup
... |
dd49a00a500280405d5427def55d8c14e007f0801e342b20fb276bec9c53c09d | con-kitty/categorifier-c | Types.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module Categorifier.C.CTypes.Codegen.Arrays.Types
( ToOrFromArrays (..),
CheckFinite (..),
ArraysFunType (..),
passByValue,
toArrayIdentifier,
toArrayIdentifier',
toArrayIdentPrefix,
)
where
import Categorifier.C.CTypes.DSL.CxxAst... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/167ff5cfdeb60b6fa00b10ec74033c32132d45a0/Categorifier/C/CTypes/Codegen/Arrays/Types.hs | haskell | # LANGUAGE OverloadedStrings #
This show instance is used for the autogenerated function name.
| Make functions for each type plus union constructor types
TODO(greg): This should not be something that needs to be worried about at this scope.
The rendering mechanisms should take care of it.
arrays passed by value (... | # LANGUAGE QuasiQuotes #
module Categorifier.C.CTypes.Codegen.Arrays.Types
( ToOrFromArrays (..),
CheckFinite (..),
ArraysFunType (..),
passByValue,
toArrayIdentifier,
toArrayIdentifier',
toArrayIdentPrefix,
)
where
import Categorifier.C.CTypes.DSL.CxxAst
( Identifier (..),
)
import Ca... |
9985aa6bae7e482390f393a7aa2e345a72ee4ed4806353d57ce61ddc2a2d73b8 | qmuli/qmuli | Profile.hs | # LANGUAGE TemplateHaskell #
module Qi.Config.AWS.ApiGw.ApiMethod.Profile where
import Control.Lens
import Data.Default (Default, def)
import Protolude
import Qi.Config.Identifier (ApiAuthorizerId)
data ApiMethodProfile = ApiMethodProfile {
_ampAuthId :: Maybe Ap... | null | https://raw.githubusercontent.com/qmuli/qmuli/6ca147f94642b81ab3978d502397efb60a50215b/library/Qi/Config/AWS/ApiGw/ApiMethod/Profile.hs | haskell | # LANGUAGE TemplateHaskell #
module Qi.Config.AWS.ApiGw.ApiMethod.Profile where
import Control.Lens
import Data.Default (Default, def)
import Protolude
import Qi.Config.Identifier (ApiAuthorizerId)
data ApiMethodProfile = ApiMethodProfile {
_ampAuthId :: Maybe Ap... | |
383be88a9309611fd304d77375822915c055206eee050c2ec6d9bd7542ce4698 | AdGoji/aws-api | sts.cljc | (ns adgoji.aws.sts
(:require
[adgoji.aws.util :refer [getx]]
[adgoji.aws.requests :as aws-requests]
[clojure.data.xml :as xml]))
(def assume-role-template
{:auth-info {:region "us-east-1", :service "sts", :hostname "sts.amazonaws.com"},
:request {:request-method :post, :scheme :https, :server-port 443,... | null | https://raw.githubusercontent.com/AdGoji/aws-api/de776694b4364c64397a3c40fd7769634ab02df9/src/adgoji/aws/sts.cljc | clojure | (ns adgoji.aws.sts
(:require
[adgoji.aws.util :refer [getx]]
[adgoji.aws.requests :as aws-requests]
[clojure.data.xml :as xml]))
(def assume-role-template
{:auth-info {:region "us-east-1", :service "sts", :hostname "sts.amazonaws.com"},
:request {:request-method :post, :scheme :https, :server-port 443,... | |
ae68d63925ba8a20f92807849fae32b7d28f89d818e0094719708aeaf84b316e | AHartNtkn/IotaTT | AbstractSyntax.hs | module AbstractSyntax where
import qualified Data.Map.Strict as Map
import Control.Monad.Reader hiding (liftIO)
import Control.Monad.State hiding (liftIO)
import Control.Monad.Except hiding (liftIO)
import Control.Monad.Trans.Except hiding (liftIO)
-- =*=*=*=*=*=*=*=* Proof Environment Monad *=*=*=*=*=*=*=*=*=
type ... | null | https://raw.githubusercontent.com/AHartNtkn/IotaTT/ada8e4b5aa7b525463369b56591ddc58dca91b4d/AbstractSyntax.hs | haskell | =*=*=*=*=*=*=*=* Proof Environment Monad *=*=*=*=*=*=*=*=*=
Unannotated Terms
Annotated Terms
Check if a variable occurs free in a term
Increment free variables
Weak Head Normal Form
If true, then remove names. Used only on types.
Normal Form
TO DO: MORE TESTING!!!
Annotation Erasure
Free variables need t... | module AbstractSyntax where
import qualified Data.Map.Strict as Map
import Control.Monad.Reader hiding (liftIO)
import Control.Monad.State hiding (liftIO)
import Control.Monad.Except hiding (liftIO)
import Control.Monad.Trans.Except hiding (liftIO)
type Proof = ExceptT String (ReaderT [ATerm] (StateT (Map.Map String... |
025553f690deb574f612d272c4576bcf61f2e90650102730c462881289f3b0f3 | justone/cljdev | repl.clj | (ns cljdev.repl
"Helpers for managing repl servers."
(:require
[clojure.java.io :as io]
[nrepl.server :as nrepl-server]
[clojure.core.server :as server]
[clojure.tools.namespace.repl :as namespace.repl]
[cljdev.dev]
[rebel-readline.clojure.main :as rebel-main]
[rebel-readline.core :as r... | null | https://raw.githubusercontent.com/justone/cljdev/dc9171f9f091e476a734714d128704876c7fa679/src/cljdev/repl.clj | clojure | pREPL | (ns cljdev.repl
"Helpers for managing repl servers."
(:require
[clojure.java.io :as io]
[nrepl.server :as nrepl-server]
[clojure.core.server :as server]
[clojure.tools.namespace.repl :as namespace.repl]
[cljdev.dev]
[rebel-readline.clojure.main :as rebel-main]
[rebel-readline.core :as r... |
61ab10f86ab21de367b7d8019a4b64b790adcd3155e46aced66a255513cbaffd | squaresLab/genprog-code | progeq.ml |
*
* Copyright ( c ) 2012 - 2018 ,
* < >
* < >
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are ... | null | https://raw.githubusercontent.com/squaresLab/genprog-code/7982415b347529efee02190ab9ba6bd7eda6195e/src/progeq.ml | ocaml | fprintf, fseek, etc. -- cannot move past another File_IO
global syscall, printf, etc. -- always a dependency
debugging
returned value
a statement with an _unguarded_ break or continue changes control
* flow, and thus always splits up a partition
| ComputedGoto _
A simple visitor to collect up all o... |
*
* Copyright ( c ) 2012 - 2018 ,
* < >
* < >
* < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are ... |
ddfdeb0cf61bf7b112e32d7f8ec17cde85535adafb6c846f91470ed14edc37d5 | clojure-interop/aws-api | AmazonSimpleEmailService.clj | (ns com.amazonaws.services.simpleemail.AmazonSimpleEmailService
"Interface for accessing Amazon SES.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAmazonSimpleEmailService instead.
Amazon Simple Email Service
This document contains reference inf... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.simpleemail/src/com/amazonaws/services/simpleemail/AmazonSimpleEmailService.clj | clojure | if you passed these
| (ns com.amazonaws.services.simpleemail.AmazonSimpleEmailService
"Interface for accessing Amazon SES.
Note: Do not directly implement this interface, new methods are added to it regularly. Extend from
AbstractAmazonSimpleEmailService instead.
Amazon Simple Email Service
This document contains reference inf... |
72bc6f556bee89998cdd8e13b0c84accd7639ae061db167d5987f68ef5d9f8f5 | OCamlPro/ocamlexc | outputp.ml | (***********************************************************************)
(* *)
(* Ocamlexc *)
(* *)
, projet Cris... | null | https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/typing/outputp.ml | ocaml | *********************************************************************
Ocamlexc
... | , projet Cristal , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
Dumps in a persistent file the informations resulting
let output filename mod_scope_info struct_signature type... |
b86b421121b7c9324ce0c262f44409ec257adb66590c7ae9121c02a3c6cc129b | clojure-interop/aws-api | AbstractAWSOpsWorks.clj | (ns com.amazonaws.services.opsworks.AbstractAWSOpsWorks
"Abstract implementation of AWSOpsWorks. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaw... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.opsworks/src/com/amazonaws/services/opsworks/AbstractAWSOpsWorks.clj | clojure | (ns com.amazonaws.services.opsworks.AbstractAWSOpsWorks
"Abstract implementation of AWSOpsWorks. Convenient method forms pass through to the corresponding overload
that takes a request object, which throws an UnsupportedOperationException."
(:refer-clojure :only [require comment defn ->])
(:import [com.amazonaw... | |
2dcb8c86827eb74fc8963169686f9b9535f5e67d7b676dc6ed309b93e4c2d286 | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | SetupIntentNextActionRedirectToUrl.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema SetupIntentNextActionRedirectToUrl
module StripeAPI.Types.SetupIntentNextAc... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/SetupIntentNextActionRedirectToUrl.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema SetupIntentNextActionRedirectToUrl
| Defines the object schema located at @components.schemas.setup_intent_next_action_redirect_to_url@ in the specification.
| return_url: If the customer does not exit their browser... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.SetupIntentNextActionRedirectToUrl where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal... |
718f113bb2f405e6a270e707cba5e55658f4626600c2d4a467aa7fd4cbb6cd05 | tonyg/kali-scheme | bench.scm | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
; Tiny benchmarking image.
This returns the result of calling recursive FIB on its first argument .
(define (start arg in out error)
(fib (string->integer (vector-ref arg 0))))
(define (stri... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/scheme/debug/bench.scm | scheme | Tiny benchmarking image. | Copyright ( c ) 1993 , 1994 by and .
Copyright ( c ) 1996 by NEC Research Institute , Inc. See file COPYING .
This returns the result of calling recursive FIB on its first argument .
(define (start arg in out error)
(fib (string->integer (vector-ref arg 0))))
(define (string->integer s)
(letrec ((... |
a83593dcdb479c93522a52a6843c3a5aa8e5cbb2816666b40f88d764013b70ad | blindglobe/clocc | macros.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
;;;
TEXAS INSTRUMENTS INCORPORATED
;;; P.O. BOX 2909
AUSTIN , TEXAS 78769
;;;
Copyright ( C ) 1987 Texas Instruments Incorporated .
;;;
;;; Permission is granted to any individual or institution to use,... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clx/macros.lisp | lisp | Syntax : Common - lisp ; Package : XLIB ; Base : 10 ; Lowercase : Yes -*-
P.O. BOX 2909
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
... |
TEXAS INSTRUMENTS INCORPORATED
AUSTIN , TEXAS 78769
Copyright ( C ) 1987 Texas Instruments Incorporated .
Texas Instruments Incorporated provides this software " as is " without
#+cmu
(ext:file-comment
"$Header: /cvsroot/clocc/clocc/src/gui/clx/macros.lisp,v 1.4 2003/03/10 08:58:32 pvaneynd Exp $... |
9fc9d048c6364fd2041cf6d8c4bba9868779b95090913134d1910e45bee21342 | lambdaisland/souk | activitypub.clj | (ns lambdaisland.souk.activitypub
"Interact with ActivityPub instances"
(:require [lambdaisland.souk.json-ld :as ld]))
(def common-prefixes
{"dcterms" "/"
"ldp" "#"
"schema" "/"
"vcard" "#"
"mastodon" "#"
"security" "#"
"activitystreams" "#"
"xsd" "#"
"owl" "#"
"rdfs" "-schema#"
"os... | null | https://raw.githubusercontent.com/lambdaisland/souk/8184ee40dae81df2589250f04e03d38a70757892/src/lambdaisland/souk/activitypub.clj | clojure | (ns lambdaisland.souk.activitypub
"Interact with ActivityPub instances"
(:require [lambdaisland.souk.json-ld :as ld]))
(def common-prefixes
{"dcterms" "/"
"ldp" "#"
"schema" "/"
"vcard" "#"
"mastodon" "#"
"security" "#"
"activitystreams" "#"
"xsd" "#"
"owl" "#"
"rdfs" "-schema#"
"os... | |
8e7b0516af00ff53309b7697ea4397ad73bd0731d2915fc26af439ef23006f7f | ocaml-sf/learn-ocaml-corpus | compress_no_data.ml | (* -------------------------------------------------------------------------- *)
(* Building an alphabet out of a piece of text. *)
let build_alphabet (text : text) : alphabet =
let table = Hashtbl.create 256 in
String.iter (fun symbol ->
let freq =
try
Hashtbl.find table symbol
with Not_f... | null | https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/huffman/wrong/compress_no_data.ml | ocaml | --------------------------------------------------------------------------
Building an alphabet out of a piece of text.
--------------------------------------------------------------------------
Building encoding and decoding dictionaries out of an alphabet.
The priority queue contains pairs of a tree and a fr... |
let build_alphabet (text : text) : alphabet =
let table = Hashtbl.create 256 in
String.iter (fun symbol ->
let freq =
try
Hashtbl.find table symbol
with Not_found ->
0
in
Hashtbl.replace table symbol (freq + 1)
) text;
table
module Q =
BinomialQueue(struct
type... |
5889c6f031a0cfa5a640364d7bd988d159124cc0be928486d50cf2fbebf7a3a2 | emina/rosette | callgraph.rkt | #lang racket
(require "generic.rkt"
"../../data.rkt" "../../reporter.rkt" "../../feature.rkt" "../../record.rkt"
"../syntax.rkt")
(provide make-callgraph-component)
; The callgraph component simply passes through to the client all the events
; needed to construct the call graph.
(define (make-callg... | null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/rosette/lib/profile/renderer/report/callgraph.rkt | racket | The callgraph component simply passes through to the client all the events
needed to construct the call graph. | #lang racket
(require "generic.rkt"
"../../data.rkt" "../../reporter.rkt" "../../feature.rkt" "../../record.rkt"
"../syntax.rkt")
(provide make-callgraph-component)
(define (make-callgraph-component options)
(callgraph-report-component))
(struct callgraph-report-component () #:transparent
#:me... |
16e472dd1b64a502763eefddad45db48347d0a75fd04ff713c1347868f284433 | narkisr-deprecated/core | redis.clj | (comment
re-core, Copyright 2012 Ronen Narkis, narkisr.com
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
d... | null | https://raw.githubusercontent.com/narkisr-deprecated/core/85b4a768ef4b3a4eae86695bce36d270dd51dbae/src/re_core/redis.clj | clojure | (comment
re-core, Copyright 2012 Ronen Narkis, narkisr.com
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
d... | |
9dd5b33a9c7be53cec9279b3bc389f5415bc905313b779e8876dd2847ad16be7 | grimmelm/littleton | server.ml | open Core
open Async
open Conveyances
module S = Cohttp_async.Server
module R = Cohttp_async.Request
module Json = Yojson
module Body = Cohttp_async.Body
module TOML = Util.TOML
module M = Interface . Make(Model . Tree )
(* Extract the path, split on slashes, and remove empty strings caused by
repeated slashes *... | null | https://raw.githubusercontent.com/grimmelm/littleton/efa8c90ae13b3965c81876723f6622f6d0319e80/bin/server.ml | ocaml | Extract the path, split on slashes, and remove empty strings caused by
repeated slashes | open Core
open Async
open Conveyances
module S = Cohttp_async.Server
module R = Cohttp_async.Request
module Json = Yojson
module Body = Cohttp_async.Body
module TOML = Util.TOML
module M = Interface . Make(Model . Tree )
let split (req : R.t) : string list =
List.filter ~f:(fun str -> not (String.is_empty str))
... |
28e5351c14fbaa30852dd6bc098983ec5a21c12858d63b187248d6b92caf5be0 | kupl/LearnML | patch.ml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec list_station (ipt : lambda) : string list =
match ipt with
| V a -> [ a ]
| P (a, m) ->
List.filter (fun (__s11 : string) -> __s11 != a) (list_station m)
| C (m1, m2) -> list_station m1 @ list_station m2
let... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub25/patch.ml | ocaml | type lambda = V of var | P of (var * lambda) | C of (lambda * lambda)
and var = string
let rec list_station (ipt : lambda) : string list =
match ipt with
| V a -> [ a ]
| P (a, m) ->
List.filter (fun (__s11 : string) -> __s11 != a) (list_station m)
| C (m1, m2) -> list_station m1 @ list_station m2
let... | |
5d1a5bd2b65812291ac1f01691b1caed3d747011e991f15cc3ea1fde52bcbd1f | RedPRL/redtt | RotIO.ml | open RedBasis
open Bwd
open RedTT_Core
open Contextual
module M = Monad.Notation (Contextual)
open M
module MU = Monad.Util (Contextual)
module J = Ezjsonm
(* Tm *)
exception PartialDatatype
exception Impossible of string
let unsafe_mode = ref false
let set_unsafe_mode b = unsafe_mode := b
module BasicJson =
struc... | null | https://raw.githubusercontent.com/RedPRL/redtt/50689559ff970e33013b8cf8a3bbc8be18ec4e09/src/frontend/RotIO.ml | ocaml | Tm
pure version
pure version
labeled in reverse
labeled in reverse
wow! we have "regular" kinds?
MORTALITY there's a better encoding
everything decoded except repo
MORTAL where is the monadic version of [for_all]? | open RedBasis
open Bwd
open RedTT_Core
open Contextual
module M = Monad.Notation (Contextual)
open M
module MU = Monad.Util (Contextual)
module J = Ezjsonm
exception PartialDatatype
exception Impossible of string
let unsafe_mode = ref false
let set_unsafe_mode b = unsafe_mode := b
module BasicJson =
struct
let ... |
97890ce42868059cf5e1e3efa794be03708e1ce191372139283350e458866c8d | pveber/biotk | nucleotide.mli | type t = private char
val a : t
val c : t
val g : t
val t : t
val all : t list
val card : int
val to_char : t -> char
val of_char : char -> t option
val of_char_exn : char -> t
val of_int : int -> t option
val of_int_exn : int -> t
val to_int : t -> int
val complement : t -> t
| null | https://raw.githubusercontent.com/pveber/biotk/9e6fe7fc6fcda7fd91d4d637b66db5961a4a247e/lib/nucleotide.mli | ocaml | type t = private char
val a : t
val c : t
val g : t
val t : t
val all : t list
val card : int
val to_char : t -> char
val of_char : char -> t option
val of_char_exn : char -> t
val of_int : int -> t option
val of_int_exn : int -> t
val to_int : t -> int
val complement : t -> t
| |
c3e2451ad5af05833ce40fe27fa2230b62833a55506dbb2dc1ccecf5ab24b6ae | amperity/greenlight | red.clj | (ns greenlight.test-suite.red
(:require
[clojure.test :refer [is]]
[com.stuartsierra.component :as component]
[greenlight.step :as step :refer [defstep]]
[greenlight.test :as test :refer [deftest]]))
(defstep sample-step
"A sample greenlight test step in the red test suite"
:title "Sample Step"
... | null | https://raw.githubusercontent.com/amperity/greenlight/783e6fe747926b3f2edeb8d7b3d2f3cf08aa3a09/test/greenlight/test_suite/red.clj | clojure | (ns greenlight.test-suite.red
(:require
[clojure.test :refer [is]]
[com.stuartsierra.component :as component]
[greenlight.step :as step :refer [defstep]]
[greenlight.test :as test :refer [deftest]]))
(defstep sample-step
"A sample greenlight test step in the red test suite"
:title "Sample Step"
... | |
d06a706b8e64348094f18a93882e972d07f59c8092074d70bc671759d16f4192 | GaloisInc/what4 | Partial.hs | # LANGUAGE UndecidableInstances #
|
Module : What4.Solver . Partial
Description : Representation of partial values
Copyright : ( c ) Galois , Inc 2014 - 2020
License : < >
Often , various operations on values are only partially defined ( in the case of
Crucible ex... | null | https://raw.githubusercontent.com/GaloisInc/what4/91200aa39565c156226cec6a9409a692e4022501/what4/src/What4/Partial.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveTraversable #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
** Partial
** PartialWithErr
** PartialT
----------------------------------------------------------------------
** Partial
| A partial value represents a value that may or may no... | # LANGUAGE UndecidableInstances #
|
Module : What4.Solver . Partial
Description : Representation of partial values
Copyright : ( c ) Galois , Inc 2014 - 2020
License : < >
Often , various operations on values are only partially defined ( in the case of
Crucible ex... |
8ca4daf34260e21cb3cf119db1c73cf2abb6d4c03882e0ea979149cd531b6b86 | metosin/reitit | multipart_test.clj | (ns reitit.http.interceptors.multipart-test)
TODO
| null | https://raw.githubusercontent.com/metosin/reitit/1ab075bd353966636f154ac36ae9b7990efeb008/test/clj/reitit/http/interceptors/multipart_test.clj | clojure | (ns reitit.http.interceptors.multipart-test)
TODO
| |
6bbf72bf08bfc2f8e7c48fe8d20180afb1c1c97c7d4f5889e0d476a50d5405bb | florence/diagrama | info.rkt | #lang info
(define collection 'multi)
(define deps
'("draw-lib"
("base" #:version "7.4")
"pict-lib"))
(define build-deps '())
(define pkg-desc "Implementation part of `diagrama`")
(define version "0.1")
| null | https://raw.githubusercontent.com/florence/diagrama/291f244843d7226df4b7cb763bc3d6b1e98af71b/diagrama-lib/info.rkt | racket | #lang info
(define collection 'multi)
(define deps
'("draw-lib"
("base" #:version "7.4")
"pict-lib"))
(define build-deps '())
(define pkg-desc "Implementation part of `diagrama`")
(define version "0.1")
| |
5e844527df060424972178500ec156598180e79fa4cb562bb8aeb7a17d27a073 | zotonic/zotonic | z_email_server.erl | @author < >
2010 - 2021 Maximonster Interactive Things
%% @doc Email server. Queues, renders and sends e-mails.
Copyright 2010 - 2021 Maximonster Interactive Things
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_core/src/smtp/z_email_server.erl | erlang | @doc Email server. Queues, renders and sends e-mails.
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.
S... | @author < >
2010 - 2021 Maximonster Interactive Things
Copyright 2010 - 2021 Maximonster Interactive Things
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_email_server).
-author("Atilla Erdodi <>").
-au... |
48272346fa51adfe1de55b2b653a2410da3e3a83ff980e187f6c71eb2fee23e3 | ajnsit/wai-routes | DefaultRoute.hs | # LANGUAGE TypeFamilies #
|
Module : Routes . DefaultRoute
Copyright : ( c ) 2013 - 2015
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable ( uses ghc extensions )
Defines a DefaultMaster datatype and associated ... | null | https://raw.githubusercontent.com/ajnsit/wai-routes/4d6b240af57a95353373ddba81c4905db0234459/src/Routes/DefaultRoute.hs | haskell | Default master datatype, which is used for "unrouted" handlers
This makes it possible to define handlers without routing stuff
The associated route simply contains all path information | # LANGUAGE TypeFamilies #
|
Module : Routes . DefaultRoute
Copyright : ( c ) 2013 - 2015
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable ( uses ghc extensions )
Defines a DefaultMaster datatype and associated ... |
07d5712145a0b5986c795a0a8831ed6111e1fdf6c31e17ba831ae50c9f1e3957 | yrashk/erlang | dets_v9.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/stdlib/src/dets_v9.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2001 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(dets_v9).
Dets files , implement... |
88bb6b0c0979448b6ce6500c976bcecb3f3a6a61c5893bbf8906fdda0c6a0acc | Spivoxity/obc-3 | yyparse.ml |
* yyparse.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... | null | https://raw.githubusercontent.com/Spivoxity/obc-3/9e5094df8382ac5dd25ff08768277be6bd71a4ae/yacc/yyparse.ml | ocaml | Length of rhs during action
Count tokens to shift after error
double -- double the size of a stack
yyparse -- parser engine
Make engine reentrant
Current token
Text of token for debugging
Semantic value of token
Start of token
End of token
debug -- print debugging line
scan -- fetch and decode ne... |
* yyparse.ml
*
* This file is part of the Oxford Oberon-2 compiler
* Copyright ( c ) 2006 - -2016 J. M. Spivey
* All rights reserved
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
* 1... |
c1842d2fa7611fac8a06cf378d752d76bbb504fcef8fe7423d547614b992976a | ssardina/ergo | delivery-bat.scm | This the BAT for a LEGO delivery robot
(include "delivery-map.scm")
(define-fluents
location 1 ; where the robot was last located on the map
0,1,2,3 according to the last orientation of the robot
in-transit? #f ; is the robot between locations?
loading? #f ; is the robot loading/unloadin... | null | https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/Projects/LEGO/delivery-bat.scm | scheme | where the robot was last located on the map
is the robot between locations?
is the robot loading/unloading packages?
a list of (pkg from to) items that are with the robot
a list of (pkg from to) items that are awaiting pickup
a list of (pkg from to) items that have been delivered
the endogenous actions
the exo... | This the BAT for a LEGO delivery robot
(include "delivery-map.scm")
(define-fluents
0,1,2,3 according to the last orientation of the robot
(define-action (leave-location! r)
#:prereq (and (not in-transit?) (next-location location orientation))
in-transit? #t)
(define-action (turn! r dir)
#:prereq (... |
99042478cd5ce30d9a7670a5931fb565e87df24ef2c7f41430006ebdb0d120b7 | stamourv/synth | drum.rkt | #lang racket
(require math/array)
(require "synth.rkt")
(provide drum)
(define (random-sample) (- (* 2.0 (random)) 1.0))
;; Drum "samples" (Arrays of floats)
TODO compute those at compile - time
(define bass-drum
(let ()
0.05 seconds of noise whose value changes every 12 samples
(define n-samples ... | null | https://raw.githubusercontent.com/stamourv/synth/fecdc2d209d558dc1f203938eafdc6719e8b379a/drum.rkt | racket | Drum "samples" (Arrays of floats)
limited drum machine
drum patterns are simply lists with either O (bass drum), X (snare) or
#f (pause)
TODO more drums, cymbals, etc. | #lang racket
(require math/array)
(require "synth.rkt")
(provide drum)
(define (random-sample) (- (* 2.0 (random)) 1.0))
TODO compute those at compile - time
(define bass-drum
(let ()
0.05 seconds of noise whose value changes every 12 samples
(define n-samples (seconds->samples 0.05))
(defi... |
f85765200fb37483c03cea0ad73e75306eb1dd1572c691f5e84902744c06a1ae | metaocaml/ber-metaocaml | includecore.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/typing/includecore.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Asttypes
open Path
open Types
open Typedtree
exception Dont_match
let value_descriptions ~loc en... |
1279c4d58b8c8fd1be150d3f4a035affa5ebfbcb1ee0e2e63d46122fbf1de37b | GaloisInc/haskell-tor | Tor.hs | # LANGUAGE ExistentialQuantification #
|The high - level interface to the Tor implementation . Basic usage , for
using Tor as a mechanism for connecting to Internet services anonymously :
--
-- @
-- main :: IO ()
-- main =
-- do tor <- startTor systemNetworkStack defaultTorOptions
" hostname.com "
... | null | https://raw.githubusercontent.com/GaloisInc/haskell-tor/e5bfe82f63722292df5634686195f85e3a7857b2/src/Tor.hs | haskell |
@
main :: IO ()
main =
do tor <- startTor systemNetworkStack defaultTorOptions
[] -> ...
((x, _):_) ->
torWrite sock ...
...
@
systemNetworkStack, above.
* Setup and initialization
* Options
* Functions for Tor entrance nodes
|A handle to the current Tor system st... | # LANGUAGE ExistentialQuantification #
|The high - level interface to the Tor implementation . Basic usage , for
using Tor as a mechanism for connecting to Internet services anonymously :
" hostname.com "
case of
do sock < - torConnect tor x 80
resp sock 1024
HaLVM ... |
d7b22516d1d94f2851f73b22817ddce04b65e610c5639b8c695c581b56e8d07e | flotsfacetieux/sorcery-es | contact.lisp | (in-package :sorcery-es)
(defclass contact-system (system)
())
(defun open-door-p (entity-manager door)
(let ((lock (entity-component entity-manager door 'lock))
(item (player-bag-item entity-manager)))
(or *cheat-mode*
(not (lockedp lock))
(and item (unlockp lock (item-type item))))))
(defun contact-door... | null | https://raw.githubusercontent.com/flotsfacetieux/sorcery-es/9780a31fa2b61451d294cc23775b30098fcd3b4d/contact.lisp | lisp | (in-package :sorcery-es)
(defclass contact-system (system)
())
(defun open-door-p (entity-manager door)
(let ((lock (entity-component entity-manager door 'lock))
(item (player-bag-item entity-manager)))
(or *cheat-mode*
(not (lockedp lock))
(and item (unlockp lock (item-type item))))))
(defun contact-door... | |
3d11424d98cd9f3fd7333ce9d26a955806e580de0ff9061ab5f4873384bef516 | b0-system/b0 | b00_ui.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2018 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/src/b00/kit/b00_ui.mli | ocaml | * User interaction fragments.
User interaction fragments for devising build tools. | ---------------------------------------------------------------------------
Copyright ( c ) 2018 The b0 programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
a026b1e42678b78f84b1bc39dc7cf18a0a066073c4777911627dca635e5a48f1 | janestreet/ppx_css | ppx_css.mli | open! Core
open! Ppxlib
open Css_jane
module Options = Options
module For_css_inliner : sig
val gen_struct : options:Options.t -> string
val gen_sig : string -> string
end
module For_testing : sig
val generate_struct : expression -> module_expr
val map_style_sheet
: Stylesheet.t
-> rewrite:expressio... | null | https://raw.githubusercontent.com/janestreet/ppx_css/227a89d7e4605f740366a1e1e20923c1d69d6bbc/src/ppx_css.mli | ocaml | open! Core
open! Ppxlib
open Css_jane
module Options = Options
module For_css_inliner : sig
val gen_struct : options:Options.t -> string
val gen_sig : string -> string
end
module For_testing : sig
val generate_struct : expression -> module_expr
val map_style_sheet
: Stylesheet.t
-> rewrite:expressio... | |
9874abf4d68f8d31bf59c183fa363321b6665dc01aec14f1ce6a228721bd9952 | gbour/wave | wave_utf8.erl | %%
Wave - MQTT Broker
Copyright ( C ) 2014 - 2016 -
%%
%% This program 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 , version 3 of the License .
%%
%% This program is distribut... | null | https://raw.githubusercontent.com/gbour/wave/fe5b78408a7c6e723b19cd454068958058e5e072/apps/wave/src/wave_utf8.erl | erlang |
This program is free software: you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see ... | Wave - MQTT Broker
Copyright ( C ) 2014 - 2016 -
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , version 3 of the License .
GNU Affero General Public License for more details .
You should have received a copy of the GNU Affero Ge... |
37275571a13dd70ae8a936b005dc2b3a82e807ae8486d8fa77aa7e842dc05678 | green-labs/ppx_spice | polyvariants.ml | open Parsetree
open Ast_helper
open Utils
Polyvariants arguments are wrapped inside a Tuple , meaning that if there 's only
one arg it 's the coreType , but if there 's more than one arg it 's a tuple of one tuple with those args .
This function abstract this particuliarity from polyvariants ( It 's differ... | null | https://raw.githubusercontent.com/green-labs/ppx_spice/50e9d0666174dd1950294572a772a2b3072d4128/src/ppx/polyvariants.ml | ocaml | If it's a tuple, return the args
If it's any other coreType, return it
diff
We don't have enough information to generate a encoder
+1 because index 0 is the constructor | open Parsetree
open Ast_helper
open Utils
Polyvariants arguments are wrapped inside a Tuple , meaning that if there 's only
one arg it 's the coreType , but if there 's more than one arg it 's a tuple of one tuple with those args .
This function abstract this particuliarity from polyvariants ( It 's differ... |
29b0718b2fbf3dc6797f19414ff7c4645f0359ea3a450e403d4c5b569002429f | justinmeiners/lisp-interpreter | macros.scm |
; QUASIQUOTE
(assert (equal? `(1 2 3) '(1 2 3)))
(let ((x 1))
(assert (equal? `(,x 2 3) '(1 2 3))))
(let ((x 'a))
(assert (equal? `(,x x ,x) '(a x a))))
; nil! macro
(define-macro nil! (lambda (x)
`(set! ,x '())))
(define x 3)
(assert (= x 3))
(nil! x)
(assert (null? x))
; ntimes macro
... | null | https://raw.githubusercontent.com/justinmeiners/lisp-interpreter/a84a24653fb46ecda32fb71a3a360b42e3253498/tests/code/macros.scm | scheme | QUASIQUOTE
nil! macro
ntimes macro |
(assert (equal? `(1 2 3) '(1 2 3)))
(let ((x 1))
(assert (equal? `(,x 2 3) '(1 2 3))))
(let ((x 'a))
(assert (equal? `(,x x ,x) '(a x a))))
(define-macro nil! (lambda (x)
`(set! ,x '())))
(define x 3)
(assert (= x 3))
(nil! x)
(assert (null? x))
(define-macro ntimes (lambda (n . body)
... |
6ad48777fa4f69839ce692300eaffc00f5edb9e53aab34a25193f9357ed57675 | poscat0x04/telegram-types | Spec.hs | module Main where
main :: IO ()
main = putStrLn "unimplemented"
| null | https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/test/Spec.hs | haskell | module Main where
main :: IO ()
main = putStrLn "unimplemented"
| |
86f9526506a545f0ce1beb253cdd1063d7215649e881f84a7cdea4aec18d8447 | shriram/smol | semantics.rkt | #lang racket
(require smol/hof/semantics)
(provide [all-from-out smol/hof/semantics])
(provide let/cc call/cc)
| null | https://raw.githubusercontent.com/shriram/smol/248dcca3e287537d29d455e93b562beedc7132d1/cc/semantics.rkt | racket | #lang racket
(require smol/hof/semantics)
(provide [all-from-out smol/hof/semantics])
(provide let/cc call/cc)
| |
8387a421bd653536788a6befe5aca42fe429b60d5a51aa05f1face39f82050bc | tlringer/plugin-tutorial | stateutils.ml | open Evd
(* --- State monad --- *)
* All terms in Coq have to carry around evar_maps ( found in the Evd module ) ,
* which store a bunch of constraints about terms that help with things like
* unification , type inference , and equality checking . This is annoying to
* deal with , so I usually define some... | null | https://raw.githubusercontent.com/tlringer/plugin-tutorial/bce40a46b04c2c912210520fda9c35ca9319e293/repair/src/stateutils.ml | ocaml | --- State monad ---
Like map_state, but over arrays | open Evd
* All terms in Coq have to carry around evar_maps ( found in the Evd module ) ,
* which store a bunch of constraints about terms that help with things like
* unification , type inference , and equality checking . This is annoying to
* deal with , so I usually define some helper functions to make ... |
adebab67f10f716d019507a7de1e7bea990231e79dea669d5e55c8193f1e33f1 | vibrato-team/vibrato-programming-language | InterferenceGraph.hs | module Backend.FlowGraph.InterferenceGraph where
import Backend.FlowGraph.LiveVariables
import qualified Control.Monad.State.Lazy as State
import Control.Monad.Trans
import qualified Backend.TAC.TAC as TAC
import qualified Backend.FlowGraph.Block as Block
import qualified Backend.FlowGraph.FlowGraph as FlowGraph
impor... | null | https://raw.githubusercontent.com/vibrato-team/vibrato-programming-language/f6d98c2686604a91cd99307bc3fdc06828c7f538/src/Backend/FlowGraph/InterferenceGraph.hs | haskell | module Backend.FlowGraph.InterferenceGraph where
import Backend.FlowGraph.LiveVariables
import qualified Control.Monad.State.Lazy as State
import Control.Monad.Trans
import qualified Backend.TAC.TAC as TAC
import qualified Backend.FlowGraph.Block as Block
import qualified Backend.FlowGraph.FlowGraph as FlowGraph
impor... | |
913a2ec674fcd6afff75f20c95a0cb8f1fbac9d1953b8f83367e8cc40ffa5ca7 | wz1000/hie-lsp | Class.hs | | This module defines ' PostBuild ' , which indicates that an action will be
-- notified when it, and any action it's a part of, has finished executing.
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVa... | null | https://raw.githubusercontent.com/wz1000/hie-lsp/dbb3caa97c0acbff0e4fd86fc46eeea748f65e89/reflex-0.6.1/src/Reflex/PostBuild/Class.hs | haskell | notified when it, and any action it's a part of, has finished executing.
# OPTIONS_GHC -fplugin=Reflex.Optimizer #
has finished executing. Note that the specific definition of "finished" is
were created, when the post-build 'Event' fires. The post-build 'Event' will
fire exactly once for an given action.
| Retri... | | This module defines ' PostBuild ' , which indicates that an action will be
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE Un... |
c9d2a9d5d81a99361c5860fe05d8808d66a26e21d53183df2499c6ca14714acb | fyquah/hardcaml_zprize | test_bls12_377_twisted_edwards_form.ml | open Core
open Twisted_edwards_model_lib
open Bls12_377_util
module C = Conversions
let%expect_test "Modulo square root" =
let y = Z.of_int 3 in
let x = modulo_square_root y in
Stdio.print_s (sexp_of_z x);
[%expect
{| 0x17b62f01197dc4c6cf996f256d489ac9333ccbfe8c0adeaef1096c9bdf2e3d8e89faab521e38583e9033db5... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/7eb1bd214908fa801781db33287eaf12691715f8/libs/twisted_edwards/test/test_bls12_377_twisted_edwards_form.ml | ocaml | Make sure that we can't convert any of them to weistrass, and validate
* that they are indeed validate affine points.
Do a "regular" differential addition most of the time.
Exercise various odd cases in this test:
- p1 + O
- p1 + p1
- p1 + (-p1)
| open Core
open Twisted_edwards_model_lib
open Bls12_377_util
module C = Conversions
let%expect_test "Modulo square root" =
let y = Z.of_int 3 in
let x = modulo_square_root y in
Stdio.print_s (sexp_of_z x);
[%expect
{| 0x17b62f01197dc4c6cf996f256d489ac9333ccbfe8c0adeaef1096c9bdf2e3d8e89faab521e38583e9033db5... |
af6368ec42a892cbe9663dd4a4d2260b183d90f135cce5c4d82957e54433a147 | liquidz/antq | maven.clj | (ns antq.util.maven
(:require
[antq.constant :as const]
[antq.log :as log]
[antq.util.async :as u.async]
[antq.util.env :as u.env]
[antq.util.leiningen :as u.lein]
[antq.util.xml :as u.xml]
[clojure.data.xml :as xml]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.deps.u... | null | https://raw.githubusercontent.com/liquidz/antq/4a4fb5e61ddb2f3400e18bdd5c856ca4f04cdfd7/src/antq/util/maven.clj | clojure | NOTE
so if there is authentication information in `:repositories`, apply to `settings`
(but still may find it in a different repo), ie this is a common event
Overwrite TransferListener not to show "Downloading" messages
e.g. This exception is thrown by reading the following pom.xml
-api/2.0.1/jakarta.mail-ap... | (ns antq.util.maven
(:require
[antq.constant :as const]
[antq.log :as log]
[antq.util.async :as u.async]
[antq.util.env :as u.env]
[antq.util.leiningen :as u.lein]
[antq.util.xml :as u.xml]
[clojure.data.xml :as xml]
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.tools.deps.u... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.