_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 |
|---|---|---|---|---|---|---|---|---|
000375afe84938576236fa517b31adde7869376dcd0ea58699c63ae1aaf4c1fc | rmloveland/scheme48-0.53 | sgol-runtime.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (%unspecific)
(if #f #f))
(define (!= x y)
(not (= x y)))
(define (%tuple . rest)
(list->vector (cons 'tuple rest)))
| null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/infix/sgol-runtime.scm | scheme | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (%unspecific)
(if #f #f))
(define (!= x y)
(not (= x y)))
(define (%tuple . rest)
(list->vector (cons 'tuple rest)))
| |
dbf82814f4c1f049e2f32c6db6ff92799c42b652782e53cdc92bd128522a46a8 | eudoxia0/parsing-menhir | Ast.ml | type ast =
| IntConstant of string
| null | https://raw.githubusercontent.com/eudoxia0/parsing-menhir/8bfff6d2d685660e440e34ecda2f35c9c383546c/skeleton/lib/Ast.ml | ocaml | type ast =
| IntConstant of string
| |
c9f4be8feba652c29bc9bf12d51e5ae257121e3ef00407d7419d22051df8178d | OCamlPro/ocamlexc | ccomp.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/OCamlPro/ocamlexc/a9ddcfff6f376f5dd6c5fcc3211b8f89e36f79fe/utils/ccomp.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . Distributed only by permission .
$ I d : ccomp.ml , v 1.2 1999/02/15 15:00:32 pessaux Exp $
let command cmdline =
if !Clflags.verbose then ... |
27b73e40723f6c5c3acb6c4af535f07bd31532c890887bfb33d767386b35a625 | goodell/cppmem | flow.mli | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/goodell/cppmem/eb3ce19b607a5d6ec81138cd8cacd236f9388e87/js_of_ocaml-1.2/compiler/flow.mli | ocaml | * t array | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... |
a3f4f75f9b1cb4de33e7c0645c762334b81aa22b6e3b63d5879890d78c2460ff | charlieg/Sparser | etf-driven-definitions.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
copyright ( c ) 1995 -- all rights reserved
;;;
;;; File: "etf-driven definitions"
Module : " : "
version : July 1995
;; initiated 7/26/95
(in-package :sparser)
;;;--------------------------------------------
driving the... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/interface/grammar/etf-driven-definitions.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER LISP) -*-
File: "etf-driven definitions"
initiated 7/26/95
--------------------------------------------
--------------------------------------------
Called from the autodef 'form' functions of various model categories
such as kind-of-company/phrase. We fi... | copyright ( c ) 1995 -- all rights reserved
Module : " : "
version : July 1995
(in-package :sparser)
driving the definition process via the RDT
(defun define-by-filling-out-an-etf (&key ((:tree-family name-of-tree-family) nil)
((:category name-of-ca... |
35b4eb195e67c9e99c5c86929ed7187ace243400d87881107a21383784d77306 | mefesto/wabbitmq | test_connection_factory.clj | (ns com.mefesto.test-connection-factory
(:use [clojure.test])
(:require [com.mefesto.wabbitmq :as mq])
(:import [com.rabbitmq.client ConnectionFactory]))
(def uri "amqp:testpass@somehost:4321/temp")
(deftest connection-by-uri
(let [factory (#'mq/connection-factory {:uri uri})]
(is (= "somehost" (.getHost ... | null | https://raw.githubusercontent.com/mefesto/wabbitmq/61ebd4f820f532604050f28542b24ea5f77c4505/test/com/mefesto/test_connection_factory.clj | clojure | (ns com.mefesto.test-connection-factory
(:use [clojure.test])
(:require [com.mefesto.wabbitmq :as mq])
(:import [com.rabbitmq.client ConnectionFactory]))
(def uri "amqp:testpass@somehost:4321/temp")
(deftest connection-by-uri
(let [factory (#'mq/connection-factory {:uri uri})]
(is (= "somehost" (.getHost ... | |
6e2d5712b7c53e54111c39c9912feb7af42ca09136edbc1eddc502ae3ef671df | turastory/study-notes | pg.scm | Chapter 2.2.1
(define (list-ref items n)
(if (= n 0)
(car items)
(list-ref (cdr items) (- n 1))))
(define (length items)
(if (null? items)
0
(+ 1 (length (cdr items)))))
(define (append list1 list2)
(if (null? list1)
list2
(cons (car list1) (append (cdr list1) list2))))
... | null | https://raw.githubusercontent.com/turastory/study-notes/f404dc2d04928de989b7d55e6a4c3561afec9a20/sicp-2020/part2/pg.scm | scheme | Recall from Chapter 1.2.2
Exercise 2.30 | Chapter 2.2.1
(define (list-ref items n)
(if (= n 0)
(car items)
(list-ref (cdr items) (- n 1))))
(define (length items)
(if (null? items)
0
(+ 1 (length (cdr items)))))
(define (append list1 list2)
(if (null? list1)
list2
(cons (car list1) (append (cdr list1) list2))))
... |
a0b21a6e10352d675bb8e2e8d9d506a0cb0e015aec7321a7d2144aa4ac06ec69 | metabase/metabase | release.clj | (ns release
(:require
[clojure.string :as str]
[environ.core :as env]
[flatland.ordered.map :as ordered-map]
[metabuild-common.core :as u]
[release.check-prereqs :as check-prereqs]
[release.common :as c]
[release.common.slack :as slack]
[release.draft-release :as draft-release]
[release.ela... | null | https://raw.githubusercontent.com/metabase/metabase/5e9b52a32dfeab754d218c758d08fffbacb7c0e7/bin/build/src/release.clj | clojure | (ns release
(:require
[clojure.string :as str]
[environ.core :as env]
[flatland.ordered.map :as ordered-map]
[metabuild-common.core :as u]
[release.check-prereqs :as check-prereqs]
[release.common :as c]
[release.common.slack :as slack]
[release.draft-release :as draft-release]
[release.ela... | |
04ed561998435d80ae8c2eabd17769c4b134aeac4f4a11f3ed19ee75b9805d34 | rd--/hsc3 | balance2.help.hs | balance2
let l = lfSaw ar 44 0
r = pulse ar 33 0.5
p = fSinOsc kr 0.5 0
in balance2 l r p 0.1
balance2
let [s0,s1] = mceChannels (sinOsc ar (mce2 440 550) 0)
n = lfNoise0Id 'α' kr 4
in balance2 s0 s1 n 0.3
balance2
let s = sinOsc ar 440 0
p = sinOsc kr 0.2 0
in balance2 s s p 1 * 0.2
balance2... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/balance2.help.hs | haskell | balance2
let l = lfSaw ar 44 0
r = pulse ar 33 0.5
p = fSinOsc kr 0.5 0
in balance2 l r p 0.1
balance2
let [s0,s1] = mceChannels (sinOsc ar (mce2 440 550) 0)
n = lfNoise0Id 'α' kr 4
in balance2 s0 s1 n 0.3
balance2
let s = sinOsc ar 440 0
p = sinOsc kr 0.2 0
in balance2 s s p 1 * 0.2
balance2... | |
ef8f643fcabb7e8e68307561101b1c3a6e4482d7d3550161f25155fa454e8c1c | ssadler/piped | Resume.hs |
module Piped.Resume
( createResumableSource
, createResumableSink
, runResumableSource
, runResumableSink
, ResumableSource(..)
, ResumableSink(..)
, ResumableResult(..)
) where
import Piped.Internal
-- | Either a resumable source or sink, plus the result of the pipe that finished.
--
data Resumabl... | null | https://raw.githubusercontent.com/ssadler/piped/036c064d93f3d37f834c522a6e59c5baf44fdb6e/piped/src/Piped/Resume.hs | haskell | | Either a resumable source or sink, plus the result of the pipe that finished.
| A source that may be resumed
| A sink that may be resumed
| Create a resumable source from a Pipe
| Create a resumable sink from a Pipe
| Run a resumable source
| Run a resumable sink
|
module Piped.Resume
( createResumableSource
, createResumableSink
, runResumableSource
, runResumableSink
, ResumableSource(..)
, ResumableSink(..)
, ResumableResult(..)
) where
import Piped.Internal
data ResumableResult e m a b =
ResumeSource (ResumableSource e m a b) b
| ResumeSink (Resum... |
ca1c0811a1ae0aa2c0374c1b467bf2b464e45e59018b895fc4168648a8136d34 | exercism/clojurescript | series.cljs | (ns series)
(defn slices [s n]
;; your code goes here...
)
| null | https://raw.githubusercontent.com/exercism/clojurescript/7700a33e17a798f6320aad01fb59a637bd21e12b/exercises/practice/series/src/series.cljs | clojure | your code goes here... | (ns series)
(defn slices [s n]
)
|
20a7d30b9c3fdabfd588a99cdd527a5d2e6396a652c2a92fc199e3ee6a41f477 | rudymatela/fitspec | sets.hs | import Set as S
import Test.FitSpec hiding ((\/),Set)
instance (Ord a, Listable a) => Listable (S.Set a) where
tiers = setCons set
instance (Ord a, Listable a) => Mutable (S.Set a) where
mutiers = mutiersEq
instance (Ord a, Show a, Listable a) => ShowMutable (S.Set a) where
mutantS = mutantSEq
type Elem a =... | null | https://raw.githubusercontent.com/rudymatela/fitspec/f67b0dfc4d7413d62e6c6f4df36df3703f2a4302/bench/sets.hs | haskell | The property map.
It is here so we can re-run the steps taken in creating the final
property list (by @properties 3@).
If we add (\\) to the functions under test, this property should follow: | import Set as S
import Test.FitSpec hiding ((\/),Set)
instance (Ord a, Listable a) => Listable (S.Set a) where
tiers = setCons set
instance (Ord a, Listable a) => Mutable (S.Set a) where
mutiers = mutiersEq
instance (Ord a, Show a, Listable a) => ShowMutable (S.Set a) where
mutantS = mutantSEq
type Elem a =... |
b94e16aa7a61cb94090d1dd3d36d7d41cce7501775bde3f03f31c97510fadf5b | scrintal/heroicons-reagent | arrow_uturn_left.cljs | (ns com.scrintal.heroicons.solid.arrow-uturn-left)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M9.53 2.47a.75.75 0 010 1.06L4.81 8.25H15a6.75 6.75 0 010 13.5h-3a.75.75 ... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/arrow_uturn_left.cljs | clojure | (ns com.scrintal.heroicons.solid.arrow-uturn-left)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M9.53 2.47a.75.75 0 010 1.06L4.81 8.25H15a6.75 6.75 0 010 13.5h-3a.75.75 ... | |
6bd4f48caf16f71fb6c3bbcee08de33df66b42938d91415123654032269d1719 | freizl/dive-into-haskell | StringProcess.hs | module StringProcess where
notThe :: String -> Maybe String
notThe xs = if xs == "the" then Nothing else Just xs
replaceThe :: String -> String
replaceThe = unwords . map (theToA . notThe) . words
theToA :: Maybe String -> String
theToA Nothing = "a"
theToA (Just x) = x
vowelChars :: [Char]
vowelChars = "aeiouAEIOU... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/haskell-book/12/StringProcess.hs | haskell | Assume the string is in lower case
otherwise just need additional check
| module StringProcess where
notThe :: String -> Maybe String
notThe xs = if xs == "the" then Nothing else Just xs
replaceThe :: String -> String
replaceThe = unwords . map (theToA . notThe) . words
theToA :: Maybe String -> String
theToA Nothing = "a"
theToA (Just x) = x
vowelChars :: [Char]
vowelChars = "aeiouAEIOU... |
91b5146de25e65b50cf39f585ad818040225498a0db02b5d6db1ce5f3e0b2540 | jackfirth/syntax-warn | string-lines.rkt | #lang racket/base
(provide string-append-lines
string-indent-lines
string->lines
lines->string)
(require racket/list
racket/string)
(module+ test
(require rackunit))
(define (string-append-lines . strings)
(apply string-append
(add-between strings "\n")))
(module+ ... | null | https://raw.githubusercontent.com/jackfirth/syntax-warn/f17fdd3179aeab8e5275a24e7d091d3ca42960a9/syntax-warn-base/warn/private/string-lines.rkt | racket | #lang racket/base
(provide string-append-lines
string-indent-lines
string->lines
lines->string)
(require racket/list
racket/string)
(module+ test
(require rackunit))
(define (string-append-lines . strings)
(apply string-append
(add-between strings "\n")))
(module+ ... | |
c4644f34154ba44d0669c936c6224e96a7be06e0007052fa99373e10a0d494d2 | byorgey/AoC | 08.hs | #!/usr/bin/env stack
-- stack --resolver lts-19.28 script --package containers --package split
import Control.Arrow ((>>>))
import Data.List (transpose)
import qualified Data.Map.Strict as M
import qualified Data.Set as S
main = interact $
readInput >>> applyAll [solveA,solveB] >>... | null | https://raw.githubusercontent.com/byorgey/AoC/6abdf1c8b4668db006767042842866667fd62893/2022/08/08.hs | haskell | stack --resolver lts-19.28 script --package containers --package split
----------------------------------------------------------
---------------------------------------------------------- | #!/usr/bin/env stack
import Control.Arrow ((>>>))
import Data.List (transpose)
import qualified Data.Map.Strict as M
import qualified Data.Set as S
main = interact $
readInput >>> applyAll [solveA,solveB] >>> map show >>> unlines
type Input = [[Int]]
readInput :: String -> Input... |
ffe4ca7a8412dcc4edd585a6048dcf9e7930fc9ac2988a3218428d75412172e3 | cedlemo/OCaml-GI-ctypes-bindings-generator | Response_type.mli | open Ctypes
type t = None | Reject | Accept | Delete_event | Ok | Cancel | Close | Yes | No | Apply | Help
val of_value:
int32 -> t
val to_value:
t -> int32
val t_view: t typ
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Response_type.mli | ocaml | open Ctypes
type t = None | Reject | Accept | Delete_event | Ok | Cancel | Close | Yes | No | Apply | Help
val of_value:
int32 -> t
val to_value:
t -> int32
val t_view: t typ
| |
6fd3e598cc1a6d7f54a726a001004d57e449100fca46483f332c52d577d53436 | conal/Fran | SokoBoard.hs | module SokoBoard where
-----------------------------------------------------------------
-- instructions on making your own setting:
--
( 1 ) make sure it is of dimensions ( maxX , maxY )
( 2 ) make sure you only use capital letters and space
( 3 ) the mapping is ' W ' : Wall
... | null | https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/demos/Sokoban/SokoBoard.hs | haskell | ---------------------------------------------------------------
instructions on making your own setting:
'P': Pusher
'B': Box
' ': Empty
---------------------------------------------------------------
to be reversed
to be reversed
to be revers... | module SokoBoard where
( 1 ) make sure it is of dimensions ( maxX , maxY )
( 2 ) make sure you only use capital letters and space
( 3 ) the mapping is ' W ' : Wall
' T ' : Target
board0 :: [String]
"WWWWWWWWWWWWWWWWWWW"
, "WWWWWWWWWWWWWWWWWWW"
... |
0142a31aa4b80fc3ca123011e48cc8003e7150c654f1df732b11d804c814ccc3 | dolotech/erlang_server | pt_role.erl | %%----------------------------------------------------
%% 协议11 - 角色相关
%%
%% $id$
%%
%% @author Rolong<>
%%----------------------------------------------------
-module(pt_role).
-export([handle/3]).
-include("common.hrl").
%% 帐号方式 登陆/注册
%%
%% 登陆/注册验证说明:
%%
服务器ID(sid ) : 1
随机数(rand ) : 0~255的... | null | https://raw.githubusercontent.com/dolotech/erlang_server/44ea3693317f60e18b19c9ddfa179307cbd646d7/src/pt/pt_role.erl | erlang | ----------------------------------------------------
协议11 - 角色相关
$id$
@author Rolong<>
----------------------------------------------------
帐号方式 登陆/注册
登陆/注册验证说明:
签名算法 :md5(sid + rand + key + account)
TODO:
1、密码要MD5后保存
2、随机数改为当前时间,每次登陆时间不能一样
3、不同的服务器需要不同的KEY
4、修改密码功... |
-module(pt_role).
-export([handle/3]).
-include("common.hrl").
服务器ID(sid ) : 1
随机数(rand ) : 0~255的一个随机数字
当前加密KEY : 23d7f859778d2093
handle(11000, [Type, Rand, Sid, Aid, Password, Signature], Rs) ->
?DEBUG("LOGIN(11000): ~w, ~w, ~w, ~s, ~s, ~s", [Type, Rand, Sid, Aid, Password, Signature])... |
e51d3d098d1dd1d9b55b76542d61248d6fceec3d13b42cf17de94fdd6f030b1a | crategus/cl-cffi-gtk | rtest-gtk-icon-theme.lisp | (def-suite gtk-icon-theme :in gtk-suite)
(in-suite gtk-icon-theme)
;;; --- Types and Values -------------------------------------------------------
;;; GtkIconInfo
;;; GtkIconLookupFlags
;;; GtkIconThemeError
;;; GTK_ICON_THEME_ERROR
;;; GtkIconTheme
(test gtk-icon-theme-class
;; Type check
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/test/rtest-gtk-icon-theme.lisp | lisp | --- Types and Values -------------------------------------------------------
GtkIconInfo
GtkIconLookupFlags
GtkIconThemeError
GTK_ICON_THEME_ERROR
GtkIconTheme
Type check
Check the registered name
Check the parent
Check the children
Check the interfaces
Check the class properties
Check ... | (def-suite gtk-icon-theme :in gtk-suite)
(in-suite gtk-icon-theme)
(test gtk-icon-theme-class
(is (g-type-is-object "GtkIconTheme"))
(is (eq 'gtk-icon-theme
(registered-object-type-by-name "GtkIconTheme")))
(is (eq (gtype "GObject") (g-type-parent "GtkIconTheme")))
(is (equal '()
(map... |
aea8e29f18e0d4b1a4e6df219022b94b7c08227d87499f863f23fee660590d70 | raaz-crypto/raaz | Info.hs | module Command.Info where
import Data.Version (showVersion)
import Options.Applicative
import Prelude
import Raaz
import qualified Raaz.Core.CpuSupports as CpuSupports
import qualified Raaz.Auth.Blake2b
import qualified Raaz.Auth.Blake2s
import qualified Raaz.Digest.Blake2b
impo... | null | https://raw.githubusercontent.com/raaz-crypto/raaz/77caa8ca850ec0dec245cecd4f86ea2617dda193/raaz/bin/Command/Info.hs | haskell | module Command.Info where
import Data.Version (showVersion)
import Options.Applicative
import Prelude
import Raaz
import qualified Raaz.Core.CpuSupports as CpuSupports
import qualified Raaz.Auth.Blake2b
import qualified Raaz.Auth.Blake2s
import qualified Raaz.Digest.Blake2b
impo... | |
be9d7ff14ff08277fae8ae6948f36ce11dbe16153d621798d75630cac5cb503e | genenetwork/guix-bioinformatics | sambamba.scm | Sambamba
(define-module (gn packages sambamba)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages base)
for samtools in sa... | null | https://raw.githubusercontent.com/genenetwork/guix-bioinformatics/9e1e668e4f9f9e2b595620fda831da0525db4095/gn/packages/sambamba.scm | scheme | disable all checks for speed
for pileup
for pileup
for env
Needed for building htslib
Needed for building htslib
Needed for building htslib and sambamba
The current build compiles htslib statically into the
executable. On top of that, we need to patch the latest | Sambamba
(define-module (gn packages sambamba)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix utils)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (gnu packages base)
for samtools in sa... |
d69ef2013789678de7841741ff3f8fc9f07b05d7fef9febad7cd54cb307aa73d | benzap/fif | user.clj | (ns fif.dev.user
(:require
[clojure.tools.namespace.repl :refer [refresh]]
[fif.core :as fif]
[fif.server.core-test :refer :all]))
(defn start-dev-server []
(start-test-server))
(defn stop-dev-server []
(stop-test-server))
| null | https://raw.githubusercontent.com/benzap/fif/972adab8b86c016b04babea49d52198585172fe3/dev/fif/dev/user.clj | clojure | (ns fif.dev.user
(:require
[clojure.tools.namespace.repl :refer [refresh]]
[fif.core :as fif]
[fif.server.core-test :refer :all]))
(defn start-dev-server []
(start-test-server))
(defn stop-dev-server []
(stop-test-server))
| |
5801d064d56da291a11a85e9793eb3993b72b2771f2ecad6d84f1b0dd24c0e5a | the2pizza/authorizer | core.clj | (ns authorizer.core
(:gen-class)
(:require [clojure.data.json :as json]
[authorizer.state :as state]))
(defn read-lines [in]
(let [lines (line-seq (java.io.BufferedReader. in))]
(map #(json/read-str % :key-fn keyword) lines)))
(defn -main []
(let [lines (read-lines *in*)]
(state/machine->r... | null | https://raw.githubusercontent.com/the2pizza/authorizer/024f9760621a9187337b5ef326d9b51795a4bdee/src/authorizer/core.clj | clojure | (ns authorizer.core
(:gen-class)
(:require [clojure.data.json :as json]
[authorizer.state :as state]))
(defn read-lines [in]
(let [lines (line-seq (java.io.BufferedReader. in))]
(map #(json/read-str % :key-fn keyword) lines)))
(defn -main []
(let [lines (read-lines *in*)]
(state/machine->r... | |
1b9935b8b0b4587731fa6e947fb7d6d921d276a4e972692dfce5fdc3d3103a38 | mfikes/coal-mine | problem_131.cljc | (ns coal-mine.problem-131
(:require [coal-mine.checks :refer [defcheck-131] :rename {defcheck-131 defcheck}]
[clojure.test]))
(defn run-tests []
(clojure.test/run-tests 'coal-mine.problem-131))
(defn -main []
(run-tests))
#?(:cljs (set! *main-cli-fn* -main))
| null | https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_131.cljc | clojure | (ns coal-mine.problem-131
(:require [coal-mine.checks :refer [defcheck-131] :rename {defcheck-131 defcheck}]
[clojure.test]))
(defn run-tests []
(clojure.test/run-tests 'coal-mine.problem-131))
(defn -main []
(run-tests))
#?(:cljs (set! *main-cli-fn* -main))
| |
a522f767a28628d9c28d397d96f81121410cf196858c70f85f0b4a83d4c2d24f | ocaml/dune | state.ml | module Make (S : sig
type t
end)
(M : Monad.S) =
struct
module T = struct
type 'a t = S.t -> (S.t * 'a) M.t
let return a s = M.return (s, a)
let bind x ~f s =
let open M.O in
let* s', a = x s in
(f a) s'
end
open M.O
include T
let lift m s = m >>| fun a -> (s, a)
let mod... | null | https://raw.githubusercontent.com/ocaml/dune/714626f4d408e5c71c24ba91d0d520588702ec52/otherlibs/stdune/src/state.ml | ocaml | module Make (S : sig
type t
end)
(M : Monad.S) =
struct
module T = struct
type 'a t = S.t -> (S.t * 'a) M.t
let return a s = M.return (s, a)
let bind x ~f s =
let open M.O in
let* s', a = x s in
(f a) s'
end
open M.O
include T
let lift m s = m >>| fun a -> (s, a)
let mod... | |
be0fc2264ab6759cf320f1f0135b235f076f5f92fcdbc1bfc891ff5c344bfdd8 | SimulaVR/godot-haskell | Curve.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Curve
(Godot.Core.Curve._TANGENT_LINEAR, Godot.Core.... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/Curve.hs | haskell | | Adds a point to the curve. For each side, if the @*_mode@ is @TANGENT_LINEAR@, the @*_tangent@ angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the @*_tangent@ angle if @*_mode@ is set to @TANGENT_FREE@.
| Adds a point to the curve. For each side, if the @*_... | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.Curve
(Godot.Core.Curve._TANGENT_LINEAR, Godot.Core.... |
55e74c85522c0493ae986d25b2bd2466a91e0f4cc90d76762afeed67df3777d9 | brendanhay/gogol | Product.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/8cbceeaaba36a3c08712b2e272606161500fbe91/lib/services/gogol-alertcenter/gen/Gogol/AlertCenter/Internal/Product.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* AccountSuspensionDetails
* AccountSuspensionWarning
* AccountWarning
* ActionInfo
* ActivityRule
* Alert
* Alert_Data
* AlertFeedback
* AppMakerSqlSetupNotification
* AppSettingsChanged
* AppsOutage
* Attachment
* Bat... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
dba2f831992e813ed3d4be6bd4d00d175f62db6ee6c99fdc8747fc981a6fe6a3 | nyu-acsys/drift | a-copy-print.ml | (*
USED: PLDI2011 as a-cppr
USED: PEPM2013 as a-cppr
*)
let make_array n i = assert (0 <= i && i < n); 0
let update (i:int) (n:int) des x : int -> int =
des i;
let a j = if i=j then x else des j in a
let print_int (n:int) = ()
let f (m:int) src des =
let rec bcopy (m:int) src des i =
if i >= m then
des... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks/r_type/array/a-copy-print.ml | ocaml |
USED: PLDI2011 as a-cppr
USED: PEPM2013 as a-cppr
|
let make_array n i = assert (0 <= i && i < n); 0
let update (i:int) (n:int) des x : int -> int =
des i;
let a j = if i=j then x else des j in a
let print_int (n:int) = ()
let f (m:int) src des =
let rec bcopy (m:int) src des i =
if i >= m then
des
else
let des = update i m des (src i) in
... |
55ac9202563d09d2e52cc4ff39c26b1fd5fe904adb1344322a323da5fecec5af | kupl/LearnML | patch.ml | let rec iter ((n : int), (f : int -> int)) (x : int) : int =
if n = 0 then x else iter (n - 1, f) (f x)
| null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/iter/sub30/patch.ml | ocaml | let rec iter ((n : int), (f : int -> int)) (x : int) : int =
if n = 0 then x else iter (n - 1, f) (f x)
| |
6556cbafbd9f4a47e8c86b4b0ae63c6b474977bc2f6e4fb2e45f7b1234260b0f | 5HT/ant | Box.mli |
open XNum;
open Unicode.Types;
open Runtime;
open Substitute;
open FontMetric;
open Dim;
open Graphic;
type index_position = [ LeftIndex | RightIndex | VertIndex ];
type math_code =
[ NoMath | Ordinary | BinOp
| Relation | Operator | Punct
| Open | Close | Inner
| SubScript | SuperScript | Index... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Typesetting/Box.mli | ocaml | basic box
contents of a box |
open XNum;
open Unicode.Types;
open Runtime;
open Substitute;
open FontMetric;
open Dim;
open Graphic;
type index_position = [ LeftIndex | RightIndex | VertIndex ];
type math_code =
[ NoMath | Ordinary | BinOp
| Relation | Operator | Punct
| Open | Close | Inner
| SubScript | SuperScript | Index... |
6a0d9f5873f0086ca332416ee1a001b39e2ff99df84f0879da949f13eabd5751 | rtoy/cmucl | cp1252.lisp | ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
;;;
;;; **********************************************************************
This code was written by and has been placed in the public
;;; domain.
;;;
(ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1252.lisp $")
(in-package... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/pcl/simple-streams/external-formats/cp1252.lisp | lisp | -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: STREAM -*-
**********************************************************************
domain.
See | This code was written by and has been placed in the public
(ext:file-comment "$Header: src/pcl/simple-streams/external-formats/cp1252.lisp $")
(in-package "STREAM")
(intl:textdomain "cmucl")
(defconstant +ms-cp1252+
(make-array 128
:element-type '(unsigned-byte 16)
:initial-contents... |
8f552cbfb4c44da5e14c78355bac290600ca71fcadb68a77dff6ed4b0c186bb3 | statusfailed/cartographer-string-diagrammatic-reasoning | Collapsible.hs | {-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE OverloadedStrings #-}
-- | A higher-order "collapsible" component
module Cartographer.Components.Collapsible where
import Miso
Model
data Model m = Model
{ _modelInnerModel :: m
, _modelState :: CollapsibleState
} deriving(Eq, Ord, Show, Functor)
newModel :: m... | null | https://raw.githubusercontent.com/statusfailed/cartographer-string-diagrammatic-reasoning/7559db3f6de17dfa2dc13a6bf29f95c9cebcf7c4/cartographer-editor/src/Cartographer/Components/Collapsible.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE OverloadedStrings #
| A higher-order "collapsible" component
TODO: bring back show/hide button
Miso.div_ [] [ Miso.button_ [ onClick Toggle ] [ "show/hide" ] ] | module Cartographer.Components.Collapsible where
import Miso
Model
data Model m = Model
{ _modelInnerModel :: m
, _modelState :: CollapsibleState
} deriving(Eq, Ord, Show, Functor)
newModel :: m -> Model m
newModel m = Model m Expanded
data Action a = Toggle | InnerAction a
deriving(Eq, Ord, Show, Functo... |
f937e5454162de64aef9f6a091ed4f382a3ed7e1d787bfc2a5049fbe5d413fc5 | webyrd/n-grams-for-synthesis | utf-8.scm | Implementation of UTF-8 encoding and decoding for Comprehensive I / O SRFI
Copyright ( C ) ( 2005 ) . All Rights Reserved .
;
; Permission is hereby granted, free of charge, to any person
; obtaining a copy of this software and associated documentation files
( the " Software " ) , to deal in the Software with... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-79/implementation/comprehensive-io-reference/utf-8.scm | scheme |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
including without limitation the rights to use, copy, modify, merge,
subject to the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR... | Implementation of UTF-8 encoding and decoding for Comprehensive I / O SRFI
Copyright ( C ) ( 2005 ) . All Rights Reserved .
( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Softwar... |
fe525ab7def27ba9ab97345d9e93f70cb25af080dced568ec0e84c3685bce885 | helium/miner | miner_cli_hbbft.erl | %%%-------------------------------------------------------------------
@doc miner_cli_hbbft
%% @end
%%%-------------------------------------------------------------------
-module(miner_cli_hbbft).
-behavior(clique_handler).
-export([register_cli/0]).
register_cli() ->
register_all_usage(),
register_all_cmd... | null | https://raw.githubusercontent.com/helium/miner/575361345a078da3ce777c8435206a2adb61a034/src/cli/miner_cli_hbbft.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
hbbft
hbbft status
hbbft skip
hbbft queue
just print a summary of the queue
print the outbound messages for this peer
calculate the current election start height | @doc miner_cli_hbbft
-module(miner_cli_hbbft).
-behavior(clique_handler).
-export([register_cli/0]).
register_cli() ->
register_all_usage(),
register_all_cmds().
register_all_usage() ->
lists:foreach(fun(Args) ->
apply(clique, register_usage, Args)
end,
... |
dc855751f7ca2c96f8f5a2f0979bd610188eb30726bc52c851cd12484f6eafc7 | ygmpkk/house | Storable.hs | module Storable (module Foreign.Storable) where
import Foreign.Storable
| null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/haskell98/Storable.hs | haskell | module Storable (module Foreign.Storable) where
import Foreign.Storable
| |
a14e6337e58d85e52d1fcb47f6e0d981c519aa82a1668443f069368b21ece3b6 | cnuernber/dtype-next | dimensions.clj | (ns tech.v3.tensor.dimensions
"Dimensions implement a projection from ND space in the the address space of the
buffer along with a reverse projection from the address space back into ND space."
(:require [tech.v3.datatype.protocols :as dtype-proto]
[tech.v3.tensor.dimensions.select :as dims-select]
... | null | https://raw.githubusercontent.com/cnuernber/dtype-next/70cdc390a1201206c4af3e0b563d44d7063e5d04/src/tech/v3/tensor/dimensions.clj | clojure | list of things. Not longs.
list of longs
(count shape)
list of longs
list of naive strides if the shape-ecounts were the shape.
ecount of the dimensions
Not always detectable from the shape, if it is this is the smallest dense buffer
the result of the dims-analytics reduction process.
true any shape member is broadca... | (ns tech.v3.tensor.dimensions
"Dimensions implement a projection from ND space in the the address space of the
buffer along with a reverse projection from the address space back into ND space."
(:require [tech.v3.datatype.protocols :as dtype-proto]
[tech.v3.tensor.dimensions.select :as dims-select]
... |
ad046489a9e9f74e66e980d4c89633cac8889bca0e77cc2009d85643120af8e9 | bodil/BODOL | scope.clj | (ns bodol.scope
(:require [bodol.primitives :refer [primitives]]
[bodol.eval.core :as eval]
[bodol.prelude :refer [prelude]]
[bodol.types :as t]
[bodol.monad :as m]))
(defn scope []
(-> (primitives)
(m/reduce-state (map eval/eval prelude))
second))
| null | https://raw.githubusercontent.com/bodil/BODOL/ed00ab59a91a19da4d70ff5488c90ffad04904c6/src/bodol/scope.clj | clojure | (ns bodol.scope
(:require [bodol.primitives :refer [primitives]]
[bodol.eval.core :as eval]
[bodol.prelude :refer [prelude]]
[bodol.types :as t]
[bodol.monad :as m]))
(defn scope []
(-> (primitives)
(m/reduce-state (map eval/eval prelude))
second))
| |
2bcf04d45e7f633a43ca51c17c819a121f681ab910d3a995642d5d97082b62aa | onedata/op-worker | hardlinks_stress_test_SUITE.erl | %%%--------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%--------------------------------------------------------------------
%%% @doc
This SUITE contains save stress te... | null | https://raw.githubusercontent.com/onedata/op-worker/b906c994c1bfefa28696399db15b3e9a3263c0f7/test_distributed/hardlinks_stress_test_SUITE.erl | erlang | --------------------------------------------------------------------
@end
--------------------------------------------------------------------
@doc
creation of large dir by single process and tree of dirs by many processes.
@end
--------------------------------------------------------------------
export for ct
===... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
This SUITE contains save stress test for single provider . SUITE tests
-module(hardlinks_stress_test_SUITE).
-author("Michal Wrzeszcz").
-include("global_definitions.hrl").
-include_lib("cluster_... |
0102882890719a4a0b1d15b8be27c02e02baa762ea665f5dca0e93e055c49a92 | reagent-project/reagent | performancetest.cljs | (ns reagenttest.performancetest
(:require [reagent.core :as r]
[reagent.impl.template :as tmpl]
[reagent.impl.protocols :as p]))
(defn hello-world-component []
[:h1 "Hello world"])
(def functional-compiler (r/create-compiler {:function-components true}))
(defn test-functional []
(js/per... | null | https://raw.githubusercontent.com/reagent-project/reagent/8f499d9c6b2ac51cdab6e4e4766d59f2e31e948d/test/reagenttest/performancetest.cljs | clojure | (ns reagenttest.performancetest
(:require [reagent.core :as r]
[reagent.impl.template :as tmpl]
[reagent.impl.protocols :as p]))
(defn hello-world-component []
[:h1 "Hello world"])
(def functional-compiler (r/create-compiler {:function-components true}))
(defn test-functional []
(js/per... | |
3ae591d1df32d459e2c3c748f3587ef6b063cdd0a636c9d0bc0fd5ac5dbb5b4d | ublubu/shapes | SolutionProcessors.hs | |
SolutionProcessors take incremental and accumulated constraint solutions
and use rules to determine what incremental impulse ( constraint solution ) to apply to an object .
For example , a solution processor might enforce that the total accumulated impulse is nonnegative .
SolutionProcessors take increment... | null | https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes/src/Physics/Constraints/SolutionProcessors.hs | haskell | |
SolutionProcessors take incremental and accumulated constraint solutions
and use rules to determine what incremental impulse ( constraint solution ) to apply to an object .
For example , a solution processor might enforce that the total accumulated impulse is nonnegative .
SolutionProcessors take increment... | |
f2e127ac136dcbe4dbd576915092f797834a596f17f12bbbba233a3820e06ed2 | acl2/acl2 | unroll-java-code2@useless-runes.lsp | (NATP-OF-+)
(FIRST-NON-MEMBER-OPENER
(696 11 (:REWRITE CONSP-FROM-LEN-CHEAP))
(637 25 (:REWRITE DEFAULT-CAR))
(542 6 (:REWRITE FIRST-NON-MEMBER-WHEN-NOT-MEMBERP))
(299 9 (:REWRITE LEN-OF-CDR))
(250 3 (:REWRITE FIRST-NON-MEMBER-WHEN-MEMBER))
(126 3 (:REWRITE <-0-+-NEGATIVE-1))
(106 106 (:TYPE-PRESCRIPTION LEN))
... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/axe/jvm/.sys/unroll-java-code2%40useless-runes.lsp | lisp | (NATP-OF-+)
(FIRST-NON-MEMBER-OPENER
(696 11 (:REWRITE CONSP-FROM-LEN-CHEAP))
(637 25 (:REWRITE DEFAULT-CAR))
(542 6 (:REWRITE FIRST-NON-MEMBER-WHEN-NOT-MEMBERP))
(299 9 (:REWRITE LEN-OF-CDR))
(250 3 (:REWRITE FIRST-NON-MEMBER-WHEN-MEMBER))
(126 3 (:REWRITE <-0-+-NEGATIVE-1))
(106 106 (:TYPE-PRESCRIPTION LEN))
... | |
dda0771a85f32576bce2e04602a811df92f7414a742b78a7f40b486bfd94e00c | hiposfer/hive | secure_store.cljs | (ns hive.services.secure-store
(:require [cljs.tools.reader.edn :as edn]
[expo :as Expo]
[hive.utils.miscelaneous :as tool]))
;
Expo . SecureStore.setItemAsync(key , value , options )
(defn save!
"Takes a map of namespaced keywords and stores it. Returns a promise
containing a map of th... | null | https://raw.githubusercontent.com/hiposfer/hive/f17a5a1d0e17f719487d5b7375aefd8dc07f64e1/src/hive/services/secure_store.cljs | clojure |
return error
(then println))
Expo.SecureStore.getItemAsync(key, options)
return error
(.. (load! {} :foo/bar)
(then println))
Expo.SecureStore.deleteItemAsync(key, options)
todo: should this function return the value previously stored there?
that would imply a load! before :(
(then #(println k))
return er... | (ns hive.services.secure-store
(:require [cljs.tools.reader.edn :as edn]
[expo :as Expo]
[hive.utils.miscelaneous :as tool]))
Expo . SecureStore.setItemAsync(key , value , options )
(defn save!
"Takes a map of namespaced keywords and stores it. Returns a promise
containing a map of the ... |
de68ae1847bb1e71f445a27399d026244183c95b5bf9e5ef6111ca06a0dcc57b | jeromesimeon/Galax | shredded_load.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/shredded/shredded_load.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : shredded_load.mli , v 1.5 2007/02/01 22:08:54 simeon Exp $
open Shredded_load_context
module type Shredded_Load_Functor_Sig =
functor (Shredded_store : Shredded_load_sigs.Shredded_Load_Store) ->
sig
val load_shredded_store_fro... |
26365a99392eecf693a13b41a09e171eb0e0d8c535ab65cc7769a186f9c80ad4 | fmnoise/anomalies-tools | project.clj | (defproject dawcs/anomalies-tools "0.1.3"
:description "Anomalies handling tools"
:url "-tools"
:license {:name "Apache License, Version 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.9.0"]
[com.cognitect/anomalies "0.1.12"]])
| null | https://raw.githubusercontent.com/fmnoise/anomalies-tools/266ccfa6092277126808bf40a2740802c2efed12/project.clj | clojure | (defproject dawcs/anomalies-tools "0.1.3"
:description "Anomalies handling tools"
:url "-tools"
:license {:name "Apache License, Version 2.0"
:url "-2.0"}
:dependencies [[org.clojure/clojure "1.9.0"]
[com.cognitect/anomalies "0.1.12"]])
| |
1df62ecf4c7d1235f4e5a2608350de2baee7ef8276efb6839bf2bc4c94b30f42 | deplinenoise/c-amplify | package.lisp |
(in-package #:common-lisp-user)
(defpackage #:se.defmacro.c-amplify
(:use :common-lisp)
(:import-from :cl-match match))
(eval-when (:compile-toplevel)
(let ((sym-pkg (find-package '#:se.defmacro.c-amplify.csym)))
(when sym-pkg
(delete-package sym-pkg))))
(defpackage #:se.defmacro.c-amplify.csym
(:... | null | https://raw.githubusercontent.com/deplinenoise/c-amplify/f8ad953e8bc7eb0004c6cee0460793893d5aec8c/code/package.lisp | lisp |
(in-package #:common-lisp-user)
(defpackage #:se.defmacro.c-amplify
(:use :common-lisp)
(:import-from :cl-match match))
(eval-when (:compile-toplevel)
(let ((sym-pkg (find-package '#:se.defmacro.c-amplify.csym)))
(when sym-pkg
(delete-package sym-pkg))))
(defpackage #:se.defmacro.c-amplify.csym
(:... | |
a679b045fddeca0ad1ad7dd88f2937306046dfb2ff25f658f3ce1c5d7e5fd121 | jozefg/blott | nbe.ml | (* This file implements the normalization procedure. In addition the "unary" quotation
* algorithm described by the paper, we also implement a binary operation for increased
* efficiency. *)
module Syn = Syntax
module D = Domain
exception Nbe_failed of string
let rec do_rec tp zero suc n =
match n with
| D.Zer... | null | https://raw.githubusercontent.com/jozefg/blott/9eadd6f1eb3ecb28fd66a25bc56c19041d98f722/src/lib/nbe.ml | ocaml | This file implements the normalization procedure. In addition the "unary" quotation
* algorithm described by the paper, we also implement a binary operation for increased
* efficiency.
Functions
Pairs
Numbers
Box
Id
Types
Functions
Pairs
Numbers
Id
Box
Types | module Syn = Syntax
module D = Domain
exception Nbe_failed of string
let rec do_rec tp zero suc n =
match n with
| D.Zero -> zero
| D.Suc n -> do_clos2 suc n (do_rec tp zero suc n)
| D.Neutral {term = e; _} ->
let final_tp = do_clos tp n in
D.Neutral {tp = final_tp; term = D.NRec (tp, zero, suc, e)}
... |
a7d8d4c30b60385d5ff050a2ad46543d411687eeee0b23bd6dceee74b0c2f8f2 | swarmpit/swarmpit | cli.clj | (ns swarmpit.docker.engine.cli
(:require [clojure.java.shell :as shell]
[clojure.java.io :refer [make-parents delete-file]]
[cheshire.core :refer [parse-string]]
[swarmpit.config :refer [config]]))
(defn- execute
"Execute docker command and parse result"
[cmd]
(let [result (... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/clj/swarmpit/docker/engine/cli.clj | clojure | (ns swarmpit.docker.engine.cli
(:require [clojure.java.shell :as shell]
[clojure.java.io :refer [make-parents delete-file]]
[cheshire.core :refer [parse-string]]
[swarmpit.config :refer [config]]))
(defn- execute
"Execute docker command and parse result"
[cmd]
(let [result (... | |
77ff4f615d6e05f8921a4200e2f06ed942a5522aa23383e472ec9cb2a90a843b | spawnfest/eep49ers | wxStaticText.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2020 . 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 applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxStaticText.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 lan... | Copyright Ericsson AB 2008 - 2020 . 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(wxStaticText).
-include("wxe.hrl").
-export([create/4,create/5,destroy/1,getLabel/1,new/0,new/3,new/4,setLab... |
27fe015d8f90f12e2e6c7b92c7f0d0edf0506c812942e032fdc89561cbd50212 | coccinelle/coccinelle | spacetime.mli | val enabled : bool
module Series :
sig
type t
val create : path:string -> t
val save_event : ?time:float -> t -> event_name:string -> unit
val save_and_close : ?time:float -> t -> unit
end
module Snapshot : sig val take : ?time:float -> Series.t -> unit end
val save_event_for_automatic_snapshots : event_name:st... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.09/spacetime.mli | ocaml | val enabled : bool
module Series :
sig
type t
val create : path:string -> t
val save_event : ?time:float -> t -> event_name:string -> unit
val save_and_close : ?time:float -> t -> unit
end
module Snapshot : sig val take : ?time:float -> Series.t -> unit end
val save_event_for_automatic_snapshots : event_name:st... | |
4891a5a8d40c147d175a165a299113a6f452883ac03bab49e31a1f29ae1df0ea | lopec/LoPEC | dispatcher.erl | %%%-------------------------------------------------------------------
@author < >
@author < >
( C ) 2009 ,
%%% @doc
%%%
%%% Interfaces with the database. Can take requests for tasks, marking
%%% a task as done, adding tasks or jobs, and free tasks assigned to
nodes ( by un - assigning them ) .
%%%
%... | null | https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/branches/stable-1/lib/common/src/dispatcher.erl | erlang | -------------------------------------------------------------------
@doc
Interfaces with the database. Can take requests for tasks, marking
a task as done, adding tasks or jobs, and free tasks assigned to
@end
-------------------------------------------------------------------
API
gen_server callbacks
=======... | @author < >
@author < >
( C ) 2009 ,
nodes ( by un - assigning them ) .
Created : 30 Sep 2009 by
-module(dispatcher).
-behaviour(gen_server).
-include("../../master/include/db.hrl").
-include("../../master/include/global.hrl").
-export([start_link/0,
add_job/1,
add_task/1,
... |
4122d5d10d07f8479462b0b6016253e20adfefe0185fd96f394571035d5dfdea | karamellpelle/grid | SoundPath.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid 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 optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/source/Game/Grid/GridData/Plain/SoundPath.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid 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
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
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
module Game.Grid.GridData.Plain.SoundPath
(
S... |
e526eeb777ab2d62fb58dc78480bd5a059f3fac1f1d6be0bc7b1ae44ee46d273 | ucsd-progsys/dsolve | stypes.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ,... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/typing/stypes.ml | ocaml | *********************************************************************
Objective Caml
... | , projet , INRIA Rocquencourt
Copyright 2003 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 .
$ I d : stypes.ml , v 1.9 2006/04/16 23:28:22 ... |
8e2e1672ac85d53e33851a7975f9527e1c93e7d74ea143c29786e89bb9bb47b4 | privet-kitty/cl-competitive | totient.lisp | (defpackage :cp/totient
(:use :cl)
(:export #:euler-phi))
(in-package :cp/totient)
(declaim (inline euler-phi))
(defun euler-phi (n)
"Returns the number of positive integers in {1, 2, ..., N} that are relatively
prime to N."
(declare ((integer 1 #.most-positive-fixnum) n))
(let ((res n))
(declare ((integ... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/totient.lisp | lisp | (defpackage :cp/totient
(:use :cl)
(:export #:euler-phi))
(in-package :cp/totient)
(declaim (inline euler-phi))
(defun euler-phi (n)
"Returns the number of positive integers in {1, 2, ..., N} that are relatively
prime to N."
(declare ((integer 1 #.most-positive-fixnum) n))
(let ((res n))
(declare ((integ... | |
a05cfca47685af4af8c1d4d9659df278b2db3d475b1070217f2483e86f2ea2f8 | facebook/infer | FormalMap.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/28e867254f6dc8c2a26d749575b472ca0ae27a0f/infer/src/absint/FormalMap.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
7e38e5f069178ecede8a949fbca4c9fa9323789f485d2e713ec0b471a0e38702 | input-output-hk/plutus | V2.hs | -- editorconfig-checker-disable-file
| The interface to V2 for the ledger .
module PlutusLedgerApi.V2 (
-- * Scripts
SerialisedScript
, serialiseCompiledCode
, serialiseUPLC
, deserialiseUPLC
-- * Validating scripts
, assertScriptWellFormed
-- * Running scripts
, evaluateScriptR... | null | https://raw.githubusercontent.com/input-output-hk/plutus/bb9b5a18c26476fbf6b2f446ab267706426fec3a/plutus-ledger-api/src/PlutusLedgerApi/V2.hs | haskell | editorconfig-checker-disable-file
* Scripts
* Validating scripts
* Running scripts
** Protocol version
* Costing-related types
** Cost model
* Context types
** Supporting types used in the context types
*** Bytes
*** Certificates
*** Credentials
*** Value
*** Time
*** Types for representing transactions
... | | The interface to V2 for the ledger .
module PlutusLedgerApi.V2 (
SerialisedScript
, serialiseCompiledCode
, serialiseUPLC
, deserialiseUPLC
, assertScriptWellFormed
, evaluateScriptRestricting
, evaluateScriptCounting
, ProtocolVersion (..)
* * Verbose mode and log output
, ... |
4208919eff316d3396100581b02610e0096f80073c1dbea27d045c9bc5f92bde | LennMars/algorithms_in_OCaml | rationalBig.ml | open Util
open Big_int
p /. must be positive .
let is_zero i = sign_big_int i = 0
let gcd m n =
let rec aux m n =
if is_zero n then m
else aux n (mod_big_int m n)
in
aux (abs_big_int m) (abs_big_int n)
let normalize (p, q) =
if is_zero q && not (is_zero p) then failwith "aaa"
else if is_zero q... | null | https://raw.githubusercontent.com/LennMars/algorithms_in_OCaml/f7fb8ca9f497883d86be3167bfc98a4a28ac73c9/rational/rationalBig.ml | ocaml | open Util
open Big_int
p /. must be positive .
let is_zero i = sign_big_int i = 0
let gcd m n =
let rec aux m n =
if is_zero n then m
else aux n (mod_big_int m n)
in
aux (abs_big_int m) (abs_big_int n)
let normalize (p, q) =
if is_zero q && not (is_zero p) then failwith "aaa"
else if is_zero q... | |
aebc73f298449effb8d1f44e380b5cb68f9f9aa4f5891d06a06964d531eaba2c | borkdude/advent-of-cljc | dandorman.cljc | (ns aoc.y2018.d02.dandorman
(:require
[aoc.utils :refer [deftest]]
[aoc.y2018.d02.data :refer [input answer-1 answer-2]]
[clojure.string :as str]
[clojure.test :refer [is]]))
(defn solve-1 [box-ids]
(let [letter-freqs (->> box-ids
(map frequencies)
(m... | null | https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2018/d02/dandorman.cljc | clojure | (ns aoc.y2018.d02.dandorman
(:require
[aoc.utils :refer [deftest]]
[aoc.y2018.d02.data :refer [input answer-1 answer-2]]
[clojure.string :as str]
[clojure.test :refer [is]]))
(defn solve-1 [box-ids]
(let [letter-freqs (->> box-ids
(map frequencies)
(m... | |
f4fc8a61c2644acc5bd6de6f7fc775c72609d73fb2b1ce9e13c65776977a0b3c | ucsd-progsys/liquidhaskell | Class4.hs | {-@ LIQUID "--expect-any-error" @-}
# LANGUAGE ScopedTypeVariables #
{-@ LIQUID "--no-termination" @-}
module Class4 where
import Language.Haskell.Liquid.Prelude
class Frog a where
mkInt :: a -> Int
mkInt _ = liquidAssert (0 > 1) 10
{-@ class Frog a where
mkInt :: a -> Int
@-}
instance Frog Int where
| null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Class4.hs | haskell | @ LIQUID "--expect-any-error" @
@ LIQUID "--no-termination" @
@ class Frog a where
mkInt :: a -> Int
@ | # LANGUAGE ScopedTypeVariables #
module Class4 where
import Language.Haskell.Liquid.Prelude
class Frog a where
mkInt :: a -> Int
mkInt _ = liquidAssert (0 > 1) 10
instance Frog Int where
|
a8a9c7d40d24243552f2ea83edf441ceb205210d19350b7c630425e8f46597f1 | BumblebeeBat/PinkFairy | sign.erl | -module(sign).
-export([test/0,test2/1,test3/0,sign_tx/5,sign/2,verify_sig/3,shared_secret/2,verify/2,data/1,revealed/1,empty/1,empty/0,set_revealed/2,verify_1/2,verify_2/2, pubkey2address/1, valid_address/1, hard_new_key/0,new_key/0,pub/1,pub2/1]).
-record(signed, {data="", sig="", pub = "", sig2="", pub2="", revealed... | null | https://raw.githubusercontent.com/BumblebeeBat/PinkFairy/33d595d735d6b1119732984e894ed6aea2b6cb6a/backup/sign.erl | erlang | to_bytes(X) -> term_to_binary(X).
{Address, Pub, Priv} = hard_new_key(), %recomputing is too slow. better to write it down, and reuse it each time. | -module(sign).
-export([test/0,test2/1,test3/0,sign_tx/5,sign/2,verify_sig/3,shared_secret/2,verify/2,data/1,revealed/1,empty/1,empty/0,set_revealed/2,verify_1/2,verify_2/2, pubkey2address/1, valid_address/1, hard_new_key/0,new_key/0,pub/1,pub2/1]).
-record(signed, {data="", sig="", pub = "", sig2="", pub2="", revealed... |
aaca97e6e838ab5bca80283ad10f29acde3f593c2c96c076bac278470f897e9d | arttuka/reagent-material-ui | timeline_separator.cljs | (ns reagent-mui.lab.timeline-separator
"Imports @mui/lab/TimelineSeparator as a Reagent component.
Original documentation is at -ui/api/timeline-separator/ ."
(:require [reagent.core :as r]
["@mui/lab/TimelineSeparator" :as MuiTimelineSeparator]))
(def timeline-separator (r/adapt-react-class (.-defa... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/lab/timeline_separator.cljs | clojure | (ns reagent-mui.lab.timeline-separator
"Imports @mui/lab/TimelineSeparator as a Reagent component.
Original documentation is at -ui/api/timeline-separator/ ."
(:require [reagent.core :as r]
["@mui/lab/TimelineSeparator" :as MuiTimelineSeparator]))
(def timeline-separator (r/adapt-react-class (.-defa... | |
a0d718b003c36608c98c0cda3429da46dbb724f5ce1e493340478a611183a5ba | input-output-hk/cardano-base | SizeBounds.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module Test.Cardano.Binary.SizeBounds
( tests
)
where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import qualified Data.Map as M
import Data.Proxy (Proxy(Proxy))
import Data.Tagged (Tagged(..))
import Data.T... | null | https://raw.githubusercontent.com/input-output-hk/cardano-base/7e64caa79e0f751f1333ccbce4a64cb48752ae69/cardano-binary/test/Test/Cardano/Binary/SizeBounds.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TypeApplications #
module Test.Cardano.Binary.SizeBounds
( tests
)
where
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as LBS
import qualified Data.Map as M
import Data.Proxy (Proxy(Proxy))
import Data.Tagged (Tagged(..))
import Data.Typeable (typeRep)
import qualified ... |
9a1aef2414bbc87268cc41f9c7b48443bfd4bb73a8b192490d939bf5afc5191e | gotthardp/lorawan-server | lorawan_admin_logger.erl | %
Copyright ( c ) 2016 - 2019 < >
% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%
-module(lorawan_admin_logger).
-behaviour(cowboy_stream).
-export([init/3, data/4, info/3, terminate/3, early_error/5]).
-record(state, {next, path, user, peer}).
init(StreamId, R... | null | https://raw.githubusercontent.com/gotthardp/lorawan-server/1a5c0f2f4d8238a54a326c57a5eb0e6015821b1d/src/lorawan_admin_logger.erl | erlang |
All rights reserved.
end of file | Copyright ( c ) 2016 - 2019 < >
Distributed under the terms of the MIT License . See the LICENSE file .
-module(lorawan_admin_logger).
-behaviour(cowboy_stream).
-export([init/3, data/4, info/3, terminate/3, early_error/5]).
-record(state, {next, path, user, peer}).
init(StreamId, Req, Opts) ->
{Command, ... |
cd0da7c85f0f3dfa168aa3ca1f1d38d7b2dab41eb4fd72c8c60a8f77f75b844c | wdebeaum/DeepSemLex | takeaway.lisp | ;;;;
;;;; w::takeaway
;;;;
(define-words :pos W::n
:words (
(w::takeaway
(senses
((LF-PARENT ONT::MEALS)
(TEMPL MASS-PRED-TEMPL)
(syntax (W::morph (:forms (-none))))
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/takeaway.lisp | lisp |
w::takeaway
|
(define-words :pos W::n
:words (
(w::takeaway
(senses
((LF-PARENT ONT::MEALS)
(TEMPL MASS-PRED-TEMPL)
(syntax (W::morph (:forms (-none))))
)
)
)
))
|
3ae47d072da5ee32a7458d0cbd16e6e5b2e153c2fac7b58355ece28bf95ef9fc | draperlaboratory/VIBES | vir.mli | (***************************************************************************)
(* *)
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/VIBES/7f978d66d0b022d1a9262fdfc608b7a2b7c95dff/tools/vibes-serializers/lib/vir.mli | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
This research was developed with funding from the Defense Advanced
Research Projects Agency ( DARPA ) .
open Core
open Bap_core_theory
val serialize : Vibes_ir.Types.t -> Sexp.t
val deserial... |
da7484a41f2fdf521bf41afb65c5c1d607c1218e3bba48447cc103b193bb8eac | braintripping/lark | editor.cljs | (ns lark.cards.editor
(:refer-clojure :exclude [require])
(:require [chia.view :as v]
[chia.view.legacy :as vlegacy]
[lark.editor :as editor]
[lark.editors.codemirror :as cm]
["codemirror" :as CM]
[applied-science.js-interop :as j]
[clojure.spe... | null | https://raw.githubusercontent.com/braintripping/lark/95038a823068681c39453c46a309a3514cf48800/tools/test/lark/cards/editor.cljs | clojure | (ns lark.cards.editor
(:refer-clojure :exclude [require])
(:require [chia.view :as v]
[chia.view.legacy :as vlegacy]
[lark.editor :as editor]
[lark.editors.codemirror :as cm]
["codemirror" :as CM]
[applied-science.js-interop :as j]
[clojure.spe... | |
4e592fd260498e6d24b81402b1522fcedfd105d62ed36d7375af50d77b4b4dfc | dyzsr/ocaml-selectml | simple_value_approx.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/middle_end/flambda/simple_value_approx.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-4-9-30-40-41-42-66"]
open! Int_replace_polymor... |
77dec382503bd91c40a0fb99f3970048d46f6f1c2ea8e273065fd771648735e9 | mstksg/advent-of-code-2021 | Day03.hs | -- |
-- Module : AOC.Challenge.Day03
-- License : BSD3
--
-- Stability : experimental
-- Portability : non-portable
--
Day 3 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day03 (
day03a
, day03b
) where
import AOC.Common (traverseLines)
im... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2021/87e449cde12d225c4e547484b9107c33ab7b2a6b/src/AOC/Challenge/Day03.hs | haskell | |
Module : AOC.Challenge.Day03
License : BSD3
Stability : experimental
Portability : non-portable
branch | Day 3 . See " AOC.Solver " for the types used in this module !
module AOC.Challenge.Day03 (
day03a
, day03b
) where
import AOC.Common (traverseLines)
import AOC.Solver ((:~>)(..))
import Control.DeepSeq (NFData)
import Control.Le... |
6f8a4e25a66a4c88d7fd062daf6cf4fe433de4e99e25f534157d33dd424088d5 | exercism/babashka | perfect_numbers_test.clj | (ns perfect-numbers-test
(:require
[clojure.test :refer [deftest testing is]]
[perfect-numbers]))
(deftest test-initialize-perfect-number
(testing "Negative numbers throw an exception"
(is (thrown? IllegalArgumentException (perfect-numbers/classify -1)))))
(deftest test-classify-deficient
(testing "13... | null | https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/perfect-numbers/test/perfect_numbers_test.clj | clojure | (ns perfect-numbers-test
(:require
[clojure.test :refer [deftest testing is]]
[perfect-numbers]))
(deftest test-initialize-perfect-number
(testing "Negative numbers throw an exception"
(is (thrown? IllegalArgumentException (perfect-numbers/classify -1)))))
(deftest test-classify-deficient
(testing "13... | |
7defe0d5fe35d143e8b4a03121e550f870ab5c575333721d695edc2688c211bc | rmculpepper/gamble | calls-erp.rkt | Copyright ( c ) 2014
Released under the terms of the 2 - clause BSD license .
;; See the file COPYRIGHT for details.
#lang racket/base
(require (for-template racket/base)
syntax/stx
syntax/parse
"base.rkt"
"known-functions.rkt")
(provide app-calls-erp?
analyze-CALLS-E... | null | https://raw.githubusercontent.com/rmculpepper/gamble/a5231e2eb3dc0721eedc63a77ee6d9333846323e/gamble/private/analysis/calls-erp.rkt | racket | See the file COPYRIGHT for details.
CALLS-ERP(app) is true if a call to {sample, observe-sample, mem,
fail} may occur in the dynamic extent of the function call.
app-calls-erp? : Syntax -> Boolean
Indicates whether a function application (but not the evaluation of
its arguments) might call an ERP.
Indicates if t... | Copyright ( c ) 2014
Released under the terms of the 2 - clause BSD license .
#lang racket/base
(require (for-template racket/base)
syntax/stx
syntax/parse
"base.rkt"
"known-functions.rkt")
(provide app-calls-erp?
analyze-CALLS-ERP)
(define (app-calls-erp? stx)
(h... |
e88278fd0f1022f0b78ba310fafd7c7fe18f6dc0c8681a7e1c5dd46733c2822a | lukaszkorecki/taskmaster | scratch.clj | (require '[taskmaster.dev.connection :as c]
'[taskmaster.component :as com]
'[clojure.tools.logging :as log]
'[com.stuartsierra.component :as component])
(def qs (atom []))
(defn handler [{:keys [id queue-name payload component] :as job}]
(log/infof "got-job t=%s q=%s %s" component que... | null | https://raw.githubusercontent.com/lukaszkorecki/taskmaster/f8803e2cb4e093d4148316787285a8c53eae7e5f/dev-resources/taskmaster/dev/scratch.clj | clojure | (require '[taskmaster.dev.connection :as c]
'[taskmaster.component :as com]
'[clojure.tools.logging :as log]
'[com.stuartsierra.component :as component])
(def qs (atom []))
(defn handler [{:keys [id queue-name payload component] :as job}]
(log/infof "got-job t=%s q=%s %s" component que... | |
d8d47600bcc2d257ff87d6b8799a26da63b832d98538e3118e87c2fae7ec11bb | biegunka/biegunka | Layout.hs | # LANGUAGE DataKinds #
-- | Example 'Source' based on 'directory-layout'
module Control.Biegunka.Source.Layout
( Layout
, layout
) where
import Control.Applicative (empty)
import Control.Lens
import System.FilePath (takeDirectory, takeFileName)
import System.Directory.Layout (Layout, dir, make)
import Control.B... | null | https://raw.githubusercontent.com/biegunka/biegunka/74fc93326d5f29761125d7047d5418899fa2469d/src/Control/Biegunka/Source/Layout.hs | haskell | | Example 'Source' based on 'directory-layout'
| Make specified layout and use is as 'Source'
^ Layout to make
^ Layout root
^ What to do with layout files | # LANGUAGE DataKinds #
module Control.Biegunka.Source.Layout
( Layout
, layout
) where
import Control.Applicative (empty)
import Control.Lens
import System.FilePath (takeDirectory, takeFileName)
import System.Directory.Layout (Layout, dir, make)
import Control.Biegunka.Language
import Control.Biegunka.Script
... |
a859c04ace9406708a48af89677d52d0b15cec86545c2ef739b203592a19b613 | racket/racket7 | module-read.rkt | #lang racket/base
(require "../syntax/api.rkt"
"main.rkt"
"reflect.rkt"
"../namespace/api.rkt"
"../read/primitive-parameter.rkt")
(provide with-module-reading-parameterization
raise-wrong-module-name
check-module-form)
(define (with-module-reading-parameterization... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/src/expander/eval/module-read.rkt | racket | Would be set by `call-with-default-reading-parameterization`,
but we need to set them in our own reader, not the host's:
It's fine:
It's ok; need to install a specific `module' binding: | #lang racket/base
(require "../syntax/api.rkt"
"main.rkt"
"reflect.rkt"
"../namespace/api.rkt"
"../read/primitive-parameter.rkt")
(provide with-module-reading-parameterization
raise-wrong-module-name
check-module-form)
(define (with-module-reading-parameterization... |
08604d0c53c241968bc740b049bc970f7639b3454478d73857deb6a69c4e73b0 | ocsigen/lwt | lwt_io.mli | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
(** Buffered byte channels *)
* A { b channel } is a high - level object for performing input / output
( IO ) . It allows to read / write from / to the outside world in an
... | null | https://raw.githubusercontent.com/ocsigen/lwt/c70e8b6362341bc1a9e85cca8f184e424f29e166/src/unix/lwt_io.mli | ocaml | * Buffered byte channels
* Exception raised when a channel is closed. The parameter is a
description of the channel.
* {2 Types}
* Type of buffered byte channels
* Input mode
* Output mode
* Channel mode
* [input] input mode representation
* [output] output mode representation
* Type of input channels
*... | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
* A { b channel } is a high - level object for performing input / output
( IO ) . It allows to read / write from / to the outside world in an
efficient way , by minimisin... |
57ab16e882d850b66fe5d029838d4a243f5edb0c64942c82978980602bc18d7b | TrustInSoft/tis-interpreter | logic_utils.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/ast_queries/logic_utils.ml | ocaml | ************************************************************************
alternatives)
Automatique) ... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
( Institut National de Recherche en Informatique et en ... |
7b322fa708a32a30704f83db3c1e13f52c4aba77c06e02a19df80e2c513fca15 | buildsome/buildsome | FSHook.hs | {-# LANGUAGE DeriveDataTypeable #-}
module Lib.FSHook
( getLdPreloadPath
, FSHook
, with
, OutputEffect(..), OutputBehavior(..)
, Input(..)
, DelayedOutput(..), UndelayedOutput
, Protocol.OutFilePath(..), Protocol.OutEffect(..), Protocol.Severity(..)
, FSAccessHandlers(..)
, AccessType(..), AccessDo... | null | https://raw.githubusercontent.com/buildsome/buildsome/479b92bb74a474a5f0c3292b79202cc850bd8653/src/Lib/FSHook.hs | haskell | # LANGUAGE DeriveDataTypeable #
TODO: AccessDoc Protocol.Func JobLabel
New connection created in the process of killing connections, ignore it
which connected again!
Except thread killed
Job connection may fail when the process is killed
during a send-message, which may cause a protocol error
TODO: If any of the... | module Lib.FSHook
( getLdPreloadPath
, FSHook
, with
, OutputEffect(..), OutputBehavior(..)
, Input(..)
, DelayedOutput(..), UndelayedOutput
, Protocol.OutFilePath(..), Protocol.OutEffect(..), Protocol.Severity(..)
, FSAccessHandlers(..)
, AccessType(..), AccessDoc
, runCommand, timedRunCommand
... |
0e89ee3208672253b6be1ff0578e66b5083fd135e5e90798e99f73b48f25d7d2 | koto-bank/lbge | vector.lisp | (define-test vector-add-test
(:lbge.math)
(testing "2d vector addition"
(ok (eqv (add (make-float2 1 2)
(make-float2 3 4))
(make-float2 4 6))))
(testing "3d vector addition"
(ok (eqv (add (make-float3 1 2 3)
(make-float3 4 5 6))
(make-float3... | null | https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/math/t/vector.lisp | lisp | (define-test vector-add-test
(:lbge.math)
(testing "2d vector addition"
(ok (eqv (add (make-float2 1 2)
(make-float2 3 4))
(make-float2 4 6))))
(testing "3d vector addition"
(ok (eqv (add (make-float3 1 2 3)
(make-float3 4 5 6))
(make-float3... | |
a5cd5b45da24ff534a8b64ef6087b0533f6e4d071623cd7725b198d15ddaa35a | robert-strandh/SICL | enable-object-creation.lisp | (cl:in-package #:sicl-boot-phase-3)
(defun enable-object-creation (e1 e2)
(let ((client (env:client e2)))
(setf (env:fdefinition client e1 'make-instance)
(lambda (class-or-name &rest initargs &key &allow-other-keys)
(let ((class (if (symbolp class-or-name)
(env... | null | https://raw.githubusercontent.com/robert-strandh/SICL/4189e85e231f12cdbd8a9a4b3f0bd1d69a2c5afe/Code/Boot/Phase-3/enable-object-creation.lisp | lisp | (cl:in-package #:sicl-boot-phase-3)
(defun enable-object-creation (e1 e2)
(let ((client (env:client e2)))
(setf (env:fdefinition client e1 'make-instance)
(lambda (class-or-name &rest initargs &key &allow-other-keys)
(let ((class (if (symbolp class-or-name)
(env... | |
db50b0931955c463c02f88ac406cca8ea9d7d62acec9802013aa05bb61ca27e5 | krestenkrab/triq | lock_fsm.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%%
This file is part of Triq - Trifork QuickCheck
%%
Copyright ( c ) 2013
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may o... | null | https://raw.githubusercontent.com/krestenkrab/triq/c7306b8eaea133d52140cb828817efb5e50a3d52/test/lock_fsm.erl | erlang | ex: ts=4 sw=4 et
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 lan... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
This file is part of Triq - Trifork QuickCheck
Copyright ( c ) 2013
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(lock_fsm).
-behaviour(gen_fsm... |
c660c63738372394b06d63fb60523e432b1fffb4e055b3c23f8669a59c90e2c1 | geocaml/carbon-intensity | j.ml | let find = Ezjsonm.find_opt
let to_list = Ezjsonm.get_list
let to_string = Ezjsonm.get_string
let to_int = Ezjsonm.get_int
let to_float = Ezjsonm.get_float
let null_to_option = function `Null -> None | v -> Some v
| null | https://raw.githubusercontent.com/geocaml/carbon-intensity/45148d1d15f3caae437a687c3cb556169cf20652/src/plugins/j.ml | ocaml | let find = Ezjsonm.find_opt
let to_list = Ezjsonm.get_list
let to_string = Ezjsonm.get_string
let to_int = Ezjsonm.get_int
let to_float = Ezjsonm.get_float
let null_to_option = function `Null -> None | v -> Some v
| |
68472e8732546975f4779eeeebecf409ca77a58c70b6ba737004430213225c83 | tejasbubane/haskell-book-code | Debug.hs | module Main where
import Control.Monad (forever)
import Network.Socket hiding (recv)
import Network.Socket.ByteString (recv, sendAll)
logAndEcho :: Socket -> IO ()
logAndEcho sock = forever $ do
(conn, _) <- accept sock
printAndKickback conn
close conn
where printAndKickback conn = do
msg <- recv co... | null | https://raw.githubusercontent.com/tejasbubane/haskell-book-code/deaac8ab4db0ae8692d0278826528bb8a746ed82/ch-31/fingerd/src/Debug.hs | haskell | module Main where
import Control.Monad (forever)
import Network.Socket hiding (recv)
import Network.Socket.ByteString (recv, sendAll)
logAndEcho :: Socket -> IO ()
logAndEcho sock = forever $ do
(conn, _) <- accept sock
printAndKickback conn
close conn
where printAndKickback conn = do
msg <- recv co... | |
adb106219a6be3507c2a4dd304c3f7f42147b8cdbb1275306e16ef28bc946289 | scalaris-team/scalaris | api_json.erl | 2011 - 2018 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
di... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/json/api_json.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2011 - 2018 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(api_json).
-author('').
-export([handler/2]).
-export([tuple_list_to_json/1]).
-include("scalaris.hrl").
-... |
6eec9cf4395ddb6899cd7b26476926c0c116fe2cb6c49e6e27d6188dab808f7d | AliasQli/GramHs | Req.hs | # LANGUAGE DuplicateRecordFields #
{-# LANGUAGE TemplateHaskell #-}
module Model.Req where
import Data.Aeson.TH
import Data.Text (Text)
import Model.Message
-- [POST] /auth
newtype AuthReq = AuthReq
{ authKey :: Text
}
deriving (Show)
$(deriveJSON defaultOptions ''AuthR... | null | https://raw.githubusercontent.com/AliasQli/GramHs/b34bd59a8ccf7552513204cdccce31b25eebfdaa/src/Model/Req.hs | haskell | # LANGUAGE TemplateHaskell #
[POST] /auth
[POST] /verify
[POST] /release
[POST] /sendFriendMessage
[POST] /sendGroupMessage | # LANGUAGE DuplicateRecordFields #
module Model.Req where
import Data.Aeson.TH
import Data.Text (Text)
import Model.Message
newtype AuthReq = AuthReq
{ authKey :: Text
}
deriving (Show)
$(deriveJSON defaultOptions ''AuthReq)
data VerifyReq = VerifyReq
{ sessionKey :: Text
... |
cc40fa5b42b25ee7689e34e9265f65193fe4d5650249e63795c0b1535a3589be | bennn/dissertation | aux.rkt | #lang racket
(require "data.rkt"
"tetras.rkt")
(provide
list-pick-random
neg-1
tetras)
(define r (make-pseudo-random-generator))
(parameterize ((current-pseudo-random-generator r))
(random-seed 43453))
(define (list-pick-random ls)
(list-ref ls (random (length ls) r)))
(define neg-1 -1)
(define... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/tetris/untyped/aux.rkt | racket | #lang racket
(require "data.rkt"
"tetras.rkt")
(provide
list-pick-random
neg-1
tetras)
(define r (make-pseudo-random-generator))
(parameterize ((current-pseudo-random-generator r))
(random-seed 43453))
(define (list-pick-random ls)
(list-ref ls (random (length ls) r)))
(define neg-1 -1)
(define... | |
85002d9991adc87020212810e105f4774f8da0ce304f2b4a3f8592778c7338c5 | janestreet/learn-ocaml-workshop | point.ml | open Base
type t =
{ col : int
; row : int
}
let add t1 t2 = { col = t1.col + t2.col; row = t1.row + t2.row }
let compare_by_row { col = _; row = row1 } { col = _; row = row2 } = row1 - row2
let compare_by_col { col = col1; row = _ } { col = col2; row = _ } = col1 - col2
module For_drawing = struct
let for_r... | null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-lumines/lib/point.ml | ocaml | open Base
type t =
{ col : int
; row : int
}
let add t1 t2 = { col = t1.col + t2.col; row = t1.row + t2.row }
let compare_by_row { col = _; row = row1 } { col = _; row = row2 } = row1 - row2
let compare_by_col { col = col1; row = _ } { col = col2; row = _ } = col1 - col2
module For_drawing = struct
let for_r... | |
9a7fc05707b6418abc4576b284c0f9f1251ad1593d0eb7cada3d2e82fcbb2a87 | koto-bank/lbge | system.lisp | (in-package :lbge.ecs)
(defclass system ()
((world
:documentation "World the system belongs to"
:initarg :world
:reader get-world)
(component-storages
:accessor component-storages
:initform (list)
:documentation "List component storages for component types"))
(:documentation "Base class ... | null | https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/ecs/system.lisp | lisp | (in-package :lbge.ecs)
(defclass system ()
((world
:documentation "World the system belongs to"
:initarg :world
:reader get-world)
(component-storages
:accessor component-storages
:initform (list)
:documentation "List component storages for component types"))
(:documentation "Base class ... | |
4dbb30e604dc555c47dae0ced33e5eab88cf488278560a3a15a582ca26d24f6e | clj-commons/rewrite-clj | interop.cljc | (ns ^:no-doc rewrite-clj.interop
#?(:cljs (:require [goog.string :as gstring]
goog.string.format)))
#?(:clj (set! *warn-on-reflection* true))
(defn simple-format
"Interop version of string format
Note that there a big differences between Java's format and Google Closure's format - we don't ... | null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/7621126caae5f21dc5150d52a6c9b747dc0aeeff/src/rewrite_clj/interop.cljc | clojure | (ns ^:no-doc rewrite-clj.interop
#?(:cljs (:require [goog.string :as gstring]
goog.string.format)))
#?(:clj (set! *warn-on-reflection* true))
(defn simple-format
"Interop version of string format
Note that there a big differences between Java's format and Google Closure's format - we don't ... | |
3223dbd5cd634ca582b49d327afbb8be8caf81509fd7e40094e6c67df39541ea | polysemy-research/polysemy | NonDet.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE NoPolyKinds #
# OPTIONS_HADDOCK not - home #
| Description : The ' NonDet ' effect
module Polysemy.Internal.NonDet where
------------------------------------------------------------------------------
-- | An effect corresponding to the... | null | https://raw.githubusercontent.com/polysemy-research/polysemy/10a1336f32438c2d308313f8ad55ac736145390f/src/Polysemy/Internal/NonDet.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveFunctor #
----------------------------------------------------------------------------
| An effect corresponding to the 'Control.Applicative.Alternative' typeclass. | # LANGUAGE NoPolyKinds #
# OPTIONS_HADDOCK not - home #
| Description : The ' NonDet ' effect
module Polysemy.Internal.NonDet where
data NonDet m a
= Empty
| Choose (m a) (m a)
|
f2be690e62e687a85eaf38d51ef5529fd9d2e1781584e42fac810d977d524ad5 | macintux/lynch | process.erl | @author < >
( C ) 2013 ,
%%% @doc
%%%
%%% @end
Created : 3 Nov 2013 by < >
-module(process).
-behavior(gen_server).
-include("process.hrl").
-export([start_round/2, retrieve_messages/2, dump/1, message/4]).
%% API
-export([start_link/4]).
%% gen_server callbacks
-export([init/1, handle_call/3, hand... | null | https://raw.githubusercontent.com/macintux/lynch/ace79bebed672861a2a4d465a3cb6b3c41eec596/sync/runtime/src/process.erl | erlang | @doc
@end
API
gen_server callbacks
Callbacks for algorithms to define when implementing the process
behavior
Messages from prep to send during step
===================================================================
API
===================================================================
-----------------------... | @author < >
( C ) 2013 ,
Created : 3 Nov 2013 by < >
-module(process).
-behavior(gen_server).
-include("process.hrl").
-export([start_round/2, retrieve_messages/2, dump/1, message/4]).
-export([start_link/4]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_... |
8b757d0708819341454634735066ad896271563a0e931da49c04c11219bd31da | singleheart/programming-in-haskell | ex5.hs | pyths :: (Num c, Eq c, Enum c) => c -> [(c, c, c)]
pyths n =
[ (x, y, z)
| x <- [1 .. n]
, y <- [1 .. n]
, z <- [1 .. n]
, x ^ 2 + y ^ 2 == z ^ 2
]
| null | https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch05/ex5.hs | haskell | pyths :: (Num c, Eq c, Enum c) => c -> [(c, c, c)]
pyths n =
[ (x, y, z)
| x <- [1 .. n]
, y <- [1 .. n]
, z <- [1 .. n]
, x ^ 2 + y ^ 2 == z ^ 2
]
| |
3f5cd09962b240c2eae9a2850eb040de8df94942e94bdf222c5d86f875993fa2 | anmonteiro/lumo | b.cljs | (ns circular-deps.b
(:require [circular-deps.a]))
(defn bar [c d]
(* c d))
| null | https://raw.githubusercontent.com/anmonteiro/lumo/6709c9f1b7b342c8108e6ed6e034e19dc786f00b/src/test/cljs_build/circular_deps/b.cljs | clojure | (ns circular-deps.b
(:require [circular-deps.a]))
(defn bar [c d]
(* c d))
| |
3b1107885aa37becf2fdb6a90da392f3871720cdb67e8ca3d713f94d1218f1b4 | mput/sicp-solutions | 2_17.test.rkt | #lang racket
(require rackunit/text-ui)
(require rackunit "../solutions/2_17.rkt")
(define tests
(test-suite
"Test for exercise 2_17"
(test-case
"Should return list with only last element of list"
(define test-list (list 1 2 3 4))
(check-equal? (last-pair test-list) (list 4) ""))
(te... | null | https://raw.githubusercontent.com/mput/sicp-solutions/fe12ad2b6f17c99978c8fe04b2495005986b8496/tests/2_17.test.rkt | racket | #lang racket
(require rackunit/text-ui)
(require rackunit "../solutions/2_17.rkt")
(define tests
(test-suite
"Test for exercise 2_17"
(test-case
"Should return list with only last element of list"
(define test-list (list 1 2 3 4))
(check-equal? (last-pair test-list) (list 4) ""))
(te... | |
8d46290ee84d931ac8d2f6cba048ab21df0f34866966151699dc02ccab46c44c | aturon/Caper | treiber-stack.rkt | #lang racket/base
(require "../../by-hand/treiber-stack.rkt"
"../test-tools.rkt"
rackunit)
(define s (make-treiber-stack))
(check-equal? (pop s #f) #f "pop on empty stack not failure-result")
(push s 1)
(check-equal? (pop s) 1 "pop on singleton stack not singleton")
(check-equal? (pop s #f) #f "pop on empty st... | null | https://raw.githubusercontent.com/aturon/Caper/be05f13f3189c7717cd14a223b0cb3b188fe5bb1/tests/by-hand/treiber-stack.rkt | racket | #lang racket/base
(require "../../by-hand/treiber-stack.rkt"
"../test-tools.rkt"
rackunit)
(define s (make-treiber-stack))
(check-equal? (pop s #f) #f "pop on empty stack not failure-result")
(push s 1)
(check-equal? (pop s) 1 "pop on singleton stack not singleton")
(check-equal? (pop s #f) #f "pop on empty st... | |
39c6f9570f8155366e28d1de2c32331fc61cdd9715ca56e60b4c86c975f128c3 | linkfluence/inventory | leaseweb.clj | (ns com.linkfluence.inventory.api.leaseweb
(:require [compojure.core :refer :all]
[compojure.route :as route]
[clojure.tools.logging :as log]
;;import inventory handler
[com.linkfluence.inventory.leaseweb :as lsw]
[com.linkfluence.utils :as u]))
(defn add-o... | null | https://raw.githubusercontent.com/linkfluence/inventory/b69110494f8db210d14cc7093834c441440cd4e8/src/clj/com/linkfluence/inventory/api/leaseweb.clj | clojure | import inventory handler | (ns com.linkfluence.inventory.api.leaseweb
(:require [compojure.core :refer :all]
[compojure.route :as route]
[clojure.tools.logging :as log]
[com.linkfluence.inventory.leaseweb :as lsw]
[com.linkfluence.utils :as u]))
(defn add-operation
([id op params]
(add-ope... |
ecfbf023aae0e0fa44786a3c087ee875512bd1f1e46b93b2ff2a6aac17107901 | janestreet/universe | serializer.ml | open! Base
open Faraday
open Message
(* This is currently written with little to no concern about the efficiency of the
serializer. If performance is necessary, we would want to keep a closer eye on
the internal buffer and flush occasionally.
*)
let rec dispatch t = function
| Nil -> write_nil t
| Integer i... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/vcaml/msgpack/src/serializer.ml | ocaml | This is currently written with little to no concern about the efficiency of the
serializer. If performance is necessary, we would want to keep a closer eye on
the internal buffer and flush occasionally.
Don't shadow [Faraday.write_string]. | open! Base
open Faraday
open Message
let rec dispatch t = function
| Nil -> write_nil t
| Integer i -> write_int t i
| UInt64 i -> write_uint64 t i
| Int64 i -> write_signed_integer t i
| Boolean b -> write_bool t b
| Floating f -> write_float t f
| Array vs -> write_array t vs
| Map kvs -> write_map ... |
2beb9de7439e8ba2e0144b6f7ed70825f4f1b14eafde7fa594650b7fdc3eba07 | acieroid/overscore | semantics.clj | ;;; Find the semantic of the score given the position and class of segments
(ns overscore.semantics.semantics
(:use clojure.java.io
clojure.contrib.prxml
clojure.math.numeric-tower
overscore.utils
overscore.recognition.segmentation.segment))
(defrecord score-system [clef time notes])
... | null | https://raw.githubusercontent.com/acieroid/overscore/71649b37c415482b6c4ab150290ef0719649d359/src/overscore/semantics/semantics.clj | clojure | Find the semantic of the score given the position and class of segments
Default division
Already contains a notehead, end of this group
Add the notehead to this group
Pre
Pre after a notehead, create a new group
Pre before a notehead, add it to the current group
add this one too
Default to G2 clef
Staff line... | (ns overscore.semantics.semantics
(:use clojure.java.io
clojure.contrib.prxml
clojure.math.numeric-tower
overscore.utils
overscore.recognition.segmentation.segment))
(defrecord score-system [clef time notes])
(defrecord score-note [step accidental octave duration])
(def divisions 64)
... |
5801a402e562fc81b854e81964cdd3a44232ebe643d3eca7216b91cba31e4715 | mzp/coq-ide-for-ios | dnet.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/lib/dnet.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
we store identifiers at the leaf of... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id:$
Generic dnet impl... |
961a7383a4f3a1dda1ffbf276bfb3dc6ffd5249ef2af5294d241d0b42708c5e5 | pariyatti/kosa | digest.clj | (ns kuti.support.digest
(:import [java.util UUID])
(:require [clojure.string :as string]))
(defn uuid-v4
"Default randomUUID implementation."
[]
(java.util.UUID/randomUUID))
(defn uuid
([]
(uuid-v4))
([s]
(assert (string? s))
(java.util.UUID/fromString s)))
(defn null-uuid []
(UUID. 0 0))
(... | null | https://raw.githubusercontent.com/pariyatti/kosa/5d225ffaa6354a6ee6a791c81f158ce04471aa23/src/kuti/support/digest.clj | clojure | (ns kuti.support.digest
(:import [java.util UUID])
(:require [clojure.string :as string]))
(defn uuid-v4
"Default randomUUID implementation."
[]
(java.util.UUID/randomUUID))
(defn uuid
([]
(uuid-v4))
([s]
(assert (string? s))
(java.util.UUID/fromString s)))
(defn null-uuid []
(UUID. 0 0))
(... | |
9b0e0925c1af4e25d68ecab572bee2e1c1cb435d87c2923394d258d885bfb385 | nathell/skyscraper | core.clj | (ns skyscraper.core
(:require
[clj-http.client :as http]
[clj-http.conn-mgr :as http-conn]
[clj-http.core :as http-core]
[clj-http.headers :as http-headers]
[clojure.edn :as edn]
[clojure.set :refer [intersection]]
[clojure.string :as string]
[net.cgrand.enlive-html :as enlive]
[re... | null | https://raw.githubusercontent.com/nathell/skyscraper/be774577607e4a4d0d97482ac71130c6a22e590c/src/skyscraper/core.clj | clojure | Directories
Micro-templating framework
these names
=> \"admins/joe/index\"
Cache
Defining processors
if you are scraping something other than HTMLs (e.g., PDFs via a custom
or when you’re scraping malformed HTML and need an interim fixup steps before
the corresponding values will be emitted as a database row wh... | (ns skyscraper.core
(:require
[clj-http.client :as http]
[clj-http.conn-mgr :as http-conn]
[clj-http.core :as http-core]
[clj-http.headers :as http-headers]
[clojure.edn :as edn]
[clojure.set :refer [intersection]]
[clojure.string :as string]
[net.cgrand.enlive-html :as enlive]
[re... |
aa1494c1e586dba0f736ed10a43581b4abd4bc74b9b212fb3eb47d0122d3419c | Gadjib/ocamlhomeworks | p3.ml | let rec main n =
if n = 0 then 1.
else ((365.-.(float_of_int n)+.1.)/.365.)*.(main (n-1));;
print_float (1. -. (main (read_int())));;
print_newline();;
| null | https://raw.githubusercontent.com/Gadjib/ocamlhomeworks/d5568d4830d4306ea56749f17af355bc35001eff/10%20%D0%BA%D0%BB%D0%B0%D1%81%D1%81/1%20%D1%87%D0%B5%D1%82%D0%B2%D0%B5%D1%80%D1%82%D1%8C/2020-09-21%20HW/p3.ml | ocaml | let rec main n =
if n = 0 then 1.
else ((365.-.(float_of_int n)+.1.)/.365.)*.(main (n-1));;
print_float (1. -. (main (read_int())));;
print_newline();;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.