_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
c7ff6850884240c2a06a9c533a4cc837e6eb5b2f883950b3c9bcd3e0b16c1906
aliter/aliter
packets.erl
-module(packets, [PacketVer]). -export([packet_size/1]). mod_for(Version) -> list_to_atom(lists:concat(["packets_", Version])). packet_size(Header) -> (mod_for(PacketVer)):packet_size(Header).
null
https://raw.githubusercontent.com/aliter/aliter/03c7d395d5812887aecdca20b16369f8a8abd278/src/packets.erl
erlang
-module(packets, [PacketVer]). -export([packet_size/1]). mod_for(Version) -> list_to_atom(lists:concat(["packets_", Version])). packet_size(Header) -> (mod_for(PacketVer)):packet_size(Header).
87890a18ff0c657a598967c6df8b024988583232a2bdd0bbc147dd8f304f2948
haskell-suite/haskell-names
Rec3.hs
module Rec3 (rec1_1, rec1_2, rec3) where import Rec2 import Rec1 (rec1_2) rec3 = rec3
null
https://raw.githubusercontent.com/haskell-suite/haskell-names/795d717541484dbe456342a510ac8e712e1f16e4/tests/exports/Rec3.hs
haskell
module Rec3 (rec1_1, rec1_2, rec3) where import Rec2 import Rec1 (rec1_2) rec3 = rec3
0d4c56bd05a649198393a37529aa6cd4c7ab65ce597e7c425926e11a079c1e63
sbcl/sbcl
target-insts.lisp
This file is for stuff which was in CMU CL 's insts.lisp file , but which in the SBCL build process ca n't be compiled ;;;; into code for the cross-compilation host. This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , ...
null
https://raw.githubusercontent.com/sbcl/sbcl/1a983ef5865d083a32ee3f67b02bbcf15d041b48/src/compiler/sparc/target-insts.lisp
lisp
into code for the cross-compilation host. more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Save the immediate value and the destination register from this sethi instruction. This is used la...
This file is for stuff which was in CMU CL 's insts.lisp file , but which in the SBCL build process ca n't be compiled This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (i...
53a2d9f609d3d759be3fea51a386f14eccc3d13c8752e61e9c08baf0b3cdcd79
elastic/eui-cljs
sort_direction.cljs
(ns eui.services.sort-direction (:require ["@elastic/eui/lib/services/sort/sort_direction.js" :as eui])) (def SortDirection eui/SortDirection) (def SortDirectionType eui/SortDirectionType)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/services/sort_direction.cljs
clojure
(ns eui.services.sort-direction (:require ["@elastic/eui/lib/services/sort/sort_direction.js" :as eui])) (def SortDirection eui/SortDirection) (def SortDirectionType eui/SortDirectionType)
1e282b0addc4bd04ffe2ea1e8e324d9a68824621ae6bd4c8dc60aba388bb5b2f
rcherrueau/APE
let_4.rkt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Writing Hygienic Macros in Scheme with Syntax - case Technical Report # 356 ;; page 10 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #lang racket (require "print-test.rkt") ; `all-ids' fender...
null
https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/hygienic_macros/let_4.rkt
racket
`all-ids' fender reject input expression that do not have identifiers where they are expected. "v1" as identifier will report a bad syntax error.
Writing Hygienic Macros in Scheme with Syntax - case Technical Report # 356 page 10 #lang racket (require "print-test.rkt") (define-syntax (let_4 x) (define (all-ids? lst) (define (id? an-id previous-id-res) (and (identifier? an-id) previous-id-res)) (foldl id? #t (syntax->list lst))) (s...
0545f9fd722a2b400ee007aea1cdf9f08490c8e35f8066fb51667316e3bd4e2a
portkey-cloud/aws-clj-sdk
secretsmanager.clj
(ns portkey.aws.secretsmanager (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "secretsmanager", :region "ap-northeast-1"}, :ssl-common-name "secretsmanager.ap-northeast-1.amazonaws.com", :endpoint "-northeast-1.amazonaws.com", :signature-version :v4}, "...
null
https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/secretsmanager.clj
clojure
(ns portkey.aws.secretsmanager (:require [portkey.aws])) (def endpoints '{"ap-northeast-1" {:credential-scope {:service "secretsmanager", :region "ap-northeast-1"}, :ssl-common-name "secretsmanager.ap-northeast-1.amazonaws.com", :endpoint "-northeast-1.amazonaws.com", :signature-version :v4}, "...
a9a9e93c9318b77717cabffb119fa58f2a86661ca8a4da610549ca5ee72d114a
rukor/cljs-ssr-node
state.cljs
(ns com.firstlinq.ssr.state (:require [cognitect.transit :as t])) (defmulti get-state (fn [state route-id route-params opts] route-id)) (defprotocol Serialiser (->string [_ state]) (->state [_ string])) (defn transit-serialiser [] (reify Serialiser (->string [_ state] (let [w (t/writer :json)] ...
null
https://raw.githubusercontent.com/rukor/cljs-ssr-node/6115f18ca66b9595a87c0e880ebdfce25042c612/src/com/firstlinq/ssr/state.cljs
clojure
(ns com.firstlinq.ssr.state (:require [cognitect.transit :as t])) (defmulti get-state (fn [state route-id route-params opts] route-id)) (defprotocol Serialiser (->string [_ state]) (->state [_ string])) (defn transit-serialiser [] (reify Serialiser (->string [_ state] (let [w (t/writer :json)] ...
640048e475e47ae73fc3d3ee7ef5e1c0a11308c4486abf32ee1b16f465bd206d
IFCA/opencl
Setup.hs
Copyright ( c ) 2011 , All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redistributions of source code must retain the above copyright notice , this list of conditions and ...
null
https://raw.githubusercontent.com/IFCA/opencl/80d0cb9d235819cd53e6a36d7a9258bc19d564ab/Setup.hs
haskell
Copyright ( c ) 2011 , All rights reserved . Redistribution and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : * Redistributions of source code must retain the above copyright notice , this list of conditions and ...
9137d9d504e3761dbb15e77b510026eb484b41e3b9dd9ac1b0e80b7ddc1efc5e
oasis-open/openc2-lycan-beam
a_simple_post_SUITE.erl
@author ( C ) 2018 , sFractal Consulting LLC %%% -module(a_simple_post_SUITE). -author("Duncan Sparrell"). -license("MIT"). -copyright("2018, Duncan Sparrell sFractal Consulting LLC"). %%%------------------------------------------------------------------- Copyright ( c ) 2018 , , sFractal Consulting MIT L...
null
https://raw.githubusercontent.com/oasis-open/openc2-lycan-beam/c8a580eb79a46cb3fa7db0d6576bfa23eb78c943/slpfhw/erlang/slpfhw/apps/slpfhw/test/a_simple_post_SUITE.erl
erlang
------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or Software...
@author ( C ) 2018 , sFractal Consulting LLC -module(a_simple_post_SUITE). -author("Duncan Sparrell"). -license("MIT"). -copyright("2018, Duncan Sparrell sFractal Consulting LLC"). Copyright ( c ) 2018 , , sFractal Consulting MIT License ( the " Software " ) , to deal in the Software without restrictio...
3a5fbd17c5e1ae59c7d9ed54b324017d1937095ffb695ef3b6ba85b2871f91ce
acieroid/scala-am
omega.scm
((lambda (x) (x x)) (lambda (x) (x x)))
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/WeiChenRompf2019/omega.scm
scheme
((lambda (x) (x x)) (lambda (x) (x x)))
1edddeb7dacbacabdadebfd5577c34f446619c031404319a8fdc688836868b66
openmusic-project/RQ
tempo-smoothing.lisp
;;;============================ ;;; ALGORITHM FOR TEMPO SMOOTHING ;;; ;;; Dynamic-programming segmentation algorithm Inspired by the segmentation algorithm described in : , , : " A Dynamic Programming Approach to for Rhythm Transcription " ( see also ) ;;; Also includes a new-tempo penalty (tempo jump pe...
null
https://raw.githubusercontent.com/openmusic-project/RQ/d6b1274a4462c1500dfc2edab81a4425a6dfcda7/src/algorithm/tempo-smoothing.lisp
lisp
============================ ALGORITHM FOR TEMPO SMOOTHING Dynamic-programming segmentation algorithm Also includes a new-tempo penalty (tempo jump penalty) The "ERR" function finds the series of tempo that minimizes the variations between successive tempi, and the weights of the corresponding transcriptions. The...
Inspired by the segmentation algorithm described in : , , : " A Dynamic Programming Approach to for Rhythm Transcription " ( see also ) The " ERR " function is replaced by a - like best - path algorithm (defpackage "TempSmooth" (:nicknames :ts) (:use "COMMON-LISP" "CL-USER" "OM-API" "LISPW...
75d62a0311504041021fa4be3ca0a8aae19f5475d678339b00c3dc01f4b3a69f
fujita-y/ypsilon
arithmetic.scm
#!core Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited . ;;; See LICENSE file for terms and conditions of use. (library (core arithmetic) (export fixnum? fixnum-width least-fixnum greatest-fixnum fx=? fx<? fx>? fx<=? ...
null
https://raw.githubusercontent.com/fujita-y/ypsilon/44260d99e24000f9847e79c94826c3d9b76872c2/stdlib/core/arithmetic.scm
scheme
See LICENSE file for terms and conditions of use. [end]
#!core Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited . (library (core arithmetic) (export fixnum? fixnum-width least-fixnum greatest-fixnum fx=? fx<? fx>? fx<=? fx>=? fxzero? fxpositive...
94ea92417f675d008a54b44d6371fc790472070050282330fbc656db217d24ef
awslabs/s2n-bignum
bignum_montredc.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_montredc.ml
ocaml
========================================================================= ========================================================================= *** print_literal_from_elf "x86/generic/bignum_montredc.o";; *** PUSH (% rbx) PUSH (% rbp) PUSH (% r12) PUSH (% r13) PUSH (% r14) PUSH (% r15) TEST (% rdi...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) Montgomery reduction of arbitrary bignum . ...
f84cd895a19fbfb71111a4d67b7768ab7944f01e045ba558c7b861bef9c170ed
EasyCrypt/easycrypt
ecHiGoal.ml
(* -------------------------------------------------------------------- *) open EcUtils open EcLocation open EcSymbols open EcParsetree open EcTypes open EcFol open EcEnv open EcMatching open EcBaseLogic open EcProofTerm open EcCoreGoal open EcCoreGoal.FApi open EcLowGoal module Sid = EcIdent.Sid module Mid = EcId...
null
https://raw.githubusercontent.com/EasyCrypt/easycrypt/2f98c08673b913635203cbb638011165a813f2e3/src/ecHiGoal.ml
ocaml
-------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -----------------------------------...
open EcUtils open EcLocation open EcSymbols open EcParsetree open EcTypes open EcFol open EcEnv open EcMatching open EcBaseLogic open EcProofTerm open EcCoreGoal open EcCoreGoal.FApi open EcLowGoal module Sid = EcIdent.Sid module Mid = EcIdent.Mid module Sp = EcPath.Sp module ER = EcReduction module PT = EcPr...
8b11e4d6abaa455b8c56700c8fe12f965b2a8249e6416be0bef21ff4edf709de
ocaml-omake/omake
omake_ir_free_vars.ml
(* * Compute the free variables of an expression. * NOTE: this is a little sloppy. * 1. The language is dynamically scoped; * we don't catch variables not mentioned statically * 2. We take the presence of a definition anywhere * as an indication that the variable is not free. *) (* * Tables...
null
https://raw.githubusercontent.com/ocaml-omake/omake/08b2a83fb558f6eb6847566cbe1a562230da2b14/src/ir/omake_ir_free_vars.ml
ocaml
* Compute the free variables of an expression. * NOTE: this is a little sloppy. * 1. The language is dynamically scoped; * we don't catch variables not mentioned statically * 2. We take the presence of a definition anywhere * as an indication that the variable is not free. * Tables of free ...
type free_vars = Omake_ir_util.VarInfoSet.t let free_vars_empty = Omake_ir_util.VarInfoSet.empty let free_vars_add = Omake_ir_util.VarInfoSet.add let free_vars_remove = Omake_ir_util.VarInfoSet.remove let free_vars_remove_param_list fv params = List.fold_left Omake_ir_util.VarInfoSet.remove fv params let free...
3f689ce89ca7fc56412b93bd78a639693b213f294099b45162f471c3e1c598df
lspitzner/multistate
Strict.hs
# LANGUAGE CPP # | The multi - valued version of mtl 's State / StateT module Control.Monad.Trans.MultiState.Strict ( -- * MultiStateT MultiStateT(..) , MultiStateTNull , MultiState -- * MonadMultiState class , MonadMultiGet(..) , MonadMultiState(..) -- * run-functions , runMultiStateT , runM...
null
https://raw.githubusercontent.com/lspitzner/multistate/5f49eff342443ef719158b00e329c860f2e2f54e/src/Control/Monad/Trans/MultiState/Strict.hs
haskell
* MultiStateT * MonadMultiState class * run-functions * with-functions (single state) * with-functions (multiple states) * without-function (single state) * inflate-functions (run single state in multiple states) * other functions * x - The list of types constituting the state, * m - The inner monad. a het...
# LANGUAGE CPP # | The multi - valued version of mtl 's State / StateT module Control.Monad.Trans.MultiState.Strict ( MultiStateT(..) , MultiStateTNull , MultiState , MonadMultiGet(..) , MonadMultiState(..) , runMultiStateT , runMultiStateTAS , runMultiStateTSA , runMultiStateTA , runMultiSta...
8da5b63b9ee3c733ba20dc47eb9ec4a7ea645a403ea3ca758342096e1c2d72cc
system-f/papa
Either.hs
# LANGUAGE NoImplicitPrelude # module Papa.Base.Export.Data.Either( Either(Left, Right) , either , isLeft , isRight , partitionEithers ) where import Data.Either ( Either(Left, Right) , either , isLeft , isRight , partitionEithers )
null
https://raw.githubusercontent.com/system-f/papa/5c4d71e08b905a882dd9a4a7d0c336411971c360/papa-base-export/src/Papa/Base/Export/Data/Either.hs
haskell
# LANGUAGE NoImplicitPrelude # module Papa.Base.Export.Data.Either( Either(Left, Right) , either , isLeft , isRight , partitionEithers ) where import Data.Either ( Either(Left, Right) , either , isLeft , isRight , partitionEithers )
f9edb4cfae1e7885354cfc92c89e2bd16b6d2a40a3609ab28ab4e013a9c187b6
racket/plai
student-1.rkt
#lang plai/mutator ; mark-and-sweep-test.rkt - Ben Childs ; Designed to test the mark and sweep collector Runs three tests : ; ; Allocation of subsequently larger lists ; ; Use of Local variables in a loop (garbage after each iteration) ; Followed by allocation of large list (verifies that they are correctly collect...
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc/good-mutators/student-1.rkt
racket
mark-and-sweep-test.rkt - Ben Childs Designed to test the mark and sweep collector Allocation of subsequently larger lists Use of Local variables in a loop (garbage after each iteration) Followed by allocation of large list (verifies that they are correctly collected) Generation of a number of circularly refer...
#lang plai/mutator Runs three tests : (allocator-setup "../good-collectors/good-collector.rkt" 80) (define (gen-list x) (if (zero? x) '() (cons x (gen-list (- x 1))))) (define (local-vars) (let ((x 3) (y 5) (z 10) (a 5)) (+ x (- 10 y)))) (define (loop x) (printf "Iteration: ~a\n" x) (if (zero?...
4848dfafc451530129239ef61bfc81feaa6365cb7ab3310885d8af30901e0f57
brianium/clean-todos
spec.cljc
(ns todos.core.entity.spec (:require [todos.core.entity :as entity] #?(:clj [clojure.spec.alpha :as s] :cljs [cljs.spec.alpha :as s]))) (s/def ::id uuid?) (s/def ::entity/id ::id) (s/def ::entity (s/keys :req [::entity/id])) (s/def ::storage-error keyword?) (s/def ::storage-result (s/or ...
null
https://raw.githubusercontent.com/brianium/clean-todos/fca2320fe3bca052787c4ace479ce69d23d58a12/src/todos/core/entity/spec.cljc
clojure
(ns todos.core.entity.spec (:require [todos.core.entity :as entity] #?(:clj [clojure.spec.alpha :as s] :cljs [cljs.spec.alpha :as s]))) (s/def ::id uuid?) (s/def ::entity/id ::id) (s/def ::entity (s/keys :req [::entity/id])) (s/def ::storage-error keyword?) (s/def ::storage-result (s/or ...
47484ddfd008de7f7563e14a8bd543ecf8934954a99318c27d7a0774d1f87a3d
thelema/ocaml-community
main.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cr...
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/debugger/main.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt OCaml port by and Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Inp...
ec7af5ec3ac0365ab018ce93b5ace00fa2abf4f6e09822db00458beb7d99d2e5
qkrgud55/ocamlmulti
location.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/parsing/location.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : location.ml 12511 2012 - 05 -...
2fa34ae49cbf5ebfc3d241f9a371f782b442e2160a40288628edc5bba8cd265a
marigold-dev/mankavar
das_test.ml
let () = Printexc.record_backtrace true ; Alcotest.run "DAS" [ Consensus_dummy_tests.tests ; ]
null
https://raw.githubusercontent.com/marigold-dev/mankavar/ac6bf1e327ef6a91777e7d045c0f7c0cf1fd0e6e/src/test/das_test.ml
ocaml
let () = Printexc.record_backtrace true ; Alcotest.run "DAS" [ Consensus_dummy_tests.tests ; ]
f76761a3f937e55e2b61a5015a39bb35b31817a660ffd7ffa5cda468548c5913
qiao/sicp-solutions
3.31.scm
;; If we don't execute the action procedure immediately, then there will be no ;; actions stored in the agenda initially, and thus the simulation will fail.
null
https://raw.githubusercontent.com/qiao/sicp-solutions/a2fe069ba6909710a0867bdb705b2e58b2a281af/chapter3/3.31.scm
scheme
If we don't execute the action procedure immediately, then there will be no actions stored in the agenda initially, and thus the simulation will fail.
aaf19628229704629a3a19c1fb9dd48bd6db23fdfbb9c23b4dd06dd272a3d323
Z572/guile-wlroots
time.scm
(define-module (wlroots time) #:use-module (wlroots types) #:use-module (wlroots utils) #:use-module (rnrs bytevectors) #:use-module (system foreign-library) #:use-module (bytestructures guile) #:use-module (oop goops) #:use-module ((system foreign) #:prefix ffi:) #:export (clock-gettime wra...
null
https://raw.githubusercontent.com/Z572/guile-wlroots/c99fcbb8faa7ab2e4a76b4bb8deaf0ff52f9d12b/wlroots/time.scm
scheme
(define-module (wlroots time) #:use-module (wlroots types) #:use-module (wlroots utils) #:use-module (rnrs bytevectors) #:use-module (system foreign-library) #:use-module (bytestructures guile) #:use-module (oop goops) #:use-module ((system foreign) #:prefix ffi:) #:export (clock-gettime wra...
f5d58e357939a23a52abc5a6c3352aaa47cdf33bbd58ef00244d0f208a4e2634
xmonad/xmonad-contrib
OrgMode.hs
# OPTIONS_GHC -Wno - orphans # # OPTIONS_GHC -Wno - incomplete - patterns # # LANGUAGE InstanceSigs # # LANGUAGE TypeApplications # # LANGUAGE TupleSections # # LANGUAGE LambdaCase # module OrgMode where import XMonad.Prelude hiding ((!?)) import XMonad.Prompt.OrgMode import qual...
null
https://raw.githubusercontent.com/xmonad/xmonad-contrib/1c6ae39fc9181f9610b90529af7b148840f427b2/tests/OrgMode.hs
haskell
Checking for regressions | Parsing preserves all info that printing does. | Printing preserves all info that parsing does. ---------------------------------------------------------------------- Pretty Printing only way it can't be in the map ---------------------------------------------------------------------- A...
# OPTIONS_GHC -Wno - orphans # # OPTIONS_GHC -Wno - incomplete - patterns # # LANGUAGE InstanceSigs # # LANGUAGE TypeApplications # # LANGUAGE TupleSections # # LANGUAGE LambdaCase # module OrgMode where import XMonad.Prelude hiding ((!?)) import XMonad.Prompt.OrgMode import qual...
dd97e481cedd10c9fa7cdeab4d41c274bb42b9a1b4bbc0897ea4133a10284e07
tezos/tezos-mirror
validate.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2022 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/17c66930cde5fea79d899e139640eb750f6395b8/src/proto_alpha/lib_protocol/validate.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2022 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
af67918776a7f77aa9af05e0a8f9210a59af6d6278134343286bd8548ba56f31
madmax96/brave-clojure-solutions
section_7.clj
(ns clojure-brave.exercises.section-7) 1 (eval (list 'str "Mladjan " "Interstellar")) (eval '(str "Mladjan " "Interstellar")) (eval (read-string "(str \"Mladjan \" \"Interstellar\")")) 2 (defmacro infix [[op1 plus op2 times op3 minus op4]] (list minus (list plus op1 (list tim...
null
https://raw.githubusercontent.com/madmax96/brave-clojure-solutions/3be234bdcf3704acd2aca62d1a46fa03463e5735/section_7.clj
clojure
(ns clojure-brave.exercises.section-7) 1 (eval (list 'str "Mladjan " "Interstellar")) (eval '(str "Mladjan " "Interstellar")) (eval (read-string "(str \"Mladjan \" \"Interstellar\")")) 2 (defmacro infix [[op1 plus op2 times op3 minus op4]] (list minus (list plus op1 (list tim...
1a39eba56389a517599251d3e3a984a63b916a080f65fd3d46423206ef9f5fc6
fredrikt/yxa
local_default.erl
%%%------------------------------------------------------------------- %%% File : local_default.erl @author < > %%% @doc Interface to local functions hooking into lots of different parts of the various YXA applications . %%% @since 03 Jan 2006 by < > %%% @end %%% @hidden %%%--------...
null
https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/local_default.erl
erlang
------------------------------------------------------------------- File : local_default.erl @doc Interface to local functions hooking into lots of @end @hidden -------------------------------------------------------------------
@author < > different parts of the various YXA applications . @since 03 Jan 2006 by < > -module(local_default). -export([ ]).
c555d9f6071207c2bf190cf4e415005205efedd3d6f21c36c55d7027961d7653
austral/austral
MonoType.ml
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions . See LICENSE file for details . SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions. See LICENSE file for details. SPDX...
null
https://raw.githubusercontent.com/austral/austral/69b6f7de36cc9576483acd1ac4a31bf52074dbd1/lib/MonoType.ml
ocaml
* The monomorphic type system. * A monomorphic type. * A monomorphic record slot. * A monomorphic union case.
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions . See LICENSE file for details . SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions. See LICENSE file for details. SPDX...
4a441475175c18542ff761f99da76dbfec21ae59534eb9b85c301eee41bdcf04
ml4tp/tcoq
opaqueproof.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/kernel/opaqueproof.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * This module implements the handlin...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Mod...
08a7db76d807206cb86f6cdafc5e0eba3a097d7f55f12c824c7f52bbece66abf
commercialhaskell/rio
Time.hs
module RIO.Time ( module Data.Time , getCurrentTime , getTimeZone , getCurrentTimeZone , getZonedTime , utcToLocalZonedTime ) where import Control.Monad.IO.Class import Data.Time hiding( getCurrentTime, getTimeZone, getCurrentTimeZone , getZonedTime, utcToLocalZonedTime) import qua...
null
https://raw.githubusercontent.com/commercialhaskell/rio/4eba306d37a60a20f0bed27f40afc23a7c892c40/rio/src/RIO/Time.hs
haskell
module RIO.Time ( module Data.Time , getCurrentTime , getTimeZone , getCurrentTimeZone , getZonedTime , utcToLocalZonedTime ) where import Control.Monad.IO.Class import Data.Time hiding( getCurrentTime, getTimeZone, getCurrentTimeZone , getZonedTime, utcToLocalZonedTime) import qua...
c0b7274087fe0ee44ea84e4b65145e60895f2f41646443b87ec566619592cd1d
fetburner/compelib
numberTheory.ml
(* 最大公約数 *) let rec gcd n m = if m = 0 then n else gcd m (n mod m) (* 最小公倍数 *) let lcm n m = n / gcd n m * m let factorize n = nをpで割れるだけ割って,割れた数c'にcを加えたものとn / p^c'を返す let rec iter_div p c n k = if 0 < n mod p then k c n else iter_div p (c + 1) (n / p) k in (* 素因数分解の処理の本体 *) let rec factorize f a...
null
https://raw.githubusercontent.com/fetburner/compelib/d8fc5d9acd04e676c4d4d2ca9c6a7140f1b85670/lib/numberTheory.ml
ocaml
最大公約数 最小公倍数 素因数分解の処理の本体 トーシェント関数φ 昇順にソートされた約数のリスト 今ふるおうとしている整数 pがどのインデックスに対応するか pの2乗 p^2がどのインデックスに対応するか
let rec gcd n m = if m = 0 then n else gcd m (n mod m) let lcm n m = n / gcd n m * m let factorize n = nをpで割れるだけ割って,割れた数c'にcを加えたものとn / p^c'を返す let rec iter_div p c n k = if 0 < n mod p then k c n else iter_div p (c + 1) (n / p) k in let rec factorize f acc p n = if n <= 1 then acc else...
82cff19c8d21f514990df0a9326d37cb9efc2e836ea531a83a2811acce94f3d7
cky/guile
effects.scm
Effects analysis on Tree - IL Copyright ( C ) 2011 , 2012 , 2013 Free Software Foundation , Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 3 of the Lic...
null
https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/language/tree-il/effects.scm
scheme
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See...
Effects analysis on Tree - IL Copyright ( C ) 2011 , 2012 , 2013 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA (def...
f29408d4c9ec812b9410e8464119d8840414d7476a75bbc618033323dfe404ee
rpav/cl-freetype2
glyph.lisp
(in-package :freetype2-tests) (in-suite freetype2-tests) (defvar *glyphslot*) (defvar *metrics*) (defvar *glyph*) (test (test-load-glyphslot :depends-on test-set-size) "Verify basic glyph info" (finishes (load-char *face* #\j '(:no-bitmap))) (is (typep (setf *glyphslot* (ft-face-glyph *face*)) 'ft-glyphslot)) ...
null
https://raw.githubusercontent.com/rpav/cl-freetype2/96058da730b4812df916c1f4ee18c99b3b15a3de/t/glyph.lisp
lisp
(in-package :freetype2-tests) (in-suite freetype2-tests) (defvar *glyphslot*) (defvar *metrics*) (defvar *glyph*) (test (test-load-glyphslot :depends-on test-set-size) "Verify basic glyph info" (finishes (load-char *face* #\j '(:no-bitmap))) (is (typep (setf *glyphslot* (ft-face-glyph *face*)) 'ft-glyphslot)) ...
2eeee91d036b5081fcd9a6b44a6962cec829a35f115c4f24b7b50ce90343aa64
fukamachi/clozure-cl
hash.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright ( C ) 2009 Clozure Associates Copyright ( C ) 1994 - 2001 Digitool , Inc This file is part of Clozure CL . ;;; Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the ...
null
https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/lib/hash.lisp
lisp
Package : CCL -*- file "LICENSE". The LLGPL consists of a preamble and the LGPL, conflict, the preamble takes precedence. Clozure CL is referenced in the preamble as the "LIBRARY." The LLGPL is also available online at This is just the stuff (make-load-form, print-object) that can't be fasload...
Copyright ( C ) 2009 Clozure Associates Copyright ( C ) 1994 - 2001 Digitool , Inc This file is part of Clozure CL . Clozure CL is licensed under the terms of the Lisp Lesser GNU Public License , known as the LLGPL and distributed with Clozure CL as the which is distributed with Clozure CL as ...
f8a268a1e59056ff77b0c757082541bc9e7644bb2a1d979827eee4cd015aefad
pentlandedge/s4607
scatterer_rec_tests.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright 2016 Pentland Edge Ltd. %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not %% use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Un...
null
https://raw.githubusercontent.com/pentlandedge/s4607/b3cdae404ac5bd50419f33259dfa62af9d1a8d60/test/scatterer_rec_tests.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Copyright 2016 Pentland Edge Ltd. Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(scatterer_rec_tests). -include_lib("eunit/include/eunit.hrl"). -export([sample_record1/0]). scatterer_rec_tes...
e7f28724182ef22c41efa55b574797c1cffe45606a87362ae58f3f231f32dfb5
metaocaml/ber-metaocaml
test2.ml
(* TEST files = "puts.c" use_runtime = "false" * hasunix include unix ** setup-ocamlc.byte-build-env *** ocamlc.byte flags = "-w a -output-complete-exe puts.c -ccopt -I${ocamlsrcdir}/runtime" program = "test2" **** run program = "./test2" ***** check-program-output *) external puts: string -> unit = "caml_puts" let...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/output-complete-obj/test2.ml
ocaml
TEST files = "puts.c" use_runtime = "false" * hasunix include unix ** setup-ocamlc.byte-build-env *** ocamlc.byte flags = "-w a -output-complete-exe puts.c -ccopt -I${ocamlsrcdir}/runtime" program = "test2" **** run program = "./test2" ***** check-program-output
external puts: string -> unit = "caml_puts" let _ = at_exit (fun () -> print_endline "Program terminated") let () = Unix.putenv "FOO" "Hello OCaml!"; puts (Unix.getenv "FOO")
bb34385092fd45b65254a19aee0e7b58838908556a7285c18954420627462b32
haroldcarr/learn-haskell-coq-ml-etc
ViewPatterns_OCharles.hs
# LANGUAGE ViewPatterns # module ViewPatterns.ViewPatterns_OCharles where import qualified Data.Map.Strict as M import Data.Sequence 24 Days of GHC Extensions : View Patterns binding extensions : top - level , where / let bindings ViewPatterns : enable pattern matching on result of function applic...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/ghc-extensions/src/ViewPatterns/ViewPatterns_OCharles.hs
haskell
# ANN downloadsFor0 "HLint: ignore Use fromMaybe" # ---------------------------------------------------------------------------- has poor perfomance ---------------------------------------------------------------------------- has poor perfomance non exhautive pattern match without this balance overhead of new syn...
# LANGUAGE ViewPatterns # module ViewPatterns.ViewPatterns_OCharles where import qualified Data.Map.Strict as M import Data.Sequence 24 Days of GHC Extensions : View Patterns binding extensions : top - level , where / let bindings ViewPatterns : enable pattern matching on result of function applic...
4390650660d1e00d84a904080835235ee64c45dc0ecdad17dcec560241bae6a2
CloudI/CloudI
ranch_server.erl
Copyright ( c ) 2012 - 2018 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC...
null
https://raw.githubusercontent.com/CloudI/CloudI/75b93bb0e7dc4734f5cd1ef913788e44b577a3d5/src/external/cloudi_x_ranch/src/ranch_server.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2012 - 2018 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(ranch_server). -behaviour(gen_server). -expo...
38e5ef6b04d64966e96263000da6a7c4c263a0f9ef9d58cabedfb978ff4ccc4a
ayazhafiz/plts
eval.ml
open Language (* Reference store *) type store = term list let emptystore = [] let extend_store store v = (List.length store, store @ [ v ]) let lookup_store store loc = List.nth store loc let update_store store loc v = let rec f toGo store = let rest = List.tl store in match toGo with 0 -> v :: rest | _...
null
https://raw.githubusercontent.com/ayazhafiz/plts/59b3996642f4fd5941c96a4987643303acc3dee6/tapl/25-systemf/eval.ml
ocaml
Reference store Now substitute the concrete type for the type name we unpacked.
open Language type store = term list let emptystore = [] let extend_store store v = (List.length store, store @ [ v ]) let lookup_store store loc = List.nth store loc let update_store store loc v = let rec f toGo store = let rest = List.tl store in match toGo with 0 -> v :: rest | _ -> List.hd store :: f...
870260c0bd58b77c81ae6e5870035a67638cda9422eb86eb92a5df2ccbe17ff2
jimcrayne/jhc
case-alt-where.hs
module ShouldCompile where foo x = case x of y -> d where d = y
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/fixed_bugs/case-alt-where.hs
haskell
module ShouldCompile where foo x = case x of y -> d where d = y
2e21e6389c9fc60f4123cc071b225738e3e3da98c008cd81785718e2a2a51933
jeapostrophe/mode-lambda
core.rkt
#lang racket/base (require racket/match racket/contract/base racket/list (except-in ffi/unsafe ->) mode-lambda/util) (define (ushort? x) (and (exact-nonnegative-integer? x) (<= 0 x 65535))) (define PALETTE-DEPTH 16) (struct compiled-sprite-db (atlas-size atlas-bs spr->i...
null
https://raw.githubusercontent.com/jeapostrophe/mode-lambda/64b5ae81f457ded7664458cd9935ce7d3ebfc449/mode-lambda/core.rkt
racket
- - -the-gluperspective-matrix-and-other-opengl-matrix-maths/ - -to-convert-projected-points-to-screen-coordinatesviewport-matrix - -advanced-lessons/perspective-and-orthographic-projection-matrix/perspective-projection-matrix/ - - -an-snes-mode-7-affine-transform-effect-in-pygame - -transforming-3d-to-2d - -...
#lang racket/base (require racket/match racket/contract/base racket/list (except-in ffi/unsafe ->) mode-lambda/util) (define (ushort? x) (and (exact-nonnegative-integer? x) (<= 0 x 65535))) (define PALETTE-DEPTH 16) (struct compiled-sprite-db (atlas-size atlas-bs spr->i...
81a331fc25fac72f926072e47cae27e0f72b0c82f0b4a34281cc0f9336e3c846
gibiansky/jupyter-haskell
Install.hs
| Module : Jupyter . Test . Install Description : Tests for the Jupyter . Install module . Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : stable Portability : POSIX Module : Jupyter.Test.Install Description : Tests for the Jupyter.Install module. Copyright :...
null
https://raw.githubusercontent.com/gibiansky/jupyter-haskell/711502f4e91b9866353c71077a069df7d66f98b3/tests/Jupyter/Test/Install.hs
haskell
# LANGUAGE OverloadedStrings # Imports from 'base' Imports from 'directory' Imports from 'bytestring' Imports from 'aeson' Imports from 'text' Imports from 'extra' Imports from 'silently' Imports from 'tasty' Imports from 'jupyter' | Test that version numbers from jupyter --version are properly parsed. | Tes...
| Module : Jupyter . Test . Install Description : Tests for the Jupyter . Install module . Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : stable Portability : POSIX Module : Jupyter.Test.Install Description : Tests for the Jupyter.Install module. Copyright :...
567700fd66882a24f1364997134b5c92d79e932ae4973aa5d00fecea9612e2f7
fdopen/ppx_cstubs
extract_c.mli
This file is part of ppx_cstubs ( ) * Copyright ( c ) 2018 - 2019 fdopen * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version...
null
https://raw.githubusercontent.com/fdopen/ppx_cstubs/5d5ce9b7cf45d87bb71c046a76d30c17ec6075e5/src/internal/extract_c.mli
ocaml
This file is part of ppx_cstubs ( ) * Copyright ( c ) 2018 - 2019 fdopen * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version...
3b025bb45ffcaa1956ddc5df8048af11590692ffdc592b3e9b5cc5bc9a62255d
vyzo/gerbil
gx-init-static-exe.scm
-*- -*- ( C ) vyzo at hackzen.org static executable module stub (##namespace ("")) (declare (block) (standard-bindings) (extended-bindings)) (define (__gx#display-exception e port) (cond ((method-ref e 'display-exception) => (lambda (f) (f e port))) (else (##default-display-exception e po...
null
https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/gerbil/boot/gx-init-static-exe.scm
scheme
-*- -*- ( C ) vyzo at hackzen.org static executable module stub (##namespace ("")) (declare (block) (standard-bindings) (extended-bindings)) (define (__gx#display-exception e port) (cond ((method-ref e 'display-exception) => (lambda (f) (f e port))) (else (##default-display-exception e po...
c68919926f07ce3f990d308837aeccda3b5a35a1ba1973dd90ec48aee193793f
chumsley/jwacs
lex-javascript.lisp
;;;; lex-javascript.lisp ;;; Contains the definition of the Javascript lexer used by the parser , ;;; as well as some lookup structures for dealing with tokens. ;;; Unit tests are in tests/test-lexer.lisp. ;;; Copyright ( c ) 2005 ;;; See LICENSE for full licensing details. ;;; (in-package :jwacs) ;...
null
https://raw.githubusercontent.com/chumsley/jwacs/c25adb3bb31fc2dc6e8c8a58346949ee400633d7/lex-javascript.lisp
lisp
lex-javascript.lisp as well as some lookup structures for dealing with tokens. Unit tests are in tests/test-lexer.lisp. See LICENSE for full licensing details. Token definitions Token lookups Compound assignment operators These represent operations (addition, etc.) rather than just text tokens. T...
Contains the definition of the Javascript lexer used by the parser , Copyright ( c ) 2005 (in-package :jwacs) (defmacro deftoken (symbol &optional key token-type) "Add a token's symbol and possibly string to the appropriate lookups. Different actions will be taken depending upon the TOKEN-TYPE: ...
38b77526f75cd5800d5c1db2e22899bdf18dd305397aec72e85a81a72ef97ea8
futurice/haskell-mega-repo
API.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOperators #-} module Futurice.App.HoursApi.API where import Futurice.Prelude import Futurice.Servant (SSOUser...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/hours-api/src/Futurice/App/HoursApi/API.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators #
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # module Futurice.App.HoursApi.API where import Futurice.Prelude import Futurice.Servant (SSOUser) import Prelude () import Servant import FUM.Types.Login (Login) import Futurice.App.HoursApi.Types im...
774e9acb29ad731fcb9a51ce7ae6467b6191af06830a3f88149913369ef78a3a
janestreet/incr_dom_partial_render
table.mli
open! Core open! Import include Table_intf.Table module Default_sort_spec : sig (** A sortable value. The sorting order of a row is specified by specifying a conversion to this type. Note that typically, all values will be injected into just one of these variant constructors. The sorting between ...
null
https://raw.githubusercontent.com/janestreet/incr_dom_partial_render/82be6e4688d8491c9a71a2aa7d1591da7aa61eee/src/table.mli
ocaml
* A sortable value. The sorting order of a row is specified by specifying a conversion to this type. Note that typically, all values will be injected into just one of these variant constructors. The sorting between different constructors is considered arbitrary.
open! Core open! Import include Table_intf.Table module Default_sort_spec : sig module Sort_key : sig type t = | String of string | Float of float | Integer of Int63.t | Null [@@deriving compare, sexp] include Table_intf.Sort_key with type t := t end module Sort_dir : sig ...
18ced8670ac4cd6b46c164b1376424cc85905bbf15648b49a560ab70534b5621
DavidAlphaFox/aiwiki
aiwiki_admin_page_controller.erl
-module(aiwiki_admin_page_controller). -export([init/2]). init(Req,State)-> Action = cowboy_req:binding(action,Req), init(Action,Req,State). init(<<"edit.php">>,#{method := <<"GET">> } = Req,State) -> Form = aiwiki_helper:build_form(Req,<<"POST">>), QS = cowboy_req:parse_qs(Req), ID = proplists:get...
null
https://raw.githubusercontent.com/DavidAlphaFox/aiwiki/3a2a78668d4a708fda4af35430f25a69c4b91a7e/src/controller/aiwiki_admin_page_controller.erl
erlang
-module(aiwiki_admin_page_controller). -export([init/2]). init(Req,State)-> Action = cowboy_req:binding(action,Req), init(Action,Req,State). init(<<"edit.php">>,#{method := <<"GET">> } = Req,State) -> Form = aiwiki_helper:build_form(Req,<<"POST">>), QS = cowboy_req:parse_qs(Req), ID = proplists:get...
51dc09ce2dc68e0193f032592a722ae755849be44b9c03c5ba5467674772ce99
inaimathi/cl-notebook
evaluators.lisp
(in-package #:cl-notebook) (defvar *front-end-eval-thread* nil) (defmethod front-end-eval (cell-language cell-type (contents string)) "A cell that fits no other description returns an error" (list (alist :stdout "" :warnings nil ; Without these, :json encodes this as an array rather than an object :valu...
null
https://raw.githubusercontent.com/inaimathi/cl-notebook/c9879b2d390c02bfe4ccaf245a342dd346040322/src/evaluators.lisp
lisp
Without these, :json encodes this as an array rather than an object Without these, :json encodes this as an array rather than an object
(in-package #:cl-notebook) (defvar *front-end-eval-thread* nil) (defmethod front-end-eval (cell-language cell-type (contents string)) "A cell that fits no other description returns an error" (list (alist :values (list (alist :type 'error :value (alist 'condition-type "UNKNOWN-LANGUAGE:TYPE-COMBINATION" ...
0222720bf62c4988386ba0baf86542407fef9d137d2142668a4f7cf9da73061c
mtravers/wuwei
wu.lisp
(in-package :wu) ;;; +=========================================================================+ | Copyright ( c ) 2009 - 2011 and CollabRx , Inc | ;;; | | | Released under the MIT Open Source License ...
null
https://raw.githubusercontent.com/mtravers/wuwei/c0968cca10554fa12567d48be6f932bf4418dbe1/src/wu.lisp
lisp
+=========================================================================+ | | | -license.php | | | | Permission is hereby granted, free of charge, t...
(in-package :wu) | Copyright ( c ) 2009 - 2011 and CollabRx , Inc | | Released under the MIT Open Source License | | " Software " ) , to deal in the Software without restriction , including | | distribute , sublicense , and/or sell copies of the Software ,...
8381c93982c91930e5df66a4faaf8607a5c8157157b87a9c564a115f7967131b
polysemy-research/polysemy-zoo
More.hs
# LANGUAGE RecursiveDo # module Polysemy.Reader.More ( module Polysemy.Reader -- * Interpretations , runReaderFixSem ) where import Polysemy import Polysemy.Reader import Polysemy.Fixpoint ------------------------------------------------------------------------------ -- | Runs a 'Reader' effect by runni...
null
https://raw.githubusercontent.com/polysemy-research/polysemy-zoo/eb0ce40e4d3b9757ede851a3450c05cc42949b49/src/Polysemy/Reader/More.hs
haskell
* Interpretations ---------------------------------------------------------------------------- | Runs a 'Reader' effect by running a monadic action /once/, after the 'Sem' has completed, and then providing the result to each request recursively.
# LANGUAGE RecursiveDo # module Polysemy.Reader.More ( module Polysemy.Reader , runReaderFixSem ) where import Polysemy import Polysemy.Reader import Polysemy.Fixpoint runReaderFixSem :: forall i r a . Member Fixpoint r => Sem r i -> Sem (Reader i ': r) a ...
65901388297f3e87ada790318ad065a8e51fd659c1f1ee623f7b1c6a2671892b
jimrthy/frereth
session.clj
(ns tracker.model.session (:require [clojure.pprint :refer [pprint]] [clojure.spec.alpha :as s] [com.fulcrologic.fulcro.server.api-middleware :as fmw] [com.wsscode.pathom.connect :as pc :refer [defresolver defmutation]] [datomic.api :as d] [ghostwheel.core :refer [>defn => | ?]] [tracker.model.fr...
null
https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/racing/sonic-forces/tracker/src/main/tracker/model/session.clj
clojure
(ns tracker.model.session (:require [clojure.pprint :refer [pprint]] [clojure.spec.alpha :as s] [com.fulcrologic.fulcro.server.api-middleware :as fmw] [com.wsscode.pathom.connect :as pc :refer [defresolver defmutation]] [datomic.api :as d] [ghostwheel.core :refer [>defn => | ?]] [tracker.model.fr...
e80e1ac0bdf8fbe7d766c6f44b8c200258bb3176c3a08dffd01be24c10e30fa0
kind2-mc/kind2
C2I.mli
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
null
https://raw.githubusercontent.com/kind2-mc/kind2/c601470eb68af9bd3b88828b04dbcdbd6bd6bbf5/src/c2i/C2I.mli
ocaml
* C2I is a machine-learning-based invariant generation technique. See documentation in source file for more details.
This file is part of the Kind 2 model checker . Copyright ( c ) 2015 by the Board of Trustees of the University of Iowa 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 a...
746221f22e683eb12ecbd74e40ce5e135a2a9fba48ab295227b0b7539b249d60
TrustInSoft/tis-kernel
builtins_lib_tis_aux.ml
(**************************************************************************) (* *) This file is part of . (* *) Copyright ( C ) 2016 - 201...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/value/domains/cvalue/builtins_lib_tis_aux.ml
ocaml
************************************************************************ ...
This file is part of . Copyright ( C ) 2016 - 2017 is released under GPLv2 open Abstract_interp let register_builtin = Builtins.register_builtin let dkey = Value_parameters.register_category "imprecision" let optionally_set_errno errno state...
392e07dba32c7269cbc1af523a6208df29238066159fc10d4ab6a5979a40c788
nuprl/gradual-typing-performance
norm.rkt
#lang racket/base (module norm typed/racket (define-type Point% (Class (field [x Real] [y Real]))) (define-type Point (Instance Point%)) (: norm (-> Point Real)) (define (norm p) (+ (abs (get-field x p)) (abs (get-field y p)))) (provide Point norm)) (module user racket (require (submod "...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/paper/jfp-2016/src/norm.rkt
racket
#lang racket/base (module norm typed/racket (define-type Point% (Class (field [x Real] [y Real]))) (define-type Point (Instance Point%)) (: norm (-> Point Real)) (define (norm p) (+ (abs (get-field x p)) (abs (get-field y p)))) (provide Point norm)) (module user racket (require (submod "...
8bc7fe7eea9e1eb7241fdebe09de976219d8e4378da7f49222e22ad74d70c4f9
re-path/studio
animate.cljs
(ns repath.studio.tools.animate (:require [repath.studio.tools.base :as tools])) (derive :animate ::tools/animation) (defmethod tools/properties :animate [] {:description "The SVG <animate> element provides a way to animate an attribute of an element over time." :attrs [:hre...
null
https://raw.githubusercontent.com/re-path/studio/0841056ef12689cffb226a99a9dfe58d7f2c4778/src/repath/studio/tools/animate.cljs
clojure
(ns repath.studio.tools.animate (:require [repath.studio.tools.base :as tools])) (derive :animate ::tools/animation) (defmethod tools/properties :animate [] {:description "The SVG <animate> element provides a way to animate an attribute of an element over time." :attrs [:hre...
52da4a635387faf9775853f3f11ecda0f132f5024542517a82df82e16290c9a7
avsm/mirage-duniverse
pkg.ml
#user "topfind" #require "topkg-jbuilder.auto"
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/webmachine/pkg/pkg.ml
ocaml
#user "topfind" #require "topkg-jbuilder.auto"
c532366b20aa9fe3a33ca6aebf7e34b0a168f47f316f627668d7fae40f374e5f
tnelson/Forge
smallsigstest.rkt
#lang forge /*$ ; there is a sig node, with a field graph of type (set node). (we are not defaulting to one; might in fact later require explicit set/one) (declare-sig node ((graph node))) ( declare - one - sig left ) ( declare - one - sig right ) acyclic graph ( side node : has acyclic relation pred ; is this fa...
null
https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/examples/smallsigstest.rkt
racket
there is a sig node, with a field graph of type (set node). (we are not defaulting to one; might in fact later require explicit set/one) is this faster ? ) anywhere from 5 - 6 nodes
#lang forge /*$ (declare-sig node ((graph node))) ( declare - one - sig left ) ( declare - one - sig right ) (fact (no (& iden (^ graph)))) find instance with a path of length 2 (pred pathlen2 (some ([n1 node] [n2 node]) (in n1 (join n2 (^ graph))))) ( run " DAG " ) (run "DAG with path length >= 2" (some ([n1 ...
261b8b51c1bacf0724bff9f2584d48117ed0859bdea89c04805516eba4889ad7
danielsz/certificaat
server.clj
(ns certificaat.plugins.server (:require [certificaat.kung-fu :as k] [immutant.web :refer [run stop]])) (def stop-server stop ) (defn handler [challenges] (fn [request] (loop [xs challenges] (if (= (:uri request) (str "/.well-known/acme-challenge/" (.getToken (first xs)))) {:status 200 ...
null
https://raw.githubusercontent.com/danielsz/certificaat/955429f6303da9a687cf636d93437281f43ddb71/src/certificaat/plugins/server.clj
clojure
(ns certificaat.plugins.server (:require [certificaat.kung-fu :as k] [immutant.web :refer [run stop]])) (def stop-server stop ) (defn handler [challenges] (fn [request] (loop [xs challenges] (if (= (:uri request) (str "/.well-known/acme-challenge/" (.getToken (first xs)))) {:status 200 ...
d60d6928258674a6b74b11737d4824fd8d5eea8712cdb96fb5cb1cee2ac504af
democracyworks/imbarcode
characters.cljc
(ns imbarcode.characters "Handles conversion from codewords to characters. See section 3.2.5 of the IMb spec." (:require [imbarcode.character-conversion :refer [codeword->character]])) (defn codewords->characters-base [codewords] (map codeword->character codewords)) (defn adjust-character [character fcs-bit]...
null
https://raw.githubusercontent.com/democracyworks/imbarcode/8b4a821a42238c0bd62f5e19fbb51462741b4b9f/src/cljc/imbarcode/characters.cljc
clojure
(ns imbarcode.characters "Handles conversion from codewords to characters. See section 3.2.5 of the IMb spec." (:require [imbarcode.character-conversion :refer [codeword->character]])) (defn codewords->characters-base [codewords] (map codeword->character codewords)) (defn adjust-character [character fcs-bit]...
bb2e93ed25bf5c790272795802252a9c8e50a9e2485bef003fdab3ed16aa8956
nklein/Roto-Mortar
types.lisp
(defpackage :x3d (:use :common-lisp) (:export #:x3d-property #:name #:x3d-name #:value #:x3d-value #:x3d-mesh #:texture-coordinate-indexes #:x3d-texture-coordinate-indexes #:coordinate-indexes #:x3d-co...
null
https://raw.githubusercontent.com/nklein/Roto-Mortar/dd3bb63aa6a377ee4b359921c8d46a94d2847227/src/types.lisp
lisp
(defpackage :x3d (:use :common-lisp) (:export #:x3d-property #:name #:x3d-name #:value #:x3d-value #:x3d-mesh #:texture-coordinate-indexes #:x3d-texture-coordinate-indexes #:coordinate-indexes #:x3d-co...
3f900736545130f552ba430ef7b9b81c0e839638f710ae69ed7d1bc09b25b256
MLstate/opalang
jsWalk.ml
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/jslang/jsWalk.ml
ocaml
Refreshing the annotations of an expression or a statement
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
32dfa51901b619004c5d0490f01cca2baa14210df128dfa625a1c4777af4c870
spurious/sagittarius-scheme-mirror
mqtt.scm
-*- mode : scheme ; coding : utf-8 -*- ;;; ;;; net/mq/mqtt.scm - MQTT v3.1.1 ;;; Copyright ( c ) 2010 - 2014 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Redistri...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/net/mq/mqtt.scm
scheme
coding : utf-8 -*- net/mq/mqtt.scm - MQTT v3.1.1 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 above copyright notice, this list of condition...
Copyright ( c ) 2010 - 2014 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (net mq mqtt) (export :all) ...
f0533d7cdc52fa907a7af9c0be556592fe505ab565194160621dd8aaef258749
danlentz/clj-uuid
api_test.clj
(ns clj-uuid.api-test (:refer-clojure :exclude [uuid?]) (:require [clojure.test :refer :all] [clj-uuid :refer :all]) (:import (java.lang IllegalArgumentException))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Protocol Tests ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/danlentz/clj-uuid/5cbd2662dd3fce90ec0b8354e794ca6a1b5ce44c/test/clj_uuid/api_test.clj
clojure
Protocol Tests Predicate Tests
(ns clj-uuid.api-test (:refer-clojure :exclude [uuid?]) (:require [clojure.test :refer :all] [clj-uuid :refer :all]) (:import (java.lang IllegalArgumentException))) (deftest check-unique-identifier-protocol (testing "v0 uuid protocol..." (let [tmpid +null+] (is (= (get-word-high ...
4392bb735378c28679fc3d1b1920f8e11281d8240d4397e79174f3ff45c177c8
abdulapopoola/SICPBook
Ex2.69.scm
#lang planet neil/sicp ;;Requires code from earlier exercises (define (successive-merge pairs) (if (= (length pairs) 1) (car pairs) (successive-merge (adjoin-set (make-code-tree (car pairs) (cadr pairs)) (cddr pairs)))))
null
https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.3/Ex2.69.scm
scheme
Requires code from earlier exercises
#lang planet neil/sicp (define (successive-merge pairs) (if (= (length pairs) 1) (car pairs) (successive-merge (adjoin-set (make-code-tree (car pairs) (cadr pairs)) (cddr pairs)))))
e9c529233168b249f0193003199cbda411d8f2577ae5e54f17c607dfc0dea30b
mbillingr/lisp-in-small-pieces
ase-interpreter.scm
(import (builtin core) (libs utils) (libs book)) (define (evaluate e r s k) (if (atom? e) (if (symbol? e) (evaluate-variable e r s k) (evaluate-quote e r s k)) (case (car e) ((quote) (evaluate-quote (cadr e) r s k)) ((if) (evalua-if (cadr e) (caddr...
null
https://raw.githubusercontent.com/mbillingr/lisp-in-small-pieces/b2b158dfa91dc95d75af4bd7d93f8df22219047e/04-side-effects/ase-interpreter.scm
scheme
assume (= (length a*) (length v*))
(import (builtin core) (libs utils) (libs book)) (define (evaluate e r s k) (if (atom? e) (if (symbol? e) (evaluate-variable e r s k) (evaluate-quote e r s k)) (case (car e) ((quote) (evaluate-quote (cadr e) r s k)) ((if) (evalua-if (cadr e) (caddr...
7de7a390c4a513129d8414bb6846d0d86795de74d3770e628999f229f4c903a5
mbutterick/aoc-racket
star2.rkt
2335049 ../.. => #.#/###/#.# #./.. => ..#/.../### ##/.. => .../.##/### .#/#. => #.#/##./.#. ##/#. => #../#.#/..# ##/## => #.#/#../### .../.../... => .###/..##/.#../###. #../.../... => ##.#/.###/#.../##.# .#./.../... => ..../#.##/..../.#.# ##./.../... => ..#./#.../#.../.### #.#/.../... => ..##/####/#.#./..## ###/.../....
null
https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2017/d21/star2.rkt
racket
2335049 ../.. => #.#/###/#.# #./.. => ..#/.../### ##/.. => .../.##/### .#/#. => #.#/##./.#. ##/#. => #../#.#/..# ##/## => #.#/#../### .../.../... => .###/..##/.#../###. #../.../... => ##.#/.###/#.../##.# .#./.../... => ..../#.##/..../.#.# ##./.../... => ..#./#.../#.../.### #.#/.../... => ..##/####/#.#./..## ###/.../....
1e8dcc68e3cd70fda5b4e20af1267af7f747f8699b807016613cc12c719d6cbd
keera-studios/keera-hails
Action.hs
-- | Copyright : ( C ) Keera Studios Ltd , 2020 -- License : BSD3 Maintainer : -- -- Abstract definition of an operator button in a calculator. module Data.Action where -- | Operator button in a calculator. We support both binary number -- operators and other operatots that whould return the final value....
null
https://raw.githubusercontent.com/keera-studios/keera-hails/bf069e5aafc85a1f55fa119ae45a025a2bd4a3d0/demos/keera-hails-demos-small/src/Data/Action.hs
haskell
| License : BSD3 Abstract definition of an operator button in a calculator. | Operator button in a calculator. We support both binary number operators and other operatots that whould return the final value.
Copyright : ( C ) Keera Studios Ltd , 2020 Maintainer : module Data.Action where data Action = Equals | Clear deriving Eq
0ce2c7dab1bd694a31ac7fd4cf5d6297e7c97192c576891a5941ea085706c9dd
lemonidas/Alan-Compiler
CopyPropagation.mli
val copy_propagation : OptimizationSupport.flowgraph_t -> unit
null
https://raw.githubusercontent.com/lemonidas/Alan-Compiler/bbedcbf91028d45a2e26839790df2a1347e8bc52/CopyPropagation.mli
ocaml
val copy_propagation : OptimizationSupport.flowgraph_t -> unit
a05635304893db805881e61bda1fed26274173712419d828fc7ae4118663d635
protz/mezzo
KindPrinter.ml
(* These printers are used purely for debugging purposes. *) open MzPprint open Kind open TypeCore open Types open TypePrinter (* Prints an abstract data type. Very straightforward. *) let print_abstract_type_def print_env name kind = string "abstract" ^^ space ^^ print_name print_env name ^^ space ^^ colon ^^ spac...
null
https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/typing/KindPrinter.ml
ocaml
These printers are used purely for debugging purposes. Prints an abstract data type. Very straightforward. Prints a data type defined in the global scope. Assumes [print_env] has been properly populated. Turn the list of parameters into letters The whole blurb The whole blurb This function prints the co...
open MzPprint open Kind open TypeCore open Types open TypePrinter let print_abstract_type_def print_env name kind = string "abstract" ^^ space ^^ print_name print_env name ^^ space ^^ colon ^^ space ^^ print_kind kind ;; let print_nameiance = function | Invariant -> empty | Covariant -> plus | ...
b873b48bd81ffd12a768858b27df1ecfd778e09bbbb87ceea73f27da4a7683f1
pol-is/polisMath
density_plotting.clj
(ns density-plotting "# Density plotting test This doesn't currently work yet, but its an attempt at visualizing a point clouds as a contour map of its density distribution. The example I'm working from for vega is: -plot/. Unfortunately, this is vega, not vega-lite, and the vizard lib at the moment only plots...
null
https://raw.githubusercontent.com/pol-is/polisMath/dfe233e8c9207c2ce11e1379286ad0cf0f732067/dev/density_plotting.clj
clojure
{:name "contours" :source "main" :transform [{:type "contour"}]}] (viz/to-json plot-spec-2)
(ns density-plotting "# Density plotting test This doesn't currently work yet, but its an attempt at visualizing a point clouds as a contour map of its density distribution. The example I'm working from for vega is: -plot/. Unfortunately, this is vega, not vega-lite, and the vizard lib at the moment only plots...
a707547415ac7fc961f18f2e43942cf362710f4d31fb25c9b5a3e08f756005d3
pcostanza/mop-features
all-function-tests.lisp
(let ((gf (make-instance 'standard-generic-function :lambda-list #-allegro '(a b c &optional o) #+allegro '(a b c)))) (when (equal (generic-function-argument-precedence-order gf) '(a b c)) (acknowledge :initialize-lambda-list-initializes-a...
null
https://raw.githubusercontent.com/pcostanza/mop-features/a967752c885285b74473b940103f8cb2872aced8/tests/all-function-tests.lisp
lisp
(mapc #'acknowledge-function '("GENERIC-FUNCTION-ARGUMENT-PRECEDENCE-ORDER" "GENERIC-FUNCTION-DECLARATIONS" "GENERIC-FUNCTION-LAMBDA-LIST" "GENERIC-FUNCTION-METHOD-CLASS" "GENERIC-FUNCTION-METHOD-COMBINATION" "GENERIC-FUNCTION-METHODS" "GENERIC-FUNCTION-NAME"))
(let ((gf (make-instance 'standard-generic-function :lambda-list #-allegro '(a b c &optional o) #+allegro '(a b c)))) (when (equal (generic-function-argument-precedence-order gf) '(a b c)) (acknowledge :initialize-lambda-list-initializes-a...
1d8d5f0356ac13d3171240b5acfbff4f6f768ef5ecc914ae1bde4ee173d3134d
cloudkj/lambda-ml
regression_test.clj
(ns lambda-ml.regression-test (:require [clojure.test :refer :all] [lambda-ml.core :refer :all] [lambda-ml.regression :refer :all])) (deftest test-linear-regression (let [data [[-2 -1] [1 1] [3 2]] model (make-linear-regression 0.01 0.0 5000) {coe...
null
https://raw.githubusercontent.com/cloudkj/lambda-ml/a470a375d2b94f5e5e623a5e198ac312b018ffb3/test/lambda_ml/regression_test.clj
clojure
(ns lambda-ml.regression-test (:require [clojure.test :refer :all] [lambda-ml.core :refer :all] [lambda-ml.regression :refer :all])) (deftest test-linear-regression (let [data [[-2 -1] [1 1] [3 2]] model (make-linear-regression 0.01 0.0 5000) {coe...
0589c09d67cbbdba3efb6bf644771ddfde783c9473cf4d7cfbacb8602fe487c8
kupl/LearnML
patch.ml
type btree = Empty | Node of (int * btree * btree) let rec mem (n : int) (tree : btree) : bool = match tree with | Empty -> false | Node (a, b, c) -> if a = n then true else if mem n b = true then mem n b else mem n c
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/mem/sub19/patch.ml
ocaml
type btree = Empty | Node of (int * btree * btree) let rec mem (n : int) (tree : btree) : bool = match tree with | Empty -> false | Node (a, b, c) -> if a = n then true else if mem n b = true then mem n b else mem n c
62aa9eb304a2d445f833de89e5a9bbfb349256e6166197efc36c2647427a832b
patricoferris/meio
meio.ml
let run _stdenv exec_args = let argsl = String.split_on_char ' ' exec_args in let executable_filename = List.hd argsl in let argsl = Array.of_list argsl in let tmp_dir = Filename.get_temp_dir_name () in let env = Array.append [| "OCAML_RUNTIME_EVENTS_START=1"; "OCAML_RUNTIME_EVENTS_D...
null
https://raw.githubusercontent.com/patricoferris/meio/e3104e53d4ebc99285348a7854d4de121529376a/src/bin/meio.ml
ocaml
let run _stdenv exec_args = let argsl = String.split_on_char ' ' exec_args in let executable_filename = List.hd argsl in let argsl = Array.of_list argsl in let tmp_dir = Filename.get_temp_dir_name () in let env = Array.append [| "OCAML_RUNTIME_EVENTS_START=1"; "OCAML_RUNTIME_EVENTS_D...
5ab3b6d988adedaeff1c4d8b9c0b80a7d1a54e32b8976d90da887b40e50a36db
astrada/ocaml-extjs
ext_tip_ToolTip.mli
* ToolTip is a Ext.tip . Tip implementation that handl ... { % < p > ToolTip is a < a href="#!/api / Ext.tip . Tip " rel="Ext.tip . Tip " class="docClass">Ext.tip . Tip</a > implementation that handles the common case of displaying a tooltip when hovering over a certain element or elements on the page . It all...
null
https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_tip_ToolTip.mli
ocaml
* {% <p>Invoked before the Component is destroyed.</p> %} * {% <p>Hides this tooltip if visible.</p> %} * See method [t.beforeDestroy] * [of_configs c] casts a config object [c] to an instance of class [t] * [to_configs o] casts instance [o] of class [t] to a config object
* ToolTip is a Ext.tip . Tip implementation that handl ... { % < p > ToolTip is a < a href="#!/api / Ext.tip . Tip " rel="Ext.tip . Tip " class="docClass">Ext.tip . Tip</a > implementation that handles the common case of displaying a tooltip when hovering over a certain element or elements on the page . It all...
a3b1745a54481091134ebd8460b3b3824c8da24bee1cd810236ea44a02f7d922
input-output-hk/nix-tools
StackRepos.hs
# LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # module StackRepos ( doStackRepos , stack2nix ) where import Data.Aeson (ToJSON(..)) import Data.Aeson.Encode.Pretty (encodePretty) import qualified Data.ByteString.Lazy as LBS (writeFile) import Dat...
null
https://raw.githubusercontent.com/input-output-hk/nix-tools/c9c10ab889a7b7f2f5f4bb71e8786fc01d49e53e/lib/StackRepos.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE DeriveGeneric # module StackRepos ( doStackRepos , stack2nix ) where import Data.Aeson (ToJSON(..)) import Data.Aeson.Encode.Pretty (encodePretty) import qualified Data.ByteString.Lazy as LBS (writeFile) import Data.Yaml (decodeFileEither) import G...
e63ca106679946c7e9f71fb73bb9a7a855e4da01d7cc1fe2cdffb0cd349537cb
themattchan/core
Utils.hs
module Core.Utils where import Data.Function import Data.Maybe import Data.Monoid hiding ((<>)) import Data.Semigroup import Text.PrettyPrint hiding ((<>)) import Control.Lens ((&), (.~), (<>~)) import Control.Lens.TH import Generics.Deriving.Monoid (memptydefault, mappenddefault) import GHC.Generics (Generic) -------...
null
https://raw.githubusercontent.com/themattchan/core/ba7e8f62cffc463ddf0143f25a5b692f77d474e1/src/Core/Utils.hs
haskell
------------------------------------------------------------------------------ * Misc utilities ------------------------------------------------------------------------------ * Appendix A: Heap data type and associated functions
module Core.Utils where import Data.Function import Data.Maybe import Data.Monoid hiding ((<>)) import Data.Semigroup import Text.PrettyPrint hiding ((<>)) import Control.Lens ((&), (.~), (<>~)) import Control.Lens.TH import Generics.Deriving.Monoid (memptydefault, mappenddefault) import GHC.Generics (Generic) vcat' ...
0d236de9f60d291aac2cd730bd2885b9a63eda24a608f5dbce51cf81cb3bd645
tisnik/clojure-examples
core_test.clj
; ( C ) Copyright 2016 , 2020 , 2021 ; ; All rights reserved. This program and the accompanying materials ; are made available under the terms of the Eclipse Public License v1.0 ; which accompanies this distribution, and is available at -v10.html ; ; Contributors: ; (ns consume-messages-2.core-t...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/a5f9d6119b62520b05da64b7929d07b832b957ab/kafka-consume-messages-2/test/consume_messages_2/core_test.clj
clojure
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors:
( C ) Copyright 2016 , 2020 , 2021 -v10.html (ns consume-messages-2.core-test (:require [clojure.test :refer :all] [consume-messages-2.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
39c04ff3276a8c5c6f705a0e953c80d62a5b1f050ec99b811a520b56a7921961
well-typed-lightbulbs/ocaml-esp32
persistent_env.ml
(**************************************************************************) (* *) (* OCaml *) (* *) , proj...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/typing/persistent_env.ml
ocaml
************************************************************************ OCaml ...
, projet Gallium , INRIA Rocquencourt , projet , INRIA Saclay Copyright 2019 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Misc open Cmi_format module Consistbl = Cons...
001e3e0e0d6d7874737afafba510325511294a8615ca0733e8d400527aa88fce
fizruk/http-api-data
HttpApiData.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DefaultSignatures #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE DeriveFoldable #-} # LANGUAGE DeriveFunctor # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleInstances # {-# LANGUAGE KindSignatures #-} {-# LANGUAGE Overloade...
null
https://raw.githubusercontent.com/fizruk/http-api-data/5408b078d1ee960309a9fc6141b7e14bc903b3a0/src/Web/Internal/HttpApiData.hs
haskell
# LANGUAGE CPP # # LANGUAGE DefaultSignatures # # LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveTraversable # # LANGUAGE KindSignatures # # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE Typ...
# LANGUAGE DeriveFunctor # # LANGUAGE FlexibleInstances # values to and from HTTP API data module Web.Internal.HttpApiData where import Prelude () import Prelude.Compat import Control.Applicative (Const(Const)) import Control.Arrow ...
eccd4fe062b89413f3e310280af81718a75b2db1b0ce9a1a5dfed27d2213b1d8
bevuta/pox
smtp.scm
(module pox-mail/smtp (smtp-config smtp-send) (import chicken scheme) (use hato-smtp pox-log) (define-logger log mail smtp) (define smtp-config (make-parameter '())) (define (smtp-send . args) (log (debug) (cons 'mail args)) (let ((failures (apply send-mail (append (smtp-config) args)))) (or (null? failure...
null
https://raw.githubusercontent.com/bevuta/pox/9684d4037573b6c55acf24867c1d50aa8f4ea57e/pox-mail/smtp.scm
scheme
(module pox-mail/smtp (smtp-config smtp-send) (import chicken scheme) (use hato-smtp pox-log) (define-logger log mail smtp) (define smtp-config (make-parameter '())) (define (smtp-send . args) (log (debug) (cons 'mail args)) (let ((failures (apply send-mail (append (smtp-config) args)))) (or (null? failure...
d42cca8bbd1c9d12df0a68c3b84ad877f0113edebcf26820bc8795f0addbafb9
GaloisInc/msf-haskell
Module.hs
-- |Interact with exploits, payloads, encoders, etc. Functionality for -- executing a module with a particular payload is here. module MSF.Module ( module Types.Module , module_exploits , module_auxiliary , module_post , module_payloads , module_encoders , module_nops , module_info , module_options ...
null
https://raw.githubusercontent.com/GaloisInc/msf-haskell/76cee10771f9e9d10aa3301198e09f08bde907be/src/MSF/Module.hs
haskell
|Interact with exploits, payloads, encoders, etc. Functionality for executing a module with a particular payload is here. | List modules installed on server. Silent operation. | List aux modules installed on server. Silent operation. | List of post modules. Silent operation. |List of payload modules. Silent opera...
module MSF.Module ( module Types.Module , module_exploits , module_auxiliary , module_post , module_payloads , module_encoders , module_nops , module_info , module_options , module_compatible_payloads , module_target_compatible_payloads , module_compatible_sessions , module_encode , module_e...
1f19cf9557bfad299fdfbbf86d2801fb648faf8a5145e1eb5ef777fa16b44dab
Twinside/Juicy.Pixels
Types.hs
-- | Module provides basic types for image manipulation in the library. {-# LANGUAGE BangPatterns #-} {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUA...
null
https://raw.githubusercontent.com/Twinside/Juicy.Pixels/ab41b84403699a7f4d290685e690fbaff42ed95f/src/Codec/Picture/Types.hs
haskell
| Module provides basic types for image manipulation in the library. # LANGUAGE BangPatterns # # LANGUAGE CPP # # LANGUAGE DeriveDataTypeable # # LANGUAGE FlexibleContexts # # LANGUAGE Rank2Types # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies ...
# LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # Defined types are used to store all of those _ _ _ _ Image( .. ) , MutableImage( .. ) ...
4852d4fbeda503c513f4d018e0db0cdcd42d81d332402b301dc01fee2ce4847d
craigl64/clim-ccl
fids-pre.lisp
;; See the file LICENSE for the full license governing this code. ;; (defpackage "SYSTEM" (:export "PUSH-PATCH") ) (defmacro sys:push-patch (&rest x) (declare (ignore x)) nil) (defpackage "ALLEGRO" (:nicknames "FRANZ" "EXCL" "CLOS") (:export "MEMQ" "*FASL-DEFAULT-TYPE*" "INTERN-EQL-SPECIALIZER" "NAMED...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/sys/fids-pre.lisp
lisp
See the file LICENSE for the full license governing this code.
(defpackage "SYSTEM" (:export "PUSH-PATCH") ) (defmacro sys:push-patch (&rest x) (declare (ignore x)) nil) (defpackage "ALLEGRO" (:nicknames "FRANZ" "EXCL" "CLOS") (:export "MEMQ" "*FASL-DEFAULT-TYPE*" "INTERN-EQL-SPECIALIZER" "NAMED-FUNCTION" "PURE-STRCAT") ) #+acl86win32 (defvar excl:*FASL-...
69801c0208967d5963b74ec42786645f769dafac7aad69715af40e5f5efa41df
oakes/play-clj.net
net.clj
(ns play-clj.net (:require [play-clj.net-utils :as u]) (:import [org.zeromq ZContext ZMQ ZMQ$Socket]) (:gen-class)) (defn ^:private client-listen! [^ZMQ$Socket socket screen] (try (loop [] (let [topic (.recvStr socket) message (u/read-edn (.recvStr socket))] (when (and topic mes...
null
https://raw.githubusercontent.com/oakes/play-clj.net/36daf280830a4b44e76563ae9457cd25e251c2a9/src/play_clj/net.clj
clojure
destroy the send and receive sockets stop the thread remove from the networks atom if it exists add to the networks atom if it exists return client add to the networks atom if it exists return server
(ns play-clj.net (:require [play-clj.net-utils :as u]) (:import [org.zeromq ZContext ZMQ ZMQ$Socket]) (:gen-class)) (defn ^:private client-listen! [^ZMQ$Socket socket screen] (try (loop [] (let [topic (.recvStr socket) message (u/read-edn (.recvStr socket))] (when (and topic mes...
f774119cb98dc1adfc9cb41450e294cb41b190ee4eeb1f68ee8d6f1c3181635e
orionsbelt-battlegrounds/obb-rules
unit_test.cljc
(ns obb-rules.unit-test (:require [obb-rules.unit :as unit] #?(:clj [clojure.test :refer [deftest testing is]] :cljs [cljs.test :refer-macros [deftest testing is]]))) (deftest existing-unit-types (testing "get-units" (is (= 21 (count (unit/get-units)))))) (defn- test-unit [name code] (let [...
null
https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/test/obb_rules/unit_test.cljc
clojure
(ns obb-rules.unit-test (:require [obb-rules.unit :as unit] #?(:clj [clojure.test :refer [deftest testing is]] :cljs [cljs.test :refer-macros [deftest testing is]]))) (deftest existing-unit-types (testing "get-units" (is (= 21 (count (unit/get-units)))))) (defn- test-unit [name code] (let [...
076f158dac28359d736020e80a847948b50f461548123b0d2f292907b01249e0
binaryage/chromex
history.cljs
(ns chromex.ext.history (:require-macros [chromex.ext.history :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn search* [config query] (gen-wrap :function ::search config query)) (de...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/history.cljs
clojure
-- events -----------------------------------------------------------------------------------------------------------------
(ns chromex.ext.history (:require-macros [chromex.ext.history :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn search* [config query] (gen-wrap :function ::search config query)) (de...
12a0c5c394e27ff1692a1da3c2a0a970dfc43202be7fb1370c1386691a8794fe
Perry961002/SICP
exa3.3.2-queue.scm
;队列的表示方式:将队列表示为一个表,并带有一个指向表的最后序对的指针 front - ptr,返回队头指针 (define (front-ptr queue) (car queue)) rear - ptr,返回队尾指针 (define (rear-ptr queue) (cdr queue)) 修改两个指针 (define (set-front-ptr! queue item) (set-car! queue item)) (define (set-rear-ptr! queue item) (set-cdr! queue item)) ;判断队列是否为空,如果一个队列的前端指针等于末端指针,那么就认为队空 (defin...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap3/example/exa3.3.2-queue.scm
scheme
队列的表示方式:将队列表示为一个表,并带有一个指向表的最后序对的指针 判断队列是否为空,如果一个队列的前端指针等于末端指针,那么就认为队空 选择函数,得到队列前端的数据项 向队列插入数据项
front - ptr,返回队头指针 (define (front-ptr queue) (car queue)) rear - ptr,返回队尾指针 (define (rear-ptr queue) (cdr queue)) 修改两个指针 (define (set-front-ptr! queue item) (set-car! queue item)) (define (set-rear-ptr! queue item) (set-cdr! queue item)) (define (empty-queue? queue) (null? (front-ptr queue))) 构造函数 (define (make-qu...
60f43d85f1bb85b4fa107ee59a3a0e7d56061a8695b7825de906aa5742ab1a45
lambda-fairy/sylvia
Core.hs
# LANGUAGE TemplateHaskell # -- | Module : . Render . Core Copyright : -- -- Maintainer : -- Portability : portable -- -- This module provides the algorithm used to render expressions. module Sylvia.Render.Core ( -- * A function render ) where import Control.Applicative import Data...
null
https://raw.githubusercontent.com/lambda-fairy/sylvia/8c34f8f6e48a2887c6674e048ea73c971acb1657/Sylvia/Render/Core.hs
haskell
| Maintainer : Portability : portable This module provides the algorithm used to render expressions. * A function | Specifies a /rhyme line/: a straight line protruding from the left edge of a bounding box, connecting a variable to the sub-expression that uses it. | The result of a rendering operation. ^ ...
# LANGUAGE TemplateHaskell # Module : . Render . Core Copyright : module Sylvia.Render.Core ( render ) where import Control.Applicative import Data.Foldable (foldMap) import Data.Lens.Common import Data.Lens.Template import Data.List (foldl') import Data.Monoid import Data.Void (Void, va...
4645c8c52fd0e467ed77372a5588f2008c54aa5e92294613c69f5cbc33686644
metametadata/carry
view_model.cljs
(ns app.view-model (:require [app.util :as util] [friend-list.core :as friend-list] [counter.core :as counter] [carry-reagent.core :as carry-reagent])) (def view-model (-> (fn [model] (carry-reagent/track-keys model [:friend-list-visible? :counter-visible?]))...
null
https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/examples/subapps/src/app/view_model.cljs
clojure
(ns app.view-model (:require [app.util :as util] [friend-list.core :as friend-list] [counter.core :as counter] [carry-reagent.core :as carry-reagent])) (def view-model (-> (fn [model] (carry-reagent/track-keys model [:friend-list-visible? :counter-visible?]))...
64b24cb1b6f52ad37f618608449875c73cd0f408aff6f1875c3574aecb9129d4
kenkeiras/EPC
master.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % master:init(). % master:getImages(URLs). % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -module(master). Interface -export([init/0, getImages/1]). %% Debug methods -export([printPendingURLs/0]). %% Internal Exports -export([loop/...
null
https://raw.githubusercontent.com/kenkeiras/EPC/1e903475e1e597fd602158df45c5805a764333bf/src/master.erl
erlang
master:init(). master:getImages(URLs). Debug methods Internal Exports Debug utilities Tells the master to enqueue new URLs. Removes duplicated URLs from incoming ones Removes duplicated URLs from incoming ones Removes URLs already in database Creates slaves to crawl URLs if we have available ...
-module(master). Interface -export([init/0, getImages/1]). -export([printPendingURLs/0]). -export([loop/3, removeDuplicatedURLs/2, printList/1]). -define(SLAVE_LIMIT, 50). -define(PENDING_URLS_LIMIT, 500). Init init() -> process_flag(trap_exit, true), PID = spawn(master, loop, [[], [], 0]), register(mast...
b2cb94024e7916600e9635ec0c0849ca38a3cda0f643ffccc2d54354a17b19f6
puppetlabs/puppetdb
status_test.clj
(ns puppetlabs.puppetdb.status-test (:require [clojure.test :refer :all] [puppetlabs.puppetdb.pdb-routing] [puppetlabs.puppetdb.scf.storage-utils :as sutils] [puppetlabs.puppetdb.testutils :as tu] [puppetlabs.puppetdb.utils :refer [base-url->str-with-prefix]] ...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/status_test.clj
clojure
FIXME: better test
(ns puppetlabs.puppetdb.status-test (:require [clojure.test :refer :all] [puppetlabs.puppetdb.pdb-routing] [puppetlabs.puppetdb.scf.storage-utils :as sutils] [puppetlabs.puppetdb.testutils :as tu] [puppetlabs.puppetdb.utils :refer [base-url->str-with-prefix]] ...
46c1d83457f9ba959ef1ee5c9f849ecd51dd82b1cebdd23805535267d53aa8df
collaborativetrust/WikiTrust
text.mli
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/text.mli
ocaml
* Version number of the code * The type of words * The type of word tokens * start sequence for a title * end sequence for a title * paragraph break sequence * bullet sequence * indentation sequence * normal whitespace, without a newline * whitespace containing a newline char * table tag that needs to be alon...
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 ...
95188dea4bd973872c06a12306d9773360e52df157a41897e8e4a61cff3a9605
NorfairKing/easyspec
Eighteen.hs
# LANGUAGE NoImplicitPrelude # module Eighteen where import Prelude (Bool(..), Maybe(..), (&&), (+), (-), (||), concat, const, drop, map, maybe, not, take) {-# ANN module "HLint: ignore Use foldr" #-} myId :: a -> a myId a = a myPlusPlus :: [a] -> [a] -> [a] myPlusPlus (a:as) bs = a : myPlusPlus as ...
null
https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/examples/runtime/Eighteen.hs
haskell
# ANN module "HLint: ignore Use foldr" #
# LANGUAGE NoImplicitPrelude # module Eighteen where import Prelude (Bool(..), Maybe(..), (&&), (+), (-), (||), concat, const, drop, map, maybe, not, take) myId :: a -> a myId a = a myPlusPlus :: [a] -> [a] -> [a] myPlusPlus (a:as) bs = a : myPlusPlus as bs myPlusPlus [] bs = bs myReverse :: [a] ->...
d61d5733d7cd1c88d9ce18d4c24338d55651e3e8c308044785b197b928a8e77a
ryanpbrewster/haskell
data_recovery.hs
- Your friends decided to make a fun of you . They 've installed a script to - your computer which shuffled all of the words within a text . It was a joke , - so they 've left hints for each sentence which allow you to easily rebuild - your data . The challenge is to write a program which reconstructs each ...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/data_recovery.hs
haskell
Input-parsing nonsense
- Your friends decided to make a fun of you . They 've installed a script to - your computer which shuffled all of the words within a text . It was a joke , - so they 've left hints for each sentence which allow you to easily rebuild - your data . The challenge is to write a program which reconstructs each ...
ec2078b0fc5ad8b289e3de62199842a5f6fe75a145969f2ded0f15b657146082
rizo/snowflake-os
closure.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/plugins/ocamlopt.opt/asmcomp/closure.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ open Misc open Asttypes open ...
2af63c2ed76b5059623f72ef471982ee60fb9f302a797be6eb2a18af74422995
tonymorris/fp-course
Loop.hs
module Network.Server.TicTacToe.Loop where import Prelude hiding (mapM_, catch) import System.IO(BufferMode(..)) import Network(PortID(..), sClose, withSocketsDo, listenOn) import Data.IORef(IORef, newIORef, readIORef) import Data.Foldable(Foldable, mapM_) import Control.Applicative(Applicative, pure) import Control.M...
null
https://raw.githubusercontent.com/tonymorris/fp-course/73a64c3d4d0df58654a1a9a0ee9d9b11c3818911/projects/NetworkServer/haskell/src/Network/Server/TicTacToe/Loop.hs
haskell
server initialise client accepted (pre) initial state per-client client accepted (post) read line from client server initialise client accepted (pre) initial state client accepted (post) read line from client server initialise initial state per-client server initialise initial state client accepted (po...
module Network.Server.TicTacToe.Loop where import Prelude hiding (mapM_, catch) import System.IO(BufferMode(..)) import Network(PortID(..), sClose, withSocketsDo, listenOn) import Data.IORef(IORef, newIORef, readIORef) import Data.Foldable(Foldable, mapM_) import Control.Applicative(Applicative, pure) import Control.M...
bf65050f4feeaeb16fc1bcb34853e61ca68d63ad4bdc67b418714b820ecf1713
nathell/skyscraper
cache.clj
;;;; Skyscraper - Cache backends (ns skyscraper.cache (:refer-clojure :exclude [load load-string]) (:require [clojure.edn :as edn] [clojure.java.io :as io]) (:import [java.io Closeable InputStream OutputStream])) ;;; Netstrings (let [bytes-type (type (byte-array []))] (defn- byte-array? [item] ...
null
https://raw.githubusercontent.com/nathell/skyscraper/4ed589fc7cb3f15cf5080aa45d1ed066dd108e7f/src/skyscraper/cache.clj
clojure
Skyscraper - Cache backends Netstrings Actual cache filesystem under a specific directory (root-dir). The blobs are stored as netstrings (), filenames correspond to the stored keys. root-dir must end in a path separator (/).
(ns skyscraper.cache (:refer-clojure :exclude [load load-string]) (:require [clojure.edn :as edn] [clojure.java.io :as io]) (:import [java.io Closeable InputStream OutputStream])) (let [bytes-type (type (byte-array []))] (defn- byte-array? [item] (= (type item) bytes-type))) (defn- write-net...