_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 |
|---|---|---|---|---|---|---|---|---|
f43375e3d82f8f251acd7b906a75bd0fb3958148446a13f0e7db3349bd3feab2 | haskellari/postgresql-simple | SqlQQ.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 800
{-# LANGUAGE TemplateHaskellQuotes #-}
#else
# LANGUAGE TemplateHaskell #
#endif
------------------------------------------------------------------------------
-- |
-- Module: Database.PostgreSQL.Simple.SqlQQ
Copyright : ( c ) 2011 - 2012
License : BSD... | null | https://raw.githubusercontent.com/haskellari/postgresql-simple/6cabb13959310f32a15285f8e41c2d053403d687/src/Database/PostgreSQL/Simple/SqlQQ.hs | haskell | # LANGUAGE TemplateHaskellQuotes #
----------------------------------------------------------------------------
|
Module: Database.PostgreSQL.Simple.SqlQQ
Stability: experimental
----------------------------------------------------------------------------
| 'sql' is a quasiquoter that eases the syntactic bu... | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 800
#else
# LANGUAGE TemplateHaskell #
#endif
Copyright : ( c ) 2011 - 2012
License : BSD3
Maintainer : < >
module Database.PostgreSQL.Simple.SqlQQ (sql) where
import Database.PostgreSQL.Simple.Types (Query)
import Language.Haskell.TH
import Language.H... |
7513811424cb5ba480c67100159cc2f8e2da68225bcb0b14ed9c18a3444b303a | simonmar/parconc-examples | Infer.hs | --
-- Adapted from the program "infer", believed to have been originally
authored by , and used in the nofib benchmark suite
since at least the late 90s .
--
module Infer (inferTerm,inferTop) where
import Data.List(nub)
import MyList (minus)
import Type (TVarId, MonoType (..... | null | https://raw.githubusercontent.com/simonmar/parconc-examples/840a3f508f9bb6e03961e1b90311a1edd945adba/parinfer/Infer.hs | haskell |
Adapted from the program "infer", believed to have been originally
<<inferTop
>>
<<inferBind
<3>
>> | authored by , and used in the nofib benchmark suite
since at least the late 90s .
module Infer (inferTerm,inferTop) where
import Data.List(nub)
import MyList (minus)
import Type (TVarId, MonoType (..), PolyType (All),
arrow, intType, freeTVarMo... |
f16eff309409de5871fb91a319e4ed64fe215081749ab49a1ab6fe777e4da290 | jimpil/duratom | error_handling_test.clj | (ns duratom.error-handling-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[duratom.core :as core]
[duratom.backends :as storage]
[duratom.utils :as ut])
(:import (java.util.concurrent.atomic AtomicLong)
(java.io IOException)
(... | null | https://raw.githubusercontent.com/jimpil/duratom/3633f1c709ed18d75491eef6919899ee3dda8939/test/duratom/error_handling_test.clj | clojure | proper cleanup before testing
proper cleanup before testing
the guts of `move-file!`
fails once, but the error-handler recommits successfully
fails once, but the error-handler recommits successfully
as if nothing failed
proper cleanup before testing
proper cleanup before testing | (ns duratom.error-handling-test
(:require [clojure.test :refer :all]
[clojure.java.io :as io]
[duratom.core :as core]
[duratom.backends :as storage]
[duratom.utils :as ut])
(:import (java.util.concurrent.atomic AtomicLong)
(java.io IOException)
(... |
ced836ba9a129691b9e243f462f43b8c330572999e8dce86dbe8abf7a47904b0 | ejgallego/coq-lsp | jLang.mli | (************************************************************************)
(* Coq Language Server Protocol *)
Copyright 2019 MINES ParisTech -- LGPL 2.1 +
Copyright 2019 - 2023 Inria -- LGPL 2.1 +
Written by : ... | null | https://raw.githubusercontent.com/ejgallego/coq-lsp/dbc7b1f3966834f562eda76060c9848679ebf928/lsp/jLang.mli | ocaml | **********************************************************************
Coq Language Server Protocol
********************************************************************** | Copyright 2019 MINES ParisTech -- LGPL 2.1 +
Copyright 2019 - 2023 Inria -- LGPL 2.1 +
Written by :
module Point : sig
type t = Lang.Point.t [@@deriving yojson]
end
module Range : sig
type t = Lang.Range.t [@@deri... |
0ab6b6e45fe201e01c0180c13fe07df46bf0a28f831aaed74f59798a7aaf0180 | jeffshrager/biobike | javascript-filecompiler.lisp | ;;
Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved .
;;
(in-package :com.gigamonkeys.foo.javascript)
(defmacro define-javascript-module (name &body names)
`(setf (get ',name 'javascript-module) ',names))
(define-javascript-module com.gigamonkeys.foo.javascript.special-ops
array object @ ref n... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/monkeylib/foo/javascript/javascript-filecompiler.lisp | lisp |
Simple binary ops | Copyright ( c ) 2005 , Gigamonkeys Consulting All rights reserved .
(in-package :com.gigamonkeys.foo.javascript)
(defmacro define-javascript-module (name &body names)
`(setf (get ',name 'javascript-module) ',names))
(define-javascript-module com.gigamonkeys.foo.javascript.special-ops
array object @ ref new ++ ... |
5738095fe7250063cf65bf8cffb3da36e3d5c6ae714608fc7862c93bc55fc5a7 | SonarQubeCommunity/sonar-erlang | branchesofrecursion.erl | -module(a).
quicksort([H|T]) ->
{Smaller_Ones,Larger_Ones} = a:split(H,T,{[],[]}),
lists:append( quicksort(Smaller_Ones),
[H | quicksort(Larger_Ones)]
);
quicksort([]) -> [].
split(Pivot, [H|T], {Acc_S, Acc_L}) ->
if Pivot > H -> New_Acc = { [H|Acc_S] , Acc_L };
tru... | null | https://raw.githubusercontent.com/SonarQubeCommunity/sonar-erlang/279eb7ccd84787c1c0cfd34b9a07981eb20183e3/erlang-checks/src/test/resources/checks/branchesofrecursion.erl | erlang | -module(a).
quicksort([H|T]) ->
{Smaller_Ones,Larger_Ones} = a:split(H,T,{[],[]}),
lists:append( quicksort(Smaller_Ones),
[H | quicksort(Larger_Ones)]
);
quicksort([]) -> [].
split(Pivot, [H|T], {Acc_S, Acc_L}) ->
if Pivot > H -> New_Acc = { [H|Acc_S] , Acc_L };
tru... | |
ac3d610d924b57c4ff82743ccb2c63b2db535e212a48ce68b5ccdbcfb94df182 | tomjkidd/web-whiteboard | core.cljs | (ns web-whiteboard.client.core
"Code to support creating the web-whiteboard client app"
(:require [web-whiteboard.client.state :as state]
[web-whiteboard.client.ui :as ui]
[web-whiteboard.client.handlers.websocket :as hws]))
(defn ^:export run
"The main function to run the client app"
... | null | https://raw.githubusercontent.com/tomjkidd/web-whiteboard/6bc508703b14c136be0def8bb6839f2784a3ae9b/src/web_whiteboard/client/core.cljs | clojure | (ns web-whiteboard.client.core
"Code to support creating the web-whiteboard client app"
(:require [web-whiteboard.client.state :as state]
[web-whiteboard.client.ui :as ui]
[web-whiteboard.client.handlers.websocket :as hws]))
(defn ^:export run
"The main function to run the client app"
... | |
404cf62ebdf6e46cd6b9a7dfa2dd2c23568ce51dcc61bccdaa0d923defa74abf | airalab/hs-web3 | Config.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
Module : Network . . Api . Config
Copyright : 2016 - 2021
-- License : Apache-2.0
--
-- Maintainer :
-- Stability : experimental
-- Portability : unknown
--
-- Api calls with `config` prefix.
--
module Network.Ipfs.Api.Config where
import ... | null | https://raw.githubusercontent.com/airalab/hs-web3/c03b86eb621f963886a78c39ee18bcec753f17ac/packages/ipfs/src/Network/Ipfs/Api/Config.hs | haskell | # LANGUAGE OverloadedStrings #
|
License : Apache-2.0
Maintainer :
Stability : experimental
Portability : unknown
Api calls with `config` prefix.
| Get ipfs config values.
| Set ipfs config values.
| Replace the config with the file at <filePath>. |
Module : Network . . Api . Config
Copyright : 2016 - 2021
module Network.Ipfs.Api.Config where
import Control.Monad.IO.Class (MonadIO)
import Data.Text (Text)
import Network.HTTP.Client (responseStatus)
import Network... |
90eb42c267750ae0d3cfd42454f1fae1d69e57f78411270ff4248e568a498d4c | mwand/eopl3 | tests.scm | (module tests mzscheme
(provide test-list)
;;;;;;;;;;;;;;;; tests ;;;;;;;;;;;;;;;;
(define test-list
'(
;; simple arithmetic
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
;; nested arithmetic
(nested-arith-left "-(-(44,33),22... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter4/explicit-refs/tests.scm | scheme | tests ;;;;;;;;;;;;;;;;
simple arithmetic
nested arithmetic
simple variables
simple unbound variables
simple conditionals
test dynamic typechecking
make sure that the test and both arms get evaluated
properly.
and make sure the other arm doesn't get evaluated.
simple let
check nested let and shadowing
simp... | (module tests mzscheme
(provide test-list)
(define test-list
'(
(positive-const "11" 11)
(negative-const "-33" -33)
(simple-arith-1 "-(44,33)" 11)
(nested-arith-left "-(-(44,33),22)" -11)
(nested-arith-right "-(55, -(22,11))" 44)
(test-var-1 "x" 10)
(test... |
cf6775f9a496219165ce2c03fe7beff93bbed3a7a52555f0fe84d826eb29e375 | dalaing/little-languages | SmallStep.hs | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Component.Term.Int.Eval.SmallStep (
smallStepInput
) where
... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/modular/i-lang/src/Component/Term/Int/Eval/SmallStep.hs | haskell | |
^
^
|
^
^
|
^
^
^
^
|
^
^
|
^
^
|
^
^
^
^
|
^
^
|
^
^
|
^
^
^
^
|
^
^
|
^
^
|
^
^
^
^
| | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Component.Term.Int.Eval.SmallStep (
smallStepInput
) where
... |
f6d5c52e83607d3af3f4447462f021a8a20c69fdcc27ba6deb278d7a180d6514 | fossas/fossa-cli | Container.hs | module App.Fossa.Container (
containerSubCommand,
) where
import App.Docs (fossaContainerScannerUrl)
import App.Fossa.Config.Container (
ContainerAnalyzeConfig (usesExperimentalScanner),
ContainerCommand,
ContainerScanConfig (..),
)
import App.Fossa.Config.Container qualified as Config
import App.Fossa.Contai... | null | https://raw.githubusercontent.com/fossas/fossa-cli/62c25adda99bab2c80ef78ee78206a14ad0ab0fa/src/App/Fossa/Container.hs | haskell | module App.Fossa.Container (
containerSubCommand,
) where
import App.Docs (fossaContainerScannerUrl)
import App.Fossa.Config.Container (
ContainerAnalyzeConfig (usesExperimentalScanner),
ContainerCommand,
ContainerScanConfig (..),
)
import App.Fossa.Config.Container qualified as Config
import App.Fossa.Contai... | |
eb691c9e87c9344e8ea14ed354119b71d04208dd00e13ff0b696177b0d40e0d0 | karlhof26/gimp-scheme | bates-layers-delete.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Mass delete layers script for GIMP 2.4
Created by
;
; Tags: public domain, layers, delete
;
; Author statement:
;
; Script designed to mass delete layers from current image
; User uses numbers to denote start and end point of deletio... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/2b6798888592a834b7736e1321aa9a0931fc0b2b/bates-layers-delete.scm | scheme |
The GIMP -- an image manipulation program
Tags: public domain, layers, delete
Author statement:
Script designed to mass delete layers from current image
User uses numbers to denote start and end point of deletion
--------------------------------------------------------------------
-------------------------... | Copyright ( C ) 1995 and
Mass delete layers script for GIMP 2.4
Created by
Distributed by Gimp FX Foundry project
(define (script-fu-delete-layers theImage theDraw theLayer1 theLayer2)
(let* (
(theNumber 0)
(theRepeat 0)
(theLayerRef 0)... |
4f31206bc8e272ca216957e9f9694545ac5657446cae028334ce10efb01db22b | ocaml-obuild/obuild | a.ml | let foo = "B.A.foo"
| null | https://raw.githubusercontent.com/ocaml-obuild/obuild/28252e8cee836448e85bfbc9e09a44e7674dae39/tests/full/autopack2/src/b/a.ml | ocaml | let foo = "B.A.foo"
| |
caf1ab122bc522ad7b0d1ec940923ac414e4d7ede549da6360d1a212a2a3e48a | 5HT/ant | Types.mli |
open XNum;
open Runtime;
open Unicode.Types;
open Unicode.SymbolTable;
exception Syntax_error of UCStream.location and uc_string;
exception Runtime_error of uc_string;
value runtime_error : string -> 'a;
(*
type compare = [ Equal | Less | LessEqual | Greater | GreaterEqual | Inequal ];
type relation = unit; (* FIX... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/VM/Types.mli | ocaml |
type compare = [ Equal | Less | LessEqual | Greater | GreaterEqual | Inequal ];
type relation = unit; (* FIX |
open XNum;
open Runtime;
open Unicode.Types;
open Unicode.SymbolTable;
exception Syntax_error of UCStream.location and uc_string;
exception Runtime_error of uc_string;
value runtime_error : string -> 'a;
*)
type unknown = ref partial_value
and partial_value =
[ Unbound
| Constraint of list unknown
| Bool of bool
... |
1318fcea1640e607dc99317953905825c118ae350555788b4ce77d4749a65780 | fujita-y/digamma | syncase.scm | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
;;; See LICENSE file for terms and conditions of use.
;; memo:
;; (lookup-lexical-name)
;; local macro bound to unique symbol generated by (generate-local-macro-symbol). It may used for lexical name.
;; (unrename-syntax)
;; apply unrena... | null | https://raw.githubusercontent.com/fujita-y/digamma/58cccd77bd2c208ec58d3cd634cbe65e32b3c7ec/heap/boot/macro/syncase.scm | scheme | See LICENSE file for terms and conditions of use.
memo:
(lookup-lexical-name)
local macro bound to unique symbol generated by (generate-local-macro-symbol). It may used for lexical name.
(unrename-syntax)
apply unrename-syntax to literals, patterns, and templates. It make expanded code free from environment.
... | Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited .
(set-top-level-value! '|.vars| #f)
(define make-syntax-object (lambda (form renames lexname) (tuple 'type:syntax form renames lexname)))
(define syntax-object-expr (lambda (obj) (tuple-ref obj 1)))
(define syntax-object-renames (lam... |
cc5294eaf12f8fb07d397cae4b26b5884679d9156054e312fc95c232c2da285f | scicloj/notespace | view.clj | (ns scicloj.notespace.v4.view
(:require [clojure.string :as string]
[gorilla-notes.core :as gn]
[scicloj.notespace.v4.log :as v4.log]
[scicloj.notespace.v4.note :as v4.note]
[scicloj.notespace.v4.config :as v4.config]))
(defn summary->hiccup [{:keys [current-path
... | null | https://raw.githubusercontent.com/scicloj/notespace/1929f4d2b69c9e52f4ddb5581d10ecaaa29b3c69/src/scicloj/notespace/v4/view.clj | clojure | else
:font-family "'Fira Code'"
(let [{:keys [messages? summary?]} @v4.config/*config]
[:div.bg-light
[:p ""]
(when summary?
(summary->hiccup details))]) | (ns scicloj.notespace.v4.view
(:require [clojure.string :as string]
[gorilla-notes.core :as gn]
[scicloj.notespace.v4.log :as v4.log]
[scicloj.notespace.v4.note :as v4.note]
[scicloj.notespace.v4.config :as v4.config]))
(defn summary->hiccup [{:keys [current-path
... |
9b3725b2e542e550482fe5d10f025e20c67110aed8cb5fe19024fd0d2dcd9370 | mirage/arp | arp_handler.ml |
type 'a entry =
| Static of Macaddr.t * bool
| Dynamic of Macaddr.t * int
| Pending of 'a * int
module M = Map.Make(Ipaddr.V4)
type 'a t = {
cache : 'a entry M.t ;
mac : Macaddr.t ;
ip : Ipaddr.V4.t ;
timeout : int ;
retries : int ;
epoch : int ;
logsrc : Logs.src
}
let ips t =
M.fold (fun ip ... | null | https://raw.githubusercontent.com/mirage/arp/498237d01401ad94011a1703fec831e9cf715973/src/arp_handler.ml | ocaml | must be a request |
type 'a entry =
| Static of Macaddr.t * bool
| Dynamic of Macaddr.t * int
| Pending of 'a * int
module M = Map.Make(Ipaddr.V4)
type 'a t = {
cache : 'a entry M.t ;
mac : Macaddr.t ;
ip : Ipaddr.V4.t ;
timeout : int ;
retries : int ;
epoch : int ;
logsrc : Logs.src
}
let ips t =
M.fold (fun ip ... |
f7f92fe8d5c5910d202e2fe346aad09f4a3372f62554717db80b0989d54791da | offby1/rudybot | clearenv.rkt | #lang racket
(require ffi/unsafe)
(provide clearenv)
(module+ test (require rackunit rackunit/text-ui))
The ' clearenv ' function does n't exist on some systems ( notably
;; OS X), so we use 'unsetenv' in a loop instead.
(define (clearenv)
(let ([unsetenv (get-ffi-obj 'unsetenv #f (_fun _bytes -> _int))])
(... | null | https://raw.githubusercontent.com/offby1/rudybot/74773ce9c1224813ee963f4d5d8a7748197f6963/clearenv.rkt | racket | OS X), so we use 'unsetenv' in a loop instead.
Macbook); no idea why. | #lang racket
(require ffi/unsafe)
(provide clearenv)
(module+ test (require rackunit rackunit/text-ui))
The ' clearenv ' function does n't exist on some systems ( notably
(define (clearenv)
(let ([unsetenv (get-ffi-obj 'unsetenv #f (_fun _bytes -> _int))])
(let loop ()
(match
I 've seen this ptr - r... |
dd07e0f9977b0c3bdd60d9dba0cba4ff6c8e96131a23c2130c61c3a5206d0e2c | lyrm/ocaml-httpadapter | method.ml | { { { Copyright ( C ) < 2020 > < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUT... | null | https://raw.githubusercontent.com/lyrm/ocaml-httpadapter/01926ba6a1e3ab607fc8a33a40fb13682b6711a5/src-httpaf/method.ml | ocaml | { { { Copyright ( C ) < 2020 > < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUT... | |
e3e1df0abd537c2bed30dc799ca4b0872a5bd65ea73f0181181e02b82ce7fac2 | lingnand/VIMonad | Gnome.hs | # OPTIONS_GHC -fno - warn - missing - signatures #
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Config.Gnome
Copyright : ( c ) < >
-- License : BSD
--
Maintainer : < >
-- Stability : unstable
-- Portability : unportable
--
-- Th... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Config/Gnome.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Config.Gnome
License : BSD
Stability : unstable
Portability : unportable
This module provides a config suitable for use with the GNOME desktop
environment.
* Usage
$usage
$usage
To use this module... | # OPTIONS_GHC -fno - warn - missing - signatures #
Copyright : ( c ) < >
Maintainer : < >
module XMonad.Config.Gnome (
gnomeConfig,
gnomeRun,
gnomeRegister
) where
import XMonad
import XMonad.Config.Desktop
import XMonad.Util.Run (safeSpawn)
import qualified Data.Map as M
import Sy... |
721d2afcacb5f22bdd313ab2a8cf1f6a6d86efc611aa85c15b860e6379ca646c | r0man/inflections-clj | project.clj | (defproject inflections "0.14.2-SNAPSHOT"
:description "Rails-like inflections for Clojure(Script)."
:url "-clj"
:author "r0man"
:min-lein-version "2.0.0"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[noencore "0.3.7"]
[org.clojure/clojure "1.10.0"]
... | null | https://raw.githubusercontent.com/r0man/inflections-clj/99f8984502fb8f484607fd0aaeb1dcae8afe35c4/project.clj | clojure | (defproject inflections "0.14.2-SNAPSHOT"
:description "Rails-like inflections for Clojure(Script)."
:url "-clj"
:author "r0man"
:min-lein-version "2.0.0"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[noencore "0.3.7"]
[org.clojure/clojure "1.10.0"]
... | |
2d62a5a9560a68cb7901ec74646bcf31b3f14c283db6e1b47c0d684f3dc431c6 | ocaml-multicore/ocaml-tsan | listLabels.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/listLabels.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
* List operations .
Some functions are flagged as not tail - recursive . A tail - recursive
... |
464e1b612107534810700115b53007f1de08c65abb4fac790412d8444aa44dd0 | unisonweb/unison | DbHelpers.hs | module Unison.Codebase.SqliteCodebase.Migrations.MigrateSchema1To2.DbHelpers
( dbBranchHash,
dbPatchHash,
syncCausalHash,
)
where
import qualified Data.Set as Set
import qualified Data.Vector as Vector
import U.Codebase.HashTags (BranchHash (..), CausalHash (..), PatchHash (..))
import qualified U.Codebase... | null | https://raw.githubusercontent.com/unisonweb/unison/bf0186aefb11ef2a9ec44d55adc70f356044f0c7/parser-typechecker/src/Unison/Codebase/SqliteCodebase/Migrations/MigrateSchema1To2/DbHelpers.hs | haskell | module Unison.Codebase.SqliteCodebase.Migrations.MigrateSchema1To2.DbHelpers
( dbBranchHash,
dbPatchHash,
syncCausalHash,
)
where
import qualified Data.Set as Set
import qualified Data.Vector as Vector
import U.Codebase.HashTags (BranchHash (..), CausalHash (..), PatchHash (..))
import qualified U.Codebase... | |
56b37a1b666b112392731fe279334d781bb1be684d391ca1a91576172d09e990 | backtracking/ocamlgraph | graphviz.mli | (**************************************************************************)
(* *)
: a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
(* ... | null | https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/src/graphviz.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | : a generic graph library for OCaml
Copyright ( C ) 2004 - 2010
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
* Interfa... |
7f59c275cd6e7cafd4e5bd01b4fe0278c2dc638c1e0d6ff9c5c521d02daeeb45 | reactiveml/rml | asynchrone_yield.ml | open Misc
let brush draw p () =
let st = new_state p in
while true do
move draw st;
Thread.yield ()
done
let main () =
let draw = init () in
let t1 = Thread.create (brush draw p1) ()
and t2 = Thread.create (brush draw p2) () in
Thread.join t1; Thread.join t2
let _ =
main ()
| null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/examples-extra/rml_peintres/asynchrone_yield.ml | ocaml | open Misc
let brush draw p () =
let st = new_state p in
while true do
move draw st;
Thread.yield ()
done
let main () =
let draw = init () in
let t1 = Thread.create (brush draw p1) ()
and t2 = Thread.create (brush draw p2) () in
Thread.join t1; Thread.join t2
let _ =
main ()
| |
232c2c3cef984164c0b0045321f148705ecd2d24b5afed20df43a90272931cc8 | edgecase/dieter | precompile.clj | (ns dieter.test.precompile
(:require [dieter.core :as core]
[dieter.precompile :as precompile]
[dieter.settings :as settings]
[dieter.cache :as cache]
[clojure.java.io :as io])
(:use clojure.test
ring.mock.request))
(deftest precompile-roundtrip-works
(let ... | null | https://raw.githubusercontent.com/edgecase/dieter/f3c7cdd7703c6d1556e68bbe8fc94406b717f6f1/dieter-core/test/dieter/test/precompile.clj | clojure | (ns dieter.test.precompile
(:require [dieter.core :as core]
[dieter.precompile :as precompile]
[dieter.settings :as settings]
[dieter.cache :as cache]
[clojure.java.io :as io])
(:use clojure.test
ring.mock.request))
(deftest precompile-roundtrip-works
(let ... | |
3c1326958bd2f163d372555194712decf5551ff76db9a234fb9bef2a3d8508f2 | alasconnect/reflex-material | Checkbox.hs | {-# LANGUAGE OverloadedStrings #-}
module Reflex.Material.Checkbox
( checkbox'_
) where
import Data.Map
import Data.Monoid ((<>))
import Data.Text (Text)
import Reflex.Dom
import Reflex.Material.Types
checkbox'_ :: DomBuilder t m => Enabled -> Selected -> Text -> m (Element EventResult (DomBuilderSpace m) t, ()... | null | https://raw.githubusercontent.com/alasconnect/reflex-material/0e8ef843a570378ebaf2449b8c4b72616e25f70c/src/Reflex/Material/Checkbox.hs | haskell | # LANGUAGE OverloadedStrings # |
module Reflex.Material.Checkbox
( checkbox'_
) where
import Data.Map
import Data.Monoid ((<>))
import Data.Text (Text)
import Reflex.Dom
import Reflex.Material.Types
checkbox'_ :: DomBuilder t m => Enabled -> Selected -> Text -> m (Element EventResult (DomBuilderSpace m) t, ())
checkbox'_ e s v =
elClass "div... |
0914d6abdb9a2fd22d06824d00b6ed123075762e220110fc23ce36583567d3d7 | Lambda-X/re-console | io.cljs | (ns re-console.io
(:import [goog.events EventType]
[goog.net XhrIo]))
(defn fetch-file!
"Very simple implementation of XMLHttpRequests that given a file path
calls src-cb with the string fetched of nil in case of error.
See doc at "
[file-url src-cb]
(try
(.send XhrIo file-url
(f... | null | https://raw.githubusercontent.com/Lambda-X/re-console/a7a31046ba5066163d46ac586072c92b7414c52b/demo/re_console/io.cljs | clojure | (ns re-console.io
(:import [goog.events EventType]
[goog.net XhrIo]))
(defn fetch-file!
"Very simple implementation of XMLHttpRequests that given a file path
calls src-cb with the string fetched of nil in case of error.
See doc at "
[file-url src-cb]
(try
(.send XhrIo file-url
(f... | |
5cc1073e3667c59c40facc304164d6ec21736b862a146607b6cb00cadd48a854 | xapi-project/xen-api | sexprpp.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/5c9c44c6d40a9930f454722c9cd09c7079ec814e/ocaml/libs/sexpr/sexprpp.ml | ocaml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... | |
eacdebe4cf364d48ab9bfd8db911f0fffa2582a47a390c7549af54cb65f53c2b | realworldocaml/book | bootstrap_info.ml | open Import
open Memo.O
let def name dyn =
let open Pp.O in
Pp.box ~indent:2 (Pp.textf "let %s = " name ++ Dyn.pp dyn)
let rule sctx compile (exes : Dune_file.Executables.t) () =
let* locals, externals =
let+ libs =
Resolve.Memo.read_memo
(Memo.Lazy.force (Lib.Compile.requires_link compile))
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_rules/bootstrap_info.ml | ocaml | additional link flags keyed by the platform
@@DRA Want to be using the public_name here, not the
internal name | open Import
open Memo.O
let def name dyn =
let open Pp.O in
Pp.box ~indent:2 (Pp.textf "let %s = " name ++ Dyn.pp dyn)
let rule sctx compile (exes : Dune_file.Executables.t) () =
let* locals, externals =
let+ libs =
Resolve.Memo.read_memo
(Memo.Lazy.force (Lib.Compile.requires_link compile))
... |
706f55ee99e48fa0b0e0a3c2f2ec5c3fe1350f1edf45d8ca573aa6f34d2eea35 | aspiwack/porcupine | PTask.hs | {-# LANGUAGE Arrows #-}
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
# OPTIONS_GHC -Wall #
module... | null | https://raw.githubusercontent.com/aspiwack/porcupine/23dcba1523626af0fdf6085f4107987d4bf718d7/porcupine-core/src/System/TaskPipeline/PTask.hs | haskell | # LANGUAGE Arrows #
# LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE TypeOperators #
| a tasks that discards its inputs and returns ()
| Just a shortcut for when you want an IO step that requires no input
| Catches an error happening in a task. Leaves the tree intact if an error
o... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE InstanceSigs #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wall #
module System.TaskPipeline.PTask
( module Control.Category
, module Control.Arrow
, module Data.Locations.LogAndErrors
, PTask
, Sev... |
5122dcb7bb483f83b3537d05134d1cf85a5c974bdf5406a299f02510e9ca4c44 | abhay/mochiweb.old | mochiweb_response.erl | @author < >
2007 Mochi Media , Inc.
%% @doc Response abstraction.
-module(mochiweb_response, [Request, Code, Headers]).
-author('').
-define(QUIP, "Any of you quaids got a smint?").
-export([get_header_value/1, get/1, dump/0]).
-export([send/1, write_chunk/1]).
get_header_value(string ( ) | atom ( ) | b... | null | https://raw.githubusercontent.com/abhay/mochiweb.old/a22707e1dec0ed79108e98b5c691a623fdff1eae/src/mochiweb_response.erl | erlang | @doc Response abstraction.
@doc Get the value of the given response header.
@spec get(request | code | headers) -> term()
@doc Return the internal representation of the given field.
@doc Dump the internal representation to a "human readable" set of terms
for debugging/inspection purposes.
then the chun... | @author < >
2007 Mochi Media , Inc.
-module(mochiweb_response, [Request, Code, Headers]).
-author('').
-define(QUIP, "Any of you quaids got a smint?").
-export([get_header_value/1, get/1, dump/0]).
-export([send/1, write_chunk/1]).
get_header_value(string ( ) | atom ( ) | binary ( ) ) - > string ( ) | u... |
366f1699e971a5176ca75f0eb990bcdfd41a0564d1180118c778bb330e022fa4 | pliant/lein-package | artifact.clj | (ns leiningen.package.artifact
"Allows for the restriction or addition of files that are deployed to the remote repository."
(:require [clojure.java.io :as io]
[clojure.string :as twine]
[leiningen.core.main :as main]
[leiningen.jar :as jar]
[leiningen.pom :as pom]))
... | null | https://raw.githubusercontent.com/pliant/lein-package/aef327e4698b13f1cf0986f5eaa23968e90b458b/src/leiningen/package/artifact.clj | clojure | (ns leiningen.package.artifact
"Allows for the restriction or addition of files that are deployed to the remote repository."
(:require [clojure.java.io :as io]
[clojure.string :as twine]
[leiningen.core.main :as main]
[leiningen.jar :as jar]
[leiningen.pom :as pom]))
... | |
5b3409f44ba612e2b44de0e27a03c01972b78e9b1bbed13c6c0a3cb58da3ee24 | bobatkey/foveran | LocallyNameless.hs | # LANGUAGE DeriveFunctor , TypeSynonymInstances , OverloadedStrings , TupleSections , FlexibleInstances #
module Language.Foveran.Syntax.LocallyNameless
( TermPos
, TermCon (..)
, GlobalFlag (..)
, Binding (..)
, bindingOfPattern
, toLocallyNamelessClosed
, toLocallyNameless
, close
... | null | https://raw.githubusercontent.com/bobatkey/foveran/e57463e3f6923becdf1249cd2fd0ccfcd566f7c5/src/Language/Foveran/Syntax/LocallyNameless.hs | haskell | a suspended conversion to locally nameless, waiting for the additional variables to be bound
------------------------------------------------------------------------------
FIXME: concatenate all the names, or something
------------------------------------------------------------------------------
FIXME: not sure if ... | # LANGUAGE DeriveFunctor , TypeSynonymInstances , OverloadedStrings , TupleSections , FlexibleInstances #
module Language.Foveran.Syntax.LocallyNameless
( TermPos
, TermCon (..)
, GlobalFlag (..)
, Binding (..)
, bindingOfPattern
, toLocallyNamelessClosed
, toLocallyNameless
, close
... |
3a4ace2dea29a5a409a8f87a123562f23ff1316410a260d737e9cb77760e9e25 | mirage/mirage-console | console_unix.mli |
* Copyright ( c ) 2010 - 2013 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVID... | null | https://raw.githubusercontent.com/mirage/mirage-console/5e31c2c92f341c0b593217d4a1370a5e0084f722/unix/console_unix.mli | ocaml | * Text console input/output operations. |
* Copyright ( c ) 2010 - 2013 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVID... |
5c75ec9dfcf6591500d5ebba3b76fbcb0b0fe55934cf7f5d187e8279b3d1d27a | clojurecup2014/parade-route | nrepl-editor.clj | (ns unity.nrepl.nrepl-editor
(:refer-clojure)
(:require [clojure.main :as main])
(:import
(UnityEngine Debug GUILayout)
(UnityEditor EditorGUILayout EditorWindow EditorStyles))
(:require [clojure.tools.nrepl.middleware :as middleware]
[unity.nrepl.middleware.interruptible-eval :as eval]
... | null | https://raw.githubusercontent.com/clojurecup2014/parade-route/adb2e1ea202228e3da07902849dee08f0bb8d81c/Assets/Clojure/unity/nrepl/nrepl-editor.clj | clojure | default-handler
these
:greeting-fn (fn [msg] (Debug/Log "received greeting: " msg))
(stop)
(is-connected)
(Debug/Log "on-inspector-update") | (ns unity.nrepl.nrepl-editor
(:refer-clojure)
(:require [clojure.main :as main])
(:import
(UnityEngine Debug GUILayout)
(UnityEditor EditorGUILayout EditorWindow EditorStyles))
(:require [clojure.tools.nrepl.middleware :as middleware]
[unity.nrepl.middleware.interruptible-eval :as eval]
... |
735427a1e282802c1f45ac5cd7a2e309643494c6f754f03d5c6c8733dc00d8b8 | spechub/Hets | Reduce_Interface.hs | # LANGUAGE FlexibleInstances #
|
Module : ./CSL / Reduce_Interface.hs
Description : interface to Reduce CAS
Copyright : ( c ) , DFKI Bremen , 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non - portable ( uses typ... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/CSL/Reduce_Interface.hs | haskell | ----------------------------------------------------------------------
Connection handling
----------------------------------------------------------------------
| A session is a process connection
| The simplest session
| Better use this session to properly close the connection
| Left String is success, Right St... | # LANGUAGE FlexibleInstances #
|
Module : ./CSL / Reduce_Interface.hs
Description : interface to Reduce CAS
Copyright : ( c ) , DFKI Bremen , 2010
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non - portable ( uses typ... |
eea11a11563e10442dba03d76782f3cccc7fad4d6fb66c27a3badf95f7aa6083 | rabbitmq/erlang-data-structures | finger_tree.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/rabbitmq/erlang-data-structures/7f9b5427200e8247c77ce1cc146eb10be9095791/finger_tree/src/finger_tree.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
As usual with ... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Erlang Data Structures .
The Initial Developer of the Original Code is VMware , Inc.
Copyright ( c ) 2011 - 2013 VMware , Inc. All rights re... |
99c5fec2d2ef3c9e74e0a129426bfeff63e3a44c0fe2788e0ee2e74d5c38b6f1 | Chris00/ocaml-docker | no_cmd.ml | open Printf
module C = Docker.Container
let () =
(* When one tries to run a non-existing command, the call should
fail with a clear error message. *)
try
let c = C.create "alpine:latest" ["/bin/bash"] ~open_stdin:true in
C.start c;
assert false
with Docker.Failure _ as e ->
printf "Raised %s... | null | https://raw.githubusercontent.com/Chris00/ocaml-docker/ec5a4c430085f7956e5c41ea3c28567846fab335/test/no_cmd.ml | ocaml | When one tries to run a non-existing command, the call should
fail with a clear error message.
assert false | open Printf
module C = Docker.Container
let () =
try
let c = C.create "alpine:latest" ["/bin/bash"] ~open_stdin:true in
C.start c;
assert false
with Docker.Failure _ as e ->
printf "Raised %s\n%!" (Printexc.to_string e)
let () =
try
let c = C.create "alpine:latest" ["/bin/ash"] ~open_stdin:t... |
a032b093a0b1699479b7e28a9be1342bdaf1d81a2bca0883d5b50a9135e3c19a | tfausak/rattletrap | UnknownSystemId.hs | module Rattletrap.Exception.UnknownSystemId where
import qualified Control.Exception as Exception
import qualified Data.Word as Word
newtype UnknownSystemId
= UnknownSystemId Word.Word8
deriving (Eq, Show)
instance Exception.Exception UnknownSystemId
| null | https://raw.githubusercontent.com/tfausak/rattletrap/4d6e3cc0aa0f45beaf189255943f0d824c80a7df/src/lib/Rattletrap/Exception/UnknownSystemId.hs | haskell | module Rattletrap.Exception.UnknownSystemId where
import qualified Control.Exception as Exception
import qualified Data.Word as Word
newtype UnknownSystemId
= UnknownSystemId Word.Word8
deriving (Eq, Show)
instance Exception.Exception UnknownSystemId
| |
2ae5beb57337422774d21a9055c924c10f8eaa653df7cf9e7c327746996b876e | malgo-lang/malgo | RnState.hs | module Malgo.Rename.RnState (RnState (..), infixInfo, dependencies) where
import Control.Lens (Lens', lens)
import Data.HashMap.Strict qualified as HashMap
import Data.HashSet qualified as HashSet
import Koriel.Id
import Koriel.Pretty
import Malgo.Prelude
import Malgo.Syntax.Extension
data RnState = RnState
{ _infi... | null | https://raw.githubusercontent.com/malgo-lang/malgo/eb99b51415991513e7f9b169b66988ac7e447bd8/src/Malgo/Rename/RnState.hs | haskell | module Malgo.Rename.RnState (RnState (..), infixInfo, dependencies) where
import Control.Lens (Lens', lens)
import Data.HashMap.Strict qualified as HashMap
import Data.HashSet qualified as HashSet
import Koriel.Id
import Koriel.Pretty
import Malgo.Prelude
import Malgo.Syntax.Extension
data RnState = RnState
{ _infi... | |
70aa0ed35c5acff47daaa50dd62ef4b55c95429006d77d15ad3f656669556efe | jbreindel/battlecraft | bc_web_sup.erl | %%%-------------------------------------------------------------------
%% @doc bc_web top level supervisor.
%% @end
%%%-------------------------------------------------------------------
-module(bc_web_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(... | null | https://raw.githubusercontent.com/jbreindel/battlecraft/622131a1ad8c46f19cf9ffd6bf32ba4a74ef4137/apps/bc_web/src/bc_web_sup.erl | erlang | -------------------------------------------------------------------
@doc bc_web top level supervisor.
@end
-------------------------------------------------------------------
API
Supervisor callbacks
====================================================================
API functions
================================... |
-module(bc_web_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
Child : : { Id , StartFunc , Restart , Shutdown , Type , Modules }
init([]) ->
{ok, { {one_for_all, 0, 1}, []} }.
... |
d5194b19e2b95651e8931dac6e16e99d6d39d275451b5aea3399aa679c3a77eb | venantius/yagni | form_test.clj | (ns yagni.namespace.form-test
(:require [clojure.test :refer :all]
[yagni.namespace.form :as form]
[yagni.sample-ns]))
(deftest get-form-works
(is (= (form/get-form 'yagni.sample-ns/form-for-testing-get)
'{:source (defn form-for-testing-get
[& args]
... | null | https://raw.githubusercontent.com/venantius/yagni/54aa78d06279c3258c6bd932e75c9a2d91bb2fc6/test/yagni/namespace/form_test.clj | clojure | (ns yagni.namespace.form-test
(:require [clojure.test :refer :all]
[yagni.namespace.form :as form]
[yagni.sample-ns]))
(deftest get-form-works
(is (= (form/get-form 'yagni.sample-ns/form-for-testing-get)
'{:source (defn form-for-testing-get
[& args]
... | |
de47ea00f2c23687c5289b86e4f0643f22ee6c45e55a6224d3b60d11f3d7376e | gilith/hol-light | word-tools.ml | (* ========================================================================= *)
(* PARAMETRIC PROOF TOOLS FOR THE PARAMETRIC THEORY OF WORDS *)
(* ========================================================================= *)
(*BEGIN-PARAME... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/opentheory/theories/word/word-tools.ml | ocaml | =========================================================================
PARAMETRIC PROOF TOOLS FOR THE PARAMETRIC THEORY OF WORDS
=========================================================================
BEGIN-PARAMETRIC
word
word
END-PARAMETRIC |
needs "opentheory/theories/tools.ml";;
needs "opentheory/theories/natural-bits/natural-bits-tools.ml";;
let word_reduce_conv =
REWRITE_CONV
[word_to_num_to_word;
word_le_def; word_lt_def] THENC
REWRITE_CONV
[num_to_word_to_num] THENC
... |
975a8bb87e8ef46f090e5425df38d8bac7fbcee430d057f7f7afe35dfea36305 | srid/emanote.obelisk | Emanote.hs | {-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeApplications #
module Emanote where
import Control.Concurrent.Async (race_)
import Control.Concurrent.STM (newTChanIO, readTChan, writeTChan)
import Emanote.Zk (Zk)
import qualified Emanote.Zk as Zk
import Options.Applicative
import Reflex (Reflex (nev... | null | https://raw.githubusercontent.com/srid/emanote.obelisk/de935cff82fc57085adef1904094c7129c02d995/lib/emanote/src/Emanote.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
Start consuming the Zk as soon as it is ready.
Custom action | # LANGUAGE TypeApplications #
module Emanote where
import Control.Concurrent.Async (race_)
import Control.Concurrent.STM (newTChanIO, readTChan, writeTChan)
import Emanote.Zk (Zk)
import qualified Emanote.Zk as Zk
import Options.Applicative
import Reflex (Reflex (never))
import Reflex.Host.Headless (MonadHeadlessApp,... |
822f640d0df48833556331706b96c0fe514f77e6ba259cf470ab69427f975cc0 | nuprl/gradual-typing-performance | sequencer.rkt | #lang typed/racket/base
(require benchmark-util
"../base/typed-array-data.rkt")
(require/typed/check "array-struct.rkt"
[build-array (-> (Vectorof Nonnegative-Integer) (-> Indexes Flonum) Array)])
(require/typed/check "array-transform.rkt"
[array-append* (case-> ((Listof Array) -> Array)
... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/benchmarks/synth/extra/monotown/typed/sequencer.rkt | racket | A note is represented using the number of semitones from C0.
Single note.
Accepts notes or pauses, but not chords.
pause
repeats n times the sequence encoded by the pattern, at tempo bpm
pattern is a list of either single notes (note . duration) or
chords ((note ...) . duration) or pauses (#f . duration)
repeat... | #lang typed/racket/base
(require benchmark-util
"../base/typed-array-data.rkt")
(require/typed/check "array-struct.rkt"
[build-array (-> (Vectorof Nonnegative-Integer) (-> Indexes Flonum) Array)])
(require/typed/check "array-transform.rkt"
[array-append* (case-> ((Listof Array) -> Array)
... |
dfec22cc44550095a8a6d089e6d20e951eeb32384e182ca95f1baa3d8bdea484 | dylex/haskell-nfs | Transport.hs | module Network.ONCRPC.Transport
( sendTransport
, recvTransport
, TransportState
, transportStart
, recvGetFirst
, recvGetNext
) where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.Serialize.Get as S
import qualified Network.Socket as Net
impor... | null | https://raw.githubusercontent.com/dylex/haskell-nfs/33e8b9c7f20a05f91bb01e4c0a998ae749122a73/rpc/Network/ONCRPC/Transport.hs | haskell | |Get the next part of the current record, after calling 'recvGetFirst' to start.
continue record
check for more
buffered data
end of record
read next block
start parsing
parse block
read next block
start next record
ignore remaining record | module Network.ONCRPC.Transport
( sendTransport
, recvTransport
, TransportState
, transportStart
, recvGetFirst
, recvGetNext
) where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.Serialize.Get as S
import qualified Network.Socket as Net
impor... |
9cd6aae29c5a7d2b2ea6a2b3ce03a2e17b68a78fe028c96b789465f0969fa83e | Bogdanp/racket-chief | info.rkt | #lang info
(define license 'BSD-3-Clause)
(define version "0.1")
(define collection "chief")
(define deps '("base"
"gregor-lib"))
(define build-deps '("at-exp-lib"
"rackunit-lib"))
(define test-omit-paths '("cli.rkt"))
(define raco-commands '(("chief" chief/cli "run application p... | null | https://raw.githubusercontent.com/Bogdanp/racket-chief/3553d3a38cf615a1c39ff57f1cfcb3b8bacd2afa/chief/info.rkt | racket | #lang info
(define license 'BSD-3-Clause)
(define version "0.1")
(define collection "chief")
(define deps '("base"
"gregor-lib"))
(define build-deps '("at-exp-lib"
"rackunit-lib"))
(define test-omit-paths '("cli.rkt"))
(define raco-commands '(("chief" chief/cli "run application p... | |
dd223a7abbdfd47141dec70c17397c8b6be5d94d310e14dd71d65770a4e81ed3 | fogfish/hash | hash_aws_v4.erl | %%
Copyright 2017 , 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 in writing... | null | https://raw.githubusercontent.com/fogfish/hash/a1b9101189e115b4eabbe941639f3c626614e986/src/hash_aws_v4.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 g... | Copyright 2017 , 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(hash_aws_v4).
-export([new/5, sign/7]).
-define(ALGORITHM, <<"AWS4-HMAC-SHA256">>).
-record(aws, {
access = undefine... |
8a98c07569f58020c43e8a669cffb52d62815ca1afcfd294c60b36b2b389cb90 | racket/web-server | add02-base.rkt | #lang web-server/base
(require web-server/http
web-server/lang/web
net/url)
(define interface-version 'stateless)
(provide start interface-version)
;; get-number-from-user: string -> number
;; ask the user for a number
(define (gn msg)
(let ([req
(send/suspend/url
(lambda (k-url)... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/default-web-root/htdocs/lang-servlets/add02-base.rkt | racket | get-number-from-user: string -> number
ask the user for a number | #lang web-server/base
(require web-server/http
web-server/lang/web
net/url)
(define interface-version 'stateless)
(provide start interface-version)
(define (gn msg)
(let ([req
(send/suspend/url
(lambda (k-url)
(response/xexpr
`(html (head (title ,(format ... |
00da7b0d408b71b9c2bcf4bff0f461978fc9d6073c812c297feabf4002f34088 | discus-lang/salt | Driver.hs |
module Salt.LSP.Driver
(runLSP)
where
import Salt.LSP.Protocol
import Salt.LSP.Interface
import Salt.LSP.State
import qualified Salt.LSP.Task.Diagnostics as Task
import Data.IORef
import qualified System.IO as System
import qualified System.Exit as System
import qua... | null | https://raw.githubusercontent.com/discus-lang/salt/33c14414ac7e238fdbd8161971b8b8ac67fff569/src/salt/Salt/LSP/Driver.hs | haskell | -------------------------------------------------------------------------------------------------
| Become a language server plugin.
* We take an optional path for server side logging.
* If the server process crashes then try to write the reason to the debug log.
Enter the main server loop.
If we get any exc... |
module Salt.LSP.Driver
(runLSP)
where
import Salt.LSP.Protocol
import Salt.LSP.Interface
import Salt.LSP.State
import qualified Salt.LSP.Task.Diagnostics as Task
import Data.IORef
import qualified System.IO as System
import qualified System.Exit as System
import qua... |
b76667c20cf413a68352752ddd8b224d92f8a3eff35ce6c2d48a306bc2253afc | emaphis/HtDP2e-solutions | 09_02_non_empty_lists.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-beginner-reader.ss" "lang")((modname 09_02_non_empty_lists) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repea... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/2-Arbitrarily-Large-Data/09-Designing-Self-Referential/09_02_non_empty_lists.rkt | racket | about the language level of this file in a form that our tools can easily process.
A List-of-temperatures is one of:
– '()
List-of-temperatures -> Number
computes the average temperature
List-of-temperatures -> Number
adds up the temperatures on the given list
List-of-temperatures -> Number
counts the temperat... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname 09_02_non_empty_lists) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
HtDP 2e - 9 Designing with Self - Referential Da... |
aac35b1031c30e0dce35455b20fd37e0f98eaa394dfc7d845168f3a714810bb5 | vmchale/morphism-zoo | Fib.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveTraversable #-}
module Fib
( fib
, fibPattern
, fibBig
) where
import Data.Functor.Foldable
import Data.Functor... | null | https://raw.githubusercontent.com/vmchale/morphism-zoo/4f1a040ddb3cb1f0292f94d98d34f3075c97d738/src/Fib.hs | haskell | # LANGUAGE KindSignatures #
# LANGUAGE TypeFamilies #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
# LANGUAGE DeriveTraversable #
fibBig :: Integer -> Integer
fibBig n = fibBigPattern (n-1) + fibBigPattern (n-2) | # LANGUAGE TemplateHaskell #
module Fib
( fib
, fibPattern
, fibBig
) where
import Data.Functor.Foldable
import Data.Functor.Foldable.TH
import Data.Int
data Fib a = Add (Fib a) (Fib a)
| Fix a
makeBaseFunctor ''Fib
algebra :: Num t => FibF t t -> t
algebra (AddF x1 x2) = x1 + x2
algebra (Fi... |
ebd234768dd3ae82d720af577597b128c9be0455de4de81a2bcdf486c82cb36a | metabase/metabase | handler.clj | (ns metabase.server.handler
"Top-level Metabase Ring handler."
(:require
[metabase.config :as config]
[metabase.server.middleware.auth :as mw.auth]
[metabase.server.middleware.browser-cookie :as mw.browser-cookie]
[metabase.server.middleware.exceptions :as mw.exceptions]
[metabase.server.middleware.j... | null | https://raw.githubusercontent.com/metabase/metabase/dad3d414e5bec482c15d826dcc97772412c98652/src/metabase/server/handler.clj | clojure | so they should be strings, and will be parsed into their respective values.
▼▼▼ POST-PROCESSING ▼▼▼ happens from TOP-TO-BOTTOM
catch any Exceptions that weren't passed to `raise`
catch exceptions and return them in our expected format
add cookie to identify browser; add `:browser-id` to the request
Add HTTP heade... | (ns metabase.server.handler
"Top-level Metabase Ring handler."
(:require
[metabase.config :as config]
[metabase.server.middleware.auth :as mw.auth]
[metabase.server.middleware.browser-cookie :as mw.browser-cookie]
[metabase.server.middleware.exceptions :as mw.exceptions]
[metabase.server.middleware.j... |
31129071ea5afe27a639fd4d9f578a4617ec4295d118daf88fbfc88534700aef | google/codeworld | Prelude.hs | {-# LANGUAGE PackageImports #-}
module Prelude (module Core, P.drawingOf, P.circle, foo) where
import Core
import qualified "codeworld-base" Prelude as P
foo = 42
| null | https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-compiler/test/testcases/magicImport_prelude/Prelude.hs | haskell | # LANGUAGE PackageImports # |
module Prelude (module Core, P.drawingOf, P.circle, foo) where
import Core
import qualified "codeworld-base" Prelude as P
foo = 42
|
d04a2623b6099953690571fa20afbc3ab2d174de32a048aaf4e2f7123d120071 | bsansouci/bsb-native | selection.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/asmcomp/power/selection.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1997 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 Cmm
open Arch
open Mach
Recogn... |
64da5e15801e7d8891343f538335020c7786f7d4ff1469d748e55846ca2816b4 | clj-easy/graalvm-clojure | main.clj | (ns simple.main
(:require [fastmath.core :as m]
[fastmath.vector :as v]
[fastmath.random :as r]
[fastmath.fields :as f]
[fastmath.kernel :as k]
[fastmath.interpolation :as i]
[fastmath.classification :as cl]
[fastmath.clustering :as c... | null | https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/fastmath/src/simple/main.clj | clojure | fields
interpolation
classification
clustering
regression
signal
wavelets
dft
(println "Clustering")
(println "Wavelet compression")
(println " symlet-5: " (wavelets)) | (ns simple.main
(:require [fastmath.core :as m]
[fastmath.vector :as v]
[fastmath.random :as r]
[fastmath.fields :as f]
[fastmath.kernel :as k]
[fastmath.interpolation :as i]
[fastmath.classification :as cl]
[fastmath.clustering :as c... |
33faf121adeb4c2fa38243249d10ff830cfe72546ebc99842894531c0b37ed3f | pixlsus/registry.gimp.org_static | JMS-Sierpinski_carpet.scm |
( c ) 2011 ,
;;
;; 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 your option) any later version.
;;
;; This program is distr... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/JMS-Sierpinski_carpet.scm | scheme |
This program is free software: you can redistribute it and/or modify
(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. See the
GNU G... |
( c ) 2011 ,
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(define (script-fu-SierpinskiCarpet
)
(let* (
(theImage (car (gimp... |
b6907bf2470e915d30a404f6de28c3d139c65418ba27af3d0aae7dc881d6d3e8 | dgiot/dgiot | dgiot_task.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. 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... | null | https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_task/src/dgiot_task.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 ... | Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. 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(dgiot_task).
-include("dgiot_task.hrl").
-include_lib("dgiot/include/logger.hrl").
-in... |
6089596a786b9eafaba6a4224fb867c4f3b57ed9ec59cce0dff4012b8abf805f | duncanatt/detecter | cow_base64url.erl | Copyright ( c ) 2017 - 2018 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/duncanatt/detecter/95b6a758ce6c60f3b7377c07607f24d126cbdacf/experiments/coordination_2022/src/cowlib/cow_base64url.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2017 - 2018 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(cow_base64url).
-export([decode/1]).
-export... |
375a6a3e9c2a04f404b5726d0a7324ca41391737f48d149f6a8a1806a632498b | spurious/sagittarius-scheme-mirror | %3a31.scm | (import (rnrs)
(srfi :31 rec)
(srfi :64 testing))
(test-begin "SRFI-31 tests")
(define F (rec (F N)
((rec (G K L)
(if (zero? K) L
(G (- K 1) (* K L)))) N 1)))
(test-assert (procedure? F))
(test-equal 1 (F 0))
( test - equal 3628800 ( F 10 ) )
(test-end)
| null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/test/tests/srfi/%253a31.scm | scheme | (import (rnrs)
(srfi :31 rec)
(srfi :64 testing))
(test-begin "SRFI-31 tests")
(define F (rec (F N)
((rec (G K L)
(if (zero? K) L
(G (- K 1) (* K L)))) N 1)))
(test-assert (procedure? F))
(test-equal 1 (F 0))
( test - equal 3628800 ( F 10 ) )
(test-end)
| |
90c35b0d82fb453540e2fda35366ad0cc71cf548ab97358dece80c1b9b497923 | bmeurer/ocaml-arm | opttopdirs.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/toplevel/opttopdirs.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Format
val dir_quit : u... |
de12b3f10052765dc30e98dd99fc045cdc7076e8555303289909a2a7eda7a2d4 | samee/netlist | StableMarriage-old.hs | module Test.StableMarriage where
import Data.List
import Data.Array
import Debug.Trace
import System.Random
import Circuit.Interpreted.StableMarriage
import Util
randomTest :: RandomGen r => Int -> r -> (Bool,r)
randomTest n rgen = (checkStability,rgen3) where
(_,orderM) = mapAccumL (\rgen _ -> swap $ randomlist r... | null | https://raw.githubusercontent.com/samee/netlist/9fc20829f29724dc1148e54bd64fefd7e70af5ba/Test/StableMarriage-old.hs | haskell | module Test.StableMarriage where
import Data.List
import Data.Array
import Debug.Trace
import System.Random
import Circuit.Interpreted.StableMarriage
import Util
randomTest :: RandomGen r => Int -> r -> (Bool,r)
randomTest n rgen = (checkStability,rgen3) where
(_,orderM) = mapAccumL (\rgen _ -> swap $ randomlist r... | |
af9acce0f1c238acd1b05b970ff8e54f9dbade7ff2956b421ceb5d61d01ef0e3 | hspec/hspec | Pretty.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module Test.Hspec.Core.Formatters.Pretty (
pretty2
#ifdef TEST
, pretty
, recoverString
, recoverMultiLineString
#endif
) where
import Prelude ()
import Test.Hspec.Core.Compat hiding (shows, intercalate)
import Data.Char
import ... | null | https://raw.githubusercontent.com/hspec/hspec/a4441abd20039638826b3574216bf945bd2b6d76/hspec-core/src/Test/Hspec/Core/Formatters/Pretty.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE CPP #
module Test.Hspec.Core.Formatters.Pretty (
pretty2
#ifdef TEST
, pretty
, recoverString
, recoverMultiLineString
#endif
) where
import Prelude ()
import Test.Hspec.Core.Compat hiding (shows, intercalate)
import Data.Char
import Data.String
import Da... |
405c9e3e602a7465757f4e090c801dfa2eb0e27acea6e7295edd19c67346c07e | adityavkk/N-Body-Simulations | Main.hs | module Main where
import Graphics.Gloss
import Gravity
import SolarSystem
import qualified DataTypes as T
type PixToKg = Float
type PixToMeter = Float
w = 1500
off = 100
fps = 80 :: Int
window =
InWindow "N-Body Simulation (Direct Sim) by Aditya K." (w, w) (off, off)
render :: T.Universe -> Picture
render u =... | null | https://raw.githubusercontent.com/adityavkk/N-Body-Simulations/23e379e513b3254cd7144408fe132a5280ff9ce6/Direct-Simulation/src/Main.hs | haskell | module Main where
import Graphics.Gloss
import Gravity
import SolarSystem
import qualified DataTypes as T
type PixToKg = Float
type PixToMeter = Float
w = 1500
off = 100
fps = 80 :: Int
window =
InWindow "N-Body Simulation (Direct Sim) by Aditya K." (w, w) (off, off)
render :: T.Universe -> Picture
render u =... | |
5dff4296887f52c4dabe37fa2bee2f80cc79f75050664709f77969e26b562f60 | tisnik/clojure-examples | core_test.clj | ;
( C ) Copyright 2016 , 2020
;
; 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:
;
(ns async10.core-test
(:require [c... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/async10/test/async10/core_test.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 2016 , 2020
-v10.html
(ns async10.core-test
(:require [clojure.test :refer :all]
[async10.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
|
a8bd60f7339697f4a8da474ac260ec0edaf8e96f30009cd1c69fa2fa719baf66 | filecoin-project/orient | zigzag-security.lisp | (in-package :filecoin)
(in-suite filecoin-suite)
(defschema zigzag-security-schema
"ZigZag Security"
(zigzag-soundness "ZigZag soundness: Unit fraction")
(zigzag-lambda "ZigZag soundness: Unit bits")
(zigzag-epsilon "Maximum allowable deletion (space tightness): Unit: fraction")
(zigzag-delta "Maximum allo... | null | https://raw.githubusercontent.com/filecoin-project/orient/3a9ec7c41fd9f8ac5185c358ce908e5646ddffca/filecoin/zigzag-security.lisp | lisp | TODO: Allow specifying like this. | (in-package :filecoin)
(in-suite filecoin-suite)
(defschema zigzag-security-schema
"ZigZag Security"
(zigzag-soundness "ZigZag soundness: Unit fraction")
(zigzag-lambda "ZigZag soundness: Unit bits")
(zigzag-epsilon "Maximum allowable deletion (space tightness): Unit: fraction")
(zigzag-delta "Maximum allo... |
f5272639bf14dcd2dd368c8f987e68107cac0fca01eb70d28887555d9b6783e4 | clojure-interop/google-cloud-clients | JobServiceClient$SearchJobsPage.clj | (ns com.google.cloud.talent.v4beta1.JobServiceClient$SearchJobsPage
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.talent.v4beta1 JobServiceClient$SearchJobsPage]))
(defn create-page-async
"context - `com.google.api.gax.rpc.PageContext`
future-response - `com.google.api.core.ApiFut... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.talent/src/com/google/cloud/talent/v4beta1/JobServiceClient%24SearchJobsPage.clj | clojure | (ns com.google.cloud.talent.v4beta1.JobServiceClient$SearchJobsPage
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.talent.v4beta1 JobServiceClient$SearchJobsPage]))
(defn create-page-async
"context - `com.google.api.gax.rpc.PageContext`
future-response - `com.google.api.core.ApiFut... | |
6eb0a1bc0981c90aa40cc9292fb11eed70109f00a6d2fe952c28aa701678fda2 | brianium/clean-todos | create.clj | (ns todos.delivery.api.create
(:require [clojure.spec.alpha :as s]
[ring.util.response :refer [response]]
[yoose.core :as yoose]
[todos.delivery.api.spec :as ts]
[todos.delivery.api.json :refer [todo->json]]
[todos.delivery.use-cases :refer [create-todo]]
... | null | https://raw.githubusercontent.com/brianium/clean-todos/fca2320fe3bca052787c4ace479ce69d23d58a12/src/todos/delivery/api/create.clj | clojure | @todo maybe just parse the explanation from spec | (ns todos.delivery.api.create
(:require [clojure.spec.alpha :as s]
[ring.util.response :refer [response]]
[yoose.core :as yoose]
[todos.delivery.api.spec :as ts]
[todos.delivery.api.json :refer [todo->json]]
[todos.delivery.use-cases :refer [create-todo]]
... |
2585ee140564f96bf04aa88fd054c92b7945bd1cecbfbbc9e8bb0a3e91b59a86 | gwkkwg/cl-markdown | test-regexes.lisp | (in-package #:cl-markdown-test)
(deftestsuite test-regexes (cl-markdown-test-all) ())
(deftestsuite test-url (test-regexes) ())
(addtest (test-url)
test-1
(ensure-same
(scan-to-strings
'(:sequence url) "My page is at /~gwking/public.")
(values "/~gwking/public"
#("www.metabang.com" "~gwking/... | null | https://raw.githubusercontent.com/gwkkwg/cl-markdown/098e89251adf3337578aacd0a7b029956efc1478/unit-tests/test-regexes.lisp | lisp | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
--------------------------------------------------------------------------- | (in-package #:cl-markdown-test)
(deftestsuite test-regexes (cl-markdown-test-all) ())
(deftestsuite test-url (test-regexes) ())
(addtest (test-url)
test-1
(ensure-same
(scan-to-strings
'(:sequence url) "My page is at /~gwking/public.")
(values "/~gwking/public"
#("www.metabang.com" "~gwking/... |
7a8102935509688609c07fa38d1ddc96cde22859f669505101d8f8c09814bde1 | spawnfest/eep49ers | tftp_logger.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2018 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/tftp/src/tftp_logger.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2008 - 2018 . 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(tftp_logger).
Interface
-export([
error_msg/2,
warning_msg/2,
info_msg/2
]).
-export([behaviour_i... |
5c5ac74a692ea50e21bb00f9334b795067edde12fc1a54f1fbd3d3aafd259ff0 | odj/Ouch | Mol.hs | ------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Module : Ouch . Output . Mol
-- Maintainer :
-- Stability : Unstable
-- Portability :
Copyright ( c ) 2010 Orion... | null | https://raw.githubusercontent.com/odj/Ouch/ed20599214cf77b0cb81cc7cefb4cd9c35bc7cf7/Ouch/Output/Mol.hs | haskell | ----------------------------------------------------------------------------
------------------------------------------------------------------------------
Module : Ouch . Output . Mol
Maintainer :
Stability : Unstable
Portability :
--------------------------------------------------... |
Copyright ( c ) 2010 Orion
This file is part of Ouch , a chemical informatics toolkit
written entirely in Haskell .
Ouch 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 , e... |
c865b798c13c98b1ac928b5b6b59883baeeed6fab714dffb2e290c153bee280d | Chris00/ocaml-dropbox | create_folder.ml | open Lwt
module D = Dropbox_lwt_unix
* We assume there is only two entries in command line and that Sys.argv.(0 )
is the path of the folder and Sys.argv.(1 ) is the root
is the path of the folder and Sys.argv.(1) is the root *)
let string_to_root a = match a with
| "auto" -> `Auto
| "dropbox" -> `Dropbo... | null | https://raw.githubusercontent.com/Chris00/ocaml-dropbox/36b222269e6bc7e5486cbb69738841d87a1212fb/tests/create_folder.ml | ocaml | open Lwt
module D = Dropbox_lwt_unix
* We assume there is only two entries in command line and that Sys.argv.(0 )
is the path of the folder and Sys.argv.(1 ) is the root
is the path of the folder and Sys.argv.(1) is the root *)
let string_to_root a = match a with
| "auto" -> `Auto
| "dropbox" -> `Dropbo... | |
a450ab066c512316440087d5cd153fef70ab337742d530c46641266ced9ab7c0 | chrislloyd/kepler | decomposition.clj | (ns kepler.systems.decomposition
(:require [kepler.component.life :refer [is-dead?]]))
(defn decomposition-system [state action]
(if (= (:type action) :tick)
(let [dead-entities (->> state
(filter
(fn [{:keys [type val]}]
... | null | https://raw.githubusercontent.com/chrislloyd/kepler/bd6f30c20ff9e5ad6749bab0d3589d9ccce6f14f/src/kepler/systems/decomposition.clj | clojure | (ns kepler.systems.decomposition
(:require [kepler.component.life :refer [is-dead?]]))
(defn decomposition-system [state action]
(if (= (:type action) :tick)
(let [dead-entities (->> state
(filter
(fn [{:keys [type val]}]
... | |
97ad42b13e558431a1adcae1907e669e4a116695cff77b86a6e5c7cbde6dca94 | synduce/Synduce | mpss_noe.ml |
let s0 a = (max a 0, a)
let s1 (b0, b1) (c0, c1) = (max b0 (b1 + c0), b1 + c1)
let rec target =
function Sglt(x) -> s0 (tsum x) | Cat(l, r) -> s1 (target r) (target l)
and tsum = function Elt(x) -> x | Cons(hd, tl) -> hd + (tsum tl)
| null | https://raw.githubusercontent.com/synduce/Synduce/289888afb1c312adfd631ce8d90df2134de827b8/extras/solutions/constraints/ensures/mpss_noe.ml | ocaml |
let s0 a = (max a 0, a)
let s1 (b0, b1) (c0, c1) = (max b0 (b1 + c0), b1 + c1)
let rec target =
function Sglt(x) -> s0 (tsum x) | Cat(l, r) -> s1 (target r) (target l)
and tsum = function Elt(x) -> x | Cons(hd, tl) -> hd + (tsum tl)
| |
70905892a3b1118ee5fa2d6085db663b63d22eb0ddecba377c9fed70ca24c5bf | higherkindness/mu-haskell | Producer.hs | # language DeriveGeneric #
{-# language FlexibleContexts #-}
# language TypeFamilies #
|
Description : streams of terms as producers
This module allows you to open a " sink " to .
Every value you sent to the sink will be sent over
to the corresponding instance .
This module is a wrapper over ' ... | null | https://raw.githubusercontent.com/higherkindness/mu-haskell/e41ba786f556cfac962e0f183b36bf9ae81d69e4/adapter/kafka/src/Mu/Kafka/Producer.hs | haskell | # language FlexibleContexts #
| Creates a kafka producer for given properties and returns a Sink.
'kafkaSinkAutoClose' or 'kafkaSinkNoClose' can be used.
The producer will be closed when the Sink is closed.
The producer will NOT be closed automatically.
The producer will NOT be closed automatically. | # language DeriveGeneric #
# language TypeFamilies #
|
Description : streams of terms as producers
This module allows you to open a " sink " to .
Every value you sent to the sink will be sent over
to the corresponding instance .
This module is a wrapper over ' . Conduit . Sink '
from the ( a... |
143499f0c1efdd6ab633c418ba0357ce9bc6dfda87df18bfc0f7671a5d9dbb7a | haskell-opengl/OpenGLRaw | VertexShader.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.EXT.VertexShader
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/VertexShader.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.EXT.VertexShader
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.EXT.VertexShader (
glGetEXTVertexShader,
gl_EXT_vertex_shader,
pattern GL_CURRENT_VERTEX_EXT,
pattern GL_FULL_RANGE_EXT,
pattern GL_INVARIANT_DATATYPE_EXT,
pattern GL_INVARIANT_EXT,
pattern GL_INVARI... |
c601ee04b20904e1af6427c06338b408b4e724b8424f082a7afe99bc3bf1431a | ScottBrooks/Erlcraft | mc_world.erl | -module(mc_world).
-behaviour(gen_server).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-record(state, {world_path, world, chunk_store, block_store, clients, world_updates}).
-define(SERVER_TIMEOUT, 30000).
%% External API
-export([start_link/1, get_chunk/3, get_spawn/... | null | https://raw.githubusercontent.com/ScottBrooks/Erlcraft/ed336eb8da4d83e937687ce34feecb76b4128288/src/mc_world.erl | erlang | External API
Data = mc_util:chunk_data(SizeX * SizeY * SizeX),
Random location inside the block that was broken
io:format("Meta: ~p~n", [Meta]),
gen_server events
Tests
| -module(mc_world).
-behaviour(gen_server).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-record(state, {world_path, world, chunk_store, block_store, clients, world_updates}).
-define(SERVER_TIMEOUT, 30000).
-export([start_link/1, get_chunk/3, get_spawn/0, load_chunk/5,... |
6abc89c4329ae650f85d4265aff731c7be6491dea02babe2ea3dcfc0624aae79 | melange-re/melange | test_nested_print.ml |
let u x x = x + x
let f g x =
let u = g x in u + u
| null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/test_nested_print.ml | ocaml |
let u x x = x + x
let f g x =
let u = g x in u + u
| |
1948f83e59eb2e4caf3ba7a1d855bd089f7774e2447ffe5c25214e6326c29008 | lattenwald/erl-tdlib | tdlib_nif.erl | -module(tdlib_nif).
%% API exports
-export([new/0, send/2, execute/2, recv/2]).
-on_load(init/0).
init() ->
PrivDir = code:priv_dir(tdlib),
File = filename:join([PrivDir, "libtdlib_nif.so"]),
erlang:load_nif(filename:rootname(File), 0).
%%================================================================... | null | https://raw.githubusercontent.com/lattenwald/erl-tdlib/8e72658ca12c731e2fb39762f325142a3fe558f8/src/tdlib_nif.erl | erlang | API exports
====================================================================
API functions
====================================================================
====================================================================
==================================================================== | -module(tdlib_nif).
-export([new/0, send/2, execute/2, recv/2]).
-on_load(init/0).
init() ->
PrivDir = code:priv_dir(tdlib),
File = filename:join([PrivDir, "libtdlib_nif.so"]),
erlang:load_nif(filename:rootname(File), 0).
new() ->
exit(nif_lirary_not_loaded).
send(_, _) ->
exit(nif_lirary_not... |
bbe9064a30429f4c8fc20278cd062b6578d36336775a308fe403fe3882125ead | zotonic/zotonic | z_admin_rsc_import.erl | @author < >
2021
%%
%% @doc Support for admin tasks around non authoritative resources.
Copyright 2021
%%
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
%... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_mod_admin/src/support/z_admin_rsc_import.erl | erlang |
@doc Support for admin tasks around non authoritative resources.
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... | @author < >
2021
Copyright 2021
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_admin_rsc_import).
-export([
event/2
]).
-include_lib("zotonic_core/include/zotonic.hrl").
event(#postback{ mess... |
ad5fdf7761b2802c43b3591a67edcaa9ea6fe8ed73b947045ba6cc32b5cc7e83 | esl/MongooseIM | mod_inbox_muc.erl | %%%-------------------------------------------------------------------
@author
( C ) 2018 , Erlang - Solutions
%%% @doc
%%%
%%% @end
Created : 6.07.2018
%%%-------------------------------------------------------------------
-module(mod_inbox_muc).
-author("").
-include("jlib.hrl").
-include("mongoose.hrl").
... | null | https://raw.githubusercontent.com/esl/MongooseIM/c3383bc66ddd042553d38223fa7e2aa9f9f505fe/src/inbox/mod_inbox_muc.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
User jid example is "alice@localhost"
add hook handler for system messages on hook ie. invitation_sent
We ignore inbox for users on the remote (s2s) hosts
We ignore in... | @author
( C ) 2018 , Erlang - Solutions
Created : 6.07.2018
-module(mod_inbox_muc).
-author("").
-include("jlib.hrl").
-include("mongoose.hrl").
-export([update_inbox_for_muc/3, start/1, stop/1]).
-type user_jid() :: jid:jid().
-type receiver_bare_user_jid() :: user_jid().
-type room_bare_jid() :: jid:jid()... |
59f24dff932aad09317ee4da091baa93ca26eca43488afaeefab089d3048df1d | Liam-Eagen/BulletproofsPP | InnerProductArgument.hs | # LANGUAGE StandaloneDeriving #
module Bulletproof.InnerProductArgument where
import Data.Bifunctor
import Data.Foldable (foldrM, toList)
import Control.Monad (replicateM)
import Data.VectorSpace
import Control.Parallel.Strategies
import Utils
import Commitment
import Bulletproof
foldLR :: (CanCommit v s, BPColl... | null | https://raw.githubusercontent.com/Liam-Eagen/BulletproofsPP/0494201e2048f5c679f4ce3ee0cc6ac0ff9d3ef7/src/Bulletproof/InnerProductArgument.hs | haskell | Swaps the scalars/basis points
-----------------
Inner Product --
locality
Better way to do this?
For evaluation of scalar
NOTE this is why independent normalization is necessary
----------
--------
Norm --
Norm wraps the inner product and does basis modification, but otherwise works
exactly the same internal... | # LANGUAGE StandaloneDeriving #
module Bulletproof.InnerProductArgument where
import Data.Bifunctor
import Data.Foldable (foldrM, toList)
import Control.Monad (replicateM)
import Data.VectorSpace
import Control.Parallel.Strategies
import Utils
import Commitment
import Bulletproof
foldLR :: (CanCommit v s, BPColl... |
9c4a91801efe5130c9dbd24517e5e1d5c18c8926cfab168f367148504c0534e2 | rubenbarroso/EOPL | 3_25.scm | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(define-datatype environment nameless-environment?
(empty-nameless-env-record)
(extended-nameless-env-record
(vals (list-of scheme... | null | https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter3/3_25.scm | scheme | Some tests:
> (apply-nameless-env
(extend-nameless-env
(extend-nameless-env
(empty-nameless-env)))
> (apply-nameless-env
(extend-nameless-env
(extend-nameless-env
(empty-nameless-env)))
helpers
the interpreter
Helper procedures from exercise 1.31
we will represent free variables wi... | (load "/Users/ruben/Dropbox/EOPL/src/interps/r5rs.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/define-datatype.scm")
(load "/Users/ruben/Dropbox/EOPL/src/interps/sllgen.scm")
(define-datatype environment nameless-environment?
(empty-nameless-env-record)
(extended-nameless-env-record
(vals (list-of scheme... |
e040cf570e21f2248dc1af3980a718a2f6a210deb86823ee2a38941578c4599d | Decentralized-Pictures/T4L3NT | fees_storage.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/fees_storage.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
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 , WHETH... |
5c689050e266c9e314ec853283b4170579f3203d642994b50af314b3d5625814 | ZHaskell/z-data | Regex.hs | |
Module : Z.Data . Text . Regex
Description : RE2 regex
Copyright : ( c ) , 2017 - 2018
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
Binding to google 's < RE2 > , microsoft did a nice job on RE2 regex syntaxs :
< -us/deployedge/edge-learnmo... | null | https://raw.githubusercontent.com/ZHaskell/z-data/82e31fea77ab9384000a21cb3fedcfd3eee6cc4a/Z/Data/Text/Regex.hs | haskell | * RE2 regex
* regex operations
| A compiled RE2 regex.
# UNPACK #
^ Get back regex's pattern.
| RE2 Regex options.
The options are ('defaultRegexOpts' in parentheses):
@
log_errors (true) log syntax and execution errors to ERROR
literal (false) interpret string as literal, not regexp
d... | |
Module : Z.Data . Text . Regex
Description : RE2 regex
Copyright : ( c ) , 2017 - 2018
License : BSD
Maintainer :
Stability : experimental
Portability : non - portable
Binding to google 's < RE2 > , microsoft did a nice job on RE2 regex syntaxs :
< -us/deployedge/edge-learnmo... |
4becd54126d7257f8a7b5ee315fb0e1b65709255211b769d46eedda826775a3b | walfie/ac-tune-maker | Note.ml | type note =
| Rest
| Hold
| G
| A
| B
| C
| D
| E
| F
| G'
| A'
| B'
| C'
| D'
| E'
| Random
type meta =
{ index : int
; as_str : I18n.t
; color : string
; next : note option
; prev : note option
}
let all = [| Rest; Hold; G; A; B; C; D; E; F; G'; A'; B'; C'; D'; E'; Random... | null | https://raw.githubusercontent.com/walfie/ac-tune-maker/fe98aa88ae643630a572612367411b63da60df92/src/Note.ml | ocaml | type note =
| Rest
| Hold
| G
| A
| B
| C
| D
| E
| F
| G'
| A'
| B'
| C'
| D'
| E'
| Random
type meta =
{ index : int
; as_str : I18n.t
; color : string
; next : note option
; prev : note option
}
let all = [| Rest; Hold; G; A; B; C; D; E; F; G'; A'; B'; C'; D'; E'; Random... | |
d2ee555751f5adea4f20134f996302d9025d8d6333b900da80a19f1e4f664fd3 | lspitzner/brittany | Test380.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func :: [a -> b]
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test380.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | func :: [a -> b]
|
b3af49c012c5ae2be02d1bdd155068c9ad2854d8c754e36364a2403fea156d16 | anoma/juvix | Transformation.hs | module Asm.Transformation where
import Asm.Transformation.Prealloc qualified as Prealloc
import Base
allTests :: TestTree
allTests = testGroup "JuvixAsm transformations" [Prealloc.allTests]
| null | https://raw.githubusercontent.com/anoma/juvix/9d4f843262b7bf14ad8f943988bf1cc5bffdc887/test/Asm/Transformation.hs | haskell | module Asm.Transformation where
import Asm.Transformation.Prealloc qualified as Prealloc
import Base
allTests :: TestTree
allTests = testGroup "JuvixAsm transformations" [Prealloc.allTests]
| |
13acd6b40006fb819d835039f035bf2e02c95a1fa8f8c3a01c5f389f8631fdf6 | input-output-hk/cardano-ledger | Example.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module Test.Cardano.Chain.Update.Example (
exampleApplicationName,
exampleProtocolVersion,
exampleProtocolParameters,
exampleProtocolParametersUpdate,
exampleSoftwareVersion,
exampleSystemTag,
exampleInstallerHash,
... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/byron/ledger/impl/test/Test/Cardano/Chain/Update/Example.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Test.Cardano.Chain.Update.Example (
exampleApplicationName,
exampleProtocolVersion,
exampleProtocolParameters,
exampleProtocolParametersUpdate,
exampleSoftwareVersion,
exampleSystemTag,
exampleInstallerHash,
examplePayload,
exampleProof,
e... |
de1066dddc92b621f61239e67dbe3fd8ffada14206f09ee44894788fa5a3dd7e | Frama-C/Frama-C-snapshot | export_whycore.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/qed/export_whycore.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
cd7f24568530413cd6830fb09492bbccd7b6f4753cdf9408b9f5386360024506 | rtoy/cmucl | xref.lisp | xref.lisp -- a cross - reference facility for CMUCL
;;;
Author : < >
;;;
(ext:file-comment
"$Header: src/compiler/xref.lisp $")
;;
This code was written as part of the CMUCL project and has been
;; placed in the public domain.
;;
;;
;; The cross-referencing facility provides the ability to discover
;; inform... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/xref.lisp | lisp |
placed in the public domain.
The cross-referencing facility provides the ability to discover
information such as which functions call which other functions and
in which program contexts a given global variables may be used. The
cross-referencer maintains a database of cross-reference
information which can be... | xref.lisp -- a cross - reference facility for CMUCL
Author : < >
(ext:file-comment
"$Header: src/compiler/xref.lisp $")
This code was written as part of the CMUCL project and has been
More details are available in " Cross - Referencing Facility " chapter
of the CMUCL User 's Manual .
- maybe add macr... |
362b9169913c6e777548a0ba8d5cd51b889f95cacd174aa19428ab70d9f5d135 | ManasJayanth/reason-on-multicore | ast_mapper_class.ml | (* This file is part of the ppx_tools package. It is released *)
under the terms of the MIT license ( see LICENSE file ) .
Copyright 2013 and LexiFi
(** Class-based customizable mapper *)
open Parsetree
open Asttypes
open Ast_helper
let map_fst f (x, y) = (f x, y)
let map_sn... | null | https://raw.githubusercontent.com/ManasJayanth/reason-on-multicore/39de4889f27ec43ab8a34732fb40b7adae08d1ed/vendor/ppx_tools/src/ast_mapper_class.ml | ocaml | This file is part of the ppx_tools package. It is released
* Class-based customizable mapper
Type expressions for the core language
Type expressions for the class language
Type expressions for the module language
Value expressions for the module language
Value expressions for the core language
Patterns... | under the terms of the MIT license ( see LICENSE file ) .
Copyright 2013 and LexiFi
open Parsetree
open Asttypes
open Ast_helper
let map_fst f (x, y) = (f x, y)
let map_snd f (x, y) = (x, f y)
let map_tuple f1 f2 (x, y) = (f1 x, f2 y)
let map_tuple3 f1 f2 f3 (x, y, z) = (f1 x, ... |
b51986bba62a3e6f38a0333c8bef0639a72c1961c334d03aba0ebf3dfcd956df | deadpendency/deadpendency | VerifyPlanRetC.hs | module RP.Effect.VerifyPlan.Carrier.VerifyPlanRetC
( runVerifyPlanRet,
)
where
import Control.Algebra (Algebra (..), (:+:) (..))
import RP.Effect.VerifyPlan.VerifyPlan (VerifyPlan (..))
newtype VerifyPlanRetC m a = VerifyPlanRetC {runVerifyPlanRetC :: m a}
deriving newtype (Functor, Applicative, Monad)
instanc... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/run-preparer/src/RP/Effect/VerifyPlan/Carrier/VerifyPlanRetC.hs | haskell | module RP.Effect.VerifyPlan.Carrier.VerifyPlanRetC
( runVerifyPlanRet,
)
where
import Control.Algebra (Algebra (..), (:+:) (..))
import RP.Effect.VerifyPlan.VerifyPlan (VerifyPlan (..))
newtype VerifyPlanRetC m a = VerifyPlanRetC {runVerifyPlanRetC :: m a}
deriving newtype (Functor, Applicative, Monad)
instanc... | |
ac27370a656a3bdd313d0a57769e24808938b35d9a6eb6618888fb09b382df43 | haskell-rewriting/term-rewriting | Parse.hs | -- This file is part of the 'term-rewriting' library. It is licensed
under an MIT license . See the accompanying ' LICENSE ' file for details .
--
Authors : , Christian Sternagel
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
module Data.Rewriting.Problem.Parse (
parseIO,
parseFileIO,
... | null | https://raw.githubusercontent.com/haskell-rewriting/term-rewriting/d01ee419f9fd3c2011d37b6417326a9373d5ee9c/src/Data/Rewriting/Problem/Parse.hs | haskell | This file is part of the 'term-rewriting' library. It is licensed
| under an MIT license . See the accompanying ' LICENSE ' file for details .
Authors : , Christian Sternagel
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
module Data.Rewriting.Problem.Parse (
parseIO,
parseFileIO,
fromString,
fromFile,
fromCharStream,
ProblemParseError (..)
)... |
4b4dcba05e7c05a73b56eb9bfda3fe1053db0ac1bc92b7bdb2498f355937372b | dktr0/Punctual | Tests.hs | {-# LANGUAGE OverloadedStrings #-}
import Test.Microspec
-- import Data.Set as Set
import Data.IntMap.Strict as IntMap
import Data.Time
import Sound.Punctual.Parser
import Sound.Punctual.Program
import Sound.Punctual.Action
import Sound.Punctual.Graph
import Sound.Punctual.Transition
import Sound.Punctual.DefTime
imp... | null | https://raw.githubusercontent.com/dktr0/Punctual/300345fb919c2a300a50105fa3e7b2663244a5d7/tests/Tests.hs | haskell | # LANGUAGE OverloadedStrings #
import Data.Set as Set |
import Test.Microspec
import Data.IntMap.Strict as IntMap
import Data.Time
import Sound.Punctual.Parser
import Sound.Punctual.Program
import Sound.Punctual.Action
import Sound.Punctual.Graph
import Sound.Punctual.Transition
import Sound.Punctual.DefTime
import Sound.Punctual.Duration
import Sound.Punctual.Output
mai... |
66c7624c5038d12db46d98b76005e794fceab6146ad5c01d2c91e32c28fe420a | s-expressionists/Eclector | macro-functions.lisp | (cl:in-package #:eclector.reader)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Macro WITH-FORBIDDEN-QUASIQUOTATION.
;;;
;;; This macro controls whether quasiquote and/or unquote should be
;;; allowed in a given context.
(defmacro with-forbidden-quasiquotation
((context &optional ... | null | https://raw.githubusercontent.com/s-expressionists/Eclector/acd141db4efdbd88d57a8fe4f258ffc18cc47baa/code/reader/macro-functions.lisp | lisp |
Macro WITH-FORBIDDEN-QUASIQUOTATION.
This macro controls whether quasiquote and/or unquote should be
allowed in a given context.
Reader macro for semicolon.
We read characters until end-of-file or until we have read a
newline character. Since reading a comment does not generate an
object, the semicolon re... | (cl:in-package #:eclector.reader)
(defmacro with-forbidden-quasiquotation
((context &optional (quasiquote-forbidden-p t)
(unquote-forbidden-p t))
&body body)
(alexandria:with-unique-names (context*)
(let ((context-used-p nil))
(flet ((make-binding (variable value-form)
... |
b5c468121d8ddcd9c3e964729df8eb2d5e1eb0a75fa08d687135af2b6c8fbc2e | jacquev6/General | Scanable.signatures.Short.Right.ml | module type S0 = sig
type elt
type t
val scan_short_right: t -> init:elt -> f:(elt -> elt -> Shorten.t * elt) -> t
val scan_short_right_i: t -> init:elt -> f:(i:int -> elt -> elt -> Shorten.t * elt) -> t
val scan_short_right_acc: acc:'acc -> t -> init:elt -> f:(acc:'acc -> elt -> elt -> 'acc * Shorten.t * el... | null | https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Traits/Scanable.signatures.Short.Right.ml | ocaml | module type S0 = sig
type elt
type t
val scan_short_right: t -> init:elt -> f:(elt -> elt -> Shorten.t * elt) -> t
val scan_short_right_i: t -> init:elt -> f:(i:int -> elt -> elt -> Shorten.t * elt) -> t
val scan_short_right_acc: acc:'acc -> t -> init:elt -> f:(acc:'acc -> elt -> elt -> 'acc * Shorten.t * el... | |
2775beabc634c9a2f762215a88ed60c3a76062e62b16826875124f200a519ca6 | zelark/AoC-2020 | day_07.clj | (ns zelark.aoc-2020.day-07
(:require [clojure.java.io :as io]
[clojure.string :as str]))
;; --- Day 7: Handy Haversacks ---
;;
(def input (slurp (io/resource "input_07.txt")))
(defn parse-entry [entry]
(let [p (re-find #"\w+ \w+" entry)
cs (->> (re-seq #"(\d+) (\w+ \w+)" entry)
... | null | https://raw.githubusercontent.com/zelark/AoC-2020/5417c3514889eb02efc23f6be7d69e29fdfa0376/src/zelark/aoc_2020/day_07.clj | clojure | --- Day 7: Handy Haversacks ---
| (ns zelark.aoc-2020.day-07
(:require [clojure.java.io :as io]
[clojure.string :as str]))
(def input (slurp (io/resource "input_07.txt")))
(defn parse-entry [entry]
(let [p (re-find #"\w+ \w+" entry)
cs (->> (re-seq #"(\d+) (\w+ \w+)" entry)
(reduce (fn [m [_ v k]] (assoc m k ... |
c8725cd0610c14d925b1ebe214e2558d81dd24ae5233442bec4e870c7310d4a4 | klutometis/aima | zmq-server.scm | #!/usr/bin/env chicken-scheme
[ [ file:~/prg / scm / aima / aima.org::*5.5][5\.5:3 ] ]
(use debug loops zmq)
(let ((socket (make-socket 'rep)))
(bind-socket socket "tcp://*:5555")
(do-times i 4
(let ((message (receive-message* socket)))
(send-message socket message))))
5\.5:3 ends ... | null | https://raw.githubusercontent.com/klutometis/aima/df78e161f22ddb677dbf2fa819e5a4869be22f50/zmq-server.scm | scheme | #!/usr/bin/env chicken-scheme
[ [ file:~/prg / scm / aima / aima.org::*5.5][5\.5:3 ] ]
(use debug loops zmq)
(let ((socket (make-socket 'rep)))
(bind-socket socket "tcp://*:5555")
(do-times i 4
(let ((message (receive-message* socket)))
(send-message socket message))))
5\.5:3 ends ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.