_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 |
|---|---|---|---|---|---|---|---|---|
ff7563688ae90c34d5142a4d86cb7759c9841c42f920373018617351dada243a | WickedShell/clj-mavlink | parser.clj | (ns mavlink.parser
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[mavlink.checksum :refer :all]
[mavlink.core :refer :all]
[mavlink.type :refer :all]
[mavlink.test_utilities :refer :all])
(:import [com.mavlink CRC]
[java.nio Byte... | null | https://raw.githubusercontent.com/WickedShell/clj-mavlink/21d79d07f862e3fb6d9a75be8e65151e2ab4952b/test/mavlink/parser.clj | clojure | This file tests only the mavlink parser.
The string version produces message specific magic bytes
the other version returns the full checksum
note that compute-crc-checksum makes the magic byte for strings
(is (thrown-with-msg? Exception #"Unable to translate enum"
(encode channel-simple {:message-id ... | (ns mavlink.parser
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[mavlink.checksum :refer :all]
[mavlink.core :refer :all]
[mavlink.type :refer :all]
[mavlink.test_utilities :refer :all])
(:import [com.mavlink CRC]
[java.nio Byte... |
24f5e8e738d84d57b0a6e8cdc8268a811896531a191486d751e27a63f6a42751 | mdedwards/slippery-chicken | drawing.lisp | ;;; **********************************************************************
Copyright ( C ) 2004 ( )
;;;
;;; 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 version 2
of the License... | null | https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/src/cm-2.6.0/src/gui/drawing.lisp | lisp | **********************************************************************
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A ... | Copyright ( C ) 2004 ( )
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
$ Revision : 1.8 $
$ Date : 2005/01/15 15:50:20 $
(in-package :cm)
default for * pixels - per - increment * is 60 because that makes it
evenly divisible by... |
3f36045b06a3d2d58852b02d2beda25da8c4c1ad5030ba42924302d3f2a0004e | jumarko/clojure-experiments | 0420_uniques.clj | (ns clojure-experiments.purely-functional.puzzles.0420-uniques
"-tv-newsletter-420-say-what-you-mean/")
(defn uniques
"Removes elements that appear twice in the collection."
[coll]
(let [freqs (frequencies coll)]
(remove #(= 2 (get freqs %))
coll)))
(uniques [])
;;=> ()
(uniques [1 2 3])
= > ... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/purely_functional/puzzles/0420_uniques.clj | clojure | => ()
=> () | (ns clojure-experiments.purely-functional.puzzles.0420-uniques
"-tv-newsletter-420-say-what-you-mean/")
(defn uniques
"Removes elements that appear twice in the collection."
[coll]
(let [freqs (frequencies coll)]
(remove #(= 2 (get freqs %))
coll)))
(uniques [])
(uniques [1 2 3])
= > ( 1 2 3 ... |
f3493fdfdeb915b955aa5433879f4344fa32b1c1f01b0bebc131ab7ca0c6231e | Verites/verigraph | ModelCheckerSpec.hs | module Logic.Ctl.ModelCheckerSpec where
import qualified Data.Char as Char
import Data.IntMap (IntMap)
import qualified Data.IntMap as IntMap
import qualified Data.List as List
import Data.Set (Set)
import qualified Data.Set as Set
import Test.Hspec
import Test.HUnit ... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/tests/Logic/Ctl/ModelCheckerSpec.hs | haskell | module Logic.Ctl.ModelCheckerSpec where
import qualified Data.Char as Char
import Data.IntMap (IntMap)
import qualified Data.IntMap as IntMap
import qualified Data.List as List
import Data.Set (Set)
import qualified Data.Set as Set
import Test.Hspec
import Test.HUnit ... | |
112823dbb26f3cf364d23f6ae20c6683b58c516de8a56b72b37d1721152677cf | mishadoff/project-euler | problem045.clj | (ns project-euler)
(defn is-triangle? [n]
(let [t (/ (dec (Math/sqrt (inc (* 8 n)))) 2)]
(if (and (pos? n) (= t (quot t 1))) true false)))
(defn is-pentagonal? [n]
(let [t (/ (inc (Math/sqrt (inc (* 24 n)))) 6)]
(if (and (pos? n) (= t (quot t 1))) true false)))
(defn is-hexagonal? [n]
(let [t (/ (inc (... | null | https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem045.clj | clojure | (ns project-euler)
(defn is-triangle? [n]
(let [t (/ (dec (Math/sqrt (inc (* 8 n)))) 2)]
(if (and (pos? n) (= t (quot t 1))) true false)))
(defn is-pentagonal? [n]
(let [t (/ (inc (Math/sqrt (inc (* 24 n)))) 6)]
(if (and (pos? n) (= t (quot t 1))) true false)))
(defn is-hexagonal? [n]
(let [t (/ (inc (... | |
87425781a283e946bba017b2269e5f59b047af0c7fa1ba3625c1145cb0121a23 | jeopard/haskell-checking-account | Operation.hs | module Models.Operation (
Operation (..),
OperationType (..),
amountWithSign,
calculateBalance
) where
import Data.Scientific
import Data.Time.Calendar
import Data.UUID
-- represents credit and debit operations performed in a bank account
data Operation = Operation { operationId :: UUID
... | null | https://raw.githubusercontent.com/jeopard/haskell-checking-account/27a889e507ad830ccb476a9663a5ab62aba8baa7/src/Models/Operation.hs | haskell | represents credit and debit operations performed in a bank account
return a negative amount if the operation was debit
calculate the sum of the amounts of a list of operations | module Models.Operation (
Operation (..),
OperationType (..),
amountWithSign,
calculateBalance
) where
import Data.Scientific
import Data.Time.Calendar
import Data.UUID
data Operation = Operation { operationId :: UUID
, accountId :: UUID
, operati... |
dc85419170afa1ba8e44f595193b484db2adc6c73c26b3762750ab47218259fb | bevuta/pox | cli.scm | #!/usr/bin/csi -ns
(use http-client intarweb uri-common ports matchable getopt-long data-structures tcp)
(require-library regex)
(import irregex)
(tcp-buffer-size 1024)
(define (print-usage command #!optional options)
(print "usage: " (program-name) " " command)
(when options
(newline)
(print "Options:")... | null | https://raw.githubusercontent.com/bevuta/pox/9684d4037573b6c55acf24867c1d50aa8f4ea57e/cli.scm | scheme | #!/usr/bin/csi -ns
(use http-client intarweb uri-common ports matchable getopt-long data-structures tcp)
(require-library regex)
(import irregex)
(tcp-buffer-size 1024)
(define (print-usage command #!optional options)
(print "usage: " (program-name) " " command)
(when options
(newline)
(print "Options:")... | |
4f4c403249ffe3880ccdfc1c9e15e06ddd69fad54592a4722e6a47cd3d4dd172 | samoht/docker-extension-ocaml | ui.ml | open Brr
let dd = Dd.v ()
let get_id id =
match Document.find_el_by_id G.document (Jstr.v id) with
| None ->
Console.(debug [ str (Printf.sprintf "element %S not found" id) ]);
raise Not_found
| Some elt -> elt
let call_hello k =
let vm = Dd.vm_service dd in
let response = Dd.get vm "/hello" in... | null | https://raw.githubusercontent.com/samoht/docker-extension-ocaml/1a5f1d76df0797d500e56dd26ae5faac366f3ad9/ui/ui.ml | ocaml | Set-up the page structure
Add onClick events | open Brr
let dd = Dd.v ()
let get_id id =
match Document.find_el_by_id G.document (Jstr.v id) with
| None ->
Console.(debug [ str (Printf.sprintf "element %S not found" id) ]);
raise Not_found
| Some elt -> elt
let call_hello k =
let vm = Dd.vm_service dd in
let response = Dd.get vm "/hello" in... |
1ea83034aa168296cc4e0a19b9eb0644984a8c7f057da76f9dcf84f29f018f0a | brownplt/pyret-docs | plot.js.rkt | #lang scribble/base
@(require "../../scribble-api.rkt" "../abbrevs.rkt")
@(require (only-in scribble/core delayed-block))
@(define (in-link T) (a-id T (xref "plot" T)))
@(define Color (a-id "Color" (xref "color" "Color")))
@(define Image (a-id "Image" (xref "image" "Image")))
@(define (t-field name ty) (a-field (tt na... | null | https://raw.githubusercontent.com/brownplt/pyret-docs/a7aad4c6432e6863b3a3a7a6adb4aedfc6c7ca0d/src/trove/plot.js.rkt | racket | this is | #lang scribble/base
@(require "../../scribble-api.rkt" "../abbrevs.rkt")
@(require (only-in scribble/core delayed-block))
@(define (in-link T) (a-id T (xref "plot" T)))
@(define Color (a-id "Color" (xref "color" "Color")))
@(define Image (a-id "Image" (xref "image" "Image")))
@(define (t-field name ty) (a-field (tt na... |
f4fb614c2d36c792bb5df34d1cb5e9d753d0e8dcd13322fd38aedd0216a68a93 | soulomoon/SICP | Exercise3.25.scm | Exercise 3.25 : Generalizing one- and two - dimensional tables , show how to implement a table in which values are stored under an arbitrary number of keys and different values may be stored under different numbers of keys . The lookup and insert ! procedures should take as input a list of keys used to access the table... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter3/Exercise3.25.scm | scheme | memory limit : 128 MB .
(*table* (b . 0))
(*table* (a . 0) (b . 0))
> | Exercise 3.25 : Generalizing one- and two - dimensional tables , show how to implement a table in which values are stored under an arbitrary number of keys and different values may be stored under different numbers of keys . The lookup and insert ! procedures should take as input a list of keys used to access the table... |
c99d7f6e74c2ba976dda45504419b082af3afe632421f0e3812a686294b7a2ec | mnieper/unsyntax | repl.scm | Copyright © ( 2020 ) .
;; This file is part of unsyntax.
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software without restriction ,
;; including without limitation the rights to use... | null | https://raw.githubusercontent.com/mnieper/unsyntax/cd12891805a93229255ff0f2c46cf0e2b5316c7c/src/scheme/repl.scm | scheme | This file is part of unsyntax.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission n... | Copyright © ( 2020 ) .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do so ,
portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITH... |
7a468e8fcd1659e63bb6b0be922291fa6dbb2b940789a041bce1c00fb1712aac | jacobhilton/backgammon | player.ml | type t =
| Forwards
| Backwards
[@@deriving sexp]
let equal t1 t2 =
match t1, t2 with
| Forwards, Forwards | Backwards, Backwards -> true
| Forwards, Backwards | Backwards, Forwards -> false
let flip = function
| Forwards -> Backwards
| Backwards -> Forwards
let char = function
| Forwards -> 'O'
| ... | null | https://raw.githubusercontent.com/jacobhilton/backgammon/9b5330efa4c8314b8fb7cb6b9b2a428a23d29719/player.ml | ocaml | type t =
| Forwards
| Backwards
[@@deriving sexp]
let equal t1 t2 =
match t1, t2 with
| Forwards, Forwards | Backwards, Backwards -> true
| Forwards, Backwards | Backwards, Forwards -> false
let flip = function
| Forwards -> Backwards
| Backwards -> Forwards
let char = function
| Forwards -> 'O'
| ... | |
d7308e6951a5df0b286116863e0cf0870c734a712dbdb33027f46b76ad652926 | RefactoringTools/HaRe | Utils.hs | module Layout.Utils where
foo :: IO ()
foo = do
let parsed = 3
let expr = 2
return ()
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Renaming/Utils.hs | haskell | module Layout.Utils where
foo :: IO ()
foo = do
let parsed = 3
let expr = 2
return ()
| |
0b6200af65de16a19e44a568559a8246c040029231d87e99a965b834f1bdfab3 | reasonml-old/bs-node | nodeBuffer.ml | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/reasonml-old/bs-node/d1fd002b0391c6e4b153d90c38fe60e0ac800487/src/nodeBuffer.ml | ocaml | external entries : t -> Iterator = "" [@@bs.get]
external keys : t -> Iterator = "" [@@bs.send]
external values : t -> Iterator = "" [@@bs.get] | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
8cb72443583d07a33474a54c7d1fb84c847f29c26a0f416dcf146c4107e1f109 | qfpl/reflex-tutorial | Attach.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
module Util.Attach (
attachId
, attachId_
) where
import qualified Data.Text as T
import Reflex.Dom.Core
import GHCJS.DOM
import GHCJS.DOM.NonElementParentNode
import Language.Javascript.JSaddle.Monad (MonadJSM, liftJSM)
attachId ::
MonadJSM m... | null | https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/common/src/Util/Attach.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | module Util.Attach (
attachId
, attachId_
) where
import qualified Data.Text as T
import Reflex.Dom.Core
import GHCJS.DOM
import GHCJS.DOM.NonElementParentNode
import Language.Javascript.JSaddle.Monad (MonadJSM, liftJSM)
attachId ::
MonadJSM m =>
T.Text ->
(forall x. Widget x a) ->
m (Maybe a)
attac... |
e1b2a6aea8912bd7792f4fbe8f627031994677f23bfa3f365eb3ef39574c5ef4 | realworldocaml/book | odoc.mli | (** Odoc rules *)
open Import
val setup_library_odoc_rules :
Compilation_context.t -> Lib.Local.t -> unit Memo.t
val gen_project_rules : Super_context.t -> Dune_project.t -> unit Memo.t
val setup_private_library_doc_alias :
Super_context.t
-> scope:Scope.t
-> dir:Stdune.Path.Build.t
-> Dune_file.Librar... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/odoc.mli | ocaml | * Odoc rules |
open Import
val setup_library_odoc_rules :
Compilation_context.t -> Lib.Local.t -> unit Memo.t
val gen_project_rules : Super_context.t -> Dune_project.t -> unit Memo.t
val setup_private_library_doc_alias :
Super_context.t
-> scope:Scope.t
-> dir:Stdune.Path.Build.t
-> Dune_file.Library.t
-> unit Memo... |
1e09567e6e355a05fddab90cdd55e06f56177cb1e48674c07329a1193f1eaa57 | Leystryku/mpbomberman_racket | cl_render_game.rkt | #lang racket
;; imports
(require 2htdp/image)
(require lang/posn)
(require "cl_helper.rkt")
(require "sh_config.rkt")
(require "sh_helper.rkt")
(require "sh_structs.rkt")
(require "sh_config_textures.rkt")
;; exports
(provide (all-defined-out))
[ renderHandleAnimFrameAdvanceLoop ] Advances a animation frame . If ... | null | https://raw.githubusercontent.com/Leystryku/mpbomberman_racket/059d95040cfad2e27237f8dd41fc32a4fc698afe/game/cl_render_game.rkt | racket | imports
exports
[renderHandleAnimFrameAdvanceNoLoop] Advances a animation frame. If at frame end, do not change anything (no loop)
[renderHandleAnimFrameAdvance] Calls the fitting function to advance the animation frame depending on the loop settings and incrments the current textureNumber
[renderHandleAnimFrameAd... | #lang racket
(require 2htdp/image)
(require lang/posn)
(require "cl_helper.rkt")
(require "sh_config.rkt")
(require "sh_helper.rkt")
(require "sh_structs.rkt")
(require "sh_config_textures.rkt")
(provide (all-defined-out))
[ renderHandleAnimFrameAdvanceLoop ] Advances a animation frame . If at frame end , reset t... |
a2fe112c73f0672b426eb334c2f28fca9355be189f807788cd8b1d38ad1588f6 | msgpack/msgpack-haskell | Aeson.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
| Aeson bridge for MessagePack
module Data.MessagePack.Aeson (
-- * Conversion functions
toAeson, fromA... | null | https://raw.githubusercontent.com/msgpack/msgpack-haskell/f52a5d2db620a7be70810eca648fd152141f8b14/msgpack-aeson/src/Data/MessagePack/Aeson.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveFunctor #
* Conversion functions
* Wrapper instances
* Utility functions
| Convert 'MP.Object' to JSON 'Value'
| Convert JSON 'Value' to 'MP.Object'
instance.
Not as efficient as a direct encoder.
| Encode MessagePack value to JSON document
... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
| Aeson bridge for MessagePack
module Data.MessagePack.Aeson (
toAeson, fromAeson,
unsafeViaToJSON, viaFromJSON,
AsMessagePack(..),
AsAeson(..),
MessagePackAesonError(..),
packAeson... |
8e6cad5ace3a862ea4acd628191a07f302c09750373e3bd187f2ef2148aa58e9 | 8thlight/hyperion | project.clj | (defproject hyperion/hyperion-gae "3.7.1"
:description "Google App Engine Datastore for Hyperion"
:dependencies [[org.clojure/clojure "1.5.1"]
[hyperion/hyperion-api "3.7.1"]
[com.google.appengine/appengine-api-1.0-sdk "1.6.6"]
[chee "1.1.0"]]
:profiles {:dev {:d... | null | https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/gae/project.clj | clojure | (defproject hyperion/hyperion-gae "3.7.1"
:description "Google App Engine Datastore for Hyperion"
:dependencies [[org.clojure/clojure "1.5.1"]
[hyperion/hyperion-api "3.7.1"]
[com.google.appengine/appengine-api-1.0-sdk "1.6.6"]
[chee "1.1.0"]]
:profiles {:dev {:d... | |
7de6175f95eebe4a9b4902a52f3edbd2f0bbbf81542e26f9056803c1f1b92e46 | javier-paris/erlang-tcpip | out_order.erl | %%%-------------------------------------------------------------------
%%% File : out_order.erl
Author : < >
%%% Description : Out of order Packet management
%%%
Created : 18 Nov 2004 by < >
%%%
%%%
erlang - tcpip , Copyright ( C ) 2004 Javier Paris
%%%
Licensed under the Apache License , Version 2... | null | https://raw.githubusercontent.com/javier-paris/erlang-tcpip/708b57fa37176980cddfd8605867426368d33ed1/src/out_order.erl | erlang | -------------------------------------------------------------------
File : out_order.erl
Description : Out of order Packet management
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... | Author : < >
Created : 18 Nov 2004 by < >
erlang - tcpip , Copyright ( C ) 2004 Javier Paris
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(out_order).
-export([new/0, merge_data/2, get_out_order/2]... |
71aaae582625e243f30b98907b0e1568b12a62729a6bf7cf19feffef162518d7 | dktr0/estuary | Location.hs | module Estuary.Types.Location where
import Data.Text
type Location = (Text,Int)
| null | https://raw.githubusercontent.com/dktr0/estuary/0650557bac660eb94af2e196ea49f916c71e57ca/common/src/Estuary/Types/Location.hs | haskell | module Estuary.Types.Location where
import Data.Text
type Location = (Text,Int)
| |
05d825e0e49f5ff5b00b9d0e9ea55f327197707375589cb6e2809ee39ec2c8ed | McCLIM/McCLIM | port.lisp | ;;; ---------------------------------------------------------------------------
;;; License: LGPL-2.1+ (See file 'Copyright' for details).
;;; ---------------------------------------------------------------------------
;;;
( c ) Copyright 2005 by < >
( c ) Copyright 2014 by < >
;;;
;;; -------------------... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/edbc773336a15d368052d3d93d3e0cdb2acc4585/Backends/Null/port.lisp | lisp | ---------------------------------------------------------------------------
License: LGPL-2.1+ (See file 'Copyright' for details).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
FIXME: it seems bizarre for... | ( c ) Copyright 2005 by < >
( c ) Copyright 2014 by < >
(in-package #:clim-null)
(defclass null-port (basic-port)
((id)
(window :initform nil :accessor null-port-window))
(:default-initargs :pointer (make-instance 'standard-pointer)))
(defmethod find-port-type ((type (eql :null)))
(values 'null-... |
b7acc808ba163ef2a7c4ac2b2117e5373c36b1b5b74235634e52c863e0bf212c | PaulSD/erlang_cas_client_cowboy | cas_client_cowboy.erl | %%%-------------------------------------------------------------------------------------------------
%%%
Copyright 2013 < >
%%%
%%% This file is part of erlang_cas_client_cowboy.
%%%
%%% erlang_cas_client_cowboy is free software: you can redistribute it and/or modify it under the
terms of the GNU Lesser General ... | null | https://raw.githubusercontent.com/PaulSD/erlang_cas_client_cowboy/05aa80174c0021ff9a8183d49c98df09f159f917/src/cas_client_cowboy.erl | erlang | -------------------------------------------------------------------------------------------------
This file is part of erlang_cas_client_cowboy.
erlang_cas_client_cowboy is free software: you can redistribute it and/or modify it under the
erlang_cas_client_cowboy is distributed in the hope that it will be useful... | Copyright 2013 < >
terms of the GNU Lesser General Public License as published by the Free Software Foundation ,
either version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public License along with
@doc Application Manager for the ... |
97e1eae5b62bf1f06779361b8ea66b3ce531277a525fea8cc51dbb41606573cc | input-output-hk/plutus | MkPlc.hs | -- editorconfig-checker-disable-file
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeFamil... | null | https://raw.githubusercontent.com/input-output-hk/plutus/107d7e7ec5a1c033228c402ee221794117566d15/plutus-core/plutus-core/src/PlutusCore/MkPlc.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE ConstraintKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
TODO: make it @forall {k}@ once we have that.
(see -proposals/ghc-proposals/blob/master/proposals/0099-explicit-specificity.rst)
TODO: make it @forall {k}@ once we have that.... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module PlutusCore.MkPlc
( TermLike (..)
, UniOf
,... |
db1f61ebdb4bb789203d74e138ac477c634c564d15c6606dd1e86ac24532dae1 | rollacaster/sketches | particles_with_images.cljs | (ns sketches.nature-of-code.particle-systems.particles-with-images
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[sketches.mover :as m]))
(defn create-particle [location images]
(assoc (m/create-mover 10 location)
:velocity [(q/random-gaussian) (- (q/ran... | null | https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/nature_of_code/particle_systems/particles_with_images.cljs | clojure | (ns sketches.nature-of-code.particle-systems.particles-with-images
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[sketches.mover :as m]))
(defn create-particle [location images]
(assoc (m/create-mover 10 location)
:velocity [(q/random-gaussian) (- (q/ran... | |
d70febce948670f4789dea497f70b869c08da738afc85281b7dfb0c973899f0d | corecursive/sicp-study-group | operation.scm | (load "operation.scm")
(load "polynomial-package/representation.scm")
(define (+poly p1 p2)
(if (same-var? p1 p2)
(make-poly
(var p1)
(+terms (term-list p1)
(term-list p2)))
(error "Polys not in same var")))
(define (*poly p1 p2)
(if (same-var? p1 p2)
(make-poly
... | null | https://raw.githubusercontent.com/corecursive/sicp-study-group/82b92a9759ed6c72d15cf955c806ce2a94336f83/wulab/lecture-4b/generic-operation/polynomial-package/operation.scm | scheme | note the use of the generic add here | (load "operation.scm")
(load "polynomial-package/representation.scm")
(define (+poly p1 p2)
(if (same-var? p1 p2)
(make-poly
(var p1)
(+terms (term-list p1)
(term-list p2)))
(error "Polys not in same var")))
(define (*poly p1 p2)
(if (same-var? p1 p2)
(make-poly
... |
699d3ebf5f66f6eb07b6893141070fdeaa55be8c495f9085fcda462e6c45e509 | antono/guix-debian | moe.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 Lice... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/moe.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages moe)
#:use-module (guix licenses)
#:use-module (gnu packages ncurses)
#:use-mod... |
b09e75ac994d4dae329e777db7f4166130e95d8a2189fcccbc3ad83fd8a49fd6 | Frama-C/Frama-C-snapshot | format_parser.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/variadic/format_parser.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
b8c0f9a9a60655b5927dada535deb20277a0936ac110a9f46b43a081e49664f8 | tfausak/monadoc-5 | TestExceptionSpec.hs | module Monadoc.Type.TestExceptionSpec where
import Monadoc.Prelude
import Test.Hspec
spec :: Spec
spec = describe "Monadoc.Type.TestException" <| do
pure ()
| null | https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/test/Monadoc/Type/TestExceptionSpec.hs | haskell | module Monadoc.Type.TestExceptionSpec where
import Monadoc.Prelude
import Test.Hspec
spec :: Spec
spec = describe "Monadoc.Type.TestException" <| do
pure ()
| |
24d86ff1e37cdcc6e77d2bc605fb77a5e857d6d631c529926ef6ede2bb35de2f | kmi/irs | new.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(in-ontology buddyspace)
| null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/buddyspace/new.lisp | lisp | Package : |
File created in WebOnto
(in-package "OCML")
(in-ontology buddyspace)
|
53ac86133af597add48c9ee2a1b42e0a9cdb2d0844e4d3927450d9004f02bddc | unix1/nuk | nuk_user_store_sup.erl | %%%-------------------------------------------------------------------
%% @doc `nuk_user_store_sup' module
%%
%% This supervisor is started by {@link nuk_sup} top level supervisor. It
%% supervises {@link nuk_user_store_server}.
%% @end
%%%-------------------------------------------------------------------
-module(nuk... | null | https://raw.githubusercontent.com/unix1/nuk/ad771c8b164c305408d8076627228024c4955ec1/src/nuk_user_store_sup.erl | erlang | -------------------------------------------------------------------
@doc `nuk_user_store_sup' module
This supervisor is started by {@link nuk_sup} top level supervisor. It
supervises {@link nuk_user_store_server}.
@end
-------------------------------------------------------------------
Supervision
Helper macro f... |
-module(nuk_user_store_sup).
-behaviour(supervisor).
-export([start_link/0, init/1]).
-define(SERVER, ?MODULE).
-define(CHILD(Id, Module, Args, Type), {Id, {Module, start_link, Args},
permanent, 5000, Type, [Module]}).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->... |
7b4b26eaa449bc54c07513dd90bc1512b3902e691ab84e1d7b7a9791108fd529 | OCamlPro/typerex-lint | plugin_parsetree.pattern_guard.1.ml | let f = function
| x when x > 10 -> 2
| _ -> 1
| null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-doc/examples/plugin_parsetree.pattern_guard.1.ml | ocaml | let f = function
| x when x > 10 -> 2
| _ -> 1
| |
198e9f02a37413e5c2dc661a3eb9d3f396bd0b0edb97024b30eef2d55cd2181b | naveensundarg/prover | deque2.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark-deque -*-
;;; File: deque2.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
;;; /
;;;
Software... | null | https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/deque2.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark-deque -*-
File: deque2.lisp
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... | 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 Copyright ( C ) 1981 - 2012 .
... |
086c77c951d7db1e55760ca5abce50cd09a5170739e862f2d395f2c7cabdde44 | theHamsta/petalisp-cuda | cuda-array.lisp | (defpackage petalisp-cuda.memory.cuda-array
(:use :cl
:iterate
:cl-itertools
:cffi)
(:import-from :cl-cuda.lang.type :cffi-type :cffi-type-size)
(:import-from :cl-cuda
:memory-block-device-ptr
:memory-block-host-ptr
:memory-block-type
... | null | https://raw.githubusercontent.com/theHamsta/petalisp-cuda/12b9ee426e14edf492d862d5bd2dbec18ec427c6/src/memory/cuda-array.lisp | lisp | TODO: generalize to (memory-block memory-layout) ?
TODO: redo this with allocator type
from raw shape
from raw petalisp:shape
TODO: memcpy3d in order to change layout?
TODO: redo this with allocator type
at least the host array should have c-layout
TODO: add with-host-memory ensured to only temporarily add host m... | (defpackage petalisp-cuda.memory.cuda-array
(:use :cl
:iterate
:cl-itertools
:cffi)
(:import-from :cl-cuda.lang.type :cffi-type :cffi-type-size)
(:import-from :cl-cuda
:memory-block-device-ptr
:memory-block-host-ptr
:memory-block-type
... |
9d708319efd50f19ee46b1cf677d652d86d11c1ab5059a932bd2d7531454207f | kawasima/jagrid | core.clj | (ns jagrid.example.core
(:require [compojure.core :refer :all]
[ring.util.response :refer [file-response content-type]]
[jagrid.css.core :as css]
[jagrid.example.index :as index]
[jagrid.example.basic :as basic]
[jagrid.example.sales-report :as sales-report]... | null | https://raw.githubusercontent.com/kawasima/jagrid/524b351c47ba2648f96ce8ef5ee431d0eb594d28/src/jagrid/example/core.clj | clojure | (ns jagrid.example.core
(:require [compojure.core :refer :all]
[ring.util.response :refer [file-response content-type]]
[jagrid.css.core :as css]
[jagrid.example.index :as index]
[jagrid.example.basic :as basic]
[jagrid.example.sales-report :as sales-report]... | |
1d3ca7ed64857dbf8e8287052ce3bf5b828524fceeb8d9a0534d8d669a9db73c | rd--/hsc3 | b_alloc.help.hs | ---- ; help
Sound.Sc3.sc3_scdoc_help_server_command_open False "/b_alloc"
Buffer indices are not restricted by the number of available buffers
at the server. Below allocates a buffer at index 2 ^ 15. Note the
b_alloc_setn1, which adds a b_set completion message to the b_alloc
message, is still asynchronous.
> impor... | null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Server/b_alloc.help.hs | haskell | -- ; help
hsc3 | Sound.Sc3.sc3_scdoc_help_server_command_open False "/b_alloc"
Buffer indices are not restricted by the number of available buffers
at the server. Below allocates a buffer at index 2 ^ 15. Note the
b_alloc_setn1, which adds a b_set completion message to the b_alloc
message, is still asynchronous.
> b0 :: Num n => n... |
10deb8d98647f64a63eebf9a018d5ea76975455a95dbcdafc4de5ab015ce7e84 | ocamllabs/ocaml-scry | repo.ml | open Sexplib.Std
type r = {
r_cmd : string;
r_args : string list;
r_env : string array;
r_cwd : string;
r_duration : Time.duration;
r_stdout : string;
r_stderr : string;
} [@@deriving sexp]
type proc_status =
| Exited of int
| Signaled of int
| Stopped of int
[@@deriving sexp]
exception ProcessEr... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-scry/3ba35317975fe78dab06cd28822219a0eab7c318/lib/repo.ml | ocaml | open Sexplib.Std
type r = {
r_cmd : string;
r_args : string list;
r_env : string array;
r_cwd : string;
r_duration : Time.duration;
r_stdout : string;
r_stderr : string;
} [@@deriving sexp]
type proc_status =
| Exited of int
| Signaled of int
| Stopped of int
[@@deriving sexp]
exception ProcessEr... | |
ae582be81ed34174f62ef48fb4c934694ea549f6450beec4f830ecc04834e0dc | kupl/LearnML | original.ml | type nat = ZERO | SUCC of nat
let two : nat = SUCC (SUCC ZERO)
let three : nat = SUCC (SUCC (SUCC ZERO))
let rec natadd (n1 : nat) (n2 : nat) : nat =
if n1 = two then SUCC (SUCC n2) else SUCC (SUCC (SUCC n2))
let rec natmul (n1 : nat) (n2 : nat) : nat =
if n1 = two then if n2 = two then SUCC (SUCC n2) else SUC... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/nat/sub21/original.ml | ocaml | type nat = ZERO | SUCC of nat
let two : nat = SUCC (SUCC ZERO)
let three : nat = SUCC (SUCC (SUCC ZERO))
let rec natadd (n1 : nat) (n2 : nat) : nat =
if n1 = two then SUCC (SUCC n2) else SUCC (SUCC (SUCC n2))
let rec natmul (n1 : nat) (n2 : nat) : nat =
if n1 = two then if n2 = two then SUCC (SUCC n2) else SUC... | |
b0d82fa9bf3faefd72d86f247ed1c3aef05a9999372654e07cf6e2ee4010d11f | facebook/infer | ToplAstOps.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/c0df05ee9e8b928ae6c1bf09b95a81a84d2401f0/infer/src/topl/ToplAstOps.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
a6a394ff96df6c7002a551e16a92d13876e3ab7a64eed1a569e6ca9362d01352 | ferd/ReVault | maestro_sup.erl | %%%-------------------------------------------------------------------
%% @doc maestro top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(maestro_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link... | null | https://raw.githubusercontent.com/ferd/ReVault/23bc9d897a682ccaf2489740a4d38f913958f656/apps/maestro/src/maestro_sup.erl | erlang | -------------------------------------------------------------------
@doc maestro top level supervisor.
@end
-------------------------------------------------------------------
sup_flags() = #{strategy => strategy(), % optional
intensity => non_neg_integer(), % optional
optional
child_spec(... |
-module(maestro_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_all,
intensity => 0,
period => 1},
C... |
ba81d27d8c93b7a29758a4021a02b3021c9a8651429508ac5c7d3c56a46a9ab8 | garrigue/lablgl | test19.ml | #!/usr/bin/env lablglut
open Printf
Copyright ( c ) 1994 .
(* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. *)
(* This test makes sure damaged gets set when a window is
re... | null | https://raw.githubusercontent.com/garrigue/lablgl/d76e4ac834b6d803e7a6c07c3b71bff0e534614f/LablGlut/examples/glut3.7/test/test19.ml | ocaml | This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain.
This test makes sure damaged gets set when a window is
resized smaller. | #!/usr/bin/env lablglut
open Printf
Copyright ( c ) 1994 .
let width = ref (-1);;
let height = ref (-1);;
let displayCount = ref 0;;
let onDone ~value =
if (!displayCount <> 2) then failwith "test19 damage expected\n";
fprintf stderr "PASS : test19\n" ;
exit(0);
;;
let reshape ~w ~h =
print... |
b09df4055220ba6b745b531b9fa5644f5fa3ed4402c484f3c23bf46694ec9b6f | ocaml-gospel/gospel | exn_arity.mli | exception E of int * int
val f : int -> unit
(*@ f i
raises E _ -> false *)
{ gospel_expected|
[ 125 ] File " exn_arity.mli " , line 5 , characters 11 - 23 :
5 | raises E _ - > false
[125] File "exn_arity.mli", line 5, characters 11-23:
5 | raises E _ -> false *)
... | null | https://raw.githubusercontent.com/ocaml-gospel/gospel/79841c510baeb396d9a695ae33b290899188380b/test/negative/exn_arity.mli | ocaml | @ f i
raises E _ -> false | exception E of int * int
val f : int -> unit
{ gospel_expected|
[ 125 ] File " exn_arity.mli " , line 5 , characters 11 - 23 :
5 | raises E _ - > false
[125] File "exn_arity.mli", line 5, characters 11-23:
5 | raises E _ -> false *)
^^^^^^^^^^^^
... |
dd4dbd354ed9397f2a9cbebd789e63506eb1668c4288c85edae8372c141cc57d | mbutterick/aoc-racket | day07.rkt | #lang scribble/lp2
@(require scribble/manual aoc-racket/helper)
@aoc-title[7]
@defmodule[aoc-racket/day07]
@link[""]{The puzzle}. Our @link-rp["day07-input.txt"]{input} describes an electrical circuit, with each line of the file describing the signal provided to a particular wire.
@chunk[<day07>
<day07-setup... | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/day07.rkt | racket | #lang scribble/lp2
@(require scribble/manual aoc-racket/helper)
@aoc-title[7]
@defmodule[aoc-racket/day07]
@link[""]{The puzzle}. Our @link-rp["day07-input.txt"]{input} describes an electrical circuit, with each line of the file describing the signal provided to a particular wire.
@chunk[<day07>
<day07-setup... | |
ca86b183292ae8a6fa522318b25a3c6c8f3d58d60a9da030e7dbf790a22e041d | racket/pkg-build | install-step.rkt | #lang racket/base
(require racket/format
racket/runtime-path
racket/file
file/untgz
remote-shell/vbox
remote-shell/docker
remote-shell/ssh
pkg/lib
net/url
"config.rkt"
"vm.rkt"
"status.rkt")
(provide install-step)
(defi... | null | https://raw.githubusercontent.com/racket/pkg-build/31fea3651b501e2ad333cf6133527290abd2eed1/private/install-step.rkt | racket | VM-side helper modules:
Docker mode | #lang racket/base
(require racket/format
racket/runtime-path
racket/file
file/untgz
remote-shell/vbox
remote-shell/docker
remote-shell/ssh
pkg/lib
net/url
"config.rkt"
"vm.rkt"
"status.rkt")
(provide install-step)
(defi... |
2bc8b1c2a6c43596ab1c606737ff4bdfd294b15ef99c32ac15a72e909daf4239 | chr15m/slingcode | slingcode-site-bootleg.clj | (let [template (html "../build/index.html")
template (enlive/at template [:head] (enlive/append (html "slingcode-social.html" :hickory-seq)))
template (enlive/at template [:link] (fn [t] (update-in t [:attrs :href] (fn [a] (str "public/" a)))))
template (enlive/at template [:link.rm] nil)
templ... | null | https://raw.githubusercontent.com/chr15m/slingcode/aef42bf097aef82f2eda297f4fe63ddd2763ff83/src/slingcode-site-bootleg.clj | clojure | (let [template (html "../build/index.html")
template (enlive/at template [:head] (enlive/append (html "slingcode-social.html" :hickory-seq)))
template (enlive/at template [:link] (fn [t] (update-in t [:attrs :href] (fn [a] (str "public/" a)))))
template (enlive/at template [:link.rm] nil)
templ... | |
84026ed714b9cf3f83e5f206e85374680047937da99554be50f151b26f275833 | blindglobe/clocc | cil.lisp | ;;;; cil.lsp: Chess In Lisp foundation programming toolkit
Revised : 1997.06.08
Send comments to : ( )
This source file is the foundation of the Chess In Lisp programming
;; toolkit. It contains the core processing functions needed to perform
;; research in the chess domain using Lisp.
;; Global optimiza... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/games/cil/cil.lisp | lisp | cil.lsp: Chess In Lisp foundation programming toolkit
toolkit. It contains the core processing functions needed to perform
research in the chess domain using Lisp.
Global optimization options
--- Constants -----------------------------------------------
Colors
white
black
vacant
extra
Pieces
pawn
knight
... |
Revised : 1997.06.08
Send comments to : ( )
This source file is the foundation of the Chess In Lisp programming
(declaim
(optimize (speed 3) (safety 0) (space 0) (compilation-speed 0)))
(defconstant c-limit 4)
(defconstant rc-limit 2)
(defconstant c-nil -1)
(defparameter c-strings
(make-array c-l... |
4643de172c075522ba116b9c16a1f4680d3533f458a7e44a402049b9c6b48109 | Metaxal/rascas | extended-euclidean-algorithm.rkt | #lang racket/base
This file has been changed from its original dharmatech / mpl version .
(provide extended-euclidean-algorithm)
(require "arithmetic.rkt"
"leading-coefficient-gpe.rkt"
"algebraic-expand.rkt"
"polynomial-division.rkt")
(define (extended-euclidean-algorithm u v x)
(if (... | null | https://raw.githubusercontent.com/Metaxal/rascas/540530c28689de50c526abf36079c07fd0436edb/extended-euclidean-algorithm.rkt | racket | #lang racket/base
This file has been changed from its original dharmatech / mpl version .
(provide extended-euclidean-algorithm)
(require "arithmetic.rkt"
"leading-coefficient-gpe.rkt"
"algebraic-expand.rkt"
"polynomial-division.rkt")
(define (extended-euclidean-algorithm u v x)
(if (... | |
8a6ae42cede911add15793bcf016ca9b47e8f443623ee07e0b00b9b96e9592d0 | 3b/parenscript | printer.lisp | (in-package #:parenscript)
(in-readtable :parenscript)
(defvar *ps-print-pretty* t)
(defvar *indent-num-spaces* 4)
(defvar *js-string-delimiter* #\'
"Specifies which character should be used for delimiting strings.
This variable is used when you want to embed the resulting JavaScript
in an html attribute delimited ... | null | https://raw.githubusercontent.com/3b/parenscript/cb4a605ef0ac4fcea1e0ccec23d5748cee613cc3/src/printer.lisp | lisp | ignore top-level block
) (when remaining (psw #\Newline)))
this doesn't preserve *column* or *indent-level*
))
iteration
)))
literal-js should be a form that evaluates to a string containing | (in-package #:parenscript)
(in-readtable :parenscript)
(defvar *ps-print-pretty* t)
(defvar *indent-num-spaces* 4)
(defvar *js-string-delimiter* #\'
"Specifies which character should be used for delimiting strings.
This variable is used when you want to embed the resulting JavaScript
in an html attribute delimited ... |
cf36bb4119ceade7c8475cbc9cc6393c6005a3809e8ade27a769c49f93d54221 | openbadgefactory/salava | helper.cljs | (ns salava.translator.ui.helper
(:require [salava.core.i18n :refer [t t+]]
[reagent.session :as session]))
(defn translate [lang key]
(if (session/get :user)
(t key)
(t+ lang key)))
| null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/translator/ui/helper.cljs | clojure | (ns salava.translator.ui.helper
(:require [salava.core.i18n :refer [t t+]]
[reagent.session :as session]))
(defn translate [lang key]
(if (session/get :user)
(t key)
(t+ lang key)))
| |
4551b681183dd098d680e45241e5ce26dd50549d926f3073e440d72a8daea3ce | namin/biohacker | adj.lisp | (in-package :ecocyc)
Copyright ( C ) 1993 - 2004 by SRI International . All rights reserved .
; This file contains functions that convert the representation of molecules
used in the CompoundKB into an adjacency - list representation that is much
; more convenient to use for certain computations.
; =======... | null | https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/metabolizer/adj.lisp | lisp | This file contains functions that convert the representation of molecules
more convenient to use for certain computations.
======================================================= adj-list
A shorthand for calling make-adj-list
======================================================= make-adj-list
Creates an adj... | (in-package :ecocyc)
Copyright ( C ) 1993 - 2004 by SRI International . All rights reserved .
used in the CompoundKB into an adjacency - list representation that is much
(defun adj-list (compound)
(make-adj-list
(get-slot-values compound 'structure-atoms)
(get-slot-values compound 'structure-bonds... |
bcd8ab868799f99ed0c6a8aaf69833864d6a3de5c86d264e3a6e685b628e4088 | Lovesan/doors | memory.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Copyright ( C ) 2010 - 2011 , < >
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, including without lim... | null | https://raw.githubusercontent.com/Lovesan/doors/12a2fe2fd8d6c42ae314bd6d02a1d2332f12499e/system/memory.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do... |
Copyright ( C ) 2010 - 2011 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-packag... |
d102d029c98e4a89717854838af7f15d8546526479d2a4e442fa329d31617c7a | robx/puzzle-draw | Code.hs | module Data.Code where
import Data.Grid
import Data.GridShape
import Data.Map.Strict (Map)
type Code = [CodePart]
data CodePart
= -- | Rows of cells, counted from the bottom.
Rows' [Int]
| -- | Cols of cells, counted from the left.
Cols [Int]
| -- | Rows of nodes, counted from the bottom.
RowsN' [I... | null | https://raw.githubusercontent.com/robx/puzzle-draw/936f4c9bf8ff576fb657b7c05067504734adae14/src/Data/Code.hs | haskell | | Rows of cells, counted from the bottom.
| Cols of cells, counted from the left.
| Rows of nodes, counted from the bottom.
| Cols of nodes, counted from the left.
| Rows of cells, counted from the bottom.
| Cols of cells, counted from the left.
| Rows of nodes, counted from the bottom.
| Cols of nodes, counted... | module Data.Code where
import Data.Grid
import Data.GridShape
import Data.Map.Strict (Map)
type Code = [CodePart]
data CodePart
Rows' [Int]
Cols [Int]
RowsN' [Int]
ColsN [Int]
| Nodes , labeld by letters .
LabelsN (Grid N (Maybe Char))
LRows' (Map Char Int)
LCols (Map Char Int)
LRow... |
a6a16758849eda0fc569f90c2249a96dc2ce2ad43671af6c79c782518b68ff28 | dbuenzli/brr | pkg.ml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let () =
Pkg.describe "brr" @@ fun c ->
Ok [ Pkg.mllib "src/brr.mllib";
Pkg.mllib "src/note/brr_note.mllib" ~dst_dir:"note/";
Pkg.mllib "src/ocaml_poke/brr_ocaml_poke.mllib" ~dst_dir:"ocaml_poke/";
Pkg.mllib "src/ocaml_poke_ui/brr... | null | https://raw.githubusercontent.com/dbuenzli/brr/3d1a0edd964a1ddfbf2be515fc3a3803d27ad707/pkg/pkg.ml | ocaml | Samples
Doc | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let () =
Pkg.describe "brr" @@ fun c ->
Ok [ Pkg.mllib "src/brr.mllib";
Pkg.mllib "src/note/brr_note.mllib" ~dst_dir:"note/";
Pkg.mllib "src/ocaml_poke/brr_ocaml_poke.mllib" ~dst_dir:"ocaml_poke/";
Pkg.mllib "src/ocaml_poke_ui/brr... |
b31e6919227bede1ce8ff38db1fbe78b22b948e2cedc52f51fc3eb0df5a1a7ba | audreyt/openafp | AV.hs | module OpenAFP.Records.T.AV where
import OpenAFP.Types
import OpenAFP.Internals
data T_AV = T_AV {
t_av_Type :: !N1
,t_av :: !AStr
} deriving (Show, Typeable)
| null | https://raw.githubusercontent.com/audreyt/openafp/178e0dd427479ac7b8b461e05c263e52dd614b73/src/OpenAFP/Records/T/AV.hs | haskell | module OpenAFP.Records.T.AV where
import OpenAFP.Types
import OpenAFP.Internals
data T_AV = T_AV {
t_av_Type :: !N1
,t_av :: !AStr
} deriving (Show, Typeable)
| |
6405d9da9c7ade78be64f8063bdf24a43b97004feb90234cba0ed717980cc4c6 | input-output-hk/ouroboros-network | Conway.hs | {-# LANGUAGE EmptyDataDeriving #-}
-- TODO DUPLICATE? -- as-if adapted? from: cardano-node/src/Cardano/Node/Protocol/Conway.hs
module Cardano.Node.Protocol.Conway (
ConwayProtocolInstantiationError
-- * Reusable parts
, readGenesis
, validateGenesis
) where
import Cardano.Prelude
import qual... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/162c2b426ca66047f92a7d073036c13a434bf026/ouroboros-consensus-cardano-tools/src/Cardano/Node/Protocol/Conway.hs | haskell | # LANGUAGE EmptyDataDeriving #
TODO DUPLICATE? -- as-if adapted? from: cardano-node/src/Cardano/Node/Protocol/Conway.hs
* Reusable parts
|
module Cardano.Node.Protocol.Conway (
ConwayProtocolInstantiationError
, readGenesis
, validateGenesis
) where
import Cardano.Prelude
import qualified Cardano.Ledger.Conway.Genesis as Conway
import qualified Cardano.Ledger.Crypto as Crypto
import Cardano.Node.Protocol.Shelley (Genesis... |
476a9bfacbf4a229d2f0f8f9c05ba550d82fed9263e1ad70c8bb2ceea23de0a7 | silkapp/rest | Post.hs | # LANGUAGE
DeriveDataTypeable
, NoImplicitPrelude
#
DeriveDataTypeable
, NoImplicitPrelude
#-}
module Api.Post
( Identifier (..)
, WithPost
, resource
, postFromIdentifier
) where
import Prelude.Compat
import Control.Concurrent.STM (STM, TVar, atomically, modifyTVar, readTVar)
import C... | null | https://raw.githubusercontent.com/silkapp/rest/f0462fc36709407f236f57064d8e37c77bdf8a79/rest-example/example-api/Api/Post.hs | haskell | Currently only by the title of the post.
| Defines the /post api end-point.
Name of the HTTP path segment.
Make sure the credentials are valid
| Throw an error if the user isn't logged in. | # LANGUAGE
DeriveDataTypeable
, NoImplicitPrelude
#
DeriveDataTypeable
, NoImplicitPrelude
#-}
module Api.Post
( Identifier (..)
, WithPost
, resource
, postFromIdentifier
) where
import Prelude.Compat
import Control.Concurrent.STM (STM, TVar, atomically, modifyTVar, readTVar)
import C... |
211b978a419b954572ad6c5febcbf80cb3369042f15f9efebd053099a3ca495d | BitGameEN/bitgamex | erlcloud_sns_tests.erl | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(erlcloud_sns_tests).
-include_lib("eunit/include/eunit.hrl").
% -include("erlcloud.hrl").
-include("erlcloud_aws.hrl").
Unit tests for sns .
These tests work by using meck to mock httpc . There are two classes of test : input an... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcloud/test/erlcloud_sns_tests.erl | erlang | -include("erlcloud.hrl").
Input tests verify that different function args produce the desired JSON request.
An input test list provides a list of funs and the JSON that is expected to result.
Output tests verify that the http response produces the correct return from the fun.
An output test lists provides a list... | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(erlcloud_sns_tests).
-include_lib("eunit/include/eunit.hrl").
-include("erlcloud_aws.hrl").
Unit tests for sns .
These tests work by using meck to mock httpc . There are two classes of test : input and output .
-define(_sns_tes... |
78684f33c1e4f9fef92654d42f805e666de3bd57b48cda2f96d34686dac0291e | ocaml-flambda/flambda-backend | fexpr.ml | type location = Lambda.scoped_location
type 'a located =
{ txt : 'a;
loc : location
}
type variable = string located
type continuation_id = string located
type code_id = string located
type function_slot = string located
type value_slot = string located
type compilation_unit =
{ ident : string;
lin... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/e2711acd740fb85b2672c8c72e07d3558edd1b57/middle_end/flambda2/parser/fexpr.ml | ocaml | defaults to same as ident
top-level normal continuation
top-level exception continuation
There's also [Return] and [Toplevel_return], but those don't need to be
* specified explicitly
on tagged immediates
on tagged immediates
Will translate to indirect_known_arity or indirect_unknown_arity depending on
... | type location = Lambda.scoped_location
type 'a located =
{ txt : 'a;
loc : location
}
type variable = string located
type continuation_id = string located
type code_id = string located
type function_slot = string located
type value_slot = string located
type compilation_unit =
{ ident : string;
}
ty... |
5128a1323f1bb0f5aba2f4291c4b5bfe16e189773ddaff581a7dae88cefe6fa9 | zack-bitcoin/amoveo | keys.erl | the hard drive stores { f , , encrypted(privkey ) , encrypted("sanity " ) ) .
%the ram stores either {pubkey, privkey} or {pubkey, ""} depending on if this node is locked.
-module(keys).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
pubkey... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo/257f3e8cc07f1bae9df1a7252b8bc67a0dad3262/apps/amoveo_core/src/consensus/keys.erl | erlang | the ram stores either {pubkey, privkey} or {pubkey, ""} depending on if this node is locked.
-define(LOC, "keys.db").
sanity is only used on the hard drive, not in ram. | the hard drive stores { f , , encrypted(privkey ) , encrypted("sanity " ) ) .
-module(keys).
-behaviour(gen_server).
-export([start_link/0,code_change/3,handle_call/3,handle_cast/2,handle_info/2,init/1,terminate/2,
pubkey/0, sign/1, raw_sign/1,
load/3, unlock/1,
lock/0, status/0, change_password/2, new/... |
616e383e0f83eaec6f8e83c43e9d6a90bc3e0197a4dae9da4c3e0902b7a4f9ce | alertlogic/erllambda | erllambda_sup.erl | %%%---------------------------------------------------------------------------
%% @doc erllambda_sup - Erllambda Application supervisor
%%
This module implements the Erlang < code > supervisor</code > behavior , which
%% exists, but starts no server processes.
%%
%%
2018 Alert Logic , Inc.
%%%---------------------... | null | https://raw.githubusercontent.com/alertlogic/erllambda/314690c4941be5c0548603cca74927deacac3b34/src/erllambda_sup.erl | erlang | ---------------------------------------------------------------------------
@doc erllambda_sup - Erllambda Application supervisor
exists, but starts no server processes.
---------------------------------------------------------------------------
API
Supervisor callbacks
==========================================... | This module implements the Erlang < code > supervisor</code > behavior , which
2018 Alert Logic , Inc.
-module(erllambda_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Children = [
er... |
07fbb6ea1654b5802ce4837545e41966110563f1fa7754a107dc221bd1e2572b | andersfugmann/amqp-client | repeat.ml | open Amqp
open Thread
let uniq s =
Printf.sprintf "%s_%d_%s" (Filename.basename Sys.argv.(0)) (Unix.getpid ()) s
let rec repeat channel queue =
Log.info "rep";
Queue.publish channel queue (Message.make "Test") >>= function
| `Ok ->
begin
Queue.get ~no_ack:true channel queue >>= function
... | null | https://raw.githubusercontent.com/andersfugmann/amqp-client/2932a69510af550e9e156ed479f4fca7daee31cc/async/test/repeat.ml | ocaml | open Amqp
open Thread
let uniq s =
Printf.sprintf "%s_%d_%s" (Filename.basename Sys.argv.(0)) (Unix.getpid ()) s
let rec repeat channel queue =
Log.info "rep";
Queue.publish channel queue (Message.make "Test") >>= function
| `Ok ->
begin
Queue.get ~no_ack:true channel queue >>= function
... | |
08e9ac77aad9c209299fe33c3aa01cf1648404491c787b558f19fea149afc2b7 | Eduap-com/WordMat | mmacro.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/src/mmacro.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
$MACROS decla... |
(in-package :maxima)
(macsyma-module mmacro)
Exported functions are MDEFMACRO , , $ MACROEXPAND1 , MMACRO - APPLY
MMACROEXPANDED , MMACROEXPAND and
(declare-top (special $macros $functions $transrun $translate))
(defmvar $macroexpansion ()
"Governs the expansion of Maxima Macro... |
621eab76457ea61a2b42b02eee605058a10ae54adc1d8d1d69dbc1b0981b2f2b | viercc/kitchen-sink-hs | NumExpr.hs | {-# LANGUAGE RankNTypes #-}
module NumExpr where
isNegate :: (forall a. Num a => a -> a) -> Bool
isNegate f = f (Var "x") == Fun "negate" [Var "x"]
data Expr = Var String | Literal Integer | Fun String [Expr]
deriving (Eq, Show)
instance Num Expr where
fromInteger = Literal
a + b = Fun "+" [a,b]
a - ... | null | https://raw.githubusercontent.com/viercc/kitchen-sink-hs/391efc1a30f02a65bbcc37a4391bd5cb0d3eee8c/snippets/src/NumExpr.hs | haskell | # LANGUAGE RankNTypes #
etc. | module NumExpr where
isNegate :: (forall a. Num a => a -> a) -> Bool
isNegate f = f (Var "x") == Fun "negate" [Var "x"]
data Expr = Var String | Literal Integer | Fun String [Expr]
deriving (Eq, Show)
instance Num Expr where
fromInteger = Literal
a + b = Fun "+" [a,b]
a - b = Fun "-" [a,b]
negate... |
088a4445cd784fd2f245ac7b1a23c97a66d3fb8bb51feee1b68a81324365a373 | asakeron/cljs-webgl | shader_source.cljs | (ns cljs-webgl.constants.shader-source)
(def compile-status 0x8B81)
| null | https://raw.githubusercontent.com/asakeron/cljs-webgl/f4554fbee6fbc6133a4eb0416548dabd284e735c/src/cljs/cljs_webgl/constants/shader_source.cljs | clojure | (ns cljs-webgl.constants.shader-source)
(def compile-status 0x8B81)
| |
1e3d9262264c98313617b0138fede44c78a6a83ce3c987cb391eb0d1354e5fd4 | helium/blockchain-core | blockchain_console.erl | -module(blockchain_console).
-export([command/1]).
-spec command([string()]) -> rpc_ok | {rpc_error, non_neg_integer()}.
command(Cmd) ->
%% this is the contents of clique:run but
%% we want to figure out if the command worked
%% or not
M0 = clique_command:match(Cmd),
M1 = clique_parser:parse(M0),
... | null | https://raw.githubusercontent.com/helium/blockchain-core/c3d9fc124c8004dddc85ef40af296d34b3a8b1e3/src/cli/blockchain_console.erl | erlang | this is the contents of clique:run but
we want to figure out if the command worked
or not | -module(blockchain_console).
-export([command/1]).
-spec command([string()]) -> rpc_ok | {rpc_error, non_neg_integer()}.
command(Cmd) ->
M0 = clique_command:match(Cmd),
M1 = clique_parser:parse(M0),
M2 = clique_parser:extract_global_flags(M1),
M3 = clique_parser:validate(M2),
M4 = clique_command:r... |
80272950e9bb24c655f78c366adfd81ecb4e440bc62264cd03f8b1b0482d2879 | LuisThiamNye/chic | move.clj | (ns chic.controls.textbox.move
(:require
[proteus :refer [let-mutable]]
[chic.controls.textbox.helper :as hpr]
[chic.clipboard :as clipboard]
[chic.debug]
[taoensso.encore :as enc]
[chic.controls.textbox.cursor :as cursor]
[potemkin :refer [doit]]
[chic.controls.textbox.keybindings :as keybind... | null | https://raw.githubusercontent.com/LuisThiamNye/chic/813633a689f9080731613f788a295604d4d9a510/src/chic/controls/textbox/move.clj | clojure | this implementation gives same word-movement results as macOS TextEdit
if not punctuation/space
-1
type of boundary defined by the index before
WORD_NONE includes space & punctuation and does not distinguish between them
there is a boundary between each instance of:
newline = , .
& other punctuation, but spa... | (ns chic.controls.textbox.move
(:require
[proteus :refer [let-mutable]]
[chic.controls.textbox.helper :as hpr]
[chic.clipboard :as clipboard]
[chic.debug]
[taoensso.encore :as enc]
[chic.controls.textbox.cursor :as cursor]
[potemkin :refer [doit]]
[chic.controls.textbox.keybindings :as keybind... |
f01f45cfb069a11abf434366a882db993a094fdcfcf12fd0e782222b00f13692 | rbardou/red | layout.mli | (** Panel layouts. *)
(** How to split a layout. *)
type split_direction =
| Vertical (** top and bottom *)
| Horizontal (** left and right *)
(** Where to split a layout. *)
type split_position =
| Absolute_first of int (** set the size of the top or left sublayout, and the other one takes the rest *)
| Abso... | null | https://raw.githubusercontent.com/rbardou/red/e23c2830909b9e5cd6afe563313435ddaeda90bf/src/layout.mli | ocaml | * Panel layouts.
* How to split a layout.
* top and bottom
* left and right
* Where to split a layout.
* set the size of the top or left sublayout, and the other one takes the rest
* set the size of the bottom or right sublayout, and the other one takes the rest
* numerator, denominator: denotes a fraction of th... |
type split_direction =
type split_position =
type split_main =
| First
| Second
type t
val single: Panel.t -> t
val create_file: File.t -> t
* A layout split in two .
val split: split_direction -> ?pos: split_position -> ?sep: bool -> ?main: split_main -> t -> t -> t
val get_main_panel: t -> Panel.t
val re... |
2386d81f2fbb72241ebd642fd7fe72bec94db2fd6eaaadc138e8753e03af9bda | xtdb/xtdb | lubm.clj | (ns xtdb.fixtures.lubm
(:require [xtdb.fixtures :refer [*api*]]
[xtdb.api :as xt]
[xtdb.rdf :as rdf]))
(def ^:const lubm-triples-resource-8k "lubm/University0_0.ntriples")
(def ^:const lubm-triples-resource-100k "lubm/lubm10.ntriples")
(defn with-lubm-data [f]
(let [last-tx (->> (concat (r... | null | https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/test/test/xtdb/fixtures/lubm.clj | clojure | (ns xtdb.fixtures.lubm
(:require [xtdb.fixtures :refer [*api*]]
[xtdb.api :as xt]
[xtdb.rdf :as rdf]))
(def ^:const lubm-triples-resource-8k "lubm/University0_0.ntriples")
(def ^:const lubm-triples-resource-100k "lubm/lubm10.ntriples")
(defn with-lubm-data [f]
(let [last-tx (->> (concat (r... | |
5c6c93971d13163dde7c538aa470577a39b222b9259d7c25a29fad890beb2209 | Akii/acme-fucks | Fucks.hs | module Acme.Fucks
( Fucks
, Amount
, giveFucks
) where
import Control.Monad
type Amount = Int
| Tells us how many fucks were given that day .
-- We make it a phantom type (parametrized over `f`) because we would like to pretend we're able to give a fuck about anything.
newtype Fucks f = Fucks Amount
-- | ... | null | https://raw.githubusercontent.com/Akii/acme-fucks/ef9221d19cf9914f804fe8050abe91285d41f0cf/src/Acme/Fucks.hs | haskell | We make it a phantom type (parametrized over `f`) because we would like to pretend we're able to give a fuck about anything.
| The essence of how many fucks should be given.
It makes sense because: regardless how much fuck we give, we're only fooling ourselves.
We can't and so, wont, give a single fuck.
It is no... | module Acme.Fucks
( Fucks
, Amount
, giveFucks
) where
import Control.Monad
type Amount = Int
| Tells us how many fucks were given that day .
newtype Fucks f = Fucks Amount
It first , we do n't give a fuck . If at any point , somehow a fuck is given , we make sure to not give a fuck again .
instance Mon... |
41d1e26c761ea3a494d9938195715866b19a2419649291bb404023d8801b04bd | bmeurer/ocaml-arm | format.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/format.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
$ Id$
* Pretty printing .
Thi... |
eb638ff01173e3762de60fabd2d4f96fa2d92ad477a980ea232f063d53f6f1cf | oliyh/slacky | memecaptain.clj | (ns slacky.memecaptain
(:require [clj-http.client :as http]
[clojure.tools.logging :as log]
[clojure.java.shell :as sh]
[clojure.java.io :as io])
(:import [java.util UUID]
[java.io File]))
(defn init
"Copies the font to disk so it can be used and creates the meme di... | null | https://raw.githubusercontent.com/oliyh/slacky/909110e0555b7e443c3cf014c7c34b00b31c1a18/src/clj/slacky/memecaptain.clj | clojure | (ns slacky.memecaptain
(:require [clj-http.client :as http]
[clojure.tools.logging :as log]
[clojure.java.shell :as sh]
[clojure.java.io :as io])
(:import [java.util UUID]
[java.io File]))
(defn init
"Copies the font to disk so it can be used and creates the meme di... | |
bff87712ed10170dc40373059834d04e2eccab60778c2a081eed73067074b62d | mathematical-systems/clml | blas.lisp | (in-package :mkl.blas)
blas1
;;; asum
(defblas asum (:single :double) :precision
(n blas-int)
(x (:array :precision *))
(incx blas-int))
(defffun scasum :float
(n blas-int)
(x (:array complex-float *))
(incx blas-int))
(export 'scasum)
(defffun dzasum :double
(n blas-int)
(x (:array complex-double... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/addons/blas-lapack-ffi/src/blas.lisp | lisp | asum
axpy
copy
dot
dotc
nrm2
rot
rotg
rotm
rotmg
scal
swap
i?amax
it's generated and modified from
:precision
(n blas-int)
(x (:array :precision *))
i?amin
it's generated and modified from
:precision
(n blas-int)
(x (:array :precision *))
cabs1
blas2
gbmv
gemv
ger
gerc
geru
... | (in-package :mkl.blas)
blas1
(defblas asum (:single :double) :precision
(n blas-int)
(x (:array :precision *))
(incx blas-int))
(defffun scasum :float
(n blas-int)
(x (:array complex-float *))
(incx blas-int))
(export 'scasum)
(defffun dzasum :double
(n blas-int)
(x (:array complex-double *))
(i... |
ba3e8b7aa3bce80e447a39c60d852428f03b4acca694a7a0653085bca0061d78 | exercism/babashka | kindergarten_garden_test.clj | (ns kindergarten-garden-test
(:require [clojure.test :refer [deftest is]]
kindergarten-garden))
(deftest garden-test
(is (= [:radishes :clover :grass :grass]
(:alice (kindergarten-garden/garden "RC\nGG"))))
(is (= [:violets :clover :radishes :clover]
(:alice (kindergarten-garden/gar... | null | https://raw.githubusercontent.com/exercism/babashka/7375f1938ff95b242320313eaeedb8eca31a1b5b/exercises/practice/kindergarten-garden/test/kindergarten_garden_test.clj | clojure | (ns kindergarten-garden-test
(:require [clojure.test :refer [deftest is]]
kindergarten-garden))
(deftest garden-test
(is (= [:radishes :clover :grass :grass]
(:alice (kindergarten-garden/garden "RC\nGG"))))
(is (= [:violets :clover :radishes :clover]
(:alice (kindergarten-garden/gar... | |
d39652b739bfc3855f1a4d9340485c7d4baf8d6b1fa890236846427d1298f100 | cl-axon/shop2 | pfile11.lisp | (in-package :shop2-user)
(defproblem pfile11 DEPOT
(
;;;
;;; facts
;;;
(DEPOT DEPOT0)
(DEPOT DEPOT1)
(DEPOT DEPOT2)
(DISTRIBUTOR DISTRIBUTOR0)
(DISTRIBUTOR DISTRIBUTOR1)
(DISTRIBUTOR DISTRIBUTOR2)
(TRUCK TRUCK0)
(TRUCK TRUCK1)
(TRUCK TRUCK2)
(TRUCK TRUCK3)
(PAL... | null | https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/examples/depots/pfile11.lisp | lisp |
facts
initial states
goals
| (in-package :shop2-user)
(defproblem pfile11 DEPOT
(
(DEPOT DEPOT0)
(DEPOT DEPOT1)
(DEPOT DEPOT2)
(DISTRIBUTOR DISTRIBUTOR0)
(DISTRIBUTOR DISTRIBUTOR1)
(DISTRIBUTOR DISTRIBUTOR2)
(TRUCK TRUCK0)
(TRUCK TRUCK1)
(TRUCK TRUCK2)
(TRUCK TRUCK3)
(PALLET PALLET0)
(PALLET PALLET... |
eaae439eba89fe8737496d96fef13190270a7d1cad1120adebdcf5eae9c02b14 | ivankocienski/lspec | spec-group.lisp | (in-package :lspec)
(defparameter *spec-group-root* nil)
(defstruct spec-group
id
caption
around-callbacks
;; this should count all the sub entries?
entries
parent)
(defmethod print-object ((this spec-group) out)
(print-unreadable-object (this out)
(format out "SPEC-GROUP ")
(format out "id=~d ... | null | https://raw.githubusercontent.com/ivankocienski/lspec/489346b7f53692f2ff9c86748a14ebea89eedfd6/src/spec-group.lisp | lisp | this should count all the sub entries?
run sub-group
run spec | (in-package :lspec)
(defparameter *spec-group-root* nil)
(defstruct spec-group
id
caption
around-callbacks
entries
parent)
(defmethod print-object ((this spec-group) out)
(print-unreadable-object (this out)
(format out "SPEC-GROUP ")
(format out "id=~d " (spec-group-id this))
(format out "cap... |
696265e3132b1b0b458b10b14267b9ff2dfb04dd85fd55b48766625c15d6b307 | rtoy/cmucl | print.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Base : 10 ; Package : x86 -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
If you want to use this ... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/x86/print.lisp | lisp | Syntax : Common - Lisp ; Base : 10 ; Package : x86 -*-
**********************************************************************
**********************************************************************
core to keep the user entertained.
| This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
If you want to use this code or any part of CMU Common Lisp , please contact
or .
(ext:file-comment
"$Header: src/compiler/x86/print.lisp $")
This file contains the print... |
f8eef4676a4e903ca578c02bc855d0591827bed64a87f9a58c4698e5bd42dffb | yesodweb/persistent | LargeNumberTest.hs | # LANGUAGE UndecidableInstances #
module LargeNumberTest where
import Data.Word
import Init
share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "numberMigrate"] [persistLowerCase|
Number
intx Int
int32 Int32
word32 Word32
int64 Int64
word64 Word64
deriving Show Eq
|]
cleanDB
... | null | https://raw.githubusercontent.com/yesodweb/persistent/bf4c3ae430d7e7ec0351a768783d73e6bd265890/persistent-test/src/LargeNumberTest.hs | haskell | # LANGUAGE UndecidableInstances #
module LargeNumberTest where
import Data.Word
import Init
share [mkPersist sqlSettings { mpsGeneric = True }, mkMigrate "numberMigrate"] [persistLowerCase|
Number
intx Int
int32 Int32
word32 Word32
int64 Int64
word64 Word64
deriving Show Eq
|]
cleanDB
... | |
30201e22cc27569af35edf10a0f058c1c32ddde50f7c9d16fc68d38f2b627db4 | haskell-gi/gi-gtk-examples | Uzbl.hs | -- | This is program use uzbl embedded in window to render webpage.
-- Just simple model demo for view, haven't handle event or else.
--
You need install uzbl ( git clone git ) first .
--
-- How to use:
./Uzbl default open Google page .
-- ./Uzbl url will open url you input
--
module Main where
import Gra... | null | https://raw.githubusercontent.com/haskell-gi/gi-gtk-examples/4c4f06dc91fbb9b9f50cdad295c8afe782e0bdec/embedded/Uzbl.hs | haskell | | This is program use uzbl embedded in window to render webpage.
Just simple model demo for view, haven't handle event or else.
How to use:
./Uzbl url will open url you input
Get program arguments.
get user input url
set default url
Create window.
Create socket.
must show before add to parent
Get socket... | You need install uzbl ( git clone git ) first .
./Uzbl default open Google page .
module Main where
import Graphics.UI.Gtk
import System.Process
import System.Environment
main :: IO ()
main = do
Init .
initGUI
args <- getArgs
let url = case args of
window <- windowNew
windowSetDefaultSize win... |
17ae455909ad9ca3dcfd636168d30981c1ca755c4e77eb127849a38d3cc09e61 | astrada/ocaml-extjs | example_data.ml | let () =
Ext.instance##require(
Js.array [|Js.string "Ext.data.*"|],
Js.undefined,
Js.undefined,
Js.undefined)
let math_floor number =
(Js.Unsafe.coerce Js.math)##floor(number)
let math_max n1 n2 =
(Js.Unsafe.coerce Js.math)##max(n1, n2)
let generateData ?(n = 12) ?(floor = 20.0) () =
let get... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/examples/charts/area/example_data.ml | ocaml | let () =
Ext.instance##require(
Js.array [|Js.string "Ext.data.*"|],
Js.undefined,
Js.undefined,
Js.undefined)
let math_floor number =
(Js.Unsafe.coerce Js.math)##floor(number)
let math_max n1 n2 =
(Js.Unsafe.coerce Js.math)##max(n1, n2)
let generateData ?(n = 12) ?(floor = 20.0) () =
let get... | |
ddba2fe48506cc8c029b6d0377d9e70209ee9ba49a02512ab6bc4d5505c17dc9 | amnh/poy5 | block.ml | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/block.ml | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
c74122348fad7b42e3ccdf5caa24671e820124772d25c69f8f1becae88bde072 | pa-ba/compdata-param | Term.hs | # LANGUAGE EmptyDataDecls , GADTs , KindSignatures , ,
MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
--------------------------------------------------------------------------------
-- |
Module : Data . Comp . . Te... | null | https://raw.githubusercontent.com/pa-ba/compdata-param/5d6b0afa95a27fd3233f86e5efc6e6a6080f4236/src/Data/Comp/Param/Term.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
This module defines the central notion of /parametrised terms/ and their
generalisation to parametrised contexts.
----------------------------------------------------------------------... | # LANGUAGE EmptyDataDecls , GADTs , KindSignatures , ,
MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
MultiParamTypeClasses, TypeSynonymInstances, FlexibleInstances #-}
Module : Data . Comp . . Term
Copyright : ( c ) 2011 ,
Maintainer : < >
Portability : non... |
f764b3096e3d6b0a6bf4463b17e3fc5b152989bedbddd674e456a01b0405a9dd | Elzair/nazghul | treasury.scm | (mk-dungeon-room
'p_treasury2 "Lost Treasury of Luximene"
(list
"xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx "
"xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx "
"xx xx xx xx xx ,T ,R ,E ,A ,S ,U ,R ,Y @@ xx xx xx xx xx "
"xx xx xx xx xx @@ @@ @@ ,O @@ ,F @@ @@ @@ xx xx x... | null | https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/treasury.scm | scheme | special treasures
piles of gold
random mundane treasures
some gems to add sparkle
a couple of corpses | (mk-dungeon-room
'p_treasury2 "Lost Treasury of Luximene"
(list
"xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx "
"xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx xx "
"xx xx xx xx xx ,T ,R ,E ,A ,S ,U ,R ,Y @@ xx xx xx xx xx "
"xx xx xx xx xx @@ @@ @@ ,O @@ ,F @@ @@ @@ xx xx x... |
dc41ec1a3806b3f8ee3fbd100f41cc267a52969ca8869d1c018854bd62210917 | phadej/cabal-fmt | ExpandExposedModules.hs | -- |
-- License: GPL-3.0-or-later
Copyright :
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# OPTIONS_GHC -Wno - deprecations #
module CabalFmt.Refactoring.ExpandExposedModules (
refactoringExpandExposedModules,
) where
import qualified Distribution.Fields as C
import qualified ... | null | https://raw.githubusercontent.com/phadej/cabal-fmt/f64e495b1a29f5d72f9b60ca313f854db3af33dc/src/CabalFmt/Refactoring/ExpandExposedModules.hs | haskell | |
License: GPL-3.0-or-later
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
TODO: don't use fromComponents | Copyright :
# OPTIONS_GHC -Wno - deprecations #
module CabalFmt.Refactoring.ExpandExposedModules (
refactoringExpandExposedModules,
) where
import qualified Distribution.Fields as C
import qualified Distribution.ModuleName as C
import CabalFmt.Prelude
import CabalFmt.Monad
import CabalFmt.Pragma
impor... |
79ec4ff2c0e4b54ff1fa87dcfdad72d65dfe34cee57f159efcea8f1fa2bef098 | liaopeiyuan/zeta | tensor.mli | type op =
| IntOp : (int -> int) -> op
| BoolOp : (bool -> bool) -> op
| FloatOp : (float -> float) -> op
type predicate =
| IntP : (int -> bool) -> predicate
| BoolP : (bool -> bool) -> predicate
| FloatP : (float -> bool) -> predicate
type 'a tensordata =
| IntScalar : int ref -> int tensordata
| Floa... | null | https://raw.githubusercontent.com/liaopeiyuan/zeta/2577721f81beff7d4d3a64ce027d20cd0e8c58aa/src/tensor.mli | ocaml | type op =
| IntOp : (int -> int) -> op
| BoolOp : (bool -> bool) -> op
| FloatOp : (float -> float) -> op
type predicate =
| IntP : (int -> bool) -> predicate
| BoolP : (bool -> bool) -> predicate
| FloatP : (float -> bool) -> predicate
type 'a tensordata =
| IntScalar : int ref -> int tensordata
| Floa... | |
786ffff4a367fc759c814dfd9f37278e784ad0cffb761c5fa174b1db7606ffbb | tanakh/ICFP2011 | LTG.hs | {-# OPTIONS -Wall #-}
module LTG(Card(..), cards, right, left, ($<), ($>), (#)) where
import Data.Text (Text, pack)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Data.Vector (Vector, fromList)
import System.IO
infixl 3 #
(#) :: Text -> Text -> Text
(#) = T.append
data Card = I | Zero | S... | null | https://raw.githubusercontent.com/tanakh/ICFP2011/db0d670cdbe12e9cef4242d6ab202a98c254412e/nushio/LTG.hs | haskell | # OPTIONS -Wall # | module LTG(Card(..), cards, right, left, ($<), ($>), (#)) where
import Data.Text (Text, pack)
import qualified Data.Text as T
import qualified Data.Text.IO as T
import Data.Vector (Vector, fromList)
import System.IO
infixl 3 #
(#) :: Text -> Text -> Text
(#) = T.append
data Card = I | Zero | Succ | Dbl | Get | Put ... |
104cb4fc80b15bef71ba14620b216cbb49e93e16ef8d351b91c9839dd65838fd | binaryage/chromex | processes.clj | (ns chromex.ext.processes
"Use the chrome.processes API to interact with the browser's
processes.
* available since Chrome 87
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/processes.clj | clojure | -- events -----------------------------------------------------------------------------------------------------------------
docs: /#tapping-events
-- convenience ------------------------------------------------------------------------------------------------------------
--------------------------------------------... | (ns chromex.ext.processes
"Use the chrome.processes API to interact with the browser's
processes.
* available since Chrome 87
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen :refer [gen-call-... |
4f1e25dae0993d1c7234b13106f7c2257e04ccb3fef30bba33a8a927e1fad01f | ocaml-multicore/tezos | faked_client_context.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_delegate/test/mockup_simulator/faked_client_context.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
84fbbf39beae955aae6ea12378a78575a0fefc44f543a3b67c6b8010bfead23d | glebec/haskell-programming-allen-moronuki | MadLib.hs | module MadLib where
import Data.Monoid
type Verb = String
type Adjective = String
type Adverb = String
type Noun = String
type Exclamation = String
madlibbin' :: Exclamation
-> Adverb
-> Noun
-> Adjective
-> String
madlibbin' e adv noun adj =
e <> "! he said " <> adv ... | null | https://raw.githubusercontent.com/glebec/haskell-programming-allen-moronuki/99bd232f523e426d18a5e096f1cf771228c55f52/15-monoid-semigroup/projects/p0-scratch/src/MadLib.hs | haskell | module MadLib where
import Data.Monoid
type Verb = String
type Adjective = String
type Adverb = String
type Noun = String
type Exclamation = String
madlibbin' :: Exclamation
-> Adverb
-> Noun
-> Adjective
-> String
madlibbin' e adv noun adj =
e <> "! he said " <> adv ... | |
dcfd3142a1145fa0fd8ff9bd3e353598e7b33597f7d05389b50277444976287e | logicmoo/logicmoo_nlu | pred.lsp | Mini - PrologII
; pred.lsp
;
(defvar Ob_Micro_Log
'(|write| |nl| |tab| |read| |get| |get0|
|var| |nonvar| |atomic| |atom| |number|
! |fail| |true|
|divi| |mod| |plus| |minus| |mult| |le| |lt|
|name| |consult| |abolish| |cputime| |statistics|
|call| |freeze| |dif| |frozen_goals|))
(mapc #'(lambda (x) (set... | null | https://raw.githubusercontent.com/logicmoo/logicmoo_nlu/c066897f55b3ff45aa9155ebcf799fda9741bf74/ext/e2c/microPrologIIV4/pred.lsp | lisp | pred.lsp
!/0
updates local stack
call/1 (+term)
dereferences it
new continuation
saves continuation
global env.
cut point
ends local block
freeze/2 (?var,+term)
dereferences the var
unbound
the location
dereferences the goal
else call p
dif/2 (?term,?term)
saves registers
unification fails
restore... | Mini - PrologII
(defvar Ob_Micro_Log
'(|write| |nl| |tab| |read| |get| |get0|
|var| |nonvar| |atomic| |atom| |number|
! |fail| |true|
|divi| |mod| |plus| |minus| |mult| |le| |lt|
|name| |consult| |abolish| |cputime| |statistics|
|call| |freeze| |dif| |frozen_goals|))
(mapc #'(lambda (x) (setf (get x 'eva... |
2d69d14defb6b05bc3703843c3c7bfd965e8281391a0506117611d5302bfeaf4 | greglook/clj-cbor | tagged_test.clj | (ns clj-cbor.data.tagged-test
(:require
[clj-cbor.data.tagged :refer [->TaggedValue]]
[clojure.test :refer [deftest testing is]]))
(deftest tagged-values
(let [uri-value (->TaggedValue 32 "/" nil)
ratio-value (->TaggedValue 30 [1 3] nil)]
(testing "representation"
(is (= "32(/)" (str uri... | null | https://raw.githubusercontent.com/greglook/clj-cbor/ff3ec660fe40789e2bf97b87b6a5e9be0361b0b2/test/clj_cbor/data/tagged_test.clj | clojure | (ns clj-cbor.data.tagged-test
(:require
[clj-cbor.data.tagged :refer [->TaggedValue]]
[clojure.test :refer [deftest testing is]]))
(deftest tagged-values
(let [uri-value (->TaggedValue 32 "/" nil)
ratio-value (->TaggedValue 30 [1 3] nil)]
(testing "representation"
(is (= "32(/)" (str uri... | |
c729c25864cb73a1bbc36b35b31d16fac0546bfb4dca990d8156b1f35ee3f62c | Copilot-Language/copilot | Grey.hs | # LANGUAGE RebindableSyntax #
module Grey where
import Copilot.Language
import Copilot.Theorem
import Copilot.Theorem.Prover.Z3
import Prelude ()
import Data.String (fromString)
intCounter :: Stream Bool -> Stream Word64
intCounter reset = time
where
time = if reset then 0
else [0] ++ if time == 3 ... | null | https://raw.githubusercontent.com/Copilot-Language/copilot/17a9b45eea4e95a465d6e773c6fbcf9bf810b6cc/copilot-theorem/examples/Grey.hs | haskell | # LANGUAGE RebindableSyntax #
module Grey where
import Copilot.Language
import Copilot.Theorem
import Copilot.Theorem.Prover.Z3
import Prelude ()
import Data.String (fromString)
intCounter :: Stream Bool -> Stream Word64
intCounter reset = time
where
time = if reset then 0
else [0] ++ if time == 3 ... | |
7ed06335bbab4fad7976d1c39cef849743ad99cf129b17338b31d8a45da541a0 | Liqwid-Labs/liqwid-libs | Types.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
|
Module : ScriptExport . Types
Maintainer :
Description : and script types for generation .
and script types for generation .
Module : ScriptExport.Types
Maintainer :
Description: Param and script types for... | null | https://raw.githubusercontent.com/Liqwid-Labs/liqwid-libs/8165d3a33daa5deb377db854b9c7b62aab9c2897/liqwid-script-export/src/ScriptExport/Types.hs | haskell | # LANGUAGE GADTs #
| Query data for getting script info.
@since 1.0.0
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| @since 1.0.0
| Run a query on Builders.
@since 1.0.0
| Possible data to request.
@since 2.0.0
| Handle `ServeElement` and retu... | # LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
|
Module : ScriptExport . Types
Maintainer :
Description : and script types for generation .
and script types for generation .
Module : ScriptExport.Types
Maintainer :
Description: Param and script types for generation.
Param and... |
c543baad22472caf1c76a8d2637204bad71ce5f467a8b38ed24a7e8b6249d0be | ninenines/gun | cookie_informational_h.erl | %% Feel free to use, reuse and abuse the code in this file.
-module(cookie_informational_h).
-export([init/2]).
init(Req0, State) ->
cowboy_req:inform(103, #{<<"set-cookie">> => [<<"informational=1">>]}, Req0),
Req = cowboy_req:reply(204, #{<<"set-cookie">> => [<<"final=1">>]}, Req0),
{ok, Req, State}.
| null | https://raw.githubusercontent.com/ninenines/gun/fe25965f3a2f1347529fec8c7afa981313378e31/test/handlers/cookie_informational_h.erl | erlang | Feel free to use, reuse and abuse the code in this file. |
-module(cookie_informational_h).
-export([init/2]).
init(Req0, State) ->
cowboy_req:inform(103, #{<<"set-cookie">> => [<<"informational=1">>]}, Req0),
Req = cowboy_req:reply(204, #{<<"set-cookie">> => [<<"final=1">>]}, Req0),
{ok, Req, State}.
|
2845c1e0f7238fffe8f9fe46e42369b249950c1da3b78b118cda32f459b8e266 | Beluga-lang/Beluga | prover.ml | open Support
open Beluga
open Syntax.Int
module E = Error
module Command = Syntax.Ext.Harpoon
module S = Substitution
module P = Pretty.Int.DefaultPrinter
module CompS = Store.Cid.Comp
let dprintf, _, dprnt = Debug.(makeFunctions' (toFlags [13]))
open Debug.Fmt
module Error = struct
type t =
| NoSuchVariable ... | null | https://raw.githubusercontent.com/Beluga-lang/Beluga/9bd52d07eece2de0b96ea8ddb7aaf48b40250068/src/harpoon/prover.ml | ocaml | * High-level elaboration from external to internal syntax.
* Elaborates a synthesizable expression in the given contexts.
(tau, theta);
* Elaborates a checkable expression in the given contexts against the given type.
* Elaborates a metavariable.
This is kind of sketchy since we don't parse a head, but rather
... | open Support
open Beluga
open Syntax.Int
module E = Error
module Command = Syntax.Ext.Harpoon
module S = Substitution
module P = Pretty.Int.DefaultPrinter
module CompS = Store.Cid.Comp
let dprintf, _, dprnt = Debug.(makeFunctions' (toFlags [13]))
open Debug.Fmt
module Error = struct
type t =
| NoSuchVariable ... |
d476f643aa0d715476c082d8d1f001724a40557efee5ed98736907583bde4f39 | hugoduncan/makejack | impl.clj | (ns makejack.deps-file.impl
(:require
[babashka.fs :as fs]
[rewrite-clj.node :as n]
[rewrite-clj.zip :as z]))
(defn kw=?
[kw]
(fn [z]
(when-let [node (z/node z)]
(and (= :token (n/tag node))
(= (str kw) (n/string node))))))
(defn string=?
[s]
(fn [z]
(when-let [node (z/node... | null | https://raw.githubusercontent.com/hugoduncan/makejack/a92d409233c46250f7c5a6b3e0a0aa6dd2211de6/components/deps-file/src/makejack/deps_file/impl.clj | clojure | (ns makejack.deps-file.impl
(:require
[babashka.fs :as fs]
[rewrite-clj.node :as n]
[rewrite-clj.zip :as z]))
(defn kw=?
[kw]
(fn [z]
(when-let [node (z/node z)]
(and (= :token (n/tag node))
(= (str kw) (n/string node))))))
(defn string=?
[s]
(fn [z]
(when-let [node (z/node... | |
2a1f88d66a29f6f12cb3cd410911c02d7a78764ea96eca988edd1b5a8ba6038c | MyDataFlow/ttalk-server | protobuffs_tests.erl | %%%-------------------------------------------------------------------
%%% File : protobuffs_tests.erl
Author : < >
%%% Description :
%%%
Created : 2 Aug 2010 by < >
%%%-------------------------------------------------------------------
-module(protobuffs_tests).
-compile(export_all).
-include("quick... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/protobuffs/test/protobuffs_tests.erl | erlang | -------------------------------------------------------------------
File : protobuffs_tests.erl
Description :
-------------------------------------------------------------------
--------------------------------------------------------------------
Encode/Decode int32
----------------------------------------------... | Author : < >
Created : 2 Aug 2010 by < >
-module(protobuffs_tests).
-compile(export_all).
-include("quickcheck_setup.hrl").
-include_lib("eunit/include/eunit.hrl").
-define(DECODE, protobuffs:decode).
-define(ENCODE(A,B,C), iolist_to_binary(protobuffs:encode(A,B,C))).
-define(DECODE_PACKED, protobuf... |
2211788e9629c286fdfe7a95a35cc92c127f779cdbb3b18122c6755e110ee0e8 | al3623/rippl | type_inference.ml | open Ast
open Tast
open Get_fresh_var
open Iast
open List
open Pretty_type_print
module SS = Set.Make(String);;
module SMap = Map.Make(String);;
module SubstMap = Map.Make(String);;
(* mappings from term variables to tforall *)
module TyEnvMap = Map.Make(String);;
(* returns a set of free type variables *)
let prin... | null | https://raw.githubusercontent.com/al3623/rippl/a7e5c24f67935b3513324148279791042856a1fa/src/passes/type_inference.ml | ocaml | mappings from term variables to tforall
returns a set of free type variables
removes element from typing environment
get elements of the map (not the keys),
and map ftv over them then make a new set with those ftvs
Collects tvars in a list; doesn't work for tforalls because we
* shouldn't need to call it on... | open Ast
open Tast
open Get_fresh_var
open Iast
open List
open Pretty_type_print
module SS = Set.Make(String);;
module SMap = Map.Make(String);;
module SubstMap = Map.Make(String);;
module TyEnvMap = Map.Make(String);;
let printEnv env =
print_string "[";
TyEnvMap.iter (fun key -> fun ty ->
print_string (key ^... |
138a89f4755519ddb0f25f56ee2ab4064302a9123cf7d8db1d4d34e3d6c71e4e | jeapostrophe/exp | gt5-events.rkt | #lang racket
(require net/url
racket/pretty
(planet neil/html-parsing/html-parsing)
(planet clements/sxml2))
(define (table-display l)
(define how-many-cols (length (first l)))
(define max-widths
(for/list ([col (in-range how-many-cols)])
(apply max (map (compose string-length ... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/gt5-events.rkt | racket | #lang racket
(require net/url
racket/pretty
(planet neil/html-parsing/html-parsing)
(planet clements/sxml2))
(define (table-display l)
(define how-many-cols (length (first l)))
(define max-widths
(for/list ([col (in-range how-many-cols)])
(apply max (map (compose string-length ... | |
674e353df5454cebcc1e458856f4a256813d3d0393f089d834e4262b419df1a0 | qrilka/xlsx | Formatted.hs | -- | Higher level interface for creating styled worksheets
{-# LANGUAGE CPP #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE DeriveGeneric #
module Codec.Xlsx.Formatted
( FormattedCell(..)
, Formatted(..)
, Format(..)
, formatted
, formatWorkbook
... | null | https://raw.githubusercontent.com/qrilka/xlsx/e6004bd4fb7f87c2c964e7bd7bd5da0a5e09836c/src/Codec/Xlsx/Formatted.hs | haskell | | Higher level interface for creating styled worksheets
# LANGUAGE CPP #
# LANGUAGE RankNTypes #
* Lenses
** Format
** FormattedCondFmt
------------------------------------------------------------------------------
Internal: formatting state
--------------------------------------------------------------... | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE DeriveGeneric #
module Codec.Xlsx.Formatted
( FormattedCell(..)
, Formatted(..)
, Format(..)
, formatted
, formatWorkbook
, toFormattedCells
, CondFormatted(..)
, conditionallyFormatted
, formatAlignment
, formatBorder
, formatFi... |
395021d9e07947e5f3a2678fd0c6ef334e8a06da6990e2e34a1ad4d866f552ed | Feuerlabs/kvdb | kvdb_leveldb.erl | %%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%%
Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved .
%%%
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one ... | null | https://raw.githubusercontent.com/Feuerlabs/kvdb/c8c71bf5422a8fa2e58c608c65629be7a58e27f3/src/kvdb_leveldb.erl | erlang | ---- BEGIN COPYRIGHT -------------------------------------------------------
---- END COPYRIGHT ---------------------------------------------------------
@hidden
@doc
@end
{OKey, Rest} = sext:decode_next(AKey),
Attr = sext:decode(Rest),
This is the hard part
the sext-encoded attribute name starts. We know wha... | Copyright ( C ) 2012 Feuerlabs , Inc. All rights reserved .
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
@author
@author < >
to
-module(kvdb_leveldb).
-behaviour(kvd... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.