_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 |
|---|---|---|---|---|---|---|---|---|
266a0d9ede9e78e61b5150f1e581a8ad9f85bf489f20b12669efa924970bba08 | death/dbus | protocols.lisp | ;;;; +----------------------------------------------------------------+
;;;; | DBUS |
;;;; +----------------------------------------------------------------+
(defpackage #:dbus/protocols
(:use #:cl)
(:export
#:server-address
#:server-address-transport... | null | https://raw.githubusercontent.com/death/dbus/f4d1a99cfb38ded33f4fb58bb5522815f530b3c3/protocols.lisp | lisp | +----------------------------------------------------------------+
| DBUS |
+----------------------------------------------------------------+
Server address protocol
Authentication mechanism protocol |
(defpackage #:dbus/protocols
(:use #:cl)
(:export
#:server-address
#:server-address-transport-name
#:server-address-property
#:open-connection
#:connection
#:connection-server-address
#:connection-server-uuid
#:connection-fd
#:connection-pending-messages
#:connection-next-serial
#:... |
82f92eb7a7eafacbaffa7e338270899c70f5dcaae007176edeb1f4748786b488 | janestreet/base_quickcheck | base_quickcheck_examples.ml | (*_ This library deliberately exports nothing. *)
| null | https://raw.githubusercontent.com/janestreet/base_quickcheck/b3dc5bda5084253f62362293977e451a6c4257de/examples/base_quickcheck_examples.ml | ocaml | _ This library deliberately exports nothing. | |
052ca491e811d4bb60341ce7f0bedddffdd034e44ca172d688027cebb557bb84 | xapix-io/axel-f | autocomplete.cljc | (ns axel-f.autocomplete
(:refer-clojure :exclude [flatten])
(:require [clj-fuzzy.metrics :as fuzzy]
[clojure.string :as string]))
(defn arg->doc [arg opts]
(let [{:keys [doc]} (meta arg)]
(merge {:desc doc} opts)))
(defn arglist->doc [arglist]
(loop [acc [] opts {} arg (first arglist) arglist ... | null | https://raw.githubusercontent.com/xapix-io/axel-f/ec8fca880033e0ae78a8d9f42538d4a71fba29bd/src/axel_f/autocomplete.cljc | clojure | (ns axel-f.autocomplete
(:refer-clojure :exclude [flatten])
(:require [clj-fuzzy.metrics :as fuzzy]
[clojure.string :as string]))
(defn arg->doc [arg opts]
(let [{:keys [doc]} (meta arg)]
(merge {:desc doc} opts)))
(defn arglist->doc [arglist]
(loop [acc [] opts {} arg (first arglist) arglist ... | |
2088cdb638bee0c88822baf6a2497ebd7addb08e2bed9a13689af84b5c6dddae | softwarelanguageslab/maf | R5RS_scp1_fringe-1.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 0
; * negated predicates: 0
; * swapped branches: 0
; * calls to id fun: 0
(letrec ((atom? (lambda (x)
(not (pair? x))))
(fringe (lambda (l)
(<change>
()
(display append))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_fringe-1.scm | scheme | Changes:
* negated predicates: 0
* swapped branches: 0
* calls to id fun: 0 | * removed : 0
* added : 1
* swaps : 0
(letrec ((atom? (lambda (x)
(not (pair? x))))
(fringe (lambda (l)
(<change>
()
(display append))
(if (null? l)
()
(if (atom... |
17ffa8a99d7bfb2c86db701da3dda4af0fdc7e842ab0c6ded28d83f4f84a59b1 | tezos/tezos-mirror | rpc_encodings.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2023 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/c61377d496848a76aa607473c2f195bd4f8023d3/src/bin_evm_proxy/rpc_encodings.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2023 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
b55d4a6627f3d7619f6163cb235a1c14b7c7d4f2620fbf6c6bc94b679eb0794e | ptaoussanis/tufte | hello.cljs | (ns example.hello
(:require [taoensso.tufte :as tufte
:refer-macros (defnp p profiled profile)]))
(tufte/add-basic-println-handler! {})
(defn get-x [] (+ 1 1))
(defn get-y [] (+ 2 2))
(profile ; Profile any `p` forms called during body execution
{} ; Profiling options; we'll use the defaults for now... | null | https://raw.githubusercontent.com/ptaoussanis/tufte/396ca0d5e05db9d9721635ca11bf4e00fb393ab8/examples/cljs/src/example/hello.cljs | clojure | Profile any `p` forms called during body execution
Profiling options; we'll use the defaults for now | (ns example.hello
(:require [taoensso.tufte :as tufte
:refer-macros (defnp p profiled profile)]))
(tufte/add-basic-println-handler! {})
(defn get-x [] (+ 1 1))
(defn get-y [] (+ 2 2))
(dotimes [_ 5]
(p :get-x (get-x))
(p :get-y (get-y))))
|
cd304a08cae6c393ca88d0970335e59dfc2ce71979bad667db14db4a07559762 | ml4tp/tcoq | nativenorm.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/pretyping/nativenorm.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* This module implements normalizati... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open CErrors
open Term... |
75f17ac23e4cbd1d45710c5eccc2b84039a307cb78258354189d23b9ec9e469d | MarcKaufmann/congame | info.rkt | #lang info
(define collection "studies")
(define deps '("base"
"component-lib"
"congame-core"
"forms-lib"
"gregor-lib"
"koyo-lib"
"marionette-lib"
"sentry-lib"
"web-server-lib"))
(define build-deps '... | null | https://raw.githubusercontent.com/MarcKaufmann/congame/56b05aa8eb0148ca31dfece96d2f6266aad5e7df/studies/real-effort/info.rkt | racket | #lang info
(define collection "studies")
(define deps '("base"
"component-lib"
"congame-core"
"forms-lib"
"gregor-lib"
"koyo-lib"
"marionette-lib"
"sentry-lib"
"web-server-lib"))
(define build-deps '... | |
2f8e946506a285af59a3b83fc7406cc22a52a304bf9e377abc448964f4ac7c5b | AbstractMachinesLab/caramel | env.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/upstream/ocaml_408/typing/env.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Types
type summary =
Env_empty
| Env_value of summary * Ident.t * value_description
| Env_... |
136e4a39e69704a62d4793fa183f27ea5d119743b14c72218c17fbf6e8263d38 | hypirion/clj-conduit | conduit_test.clj | (ns com.hypirion.conduit-test
(:require [clojure.test :refer :all]
[com.hypirion.conduit :refer :all])
(:refer-clojure :exclude [await]))
(defn- taking
"Transducer version of take, implemented via conduit."
[n]
(conduit
(dotimes [_ n]
(yield (await)))))
(defn- dropping
"Transducer vers... | null | https://raw.githubusercontent.com/hypirion/clj-conduit/a9278713542a8de6db096421e569cd3b72916415/test/com/hypirion/conduit_test.clj | clojure | no more values, so flush out vs and exit
which _makes sense_ but may be slightly surprising. (sequence (comp | (ns com.hypirion.conduit-test
(:require [clojure.test :refer :all]
[com.hypirion.conduit :refer :all])
(:refer-clojure :exclude [await]))
(defn- taking
"Transducer version of take, implemented via conduit."
[n]
(conduit
(dotimes [_ n]
(yield (await)))))
(defn- dropping
"Transducer vers... |
59a9170f7033ba602ca71301896e11033bb015eebd500981eaa5c3f54fef4d17 | VictorNicollet/Ohm | action_Request.ml | Ohm is © 2012
open Util
open BatPervasives
open Action_Common
class type ['server,'args] request = object
method self : ('server,'args) Action_Endpoint.endpoint
method server : 'server
method path : string
method post : [ `JSON of Json.t | `POST of (string,string) BatMap.t ] option
method get ... | null | https://raw.githubusercontent.com/VictorNicollet/Ohm/ca90c162f6c49927c893114491f29d44aaf71feb/src/action_Request.ml | ocaml | Ohm is © 2012
open Util
open BatPervasives
open Action_Common
class type ['server,'args] request = object
method self : ('server,'args) Action_Endpoint.endpoint
method server : 'server
method path : string
method post : [ `JSON of Json.t | `POST of (string,string) BatMap.t ] option
method get ... | |
82ac2d111a75f7e9c18e8c821ffce49cb8836551b60f7bc8a7a57c2e08a617c3 | seckcoder/iu_c311 | lazy-list-monad.rkt | #lang racket
Three methods to construct monad : unit , mzero and cons
(define (unit a)
(list a))
(define (mzero)
'())
;cons
(define (bind ma f)
(match ma
[(list)
(mzero)]
[(list a)
(f a)]
[(cons a get-ma)
(mplus (f a)
(lambda ()
(bind (get-ma)
... | null | https://raw.githubusercontent.com/seckcoder/iu_c311/a1215983b6ab08df32058ef1e089cb294419e567/racket/monad/lazy-list-monad.rkt | racket | cons
ma * get-ma -> mb
(printf "~a\n" ma)
lazy version of assoc | #lang racket
Three methods to construct monad : unit , mzero and cons
(define (unit a)
(list a))
(define (mzero)
'())
(define (bind ma f)
(match ma
[(list)
(mzero)]
[(list a)
(f a)]
[(cons a get-ma)
(mplus (f a)
(lambda ()
(bind (get-ma)
... |
936087a84bf06a78cf76ef0c7919e516b188b99e4994d8471398ef2c0e451be0 | cartazio/tlaps | prep.mli |
* prf / prep.ml --- ship obligations
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* prf/prep.ml --- ship obligations
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
(** Ship obligations to the backend *)
open Proof.T
open Types;;
val make_task :
out_chan... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/backend/prep.mli | ocaml | * Ship obligations to the backend
* @raise Exit if the toolbox sent the "stop" command. |
* prf / prep.ml --- ship obligations
*
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* prf/prep.ml --- ship obligations
*
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
open Proof.T
open Types;;
val make_task :
out_channel ->
out_channel ->
(bool -> obli... |
fa2e33b3e7ec48743a33fbb20f18994e6d0225a205c79e1f4fbcf1bd6b005fc0 | g000001/MacLISP-compat | STEP.lisp |
;;; LISP Stepping Package
;;;
< comments and problems accepted > , TS-824
;;; x3-6032
;;; AI: RICH
;;;
For complete instructions see .INFO.;STEP INFO
;;;
Rewritten 11/03/76
;;;
;;;
;;; User Interface Function
;;;
Valid Forms : set EVALHOOK *
;;; (STEP) NIL
;;;... | null | https://raw.githubusercontent.com/g000001/MacLISP-compat/a147d09b98dca4d7c089424c3cbaf832d2fd857a/STEP.lisp | lisp | LISP Stepping Package
x3-6032
AI: RICH
STEP INFO
User Interface Function
(STEP) NIL
(STEP T) T
(STEP NIL) NIL
(STEP FOO1 FOO2 ...) (FOO1 FOO2)
should be compiled with RICH;UTIL >
must be on for hook to work
initialize depth count
for safety
turn system hook to m... |
< comments and problems accepted > , TS-824
Rewritten 11/03/76
Valid Forms : set EVALHOOK *
(declare (special evalhook evalhook* evalhook# prinlevel prinlength)
(fixnum i indent)
(setq macros nil)
(SETQ NEWIO NIL))
(DEFUN STEP FEXPR (ARG)
(COND ((OR (N... |
b2c94b9702a5431b46dcb3aaf991cb9fae849a1ed763dcdf7960b856acb2f05d | kadena-io/chainweaver | Example.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecursiveDo... | null | https://raw.githubusercontent.com/kadena-io/chainweaver/5d40e91411995e0a9a7e782d6bb2d89ac1c65d52/frontend/src/Frontend/ModuleExplorer/Example.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
| Pact example files.
License : BSD-style (see the file LICENSE)
* Example References
* Available examples
* Get some information about examples
* Retrieve example code
----------------------------------------------------------------------------
-... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
... |
7d4800ff2140c22010e9035606a2bd98edfa6736950c50efd80b1881e31a06f1 | lenn0x/Event-Notifier | fb303_types.erl | %%
Autogenerated by Thrift
%%
%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
%%
-module(fb303_types).
-include("fb303_types.hrl").
-export([struct_info/1]).
struct_info('i am a dummy struct') -> undefined.
| null | https://raw.githubusercontent.com/lenn0x/Event-Notifier/5b370624578f4610b4af71c989c13068c2cbbf58/if/fb303/if/gen-erl/fb303_types.erl | erlang |
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
| Autogenerated by Thrift
-module(fb303_types).
-include("fb303_types.hrl").
-export([struct_info/1]).
struct_info('i am a dummy struct') -> undefined.
|
19649a6f911157efedc853645a08fde4e44224c4081239120d5089289a6c6173 | KestrelInstitute/Specware | Tests.lisp | (test-directories ".")
(test
("Bug 0142 : Projections were printed out incorrectly"
:show "Ob#BadObl1"
:output '(";;; Elaborating obligator at $TESTDIR/Ob#BadObl1"
";;; Elaborating spec-morphism at $TESTDIR/Ob#BadObl1"
";;; Elaborating spec at $TESTDIR/Ob#S"
";;; Elaborating spec at $TESTDIR/Ob#T... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/TestSuite/Bugs/Bug_0142/Tests.lisp | lisp | " conjecture pp is project b (project a (z)) = 0" | (test-directories ".")
(test
("Bug 0142 : Projections were printed out incorrectly"
:show "Ob#BadObl1"
:output '(";;; Elaborating obligator at $TESTDIR/Ob#BadObl1"
";;; Elaborating spec-morphism at $TESTDIR/Ob#BadObl1"
";;; Elaborating spec at $TESTDIR/Ob#S"
";;; Elaborating spec at $TESTDIR/Ob#T... |
b780ca4863d4dca8781e4255671c832898c7619e2ab926f762a0dda667c2c506 | dQuadrant/kuber | Api.hs | module Kuber.Server.Api where | null | https://raw.githubusercontent.com/dQuadrant/kuber/43a00c8c761d424b27aa3a7b13a4879762e7e6a6/server/src/Kuber/Server/Api.hs | haskell | module Kuber.Server.Api where | |
4b501d2958fa2d0abb70288b4d2cb106e2f75c9aa0eac6b206ead1a784bb364d | pixlsus/registry.gimp.org_static | JMS-Space_Galaxy.scm | (define (fg/bg-selection image drawable)
(gimp-edit-bucket-fill drawable FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
(gimp-selection-invert image)
(gimp-edit-bucket-fill drawable BG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
)
(define (get-blending-mode-galaxy mode)
(let* ((modenumbers #(0 1 3 15 4 5 16 17 1... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/JMS-Space_Galaxy.scm | scheme | (define (fg/bg-selection image drawable)
(gimp-edit-bucket-fill drawable FG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
(gimp-selection-invert image)
(gimp-edit-bucket-fill drawable BG-BUCKET-FILL NORMAL-MODE 100 0 FALSE 0 0)
)
(define (get-blending-mode-galaxy mode)
(let* ((modenumbers #(0 1 3 15 4 5 16 17 1... | |
767cf8099fe572e613c4af09687786a1ff765d4eaf152125eacfce26b36716d7 | rmculpepper/gamble | intro-enum.rkt | Copyright ( c ) 2014
Released under the terms of the 2 - clause BSD license .
;; See the file COPYRIGHT for details.
#lang gamble
sum - n - flips :
(define (sum-n-flips n)
(if (zero? n)
0
(+ (bernoulli) (sum-n-flips (sub1 n)))))
(printf "enumerate (sum-n-flips 10)\n")
(enumerate (sum-n-flip... | null | https://raw.githubusercontent.com/rmculpepper/gamble/a5231e2eb3dc0721eedc63a77ee6d9333846323e/gamble/examples/intro-enum.rkt | racket | See the file COPYRIGHT for details.
------------------------------------------------------------
geom : Prob -> Nat
------------------------------------------------------------
------------------------------------------------------------
dropped the coin
----------------------------------------------------------... | Copyright ( c ) 2014
Released under the terms of the 2 - clause BSD license .
#lang gamble
sum - n - flips :
(define (sum-n-flips n)
(if (zero? n)
0
(+ (bernoulli) (sum-n-flips (sub1 n)))))
(printf "enumerate (sum-n-flips 10)\n")
(enumerate (sum-n-flips 10))
(define (geom p)
(if (flip p... |
48ec6ee5b922351ae1d8e843e40adbff266f04a7746bd145789bafd91aa82077 | hexlet-basics/exercises-clojure | index.clj | (ns index)
;BEGIN
(defn triple [x]
(list x x x))
;END
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/ede14102d01f9ef736e0af811cd92f5b22a83bc2/modules/25-lists/10-intro/index.clj | clojure | BEGIN
END | (ns index)
(defn triple [x]
(list x x x))
|
4d481350ac6264c9db84a4d4be2a47eb1ef079787ed7749ce51d16e476ab1eed | jwiegley/notes | Ertes.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE ExistentialQuantification #
module Ertes where
data Stream f m r = Step (f (Stream f m r))
| Delay (m (Stream f m r))
| Return r
data Step s a r = Done r | Skip s | Yield s a deriving Functor
data Stream' a m r = forall s. Stream' (s -> m (S... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Ertes.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE ExistentialQuantification #
module Ertes where
data Stream f m r = Step (f (Stream f m r))
| Delay (m (Stream f m r))
| Return r
data Step s a r = Done r | Skip s | Yield s a deriving Functor
data Stream' a m r = forall s. Stream' (s -> m (S... | |
c42e4f6697400466cf31aa54436511a8b71a5130401191908b38b1c05f4e1612 | oral-health-and-disease-ontologies/ohd-ontology | data-resource-classes.lisp | ;; this is the most general level class for data sources, resultsets, records, and iterators
;; all the classes inherit from this class
(defclass data-resource ()
())
| null | https://raw.githubusercontent.com/oral-health-and-disease-ontologies/ohd-ontology/ba3f502b86487c8ba5fa04ff8ba33312a1679570/src/vdw-translation/development-library/classes/data-resource-classes.lisp | lisp | this is the most general level class for data sources, resultsets, records, and iterators
all the classes inherit from this class | (defclass data-resource ()
())
|
c664548dddf0014c163301f1d39731167ec8780463e0d5383e60962157b531a3 | nikita-volkov/rebase | IO.hs | module Rebase.GHC.Conc.IO
(
module GHC.Conc.IO
)
where
import GHC.Conc.IO
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/GHC/Conc/IO.hs | haskell | module Rebase.GHC.Conc.IO
(
module GHC.Conc.IO
)
where
import GHC.Conc.IO
| |
3f5af23c573e9fe72760e55940453149745d2c0472e314c10f5c581957b035a3 | ZeusWPI/contests | cheated.hs | import Control.Applicative ((<$>))
import Control.Arrow ((>>>), (***))
import Control.Monad (replicateM_)
import Data.Ord (comparing)
import Text.Printf (printf)
type Student = (Int, Int)
data Pair = Pair {unPair :: (Student, Student)} deriving (Eq)
instance Ord Pair where
compare = comparing diff
diff :: Pai... | null | https://raw.githubusercontent.com/ZeusWPI/contests/d78aec91be3ce32a436d160cd7a13825d36bbf3a/2012-vpw/cheated.hs | haskell | import Control.Applicative ((<$>))
import Control.Arrow ((>>>), (***))
import Control.Monad (replicateM_)
import Data.Ord (comparing)
import Text.Printf (printf)
type Student = (Int, Int)
data Pair = Pair {unPair :: (Student, Student)} deriving (Eq)
instance Ord Pair where
compare = comparing diff
diff :: Pai... | |
c6fa71045b5c6f6330dec3c606b4071c2825156fb49321b2abf8ce515e129bef | janestreet/bonsai | single_factor.mli | * @inline
| null | https://raw.githubusercontent.com/janestreet/bonsai/c202b961f41e20e0b735c4e33c2bbac57a590941/web_ui/multi_select/src/single_factor.mli | ocaml | * @inline
| |
5e3db2ae18b291866b94ca88420f9ca4ac7ddfb1ef85989294ac293c1140d5b5 | oliyh/re-learn | views.cljs | (ns re-learn.views
(:require [goog.style :as gs]
[goog.string :as gstring]
[re-frame.core :as re-frame]
[re-learn.model :as model]
[re-learn.dom :refer [->absolute-bounds ->dimensions]]
[reagent.impl.component :as rc]
[dommy.core :as dom]
... | null | https://raw.githubusercontent.com/oliyh/re-learn/8fb3307554debb28b6545a4d38fa3b1ccfa43419/src/re_learn/views.cljs | clojure | (ns re-learn.views
(:require [goog.style :as gs]
[goog.string :as gstring]
[re-frame.core :as re-frame]
[re-learn.model :as model]
[re-learn.dom :refer [->absolute-bounds ->dimensions]]
[reagent.impl.component :as rc]
[dommy.core :as dom]
... | |
827f078ac525e3aa03ee3789441104a47a7e34c8e063fcc2fa216bcc50f2674f | glaebhoerl/simplecompiler | Type.hs | module Type (TypeInfo (..), Type (..), TypedName, Error (..), checkTypes, typeOf, ValidationError (..), validateTypes) where
import MyPrelude
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Pretty as P
import qualified AST
import AST (AST)
import qualified Name
import Name (Name... | null | https://raw.githubusercontent.com/glaebhoerl/simplecompiler/a207ceca64147be99d9ca52fc18624e03e19376a/src/Type.hs | haskell | ---------------------------------------------------------------------- types
stored for names of types in type annotations
stored for value-level names
---------------------------------------------------------------------- pretty-printing
---------------------------------------------------------------------- typechec... | module Type (TypeInfo (..), Type (..), TypedName, Error (..), checkTypes, typeOf, ValidationError (..), validateTypes) where
import MyPrelude
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Pretty as P
import qualified AST
import AST (AST)
import qualified Name
import Name (Name... |
e45221ca0f96ecc0c22c82ce995eaa2dd05c2c2ea9e9c46ddcbac3ce4410ca26 | modular-macros/ocaml-macros | printing.ml | (* PR#6650 *)
module type S = sig
class type c = object method m : int end
module M : sig
class type d = c
end
end;;
module F (X : S) = X.M;;
[%%expect{|
module type S =
sig
class type c = object method m : int end
module M : sig class type d = c end
end
module F : functor (X : S) -> sig class ty... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-modules/printing.ml | ocaml | PR#6650
PR#6648 |
module type S = sig
class type c = object method m : int end
module M : sig
class type d = c
end
end;;
module F (X : S) = X.M;;
[%%expect{|
module type S =
sig
class type c = object method m : int end
module M : sig class type d = c end
end
module F : functor (X : S) -> sig class type d = X.c end... |
2763a210d7ec967ee8a12ba702b034978d0e484afdc70144375db785e61f5545 | triffon/fp-2019-20 | recursion.rkt | #lang racket
; Throwback:
; - Типове
; - Всичко е стойност
- кода на scheme е на списъци
; - Функции (извикване, дефиниране)
; - quote и символи
; - define, if, cond
- рекурсия
; Не упражнихме всичко , но ето някои вградени функции ,
; показвани на лекции:
; *, +, -, /
remainder , quotient , , min , gcd , ... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-4/02/recursion.rkt | racket | Throwback:
- Типове
- Всичко е стойност
- Функции (извикване, дефиниране)
- quote и символи
- define, if, cond
Не упражнихме всичко , но ето някои вградени функции ,
показвани на лекции:
*, +, -, /
floor, ceiling, round
<, >, =, <=, >=
boolean?, number?, char?, string?, symbol?, procedure?
equal?
Гледайте... | #lang racket
- кода на scheme е на списъци
- рекурсия
remainder , quotient , , min , gcd , lcm
exp , expt , sqrt , log , sin , cos , tan , asin , acos , atan
zero ? , negative ? , positive ? , even ? , odd ?
!
(define (factorial n)
(if (= n 0)
1
(* n (factorial (- n 1)))))
ако бележим... |
62afccf63c2d508ff4d2ccdb94a2c89d4bc5b346c32c9189f434e9d2aa8500ea | cedlemo/ctypes-stubs-generation-notes | discover.ml | open Base
open Stdio
module C = Configurator
let write_sexp fn list_of_str =
let data = sexp_of_list sexp_of_string list_of_str |> Sexp.to_string in
Out_channel.write_all fn ~data
let write_flags file list_of_str =
let data = String.concat list_of_str ~sep:" " in
Out_channel.write_all file ~data
let () =
C... | null | https://raw.githubusercontent.com/cedlemo/ctypes-stubs-generation-notes/2a7d71919c38d90ddc1e54f4875e136b7398f36d/cstubs_gi_enums/config/discover.ml | ocaml | default ubuntu
default ubuntu | open Base
open Stdio
module C = Configurator
let write_sexp fn list_of_str =
let data = sexp_of_list sexp_of_string list_of_str |> Sexp.to_string in
Out_channel.write_all fn ~data
let write_flags file list_of_str =
let data = String.concat list_of_str ~sep:" " in
Out_channel.write_all file ~data
let () =
C... |
4584e3cec7f9b7d3616aea24cae55cd29d972b7d7b2d587843dd09ed0eaa1e9c | yzhs/ocamlllvm | complex.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/stdlib/complex.ml | ocaml | *********************************************************************
Objective Caml
... | , 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 GNU Library General Public License , with
$ Id$
type t = { re: float; im: flo... |
da84ed3302515b28791886cdbfb9cff46d7c3036c1256f4736417eabf276f182 | ocaml/ocaml | ocamltex.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/tools/ocamltex.ml | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Paris
, Nagoya University
Copyright 2018 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with th... |
67ab51d24baab60ab0272c2184b238e33319c8e2514a7dfa79bb56555fca99c4 | sharplispers/montezuma | packages.lisp | packages.lisp --- create an index from a directory tree
Copyright ( C ) 2008 , Yoni Rabkin < >
;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 3 of the
;; License, or (at... | null | https://raw.githubusercontent.com/sharplispers/montezuma/ee2129eece7065760de4ebbaeffaadcb27644738/contrib/montezuma-indexfiles/_darcs/pristine/packages.lisp | lisp | This program is free software; you can redistribute it and/or
either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... | packages.lisp --- create an index from a directory tree
Copyright ( C ) 2008 , Yoni Rabkin < >
modify it under the terms of the GNU General Public License as
You should have received a copy of the GNU General Public License
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA
02110 - 1301... |
f779d01a6d566561fe1bf5d8b390bc3bfe2998730313680feb3012c1b19f08c1 | mzp/coq-ide-for-ios | refl_omega.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
PROJET RNRT Calife - 2001
Author : France Télécom R&D
Licence : LGPL version 2.1
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/plugins/romega/refl_omega.ml | ocaml | \section{Useful functions and flags}
Especially useful debugging functions
More readable than the prefix notation
\section{Types}
\subsection{How to walk in a term}
To represent how to get to a proposition. Only choice points are
kept (branch to choose in a disjunction and identifier of the disjunctive
... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
PROJET RNRT Calife - 2001
Author : France Télécom R&D
Licence : LGPL version 2.1
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ... |
2504917f451b64ba7603716d6d98adcbd61be2d5b867cfc73f80459184ad106b | justinkirby/emetric | emetric_cmd_stop.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011
%%% @end
%%%
This source file is subject to the New BSD License . You should have received
%%% a copy of the New BSD license with this software. If not, it can be
%%% retrieved from: -license.php
%%%---------------... | null | https://raw.githubusercontent.com/justinkirby/emetric/6310f8f74a787100eb9d6356d2beffabc91fda1e/src/emetric_cmd_stop.erl | erlang | -------------------------------------------------------------------
@end
a copy of the New BSD license with this software. If not, it can be
retrieved from: -license.php
------------------------------------------------------------------- | @author < >
( C ) 2011
This source file is subject to the New BSD License . You should have received
-module(emetric_cmd_stop).
-behaviour(emetric_command).
-export([command_help/0,
deps/0,
run/0
]).
command_help() ->
{"stop","skip=true|false","Shutdown the emetric app on the --node "}.
dep... |
8d7f76c557537782b57e9b1105955b8b393602ca1eec6e58c673a58e13f4ab94 | mikpe/pdp10-tools | ld_output.erl | -*- erlang - indent - level : 2 -*-
%%%
ELF output for pdp10 - elf - ld
Copyright ( C ) 2020
%%%
This file is part of pdp10 - tools .
%%%
pdp10 - tools 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 Founda... | null | https://raw.githubusercontent.com/mikpe/pdp10-tools/99216b63317fe5b5ac18f1a0d3c81b464f8b8f40/erlang/apps/ld/src/ld_output.erl | erlang |
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
Output ======================================================================
ELF Header Output -------... | -*- erlang - indent - level : 2 -*-
ELF output for pdp10 - elf - ld
Copyright ( C ) 2020
This file is part of pdp10 - tools .
pdp10 - tools 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 , eithe... |
141701154b799a4b10e6ec05f5c2299f42103ba1383e50495f5092f3ca877ce4 | racket/web-server | iteration-9s.rkt | #lang web-server
(require "model-2.rkt")
;; start: request -> doesn't return
;; Consumes a request and produces a page that displays
;; all of the web content.
(define (start request)
(render-blog-page
(initialize-blog!
(build-path (current-directory)
"the-blog-data.db"))
request))
;;... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-doc/web-server/scribblings/tutorial/examples/iteration-9s.rkt | racket | start: request -> doesn't return
Consumes a request and produces a page that displays
all of the web content.
render-blog-page: blog request -> doesn't return
Sends an HTML page of the content of the
blog.
render-post-detail-page: post request -> doesn't return
Consumes a post and produces a detail page of the ... | #lang web-server
(require "model-2.rkt")
(define (start request)
(render-blog-page
(initialize-blog!
(build-path (current-directory)
"the-blog-data.db"))
request))
(define (render-blog-page a-blog request)
(define (response-generator embed/url)
(response/xexpr
`(html (head... |
c61b45293cad200000d82a60865cfc817b79d5aadc1301836f9c90160aeb1269 | freizl/dive-into-haskell | Contact.hs | # LANGUAGE TemplateHaskell , QuasiQuotes , OverloadedStrings #
module Handler.Contact where
import Helloyesod
getContactR :: Handler RepHtml
getContactR = do
defaultLayout $ do
setTitle "Contact"
addWidget $(widgetFile "contact")
| null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/web/yesod/helloyesod/Handler/Contact.hs | haskell | # LANGUAGE TemplateHaskell , QuasiQuotes , OverloadedStrings #
module Handler.Contact where
import Helloyesod
getContactR :: Handler RepHtml
getContactR = do
defaultLayout $ do
setTitle "Contact"
addWidget $(widgetFile "contact")
| |
93fbc7d45051adf8cef0c1fc7e808d0150e2343925540b83082795b293f635d8 | GaloisInc/ivory | Bits.hs | # LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
module Bits (runBits, cmodule) where
import Ivory.Compile.C.CmdlineFrontend
import Ivory.Language hiding (setBit, clearBit, runBits)
import MonadLib.Monads (runState, sets)
runBits :: IO ()
runBits = runCompiler [cmodule] [] initialOpts {outDir = Nothing}
cmodule ::... | null | https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory-examples/examples/Bits.hs | haskell | | Example of using "extractByte" with a state monad. | # LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
module Bits (runBits, cmodule) where
import Ivory.Compile.C.CmdlineFrontend
import Ivory.Language hiding (setBit, clearBit, runBits)
import MonadLib.Monads (runState, sets)
runBits :: IO ()
runBits = runCompiler [cmodule] [] initialOpts {outDir = Nothing}
cmodule ::... |
6cac88b15ece43a1bddd92da366e53585af8204acf8506af83b930a7039b1a67 | well-typed-lightbulbs/ocaml-esp32 | static.ml | let f = Abstract.print
| null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-dynlink-pr4229/static.ml | ocaml | let f = Abstract.print
| |
799480b9da69678a7f091a627befde7161e4ae8e47cd7ca246b83cd40c381342 | utahstreetlabs/risingtide | set.clj | (ns risingtide.feed.set
(:require [risingtide
[dedupe :refer [dedupe]]
[key :as key]
[active-users :refer [active-users]]]
[risingtide.feed
[expiration :refer [expire]]
[filters :refer [for-everything-feed?]]
[persist :refer [en... | null | https://raw.githubusercontent.com/utahstreetlabs/risingtide/bc5b798396679739469b1bd8ee1b03db76178cde/src/risingtide/feed/set.clj | clojure | (ns risingtide.feed.set
(:require [risingtide
[dedupe :refer [dedupe]]
[key :as key]
[active-users :refer [active-users]]]
[risingtide.feed
[expiration :refer [expire]]
[filters :refer [for-everything-feed?]]
[persist :refer [en... | |
73d5b3f5a439ff9fb99960ea4e985c20e3692cf6be7300842de23daeb70885c4 | biocom-uib/vpf-tools | Excepts.hs | {-# language DeriveAnyClass #-}
# language DeriveGeneric #
# language EmptyCase #
# language QuantifiedConstraints #
{-# language Strict #-}
# language TemplateHaskell #
{-# language UndecidableInstances #-}
module Control.Carrier.Error.Excepts
( module Control.Effect.Error
, Errors(..)
, MemberError
, ExceptsT... | null | https://raw.githubusercontent.com/biocom-uib/vpf-tools/dd88a543f28eb339cf0dcb89f34479c84b3a8056/src/Control/Carrier/Error/Excepts.hs | haskell | # language DeriveAnyClass #
# language Strict #
# language UndecidableInstances #
# inline algErrs #
# inline algErrs #
only required for the functional dependency | # language DeriveGeneric #
# language EmptyCase #
# language QuantifiedConstraints #
# language TemplateHaskell #
module Control.Carrier.Error.Excepts
( module Control.Effect.Error
, Errors(..)
, MemberError
, ExceptsT(..)
, runExceptsT
, runPureExceptsT
, runLastExceptT
, handleErrorCase
, ThrowError... |
fdaa08dfcca62c490e1f1e03ffa3f1f827a66a23ec18d89c9e38582b2f71268e | bennn/dissertation | tree.rkt | #lang typed/racket
(provide
tree-state
lplaced%
generate-tree
tree-next
hand-out?
HandOut
)
(require
require-typed-check
"../base/types.rkt"
"board-adapted.rkt"
"state-adapted.rkt"
)
(require/typed/check "basics.rkt"
(shares-available? (-> Shares (Listof Hotel) Boolean))
(shares-order? (-> An... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/acquire/typed/tree.rkt | racket | =============================================================================
Precondition: share-order
(define-type Tree (Instance ATree%))
Precondition: share-order?
Precondition: share-order?
-----------------------------------------------------------------------------
HandOut = (hand-out t st)
(tree<%>)
(abst... | #lang typed/racket
(provide
tree-state
lplaced%
generate-tree
tree-next
hand-out?
HandOut
)
(require
require-typed-check
"../base/types.rkt"
"board-adapted.rkt"
"state-adapted.rkt"
)
(require/typed/check "basics.rkt"
(shares-available? (-> Shares (Listof Hotel) Boolean))
(shares-order? (-> An... |
8196b8e3cbf07730e1880ef83672a7e80d6de1518d4adce1c794057fa623d54e | hopv/MoCHi | rose_tree.mli | type 'a t = Node of 'a * 'a t list
type path = int list
val leaf : 'a -> 'a t
val decomp : 'a t -> 'a * 'a t list
val label : 'a t -> 'a
val children : 'a t -> 'a t list
val root : 'a t -> 'a
val flatten : 'a t -> 'a list
val map : (path -> 'a -> 'b) -> 'a t -> 'b t
val fold : ('a -> 'b list -> 'b) -> 'a t -> 'b
val f... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/rose_tree.mli | ocaml | type 'a t = Node of 'a * 'a t list
type path = int list
val leaf : 'a -> 'a t
val decomp : 'a t -> 'a * 'a t list
val label : 'a t -> 'a
val children : 'a t -> 'a t list
val root : 'a t -> 'a
val flatten : 'a t -> 'a list
val map : (path -> 'a -> 'b) -> 'a t -> 'b t
val fold : ('a -> 'b list -> 'b) -> 'a t -> 'b
val f... | |
211e884f8e748a348abeff30f45e5421cbf43f657bf6717e6708c83071b457cd | marcoheisig/sb-simd | cpu-identification.lisp | (in-package #:sb-simd-internals)
#+x86-64
(progn
(defun cpuid (eax &optional (ecx 0))
(declare (type (unsigned-byte 32) eax ecx))
(sb-vm::%cpu-identification eax ecx))
(defun sse-supported-p ()
(and (>= (cpuid 0) 1)
(logbitp 25 (nth-value 3 (cpuid 1)))))
(defun sse2-supported-p ()
(and... | null | https://raw.githubusercontent.com/marcoheisig/sb-simd/fad8614bfb45b2faf331c3d88ee97412f084bb6f/code/cpu-identification.lisp | lisp | (in-package #:sb-simd-internals)
#+x86-64
(progn
(defun cpuid (eax &optional (ecx 0))
(declare (type (unsigned-byte 32) eax ecx))
(sb-vm::%cpu-identification eax ecx))
(defun sse-supported-p ()
(and (>= (cpuid 0) 1)
(logbitp 25 (nth-value 3 (cpuid 1)))))
(defun sse2-supported-p ()
(and... | |
ed5a4a55b33d7f96366d46a09c6f649d36d4db4061f6bd72612679c0233664a6 | mogenslund/liq2 | clojure_mode.cljc | (ns liq2.modes.clojure-mode
(:require [clojure.string :as str]
[liq2.modes.fundamental-mode :as fundamental-mode]
[liq2.editor :as editor :refer [apply-to-buffer switch-to-buffer get-buffer]]
[liq2.buffer :as buffer]
[liq2.util :as util]))
(def match
{:keyword-begin ... | null | https://raw.githubusercontent.com/mogenslund/liq2/66a323a75804154ea51c3ff9d3c23cbd26c9d24d/src/liq2/modes/clojure_mode.cljc | clojure | Context
style | (ns liq2.modes.clojure-mode
(:require [clojure.string :as str]
[liq2.modes.fundamental-mode :as fundamental-mode]
[liq2.editor :as editor :refer [apply-to-buffer switch-to-buffer get-buffer]]
[liq2.buffer :as buffer]
[liq2.util :as util]))
(def match
{:keyword-begin ... |
1cad734aa8134ce71d88dddf34b93692001f2b256a356adc7a392191381b6324 | AbstractMachinesLab/caramel | old_IO.ml | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/frontend/ocamlmerlin/old/old_IO.ml | ocaml | Fix for emacs: emacs start-process doesn't distinguish between stdout and
stderr. So we redirect stderr to /dev/null with sexp frontend. | { { { COPYING * (
This file is part of Merlin , an helper for ocaml editors
Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net >
refis.thomas(_)gmail.com >
< simon.castellan(_)iuwt.fr >
Permission is hereby granted , free... |
b26e6cfa23b614884204b35f4b601890da6edcd4133a01ff91b99198ffb6a3f7 | psyeugenic/eplot | egd_chart.erl | %%
Copyright ( C ) 2016
%%
%% File: egd_chart.erl
Author : Björn - Egil Dahlberg
Created : 2016 - 05 - 02
%%
-module(egd_chart).
-export([graph/1,
graph/2,
bar2d/1,
bar2d/2]).
-export([smart_ticksize/3]).
-type rgba() :: {byte(), byte(), byte(), byte()}.
-record(chart, {
... | null | https://raw.githubusercontent.com/psyeugenic/eplot/5d0d45b0afd38f10d430e4547cea4fd82f444d7e/src/egd_chart.erl | erlang |
File: egd_chart.erl
margin
Data boundingbox
Total chart width
Total chart height
colors
ordered color convention
graph specific
Name offset from top
Name drop offset
Name offset from RHS
bar2d specific
In:
Data :: [{Graphname :: atom() | string(), [{X,Y}]}]
Options :: [
% Metric options
{ ticks... | Copyright ( C ) 2016
Author : Björn - Egil Dahlberg
Created : 2016 - 05 - 02
-module(egd_chart).
-export([graph/1,
graph/2,
bar2d/1,
bar2d/2]).
-export([smart_ticksize/3]).
-type rgba() :: {byte(), byte(), byte(), byte()}.
-record(chart, {
type = png,
rend... |
b0b4e8b32cf190c9f9a39ec9393cf72cb6865d25d73b959f56667a3677f68493 | bytekid/mkbtt | termIndex.ml | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/termindexing/termIndex.ml | ocaml | ** OPENS **************************************************************
** MODULES ************************************************************
** SUBMODULES ********************************************************* | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... |
4c18b3db60887fbe8cd1a6061cb918cae65eeab5bfe65afbf1d1942b7f27e3b3 | rems-project/cerberus | tests.ml | open Global_ocaml
open Core
module E = Exception
(* use this to print a halting error message *)
let error str =
prerr_endline $ Colour.ansi_format [Colour.Red] ("ERROR: " ^ str);
exit 1
(* The return type of Core_run.run *)
type execution_result_full = Driver_ocaml.execution_result
(* The type we use to compare... | null | https://raw.githubusercontent.com/rems-project/cerberus/e0f817cebf331b1d9f741c1f82e129c93c99f33c/backend/common/tests.ml | ocaml | use this to print a halting error message
The return type of Core_run.run
The type we use to compare results of executions
We forget the order of the results
C programs | open Global_ocaml
open Core
module E = Exception
let error str =
prerr_endline $ Colour.ansi_format [Colour.Red] ("ERROR: " ^ str);
exit 1
type execution_result_full = Driver_ocaml.execution_result
type execution_result = (string Pset.set, Errors.t9) Exception.t3
let simplify_result (result : execution_result_f... |
62973babc7b112b5bf2b2b0fd46dc9ec5b5ce26407a0b9a106ea538c4f6e0fe8 | lavcraft/xmonad-config | xmobar.hs | Config {
font = "xft:Droid Sans Mono:size=9:bold:antialias=true"
bgColor = "#000000",
fgColor = "#ffffff",
position = Static { xpos = 0, ypos = 0, width = 1920, height = 16 },
lowerOnStart = True,
commands = [
Run Weather " UUDD " [ " -t","<station > : < tempC > C","-L","18","-H","25","--normal... | null | https://raw.githubusercontent.com/lavcraft/xmonad-config/7c0ce77526bfba4067d617ff91c6134c39c9be46/home/.xmonad/xmobar.hs | haskell | units: %
units: %
units: °C
units: °C | Config {
font = "xft:Droid Sans Mono:size=9:bold:antialias=true"
bgColor = "#000000",
fgColor = "#ffffff",
position = Static { xpos = 0, ypos = 0, width = 1920, height = 16 },
lowerOnStart = True,
commands = [
Run Weather " UUDD " [ " -t","<station > : < tempC > C","-L","18","-H","25","--normal... |
1d63f98caaea3d9a03aee137a6c19a14ca2fdcd48c8ba88f0ebb3989756a353f | nodew/haskell-dapr | StateManagement.hs | -- |
Module : . Client . HttpClient . StateManagement
-- Description : Manages Dapr state
-- Copyright : (c)
-- License : Apache-2.0
This module manages Dapr state
module Dapr.Client.HttpClient.StateManagement
( getState,
getBulkState,
saveState,
deleteState,
executeStateTransaction,
... | null | https://raw.githubusercontent.com/nodew/haskell-dapr/7e3a47835b479f5a54f79bbe3fce303428e55c75/dapr-http-client/src/Dapr/Client/HttpClient/StateManagement.hs | haskell | |
Description : Manages Dapr state
Copyright : (c)
License : Apache-2.0
| Queries the specified state store with the given query of type `StateQuery`. Note that underlying state store must support queries. | Module : . Client . HttpClient . StateManagement
This module manages Dapr state
module Dapr.Client.HttpClient.StateManagement
( getState,
getBulkState,
saveState,
deleteState,
executeStateTransaction,
queryState,
)
where
import Dapr.Client.HttpClient.Internal
import Dapr.Client.HttpC... |
9b43c5f1127aa22b05f12ced77bbf9c73970745e6c33dbc5912c02d5315113b2 | brendanhay/gogol | Update.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-shopping-content/gen/Gogol/ShoppingContent/Content/Shippingsettings/Update.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Updates the shipping settings of the account. Any fields that are not provided are deleted from the resource.
* Resource
** Constructing a Request
| Updates the shipping settings of the account. Any fields that are not provide... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
a60efe88e4800a4b78fca2673d5de4520379ba3ffd56b7c3b8681a136a4af1a2 | mitchellwrosen/dohaskell | Utils.hs | module Handler.Utils
( SortBy(..)
, addGetParam
, getCurrentRouteWithGetParams
, denyPermissionIfDifferentUser
, denyPermissionIfDoesntHaveAuthorityOver
, denyPermissionIfNotAdmin
, prettyAgo
) where
import Import
import Model.Browse
import Model.User (isAdministr... | null | https://raw.githubusercontent.com/mitchellwrosen/dohaskell/69aea7a42112557ac3e835b9dbdb9bf60a81f780/src/Handler/Utils.hs | haskell | | Pretty-print a time "ago".
TODO: Find a better home for this function.
| Get the current route with the current GET params.
Unsafe if getCurrentRoute would return Nothing.
| Add a new GET param to a list of GET params. | module Handler.Utils
( SortBy(..)
, addGetParam
, getCurrentRouteWithGetParams
, denyPermissionIfDifferentUser
, denyPermissionIfDoesntHaveAuthorityOver
, denyPermissionIfNotAdmin
, prettyAgo
) where
import Import
import Model.Browse
import Model.User (isAdministr... |
61c166a01f3704e1935becd33ecb87950c14c03c8b87591f529d98c7cf105453 | vzwGrey/mu | Util.hs | module Mu.Util (prettyAST) where
import qualified Data.Text as T
import Mu.Parser
-- | Turn an AST into a readable standard notation for lambda calculus terms.
prettyAST :: AST -> T.Text
prettyAST (Variable v) = v
prettyAST (Abstraction v b@(Application _ _)) = "λ" <> v <> ".(" <> prettyAST b <... | null | https://raw.githubusercontent.com/vzwGrey/mu/345b0392cdb25fb096d340e5414f493760c8a612/app/Mu/Util.hs | haskell | | Turn an AST into a readable standard notation for lambda calculus terms. | module Mu.Util (prettyAST) where
import qualified Data.Text as T
import Mu.Parser
prettyAST :: AST -> T.Text
prettyAST (Variable v) = v
prettyAST (Abstraction v b@(Application _ _)) = "λ" <> v <> ".(" <> prettyAST b <> ")"
prettyAST (Abstraction v b) = "λ" <> v <> "." <> prett... |
4a359b6c438b070a3baed10a422532ffada75fe0543af79c40e889a520efa748 | clojure-lsp/clojure-lsp | stubs.clj | (ns clojure-lsp.feature.stubs
(:require
[babashka.fs :as fs]
[clj-easy.stub.core :as stub]
[clojure-lsp.db :as db]
[clojure-lsp.kondo :as lsp.kondo]
[clojure-lsp.logger :as logger]
[clojure-lsp.shared :as shared]
[clojure.java.io :as io]
[clojure.string :as string])
(:import
(java.io File... | null | https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/55752ff8999092ed5d2b7320c42a50dfb5936045/lib/src/clojure_lsp/feature/stubs.clj | clojure | (ns clojure-lsp.feature.stubs
(:require
[babashka.fs :as fs]
[clj-easy.stub.core :as stub]
[clojure-lsp.db :as db]
[clojure-lsp.kondo :as lsp.kondo]
[clojure-lsp.logger :as logger]
[clojure-lsp.shared :as shared]
[clojure.java.io :as io]
[clojure.string :as string])
(:import
(java.io File... | |
e3c363a466213d2bee8174f9d85f00971481a52141984a6004bb37e3691141e2 | jordanthayer/ocaml-search | assoca.ml | $ I d : backedht.ml , v 1.1 2003/09/26 23:39:02 ruml Exp ruml $
associative arrays
maps keys to values like alists but easier to modify destructively .
associative arrays
maps keys to values like alists but easier to modify destructively.
*)
type ('a * 'b) t = ('a array) * ('b array)
l... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/structs/assoca.ml | ocaml | * given list of keys that will be used, init values by mapping
using [f]
* can raise Not_found
* can raise Not_found | $ I d : backedht.ml , v 1.1 2003/09/26 23:39:02 ruml Exp ruml $
associative arrays
maps keys to values like alists but easier to modify destructively .
associative arrays
maps keys to values like alists but easier to modify destructively.
*)
type ('a * 'b) t = ('a array) * ('b array)
l... |
9ea7b88101ac0d980fb82e4af7996d941266b8d733c7c272134c6f96452c4ee2 | mariari/Misc-Lisp-Scripts | state.lisp | (defpackage #:state
(:nicknames #:s)
(:documentation "provides the state monad")
(:use #:common-lisp
#:tuple
#:trivia
#:generic)
(:export :make-state
:state-p
:state-run
:sget
:put
:modify
:spure))
(in-package :state)
(e... | null | https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/data-structures/state.lisp | lisp | (defpackage #:state
(:nicknames #:s)
(:documentation "provides the state monad")
(:use #:common-lisp
#:tuple
#:trivia
#:generic)
(:export :make-state
:state-p
:state-run
:sget
:put
:modify
:spure))
(in-package :state)
(e... | |
387526ae00fb0a8d1f7b8c7c868fdf57fd3aec928067d715e1263ca1faca2061 | polyfy/polylith | m107_missing_componens_in_project.clj | (ns polylith.clj.core.validator.m107-missing-componens-in-project
(:require [clojure.set :as set]
[clojure.string :as str]
[polylith.clj.core.validator.shared :as shared]
[polylith.clj.core.util.interface :as util]
[polylith.clj.core.util.interface.color :as color])
(... | null | https://raw.githubusercontent.com/polyfy/polylith/36b75565032dea88ee20cdc0bc5af18f6f4d4cf4/components/validator/src/polylith/clj/core/validator/m107_missing_componens_in_project.clj | clojure | (ns polylith.clj.core.validator.m107-missing-componens-in-project
(:require [clojure.set :as set]
[clojure.string :as str]
[polylith.clj.core.validator.shared :as shared]
[polylith.clj.core.util.interface :as util]
[polylith.clj.core.util.interface.color :as color])
(... | |
9acda6523d31319f1c585ce42b06a8805398b5d4ca459f48a509b0bbba21d3f9 | vouillon/osm | line_smoothing.mli | OSM tools
* Copyright ( C ) 2013
*
* 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 opti... | null | https://raw.githubusercontent.com/vouillon/osm/a42d1bcc82a4ad73c26c81ac7a75f9f1c7470344/osm/line_smoothing.mli | ocaml | OSM tools
* Copyright ( C ) 2013
*
* 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 opti... | |
a6c559e65844f8145bd8b5425d1127df757d7c9319192bca69a7f4fb95b0ca43 | Opetushallitus/aipal | project.clj | Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus
;;
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
of the EUPL ( the " Licence " ) ;
;;
;; You may not use this work except... | null | https://raw.githubusercontent.com/Opetushallitus/aipal/767bd14ec7153dc97fdf688443b9687cdb70082f/aipal-db/project.clj | clojure |
You may not use this work except in compliance with the Licence.
You may obtain a copy of the Licence at: /
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | Copyright ( c ) 2013 The Finnish National Board of Education - Opetushallitus
This program is free software : Licensed under the EUPL , Version 1.1 or - as
soon as they will be approved by the European Commission - subsequent versions
European Union Public Licence for more details .
(defproject aipal-db "0.1... |
5ffbed28596b442ec2b07bfcc9007d8068a8d325d50faf2ae1c15b9bf9ca6eae | binghe/PCL | inline.lisp | -*-Mode : LISP ; Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*-
(in-package :pcl)
;; This file contains some of the things that will have to change to support
;; inlining of methods.
(defun make-method-lambda-internal (method-lambda &optional env)
(unless (and (consp method-lambda) (eq (car method-lambda... | null | https://raw.githubusercontent.com/binghe/PCL/7021c061c5eef1466e563c4abb664ab468ee0d80/pcl/inline.lisp | lisp | Package:(PCL LISP 1000 ) ; ; Syntax : Common - lisp -*-
This file contains some of the things that will have to change to support
inlining of methods.
Remove the documentation string and insert the
appropriate class declarations. The documentation
string is removed to make it easy for us to insert
new declarat... |
(in-package :pcl)
(defun make-method-lambda-internal (method-lambda &optional env)
(unless (and (consp method-lambda) (eq (car method-lambda) 'lambda))
(error "The method-lambda argument to make-method-lambda, ~S,~
is not a lambda form" method-lambda))
(multiple-value-bind (documentation declarat... |
9f9c3893fc81ebc4d957f7921356cbdbb915efdd1488380ff5b7c120fc977261 | dharmatech/abstracting | source.scm |
by
;;
;; Original piece:
;;
Ported to Abstracting by
(size 500 500)
(set! *frames-per-second* 30)
(init-nodebox)
(stroke 0.0)
(set! *draw*
(let ((rotate
(let ((x 0)
(y 0))
(lambda ()
(set! x (+ x 0.5))
(set! y (... | null | https://raw.githubusercontent.com/dharmatech/abstracting/9dc5d9f45a9de03c6ee379f1928ebb393dfafc52/examples/jitter-bug/source.scm | scheme |
Original piece:
|
by
Ported to Abstracting by
(size 500 500)
(set! *frames-per-second* 30)
(init-nodebox)
(stroke 0.0)
(set! *draw*
(let ((rotate
(let ((x 0)
(y 0))
(lambda ()
(set! x (+ x 0.5))
(set! y (+ y 1.0))
... |
523b578732796a527c9c6ceb6de091a829f5be71c205924b392417e0de9ae951 | tek/polysemy-http | Request.hs | {-# options_haddock prune #-}
-- |Description: Request Combinators, Internal
module Polysemy.Http.Request where
import qualified Data.Text as Text
import Data.Time (UTCTime (UTCTime))
import Data.Time.Calendar (fromGregorian)
import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
import Exon (exon)
import Network.HTTP.... | null | https://raw.githubusercontent.com/tek/polysemy-http/1e639e3e0f26074ec3aba366bd9a9ce8832f86ec/packages/polysemy-http/lib/Polysemy/Http/Request.hs | haskell | # options_haddock prune #
|Description: Request Combinators, Internal
|Create a request with empty headers, query and cookies.
|Create a request with default port and empty headers, query and cookies.
|Parse the URL and create a request or return a parse error.
|Parse URL for a GET.
|Parse URL for a POST.
|Parse... |
module Polysemy.Http.Request where
import qualified Data.Text as Text
import Data.Time (UTCTime (UTCTime))
import Data.Time.Calendar (fromGregorian)
import Data.Time.Clock.POSIX (posixSecondsToUTCTime)
import Exon (exon)
import Network.HTTP.Client (Cookie (Cookie))
import Network.HTTP.Client.Internal (CookieJar (CJ, ... |
0700f2c36a6ad1c6a6a6b98a0d108f206eb7d49684a97b990a30f76b629b0ffa | justinkirby/emetric | emetric_loadable.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2011
%%% @end
%%%
This source file is subject to the New BSD License . You should have received
%%% a copy of the New BSD license with this software. If not, it can be
%%% retrieved from: -license.php
%%%---------------... | null | https://raw.githubusercontent.com/justinkirby/emetric/6310f8f74a787100eb9d6356d2beffabc91fda1e/src/emetric_loadable.erl | erlang | -------------------------------------------------------------------
@end
a copy of the New BSD license with this software. If not, it can be
retrieved from: -license.php
------------------------------------------------------------------- | @author < >
( C ) 2011
This source file is subject to the New BSD License . You should have received
-module(emetric_loadable).
-export([behaviour_info/1]).
behaviour_info(callbacks) ->
[{deps,0},
{sup,0}
];
behaviour_info(_Other) ->
undefined.
|
26d95b738def0b32a36a98d48d96848980af4a099e03319bba02e573d1f85049 | sneeuwballen/zipperposition | AC.mli |
This file is free software , part of Zipperposition . See file " license " for more details .
* { 1 AC redundancy }
open Logtk
type spec = AC_intf.spec
module type S = AC_intf.S
module Make(Env: Env.S) : S with module Env = Env
val key_ac : (module S) Flex_state.key
val extension : Extensions.t
| null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/prover/AC.mli | ocaml |
This file is free software , part of Zipperposition . See file " license " for more details .
* { 1 AC redundancy }
open Logtk
type spec = AC_intf.spec
module type S = AC_intf.S
module Make(Env: Env.S) : S with module Env = Env
val key_ac : (module S) Flex_state.key
val extension : Extensions.t
| |
720a3f27acda480b810e0b50668f9aba898016cee8511f4d68d8eb5ffef208b7 | sadiqj/ocaml-esp32 | find_recursive_functions.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/middle_end/find_recursive_functions.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-4-9-30-40-41-42"]
let in_function_declaration... |
58d57f13aa84afd9a334ba85239a71eee4f7111b381f2319ad5c201ecff8f567 | grin-compiler/ghc-grin | Main.hs | module Main where
import Prog (prog)
# ifdef PAR
--main input = prog input
--#else
-- partain: doesn't actually look at input;
real input is wired into Key.lhs
main = do
str <- getContents
putStr (prog str)
--#endif
| null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-grin-benchmark/boquist-grin-bench/spectral/cichelli/Main.hs | haskell | main input = prog input
#else
partain: doesn't actually look at input;
#endif | module Main where
import Prog (prog)
# ifdef PAR
real input is wired into Key.lhs
main = do
str <- getContents
putStr (prog str)
|
c512ba3f2cb57db52cd65679db91a67e64872ec521589863956d341baee4f410 | turquoise-hexagon/euler | solution.scm | (import
(chicken fixnum))
(define (f n)
(let loop ((n n) (acc 0))
(if (fx= n 0)
acc
(loop (fx/ n 10)
(let ((_ (fxmod n 10)))
(fx+ acc (fx* _ _)))))))
(define (make-valid? n)
(let ((acc (make-vector (fx+ n 1))))
(vector-set! acc 1 #f)
(vector-set! acc 89 #t)
(define... | null | https://raw.githubusercontent.com/turquoise-hexagon/euler/5e4b99a08bc2e99803755c8cfc8df46e99dc8589/src/092/solution.scm | scheme | (import
(chicken fixnum))
(define (f n)
(let loop ((n n) (acc 0))
(if (fx= n 0)
acc
(loop (fx/ n 10)
(let ((_ (fxmod n 10)))
(fx+ acc (fx* _ _)))))))
(define (make-valid? n)
(let ((acc (make-vector (fx+ n 1))))
(vector-set! acc 1 #f)
(vector-set! acc 89 #t)
(define... | |
e668f3d5473dbb70d034c05e80a8d3c9cbd4e12715df08c5e3572a1223c1024b | tnelson/Forge | reader.rkt | #lang racket/base
(require racket/port)
(require forge/check-ex-spec/library)
(require (only-in racket/function curry))
(define (filter-commands parse-tree keep)
(filter (lambda (line) (member (car line) keep)) parse-tree))
(define (read-syntax path port)
(define assignment-name (read port))
(unless (string? a... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/check-ex-spec/core/lang/reader.rkt | racket | Auto-provide all defined values
Used for evaluator
,@parse-tree)) | #lang racket/base
(require racket/port)
(require forge/check-ex-spec/library)
(require (only-in racket/function curry))
(define (filter-commands parse-tree keep)
(filter (lambda (line) (member (car line) keep)) parse-tree))
(define (read-syntax path port)
(define assignment-name (read port))
(unless (string? a... |
e54875b019572badef00b02191b6b30f22b878e51f3df16789b87e87f23b0264 | elaforge/karya | Args_test.hs | Copyright 2020
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Derive.Args_test where
import qualified Derive.Args as Args
import qualified Derive.Call as Call
import qualified Derive.Call.CallTest as CallTest
import qualified Derive.Derive as... | null | https://raw.githubusercontent.com/elaforge/karya/8ea15e6a5fb57e2f15f8c19836751e315f9c09f2/Derive/Args_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 2020
module Derive.Args_test where
import qualified Derive.Args as Args
import qualified Derive.Call as Call
import qualified Derive.Call.CallTest as CallTest
import qualified Derive.Derive as Derive
import qualified Derive.DeriveTest as DeriveTest
import qualified Ui.UiTest as UiTest
import ... |
9570f74b7599b79cd67d4105d505e3e06d22dec29fc34f773e3155d7df6c5497 | marcoheisig/Petalisp | machine-learning.lisp | (in-package :common-lisp-user)
(defpackage #:petalisp.examples.machine-learning
(:use
#:common-lisp
#:petalisp)
(:export
#:trainable-parameter
#:softmax
#:relu
#:make-fully-connected-layer
#:make-convolutional-layer
#:make-maxpool-layer))
(in-package #:petalisp.examples.machine-learning)
... | null | https://raw.githubusercontent.com/marcoheisig/Petalisp/63cfa80d5c482964a5ea9ea03019ab3223d506ec/examples/machine-learning.lisp | lisp |
Trainable Parameters
Machine Learning Building Blocks
Determine the dimension of the stencil.
Determine the bounding box of the stencil.
Use the bounding box to compute the shape of the result.
Compute the result.
Training
Determine the training data size.
Iterate over the training data.
Assemble the ar... | (in-package :common-lisp-user)
(defpackage #:petalisp.examples.machine-learning
(:use
#:common-lisp
#:petalisp)
(:export
#:trainable-parameter
#:softmax
#:relu
#:make-fully-connected-layer
#:make-convolutional-layer
#:make-maxpool-layer))
(in-package #:petalisp.examples.machine-learning)
... |
30bf42ec2abce621f2988d29ef50f451aa1a6c7c99decce7db100a53c452195c | noprompt/meander | epsilon.cljc | (ns ^:no-doc meander.match.runtime.epsilon
"Functions used by the pattern matcher at runtime."
(:require [meander.util.epsilon :as r.util]
[clojure.walk :as walk]
[clojure.set :as set]
[clojure.zip :as zip]))
(def permutations r.util/permutations)
(def k-combinations r.util/k-co... | null | https://raw.githubusercontent.com/noprompt/meander/8c0e9457befea5eee71a94a6d8726ed5916875dc/src/meander/match/runtime/epsilon.cljc | clojure | (ns ^:no-doc meander.match.runtime.epsilon
"Functions used by the pattern matcher at runtime."
(:require [meander.util.epsilon :as r.util]
[clojure.walk :as walk]
[clojure.set :as set]
[clojure.zip :as zip]))
(def permutations r.util/permutations)
(def k-combinations r.util/k-co... | |
d352c86d7d3df5957d16798b5fc60da3985a17a30778aca94cc00668bd283169 | fission-codes/fission | Prelude.hs | module Fission.Test.CLI.Prelude
( module Fission.Prelude
--
, module Test.Tasty
, module Test.Tasty.Hspec
, module Test.QuickCheck
--
, itsProp'
, shouldHaveRun
) where
import Test.Tasty (TestTree, defaultMain, testGroup)
import Test.Tasty.Hspec
import Te... | null | https://raw.githubusercontent.com/fission-codes/fission/9f28864905c1f39421ec08b05f31d1498770fe38/fission-cli/test/Fission/Test/CLI/Prelude.hs | haskell | module Fission.Test.CLI.Prelude
( module Fission.Prelude
, module Test.Tasty
, module Test.Tasty.Hspec
, module Test.QuickCheck
, itsProp'
, shouldHaveRun
) where
import Test.Tasty (TestTree, defaultMain, testGroup)
import Test.Tasty.Hspec
import Test.QuickCh... | |
1055dc46472270ae7b26134660c3525b89b5990687fa856bc29ae5d5bb085955 | JoeKennedy/fantasy | LeagueSpec.hs | module Handler.LeagueSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getLeaguesR" $ do
error "Spec not implemented: getLeaguesR"
| null | https://raw.githubusercontent.com/JoeKennedy/fantasy/eb9dc9bf6074be5c5ca951e323c6497676424dda/test/Handler/LeagueSpec.hs | haskell | module Handler.LeagueSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getLeaguesR" $ do
error "Spec not implemented: getLeaguesR"
| |
c3d81ddf95640281346885b3cbe378537343b2651a7f92748272633bd6bf1c28 | commercialhaskell/stack | Foo.hs | module Foo () where
import Control.Monad.IO.Unlift ()
| null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/5272-only-locals/files/src/Foo.hs | haskell | module Foo () where
import Control.Monad.IO.Unlift ()
| |
dbe975c23504ac7e126d5c9b2d87d192f41df94eb9f61d817f995d186b877db4 | hatsugai/CCLV | col.ml | open Printf
exception Error of string
module List =
struct
include List
let iteri2 f xs ys =
let rec loop i xs ys =
match xs, ys with
x::xs', y::ys' ->
f i x y; loop (i+1) xs' ys'
| _, _ -> ()
in loop 0 xs ys
let fold_lefti f acc xs =
let rec fold ... | null | https://raw.githubusercontent.com/hatsugai/CCLV/c661c1814f31471ba1eba7ad1d9949e3c5ae9144/src/col.ml | ocaml | open Printf
exception Error of string
module List =
struct
include List
let iteri2 f xs ys =
let rec loop i xs ys =
match xs, ys with
x::xs', y::ys' ->
f i x y; loop (i+1) xs' ys'
| _, _ -> ()
in loop 0 xs ys
let fold_lefti f acc xs =
let rec fold ... | |
7977721c5a0ba5e011bff21793ea5be9a2c6fe70830065b66016460b613ad179 | RichiH/git-annex | Concurrent.hs | git - annex concurrent state
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Annex.Concurrent where
import Annex
import Annex.Common
import Annex.Action
import qualified A... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Annex/Concurrent.hs | haskell | avoid sharing eg, open file handles | git - annex concurrent state
-
- Copyright 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Annex.Concurrent where
import Annex
import Annex.Common
import Annex.Action
import qualified A... |
3dfd6c733b6330fac9e7ec8e5256c007415f73543a4f01898e44268c647fa92f | rfkm/zou | generic_test.clj | (ns zou.web.view.generic-test
(:require [clojure.test :as t]
[midje.sweet :refer :all]
[zou.component :as c]
[zou.finder.proto :as fproto]
[zou.web.view.generic :as sut]
[zou.web.view.proto :as vproto]))
(t/deftest generate-view-test
(facts
(let [tb... | null | https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/web/test/zou/web/view/generic_test.clj | clojure | can override
callable | (ns zou.web.view.generic-test
(:require [clojure.test :as t]
[midje.sweet :refer :all]
[zou.component :as c]
[zou.finder.proto :as fproto]
[zou.web.view.generic :as sut]
[zou.web.view.proto :as vproto]))
(t/deftest generate-view-test
(facts
(let [tb... |
08c9b70721481898a3449403c759c180b3182d9e20057ef2d5974649a799b123 | finnishtransportagency/harja | hae_komponenttityypit.clj | (ns harja.palvelin.integraatiot.reimari.sanomat.hae-komponenttityypit
"Harja-Reimari integraation HaeKomponenttiTyypit-operaation XML-sanomien
luku.
ks. resources/xsd/reimari/harja.xsd"
(:require [harja.tyokalut.xml :as xml]
[clojure.data.zip.xml :as z]
[taoensso.timbre :as log]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/8ce0e702df98ccabbda42b088b901f013f0c97d8/src/clj/harja/palvelin/integraatiot/reimari/sanomat/hae_komponenttityypit.clj | clojure | (ns harja.palvelin.integraatiot.reimari.sanomat.hae-komponenttityypit
"Harja-Reimari integraation HaeKomponenttiTyypit-operaation XML-sanomien
luku.
ks. resources/xsd/reimari/harja.xsd"
(:require [harja.tyokalut.xml :as xml]
[clojure.data.zip.xml :as z]
[taoensso.timbre :as log]
... | |
bc4f4fe7c4a14c1704be21d44dd132e119dadeb0c9214bb9e4308fd291a25ad7 | guibou/streamray | Sampling.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DataKinds #
# LANGUAGE ViewPatterns #
-- | Sampling interface
module Streamray.Sampling
( sampleCosinus,
rotateVector,
uniformF,
uniform2F,
makeBase,
Sample2D (..),
sampleCosinusMax,
sampleSphere,
sampleHemiSphere,
sampleCosinusLobe,
pd... | null | https://raw.githubusercontent.com/guibou/streamray/a401f3b18b5afa571afcea32b928115155b68ef1/src/Streamray/Sampling.hs | haskell | # LANGUAGE BangPatterns #
| Sampling interface
# UNPACK #
# UNPACK #
| Sampling random point on unit sphere
From /~philip.dutre/GI/TotalCompendium.pdf
Formula 33
| Sampling random point on unit hemisphere
From /~philip.dutre/GI/TotalCompendium.pdf
Formula 34
| Sampling proportional to cosinus weighted on hemisp... | # LANGUAGE DataKinds #
# LANGUAGE ViewPatterns #
module Streamray.Sampling
( sampleCosinus,
rotateVector,
uniformF,
uniform2F,
makeBase,
Sample2D (..),
sampleCosinusMax,
sampleSphere,
sampleHemiSphere,
sampleCosinusLobe,
pdfSampleCosinusLobe,
pdfSamplingCosinusMax,
)
whe... |
8b93f686482faba31e66bf29d5f1f99a7c87e65c2679f033588b63ea7583a129 | Snapbrillia/quadraticvoting | Help.hs | module CLI.Help
( generic
, forGenerating
, forEndpoint
) where
import qualified Data.List as List
generic :: String
generic =
-- {{{
"\nQVF off-chain assistive CLI application."
++ "\n"
++ "\nYou can separately print the guide for each endpoint with"
++ "\n(-h|--help|man) following the desired... | null | https://raw.githubusercontent.com/Snapbrillia/quadraticvoting/f75cafee5df51d0b05a62a1af5573c874aaf7ba5/quadraticVoting/src/CLI/Help.hs | haskell | {{{
}}}
{{{
}}}
{{{
}}}
{{{ ENDPOINTS:
{{{
{{{
}}}
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
govInputStr : infoInputStr : projInputStr : fileNamesJSON
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
}}}
{{{
... | module CLI.Help
( generic
, forGenerating
, forEndpoint
) where
import qualified Data.List as List
generic :: String
generic =
"\nQVF off-chain assistive CLI application."
++ "\n"
++ "\nYou can separately print the guide for each endpoint with"
++ "\n(-h|--help|man) following the desired action. ... |
514c8d441350d2f4970e6a334c70e9da4fbb102de17604c78c5c9753f58fc464 | BranchTaken/Hemlock | test_push.ml | open! Basis.Rudiments
open! Basis
open Stream
let test () =
let rec test_push_up_to t i n = begin
match i <= n with
| false -> ()
| true -> begin
let t' = push i t in
File.Fmt.stdout
|> Fmt.fmt "push "
|> Uns.pp i
|> Fmt.fmt " "
|> (pp Uns.pp) t
|> ... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/stream/test_push.ml | ocaml | open! Basis.Rudiments
open! Basis
open Stream
let test () =
let rec test_push_up_to t i n = begin
match i <= n with
| false -> ()
| true -> begin
let t' = push i t in
File.Fmt.stdout
|> Fmt.fmt "push "
|> Uns.pp i
|> Fmt.fmt " "
|> (pp Uns.pp) t
|> ... | |
1042536a4f3da09effc97d7810e262a1a805b7fb8bf71dbd85aacd1b6aa268ae | alezost/stumpwm-config | stumpwm-user-attempt.lisp | 2019 - 04 - 16 I tried to move from ` : stumpwm ' to ` : stumpwm - user ' module
;; by prepending the following code to my "init.lisp" (and replacing
` : stumpwm ' module name in other files ) . Unfortunately , it did n't
work in one very important place ( maybe in some others as well , but
;; this one is enoug... | null | https://raw.githubusercontent.com/alezost/stumpwm-config/cb32c8c4e34a183d96b2069e4b23ee15931890da/unused/stumpwm-user-attempt.lisp | lisp | by prepending the following code to my "init.lisp" (and replacing
this one is enough). When I pressed "s-t c" (bound to `colon'
command), I got the following echo message:
prefixing them with `stumpwm::'). And since I use these symbols in
my config, I export them here.
Key maps and procedures
Colors | 2019 - 04 - 16 I tried to move from ` : stumpwm ' to ` : stumpwm - user ' module
` : stumpwm ' module name in other files ) . Unfortunately , it did n't
work in one very important place ( maybe in some others as well , but
Error In Command ' colon ' : unknown type specifier : FLOAT - GROUP
Apparently , it... |
e7736157a8a88092955d0b6166a0fcbe34b4f67e51dd4d8db4265294cdb8926a | jvf/scalaris | iblt.erl | 2011 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
%
% Unless required by applicable law or agreed to in writing, software
distribut... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/src/rrepair/iblt.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 gov... | 2011 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 < >
@doc Invertible Bloom Lookup Table
Operations : Insert , Delete , Get , ListEntries
1 ) M.T. G... |
ffc3e496ce836bcbf23c162c82568758788b6dfe7a43ebe141dac55641499ad1 | matijapretnar/eff | substitution.ml | (** Substitution implementation *)
open Utils
type t = {
type_param_to_type_coercions :
Coercion.ty_coercion Type.TyCoercionParam.Map.t;
type_param_to_type_subs : Type.ty Type.TyParam.Map.t;
dirt_var_to_dirt_coercions :
Coercion.dirt_coercion Type.DirtCoercionParam.Map.t;
dirt_var_to_dirt_subs : Dirt.... | null | https://raw.githubusercontent.com/matijapretnar/eff/1be07f0c7fbaadf5c28437bf11fe818aa76640e7/src/01-language/substitution.ml | ocaml | * Substitution implementation
Substitution application
Really consider other cases
Other type information
Printing and other debug stuff |
open Utils
type t = {
type_param_to_type_coercions :
Coercion.ty_coercion Type.TyCoercionParam.Map.t;
type_param_to_type_subs : Type.ty Type.TyParam.Map.t;
dirt_var_to_dirt_coercions :
Coercion.dirt_coercion Type.DirtCoercionParam.Map.t;
dirt_var_to_dirt_subs : Dirt.t Dirt.Param.Map.t;
skel_param_to... |
d0e71c89900086249d7b4e20e68b8283df5e76e8aa5c5a09d877d7ba95a3d473 | reanimate/reanimate | doc_pauseAround.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ pauseAround 1 1 drawProgress
| null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/doc_pauseAround.hs | haskell | stack runghc --package reanimate | #!/usr/bin/env stack
module Main(main) where
import Reanimate
import Reanimate.Builtin.Documentation
main :: IO ()
main = reanimate $ docEnv $ pauseAround 1 1 drawProgress
|
832497d3b13c818e4543939df98ff9bdf9654391041af7a5771c1d8a21ff237f | mbutterick/pollen | markdown.rkt | #lang s-exp pollen/private/dialect
default-mode-markdown
(module reader "private/reader-base.rkt"
default-mode-markdown)
| null | https://raw.githubusercontent.com/mbutterick/pollen/a4910a86dc62d1147f3aad94b56cecd6499d7aa6/pollen/markdown.rkt | racket | #lang s-exp pollen/private/dialect
default-mode-markdown
(module reader "private/reader-base.rkt"
default-mode-markdown)
| |
ce2b6ebaa7fb38775089fe24931af88a66c75eafc5339eb4f07d0d8ad2ff9906 | circuithub/rel8 | Each.hs | {-# language FlexibleContexts #-}
# language MonoLocalBinds #
module Rel8.Query.Each
( each
)
where
-- base
import Prelude
-- opaleye
import qualified Opaleye.Table as Opaleye
-- rel8
import Rel8.Query ( Query )
import Rel8.Query.Opaleye ( fromOpaleye )
import Rel8.Schema.Name ( Selects )
import Rel8.Schema.Tab... | null | https://raw.githubusercontent.com/circuithub/rel8/97d89cf8b01070fa7a9254f8a6834322474be48e/src/Rel8/Query/Each.hs | haskell | # language FlexibleContexts #
base
opaleye
rel8 | # language MonoLocalBinds #
module Rel8.Query.Each
( each
)
where
import Prelude
import qualified Opaleye.Table as Opaleye
import Rel8.Query ( Query )
import Rel8.Query.Opaleye ( fromOpaleye )
import Rel8.Schema.Name ( Selects )
import Rel8.Schema.Table ( TableSchema )
import Rel8.Table.Cols ( fromCols, toCols ... |
06d7d017574a50962d0a2613e89d71fb0c46e2506f5d45a87a0cbb5f19c6676d | eugeneia/athens | encode.lisp | (in-package :cl-user)
(defpackage jonathan.encode
(:use :cl
:annot.doc
:jonathan.util)
(:import-from :fast-io
:fast-write-byte
:make-output-buffer
:finish-output-buffer)
(:import-from :trivial-types
:association-list-p)
(:export :wr... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/jonathan-20180430-git/src/encode.lisp | lisp | (in-package :cl-user)
(defpackage jonathan.encode
(:use :cl
:annot.doc
:jonathan.util)
(:import-from :fast-io
:fast-write-byte
:make-output-buffer
:finish-output-buffer)
(:import-from :trivial-types
:association-list-p)
(:export :wr... | |
ad6868cedfac25773de0627a7bcb9d0dc9f5bc53acc3649640bc86d42f0ffe9e | rpeszek/typed-encoding | BoundedAlphaNums.hs |
# LANGUAGE MultiParamTypeClasses #
{ - # LANGUAGE PolyKinds # - }
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
-- {-# LANGUAGE KindSignatures #-}
# LANGUAGE TypeApplications #
# LANGUAGE Unde... | null | https://raw.githubusercontent.com/rpeszek/typed-encoding/441f9f3bbf849f485f82eae66402ee2fd7b47a34/src/Data/TypedEncoding/Instances/Restriction/BoundedAlphaNums.hs | haskell | {-# LANGUAGE KindSignatures #-}
# LANGUAGE ConstraintKinds #
|
Any non alpha numeric characters are considered fixed delimiters
and need to be present exactly as specified.
This is a simple implementation that converts to @String@, should be used
only with short length data.
@since 0.2.1.0
$setup
>>> im... |
# LANGUAGE MultiParamTypeClasses #
{ - # LANGUAGE PolyKinds # - }
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
Restrictions @... |
d4f616de6372cd57b3b7b1bac2f3214940746b2fa2e4e7596c1e9e5a8b64989a | ml4tp/tcoq | check.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/checker/check.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open CErrors
open Uti... |
61b91d3739317efaa581452204dbc2eb3a9d0c87e3721fdd5b2cd96d805a4e58 | tisnik/clojure-examples | project.clj | ;
( C ) Copyright 2021
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(defproject clojure9-test "0.1.0-SNAPSHOT"
... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/78061b533c0755d0165002961334bbe98d994087/clojure9-test/project.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2021
-v10.html
(defproject clojure9-test "0.1.0-SNAPSHOT"
:description "Projekt, který zajistí stažení Clojure verze 1.10.1"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]]
:plugins [[lein-codox "... |
02cb179aa3a4cb62ea7d72a5e1bde2b18d0cec819c6a144153ae76818a8a235c | FranklinChen/learn-you-some-erlang | cards.erl | -module(cards).
-export([kind/1, main/0]).
-type suit() :: spades | clubs | hearts | diamonds.
-type value() :: 1..10 | j | q | k.
-type card() :: {suit(), value()}.
-spec kind(card()) -> face | number.
kind({_, A}) when A >= 1, A =< 10 -> number;
kind(_) -> face.
main() ->
number = kind({spades, 7}),
face ... | null | https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/cards.erl | erlang | -module(cards).
-export([kind/1, main/0]).
-type suit() :: spades | clubs | hearts | diamonds.
-type value() :: 1..10 | j | q | k.
-type card() :: {suit(), value()}.
-spec kind(card()) -> face | number.
kind({_, A}) when A >= 1, A =< 10 -> number;
kind(_) -> face.
main() ->
number = kind({spades, 7}),
face ... | |
5bd30cfdaa3d338036578704beb13d901ed5d6779285834ab0d558f52f22cb44 | RefactoringTools/HaRe | A2_AstOut.hs | module A2 where
import D1
import C1 (Tree, isSame, myFringe)
import C1
import B1
main :: (Tree Int) -> Bool
main t
= isSame (sumSquares (fringe t))
((sumSquares (B1.myFringe t)) +
(sumSquares (C1.myFringe t)))
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/mkImpExplicit/A2_AstOut.hs | haskell | module A2 where
import D1
import C1 (Tree, isSame, myFringe)
import C1
import B1
main :: (Tree Int) -> Bool
main t
= isSame (sumSquares (fringe t))
((sumSquares (B1.myFringe t)) +
(sumSquares (C1.myFringe t)))
| |
b52b97d6c8c88b7ba9fa6d98ed38c7aec10ee84ca30c85bda02417edd2abaf5b | boot-clj/boot | main.clj | (ns boot.main
(:import
[boot App])
(:require
[clojure.java.io :as io]
[clojure.string :as string]
[clojure.pprint :as pp]
[boot.pod :as pod]
[boot.core :as core]
[boot.file :as file]
[boot.ut... | null | https://raw.githubusercontent.com/boot-clj/boot/64334b4d5744b1444634f4a5a5a52b3ae67dddeb/boot/core/src/boot/main.clj | clojure | (ns boot.main
(:import
[boot App])
(:require
[clojure.java.io :as io]
[clojure.string :as string]
[clojure.pprint :as pp]
[boot.pod :as pod]
[boot.core :as core]
[boot.file :as file]
[boot.ut... | |
b011ae3d113607ec4386e98fd699de4286f6b358aa5802e31f9b8f0bc9f3361f | clojure-vim/neovim-client | message.clj | (ns neovim-client.message)
(def +request+ 0)
(def +response+ 1)
(def +notify+ 2)
(let [last-id (atom 0)]
(defn next-id
[]
(swap! last-id inc)
@last-id))
(defn gen-msg-id
"Get a unique message id."
[]
(next-id))
(defn ->request-msg
"Construct a msgpack-rpc request message."
[type args]
[+re... | null | https://raw.githubusercontent.com/clojure-vim/neovim-client/664813b6890b9acdf4cdf58ea72049744898159f/src/neovim_client/message.clj | clojure | TODO - find better way to get [B type.
***** Accessor fns *****
Only true for request & response, notify has no id | (ns neovim-client.message)
(def +request+ 0)
(def +response+ 1)
(def +notify+ 2)
(let [last-id (atom 0)]
(defn next-id
[]
(swap! last-id inc)
@last-id))
(defn gen-msg-id
"Get a unique message id."
[]
(next-id))
(defn ->request-msg
"Construct a msgpack-rpc request message."
[type args]
[+re... |
f92d240b2be61c0d914697a1bebf146c1e742052b2834251cd4224b3dce29747 | imrehg/ypsilon | gtk-hello.scm | #!/usr/bin/env ypsilon
#!r6rs
;; gtk-hello.scm:
;; GTK hello world
;;
;; Requirements:
: Gtk.framework
Linux :
: libgtk-x11-2.0.so
;; OpenBSD: libgtk-x11-2.0.so
(import (rnrs)
(srfi :48)
(ypsilon gtk constants)
(ypsilon gtk init)
(ypsilon gtk main)
(... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/example/gtk-hello.scm | scheme | gtk-hello.scm:
GTK hello world
Requirements:
OpenBSD: libgtk-x11-2.0.so | #!/usr/bin/env ypsilon
#!r6rs
: Gtk.framework
Linux :
: libgtk-x11-2.0.so
(import (rnrs)
(srfi :48)
(ypsilon gtk constants)
(ypsilon gtk init)
(ypsilon gtk main)
(ypsilon gtk window)
(ypsilon gtk container)
(ypsilon gtk button)
(y... |
807968c3c6fe68b35e49b9c277676b145c30a856c7e66ed4133a40ecb82e4d42 | eburlingame/arinc-parser | latlong_test.clj | (ns arinc424.fields.latlong-test
(:require [arinc424.fields.latlong :refer :all]
[arinc424.helpers :refer :all]
[clojure.test :refer :all]))
; --- Tests ---
(deftest dms-test
(is (approx= 40.33611111 (dms 40 20 10))))
(deftest latitude-value-test
(is (approx= 39.86078056 (latitude-value... | null | https://raw.githubusercontent.com/eburlingame/arinc-parser/1bef86924aef21888c27301bf51af90262ec4c52/test/arinc424/fields/latlong_test.clj | clojure | --- Tests --- | (ns arinc424.fields.latlong-test
(:require [arinc424.fields.latlong :refer :all]
[arinc424.helpers :refer :all]
[clojure.test :refer :all]))
(deftest dms-test
(is (approx= 40.33611111 (dms 40 20 10))))
(deftest latitude-value-test
(is (approx= 39.86078056 (latitude-value "N39513881")))
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.