_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
cbcd0388ba08627f1740fd2a347775a883683f56778bcb4347d242017690eaac
ocaml/ocaml
meta.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/d408cac30d4cbad5a125520c96a7a351d7950577/bytecomp/meta.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the external global_data : unit -> Obj.t array = "caml_get_global_data" external realloc_global_data : int ->...
fa360f450be003218667c47739cd82293fa544e834709b29821ec1f04a0d284e
aristidb/http-types
Types.hs
{-# LANGUAGE OverloadedStrings #-} module Network.HTTP.Types ( -- * Methods Method , methodGet , methodPost , methodHead , methodPut , methodDelete , methodTrace , methodConnect , methodOptions , methodPatch , StdMethod(..) , parseMethod , renderMethod , renderStdMethod -- * Versions , HttpVersion(..) , http09 , ...
null
https://raw.githubusercontent.com/aristidb/http-types/4172154d1cc23833256339d9a919721dfc10fbc3/Network/HTTP/Types.hs
haskell
# LANGUAGE OverloadedStrings # * Methods * Versions * Status * Headers ** Types ** Common headers * URI ** Query string **Escape only parts *** Text query string (UTF8 encoded) ** Generalized query types ** Path segments ** Path (segments + query string) ** URL encoding / decoding
module Network.HTTP.Types ( Method , methodGet , methodPost , methodHead , methodPut , methodDelete , methodTrace , methodConnect , methodOptions , methodPatch , StdMethod(..) , parseMethod , renderMethod , renderStdMethod , HttpVersion(..) , http09 , http10 , http11 , http20 , Status(..) , mkStatus , status100 , con...
389091f30af6a4b2965b70761a8c0628ea8d114e87ac46df08be7eba66aee157
crategus/cl-cffi-gtk
pixbuf-scale.lisp
A demo for GtkFrame - 2021 - 11 - 10 ;;;; ;;;; This demo allows to change interactively the appearance of the frame. (in-package #:gtk-example) (defun example-pixbuf-scale (&optional application) (within-main-loop (let* (;; Create a toplevel window. (window (make-instance 'gtk-window ...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/demo/gtk-example/pixbuf-scale.lisp
lisp
This demo allows to change interactively the appearance of the frame. Create a toplevel window. A horizontal Box for the content of the window. A vertical Grid for the actions. A drawing area (pixbuf (gdk-pixbuf-new-from-file "background.jpg")) A Quit button Add frame, content, and action to the wind...
A demo for GtkFrame - 2021 - 11 - 10 (in-package #:gtk-example) (defun example-pixbuf-scale (&optional application) (within-main-loop (window (make-instance 'gtk-window :type :toplevel :application application ...
f965fbba18d30d7e31bc6355e644c67b43f1db4bcb5c86ed0c0e5305b2242cd9
emil0r/reverie
page.clj
(ns reverie.test.page (:require [clj-time.core :as t] [hiccup.page :refer [html5]] [reverie.core :refer [area]] [reverie.page :as page] [reverie.route :as route] [reverie.render :as render] [reverie.system :as sys] [reverie.template :as template] [midje.sweet :refer :all])) (defn get-rend...
null
https://raw.githubusercontent.com/emil0r/reverie/a29c223b7326e6d5a5e0874d33c37ff2fa0dfd4d/reverie-test/test/reverie/test/page.clj
clojure
(ns reverie.test.page (:require [clj-time.core :as t] [hiccup.page :refer [html5]] [reverie.core :refer [area]] [reverie.page :as page] [reverie.route :as route] [reverie.render :as render] [reverie.system :as sys] [reverie.template :as template] [midje.sweet :refer :all])) (defn get-rend...
6d14e39c30b8528de92fc0fedbae78f99aceb921fd05a5c3361d72292457e34e
ocaml-flambda/ocaml-jst
lambda.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/7e5a626e4b4e12f1e9106564e1baba4d0ef6309a/lambda/lambda.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Asttypes type mutable_flag = Immutable | Immutable_unique | Mutable type compile_time_constant = ...
c5147da5f29737e141dba9572604b1367f0947510cef6949d4468fd5a9dffa69
diprism/perpl
Parse.hs
Parser code module Parse.Parse where import Parse.Lex import Struct.Lib import Util.Helpers (enumerate) -- Throws a parser error message (s) at a certain position (p) parseErr' p s = Left (p, s) eofPos = (-1, 0) eofErr = parseErr' eofPos "unexpected EOF" -- Throws a parser error message (s) at the current positio...
null
https://raw.githubusercontent.com/diprism/perpl/b4a7fb5b6704af807369baaecd618ddf9ca691f9/src/Parse/Parse.hs
haskell
Throws a parser error message (s) at a certain position (p) Throws a parser error message (s) at the current position Parsing monad: given the lexed tokens, returns either an error or (a, remaining tokens) Extract the function from ParseM Call a ParseM's function with some tokens Given something and a list of tok...
Parser code module Parse.Parse where import Parse.Lex import Struct.Lib import Util.Helpers (enumerate) parseErr' p s = Left (p, s) eofPos = (-1, 0) eofErr = parseErr' eofPos "unexpected EOF" parseErr s = ParseM $ \ ts -> let p = case ts of [] -> eofPos; ((p, _) : ts) -> p in Left (p, s) Parse error mess...
009905c10ae8d66a1fb0b01b29d1a6ba32b7ebd9c30feb5311586c8f9e57412c
lispnik/cl-http
cl-http-70-14.lisp
-*- Mode : LISP ; Syntax : ansi - common - lisp ; Package : http ; Base : 10 ; Patch - File : t -*- Patch file for CL - HTTP version 70.14 ;;; Reason: Function (CLOS:METHOD CLOS:INITIALIZE-INSTANCE (HTTP::BASIC-DATA-UNIVERSE) :AFTER): make multiple reader lock. ;;; Function WWW-UTILS:WITH-LOCK-HELD: call PROCESS:...
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/lispm/server/patch/cl-http-70/cl-http-70-14.lisp
lisp
Syntax : ansi - common - lisp ; Package : http ; Base : 10 ; Patch - File : t -*- Reason: Function (CLOS:METHOD CLOS:INITIALIZE-INSTANCE (HTTP::BASIC-DATA-UNIVERSE) :AFTER): make multiple reader lock. Function WWW-UTILS:WITH-LOCK-HELD: call PROCESS:WITH-LOCK using the keyword argument MODE properly. Function HTTP...
Patch file for CL - HTTP version 70.14 Function ( CLOS : METHOD HTTP : INTERN - GROUP ( HTTP::STANDARD - REALM - GROUP - MIXIN STRING ) ): - Function ( CLOS : METHOD HTTP::WRITE - LISP - SOURCE ( HTTP::STANDARD - REALM NULL T ) ): - Function ( CLOS : METHOD HTTP::SWITCH - LOG - FILE ( HTTP::FILE - LOGGING -...
c018398844e220fc7177f82a3e269cf2224b255c9ba81cf037f98e3cf80be274
Perry961002/SICP
exe2.6-Church.scm
;定义过程zero: ; 接受f ; 返回过程: 接受x ; 返回x ( ( zero f ) x ) = = > x (define zero (lambda (f) (lambda (x) x))) ;定义过程add-1: ; 接受过程n ; 返回过程: ; 接受过程f ; 返回过程: 接受x ; 返回(f ((n f) x)) ( ( ( add-1 n ) f ) x ) = = > ( f ( ( n f ) x ) ) (define (add-1 n) ...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap2/exercise/exe2.6-Church.scm
scheme
定义过程zero: 接受f 返回过程: 返回x 定义过程add-1: 接受过程n 返回过程: 接受过程f 返回过程: 返回(f ((n f) x)) (lambda (f) (lambda (x) (f (((lambda (f) (lambda (x) x)) f) x)))) (lambda (f) (lambda (x) (f ((lambda (x) x) x)))) (lambda (f) (lambda (x) (f x))) 现在可以知道这里的数字表示了运算的次数 那么 n + m表示在m + n次运算
接受x ( ( zero f ) x ) = = > x (define zero (lambda (f) (lambda (x) x))) 接受x ( ( ( add-1 n ) f ) x ) = = > ( f ( ( n f ) x ) ) (define (add-1 n) (lambda (f) (lambda (x) (f ((n f) x))))) ( add-1 zero ) ( lambda ( f ) ( lambda ( x ) ( f ( ( zero f ) x ) ...
1f17587bd93e936bb42b56a0f4bbc91d4a033495b10c3780c8f01a192522d572
tachukao/ocaml-mlir
gen_types.ml
let with_file ~f file = let oc = open_out file in let fmt = Format.formatter_of_out_channel oc in f fmt; close_out oc let () = with_file "mlir_types.c" ~f:(fun fmt_c -> Format.fprintf fmt_c "#include \"mlir-c/AffineExpr.h\"@."; Format.fprintf fmt_c "#include \"mlir-c/AffineMap.h\"@."; Form...
null
https://raw.githubusercontent.com/tachukao/ocaml-mlir/0e65403c994b16c3e01a55e61b4df7f5a1728af3/src/gen/gen_types.ml
ocaml
let with_file ~f file = let oc = open_out file in let fmt = Format.formatter_of_out_channel oc in f fmt; close_out oc let () = with_file "mlir_types.c" ~f:(fun fmt_c -> Format.fprintf fmt_c "#include \"mlir-c/AffineExpr.h\"@."; Format.fprintf fmt_c "#include \"mlir-c/AffineMap.h\"@."; Form...
8faf04a56e413833a85d1179e9c3e1aa31aa199105679c423da9101ba64d2f8f
ltoth/unison
tree.ml
Unison file synchronizer : src / tree.ml Copyright 1999 - 2010 , This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option...
null
https://raw.githubusercontent.com/ltoth/unison/e763510165e3d93c5140a4c5f2ea0dcbf5825a0c/tree.ml
ocaml
**
Unison file synchronizer : src / tree.ml Copyright 1999 - 2010 , This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option...
4126e2e88f1e153a84cc1e3131920efd06f337915d82ded70045eb21a7d642d2
eareese/htdp-exercises
042-car-example-tests.rkt
#lang htdp/bsl (require 2htdp/image) (require 2htdp/universe) (define WIDTH-OF-WORLD 200) (define HEIGHT-OF-WORLD 200) (define BACKGROUND (rectangle WIDTH-OF-WORLD HEIGHT-OF-WORLD "outline" "black")) (define Y-CAR (/ HEIGHT-OF-WORLD 2)) ...
null
https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part01-fixed-size-data/042-car-example-tests.rkt
racket
interpretation number of pixels between left border and the car clock-tick-handler key-stroke-handler mouse-event-handler end? WorldState -> Image places the image of the car x pixels from the left margin of the BACKGROUND image WorldState -> WorldState example: WorldState -> WorldState launches the program...
#lang htdp/bsl (require 2htdp/image) (require 2htdp/universe) (define WIDTH-OF-WORLD 200) (define HEIGHT-OF-WORLD 200) (define BACKGROUND (rectangle WIDTH-OF-WORLD HEIGHT-OF-WORLD "outline" "black")) (define Y-CAR (/ HEIGHT-OF-WORLD 2)) ...
30ac4e28972aa8d3d4e7416f4af9ca696887a32a24e0c46a3cebd0a2473f4a5a
ucsd-progsys/liquidhaskell
Partial.hs
{-@ LIQUID "--expect-any-error" @-} module Partial () where @ posPlus : : : Int | v > = 0 } - > { v : Int | v > = x } @ posPlus :: Int -> Int posPlus x = if (x > 0) then 2 + (posPlus (x - 1)) else 0 goo = posPlus (-3) {-@ poo :: x:Int -> {v: Int | v >= x } @-} poo x = if x > 0 then posP...
null
https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/neg/Partial.hs
haskell
@ LIQUID "--expect-any-error" @ @ poo :: x:Int -> {v: Int | v >= x } @
module Partial () where @ posPlus : : : Int | v > = 0 } - > { v : Int | v > = x } @ posPlus :: Int -> Int posPlus x = if (x > 0) then 2 + (posPlus (x - 1)) else 0 goo = posPlus (-3) poo x = if x > 0 then posPlus x else x
79752e42e175e2225cd53f057682916d0d8f06696529c9854c86558490610e9b
mpickering/apply-refact
Bracket46.hs
foo :: ((HasCallStack)) => Int foo = undefined
null
https://raw.githubusercontent.com/mpickering/apply-refact/091859a538b0df14295497f037b21131cc2e6d81/tests/examples/Bracket46.hs
haskell
foo :: ((HasCallStack)) => Int foo = undefined
ae533d06d58e2b1c998b80e1b4248db0f64fc3328a05cd7ba27d0d0918b12f2f
SimulaVR/godot-haskell
Expression.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.Expression (Godot.Core.Expression.execute, G...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/Expression.hs
haskell
| Executes the expression that was previously parsed by @method parse@ and returns the result. Before you use the returned object, you should check if the method failed by calling @method has_execute_failed@. If you defined input variables in @method parse@, you can specify their values in the inputs array, in ...
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.Expression (Godot.Core.Expression.execute, G...
2f9c67709f53c86cb96adbe3b49d976fe66e60f7390903389bf3c13bbf30b76f
esumii/min-caml
simm.ml
open Asm 命令列の13bit即値最適化 ( caml2html : simm13_g ) | Ans(exp) -> Ans(g' env exp) | Let((x, t), Set(i), e) when -4096 <= i && i < 4096 -> (* Format.eprintf "found simm13 %s = %d@." x i; *) let e' = g (M.add x i env) e in if List.mem x (fv e') then Let((x, t), Set(i), e') else ((* Format.epri...
null
https://raw.githubusercontent.com/esumii/min-caml/8860b6fbc50786a27963aff1f7639b94c244618a/SPARC/simm.ml
ocaml
Format.eprintf "found simm13 %s = %d@." x i; Format.eprintf "erased redundant Set to %s@." x; for array access 各命令の13bit即値最適化 (caml2html: simm13_gprime) トップレベル関数の13bit即値最適化
open Asm 命令列の13bit即値最適化 ( caml2html : simm13_g ) | Ans(exp) -> Ans(g' env exp) | Let((x, t), Set(i), e) when -4096 <= i && i < 4096 -> let e' = g (M.add x i env) e in if List.mem x (fv e') then Let((x, t), Set(i), e') else e') Format.eprintf " erased redundant SLL on % s@. " x ; g env ...
254d8a13ee5c5fa162ec51ab20c678ab34f968c71850fced35501ac2f59d4ada
uncomplicate/clojurecuda
impl.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) or later ;; which can be found in the file LICENSE at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be boun...
null
https://raw.githubusercontent.com/uncomplicate/clojurecuda/532ef26e0467d7963a37d7806634125ce091728b/src/clojure/uncomplicate/clojurecuda/internal/impl.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) or later which can be found in the file LICENSE 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 rem...
Copyright ( c ) . All rights reserved . (ns ^{:author "Dragan Djuric"} uncomplicate.clojurecuda.internal.impl (:require [uncomplicate.commons [core :refer [Releaseable release Info info Wrapper Wrappable wrap extract wrap-float wrap-double wrap-long wrap-int wrap-sho...
8801772cbbbe4d5be3ceca03435223865a0b30866b47ad7f11d2386f042d25b2
grin-compiler/ghc-wpc-sample-programs
Logging.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} | Module : Text . Pandoc . Logging Copyright : Copyright ( C ) 2006 - 2020 License : GNU GPL , version 2 or above Maintainer : < > Stability : alpha Portabili...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Logging.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # | Verbosity level.
# LANGUAGE DeriveGeneric # | Module : Text . Pandoc . Logging Copyright : Copyright ( C ) 2006 - 2020 License : GNU GPL , version 2 or above Maintainer : < > Stability : alpha Portability : portable This module provides data types and functions for warni...
e3f33e9e30d7bdedb7f0af12a4c9866abc37257471d0e794914cda27d499fc01
ocaml/opam-file-format
oldpos.ml
(**************************************************************************) (* *) (* Copyright 2020 OCamlPro *) (* *) (* All righ...
null
https://raw.githubusercontent.com/ocaml/opam-file-format/d99af5e8f3b917770b3c8d29f55d865fcab3b899/tests/oldpos.ml
ocaml
************************************************************************ Copyright 2020 OCamlPro All rights reserved. This ...
GNU Lesser General Public License version 2.1 , with the special [@@@ocaml.warning "-3"] open OpamParserTypes open Utils module A = Alcotest let null = ("", 0, 0) let fd = "<nofile>" module Value = struct let int0 = Int (null, 0) let intmax = Int (null, max_int) let sfoo = String (null, "foo") l...
2a28fd7583ff24a0a082f3e5ffaf899f61b229bfce69686eecc16944c61bf996
bobzhang/fan
charf.mli
(** Extension to char module *) include module type of Char val is_whitespace : char -> bool val is_newline : char -> bool val is_digit : char -> bool val is_uppercase : char -> bool val is_lowercase : char -> bool
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/utils/charf.mli
ocaml
* Extension to char module
include module type of Char val is_whitespace : char -> bool val is_newline : char -> bool val is_digit : char -> bool val is_uppercase : char -> bool val is_lowercase : char -> bool
d38da552ddfece2f55d719433ae3cacf3f55ce48645377e2445504a08c28c6d2
nixeagle/nisp
user-init.lisp
Hackity hack to load configuration file _ last _ . (in-package :nisp.i) (load (merge-pathnames "config.lisp" +root-directory+) :if-does-not-exist nil)
null
https://raw.githubusercontent.com/nixeagle/nisp/680b40b3b9ea4c33db0455ac73cbe3756afdbb1e/irc-bot/user-init.lisp
lisp
Hackity hack to load configuration file _ last _ . (in-package :nisp.i) (load (merge-pathnames "config.lisp" +root-directory+) :if-does-not-exist nil)
fdb945a670a2869d1a6e88f3cfdf4690c25eb5e50a98a3b25c3b87ba95bfba7f
sol/doctest
Fib.hs
module Fib where -- | Compute Fibonacci numbers -- -- Examples: -- > > > fib 10 55 -- > > > fib 5 5 fib :: Int -> Int fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2)
null
https://raw.githubusercontent.com/sol/doctest/7437a61ba2ee89f31479f4a8b2944cda831d11a5/doc/example/src/Fib.hs
haskell
| Compute Fibonacci numbers Examples:
module Fib where > > > fib 10 55 > > > fib 5 5 fib :: Int -> Int fib 0 = 0 fib 1 = 1 fib n = fib (n - 1) + fib (n - 2)
d1aec82d64d7dd5ec82a962522dd851d0febcc4531635fccdbe6043e171a9612
snoyberg/conduit
Conduit.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # | Your intended one - stop - shop for conduit functionality . -- This re-exports functions from many commonly used modules. -- When there is a conflict with standard functions, functions -- in this module are disambiguated by adding a trailing C -- (or for chunked functi...
null
https://raw.githubusercontent.com/snoyberg/conduit/1771780ff4b606296924a28bf5d4433ae6a916f3/conduit/src/Conduit.hs
haskell
This re-exports functions from many commonly used modules. When there is a conflict with standard functions, functions in this module are disambiguated by adding a trailing C (or for chunked functions, replacing a trailing E with CE). without causing naming conflicts. For more information on the naming scheme an...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # | Your intended one - stop - shop for conduit functionality . This means that the Conduit module can be imported unqualified module Conduit module Data.Conduit , module Data.Conduit.Lift , module Data.Conduit.Combinators.Unqualified * lifting , Mon...
8d9312805d36a9c27f26ee1747561b0056044552f19c0335dd0103fcfc2ce79a
blindglobe/clocc
threading-utils.lisp
;;; -*- Mode: Lisp; Package: CLX-VM; -*- This file contains the MP higher level support for CLX VM copyright 2003 , ( BSD like license ) ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; 1 . Redistrib...
null
https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clx/clx-vm/threading-utils.lisp
lisp
-*- Mode: Lisp; Package: CLX-VM; -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following ...
This file contains the MP higher level support for CLX VM copyright 2003 , ( BSD like license ) 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above 3 . The name of the author may not be used to endorse or promote THIS SOFTWARE I...
af860ac1079f2442b40db9eb5175a58e1de270125c5997660db27e60f76041e7
dawidovsky/IIUWr
calc.rkt
#lang racket (provide (all-defined-out)) ;; arithmetic expressions (define (const? t) (number? t)) (define (binop? t) (and (list? t) (= (length t) 3) (member (car t) '(+ - * /)))) (define (binop-op e) (car e)) (define (binop-left e) (cadr e)) (define (binop-right e) (caddr e)) (define (b...
null
https://raw.githubusercontent.com/dawidovsky/IIUWr/73f0f65fb141f82a05dac2573f39f6fa48a81409/MP/Pracownia10/calc.rkt
racket
arithmetic expressions calculator let expressions evalation via substitution evaluation via environments
#lang racket (provide (all-defined-out)) (define (const? t) (number? t)) (define (binop? t) (and (list? t) (= (length t) 3) (member (car t) '(+ - * /)))) (define (binop-op e) (car e)) (define (binop-left e) (cadr e)) (define (binop-right e) (caddr e)) (define (binop-cons op l r) (list ...
06e4a30c41db9431dfc2a7887e0f8d617077c2d47a3aa617b02c3d6f90454cce
ciderpunx/57-exercises-for-programmers
P21NumToName.hs
module P21NumToName where TODO : i18n prompt for language and then show months in that lang import Data.Map (fromList, (!), Map) import Library main :: IO () main = do putStrLn "Month lookup" m <- promptMonth "Enter month number (1..12): " putStrLn $ getMonth m putStrLn $ getMonth' m getMonth :: Int -> S...
null
https://raw.githubusercontent.com/ciderpunx/57-exercises-for-programmers/25958ab80cc3edc29756d3bddd2d89815fd390bf/src/P21NumToName.hs
haskell
module P21NumToName where TODO : i18n prompt for language and then show months in that lang import Data.Map (fromList, (!), Map) import Library main :: IO () main = do putStrLn "Month lookup" m <- promptMonth "Enter month number (1..12): " putStrLn $ getMonth m putStrLn $ getMonth' m getMonth :: Int -> S...
5731d0cf8fa9e202cdfb0201bb8b27c0c58377c429391d3cbac6502393f5f247
BitGameEN/bitgamex
cberl_worker.erl
-module(cberl_worker). -behaviour(poolboy_worker). -include("cberl.hrl"). -behaviour(gen_server). %% API -export([start_link/1]). %% gen_server callbacks -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). %%%=======================...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/cberl/src/cberl_worker.erl
erlang
API gen_server callbacks =================================================================== API =================================================================== -------------------------------------------------------------------- @doc Starts the server @end ---------------------------------------------------...
-module(cberl_worker). -behaviour(poolboy_worker). -include("cberl.hrl"). -behaviour(gen_server). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). ) - > { ok , Pid } | ignore | { error , Error } star...
679688f009429d2385ca304078f0b70524af2516785b89937f5e1b2d46e7a2ed
rrnewton/haskell-lockfree
Class.hs
# LANGUAGE OverlappingInstances , MultiParamTypeClasses , BangPatterns , MagicHash # | A type class capturing mutable storage cells that support CAS operations in the IO monad . module Data.CAS.Internal.Class (CASable(..), unsafeName, ptrEq) where import GHC.IO (unsafePerformIO) import GHC.Exts (Int(I#)) ...
null
https://raw.githubusercontent.com/rrnewton/haskell-lockfree/87122157cbbc96954fcc575b4b110003d3e5c2f8/Obsolete_Deprecated/IORefCAS/Data/CAS/Internal/Class.hs
haskell
| It would be nice to use an associated type family with this class
# LANGUAGE OverlappingInstances , MultiParamTypeClasses , BangPatterns , MagicHash # | A type class capturing mutable storage cells that support CAS operations in the IO monad . module Data.CAS.Internal.Class (CASable(..), unsafeName, ptrEq) where import GHC.IO (unsafePerformIO) import GHC.Exts (Int(I#)) ...
75980d9b1600e189e82b19d5989c27e375832a49e0efbce850e26f0835e4f062
dino-/epub-tools
Util.hs
-- License: ISC (see LICENSE) Author : < > module EpubTools.EpubName.Format.Util ( Globals (..) , EN , runEN , throwError , asks , scrubString , sanitizeString ) where import Codec.Epub.Data.Metadata import Codec.Epub.Data.Package import Control.Monad.Except import Control.Monad.Identity ...
null
https://raw.githubusercontent.com/dino-/epub-tools/edcfa8f56622433f39febac9436bf88c04fc8303/src/EpubTools/EpubName/Format/Util.hs
haskell
License: ISC (see LICENSE) Convenience function to make a regex replacer for a given pattern and replacement string. Helps by doing the 'flip' of str and rpl so you can partial eval. Transforms a string like this: "the quick brown McCheeseburger" -> "TheQuickBrownMccheeseburger" A set of common strin...
Author : < > module EpubTools.EpubName.Format.Util ( Globals (..) , EN , runEN , throwError , asks , scrubString , sanitizeString ) where import Codec.Epub.Data.Metadata import Codec.Epub.Data.Package import Control.Monad.Except import Control.Monad.Identity import Control.Monad.Reader im...
22976ac95c225c6eb0ce7f34314fc6c4966972ad31e04f0f84065a5d2fc2fbce
slagyr/speclj
running.cljc
(ns speclj.running (:require [clojure.string :as str] [speclj.components :as components] [speclj.config :refer [active-reporters]] [speclj.platform :refer [current-time pending? secs-since]] [speclj.reporting :refer [report-description* report-run]] [speclj....
null
https://raw.githubusercontent.com/slagyr/speclj/5e5aad5e0c7dcba48e403644acc9a7efeebd4c42/src/speclj/running.cljc
clojure
(ns speclj.running (:require [clojure.string :as str] [speclj.components :as components] [speclj.config :refer [active-reporters]] [speclj.platform :refer [current-time pending? secs-since]] [speclj.reporting :refer [report-description* report-run]] [speclj....
b56e11eb499b9562775fc9b221a2c6935191eae2b5e07a9f62ad7f37bfb30eed
svenpanne/EOPL3
exercise-3-12.rkt
#lang eopl ; ------------------------------------------------------------------------------ Exercise 3.12 See : exercise 3.11 ; ------------------------------------------------------------------------------ Scanner and parser specification (define scanner-spec '((whitespace (whitespace) skip) (comment ("...
null
https://raw.githubusercontent.com/svenpanne/EOPL3/3fc14c4dbb1c53a37bd67399eba34cea8f8234cc/chapter3/exercise-3-12.rkt
racket
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Debugging helpers for scanner and parser -------------------------------------...
#lang eopl Exercise 3.12 See : exercise 3.11 Scanner and parser specification (define scanner-spec '((whitespace (whitespace) skip) (comment ("%" (arbno (not #\newline))) skip) (number (digit (arbno digit)) number) (number ("-" digit (arbno digit)) number) (nullary-op ("emptylist") string) ...
ac10c0175b0670ffc0c57c4f1d582d3689b4c7e1e703453293063946ba9fadd4
startalkIM/ejabberd
meck_proc.erl
%%%============================================================================ Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You may obtain a copy of the License at %%% %%% -2.0 %%% %%% Unless required by applicable law ...
null
https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/deps/meck/src/meck_proc.erl
erlang
============================================================================ you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , The state includes function stubs , call history , etc . starts one such -module(meck_proc). -behaviour(gen_server). -export([start/2]). -export([set_expect/2]). -export([d...
2b2cd0b8fd914a92037691cc32effd11133c58dde86d420e45e25f0a27a5af88
pixlsus/registry.gimp.org_static
water-ripple.scm
; water-ripple.scm by ; Version 1.1 ( 20100715 ) ; Description ; ; creates a water ripple distortion on an image v 1.1 - added option for distortion based on the image edges , plasma or cloud noise ; - added option to keep the ripple layer seperate ; ; License: ; ; This program is fr...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/water-ripple.scm
scheme
water-ripple.scm Description creates a water ripple distortion on an image - added option to keep the ripple layer seperate License: This program is free software; you can redistribute it and/or modify either version 2 of the License , or (at your option) any later version. This prog...
by Version 1.1 ( 20100715 ) v 1.1 - added option for distortion based on the image edges , plasma or cloud noise it under the terms of the GNU General Public License as published by The GNU Public License is available at (define (script-fu-water-ripple img inLayer inType inSize inSpread in...
b2917a778f35a78bec335807c103ce124c4f41e4df6c9f4657a4bd9d49502ec1
arttuka/reagent-material-ui
crop_54_sharp.cljs
(ns reagent-mui.icons.crop-54-sharp "Imports @mui/icons-material/Crop54Sharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def crop-54-sharp (create-svg-icon ...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/crop_54_sharp.cljs
clojure
(ns reagent-mui.icons.crop-54-sharp "Imports @mui/icons-material/Crop54Sharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def crop-54-sharp (create-svg-icon ...
859436f0810ffd352ca26d2689156cde82b2f803b51d11376b57d8642825cc0e
nobutaka/nanopass
tests-2.6-req.scm
vararg tests (add-tests-with-string-output "vararg not using rest argument" [(let ([f (lambda args 12)]) (f)) => "12\n"] [(let ([f (lambda args 12)]) (f 10)) => "12\n"] [(let ([f (lambda args 12)]) (f 10 20)) => "12\n"] [(let ([f (lambda args 12)]) (f 10 20 30)) => "12\n"] [(let ([f (lambda...
null
https://raw.githubusercontent.com/nobutaka/nanopass/80e0344a1f143832a75d798be903e05b5dbdd079/tests/tests-2.6-req.scm
scheme
vararg tests (add-tests-with-string-output "vararg not using rest argument" [(let ([f (lambda args 12)]) (f)) => "12\n"] [(let ([f (lambda args 12)]) (f 10)) => "12\n"] [(let ([f (lambda args 12)]) (f 10 20)) => "12\n"] [(let ([f (lambda args 12)]) (f 10 20 30)) => "12\n"] [(let ([f (lambda...
fc03ba0c7020e1ede0162ae941863151fb517f0b64537d8e71c7bb4065682490
zotonic/zotonic
mod_tkvstore.erl
@author < > 2010 %% @doc Simple ( type , key)/value store . Stores data in the store with minimal latency %% and (local) serialization of get/put requests. Copyright 2010 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with th...
null
https://raw.githubusercontent.com/zotonic/zotonic/aa38d5bd01f20696a7c5230b97ea23d2d1678e79/apps/zotonic_mod_tkvstore/src/mod_tkvstore.erl
erlang
and (local) serialization of get/put requests. you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the...
@author < > 2010 @doc Simple ( type , key)/value store . Stores data in the store with minimal latency Copyright 2010 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(mod_tkvstore). -author("Marc Worr...
40ac79c9dd2280b12e687bbd9641f2879ac1889383448d1c2eada45b7b9c2c70
zinid/conf
stdlib_yaml.erl
%%%------------------------------------------------------------------- @author < > %%% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You may obtain a copy of the License at %%% %%% -2.0 %%% %%% Unless required by...
null
https://raw.githubusercontent.com/zinid/conf/8f6b94df3584f63fbc6b241ac4ea0740a2e658fb/src/stdlib_yaml.erl
erlang
------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o...
@author < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(stdlib_yaml). -behaviour(conf). -export([validator/0]). -import(yval, [non_neg_int/0, bool/0, enum/1, beam/0, either/2, options/2]). -spec validator(...
a3351e5acc3775f9080e9a0793df532f93784b44e9b1a2d41246e82b8d2433aa
eeng/mercurius
place_order.clj
(ns mercurius.trading.domain.use-cases.place-order (:require [clojure.spec.alpha :as s] [mercurius.accounts.domain.entities.user :as user] [mercurius.wallets.domain.entities.wallet :as wallet] [mercurius.trading.domain.entities.ticker :as ticker] [mercurius.trading.doma...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/src/mercurius/trading/domain/use_cases/place_order.clj
clojure
(ns mercurius.trading.domain.use-cases.place-order (:require [clojure.spec.alpha :as s] [mercurius.accounts.domain.entities.user :as user] [mercurius.wallets.domain.entities.wallet :as wallet] [mercurius.trading.domain.entities.ticker :as ticker] [mercurius.trading.doma...
d32717d03f3964fdab577f75d913920b6589f62c3d67d617292c01ed0324b18c
unisonweb/unison
Convert.hs
# LANGUAGE PartialTypeSignatures # | Description : Converts V1 types to the V2 hashing types module Unison.Hashing.V2.Convert ( ResolutionResult, hashBranch0, hashCausal, hashDataDecls, hashDecls, hashPatch, hashClosedTerm, hashTermComponents, hashTermComponentsWithoutTypes, typ...
null
https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/parser-typechecker/src/Unison/Hashing/V2/Convert.hs
haskell
TODO: remove non-prime version include type in hash | This shouldn't be used when storing terms in the codebase, as it doesn't incorporate the type into the hash. this should only be used in cases where you just need a way to identify some terms that you have, but won't be saving them. is there a more readabl...
# LANGUAGE PartialTypeSignatures # | Description : Converts V1 types to the V2 hashing types module Unison.Hashing.V2.Convert ( ResolutionResult, hashBranch0, hashCausal, hashDataDecls, hashDecls, hashPatch, hashClosedTerm, hashTermComponents, hashTermComponentsWithoutTypes, typ...
815bfac059ebbdfedfd21ee080487e5d57e3e58d7a1b17b8292439673daf630c
jaseemabid/mit-scheme
optiondb.scm
#| -*-Scheme-*- |# ;;;; Test optiondb, includes the installed system's optiondb. (further-load-options (merge-pathnames "optiondb" (cadr (access library-directory-path (->environment '(runtime pathname))))))
null
https://raw.githubusercontent.com/jaseemabid/mit-scheme/d30da6b2c103e34b6e0805bd5cbefeb9501382c1/tests/ffi/optiondb.scm
scheme
-*-Scheme-*- Test optiondb, includes the installed system's optiondb.
(further-load-options (merge-pathnames "optiondb" (cadr (access library-directory-path (->environment '(runtime pathname))))))
0b49701c63dd79f51f1456a9b69156a7ca96c9fcc61a6a8c10bf42de46ec7c68
racket/gui
text-column-guide.rkt
#lang racket/base (require racket/unit racket/class mred/mred-sig "text-sig.rkt" "../preferences.rkt") (provide text-column-guide@) (define-unit text-column-guide@ (import mred^) (export text-column-guide^) (define column-guide<%> (interface ((class->interface text%)))) (...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/framework/private/text-column-guide.rkt
racket
because they are weakly held callbacks pre: aw initialized to current value
#lang racket/base (require racket/unit racket/class mred/mred-sig "text-sig.rkt" "../preferences.rkt") (provide text-column-guide@) (define-unit text-column-guide@ (import mred^) (export text-column-guide^) (define column-guide<%> (interface ((class->interface text%)))) (...
71f64d328bd1d29c5b7cd62341279d4f16b578f09f2d414029fb7de9e55b6034
jiesoul/soul-talk
routes.clj
(ns soul-talk.data-dic.routes (:require [compojure.api.sweet :refer :all] [compojure.api.meta :refer [restructure-param]] [soul-talk.spec.core :refer [Result]] [soul-talk.data-dic.handler :as data-dic] [soul-talk.middleware :as m])) (defmethod restructure-param :auth-a...
null
https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/api/src/soul_talk/data_dic/routes.clj
clojure
(ns soul-talk.data-dic.routes (:require [compojure.api.sweet :refer :all] [compojure.api.meta :refer [restructure-param]] [soul-talk.spec.core :refer [Result]] [soul-talk.data-dic.handler :as data-dic] [soul-talk.middleware :as m])) (defmethod restructure-param :auth-a...
1cfc49c4e7332a8bb58bb04b9ddeb6792d2d644e4d16403f6262c85dba3552ba
chshersh/sauron
Cli.hs
# LANGUAGE ApplicativeDo # | Copyright : ( c ) 2022 SPDX - License - Identifier : MPL-2.0 Maintainer : < > Command - line arguments parsing Copyright: (c) 2022 Dmitrii Kovanikov SPDX-License-Identifier: MPL-2.0 Maintainer: Dmitrii Kovanikov <> Command-line arguments parsing -} module Sauron.Cli ...
null
https://raw.githubusercontent.com/chshersh/sauron/015fb2e8b72fe01fac353015668d3f1124a026f0/src/Sauron/Cli.hs
haskell
^ Twitter username handle ^ Store to file or read from file | All possible commands.
# LANGUAGE ApplicativeDo # | Copyright : ( c ) 2022 SPDX - License - Identifier : MPL-2.0 Maintainer : < > Command - line arguments parsing Copyright: (c) 2022 Dmitrii Kovanikov SPDX-License-Identifier: MPL-2.0 Maintainer: Dmitrii Kovanikov <> Command-line arguments parsing -} module Sauron.Cli ...
be671a610558f013bd7c890e882d23457aea584f5fc037488f8db0580a2d8887
let-def/menhir
installation.ml
(**************************************************************************) (* *) Menhir (* *) , INRIA Ro...
null
https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/installation.ml
ocaml
************************************************************************ et en Automatique. All rig...
Menhir , INRIA Rocquencourt , PPS , Université Paris Diderot Copyright 2005 - 2008 Institut National de Recherche en Informatique under the terms of the Q Public License versi...
f9af8bd81a314c0262495fe95ed9aff3a2f89a5eb7adfeea9c411ad9486ce99d
NoRedInk/haskell-libraries
Test.hs
-- | A module containing functions for creating and managing tests. module Test ( -- * Organizing Tests Internal.Test, Internal.test, Internal.describe, Internal.skip, Internal.only, Internal.todo, -- * Fuzz Testing Internal.fuzz, Internal.fuzz2, Internal.fuzz3, * Serialize...
null
https://raw.githubusercontent.com/NoRedInk/haskell-libraries/8c79cefd5757cf5ba8ec2a16a7100bde4d75e1e2/nri-prelude/src/Test.hs
haskell
| A module containing functions for creating and managing tests. * Organizing Tests * Fuzz Testing * Running test this: > module Main (main) where > > import qualified Test > > main :: IO () Work around `hGetContents: invalid argument (invalid byte sequence)` bug on Nix: -lang/dhall-haskell/issues/865
module Test Internal.Test, Internal.test, Internal.describe, Internal.skip, Internal.only, Internal.todo, Internal.fuzz, Internal.fuzz2, Internal.fuzz3, * Serialize test execution Internal.serialize, run, ) where import qualified Control.Concurrent.Async as Async impo...
c4144eed06b5d5084eda4337fbe618a94eb771575430997034f94dc528276dff
day8/re-frame-undo
undo_test.cljs
(ns day8.re-frame.undo.undo-test (:require [cljs.test :refer-macros [is deftest]] [day8.re-frame.undo :as undo] [re-frame.db :as db] [re-frame.core :as re-frame])) (defn undo-fixtures [f] (let [restore-re-frame-fn (re-frame/make-restore-fn)] (undo/undo...
null
https://raw.githubusercontent.com/day8/re-frame-undo/b9b9dae94d9189d3cab0ddc3ffdc5555cd98723b/test/day8/re_frame/undo/undo_test.cljs
clojure
Check the undo state is correct Undo the actions Clear history Check the undo state is correct Undo the actions Check the undo state is correct Undo the actions Check the undo state is correct Undo the actions
(ns day8.re-frame.undo.undo-test (:require [cljs.test :refer-macros [is deftest]] [day8.re-frame.undo :as undo] [re-frame.db :as db] [re-frame.core :as re-frame])) (defn undo-fixtures [f] (let [restore-re-frame-fn (re-frame/make-restore-fn)] (undo/undo...
d23569d817652bab3f416b0daac220278fab9a8fe8e8c9feb72675f628d097d0
geophf/1HaskellADay
Solution.hs
# LANGUAGE OverloadedStrings , ViewPatterns # module Y2017.M11.D07.Solution where - Yesterday 's exercise we read in a set of scored documents ; the exercise before , we parsed a set of keywords associated with articles . Today continues the parsing exercises . This time we 're parsing JSON , so it ' should ...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M11/D07/Solution.hs
haskell
} them? } --------------------------------------------------------------- } how many recommendations did you get from that marriage? } now, save out the recommendations as JSON: Of course, we need keyword JSON instance, but leave that undefined for now }
# LANGUAGE OverloadedStrings , ViewPatterns # module Y2017.M11.D07.Solution where - Yesterday 's exercise we read in a set of scored documents ; the exercise before , we parsed a set of keywords associated with articles . Today continues the parsing exercises . This time we 're parsing JSON , so it ' should ...
bbc35a36bb6ad7bc914d3243422a29f9f4de1d9ae033c7f40baa9cc6089726dd
duo-lang/duo-lang
Kinds.hs
module Syntax.RST.Kinds where import Data.Set (Set) import Data.Set qualified as S import Syntax.CST.Kinds import Syntax.CST.Names --either polykind or primitive kind data AnyKind = MkPknd PolyKind | MkI64 | MkF64 | MkChar | MkString deriving instance (Show AnyKind) deriving instance (Eq AnyKind) deriving instance ...
null
https://raw.githubusercontent.com/duo-lang/duo-lang/926c8e843687ee408027c21483aa2369b4cd0580/duo-lang-renamer/src/Syntax/RST/Kinds.hs
haskell
either polykind or primitive kind
module Syntax.RST.Kinds where import Data.Set (Set) import Data.Set qualified as S import Syntax.CST.Kinds import Syntax.CST.Names data AnyKind = MkPknd PolyKind | MkI64 | MkF64 | MkChar | MkString deriving instance (Show AnyKind) deriving instance (Eq AnyKind) deriving instance (Ord AnyKind) type KindedSkolem = (...
da43fbb43ccd6590755ad6d5c70704ca5f5c92622d34c1765e7ceb39097ed9f7
jtdaugherty/text-zipper
Words.hs
-- | Implements word movements. -- Copyright ( c ) module Data.Text.Zipper.Generic.Words ( moveWordLeft , moveWordRight , deletePrevWord , deleteWord ) where import Data.Char import Data.Text.Zipper import qualified Data.Text.Zipper.Generic as TZ -- | Move one word to the left. -- -- A word is define...
null
https://raw.githubusercontent.com/jtdaugherty/text-zipper/0b2fe6c01795ba2cfffdf804ba8ce19ca6407447/src/Data/Text/Zipper/Generic/Words.hs
haskell
| Implements word movements. | Move one word to the left. A word is defined as a consecutive string not satisfying isSpace. This function always leaves the cursor at the beginning of a word (except at the very start of the text). | Delete the previous word. Does the same as 'moveWordLeft' but deletes characte...
Copyright ( c ) module Data.Text.Zipper.Generic.Words ( moveWordLeft , moveWordRight , deletePrevWord , deleteWord ) where import Data.Char import Data.Text.Zipper import qualified Data.Text.Zipper.Generic as TZ moveWordLeft :: TZ.GenericTextZipper a => TextZipper a -> TextZipper a moveWordLeft = doW...
51371bf1838308e6f1c8e6376c5c1212c1aeaec4df3bb3e1788ee7cbe4d72cb4
janestreet/universe
test.ml
open! Core_kernel open! Virtual_dom.Vdom (* This test doesn't do anything apart from testing that we can actually run tests for virtual_dom *) let%test _ = let previous = Node.div [] [] in let current = Node.div [] [] in let _patch = Node.Patch.create ~previous ~current in true ;;
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/virtual_dom/test/test.ml
ocaml
This test doesn't do anything apart from testing that we can actually run tests for virtual_dom
open! Core_kernel open! Virtual_dom.Vdom let%test _ = let previous = Node.div [] [] in let current = Node.div [] [] in let _patch = Node.Patch.create ~previous ~current in true ;;
97b682f69381a47bee0e1379774cb88421ede1d3ce064e27637ec00dff56e8cf
denisshevchenko/breadu.info
Own.hs
| Module : BreadU.Pages . CSS.Own Description : Own CSS for all pages . Stability : experimental Portability : POSIX own CSS for all pages . It will be embedded in < head>-tag . We 're using DSL to create CSS . In this case successful compilation guarantees that produces CSS is valid . Produc...
null
https://raw.githubusercontent.com/denisshevchenko/breadu.info/b613fa28a4b527f1459876348a72e7748f16cd88/src/lib/BreadU/Pages/CSS/Own.hs
haskell
| Build CSS and renders it as a Text. from different parts in the same context. There's no embedded '!important', so we have to specify raw CSS here. :-( | Minify CSS. We shouldn't check 'Left'-variant from 'minifyCSS' function because we're minifying generated CSS and assuming that it's definitely valid. ;-) | C...
| Module : BreadU.Pages . CSS.Own Description : Own CSS for all pages . Stability : experimental Portability : POSIX own CSS for all pages . It will be embedded in < head>-tag . We 're using DSL to create CSS . In this case successful compilation guarantees that produces CSS is valid . Produc...
4b49ca8d802590cf4feb3857bccd17d5180236ba0f21649306188e8e6e117a49
vvvvalvalval/datomock
core.clj
(ns datomock.core (:require [datomic.api :as d] [datomock.impl :as impl]) (:import (datomic Connection Database))) ;; ------------------------------------------------------------------------ ;; Empty databases (def empty-db "[] Returns an empty database. Memoized for efficiency." (memoize impl/mak...
null
https://raw.githubusercontent.com/vvvvalvalval/datomock/3ab532f24bca982e23f1897bd5656bd5be15b0ba/src/datomock/core.clj
clojure
------------------------------------------------------------------------ Empty databases ------------------------------------------------------------------------ Mocked connection
(ns datomock.core (:require [datomic.api :as d] [datomock.impl :as impl]) (:import (datomic Connection Database))) (def empty-db "[] Returns an empty database. Memoized for efficiency." (memoize impl/make-empty-db)) (defn ^Connection mock-conn "Creates a mocked Datomic connection from the giv...
71cdd2aabdbb961e1d8c58af689da5e261bc8f05c0612db1e098594a2d2a485f
realworldocaml/book
ansi_output.mli
open! Core open! Import val apply_styles : ?drop_leading_resets:bool -> Format.Style.t list -> string -> string include Output.S
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/patdiff/kernel/src/ansi_output.mli
ocaml
open! Core open! Import val apply_styles : ?drop_leading_resets:bool -> Format.Style.t list -> string -> string include Output.S
a8d3cb04af95e16dea04d9f36b644a03313e74339f1b36f6e06a5b8e9e154efa
jellelicht/guix
fltk.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2014 < > Copyright © 2015 < > Copyright © 2015 < > ;;; ;;; 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 Fre...
null
https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/fltk.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 © 2014 < > Copyright © 2015 < > Copyright © 2015 < > 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 (gnu packages fltk) #:use-module ((guix licen...
d80188d08598270f6ed23f0f7a958f189620b8441c1a1ef8088926fb035f3270
fogfish/datum
rbtree.erl
%% Copyright 2012 - 2013 , All Rights Reserved %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in ...
null
https://raw.githubusercontent.com/fogfish/datum/f5e8f0b5deb8b74d6febe046333dbb4f38b086d8/src/maplike/rbtree.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language g...
Copyright 2012 - 2013 , All Rights Reserved Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , red - black tree ( see " Purely Functional Data Structures " ) -module(rbtree). -behavior(maplike). -behavior(traversa...
f93bef880c1fb908153324b6bd1c4f84e3886dc5b6bb475cadbe9a07a42de3f2
LexiFi/menhir
mark.ml
(******************************************************************************) (* *) (* *) ...
null
https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/mark.ml
ocaml
**************************************************************************** file LICEN...
, Paris , PPS , Université Paris Diderot . All rights reserved . This file is distributed under the terms of the GNU General Public License version 2 , as...
da5bf4d1fa82f968f6feba611ca9425dfc58e49c56808190cbbd2e481fdd23f0
fission-codes/fission
Production.hs
module Fission.Web.Server.Internal.Production ( start , runInProd , runInProdSimple , mkSettings , tlsSettings , clientTimeout , serverTimeout ) where import Control.Exception import qualified Data.Aeson as JSON import qualified Data.Yaml ...
null
https://raw.githubusercontent.com/fission-codes/fission/e5a5d6f30fb4451918efba5b72787cbc7632aecf/fission-web-server/library/Fission/Web/Server/Internal/Production.hs
haskell
module Fission.Web.Server.Internal.Production ( start , runInProd , runInProdSimple , mkSettings , tlsSettings , clientTimeout , serverTimeout ) where import Control.Exception import qualified Data.Aeson as JSON import qualified Data.Yaml ...
f91cf37ccef36cc16d393b61bd58e4327d4dc77fd1b9cf0f2ed91c990904eb21
danieljharvey/mimsa
Helpers.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module Repl.Helpers ( saveExpression, toReplM, catchMimsaError, outputErrorAsDiagnostic, ) where import Control.Monad.Except import Control.Monad.Reader import Data.Foldable (traverse_) import Error.Diagnose hiding (Annotation) import q...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/564c32cc28d990c9e686f63533a9e30c3736aee4/repl/repl/Repl/Helpers.hs
haskell
| if an error has been thrown, log it and return default value | Actually save a StoreExpression to disk | Actually save a file to disk | Run an Action, printing any messages to the console and saving any expressions to disk use diagnostics for errors where possible, falling back to boring errors
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module Repl.Helpers ( saveExpression, toReplM, catchMimsaError, outputErrorAsDiagnostic, ) where import Control.Monad.Except import Control.Monad.Reader import Data.Foldable (traverse_) import Error.Diagnose hiding (Annotation) import q...
7c260a837f3da7bf3594762d2f8ad48a6635b461ac2f7a36c93d65c44924f513
EligiusSantori/L2Apf
reply_join_clan.scm
(module system racket/base (require "../../packet.scm") (provide game-client-packet/reply-join-clan) (define (game-client-packet/reply-join-clan accept?) (let ((s (open-output-bytes))) (begin (write-byte #x25 s) (write-int32 (if accept? 1 0) #f s) (get-output-bytes s) ) ) ) )
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/client/reply_join_clan.scm
scheme
(module system racket/base (require "../../packet.scm") (provide game-client-packet/reply-join-clan) (define (game-client-packet/reply-join-clan accept?) (let ((s (open-output-bytes))) (begin (write-byte #x25 s) (write-int32 (if accept? 1 0) #f s) (get-output-bytes s) ) ) ) )
fdc5be2fb0e042437a63c01e6181f9f1ac22e0fd5b236d02a5f62375041c9c2d
RefactoringTools/HaRe
WhereIn1.hs
module LiftOneLevel.WhereIn1 where --A definition can be lifted from a where or let to the top level binding group. --Lifting a definition widens the scope of the definition. --In this example, lift 'sq' in 'sumSquares' --This example aims to test add parameters to 'sq'. sumSquares x y = sq x + sq y where...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/LiftOneLevel/WhereIn1.hs
haskell
A definition can be lifted from a where or let to the top level binding group. Lifting a definition widens the scope of the definition. In this example, lift 'sq' in 'sumSquares' This example aims to test add parameters to 'sq'.
module LiftOneLevel.WhereIn1 where sumSquares x y = sq x + sq y where sq 0 = 0 sq z = z^pow pow=2 anotherFun 0 y = sq y where sq x = x^2
4b07d91da2691b6b39db2e7f13ae0e5084780896f1ba7b0580e8da37cb2796a2
TDacik/Deadlock
print_utils.ml
Utilities for pretty - printing . * * Author : ( ) , 2020 * * Author: Tomas Dacik (), 2020 *) open Cil_datatype open Filepath let get_time () = Format.asprintf "(%.2f)" (Sys.time ()) (* True if base represents variable from original source code *) let is_orig base = try let varinfo = Base.to_v...
null
https://raw.githubusercontent.com/TDacik/Deadlock/b69d47be037d4d7f90bce63dffbe82f306498a7a/src/utils/print_utils.ml
ocaml
True if base represents variable from original source code Based on print_initial_cvalue_state from /value/engine/initialization.ml Print statement as a location in the source code
Utilities for pretty - printing . * * Author : ( ) , 2020 * * Author: Tomas Dacik (), 2020 *) open Cil_datatype open Filepath let get_time () = Format.asprintf "(%.2f)" (Sys.time ()) let is_orig base = try let varinfo = Base.to_varinfo base in not (Cil.hasAttribute "fc_stdlib" varinfo.vatt...
172555dfcf757eece3f6f9221f53a56640b54739dbe7fcf79ce26f27c2224254
ocurrent/ocluster
connection.ml
open Lwt.Infix open Capnp_rpc_lwt let ( >>!= ) = Lwt_result.bind module Metrics = struct open Prometheus let namespace = "ocluster" let subsystem = "ocurrent" let queue = let help = "Items in cluster queue by state" in Gauge.v_label ~label_name:"state" ~help ~namespace ~subsystem "queue_state" le...
null
https://raw.githubusercontent.com/ocurrent/ocluster/c506ae2fcadbc15d43a4110c3ae5bc6ac4d5e7a6/ocurrent-plugin/connection.ml
ocaml
This is shared by all jobs. Limit how many items we queue up at the scheduler (including assigned to workers) for each (OCluster pool, urgency). Return a proxy to the scheduler, starting a new connection if we don't currently have a working one. Already connecting; join that effort This is called by [C...
open Lwt.Infix open Capnp_rpc_lwt let ( >>!= ) = Lwt_result.bind module Metrics = struct open Prometheus let namespace = "ocluster" let subsystem = "ocurrent" let queue = let help = "Items in cluster queue by state" in Gauge.v_label ~label_name:"state" ~help ~namespace ~subsystem "queue_state" le...
a40e8e68d6b99910b2b35c8942966677ff8c684647f6a3c63a9c80750f95585d
fission-codes/fission
Types.hs
-- | Authorization types; primarily more semantic aliases module Fission.Web.Auth.Token.Basic.Types (Token (..)) where import qualified RIO.Text as Text import Servant.API import Fission.Prelude newtype Token = Token { unToken :: ByteString } deriving (Show, Eq) instance Arbitrary Token...
null
https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-core/library/Fission/Web/Auth/Token/Basic/Types.hs
haskell
| Authorization types; primarily more semantic aliases
module Fission.Web.Auth.Token.Basic.Types (Token (..)) where import qualified RIO.Text as Text import Servant.API import Fission.Prelude newtype Token = Token { unToken :: ByteString } deriving (Show, Eq) instance Arbitrary Token where arbitrary = Token . encodeUtf8 <$> arbitrary ins...
b47aacbcad90863d28d7cba03eac6e3f4a1f93688544d2923be8be5c9a27e56e
evincarofautumn/kitten
Definition.hs
| Module : Kitten . Definition Description : Definitions of words , instances , and permissions Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : GHC Module : Kitten.Definition Description : Definitions of words, instances, and permissi...
null
https://raw.githubusercontent.com/evincarofautumn/kitten/a5301fe24dbb9ea91974abee73ad544156ee4722/lib/Kitten/Definition.hs
haskell
# LANGUAGE OverloadedStrings # | The main definition, created implicitly from top-level code in program fragments. ^ List of permissions implicitly granted. ^ Override default name. ^ Body. | Default name of main definition.
| Module : Kitten . Definition Description : Definitions of words , instances , and permissions Copyright : ( c ) , 2016 License : MIT Maintainer : Stability : experimental Portability : GHC Module : Kitten.Definition Description : Definitions of words, instances, and permissi...
d3a98320b2a163f0344c0b5475977cc5cd3bbbe367856cadc0f7e0b256af6ed3
czan/stateful-check
generator.clj
(ns stateful-check.generator (:require [clojure.test.check.generators :as gen] [clojure.test.check.rose-tree :as rose] [stateful-check.symbolic-values :as sv] [stateful-check.command-utils :as u])) (def default-max-length 5) (def default-threads 0) (def default-max-size 200) (def...
null
https://raw.githubusercontent.com/czan/stateful-check/f7a369c9306d17849981283ac04f5a524db5745f/src/stateful_check/generator.clj
clojure
remove/shrink a command from the sequential prefix remove/shrink a command from a parallel thread remove/shrink a command from the sequential prefix we need to generate lists of commands that are valid no matter how they're executed (assuming each command is atomic), that way we know that no matter how the exec...
(ns stateful-check.generator (:require [clojure.test.check.generators :as gen] [clojure.test.check.rose-tree :as rose] [stateful-check.symbolic-values :as sv] [stateful-check.command-utils :as u])) (def default-max-length 5) (def default-threads 0) (def default-max-size 200) (def...
425f9005cdb7daa178995d569d9065307ffef96ec68d46e27ff971f8dfa87029
capsjac/opengles
Types.hs
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverlappingInstances # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Graphics.OpenGLES.Types ...
null
https://raw.githubusercontent.com/capsjac/opengles/23b78e5d1b058349a778a49310d867164ea1a529/src/Graphics/OpenGLES/Types.hs
haskell
* Shading Language Base Types | GLSL types. * Texture Pixel Formats * Type-Level Utilities * Uniform Variable * Vertex Attribute OpenGL | Type cast between size equivalent structures like @Buffer (V2 HalfFloat) -> Buffer Int32@. If True x y = x If False x y = y type instance Sum '[] = 0 type instance Sum (x ...
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverlappingInstances # # LANGUAGE UndecidableInstances # # LANGUAGE ScopedTypeVariables # # LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Graphics.OpenGLES.Types ...
ecc4b3391ed4b50cb216044fa0f87a55a75d6d6b29bf5898a94dfe96da8d1157
abhay/eunit
eunit.erl
%% 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 of the %% License, or (at your option) any later version. %% %% This library is distributed in the hope that it will be...
null
https://raw.githubusercontent.com/abhay/eunit/fa9b549955101d6e98d31876e2e44feb96ca4d54/src/eunit.erl
erlang
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHA...
published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA $ Id$ 2004 - 2007 , @author < > @author < > [ /~richardc/ ] @doc This modul...
b4cc00dbf6a8eeb091e89f67139d60e10f3580ea263a821f4dcdec5bc779bf7a
input-output-hk/ouroboros-network
Strict.hs
# LANGUAGE BangPatterns # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} # LANGUAGE EmptyCase # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # {-# LANGUAGE LambdaCase #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds ...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/51fcddbcf1a069f35f8e6a0e49d948c52cc4ba1d/ouroboros-consensus/src/Data/SOP/Strict.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeOperators # This does not currently attempt to be ...
# LANGUAGE BangPatterns # # LANGUAGE EmptyCase # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # | Strict variant of SOP module...
81d69c78b48077509a58a4ede73c247b0a2c3b8a3eb91f0b030585333faca74b
haskell/haskell-language-server
CommentCurlyBraceAtTop.hs
module Test ( SomeData(..) ) where {- Some comment -} class Semigroup a => SomeData a instance SomeData All
null
https://raw.githubusercontent.com/haskell/haskell-language-server/fdbc555a9245cb3761c2bf7335f3d18b8cf7673c/plugins/hls-refactor-plugin/test/data/import-placement/CommentCurlyBraceAtTop.hs
haskell
Some comment
module Test ( SomeData(..) ) where class Semigroup a => SomeData a instance SomeData All
59b34c8645251d001e53c86bf183f8a59043bf7c0f34946403341287fa2be989
mfoemmel/erlang-otp
wxCheckBox.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxCheckBox.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(wxCheckBox). -include("wxe.hrl")....
371d3c19feaf7823504d5ba95f9e906e1c73f00fe499f6b9f698bbeb8c7f9510
EwenG/muance
core.clj
(ns muance.core) (defonce ^:private comp-typeid (atom -1)) (defn- dec-comp-typeid [t] ;; MIN_SAFE_INTEGER (if (= t -9007199254740991) -1 (dec t))) (defn- params-with-props [params] (cond (symbol? params) [params params] (vector? params) (let [as-index (.indexOf ^java.util.List params :as) ...
null
https://raw.githubusercontent.com/EwenG/muance/11315603060aa57f8614e8f5fcecefa0cd0db17a/src/muance/core.clj
clojure
MIN_SAFE_INTEGER The comp-fn does not need to be a var in order to support reloading because of the level of indirection introduced by variadic arity functions Although it would be better for comp-fn to be a var to avoid relying on clojurescript inernals
(ns muance.core) (defonce ^:private comp-typeid (atom -1)) (defn- dec-comp-typeid [t] (if (= t -9007199254740991) -1 (dec t))) (defn- params-with-props [params] (cond (symbol? params) [params params] (vector? params) (let [as-index (.indexOf ^java.util.List params :as) p...
8fbde7cc50dbde5eaa37b191669b23e6a510296db7c3d3c4ae38d94719cf07b5
dhammikamare/Learn-OCaml
cosx_tr.ml
Task : Write a tail recursive implementation of the ) * without using the factorial and power ( * * without using the factorial and power (**) functions. * Hint: start the summation from the first term. * * Author : Dhammika Marasinghe | -marasinghe *) Tail recursive ) . let cosx_tr (x:float) (n:int) :fl...
null
https://raw.githubusercontent.com/dhammikamare/Learn-OCaml/2d4e3da38ee86cd7477964ffb8756a8483260322/lab03%20Tail%20Recursive%20Functions/cosx_tr.ml
ocaml
note the differences. we don't even have to use recursive factorial function
Task : Write a tail recursive implementation of the ) * without using the factorial and power ( * * Hint: start the summation from the first term. * * Author : Dhammika Marasinghe | -marasinghe *) Tail recursive ) . let cosx_tr (x:float) (n:int) :float = let rec loop (i:int) (a:float) :float = if i =...
6a6c65e349408e62c627621fe3d97b5486bdc6251c4823c4b55ef11522ecb701
twosigma/waiter
file_utils.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software...
null
https://raw.githubusercontent.com/twosigma/waiter/8d3cdaed90078c188095ae1e65714edc72f9122c/token-syncer/src/token_syncer/file_utils.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns token-syncer.file-utils (:require [clojure.data.json :as json] [clojure.java.io :as io] [clojure.string :as str] [clojure.tools.logging :as log]) (:import (jav...
55c51fae23f29a963cbc07419ea79d9061604f05e5bbb90bab11ab00254b0533
McParen/croatoan
legacy.lisp
(in-package :de.anvi.ncurses) ;;; legacy ;;; get curses cursor and window coordinates, attributes ;;; -island.net/ncurses/man/curs_legacy.3x.html ;;; C prototypes ;; int getattrs(WINDOW *win); ;; int getbegx(WINDOW *win); ;; int getbegy(WINDOW *win); ;; int getcurx(WINDOW *win); ;; int getcury(WINDOW *win); ;; int g...
null
https://raw.githubusercontent.com/McParen/croatoan/05afa1342c74bbb28b12d78883cd04b95019d5bd/ncurses/legacy.lisp
lisp
legacy get curses cursor and window coordinates, attributes -island.net/ncurses/man/curs_legacy.3x.html C prototypes int getattrs(WINDOW *win); int getbegx(WINDOW *win); int getbegy(WINDOW *win); int getcurx(WINDOW *win); int getcury(WINDOW *win); int getmaxx(WINDOW *win); int getmaxy(WINDOW *win); int getp...
(in-package :de.anvi.ncurses) (cffi:defcfun ("getattrs" getattrs) :int (win window)) (cffi:defcfun ("getbegx" getbegx) :int (win window)) (cffi:defcfun ("getbegy" getbegy) :int (win window)) (cffi:defcfun ("getcurx" getcurx) :int (win window)) (cffi:defcfun ("getcury" getcury) :int (win window)) (cffi:defcfun ("ge...
e5014cc37eb2b0fc9cf94ca1b433129f0491e6869be20b13de7909303619a7c6
zalora/aws-ec2
CloudWatch.hs
module Aws.CloudWatch ( module Aws.Query.Types , module Aws.CloudWatch.Types , module Aws.CloudWatch.Core , module Aws.CloudWatch.Commands.PutMetricData ) where import Aws.Query.Types import Aws.CloudWatch.Types import Aws.CloudWatch.Core import Aws.CloudWatch.Commands.PutMetricData
null
https://raw.githubusercontent.com/zalora/aws-ec2/60b7ad4464edf3c69da8c2f023db4ba2fa7ffc48/src/Aws/CloudWatch.hs
haskell
module Aws.CloudWatch ( module Aws.Query.Types , module Aws.CloudWatch.Types , module Aws.CloudWatch.Core , module Aws.CloudWatch.Commands.PutMetricData ) where import Aws.Query.Types import Aws.CloudWatch.Types import Aws.CloudWatch.Core import Aws.CloudWatch.Commands.PutMetricData
5ee4980a55c09b4e8e3ef219b4e9f6ad10ba081311a024581334cad6779a7f03
apibot-org/apibot
evaljs_node.cljc
(ns apibot.grexec.evaljs-node "Equivalent to eval-node but uses JavaScript instead of ClojureScript." (:require [apibot.graphs :refer [map->NativeGraph]] [apibot.grexec.executors :as executors] [apibot.grexec.eval :as eval] [promesa.core :as p] [clojure.string :as string])) (def doctext (stri...
null
https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/cljc/apibot/grexec/evaljs_node.cljc
clojure
---- API ----
(ns apibot.grexec.evaljs-node "Equivalent to eval-node but uses JavaScript instead of ClojureScript." (:require [apibot.graphs :refer [map->NativeGraph]] [apibot.grexec.executors :as executors] [apibot.grexec.eval :as eval] [promesa.core :as p] [clojure.string :as string])) (def doctext (stri...
e55a88144f0daf97785fc0ec3fecb2e333eca1b2c8b6f1f88c06a0954fd91b82
joedevivo/chatterbox
http2_spec_5_5_SUITE.erl
-module(http2_spec_5_5_SUITE). -include("http2.hrl"). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). -compile([export_all]). all() -> [ sends_unknown_extension_frame ]. init_per_suite(Config) -> application:ensure_started(crypto), chatterbox_test_buddy:start...
null
https://raw.githubusercontent.com/joedevivo/chatterbox/560f2c71a151716512781f0f6196a8a9ff678852/test/http2_spec_5_5_SUITE.erl
erlang
Some FF type frame that doesn't exist
-module(http2_spec_5_5_SUITE). -include("http2.hrl"). -include_lib("eunit/include/eunit.hrl"). -include_lib("common_test/include/ct.hrl"). -compile([export_all]). all() -> [ sends_unknown_extension_frame ]. init_per_suite(Config) -> application:ensure_started(crypto), chatterbox_test_buddy:start...
c28bc2522a86c59ee01d817a93845191a9a222a156bffa47b27bfa6484451b41
grzm/awyeah-api
interceptors_test.clj
Copyright ( c ) Cognitect , Inc. ;; All rights reserved. (ns com.grzm.awyeah.interceptors-test (:require [clojure.test :refer [deftest is]] [com.grzm.awyeah.interceptors :as interceptors])) (deftest test-apigatewaymanagementapi (is (= "prefixsuffix" (:uri (interceptors/modify-http-reque...
null
https://raw.githubusercontent.com/grzm/awyeah-api/5111c627f73955af8d2529f7ae793ca8203cff15/test/src/com/grzm/awyeah/interceptors_test.clj
clojure
All rights reserved.
Copyright ( c ) Cognitect , Inc. (ns com.grzm.awyeah.interceptors-test (:require [clojure.test :refer [deftest is]] [com.grzm.awyeah.interceptors :as interceptors])) (deftest test-apigatewaymanagementapi (is (= "prefixsuffix" (:uri (interceptors/modify-http-request {:metadata {:uid "api...
e07832db6e4718077749a305d4cf4a2040e5b9b2aafdcb7b59783491e6cbb146
kupl/LearnML
original.ml
type formula = |True |False |Not of formula |AndAlso of (formula * formula) |OrElse of (formula * formula) |Imply of (formula * formula) |Equal of (exp * exp) and exp = |Num of int |Plus of (exp * exp) |Minus of (exp * exp) let rec calc (e : exp) : int = (match e with |Num i -> i |Plus (ea, eb) -> (calc (ea) + cal...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub20/original.ml
ocaml
type formula = |True |False |Not of formula |AndAlso of (formula * formula) |OrElse of (formula * formula) |Imply of (formula * formula) |Equal of (exp * exp) and exp = |Num of int |Plus of (exp * exp) |Minus of (exp * exp) let rec calc (e : exp) : int = (match e with |Num i -> i |Plus (ea, eb) -> (calc (ea) + cal...
697771480a7574215f785bd1c5d157d050efc111d37371c7d2b2c74748643f6f
ndmitchell/uniplate
PlateData.hs
# LANGUAGE ScopedTypeVariables , FlexibleInstances , MultiParamTypeClasses , UndecidableInstances , ExistentialQuantification , Rank2Types # # OPTIONS_GHC -Wno - orphans # | /DEPRECATED/ : Use " Data . Generics . Uniplate . Data " instead . This module exports ' Biplate ' instances for everything with '...
null
https://raw.githubusercontent.com/ndmitchell/uniplate/7d3039606d7a083f6d77f9f960c919668788de91/Data/Generics/PlateData.hs
haskell
you just hit the element you were after (here is a cast) go forward, you will find something you failed to sink my battleship! as efficiently, so we just give up and revert to always following forall a b . Data a => C with (a -> b) -> a -> C with b forall g . g -> C with g
# LANGUAGE ScopedTypeVariables , FlexibleInstances , MultiParamTypeClasses , UndecidableInstances , ExistentialQuantification , Rank2Types # # OPTIONS_GHC -Wno - orphans # | /DEPRECATED/ : Use " Data . Generics . Uniplate . Data " instead . This module exports ' Biplate ' instances for everything with '...
b95b22c90c57b66daa11750bc05ad0d3c6b869af4f53df6996ec6a8e7a55d99b
facebook/duckling
Tests.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory . module Duckl...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/tests/Duckling/Numeral/SK/Tests.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant
Copyright ( c ) 2016 - present , Facebook , Inc. of patent rights can be found in the PATENTS file in the same directory . module Duckling.Numeral.SK.Tests ( tests ) where import Prelude import Data.String import Test.Tasty import Duckling.Dimensions.Types import Duckling.Numeral.SK.Corpus import Duckling.Tes...
2e6f81b91c8c11cd936e57835166849c5d2bb3785ecb77f21d54537144f8865c
janestreet/bonsai
tabs.mli
open! Core open! Import val make : attr:Vdom.Attr.t -> per_tab_attr:('a -> is_active:bool -> Vdom.Attr.t) -> on_change:(from:'a -> to_:'a -> unit Effect.t) -> equal:('a -> 'a -> bool) -> active:'a -> ('a * Vdom.Node.t) list -> Vdom.Node.t
null
https://raw.githubusercontent.com/janestreet/bonsai/8643e8b3717b035386ac36f2bcfa4a05bca0d64f/web_ui/view/kado/tabs.mli
ocaml
open! Core open! Import val make : attr:Vdom.Attr.t -> per_tab_attr:('a -> is_active:bool -> Vdom.Attr.t) -> on_change:(from:'a -> to_:'a -> unit Effect.t) -> equal:('a -> 'a -> bool) -> active:'a -> ('a * Vdom.Node.t) list -> Vdom.Node.t
8153315e097b2b9171cb0b4b3961764f2fef80d65b14d03eff40ff62d0be3ac5
janestreet/ecaml
kill_ring.ml
open! Core open! Async_kernel open! Import let kill_ring = Var.Wrap.("kill-ring" <: list Text.t) let kill_ring_as_value = Var.create kill_ring.symbol Value.Type.value let is_empty () = Value.is_nil (Current_buffer.value_exn kill_ring_as_value) let kill_new = Funcall.Wrap.("kill-new" <: Text.t @-> return nil) let curre...
null
https://raw.githubusercontent.com/janestreet/ecaml/f97cb215b694e3d309e27d3d3eb3377738b212d3/src/kill_ring.ml
ocaml
open! Core open! Async_kernel open! Import let kill_ring = Var.Wrap.("kill-ring" <: list Text.t) let kill_ring_as_value = Var.create kill_ring.symbol Value.Type.value let is_empty () = Value.is_nil (Current_buffer.value_exn kill_ring_as_value) let kill_new = Funcall.Wrap.("kill-new" <: Text.t @-> return nil) let curre...
f4610f1961a7be2d23d1d309947cac7c05ec30522b45c9ae90343e4691bef9d0
nathell/skyscraper
character_encoding_test.clj
(ns skyscraper.character-encoding-test (:require [clojure.test :as test :refer [deftest is]] [net.cgrand.enlive-html :refer [select text]] [skyscraper.cache :as cache] [skyscraper.core :refer [defprocessor scrape scrape!]] [skyscraper.enlive-helpers :refer [href]] [skyscraper.test-utils :refer...
null
https://raw.githubusercontent.com/nathell/skyscraper/4ed589fc7cb3f15cf5080aa45d1ed066dd108e7f/test/skyscraper/character_encoding_test.clj
clojure
(ns skyscraper.character-encoding-test (:require [clojure.test :as test :refer [deftest is]] [net.cgrand.enlive-html :refer [select text]] [skyscraper.cache :as cache] [skyscraper.core :refer [defprocessor scrape scrape!]] [skyscraper.enlive-helpers :refer [href]] [skyscraper.test-utils :refer...
91dab3406382752130e624a126f21700db44b330dde2d634b0c0f68dfe8a7fa7
fpottier/mpri-2.4-projet-2022-2023
CReal.ml
* Exact real arithmetic ( Constructive reals ) . * Copyright ( C ) 2000 FILLIATRE * * This software is free software ; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License version 2 , as published by the Free Software Foundation . * * This sof...
null
https://raw.githubusercontent.com/fpottier/mpri-2.4-projet-2022-2023/1ce08cadfb3a8ec8bc72609bc82873b29d2ce241/vendor/creal/CReal.ml
ocaml
s Some useful constants in [Z.t] and [Q.t]. s Utility functions over [Z.t] and [Q.t]. s Absolute value. s [mul_Bexp] and [div_Bexp] respectively multiplies and divides an integer by $B^n$ (works whatever the sign of [n] is). The result is a rational. s Power of a real to a small integer. [s] is already th...
* Exact real arithmetic ( Constructive reals ) . * Copyright ( C ) 2000 FILLIATRE * * This software is free software ; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License version 2 , as published by the Free Software Foundation . * * This sof...
fbec4d00ddec514149853732ee06dffd6935bc53451b05818a0c214c6bfa748f
2600hz-archive/whistle
hangups_listener.erl
%%%------------------------------------------------------------------- @author < > ( C ) 2010 - 2011 , VoIP INC %%% @doc Listen for Hangup call events and record them to the database %%% @end Created : 23 Nov 2010 by < > %%%------------------------------------------------------------------- -module(hangu...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/whistle_apps/apps/hangups/src/hangups_listener.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API gen_server callbacks =================================================================== API =================================================================== ----...
@author < > ( C ) 2010 - 2011 , VoIP INC Listen for Hangup call events and record them to the database Created : 23 Nov 2010 by < > -module(hangups_listener). -behaviour(gen_server). -export([start_link/0, set_amqp_host/1, set_couch_host/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/...
015fee2f81597645b8d06d72fb6ba99ac37c4ae3a4843e06ac331bd7d43737cd
shop-planner/shop3
domain.lisp
(defpackage :shop3-rovers (:use common-lisp shop3) (:nicknames #:shop2-rovers) (:intern #:communicated_image_data #:communicated_rock_data #:communicated_soil_data ;; rewrite for goals #:communicate_image_data #:communicate_rock_data #:communicate_soil_data)) (in-package :shop3-rovers) (def...
null
https://raw.githubusercontent.com/shop-planner/shop3/b04d12bdf83e40590fe44bb5c68952f3fd0b5b1d/shop3/examples/rovers/strips/domain.lisp
lisp
rewrite for goals the location from which ?r took the soil data the location of the rover the location of the lander rover position lander location (COMMUNICATE_IMAGE_DATA ?OBJ ?MODE) TOP LEVEL TASK: this just traverses over the computed PATH FIXME: shouldn't there be a protection of the store until the commu...
(defpackage :shop3-rovers (:use common-lisp shop3) (:nicknames #:shop2-rovers) (:intern #:communicated_image_data #:communicated_rock_data #:communicated_soil_data #:communicate_image_data #:communicate_rock_data #:communicate_soil_data)) (in-package :shop3-rovers) (defclass pure-pddl-domain (...
9b5353ff593eebf00d2e987497de4eb0d1e75fc22f21de24043ae9526cf23443
returntocorp/semgrep
Match_search_mode.ml
* * Copyright ( C ) 2019 - 2022 r2c * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file LICE...
null
https://raw.githubusercontent.com/returntocorp/semgrep/dcea978347df81cbc8f2c2b49b80c1980f6194cf/src/engine/Match_search_mode.ml
ocaml
Debugging flags. * Note that semgrep-core -matching_explanations can also be useful to debug. *************************************************************************** Prelude *************************************************************************** ************************************************************...
* * Copyright ( C ) 2019 - 2022 r2c * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file LICE...
0fd5a3c311ea53debefcecfd8a7cd74e37c8f34738ee84708bdab3cb2c4ea496
futurice/haskell-mega-repo
Index.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Futurice.App.ProxyMgmt.Pages.Index (indexPageHandler) where import FUM.Types.Login import Futurice.Constants (servicePublicUrl, supportEmailHtml) import Futurice.Generics import Futurice.Postgres import Fu...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/proxy-mgmt-app/src/Futurice/App/ProxyMgmt/Pages/Index.hs
haskell
# LANGUAGE OverloadedStrings # ----------------------------------------------------------------------------- Data ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Html -------------------------------------------...
# LANGUAGE DataKinds # # LANGUAGE RecordWildCards # module Futurice.App.ProxyMgmt.Pages.Index (indexPageHandler) where import FUM.Types.Login import Futurice.Constants (servicePublicUrl, supportEmailHtml) import Futurice.Generics import Futurice.Postgres import Futurice.Prelude import Futurice.Serv...
8df392c7045ba5713aa13cebbc489274997faa5c0f314fc52b834202227587f3
minio/minio-hs
Data.hs
-- MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc. -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- -2.0 -- -- Unless required by applicable law or agreed to in writing...
null
https://raw.githubusercontent.com/minio/minio-hs/f4ae55468e7d7aea9e89214a985ccb0dd9f4ddbf/src/Network/Minio/Data.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
MinIO Haskell SDK , ( C ) 2017 , 2018 MinIO , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , # LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # module Network.Minio.Data where import ...
7533c0f060b1ea55defa87e852b0c4a82424975936807144b4d234d63190b0d6
CSCfi/rems
workflows.cljs
(ns rems.administration.workflows (:require [re-frame.core :as rf] [rems.administration.administration :as administration] [rems.administration.status-flags :as status-flags] [rems.administration.workflow :as workflow] [rems.atoms :as atoms :refer [readonly-checkbox doc...
null
https://raw.githubusercontent.com/CSCfi/rems/9abf233b728272c6e99c07a98d0e94da042ec2c7/src/cljs/rems/administration/workflows.cljs
clojure
TODO Very similar components are used in here, licenses, forms, resources
(ns rems.administration.workflows (:require [re-frame.core :as rf] [rems.administration.administration :as administration] [rems.administration.status-flags :as status-flags] [rems.administration.workflow :as workflow] [rems.atoms :as atoms :refer [readonly-checkbox doc...
8c862f88e2f5c8e678ba456045078d8170c615ef9e2b974a60e011cac2aed352
lambdaisland/classpath
poke.clj
(ns poke (:require [lambdaisland.classpath :as licp] [clojure.string :as str] [clojure.java.io :as io]) (:import clojure.lang.DynamicClassLoader)) (licp/classpath-chain) (licp/classloader-chain) (licp/update-classpath! {:extra {:paths ["repl_session/"]}}) (licp/debug! false) (licp/resour...
null
https://raw.githubusercontent.com/lambdaisland/classpath/73c95299498f21f5f54be72cb68004e9487091fc/repl_session/poke.clj
clojure
(ns poke (:require [lambdaisland.classpath :as licp] [clojure.string :as str] [clojure.java.io :as io]) (:import clojure.lang.DynamicClassLoader)) (licp/classpath-chain) (licp/classloader-chain) (licp/update-classpath! {:extra {:paths ["repl_session/"]}}) (licp/debug! false) (licp/resour...
7d4012fa551a9d2f7bd7fb5c8062e4808a4c2fa94f515e11b228b26248089af8
ekmett/ekmett.github.com
Derivatives.hs
{-# OPTIONS -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances #-} module Derivatives where import Control.Monad.Identity import Control.Arrow ((+++),(***),(&&&)) import Data.Monoid infixl 9 :.: infixl 7 :*: infixl 6 :+: class Bifunctor f where bimap :: (a -> c) -> (b -> d) -> f a b -> f c d...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/Derivatives.hs
haskell
# OPTIONS -fglasgow-exts -fallow-undecidable-instances -fallow-overlapping-instances #
module Derivatives where import Control.Monad.Identity import Control.Arrow ((+++),(***),(&&&)) import Data.Monoid infixl 9 :.: infixl 7 :*: infixl 6 :+: class Bifunctor f where bimap :: (a -> c) -> (b -> d) -> f a b -> f c d instance Bifunctor (,) where bimap f g ~(a,b) = (f a, g b) instance Bifunctor Either wh...
f0149cb6d156e5368948c49b279d3245fa02e71af03bc39ca4702ae083029a21
dimitaruzunov/fp-2018
edges.scm
(require rackunit rackunit/text-ui) (define (flatmap fn l) (apply append (map fn l))) (define (search p l) (and (not (null? l)) (or (p (car l)) (search p (cdr l))))) (define (add-if-missing x l) (if (member x l) l (cons x l))) (define (keys alist) (map car alist)) (define (ass...
null
https://raw.githubusercontent.com/dimitaruzunov/fp-2018/f75f0cd009cc7f41ce55a5ec71fb4b8eadafc4eb/exercises/07/edges.scm
scheme
(require rackunit rackunit/text-ui) (define (flatmap fn l) (apply append (map fn l))) (define (search p l) (and (not (null? l)) (or (p (car l)) (search p (cdr l))))) (define (add-if-missing x l) (if (member x l) l (cons x l))) (define (keys alist) (map car alist)) (define (ass...
f03f710ccb8db976f338202bb55b3e0da3d0193cb5d74f49cfdaa907d0772730
simongray/datalinguist
io.clj
(ns dk.simongray.datalinguist.loom.io "This namespace contains an implementation of `loom.io/view` that uses `dk.simongray.datalinguist.dependency/formatted-string` instead of `loom.io/dot-str`. The main reason for this is that `loom.io/render-to-bytes` explicitly requires graphs made of pure data, so the fu...
null
https://raw.githubusercontent.com/simongray/datalinguist/9869884d7019e7102efffcb0de66187e9cb126c5/src/dk/simongray/datalinguist/loom/io.clj
clojure
(ns dk.simongray.datalinguist.loom.io "This namespace contains an implementation of `loom.io/view` that uses `dk.simongray.datalinguist.dependency/formatted-string` instead of `loom.io/dot-str`. The main reason for this is that `loom.io/render-to-bytes` explicitly requires graphs made of pure data, so the fu...
96e0461646472add865a4faa33a73dfdb5d538db7b218871a1f078f37f2a955a
kazu-yamamoto/llrbtree
WBTree.hs
| Purely functional weight balanced trees , aka trees of bounded balance . * and , \"Binary search trees of bounded " , Proceedings of the fourth annual ACM symposium on Theory of computing , pp 137 - 142 , 1972 . * , \"Implementing sets efficiently in a functional language\ " ,...
null
https://raw.githubusercontent.com/kazu-yamamoto/llrbtree/36f259e36c2b320aa37bbbae9577e01fd8a27118/Data/Set/WBTree.hs
haskell
* Data structures * Creating sets * Converting to a list * Membership * Deleting * Checking * Set operations * Helper functions , showTree , printTree -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------...
| Purely functional weight balanced trees , aka trees of bounded balance . * and , \"Binary search trees of bounded " , Proceedings of the fourth annual ACM symposium on Theory of computing , pp 137 - 142 , 1972 . * , \"Implementing sets efficiently in a functional language\ " ,...
6570e270c1ca0de730e8ee374bc32d619c6e6455d6b29fee05a254a1001ff7bb
tarides/runtime_events_tools
olly.ml
module H = Hdr_histogram module Ts = Runtime_events.Timestamp open Cmdliner * Trace format - either json or Fuchsia Trace Format ( filenames typically ending in .fxt ) . is a binary format viewable in Perfetto . .fxt). Fuchsia is a binary format viewable in Perfetto. *) type trace_format = Json | Fuchsia let...
null
https://raw.githubusercontent.com/tarides/runtime_events_tools/652df6ad5ddd8907ea9b44529955f39cae898d7d/bin/olly.ml
ocaml
Set the temp directory. We should make this configurable. Read from the child process Poll at 10Hz Now we're done, we need to remove the ring buffers ourselves because we told the child process not to remove them emit prefix in the tracefile Use a different pid for each domain help about the program....
module H = Hdr_histogram module Ts = Runtime_events.Timestamp open Cmdliner * Trace format - either json or Fuchsia Trace Format ( filenames typically ending in .fxt ) . is a binary format viewable in Perfetto . .fxt). Fuchsia is a binary format viewable in Perfetto. *) type trace_format = Json | Fuchsia let...
fa16aaeef1782e1bca884a1089d101e90ad160df1516237b5f5194526ae72bed
bmillare/dj
core.clj
(in-ns 'dj.io) (defn file "returns a new java.io.File with args as files or str-paths" ^java.io.File [& paths] (java.io.File. ^String (apply dj/str-path (map (fn [p] (if (= (type p) java.io.File) (.getPath ^java.io.File p) p)) paths)))) (defmethod clojure.core/pr...
null
https://raw.githubusercontent.com/bmillare/dj/d87fd279c304b2552ffa5e5ab0e740ae48582bb6/src/dj/io/core.clj
clojure
not portable
(in-ns 'dj.io) (defn file "returns a new java.io.File with args as files or str-paths" ^java.io.File [& paths] (java.io.File. ^String (apply dj/str-path (map (fn [p] (if (= (type p) java.io.File) (.getPath ^java.io.File p) p)) paths)))) (defmethod clojure.core/pr...
35162d52bdcbeb9d27a80f0acbb3bb66a2b84134775c9e286d22288ee6dd28e9
sharplispers/cl-string-match
utils.lisp
-*- package : CL - STRING - MATCH ; Syntax : Common - lisp ; Base : 10 -*- Copyright ( c ) 2015 , < > ;; 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 c...
null
https://raw.githubusercontent.com/sharplispers/cl-string-match/aa660127ba230b8dda5bf45bb9ac6903cafb402d/src/utils.lisp
lisp
Syntax : Common - lisp ; Base : 10 -*- 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 ...
Copyright ( c ) 2015 , < > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND DISCLAIMED . IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT ...
c0f6aa579b161230693df3f5036dd43c0f9ac4c81d0dcee2096de3812554e42c
supki/liblastfm
TagSpec.hs
# LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} module Xml.TagSpec (spec) where import Lastfm import Lastfm.Tag import Test.Hspec import Text.Xml.Lens import SpecHelper spec :: Spec spec = do it "getInfo" $ publicly (getInfo <*> tag "depressive") `shouldHaveXml` root.node "tag".node "taggings...
null
https://raw.githubusercontent.com/supki/liblastfm/754be163c4ce14c9b4819f1359b5f95a0f91a29d/test/api/Xml/TagSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # module Xml.TagSpec (spec) where import Lastfm import Lastfm.Tag import Test.Hspec import Text.Xml.Lens import SpecHelper spec :: Spec spec = do it "getInfo" $ publicly (getInfo <*> tag "depressive") `shouldHaveXml` root.node "tag".node "taggings".text it "getSimilar" $ pub...
92066c05c256436268fae121c2165467b05560fc1ce48dc77a4bea8632c2f15c
jlollis/sicp-solutions
chapter1.3examples.scm
#lang sicp Chapter 1.3 Examples 1.3 Formulating Abstractions with Higher - Order Procedures ;; 1.3.1 Procedures as Arguments ;; 1.3.2 Constructing Procedures Using Lambda ;; 1.3.3 Procedures as General Methods ;; 1.3.4 Procedures as Returned Values
null
https://raw.githubusercontent.com/jlollis/sicp-solutions/7b03befcfe82e26a7fb28d94bc99292bc484f9dd/Supplemental%20Materials/notes/chapter1.3examples.scm
scheme
1.3.1 Procedures as Arguments 1.3.2 Constructing Procedures Using Lambda 1.3.3 Procedures as General Methods 1.3.4 Procedures as Returned Values
#lang sicp Chapter 1.3 Examples 1.3 Formulating Abstractions with Higher - Order Procedures