_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 |
|---|---|---|---|---|---|---|---|---|
5dbb87caf54b5a594a472bcfae64fd64991da547426419016d698f986117b5e9 | marcoheisig/cl-mpi | cellular.lisp | A one dimensional cellular automaton .
;;;
;;; This example is particularly interesting as it works with bit
vectors . MPI supports only messages that are aligned to byte
;;; boundaries, so special care must be taken to have each message properly
;;; aligned.
(in-package :cl-user)
(defpackage :cl-mpi/examples/cel... | null | https://raw.githubusercontent.com/marcoheisig/cl-mpi/ba92be06ec1dca74d0ca5256aa387d8a28c8ad86/examples/cellular.lisp | lisp |
This example is particularly interesting as it works with bit
boundaries, so special care must be taken to have each message properly
aligned.
rule-30
rule-90
rule-184
strip the ghost layer
have each rank (including ROOT) send his data to ROOT
process all ranks sequentially
note that that ROOT has the longes... | A one dimensional cellular automaton .
vectors . MPI supports only messages that are aligned to byte
(in-package :cl-user)
(defpackage :cl-mpi/examples/cellular
(:use :cl :alexandria :cl-mpi :static-vectors))
(in-package :cl-mpi/examples/cellular)
(defun printf (fmt &rest args)
(format t "rank ~d: " (mpi-co... |
23357faf1245cb7c20bf8b10f30b17db599db438f7c75517e52a21e323f2cb89 | input-output-hk/cardano-sl | Endpoints.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TypeOperators #-}
module Cardano.Faucet.Endpoints (
FaucetAPI
, f... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/faucet/src/Cardano/Faucet/Endpoints.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TypeOperators #
| Top level type of the faucet API | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Cardano.Faucet.Endpoints (
FaucetAPI
, faucetServer
, faucetServerAPI
) where
import Control.Lens (re, to)
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.By... |
36a8e7b38f9c0012d7cd0918f0ef8b5886c288fdd3a511355173c17f17a10311 | OCamlPro/techelson | test.ml | (** Assembles interpreters to build a full testcase runner. *)
module Testcases = Testcases
module Load = Load
module Sigs = Sigs
module Make = Make
module Naive = Make.TestCxt (Interpreter.Naive)
module BigNaive = Make.TestCxt (Interpreter.BigNaive)
module Default = BigNaive | null | https://raw.githubusercontent.com/OCamlPro/techelson/932fbf08675cd13d34a07e3b3d77234bdafcf5bc/src/7_test/test.ml | ocaml | * Assembles interpreters to build a full testcase runner. |
module Testcases = Testcases
module Load = Load
module Sigs = Sigs
module Make = Make
module Naive = Make.TestCxt (Interpreter.Naive)
module BigNaive = Make.TestCxt (Interpreter.BigNaive)
module Default = BigNaive |
93d986258c117138d227376c2d3ba8133be3724b095deb224712964271ba6c26 | maranget/hevea | count.mli | (***********************************************************************)
(* *)
(* HEVEA *)
(* *)
, projet , INRIA R... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/count.mli | ocaml | *********************************************************************
HEVEA
... | , projet , INRIA Rocquencourt
Copyright 2012 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
module type S = sig
type key
type count
val empty : count
val incr : key -> count -> count
val fold : (key -... |
72d906ec3677df57d8b50b819ba64e25f40f8389276df52b87dc3456cf2c578a | thosmos/riverdb | db.clj | (ns riverdb.db
(:require
[clojure.tools.logging :as log :refer [debug info warn error]]
[datomic.api :as d]
[riverdb.state :as state :refer [db cx]]
[java-time :as jt]
[domain-spec.core]))
(defn eids
([attr]
(d/q '[:find [?e ...]
:in $ ?attr
:where
[?e ?attr]]
... | null | https://raw.githubusercontent.com/thosmos/riverdb/41df21b72c825f03e25767529b1ffd8391743e00/src/server/riverdb/db.clj | clojure | find the transaction
get the transaction entity id
get the datoms from the transaction
remove transaction-metadata datoms
invert the datoms add/retract state.
reverse order of inverted datoms.
commit new datoms.
:where
[(> ?d date)]
[?e :sitevisit/SiteVisi... | (ns riverdb.db
(:require
[clojure.tools.logging :as log :refer [debug info warn error]]
[datomic.api :as d]
[riverdb.state :as state :refer [db cx]]
[java-time :as jt]
[domain-spec.core]))
(defn eids
([attr]
(d/q '[:find [?e ...]
:in $ ?attr
:where
[?e ?attr]]
... |
d27dce18b53197f87e27473c791dc63fb0a07418306182b5aad24b80dc9d2117 | maryrosecook/islaclj | interpreter.clj | (ns isla.test.interpreter
(:use [isla.interpreter])
(:use [isla.parser])
(:use [isla.user])
(:require [isla.library :as library])
(:use [clojure.test])
(:use [clojure.pprint])
(:require [mrc.utils :as utils]))
(defrecord Person [age name friend items])
(def extra-types
{"person" (fn [] (new isla.test.i... | null | https://raw.githubusercontent.com/maryrosecook/islaclj/4394ddcbd05d3d2da91c89f28e57c764bfef8d88/test/isla/test/interpreter.clj | clojure | non-slot assignment
invocation
run test
type assignment
slot assignment
assignment
test extract fn
lists
should not get called
should not get called
list addition
list removal | (ns isla.test.interpreter
(:use [isla.interpreter])
(:use [isla.parser])
(:use [isla.user])
(:require [isla.library :as library])
(:use [clojure.test])
(:use [clojure.pprint])
(:require [mrc.utils :as utils]))
(defrecord Person [age name friend items])
(def extra-types
{"person" (fn [] (new isla.test.i... |
7aa8647ea4f879c42613263b93b6ed085e53dd025da255bb66f26847aa2f8864 | tolysz/ghcjs-stack | Haddock.hs | -----------------------------------------------------------------------------
-- |
Module : Distribution . Client .
Copyright : ( c ) 2009
-- License : BSD-like
--
-- Maintainer :
-- Portability : portable
--
Interfacing with Haddock
--
----------------------------------------------------... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal/cabal-install/Distribution/Client/Haddock.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-like
Maintainer :
Portability : portable
--------------------------------------------------------------------------- | Module : Distribution . Client .
Copyright : ( c ) 2009
Interfacing with Haddock
module Distribution.Client.Haddock
(
regenerateHaddockIndex
)
where
import Data.List (maximumBy)
import Data.Foldable (forM_)
import System.Directory (createDirectoryIfMissing, renameFile)
import Sys... |
740c90f0df73a670a886cd2cf383c98e41ced5e4954ef820234ce2a9bfa78fd1 | mirage/mirage | context.ml |
* Copyright ( c ) 2013 - 2020 < >
* Copyright ( c ) 2013 - 2020 Anil Madhavapeddy < >
* Copyright ( c ) 2015 - 2020 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice an... | null | https://raw.githubusercontent.com/mirage/mirage/479e40ae6aa1efe18fb1cd199cec0d5ee1f46f26/lib/functoria/context.ml | ocaml |
* Copyright ( c ) 2013 - 2020 < >
* Copyright ( c ) 2013 - 2020 Anil Madhavapeddy < >
* Copyright ( c ) 2015 - 2020 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice an... | |
837e0d9a49a20f4243b30cd987ed1f7ea07918acd08fe0b30425c75c8a022514 | haskell-repa/repa | Vector.hs | # LANGUAGE MagicHash , RankNTypes #
module Main where
import qualified Data.Vector.Unboxed as V
import Data.Vector.Unboxed (Vector)
import System.Environment
import Data.Array.Repa.IO.Timing
main
= do args <- getArgs
let sz = case args of
[szStr] -> (Prelude.read szStr :: Int)
... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-plugin/test/90-Benchmarks/repa/DotProduct/Vector.hs | haskell | # LANGUAGE MagicHash , RankNTypes #
module Main where
import qualified Data.Vector.Unboxed as V
import Data.Vector.Unboxed (Vector)
import System.Environment
import Data.Array.Repa.IO.Timing
main
= do args <- getArgs
let sz = case args of
[szStr] -> (Prelude.read szStr :: Int)
... | |
3ef36db95a077def26976f8abcc25348781bdd8820d7effc85b796c9a370cd6a | lisp/de.setf.utility | classes.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*-
(in-package :de.setf.utility.implementation)
(:documentation "Define class and predicate definitions for an abstract graph model
The definitions bind very few methods and serve instead as abstract inter... | null | https://raw.githubusercontent.com/lisp/de.setf.utility/782cd79d99ebf40deeed60c492be9873bbe42a15/graph/classes.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*-
*;*-generate.lisp and xml:code;*;*-walk.lisp."
data model classes
predicates, including provisions for built-in data types.
abstract interface |
(in-package :de.setf.utility.implementation)
(:documentation "Define class and predicate definitions for an abstract graph model
The definitions bind very few methods and serve instead as abstract interfaces to
indicate a class's support for the minimal x-path-like navigation interface.
(copyright
"Copyri... |
83ef3d3bdfd5203e6e18a06a4283f361d92ec662c2084d1eb28bc5b83751c9e8 | huangz1990/SICP-answers | 47-semaphore-using-mutex.scm | 47-semaphore-using-mutex.scm
(load "p217-make-mutex.scm")
(define (make-semaphore n)
(let ((mutex (make-mutex)))
(define (acquire)
(mutex 'acquire)
(if (> n 0) ; 用互斥元保护 n 的修改
(begin (set! n (- n 1)) ; 获取信号量之后
... | null | https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/47-semaphore-using-mutex.scm | scheme | 用互斥元保护 n 的修改
获取信号量之后
释放互斥元
获取信号量不成功,先释放互斥元
然后再次尝试获取信号量
release 操作也需要用互斥元保护 | 47-semaphore-using-mutex.scm
(load "p217-make-mutex.scm")
(define (make-semaphore n)
(let ((mutex (make-mutex)))
(define (acquire)
(mutex 'acquire)
'ok)
(define (release)
(mutex 'acquire)
(mutex 'release)
'ok)
... |
256b6b4bffaf47661020b115de8e0474a1783adb87dfed09f9a016c4dbbc24a2 | coq/coq | tac2dyn.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/4b812ba203b09e30f88e0174cc72abdf5da22e26/plugins/ltac2/tac2dyn.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
a7f0a2bbb302cd6b78cb2bb2e69788451c4400abd0c5546c18530b5e1eec574f | tfausak/patrol | ClientSpec.hs | module Patrol.ClientSpec where
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Client" $ do
Hspec.it "needs tests" $ do
Hspec.pending
| null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Patrol/ClientSpec.hs | haskell | module Patrol.ClientSpec where
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Client" $ do
Hspec.it "needs tests" $ do
Hspec.pending
| |
facd90a6cdb479a95f9ba7be581eab4f3a67cc83229e1f78ff963f50a5f81504 | jrh13/hol-light | duality.ml | (* ========================================================================= *)
(* Mizar Light proof of duality in projective geometry. *)
(* ========================================================================= *)
current_prover := standard_prover;;
(* ---------------------------------------... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Mizarlight/duality.ml | ocaml | =========================================================================
Mizar Light proof of duality in projective geometry.
=========================================================================
-------------------------------------------------------------------------
---------------... |
current_prover := standard_prover;;
Axioms for projective geometry .
parse_as_infix("ON",(11,"right"));;
let projective = new_definition
`projective((ON):Point->Line->bool) <=>
(!p p'. ~(p = p') ==> ?!l. p ON l /\ p' ON l) /\
(!l l'. ?p. p ON l /\ p ON l... |
92ceed331ce8b9815636f25c6dace10d19520dc1fa5ee7352ef1f2f1f74f89ee | erlang/otp | erl_link_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/erlang/otp/f02ae58612b257d187ad030d72b9e8b67ce471ef/erts/emulator/test/erl_link_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2001 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < >
Created : 13 Dec 2001 by < >
-module(erl_link_SUITE).
-author('').
-define(line_trace , 1... |
a1c8ddca042e3cfc52765fcea64986fc870788883496e34d9886f7327f0efc73 | dwayne/eopl3 | interpreter.rkt | #lang eopl
(require "./nenv.rkt")
(require "./parser.rkt")
(require "./translator.rkt")
(provide
;; Expressed Values
num-val bool-val
;; Interpreter
run)
(define (run s)
(let ([init-nenv (extend-nenv
(num-val 1)
(extend-nenv
(num-val 5)
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/NAMELESS-PROC-3.42-ATTEMPT-1/interpreter.rkt | racket | Expressed Values
Interpreter
Procedure ADT
Values
ExpVal = Int + Bool + Proc | #lang eopl
(require "./nenv.rkt")
(require "./parser.rkt")
(require "./translator.rkt")
(provide
num-val bool-val
run)
(define (run s)
(let ([init-nenv (extend-nenv
(num-val 1)
(extend-nenv
(num-val 5)
(extend-nenv
... |
e406c222766f91acac2b75d0bf77194c7c77368735fa8c3e589c4665a59aa4ef | UBTECH-Walker/WalkerSimulationFor2020WAIC | cruiser_sdk_resp.lisp | ; Auto-generated. Do not edit!
(cl:in-package cruiser_msgs-msg)
;//! \htmlinclude cruiser_sdk_resp.msg.html
(cl:defclass <cruiser_sdk_resp> (roslisp-msg-protocol:ros-message)
((header
:reader header
:initarg :header
:type std_msgs-msg:Header
:initform (cl:make-instance 'std_msgs-msg:Header))
(... | null | https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/cruiser_sdk_resp.lisp | lisp | Auto-generated. Do not edit!
//! \htmlinclude cruiser_sdk_resp.msg.html |
(cl:in-package cruiser_msgs-msg)
(cl:defclass <cruiser_sdk_resp> (roslisp-msg-protocol:ros-message)
((header
:reader header
:initarg :header
:type std_msgs-msg:Header
:initform (cl:make-instance 'std_msgs-msg:Header))
(datapacket
:reader datapacket
:initarg :datapacket
:type cl:str... |
380d9f962ce3483649881a20facc1fcdf96528d96ccd5b69b1c04d6067b2e49d | hbcrhythm/kcp_erlang | kcp_erlang_app.erl | %%%-------------------------------------------------------------------
@doc kcp_erlang public API
%% @end
%%%-------------------------------------------------------------------
-module(kcp_erlang_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%%================================... | null | https://raw.githubusercontent.com/hbcrhythm/kcp_erlang/ea97533dc43fd6a0fcc723e3efbf231b62786255/src/kcp_erlang_app.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
Application callbacks
====================================================================
API
====================================================================
This need t... | @doc kcp_erlang public API
-module(kcp_erlang_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
{ok, Pid} = kcp_erlang_sup:start_link(),
{ok, KcpSupPid} = supervisor:start_child(kcp_erlang_sup, kcp_sup_spec()),
{ok, KcpServerPid} = supervisor:start_child(kcp_... |
f95a7d0d81a8859b89f5bdfa56da1e9bc18a65b665669491dfcfd8314ec7ab5b | Clozure/ccl | pascal-strings.lisp | -*- Mode : Lisp ; Package : CCL -*-
;;;
Copyright 2003 - 2009 Clozure Associates
;;;
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 appl... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/library/pascal-strings.lisp | lisp | Package : CCL -*-
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific la... | Copyright 2003 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
Utilities for dealing with strings
In 68 K Mac , strings were represented by a pointer to a
(in-package "CCL")
(eval-when (:compile-toplevel :load-toplevel :execute)
(export '(with-pstrs with-re... |
9dd06cc49e596796ffd71a0277d4e3bc4e606d56b3421d3e3a140e924ba3ea2b | juspay/atlas | HealthCheck.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/driver-offer-bpp/src/Product/HealthCheck.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
a21e59235366a145455fae9f4f56efdb05d87097c79630f9590a6c9a277ecc0f | schmee/java-http-clj | util.clj | (ns ^:no-doc java-http-clj.util
(:import [java.time Duration]
[java.util.function Function]))
(set! *warn-on-reflection* true)
(defmacro add-docstring [var docstring]
`(alter-meta! ~var #(assoc % :doc ~docstring)))
(defn convert-timeout [t]
(if (integer? t)
(Duration/ofMillis t)
t))
(defmac... | null | https://raw.githubusercontent.com/schmee/java-http-clj/301f4116f89975bb94ef525532848a87ccde7214/src/java_http_clj/util.clj | clojure | (ns ^:no-doc java-http-clj.util
(:import [java.time Duration]
[java.util.function Function]))
(set! *warn-on-reflection* true)
(defmacro add-docstring [var docstring]
`(alter-meta! ~var #(assoc % :doc ~docstring)))
(defn convert-timeout [t]
(if (integer? t)
(Duration/ofMillis t)
t))
(defmac... | |
328c26c18d7702f60aec9f88436828d68c2eca89366632622e7d27a833f7feb8 | openweb-nl/open-bank-mark | transactions.cljs | (ns open-bank.transactions
(:require [re-graph.core :as re-graph]))
(def common-params
"$iban: String!, $show_iban: Boolean!, $show_new_balance: Boolean!, $show_direction: Boolean!, $show_from_to: Boolean!, $show_changed_by: Boolean!, $show_descr: Boolean!")
(def details
"{iban @include(if: $show_iban)
new_b... | null | https://raw.githubusercontent.com/openweb-nl/open-bank-mark/786c940dafb39c36fdbcae736fe893af9c00ef17/frontend/src/cljs/open_bank/transactions.cljs | clojure | (ns open-bank.transactions
(:require [re-graph.core :as re-graph]))
(def common-params
"$iban: String!, $show_iban: Boolean!, $show_new_balance: Boolean!, $show_direction: Boolean!, $show_from_to: Boolean!, $show_changed_by: Boolean!, $show_descr: Boolean!")
(def details
"{iban @include(if: $show_iban)
new_b... | |
0cd183c03a6aa1664a510d22394ed7857a0c28ea8a9390cc87d2a2072120414c | chrisdone/chrisdone-xmonad | Window.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ExtendedDefaultRules #
-- | The client window (webkit).
module XMonad.Suave.Window where
import Clockin
import Control.Concurrent
import Control.Exception (try,SomeException)
import Control.Monad
import Control.Monad.Fix
... | null | https://raw.githubusercontent.com/chrisdone/chrisdone-xmonad/5a3a4d7da7ef653becb8e4b5da3b76a52b1feb52/src/XMonad/Suave/Window.hs | haskell | # LANGUAGE OverloadedStrings #
| The client window (webkit).
| Start up a Suave panel.
| Update the contents of the panel.
| Get key press count.
,timeAtZone (zoneOf "IST") now -- not needed presently, IST=CEST
,"/"
| Get the output from i3status.
| Read a process line. | # LANGUAGE ExtendedDefaultRules #
module XMonad.Suave.Window where
import Clockin
import Control.Concurrent
import Control.Exception (try,SomeException)
import Control.Monad
import Control.Monad.Fix
import Data.Maybe
import qualified Data.Text as T
import ... |
88d14517ed90414b08a0909b20e180c2c601c8fa7eaf7c152cb5051d0d5a7155 | silky/fashion | Main.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Main where
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
import Nvds.Svg
main :: IO ()
main = mainWith (frame 0.02 <$> d) >> putStrLn "Done!"
ifilter :: (Int -> B... | null | https://raw.githubusercontent.com/silky/fashion/2b01d1e5c385fe99e8e54f5828114551e9c8e309/Text-Path/src/Main.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE NoMonomorphismRestriction #
Supposing we "stack run ..." from the "./src" directory.
Just (w, h, p) <- singlePathFromFile' "../svg-paths/j-small.svg"
Gala likes this one
Old way, with a function:
ts = mconcat (finalT : map pos ys)
finalT = pos' (gala' white wh... | # LANGUAGE FlexibleContexts #
module Main where
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
import Nvds.Svg
main :: IO ()
main = mainWith (frame 0.02 <$> d) >> putStrLn "Done!"
ifilter :: (Int -> Bool) -> [a] -> [a]
ifilter p xs = map snd $ filter (p . fst) (zip [1..] xs)
d :: IO (D... |
d1041b25626505f22550cbf94cadcb3ecf1882cb6438d58e4bc0c6e3c23e2907 | iokasimov/pandora | Transformer.hs | module Pandora.Paradigm.Controlflow.Effect.Transformer (module Exports, Transformer) where
import Pandora.Paradigm.Controlflow.Effect.Transformer.Comonadic as Exports
import Pandora.Paradigm.Controlflow.Effect.Transformer.Monadic as Exports
import Pandora.Pattern.Functor (Monad, Comonad)
type family Transformer c m ... | null | https://raw.githubusercontent.com/iokasimov/pandora/748add598d943fe645eb79c4075ef8e867ce42d4/Pandora/Paradigm/Controlflow/Effect/Transformer.hs | haskell | module Pandora.Paradigm.Controlflow.Effect.Transformer (module Exports, Transformer) where
import Pandora.Paradigm.Controlflow.Effect.Transformer.Comonadic as Exports
import Pandora.Paradigm.Controlflow.Effect.Transformer.Monadic as Exports
import Pandora.Pattern.Functor (Monad, Comonad)
type family Transformer c m ... | |
18e7c5829035611ae8cf6077737ff6cf7de415874a003537e512a42b91992d8c | naveensundarg/prover | argument-bag-ac.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
File : argument-bag-ac.lisp
The contents of this file are subject to the Mozilla Public License
;;; Version 1.1 (the "License"); you may not use this file except in
;;; compliance with the License. You may obtain a copy of the License at
;;; /
;;;
Softwa... | null | https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/argument-bag-ac.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing right... | File : argument-bag-ac.lisp
The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is SNARK .
The Initial Developer of the Original Code is SRI International .
Portions created by the Initial Developer are C... |
c0b4d763684e3ca8829b0591ddecd74fa6e7dfaf6589433752538a3fbe83f5eb | synduce/Synduce | swap_game_2.ml | * @synduce -NB --no - lifting
type list =
| Nil
| Cons of int * list
type clist =
| Empty
| Single of int
| Concat of clist * clist
let rec repr = function
| Empty -> Nil
| Single a -> Cons (a, Nil)
| Concat (x, y) -> dec y x
and dec l1 = function
| Empty -> repr l1
| Single a -> Cons (a, repr l... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/unrealizable/swap_game_2.ml | ocaml | * @synduce -NB --no - lifting
type list =
| Nil
| Cons of int * list
type clist =
| Empty
| Single of int
| Concat of clist * clist
let rec repr = function
| Empty -> Nil
| Single a -> Cons (a, Nil)
| Concat (x, y) -> dec y x
and dec l1 = function
| Empty -> repr l1
| Single a -> Cons (a, repr l... | |
b4841608f2d5953717c0ca4ec4b502233be65ee8d34719a49c339885e7c4342f | draperlaboratory/VIBES | core_theory.mli | (***************************************************************************)
(* *)
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/VIBES/ba4fe14a355617e8d07df59578f032aa9f1f27b2/tools/vibes-utils/lib/core_theory.mli | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
This research was developed with funding from the Defense Advanced
Research Projects Agency ( DARPA ) .
open Bap_core_theory
* Returns [ true ] if the language is .
val is_thumb : Theory.lan... |
f240a391c5ddcfeef022e89d5e3aaf045bed100670812fb59a83c8492ab121a0 | yutopp/rill | fresh.ml |
* Copyright yutopp 2021 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2021 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | null | https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/lib/common/fresh.ml | ocaml |
* Copyright yutopp 2021 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2021 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )... | |
b7e9541c23b33745aa118f70e022535ccaaa5ced83c78800b10972a08b7ed568 | uxbox/uxbox-backend | project.clj | (defproject uxbox-backend "0.1.0-SNAPSHOT"
:description "UXBox backend."
:url ""
:license {:name "MPL 2.0" :url "-US/MPL/2.0/"}
:source-paths ["src" "vendor"]
:javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
:jvm-opts ["-Dclojure.compiler.direct-linking=true"
;; "-Dcom.sun.man... | null | https://raw.githubusercontent.com/uxbox/uxbox-backend/036c42db8424be3ac34c38be80577ee279141681/project.clj | clojure | "-Dcom.sun.management.jmxremote.port=9090"
"-Dcom.sun.management.jmxremote.authenticate=false"
"-Dcom.sun.management.jmxremote.ssl=false"
"-Dcom.sun.management.jmxremote.rmi.port=9090"
"-Djava.rmi.server.hostname=0.0.0.0" | (defproject uxbox-backend "0.1.0-SNAPSHOT"
:description "UXBox backend."
:url ""
:license {:name "MPL 2.0" :url "-US/MPL/2.0/"}
:source-paths ["src" "vendor"]
:javac-options ["-target" "1.8" "-source" "1.8" "-Xlint:-options"]
:jvm-opts ["-Dclojure.compiler.direct-linking=true"
"-Dclojure.spec.c... |
0fef66d80a2e4bb0464fb42b4b8f03bd9a84b183b5e73ff3dc21f34ad01bd8a7 | seanirby/koeeoadi | project.clj | (defproject koeeoadi "0.1.0-SNAPSHOT"
:description "A web app for creating text editor themes"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0-RC5"]
[org.clojure/clojurescript "1.7.228"]
[org.clojure/too... | null | https://raw.githubusercontent.com/seanirby/koeeoadi/481dc31e023e0a54ee5248bd2ef06a56e7d1d64d/project.clj | clojure | (defproject koeeoadi "0.1.0-SNAPSHOT"
:description "A web app for creating text editor themes"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0-RC5"]
[org.clojure/clojurescript "1.7.228"]
[org.clojure/too... | |
66e51ff33b44f4718e107750f24ed4db86c156dba1b5fef29a618f09336203ca | karamellpelle/grid | Values.hs | module OpenGL.IOS.Values where
import OpenGL.IOS.Types
1
gl_DEPTH_BUFFER_BIT :: GLbitfield
gl_DEPTH_BUFFER_BIT = 0x00000100
gl_STENCIL_BUFFER_BIT :: GLbitfield
gl_STENCIL_BUFFER_BIT = 0x00000400
gl_COLOR_BUFFER_BIT :: GLbitfield
gl_COLOR_BUFFER_BIT = 0x00... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/OpenGL/IOS/Values.hs | haskell | module OpenGL.IOS.Values where
import OpenGL.IOS.Types
1
gl_DEPTH_BUFFER_BIT :: GLbitfield
gl_DEPTH_BUFFER_BIT = 0x00000100
gl_STENCIL_BUFFER_BIT :: GLbitfield
gl_STENCIL_BUFFER_BIT = 0x00000400
gl_COLOR_BUFFER_BIT :: GLbitfield
gl_COLOR_BUFFER_BIT = 0x00... | |
ea6e8c973788e3b3b338518ece494b068bcb140a0c742fc9baada8647e570d6a | nwf/dyna | TrifectaTests.hs | # LANGUAGE TemplateHaskell #
module Dyna.XXX.TrifectaTests (selftest) where
import Control.Applicative
import Control.Monad.State
import qualified Data.ByteString.Char8 as B8
import Data.Monoid (mempty)
import qualified Test.Framework as TF
import ... | null | https://raw.githubusercontent.com/nwf/dyna/74bdc852b906b902b53ca07dab0c8e0639ace8ba/src/Dyna/XXX/TrifectaTests.hs | haskell | # LANGUAGE TemplateHaskell #
module Dyna.XXX.TrifectaTests (selftest) where
import Control.Applicative
import Control.Monad.State
import qualified Data.ByteString.Char8 as B8
import Data.Monoid (mempty)
import qualified Test.Framework as TF
import ... | |
9bc190333a1155431800d8dc4bc6a4f5bd8d28cf76cb760ad0bb5d562e9abb08 | ftovagliari/ocamleditor | tree.ml |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at y... | null | https://raw.githubusercontent.com/ftovagliari/ocamleditor/53284253cf7603b96051e7425e85a731f09abcd1/src/otherwidgets/tree.ml | ocaml | Deprecated
* Stores
* Simple tree
`EDITABLE true |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at y... |
2b7a62a1d8f1a3dbf646a062748c1a4d52922c8cf99cf743dac01c74a1c82ebc | ghc/ghc | Type.hs | # LANGUAGE DeriveGeneric #
module GHC.ForeignSrcLang.Type
( ForeignSrcLang(..)
) where
import Prelude -- See note [Why do we import Prelude here?]
import GHC.Generics (Generic)
| Foreign formats supported by GHC via TH
data ForeignSrcLang
= LangC -- ^ C
| LangCxx -- ^ C++
| LangObjc -- ^ Objecti... | null | https://raw.githubusercontent.com/ghc/ghc/cc25d52e0f65d54c052908c7d91d5946342ab88a/libraries/ghc-boot-th/GHC/ForeignSrcLang/Type.hs | haskell | See note [Why do we import Prelude here?]
^ C
^ C++
^ Objective C
^ Objective C++
^ JavaScript
^ Object (.o) | # LANGUAGE DeriveGeneric #
module GHC.ForeignSrcLang.Type
( ForeignSrcLang(..)
) where
import GHC.Generics (Generic)
| Foreign formats supported by GHC via TH
data ForeignSrcLang
^ Assembly language ( .s )
deriving (Eq, Show, Generic)
|
e65f7d37581348af5c18dcc680853f39522a0ef815c53727e728cd68df2a0bca | couchbase/chronicle | chronicle_tests.erl | @author Couchbase < >
2021 Couchbase , Inc.
%%
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, sof... | null | https://raw.githubusercontent.com/couchbase/chronicle/f048c87b294c6cfc8021dab8832d7829f2681ce7/test/chronicle_tests.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | @author Couchbase < >
2021 Couchbase , Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(chronicle_tests).
-include_lib("eunit/include/eunit.hrl").
-include("chronicle.hrl").
-export([debug_log/4]).
debug_... |
78f8589661f4b49a2fee9f3a9117d7ae6adad47a60ef6f8df0a4796c040a4253 | dbuenzli/brr | brr_webaudio.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... | null | https://raw.githubusercontent.com/dbuenzli/brr/07224eacb710d0e86571964dafe44bb0cd387f72/src/brr_webaudio.mli | ocaml | * Web Audio.
* Audio parameters.
* Automation rate enumeration.
* The type for {{:-US/docs/Web/API/AudioParamDescriptor#Properties}[AutomationRate]} values.
* The type for {{:-US/docs/Web/API/AudioParamDescriptor}[AudioParamDescriptor]} objects.
* [create name] is an audio parameter descriptor with
given... | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... |
d35d0272f301ce2e15668bf2e606a26b30cb085b10b69b312cd65de9d2ee3771 | rd--/hsc3 | Operators.hs | | Functions to make writing ' Applicative ' and ' Monad ' Ugen graphs less clumsy .
module Sound.Sc3.Common.Monad.Operators where
import Control.Applicative {- base -}
infixl 7 .*,*.,.*.
infixl 6 .+,+.,.+.
infixl 7 ./,/.,./.
infixl 6 .-,-.,.-.
-- | '+' variant with 'Functor' at left.
--
> fmap (= = 5 ) ( re... | null | https://raw.githubusercontent.com/rd--/hsc3/7dc748106639999947548d0b3205a468cfc55fed/Sound/Sc3/Common/Monad/Operators.hs | haskell | base
| '+' variant with 'Functor' at left.
| '+' variant with 'Functor' at right.
| '+' variant with 'Applicative' at left and right.
| '*' variant with 'Functor' at left.
| '*' variant with 'Functor' at right.
| '*' variant with 'Applicative' at left and right.
| '-' variant with 'Functor' at left.
| ... | | Functions to make writing ' Applicative ' and ' Monad ' Ugen graphs less clumsy .
module Sound.Sc3.Common.Monad.Operators where
infixl 7 .*,*.,.*.
infixl 6 .+,+.,.+.
infixl 7 ./,/.,./.
infixl 6 .-,-.,.-.
> fmap (= = 5 ) ( return 3 .+ 2 )
> [ 3,4 ] .+ 2 = = [ 5,6 ]
(.+) :: (Functor f, Num a) => f a -> a ... |
6f3ab62e2dfa1e3daacf921e45f2381538dec862b9a8dac2f3af0f67bd6c9213 | Datomic/mbrainz-importer | entities.clj | Copyright ( c ) Cognitect , Inc.
;; All rights reserved.
(ns datomic.mbrainz.importer.entities
(:require [clojure.spec.alpha :as s]))
(s/def ::non-empty-string (and string? #(not-empty %)))
(s/def ::gid uuid?)
(s/def ::name ::non-empty-string)
(s/def ::sortname ::non-empty-string)
(s/def ::country ::non-empty-st... | null | https://raw.githubusercontent.com/Datomic/mbrainz-importer/420edd6c2d07ce9edf48e9b31f047146e6f3c598/src/datomic/mbrainz/importer/entities.clj | clojure | All rights reserved. | Copyright ( c ) Cognitect , Inc.
(ns datomic.mbrainz.importer.entities
(:require [clojure.spec.alpha :as s]))
(s/def ::non-empty-string (and string? #(not-empty %)))
(s/def ::gid uuid?)
(s/def ::name ::non-empty-string)
(s/def ::sortname ::non-empty-string)
(s/def ::country ::non-empty-string)
(s/def ::type ::no... |
d51c73f1e8abafa3dbe325334582fa651ce662d2f7fc6a708dd1e742c4c0d0ba | Clozure/ccl-tests | flet.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Tue Oct 8 22:55:02 2002
;;;; Contains: Tests of FLET
(in-package :cl-test)
(deftest flet.1
(flet ((%f () 1))
(%f))
1)
(deftest flet.2
(flet ((%f (x) x))
(%f 2))
2)
(deftest flet.3
(flet ((%f (&rest args) args))
(%f 'a 'b 'c))
(a b c))
... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/flet.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of FLET
The optional arguments are not in the block defined by
the local function declaration
Key arguments are not in the block defined by
the local function declaration
The aux parameters are not in the block defined by
the local function declaration
The function is not ... | Author :
Created : Tue Oct 8 22:55:02 2002
(in-package :cl-test)
(deftest flet.1
(flet ((%f () 1))
(%f))
1)
(deftest flet.2
(flet ((%f (x) x))
(%f 2))
2)
(deftest flet.3
(flet ((%f (&rest args) args))
(%f 'a 'b 'c))
(a b c))
(deftest flet.4
(block %f
(flet ((%f (&optional... |
8a78f8cbc53d43adfd6ee2ca1845d43dc75c5a05d7a240c4789be7690ea341f9 | deobald/sicp-clojure | conditionals.clj |
(ns ch4.conditionals
(:use ch4.scheme-helpers
ch4.predicates
ch4.declarations))
(defn if-predicate [exp] (cadr exp))
(defn if-consequent [exp] (caddr exp))
(defn if-alternative [exp]
(if (not (nil? (cdddr exp)))
(cadddr exp)
'false))
(defn make-if [predicate consequent alternative]
(l... | null | https://raw.githubusercontent.com/deobald/sicp-clojure/fc24e5114604e7a0510dab779bbff962aac7ee7e/src/ch4/conditionals.clj | clojure |
(ns ch4.conditionals
(:use ch4.scheme-helpers
ch4.predicates
ch4.declarations))
(defn if-predicate [exp] (cadr exp))
(defn if-consequent [exp] (caddr exp))
(defn if-alternative [exp]
(if (not (nil? (cdddr exp)))
(cadddr exp)
'false))
(defn make-if [predicate consequent alternative]
(l... | |
bf8d2c43984dccb1972f0efb1878952224839cd7cef13c8a94a8dbb1ec74ba5e | thicksteadTHpp/Obvius | gl-obv-screen.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; File: gl-obv-screen.lisp
Author :
;;; Description: Generic screen handling stuff
Creation Date : 1993
;;; ----------------------------------------------------------------
Object - Based Vision and Image Understanding S... | null | https://raw.githubusercontent.com/thicksteadTHpp/Obvius/9a91673609def033539c9ebaf098e8f11eb0df6e/gl_windows/gl-obv-screen.lisp | lisp |
File: gl-obv-screen.lisp
Description: Generic screen handling stuff
----------------------------------------------------------------
This is an abstract superclass which should not be used.
specializing this class. For example, the "8bit-GL-screen"
Color LUT
Pseudo Color LUT
called by both initiali... | Author :
Creation Date : 1993
Object - Based Vision and Image Understanding System ( OBVIUS ) ,
Copyright 1988 , Vision Science Group , Media Laboratory ,
Massachusetts Institute of Technology .
(in-package :obvius)
GL Screen
(eval-when (eval load)
(pushnew 'initialize-GL... |
3f60d415a93081159a6d42abba1f95b218b44b4fe855420239141ad60719e01a | fourmolu/fourmolu | output-False.hs | # LANGUAGE RecordWildCards #
data Foo = Foo
{ a :: Int
, b :: Int
, c :: Int
}
x :: Foo -> Int
x Foo{a = 42} = a
y :: Foo -> Int
y Foo{a, b, c} = a + b + c
z :: Foo -> Int
z Foo{..} = a + b + c
| null | https://raw.githubusercontent.com/fourmolu/fourmolu/c47d1b68d7af393f1a1a32d0a77b85df0656f6d8/data/fourmolu/record-brace-space/output-False.hs | haskell | # LANGUAGE RecordWildCards #
data Foo = Foo
{ a :: Int
, b :: Int
, c :: Int
}
x :: Foo -> Int
x Foo{a = 42} = a
y :: Foo -> Int
y Foo{a, b, c} = a + b + c
z :: Foo -> Int
z Foo{..} = a + b + c
| |
45867c5425ddaff2010406d7fc4a6784225854a2ae59d3be1295144204f98413 | 8c6794b6/haskell-sc-scratch | AK47.hs | ------------------------------------------------------------------------------
-- |
-- Module : $Header$
CopyRight : ( c ) 8c6794b6
-- License : BSD3
Maintainer :
-- Stability : unstable
-- Portability : non-portable
--
-- From:
--
-- <>
--
--
-- Try:
--
-- > > withSC3 reset
-- > > withSC3 loadAK47... | null | https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/pssd/src/Pssd/Mayhem/AK47.hs | haskell | ----------------------------------------------------------------------------
|
Module : $Header$
License : BSD3
Stability : unstable
Portability : non-portable
From:
<>
Try:
> > withSC3 reset
> > withSC3 loadAK47
| Try:
> > audition $ sweepImpulse1 20000 0 0.5
> > audition $ sweepImpulse1... | CopyRight : ( c ) 8c6794b6
Maintainer :
module Pssd.Mayhem.AK47 where
import Sound.OpenSoundControl
import Sound.SC3
import Sound.SC3.ID
import Sound.SC3.Lepton
import Pssd.Util
^ Sweep duration in second
-> UGen
sweepImpulse1 start end dur = out2 (sig * 0.25)
where
sig = sinOsc ar fr... |
1db783087c0db16e717e1a7d7e829726c4e691dd2b78bfeccec236d690128dac | PaulBatchelor/codex | sound.scm | (define (load-shape shape filename)
(monolith:ftbl-create shape 44)
(monft shape)
(monolith:ftbl-pop-n-load filename))
(define (sqlar:crateloadraw db name id)
(lvl
(list "crtrawk"
(string-append "[grab " db "]")
name
id)))
(define (load-the-shapes)
(sqlar:crateloadraw "sqlite" ... | null | https://raw.githubusercontent.com/PaulBatchelor/codex/9000f9ec51fb9733ebd52003f6dd978563784751/qipacal/sound.scm | scheme | (define (load-shape shape filename)
(monolith:ftbl-create shape 44)
(monft shape)
(monolith:ftbl-pop-n-load filename))
(define (sqlar:crateloadraw db name id)
(lvl
(list "crtrawk"
(string-append "[grab " db "]")
name
id)))
(define (load-the-shapes)
(sqlar:crateloadraw "sqlite" ... | |
d6bd1241257d68c0187a72bc5ec8303ff2080ba47d7caf07865fb4127e104756 | Armael/marracheck | state.mli | open Utils
type t
val load : workdir:string -> t
val get_workdir : t -> string
type plain
type 'a append
type ('a, 'k) file
type git
type 'k dir
type 'k path
val read : t -> ('a, _) file path -> 'a
val write : t -> ('a, _) file path -> 'a -> unit
val append : t -> (_, 'b append) file path -> 'b -> unit
val mkdir : ... | null | https://raw.githubusercontent.com/Armael/marracheck/fc5eea6e782275d86581900d3c0f4dd5744f21ef/lib/state.mli | ocaml | converting paths to full filesystem paths
path constructors
switch_state-local paths
higher-level queries that aggregate or further process information from the
files | open Utils
type t
val load : workdir:string -> t
val get_workdir : t -> string
type plain
type 'a append
type ('a, 'k) file
type git
type 'k dir
type 'k path
val read : t -> ('a, _) file path -> 'a
val write : t -> ('a, _) file path -> 'a -> unit
val append : t -> (_, 'b append) file path -> 'b -> unit
val mkdir : ... |
35f22ef536893c5f8d6f8ce555364644c65c49ea54fee43078e25607047d5cc8 | jgm/commonmark-hs | PipeTable.hs | {-# LANGUAGE IncoherentInstances #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE DeriveDataTypeable #-}
module Commonmark.Extensions.PipeTable
( HasPipeTable(..)
, ColAlignment(..)
, pipeTableSpec... | null | https://raw.githubusercontent.com/jgm/commonmark-hs/02f573527d537a3f9e037d460638d1e4f8a5ca9b/commonmark-extensions/src/Commonmark/Extensions/PipeTable.hs | haskell | # LANGUAGE IncoherentInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE DeriveDataTypeable #
in reverse order
| Syntax for pipe tables. Note that this should generally be
placed AFTER the syntax spec for lists, headings, and other block-level
constructs, to avoid bad results when non-table lines contai... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Commonmark.Extensions.PipeTable
( HasPipeTable(..)
, ColAlignment(..)
, pipeTableSpec
)
where
import Control.Monad (guard)
import Commonmark.Syntax
import Commonmark.Types
import Commonmark.Tokens
imp... |
275aeda55068571166f14014606e0705ef0f2c10404588e5f62bb2c6ceb5b376 | eudoxia0/crane | interface.lisp | (in-package :cl-user)
(defpackage crane.interface
(:use :cl :anaphora :iter)
(:import-from :crane.util
:make-keyword
:get-class-slot)
(:import-from :crane.meta
:<table-class>
:table-name
:table-database
:col-foreign)
... | null | https://raw.githubusercontent.com/eudoxia0/crane/1a85295d7ea0d13d74822dd835d8abfada4b1685/src/interface.lisp | lisp | TODO: If the slot is a foreign key, and is storing an
instance of an object, store that object's id
Query its ID | (in-package :cl-user)
(defpackage crane.interface
(:use :cl :anaphora :iter)
(:import-from :crane.util
:make-keyword
:get-class-slot)
(:import-from :crane.meta
:<table-class>
:table-name
:table-database
:col-foreign)
... |
2180b28ba2e366fe68bb90ea6fba2cb936d24e84f20fd09de59eb8dc2d0bb43f | brendanhay/gogol | CaptureOrder.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Orders/CaptureOrder.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Resource
** Constructing a Request
| A resource alias for @content.orders.captureOrder@ method which the
'ContentOrdersCaptureOrder' request conforms to.
/See:/ 'newContentOrdersCaptureOrder' smart constructor.
| V1 error... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
e0638b018f23a535eb5828bd3c535317a21d86d5ab61576df45d295f914f41d4 | bondy-io/bondy | bondy_rpc_load_balancer.erl | %% =============================================================================
%% bondy_load_balancer.erl -
%%
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the Licen... | null | https://raw.githubusercontent.com/bondy-io/bondy/2342fe577b410fa86362c37c8ee0b32bb9fe1463/apps/bondy/src/bondy_rpc_load_balancer.erl | erlang | =============================================================================
bondy_load_balancer.erl -
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... | Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
the and Procedure to invoke when handling a WAMP Call .
remote Callees .
supports all WAMP Basic and ... |
daa20b03ef182ba251e4446cb5e575c0e721289d8f0be36adefd0ecf91e11da9 | well-typed/large-records | R090.hs | # LANGUAGE TypeApplications #
#if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.Induction_Tree_Nominal.Sized.R090 where
import Data.Proxy
import Common.EmptyClass_Tree_N... | null | https://raw.githubusercontent.com/well-typed/large-records/c6c2b51af11e90f30822543d7ce4d1cb28cee294/large-records-benchmarks/bench/experiments/Experiment/Induction_Tree_Nominal/Sized/R090.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | # LANGUAGE TypeApplications #
#if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.Induction_Tree_Nominal.Sized.R090 where
import Data.Proxy
import Common.EmptyClass_Tree_Nominal
import Common.HListOfSize.HL090
requiresInstance :: ()
requiresInstance = requireEmptyClass (Proxy @ExampleFields)
|
ff9436c0606b7031a1dc558baa42d5d87037306be4c0077010a176aa0c6dbab0 | ostinelli/ram | ram_backbone.erl | %% ==========================================================================================================
Ram - An ephemeral distributed KV store for Erlang and Elixir .
%%
The MIT License ( MIT )
%%
Copyright ( c ) 2021 - 2022 < > .
%%
%% Permission is hereby granted, free of charge, to any person obtaini... | null | https://raw.githubusercontent.com/ostinelli/ram/8783325cc02917aa412b4e78f546b0b427ed7759/src/ram_backbone.erl | erlang | ==========================================================================================================
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, s... | Ram - An ephemeral distributed KV store for Erlang and Elixir .
The MIT License ( MIT )
Copyright ( c ) 2021 - 2022 < > .
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions... |
f265243e893ed24126ff26923b6688e7ceca40785a8eec17ffb48c66315f29e0 | ghc/packages-Cabal | InstalledPreference.hs | module Distribution.Solver.Types.InstalledPreference
( InstalledPreference(..),
) where
import Prelude (Show)
-- | Whether we prefer an installed version of a package or simply the latest
-- version.
--
data InstalledPreference = PreferInstalled | PreferLatest
deriving Show
| null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/Distribution/Solver/Types/InstalledPreference.hs | haskell | | Whether we prefer an installed version of a package or simply the latest
version.
| module Distribution.Solver.Types.InstalledPreference
( InstalledPreference(..),
) where
import Prelude (Show)
data InstalledPreference = PreferInstalled | PreferLatest
deriving Show
|
f7e9bc296200edd8b4bde73a445558dd02c035e21a89ccb4b087de160d04bc04 | graninas/Functional-Design-and-Architecture | FizzBuzzMorse.hs | module Main where
import Data.Char (toLower)
fizzBuzz :: Int -> String
fizzBuzz x | (x `mod` 15) == 0 = "FizzBuzz"
| (x `mod` 5) == 0 = "Buzz"
| (x `mod` 3) == 0 = "Fizz"
| otherwise = show x
morseCode :: [(Char, String)]
morseCode =
[ ('b', "-..."), ('f', "..-."), ('... | null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/First-Edition/BookSamples/CH04/FizzBuzzMorse.hs | haskell | all these functions have type (Int -> String)
eta-conversion
| module Main where
import Data.Char (toLower)
fizzBuzz :: Int -> String
fizzBuzz x | (x `mod` 15) == 0 = "FizzBuzz"
| (x `mod` 5) == 0 = "Buzz"
| (x `mod` 3) == 0 = "Fizz"
| otherwise = show x
morseCode :: [(Char, String)]
morseCode =
[ ('b', "-..."), ('f', "..-."), ('... |
96e374f884673484c3d265258279291c4be3707e7f1cfe7df822f05061fed781 | OCamlPro/alt-ergo | loc.ml | (******************************************************************************)
(* *)
(* The Alt-Ergo theorem prover *)
Copyright ( C ) 2006 - 2013 ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/43c4cb3a4d194399eea91f09f84f4092d6d87019/src/lib/util/loc.ml | ocaml | ****************************************************************************
The Alt-Ergo theorem prover
... | Copyright ( C ) 2006 - 2013
... |
13cfd8f3debddd183f2ec7b993bfef70ea62b86de9ba533a98c4c0068ca26102 | ephemient/aoc2018 | Day6.hs | |
Module : Day6
Description : < Day 6 : Chronal Coordinates >
Module: Day6
Description: < Day 6: Chronal Coordinates>
-}
# LANGUAGE FlexibleContexts , LambdaCase , TupleSections , TypeApplications , ViewPatterns #
module Day6 (day6a, day6b) where
import Control.Arrow ((&&&), (***))
impor... | null | https://raw.githubusercontent.com/ephemient/aoc2018/eb0d04193ccb6ad98ed8ad2253faeb3d503a5938/src/Day6.hs | haskell | |
Module : Day6
Description : < Day 6 : Chronal Coordinates >
Module: Day6
Description: < Day 6: Chronal Coordinates>
-}
# LANGUAGE FlexibleContexts , LambdaCase , TupleSections , TypeApplications , ViewPatterns #
module Day6 (day6a, day6b) where
import Control.Arrow ((&&&), (***))
impor... | |
9044df987ae0c197c956727891a00c2ca9c61acf52d896d2da195c26024ff943 | haskell-works/hw-dsv | Type.hs | # LANGUAGE DeriveGeneric #
module HaskellWorks.Data.Dsv.Lazy.Cursor.Type where
import Control.DeepSeq (NFData)
import Data.Word
import GHC.Generics (Generic)
import qualified Data.ByteString.Lazy as LBS
import qualified Data.Vector.Storable as DVS
data DsvCursor = DsvCursor
{ dsvCursorText :: !LBS.ByteString
... | null | https://raw.githubusercontent.com/haskell-works/hw-dsv/4f1274af383281589165232186f99219479d7898/src/HaskellWorks/Data/Dsv/Lazy/Cursor/Type.hs | haskell | # LANGUAGE DeriveGeneric #
module HaskellWorks.Data.Dsv.Lazy.Cursor.Type where
import Control.DeepSeq (NFData)
import Data.Word
import GHC.Generics (Generic)
import qualified Data.ByteString.Lazy as LBS
import qualified Data.Vector.Storable as DVS
data DsvCursor = DsvCursor
{ dsvCursorText :: !LBS.ByteString
... | |
8999ea174dbee5653e77d3bb5c3a7ae3ee0f331ce69dc6aa0dbfac227036a228 | racehub/stripe-clj | schema.cljc | (ns stripe.schema
(:require [schema.core :as s :include-macros true]
#?(:clj clojure.core.async :cljs cljs.core.async))
#?(:clj
(:import [clojure.core.async.impl.protocols ReadPort])))
;; ## Shared Schema
(defn non-negative [schema]
(s/both schema (s/pred (complement neg?))))
(s/defschema Posi... | null | https://raw.githubusercontent.com/racehub/stripe-clj/f8199bceacbec9d15ac58f32508aa1e78aa1b491/src/clj/stripe/schema.cljc | clojure | ## Shared Schema | (ns stripe.schema
(:require [schema.core :as s :include-macros true]
#?(:clj clojure.core.async :cljs cljs.core.async))
#?(:clj
(:import [clojure.core.async.impl.protocols ReadPort])))
(defn non-negative [schema]
(s/both schema (s/pred (complement neg?))))
(s/defschema PositiveInt
(s/both s/... |
cc0886958f789fe56123310eafc6ef6d9e6ee9e60937c5e001003076d53ed2bf | JHU-PL-Lab/jaylang | translation_context.ml | type translation_context = {
tc_fresh_suffix_separator : string;
tc_contextual_recursion : bool;
mutable tc_fresh_name_counter : int;
mutable tc_jayil_jay_mappings : Jay_to_jayil_maps.t;
}
(* ?(is_jay = false) *)
let new_translation_context suffix is_jay () =
{
tc_fresh_name_counter = 0;
tc_fresh_s... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/jay-translate/translation_context.ml | ocaml | ?(is_jay = false) | type translation_context = {
tc_fresh_suffix_separator : string;
tc_contextual_recursion : bool;
mutable tc_fresh_name_counter : int;
mutable tc_jayil_jay_mappings : Jay_to_jayil_maps.t;
}
let new_translation_context suffix is_jay () =
{
tc_fresh_name_counter = 0;
tc_fresh_suffix_separator = suffix;
... |
1ed95dfd8aeb392325d54b9f79e0046665606bcc065700b2ba9f64fd6f4ab807 | jochu/swank-clojure | string.clj | (ns swank.util.string)
(defn largest-common-prefix
"Returns the largest common prefix of two strings."
([#^String a, #^String b]
(apply str (take-while (comp not nil?) (map #(when (= %1 %2) %1) a b))))
{:tag String})
(defn char-position
"Finds the position of a character within a string, optionally
pr... | null | https://raw.githubusercontent.com/jochu/swank-clojure/b08daf866488b449a44ba8df6e5ae17a3515ef57/src/swank/util/string.clj | clojure | (ns swank.util.string)
(defn largest-common-prefix
"Returns the largest common prefix of two strings."
([#^String a, #^String b]
(apply str (take-while (comp not nil?) (map #(when (= %1 %2) %1) a b))))
{:tag String})
(defn char-position
"Finds the position of a character within a string, optionally
pr... | |
962b06f3426839aff573bff8c2cd08a3a37c774def4d42c25a5a3f20479ebbb5 | spwhitton/consfigurator | reader.lisp | ;;; Consfigurator -- Lisp declarative configuration management system
Copyright ( C ) 2021 < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 , or ( at your option )
;... | null | https://raw.githubusercontent.com/spwhitton/consfigurator/ee162259b316550afc201979cd10be7f3343c358/src/reader.lisp | lisp | Consfigurator -- Lisp declarative configuration management system
This file is free software; you can redistribute it and/or modify
either version 3 , or ( at your option )
any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty o... |
Copyright ( C ) 2021 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(in-package :consfigurator)
(named-readtables:defreadtable :consfigurator
(:merge :standard)
(:dispatch-macro-char #\# #\? #'cl-interpol:in... |
f5c2608126f4c5ab7ef07ccf461835c3beda88e7b7cf3843cc25dd110c9165c9 | spechub/Hets | Morphism.hs | {-# LANGUAGE DeriveDataTypeable #-}
|
Module : ./CommonLogic / Morphism.hs
Description : Morphism of Common Logic
Copyright : ( c ) Uni Bremen DFKI 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : non - portable ( via... | null | https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/CommonLogic/Morphism.hs | haskell | # LANGUAGE DeriveDataTypeable #
pretty printing
identity morphism
composition
inclusion map
map of sentences
application function for maps
application function for morphism
maps of sets
| Constructs an id-morphism
| Determines whether a morphism is valid
| Application funtion for morphisms
| Application fun... | |
Module : ./CommonLogic / Morphism.hs
Description : Morphism of Common Logic
Copyright : ( c ) Uni Bremen DFKI 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : experimental
Portability : non - portable ( via Logic . Logic )
Morphism of Comm... |
dd06f6ff163b53dc26eced34b5a16829b4ed2f2e92e47af418b6996f58c3e4dc | bvaugon/ocapic | random.mli | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/lib/random.mli | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
external round : unit -> unit = "caml_random_round"
external bits : unit -> int = "caml_random_bits"
* Returns 14 random bits in a nonnegative integer .
external bool : unit -> bool... |
fbbfa41316b8bf7d72867f28a5ed781fe170076c7fd72e3d84c94be87c66a5cc | smee/binary | codectests.clj | (ns org.clojars.smee.binary.codectests
(:require [clojure.test :refer [deftest are is]]
[clojure.walk :as walk]
[org.clojars.smee.binary.core :refer :all]
[org.clojars.smee.binary.demo.bitcoin :as btc])
(:import impl.NullOutputStream))
(defn s2b [^String s]
(vec (.getBytes s "... | null | https://raw.githubusercontent.com/smee/binary/4b23bdd8de1667bc991478739690068b484420d6/test/org/clojars/smee/binary/codectests.clj | clojure | test pre-encode and post-decode
unbounded length
Main network magic bytes
"version" command with padding
payload checksum | (ns org.clojars.smee.binary.codectests
(:require [clojure.test :refer [deftest are is]]
[clojure.walk :as walk]
[org.clojars.smee.binary.core :refer :all]
[org.clojars.smee.binary.demo.bitcoin :as btc])
(:import impl.NullOutputStream))
(defn s2b [^String s]
(vec (.getBytes s "... |
2b8de76e7b5a2df49c7d08489c287a426f71772c51d6eb73734b9765132c1717 | ocsigen/js_of_ocaml | test_domain.ml | let%expect_test _ =
let d = Domain.spawn (fun () -> 1 + 2) in
print_int (Domain.join d);
[%expect {| 3 |}];
let d = Domain.spawn (fun () -> 1 + 2) in
let d_id = Domain.get_id d in
let id = Domain.self () in
Printf.printf "d_id: %d\n" (d_id :> int);
Printf.printf "self id: %d\n" (id :> int);
let res = ... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/3a615d693b213140ea8e5c43d5bbe99569bc898d/compiler/tests-jsoo/lib-effects/test_domain.ml | ocaml | let%expect_test _ =
let d = Domain.spawn (fun () -> 1 + 2) in
print_int (Domain.join d);
[%expect {| 3 |}];
let d = Domain.spawn (fun () -> 1 + 2) in
let d_id = Domain.get_id d in
let id = Domain.self () in
Printf.printf "d_id: %d\n" (d_id :> int);
Printf.printf "self id: %d\n" (id :> int);
let res = ... | |
b5833bb63db30403a9fc5e1764eb84b252819251f6e1d034c14296fec8554792 | juxt/shop | migration_test.clj | (ns edge.migration-test
(:require
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.test :refer :all]
edge.migration
[rewrite-clj.parser :refer [parse-string]]))
(deftest migrations-run
(doseq [example-project ["main" "phonebook-api" "phonebook-app" "tutorial.oic" "tutorial.vent" "yada.ex... | null | https://raw.githubusercontent.com/juxt/shop/c23fc55bca1852bfbabb681a72debc12373c3a36/lib/edge.migration/test/edge/migration_test.clj | clojure | (ns edge.migration-test
(:require
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.test :refer :all]
edge.migration
[rewrite-clj.parser :refer [parse-string]]))
(deftest migrations-run
(doseq [example-project ["main" "phonebook-api" "phonebook-app" "tutorial.oic" "tutorial.vent" "yada.ex... | |
bdff8e78c94cbd388ef0ac021b19430101996b95429a4a2f630b7f9bbe0059c2 | anoma/juvix | MiniC.hs | module Commands.Dev.MiniC where
import Commands.Base
import Commands.Dev.MiniC.Options
import Juvix.Compiler.Backend.C.Translation.FromInternal qualified as MiniC
runCommand :: (Members '[Embed IO, App] r) => MiniCOptions -> Sem r ()
runCommand opts = do
miniC <- (^. MiniC.resultCCode) <$> runPipeline (opts ^. mini... | null | https://raw.githubusercontent.com/anoma/juvix/807b3b1770289b8921304e92e7305c55c2e11f8f/app/Commands/Dev/MiniC.hs | haskell | module Commands.Dev.MiniC where
import Commands.Base
import Commands.Dev.MiniC.Options
import Juvix.Compiler.Backend.C.Translation.FromInternal qualified as MiniC
runCommand :: (Members '[Embed IO, App] r) => MiniCOptions -> Sem r ()
runCommand opts = do
miniC <- (^. MiniC.resultCCode) <$> runPipeline (opts ^. mini... | |
a5b402c70817ec06ce6e429b4dd1addec5a0e0dfd3f66e16e0ef9ffbbfc716fa | puppetlabs/clj-http-client | sync_ssl_test.clj | (ns puppetlabs.http.client.sync-ssl-test
(:import (com.puppetlabs.http.client Sync
HttpClientException
SimpleRequestOptions)
(javax.net.ssl SSLHandshakeException SSLException)
(java.net URI ConnectException)
... | null | https://raw.githubusercontent.com/puppetlabs/clj-http-client/8e4c79db1deede47783bdcfa2f4f261e2b0f8585/test/puppetlabs/http/client/sync_ssl_test.clj | clojure | fail if we don't get an exception | (ns puppetlabs.http.client.sync-ssl-test
(:import (com.puppetlabs.http.client Sync
HttpClientException
SimpleRequestOptions)
(javax.net.ssl SSLHandshakeException SSLException)
(java.net URI ConnectException)
... |
39d78d9f361b3a52bc60bc7395ac46b56ac591f59ab66159380a2e6a92d53dcf | BinaryAnalysisPlatform/bap | ida_main.ml | open Bap_knowledge
open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_future.Std
open Bap.Std
open Bap_ida.Std
open Format
open Result.Monad_infix
module Unix = Caml_unix
include Self()
module Info = Bap_ida_info
module Symbols = Data.Make(struct
type t = (string * int64 * int64) list
let version = ... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/cbdf732d46c8e38df79d9942fc49bcb97915c657/plugins/ida/ida_main.ml | ocaml | open Bap_knowledge
open Core_kernel[@@warning "-D"]
open Regular.Std
open Bap_future.Std
open Bap.Std
open Bap_ida.Std
open Format
open Result.Monad_infix
module Unix = Caml_unix
include Self()
module Info = Bap_ida_info
module Symbols = Data.Make(struct
type t = (string * int64 * int64) list
let version = ... | |
2152c84e27260b14ea92c6d4a430afd9f31ab124a9c222e325b59c7e30cba769 | a9032676/Codewars-Haskell | CountingPreloaded.hs | module CountingPreloaded where
import Control.Arrow ((***))
data Nat = Z | S Nat deriving (Show, Eq, Ord)
nat :: a -> (Nat -> a) -> Nat -> a
nat a _ Z = a
nat _ aa (S n) = aa n
iterNat :: (a -> a) -> a -> Nat -> a
iterNat _ a Z = a
iterNat aa a (S n) = iterNat aa (aa a) n
natUnderflow :: String
natUnderflow = "Nat ... | null | https://raw.githubusercontent.com/a9032676/Codewars-Haskell/6eccd81e9b6ae31b5c0a28ecc16b933f3abae1a5/src/CountingPreloaded.hs | haskell | module CountingPreloaded where
import Control.Arrow ((***))
data Nat = Z | S Nat deriving (Show, Eq, Ord)
nat :: a -> (Nat -> a) -> Nat -> a
nat a _ Z = a
nat _ aa (S n) = aa n
iterNat :: (a -> a) -> a -> Nat -> a
iterNat _ a Z = a
iterNat aa a (S n) = iterNat aa (aa a) n
natUnderflow :: String
natUnderflow = "Nat ... | |
4ba2fbc82a07a7d6ae2dc0c1ad24f9c99be4050841e1d740e6c569dc67aa5745 | iloveponies/one-function-to-rule-them-all | one_function_to_rule_them_all_test.clj | (ns one-function-to-rule-them-all-test
(:use iloveponies.tests.one-function-to-rule-them-all))
| null | https://raw.githubusercontent.com/iloveponies/one-function-to-rule-them-all/e76089d39b1f5e209f2f5bb928d38729796fb3b0/test/one_function_to_rule_them_all_test.clj | clojure | (ns one-function-to-rule-them-all-test
(:use iloveponies.tests.one-function-to-rule-them-all))
| |
993a5112c2034e20b892bd93854f5bddac021ae8877de036aee1a0ff07659bcd | reflex-frp/reflex-native | Test.hs | |Consolidation of the @Reflex . Native . Test@ modules into a single namespace and with internals hidden for convenience .
module Reflex.Native.Test (module Export) where
import Reflex.Native.Test.Evaluation as Export
import Reflex.Native.Test.Optics as Export
import Reflex.Native.Test.Runner as Export
import Reflex... | null | https://raw.githubusercontent.com/reflex-frp/reflex-native/5fb6a07845e4f7c51f97e9c8ce1a48009f341246/reflex-native-test/src/Reflex/Native/Test.hs | haskell | |Consolidation of the @Reflex . Native . Test@ modules into a single namespace and with internals hidden for convenience .
module Reflex.Native.Test (module Export) where
import Reflex.Native.Test.Evaluation as Export
import Reflex.Native.Test.Optics as Export
import Reflex.Native.Test.Runner as Export
import Reflex... | |
ee388f9bf6df0a266ccef7a0f862ce5ce4f5a0f31a21198028533b4b97304f7b | sarabander/p2pu-sicp | Ex1.31.scm | ;; recursive product
(define (product term a next b)
(if (> a b)
1
(* (term a)
(product term (next a) next b))))
;; iterative product
(define (product term a next b)
(define (iter a result)
(if (> a b)
result
(iter (next a) (* (term a) result))))
(iter a 1))
;; traditional definition of fact... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/1.3/Ex1.31.scm | scheme | recursive product
iterative product
traditional definition of factorial
new factorial using product
biggest factor in numerator (even) | (define (product term a next b)
(if (> a b)
1
(* (term a)
(product term (next a) next b))))
(define (product term a next b)
(define (iter a result)
(if (> a b)
result
(iter (next a) (* (term a) result))))
(iter a 1))
(define (factorial n)
(if (= n 0)
1
(* n (factorial (- n 1)))... |
cde9f90e23fdc231a7ad688cfcdbf03327eb14f6dcf33924f8a9df13e67661cc | rainbyte/frag | TextureFonts.hs | TextureFonts.hs ; ( ) 2005
This module handles the fonts and crosshairs of the game
--credits go to NeHe tutorials for their texturefonts tutorial
This module handles the fonts and crosshairs of the game
--credits go to NeHe tutorials for their texturefonts tutorial
-}
module TextureFont... | null | https://raw.githubusercontent.com/rainbyte/frag/28893048f093f369c896932ff297150ef8ed2dd0/src/TextureFonts.hs | haskell | credits go to NeHe tutorials for their texturefonts tutorial
credits go to NeHe tutorials for their texturefonts tutorial
build a display list for the fonts
the steps needed to display every font
generates a displaylist for displaying large digits
steps needed to render a big digit
renders a large digit
p... | TextureFonts.hs ; ( ) 2005
This module handles the fonts and crosshairs of the game
This module handles the fonts and crosshairs of the game
-}
module TextureFonts where
import Graphics.UI.GLUT
import Textures
import Data.Maybe
import Data.Char
import qualified Data.HashTable.IO as HT... |
6ac01a1251fe903adc38d183d7e1abe80faa988ea3dce9355f71d04cbce3d624 | Deducteam/Dedukti | parser.mli | open Kernel
(** Abstract parser stream representation. *)
type stream
(** Abstract type for input. *)
type input
exception Parse_error of Basic.loc * string
val input_from_file : string -> input
val input_from_stdin : Basic.mident -> input
val input_from_string : Basic.mident -> string -> input
val md_of_input :... | null | https://raw.githubusercontent.com/Deducteam/Dedukti/abbe11318189c32ae236671ccd8dcf3c89525065/parsing/parser.mli | ocaml | * Abstract parser stream representation.
* Abstract type for input.
* [read str] reads a single entry from the parser stream [str]. When no more
[entry] is available, the [End_of_file] exception is raised.
* [from_channel in] creates a parser [stream] for the environment [env]
[env] given the input [in].
* ... | open Kernel
type stream
type input
exception Parse_error of Basic.loc * string
val input_from_file : string -> input
val input_from_stdin : Basic.mident -> input
val input_from_string : Basic.mident -> string -> input
val md_of_input : input -> Basic.mident
val md_of_file : string -> Basic.mident
val file_of_i... |
263f823653011edc232e159b0155de9e1aa00c34cd0374b19ad75d20fe0d92b8 | xeqi/peridot | core.clj | (ns peridot.core
(:require [clojure.data.codec.base64 :as base64]
[peridot.cookie-jar :as pcj]
[peridot.request :as pr]
[ring.util.response :as rur]))
(defn session
"Creates an initial state for passing through the api."
[app & params]
(assoc (apply hash-map params) :app app... | null | https://raw.githubusercontent.com/xeqi/peridot/125dd580d1ab1bef04cf421d0945304b04743b8b/src/peridot/core.clj | clojure | (ns peridot.core
(:require [clojure.data.codec.base64 :as base64]
[peridot.cookie-jar :as pcj]
[peridot.request :as pr]
[ring.util.response :as rur]))
(defn session
"Creates an initial state for passing through the api."
[app & params]
(assoc (apply hash-map params) :app app... | |
e0339f0dd9d21f0deab237c594f43f648d91ac779dcdbe9b476de905e17c2948 | Gabriella439/Haskell-Optional-Args-Library | Optional.hs | # LANGUAGE CPP #
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
-- | Use the `Optional` type for optional function arguments. For example:
--
-- > import Data.Optional
-- >
-- > greet :: Optional String -> String
-- > greet (Specific name) = "He... | null | https://raw.githubusercontent.com/Gabriella439/Haskell-Optional-Args-Library/b848024a346a3449d4557cea1d9a207488a44c6e/src/Data/Optional.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveTraversable #
| Use the `Optional` type for optional function arguments. For example:
> import Data.Optional
>
> greet :: Optional String -> String
> greet (Specific name) = "Hello, " ++ name
> greet Default = "Hello"
>>> g... | # LANGUAGE CPP #
> > > greet ( Specific " " )
" Hello , "
The ` Optional ` type overloads as many literals as possible so
> > > greet " "
" Hello , "
> birthday ( Specific age ) = " You are " + + show age + + " years old ! "
> birthday Default = " You are one year older !... |
48a2357c02f8258f2d4532b9863579b2b7344d11148e79c594413b80292e10ba | gilith/hol-light | pdivides_thms.ml | let neg_odd_lem = prove_by_refinement(
`!a n p c q d.
(a pow n * p x = c x * q x + d x) ==>
ODD n ==>
((-- a) pow n * p x = (-- c x) * q x + (-- d x))`,
(* {{{ Proof *)
[
REPEAT STRIP_TAC;
REWRITE_TAC[REAL_ARITH `-- x * y = -- (x * y)`];
REWRITE_TAC[REAL_ARITH `-- x + -- y = -- (x + y)`];
... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/Rqe/pdivides_thms.ml | ocaml | {{{ Proof
}}}
{{{ Proof
}}} | let neg_odd_lem = prove_by_refinement(
`!a n p c q d.
(a pow n * p x = c x * q x + d x) ==>
ODD n ==>
((-- a) pow n * p x = (-- c x) * q x + (-- d x))`,
[
REPEAT STRIP_TAC;
REWRITE_TAC[REAL_ARITH `-- x * y = -- (x * y)`];
REWRITE_TAC[REAL_ARITH `-- x + -- y = -- (x + y)`];
CLAIM `-- a pow ... |
e184d99b047943ff4e8b6be3af6aa03477bfc976b5c5edd6c11ff0e69ab1c7fd | opencog/pln | propositional-rule-base-config.scm | ;;
URE Configuration file for a mere fuzzy conjunction rule
;;
;; Before running any PLN inference you must load that file in the
AtomSpace
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Load required modules and utils ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(use-modules (opencog))
(use-modules (opencog ure))
;;;;;;;... | null | https://raw.githubusercontent.com/opencog/pln/52dc099e21393892cf5529fef687a69682436b2d/examples/pln/propositional/propositional-rule-base-config.scm | scheme |
Before running any PLN inference you must load that file in the
Load required modules and utils ;;
Define a rule-based system ;;
Define conj-bc for convenience
Load rules ;;
Load the rules of the propositional rule base
Associate rules to the conjunction rule base ;;
List the rules
Associate rules to... | URE Configuration file for a mere fuzzy conjunction rule
AtomSpace
(use-modules (opencog))
(use-modules (opencog ure))
(define propositional-rule-base (ConceptNode "propositional-rule-base"))
(define (prop-bc target) (cog-bc propositional-rule-base target))
(define pln-rules-dir "../../../opencog/pln/rules/"... |
29240ee21a547b1398c5e2f35c651127879d5a3e64decf4043b98e41dcde28cd | v-kolesnikov/sicp | 3_29.clj | (ns sicp.chapter03.3-29
(:require [sicp.chapter03.wirelang :refer [after-delay and-gate get-signal
inverter logical-or make-wire
or-gate-delay set-signal!]]))
(defn or-gate
[input-a input-b output]
(let [or-proc (fn []
... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter03/3_29.clj | clojure | A || B = !(!A & !B)
!A
!B
(!A & !B)
!(!A & !B) | (ns sicp.chapter03.3-29
(:require [sicp.chapter03.wirelang :refer [after-delay and-gate get-signal
inverter logical-or make-wire
or-gate-delay set-signal!]]))
(defn or-gate
[input-a input-b output]
(let [or-proc (fn []
... |
457c86cf8d9f8f278e6721ae7c9e73c4fdf7d52a26e6af799d03f0a271f4f7d4 | AccelerateHS/accelerate | LetSplit.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE GADTs #-}
{-# OPTIONS_HADDOCK hide #-}
-- |
Module : Data . Array . Accelerate . Trafo .
Copyright : [ 2012 .. 2020 ] The Accelerate Team
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
Portability : non - portable ( GHC extension... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/2fbefeff8e76aa83875b9f8c3f6e6cdd915053a8/src/Data/Array/Accelerate/Trafo/LetSplit.hs | haskell | # LANGUAGE GADTs #
# OPTIONS_HADDOCK hide #
|
License : BSD3
Stability : experimental
| # LANGUAGE LambdaCase #
Module : Data . Array . Accelerate . Trafo .
Copyright : [ 2012 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.Trafo.LetSplit (
convertAfun,
convertAcc,
) where
import Prelude ... |
e8c7b85e0a9388589487615ab3d129b1787c1afdc50c5f30788c2e36122aeeae | OCamlPro/alt-ergo | fun_sat.mli | (******************************************************************************)
(* *)
(* The Alt-Ergo theorem prover *)
Copyright ( C ) 2006 - 2013 ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/src/lib/reasoners/fun_sat.mli | ocaml | ****************************************************************************
The Alt-Ergo theorem prover
... | Copyright ( C ) 2006 - 2013
... |
68614278034588d087da6e46c356181e9d93504e69e4adebc3f5b3ad1985707d | ocaml-flambda/ocaml-jst | pr6992_bad.ml | TEST
flags = " -w -a "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a "
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
PR#6992 , reported by
type (_, _)... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/testsuite/tests/typing-modules-bugs/pr6992_bad.ml | ocaml | TEST
flags = " -w -a "
ocamlc_byte_exit_status = " 2 "
* setup - ocamlc.byte - build - env
* * ocamlc.byte
* * * check - ocamlc.byte - output
flags = " -w -a "
ocamlc_byte_exit_status = "2"
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
PR#6992 , reported by
type (_, _)... | |
9e0f6d79f092351c6668618d5c2fb53c2045f61d9b75870702addd6e894e1961 | ocaml-explore/explore | main.ml | type i_list = int list [@@deriving stringify]
type b_list = bool list [@@deriving stringify]
type i_list_list = int list list [@@deriving stringify]
let () =
let i_lst = [ 1; 2; 3 ] in
let b_lst = [ true; false; true ] in
let i_lst_lst = [ [ 1; 2; 3 ]; [ 4; 5; 6 ] ] in
print_endline (i_list_stringify i_lst);... | null | https://raw.githubusercontent.com/ocaml-explore/explore/117768b378959f18a8d818f37779a750e90f3438/content/workflows/meta-programming-with-ppx/examples/ppx_stringify/example/main.ml | ocaml | type i_list = int list [@@deriving stringify]
type b_list = bool list [@@deriving stringify]
type i_list_list = int list list [@@deriving stringify]
let () =
let i_lst = [ 1; 2; 3 ] in
let b_lst = [ true; false; true ] in
let i_lst_lst = [ [ 1; 2; 3 ]; [ 4; 5; 6 ] ] in
print_endline (i_list_stringify i_lst);... | |
5da3705e2097cbc0360b4922c41b3014c4e1002062406f652535df902688ba52 | haskell-game/tiny-games-hs | expressit.hs | #!/usr/bin/env runghc
p=putStrLn;s=show;l=toInteger.length;main=h 1 1;b=zipWith;h t n=do
{p$"target = "++s t;p$"n = "++s n;j<-getLine;either(\a->p a>>p(
"score: "++s(t-1)))(\a->p("= "++s a)>>if a==t then p"">>h(t+1)(l j)else p$
"score: "++s(t-1))(v n j [0,0])};v n[][s,_,_h ]=pure s;v n(c:k)s@(x:y:z)|l k>11=
e"len expr... | null | https://raw.githubusercontent.com/haskell-game/tiny-games-hs/6910b6fe4a5c88ac0cd2a32f5faba5b655a70ab0/prelude/expressit/expressit.hs | haskell | ^10 ------------------------------------------------------------------ 80> --
see README for further instructions | #!/usr/bin/env runghc
p=putStrLn;s=show;l=toInteger.length;main=h 1 1;b=zipWith;h t n=do
{p$"target = "++s t;p$"n = "++s n;j<-getLine;either(\a->p a>>p(
"score: "++s(t-1)))(\a->p("= "++s a)>>if a==t then p"">>h(t+1)(l j)else p$
"score: "++s(t-1))(v n j [0,0])};v n[][s,_,_h ]=pure s;v n(c:k)s@(x:y:z)|l k>11=
e"len expr... |
63aee1b86336d3e9e7ffe8f2a867453f33732f62beddf7fb759a48bd4fb8c141 | brownplt/cs173-python | python-lib.rkt | #lang plai-typed
(require "python-core-syntax.rkt")
(define-type-alias Lib (CExp -> CExp))
(define print-lambda
(CFn (list 'to-print)
(CPrim 'print (list (CId 'to-print)))))
(define assert-true-lambda
(CFn (list 'check-true)
(CIf (CId 'check-true) (CBool true) (CRaise (CStr "Assert failed")))))
(define... | null | https://raw.githubusercontent.com/brownplt/cs173-python/d8ae026172f269282e54366f16ec42e037117cb4/design4/cs173-python/python-lib.rkt | racket | (bind '___assertIn assert-in-lambda)
(bind '___assertNotIn assert-not-in-lambda)
(bind '___fail fail-lambda) | #lang plai-typed
(require "python-core-syntax.rkt")
(define-type-alias Lib (CExp -> CExp))
(define print-lambda
(CFn (list 'to-print)
(CPrim 'print (list (CId 'to-print)))))
(define assert-true-lambda
(CFn (list 'check-true)
(CIf (CId 'check-true) (CBool true) (CRaise (CStr "Assert failed")))))
(define... |
01c9d178b0187efc52bf7351eb1c35ee218bbae00950c05646ffff609d5c8a3a | conspack/cl-conspack | decode.lisp | (in-package :conspack)
;; Decode Properties
(defvar *current-properties* nil)
;; Reading
;;; We have to do some extra work to handle forward references (that is,
;;; references to a container within that container). DECODE-VALUE, the
;;; main function here, will return (values value T) in the absence of
;;; for... | null | https://raw.githubusercontent.com/conspack/cl-conspack/6e529d7b3a7223ef1bb5c7b9f18384ba67b50b09/src/decode.lisp | lisp | Decode Properties
Reading
We have to do some extra work to handle forward references (that is,
references to a container within that container). DECODE-VALUE, the
main function here, will return (values value T) in the absence of
forward references. If there are forward references, it instead
structures. The INC... | (in-package :conspack)
(defvar *current-properties* nil)
returns ( values incomplete nil ) , where INCOMPLETE is one of these
VALUE , and then try completing initialization . Since only a TAG can
We use this second value instead of just checking if the result is an
(defstruct (incomplete (:constructor make-i... |
9e39313aa79f51d628faada288bd59663dc2288d36ac1b31b703fc2be41c11f4 | borkdude/speculative | string.cljc | (ns speculative.string
(:require
[clojure.spec.alpha :as s]
[clojure.string :as str]
[speculative.specs :as ss]))
180
(s/fdef str/join
:args (s/cat :separator (s/? ::ss/any)
:coll ::ss/seqable)
:ret ::ss/string)
;; 360
(s/fdef str/starts-with?
:args (s/cat :cs #?(:clj ::ss/char-seque... | null | https://raw.githubusercontent.com/borkdude/speculative/4e773794a4065a84bdadd997516e52c76ab51b1f/src/speculative/string.cljc | clojure | 360 | (ns speculative.string
(:require
[clojure.spec.alpha :as s]
[clojure.string :as str]
[speculative.specs :as ss]))
180
(s/fdef str/join
:args (s/cat :separator (s/? ::ss/any)
:coll ::ss/seqable)
:ret ::ss/string)
(s/fdef str/starts-with?
:args (s/cat :cs #?(:clj ::ss/char-sequence
... |
aabe100e15cb4d5f546453cba85a3943bc7e09b263815df846a5d52f310906e8 | CBMM/tagging | Response.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveAnyClass #-}
module Tagging.Respo... | null | https://raw.githubusercontent.com/CBMM/tagging/15f257394f3dda5baf6db0581a52d9c9f99e2abe/tagging-common/src/Tagging/Response.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass #
----------------------------------------------------------------------------
^ Tagging User
^ Trial start time (in server's timezone)
^ Trial end time (in server's timezone)
^ TypeRep text of the response
^ Response payload (serialized t... | # LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# LANGUAGE QuasiQuotes #
# LANGUAGE MultiParamTypeClasses #
module Tagging.Response where
import qualified Data.Aeson as A
import Data.Aeson ((.=))
import qual... |
5aedc8442b7c9e3deef0b0ce1e2d79e2e9318bff432ccb32edfb48c9ecb28b8f | Bogdanp/racket-redis | info.rkt | #lang info
(define license 'MIT)
(define collection "redis")
(define deps '("base"
"redis-doc"
"redis-lib"))
(define implies '("redis-doc"
"redis-lib"))
| null | https://raw.githubusercontent.com/Bogdanp/racket-redis/063664898fb6e99f24877cbb1b7fb19143293eb1/redis/info.rkt | racket | #lang info
(define license 'MIT)
(define collection "redis")
(define deps '("base"
"redis-doc"
"redis-lib"))
(define implies '("redis-doc"
"redis-lib"))
| |
e6cbf1c775b5dd99e44f4009a01d70248fb3391831120f6c81a1f535ac6505b0 | jeromesimeon/Galax | print_xquery.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/ast_printer/print_xquery.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : print_xquery.mli , v 1.4 2007/08/01 17:06:17 mff Exp $
val print_sequencetype : Format.formatter -> Xquery_ast.sequencetype -> unit
val print_expr : Format.formatter -> Xquery_ast.expr -> unit
val print_statement : Format.format... |
38322d31b4f57360ae6927f074b447153568020cd576b5bcee7bd4fcdfb603b3 | processone/ejabberd | mod_pubsub_sql.erl | %%%----------------------------------------------------------------------
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either ver... | null | https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/mod_pubsub_sql.erl | erlang | ----------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCH... | ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
with this program ; if not , write to the Free Softwar... |
babda0d0b0433eb600a9f5aa8725c008b1fcbe86f02c14e9c0045a4e48a1de4f | change-metrics/monocle | ServerHTMX.hs | module Monocle.Api.ServerHTMX where
import Data.String.Interpolate (iii)
import Data.Vector qualified as V
import Database.Bloodhound qualified as BH
import Lucid
import Lucid.Base
import Monocle.Api.Jwt (AuthenticatedUser)
import Monocle.Api.Server (searchAuthor)
import Monocle.Backend.Documents (EDocType (ECachedAut... | null | https://raw.githubusercontent.com/change-metrics/monocle/5eb18c3d67757d4fad1d03423390552337531b0f/src/Monocle/Api/ServerHTMX.hs | haskell | module Monocle.Api.ServerHTMX where
import Data.String.Interpolate (iii)
import Data.Vector qualified as V
import Database.Bloodhound qualified as BH
import Lucid
import Lucid.Base
import Monocle.Api.Jwt (AuthenticatedUser)
import Monocle.Api.Server (searchAuthor)
import Monocle.Backend.Documents (EDocType (ECachedAut... | |
83e461ae9107d0a6fb0ed20061ddaee4074aa5ea90796879a695261f0edd5b4b | casperschipper/ocaml-cisp | cisp1.ml | open Cisp
open Midi
let intervArr = [|60;72;67;60;67;72|]
let writer =
let index = wrappedCount intervArr in
let generator = ch [|-7;-5;12;-12|] |> hold (ch [|1;2;3|]) |> walki 74 |> take 6 |> st |> concat in
let wrf (i,v) = writeOne intervArr i v in
zip index generator |> Seq.map wrf |> syncEffectClock ... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/cisp_backup/zimmermanzel/cisp1.ml | ocaml | type walkmind direction is state
a walk that updates boundaries only when hit | open Cisp
open Midi
let intervArr = [|60;72;67;60;67;72|]
let writer =
let index = wrappedCount intervArr in
let generator = ch [|-7;-5;12;-12|] |> hold (ch [|1;2;3|]) |> walki 74 |> take 6 |> st |> concat in
let wrf (i,v) = writeOne intervArr i v in
zip index generator |> Seq.map wrf |> syncEffectClock ... |
86b3364ba2feb8e97b6ffc3889ad3fe071210db01413fb99b5037b1a96da07be | Datomic/mbrainz-importer | explore_db.clj | (load-file "repl.clj")
(def system (pro/connect {:access-key "mbrainz"
:secret "mbrainz"
:region "none"
:endpoint "localhost:8998"
:service "peer-server"}))
(def conn (<!! (client/connect system {:db-name "mbrainz"... | null | https://raw.githubusercontent.com/Datomic/mbrainz-importer/420edd6c2d07ce9edf48e9b31f047146e6f3c598/examples/explore_db.clj | clojure | how many of each unique entity type? | (load-file "repl.clj")
(def system (pro/connect {:access-key "mbrainz"
:secret "mbrainz"
:region "none"
:endpoint "localhost:8998"
:service "peer-server"}))
(def conn (<!! (client/connect system {:db-name "mbrainz"... |
f4e47bb286dc5f1e463e02e6911de0df2fb9efa666b2adc14ac639a7e4d1a345 | andrenth/ocaml-mariadb | nonblocking_lwt_stress_test.ml | open Lwt.Infix
module S = Mariadb.Nonblocking.Status
module Test = Nonblocking_stress_test.Make (struct
module IO = struct
type 'a future = 'a Lwt.t
let (>>=) = (>>=)
let return = Lwt.return
end
let wait mariadb status =
let fd = Lwt_unix.of_unix_file_descr @@ Mariadb.Nonblocking.fd mariadb in... | null | https://raw.githubusercontent.com/andrenth/ocaml-mariadb/3ae20e7d58b30b75e47ad3f34b94bb32df2666b1/examples/lwt/nonblocking_lwt_stress_test.ml | ocaml | open Lwt.Infix
module S = Mariadb.Nonblocking.Status
module Test = Nonblocking_stress_test.Make (struct
module IO = struct
type 'a future = 'a Lwt.t
let (>>=) = (>>=)
let return = Lwt.return
end
let wait mariadb status =
let fd = Lwt_unix.of_unix_file_descr @@ Mariadb.Nonblocking.fd mariadb in... | |
632e268adcb69c8cb2b2be3c115332c4746c927deb6688e7160985ed2946f22b | mit-pdos/mcqc | Pipeline.hs | module Sema.Pipeline where
import CIR.Expr
import Sema.Nat
import Sema.IO
import Sema.Bool
import Sema.String
import Sema.Prod
semantics :: CExpr -> CExpr
semantics = ioSemantics .
prodSemantics .
stringSemantics .
asciiSemantics .
natSemantics .
boolSemantic... | null | https://raw.githubusercontent.com/mit-pdos/mcqc/85b5a65f1750ffb7c2336fa4c9266cc238aeeb5e/src/Sema/Pipeline.hs | haskell | module Sema.Pipeline where
import CIR.Expr
import Sema.Nat
import Sema.IO
import Sema.Bool
import Sema.String
import Sema.Prod
semantics :: CExpr -> CExpr
semantics = ioSemantics .
prodSemantics .
stringSemantics .
asciiSemantics .
natSemantics .
boolSemantic... | |
5eefcd1005f8a3d13eac53277c1340343350336a324c177a0f777b7eda16600c | ocaml-flambda/ocaml-jst | bytelink.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/cc63992838e9c38833bbdf10cc8f70c6c9d077bc/bytecomp/bytelink.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
val link : filepath list -> filepath -> unit
val reset : unit -> unit
val check_consistency:... |
5015a3cb81569f1be1a9c0af0a488a23665beaf9d4942125fcb97b92d51e7a01 | qkrgud55/ocamlmulti | camlinternalOO.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cri... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/stdlib/camlinternalOO.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : camlinternalOO.mli 11156 2011 - ... |
8f5b24ee9085d26ae68f90849bc3b055ed43694ed28c882633259a9d090891b3 | bdeket/rktsicm | helper.rkt | #lang s-exp "../../generic.rkt"
(provide (all-defined-out))
(require "../../rkt/fixnum.rkt"
"../../kernel-gnrc.rkt")
bdk ; ; insert 1
(define (c:generate n type proc)
(if (fix:= n 1)
(proc 0)
(s:generate n type proc)))
(define (c:lookup m struct)
(if (structure? struct)
(assq m
... | null | https://raw.githubusercontent.com/bdeket/rktsicm/225a43bc3d9953f9dbbdbfb2fa4a50028a7a41ce/rktsicm/sicm/calculus/manifold/helper.rkt | racket | ; insert 1
; insert 1 end | #lang s-exp "../../generic.rkt"
(provide (all-defined-out))
(require "../../rkt/fixnum.rkt"
"../../kernel-gnrc.rkt")
(define (c:generate n type proc)
(if (fix:= n 1)
(proc 0)
(s:generate n type proc)))
(define (c:lookup m struct)
(if (structure? struct)
(assq m
(vector->li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.