_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
a5be4191f138869beb6899ecff0fbc07acf1aa4df2fb697f492923e1035fa48a
asivitz/Hickory
Text.hs
# LANGUAGE DerivingStrategies # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE OverloadedLabels # # LANGUAGE QuasiQuotes # module Hickory.Vulkan.Text where import Acquire.Acquire (Acquire) import Hickory.Vulkan.Monad (BufferedUniformMaterial, withBufferedUniformMaterial) import GHC.Generics (Ge...
null
https://raw.githubusercontent.com/asivitz/Hickory/081bffda9a5e9cd0df9dec83b88dfc015ced935f/core/Hickory/Vulkan/Text.hs
haskell
# LANGUAGE DeriveAnyClass # In pixels
# LANGUAGE DerivingStrategies # # LANGUAGE DeriveGeneric # # LANGUAGE OverloadedLabels # # LANGUAGE QuasiQuotes # module Hickory.Vulkan.Text where import Acquire.Acquire (Acquire) import Hickory.Vulkan.Monad (BufferedUniformMaterial, withBufferedUniformMaterial) import GHC.Generics (Generic) import Foreign.Storable.G...
9566d2c8e7cc3f0605bcc85efb82aa69e5d09c43443c3e6e9caa2e80e7ca296b
Mokosha/Lambency
Mesh.hs
module Lambency.Mesh ( Mesh(..), getMeshVertexTy, genNormalsV3, genNormalsTV3, genTexCoordsV3, genTexCoordsOV3, triangle, cube, plane, quad, ) where -------------------------------------------------------------------------------- import Lambency.Vertex #if __GLASGOW_HASKELL__ <= 708 import Co...
null
https://raw.githubusercontent.com/Mokosha/Lambency/43c58b62b9dc2c63b5f8c42248a6f7844093dac7/lib/Lambency/Mesh.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Back face Top face Bottom face Right face Left face Normals Texture Coordinates !FIXME! Actually properly generate texture coordinates... this is kind of...
module Lambency.Mesh ( Mesh(..), getMeshVertexTy, genNormalsV3, genNormalsTV3, genTexCoordsV3, genTexCoordsOV3, triangle, cube, plane, quad, ) where import Lambency.Vertex #if __GLASGOW_HASKELL__ <= 708 import Control.Applicative #endif import Data.Int import qualified Data.Map as Map impor...
d51202814dc7f7ef93e254b412efea90680f0136fa80bceca123742518120bdd
dpiponi/Moodler
nor.hs
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane and0 <- new' "nor" container162 <- container' "panel_nor.png" (x+(0.0), y+(0.0)) (Inside root) in57 <- plugin' (and0 ++ "." ++ "signal1") (x+(-60.0), y+(24.0)) (Outside container162) setColour in57 "#control"...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/nor.hs
haskell
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane and0 <- new' "nor" container162 <- container' "panel_nor.png" (x+(0.0), y+(0.0)) (Inside root) in57 <- plugin' (and0 ++ "." ++ "signal1") (x+(-60.0), y+(24.0)) (Outside container162) setColour in57 "#control"...
e68492298335ea7eb2b0fbbe75b7da9c937837ac35fb794d7c109bc16070726b
Abbath/Calculator
Payments.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeOperators #-} module Web.Telegram.API.Bot.API.Payments ( -- * Functions sendInvoiceM , answerShippingQueryM , answerPreCheckoutQueryM -- * API , TelegramBotPaymentsAPI , paymentsApi -- * Types ) where impor...
null
https://raw.githubusercontent.com/Abbath/Calculator/75985d5a9b4e602bc087462c8046bf2cf692a0e1/telegram-api-0.7.2.0/src/Web/Telegram/API/Bot/API/Payments.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators # * Functions * API * Types
# LANGUAGE DataKinds # module Web.Telegram.API.Bot.API.Payments sendInvoiceM , answerShippingQueryM , answerPreCheckoutQueryM , TelegramBotPaymentsAPI , paymentsApi ) where import Data.Proxy import Servant.API import Servant.Client import Web.Telegram.API...
0ca96e7b5eb2f0b56d0d7a8203dac9cd05e3602608ede77995f11d8109621cb0
immoh/swagger-spec
project.clj
(defproject swagger-spec "0.6.0-SNAPSHOT" :description "clojure.spec spec for Swagger definition" :url "-spec" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/spec.alpha "0.1.143"]] :plugins [[lein-cljsbuild "1.1.7"] [lein-doo "0.1.7"]] :profile...
null
https://raw.githubusercontent.com/immoh/swagger-spec/1fef8c106b07e7d7ad12fbda87ccd7d32b9f08d8/project.clj
clojure
(defproject swagger-spec "0.6.0-SNAPSHOT" :description "clojure.spec spec for Swagger definition" :url "-spec" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/spec.alpha "0.1.143"]] :plugins [[lein-cljsbuild "1.1.7"] [lein-doo "0.1.7"]] :profile...
59f6dc4c50f91ecf33e9d9e0926dc5de97d5b3809d674cc9d27e2c4093e1efe5
Plutonomicon/plutarch-plutus
AssocMap.hs
# LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # module Plutarch.Api.V1.AssocMap ( PMap (PMap), KeyGuarantees (Unsorted, Sorted), -- * Creation pempty, psingleton, psingletonData, pinsert, pinsertData, pdelete, pfromAscList, passertSorted, pforget...
null
https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/9b83892057f2aaaed76e3af6193ad1ae242244cc/Plutarch/Api/V1/AssocMap.hs
haskell
* Creation * Lookups * Folds * Filters and traversals * Combining * Partial order operations > PMap 'Sorted k v :--> PBool) > PBuiltinPair (PAsData k) (PAsData v)) | Tests whether the map is empty. > PBool) > v ) > ( PAsData v ) ) > PAsData k > PMap any k v : -- > v ) > ( PAsData v : -- > r ) : -- > PMap a...
# LANGUAGE FlexibleInstances # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -Wno - orphans # module Plutarch.Api.V1.AssocMap ( PMap (PMap), KeyGuarantees (Unsorted, Sorted), pempty, psingleton, psingletonData, pinsert, pinsertData, pdelete, pfromAscList, passertSorted, pforgetSorted, plook...
1ab1db87c7aa9b2cc957ac073bcf524b0fc03f2791f55361ebbeddb768d2bfbf
ocaml/dune
lib.ml
let x = 1
null
https://raw.githubusercontent.com/ocaml/dune/aa05250c5a8cfa1d59812910a56482ba4b75716e/test/blackbox-tests/test-cases/formatting/feature.t/disabled/lib.ml
ocaml
let x = 1
d585bf473074da13639368f0a115cabde68748bebb196120d65ab97c4bad72eb
ahrefs/devkit
memory_gperftools.ml
* Memory reporting for , call [ setup ] in every binary linked with open Devkit_core let show_crt_info () = let bytes = Action.bytes_string in let p x = try bytes @@ Gperftools.get_numeric_property x with _ -> "?" in Printf.sprintf "MALLOC: size %s, used %s, free %s" (p "generic.heap_size") (p "generic.cu...
null
https://raw.githubusercontent.com/ahrefs/devkit/559c2df8f6eacb091e0eac38f508c45b6567bdd8/memory_gperftools.ml
ocaml
* Memory reporting for , call [ setup ] in every binary linked with open Devkit_core let show_crt_info () = let bytes = Action.bytes_string in let p x = try bytes @@ Gperftools.get_numeric_property x with _ -> "?" in Printf.sprintf "MALLOC: size %s, used %s, free %s" (p "generic.heap_size") (p "generic.cu...
d807dd11802e81f7f573f8e2c274773fc7a7575748b53c63b1fc3713465d1479
PrecursorApp/precursor
id_wear_that.clj
(ns pc.views.blog.id-wear-that (:require [ring.middleware.anti-forgery :refer (wrap-anti-forgery)] [pc.http.urls :as urls] [pc.views.email :as email] [pc.profile :as profile] [pc.views.common :refer (cdn-path external-cdn-path)] [pc.views.blog.common :as com...
null
https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/src/pc/views/blog/id_wear_that.clj
clojure
(ns pc.views.blog.id-wear-that (:require [ring.middleware.anti-forgery :refer (wrap-anti-forgery)] [pc.http.urls :as urls] [pc.views.email :as email] [pc.profile :as profile] [pc.views.common :refer (cdn-path external-cdn-path)] [pc.views.blog.common :as com...
97b5f104b57fa378a7908dd92dbac1cce08be089d559ae15839c4c916108fb76
dimitaruzunov/fp-2018
nth.scm
(require rackunit rackunit/text-ui) (define (nth l n) (if (= n 0) (car l) (nth (cdr l) (- n 1)))) (define nth-tests (test-suite "Tests for nth" (check = (nth '(2) 0) 2) (check = (nth '(1 2) 0) 1) (check = (nth '(1 2) 1) 2) (check = (nth '(3 4 1) 0) 3) (check = (nth '(3 4 1) 1) 4) ...
null
https://raw.githubusercontent.com/dimitaruzunov/fp-2018/f75f0cd009cc7f41ce55a5ec71fb4b8eadafc4eb/exercises/04/nth.scm
scheme
(require rackunit rackunit/text-ui) (define (nth l n) (if (= n 0) (car l) (nth (cdr l) (- n 1)))) (define nth-tests (test-suite "Tests for nth" (check = (nth '(2) 0) 2) (check = (nth '(1 2) 0) 1) (check = (nth '(1 2) 1) 2) (check = (nth '(3 4 1) 0) 3) (check = (nth '(3 4 1) 1) 4) ...
c13197e669b914fd012406c79eee71bc662ae328329b57fdb33c841be9040a9b
freizl/dive-into-haskell
QuickCheckExe.hs
module QuickCheckExe where import Data.List import Data.Char import Test.QuickCheck genNat :: Gen Integer genNat = suchThat (chooseAny :: Gen Integer) (\x -> x > 0) genSmallNat :: Gen Int genSmallNat = elements [1 .. 5] half half :: Fractional a => a -> a half x = x / 2 prop_half :: Float -> Bool prop_half x = h...
null
https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/haskell-book/14/QuickCheckExe.hs
haskell
sort square addition sqrt :: Floating a => a -> a | doesn't hold TODO: how to write this?? prop_compose ::
module QuickCheckExe where import Data.List import Data.Char import Test.QuickCheck genNat :: Gen Integer genNat = suchThat (chooseAny :: Gen Integer) (\x -> x > 0) genSmallNat :: Gen Int genSmallNat = elements [1 .. 5] half half :: Fractional a => a -> a half x = x / 2 prop_half :: Float -> Bool prop_half x = h...
2a16c570eb7f26849c69b7b6451164553d50823026ec677f8de51333f98bcf37
ggreif/thebook-haskell
Rule.hs
{-# LANGUAGE FlexibleContexts #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} ----------------------------------------------------------------------------- -- | -- Module : Data.TheBook.Rule Copyright : ( c ) 2014 , License : MIT -- -- Maintainer : -- -- Wil...
null
https://raw.githubusercontent.com/ggreif/thebook-haskell/932e281fc00258af38dbc0585fdbebc2af70e4ed/src/Data/TheBook/Rule.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # --------------------------------------------------------------------------- | Module : Data.TheBook.Rule Maintainer : Will eventually contain some sort of rule engine implementation, for now let's try to come up with something. ------...
# LANGUAGE MultiParamTypeClasses # Copyright : ( c ) 2014 , License : MIT module Data.TheBook.Rule where import Control.Applicative (Applicative, (<$>), (<*>)) import Control.Lens (Getter, Lens', use, view) import Control.Lens.Getter (use, view) import ...
584e513762cdbf0226174306d9be2fd91343cb8bc1703088ba15db4e1d84dceb
viercc/kitchen-sink-hs
Hoard.hs
# LANGUAGE DeriveFunctor # module Hoard where import Data.Set (Set) import qualified Data.Set as Set import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map -- | A strange Applicative! -- -- @Hoard k v a@ basically behave like the applicative of functions @Map k v - > a@ , -- but you can specify a set...
null
https://raw.githubusercontent.com/viercc/kitchen-sink-hs/d334c4ec9b008d5d13cdede25c7e67286003b42d/experiment/src/Hoard.hs
haskell
| A strange Applicative! @Hoard k v a@ basically behave like the applicative of but you can specify a set of keys to hoard by a computation. When combining multiple computations, if a key is hoarded by non-hoarding computations. | Just looks up a key | Looks up a key and hoard it >>> run = flip runHoard dic...
# LANGUAGE DeriveFunctor # module Hoard where import Data.Set (Set) import qualified Data.Set as Set import Data.Map.Strict (Map) import qualified Data.Map.Strict as Map functions @Map k v - > a@ , one or more computations , that key is removed from maps passed to data Hoard k v a = Hoard (Set k) (Map k v -> a) ...
4be34b1fded97b4f765accc2d0661e8745ee19da18d04cb55250a7941b926976
tezos/tezos-mirror
scenario.mli
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Marigold < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/2487e7efa819e67b289deb84f73f04499de54e5d/src/lib_scoru_wasm/bench/scenario.mli
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Marigold < > 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 I...
1b1f1c53203aa72004e31ff933ce0a3c2e536232094132cc9e6e9e73fabd64e6
javalib-team/sawja
jCRA.mli
* This file is part of SAWJA * Copyright ( c)2007 ( Université de Rennes 1 ) * Copyright ( c)2007 , 2008 , 2009 ( CNRS ) * Copyright ( c)2009 ( INRIA ) * * This program is free software : you can redistribute it and/or * modify it under the terms of the GNU General Public License * as publ...
null
https://raw.githubusercontent.com/javalib-team/sawja/da39f9c1c4fc52a1a1a6350be0e39789812b6c00/src/jCRA.mli
ocaml
* This exception is raised if a needed class is not found in the classpath while parsing the program. * [parse_program other_classes cp names] parses a list of classes [names] as entrypoints, looking for them in the classpath [cp] (a list of directories and [.jar] or [.zip] files separated with ':' or ';' und...
* This file is part of SAWJA * Copyright ( c)2007 ( Université de Rennes 1 ) * Copyright ( c)2007 , 2008 , 2009 ( CNRS ) * Copyright ( c)2009 ( INRIA ) * * This program is free software : you can redistribute it and/or * modify it under the terms of the GNU General Public License * as publ...
9906890e258fb51dadf745a89a9ad4006f27cff86ab8665e45e0986edd2ce6e7
khibino/haskell-relational-record
Transaction.hs
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances , DeriveGeneric , DataKinds # module Transaction where import Database.Relational (Relation) import Database.Record.TH.SQLite3 (defineTable) $(defineTable "examples.db" "transaction0") type Transaction = Transaction0 transaction :: Relation () ...
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-record-examples/entity/Transaction.hs
haskell
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances , DeriveGeneric , DataKinds # module Transaction where import Database.Relational (Relation) import Database.Record.TH.SQLite3 (defineTable) $(defineTable "examples.db" "transaction0") type Transaction = Transaction0 transaction :: Relation () ...
c3e3adb34bfb4db6b3711cfff53d5afbd0d081ff1173887286ec8f6c5e6f3df7
postspectacular/devart-codefactory
app.cljs
(ns codefactory.app (:require-macros [cljs.core.async.macros :refer [go]]) (:require [codefactory.config :as config] [codefactory.common :as common] [codefactory.nav :as nav] [codefactory.home :as home] [codefactory.gallery :as gallery] [codefactory.gallery.object-info :as ginfo] [codefactor...
null
https://raw.githubusercontent.com/postspectacular/devart-codefactory/9bccdc10e58fa4861a69767e9ae4be0bb8d7f650/src-cljs/codefactory/app.cljs
clojure
false
(ns codefactory.app (:require-macros [cljs.core.async.macros :refer [go]]) (:require [codefactory.config :as config] [codefactory.common :as common] [codefactory.nav :as nav] [codefactory.home :as home] [codefactory.gallery :as gallery] [codefactory.gallery.object-info :as ginfo] [codefactor...
5ebcae2b2ea760a12c9009284c85be84731947200a11297ce7a7c34c7dbbc362
xively/clj-mqtt
test_client.clj
(ns mqtt.test-client (:require [clojure.core.async :as async] [mqtt.codec :as codec]) (:import [com.xively.netty Netty] [io.netty.bootstrap Bootstrap] [io.netty.channel Channel SimpleChannelInboundHandler ChannelInitializer ChannelHandler ChannelHandlerContext ChannelFuture Channel...
null
https://raw.githubusercontent.com/xively/clj-mqtt/74964112505da717ea88279b62f239146450528c/src/mqtt/test_client.clj
clojure
TODO modulus Short/MAX_VALUE
(ns mqtt.test-client (:require [clojure.core.async :as async] [mqtt.codec :as codec]) (:import [com.xively.netty Netty] [io.netty.bootstrap Bootstrap] [io.netty.channel Channel SimpleChannelInboundHandler ChannelInitializer ChannelHandler ChannelHandlerContext ChannelFuture Channel...
f74ae63c51a41d5603cf9eedaf847d273f30f90afa3123092842cc5c6d50ecf9
relaypro-open/imetrics
imetrics_sup.erl
-module(imetrics_sup). -behaviour(supervisor). %% API -export([start_link/0, slo_info/0, register_slo/2]). %% Supervisor callbacks -export([init/1]). %% =================================================================== %% API functions %% =================================================================== start_...
null
https://raw.githubusercontent.com/relaypro-open/imetrics/a6b53675fe388e73b30dbb67a10100be31035511/src/imetrics_sup.erl
erlang
API Supervisor callbacks =================================================================== API functions =================================================================== =================================================================== Supervisor callbacks ================================================...
-module(imetrics_sup). -behaviour(supervisor). -export([start_link/0, slo_info/0, register_slo/2]). -export([init/1]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). init([]) -> SupFlags = #{strategy => one_for_one, intensity => 1, period => 5}, EtsOwner = #{id => imetrics_ets_...
b8b949531671f2aa16e1513cb47834dd89191fddc3c18f9f6efee6593c6f8531
pol-is/polisMath
runner.clj
Copyright ( C ) 2012 - present , The Authors . This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . This program is distributed in the hope that it will be useful , but WITHOUT A...
null
https://raw.githubusercontent.com/pol-is/polisMath/dfe233e8c9207c2ce11e1379286ad0cf0f732067/src/polismath/runner.clj
clojure
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU Affero General Public License for more details . You should have received a copy of the GNU Affero General Public License along with this program . If not , see < / > . [polismath.stormspec :as stormspec :refer [...
(ns polismath.runner "This namespace is responsible for running systems" (:refer-clojure :exclude [run!]) (:require [polismath.system :as system] [polismath.utils :as utils] TODO Replace this with the canonical clojure.tools.cli once storm is removed [clojure.tools.cli :as cli] ...
791f8bf4fdbe27f6565455601ff1754ba8b7db1a37e35f15c4fec8b1641bed5e
michiakig/LispInSmallPieces
chap1.scm
(load "book.scm") (load "../src/tester.scm") (load "../src/chap1.scm") (test-scheme1 "../src/chap1.tst")
null
https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/racket/chap1.scm
scheme
(load "book.scm") (load "../src/tester.scm") (load "../src/chap1.scm") (test-scheme1 "../src/chap1.tst")
f75e62f1cc1c5b07a51c322f3401dc194bee65a39ffc808408593bf501ab5b8d
Mikolaj/horde-ad
ExtremelyLongTestSimplified.hs
module Main (main) where import Prelude import Data.Proxy import qualified System.IO as SIO import Test.Tasty import Test.Tasty.Options import Test.Tasty.Runners import qualified TestConditionalSynth import qualified TestDescentSimple import qualified TestGradientSimple import...
null
https://raw.githubusercontent.com/Mikolaj/horde-ad/9184e40314779f011a27f23b79a75460ffff4d52/test/ExtremelyLongTestSimplified.hs
haskell
import qualified TestMnistCNN import qualified TestMnistFCNN import qualified TestMnistRNN Limit interleaving of characters in parallel tests. ++ TestGradient.testTrees ++ TestDescent.testTrees ++ TestMnistFCNN.testTrees ++ TestMnistRNN.testTrees ++ TestMnistCNN.testTrees
module Main (main) where import Prelude import Data.Proxy import qualified System.IO as SIO import Test.Tasty import Test.Tasty.Options import Test.Tasty.Runners import qualified TestConditionalSynth import qualified TestDescentSimple import qualified TestGradientSimple import...
1e0869911434f91c76c1090887ed1c332a63ec5ac470597f8c6966f5545eb329
zachallaun/datomic-cljs
project.clj
(defproject com.zachallaun/datomic-cljs "0.0.1-alpha-1" :description "Datomic REST client for ClojureScript" :url "-cljs" :license {:name "MIT" :url ""} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/clojurescript "0.0-2069"] [org.clojure/core.async "0.1.256.0-1bf8c...
null
https://raw.githubusercontent.com/zachallaun/datomic-cljs/a2accf1d999b7d6a554a9322f52b230eae1b58b3/project.clj
clojure
(defproject com.zachallaun/datomic-cljs "0.0.1-alpha-1" :description "Datomic REST client for ClojureScript" :url "-cljs" :license {:name "MIT" :url ""} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/clojurescript "0.0-2069"] [org.clojure/core.async "0.1.256.0-1bf8c...
da36cc380e784c66b89b438522dd687993a106fdf0afd79b436be3bf78528be4
s-expressionists/Eclector
labeled-objects.lisp
(cl:in-package #:eclector.concrete-syntax-tree) Fixup (defmethod eclector.reader:fixup ((client cst-client) (object cst:atom-cst) seen-objects) (declare (ignore seen-objects))) (defmethod eclector.reader:fixup ((client cst-client) ...
null
https://raw.githubusercontent.com/s-expressionists/Eclector/acd141db4efdbd88d57a8fe4f258ffc18cc47baa/code/concrete-syntax-tree/labeled-objects.lisp
lisp
Determine the labeled object state of the raw value of the CST stored in PLACE. For a finalized labeled object, create a "reference" CST object (which may just be the parse result for the circular object, depending on the client) and replace the value of PLACE with that reference CST object. not a labeled object...
(cl:in-package #:eclector.concrete-syntax-tree) Fixup (defmethod eclector.reader:fixup ((client cst-client) (object cst:atom-cst) seen-objects) (declare (ignore seen-objects))) (defmethod eclector.reader:fixup ((client cst-client) ...
b77ff16e53a07979d8671da3af9ea2946f8148c3c0fe0c0311a41e428c48bedc
bhaskara/programmable-reinforcement-learning
calisp-subroutine.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; calisp/calisp-subroutine.lisp ;; code relating to concurrent alisp subroutines ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package calisp) (defun lookup-calisp-subroutine (fn-name) "lookup-calisp-subroutine FN-NAME. Retu...
null
https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/concurrent-alisp/calisp-subroutine.lisp
lisp
calisp/calisp-subroutine.lisp code relating to concurrent alisp subroutines
(in-package calisp) (defun lookup-calisp-subroutine (fn-name) "lookup-calisp-subroutine FN-NAME. Returns list of param names for FN-NAME." (multiple-value-bind (val pres) (gethash fn-name *calisp-subroutine-description-table*) (assert pres nil "Subroutine ~a not found in table" fn-name) v...
095b993cf6f61eacb697443a090ddda72b0acef50fbd03bcca671dbbbad7855d
iijlab/direct-hs
Exception.hs
{-# LANGUAGE OverloadedStrings #-} module Web.Direct.Exception ( Exception(..) , callRpc , callRpcThrow ) where import Control.Error (fmapL) import qualified Control.Exception as E import qualified Data.MessagePack as...
null
https://raw.githubusercontent.com/iijlab/direct-hs/2422fd6fe008109e8dfb74f31d65b0d5a0330788/direct-hs/src/Web/Direct/Exception.hs
haskell
# LANGUAGE OverloadedStrings #
module Web.Direct.Exception ( Exception(..) , callRpc , callRpcThrow ) where import Control.Error (fmapL) import qualified Control.Exception as E import qualified Data.MessagePack as M import qualified Data.MessagePac...
efc38f4031dddd2a995d2d9c43bc1e9bc3f4986d5a45344e041f1f35ce52c76c
racket/typed-racket
check-below-tests.rkt
#lang racket/base (require "test-utils.rkt" rackunit racket/list racket/match racket/format syntax/srcloc syntax/location typed-racket/types/abbrev typed-racket/types/tc-result typed-racket/utils/tc-utils typed-racket/rep/prop-rep typed-racket/rep/object-r...
null
https://raw.githubusercontent.com/racket/typed-racket/6ea20bec8d41e1a188d7f831c35423293a89c98e/typed-racket-test/unit-tests/check-below-tests.rkt
racket
Bottom is not below everything if the number of values doesn't match up. Enable these once check-below is fixed Currently does not fail Currently does not fail Currently does not fail
#lang racket/base (require "test-utils.rkt" rackunit racket/list racket/match racket/format syntax/srcloc syntax/location typed-racket/types/abbrev typed-racket/types/tc-result typed-racket/utils/tc-utils typed-racket/rep/prop-rep typed-racket/rep/object-r...
bb62b82dbd96fcf74d7374a336dc0b928df43d330918c55d890abcae9770f5f5
gusenov/stepik-functional-programming-hs
Demo.hs
Реализуйте функцию nTimes , , состоящий из повторяющихся значений ее первого аргумента . Количество повторов определяется значением второго функции . GHCi > nTimes 42 3 [ 42,42,42 ] GHCi > nTimes ' z ' 5 " zzzzz " Реализуйте функцию nTimes, которая возвращает список, состоящий из повторяющихся знач...
null
https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/NTimes/Demo.hs
haskell
Реализуйте функцию nTimes , , состоящий из повторяющихся значений ее первого аргумента . Количество повторов определяется значением второго функции . GHCi > nTimes 42 3 [ 42,42,42 ] GHCi > nTimes ' z ' 5 " zzzzz " Реализуйте функцию nTimes, которая возвращает список, состоящий из повторяющихся знач...
3277d7cd36b2cd6726a41595f8c7dd0c5859b48b2666280e6e43b04f266ccbba
lopec/LoPEC
web_info.erl
-module (web_info). -include_lib ("nitrogen/include/wf.inc"). -compile(export_all). main() -> common_web:main(). title() -> common_web:title(). footer() -> common_web:footer(). get_info() -> common_web:get_info(). % Creates the menu. menu() -> common_web:menu(). % Creates the submenu. ...
null
https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/trunk/lib/master/src/pages/web_info.erl
erlang
Creates the menu. Creates the submenu.
-module (web_info). -include_lib ("nitrogen/include/wf.inc"). -compile(export_all). main() -> common_web:main(). title() -> common_web:title(). footer() -> common_web:footer(). get_info() -> common_web:get_info(). menu() -> common_web:menu(). submenu() -> common_web:submenu(). body() -> ...
9b47cc342bed2ca4f490e7bd011cf5c44aa1bce739adbdfa55905ce0c2b11948
scalaris-team/scalaris
gossip_cyclon.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 2008 - 2014 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Un...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/gossip_cyclon.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language go...
2008 - 2014 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > @author < > @doc Gossip based membership management using CYCLON . , , . CYCLON : Inexpensive Me...
086656e932991cb31ec5e4ea7cae8218611d91059d82d66de47d0943ad5b043f
ruricolist/cl-murmurhash
cl-murmurhash.lisp
;;;; cl-murmurhash.lisp (in-package #:cl-murmurhash) (eval-when (:compile-toplevel :load-toplevel) (deftype octet () '(unsigned-byte 8)) (deftype u32 () '(unsigned-byte 32)) (deftype octet-vector (&optional n) `(simple-array (unsigned-byte 8) (,n)))) (deftype -> (args result) `(function ,args ,result)) ...
null
https://raw.githubusercontent.com/ruricolist/cl-murmurhash/5433f5e95f1cce63a81259a471150834c6a59364/cl-murmurhash.lisp
lisp
cl-murmurhash.lisp It had to be something. N.B. * and + are shadowed. The actual implementation. /~michaelw/log/programming/lisp/icfp-contest-2006-vm Methods to hash literal objects. HACK Other methods are special cases of integers, strings, or octets. Presume little-endian. Improper list. Derived utilities....
(in-package #:cl-murmurhash) (eval-when (:compile-toplevel :load-toplevel) (deftype octet () '(unsigned-byte 8)) (deftype u32 () '(unsigned-byte 32)) (deftype octet-vector (&optional n) `(simple-array (unsigned-byte 8) (,n)))) (deftype -> (args result) `(function ,args ,result)) (deftype index () '(int...
8e6295426dba01950b5ba5776cd242f384bade5888582295220368403325ff79
workframers/duff
project.clj
(defproject com.workframe/duff "0.2.1-SNAPSHOT" :description "Form state management for re-frame" :url "-forms" :license {:name "Apache License, Version 2.0" :url "-2.0"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.10.339"] [thheller/sha...
null
https://raw.githubusercontent.com/workframers/duff/d3acd27c9ccdbbad7bd0923e6013bb2d60ad20b5/project.clj
clojure
(defproject com.workframe/duff "0.2.1-SNAPSHOT" :description "Form state management for re-frame" :url "-forms" :license {:name "Apache License, Version 2.0" :url "-2.0"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.10.339"] [thheller/sha...
016e3a76c09e952338aa513df8ed42dd5a0ecb84373f914f39c09dd7016d5caa
roburio/builder-web
m20210602.ml
let old_version = 4L and new_version = 5L let identifier = "2021-06-02" let migrate_doc = "build.main_binary foreign key" let rollback_doc = "build.main_binary filepath" open Grej.Infix let idx_build_job_start = Caqti_type.unit ->. Caqti_type.unit @@ "CREATE INDEX idx_build_job_start ON build(job, start_d DESC, s...
null
https://raw.githubusercontent.com/roburio/builder-web/a85be8730cece0bd78df580fb7d48aff94e060d2/bin/migrations/m20210602.ml
ocaml
let old_version = 4L and new_version = 5L let identifier = "2021-06-02" let migrate_doc = "build.main_binary foreign key" let rollback_doc = "build.main_binary filepath" open Grej.Infix let idx_build_job_start = Caqti_type.unit ->. Caqti_type.unit @@ "CREATE INDEX idx_build_job_start ON build(job, start_d DESC, s...
dcfab559308538a58f64fb2ad365e53c9211ded7561e03cb079c572bbd28ab0a
ix/lazyboy
Prelude.hs
| Module : Lazyboy . Prelude Description : Convenience aliases for Lazyboy which share names with 's Prelude . Copyright : ( c ) Rose 2019 License : BSD3 Maintainer : Stability : experimental Portability : POSIX This module defines aliases for Lazybo...
null
https://raw.githubusercontent.com/ix/lazyboy/83838f5e36906fe0262e9d53e6e692796f214e6b/src/Lazyboy/Prelude.hs
haskell
| Module : Lazyboy . Prelude Description : Convenience aliases for Lazyboy which share names with 's Prelude . Copyright : ( c ) Rose 2019 License : BSD3 Maintainer : Stability : experimental Portability : POSIX This module defines aliases for Lazybo...
88f880f1563b5dd22d156cc2bb72ec79c073e49e1fbfc2d437006edcfc957c9d
mu-chaco/ReWire
Purify.hs
# LANGUAGE FlexibleContexts , OverloadedStrings # # LANGUAGE Trustworthy # module ReWire.Crust.Purify (purify) where import safe ReWire.Annotation import safe ReWire.Unbound (Fresh (..), s2n, n2s) import safe ReWire.Error import safe ReWire.Crust.Syntax import safe ReWire.Pretty import safe Control.Arrow (first, sec...
null
https://raw.githubusercontent.com/mu-chaco/ReWire/b04686a4cd6cb36ca9976a4b6c42bc195ce69462/src/ReWire/Crust/Purify.hs
haskell
TODO(chathhorn): what if we retype extrude and unfold (et al.?) with concrete types and re-run type inference? Much of the muck here is just calculating types that could be inferred. TODO(chathhorn): perhaps move to a type-checking phase? | In addition to all the above, we re-tie the recursive knot by adding a new...
# LANGUAGE FlexibleContexts , OverloadedStrings # # LANGUAGE Trustworthy # module ReWire.Crust.Purify (purify) where import safe ReWire.Annotation import safe ReWire.Unbound (Fresh (..), s2n, n2s) import safe ReWire.Error import safe ReWire.Crust.Syntax import safe ReWire.Pretty import safe Control.Arrow (first, sec...
2e55841ebeed82a58d93445ab03fdf4f2d706537349a0ce4345158a94a1de1ea
markcox80/template-function
name-mangling.lisp
(in-package "TEMPLATE-FUNCTION") (defvar *type-name-pairs* nil "A list of (type . name) pairs.") (defun type-name-pair-type (pair) (car pair)) (defun type-name-pair-name (pair) (cdr pair)) (defun (setf type-name-pair-name) (value pair) (setf (cdr pair) value)) (defun order-types-by-decreasing-specificity (...
null
https://raw.githubusercontent.com/markcox80/template-function/bb1f1f2582a224c84a177058a9a64558326f35e7/src/name-mangling.lisp
lisp
Defining type name pairs
(in-package "TEMPLATE-FUNCTION") (defvar *type-name-pairs* nil "A list of (type . name) pairs.") (defun type-name-pair-type (pair) (car pair)) (defun type-name-pair-name (pair) (cdr pair)) (defun (setf type-name-pair-name) (value pair) (setf (cdr pair) value)) (defun order-types-by-decreasing-specificity (...
f820a2dbfdd10ac2a37de4ddc680d4449d37d4d5787dd4afb08558b1d506e969
ucsd-progsys/liquid-fixpoint
Arbitrary.hs
# LANGUAGE DeriveGeneric # # LANGUAGE TupleSections # # OPTIONS_GHC -Wno - orphans # {-# OPTIONS_GHC -Wno-name-shadowing #-} module Arbitrary ( subexprs , Env(..) , NoAnfEnv(..) , AnfSymbol(..) , FlatAnfEnv(..) , ChainedAnfEnv(..) ) where import qualified Data.Text as Text import qualif...
null
https://raw.githubusercontent.com/ucsd-progsys/liquid-fixpoint/84306ba94040a4b2a5ce2816a075f29746ec4e46/tests/tasty/Arbitrary.hs
haskell
# OPTIONS_GHC -Wno-name-shadowing # An example of how the Arbitrary Expr instance can be used . Note that ` expr = = rr ( showpp expr ) ` is * not * something we expect to hold . See -progsys/liquid-fixpoint/issues/46 An example of how the Arbitrary Expr instance can be used. Note that `expr == rr (showpp expr)...
# LANGUAGE DeriveGeneric # # LANGUAGE TupleSections # # OPTIONS_GHC -Wno - orphans # module Arbitrary ( subexprs , Env(..) , NoAnfEnv(..) , AnfSymbol(..) , FlatAnfEnv(..) , ChainedAnfEnv(..) ) where import qualified Data.Text as Text import qualified Data.HashMap.Strict as M impor...
05a96ee1e3eab7e87e87fd92c3dfad1b3d45034decb262e4e9205f05d2713713
tmattio/tyxml-components
component.mli
val make : title:string -> code:string -> [< Html_types.div_content_fun ] Incr_dom.Tyxml.Html.elt -> [> Html_types.div ] Incr_dom.Tyxml.Html.elt
null
https://raw.githubusercontent.com/tmattio/tyxml-components/57603f51ba81bb786a8364eaf9957d65743fd591/lib/tyxml_stories/component.mli
ocaml
val make : title:string -> code:string -> [< Html_types.div_content_fun ] Incr_dom.Tyxml.Html.elt -> [> Html_types.div ] Incr_dom.Tyxml.Html.elt
7b4ec75a40fbf94725939a8c93b7408430952854d49b53f42dc5e7f29d0aff45
tty/async_search
document_ser.erl
%%%------------------------------------------------------------------- @author < > Copyright ( c ) 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 restric...
null
https://raw.githubusercontent.com/tty/async_search/deaf29fc504c6d24acd5a11577628c54c4615558/src/document_ser.erl
erlang
------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyrigh...
@author < > Copyright ( c ) 2011 " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to included in all copies or substantial portions of...
a49add436a0b6f0ab68c4812952c4da48b6078ef2846d49a9ebd6a2794db75bd
cnuernber/dtype-next
object_pool.clj
(ns tech.v3.datatype.object-pool "Simple threadsafe object pool." (:require [tech.v3.datatype.errors :as errors]) (:import [java.util.concurrent ArrayBlockingQueue])) (set! *warn-on-reflection* true) (defprotocol PPool (take! [pool timeout] "Take an object from the pool. Blocks until objects are availa...
null
https://raw.githubusercontent.com/cnuernber/dtype-next/4e43212942aafa0145640cf6b655bb83855f567d/src/tech/v3/datatype/object_pool.clj
clojure
(ns tech.v3.datatype.object-pool "Simple threadsafe object pool." (:require [tech.v3.datatype.errors :as errors]) (:import [java.util.concurrent ArrayBlockingQueue])) (set! *warn-on-reflection* true) (defprotocol PPool (take! [pool timeout] timeout is in milliseconds and if nil or <= 0 blocks forever. Retu...
a80ca2ffac1abd3eef8ea0dc7f229a62edfdd78b8c47565c7bfc75de9262334a
ocsigen/tyxml
namespace.ml
TyXML * * Copyright ( C ) 2016 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your op...
null
https://raw.githubusercontent.com/ocsigen/tyxml/8551b673857fdc1defebe7c502ffcb920f04009e/syntax/namespace.ml
ocaml
TyXML * * Copyright ( C ) 2016 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your op...
5a64748dbc0ad55b68c07d04e4464cf33c90889d6c2e3ebc6e8aa0fe021b2d32
bhaskara/programmable-reinforcement-learning
gameinfo.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; gameinfo.lisp ;; defines the structure that holds the parameters of the game ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defpackage gameinfo (:export...
null
https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/envs/stratagus/gameinfo.lisp
lisp
gameinfo.lisp defines the structure that holds the parameters of the game
(defpackage gameinfo (:export gameinfo gameinfo-player-id gameinfo-length gameinfo-width make-gameinfo)) (in-package gameinfo) (defstruct gameinfo player-id length width) (in-package cl-user)
7bb510bbdf13d29c22c20bef7852f230faff3736ac3e9d9dd414814c9671cb63
simonmichael/hledger
Rewrite.hs
{-# LANGUAGE DeriveTraversable #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # {-# LANGUAGE ViewPatterns #-} module Hledger.Cli.Commands.Rewrite ( rewritemode ,rewrite ) where import Data.Functor.Identity import Data.List (sortOn, foldl') import Data.Text...
null
https://raw.githubusercontent.com/simonmichael/hledger/b46cb8a7f77df569373d0b2b12bba5e97eff76c7/hledger/Hledger/Cli/Commands/Rewrite.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # # LANGUAGE ViewPatterns # rewrite matched transactions PARTIAL: run the print command, showing all transactions, or show diffs add - posting flags provided on the command line, or throw a parse error. PARTIAL: inject space and newline for proper p...
# LANGUAGE LambdaCase # # LANGUAGE TemplateHaskell # module Hledger.Cli.Commands.Rewrite ( rewritemode ,rewrite ) where import Data.Functor.Identity import Data.List (sortOn, foldl') import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.IO as T import Hledger import Hledger....
3629884267c322733f6e9763e395b7d09257149fd1598ad549ef622eb5ec44e0
SquidDev/illuaminate
summary.mli
open IlluaminateSemantics.Doc open Syntax (** An item in the index of documented terms. *) type t = { name : string; full_name : string; summary : string option; source : string option; in_module : IlluaminateSemantics.Namespace.Ref.t; name_of : IlluaminateSemantics.Reference.name_of } (** Con...
null
https://raw.githubusercontent.com/SquidDev/illuaminate/9e9a4722cb88b473cc5e337491d66760b5202148/src/doc_emit/summary.mli
ocaml
* An item in the index of documented terms. * Convert a list of index items into a JSON index. * Convert a list of documented modules into a flat list of index terms.
open IlluaminateSemantics.Doc open Syntax type t = { name : string; full_name : string; summary : string option; source : string option; in_module : IlluaminateSemantics.Namespace.Ref.t; name_of : IlluaminateSemantics.Reference.name_of } val to_json : t Map.Make(String).t -> Yojson.Safe.t val...
c2b3f65172cb2d660e481eea440f4204ed617b556b066194c4084cbd170208e4
cardmagic/lucash
prim-io.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; I/O primitives ; See doc/io.txt for a description of Scheme 48's I/O system. ; Argument specs (define open-input-port-> (input-type (lambda (x) (and (port? x) (port-has-status? x (enum port-status-options open-for-input)))) ...
null
https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scheme/vm/prim-io.scm
scheme
I/O primitives See doc/io.txt for a description of Scheme 48's I/O system. Argument specs Check SPEC type and then call OPEN-CHANNEL. FETCH-STRING here avoids a type warning in the C code, but is not really the right thing. note that we're waiting keep the result pending for a moment WAIT? is ignored when writ...
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (define open-input-port-> (input-type (lambda (x) (and (port? x) (port-has-status? x (enum port-status-options open-for-input)))) no-coercion)) (define open-output-port-> (input-type (lambda (x) (and (port? x) (p...
e9c31e08aa1115d722d904102e10bb47dc5f39edd7e50e7db53185b97349726a
snape/Loopless-Functional-Algorithms
LazyQueue.hs
This file is part of " Loopless Functional Algorithms " . -- SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory SPDX - License - Identifier : Apache-2.0 -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the Lic...
null
https://raw.githubusercontent.com/snape/Loopless-Functional-Algorithms/b96759a40fcdfad10734071776936514ace4dfa1/LazyQueue.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
This file is part of " Loopless Functional Algorithms " . SPDX - FileCopyrightText : 2005 , Oxford University Computing Laboratory SPDX - License - Identifier : Apache-2.0 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS...
5b70b8bd3efd1c18a94dc36f8efd3828076e57038ee6ff77a51887a6146f2c5c
MichaelBurge/yxdb-utils
Cydb2csv.hs
# LANGUAGE TemplateHaskell , OverloadedStrings # import Database.Alteryx import Control.Lens import Control.Monad.Trans.Resource import Data.Text import Data.Conduit import System.Console.GetOpt (getOpt) import System.Environment import System.IO data Settings = Settings { _settingFilename :: T.Text } deri...
null
https://raw.githubusercontent.com/MichaelBurge/yxdb-utils/955995a95cf56b7cb3c45e0175e2b574411d1a18/src/Database/Alteryx/CLI/Cydb2csv.hs
haskell
# LANGUAGE TemplateHaskell , OverloadedStrings # import Database.Alteryx import Control.Lens import Control.Monad.Trans.Resource import Data.Text import Data.Conduit import System.Console.GetOpt (getOpt) import System.Environment import System.IO data Settings = Settings { _settingFilename :: T.Text } deri...
3415c1ed41cdfda1cf103ff2f57da23ebfb0dd69b086bea7aef84616a3af9668
robindar/compil-petitrust
typer.ml
open Ast open Typed_ast exception Typing_error of location * string module Env = Map.Make(String) let empty_env = (Env.empty, Env.empty, Env.empty) let var_type (env, _, _) i = fst (Env.find i env) let is_mut (env, _, _) i = snd (Env.find i env) let is_fun (_, env, _) f = Env.mem f env let fun_type (_, env, _) f = ...
null
https://raw.githubusercontent.com/robindar/compil-petitrust/c28ae0df678860613f630b8e09bffabd7aa02c0e/typer.ml
ocaml
open Ast open Typed_ast exception Typing_error of location * string module Env = Map.Make(String) let empty_env = (Env.empty, Env.empty, Env.empty) let var_type (env, _, _) i = fst (Env.find i env) let is_mut (env, _, _) i = snd (Env.find i env) let is_fun (_, env, _) f = Env.mem f env let fun_type (_, env, _) f = ...
b055f4d6454d2b229fc0ade968367e4304505b8fec731e7836a230f4f5708ea5
byulparan/cl-collider
MCLDUGens.lisp
(in-package #:cl-collider) ;; ================================================================================ ;; MCLDOscUGens ;; ================================================================================ (defugen (saw-dpw "SawDPW") (&optional (freq 440.0) (iphase 0.0) (mul 1.0) (add 0.0)) ((:ar (madd (m...
null
https://raw.githubusercontent.com/byulparan/cl-collider/ddd2f898a0fa35a2417302b27170517e24c806bd/ugens/SC3plugins/MCLDUGens.lisp
lisp
================================================================================ MCLDOscUGens ================================================================================ ================================================================================ ===========================================================...
(in-package #:cl-collider) (defugen (saw-dpw "SawDPW") (&optional (freq 440.0) (iphase 0.0) (mul 1.0) (add 0.0)) ((:ar (madd (multinew new 'ugen freq iphase) mul add)) (:kr (madd (multinew new 'ugen freq iphase) mul add)))) from MCLDUgens (buffer track-bufnum &optional (relax-time 2.0) (floor 0...
a69b3c433ed8d6c178e587eea01a88f9461acb6345bb02c7f1b2ed1f7d2cef1e
sboehler/beans
Balance.hs
module Beans.Balance ( Balance (Balance), book, eraseLots, inPercent, new, diff, ) where import Beans.Account (Account) import qualified Beans.Account as Account import Beans.Commodity (Commodity) import Beans.Date (Date) import Beans.Filter (AccountFilter) import Beans.Position (Position (..))...
null
https://raw.githubusercontent.com/sboehler/beans/897fc30a602f49906eb952c4fd5c8c0bf05a6beb/src/Beans/Balance.hs
haskell
module Beans.Balance ( Balance (Balance), book, eraseLots, inPercent, new, diff, ) where import Beans.Account (Account) import qualified Beans.Account as Account import Beans.Commodity (Commodity) import Beans.Date (Date) import Beans.Filter (AccountFilter) import Beans.Position (Position (..))...
2ab90f6d71378e8fc775e984e74492c2b8a12e69072213b15998ae1392f3ff7a
TristeFigure/shuriken
monkey_patch.clj
(ns shuriken.monkey-patch "### Tools to monkey-patch Clojure and Java code" (:use clojure.pprint) (:require [clojure.spec.alpha :as s] [clojure.repl :refer [source-fn]] [com.palletops.ns-reload :as nsdeps] [shuriken.byte-buddy :refer [->byte-buddy ...
null
https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/src/shuriken/monkey_patch.clj
clojure
TODO: remove prints bar prints nothing prints bar prints bar (-> (javassist.ClassPool/getDefault) (.getAndRename class-name new-name))) (eval `(fn [& args] (def original-method (memoize (fn [method-signature] (let [[class-name method-name parameter-types] (conform! ::metho...
(ns shuriken.monkey-patch "### Tools to monkey-patch Clojure and Java code" (:use clojure.pprint) (:require [clojure.spec.alpha :as s] [clojure.repl :refer [source-fn]] [com.palletops.ns-reload :as nsdeps] [shuriken.byte-buddy :refer [->byte-buddy ...
6d70c8d22e61bc2e51cf5749f428266d6efa012cfc1f2aa9d1bd528e50a26dc2
hanshuebner/vlm
imaclist.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : POWERPC - INTERNALS ; Base : 10 ; Lowercase : T -*- (in-package "POWERPC-INTERNALS") Macros in support of list instructions . These are mostly in IFUNLIST.PPCS reads car(tag / data ) into tag / data (defmacro car-internal (tag data opcode vma temp3 temp4 ...
null
https://raw.githubusercontent.com/hanshuebner/vlm/20510ddc98b52252a406012a50a4d3bbd1b75dd0/g5-emulator/imaclist.lisp
lisp
Syntax : Common - Lisp ; Package : POWERPC - INTERNALS ; Base : 10 ; Lowercase : T -*- Allows arg-fetch to be signed Destructively reads cdr(tag/data) into tag/data. Allows arg-fetch to be signed (B ,endcdr) Allows arg-fetch to be signed Save the CAR values re-fetched if forwarded) (B ,end-carcdr) Locative ill...
(in-package "POWERPC-INTERNALS") Macros in support of list instructions . These are mostly in IFUNLIST.PPCS reads car(tag / data ) into tag / data (defmacro car-internal (tag data opcode vma temp3 temp4 temp5 temp6 &optional signedp) (assert (member signedp '(t nil)) () "Barf") (check-temporaries (tag dat...
0b67de54121ff85e624cd50e839764b32b35d986205f267bed89251db4659edf
mirleft/ocaml-nocrypto
pkg.ml
#!/usr/bin/env ocaml #use "topfind" #require "topkg" #require "cpuid" #require "ocb-stubblr.topkg" open Topkg open Ocb_stubblr_topkg let cpuflags = [`SSSE3; `AES; `PCLMULQDQ] let unix = Conf.with_pkg ~default:true "unix" let lwt = Conf.with_pkg ~default:false "lwt" let xen = Conf.(key "xen" bool ~absent:false ...
null
https://raw.githubusercontent.com/mirleft/ocaml-nocrypto/ed7bb8d911dc340e36d85d335d9edb8339f0932d/pkg/pkg.ml
ocaml
#!/usr/bin/env ocaml #use "topfind" #require "topkg" #require "cpuid" #require "ocb-stubblr.topkg" open Topkg open Ocb_stubblr_topkg let cpuflags = [`SSSE3; `AES; `PCLMULQDQ] let unix = Conf.with_pkg ~default:true "unix" let lwt = Conf.with_pkg ~default:false "lwt" let xen = Conf.(key "xen" bool ~absent:false ...
07a1745a7266bc4965222e93fd59cb4f799385b497e9d3b81a2678b25ef53d92
kblake/erlang-chat-demo
element_grid.erl
-module (element_grid). -compile(export_all). -include_lib("wf.hrl"). reflect() -> record_info(fields, grid). render_element(#grid_clear {}) -> "<div class='clear'></div>\n"; render_element(Record0) -> Record = to_grid_record(Record0), Body = rewrite_body(lists:flatten([Record#grid.body])), element_...
null
https://raw.githubusercontent.com/kblake/erlang-chat-demo/6fd2fce12f2e059e25a24c9a84169b088710edaf/apps/nitrogen/src/elements/layout/element_grid.erl
erlang
- Add omega to last grid element. - Add a clear statement at end of body. Add omega to last element, and add a clear div. Return true if all elements are grid elements. this grid. defined classes. Just construct the grid_N class. User defined classes are added to inner panel. Check for alpha... Check for omeg...
-module (element_grid). -compile(export_all). -include_lib("wf.hrl"). reflect() -> record_info(fields, grid). render_element(#grid_clear {}) -> "<div class='clear'></div>\n"; render_element(Record0) -> Record = to_grid_record(Record0), Body = rewrite_body(lists:flatten([Record#grid.body])), element_...
2b8c67351c7284fb0681722a4c365e1bbc32febfdda6d43fd8b1ba60357d1b5d
scorphus/advent-of-code-2022
solution.rkt
This file is part of Advent of Code 2022 ; -of-code-2022 ; Licensed under the BSD-3-Clause license: ; -3-Clause Copyright ( c ) 2022 , < > ; Day 2 - #lang racket/base (require racket/file racket/match) (module* main #f (let ([lines (file->lines "input.txt")]) (printf "part 1: ~a~n" (part-...
null
https://raw.githubusercontent.com/scorphus/advent-of-code-2022/abdb5ddca6d51f396349cb2ef3827dd4cbf98ce4/day02/solution.rkt
racket
-of-code-2022 Licensed under the BSD-3-Clause license: -3-Clause Day 2 -
This file is part of Advent of Code 2022 Copyright ( c ) 2022 , < > #lang racket/base (require racket/file racket/match) (module* main #f (let ([lines (file->lines "input.txt")]) (printf "part 1: ~a~n" (part-1 lines)) (printf "part 2: ~a~n" (part-2 lines)))) (define (part-1 lines) (...
688d29cc036410bdc518b2251b7c5efb165e4c4eae25e774f59b821b1d4d7ccd
jacquev6/JsOfOCairo
Tests.ml
Copyright 2017 - 2018 < > open General.Abbr open Tst let drawing_tests = let module T = Drawing.Make(CairoMock) in Li.map ~f:(fun {T.name; _} -> name) T.tests module Make(X: sig val title: string module C: CairoMock.S module N: sig val name: string val create: unit -> C.context val backe...
null
https://raw.githubusercontent.com/jacquev6/JsOfOCairo/a00a31000b1a7cabe6ac74e48e86b52ec4699cff/tst/Tests/Tests.ml
ocaml
Copyright 2017 - 2018 < > open General.Abbr open Tst let drawing_tests = let module T = Drawing.Make(CairoMock) in Li.map ~f:(fun {T.name; _} -> name) T.tests module Make(X: sig val title: string module C: CairoMock.S module N: sig val name: string val create: unit -> C.context val backe...
0c4a508b7962bc9d31988404b4193afd4fb7c7fb7a6850e57660ba60fd0c2fe0
zaxtax/hakaru-old
Metropolis.hs
{-# LANGUAGE BangPatterns #-} module Language.Hakaru.Tests.Metropolis where import Data.Dynamic import Language.Hakaru.Lambda import Language.Hakaru.Metropolis import Language.Hakaru.Distribution (bern, normal, uniform, beta) import Language.Hakaru.Util.Visual import Test.QuickCheck.Monadic import Distribution.Test...
null
https://raw.githubusercontent.com/zaxtax/hakaru-old/edac4bca19a2b7b9257e584529cde5e7242e9695/Language/Hakaru/Tests/Metropolis.hs
haskell
# LANGUAGE BangPatterns #
module Language.Hakaru.Tests.Metropolis where import Data.Dynamic import Language.Hakaru.Lambda import Language.Hakaru.Metropolis import Language.Hakaru.Distribution (bern, normal, uniform, beta) import Language.Hakaru.Util.Visual import Test.QuickCheck.Monadic import Distribution.TestSuite.QuickCheck prog_mixture...
167f472f87f91d8621ae12d3980baf5a5cf7f4d8d47a371284956fc9f8991acd
elarous/O2SN
events.cljs
(ns o2sn.new-story.events (:require [kee-frame.core :refer [reg-event-fx reg-event-db]] [re-frame.core :refer [dispatch path]] [ajax.core :as ajax] [cljs-time.core :as t] [cljs-time.format :as f] [o2sn.common.interceptors :refer [server auth]])) (reg-event...
null
https://raw.githubusercontent.com/elarous/O2SN/289e17e5c4b6a19e3c8f964f9faa4efad3edefa8/src/client/main/o2sn/new_story/events.cljs
clojure
(ns o2sn.new-story.events (:require [kee-frame.core :refer [reg-event-fx reg-event-db]] [re-frame.core :refer [dispatch path]] [ajax.core :as ajax] [cljs-time.core :as t] [cljs-time.format :as f] [o2sn.common.interceptors :refer [server auth]])) (reg-event...
4860e22aaa8df6b181d348b2f6ff6843a8a092fdd39181d4ab1164af7f1f07e4
malcolmreynolds/GSLL
fermi-dirac.lisp
Regression test FERMI - DIRAC for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST FERMI-DIRAC (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 0.6224593312018546d0 4.040305821324309d-16) (MULTIPLE-VALUE-LIST (FERMI-DIRAC-M1 0.5d0...
null
https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/tests/fermi-dirac.lisp
lisp
Regression test FERMI - DIRAC for GSLL , automatically generated (in-package :gsl) (LISP-UNIT:DEFINE-TEST FERMI-DIRAC (LISP-UNIT::ASSERT-NUMERICAL-EQUAL (LIST 0.6224593312018546d0 4.040305821324309d-16) (MULTIPLE-VALUE-LIST (FERMI-DIRAC-M1 0.5d0...
91a6b5691402aacdc7b69566779f43593c1fdbdd3a5f6cd42ff1f0a0f7b4643b
sealchain-project/sealchain
MockDb.hs
{-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} module Pact.MockDb where import Pact.Types.Runtime import Data.Aeson import Data.String import Data.Default import Pact.Interpreter rc :: a -> Method e a rc = const . return newtype MockRead = MockRead (forall k v . (IsString k,FromJSON v) => ...
null
https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/src-ghc/Pact/MockDb.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE OverloadedStrings #
module Pact.MockDb where import Pact.Types.Runtime import Data.Aeson import Data.String import Data.Default import Pact.Interpreter rc :: a -> Method e a rc = const . return newtype MockRead = MockRead (forall k v . (IsString k,FromJSON v) => Domain k v -> k -> Method () (Maybe v)) instance Default Mo...
2b175b7c06da5da2cd698deefb4bea51439072c81c5c27e933faf4bb2b1eda6f
elaforge/karya
Scale_test.hs
Copyright 2015 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt module Derive.Scale_test where import Util.Test import qualified Ui.Ui as Ui import qualified Derive.Derive as Derive import qualified Derive.DeriveTest as DeriveTest import qualified Der...
null
https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Derive/Scale_test.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt
Copyright 2015 module Derive.Scale_test where import Util.Test import qualified Ui.Ui as Ui import qualified Derive.Derive as Derive import qualified Derive.DeriveTest as DeriveTest import qualified Derive.Env as Env import qualified Derive.Scale as Scale import qualified Perform.Pitch as Pitch print_note_numbe...
8513f9b82bbe2298415e7ffa93fdb586b78952ff05648164e387e7898139b030
racket/scribble
latex-index.rkt
#lang racket/base (require "../core.rkt" "../html-properties.rkt") (provide same-index-entry? extract-index-link-targets) (define (same-index-entry? a-blocks b-blocks) (and (= (length a-blocks) (length b-blocks)) ;; We expect an index entry to have a single paragraph, but ;; allow a ...
null
https://raw.githubusercontent.com/racket/scribble/beb2d9834169665121d34b5f3195ddf252c3c998/scribble-lib/scribble/private/latex-index.rkt
racket
We expect an index entry to have a single paragraph, but allow a list: Compare paragraph content, paying attention to style, but not paying attention to link targets:
#lang racket/base (require "../core.rkt" "../html-properties.rkt") (provide same-index-entry? extract-index-link-targets) (define (same-index-entry? a-blocks b-blocks) (and (= (length a-blocks) (length b-blocks)) (for/and ([a (in-list a-blocks)] [b (in-list b-blocks)]) ...
9941a3c3a1e6c48ac6dafaf6bad12fb7f9f7f40223241d32cc0556bd6cd85124
rbkmoney/consuela
consuela_discovery_sup.erl
%%% Discovery service supervisor -module(consuela_discovery_sup). %% -type opts() :: #{ name := consuela_discovery_server:service(), % [] by default tags => [consuela_discovery_server:tag()], consul := consul_opts(), % #{} by default opts => consuela_discovery_server:opts() }. -type consul...
null
https://raw.githubusercontent.com/rbkmoney/consuela/56d065bff0f1c8de4cede40d670b9061942b4ea8/src/consuela_discovery_sup.erl
erlang
[] by default #{} by default #{} by default
Discovery service supervisor -module(consuela_discovery_sup). -type opts() :: #{ name := consuela_discovery_server:service(), tags => [consuela_discovery_server:tag()], consul := consul_opts(), opts => consuela_discovery_server:opts() }. -type consul_opts() :: #{ url := consuela_client:url(), ...
4ef95f988084187c1bd3fa6f4dc4d29b74911563c83a21923fdd7b0f25f0d59f
antono/guix-debian
gcc.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 , 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...
null
https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/gcc.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 © 2012 , 2013 , 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 gcc) #:use-module ((guix licenses) #:select (gpl3+ gp...
ce275c33fd3b6273248b93d446f606d56fc11a5eb693edfe951c6973c64c4405
slipstream/SlipStreamServer
external_object_lifecycle_test_utils.clj
(ns com.sixsq.slipstream.ssclj.resources.external-object-lifecycle-test-utils (:require [clojure.data.json :as json] [clojure.string :as str] [clojure.test :refer [is]] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/test/com/sixsq/slipstream/ssclj/resources/external_object_lifecycle_test_utils.clj
clojure
by default assume the S3 bucket exists by default, a bucket creation succeeds by default, it is Ok to create objects in bucket check with and without a href attribute full external object lifecycle as administrator/user should work create with invalid template fails Assume that bucket does not exist and cannot b...
(ns com.sixsq.slipstream.ssclj.resources.external-object-lifecycle-test-utils (:require [clojure.data.json :as json] [clojure.string :as str] [clojure.test :refer [is]] [com.sixsq.slipstream.ssclj.app.params :as p] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :refer [authn-info-header]...
f6d4c4d68c1e2f02d25780c91e8a7e001794376c468ec2740726ef31fa495c7c
erlang/otp
ttb_SUITE.erl
%% %% %CopyrightBegin% %% %% Copyright Ericsson AB 2002 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by appli...
null
https://raw.githubusercontent.com/erlang/otp/d5ee0b4e6f436041b82f76ca5e24e39d8b153f66/lib/observer/test/ttb_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific la...
Copyright Ericsson AB 2002 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ttb_SUITE). -compile(export_all). -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, in...
a5cb7da68e8b5fbf49519d9a8019996c64c7430a9836fbc9e35a737f1aa3ba88
google/codeworld
RequirementsChecker.hs
Copyright 2020 The CodeWorld Authors . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to ...
null
https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-requirements/src/CodeWorld/Requirements/RequirementsChecker.hs
haskell
Copyright 2020 The CodeWorld Authors . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to ...
dbfd79c170f585dc6a1c40c25573c0101ece43c39d55cc8f641357ed5b336452
swaywm/wlroots-ocaml
simple.ml
open Wlroots open! Tgl3 type state = { last_frame : Mtime.t; mutable dec : int; of size 3 new_output : Wl.Listener.t; new_input : Wl.Listener.t; } type output = { frame : Wl.Listener.t; destroy : Wl.Listener.t; } type keyboard = { device : Keyboard.t; key : Wl.Listener.t; destroy : Wl.Listener.t...
null
https://raw.githubusercontent.com/swaywm/wlroots-ocaml/a4a36121a331c14b0f2ab363a6a59065513985e5/examples/simple.ml
ocaml
open Wlroots open! Tgl3 type state = { last_frame : Mtime.t; mutable dec : int; of size 3 new_output : Wl.Listener.t; new_input : Wl.Listener.t; } type output = { frame : Wl.Listener.t; destroy : Wl.Listener.t; } type keyboard = { device : Keyboard.t; key : Wl.Listener.t; destroy : Wl.Listener.t...
b6322d2c2907f564fd26e2cf793163b242aeb2b6a9436df0fc439de1e6edb2ec
heroku/cowboyku
rest_simple_resource.erl
-module(rest_simple_resource). -export([init/3, content_types_provided/2, get_text_plain/2]). init(_Transport, _Req, _Opts) -> {upgrade, protocol, cowboyku_rest}. content_types_provided(Req, State) -> {[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}. get_text_plain(Req, State) -> {<<"This is REST!"...
null
https://raw.githubusercontent.com/heroku/cowboyku/ba7120bdb119ac676909e51f0738bde1d4fdd4ee/test/http_SUITE_data/rest_simple_resource.erl
erlang
-module(rest_simple_resource). -export([init/3, content_types_provided/2, get_text_plain/2]). init(_Transport, _Req, _Opts) -> {upgrade, protocol, cowboyku_rest}. content_types_provided(Req, State) -> {[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}. get_text_plain(Req, State) -> {<<"This is REST!"...
039b0ec990eda725fd73f61dad41b2587392b4155b73490cc5e21ec78f67fe54
racket/racket7
gen-jit-ts.rkt
#lang at-exp racket/base (require racket/string) (define (char->type c) (case c [(#\s) "Scheme_Object*"] [(#\t) "const Scheme_Object*"] [(#\S) "Scheme_Object**"] [(#\b) "Scheme_Bucket*"] [(#\n) "Scheme_Native_Lambda*"] [(#\m) "MZ_MARK_STACK_TYPE"] [(#\p) "void*"] [(#\i) "int"] [(#...
null
https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/racket/src/gen-jit-ts.rkt
racket
\ \ }) }) } "") }) }) } "") }) }) } "") }) }) }) } "") }) })
#lang at-exp racket/base (require racket/string) (define (char->type c) (case c [(#\s) "Scheme_Object*"] [(#\t) "const Scheme_Object*"] [(#\S) "Scheme_Object**"] [(#\b) "Scheme_Bucket*"] [(#\n) "Scheme_Native_Lambda*"] [(#\m) "MZ_MARK_STACK_TYPE"] [(#\p) "void*"] [(#\i) "int"] [(#...
8f2925db7b364cc51db303823bd17f7caab1d0ab35d1ada68654d04e024505b4
soulomoon/SICP
Exercise 2.71.scm
Exercise 2.71 : Suppose we have a tree for an alphabet of nn symbols , and that the relative frequencies of the symbols are 1,2,4, … ,2n−11,2,4, … ,2n−1 . Sketch the tree for n=5n=5 ; for n=10n=10 . In such a tree ( for general nn ) how many bits are required to encode the most frequent symbol ? The least frequent s...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/Exercise%202.71.scm
scheme
for n=10n=10 . In such a tree ( for general nn ) how many bits are required to encode the most frequent symbol ? The least frequent symbol ? n-1 for the least
1 for the most
da4f535f4c2a3c13ea2e2e9cb6ab86fd814faa0346431e77936f34ba869fe95e
ermine/sulci
plugin_tld.ml
* ( c ) 2004 - 2010 * (c) 2004-2010 Anastasia Gornostaeva *) open Dbm open Common open Hooks open Plugin_command let tld db xmpp env kind jid_from text = let response = if text = "" then "какой домен?" else if text = "*" then "-whois.htm" else let tld = if text.[0...
null
https://raw.githubusercontent.com/ermine/sulci/3ee4bd609b01e2093a6d37bf74579728d0a93b70/src/plugin_tld.ml
ocaml
* ( c ) 2004 - 2010 * (c) 2004-2010 Anastasia Gornostaeva *) open Dbm open Common open Hooks open Plugin_command let tld db xmpp env kind jid_from text = let response = if text = "" then "какой домен?" else if text = "*" then "-whois.htm" else let tld = if text.[0...
0132a9f95b26fe0944a6ac9efe2c762d8c622a073e46a542e2f727a7d99a3492
ocaml-community/utop
uTop_complete.ml
* uTop_complete.ml * ---------------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of utop . * uTop_complete.ml * ---------------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of utop. *) [@@@warning "-9-27-32"] open ...
null
https://raw.githubusercontent.com/ocaml-community/utop/13011b0d4545d6dca69a31d44246f2f1972c8e66/src/lib/uTop_complete.ml
ocaml
+-----------------------------------------------------------------+ | Utils | +-----------------------------------------------------------------+ Check whether an identifier is a valid one. +------------------------------------------------------------...
* uTop_complete.ml * ---------------- * Copyright : ( c ) 2011 , < > * Licence : BSD3 * * This file is a part of utop . * uTop_complete.ml * ---------------- * Copyright : (c) 2011, Jeremie Dimino <> * Licence : BSD3 * * This file is a part of utop. *) [@@@warning "-9-27-32"] open ...
f9371e6cf11ab9a3739e20f58025c13de33b75944b68fd82fa57770693099a60
Spivoxity/obc-3
util.mli
* util.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 - -2016 J. M. Spivey * All rights reserved * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1 ....
null
https://raw.githubusercontent.com/Spivoxity/obc-3/9e5094df8382ac5dd25ff08768277be6bd71a4ae/mllib/util.mli
ocaml
split -- cleave initial segment that satisfies a test lexico -- lexical product of orderings, represented as 'compare' functions ungroup -- flatten a grouped list of pairs commonest -- find commonest element of list with comparison function flat_map -- map function over list and concatenate results assoc_eq ...
* util.mli * * This file is part of the Oxford Oberon-2 compiler * Copyright ( c ) 2006 - -2016 J. M. Spivey * All rights reserved * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * * 1 ....
34d6190c9d5fb1bebc4b0dcd4b10d225d8fc0b7bc1351a93e87593c2ca17db91
bobzhang/ocaml-book
myocamlbuild.ml
open Ocamlbuild_plugin open Command open Printf open Ocamlbuild_pack (** copy from ocamlbuild source *) let gen_interface ml mli env build = let open Ocaml_utils in let ml = env ml and mli = env mli in let tags = tags_of_pathname ml++"ocaml" in Ocaml_compiler.prepare_compile build ml; Cmd(S[!Options.ocamlc...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/code/camlp4/filters/test_mli/myocamlbuild.ml
ocaml
* copy from ocamlbuild source * list extensions, but not used here * configuration syntax extensions * demo how to use dep dep ["ocamldep"; "file:test/test_string.ml"] ["test/test_data/string.txt"; "test/test_data/char.txt"]; flag ["ocaml"; "pp"; "use_lambda"] (A"pa_lambda.cmo"); dep ["...
open Ocamlbuild_plugin open Command open Printf open Ocamlbuild_pack let gen_interface ml mli env build = let open Ocaml_utils in let ml = env ml and mli = env mli in let tags = tags_of_pathname ml++"ocaml" in Ocaml_compiler.prepare_compile build ml; Cmd(S[!Options.ocamlc; ocaml_ppflags tags; ocaml_include...
01b165bc1b4f676b3336ef7f9b8e6d125e3184f4e3407db32135f9b119db19db
heyoka/faxe
faxe_db.erl
Date : 28.04.17 - 20:09 Ⓒ 2017 heyoka -module(faxe_db). -author("Alexander Minichmair"). -include("faxe.hrl"). -include_lib("stdlib/include/ms_transform.hrl"). -define(WAIT_FOR_TABLES, 10000). %% API %% db management -export([renew_tables/0, create/0, db_init/0, export/1]). %% api export -export([ get_task/1...
null
https://raw.githubusercontent.com/heyoka/faxe/74772dbdbb7a972adaaf3a8ae2b85bb4fd6bbc42/apps/faxe/src/faxe_db.erl
erlang
API db management api export sort tags alphabetically Tags %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% get a list of all used tags @doc overwrite existing tags with new ones USER clear user table and create only the default user from config % % % % % % % % % % % % % % % % % % % % % % ...
Date : 28.04.17 - 20:09 Ⓒ 2017 heyoka -module(faxe_db). -author("Alexander Minichmair"). -include("faxe.hrl"). -include_lib("stdlib/include/ms_transform.hrl"). -define(WAIT_FOR_TABLES, 10000). -export([renew_tables/0, create/0, db_init/0, export/1]). -export([ get_task/1, save_task/1, delete_task/1, ...
47cf4395972eea36fdc969c3a62b7b663bc3e40214174e8713f45a0055f029ce
c-cube/ocaml-containers
CCLazy_list.mli
(* This file is free software, part of containers. See file "license" for more details. *) * Lazy List @since 0.17 @since 0.17 *) type +'a t = 'a node lazy_t and +'a node = Nil | Cons of 'a * 'a t val empty : 'a t (** Empty list. *) val return : 'a -> 'a t (** Return a computed value. *) val is_empty :...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/data/CCLazy_list.mli
ocaml
This file is free software, part of containers. See file "license" for more details. * Empty list. * Return a computed value. * Evaluate the head. * [length l] returns the number of elements in [l], eagerly (linear time). Caution, will not terminate if [l] is infinite. * Evaluate head, return it, or [None] if...
* Lazy List @since 0.17 @since 0.17 *) type +'a t = 'a node lazy_t and +'a node = Nil | Cons of 'a * 'a t val empty : 'a t val return : 'a -> 'a t val is_empty : _ t -> bool val length : _ t -> int val cons : 'a -> 'a t -> 'a t val head : 'a t -> ('a * 'a t) option val map : f:('a -> 'b) -> 'a t ->...
6f198b4cdbfb4b28579ee8999fac3df9ab504f95592be3fd6049f6e5024212a4
falgon/htcc
Operations.hs
| Module : Htcc . Asm . Intrinsic . Structure . Section . Text . Operations Description : The modules of intrinsic ( x86_64 ) assembly Copyright : ( c ) roki , 2019 License : MIT Maintainer : Stability : experimental Portability : POSIX The modules of intrinsic ( x86_64 ) assembly ...
null
https://raw.githubusercontent.com/falgon/htcc/3cef6fc362b00d4bc0ae261cba567bfd9c69b3c5/src/Htcc/Asm/Intrinsic/Structure/Section/Text/Operations.hs
haskell
| count up the internal label counter | apply value to cntCnt from the current label number | apply value to brkCnt from the current label number | Apply values from lblCnt to brkCnt and cntCnt in function execution scope, and return values to their original state when exiting the scope
| Module : Htcc . Asm . Intrinsic . Structure . Section . Text . Operations Description : The modules of intrinsic ( x86_64 ) assembly Copyright : ( c ) roki , 2019 License : MIT Maintainer : Stability : experimental Portability : POSIX The modules of intrinsic ( x86_64 ) assembly ...
422836d6944179b2b6ddba2c0e0456c12b913d46c5c15c9ee33ad5e573bf0ba1
manuel-serrano/bigloo
find_gdefs.scm
;*=====================================================================*/ * ... /prgm / project / bigloo / / comptime / Ast / find_gdefs.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : M...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/0291d1a67b2478b02bb6d3d16b2f80297464e9df/comptime/Ast/find_gdefs.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * This module implements a function which travers an entire */ * unit in order to find t...
* ... /prgm / project / bigloo / / comptime / Ast / find_gdefs.scm * / * Author : * / * Creation : Mon Jun 3 11:21:26 1996 * / * Last change : Mon Nov 30 09:08:17 2015 ( serrano ) * / (module ast_f...
3910ef52a0bb0ed5d2dd1413a4ebc47603d1ab185e821136228f7b38f54631a5
slyrus/mcclim-old
gadgets.lisp
;;; -*- Mode: Lisp; Package: CLIM-GRAPHIC-FORMS; -*- ( c ) 2006 - 2007 Jack D. Unrue ( jdunrue ( at ) gmail ( dot ) com ) ;;; based on the null backend by: ( c ) 2005 ( ) ;;; This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License a...
null
https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Backends/Graphic-Forms/gadgets.lisp
lisp
-*- Mode: Lisp; Package: CLIM-GRAPHIC-FORMS; -*- based on the null backend by: This library is free software; you can redistribute it and/or either This library 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 PART...
( c ) 2006 - 2007 Jack D. Unrue ( jdunrue ( at ) gmail ( dot ) com ) ( c ) 2005 ( ) modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) any later version . Library General Public License for more details . You should have received a copy of the ...
4e0be11350d29f2101dac22f4a45f28e1bd7d4431116a6dd66a61406d99131e4
haskell-works/avro
JSON.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # | Avro supports a JSON representation of Avro objects alongside the Avro binary format . An Avro schema can be used to generate and validate JSON representations of Avro objects . -- -- The JSON format is the same format as used for default val...
null
https://raw.githubusercontent.com/haskell-works/avro/ccb46b4b8654f2af09c7454ea3e210213ce901d6/src/Data/Avro/JSON.hs
haskell
# LANGUAGE OverloadedStrings # The JSON format is the same format as used for default values in schemas except unions are encoded differently. Non-union values are encoded as follows: +--------------+----------+----------+ +==============+==========+==========+ |null |null |null | +-------...
# LANGUAGE ScopedTypeVariables # | Avro supports a JSON representation of Avro objects alongside the Avro binary format . An Avro schema can be used to generate and validate JSON representations of Avro objects . |Avro Type |JSON Type |Example | |boolean |boolean |true | |fixed ...
26dc4c3608dc738de089024c14160fc9db685966d579ded158d617098c23ac4e
ucsd-progsys/liquidhaskell
ReWrite3.hs
{-@ LIQUID "--expect-any-error" @-} module ReWrite3 where {-@ LIQUID "--reflection" @-} {-@ LIQUID "--ple" @-} {-@ infix ++ @-} import Prelude hiding ((++)) {-@ rewrite assoc @-} {-@ assoc :: xs:[a] -> ys:[a] -> zs:[a] -> { xs ++ (ys ++ zs) == (xs ++ ys) ++ zs } @-} assoc :: [a] -> [a] -> [a] -> () assoc ...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/ReWrite3.hs
haskell
@ LIQUID "--expect-any-error" @ @ LIQUID "--reflection" @ @ LIQUID "--ple" @ @ infix ++ @ @ rewrite assoc @ @ assoc :: xs:[a] -> ys:[a] -> zs:[a] -> { xs ++ (ys ++ zs) == (xs ++ ys) ++ zs } @ assoc calls assoc', therefore assoc' cannot use assoc @ assoc' :: xs:[a] -> ys:[a] -> zs:[a] -> { xs ++ (y...
module ReWrite3 where import Prelude hiding ((++)) assoc :: [a] -> [a] -> [a] -> () assoc xs ys zs = assoc' xs ys zs assoc' :: [a] -> [a] -> [a] -> () assoc' _ _ _ = () (++)::[a] -> [a] -> [a] [] ++ ys = ys (x:xs) ++ ys = x:(xs ++ys)
81fe785383434e80a607b97f649287a187e5db970b6b01756834e15574ff76ea
chrisdone/duet
Infer.hs
# LANGUAGE KindSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE GeneralizedNewtypeDeriving # | A cle...
null
https://raw.githubusercontent.com/chrisdone/duet/959d40db68f4c2df04cabb7677724900d4f71db4/src/Duet/Infer.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # * Type checker $type-checker * Setting up * Printers , printTypeSignature * Types syntax tree * Values syntax tree ------------------------------------------------------------------------------ Type inference $type-checker The type checker takes ...
# LANGUAGE KindSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE GeneralizedNewtypeDeriving # | A clear - to - read , well - documented , implementation of a Haskell 98 ...
c96df25b8c2d2049b3f8e7dd97954639cd5813823149d7196aa3eeeea473b5b2
input-output-hk/cardano-ledger
Roundtrip.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Test.Cardano.Ledger.Conway.Serialisation.Roundtrip (allprops) where import Cardano.Ledger.Binary.Version (natVersion) import Cardano.L...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/conway/test-suite/src/Test/Cardano/Ledger/Conway/Serialisation/Roundtrip.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Test.Cardano.Ledger.Conway.Serialisation.Roundtrip (allprops) where import Cardano.Ledger.Binary.Version (natVersion) import Cardano.Ledger.Conway.Genesis (Conway...
2d52e845116181bdc75602d125203dffc37699b6fef32589287f4721e5cbb15c
kelamg/HtDP2e-workthrough
ex493.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex493) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Accumulators/ex493.rkt
racket
about the language level of this file in a form that our tools can easily process. [List-of X] -> [List-of X] constructs the reverse of alox X [List-of X] -> [List-of X] adds an-x to the end of alox A - invert traverses the entire list, and FOR EACH item in the list, it calls add-as-last which also traverses...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex493) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (check-expect (invert '(a b c)) '(c b a)) (define ...
8efef8e58d7c54f016be859bff3a6200264e91e8b0a43bdcac65f88e650073e0
8c6794b6/haskell-sc-scratch
SCD.hs
# LANGUAGE NoImplicitPrelude , BangPatterns # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : non - portable Scratch written while reading /purely functional data structure/ , by . SCD , Simple . Module : $Header$ CopyRig...
null
https://raw.githubusercontent.com/8c6794b6/haskell-sc-scratch/22de2199359fa56f256b544609cd6513b5e40f43/Scratch/FP/PFDS/RecSlowdown/SCD.hs
haskell
# LANGUAGE NoImplicitPrelude , BangPatterns # | Module : $ Header$ CopyRight : ( c ) 8c6794b6 License : : Stability : unstable Portability : non - portable Scratch written while reading /purely functional data structure/ , by . SCD , Simple . Module : $Header$ CopyRig...
4a6d85af1a43e51afbd290bc28d0d1e42735fc7835fa26f2aa350fb0fc4813f9
tomjaguarpaw/product-profunctors
Class.hs
module Data.Profunctor.Product.Class where import Data.Profunctor (Profunctor) import qualified Data.Profunctor as Profunctor -- | 'ProductProfunctor' is a generalization of -- 'Control.Applicative.Applicative'. -- It has the usual 'Control.Applicative.Applicative' "output" -- (covariant) parameter on the r...
null
https://raw.githubusercontent.com/tomjaguarpaw/product-profunctors/faf52f0a134099ed8adb6b29ea822d48920e7ac3/Data/Profunctor/Product/Class.hs
haskell
| 'ProductProfunctor' is a generalization of 'Control.Applicative.Applicative'. It has the usual 'Control.Applicative.Applicative' "output" (covariant) parameter on the right. Additionally it has an "input" (contravariant) type parameter on the left. The methods for 'ProductProfunctor' correspond closely to tho...
module Data.Profunctor.Product.Class where import Data.Profunctor (Profunctor) import qualified Data.Profunctor as Profunctor | ' Control.Applicative.pure ' ' purePP ' instance ' Profunctor ' MyProductProfunctor where ' purePP ' = ' Control.Applicative.pure ' class Profunctor...
e8d4445fd701fd4aa1789ea797934e2ce2033002d22e9d8d9feafc6a101430ab
fukamachi/fast-http
fast-http.lisp
(in-package :cl-user) (defpackage fast-http (:use :cl :fast-http.http :fast-http.parser :fast-http.multipart-parser :fast-http.byte-vector :fast-http.error :xsubseq) (:import-from :fast-http.http :+state-body+) (:import-from :fast-http.parser ...
null
https://raw.githubusercontent.com/fukamachi/fast-http/502a37715dcb8544cc8528b78143a942de662c5a/src/fast-http.lisp
lisp
multipart parser Low-level parser API Error
(in-package :cl-user) (defpackage fast-http (:use :cl :fast-http.http :fast-http.parser :fast-http.multipart-parser :fast-http.byte-vector :fast-http.error :xsubseq) (:import-from :fast-http.http :+state-body+) (:import-from :fast-http.parser ...
e7dcffc9f34d14fa7eac7d7d4ed360bdfe86e567f59018f3a36278090e3581dd
haskell/statistics
Laplace.hs
# LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveDataTypeable , DeriveGeneric # -- | -- Module : Statistics.Distribution.Laplace Copyright : ( c ) 2015 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : portable -- The Laplace distribut...
null
https://raw.githubusercontent.com/haskell/statistics/a4438994aa510d7faee5f0f87f7f287bd46be2d0/Statistics/Distribution/Laplace.hs
haskell
# LANGUAGE OverloadedStrings # | Module : Statistics.Distribution.Laplace License : BSD3 Maintainer : Stability : experimental Portability : portable It is used in differential privacy (Laplace Method), speech law of errors, giving a robust regression method) * Constructors * Accessors # UNPACK # ...
# LANGUAGE MultiParamTypeClasses # # LANGUAGE DeriveDataTypeable , DeriveGeneric # Copyright : ( c ) 2015 The Laplace distribution . This is the continuous probability defined as the difference of two iid exponential random variables or a Brownian motion evaluated as exponentially distributed times . reco...
19ff581e1e3c2f4ff33f1fac61d956f448823dd69f3451f058c6acc09018ef81
zwizwa/erl_tools
lab_board.erl
-module(lab_board). -export([init/2, handle/2, handle_from_port/2]). companion to uc_tools / gdb / lab_board.c %% This can run under gdbstub_hub.erl as well as standalone. Communication uses SLIP wrapping . %% For now, only gdbstub_hub type objects are supported. %% The idea is to export certain functionality s...
null
https://raw.githubusercontent.com/zwizwa/erl_tools/07645992e968c1456c9d0212f380afd1ffce4c1f/src/lab_board.erl
erlang
This can run under gdbstub_hub.erl as well as standalone. For now, only gdbstub_hub type objects are supported. The idea is to export certain functionality such that other board drivers can use the handler components. Application tags: Info = obj:dump(Pid), log:info("lab_board: ~p~n",[Info]), log:info("ipv4: ~p b...
-module(lab_board). -export([init/2, handle/2, handle_from_port/2]). companion to uc_tools / gdb / lab_board.c Communication uses SLIP wrapping . -include("slip.hrl"). -define(TAG_SET_PIN, 16#0000). -define(TAG_STATUS, 16#0001). init(Pid, _PacketProto) -> Pid ! {set_forward, fun ?MODULE:handle/2}, ...
a538ff249a5077c21f195170b82ff8fb1f0cdbb543240cdad98ce77d7781b766
green-labs/ppx_ts
str_to_array.ml
open Ppxlib open Parsetree open Ast_helper open Utils (* toArray attribute mapper *) let make_structure_items name loc manifest kind suffix = let keys = match (manifest, kind) with (* type t *) | Some { ptyp_desc = Ptyp_variant (row_fields, _, _) }, Ptype_abstract -> row_fields |> List.fi...
null
https://raw.githubusercontent.com/green-labs/ppx_ts/78fa3b42188d399bebed76aa5ac3203e983fe00d/src/str_to_array.ml
ocaml
toArray attribute mapper type t toArray extension mapper type t
open Ppxlib open Parsetree open Ast_helper open Utils let make_structure_items name loc manifest kind suffix = let keys = match (manifest, kind) with | Some { ptyp_desc = Ptyp_variant (row_fields, _, _) }, Ptype_abstract -> row_fields |> List.filter_map (fun { prf_desc; prf_loc = loc } -> ...
71c3a5788f8062518be0160914881d69163d2af2aada87636cce38ec1fba1ba7
3b/cl-opengl
package.lisp
;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; package.lisp --- Package definition for cl-glu. ;;; Copyright ( c ) 2006 , ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met...
null
https://raw.githubusercontent.com/3b/cl-opengl/e2d83e0977b7e7ac3f3d348d8ccc7ccd04e74d59/glu/package.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- package.lisp --- Package definition for cl-glu. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: o Redistributions of source code must retain the abo...
Copyright ( c ) 2006 , " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT (in-package #:cl-user...
402a8e40795c96210df27d2e8ea921a471b53194568e910babc8f361432f924d
skanev/playground
86.scm
SICP exercise 2.86 ; ; Suppose we want to handle comlex numbers whose real parts, imaginary parts, ; magnitudes and angles can be either ordinary numbers, rational numbers or ; other numbers we wish to add to our system. Describe and implement the ; changes to the system needed to accomodate this. You will have to de...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/86.scm
scheme
Suppose we want to handle comlex numbers whose real parts, imaginary parts, magnitudes and angles can be either ordinary numbers, rational numbers or other numbers we wish to add to our system. Describe and implement the changes to the system needed to accomodate this. You will have to define operations such as s...
SICP exercise 2.86 Meh . This is a long one . OK , let 's start with our assumptions first . We shall have three number types - integer , rational and real . We shall working for those two types . Furthermore , we shall support the type tower sine , cosine and atan on all the numbers we have . We shall ha...
935749b5152e37980240a6c599dd260d105888f91d077cb2d10e90fb45c87fb4
ublubu/shapes
Linear.hs
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # {-# LANGUAGE RankNTypes #-} module Physics.Draw.Linear where import GHC.TypeLits (Nat) import GHC.TypeNats (KnownNat) import Control.Lens import qualified Data.Vector as Vec ...
null
https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes-demo/src/Physics/Draw/Linear.hs
haskell
# LANGUAGE RankNTypes # solving some `mx = b` up in here
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # module Physics.Draw.Linear where import GHC.TypeLits (Nat) import GHC.TypeNats (KnownNat) import Control.Lens import qualified Data.Vector as Vec import Data.Vector ((!)) imp...
55cce0d1d4d433f1f566e54902d29ac80b2ae813a35848298bf06d06c3a6bc7a
reanimate/reanimate
doc_foucautP.hs
#!/usr/bin/env stack -- stack runghc --package reanimate module Main (main) where import Reanimate import Reanimate.GeoProjection import Reanimate.Builtin.Images main :: IO () main = reanimate $ animate $ const $ scaleToSize screenWidth screenHeight $ embedImage $ project smallEarth ...
null
https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_foucautP.hs
haskell
stack runghc --package reanimate
#!/usr/bin/env stack module Main (main) where import Reanimate import Reanimate.GeoProjection import Reanimate.Builtin.Images main :: IO () main = reanimate $ animate $ const $ scaleToSize screenWidth screenHeight $ embedImage $ project smallEarth foucautP
092bce82dee662959354135f48fdab0042280053eb0f737669d3a9a4e3783764
GaloisInc/ivory
Modules.hs
{-# LANGUAGE CPP #-} # LANGUAGE QuasiQuotes # module Ivory.Compile.C.Modules where import Paths_ivory_backend_c (version) import Prelude () import Prelude.Compat import Text.PrettyPrint.Mainland #if MIN_VERSION_mainland_pretty(0,6,0) import ...
null
https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory-backend-c/src/Ivory/Compile/C/Modules.hs
haskell
# LANGUAGE CPP # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ - ------------------------------------------------------------------------------ --------------------------------------------------------...
# LANGUAGE QuasiQuotes # module Ivory.Compile.C.Modules where import Paths_ivory_backend_c (version) import Prelude () import Prelude.Compat import Text.PrettyPrint.Mainland #if MIN_VERSION_mainland_pretty(0,6,0) import Text.PrettyPrint.Mainlan...
d791a8ed309cab744c50434887f7c0368279792e2e33173bc5677abfbfae8df7
overtone/overtone
inst.clj
(ns overtone.repl.inst (:require [overtone.studio.inst :refer [instrument?]])) (defn ns-instruments "Returns a sequence of all the (public) instruments in the given namespace. For example: => (use 'overtone.inst.drum) nil => (ns-instruments 'overtone.inst.drum) (...) => (step-sequencer (m...
null
https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/repl/inst.clj
clojure
(ns overtone.repl.inst (:require [overtone.studio.inst :refer [instrument?]])) (defn ns-instruments "Returns a sequence of all the (public) instruments in the given namespace. For example: => (use 'overtone.inst.drum) nil => (ns-instruments 'overtone.inst.drum) (...) => (step-sequencer (m...
24097a9e4cb85509cdca97451dc690f0e22f89fd38926443c369bde28758066b
facebook/flow
wrappedMap.ml
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/52e59c7a9dea8556e7caf0be2b2c5c2e310b5b65/src/hack_forked/utils/collections/wrappedMap.ml
ocaml
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
83d7cb87e4e33575aa3448d45dc7a917366d25103d91d5058d66091290c9be27
fmi/fp2015
list-problems.rkt
#lang racket сумата на в numbers ; -> (sum (list)) 0 ; -> (sum (list 1 2 3)) 6 (define (sum numbers) (void)) ; Проверява дали x се среща в items - > ( member ? 1 ( list 1 2 3 ) ) ; #t ; -> (member? "asdf" (list "asd")) ; #f ; Разгледайте -lang.org/reference/booleans.html (define (member? x items) (void...
null
https://raw.githubusercontent.com/fmi/fp2015/ea2ea5448c6c054b00c280590e2e56ee782278e9/week5/list-problems.rkt
racket
-> (sum (list)) -> (sum (list 1 2 3)) Проверява дали x се среща в items #t -> (member? "asdf" (list "asd")) #f Разгледайте -lang.org/reference/booleans.html -> (list-ref2 (list 1 2 3) 0) '(1 2 3 4 5 6 7 8 9) -> (build-list2 3 id) -> (build-list2 3 (lambda (x) (* x x))) '(1 2 3 4 5 6) '(1 2 3) Ако (> n (le...
#lang racket сумата на в numbers 0 6 (define (sum numbers) (void)) - > ( member ? 1 ( list 1 2 3 ) ) (define (member? x items) (void)) - > ( ( range2 1 10 ) ) 9 В Racket има такава функция , наречена length (define (length2 items) (void)) Връща n - тия елемент от items при 0лево базиран ин...
a85418305e9f9087b49974d7c7ce894c644f2a2b63a13ec91638386cd07c85cb
thelema/ocaml-community
compile.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/driver/compile.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Misc open Config open Format open...