_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
c0887a018df278705002c7c57360d5e3e3c426f4147e768c9cddfa7c8eeb2c87
cmsc430/www
compile-ops.rkt
#lang racket (provide (all-defined-out)) (require "ast.rkt" "types.rkt" "utils.rkt" a86/ast) (define rax 'rax) ; return 32 - bit load / store (define rbx 'rbx) ; heap (define rdi 'rdi) ; arg1 (define rsi 'rsi) ; arg2 (define rdx 'rdx) ; arg3 (define r8 'r8) ; scratch (define r9 'r9) ; scratch (define r10 'r10) ;...
null
https://raw.githubusercontent.com/cmsc430/www/264b7961b3b9490fdff253ffeded8d54fcb3f4d4/langs/mountebank/compile-ops.rkt
racket
return heap arg1 arg2 arg3 scratch scratch scratch save across call to memcpy stack pad (non-volatile) stack Op0 -> Asm Op1 -> Asm Asm Copy sized array of characters pointed to by rax dst src len #words = 1 + (len+1)/2 rbx should be preserved by memcpy (Mov rbx rax) ; dst is returned, install as hea...
#lang racket (provide (all-defined-out)) (require "ast.rkt" "types.rkt" "utils.rkt" a86/ast) 32 - bit load / store (define (compile-op0 p) (match p ['void (seq (Mov rax val-void))] ['read-byte (seq pad-stack (Call 'read_byte) unpad-stack)] ['peek-byte (se...
6d5e6ba193cd468c096a7c4ef9cc0345c3ee9860d99d3423483b20aad946ae48
2600hz/kazoo
kzd_conferences.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_conferences.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(kzd_conferences). -export([new/0]). -export([bridge_password/1, bridge_password/2, set_bridge_password/2]...
2a59ac799c73d9309b1a99d0fec9d5bd60b33cfd6918764bcec4f275a17596fe
finnishtransportagency/harja
raportti.cljs
(ns harja.ui.raportti "Harjan raporttielementtien HTML näyttäminen. Harjan raportit ovat Clojuren tietorakenteita, joissa käytetään tiettyä rakennetta ja tiettyjä avainsanoja. Nämä raportit annetaan eteenpäin moottoreille, jotka luovat tietorakenteen pohjalta raportin. Tärkeä yksityiskohta on, että raporttie...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/d2c3efc456f459e72943c97c369d5391b57f5536/src/cljs/harja/ui/raportti.cljs
clojure
(ns harja.ui.raportti "Harjan raporttielementtien HTML näyttäminen. Harjan raportit ovat Clojuren tietorakenteita, joissa käytetään tiettyä rakennetta ja tiettyjä avainsanoja. Nämä raportit annetaan eteenpäin moottoreille, jotka luovat tietorakenteen pohjalta raportin. Tärkeä yksityiskohta on, että raporttie...
247211d669f8069da373f4d265fbcb94eaef94ddbf74cec91b23bebb28a1ec2f
MinaProtocol/mina
call_response.ml
* This file has been generated by the OCamlClientCodegen generator for openapi - generator . * * Generated by : -generator.tech * * Schema Call_response.t : CallResponse contains the result of a ` /call ` invocation . * This file has been generated by the OCamlClientCodegen generator for openapi-gene...
null
https://raw.githubusercontent.com/MinaProtocol/mina/a80b00221953c26ff158e7375a948b5fa9e7bd8b/src/lib/rosetta_models/call_response.ml
ocaml
* This file has been generated by the OCamlClientCodegen generator for openapi - generator . * * Generated by : -generator.tech * * Schema Call_response.t : CallResponse contains the result of a ` /call ` invocation . * This file has been generated by the OCamlClientCodegen generator for openapi-gene...
e72f904f69c2385b74714918d7f4fd238543fa81275fa3715c25594c1c587d99
mlabs-haskell/plutus-pioneer-program
Solution.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeOperators #-} module Week04.Solution where import Data.Aeson (FromJSON, ToJSON) import Data.Functor (...
null
https://raw.githubusercontent.com/mlabs-haskell/plutus-pioneer-program/b50b196d57dc35559b7526fe17b49dd2ba4790bc/code/week04/src/Week04/Solution.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # # LANGUAGE TypeOperators #
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE TypeApplications # module Week04.Solution where import Data.Aeson (FromJSON, ToJSON) import Data.Functor (void) import Data.Text (Text, unpack) import GHC.Generics (Generic) import...
a228649bb5de5b124ee6785b749d7aa6cff9003fe10998f055b21ba8de9501b6
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.lesson-builder.widgets.activity-title.views (:require [re-frame.core :as re-frame] [webchange.lesson-builder.widgets.activity-title.state :as state] [webchange.lesson-builder.widgets.history.state :as history-state] [webchange.lesson-builder.widgets.history.views :refer [activity-history...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/0df52dd08d54f14d4ec5d2717f48031849a7ee16/src/cljs/webchange/lesson_builder/widgets/activity_title/views.cljs
clojure
(ns webchange.lesson-builder.widgets.activity-title.views (:require [re-frame.core :as re-frame] [webchange.lesson-builder.widgets.activity-title.state :as state] [webchange.lesson-builder.widgets.history.state :as history-state] [webchange.lesson-builder.widgets.history.views :refer [activity-history...
e31e6be2f7ed08c5fdb32fc407bcd6e079bd031ca334e03544cf0bc6571a3318
Glue42/gateway-modules
messages.cljc
(ns gateway.domains.bus.messages (:require [gateway.common.messages :as m] #?(:cljs [gateway.reason :refer [Reason]]) [gateway.domains.bus.constants :as constants]) #?(:clj (:import [gateway.reason Reason]))) (defn event ( [recipient subscriber-id subscription-id publisher-identity data] ...
null
https://raw.githubusercontent.com/Glue42/gateway-modules/be48a132134b5f9f41fd6a6067800da6be5e6eca/bus-domain/src/gateway/domains/bus/messages.cljc
clojure
(ns gateway.domains.bus.messages (:require [gateway.common.messages :as m] #?(:cljs [gateway.reason :refer [Reason]]) [gateway.domains.bus.constants :as constants]) #?(:clj (:import [gateway.reason Reason]))) (defn event ( [recipient subscriber-id subscription-id publisher-identity data] ...
a9161caaf574b36179361b933c6aff4bc0da8d99243e53229473bd852d586292
bdeket/rktsicm
display-print.rkt
#lang racket (provide (except-out (all-defined-out) mk)) (require (for-syntax racket/base racket/syntax)) ;print-display needs a lot of things from kernel ;to avoid restructuring everything at this point ;I just defined stumps for the procedures and setters ;that will be overwritten in display/p...
null
https://raw.githubusercontent.com/bdeket/rktsicm/588acaf709a0e652b6474921f85524926d0f218d/rktsicm/sicm/kernel/todo/display-print.rkt
racket
print-display needs a lot of things from kernel to avoid restructuring everything at this point I just defined stumps for the procedures and setters that will be overwritten in display/print for quaternions
#lang racket (provide (except-out (all-defined-out) mk)) (require (for-syntax racket/base racket/syntax)) (define-syntax (mk stx) (syntax-case stx () [(_ id _ ...) (with-syntax ([setter (format-id #'id "set-~a!" #'id)]) #'(begin (define (id . rst) (error "needs to co...
c0552f8e04078ab9c3ca6d82ab2d0c7276df9cc1ca93cf03934837fe6a2760bb
metosin/eines
handler.clj
(ns eines-example.message.handler (:require [eines-example.message.login :as login] [eines-example.message.favorite :as favorite] [eines-example.message.ping :as ping] [clojure.tools.logging :as log])) (def handlers (merge login/handlers favorite/handlers ...
null
https://raw.githubusercontent.com/metosin/eines/e293d0a3b29eb18fb20bdf0c234cd898e7b87ac9/example/src/clj/eines_example/message/handler.clj
clojure
(ns eines-example.message.handler (:require [eines-example.message.login :as login] [eines-example.message.favorite :as favorite] [eines-example.message.ping :as ping] [clojure.tools.logging :as log])) (def handlers (merge login/handlers favorite/handlers ...
2e0c46795d8427fc35013d036190828a3dbe08d2b86452056851670572f979e3
yogthos/config
core.clj
(ns config.core (:require [clojure.java.io :as io] [clojure.edn :as edn] [clojure.string :as s]) (:import java.io.PushbackReader)) (defn parse-number [^String v] (try (Long/parseLong v) (catch NumberFormatException _ (BigInteger. v)))) originally found in cprop #L26 (defn s...
null
https://raw.githubusercontent.com/yogthos/config/44fc4780cee097cc63c46cfadc67ddf27f82d20a/src/config/core.clj
clojure
(ns config.core (:require [clojure.java.io :as io] [clojure.edn :as edn] [clojure.string :as s]) (:import java.io.PushbackReader)) (defn parse-number [^String v] (try (Long/parseLong v) (catch NumberFormatException _ (BigInteger. v)))) originally found in cprop #L26 (defn s...
da186344138d9eaf0805d16d317d4494f3f804bb382408147c49d79052bdfe33
umber-lang/umber
untyped.ml
open Import open Names (* TODO: Make this a CST, with it precisely representing the syntax written. This should involving adding spans (Node-ifying the tree). *) module Pattern = struct include Pattern type nonrec t = Type.Scheme.Bounded.t t [@@deriving sexp] end module Expr = struct type t = | Literal...
null
https://raw.githubusercontent.com/umber-lang/umber/43339b87e10a704bffea16341f6285bc3cba058e/src/untyped.ml
ocaml
TODO: Make this a CST, with it precisely representing the syntax written. This should involving adding spans (Node-ifying the tree). * Get all the external names referenced by an expression. Names local to the expression (e.g. those bound by match expressions or lambdas) are not included.
open Import open Names module Pattern = struct include Pattern type nonrec t = Type.Scheme.Bounded.t t [@@deriving sexp] end module Expr = struct type t = | Literal of Literal.t | Name of Value_name.Qualified.t | Qualified of Module_path.t * t | Fun_call of t * t Nonempty.t | Op_tree of (V...
de5d1f1d3536d516cdcfbb582d506cb2540c82c9b3af2ab3ac5ea8953fad90b5
acowley/Frames
RecLens.hs
# LANGUAGE AllowAmbiguousTypes , ConstraintKinds , DataKinds , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , PolyKinds , RankNTypes , ScopedTypeVariables , TypeApplications , TypeFamilies , TypeOperators # FlexibleContexts, FlexibleInstances, ...
null
https://raw.githubusercontent.com/acowley/Frames/aeca953fe608de38d827b8a078ebf2d329edae04/src/Frames/RecLens.hs
haskell
| Lens utilities for working with 'Record's. rlens' :: forall r rs f g i. => (g r -> f (g r)) -> V.Rec g rs -> f (V.Rec g rs) rlens' = V.rlens {-# INLINE rlens' #-} | Getter for a 'V.Rec' field {-# INLINE rget' #-} | Setter for a 'V.Rec' field. rput' l y = getIdentity . l (\_ -> Identity...
# LANGUAGE AllowAmbiguousTypes , ConstraintKinds , DataKinds , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , PolyKinds , RankNTypes , ScopedTypeVariables , TypeApplications , TypeFamilies , TypeOperators # FlexibleContexts, FlexibleInstances, ...
169d3c22969478c07a1303ee2023aaa051fdc1360caf9012dce9e80402b9e564
theodormoroianu/SecondYearCourses
taburi.hs
maxim x y | x > y = x | otherwise = y max3 x y z = let { mxy = maxim x y ; m = maxim mxy z } in m -- replace tabs with spaces to make this compile max3' x y z = let mxy = maxim x y m = maxim mxy z in m
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/lab1/taburi.hs
haskell
replace tabs with spaces to make this compile
maxim x y | x > y = x | otherwise = y max3 x y z = let { mxy = maxim x y ; m = maxim mxy z } in m max3' x y z = let mxy = maxim x y m = maxim mxy z in m
6d49cfc50a846571ffd1d690698e32808d373e4e069009f3b346fdc42af4b333
exercism/clojure
squeaky_clean_test.clj
(ns squeaky-clean-test (:require [clojure.test :refer [deftest is]] squeaky-clean)) (deftest ^{:task 1} clean-single-letter (is (= "A" (squeaky-clean/clean "A")))) (deftest ^{:task 1} clean-clean-string (is (= "àḃç" (squeaky-clean/clean "àḃç")))) (deftest ^{:task 1} clean-string-with-spaces (is (...
null
https://raw.githubusercontent.com/exercism/clojure/7f11e4bee92c3d94fa4d65b2eef7a2b6354fea50/exercises/concept/squeaky-clean/test/squeaky_clean_test.clj
clojure
(ns squeaky-clean-test (:require [clojure.test :refer [deftest is]] squeaky-clean)) (deftest ^{:task 1} clean-single-letter (is (= "A" (squeaky-clean/clean "A")))) (deftest ^{:task 1} clean-clean-string (is (= "àḃç" (squeaky-clean/clean "àḃç")))) (deftest ^{:task 1} clean-string-with-spaces (is (...
72d24de71f2c804d8ca89f74f32434118b2c4cdfe9b4369fa7941c987a735610
heraldry/heraldicon
pile.cljs
(ns heraldicon.heraldry.ordinary.type.pile (:require [clojure.string :as str] [heraldicon.context :as c] [heraldicon.heraldry.cottising :as cottising] [heraldicon.heraldry.field.environment :as environment] [heraldicon.heraldry.line.core :as line] [heraldicon.heraldry.option.position :as position] ...
null
https://raw.githubusercontent.com/heraldry/heraldicon/0e72e14efdc6dc7f1aa059c4b10e49962cdf293c/src/heraldicon/heraldry/ordinary/type/pile.cljs
clojure
TODO: needs to be improved
(ns heraldicon.heraldry.ordinary.type.pile (:require [clojure.string :as str] [heraldicon.context :as c] [heraldicon.heraldry.cottising :as cottising] [heraldicon.heraldry.field.environment :as environment] [heraldicon.heraldry.line.core :as line] [heraldicon.heraldry.option.position :as position] ...
570485c2b928d90d0041f83b3d8129d6e6e2e3c7152ade6979fc3bbbd1eeeaad
kirasystems/clj-browserchannel
dom-helpers.cljs
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/kirasystems/clj-browserchannel/68d2ebc6336fbf7d71e6e54d61ca85bb4b2546af/chat-demo/cljs/bc/dom-helpers.cljs
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns bc.dom-helpers (:require [clojure.string :as string] [goog.style :as style] [goog.dom :as dom] [goog.dom.classes :as classes] [goog.dom.forms :as forms] [goog.fx :as fx] [goog.fx.dom :as fx-dom] ...
84591bd7a7f42530fc5ee35d923f59ed5beca23b9d76dcb8660fa41485000b23
yuriy-chumak/ol
process.scm
(import (prefix (owl sys) sys-)) (define exit-values '(42 43 44)) (print "forking children") (define pids (map (λ (exit-val) (let ((x (sys-fork))) (cond ((not x) (print "FORK FAILED") #false) ((eq? x #true) ...
null
https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/disabled/process.scm
scheme
exit with given value from child processes return pid to parent
(import (prefix (owl sys) sys-)) (define exit-values '(42 43 44)) (print "forking children") (define pids (map (λ (exit-val) (let ((x (sys-fork))) (cond ((not x) (print "FORK FAILED") #false) ((eq? x #true) ...
330dc81135118799dc1e5989838d466c070a0b64bc3f55984fd2e33a255b4cf9
manuel-serrano/bigloo
statexp.scm
;*=====================================================================*/ * ... /prgm / project / bigloo / / comptime / Module / statexp.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : T...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/comptime/Module/statexp.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The static clauses compilation. */ *===========================...
* ... /prgm / project / bigloo / / comptime / Module / statexp.scm * / * Author : * / * Creation : Tue Jun 4 10:58:45 1996 * / * Last change : Sun Apr 14 08:20:20 2019 ( serrano ) * / * Copyrigh...
807b5ea46583a2a5ca28a86481d2185955d55afa48be3ca4fda98503725f408e
EFanZh/EOPL-Exercises
exercise-5.x-letrec-lang-registers.rkt
#lang eopl ;; Grammar. (define the-lexical-spec '([whitespace (whitespace) skip] [comment ("%" (arbno (not #\newline))) skip] [identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol] [number (digit (arbno digit)) number] [number ("-" digit (arbno digit)) number])) (define the-grammar '(...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-5.x-letrec-lang-registers.rkt
racket
Grammar. Data structures. Interpreter.
#lang eopl (define the-lexical-spec '([whitespace (whitespace) skip] [comment ("%" (arbno (not #\newline))) skip] [identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol] [number (digit (arbno digit)) number] [number ("-" digit (arbno digit)) number])) (define the-grammar '([program (ex...
823dd100760fb08369ab21b1c4c958ca4cb9b6a7908625e6efff70c38b91c0b7
justinethier/nugget
lambda.scm
; TODO: the body should be surrounded by an implicit begin, but ; that is not happening in the compiler (lambda (x y) 1 (* x y) x y)
null
https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/cyclone/tests/lambda.scm
scheme
TODO: the body should be surrounded by an implicit begin, but that is not happening in the compiler
(lambda (x y) 1 (* x y) x y)
b660605ced3d75947cadd63385e40823a74f0bbc1d1c862acad71250dcc18a8a
Rhywun/get-programming-with-haskell
fibo.hs
fastFib :: Int -> Int -> Int -> Int fastFib n1 _ 1 = n1 fastFib _ n2 2 = n2 fastFib n1 n2 3 = n1 + n2 fastFib n1 n2 counter = fastFib (n1 + n2) n1 (counter - 1) fib 30 = = 832040 < -- 0.00 sec fib 35 = = 9227465 < -- 0.00 sec fib 1000 = = ... long number ......
null
https://raw.githubusercontent.com/Rhywun/get-programming-with-haskell/b9cf06f725b2ef038d69ed49f7d2900f55e98ca3/Unit04/Lesson21/fibo.hs
haskell
0.00 sec 0.00 sec 0.00 sec 0.00 sec 0.00 sec 0.00 sec
fastFib :: Int -> Int -> Int -> Int fastFib n1 _ 1 = n1 fastFib _ n2 2 = n2 fastFib n1 n2 3 = n1 + n2 fastFib n1 n2 counter = fastFib (n1 + n2) n1 (counter - 1) -} fib :: Int -> Int fib = fastFib 1 1 main :: IO () main = do putStr "Number? " n <- getLine let result = fib $ read n putStrL...
532168f2b28070491d7e0f1b3e43fb6627bb292f5395ed6bb0dffffbcf2bedf9
TomerAberbach/programming-in-haskell-exercises
9.hs
sum :: Num a => [a] -> a sum [] = 0 sum (n:ns) = n + Main.sum ns take :: Int -> [a] -> [a] take 0 _ = [] take _ [] = [] take n (x:xs) = x : Main.take (n - 1) xs last :: [a] -> a last [x] = x last (_:xs) = Main.last xs
null
https://raw.githubusercontent.com/TomerAberbach/programming-in-haskell-exercises/a66830529ebc9c4d84d0e4c6e0ad58041b46bc32/parts/1/chapters/6/9.hs
haskell
sum :: Num a => [a] -> a sum [] = 0 sum (n:ns) = n + Main.sum ns take :: Int -> [a] -> [a] take 0 _ = [] take _ [] = [] take n (x:xs) = x : Main.take (n - 1) xs last :: [a] -> a last [x] = x last (_:xs) = Main.last xs
a0a244dcfc7e629c6f6c8e14749846d9cd88ffe2edcacf95e0442aab7244d8a5
the-dr-lazy/cascade
TestClient.hs
| Module : Cascade . Api . Network . TestClient Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRIPTION ...
null
https://raw.githubusercontent.com/the-dr-lazy/cascade/7b3679639b509c5605392c124683a386c6f57c09/cascade-api/test/Cascade/Api/Network/TestClient.hs
haskell
| Module : Cascade . Api . Network . TestClient Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRIPTION ...
d031f3380280a57f913fc2ead3099430bf0f3c1c37965772e43c8ec5a2d72340
thierry-martinez/stdcompat
stdcompat__native.mli
val native : bool
null
https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/stdcompat__native.mli
ocaml
val native : bool
684e178090de8b421629b382a74d5e5fa78dd088487ba8bc2a6b180b3bf38bdd
yuriy-chumak/ol
por-prime-rand.scm
(import (owl math-prime)) (define num (+ (band (time-ms) #b1111111111) 2)) (define por-opts (map (λ (try) (λ () (ediv num try))) (lrange 2 1 (+ 1 (isqrt num))))) (define (xor a b) (if a b (if b #false (not a)))) (print (if (equal? (prime? num) (not (por* por-opts))) "OK" num))
null
https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/por-prime-rand.scm
scheme
(import (owl math-prime)) (define num (+ (band (time-ms) #b1111111111) 2)) (define por-opts (map (λ (try) (λ () (ediv num try))) (lrange 2 1 (+ 1 (isqrt num))))) (define (xor a b) (if a b (if b #false (not a)))) (print (if (equal? (prime? num) (not (por* por-opts))) "OK" num))
ddac139ec8720964a2c4ecef70619f69af78c5a9daba5996a216d600ad78c345
shayne-fletcher/zen
sub_array.ml
module type LIST_UTILS = sig val take : int -> 'a list -> 'a list val drop : int -> 'a list -> 'a list val slice : 'a list -> int -> int -> 'a list val range : int -> int -> int list val sum : int list -> int end module List_utils : LIST_UTILS = struct let rec take (k : int) (l : 'a list) : 'a list = m...
null
https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/sub_array_max_sum/sub_array.ml
ocaml
The set of intervals starting at position [i]
module type LIST_UTILS = sig val take : int -> 'a list -> 'a list val drop : int -> 'a list -> 'a list val slice : 'a list -> int -> int -> 'a list val range : int -> int -> int list val sum : int list -> int end module List_utils : LIST_UTILS = struct let rec take (k : int) (l : 'a list) : 'a list = m...
69c8d818ff6ed25f488c32a309c30d531f79b0fc5c1d713277c0298a7aa2834d
acorrenson/Oratio
debuger.ml
(** {1 Debuger} An rewrite of the {! kernel} module to trace executions in stdout. *) open Kernel type thm = Rules.thm type prop = Rules.prop let intro_impl t p = Printf.printf "intro IMPL on (%s) and (%s)\n" (Rules.show_thm t) (Logic.show_prop p); Rules.intro_impl t p let intro_and t1 t2 = Printf....
null
https://raw.githubusercontent.com/acorrenson/Oratio/ade8d9a3253270e311ebbcff10cb955bd2c8af42/src/translators/debuger.ml
ocaml
* {1 Debuger} An rewrite of the {! kernel} module to trace executions in stdout.
open Kernel type thm = Rules.thm type prop = Rules.prop let intro_impl t p = Printf.printf "intro IMPL on (%s) and (%s)\n" (Rules.show_thm t) (Logic.show_prop p); Rules.intro_impl t p let intro_and t1 t2 = Printf.printf "intro AND on (%s) and (%s)\n" (Rules.show_thm t1) (Rules.show_thm t2); Rules.in...
feed6207112d00b6d52eaf60f3d75b425ca5679e0d70a9ba58a22b2734431d33
mtesseract/nakadi-client
Problem.hs
| Module : Network . . Types . Problem Description : Nakadi Problem Type Copyright : ( c ) 2017 License : : Stability : experimental Portability : POSIX This module provides the Problem Type . Module : Network.Nakadi.Types.Problem Description : Nakadi Problem Type Copyri...
null
https://raw.githubusercontent.com/mtesseract/nakadi-client/f8eef3ac215459081b01b0b48f0b430ae7701f52/src/Network/Nakadi/Types/Problem.hs
haskell
| Module : Network . . Types . Problem Description : Nakadi Problem Type Copyright : ( c ) 2017 License : : Stability : experimental Portability : POSIX This module provides the Problem Type . Module : Network.Nakadi.Types.Problem Description : Nakadi Problem Type Copyri...
7716f99731207313a15517c550696b7d90a06c137d2c6354308e904bee42b081
ragkousism/Guix-on-Hurd
github.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU 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 Lice...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/guix/import/github.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (guix import github) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:use-module (srfi...
11c70b4fbca682078e857b63fc8eb4d98cb48fd961342041a55e7d4b35cae893
borodust/mortar-combat
packages.lisp
(in-package :mortar-combat.def) (defpackage :mortar-combat.common (:use :cl :ge.util) (:export +ok-reply+ process-command encode-message decode-message with-message))
null
https://raw.githubusercontent.com/borodust/mortar-combat/548bdda21594185f36c365f25015c5edcc37b828/common/packages.lisp
lisp
(in-package :mortar-combat.def) (defpackage :mortar-combat.common (:use :cl :ge.util) (:export +ok-reply+ process-command encode-message decode-message with-message))
3029e6d0166c127d7b06173e72f9a6a10d133c722d0361e597b24669d9c1419a
Factual/sosueme
io.clj
(ns sosueme.test.io (:use [sosueme.io]) (:use [clojure.test])) (deftest test-slurp-cp (is (= (slurp-cp "somefile.txt") "This is somefile!\n")))
null
https://raw.githubusercontent.com/Factual/sosueme/1c2e9b7eb4df8ae67012dc2a398b4ec63c9bd6cd/test/sosueme/test/io.clj
clojure
(ns sosueme.test.io (:use [sosueme.io]) (:use [clojure.test])) (deftest test-slurp-cp (is (= (slurp-cp "somefile.txt") "This is somefile!\n")))
82138c21a65c59389dd86d180ed288e2500afccb9ca6dceb4438c03028232e7e
7theta/via
core_test.clj
(ns via.core-test (:require [via.endpoint :as e] [via.subs :as vs] [via.events :as ve] [signum.events :refer [reg-event]] [signum.subs :refer [reg-sub]] [signum.signal :as sig] [vectio.util.stream :as vus] [vectio.netty.http1.websocke...
null
https://raw.githubusercontent.com/7theta/via/172c51824ebfd76827161312c42c11cf39b6a389/test/via/core_test.clj
clojure
(ns via.core-test (:require [via.endpoint :as e] [via.subs :as vs] [via.events :as ve] [signum.events :refer [reg-event]] [signum.subs :refer [reg-sub]] [signum.signal :as sig] [vectio.util.stream :as vus] [vectio.netty.http1.websocke...
6cb76f6db6eea8b042f9a82b0bad60b2965646d1adf6fe9c564e4c7f7eea2db6
mstksg/functor-combinators
Spec.hs
import Test.Tasty import Tests.HBifunctor import Tests.HFunctor main :: IO () main = defaultMain $ testGroup "Tests" [ hfunctorTests , hbifunctorTests ]
null
https://raw.githubusercontent.com/mstksg/functor-combinators/e8158b6055be08f37525414068884a9d94b3bcf9/test/Spec.hs
haskell
import Test.Tasty import Tests.HBifunctor import Tests.HFunctor main :: IO () main = defaultMain $ testGroup "Tests" [ hfunctorTests , hbifunctorTests ]
88dbc53ddb1edab4d03234f11002e4b893380e886d94f024d93343bf13844690
Drezil/pioneers
Creation.hs
module Map.Creation where import Map.Types import Data.Array import System.Random -- entirely empty map, only uses the minimal constructor mapEmpty :: PlayMap mapEmpty = array ((0,0), (199,199)) [((a,b), Node (a,b) (fromIntegral a, (if even b then (fromIntegral b) else(fromIntegral b) - 0.5), 1) Grass BNothing NoPla...
null
https://raw.githubusercontent.com/Drezil/pioneers/2a9de00213144cfa870e9b71255a92a905dec3a9/src/Map/Creation.hs
haskell
entirely empty map, only uses the minimal constructor 1. Should take Size -> Type -> Playmap ^ Amplitude ^ Origin on X-Achsis ^ Origin on Z-Achsis ^ Sigma on X ^ Sigma on Z ^ Coordinate in question on X ^ Coordinate in question on Z ^ elevation on coordinate in question TODO: Implement Desert-Generator...
module Map.Creation where import Map.Types import Data.Array import System.Random mapEmpty :: PlayMap mapEmpty = array ((0,0), (199,199)) [((a,b), Node (a,b) (fromIntegral a, (if even b then (fromIntegral b) else(fromIntegral b) - 0.5), 1) Grass BNothing NoPlayer NoPath Plain []) | a <- [0..199], b <- [0..199]] exp...
6df5a5ae8f0bb09ccc8601db62e82a32bfc223f2b1f30d528e31e090bf948395
wdebeaum/step
warrant.lisp
;;;; ;;;; W::warrant ;;;; (define-words :pos W::V :TEMPL AGENT-FORMAL-XP-TEMPL :words ( (W::warrant (SENSES ((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date nil :comments nil :vn ("declare-29.4-2")) (LF-PARENT ONT::believe) (TEMPL experiencer-formal-xp-templ (xp (% w::cp (w:...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/warrant.lisp
lisp
W::warrant like think
(define-words :pos W::V :TEMPL AGENT-FORMAL-XP-TEMPL :words ( (W::warrant (SENSES ((meta-data :origin "verbnet-1.5" :entry-date 20051219 :change-date nil :comments nil :vn ("declare-29.4-2")) (LF-PARENT ONT::believe) ) ) ) ))
f7a4c75851861ed242d63c24113c456b7c5915fface26177e4c190dfa3ec57c8
dradtke/Lisp-Text-Editor
cffi-allegro.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; cffi-allegro.lisp --- CFFI - SYS implementation for Allegro CL . ;;; Copyright ( C ) 2005 - 2009 , loliveira(@)common - lisp.net > ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documenta...
null
https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/cffi_0.10.6/src/cffi-allegro.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to...
cffi-allegro.lisp --- CFFI - SYS implementation for Allegro CL . Copyright ( C ) 2005 - 2009 , loliveira(@)common - lisp.net > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the ...
b3b63150949e33f26f1e663dc4f1dc9da0a87fb2fe8dd4ab669915832fd96c12
input-output-hk/hydra
StateSpec.hs
# LANGUAGE DuplicateRecordFields # # LANGUAGE PatternSynonyms # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - orphans # module Hydra.Chain.Direct.StateSpec where import Hydra.Prelude hiding (label) import Test.Hydra.Prelude import qualified Cardano.Api.UTxO as UTxO import Cardano.Binary (serialize) import quali...
null
https://raw.githubusercontent.com/input-output-hk/hydra/79da8556b0b60c7bca0c0aec308761a3c23e27e5/hydra-node/test/Hydra/Chain/Direct/StateSpec.hs
haskell
We do replace the minting policy and datum of a head output to simulate a faked init transaction. We expected mutated transaction to still be valid, but not observed. * Properties Commits Collect Close Fanout Properties XXX: Coverage does not work if we only collectFails Generic Properties QuickCheck Ext...
# LANGUAGE DuplicateRecordFields # # LANGUAGE PatternSynonyms # # LANGUAGE TypeApplications # # OPTIONS_GHC -Wno - orphans # module Hydra.Chain.Direct.StateSpec where import Hydra.Prelude hiding (label) import Test.Hydra.Prelude import qualified Cardano.Api.UTxO as UTxO import Cardano.Binary (serialize) import quali...
23bb961e3df7e17ed5cdbaf254f895eaee16357b4c346d88ea788f3095ba707b
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
GetChargesCharge.hs
{-# LANGUAGE ExplicitForAll #-} {-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the different functions to run the operation getChargesCharge module StripeAPI....
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Operations/GetChargesCharge.hs
haskell
# LANGUAGE ExplicitForAll # # LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the different functions to run the operation getChargesCharge | > GET /v1/charges/{charge} | Contains all available parameters of this operation (query and path parameters) | Monadic computation which returns the result o...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Operations.GetChargesCharge where import qualified Control.Monad.Fail import qualified Control.Monad.Trans.Reader import qualified Data.Aeson import qualified Data.Aeson ...
e3cd5d9ea8ba8cd988e4b3224347b2e434ba283d725c778d59cc8d564e287e48
rootmos/silly-ml
eval.ml
open Core_kernel.Std open Printf module Ctx = struct type t = { typed_ctx: Typed.Ctx.t; lambda_ctx: Lambda.Ctx.t; interpret_ctx: Interpret.Ctx.t; } let empty = { typed_ctx = Typed.Ctx.empty; lambda_ctx = Lambda.Ctx.empty; interpret_ctx = Interpret.Ctx.empty; } end let step ctx s = l...
null
https://raw.githubusercontent.com/rootmos/silly-ml/716664a0e81fc354d93b645b4bc017e7f6227c25/src/eval.ml
ocaml
open Core_kernel.Std open Printf module Ctx = struct type t = { typed_ctx: Typed.Ctx.t; lambda_ctx: Lambda.Ctx.t; interpret_ctx: Interpret.Ctx.t; } let empty = { typed_ctx = Typed.Ctx.empty; lambda_ctx = Lambda.Ctx.empty; interpret_ctx = Interpret.Ctx.empty; } end let step ctx s = l...
4dc08c12b2a6e41390d941a1d4f0443bee5e90fdd07104116d1bc09bcd5df897
bsansouci/bsb-native
reload.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/asmcomp/arm/reload.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1998 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 . let fundecl f = (new Reloadgen.reloa...
476f4bae8059f94a511610c06b921de652ea0d347e0478ff11f9b2af9b533e9f
jordanthayer/ocaml-search
vector_search.ml
(** Search code using offline learned information in the form of arbitrary vectors *) let h_ind = 0 and d_ind = 1 and g_ind = 2 and depth_ind = 3 and h_rev = 4 and d_rev = 5 type 'a node = { data : 'a; features : float array; cost : float; f : float; mutable pos: int;} let setpos n ...
null
https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/search/adaptive/vector_search.ml
ocaml
* Search code using offline learned information in the form of arbitrary vectors * Updates the [pos] of node [n], setting it to [i] * returns the current [pos] of node [n] * Determines which of the nodes represents a better solution * Decomposes the solution [s] into a form which the domains are expecting ...
let h_ind = 0 and d_ind = 1 and g_ind = 2 and depth_ind = 3 and h_rev = 4 and d_rev = 5 type 'a node = { data : 'a; features : float array; cost : float; f : float; mutable pos: int;} let setpos n i = n.pos <- i let getpos n = n.pos let better_p a b = a.features.(g_ind) <= b.f...
2fbb5c54a6ef125de8fb93da4768503d580cde25acc87f1c38c01135a1ea42bf
avras/nsime
nsime_internet_stack_helper_SUITE.erl
%% Copyright ( C ) 2012 < > %% %% This file is part of nsime. %% nsime 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....
null
https://raw.githubusercontent.com/avras/nsime/fc5c164272aa649541bb3895d9f4bea34f45beec/test/nsime_internet_stack_helper_SUITE.erl
erlang
This file is part of nsime. (at your option) any later version. nsime 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. along with...
Copyright ( C ) 2012 < > nsime 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 You should have received a copy of the GNU General Public License Purpose ...
ac76580bd47f25703c092572ead014fe5ca721ed534aa145c93f4be7718aaefd
BranchTaken/Hemlock
path.mli
(** Abstract filesystem path manipulation. *) (** Path segment. *) module Segment: sig type t (** Path segment type. *) include FormattableIntf.SMono with type t := t val to_string: t -> string option * [ to_string t ] converts [ t ] to a string , or returns [ None ] if the segment can not be represented ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/ed397cf3294ca397024e69eb3b1ed5f1db773db6/bootstrap/src/basis/path.mli
ocaml
* Abstract filesystem path manipulation. * Path segment. * Path segment type. * [to_bytes t] converts [t] to a bytes slice. * [is_current t] returns true if the segment is [.]. * [is_current t] returns true if the segment is [..]. * [split t] splits the segment into its stem and [.]-initiated suffixes, if any. *...
module Segment: sig type t include FormattableIntf.SMono with type t := t val to_string: t -> string option * [ to_string t ] converts [ t ] to a string , or returns [ None ] if the segment can not be represented as UTF-8 . as UTF-8. *) val to_string_replace: t -> string * [ to_string t ] conv...
477edadf6d1e0f16c293911cb6971e905da3ce9857bfff412df509d75d4d6ffd
nyu-acsys/drift
zip.ml
let rec zip (xs:int list) (ys:int list) = match xs with [] -> ( match ys with [] -> [] | y::ys' -> assert(false) ; [] ) | x::xs' -> (match ys with [] -> assert(false) ; [] | y::ys' -> (x, y)::(zip xs' ys')) let rec make_list n = if n <...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DOrder/list/zip.ml
ocaml
let rec zip (xs:int list) (ys:int list) = match xs with [] -> ( match ys with [] -> [] | y::ys' -> assert(false) ; [] ) | x::xs' -> (match ys with [] -> assert(false) ; [] | y::ys' -> (x, y)::(zip xs' ys')) let rec make_list n = if n <...
0771cd7b6073f185d4145274b1a595899fd0e7d9caf1b412824a7a13effa6899
bootstrapworld/curr
Review.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname Review) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f...
null
https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/courses/reactive/resources/source-files/Review.rkt
racket
about the language level of this file in a form that our tools can easily process. ;
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname Review) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) (require "Teachpacks/bootstrap-teachpack.rkt") (define NUM 4) (defi...
d566037e0acf2acada63f7e49cd019a9c6e846da3e48baee0a4c59d74d32d77e
parapluu/nifty
nifty_utils.erl
-*- erlang - indent - level : 2 -*- %%% ------------------------------------------------------------------- Copyright ( c ) 2014 - 2016 , < > and < > %%% All rights reserved. %%% This file is distributed under the Simplified BSD License . %%% Details can be found in the LICENSE file. ...
null
https://raw.githubusercontent.com/parapluu/nifty/9d478d93bf655cb5bb6fc69c07eac1296e45020f/src/nifty_utils.erl
erlang
------------------------------------------------------------------- All rights reserved. Details can be found in the LICENSE file. ------------------------------------------------------------------- -type port_specs() :: {'port_specs', [target()]}. port_specs() is an element here... @doc Returns an empty configu...
-*- erlang - indent - level : 2 -*- Copyright ( c ) 2014 - 2016 , < > and < > This file is distributed under the Simplified BSD License . -module(nifty_utils). -export([expand/1, new_config/0, add_sources/2, add_cflags/2, add_ldflags/2, me...
924dca2aba2d9c32cd9216ff9e80cd4d0dd55a8b96df7d01ce62322b33f8977c
avsm/platform
uucp_white_data.ml
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % NAME% % VERSION% --------------------------------------------------------------------------- Copyrig...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uucp.12.0.0%2Bdune/src/uucp_white_data.ml
ocaml
WARNING do not edit. This file was automatically generated.
--------------------------------------------------------------------------- Copyright ( c ) 2014 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % NAME% % VERSION% --------------------------------------------------------------------------- Copyrig...
39f06aebdfde1d805b096be568735e1644b903efda55683df1e6a7561db9ac2d
nikivazou/verified_string_matching
MonoidEmptyLeft.hs
# LANGUAGE CPP # #ifdef MainCall #else {-# LANGUAGE KindSignatures #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE GADTs # {-# LANGUAGE DeriveTraversable #-} # LANGUAG...
null
https://raw.githubusercontent.com/nikivazou/verified_string_matching/abdd611a0758467f776c59c3d6c9e4705d36a3a0/src/AutoProofs/MonoidEmptyLeft.hs
haskell
# LANGUAGE KindSignatures # # LANGUAGE DataKinds # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE DeriveTraversable # @ LIQUID "--higherorder" @ @ LIQUID "--totality" @ @ LIQUID "--exactdc" @ @ LIQUID "--no-measure-fields" @ @ LIQUID "--tru...
# LANGUAGE CPP # #ifdef MainCall #else # LANGUAGE ScopedTypeVariables # # LANGUAGE GADTs # # LANGUAGE CPP # import Data.RString.RString import Language.Haskell.Liquid.ProofCombinators import Data.Proxy import GHC.TypeLits import Prelude hiding ( mempty, mappend...
70380cb46111a969e4c51898a724efce0ed943dfbab206cbf38535d033c4baf6
kazu-yamamoto/domain-auth
Domain.hs
{-# LANGUAGE OverloadedStrings #-} module Network.DomainAuth.PRD.Domain ( extractDomain ) where import Network.DNS (Domain) import Network.DomainAuth.Mail import Network.DomainAuth.PRD.Lexer import qualified Data.Attoparsec.ByteString as P import qualified Data.ByteString.Char8 as BS -- | Extract a domain from...
null
https://raw.githubusercontent.com/kazu-yamamoto/domain-auth/d13145709a558145ac38e28e0b339c48b950b4e0/Network/DomainAuth/PRD/Domain.hs
haskell
# LANGUAGE OverloadedStrings # | Extract a domain from a value of a header field. Just "example.com" Just "example.com" >>> extractDomain "" Just "example.com" Nothing
module Network.DomainAuth.PRD.Domain ( extractDomain ) where import Network.DNS (Domain) import Network.DomainAuth.Mail import Network.DomainAuth.PRD.Lexer import qualified Data.Attoparsec.ByteString as P import qualified Data.ByteString.Char8 as BS > > > extractDomain " < > " > > > extractDomain " \"Al...
99f7dd71415528f96883b2bfadcbaeb04359d43cb5dabdb9a645dd6fb91ffbee
cheecheeo/haskell-cgi
upload.hs
-- Accepts file uploads and saves the files in the given directory. -- WARNING: this script is a SECURITY RISK and only for -- demo purposes. Do not put it on a public web server. import Data.Maybe (fromJust) import qualified Data.ByteString.Lazy as BS (writeFile) import Network.CGI import Text.XHtml ( Html, parag...
null
https://raw.githubusercontent.com/cheecheeo/haskell-cgi/a49660abdc5b711fcc99989f121eb4404bbde66c/examples/upload.hs
haskell
Accepts file uploads and saves the files in the given directory. WARNING: this script is a SECURITY RISK and only for demo purposes. Do not put it on a public web server.
import Data.Maybe (fromJust) import qualified Data.ByteString.Lazy as BS (writeFile) import Network.CGI import Text.XHtml ( Html, paragraph, (!), href, (+++), form, method, enctype, afile, submit , renderHtml, header, thetitle, body, (<<), anchor ) dir :: String dir = "../upload" saveFile :: (MonadCGI m, M...
4d135f548af25ed485a97eb5b22e50d01646fcccb60cf11c83da51740d85710e
TrustInSoft/tis-interpreter
logic_utils.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/ast_queries/logic_utils.mli
ocaml
************************************************************************ alternatives) Automatique) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies ( Institut National de Recherche en Informatique et en ...
a7ac11e20bc853b51dd77d35e9e6bdca060b79a9a9da9bfb91ab1ba1ea1536a7
lisp/de.setf.cassandra
cassandra-8-1-0-vars.lisp
;;; -*- Package: cassandra -*- ;;; Autogenerated by Thrift ;;; DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING (cl:in-package :cassandra-8-1-0) (thrift:def-constant "VERSION" "8.1.0")
null
https://raw.githubusercontent.com/lisp/de.setf.cassandra/b8744258f310784245da0771d53ffb3a0062fd31/gen-cl/cassandra-8-1-0-vars.lisp
lisp
-*- Package: cassandra -*- DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
Autogenerated by Thrift (cl:in-package :cassandra-8-1-0) (thrift:def-constant "VERSION" "8.1.0")
3f9ab023b0113983a719367b1a0114fd2407e01b9d3981c135214372022f0c4d
stchang/macrotypes
stlc+sum+rec-tests.rkt
#lang s-exp turnstile/examples/cmu15-814/stlc+sum+rec (require rackunit/turnstile) (define-type-alias IntList (μ (X) (+ Unit (× Int X)))) (define-type-alias ILBody (+ Unit (× Int IntList))) ;; nil (define nil (fld {IntList} (inl (void) as ILBody))) (check-type nil : IntList) (check-type nil : (mu (X) (+ Unit (x Int ...
null
https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/cmu15-814/stlc%2Bsum%2Brec-tests.rkt
racket
nil cons isnil hd tl old tests: should still pass tests for pairs ; TODO : check this lazy pairs test laziness sums testing form triggers ⇐ but not if no expected type supplied testing form triggers ⇐ but not if no expected type supplied old stlc tests: - make sure extension didnt break anything - Boo...
#lang s-exp turnstile/examples/cmu15-814/stlc+sum+rec (require rackunit/turnstile) (define-type-alias IntList (μ (X) (+ Unit (× Int X)))) (define-type-alias ILBody (+ Unit (× Int IntList))) (define nil (fld {IntList} (inl (void) as ILBody))) (check-type nil : IntList) (check-type nil : (mu (X) (+ Unit (x Int X)))) ...
072472ae51fba8570ee1bde30654eb8f518cc7f3e1577b19e52507fc83283cc2
reactiveml/rml
firebug.mli
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
null
https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/lib/firebug.mli
ocaml
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking ...
febc5bcbcd1a6e022f04ae64ae64fa3cca11155b08292d01b237be8c3ee3ed9b
hunt-framework/hunt
Common3.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverlappingInstances #-} # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Common3 where i...
null
https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-test/test/Common3.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE OverlappingInstances # ---------------------------------------- type aliases ------------------------------------------ StringMap as index ... simple ------------------------------------------ how to integrate enum for different searc...
# LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Common3 where import Control.Applicative ((<$>)) import Control.Arrow (first, second) import ...
a483eec7f7954a99e44f85e777bdfd95a36647cc7912d625faa3c0e9586731bb
ygrek/ocaml-extlib
refList.ml
* RefList - List reference * Copyright ( C ) 2003 * * 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 2.1 of the License , or ( at your option ) an...
null
https://raw.githubusercontent.com/ygrek/ocaml-extlib/0779f7a881c76f9aca3d5445e2f063ba38a76167/src/refList.ml
ocaml
* RefList - List reference * Copyright ( C ) 2003 * * 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 2.1 of the License , or ( at your option ) an...
55b3d1c5e933c75bce9d07478627a8f500ae07b3ecc82780660d37017c3d6fdc
grin-compiler/ghc-wpc-sample-programs
Null.hs
# OPTIONS_GHC -fno - warn - orphans # | Overloaded @null@ and @empty@ for collections and sequences . module Agda.Utils.Null where import Prelude hiding (null) import Control.Monad import Control.Monad.Reader import Control.Monad.State import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.C...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Utils/Null.hs
haskell
| A 'Maybe' is 'null' when it corresponds to the empty list. * Testing for null.
# OPTIONS_GHC -fno - warn - orphans # | Overloaded @null@ and @empty@ for collections and sequences . module Agda.Utils.Null where import Prelude hiding (null) import Control.Monad import Control.Monad.Reader import Control.Monad.State import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.C...
9cf9ebd3f63b52c487ed82ca7f7e6aaefec823243161bed4c11e722fd916a692
clojure/tools.build
copy.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/clojure/tools.build/0563a69670437fb236df9c08d3cb74e1e378aefb/src/main/clojure/clojure/tools/build/tasks/copy.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns clojure.tools.build.tasks.copy (:require [clojure.string :as str] [clojure.tools.build.api :as api] [clojure.tools.build.util.file :as file]) (:import [java.io File] [java.nio.file FileSystems FileVisitor FileVisitResult Files Path LinkOption]))...
a76eb1db5c0f4b5df700f567cf885bb78b34d6ef7fe627e3d54275d48ba034dd
ocaml-multicore/tezos
gas_monad.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > Copyright ( c ) 2021 ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/gas_monad.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > Copyright ( c ) 2021 , < > 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 WARRAN...
44a631b32e3c852ddfe82c4c498c53200e8fd7ab2f12bfcf3464fd34cfdc4751
deobald/sicp-clojure
ex2_29_group.clj
(ns sec2_2.ex2_29_group (:use clojure.test)) (defn make-mobile [left right] (list left right)) (defn make-branch [length structure] (list length structure)) ; a. Write the corresponding selectors left-branch and right-branch, which return the branches of the mobile, and ; branch-length and branch-structure ...
null
https://raw.githubusercontent.com/deobald/sicp-clojure/fc24e5114604e7a0510dab779bbff962aac7ee7e/src/sec2_2/ex2_29_group.clj
clojure
a. Write the corresponding selectors left-branch and right-branch, which return the branches of the mobile, and branch-length and branch-structure which return the components of a branch. b. Using those selectors, define a procedure total-weight that returns the total weight of a mobile. c. Design a predicate th...
(ns sec2_2.ex2_29_group (:use clojure.test)) (defn make-mobile [left right] (list left right)) (defn make-branch [length structure] (list length structure)) (defn left-branch [mobile] (first mobile)) (defn right-branch [mobile] (first (rest mobile))) (defn branch-length [branch] (first branch)) (...
95d15c9d7967884f1bc66b726dced738e17697949d449ac459cd0317c308e46d
takikawa/racket-ppa
phase+space.rkt
(module phase+space '#%kernel (#%require "private/qq-and-or.rkt") (#%provide phase? space? phase+space phase+space? phase+space-shift? phase+space-phase phase+space-space phase+space+ phase+space-shift+) (d...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/d336bb10e3e0ec3a20020e9ade9e77d2f6f80b6d/collects/racket/phase%2Bspace.rkt
racket
(module phase+space '#%kernel (#%require "private/qq-and-or.rkt") (#%provide phase? space? phase+space phase+space? phase+space-shift? phase+space-phase phase+space-space phase+space+ phase+space-shift+) (d...
5634fb939d6c4ee9cf1527b8ad1f35aa8d9307b1a05faf00d2bf97aca478ecb2
robert-strandh/SICL
establish-call-sites.lisp
(cl:in-package #:sicl-compiler) (defun call-site-name (instruction) (typecase instruction (cleavir-ir:named-call-instruction (cleavir-ir:callee-name instruction)) (cleavir-ir:enclose-instruction 'sicl-run-time:enclose) (cleavir-ir:catch-instruction 'sicl-run-time:augment-with-block/tagbody...
null
https://raw.githubusercontent.com/robert-strandh/SICL/4ce7ab169055b55aff760f28f1217ff16d7e81b2/Code/Compiler/AST-compiler/establish-call-sites.lisp
lisp
FIXME: Use a better function.
(cl:in-package #:sicl-compiler) (defun call-site-name (instruction) (typecase instruction (cleavir-ir:named-call-instruction (cleavir-ir:callee-name instruction)) (cleavir-ir:enclose-instruction 'sicl-run-time:enclose) (cleavir-ir:catch-instruction 'sicl-run-time:augment-with-block/tagbody...
4c63904219009572b76cd2c23bc05a14889d315f5854957766c7c393c5d28ba6
jackfirth/rebellion
binding.rkt
#lang racket/base (require racket/contract/base) (provide record-id (contract-out [record-binding? predicate/c] [record-binding-type (-> record-binding? record-type?)] [record-binding-descriptor (-> record-binding? identifier?)] [record-binding-predicate (-> record-binding? identifier?)] [record-binding-c...
null
https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/type/record/binding.rkt
racket
@------------------------------------------------------------------------------
#lang racket/base (require racket/contract/base) (provide record-id (contract-out [record-binding? predicate/c] [record-binding-type (-> record-binding? record-type?)] [record-binding-descriptor (-> record-binding? identifier?)] [record-binding-predicate (-> record-binding? identifier?)] [record-binding-c...
7b68ffdecd6880946a6bf487580b8689bb59fec1a71b9cbc264cf3491361c414
janestreet/bonsai
user_state.ml
open! Core open! Async type t = { user : string ; connection : Rpc.Connection.t }
null
https://raw.githubusercontent.com/janestreet/bonsai/761d04847d5f947318b64c0a46dffa17ad413536/examples/open_source/rpc_chat/server/src/user_state.ml
ocaml
open! Core open! Async type t = { user : string ; connection : Rpc.Connection.t }
367b6fc5eded219b0fa03aafbdc59ec7aa74c6333877281725826b330c62c95b
data61/Mirza
EntityDataAPI.hs
module Main where import qualified Mirza.EntityDataAPI.Main as M main :: IO () main = M.main
null
https://raw.githubusercontent.com/data61/Mirza/24e5ccddfc307cceebcc5ce26d35e91020b8ee10/projects/entity-data-api/app/EntityDataAPI.hs
haskell
module Main where import qualified Mirza.EntityDataAPI.Main as M main :: IO () main = M.main
150708e4c173195b4cc5969b0e03f9fd2dbc873f874712e73b1b39b107d22f82
Dasudian/DSDIN
dsdc_next_nonce_tests.erl
-module(dsdc_next_nonce_tests). -include_lib("eunit/include/eunit.hrl"). -include("blocks.hrl"). -define(TEST_MODULE, dsdc_next_nonce). -define(PUBKEY, <<"BAAggMEhrC3ODBqlYeQ6dk00F87AKMkV6kkyhgfJ/luOzGUC+4APxFkVgAYPai3TjSyLRObv0GeDACg1ZxwnfHY=">>). pick_for_account_test_() -> {foreach, fun() -> ...
null
https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdcore/test/dsdc_next_nonce_tests.erl
erlang
-module(dsdc_next_nonce_tests). -include_lib("eunit/include/eunit.hrl"). -include("blocks.hrl"). -define(TEST_MODULE, dsdc_next_nonce). -define(PUBKEY, <<"BAAggMEhrC3ODBqlYeQ6dk00F87AKMkV6kkyhgfJ/luOzGUC+4APxFkVgAYPai3TjSyLRObv0GeDACg1ZxwnfHY=">>). pick_for_account_test_() -> {foreach, fun() -> ...
2945e9789e70985a195423814e94f428e38978d6427e912a06462e848a1418fb
aeternity/app_ctrl
app_ctrl_server.erl
-*- mode : erlang ; erlang - indent - level : 4 ; indent - tabs - mode : nil -*- %%%------------------------------------------------------------------- ( C ) 2018 - 22 , Aeternity Anstalt %%% @hidden %%%------------------------------------------------------------------- -module(app_ctrl_server). -behaviour(gen_se...
null
https://raw.githubusercontent.com/aeternity/app_ctrl/c1fb92758ab7add4489837eff3a7d5d44b925dd2/src/app_ctrl_server.erl
erlang
------------------------------------------------------------------- @hidden ------------------------------------------------------------------- hard-coded app list This is used when the server is bootstrapped from the logger handler, since the handler is initialized from a temporary process. We don't want the call...
-*- mode : erlang ; erlang - indent - level : 4 ; indent - tabs - mode : nil -*- ( C ) 2018 - 22 , Aeternity Anstalt -module(app_ctrl_server). -behaviour(gen_server). -export([ start/0 , start_link/0]). -export([ status/0 , running/2 , stopped/2 , get_mode/0 , set_mode/1 ...
f61c753a0f17a15136d6fce4218994f45984347727631eb4285a3afc2988969a
skeuchel/needle
WellFormedInversion.hs
{-# LANGUAGE GADTs #-} module KnotCore.Elaboration.Lemma.WellFormedInversion where import Coq.Syntax import Coq.StdLib import KnotCore.Syntax import KnotCore.Elaboration.Core import Control.Applicative import Control.Monad import Data.List (intersect, nub) import Data.Maybe (catMaybes, mapMaybe) import Data.Travers...
null
https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotCore/Elaboration/Lemma/WellFormedInversion.hs
haskell
# LANGUAGE GADTs # The meta-variable representing the symbolic term in the match. TODO: combine with the above
module KnotCore.Elaboration.Lemma.WellFormedInversion where import Coq.Syntax import Coq.StdLib import KnotCore.Syntax import KnotCore.Elaboration.Core import Control.Applicative import Control.Monad import Data.List (intersect, nub) import Data.Maybe (catMaybes, mapMaybe) import Data.Traversable (for, traverse) l...
35fc520446f4a7502099287b424d3ffbe1dbc3978308e8cd492cb47689e02b11
penpot/penpot
guides.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.main.ui.workspace.viewport.guides (:require [app.common.colors :as colors] [app.common.geom.po...
null
https://raw.githubusercontent.com/penpot/penpot/cdd268afbc971f04412a9c72f92fad09286a655f/frontend/src/app/main/ui/workspace/viewport/guides.cljs
clojure
Copyright (c) KALEIDOS INC This functions are auxiliary to get the coords of components depending on the axis we're handling We use the ref to not redraw every guide everytime the hovering frame change we're only interested to get the frame in the guide we're moving
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.main.ui.workspace.viewport.guides (:require [app.common.colors :as colors] [app.common.geom.point :as gpt] [app.common.geom....
061af1bb4e13a70424d6abe9f5eab059b5468da604f89267d021ee448c1cd05f
returntocorp/semgrep
AST_to_IL.mli
val function_definition : Lang.t -> AST_generic.function_definition -> IL.name list * IL.stmt list val stmt : Lang.t -> AST_generic.stmt -> IL.stmt list val name_of_entity : AST_generic.entity -> IL.name option val var_of_id_info : AST_generic.ident -> AST_generic.id_info -> IL.name
null
https://raw.githubusercontent.com/returntocorp/semgrep/70af5900482dd15fcce9b8508bd387f7355a531d/src/analyzing/AST_to_IL.mli
ocaml
val function_definition : Lang.t -> AST_generic.function_definition -> IL.name list * IL.stmt list val stmt : Lang.t -> AST_generic.stmt -> IL.stmt list val name_of_entity : AST_generic.entity -> IL.name option val var_of_id_info : AST_generic.ident -> AST_generic.id_info -> IL.name
e5a9f25bfd0d669c6fe6c9a748f699a0549f43571f749fdbcd81fe0f6f199c91
mjsottile/publicstuff
Vec3.hs
module DLA.Vec3 where import DLA.Rmonad data Vec3 = Vec3 Double Double Double deriving Show -- -- for math, see : /~mws/rpos.html -- randVec :: Double -> DLAMonad Vec3 randVec r = do phi ranges from 0.0 to 2.0*pi z <- nextF (2.0 * r) z <- return $ z - r -- z ranges from -r to r theta <- return $ asin (z...
null
https://raw.githubusercontent.com/mjsottile/publicstuff/46fccc93cc62eb9de46186f53012381750fbb17b/dla3d/optimized-haskell2/DLA/Vec3.hs
haskell
for math, see : /~mws/rpos.html z ranges from -r to r
module DLA.Vec3 where import DLA.Rmonad data Vec3 = Vec3 Double Double Double deriving Show randVec :: Double -> DLAMonad Vec3 randVec r = do phi ranges from 0.0 to 2.0*pi z <- nextF (2.0 * r) theta <- return $ asin (z / r) return $ Vec3 (r*(cos theta)*(cos phi)) (r*(cos theta)*(sin phi)) z randUnitVec ::...
d044458ede9af337d65996805608931d564b40362bc7fbb3c021f171475cf29f
bakul/s9fes
find-help.scm
Scheme 9 from Empty Space , Unix Function Library By , 2010 ; Placed in the Public Domain ; ( find - help ) = = > list ( find - help ) = = > list | unspecific ; ; Search the online help database for entries containing the word STRING1 and return a list the names of all pages that conta...
null
https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/attic/find-help.scm
scheme
Placed in the Public Domain Search the online help database for entries containing the is interpreted as a string of options. The following options will be evaluated: a Search for substrings instead of full words. This options typically yields more results. l Return not only the p...
Scheme 9 from Empty Space , Unix Function Library By , 2010 ( find - help ) = = > list ( find - help ) = = > list | unspecific word STRING1 and return a list the names of all pages that contain the word . When STRING2 is passed to FIND - HELP , it context ( up to three lin...
dc07169eb8d631e9b2647ca81f034645b13252627381fc79a7f833fd1712e503
vision-05/betterCode
css.clj
(ns bettercode.css (:require [cljfx.css :as css] [clojure.edn :as edn] [bettercode.meta])) (def colors (edn/read-string (slurp (bettercode.meta/conf-info :theme-path)))) (defn background-radius [radius] {:-fx-background-radius radius}) (defn background ([color] {:-fx-background-color col...
null
https://raw.githubusercontent.com/vision-05/betterCode/0cd88cdd1f0a968c36ecb41d92ba24137abf2891/bettercode/src/bettercode/css.clj
clojure
this function should also be able to partially reconstruct a map
(ns bettercode.css (:require [cljfx.css :as css] [clojure.edn :as edn] [bettercode.meta])) (def colors (edn/read-string (slurp (bettercode.meta/conf-info :theme-path)))) (defn background-radius [radius] {:-fx-background-radius radius}) (defn background ([color] {:-fx-background-color col...
b54d462c03e85de932d3fe926eb0610668be9304823b1422fd3956c73f61cfea
corecursive/sicp-study-group
operation-test.scm
(load "vector.scm") (load "rectangle.scm") (load "graphics.scm") (load "picture.scm") (load "operation.scm") (load "escher.scm") Based on Functional Geometry by ;; -systems.co.uk/phAcademic/papers/funcgeo.pdf (define (draw pict name) (define rectangle (make-rect (make-vect 0 0) (make-vect 1000 0) ...
null
https://raw.githubusercontent.com/corecursive/sicp-study-group/578ebfc3d85f13a4b00cc2e49219906eba5b539d/wulab/lecture-3a/picture-language/operation-test.scm
scheme
-systems.co.uk/phAcademic/papers/funcgeo.pdf
(load "vector.scm") (load "rectangle.scm") (load "graphics.scm") (load "picture.scm") (load "operation.scm") (load "escher.scm") Based on Functional Geometry by (define (draw pict name) (define rectangle (make-rect (make-vect 0 0) (make-vect 1000 0) (make-vect 0 1000))) (make-viewport name ...
f74ed6f7d287bdb98271c360d9960a8c538b56ccd2a5768e45557df91b547052
ijvcms/chuanqi_dev
player_shop_once_cache.erl
%%%------------------------------------------------------------------- %%% @author qhb ( C ) 2016 , < COMPANY > %%% @doc %%% %%% @end Created : 23 . 九月 2016 上午11:43 %%%------------------------------------------------------------------- -module(player_shop_once_cache). -include("common.hrl"). -include("cache.hrl")....
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/shop/player_shop_once_cache.erl
erlang
------------------------------------------------------------------- @author qhb @doc @end ------------------------------------------------------------------- API
( C ) 2016 , < COMPANY > Created : 23 . 九月 2016 上午11:43 -module(player_shop_once_cache). -include("common.hrl"). -include("cache.hrl"). -export([ insert/1, update/2, delete/1, select_row/1, select_all/1 ]). insert(Info) -> PlayerId = Info#db_player_shop_once.player_id, Lv = Info#db_player_shop_once.lv, P...
c50046099e5fc916385c042862c02f913a93dfb4d49d2b76028ebe9fb6c10c2c
iskandr/parakeet-retired
MutableSet.mli
type 'a t val create : int -> 'a t val mem : 'a t -> 'a -> bool val add : 'a t -> 'a -> unit val remove : 'a t -> 'a -> unit val enum : 'a t -> 'a Enum.t val iter : ('a -> unit) -> 'a t -> unit val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b val copy : 'a t -> 'a t val is_empty : 'a t -> bool
null
https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Base/MutableSet.mli
ocaml
type 'a t val create : int -> 'a t val mem : 'a t -> 'a -> bool val add : 'a t -> 'a -> unit val remove : 'a t -> 'a -> unit val enum : 'a t -> 'a Enum.t val iter : ('a -> unit) -> 'a t -> unit val fold : ('a -> 'b -> 'b) -> 'a t -> 'b -> 'b val copy : 'a t -> 'a t val is_empty : 'a t -> bool
6dc7551c9d4461cfe393c80e344716763c1f3035267a8fdc99ad2a4bf68aabde
fabianbergmark/ECMA-262
JSON.hs
module Language.JavaScript.JSON where import Control.Applicative ((<$>), (<*)) import Text.Parsec ((<|>), char, choice, notFollowedBy, optionMaybe, satisfy) import Text.ParserCombinators.Parsec.Prim (GenParser) import Language.JavaScript.Lexer type JSONParser a = GenParser Char () a json...
null
https://raw.githubusercontent.com/fabianbergmark/ECMA-262/ff1d8c347514625595f34b48e95a594c35b052ea/src/Language/JavaScript/JSON.hs
haskell
module Language.JavaScript.JSON where import Control.Applicative ((<$>), (<*)) import Text.Parsec ((<|>), char, choice, notFollowedBy, optionMaybe, satisfy) import Text.ParserCombinators.Parsec.Prim (GenParser) import Language.JavaScript.Lexer type JSONParser a = GenParser Char () a json...
fbef3cd52ce0db5e68c23303d019799db222f6a23b0d155776e558fd94e9cbe3
seantempesta/cljs-react-navigation
core.cljs
(ns uiexplorer.core (:require [reagent.core :as r :refer [atom]] [re-frame.core :refer [subscribe dispatch dispatch-sync]] [uiexplorer.react-requires :refer [Expo]] [uiexplorer.routing :as routing] [uiexplorer.events] [uiexplorer.subs])) (def app-root routi...
null
https://raw.githubusercontent.com/seantempesta/cljs-react-navigation/d8f6f998543608e930de8d565e7b48221ecfbe8a/examples/re-frame/uiexplorer/src/uiexplorer/core.cljs
clojure
(ns uiexplorer.core (:require [reagent.core :as r :refer [atom]] [re-frame.core :refer [subscribe dispatch dispatch-sync]] [uiexplorer.react-requires :refer [Expo]] [uiexplorer.routing :as routing] [uiexplorer.events] [uiexplorer.subs])) (def app-root routi...
04dabb8d8b56430576ab4d091c09ff2f4cbff39ed0e177d0727d987045f47591
nasser/magic
run_test.clj
(assembly-load-from "clojure.tools.namespace.dll") (assembly-load-from "clojure.data.generators.dll") (assembly-load-from "clojure.test.generative.dll") (assembly-load-from "clojure.test.check.dll") ( System / setProperty " java.awt.headless " " true " ) (require '[clojure.test :as test] '[clojure.tools.namespace.f...
null
https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/tests/clojure/run_test.clj
clojure
(java.io.File. "test") System/exit
(assembly-load-from "clojure.tools.namespace.dll") (assembly-load-from "clojure.data.generators.dll") (assembly-load-from "clojure.test.generative.dll") (assembly-load-from "clojure.test.check.dll") ( System / setProperty " java.awt.headless " " true " ) (require '[clojure.test :as test] '[clojure.tools.namespace.f...
a9f0aa7920892dc1068a9b86d7d8e80ac6761c5c9459711b7d13efd3cd8d34f7
phoityne/haskell-debug-adapter
Watch.hs
# LANGUAGE LambdaCase # module Haskell.Debug.Adapter.Watch where import Control.Monad.IO.Class import qualified System.FSNotify as S import Control.Lens import Control.Concurrent (threadDelay) import Control.Concurrent.MVar import Control.Monad.State.Lazy import qualified System.Log.Logger as L import Control.Monad.E...
null
https://raw.githubusercontent.com/phoityne/haskell-debug-adapter/a8914e7768302b38a3d644906d27b530d1c8782d/src/Haskell/Debug/Adapter/Watch.hs
haskell
| | | | | | | |
# LANGUAGE LambdaCase # module Haskell.Debug.Adapter.Watch where import Control.Monad.IO.Class import qualified System.FSNotify as S import Control.Lens import Control.Concurrent (threadDelay) import Control.Concurrent.MVar import Control.Monad.State.Lazy import qualified System.Log.Logger as L import Control.Monad.E...
e7dc8b962dc6a27e9ba51a49ccc41f75061edb26e8e376fbed5a60ac82b64299
paurkedal/ocaml-caqti
caqti_dynload.ml
Copyright ( C ) 2017 - -2018 Petter A. Urkedal < > * * 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 License , or ( at your * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-caqti/f8b7a1c2bde2013d24ffc0b104f4af6e5f01480b/caqti-dynload/lib/caqti_dynload.ml
ocaml
for caqti-driver-mariadb
Copyright ( C ) 2017 - -2018 Petter A. Urkedal < > * * 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 License , or ( at your * option ) any la...
a2fa4fb7327deac55cb0c39af0897ca9173a57050e62178b48cf7ed4af155b32
camilodoa/deig
fitness.clj
(ns deig.fitness (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [call-attr]] [quil.core :as q])) (require-python '[numpy :as np] '[keras_preprocessing.image :as image-processing] '[tensorflow.keras.models :as models]) ;; Load default Keras MNI...
null
https://raw.githubusercontent.com/camilodoa/deig/1133f2e07d1fa25d1db5c0586ebe4b82e1562c9c/src/deig/fitness.clj
clojure
Load default Keras MNIST classifier Example code
(ns deig.fitness (:require [libpython-clj.require :refer [require-python]] [libpython-clj.python :as py :refer [call-attr]] [quil.core :as q])) (require-python '[numpy :as np] '[keras_preprocessing.image :as image-processing] '[tensorflow.keras.models :as models]) (def model (models/load_m...
b713ebd3fd100f067786e4a26b80aa1b90ae68da0fa63b63759816e955ed1d7a
archimag/cl-mssql
mssql.lisp
;;;; mssql.lisp ;;;; ;;;; This file is part of the cl-mssql library, released under Lisp-LGPL. ;;;; See file COPYING for details. ;;;; Author : < > (in-package :mssql) (define-foreign-library sybdb (:darwin "libsybdb.dylib") (:linux (:or "libsybdb.so" "libsybdb.so.5")) (:unix "libsybdb.so") (t (:default ...
null
https://raw.githubusercontent.com/archimag/cl-mssql/045602a19a32254108f2b75871049293f49731eb/src/mssql.lisp
lisp
mssql.lisp This file is part of the cl-mssql library, released under Lisp-LGPL. See file COPYING for details. error-handler message-handler define-sybdb-function utility
Author : < > (in-package :mssql) (define-foreign-library sybdb (:darwin "libsybdb.dylib") (:linux (:or "libsybdb.so" "libsybdb.so.5")) (:unix "libsybdb.so") (t (:default "sybdb"))) (with-simple-restart (skip "Skip loading foreign library tds.") (use-foreign-library sybdb)) (defctype %DBPROCESS :point...
8c3b0f3f1553f4efba56e2a7bde96b26b2935b60d1650b700f19b55f44085933
ryanpbrewster/haskell
monad_exploration_1.hs
-- monad_exploration.hs import Control.Monad {- Minimal definition of a monadic Wrapper -} data Wrapper a = Wrapper a deriving (Show, Eq, Ord) instance Monad Wrapper where return x = Wrapper x Wrapper x >>= f = f x To add two wrappers , we need to ` ` lift '' the ( + ) function main = do print $...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/hello-world/monad_exploration_1.hs
haskell
monad_exploration.hs Minimal definition of a monadic Wrapper
import Control.Monad data Wrapper a = Wrapper a deriving (Show, Eq, Ord) instance Monad Wrapper where return x = Wrapper x Wrapper x >>= f = f x To add two wrappers , we need to ` ` lift '' the ( + ) function main = do print $ liftM2 (+) (Wrapper 1) (Wrapper 2) print $ foldl1 (liftM2 (+)) [W...
3f0f1f86241be66fa6cb0d5ae6a45e452c705189590f0eec7b625a9e02c39784
yogthos/pg-feed-demo
handler.clj
(ns pg-feed-demo.test.handler (:require [clojure.test :refer :all] [ring.mock.request :refer :all] [pg-feed-demo.handler :refer :all])) (deftest test-app (testing "main route" (let [response ((app) (request :get "/"))] (is (= 200 (:status response))))) (testing "not-found route...
null
https://raw.githubusercontent.com/yogthos/pg-feed-demo/4b6e0cb7903182a9211c62ef85d36a2b7d78405f/test/clj/pg_feed_demo/test/handler.clj
clojure
(ns pg-feed-demo.test.handler (:require [clojure.test :refer :all] [ring.mock.request :refer :all] [pg-feed-demo.handler :refer :all])) (deftest test-app (testing "main route" (let [response ((app) (request :get "/"))] (is (= 200 (:status response))))) (testing "not-found route...
c82311129253fa9d5ca302ba25e9cee347110ebce2e5ded6bac5477bb06d5043
uswitch/bifrost
s3.clj
(ns uswitch.bifrost.s3 (:require [com.stuartsierra.component :refer (Lifecycle system-map using start stop)] [clojure.tools.logging :refer (info warn error debug)] [clojure.core.async :refer (<! >! go-loop thread chan close! alts! timeout >!! <!!)] [clojure.java.io :refer (file)] ...
null
https://raw.githubusercontent.com/uswitch/bifrost/40a2bbb8af5c3b6d65930511c141c777a9585942/src/uswitch/bifrost/s3.clj
clojure
(ns uswitch.bifrost.s3 (:require [com.stuartsierra.component :refer (Lifecycle system-map using start stop)] [clojure.tools.logging :refer (info warn error debug)] [clojure.core.async :refer (<! >! go-loop thread chan close! alts! timeout >!! <!!)] [clojure.java.io :refer (file)] ...
536e895f49abb3d45f0c85b2ff3d138f5355d3ffd3f4d6954625f4294a450137
ssadler/zeno
Aeson.hs
{-# LANGUAGE OverloadedStrings #-} module Zeno.Data.Aeson ( module DA , SerializeAeson(..) , StrictObject , withStrictObject , (.:-) , (.:-?) ) where import qualified Data.Aeson as Aeson import Data.Aeson as DA hiding (encode, decode) import Data.Aeson.Types as DA import D...
null
https://raw.githubusercontent.com/ssadler/zeno/9f715d7104a7b7b00dee9fe35275fb217532fdb6/src/Zeno/Data/Aeson.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Strict Object - An object where the parse operation...
module Zeno.Data.Aeson ( module DA , SerializeAeson(..) , StrictObject , withStrictObject , (.:-) , (.:-?) ) where import qualified Data.Aeson as Aeson import Data.Aeson as DA hiding (encode, decode) import Data.Aeson.Types as DA import Data.Aeson.Quick as DA (build, (.?),...
d79daddd956a3cb652f0ef381c0338ce7768358fe4c9b574b35ba3b2d3435268
remixlabs/wasicaml
wc_emit.ml
Copyright ( C ) 2021 by Figly , Inc. This code is free software , see the file LICENSE for details . This code is free software, see the file LICENSE for details. *) open Printf open Bigarray open Wc_types open Wc_number open Wc_sexp open Wc_instruct OCaml functions are translated to Wasm functions wi...
null
https://raw.githubusercontent.com/remixlabs/wasicaml/1c048a373b90c50ef4cabb25ec47517b8a076ef8/src/wasicaml/wc_emit.ml
ocaml
global pad maps letrec label to name maps name to type maps function label to (letrec_label, subfunction_id) maps letrec_label to list of subfunction labels maps letrec label to the (relative) index in the table of functions knowledge about the globals for each letrec function: knowledge about its enviro...
Copyright ( C ) 2021 by Figly , Inc. This code is free software , see the file LICENSE for details . This code is free software, see the file LICENSE for details. *) open Printf open Bigarray open Wc_types open Wc_number open Wc_sexp open Wc_instruct OCaml functions are translated to Wasm functions wi...
69555ca4c8e01a62576cf993239e033fab3cdcda0484775fde09feea96d91b80
joachimdb/dl4clj
word2vec_raw_text_example.clj
(ns ^{:doc ""} dl4clj.examples.word2vec.word2vec-raw-text-example (:import [org.deeplearning4j.models.word2vec Word2Vec Word2Vec$Builder] [org.deeplearning4j.models.word2vec.wordstore.inmemory InMemoryLookupCache] [org.deeplearning4j.models.embeddings.loader WordVectorSerializer] [o...
null
https://raw.githubusercontent.com/joachimdb/dl4clj/fe9af7c886b80df5e18cd79923fbc6955ddc2694/src/dl4clj/examples/word2vec/word2vec_raw_text_example.clj
clojure
Strip white space before and after for each line Split on white spaces in the line to get words Example usage:
(ns ^{:doc ""} dl4clj.examples.word2vec.word2vec-raw-text-example (:import [org.deeplearning4j.models.word2vec Word2Vec Word2Vec$Builder] [org.deeplearning4j.models.word2vec.wordstore.inmemory InMemoryLookupCache] [org.deeplearning4j.models.embeddings.loader WordVectorSerializer] [o...
45e4392cf733f4345987bb2b154d4310910735966e3797adb117369929c3970e
bobbae/gosling-emacs
scribe.ml
(defun (apply-look go-forward (save-excursion c (if (! (eolp)) (forward-character)) (setq go-forward -1) (backward-word) (setq c (get-tty-character)) (if (> c ' ') (progn (insert-character '@') (insert-character c) (insert-character '[') (forward-word) (setq g...
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/scribe.ml
ocaml
(defun (apply-look go-forward (save-excursion c (if (! (eolp)) (forward-character)) (setq go-forward -1) (backward-word) (setq c (get-tty-character)) (if (> c ' ') (progn (insert-character '@') (insert-character c) (insert-character '[') (forward-word) (setq g...
2393a282e0067eea7f26d53b684038a09023e68a130de7162fbd5d7ffa3bf0fd
ocaml-ppx/ocamlformat
nesting.ml
module M = struct let a = (((((( ) ) ) ) ) ) let a = (ff(ff(ff(ff(ff(ff( ) ) ) ) ) ) ) let a = [[[[[[ ] ] ] ] ] ] let a = [ff[ff[ff[ff[ff[ff[ ] ] ] ] ] ] ]
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/failing/tests/nesting.ml
ocaml
module M = struct let a = (((((( ) ) ) ) ) ) let a = (ff(ff(ff(ff(ff(ff( ) ) ) ) ) ) ) let a = [[[[[[ ] ] ] ] ] ] let a = [ff[ff[ff[ff[ff[ff[ ] ] ] ] ] ] ]
b38274f7fce21f26bdcb59167caa1a49886228491c9cedccece92d1e64876bf4
mirage/irmin
hash.ml
* Copyright ( c ) 2013 - 2022 < > * * 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...
null
https://raw.githubusercontent.com/mirage/irmin/b5d5e3f98eeb5095bcb9cd097e61b724eb66aef9/src/irmin/hash.ml
ocaml
* Copyright ( c ) 2013 - 2022 < > * * 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...
a1ce47ea17a246cc4cae657ec6a1c22d176490eba480de1226fb715d57b70fe3
facebookarchive/duckling_old
finance.clj
( {} "$10" "10$" "ten dollars" (money 10 "$") ;"under $15" ;"no more than 15$" ;"no greater than 15$" " less than fifteen dollars " ( money 15 " $ " " < " ) "ten cents" (money 10 "cent") "$10,000" "10K$" "$10k" (money 10000 "$") "USD1.23" (money 1.23 "USD") "2 dollar and 23 cents" "two dollar 23 cents" "2 dollar...
null
https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/en/corpus/finance.clj
clojure
"under $15" "no more than 15$" "no greater than 15$" unknown unit
( {} "$10" "10$" "ten dollars" (money 10 "$") " less than fifteen dollars " ( money 15 " $ " " < " ) "ten cents" (money 10 "cent") "$10,000" "10K$" "$10k" (money 10000 "$") "USD1.23" (money 1.23 "USD") "2 dollar and 23 cents" "two dollar 23 cents" "2 dollar 23" "two dollar and 23" (money 2.23 "$") "20€" "20 eur...
30ba2811f528f1e782b076bbff98f4c2ee33c0b673b60c87ac2b90a55818788e
hanshuebner/bknr-web
smtp-commands.lisp
(in-package :bknr.smtp-server.commands) (enable-interpol-syntax) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; smtp commands ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;...
null
https://raw.githubusercontent.com/hanshuebner/bknr-web/5c30b61818a2f02f6f2e5dc69fd77396ec3afc51/modules/mail/smtp-commands.lisp
lisp
smtp commands
(in-package :bknr.smtp-server.commands) (enable-interpol-syntax) (defmethod helo ((client smtp-client) args) (unless args (reply client 501 "missing parameter")) (when (smtp-client-peer-id client) (error (make-smtp-error 502 "HELO/EHLO command already seen"))) (setf (smtp-client-peer-id client) args)...
e84f0a3f2f3d6f6de0ba62d6874ecc2c95fc3120f93668a2e7137f7304fd7f79
theodormoroianu/SecondYearCourses
LambdaChurch_20210415164649.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164649.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
49b0d99bec0e3c1b1612681dcb1994f3e3ab1ae0dd8e8b8f8668b4162cf07173
CzesiaLa/RoadToHaskell
Kmean.hs
module Kmean ( Cluster , kmean ) where import Data.List import Piksel data Cluster = Cluster Color [Piksel] instance Show Cluster where show (Cluster col pixels) = "--\n" ++ show col ++ "\n-\n" ++ intercalate "\n" (map show pixels) type SelectedColors = [Color] getClusterColor :: Cluster -> Color g...
null
https://raw.githubusercontent.com/CzesiaLa/RoadToHaskell/9cb87a211f5441670328e7dfcc9facf2e33a00a9/04-image_compressor/image-compressor/src/Kmean.hs
haskell
module Kmean ( Cluster , kmean ) where import Data.List import Piksel data Cluster = Cluster Color [Piksel] instance Show Cluster where show (Cluster col pixels) = "--\n" ++ show col ++ "\n-\n" ++ intercalate "\n" (map show pixels) type SelectedColors = [Color] getClusterColor :: Cluster -> Color g...
8b428f43e0a62c2852862052b722895f37c1b7bf23eb3e6fe3108c25f4beb2b5
esumii/min-caml
beta.ml
open KNormal let find x env = try M.find x env with Not_found -> x (* 置換のための関数 (caml2html: beta_find) *) let rec g env = function (* β簡約ルーチン本体 (caml2html: beta_g) *) | Unit -> Unit | Int(i) -> Int(i) | Float(d) -> Float(d) | Neg(x) -> Neg(find x env) | Add(x, y) -> Add(find x env, find y env) | Sub(x, y) ...
null
https://raw.githubusercontent.com/esumii/min-caml/8860b6fbc50786a27963aff1f7639b94c244618a/beta.ml
ocaml
置換のための関数 (caml2html: beta_find) β簡約ルーチン本体 (caml2html: beta_g) 変数を置換 (caml2html: beta_var)
open KNormal | Unit -> Unit | Int(i) -> Int(i) | Float(d) -> Float(d) | Neg(x) -> Neg(find x env) | Add(x, y) -> Add(find x env, find y env) | Sub(x, y) -> Sub(find x env, find y env) | FNeg(x) -> FNeg(find x env) | FAdd(x, y) -> FAdd(find x env, find y env) | FSub(x, y) -> FSub(find x env, find y e...
4298bb270d3828d739d9ca1a01035bf8571c79e3c8d3478cfdaf3089291612b5
ucsd-progsys/nate
location.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/parsing/location.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 . $ I d : location.ml , v 1.48.16.1 d...
1f081e48cd86362650637b9a829f34771deee2e53f03ab264777fe6d46b18e40
oden-lang/oden
Typed.hs
module Oden.Core.Typed where import Oden.Core.Definition import Oden.Core.Expr import Oden.Core.Package import Oden.Core.ProtocolImplementation import Oden.Identifier import Oden.Type.Polymorphic data TypedMemberAccess = RecordFieldAccess TypedExpr Identi...
null
https://raw.githubusercontent.com/oden-lang/oden/10c99b59c8b77c4db51ade9a4d8f9573db7f4d14/src/Oden/Core/Typed.hs
haskell
module Oden.Core.Typed where import Oden.Core.Definition import Oden.Core.Expr import Oden.Core.Package import Oden.Core.ProtocolImplementation import Oden.Identifier import Oden.Type.Polymorphic data TypedMemberAccess = RecordFieldAccess TypedExpr Identi...
38b25336ad97f0ccc5bc143256a47979115fb527f585ef0952377a8d8d54fc56
Zulu-Inuoe/winutil
window.lisp
(in-package #:com.inuoe.winutil) (defvar %*windows* (make-hash-table) "Table of created `window' instances") (defclass window (d:disposable) ((%wndclass-wrapper :type wndclass-wrapper) (%hwnd-wrapper :type hwnd-wrapper)) (:documentation "Higher level interface to an `hwnd' allowing for generic fun...
null
https://raw.githubusercontent.com/Zulu-Inuoe/winutil/8f150117cc760c154dc18af38fd6603031a376f0/src/window.lisp
lisp
Guard against already-disposed windows The window may have been disposed by a more specialized method which then used `call-next-method' it receives is nccreate, as opposed to getminmaxinfo need to investigate this more Special hook to catch initial window creation
(in-package #:com.inuoe.winutil) (defvar %*windows* (make-hash-table) "Table of created `window' instances") (defclass window (d:disposable) ((%wndclass-wrapper :type wndclass-wrapper) (%hwnd-wrapper :type hwnd-wrapper)) (:documentation "Higher level interface to an `hwnd' allowing for generic fun...