_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 |
|---|---|---|---|---|---|---|---|---|
111811e04a9e0a127e69d8c878bbff4243cf4359033d852a451c107809ef6778 | Factual/sosueme | conf.clj | (ns sosueme.conf
"Simple configuration utility. Knows how to read in configuration from
files and the classpath. Provides access to said configuration.
Configuration data is expected to be stored as a clojure hash-map.
E.g., if you have a file called myconf.clj with this content:
{:host \"my.server.co... | null | https://raw.githubusercontent.com/Factual/sosueme/1c2e9b7eb4df8ae67012dc2a398b4ec63c9bd6cd/src/sosueme/conf.clj | clojure | (ns sosueme.conf
"Simple configuration utility. Knows how to read in configuration from
files and the classpath. Provides access to said configuration.
Configuration data is expected to be stored as a clojure hash-map.
E.g., if you have a file called myconf.clj with this content:
{:host \"my.server.co... | |
ec9e3068ad46174f8b0cdac552b5f6edf99533f1d57792a04590527ab554fd5b | JHU-PL-Lab/jaylang | program_samples.ml | let parse = Jayil_parser.Parser.parse_string
let e1 = parse "\nt = 1\n"
let e2 = parse "\na = 0;\nb = 1;\nt = a + b;\n"
let e3 = parse "\na = 0;\nb = 1;\nc = a < b;\nt = c ? (r1 = 1) : (r2 = 0);\n"
let e4 = parse "\na = 0;\nb = 1;\nc = {f1 = a, f2 = b};\nt = c.f2\n"
| null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/81abf9ff185758a2aaefd90478da4c7bb53f4384/src-test/unit/program_samples.ml | ocaml | let parse = Jayil_parser.Parser.parse_string
let e1 = parse "\nt = 1\n"
let e2 = parse "\na = 0;\nb = 1;\nt = a + b;\n"
let e3 = parse "\na = 0;\nb = 1;\nc = a < b;\nt = c ? (r1 = 1) : (r2 = 0);\n"
let e4 = parse "\na = 0;\nb = 1;\nc = {f1 = a, f2 = b};\nt = c.f2\n"
| |
8d570822567f747521eb5290ca5771641a78c32d39eae73fe1604473b0aa3910 | dramforever/nix-dram | Pretty.hs | module Nix.Nar.Listing.Pretty where
import qualified Data.HashMap.Lazy as H
import Data.Maybe
import qualified Data.Text.Lazy as T
import Nix.Nar.Listing.Types
import Prettyprinter
import Prettyprinter.Render.Terminal
prettyNarListing :: NarListing -> Doc AnsiStyle
prettyNarLis... | null | https://raw.githubusercontent.com/dramforever/nix-dram/a401e0cc1821106633c36859b0248a4b4f64bee3/nix-nar-listing/src/Nix/Nar/Listing/Pretty.hs | haskell | module Nix.Nar.Listing.Pretty where
import qualified Data.HashMap.Lazy as H
import Data.Maybe
import qualified Data.Text.Lazy as T
import Nix.Nar.Listing.Types
import Prettyprinter
import Prettyprinter.Render.Terminal
prettyNarListing :: NarListing -> Doc AnsiStyle
prettyNarLis... | |
1f6812c3d99f06580350f29834e49ad32c0e109880a2e467af21d9c9e365af3c | lspitzner/brittany | Test187.hs | type a `MySynonym` b = a -> b
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test187.hs | haskell | type a `MySynonym` b = a -> b
| |
04e70c9a82dc9e76bc1c7b52ea31b49da86e2ee419f7fe2270c03ca866c0a69e | ghosthamlet/algorithm-data-structure | trie_node.clj | (ns algorithm-data-structure.data-structures.trie-node
"-algorithms/tree/master/src/data-structures/trie"
(:require [algorithm-data-structure.data-structures.hash-table :as ht]))
(declare has-child)
(defn create
([character] (create character false))
([character is-complete-word]
{:character character
... | null | https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/data_structures/trie_node.clj | clojure | (ns algorithm-data-structure.data-structures.trie-node
"-algorithms/tree/master/src/data-structures/trie"
(:require [algorithm-data-structure.data-structures.hash-table :as ht]))
(declare has-child)
(defn create
([character] (create character false))
([character is-complete-word]
{:character character
... | |
2a08cd66e3b6c7a1525855a9e29143998634659d09f2e7f9847f19efbb19808d | TempusMUD/cl-tempus | receptionist.lisp | (in-package #:tempus)
(defvar *min-rent-cost* 1000)
(defconstant +rent-factor+ 1)
(defconstant +cryo-factor+ 4)
(defcommand (ch "rent") (:resting)
(send-to-char ch "You can't do that here.~%"))
(defcommand (ch "cryo") (:resting)
(send-to-char ch "You can't do that here.~%"))
(defun find-all-objects (obj-seq)
... | null | https://raw.githubusercontent.com/TempusMUD/cl-tempus/c5008c8d782ba44373d89b77c23abaefec3aa6ff/src/specials/receptionist.lisp | lisp | (in-package #:tempus)
(defvar *min-rent-cost* 1000)
(defconstant +rent-factor+ 1)
(defconstant +cryo-factor+ 4)
(defcommand (ch "rent") (:resting)
(send-to-char ch "You can't do that here.~%"))
(defcommand (ch "cryo") (:resting)
(send-to-char ch "You can't do that here.~%"))
(defun find-all-objects (obj-seq)
... | |
205ebadfb57608b946d4dc48bfd25b1fbde9841a6f81bc423024a6a6f373cc62 | softwarelanguageslab/maf | R5RS_rosetta_quadratic-2.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 2
; * swapped branches: 0
* calls to i d fun : 1
(letrec ((quadratic (lambda (a b c)
(if (= a 0)
(if (= b 0) 'fail (- (/ c b)))
(let ((delta (- (* b b) (* 4 a c))))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_rosetta_quadratic-2.scm | scheme | Changes:
* swapped branches: 0 | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 2
* calls to i d fun : 1
(letrec ((quadratic (lambda (a b c)
(if (= a 0)
(if (= b 0) 'fail (- (/ c b)))
(let ((delta (- (* b b) (* 4 a c))))
(if (<ch... |
e0c8ea7d0c77f5c986d1cd5a2412be57773ccbb67ba4632bd797e7be5a02df89 | startalkIM/ejabberd | turn_sm.erl | %%%-------------------------------------------------------------------
%%% File : turn_sm.erl
Author : < >
%%% Description : Registers TURN sessions and credentials
Created : 23 Aug 2009 by < >
%%%
%%%
Copyright ( C ) 2002 - 2016 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apache... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/stun/src/turn_sm.erl | erlang | -------------------------------------------------------------------
File : turn_sm.erl
Description : Registers TURN sessions and credentials
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 w... | Author : < >
Created : 23 Aug 2009 by < >
Copyright ( C ) 2002 - 2016 ProcessOne , SARL . 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(turn_sm).
-behaviour(gen_server).
-expor... |
b7f661d56988afd04461ee4e7c72f936ac3a80ddda61e685c77334950728f318 | fiigii/gomoku-CommonLisp | search.lisp | (in-package :cl-user)
(defpackage gomoku.search
(:use :cl
:cl-ppcre)
(:export :nextstep
:restart_board))
(in-package :gomoku.search)
(defparameter *board* (make-array '(15 15) :initial-element 'O))
(defparameter *limitation* 1)
(defparameter *illegal-action* (cons -1 -1))
(declaim (optimize s... | null | https://raw.githubusercontent.com/fiigii/gomoku-CommonLisp/e89af746feb1a51c5e569d7a6befea100391b16b/src/search.lisp | lisp | (in-package :cl-user)
(defpackage gomoku.search
(:use :cl
:cl-ppcre)
(:export :nextstep
:restart_board))
(in-package :gomoku.search)
(defparameter *board* (make-array '(15 15) :initial-element 'O))
(defparameter *limitation* 1)
(defparameter *illegal-action* (cons -1 -1))
(declaim (optimize s... | |
b5fc407d193935d10bfd87d3bdbfeea9223a3623deaa50dde599652aac60bfbf | CrypticButter/snoop | snoop_test.cljc | (ns crypticbutter.snoop-test
{:clj-kondo/config #_:clj-kondo/ignore
'{:linters
{:inline-def
{:level :off}}}}
(:require
[clojure.test :refer [deftest is testing]]
[taoensso.encore :as enc]
[malli.core :as m]
[crypticbutter.snoop :as snoop :refer [>defn =>]]))
(defn throws? [f & args]
(en... | null | https://raw.githubusercontent.com/CrypticButter/snoop/79ba73991b727705bc055128debf64987c7cdd8a/test/crypticbutter/snoop_test.cljc | clojure | unit tests, apparently.
important to keep around whitelisting settings
| (ns crypticbutter.snoop-test
{:clj-kondo/config #_:clj-kondo/ignore
'{:linters
{:inline-def
{:level :off}}}}
(:require
[clojure.test :refer [deftest is testing]]
[taoensso.encore :as enc]
[malli.core :as m]
[crypticbutter.snoop :as snoop :refer [>defn =>]]))
(defn throws? [f & args]
(en... |
f3c2394d23f9e3ee73c2aaa3e28813de2cd4630043c7679f1c66d1e88400d340 | weyrick/roadsend-php | php-mysql.scm | ;; ***** BEGIN LICENSE BLOCK *****
Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , 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 ; either version 2.... | null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/ext/mysql/php-mysql.scm | scheme | ***** BEGIN LICENSE BLOCK *****
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
either version 2.1
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
of the License , or ( at your option ) any later version .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 51 Franklin Street , Fifth... |
e69b8a2dba2c66aa2d2cbeb178818997e6b3332759a458139fcdfa11cafb6079 | potatosalad/erlang-jose | hex.erl | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
%% vim: ts=4 sw=4 ft=erlang noet
%%%-------------------------------------------------------------------
@author < >
2014 - 2022 ,
%%% @doc
%%%
%%% @end
Created : 12 Aug 2015 by < >
%%%---------------------------... | null | https://raw.githubusercontent.com/potatosalad/erlang-jose/dbc4074066080692246afe613345ef6becc2a3fe/test/cavp_SUITE_data/hex.erl | erlang | vim: ts=4 sw=4 ft=erlang noet
-------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
====================================================================
API functions
===================================================... | -*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*-
@author < >
2014 - 2022 ,
Created : 12 Aug 2015 by < >
-module(hex).
-export([bin_to_hex/1]).
-export([hex_to_bin/1]).
-define(HEX_TO_INT(C),
case C of
$0 -> 16#0;
$1 -> 16#1;
$2 -> 16#2;
$3 -> 16#3;
... |
568ec9a37f8daf399525d080e7bae910da9b9087f6f0e0b9acf8270d8b31ec0f | hanshuebner/pixelisp | gallery-and-clock.lisp | (loop
(cl-log:log-message :info "running animations")
(app:start :gallery)
(sleep 45)
(cl-log:log-message :info "running clock")
(app:start :clock)
(sleep 15)
(cl-log:log-message :info "script done"))
| null | https://raw.githubusercontent.com/hanshuebner/pixelisp/f304dfb08130d5a2a7deb68fc4881e720df42a56/scripts/gallery-and-clock.lisp | lisp | (loop
(cl-log:log-message :info "running animations")
(app:start :gallery)
(sleep 45)
(cl-log:log-message :info "running clock")
(app:start :clock)
(sleep 15)
(cl-log:log-message :info "script done"))
| |
1852c0178581c6a4db750dffcec569f8ac97c264ce1572c56e872d33cf04c384 | shop-planner/shop3 | p05.lisp |
(IN-PACKAGE :SHOP-USER)
(DEFPROBLEM STRIPS-SAT-X-1
((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0)
(INSTRUMENT INSTRUMENT1) (INSTRUMENT INSTRUMENT2)
(SATELLITE SATELLITE1) (INSTRUMENT INSTRUMENT3)
(INSTRUMENT INSTRUMENT4) (INSTRUMENT INSTRUMENT5)
(SATELLITE SATELLITE2) (INSTRUMENT INSTRUMENT6)
(INSTRUMENT... | null | https://raw.githubusercontent.com/shop-planner/shop3/ba429cf91a575e88f28b7f0e89065de7b4d666a6/shop3/examples/satellite/strips/p05.lisp | lisp |
(IN-PACKAGE :SHOP-USER)
(DEFPROBLEM STRIPS-SAT-X-1
((SATELLITE SATELLITE0) (INSTRUMENT INSTRUMENT0)
(INSTRUMENT INSTRUMENT1) (INSTRUMENT INSTRUMENT2)
(SATELLITE SATELLITE1) (INSTRUMENT INSTRUMENT3)
(INSTRUMENT INSTRUMENT4) (INSTRUMENT INSTRUMENT5)
(SATELLITE SATELLITE2) (INSTRUMENT INSTRUMENT6)
(INSTRUMENT... | |
ed9ca60c1f1f0f3ab6b9e5adc44c9d942d55d042ff7187916277ded05b6e3626 | irastypain/sicp-on-language-racket | test_exercise_2_30.rkt | #lang racket
(require rackunit
"../../src/chapter02/exercise_2_30.rkt")
(check-equal? (square-tree (list (list 1 2) (list 3 4)))
(list (list 1 4) (list 9 16))
(printf "test#1 2.30 passed\n"))
(check-equal? (square-tree (list (list (list 1 4) 9) (list 16) 25))
(list ... | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/test/chapter02/test_exercise_2_30.rkt | racket | #lang racket
(require rackunit
"../../src/chapter02/exercise_2_30.rkt")
(check-equal? (square-tree (list (list 1 2) (list 3 4)))
(list (list 1 4) (list 9 16))
(printf "test#1 2.30 passed\n"))
(check-equal? (square-tree (list (list (list 1 4) 9) (list 16) 25))
(list ... | |
3a81e8799c2d4be00529edc83ea7d1087d8dde06605de7486199678a780d08f7 | johnstonskj/simple-oauth2 | pkce.rkt | #lang racket/base
;;
simple - oauth2 - oauth2 / client / pkce .
;; Simple OAuth2 client and server implementation
;;
Copyright ( c ) 2019 ( ) .
(provide
(except-out (struct-out pkce) make-pkce)
create-challenge
verifier-char?)
;; ---------- Requirements
(require racket/bool
racket/contract
... | null | https://raw.githubusercontent.com/johnstonskj/simple-oauth2/b8cb40511f64dcb274e17957e6fc9ab4c8a6cbea/client/pkce.rkt | racket |
Simple OAuth2 client and server implementation
---------- Requirements
---------- Implementation
start and end -> (or/c char? natural?)
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
DIGIT = %x30-39
A...Z
a...z
only support 'S256' option, no need for 'plain'
---------- Internal Tests | #lang racket/base
simple - oauth2 - oauth2 / client / pkce .
Copyright ( c ) 2019 ( ) .
(provide
(except-out (struct-out pkce) make-pkce)
create-challenge
verifier-char?)
(require racket/bool
racket/contract
racket/list
racket/random
racket/set
file/sha1
... |
676ce9439fcf93f911b61bf1118516ab1c697cd638d2ee6ce3e599e0dd9d9ac8 | borodust/alien-works | utils.lisp | (cl:in-package :%alien-works.filament)
;;;
;;; BUILDER
;;;
(defun explode-function (signature args)
(let ((name (first signature))
(types (rest signature)))
(when (/= (length types) (length args))
(error "Wrong number of arguments for ~A: required ~A, but got ~A"
name types args))
... | null | https://raw.githubusercontent.com/borodust/alien-works/af1a359c9855199e62db50a5c6a3986c81fbab39/src/graphics/filament/utils.lisp | lisp |
BUILDER
| (cl:in-package :%alien-works.filament)
(defun explode-function (signature args)
(let ((name (first signature))
(types (rest signature)))
(when (/= (length types) (length args))
(error "Wrong number of arguments for ~A: required ~A, but got ~A"
name types args))
`(,name ,@(loop for... |
e1c488166ec6bb8132b4e4bc9c7051fc6091572ce67fb5f1856a31286b5c532d | phadej/cabal-refact | Version.hs | {-# LANGUAGE OverloadedStrings #-}
module Distribution.Refact.Types.Version where
import Prelude ()
import Distribution.Refact.Internal.Prelude
import Distribution.Refact.Tools.Trifecta
import Data.List (foldl')
newtype Version = Version (NonEmpty Word)
deriving (Eq, Show)
versionToText :: Version -> Text
version... | null | https://raw.githubusercontent.com/phadej/cabal-refact/9442736429e498f95dc24866c97be587113206ab/src/Distribution/Refact/Types/Version.hs | haskell | # LANGUAGE OverloadedStrings # | module Distribution.Refact.Types.Version where
import Prelude ()
import Distribution.Refact.Internal.Prelude
import Distribution.Refact.Tools.Trifecta
import Data.List (foldl')
newtype Version = Version (NonEmpty Word)
deriving (Eq, Show)
versionToText :: Version -> Text
versionToText (Version (x :| xs)) = foldl'... |
ef0a383cb897104480e68772502d417f72d7f28fa7127fd8b6f72e498d3cb7a3 | samsergey/formica | arity.rkt | #lang racket/base
;;______________________________________________________________
;; ______
;; ( // _____ ____ . __ __
;; ~//~ ((_)// // / / // ((_ ((_/_
;; (_//
;;..............................................................
;; Provides too... | null | https://raw.githubusercontent.com/samsergey/formica/b4410b4b6da63ecb15b4c25080951a7ba4d90d2c/private/tools/arity.rkt | racket | ______________________________________________________________
______
( // _____ ____ . __ __
~//~ ((_)// // / / // ((_ ((_/_
(_//
..............................................................
Provides tools to work with function arity.
... | #lang racket/base
(require (only-in racket/list argmin argmax)
racket/contract)
(provide
(contract-out
(polyadic? predicate/c)
(variadic? predicate/c)
(fixed-arity? predicate/c)
(nullary? predicate/c)
(unary? predicate/c)
(binary? predicate/c)
(min-arity (-> procedure? (or/c 0 positive?)))
... |
ffe5f65e75c22d0dca85fe965479213d6ab85e4b019909ed2b06e67de4b64658 | dcos/dcos-net | dcos_l4lb_ipvs_mgr.erl | %%%-------------------------------------------------------------------
@author sdhillon
( C ) 2016 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 01 . Nov 2016 7:35 AM
%%%-------------------------------------------------------------------
-module(dcos_l4lb_ipvs_mgr).
-author("sdhillon").
-behaviour(gen_server).
... | null | https://raw.githubusercontent.com/dcos/dcos-net/7bd01ac237ff4b9a12a020ed443e71c45f7063f4/apps/dcos_l4lb/src/dcos_l4lb_ipvs_mgr.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
gen_server callbacks
mask for the fwd methods
local node
tunneling
direct routing
cache bypass
entry created by sync
hashed entry
no output packets
... | @author sdhillon
( C ) 2016 , < COMPANY >
Created : 01 . Nov 2016 7:35 AM
-module(dcos_l4lb_ipvs_mgr).
-author("sdhillon").
-behaviour(gen_server).
-export([start_link/0]).
-export([get_dests/3,
add_dest/8,
mod_dest/8,
remove_dest/7,
get_services/2,
add_service/5,
... |
1e18a8258f04398ec6474bbb37d0b12737ac1526920db2a5899d05b00b73b9ed | agda/agda | Issue2728-3.hs | #!/usr/bin/env runhaskell
# LANGUAGE RecordWildCards #
import System.Directory
import RunAgda
file = "Issue2728-3.agda"
firstCode = unlines
[ "{-# OPTIONS --safe #-}"
, "module Issue2728-3 where"
, "foo = Set -- something to cache"
]
secondCode = fi... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/test/interaction/Issue2728-3.hs | haskell | Create the file.
Edit the file.
Reload. | #!/usr/bin/env runhaskell
# LANGUAGE RecordWildCards #
import System.Directory
import RunAgda
file = "Issue2728-3.agda"
firstCode = unlines
[ "{-# OPTIONS --safe #-}"
, "module Issue2728-3 where"
, "foo = Set -- something to cache"
]
secondCode = fi... |
d2dac7ec835423b88f4257c9076e81e3467bb1cf3f6be34879e802d13038a7ef | aaronc/ClojureClrEx | emit.clj | (ns clojure.clr.emit
(:import
[System.Reflection TypeAttributes PropertyAttributes MethodAttributes FieldAttributes EventAttributes CallingConventions MethodImplAttributes BindingFlags AssemblyName Assembly]
[System.Reflection.Emit TypeBuilder PropertyBuilder MethodBuilder ILGenerator AssemblyBuilder Assembl... | null | https://raw.githubusercontent.com/aaronc/ClojureClrEx/465e05b5872816056544c89b47c1997f6067ae89/src/clojure/clr/emit.clj | clojure | (ns clojure.clr.emit
(:import
[System.Reflection TypeAttributes PropertyAttributes MethodAttributes FieldAttributes EventAttributes CallingConventions MethodImplAttributes BindingFlags AssemblyName Assembly]
[System.Reflection.Emit TypeBuilder PropertyBuilder MethodBuilder ILGenerator AssemblyBuilder Assembl... | |
9253afb017de41bfe78783f9808221325ef28c9c7717372d96ae1da17daadc70 | aarkerio/ZentaurLMS | test_views.cljs | (ns zentaur.reframe.tests.test-views
(:require [goog.dom :as gdom]
[reagent.core :as r]
[re-frame.core :as rf]
[zentaur.reframe.libs.commons :as cms]))
(defn edit-question [{:keys [id question hint explanation qtype points]}]
(let [aquestion (r/atom question)
ahint ... | null | https://raw.githubusercontent.com/aarkerio/ZentaurLMS/adb43fb879b88d6a35f7f556cb225f7930d524f9/src/cljs/zentaur/reframe/tests/test_views.cljs | clojure | esc
editing ends | (ns zentaur.reframe.tests.test-views
(:require [goog.dom :as gdom]
[reagent.core :as r]
[re-frame.core :as rf]
[zentaur.reframe.libs.commons :as cms]))
(defn edit-question [{:keys [id question hint explanation qtype points]}]
(let [aquestion (r/atom question)
ahint ... |
9c0ed697b19db288e6790fc64f0c1e589746cbcbc3937990711936fd1d20c255 | Frechmatz/cl-synthesizer | packages.lisp | (defpackage :cl-synthesizer-modules-mixer
(:use :cl)
(:export :make-module))
| null | https://raw.githubusercontent.com/Frechmatz/cl-synthesizer/4dfc5c804e56cffbba57744b92b2eebc3b514d1e/src/modules/mixer/packages.lisp | lisp | (defpackage :cl-synthesizer-modules-mixer
(:use :cl)
(:export :make-module))
| |
6488a6e920ebc0fc87e997915c265bc867d762d8fae99926a7aa60874f138865 | florentc/youbrick | Actions.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Tui . Actions
Description : Operations triggered from the TUI
Copyright : ( c ) , 2021
License : GPL-3.0 - or - later
Operations with an effect on the state of the database or the TUI that results
from user interactions .
Module : Tui.A... | null | https://raw.githubusercontent.com/florentc/youbrick/0b0dae7c94773df904b9d6c9172d503d65e86281/src/Tui/Actions.hs | haskell | # LANGUAGE OverloadedStrings #
| Report a direct error.
| Report an error related to a job failure (e.g. network error when fetching
new content).
| Clear the text field of the "add channel" widget.
| Add a new channel in a parallel job.
| Update (fetch new content) a channel in a parallel job.
| Update (fetch n... |
|
Module : Tui . Actions
Description : Operations triggered from the TUI
Copyright : ( c ) , 2021
License : GPL-3.0 - or - later
Operations with an effect on the state of the database or the TUI that results
from user interactions .
Module : Tui.Actions
Description : Operations tri... |
b0ea923ff5edb2651a4d20a023c3001af852372e4910a56d8a904c40ea03f044 | elastic/eui-cljs | icon_token_metric_gauge.cljs | (ns eui.icon-token-metric-gauge
(:require ["@elastic/eui/lib/components/icon/assets/tokenMetricGauge.js" :as eui]))
(def tokenMetricGauge eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_token_metric_gauge.cljs | clojure | (ns eui.icon-token-metric-gauge
(:require ["@elastic/eui/lib/components/icon/assets/tokenMetricGauge.js" :as eui]))
(def tokenMetricGauge eui/icon)
| |
06209aef949d3d2131c7be51b9feb32463ab839ba6ee3c928c6ca000871703ed | collaborativetrust/WikiTrust | compute_robust_trust.ml |
Copyright ( c ) 2007 - 2009 The Regents of the University of California
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the ... | null | https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/analysis/compute_robust_trust.ml | ocaml | * The functions in this module are used to compute the trust of the
words of a revision, taking into account the "locality effect" of
the attention of the revisor.
The computation uses a robust method, that includes the consideration
of author signatures.
Produces the new trust array
Produces the ... |
Copyright ( c ) 2007 - 2009 The Regents of the University of California
All rights reserved .
Authors :
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are met :
1 . Redistributions of source code must retain the ... |
285f4461ab96c52873a68d6b21443b5dfe2b5e7d28a94a1320c35da7ce2036eb | aztek/tptp | Text.hs | -- |
-- Module : Data.TPTP.Parse.Text
Description : An attoparsec - based parser for the TPTP language .
Copyright : ( c ) , 2019 - 2021
-- License : GPL-3
Maintainer :
-- Stability : experimental
--
module Data.TPTP.Parse.Text (
* Runners of parsers for TPTP units
parseUnit,
pars... | null | https://raw.githubusercontent.com/aztek/tptp/7b850b5680debcf2f9245a328102c4aadcb6da2c/src/Data/TPTP/Parse/Text.hs | haskell | |
Module : Data.TPTP.Parse.Text
License : GPL-3
Stability : experimental
* Runners of parsers for TSTP inputs
and a monadic action that can supply more input if needed.
| Run a parser for a TPTP input on 'Text'.
| Run a parser for a TPTP input that cannot be resupplied
| Run a parser for a TPTP ... | Description : An attoparsec - based parser for the TPTP language .
Copyright : ( c ) , 2019 - 2021
Maintainer :
module Data.TPTP.Parse.Text (
* Runners of parsers for TPTP units
parseUnit,
parseUnitOnly,
parseUnitWith,
* Runners of parsers for TPTP inputs
parseTPTP,
parseTPTPOnly,
pa... |
f6adf5df833305de8f385a9037f8a567b3cb86d22c5489d2d6cf9674b87ecd59 | Decentralized-Pictures/T4L3NT | test_consensus_filter.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_plugin/test/test_consensus_filter.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
5845e6dccaed0cc464badfe6e74e531d3b071c7504dfaf91e13279cd21a25e73 | ndmitchell/catch | Files.hs |
Figure out which files a command line refers to :
# A Haskell source file
# A Text file , giving one file per line
# A directory of files
Figure out which files a command line refers to:
# A Haskell source file
# A Text file, giving one file per line
# A directory of files
-}
module Files(findFiles) where
... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/catch_1/Files.hs | haskell | file must be in <directory>/givenname.<extension> |
Figure out which files a command line refers to :
# A Haskell source file
# A Text file , giving one file per line
# A directory of files
Figure out which files a command line refers to:
# A Haskell source file
# A Text file, giving one file per line
# A directory of files
-}
module Files(findFiles) where
... |
a3a2b8a0264e9a8b6941c11381c04d6d2775dafa30390412fd00f81b8e780ff6 | iskandr/parakeet-retired | GpuCost.ml | (* pp: -parser o pa_macro.cmo *)
open Base
open SSA
let safeFundefCache : (FnId.t, bool) Hashtbl.t = Hashtbl.create 127
TIME IN MILLISECONDS-- ignore device->device copy costs for now
let rec transfer_time shape t : float =
assume 2 MB / millisecond
let transferRate = 2097152. in
let nbytes = Shap... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Runtime/CostModel/GpuCost.ml | ocaml | pp: -parser o pa_macro.cmo
constants useful for computing adverb costs on the GPU |
open Base
open SSA
let safeFundefCache : (FnId.t, bool) Hashtbl.t = Hashtbl.create 127
TIME IN MILLISECONDS-- ignore device->device copy costs for now
let rec transfer_time shape t : float =
assume 2 MB / millisecond
let transferRate = 2097152. in
let nbytes = Shape.nelts shape * DynType.sizeof t ... |
5a157559f9aeca4db7e1dd2fd3c3df8b612d1b3cbfc3c81e986fb5dc7d239269 | wilkerlucio/oge | network.cljs | (ns com.wsscode.oge.pub.network
(:require [fulcro.client.network :as f.network]))
(defn request-transform [req]
(let [token nil]
(-> req
(cond-> token (assoc-in [:headers "Authorization"] (str "Bearer " token)))
(assoc-in [:headers "Accept"] "application/transit+json"))))
(defn network-error-c... | null | https://raw.githubusercontent.com/wilkerlucio/oge/ef25e1f52ff2d9983714ee3c073534c84c3153c4/src/com/wsscode/oge/pub/network.cljs | clojure | (ns com.wsscode.oge.pub.network
(:require [fulcro.client.network :as f.network]))
(defn request-transform [req]
(let [token nil]
(-> req
(cond-> token (assoc-in [:headers "Authorization"] (str "Bearer " token)))
(assoc-in [:headers "Accept"] "application/transit+json"))))
(defn network-error-c... | |
d3ea413ad47c28a237ca11c6f3db71e06196759b7a2656fa08c6c5705f3a0350 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] hu
[ @ISO639 - 2@ ] hun
[ @ISO639 - 3@ ] hun
[ @Native name@ ] magyar
[ @English name@ ] Hungarian
[@ISO639-1@] hu
[@ISO639-2@] hun
[@ISO639-3@] hun
[@Native name@] magyar
[@English name@] Hungarian
-}
module Text.Numer... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/HUN/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] hu
[ @ISO639 - 2@ ] hun
[ @ISO639 - 3@ ] hun
[ @Native name@ ] magyar
[ @English name@ ] Hungarian
[@ISO639-1@] hu
[@ISO639-2@] hun
[@ISO639-3@] hun
[@Native name@] magyar
[@English name@] Hungarian
-}
module Text.Numer... |
6db032dc9596f45a30c54e5e732dbf16a515d2bae824129889acdbd277528837 | metosin/eines | project.clj | (defproject metosin/eines-client "0.0.10-SNAPSHOT"
:description "Simple clj/cljs library for WebSocket communication"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:plugins [[lein-parent "0.3.2"]]
:parent-project {:path "../../project.clj"
:inherit [:deploy-... | null | https://raw.githubusercontent.com/metosin/eines/e293d0a3b29eb18fb20bdf0c234cd898e7b87ac9/modules/eines-client/project.clj | clojure | (defproject metosin/eines-client "0.0.10-SNAPSHOT"
:description "Simple clj/cljs library for WebSocket communication"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:plugins [[lein-parent "0.3.2"]]
:parent-project {:path "../../project.clj"
:inherit [:deploy-... | |
1c357c8a8c9bc406109beb8cd7d41ab2a19bd29abee45fad4eeb83921e2fb8d6 | puzza007/openpoker | blinds.erl | Copyright ( C ) 2005 Wager Labs , SA
%%%
This file is part of OpenPoker .
%%%
OpenPoker is free software ; you can redistribute it and/or
%%% modify it under the terms of the GNU General Public
License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any l... | null | https://raw.githubusercontent.com/puzza007/openpoker/bbd7158c81ba869f9f04ac7295c9fb7ea099a9d2/src/blinds.erl | erlang |
modify it under the terms of the GNU General Public
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
General Public License for more details.
License along with this ... | Copyright ( C ) 2005 Wager Labs , SA
This file is part of OpenPoker .
OpenPoker is free software ; you can redistribute it and/or
License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Gene... |
7bd03d990db57e102613070ba3edd51451d1781024add22e1ebe9879070c2c4b | shortishly/pgmp | pgmp_pool_connection_sup.erl | Copyright ( c ) 2022 < >
%%
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
distributed under... | null | https://raw.githubusercontent.com/shortishly/pgmp/af2d815d187fde523654a01d0c8b6a77e29815d8/src/pgmp_pool_connection_sup.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 governing permissi... | Copyright ( c ) 2022 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(pgmp_pool_connection_sup).
-behaviour(supervisor).
-export([init/1]).
-export([start_link/1]).
-import(pgmp_sup, [worker/1]).
start_l... |
bd8519b7d3e5cbf8135cbbfacd27eae4e7eca49445b59bc63a1dc7ebb2857bfe | xavierleroy/camlidl | utils.mli | (***********************************************************************)
(* *)
(* CamlIDL *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/xavierleroy/camlidl/b192760875fe6e97b13004bd289720618e12ee22/compiler/utils.mli | ocaml | *********************************************************************
CamlIDL
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
$ I d : utils.mli , v 1.12 2004 - 01 - 09 21:12:12 doligez Exp $
val iprintf : out_channel -> ('a, out_chan... |
b37ebf7e573bd364deb591f6c446fcea5a025e96216d396b8d6a07df17b20a7e | RyanGlScott/text-show-instances | TransSpec.hs | |
Module : Spec . Control . Applicative . TransSpec
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ tests for applicative functor transformers .
Module: Spec.Control.Applicative.Trans... | null | https://raw.githubusercontent.com/RyanGlScott/text-show-instances/a6eed4958b47016105d6a2417471c3e53c8d8b01/tests/Spec/Control/Applicative/TransSpec.hs | haskell | |
Module : Spec . Control . Applicative . TransSpec
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
Portability : GHC
@hspec@ tests for applicative functor transformers .
Module: Spec.Control.Applicative.Trans... | |
c810150666c9659ee7683a0a015424f7cf4a3d1fc7638986ee7172b84f6035a5 | lambdaisland/kaocha | repl_test.clj | (ns kaocha.repl-test
(:require [clojure.test :refer :all]
[kaocha.repl :as repl]
[kaocha.config :as config]))
(deftest config-test
(is (match?
'{:kaocha/tests [{:kaocha.testable/id :foo
:kaocha/test-paths ["test/foo"]}]
:kaocha/reporter [kaocha.repor... | null | https://raw.githubusercontent.com/lambdaisland/kaocha/8e9cf5f17673c5b58784eefe4aac1c5ea62ab127/test/unit/kaocha/repl_test.clj | clojure | (ns kaocha.repl-test
(:require [clojure.test :refer :all]
[kaocha.repl :as repl]
[kaocha.config :as config]))
(deftest config-test
(is (match?
'{:kaocha/tests [{:kaocha.testable/id :foo
:kaocha/test-paths ["test/foo"]}]
:kaocha/reporter [kaocha.repor... | |
5718f7821122d2a3f32095bd55c828860636bacdf826e654e5d41533128c5d61 | bennn/iPoe | bad-syllables.rkt | #lang ipoe/haiku
a line with five words
a line with five words
a line with five words
| null | https://raw.githubusercontent.com/bennn/iPoe/4a988f6537fb738b4fe842c404f9d78f658ab76f/examples/haiku/bad-syllables.rkt | racket | #lang ipoe/haiku
a line with five words
a line with five words
a line with five words
| |
bfb3daf5504a4cc89a7c38993c8d735bb1b33673cdc212e86e8680f250dfe3d7 | Julow/ocaml-java | unwrap.ml | open Parsetree
open Longident
open Asttypes
(** Decode a class declaration node
Raising a location error on syntax error
(see `class_` below) *)
(** Unwrap a method type
Returns the tuple (args core_type list, return core_type) *)
let rec method_type =
function
| [%type: [%t? lhs] -> [%t? rhs]] ->
let args, re... | null | https://raw.githubusercontent.com/Julow/ocaml-java/5387eb7d85b3e1bbab35b7cc2c5a927193e8d299/ppx/unwrap.ml | ocaml | * Decode a class declaration node
Raising a location error on syntax error
(see `class_` below)
* Unwrap a method type
Returns the tuple (args core_type list, return core_type) | open Parsetree
open Longident
open Asttypes
let rec method_type =
function
| [%type: [%t? lhs] -> [%t? rhs]] ->
let args, ret = method_type rhs in
lhs :: args, ret
| t -> [], t
* Unwrap a class field
Returns one of
` Method ( name , java_name , method_type )
` Method_static ..
` Field (... |
a00538afed5689752f45ccf73de807e7c77d64b99128985ef6f7758cecbe1d16 | ds-wizard/engine-backend | SubmissionDAO.hs | module Wizard.Database.DAO.Submission.SubmissionDAO where
import Control.Monad.Reader (asks, liftIO)
import Data.String
import Data.Time
import qualified Data.UUID as U
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToField
import Database.PostgreSQL.Simple.ToRow
import GHC.Int
import Wizard.Data... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Database/DAO/Submission/SubmissionDAO.hs | haskell | module Wizard.Database.DAO.Submission.SubmissionDAO where
import Control.Monad.Reader (asks, liftIO)
import Data.String
import Data.Time
import qualified Data.UUID as U
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToField
import Database.PostgreSQL.Simple.ToRow
import GHC.Int
import Wizard.Data... | |
f78cc9bcdfbee82aebe69d103bc02e39271aba2e9d024160d6730a5578a0c439 | ryzhyk/cocoon | Statement.hs |
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right 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 ... | null | https://raw.githubusercontent.com/ryzhyk/cocoon/409d10b848a4512e7cf653d5b6cf6ecf247eb794/cocoon/Statement.hs | haskell |
Copyrights ( c ) 2016 . Samsung Electronics Ltd. All right 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 ... | |
422aae1c36a674223de765d55434d0b708f10d02b01ffb88b14bf5f11afc8c82 | amnh/PCG | FFI.hs | # LINE 1 " FFI.hsc " #
# LANGUAGE ForeignFunctionInterface , BangPatterns #
# LINE 2 " FFI.hsc " #
module Analysis.Parsimony.Binary.SequentialAlign.FFI where
import System.IO.Unsafe
import Foreign
import Foreign.Ptr
import Foreign.C.String
import Foreign.C.Types
# LINE 12 " FFI.hsc " #
-- Includes a struct (actual... | null | https://raw.githubusercontent.com/amnh/PCG/3a1b6bdde273ed4dc09717623986e1144b006904/prototype/ffi_old_seq_align/Analysis/Parsimony/Binary/SequentialAlign/FFI.hs | haskell | Includes a struct (actually, a pointer thereto), and that struct, in turn, has a string
Because we're using a struct we need to make a Storable instance
----------- Don't need this part, but left in for completion ---------------
--- Will get compiler warning if left out, because of missing instances ----
need to be... | # LINE 1 " FFI.hsc " #
# LANGUAGE ForeignFunctionInterface , BangPatterns #
# LINE 2 " FFI.hsc " #
module Analysis.Parsimony.Binary.SequentialAlign.FFI where
import System.IO.Unsafe
import Foreign
import Foreign.Ptr
import Foreign.C.String
import Foreign.C.Types
# LINE 12 " FFI.hsc " #
in it , so
Modified fr... |
5e91d2d79e45839a531396eb9dbbb01e825dc94edc9d92464cb6d30922f91d71 | mcorbin/tour-of-clojure | let.clj | (ns tourofclojure.pages.let
(:require [hiccup.element :refer [link-to]]
[clojure.java.io :as io]
[tourofclojure.pages.util :refer [navigation-block]]))
(def code
(slurp (io/resource "public/pages/code/let.clj")))
(defn desc
[previous next lang]
(condp = lang
"fr" [:div
[:... | null | https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/src/tourofclojure/pages/let.clj | clojure | (ns tourofclojure.pages.let
(:require [hiccup.element :refer [link-to]]
[clojure.java.io :as io]
[tourofclojure.pages.util :refer [navigation-block]]))
(def code
(slurp (io/resource "public/pages/code/let.clj")))
(defn desc
[previous next lang]
(condp = lang
"fr" [:div
[:... | |
3c196cf8ffc0896737bbacafa7ad2b09f0c4bacf7645da3a1f7b5a7aadbedd9e | pgj/mirage-kfreebsd | pcb.mli |
* Copyright ( c ) 2010 < >
*
* 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 AU... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-net/lib/tcp/pcb.mli | ocaml | Blocking read for a segment
Write a segment |
* Copyright ( c ) 2010 < >
*
* 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 AU... |
d7cfc3075e219c8dfb4da79c80c178e367c96c93ddf38ae4a447b5cc5479ce06 | RefactoringTools/wrangler | utils_guards.erl | @private
@author < >
( C ) 2014 , ,
-module(utils_guards).
-export([guardsSuceed/3, guardsSuceed/4, rules/2, pos_to_node/2, evaluateGuardsExpression/2,get_variable/2,evaluateIsFun/1]).
%% Include files
-include("wrangler.hrl").
guardsSuceed(Arg1, Arg2, Arg3) ->
guardsSuceed(Arg1, Arg2, Arg3,... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/symbolic_evaluation/utils/utils_guards.erl | erlang | Include files | @private
@author < >
( C ) 2014 , ,
-module(utils_guards).
-export([guardsSuceed/3, guardsSuceed/4, rules/2, pos_to_node/2, evaluateGuardsExpression/2,get_variable/2,evaluateIsFun/1]).
-include("wrangler.hrl").
guardsSuceed(Arg1, Arg2, Arg3) ->
guardsSuceed(Arg1, Arg2, Arg3, []).
guardsSuce... |
f84365fa9d26926a65d757a591d33a2f162f09563378167ec21c8ab795f4a53e | mwand/5010-examples | 10-7-callbacks.rkt | #lang racket
10 - 7 - callbacks : instead of registering ' this ' , the ball registers a
;; function to be called when it is notified. So we don't need a dedicated
;; update-pos method
(require rackunit)
(require 2htdp/universe)
(require 2htdp/image)
(require "extras.rkt")
start with ( run framerate ) . Typi... | null | https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/10-7-callbacks.rkt | racket | function to be called when it is notified. So we don't need a dedicated
update-pos method
CONSTANTS
Data Definitions
A Widget is an object whose class implements Widget<%>
INTERFACES
-> Void
GIVEN: no arguments
EFFECT: updates this world to its state after a tick
Integer Integer MouseEvent-> Void
GIVEN: ... | #lang racket
10 - 7 - callbacks : instead of registering ' this ' , the ball registers a
(require rackunit)
(require 2htdp/universe)
(require 2htdp/image)
(require "extras.rkt")
start with ( run framerate ) . Typically : ( run 0.25 )
(define CANVAS-WIDTH 400)
(define CANVAS-HEIGHT 300)
(define EMPTY-CANVA... |
321ef10e836f47abaa1cdb591987a541a9e9438bebfcd0de114876a41414b853 | nuvla/api-server | configuration_template_session_oidc.cljc | (ns sixsq.nuvla.server.resources.spec.configuration-template-session-oidc
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.configuration-template :as ps]
[sixsq.nuvla.server.resources.spec.core :as cimi-core]
[sixsq.nuvla.server.util.spec :as su]
[spec-tools.core :as st]))
... | null | https://raw.githubusercontent.com/nuvla/api-server/561b423c186ef7972aadc349ec270c2201a75b06/code/src/sixsq/nuvla/server/resources/spec/configuration_template_session_oidc.cljc | clojure | deprecated
allows jwk JSON representation
deprecated
Defines the contents of the OIDC authentication configuration-template resource itself.
Defines the contents of the OIDC authentication template used in a create resource. | (ns sixsq.nuvla.server.resources.spec.configuration-template-session-oidc
(:require
[clojure.spec.alpha :as s]
[sixsq.nuvla.server.resources.spec.configuration-template :as ps]
[sixsq.nuvla.server.resources.spec.core :as cimi-core]
[sixsq.nuvla.server.util.spec :as su]
[spec-tools.core :as st]))
... |
60fa4dc5ef87da0c37c6f1cac0335a4dce4195706af2d40ffdebef4d6026d3d1 | tommaisey/aeon | k2a.help.scm | (hear (k2a (mul (white-noise kr) 0.3)))
(hear (mce2 (k2a (mul (white-noise kr) 0.3))
(mul (white-noise ar) 0.3)))
(hear
(let* ((block-size (fdiv sample-rate control-rate))
(freq (mul (fdiv (mouse-x kr 0.1 40 1 0.1) block-size) sample-rate)))
(mul (mce2 (k2a (lf-noise0 kr freq))
(... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/controls/k2a.help.scm | scheme | (hear (k2a (mul (white-noise kr) 0.3)))
(hear (mce2 (k2a (mul (white-noise kr) 0.3))
(mul (white-noise ar) 0.3)))
(hear
(let* ((block-size (fdiv sample-rate control-rate))
(freq (mul (fdiv (mouse-x kr 0.1 40 1 0.1) block-size) sample-rate)))
(mul (mce2 (k2a (lf-noise0 kr freq))
(... | |
6d7936feaf45339d0c0206abb3ca9cd74afb6643934fb3f6142c2a4b573a1609 | backtracking/mlpost | spline_lib.mli | (**************************************************************************)
(* *)
Copyright ( C ) Johannes Kanig ,
, and
(* *)
(* This software is f... | null | https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/src/spline_lib.mli | ocaml | ************************************************************************
This software is free software; you can redistribute it and/or
described in file LICENSE.... | Copyright ( C ) Johannes Kanig ,
, and
modify it under the terms of the GNU Library General Public
License version 2.1 , with the special exception on linking
type point = Point_lib.t
type abscissa = Spline.abscissa
type path_ = { pl : Spline.t list; cycle : b... |
37b65f9f3a2468c0bb8a86fdc260e1e99e24f32f4c18992b1a896a9fd8889ca0 | realworldocaml/examples | follow_on_function.ml | let concat_and_print x y =
let v = x ^ y in
print_endline v;
v;
let add_and_print x y =
let v = x + y in
print_endline (string_of_int v);
v
let () =
let _x = add_and_print 1 2 in
let _y = concat_and_print "a" "b" in
()
| null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/front-end/follow_on_function.ml | ocaml | let concat_and_print x y =
let v = x ^ y in
print_endline v;
v;
let add_and_print x y =
let v = x + y in
print_endline (string_of_int v);
v
let () =
let _x = add_and_print 1 2 in
let _y = concat_and_print "a" "b" in
()
| |
dbf274d571b9e88bf9f45835fad201c6440a3f21e075ce305e86a7fe2b4b3a51 | seandepagnier/cruisingplot | sensor.scm | Copyright ( C ) 2010 < >
;;
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 file handles storing v... | null | https://raw.githubusercontent.com/seandepagnier/cruisingplot/d3d83e7372e2c5ce1a8e8071286e30c2028088cf/sensor.scm | scheme |
you can redistribute it and/or
modify it under the terms of the GNU General Public
either
This file handles storing values (primarily from sensors)
values can be installed, queried, and callbacks can be installed as well
this should work even across a network
do we have all these sensors?
a key is a list of (... | Copyright ( C ) 2010 < >
version 3 of the License , or ( at your option ) any later version .
(declare (unit sensor))
(use srfi-69)
(define sensor-log-ports '())
(define (sensor-log-to-port port)
(set! sensor-log-ports (cons port sensor-log-ports)))
(define (sensor-log-to-file filename)
(sensor-log-to... |
698f45233d190b12e94c8fd44b659a1dbbb2869ec9a95371298bc7cbc45c2041 | alyssa-p-hacker/SchemeBBS | patch-runtime_http-syntax.scm | diff -ur mit-scheme-9.2.orig/src/runtime/http-syntax.scm mit-scheme-9.2/src/runtime/http-syntax.scm
--- mit-scheme-9.2/src/runtime/http-syntax.scm.orig 2014-05-17 11:10:05.000000000 +0200
+++ mit-scheme-9.2/src/runtime/http-syntax.scm 2018-10-20 22:46:44.098379331 +0200
@@ -1310,8 +1310,13 @@
write-entity-tag)
(... | null | https://raw.githubusercontent.com/alyssa-p-hacker/SchemeBBS/7a5506e7fad22472e1e94671b4fabfce6432199a/patch-runtime_http-syntax.scm | scheme | diff -ur mit-scheme-9.2.orig/src/runtime/http-syntax.scm mit-scheme-9.2/src/runtime/http-syntax.scm
--- mit-scheme-9.2/src/runtime/http-syntax.scm.orig 2014-05-17 11:10:05.000000000 +0200
+++ mit-scheme-9.2/src/runtime/http-syntax.scm 2018-10-20 22:46:44.098379331 +0200
@@ -1310,8 +1310,13 @@
write-entity-tag)
(... | |
d3f5197128edc0d81e4c1102c502041fe43f33ab8e3ba050760b80574c8e9d3c | input-output-hk/marlowe-cardano | MList.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
License : Apache 2.0
--
-- Stability : Experimental
Portability : Portable
--
| Compare the ` PlutusTx . AssocMap ` to 's ` MList ` .
--
--------------------------------------------------------... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/16a56284a9d53c71d4673abdb70fb5d97f1bbd69/marlowe-test/src/Spec/Marlowe/Plutus/MList.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
---------------------------------------------------------------------------
* Testing
@
"empty = Nil"
@
@
"insert a b Nil = Cons (a, b) Nil" |
"insert a b (Cons (x, y) z) ... | License : Apache 2.0
Portability : Portable
| Compare the ` PlutusTx . AssocMap ` to 's ` MList ` .
module Spec.Marlowe.Plutus.MList
tests
) where
import Data.Function (on)
import Data.List (nubBy, sortBy)
import Data.Maybe (fromMaybe, isJust)
import Prelude hiding (lookup)
import Test.Tasty (... |
32e95e9a18e2987f54e2f5ef9176ba230cfef217f453452d0caddd274d990534 | sharplispers/linedit | command-functions.lisp | Copyright ( c ) 2003 , 2004 , 2012 Nikodemus Siivola ,
;;;;
;;;; Permission is hereby granted, free of charge, to any person obtaining
;;;; a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
;;;; without limitation the rights to... | null | https://raw.githubusercontent.com/sharplispers/linedit/0561c97dfca2f5854fcc66558a567a9875ddcb8f/command-functions.lisp | lisp |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be included
EXPRESS OR ... | Copyright ( c ) 2003 , 2004 , 2012 Nikodemus Siivola ,
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
in all copies or substantial portions o... |
3ed9d8c73cb919d9c20a34f02cfb6caa330684348f3eb5a0d423066d4cb4ff52 | fredfeng/CS162 | ast.ml | (** Binary operators *)
type binop = Add | Sub | Mul | Gt | Lt | And | Or | Eq
(** Types *)
type typ =
| TInt
| TFun of typ * typ
| TList of typ
(** AST of Lambda+ expressions *)
type expr =
| NumLit of int
| Var of string
| Binop of expr * binop * expr
| IfThenElse of expr * expr * expr
| LetBind... | null | https://raw.githubusercontent.com/fredfeng/CS162/65bd324dc8a8c1406ee45548780ca417e35d35e3/homework/hw6/ast.ml | ocaml | * Binary operators
* Types
* AST of Lambda+ expressions
* Pretty print binop as string
* Pretty print expr as string
* Returns true iff the given expr is a value | type binop = Add | Sub | Mul | Gt | Lt | And | Or | Eq
type typ =
| TInt
| TFun of typ * typ
| TList of typ
type expr =
| NumLit of int
| Var of string
| Binop of expr * binop * expr
| IfThenElse of expr * expr * expr
| LetBind of string * typ option * expr * expr
| Lambda of string * typ option... |
4318dc4dabfa48a9e3393f29fd0d03c185bf0b6c482ce6b656ca717c2c3ef46c | arachne-framework/valuehash | api_test.clj | (ns valuehash.api-test
(:require [clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defspec]]
[valuehash.api :as api]
))
(defprotocol Perturbable
"A value that can be converted to a value of a dif... | null | https://raw.githubusercontent.com/arachne-framework/valuehash/ff1d4b7f1260daf41c786a61cb45d02871b7baf9/test/valuehash/api_test.clj | clojure | (ns valuehash.api-test
(:require [clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defspec]]
[valuehash.api :as api]
))
(defprotocol Perturbable
"A value that can be converted to a value of a dif... | |
ec08e600038a5b51345cdc7fe8a41af4da1b984a2ccfb0332a03571829aefb4b | c-cube/ocaml-containers | containers_testlib.mli | type 'a eq = 'a -> 'a -> bool
type 'a print = 'a -> string
module Test : sig
type t
end
module type S = sig
module Q = QCheck
val t : ?name:string -> (unit -> bool) -> unit
val eq : ?name:string -> ?cmp:'a eq -> ?printer:'a print -> 'a -> 'a -> unit
val q :
?name:string ->
?count:int ->
?long_... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/484aa3a1e75e29b3576f8b0fc7ea6073f3021e6e/src/testlib/containers_testlib.mli | ocaml | type 'a eq = 'a -> 'a -> bool
type 'a print = 'a -> string
module Test : sig
type t
end
module type S = sig
module Q = QCheck
val t : ?name:string -> (unit -> bool) -> unit
val eq : ?name:string -> ?cmp:'a eq -> ?printer:'a print -> 'a -> 'a -> unit
val q :
?name:string ->
?count:int ->
?long_... | |
2aee4b61022bfe027e9be9e1cacc4768a89ef355a9ce65fd85ae54d44db2f915 | fpco/ide-backend | Text.hs | -----------------------------------------------------------------------------
-- |
-- Module : Distribution.Text
Copyright : 2007
--
-- Maintainer :
-- Portability : portable
--
-- This defines a 'Text' class which is a bit like the 'Read' and 'Show'
-- classes. The difference is that is uses a moder... | null | https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend/TestSuite/inputs/Cabal-1.18.1.5/Distribution/Text.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Text
Maintainer :
Portability : portable
This defines a 'Text' class which is a bit like the 'Read' and 'Show'
classes. The difference is that is uses a modern pretty printer and parser
--------------... | Copyright : 2007
system and the format is not expected to be concrete syntax but
rather the external human readable representation used by Cabal .
module Distribution.Text (
Text(..),
display,
simpleParse,
) where
import qualified Distribution.Compat.ReadP as Parse
import qualified Text.PrettyPri... |
354154e3447a5fb28c6619745cfc3919190e66d18059f7b3d55d33fd9337841b | dgiot/dgiot_dlink | dgiot_dlink_app.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_dlink/3c6fae502d53ad73488b0203d20286cdfc2df163/src/dgiot_dlink_app.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_dlink_app).
-emqx_plugin(auth).
-behaviour(application).
-export([start/2,
... |
28a547346192ff2c1044bdc78d42bdc60eba1ea94d97ff50d3769cf38e1f648b | erlang/otp | diameter_codec_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2010 - 2022 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/erlang/otp/c4d2c952fec0c4ab4ac7ff34c1a153e740fac9a6/lib/diameter/test/diameter_codec_SUITE.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2010 - 2022 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
requirement of one function per testcase .
-module(diameter_codec_SUITE).
-export([run/0,
run/1]).
-ex... |
df34a4ca82615147711a5b6ed938a3a7a104c4ef13cb44fa0c8ed1e0de99aedf | CorticalComputer/Book_NeuroevolutionThroughErlang | morphology.erl | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
%%
Copyright ( C ) 2012 by , DXNN Research Group ,
%All rights reserved.
%
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th... | null | https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_19/morphology.erl | erlang |
All rights reserved.
Get Init Standard Actuators/Sensors %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Get Init Substrate_CPPs/Substrate_CEPs %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{cartesian,Dimensions*2+3},
{centripital_distances,2+3},
{cart... | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
Copyright ( C ) 2012 by , DXNN Research Group ,
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use .
-module(m... |
2e38fc104ebe581f7959e87a2d57dab7273d49be6721461f09b285060fbae6df | haskell-servant/servant | HasClient.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE PolyKinds #
# LANGUAGE QuantifiedCon... | null | https://raw.githubusercontent.com/haskell-servant/servant/ea87e9780847561ad7c082165a1c8b89ea830a32/servant-client-core/src/Servant/Client/Core/HasClient.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
* Accessing APIs as a Client
GET /books
> :<|> "books" :> ReqBody '[JSON] Book :> Post '[JSON] Boo... | # LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE PolyKinds #
# LANGUAGE QuantifiedConstraints #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances ... |
78771f503618a328edd697da34baf59fbf0cc60bc2ccc8a4bbb2240af4461b25 | footprintanalytics/footprint-web | util.clj | (ns metabase.test.mock.util)
(def table-defaults
{:description nil
:entity_type nil
:caveats nil
:points_of_interest nil
:show_in_getting_started false
:schema nil
:fields []
:rows nil
:updated_a... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/test/mock/util.clj | clojure | (ns metabase.test.mock.util)
(def table-defaults
{:description nil
:entity_type nil
:caveats nil
:points_of_interest nil
:show_in_getting_started false
:schema nil
:fields []
:rows nil
:updated_a... | |
6b8bd1edabc21f0d68c4d1accb642515f4164562a48bf848f3334f20e396e0db | etnt/polish | polish_common.erl | @author
YYYY Torbjorn Tornkvist .
-module(polish_common).
-include("polish.hrl").
-export([header/1
, footer/0
, right/0
, left/0
]).
-import(polish, [all_custom_lcs/0, l2a/1]).
right() ->
#panel { class=menu, body=["RIGHT"] }.
left() ->
#panel { class=menu, bo... | null | https://raw.githubusercontent.com/etnt/polish/857f6adeca7ae205f5b5d5f8c9b59fd5fe5d95b4/src/polish_common.erl | erlang | @author
YYYY Torbjorn Tornkvist .
-module(polish_common).
-include("polish.hrl").
-export([header/1
, footer/0
, right/0
, left/0
]).
-import(polish, [all_custom_lcs/0, l2a/1]).
right() ->
#panel { class=menu, body=["RIGHT"] }.
left() ->
#panel { class=menu, bo... | |
95291b3456c3e879592d1b2eb12b9cb49d275de81d63f48f43b7ed48a9398a03 | jarohen/phoenix | loader.clj | (ns phoenix.loader
(:require [phoenix.location :as l]
[phoenix.merge :refer [deep-merge]]
[phoenix.references :as pr]
[clojure.tools.logging :as log]
[clojure.tools.reader.edn :as edn]))
(defn try-slurp [slurpable]
(try
(slurp slurpable)
(catch Exception e
... | null | https://raw.githubusercontent.com/jarohen/phoenix/f828bf144154f110f0a73f54645f5696e2c8bdab/runtime/src/phoenix/loader.clj | clojure | (ns phoenix.loader
(:require [phoenix.location :as l]
[phoenix.merge :refer [deep-merge]]
[phoenix.references :as pr]
[clojure.tools.logging :as log]
[clojure.tools.reader.edn :as edn]))
(defn try-slurp [slurpable]
(try
(slurp slurpable)
(catch Exception e
... | |
03ee21cd41aad4e0aa61216c505fb1f65f4adbe1508d43ddbe355b08e9aff24f | thicksteadTHpp/Obvius | types-tutorial.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; File: types-tutorial.lisp
Author :
;;; Description: Introduction to LISP and its data types
Creation Date : 6/93
;;; ----------------------------------------------------------------
Object - Based Vision and Image Unders... | null | https://raw.githubusercontent.com/thicksteadTHpp/Obvius/9a91673609def033539c9ebaf098e8f11eb0df6e/tutorials/lisp/types-tutorial.lisp | lisp |
File: types-tutorial.lisp
Description: Introduction to LISP and its data types
----------------------------------------------------------------
LISP is most commonly known for its lists but it also has
a rich variety of data types which includes complex numbers,
multidimensional arrays, strings and hash tabl... | Author :
Creation Date : 6/93
Object - Based Vision and Image Understanding System ( OBVIUS ) ,
Copyright 1988 , Vision Science Group , Media Laboratory ,
Massachusetts Institute of Technology .
form is the INTEGER . After performing a division , LISP attempts to
maintain ... |
831a668b6d1a25fea281dae0ec2c87f2b64a702967e23726ad78cfd529457145 | metosin/malli | generator.cljc | (ns malli.experimental.time.generator
(:require [clojure.test.check.generators :as gen]
[clojure.spec.gen.alpha :as ga]
[malli.core :as m]
[malli.generator :as mg]
#?(:clj [malli.experimental.time :as time]
:cljs [malli.experimental.time :as time
... | null | https://raw.githubusercontent.com/metosin/malli/372ad8119300d1ed054a383e184c431b8494c697/src/malli/experimental/time/generator.cljc | clojure | (ns malli.experimental.time.generator
(:require [clojure.test.check.generators :as gen]
[clojure.spec.gen.alpha :as ga]
[malli.core :as m]
[malli.generator :as mg]
#?(:clj [malli.experimental.time :as time]
:cljs [malli.experimental.time :as time
... | |
8f5b5120280214a2c60b34a7b802c9fcabdd37c960b4c799d61b9a0912c4ccba | mmottl/gsl-ocaml | poly.ml | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
let () = Error.init ()
open Gsl_complex
type poly = float array
external eval : poly -> float -> float
= "ml_gsl_poly_eval"
... | null | https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/poly.ml | ocaml | gsl - ocaml - OCaml interface to GSL
Copyright ( © ) 2002 - 2012 - Olivier Andrieu
Distributed under the terms of the GPL version 3
let () = Error.init ()
open Gsl_complex
type poly = float array
external eval : poly -> float -> float
= "ml_gsl_poly_eval"
... | |
1d6f6cfb7d1fdef7221b9da021aca2a6c65ff1a6808eebcb758b1957f3ea0d31 | MinaProtocol/mina | deferred.mli | open Core_kernel
open Async_kernel
include module type of Deferred with module Result := Deferred.Result
module List : sig
include module type of Deferred.List
end
module Result : sig
include module type of Deferred.Result
module List : sig
val fold :
'a list
-> init:'b
-> f:('b -> 'a... | null | https://raw.githubusercontent.com/MinaProtocol/mina/57e2ea1b87fe1a24517e1c62f51cc59fe9bc87cd/src/lib/mina_stdlib/deferred.mli | ocaml | open Core_kernel
open Async_kernel
include module type of Deferred with module Result := Deferred.Result
module List : sig
include module type of Deferred.List
end
module Result : sig
include module type of Deferred.Result
module List : sig
val fold :
'a list
-> init:'b
-> f:('b -> 'a... | |
4eaf7fa8022ba7836b8b8338363f130282b7e99f727f0602cd4c6f21862ef463 | naoiwata/sicp | ex3.23.scm | ;;
;; @author naoiwata
SICP Chapter3
Exercise 3.23 .
;;
; queue
(define (make-queue)
(cons '() '()))
(define (empty-queue? queue)
(null? (front-ptr queue)))
(define (front-queue queue)
(if (empty-queue? queue)
(error "no queue")
(value-node (front-ptr queue))))
(define (rear-queue queue)
(if (e... | null | https://raw.githubusercontent.com/naoiwata/sicp/7314136c5892de402015acfe4b9148a3558b1211/chapter3/ex3.23.scm | scheme |
@author naoiwata
queue
ptr
node
insert
delete
display
test
empty queue
(a)
(a b)
(b)
(c)
END | SICP Chapter3
Exercise 3.23 .
(define (make-queue)
(cons '() '()))
(define (empty-queue? queue)
(null? (front-ptr queue)))
(define (front-queue queue)
(if (empty-queue? queue)
(error "no queue")
(value-node (front-ptr queue))))
(define (rear-queue queue)
(if (empty-queue? queue)
(error "n... |
3b8955f7154456571b53065fb6ac620f6840b0acf81610f13913ea454df0e784 | haskell-tls/hs-certificate | Fingerprint.hs | -- |
-- Module : Data.X509.Validation.Fingerprint
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : unknown
--
# LANGUAGE GeneralizedNewtypeDeriving #
module Data.X509.Validation.Fingerprint
( Fingerprint(..)
, getFingerprint
) where
import Crypto.Hash
i... | null | https://raw.githubusercontent.com/haskell-tls/hs-certificate/4a0a2ce292ea46c0c5f72e1d31eca2001079cdd2/x509-validation/Data/X509/Validation/Fingerprint.hs | haskell | |
Module : Data.X509.Validation.Fingerprint
License : BSD-style
Stability : experimental
Portability : unknown
| Fingerprint of a certificate
| Get the fingerprint of the whole signed object
using the hashing algorithm specified
^ object to fingerprint
^ algorithm to compute the fingerprint
^ fin... | Maintainer : < >
# LANGUAGE GeneralizedNewtypeDeriving #
module Data.X509.Validation.Fingerprint
( Fingerprint(..)
, getFingerprint
) where
import Crypto.Hash
import Data.X509
import Data.ASN1.Types
import Data.ByteArray (convert, ByteArrayAccess)
import Data.ByteString (ByteString)
newtype Fingerp... |
e7bca43e9de6ff5722493942b58e9ef0874b44dee495662ee6a70c149d60beb9 | jackfirth/lens | flatten.rkt | #lang racket/base
(provide append*-lens flatten/depth-lens flatten/depth unflatten/depth)
(require fancy-app lens/common racket/list racket/match)
(module+ test
(require rackunit syntax/parse lens/private/test-util/test-lens))
( define - type ( * A n )
( cond [ ( zero ? n ) A ]
[ else ( * ( A )... | null | https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-data/lens/private/list/flatten.rkt | racket | where the only valid views are lists with the same length as the
result of (flatten/depth n target)
where the only valid views are lists with the same length as the
result of applying append* to the target.
Viewing is equivalent to using append*
Setting restores the structure of the original nested list
argumen... | #lang racket/base
(provide append*-lens flatten/depth-lens flatten/depth unflatten/depth)
(require fancy-app lens/common racket/list racket/match)
(module+ test
(require rackunit syntax/parse lens/private/test-util/test-lens))
( define - type ( * A n )
( cond [ ( zero ? n ) A ]
[ else ( * ( A )... |
349c2b8a955e0103cf2807dfff08c93c3c609d703a0a7fe8406275dd5d8eccbd | mikeplus64/plissken | OBJ.hs | {-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -funbox-strict-fields #-}
module OBJ
( OBJ, ObjCommand(..)
, readObj) where
import qualified Data.Attoparsec as A
import Data.Attoparsec.Char8
import qualified Data.ByteString.Char8 as B
import Data.ByteString.Char8 (ByteString)
import Control.Applicative
imp... | null | https://raw.githubusercontent.com/mikeplus64/plissken/e872db14c2e6d0df9379f81aaeaa448ca1ade6fd/src/OBJ.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS_GHC -funbox-strict-fields #
| See
This type implements a single line of an obj file.
Not defined in the 'Types' module because this type only matters here.
| Farse a floating point number.
| Farse something seperated by spaces.
parse multiple vertex indices, vertex indic... | module OBJ
( OBJ, ObjCommand(..)
, readObj) where
import qualified Data.Attoparsec as A
import Data.Attoparsec.Char8
import qualified Data.ByteString.Char8 as B
import Data.ByteString.Char8 (ByteString)
import Control.Applicative
import Geometry (F,I,I2,I3)
data ObjCommand
= Comment !ByteString
| MT... |
fe742a1d58bf8584e59e4078e3803fff6d2771abdcf5c24074e1f7914e3e4e04 | phillord/identitas | core.clj | (ns identitas.core
(:require [identitas.proquint :as p]
[identitas.damm :as d]))
(def ^{:private true} max-val-by-10
(unchecked-divide-int
Integer/MAX_VALUE 10))
(def ^{:private true} min-val-by-10
(* -1
(unchecked-divide-int
Integer/MAX_VALUE 10)))
(defn random-damm-proint
"Returns a ran... | null | https://raw.githubusercontent.com/phillord/identitas/b1e9dc7883eaacc53feab46259bf24a5599cb7ad/src/identitas/core.clj | clojure | (ns identitas.core
(:require [identitas.proquint :as p]
[identitas.damm :as d]))
(def ^{:private true} max-val-by-10
(unchecked-divide-int
Integer/MAX_VALUE 10))
(def ^{:private true} min-val-by-10
(* -1
(unchecked-divide-int
Integer/MAX_VALUE 10)))
(defn random-damm-proint
"Returns a ran... | |
9f5f4249834907ad078bd70cadb4c9ca1ab83c29a97930eae9e3b5012b119232 | elektronaut/advent-of-code | day07.clj | (ns advent-of-code.2022.07
(:require [clojure.string :as str]))
(defn parse-command [string]
(let* [lines (str/split-lines string)
command (str/split (first lines) #" ")
name (first command)
arg (str/join " " (rest command))
output (drop 1 lines)]
{:name name :arg arg :outpu... | null | https://raw.githubusercontent.com/elektronaut/advent-of-code/a8bb7bbadc8167ebb1df0d532493317705bb7f0d/2022/day07/day07.clj | clojure | (ns advent-of-code.2022.07
(:require [clojure.string :as str]))
(defn parse-command [string]
(let* [lines (str/split-lines string)
command (str/split (first lines) #" ")
name (first command)
arg (str/join " " (rest command))
output (drop 1 lines)]
{:name name :arg arg :outpu... | |
ac3a2ba6ffcdc6d492c9ffcab89d7b663401e64fe13c919dd7a6d490dba240de | ghc/packages-directory | MakeAbsolute.hs | # LANGUAGE CPP #
module MakeAbsolute where
#include "util.inl"
import System.FilePath ((</>), addTrailingPathSeparator,
dropTrailingPathSeparator, normalise)
#if defined(mingw32_HOST_OS)
import System.FilePath (takeDrive)
#endif
main :: TestEnv -> IO ()
main _t = do
dot <- makeAbsolute ""
d... | null | https://raw.githubusercontent.com/ghc/packages-directory/75165a9d69bebba96e0e3a1e519ab481d1362dd2/tests/MakeAbsolute.hs | haskell | # LANGUAGE CPP #
module MakeAbsolute where
#include "util.inl"
import System.FilePath ((</>), addTrailingPathSeparator,
dropTrailingPathSeparator, normalise)
#if defined(mingw32_HOST_OS)
import System.FilePath (takeDrive)
#endif
main :: TestEnv -> IO ()
main _t = do
dot <- makeAbsolute ""
d... | |
0df079fe4cb5298e6b8297ba538e90f923cdc162219e850a494dbb43bc4f3e11 | fp-works/2019-winter-Haskell-school | Exercise01.hs | # OPTIONS_GHC -fno - warn - orphans #
module CIS194.Homework08.Exercise01 (glCons, moreFun) where
import CIS194.Homework08.Employee (Employee(..), GuestList(..))
instance Semigroup GuestList where
(GL gs1 f1) <> (GL gs2 f2) = GL (gs1 ++ gs2) (f1 + f2)
instance Monoid GuestList where
mempty = GL [] 0
Adds an ... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week8/daniel-deng/src/Exercise01.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module CIS194.Homework08.Exercise01 (glCons, moreFun) where
import CIS194.Homework08.Employee (Employee(..), GuestList(..))
instance Semigroup GuestList where
(GL gs1 f1) <> (GL gs2 f2) = GL (gs1 ++ gs2) (f1 + f2)
instance Monoid GuestList where
mempty = GL [] 0
Adds an ... | |
996af167974993f060de02a13a73fc81091148b6867e248c668051daa921ef42 | unisonweb/unison | Completion.hs | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
module Unison.LSP.Completion where
import Control.Comonad.Cofree
import Control.Lens hiding (List, (:<))
import Control.Monad.Reader
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Types as Aeson
impor... | null | https://raw.githubusercontent.com/unisonweb/unison/59acc0cbe429492a99bfebf2b783fc2fa3967f75/unison-cli/src/Unison/LSP/Completion.hs | haskell | Takes at most the specified number of completions, but also indicates with a boolean
whether there were more completions remaining so we can pass that along to the client.
We should generally show the longer of the path or suffixified name in the label,
it helps the user understand the difference between options wh... | # LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
module Unison.LSP.Completion where
import Control.Comonad.Cofree
import Control.Lens hiding (List, (:<))
import Control.Monad.Reader
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Types as Aeson
impor... |
051d6536d740d22a328aea1c6cbb3c99d02e94b40561fa6311226dd0dc6a3a9e | facebook/flow | resizableArray.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/common/utils/resizableArray.mli | ocaml | An array that automatically expands when needed
`set arr i x` raises `Out_of_bounds_set` if `i >= ResizableArray.size arr`, or if `i < 0`
Expands the underlying array if necessary
Shrinks the representation to match the number of elements stored
Returns None if the index is out of bounds.
Exposed only for wh... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
754da2f6e052d55294129c214cb8d01b7fa76e1d942d3d9f2caa9136ecb903cc | steshaw/PLAR | decidable.ml | (* ========================================================================= *)
Special procedures for decidable subsets of first order logic .
(* *)
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
(* ===... | null | https://raw.githubusercontent.com/steshaw/PLAR/c143b097d1028963f4c1d24f45a1a56c8b65b838/decidable.ml | ocaml | =========================================================================
=========================================================================
-------------------------------------------------------------------------
Resolution does... | Special procedures for decidable subsets of first order logic .
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
* *
< < forall x. ) > > ; ;
tab < < forall x. ) > > ; ;
* *
meson <<forall x. p(x)>>;;
tab <<forall x. p(x)>>;;
***)
* *
resolution < < forall x. ) >... |
7280b4f0fac76ecb545322fc553c742d62ffe3554b2c5480f99772e15978b430 | bhaskara/programmable-reinforcement-learning | alisp-log.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; alisp/log/alisp-log.lisp
;; Log all observations to a stream
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package alisp)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/alisp/obs/alisp-log.lisp | lisp |
alisp/log/alisp-log.lisp
Log all observations to a stream
class def
definition macro
methods overridden from <alisp-observer>
|
(in-package alisp)
(defclass <alisp-log> (<alisp-observer>)
((output-stream
:type stream
:reader str
:initarg :str))
(:documentation "Class <alisp-log>. Has a single required initialization argument :str for the output stream. Implements all the methods from <learning-algorithm>, and i... |
f5ea66e2538e1746fc607f1e3ddc4c23874160633c33caa563afc642ad010d1f | ocaml/num | nat.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
, ... | null | https://raw.githubusercontent.com/ocaml/num/bdfee8067bfd78cf79cb8910c45cccfe2b061680/src/nat.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Int_misc
type nat;;
external create_nat: int -> nat = "create_nat"
external set_to_zero_nat: nat -> int -> i... |
0698618e111647a25c2a8f0b6aefe608d8646c3242f24c347b6079c846e7e0b3 | funcool/dost | stream.cljs | Copyright 2016 < >
;;
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
distributed under the... | null | https://raw.githubusercontent.com/funcool/dost/e68a23ff7d99892d3f2d7bc6fe733bd74d1743a3/src/dost/core/stream.cljs | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2016 < >
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dost.core.stream
(:require [cljs.nodejs :as node]))
(def stream (node/require "stream"))
(def Stream (.-Stream stream))
(def Readable (.-Readable s... |
61ed6d5936ec0d343bb45be47ddc4c63704846c1f25f133f1cf898bb57d82883 | haskell/haskell-language-server | MetaLetSimple.expected.hs | test :: Int
test
= let
a = _w0
b = _w1
c = _w2
in _w3
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/MetaLetSimple.expected.hs | haskell | test :: Int
test
= let
a = _w0
b = _w1
c = _w2
in _w3
| |
8f4219eaafb9345cac55b9479e4364ab105bfdeed0d138e16245e4eb6790e798 | Heasummn/Crab-ML | CrabCommon.ml | (* Maybe add a wrapper over other functions here. But for now, just to stop warnings *) | null | https://raw.githubusercontent.com/Heasummn/Crab-ML/45a79373a620878b9c24464a7e009ecf3ea7f908/src/CrabCommon/CrabCommon.ml | ocaml | Maybe add a wrapper over other functions here. But for now, just to stop warnings | |
6b26d57972aad6f6f47838e2038fc6412b4c01f346ab11fdd69ee57be7e377af | zoomhub/zoomhub | Logger.hs | {-# LANGUAGE OverloadedStrings #-}
module ZoomHub.Log.Logger
( logDebug,
logDebugT,
logDebug_,
logError,
logError_,
logException,
logException_,
logInfo,
logInfoT,
logInfo_,
logWarning,
logWarning_,
log,
log_,
LogLevel
LogLevel (..),
-- Encoding
encod... | null | https://raw.githubusercontent.com/zoomhub/zoomhub/2c97e96af0dc2f033793f3d41fc38fea8dff867b/src/ZoomHub/Log/Logger.hs | haskell | # LANGUAGE OverloadedStrings #
Encoding
Force to UTF8 to avoid the dreaded `<stdout>: commitAndReleaseBuffer:
invalid argument` error when the locale is improperly configured and
a non-ASCII character is output:
JSON |
module ZoomHub.Log.Logger
( logDebug,
logDebugT,
logDebug_,
logError,
logError_,
logException,
logException_,
logInfo,
logInfoT,
logInfo_,
logWarning,
logWarning_,
log,
log_,
LogLevel
LogLevel (..),
encodeLogLine,
)
where
import Control.Exception (Some... |
b248fc820cfc65dbf407e97949c4509a9402585b09ea1339cc30e5032a89f7f6 | input-output-hk/cardano-addresses | ShelleySpec.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUA... | null | https://raw.githubusercontent.com/input-output-hk/cardano-addresses/d6dcd277d92c76e45d1024f7d82837fc0907aa12/core/test/Cardano/Address/Style/ShelleySpec.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
Properties
------------------------------------------------------------------------------
-----------------------------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
# LANGUAGE Sc... |
3c4c4e7a42fac847a37f09d374fbc1971a35230cf4684c1912ab461fb6229202 | ericnormand/lispcast-clojure-core-async | chapter4.clj | Exercise 1
(def chan5 (chan 5))
(go
(doseq [x 10]
(>! chan5 x)
(println x)))
Exercise 2
(defn assembly-line []
(let [body-chan (chan 10)
wheel1-chan (chan 10)
wheel2-chan (chan 10)
body+wheel-chan (chan 10)
body+2-wheels-chan (chan 10)
box-chan (chan 10)]
... | null | https://raw.githubusercontent.com/ericnormand/lispcast-clojure-core-async/ac1140be188a261155eb353928aa03f9f8048eb1/exercises/chapter4.clj | clojure | Exercise 1
(def chan5 (chan 5))
(go
(doseq [x 10]
(>! chan5 x)
(println x)))
Exercise 2
(defn assembly-line []
(let [body-chan (chan 10)
wheel1-chan (chan 10)
wheel2-chan (chan 10)
body+wheel-chan (chan 10)
body+2-wheels-chan (chan 10)
box-chan (chan 10)]
... | |
397f3cac84a35bd6e2a4b9660e7ae058d8b0f24a39c1091627e9832e54cdb188 | Tipoca/hlvm | expr.ml | type ty =
[ `Unit
| `Bool
| `Int
| `Float
| `Tuple of ty list
| `Array of ty ]
type cmp = [`Lt|`Le|`Eq|`Ne|`Ge|`Gt]
type patt =
| PVar of string
| PTup of patt list
type t =
| Unit
| Int of int
| Float of float
| String of string
| Var of string
| Apply of t * t
| Tuple of t... | null | https://raw.githubusercontent.com/Tipoca/hlvm/5b6fe8d1ce95d5cfc130dd0e56f0f36bae9b2e0d/examples/compiler2/expr.ml | ocaml | type ty =
[ `Unit
| `Bool
| `Int
| `Float
| `Tuple of ty list
| `Array of ty ]
type cmp = [`Lt|`Le|`Eq|`Ne|`Ge|`Gt]
type patt =
| PVar of string
| PTup of patt list
type t =
| Unit
| Int of int
| Float of float
| String of string
| Var of string
| Apply of t * t
| Tuple of t... | |
6e93acbfe2b4f53bff9c20e51e39db627e662c1f171037776001dcf3a14c8a27 | coq-community/coqffi | pp.ml | open Format
open Repr
open Conflict
let print_prefix_suffix = function _ :: _ -> true | [] -> false
let pp_list ?(enclose = print_prefix_suffix) ?(pp_prefix = fun _ _ -> ())
?(pp_suffix = fun _ _ -> ()) ~pp_sep pp fmt l =
if enclose l then (
pp_prefix fmt ();
pp_print_list ~pp_sep pp fmt l;
pp_suffi... | null | https://raw.githubusercontent.com/coq-community/coqffi/b76d6623a47dfc90ac4e7f8b7ee71fb101de1cee/src/pp.ml | ocaml | open Format
open Repr
open Conflict
let print_prefix_suffix = function _ :: _ -> true | [] -> false
let pp_list ?(enclose = print_prefix_suffix) ?(pp_prefix = fun _ _ -> ())
?(pp_suffix = fun _ _ -> ()) ~pp_sep pp fmt l =
if enclose l then (
pp_prefix fmt ();
pp_print_list ~pp_sep pp fmt l;
pp_suffi... | |
b3503d73f57c632fefedf4234cc301a1c3f2cf726c1dab3141326b1566ca34fe | lazy-cat-io/metaverse | solid.cljs | (ns heroicons.solid
(:require
["@heroicons/react/solid/esm" :as icons]
[reagent.core :as r]))
(def academic-cap-icon (r/adapt-react-class icons/AcademicCapIcon))
(def adjustments-icon (r/adapt-react-class icons/AdjustmentsIcon))
(def annotation-icon (r/adapt-react-class icons/AnnotationIcon))
(def archive-i... | null | https://raw.githubusercontent.com/lazy-cat-io/metaverse/da076f1c802984930acc6a2a9b4ef77e95a8d6ab/src/main/clojure/heroicons/solid.cljs | clojure | (ns heroicons.solid
(:require
["@heroicons/react/solid/esm" :as icons]
[reagent.core :as r]))
(def academic-cap-icon (r/adapt-react-class icons/AcademicCapIcon))
(def adjustments-icon (r/adapt-react-class icons/AdjustmentsIcon))
(def annotation-icon (r/adapt-react-class icons/AnnotationIcon))
(def archive-i... | |
6ca7cf5836d6f4a5f7ff1244643f2e980bf13663b113c7223a9b4b4b02c2528f | sadiqj/ocaml-esp32 | t090-acc4.ml | open Lib;;
let x = true in
let y = false in
let z = false in
let a = false in
let b = false in
();
if not x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST1
10 PUSHCONST0
11 PUSHCONST0
12 PUSHCONST0
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/tool-ocaml/t090-acc4.ml | ocaml | open Lib;;
let x = true in
let y = false in
let z = false in
let a = false in
let b = false in
();
if not x then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 CONST1
10 PUSHCONST0
11 PUSHCONST0
12 PUSHCONST0
... | |
937254b44d00b50c4b922f5f45e4d45f9cbdd50f3460d24cd03af9ef7986cc6a | gsakkas/rite | 20060302-17:56:00-27ff2306cdb017964c28aea1d4f4f156.seminal.ml | let rec reverseHelp len place str =
let firstChar = str.[place] in
str
let rec reverseHelper str =
let temp = str in
temp.[0] = 'z'
let reverse str =
let currChar = str.[0] in
str
let _ = print_string(reverseHelper "fast") | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060302-17%3A56%3A00-27ff2306cdb017964c28aea1d4f4f156.seminal.ml | ocaml | let rec reverseHelp len place str =
let firstChar = str.[place] in
str
let rec reverseHelper str =
let temp = str in
temp.[0] = 'z'
let reverse str =
let currChar = str.[0] in
str
let _ = print_string(reverseHelper "fast") | |
d98e7a0d89062791a788324dd61c24fc000a505634bb2a1e4c4c5c7dda1e7500 | chrovis/cljam | sorter_test.clj | (ns cljam.algo.sorter-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[cljam.test-common
:refer [deftest-slow
deftest-remote
disable-log-fixture
get-shuffled-test-sam
spit-sam-for-test
... | null | https://raw.githubusercontent.com/chrovis/cljam/2b8e7386765be8efdbbbb4f18dbc52447f4a08af/test/cljam/algo/sorter_test.clj | clojure | tests by test-sam-file and test-bam-file
tests by shuffled files (its may sorted by chance)
check sorting order
compare generated files
coordinate
queryname
check sorting order
check sorting order | (ns cljam.algo.sorter-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[cljam.test-common
:refer [deftest-slow
deftest-remote
disable-log-fixture
get-shuffled-test-sam
spit-sam-for-test
... |
28a801b85b432969599786386c56d65ad23d1d11b6bb8509e2ed2d48f7eba7e5 | bluddy/rails | segment.ml | open Containers
type id = int
[@@deriving yojson]
module Map = struct
type t = {
mutable last: int;
map: (id, int) Utils.Hashtbl.t; (* segment id to count *)
}[@@deriving yojson]
let make () = { last=0; map=Hashtbl.create 10; }
let get_id v =
Hashtbl.replace v.map v.last 0;
let ret = v.last in
v.last <- ... | null | https://raw.githubusercontent.com/bluddy/rails/20e753887bc6db4b4bd087a1b78584f5b53b45ad/bin/backend/segment.ml | ocaml | segment id to count | open Containers
type id = int
[@@deriving yojson]
module Map = struct
type t = {
mutable last: int;
}[@@deriving yojson]
let make () = { last=0; map=Hashtbl.create 10; }
let get_id v =
Hashtbl.replace v.map v.last 0;
let ret = v.last in
v.last <- succ v.last;
ret
let incr_train v idx = Hashtbl.incr v.ma... |
d243a5eb5ece24a18c13da55c7cd69965d997b909d472866fbcb762254a0d9be | txkaduo/weixin-mp-sdk | PublicPlatform.hs | # LANGUAGE CPP #
module WeiXin.PublicPlatform
( module WeiXin.PublicPlatform.Error
, module WeiXin.PublicPlatform.Types
, module WeiXin.PublicPlatform.Class
, module WeiXin.PublicPlatform.WS
#if defined(VERSION_acid_state)
, module WeiXin.PublicPlatform.Acid
#endif
, module WeiXin.PublicPlatform... | null | https://raw.githubusercontent.com/txkaduo/weixin-mp-sdk/77abe31d06ccf266aad358373b9cde34b222b305/WeiXin/PublicPlatform.hs | haskell | # LANGUAGE CPP #
module WeiXin.PublicPlatform
( module WeiXin.PublicPlatform.Error
, module WeiXin.PublicPlatform.Types
, module WeiXin.PublicPlatform.Class
, module WeiXin.PublicPlatform.WS
#if defined(VERSION_acid_state)
, module WeiXin.PublicPlatform.Acid
#endif
, module WeiXin.PublicPlatform... | |
f036e3e2faa278fbf5946b345d24aab6784390f0c4726d3e3f1be5acc3854805 | JoelSanchez/ventas | category_list.cljs | (ns ventas.devcards.category-list
(:require
[devcards.core :refer-macros [defcard-rg]]
[ventas.components.category-list :as components.category-list]))
(defn- category-list-wrapper []
[components.category-list/category-list
(for [n (range 4)]
{:id (gensym)
:name (random-uuid)
:description... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/dev/cljs/ventas/devcards/category_list.cljs | clojure | (ns ventas.devcards.category-list
(:require
[devcards.core :refer-macros [defcard-rg]]
[ventas.components.category-list :as components.category-list]))
(defn- category-list-wrapper []
[components.category-list/category-list
(for [n (range 4)]
{:id (gensym)
:name (random-uuid)
:description... | |
ead148948e870fb74e7d1587a31c6427f5f5fcbfb73488aad137ae28ad8f1fa0 | tweag/ormolu | stack-header-2-out.hs | #!/usr/bin/env stack
{- stack
script
--resolver lts-6.25
--package turtle
--package "stm async"
--package http-client,http-conduit
-}
{-# LANGUAGE OverloadedStrings #-}
main = return ()
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/module-header/stack-header-2-out.hs | haskell | stack
script
--resolver lts-6.25
--package turtle
--package "stm async"
--package http-client,http-conduit
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
main = return ()
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.