_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
01538a8fe41f7a4859bdbb0090d6cbfa05d2ca27159d12820a5f53bfec58754d
nyu-acsys/drift
xy10.ml
let rec loopa ax ay az = if (ay < 20) then loopa (ax+10) (ay+1) az else ax > az || ay < az + 1 let main_p (z:int) = let x = 0 in let y = 0 in assert (loopa x y z = true) let main (w:unit) = let _ = main_p 5 in let _ = main_p (-4) in let _ = for i = 1 to 1000000 do ...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DOrder/first/xy10.ml
ocaml
let rec loopa ax ay az = if (ay < 20) then loopa (ax+10) (ay+1) az else ax > az || ay < az + 1 let main_p (z:int) = let x = 0 in let y = 0 in assert (loopa x y z = true) let main (w:unit) = let _ = main_p 5 in let _ = main_p (-4) in let _ = for i = 1 to 1000000 do ...
2bdc8d7ba43a21578b1a829016d65e8c8c83b53e335043dbcfb95b02d97fdb24
nuprl/gradual-typing-performance
modulegraph.rkt
#lang typed/racket/base Utilities for working with modules graphs . ;; The source of truth are TiKZ'd module graphs ;; (because their layout requires human intervention) ;; so this file provides a (brittle) parser. (provide ;; -- things that should not be here get-git-root ; (-> Path-String)) ;; --- p...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/summarize/modulegraph.rkt
racket
(because their layout requires human intervention) so this file provides a (brittle) parser. -- things that should not be here (-> Path-String)) --- (-> Path-String ModuleGraph)) Does not collect module dependency information. (->* [Natural] [String] ModuleGraph) Make a modulegraph with no edges and N anonymo...
#lang typed/racket/base Utilities for working with modules graphs . The source of truth are TiKZ'd module graphs (provide get-git-root project-name->modulegraph ( - > ( U Symbol String ) ) ) directory->modulegraph Parse a directory into a module graph . discrete-modulegraph tex->modulegraph Pa...
d0afd8f92ccbac09ffe1812e93c610871b61898e9da8b01b11a578a2957084cc
travelping/ergw
itu_e212.erl
Copyright 2016 , Travelping GmbH < > %% 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 2 of the License , or ( at your option ) any later version . -module(itu_e212). -exp...
null
https://raw.githubusercontent.com/travelping/ergw/380ce8ad2ff25e9f9339b2c7ee9832d85ae6c880/apps/ergw_core/src/itu_e212.erl
erlang
This program is free software; you can redistribute it and/or ==================================================================== API ==================================================================== =================================================================== ==============================================...
Copyright 2016 , Travelping GmbH < > modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . -module(itu_e212). -export([split_imsi/1]). -ifdef(TEST). -export([mcn_size/1]). -endif...
adde77a453b366504c71cc2a618927ac65699c48dd44eed0e7cdc0b80ddf9315
pixlsus/registry.gimp.org_static
hexgrid.scm
; hex_grid.scm by ; Version 1.1 ( 20090428 ) ; ; Changes: 1.1 - General clean up , allow specifying the element the length applies to ; and offsets. ; Description ; ; renders a hex grid on the current layer ; ; License: ; ; This program is free software; you can redistribute it and...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/hexgrid.scm
scheme
hex_grid.scm Changes: and offsets. Description renders a hex grid on the current layer 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 program is distributed in the hope th...
by Version 1.1 ( 20090428 ) 1.1 - General clean up , allow specifying the element the length applies to it under the terms of the GNU General Public License as published by The GNU Public License is available at (define (script-fu-hex_grid img inLayer inElement inLength inOrientation inStr...
2910c5a9b283e051657f7e011797bb079a09f2e076333106ca0a9621bc7e7d2e
quil/quil-examples
04_fading_horizontal_lines.clj
(ns quil-sketches.gen-art.04-fading-horizontal-lines (:require [quil.core :refer :all])) ;; Example 4 - Fading Horizontal Lines Taken from Section 2.4.3 , p 39 ;; void setup() { size(500 , 300 ) ; ;; background(180); ;; strokeWeight(4); ;; strokeCap(SQUARE); for(int h = 10 ; h < = ( height - 15 ) ; ...
null
https://raw.githubusercontent.com/quil/quil-examples/9ff9d5578d93682af29d9a080b917a19f8deafc8/src/quil_sketches/gen_art/04_fading_horizontal_lines.clj
clojure
Example 4 - Fading Horizontal Lines void setup() { background(180); strokeWeight(4); strokeCap(SQUARE); h < = ( height - 15 ) ; h+=10 ) { line(10, h, width - 20, h); line(10, h+4, width - 20, h+4); } }
(ns quil-sketches.gen-art.04-fading-horizontal-lines (:require [quil.core :refer :all])) Taken from Section 2.4.3 , p 39 (defn draw-line "Draws a horizontal line on the canvas at height h" [h] (stroke 0 (- 255 h)) (line 10 h (- (width) 20) h) (stroke 255 h) (line 10 (+ h 4) (- (width) 20) (+ h 4))) ...
4218cc5258918398b926b33e4b156edc4aa7f134e68751379fe85d3764115b9b
TrustInSoft/tis-kernel
options.ml
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/impact/options.ml
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 This file is part of Frama - C. Copyright ( C ) 2007 - 2015 ...
44a1843946e2f95adfc3cdb6d019cb310900fd4c059e2944caa3ba5226eec50c
CodyReichert/qi
grovel.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; grovel.lisp --- CFFI-Grovel tests. ;;; Copyright ( C ) 2014 , ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software witho...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cffi-master/tests/grovel.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- grovel.lisp --- CFFI-Grovel tests. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicen...
Copyright ( C ) 2014 , files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (in-package #:cffi-tes...
fbd1e9dba2e3ad14000e4f9dfcf5c861156f30a7c2b7697113094ddc57e63eba
footprintanalytics/footprint-web
test_util.clj
(ns metabase.query-processor.streaming.test-util "Utility functions for testing QP streaming (download) functionality." (:require [cheshire.core :as json] [clojure.data.csv :as csv] [clojure.test :refer :all] [dk.ative.docjure.spreadsheet :as spreadsheet] [metabase.qu...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/test/metabase/query_processor/streaming/test_util.clj
clojure
(ns metabase.query-processor.streaming.test-util "Utility functions for testing QP streaming (download) functionality." (:require [cheshire.core :as json] [clojure.data.csv :as csv] [clojure.test :refer :all] [dk.ative.docjure.spreadsheet :as spreadsheet] [metabase.qu...
315c54052a9f78e297681c25ea29e873af6619a09c516a01c422203dab7e2656
omnyway-labs/re-crud
views.cljs
;; ;; re-crud - A crud library for re-frame apps ;; Copyright 2017 Omnyway 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...
null
https://raw.githubusercontent.com/omnyway-labs/re-crud/2fe9cbcf0a19d8c09a86d9025577e6271e9dd5a3/example-app/src/cljs/re_crud_example/views.cljs
clojure
re-crud - A crud library for re-frame apps 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 Lic...
Copyright 2017 Omnyway Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns re-crud-example.views (:require [re-frame.core :as re-frame :refer [reg-event-fx dispatch]] [re-crud-example.view.user :as user] [re-crud-example.view.todo :as todo])) (defn tabs [] [:di...
6b2e2388f9f3c64bc25e8e383b2562a6a8616f6e9aa367e0f5ddb01cb08f74bd
exercism/babashka
project.clj
(defproject two-fer "0.1.0-SNAPSHOT" :description "two-fer exercise." :url "-fer" :dependencies [[org.clojure/clojure "1.10.0"]])
null
https://raw.githubusercontent.com/exercism/babashka/707356c52e08490e66cb1b2e63e4f4439d91cf08/exercises/practice/two-fer/project.clj
clojure
(defproject two-fer "0.1.0-SNAPSHOT" :description "two-fer exercise." :url "-fer" :dependencies [[org.clojure/clojure "1.10.0"]])
8aea49b7199ecdaa5a4c0d8e878a50f476e7be372e0353e7f892887e53982ab8
AshleyYakeley/Truth
Image.hs
module Changes.World.GNOME.GTK.Element.Image ( createImage ) where import Changes.Core import Changes.World.GNOME.GI import Data.GI.Base.Attributes import Data.Media.Image import Data.Vector.Storable import Foreign.Ptr import GI.GdkPixbuf import qualified GI.Gtk as GI import GI.Gtk hiding (Image) import Shapes...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/e39ecefbcddaf38bc4c946def835650d11f5ac5e/Changes/changes-gnome/lib/Changes/World/GNOME/GTK/Element/Image.hs
haskell
module Changes.World.GNOME.GTK.Element.Image ( createImage ) where import Changes.Core import Changes.World.GNOME.GI import Data.GI.Base.Attributes import Data.Media.Image import Data.Vector.Storable import Foreign.Ptr import GI.GdkPixbuf import qualified GI.Gtk as GI import GI.Gtk hiding (Image) import Shapes...
92a3b4f68751040e627f6535a0e79968fc649083b73d07f0c4f66f5170f45798
fetburner/Coq2SML
tries.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/lib/tries.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * module Make = functor (X...
e81daa82c69b6f9d9827d3e2e75b3e852081d1b5e5558e54b717cf3ad942ae43
bjorng/wings
wpc_intersect_edge.erl
%% %% wpc_intersect_edge.erl -- %% %% Plug-in for extending an edge to the intersection with a plane. %% Copyright ( c ) 2004 - 2011 . %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %% Contributed by . %% %% $Id...
null
https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/plugins_src/commands/wpc_intersect_edge.erl
erlang
wpc_intersect_edge.erl -- Plug-in for extending an edge to the intersection with a plane. See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. $Id$ angle, not size of LD vector) verts) and chan...
Copyright ( c ) 2004 - 2011 . Contributed by . 2000 - 10 - 09 : Fixed undo bug ( had forgotten to use " { save_state , ... } " ) 2000 - 10 - 01 : Incorporated help text suggestions from Puzzled 2000 - 09 - 21 : Normalized line direction ( so lineDotPlane dependent only on 2000 - 09 - 17 : ...
4f2e0ac31fd4f2e06c4dd72875b6754c8870c4e924343e651a9058fe88bb2ed4
cldwalker/bb-clis
clj_kondo.clj
(ns cldwalker.bb-clis.tasks.clj-kondo (:require [babashka.pods :as pods])) ;; Need at least "2021.10.19" for var-meta (pods/load-pod "clj-kondo") (require '[pod.borkdude.clj-kondo :as clj-kondo]) (defn var-sizes [args] (let [paths (or args ["src"]) {{:keys [var-definitions var-usages]} :analysis} ...
null
https://raw.githubusercontent.com/cldwalker/bb-clis/31fcec04406f14e9031986e6175d0d8bd1c6414b/src/cldwalker/bb_clis/tasks/clj_kondo.clj
clojure
Need at least "2021.10.19" for var-meta
(ns cldwalker.bb-clis.tasks.clj-kondo (:require [babashka.pods :as pods])) (pods/load-pod "clj-kondo") (require '[pod.borkdude.clj-kondo :as clj-kondo]) (defn var-sizes [args] (let [paths (or args ["src"]) {{:keys [var-definitions var-usages]} :analysis} (clj-kondo/run! {:lint paths ...
c0e020fc7d1b0a115f933ee6a7e8921807128d4a26815de983ea6093d94e1bbb
fortytools/holumbus
Parser.hs
-- ---------------------------------------------------------------------------- | Module : . Parser Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.2 The parser for the Hayoo ! web s...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/searchengine/examples/hayoo/source/Hayoo/Parser.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- | A query may always be surrounded by whitespace | Parse an and query. | Parse an or query. | Parse a negation. | Parse a context query. | Parse a query surro...
| Module : . Parser Copyright : Copyright ( C ) 2008 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.2 The parser for the Hayoo ! web search . Module : Hayoo.Parser Copyright : Copyright (C) 2008 Timo B...
a91936c4d0deea3fa0403c6952c4843643cac423b322c3943fd3810590878e28
bia-technologies/statsbit
transaction_sample_test.clj
Copyright 2020 BIA - Technologies Limited Liability Company ;; 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 t...
null
https://raw.githubusercontent.com/bia-technologies/statsbit/4102ca5e5d39b1c06541b49615c6de83e7f4ef36/backend/test/ru/bia_tech/statsbit/renderers/transaction_sample_test.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 governi...
Copyright 2020 BIA - Technologies Limited Liability Company distributed under the License is distributed on an " AS IS " BASIS , (ns ru.bia-tech.statsbit.renderers.transaction-sample-test (:require [ru.bia-tech.statsbit.renderers.transaction-sample :as sut] [clojure.test :as t])) (t/deftest render (le...
dbbe10259c99f3ca30da8ad941b6cf55c6e4206490a3104afe42bc0920412eaf
glguy/advent
05.hs
# Language TemplateHaskell , QuasiQuotes # | Module : Main Description : Day 5 solution Copyright : ( c ) , 2020 License : ISC Maintainer : < > Module : Main Description : Day 5 solution Copyright : (c) Eric Mertens, 2020 License : ISC Maintainer : <> -} module Main (m...
null
https://raw.githubusercontent.com/glguy/advent/d72f6fec89c1a57d90345ffa185fc8dbd3e2d595/solutions/src/2020/05.hs
haskell
| >>> :main
# Language TemplateHaskell , QuasiQuotes # | Module : Main Description : Day 5 solution Copyright : ( c ) , 2020 License : ISC Maintainer : < > Module : Main Description : Day 5 solution Copyright : (c) Eric Mertens, 2020 License : ISC Maintainer : <> -} module Main (m...
afbcbc98747f6adcf714894de0bd8a62675715b066198697b498c3898eed1660
me-box/core-network
env.ml
let secrets_dir = Fpath.v "/run/secrets/" let cm_key = ref "" let cm_key () = if !cm_key <> "" then Rresult.R.ok !cm_key else begin let key_file = Fpath.add_seg secrets_dir "DATABOX_NETWORK_KEY" in let get_key file = B64.encode (String.trim file) in Rresult.R.map get_key (Bos.OS.File.read key_file) ...
null
https://raw.githubusercontent.com/me-box/core-network/3dca69bc7610ab51f93ea49dcc3d8e43842cd2ae/lib/env.ml
ocaml
let secrets_dir = Fpath.v "/run/secrets/" let cm_key = ref "" let cm_key () = if !cm_key <> "" then Rresult.R.ok !cm_key else begin let key_file = Fpath.add_seg secrets_dir "DATABOX_NETWORK_KEY" in let get_key file = B64.encode (String.trim file) in Rresult.R.map get_key (Bos.OS.File.read key_file) ...
1ed7948eaf30995233e91cb55479ced95f097384e4d03942146733864871670d
anmonteiro/ocaml-h2
unikernel.ml
open Lwt.Infix open H2 module type HTTP2 = H2_mirage.Server module Dispatch (C : Mirage_console.S) (Http2 : HTTP2) = struct let log c fmt = Printf.ksprintf (C.log c) fmt let get_content c path = log c "Replying: %s" path >|= fun () -> "Hello from the h2 unikernel" let dispatcher c reqd = let { Request...
null
https://raw.githubusercontent.com/anmonteiro/ocaml-h2/aff47b8dd3276f1bdea28c33e1528b839873e751/examples/mirage/unikernel.ml
ocaml
* Server boilerplate
open Lwt.Infix open H2 module type HTTP2 = H2_mirage.Server module Dispatch (C : Mirage_console.S) (Http2 : HTTP2) = struct let log c fmt = Printf.ksprintf (C.log c) fmt let get_content c path = log c "Replying: %s" path >|= fun () -> "Hello from the h2 unikernel" let dispatcher c reqd = let { Request...
8f9f0cd1856e3886f969a9f958c9c86a453793eec8675610ed6f2fa1cda1164d
alanz/ghc-exactprint
T10030.hs
module Main where import GHC.Generics main = do putStrLn $ packageName $ from $ Just True putStrLn $ packageName $ from $ True
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T10030.hs
haskell
module Main where import GHC.Generics main = do putStrLn $ packageName $ from $ Just True putStrLn $ packageName $ from $ True
b5dace814ce184f542eb744c81b48292619c60dfaf18d25d3355595d3a3a5edc
ocsigen/obrowser
prod_cons.ml
open Js ;; open Html ;; let cdiv = get_element_by_id Sys.argv.(1) ;; let stock = span [] ;; let on_food_stock = let m = Mutex.create () in (fun f () -> Mutex.lock m ; let r = (try f stock with e -> Mutex.unlock m ; raise e) in Mutex.unlock m ; r) ;; let eater delay = let stomach = span [] in ...
null
https://raw.githubusercontent.com/ocsigen/obrowser/977c09029ea1e4fde4fb0bf92b4d893835bd9504/tutorial/prod_cons.ml
ocaml
open Js ;; open Html ;; let cdiv = get_element_by_id Sys.argv.(1) ;; let stock = span [] ;; let on_food_stock = let m = Mutex.create () in (fun f () -> Mutex.lock m ; let r = (try f stock with e -> Mutex.unlock m ; raise e) in Mutex.unlock m ; r) ;; let eater delay = let stomach = span [] in ...
89faea0f69d46991e2b48ffa712918689bdd84e66ee28696d26c56a55630985b
ghosthamlet/algorithm-data-structure
topological_sorting.clj
(ns algorithm-data-structure.algorithms.graph.topological-sorting (:require [algorithm-data-structure.data-structures.graph :as g] [algorithm-data-structure.data-structures.graph-vertex :as gv] [algorithm-data-structure.data-structures.stack :as st] [algorithm-data-structure.algori...
null
https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/graph/topological_sorting.clj
clojure
(ns algorithm-data-structure.algorithms.graph.topological-sorting (:require [algorithm-data-structure.data-structures.graph :as g] [algorithm-data-structure.data-structures.graph-vertex :as gv] [algorithm-data-structure.data-structures.stack :as st] [algorithm-data-structure.algori...
891d0780fcbf206bbcd79db2e1357d4d829848f5fb595b3d61a497963670c2b2
rigetti/rpcq
client.lisp
;;;; client.lisp ;;;; Author : ;;;; ;;;; Lisp mimic of the python JSON RPC Client. ;; ;; Suppose someone else has set up a compute resource which supplies access to some valuable functions over RPCQ , which you would like to access . You 're in luck ! The RPCQ client makes this task easy . ;; ;; Suppose th...
null
https://raw.githubusercontent.com/rigetti/rpcq/3a734718d5c2bb7ed57ad612e2c7158736d1a650/src/client.lisp
lisp
client.lisp Lisp mimic of the python JSON RPC Client. Suppose someone else has set up a compute resource which supplies access to Suppose that the definition of the function on the remote machine is as such: ...) If you had access to its definition locally, you might invoke it as Making the analogous c...
Author : some valuable functions over RPCQ , which you would like to access . You 're in luck ! The RPCQ client makes this task easy . ( defun my - favorite - function ( & keys ( argA valA ) ( argB valB ) ... ) ( my - favorite - function : argA val1 : argB val2 ... ) ( rpc - call socket " my - favo...
4648e0cb026624e00823f6c042c6e9ad2d3d146df8d3c53e19e10da93ada500d
MaskRay/OJHaskell
nimble.hs
import Control.Monad import Data.Bits import Data.Functor import Data.List main = do cases <- readLn replicateM cases $ do getLine t <- (zip [0..] . map read . words) <$> getLine :: IO [(Int, Int)] putStrLn $ if foldl' (\s (x,y) -> if odd y then s `xor` x else s) 0 t == 0 then "Second" else "First"
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/HackerRank/contests/5-days-of-game-theory/nimble.hs
haskell
import Control.Monad import Data.Bits import Data.Functor import Data.List main = do cases <- readLn replicateM cases $ do getLine t <- (zip [0..] . map read . words) <$> getLine :: IO [(Int, Int)] putStrLn $ if foldl' (\s (x,y) -> if odd y then s `xor` x else s) 0 t == 0 then "Second" else "First"
60333fff7662027ea7ab063a6d9d3ae905e289db560f48ad4cdeefab461e0750
mbillingr/lisp-in-small-pieces
interpreter1.scm
(import (builtin core) (libs utils) (libs book) (06-fast-interpreter common)) ; this is basically the same as interpreter 6-3 but the instructions modified ; to make them more linear and use more registers along with an explicit stack. (include "pretreatment.scm") (define (make-closure code ...
null
https://raw.githubusercontent.com/mbillingr/lisp-in-small-pieces/b2b158dfa91dc95d75af4bd7d93f8df22219047e/07-compilation/interpreter1.scm
scheme
this is basically the same as interpreter 6-3 but the instructions modified to make them more linear and use more registers along with an explicit stack. (set! *env* (activation-frame-next *env*)))) I think this is correct some dummy definitions
(import (builtin core) (libs utils) (libs book) (06-fast-interpreter common)) (include "pretreatment.scm") (define (make-closure code closed-environment) (list 'closure code closed-environment)) (define (closure? obj) (eq? (car obj) 'closure)) (define (closure-code obj) (cadr obj)) ...
3167bd0d0e8698561622948fea879808e6454b6f9b27230579d4eb019f1ddfc1
robx/puzzle-draw
Generic.hs
module Draw.Generic ( generic, ) where import Data.Component import Data.GridShape import qualified Data.Map.Strict as Map import Data.Maybe (catMaybes) import Data.PuzzleTypes import Data.Yaml import qualified Parse.PuzzleTypes as Parse generic :: PuzzleType -> (Value, Maybe Value) -> Parser [TaggedComponent a] ...
null
https://raw.githubusercontent.com/robx/puzzle-draw/936f4c9bf8ff576fb657b7c05067504734adae14/src/Draw/Generic.hs
haskell
module Draw.Generic ( generic, ) where import Data.Component import Data.GridShape import qualified Data.Map.Strict as Map import Data.Maybe (catMaybes) import Data.PuzzleTypes import Data.Yaml import qualified Parse.PuzzleTypes as Parse generic :: PuzzleType -> (Value, Maybe Value) -> Parser [TaggedComponent a] ...
0dfd6af8b998b0f090b7094e83e05041c01bfa243dd8d4bbcf6364fc46af81de
input-output-hk/cardano-sl
HasPrevBlock.hs
module Pos.Chain.Block.HasPrevBlock ( HasPrevBlock (..) ) where import Universum import Control.Lens (choosing) import Pos.Chain.Block.Header (BlockHeader, GenericBlockHeader, HeaderHash, choosingBlockHeader, gbhPrevBlock) import Pos.Util.Some...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/src/Pos/Chain/Block/HasPrevBlock.hs
haskell
------------------------------------------------------------------------------ HasPrevBlock ------------------------------------------------------------------------------ | Lens for accessing the @HeaderHash@ of the previous block Perhaps it is not the best instance. # OVERLAPPABLE #
module Pos.Chain.Block.HasPrevBlock ( HasPrevBlock (..) ) where import Universum import Control.Lens (choosing) import Pos.Chain.Block.Header (BlockHeader, GenericBlockHeader, HeaderHash, choosingBlockHeader, gbhPrevBlock) import Pos.Util.Some...
e2bc4a4befba27cfc047fe7d91b338eb067217fc818963f2680977b71cb1e83a
sealchain-project/sealchain
Restore.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # # LANGUAGE RankNTypes # module Cardano.Wallet.Kernel.Restore ( restoreWallet , restoreKnownWallet , continueRestoration , blundToResolvedBlock , mkPrefilter ) where import Universum import Control.Concurrent.Async...
null
https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/wallet/src/Cardano/Wallet/Kernel/Restore.hs
haskell
# LANGUAGE BangPatterns # | Restore a wallet NOTE: The key for the wallet must already have been added to the keystore. background thread that will asynchronously restore the wallet history. NOTE: We pass in an optional fresh 'Address' which will be used to initialise the have been impossible for upstream code ...
# LANGUAGE LambdaCase # # LANGUAGE RankNTypes # module Cardano.Wallet.Kernel.Restore ( restoreWallet , restoreKnownWallet , continueRestoration , blundToResolvedBlock , mkPrefilter ) where import Universum import Control.Concurrent.Async (async, cancel) import ...
1c01b4838176f38d71dd5f9673b344c87a6223a625200467706481acb3251571
atdixon/thurber
view_as_map.clj
(ns simple.view-as-map (:require [thurber :as th]) (:import (org.apache.beam.sdk.transforms View Combine SerializableBiFunction) (org.apache.beam.sdk.values KV) (java.util HashMap Map) (org.apache.beam.sdk.coders MapCoder))) ;; Scenario -- we have a data stream with metadata (light...
null
https://raw.githubusercontent.com/atdixon/thurber/38b86a683e446f2deed55fad157476ae05940d50/demo/simple/view_as_map.clj
clojure
Scenario -- we have a data stream with metadata (light "wavelengths") on some elements in our stream but not all; we use a Beam View to capture a map of wavelength values per key and annotate the stream elements where the metadata is missing. Beam 's view and then convert it to a clojure map each element but this...
(ns simple.view-as-map (:require [thurber :as th]) (:import (org.apache.beam.sdk.transforms View Combine SerializableBiFunction) (org.apache.beam.sdk.values KV) (java.util HashMap Map) (org.apache.beam.sdk.coders MapCoder))) default Views yield Java data structures . We could pr...
8f91a6d2e7669fd27a92e4bb52c23e90c0f5b0f560ff8c25ba142f05b4dfa4ae
dvingo/my-clj-utils
fulcro_reitit_test.cljs
(ns dv.fulcro-reitit-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest is testing]] [com.fulcrologic.fulcro.application :as app] [com.fulcrologic.fulcro.components :as c :refer [defsc]] [com.fulcrologic.fulcro.routing.dynamic-routing :as dr] [com.fulcrologic.guardrails.co...
null
https://raw.githubusercontent.com/dvingo/my-clj-utils/b2945b9ed51070acfa911cc538022342b7944ba5/test/dv/fulcro_reitit_test.cljs
clojure
works todo test when there are no reitit routes on a target fulcro router edge case you need to handle
(ns dv.fulcro-reitit-test (:require [clojure.spec.alpha :as s] [clojure.test :refer [deftest is testing]] [com.fulcrologic.fulcro.application :as app] [com.fulcrologic.fulcro.components :as c :refer [defsc]] [com.fulcrologic.fulcro.routing.dynamic-routing :as dr] [com.fulcrologic.guardrails.co...
a26db3e6c1131728854d478cc535ba7349eba856aea6a9cfb0555de43e782d9c
jbracker/supermonad
Instance.hs
-- | Functions and utilities to work with and inspect class instances of the GHC API . module Control.Super.Plugin.Instance ( instanceClass , instanceClassTyCon , instanceTopTyCons , instanceTyArgs , isClassInstance , isMonoTyConInstance , isPolyTyConInstance ) where import InstEnv ( ClsInst(..)...
null
https://raw.githubusercontent.com/jbracker/supermonad/2595396a225a65b1dce6ed9a1ce59960f392a55b/src/Control/Super/Plugin/Instance.hs
haskell
| Functions and utilities to work with and inspect class instances | Checks if the given instance is of the given type class. | Returns the type class of the given instance. | Returns the type constructors of the class is instance instantiates. | Collects the top type constructors of the instance arguments. | Ret...
of the GHC API . module Control.Super.Plugin.Instance ( instanceClass , instanceClassTyCon , instanceTopTyCons , instanceTyArgs , isClassInstance , isMonoTyConInstance , isPolyTyConInstance ) where import InstEnv ( ClsInst(..) , instanceHead ) import Type ( Type ) import Class ( Class, classTy...
ef9a1f3ec8ab6b97e517e35cd8e84675079eb2e5db4ebb81a7e80bc953d74c9d
haroldl/whitespace-nd
Tokens.hs
module Tokens where data Token = A | B | C deriving Eq instance Show Token where show A = " " show B = "\t" show C = "\n"
null
https://raw.githubusercontent.com/haroldl/whitespace-nd/4fbe5df729b83fa7a60c9a2a6d105893ece27109/Tokens.hs
haskell
module Tokens where data Token = A | B | C deriving Eq instance Show Token where show A = " " show B = "\t" show C = "\n"
e81cf714e99d85ef56ada7013406079081b4eb18b8f8d76182e4f7b4dd471ac9
kostmo/circleci-failure-tracker
Commits.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # module Sql.Read.Commits where import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Except (ExceptT (ExceptT), except...
null
https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/fetcher/src/Sql/Read/Commits.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # | Returns results in descending order of commit ID
# LANGUAGE DuplicateRecordFields # # LANGUAGE OverloadedStrings # module Sql.Read.Commits where import Control.Monad.IO.Class (liftIO) import Control.Monad.Trans.Except (ExceptT (ExceptT), except, runExceptT) import ...
2af906e83b97f633d77daad07d4eadb9a40eae506e6c07b7313620c2fd58a36d
anuyts/menkar
MapEv.hs
module Data.Functor.MapEv where (<%>) :: Functor f => f (a -> b) -> a -> f b fh <%> a = fmap ($ a) fh
null
https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/src/Data/Functor/MapEv.hs
haskell
module Data.Functor.MapEv where (<%>) :: Functor f => f (a -> b) -> a -> f b fh <%> a = fmap ($ a) fh
871575f47bed22d9cafab62ae436b7c682185325b6ab1eeeae5d9f308c7e1346
alanzplus/EOPL
5.3-test.rkt
#lang eopl (require rackunit "cp-interpreter.rkt") (require rackunit/text-ui) (define cp-interpreter-test (test-suite "cp-interpreter-test" (check-equal? (run "let2 a = 3, b = 4 in -(a,b)") (num-val -1)) )) (run-tests cp-interpreter-test)
null
https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch5/5.3-test.rkt
racket
#lang eopl (require rackunit "cp-interpreter.rkt") (require rackunit/text-ui) (define cp-interpreter-test (test-suite "cp-interpreter-test" (check-equal? (run "let2 a = 3, b = 4 in -(a,b)") (num-val -1)) )) (run-tests cp-interpreter-test)
990d103f0b855f5a360719c904ae64986a34a0f787656ed6a1900c2d0116fa86
BinaryAnalysisPlatform/bap
test_disasm.ml
open Core_kernel[@@warning "-D"] open Bap.Std open Result.Monad_infix open OUnit2 module Dis = Disasm_expert.Basic module Rec = Disasm_expert.Recursive module Cfg = Graphs.Cfg let err fmt = Or_error.errorf fmt let leaq = "\x48\x8d\x00" let lea = "\x67\x8d\x00" let sub = "\x48\x83\xec\x08" let call = "\xe8\x47\xee\xf...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib_test/bap_disasm/test_disasm.ml
ocaml
sub $0x8,%rsp mov 0x10(%rax),%eax add $0x8, %rsp "retq"
open Core_kernel[@@warning "-D"] open Bap.Std open Result.Monad_infix open OUnit2 module Dis = Disasm_expert.Basic module Rec = Disasm_expert.Recursive module Cfg = Graphs.Cfg let err fmt = Or_error.errorf fmt let leaq = "\x48\x8d\x00" let lea = "\x67\x8d\x00" let sub = "\x48\x83\xec\x08" let call = "\xe8\x47\xee\xf...
c5d9e7cd7cdd3366391b3d3ed081e5171357fccdd14e674ed8a2d2b2b3cc8351
maximedenes/native-coq
term_dnet.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/term_dnet.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i debug i binary app debug ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Errors open Util open Te...
4d65287c8fe3185595dc5ad23972424a44cabfcaf265178d0d6847118e0e56cb
alejandrogallo/keyboard-lab
Module.hs
module Kicad.Module where import qualified Templates as TPL import qualified Sexpr as S type Position = (Double, Double) ( fp_line ( start -3.81 0 ) ( end -3.302 0 ) ( layer F.SilkS ) ( width 0.2032 ) ) data FpLine = FpLine { start :: Position , end :: Position , lineLayer :: String , width :: Double } ...
null
https://raw.githubusercontent.com/alejandrogallo/keyboard-lab/e261933a5c4ff3733ccbd951b8830b9dc66bbd32/Kicad/Module.hs
haskell
module Kicad.Module where import qualified Templates as TPL import qualified Sexpr as S type Position = (Double, Double) ( fp_line ( start -3.81 0 ) ( end -3.302 0 ) ( layer F.SilkS ) ( width 0.2032 ) ) data FpLine = FpLine { start :: Position , end :: Position , lineLayer :: String , width :: Double } ...
3c1334d418a517426afe3161a962cb418337d6ce31134932d691124a8f709712
ktakashi/sagittarius-scheme
api.scm
-*- mode : scheme ; coding : utf-8 -*- ;;; ;;; net/mq/amqp/api.scm - AMQP v1.0 API ;;; Copyright ( c ) 2010 - 2014 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; 1. Re...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/6dfef5ca3ae97de2d38d18e0ed9dcf5a079b2bf4/sitelib/net/mq/amqp/api.scm
scheme
coding : utf-8 -*- net/mq/amqp/api.scm - AMQP v1.0 API Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of con...
Copyright ( c ) 2010 - 2014 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (net mq amqp api) (export (rena...
3080bbb0660f8739384a462fd8fe29be11ab3a454114b856619fd9f7062b0786
NaOHman/XMonadPlus
Main.hs
# LANGUAGE MultiParamTypeClasses , FlexibleContexts # ---------------------------------------------------------------------------- -- | -- Module : XMonad.Main Copyright : ( c ) 2007 -- License : BSD3-style (see LICENSE) -- -- Maintainer : -- Stability : unstable Portability : not portable...
null
https://raw.githubusercontent.com/NaOHman/XMonadPlus/1495e102ae3304817d1897a393e1f31fef71d41f/xmonad-darcs/src/XMonad/Main.hs
haskell
-------------------------------------------------------------------------- | Module : XMonad.Main License : BSD3-style (see LICENSE) Maintainer : Stability : unstable --------------------------------------------------------------------------- ----------------------------------------------------...
# LANGUAGE MultiParamTypeClasses , FlexibleContexts # Copyright : ( c ) 2007 Portability : not portable , uses mtl , X11 , posix xmonad , a minimalist , tiling window manager for X11 module XMonad.Main (xmonad) where import System.Locale.SetLocale import Control.Arrow (second) import Data.Bits import D...
641cab5ca82f10eccd57724e7e30288862b9713c4291bd629285e6fb523b893a
dundalek/closh
history.cljs
(ns closh.zero.service.history (:require [clojure.string] [goog.object :as gobj] [sqlite3 :as sqlite] [path] [fs] [closh.zero.service.history-common :refer [table-history table-session get-db-filename]])) (defn- init-database-file [db-file] (js/Promise. ...
null
https://raw.githubusercontent.com/dundalek/closh/b1a7fd310b6511048fbacb8e496f574c8ccfa291/src/lumo/closh/zero/service/history.cljs
clojure
(ns closh.zero.service.history (:require [clojure.string] [goog.object :as gobj] [sqlite3 :as sqlite] [path] [fs] [closh.zero.service.history-common :refer [table-history table-session get-db-filename]])) (defn- init-database-file [db-file] (js/Promise. ...
525efded0199c6187e5bf8dab3d36450c47ac8e114f8f2c5507cf65a42a4257a
cstar/erldis
erldis.erl
-module(erldis). -include("erldis.hrl"). -compile(export_all). %%%%%%%%%%%%%%%%%%%%%%% Client Connection % % %%%%%%%%%%%%%%%%%%%%%%% connect() -> erldis_client:connect(). connect(Host) -> erldis_client:connect(Host). connect(Host, Port) -> erldis_client:connect(Host, Port). connect(Host, Port, Options) -> erld...
null
https://raw.githubusercontent.com/cstar/erldis/375260795e6a3de2600e297658f364deedbe6f1b/src/erldis.erl
erlang
% Commands operating on every value %% TODO: tokenize the binary directly (if is faster) Commands operating on string values %% Commands operating on lists %% Commands operating on sets %% TODO: test TODO: srandmember Commands operating on ordered sets %% Hash commands %% Commands operating on...
-module(erldis). -include("erldis.hrl"). -compile(export_all). connect() -> erldis_client:connect(). connect(Host) -> erldis_client:connect(Host). connect(Host, Port) -> erldis_client:connect(Host, Port). connect(Host, Port, Options) -> erldis_client:connect(Host, Port, Options). quit(Client) -> erldis_client:s...
595f89df41b0f62d4ce190e07cfadeb68168e9ce921ded42233070e80dcac353
scheme/rx
re-fold.scm
Regexp " fold " combinators -*- scheme -*- Copyright ( c ) 1998 by . REGEXP - FOLD re kons s [ finish start ] - > value REGEXP - FOLD - RIGHT re kons s [ finish start ] - > value ;;; REGEXP-FOR-EACH re proc s [start] -> unspecific Non - R4RS imports : let - optionals : optional error ? r...
null
https://raw.githubusercontent.com/scheme/rx/dd9037f6f9ea01019390614f6b126b7dd293798d/re-fold.scm
scheme
REGEXP-FOR-EACH re proc s [start] -> unspecific The following definition is a bit unwieldy, but the intuition is simple: this procedure uses the regexp RE to divide up string S into non-matching/matching chunks, and then "folds" the procedure KONS across this sequence of chunks. call this match M. Let I be the...
Regexp " fold " combinators -*- scheme -*- Copyright ( c ) 1998 by . REGEXP - FOLD re kons s [ finish start ] - > value REGEXP - FOLD - RIGHT re kons s [ finish start ] - > value Non - R4RS imports : let - optionals : optional error ? regexp - fold re kons s [ finish start ] - > value ...
240fd7536d2f1683c6eb38d24546d8264720e833a57b381852eb8955ee15a369
bytekid/mkbtt
rhs.ml
Copyright 2008 , Christian Sternagel , * GNU Lesser General Public License * * This file is part of TTT2 . * * TTT2 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 ve...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/automata/src/rhs.ml
ocaml
** OPENS ******************************************************************* ** MODULES ***************************************************************** ** TYPES ******************************************************************* ** FUNCTIONS *************************************************************** Iterators ...
Copyright 2008 , Christian Sternagel , * GNU Lesser General Public License * * This file is part of TTT2 . * * TTT2 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 ve...
ae757ac67935e20b1a1d44a7a3cca815e03301a294e2ac79ee2911bb16a5eda5
haroldcarr/learn-haskell-coq-ml-etc
Run.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Run (run) where import Import import RIO import qualified RIO.ByteString.Lazy as BSL import RIO.Process import qualified RIO.Text as T import System.Environment import System.Exit run...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2018-06-snoyman-applied-haskell-at-lambdaconf/use-rio-example/src/Run.hs
haskell
# LANGUAGE OverloadedStrings # TODO toStrict
# LANGUAGE NoImplicitPrelude # module Run (run) where import Import import RIO import qualified RIO.ByteString.Lazy as BSL import RIO.Process import qualified RIO.Text as T import System.Environment import System.Exit run :: RIO App () run = do logInfo "...
b22ad5a8ce5bdd64a2e095aef28604a516945e5e459843ac692d5df38f02db3f
oakes/Nightmod
utils.clj
(ns nightmod.utils (:require [clojure.edn :as edn] [clojure.java.io :as io] [clojure.string :as string] [nightcode.dialogs :as dialogs] [nightcode.editors :as editors] [nightcode.ui :as ui] [nightcode.utils :as nc-utils] [nightmod.inp...
null
https://raw.githubusercontent.com/oakes/Nightmod/e1145a49d96c5322aaf4bdd5493ae14a7f0c0f8a/src/clojure/nightmod/utils.clj
clojure
clear the key down buffer so keys don't get stuck in the down position focus on the root so the game can receive keyboard events
(ns nightmod.utils (:require [clojure.edn :as edn] [clojure.java.io :as io] [clojure.string :as string] [nightcode.dialogs :as dialogs] [nightcode.editors :as editors] [nightcode.ui :as ui] [nightcode.utils :as nc-utils] [nightmod.inp...
79578d8db8302a28a3343808aa5b40830f7d3a044373281abd52bdac82c8d652
clojure-interop/aws-api
AbstractAmazonSimpleWorkflowAsync.clj
(ns com.amazonaws.services.simpleworkflow.AbstractAmazonSimpleWorkflowAsync "Abstract implementation of AmazonSimpleWorkflowAsync. Convenient method forms pass through to the corresponding overload that takes a request object and an AsyncHandler, which throws an UnsupportedOperationException." (:refer-clojure :...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.simpleworkflow/src/com/amazonaws/services/simpleworkflow/AbstractAmazonSimpleWorkflowAsync.clj
clojure
(ns com.amazonaws.services.simpleworkflow.AbstractAmazonSimpleWorkflowAsync "Abstract implementation of AmazonSimpleWorkflowAsync. Convenient method forms pass through to the corresponding overload that takes a request object and an AsyncHandler, which throws an UnsupportedOperationException." (:refer-clojure :...
7ceb38601e70712287d6c9c3caf9867d72e56deb79895afc40b993f426a9f738
noss/erlang-gettext
gettext_compile.erl
-module(gettext_compile). %%%---------------------------------------------------------------------- Created : 27 Oct 2003 by %%% Function: Tools for multi-lingual capabilities, %%% similar to GNU gettext. %%% %%% NB: MAKE SURE TO NOT CALL ANY OTHER MODULE IN THE SYSTEM. %%% THIS CODE RUNS IN A PR...
null
https://raw.githubusercontent.com/noss/erlang-gettext/c895be9dcc6fc699b2e1e8bd731ccee4f78b1cdc/src/gettext_compile.erl
erlang
---------------------------------------------------------------------- Function: Tools for multi-lingual capabilities, similar to GNU gettext. NB: MAKE SURE TO NOT CALL ANY OTHER MODULE IN THE SYSTEM. THIS CODE RUNS IN A PRE-BUILD PHASE !!! -------------------------------------------------------...
-module(gettext_compile). Created : 27 Oct 2003 by $ I d : gettext_compile.erl , v 1.1 2005/07/18 23:22:35 etnt Exp $ -export([parse_transform/2, epot2po/0]). -include("gettext.hrl"). -ifdef(debug). -define(debug(S,A), io:format(get(fd), S, A)). -else. -define(debug(S,A), true). -endif. From the Erlang po -...
51ff2a23b8c9fe50a51c02c231b7ff778fbbd0dd19978cad55a20b1b79b994ae
atolab/apero-core
apath.ml
open Acommon open Atypes let slash_sub = Astring.Sub.v "/" let wildcard2_sub = Astring.Sub.v "**" let remove_useless_slashes s = let open Astring.Sub in cuts ~sep:slash_sub (v s) |> (function | [] -> [] | [e; e'] when is_empty e && is_empty e' -> [empty; empty] | x :: l -> x :: List.filter (fun s ...
null
https://raw.githubusercontent.com/atolab/apero-core/6e8b9bb8383de641396463fb4e5685b7f135755c/lib/apath.ml
ocaml
from #appendix-B : the path of a URI contains any char but '?' or '#'. We add '*', '[' and ']' as forbidden char ? not allowed # not allowed [ not allowed ] not allowed * not allowed from #appendix-B except that: - we don't allow '[' or ']' in the path part ? not allowed # not allowe...
open Acommon open Atypes let slash_sub = Astring.Sub.v "/" let wildcard2_sub = Astring.Sub.v "**" let remove_useless_slashes s = let open Astring.Sub in cuts ~sep:slash_sub (v s) |> (function | [] -> [] | [e; e'] when is_empty e && is_empty e' -> [empty; empty] | x :: l -> x :: List.filter (fun s ...
058ae2950ee8b6c71018a96dd65cf6a7956b0ce00781e5af2352a3111b0292f7
tbsschroeder/clojure-webshop-app
api.clj
(ns metro.components.web.api (:require [clojure.data.json :as json] [ring.util.response :refer [response]] [metro.components.db.articles :as article])) (defn respond-hello [request] (let [name (get-in request [:query-params :name]) resp (if (empty? name) "Hello, world!" (str "Hello,...
null
https://raw.githubusercontent.com/tbsschroeder/clojure-webshop-app/acedaceae794b8c9bd0805356880169e19a66b86/src/metro/components/web/api.clj
clojure
(ns metro.components.web.api (:require [clojure.data.json :as json] [ring.util.response :refer [response]] [metro.components.db.articles :as article])) (defn respond-hello [request] (let [name (get-in request [:query-params :name]) resp (if (empty? name) "Hello, world!" (str "Hello,...
f459138a4c9e0118d83fc471fcf3479df8aed7d8b2115e3caff361fa0c11c98e
dustmop/co2
memory-tests.scm
#lang racket (require rackunit "../compile.scm") (define (compile-code code) (clear-result) (clear-var-allocation) (make-variable! 'm) (make-variable! 'n) (make-variable! 'array) (make-pointer! 'ptr) (make-address! 'data 0) (make-const! 'some-field 4) (process-form (datum->syntax #f code)) (fetch-...
null
https://raw.githubusercontent.com/dustmop/co2/49cd2c9fac25777bb0fe1877075602c167956d90/unit-tests/memory-tests.scm
scheme
#lang racket (require rackunit "../compile.scm") (define (compile-code code) (clear-result) (clear-var-allocation) (make-variable! 'm) (make-variable! 'n) (make-variable! 'array) (make-pointer! 'ptr) (make-address! 'data 0) (make-const! 'some-field 4) (process-form (datum->syntax #f code)) (fetch-...
0e6089d90a0e03d1d3f5b0b53f37e4091c712021e32498cb3dd2dd001e6fa38b
den1k/vimsical
subs.cljc
(ns vimsical.frontend.ui.subs (:require [re-frame.core :as re-frame] [vimsical.frontend.ui-db :as ui-db])) (re-frame/reg-sub ::orientation :<- [::ui-db/ui-db] (fn [ui-db _] (:orientation ui-db))) (re-frame/reg-sub ::on-mobile? :<- [::ui-db/ui-db] (fn [ui-db _] (:on-mobile? ui-db))) (re-fram...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/frontend/vimsical/frontend/ui/subs.cljc
clojure
(ns vimsical.frontend.ui.subs (:require [re-frame.core :as re-frame] [vimsical.frontend.ui-db :as ui-db])) (re-frame/reg-sub ::orientation :<- [::ui-db/ui-db] (fn [ui-db _] (:orientation ui-db))) (re-frame/reg-sub ::on-mobile? :<- [::ui-db/ui-db] (fn [ui-db _] (:on-mobile? ui-db))) (re-fram...
3f821a28eb6f72134cbc6475eb6620c108b57d3379f5b8a79a701e785fe7acb5
manuel-serrano/bigloo
crc.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / recette / crc.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/recette/crc.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ *=====================================================================*/ *---------------------------...
* serrano / prgm / project / bigloo / recette / crc.scm * / * Author : * / * Creation : Thu Sep 3 12:31:31 2009 * / * Last change : Thu Sep 3 12:31:44 2009 ( serrano ) * / * Copyr...
e53776676be3334702795583ab5f4a043424090f919f86d089c7c5a9d149a67b
GlideAngle/flare-timing
Stopped.hs
module Flight.Gap.Stopped ( TaskStopTime(..) , AnnouncedTime(..) , ScoreBackTime(..) , StartGateInterval(..) , StopTime(..) , CanScoreStopped(..) , stopTaskTime , canScoreStopped , TaskType(..) , StartGates(..) , ScoreTimeWindow(..) , scoreTimeWindow , AltitudeAboveGo...
null
https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-stop/library/Flight/Gap/Stopped.hs
haskell
| GPS altitude. TODO: State the units for altitude. Is it feet or metres?
module Flight.Gap.Stopped ( TaskStopTime(..) , AnnouncedTime(..) , ScoreBackTime(..) , StartGateInterval(..) , StopTime(..) , CanScoreStopped(..) , stopTaskTime , canScoreStopped , TaskType(..) , StartGates(..) , ScoreTimeWindow(..) , scoreTimeWindow , AltitudeAboveGo...
09e05d067865f75a39ed25600f72128ef4b1afb1a8f040e8466a49e14a7aadc6
anik545/OwlPPL
owlppl_eval.ml
open Core open Ppl let ignore_output f x y = let _ = f x y in () let model = (Sys.get_argv ()).(1) let model = match model with | "hmm" -> ignore_output Hmm.hmm_model | "linreg" -> ignore_output Linreg.linreg_model | "dpmm" -> ignore_output Dpmm.dpmm | "coin" -> ignore_output Coin.coin_mean | "sprink...
null
https://raw.githubusercontent.com/anik545/OwlPPL/ad650219769d5f32564cc771d63c9a52289043a5/evaluation/owlppl/owlppl_eval.ml
ocaml
open Core open Ppl let ignore_output f x y = let _ = f x y in () let model = (Sys.get_argv ()).(1) let model = match model with | "hmm" -> ignore_output Hmm.hmm_model | "linreg" -> ignore_output Linreg.linreg_model | "dpmm" -> ignore_output Dpmm.dpmm | "coin" -> ignore_output Coin.coin_mean | "sprink...
2d2cc8c1f1b35601907a817cbf8d9a4150dc502a85db1cbee33f751bf55961ea
OpenC2-org/ocas
oc_env.erl
@author ( C ) 2017 , sFractal Consulting LLC %%% -module(oc_env). %%%------------------------------------------------------------------- %%% All rights reserved. Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% %%% Redistribution and use in source and binary forms, with or without %%% ...
null
https://raw.githubusercontent.com/OpenC2-org/ocas/c15132d9f37b1e0e29884456a520557c25b22f38/apps/ocas/src/oc_env.erl
erlang
------------------------------------------------------------------- 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...
@author ( C ) 2017 , sFractal Consulting LLC -module(oc_env). Licensed under the Apache License , Version 2.0 ( the " License " ) ; " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCL...
deb915edbad2cc404b15a3f7e874dc47bd09f72046869e3da74f7bdc5cfa66a8
rsnikhil/Forvis_RISCV-ISA-Spec
Bit_Utils.hs
Copyright ( c ) 2018 - 2019 -- See LICENSE for license details module Bit_Utils where -- ================================================================ -- This module defines some utilities on bit vectors represented as Integers -- ================================================================ Standard Ha...
null
https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/src/Bit_Utils.hs
haskell
See LICENSE for license details ================================================================ This module defines some utilities on bit vectors represented as Integers ================================================================ Project imports None ========================================================...
Copyright ( c ) 2018 - 2019 module Bit_Utils where Standard Haskell imports import Data.Bits For type ( signed fixed - width ints ) For Wordxx type ( unsigned fixed - width ints ) import Numeric (showHex, readHex) This function corresponds to Verilog 's x [ hi : lo ] operator Result has the...
8fa7f98f54a4c49a10ba05d05ddc1ff4bfe8bd9f1434cceb84ff08e9da751d16
clash-lang/clash-compiler
NoDeDup.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE ViewPatterns # module NoDeDup where import Prelude as P import Clash.Magic import Clash.Prelude import Clash.Netlist.Types import qualified Clash.Netlist.Id as Id import Test.Tasty.Clash import Test.Tasty.Clash.NetlistTest data ABCD = A | B | C | D twice :: Int -> Int...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Netlist/NoDeDup.hs
haskell
# LANGUAGE OverloadedStrings # | 'f' should have one call to twice in the netlist
# LANGUAGE ViewPatterns # module NoDeDup where import Prelude as P import Clash.Magic import Clash.Prelude import Clash.Netlist.Types import qualified Clash.Netlist.Id as Id import Test.Tasty.Clash import Test.Tasty.Clash.NetlistTest data ABCD = A | B | C | D twice :: Int -> Int twice a = 2 * a # NOINLINE twice #...
fb57b9e4f7e572886d7d985df80b0033ea8550989db3a8acf72e575aa314c8bd
adomokos/haskell-katas
Ex66_ExercisesBalancedBinaryTreeSpec.hs
module Ex66_ExercisesBalancedBinaryTreeSpec ( spec ) where import Test.Hspec import Data.List main :: IO () main = hspec spec Given this tree : 20 10 30 5 15 18 35 Given this tree: 20 10 30 5 15 18 35 -} data Tree a = Leaf | Node a (Tree a) (...
null
https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Ex66_ExercisesBalancedBinaryTreeSpec.hs
haskell
module Ex66_ExercisesBalancedBinaryTreeSpec ( spec ) where import Test.Hspec import Data.List main :: IO () main = hspec spec Given this tree : 20 10 30 5 15 18 35 Given this tree: 20 10 30 5 15 18 35 -} data Tree a = Leaf | Node a (Tree a) (...
a21e01cf031de119f19416c2cc78e93a0104191a983d1206b556e5c18090784f
input-output-hk/cardano-wallet
ApiAsArray.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # -- | Copyright : © 2018 - ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/f366f02fa04734a990309a6cb0816df460e8e29e/lib/wallet/api/http/Cardano/Wallet/Api/Lib/ApiAsArray.hs
haskell
# LANGUAGE DeriveAnyClass # | License: Apache-2.0 | A wrapper that allows any type to be serialized as a JSON array. The number of items permitted in the array is dependent on the wrapped type.
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingVia # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # Copyright : © 2018 - 2022 IOHK module Cardano.Wallet.Api....
5446712afc103bbdbcd79e5ba83f7ca32c27ba7164ab198b9ba2070a65d598f5
ont-app/sparql-endpoint
core.clj
(ns ont-app.sparql-endpoint.core "Functions to support interacting with a SPARQL endpoint. See also `-query`. " (:require [clj-http.client :as http] [clojure.string :as s] [clojure.data.json :as json] [taoensso.timbre :as log] [ont-app.vocabulary.core :as voc] [ont-app.vocabulary.lstr :refer [...
null
https://raw.githubusercontent.com/ont-app/sparql-endpoint/6f9d2d6b21a7aed5f9080e74b6869ab34029056e/src/ont_app/sparql_endpoint/core.clj
clojure
Query parsing Basic queries (log/debug query) else return value is a string
(ns ont-app.sparql-endpoint.core "Functions to support interacting with a SPARQL endpoint. See also `-query`. " (:require [clj-http.client :as http] [clojure.string :as s] [clojure.data.json :as json] [taoensso.timbre :as log] [ont-app.vocabulary.core :as voc] [ont-app.vocabulary.lstr :refer [...
1ca38c926b00237bac33c7e89e16c10419492fb79b8e5faf2c3443d1b2c64356
the-real-blackh/sodium-2d-game-engine
CommonAL.hs
# LANGUAGE ScopedTypeVariables , RankNTypes , BangPatterns # module FRP.Sodium.GameEngine2D.CommonAL where import Control.Applicative import Control.Concurrent import Control.Concurrent.STM import Control.Exception import Control.Monad import Data.IORef import Data.Maybe import FRP.Sodium import Sound.OpenAL import Da...
null
https://raw.githubusercontent.com/the-real-blackh/sodium-2d-game-engine/fb765eb50d39f0297274c2d24cd71dcec2dc2c2a/FRP/Sodium/GameEngine2D/CommonAL.hs
haskell
set status to Playing use allocated buffers till they're all gone, then start popping Exit if a new instruction comes through play any remaining data
# LANGUAGE ScopedTypeVariables , RankNTypes , BangPatterns # module FRP.Sodium.GameEngine2D.CommonAL where import Control.Applicative import Control.Concurrent import Control.Concurrent.STM import Control.Exception import Control.Monad import Data.IORef import Data.Maybe import FRP.Sodium import Sound.OpenAL import Da...
a137c4b99c7a863359b287e174ce3518a17e056f2a7d9ef3ebfbe8b4ccf455ea
heyoka/faxe
esp_aggregate.erl
Date : 09.01.21 - 10:02 Ⓒ 2021 TGW - Group -module(esp_aggregate). -author("Alexander Minichmair"). -include("faxe.hrl"). %% API -behavior(df_component). %% API -export([init/3, process/3, handle_info/2, options/0, check_options/0, wants/0, emits/0]). -define(FUNCTIONS, [ <<"variance">>, <<"sum">>...
null
https://raw.githubusercontent.com/heyoka/faxe/a2aa5a190b7ae1b3bf125868fbdac95fef9ee261/apps/faxe/src/components/esp_aggregate.erl
erlang
API API databatch only the only chance for us to get a timestamp here, is to take the batchstart or else use now() ;( emit zeroed fields if there is no timestamp present in the result, we use the ts field form the last point from incoming data_batch handle keep fields emit internal %%%%%%%%%%%%
Date : 09.01.21 - 10:02 Ⓒ 2021 TGW - Group -module(esp_aggregate). -author("Alexander Minichmair"). -include("faxe.hrl"). -behavior(df_component). -export([init/3, process/3, handle_info/2, options/0, check_options/0, wants/0, emits/0]). -define(FUNCTIONS, [ <<"variance">>, <<"sum">>, <<"min...
6e1bab0c2c0edb94ad11a79b01078a04dddc668a7b7801c21763da673cf1d497
Drup/LILiS
lisUtils.ml
open LisCommon open LisParser module SMap = SMap * { 2 Verifications } * We have to verity two sort of things : - Arity is consistent . - Every variables used in a rule is defined . - Arity is consistent. - Every variables used in a rule is defined. *) exception ArityError of ( string * int * int ) (*...
null
https://raw.githubusercontent.com/Drup/LILiS/df63fbc3ee77b3378ae1ef27715828c3ad892475/lilis/lisUtils.ml
ocaml
tok, defined, used tok, var tok tok, arg * Extract definitions * Fill optional arguments according to a definition. * Copied from ocaml 4.02
open LisCommon open LisParser module SMap = SMap * { 2 Verifications } * We have to verity two sort of things : - Arity is consistent . - Every variables used in a rule is defined . - Arity is consistent. - Every variables used in a rule is defined. *) let check_expr env arit_env vars tok e = let i...
f03dfbdb9c5b0a8eef0c0b237e75167fd5ee97bbed1a871db317013a060bb68c
huangjs/cl
ddisna.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l ,...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/share/lapack/lapack/ddisna.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rt...
9368484768bcd78414660ecd894c5e218891b1df5255e7b5212197f09076b180
tommaisey/aeon
lf-noise1.help.scm
;; See lf-noise0
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/noise/lf-noise1.help.scm
scheme
See lf-noise0
343002ace930afce58caafc9f79eb3cb40a62c3a1f7f6933fc58d19ca3c2d37b
awakesecurity/spectacle
Enabled.hs
{-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Language.Spectacle.Syntax.Enabled Copyright : ( c ) Arista Networks , 2022 - 2023 License : Apache License 2.0 , see LICENSE -- -- Stability : stable Portability : non - portable ( GHC extensions ) -- -- TODO: docs -- -- @since 1.0.0...
null
https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Language/Spectacle/Syntax/Enabled.hs
haskell
# OPTIONS_HADDOCK show-extensions # | Module : Language.Spectacle.Syntax.Enabled Stability : stable TODO: docs @since 1.0.0 * Labels ** Interpreters ---------------------------------------------------------------------------------------------------------------------
Copyright : ( c ) Arista Networks , 2022 - 2023 License : Apache License 2.0 , see LICENSE Portability : non - portable ( GHC extensions ) module Language.Spectacle.Syntax.Enabled Enabled (Enabled), Effect (EnabledS), enabled, runEnabled, ) where import Data.Void (absurd) impor...
3cad1d2a3a109c344fbbd5ce31a2ee03967a1fe7c51fdd1ef2bb5fc1b7bc37b6
jiangpengnju/htdp2e
ex105.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex105) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/itemizations_and_structures/ex105.rkt
racket
about the language level of this file in a form that our tools can easily process. spiders, whose relevant attributes are the number of remainig legs and the space they need in case of transport; elephants, whose only attributes are the space they need in case of transport; boa constrictor, whose attributes includ...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex105) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Develop a data representation for the following four kinds of zo...
a207a7961ec787fa4da0943641e583a87705bb3cc48dcb34d6c0f1fc7fbc9430
binaryage/chromex
memory.cljs
(ns chromex.app.system.memory (:require-macros [chromex.app.system.memory :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-info* [config] (gen-wrap :function ::get-info config)) ...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/apps/chromex/app/system/memory.cljs
clojure
(ns chromex.app.system.memory (:require-macros [chromex.app.system.memory :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-info* [config] (gen-wrap :function ::get-info config)) ...
04a8f94593dc5579ce8d10aebb18408e99cd3e003dd9acdebbbacdb6b27c5d15
haskell-game/tiny-games-hs
log2048.hs
import Data.List ; g = map (p . c . filter (> 0)) ; p = take 4 . (++ repeat 0) r = reverse . transpose ; q = putStrLn . unlines . map (map(".0123456789AB"!!)) c (x : y : z) | x == y = 1+x : c z ; c (x : z) = x : c z ; c [] = [] f x k = foldr (\j -> if k == j then g . r else r) x "hjlk" h u x = s u x id where{ s i [] k ...
null
https://raw.githubusercontent.com/haskell-game/tiny-games-hs/e56b1c6e6d994631a4ab5cf0bfb5ab5c62d1fa86/base/log2048/log2048.hs
haskell
^10 ------------------------------------------------------------------ 80> --
import Data.List ; g = map (p . c . filter (> 0)) ; p = take 4 . (++ repeat 0) r = reverse . transpose ; q = putStrLn . unlines . map (map(".0123456789AB"!!)) c (x : y : z) | x == y = 1+x : c z ; c (x : z) = x : c z ; c [] = [] f x k = foldr (\j -> if k == j then g . r else r) x "hjlk" h u x = s u x id where{ s i [] k ...
be037c7365d5b85aa818e5d2c84f868bc7a2e4026859b413df0566f637cadfbd
bgusach/exercises-htdp2e
ex-237.rkt
#lang htdp/isl (require test-engine/racket-tests) # # # Constants # # # Data Definitions # # # Functions ; Number Number -> Boolean ; is the area of a square with side x larger than c?? (define (squared>? x c) (> (* x x) c)) (squared>? 3 10) (squared>? 4 10) (squared>? 5 10) (test)
null
https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/3-abstraction/ex-237.rkt
racket
Number Number -> Boolean is the area of a square with side x larger than c??
#lang htdp/isl (require test-engine/racket-tests) # # # Constants # # # Data Definitions # # # Functions (define (squared>? x c) (> (* x x) c)) (squared>? 3 10) (squared>? 4 10) (squared>? 5 10) (test)
cc1acef5529ffb71ba2fa1d9cf46743b96699140236c5159a069c9df0fdb5d3d
0install/0install
test_bug_reporter.ml
Copyright ( C ) 2019 , See the README file for details , or visit . See the README file for details, or visit . *) open OUnit open Lwt.Infix let suite = "bug-reporter">::: [ "submit">:: Server.with_server (fun (_config, _fake_system) server -> server#expect [ [("/api/report-bug/", `ServeFile ...
null
https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/tests/test_bug_reporter.ml
ocaml
Copyright ( C ) 2019 , See the README file for details , or visit . See the README file for details, or visit . *) open OUnit open Lwt.Infix let suite = "bug-reporter">::: [ "submit">:: Server.with_server (fun (_config, _fake_system) server -> server#expect [ [("/api/report-bug/", `ServeFile ...
94fa8c6db8ada1df70f62a3b652aa463ec2bd33bdc4fb3a35dc13b87df986a64
haskell-suite/haskell-tc
Naming2.hs
module Naming2 where fn :: a -> a fn var_a = sub var_a where sub :: a -> a sub another_a = const (const var_a ()) another_a const :: a -> b -> b const _ b = b
null
https://raw.githubusercontent.com/haskell-suite/haskell-tc/abf5e3cc624e0095cae14c3c1c695b76ea8ffcb9/tests/Naming2.hs
haskell
module Naming2 where fn :: a -> a fn var_a = sub var_a where sub :: a -> a sub another_a = const (const var_a ()) another_a const :: a -> b -> b const _ b = b
3b410c29a980089cb292fb068ae1f5d805d1ce6fd6ae7c86bcc3dc66d5e6a6ae
xxyzz/SICP
Exercise_2_52.rkt
#lang racket/base (require sicp-pict) ; add face to the outline painter ; a: add segments to outline (define outline (lambda (frame) (let ([vect-a (make-vect 0 0)] [vect-b (make-vect 0 1)] [vect-c (make-vect 1 1)] [vect-d (make-vect 1 0)] [vect-e (mak...
null
https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/2_Building_Abstractions_with_Data/2.2_Hierarchical_Data_and_the_Closure_Property/Exercise_2_52.rkt
racket
add face to the outline painter a: add segments to outline b: change the pattern of corner-split
#lang racket/base (require sicp-pict) (define outline (lambda (frame) (let ([vect-a (make-vect 0 0)] [vect-b (make-vect 0 1)] [vect-c (make-vect 1 1)] [vect-d (make-vect 1 0)] [vect-e (make-vect 0.2 0.7)] [vect-f (make-vect 0.4 0.7)] ...
4ec7607bf131619739150382b728eb606c6269a7f878ea26fc9b288fc9277228
Liqwid-Labs/plutus-extra
Main.hs
module Main (main) where import PlutusTx.NatRatio (NatRatio) import PlutusTx.Natural (Natural) import PlutusTx.Numeric.Orphans () import PlutusTx.Positive (Positive) import PlutusTx.Ratio (Rational) import Test.QuickCheck.Plutus.Instances () import Test.Tasty (defaultMain, testGroup) import Test.Tasty.Plutus.Golden (g...
null
https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/09e056a46ee9835d5e770ddd8cd6fa1904a2c2b0/plutus-numeric/test/golden/Main.hs
haskell
module Main (main) where import PlutusTx.NatRatio (NatRatio) import PlutusTx.Natural (Natural) import PlutusTx.Numeric.Orphans () import PlutusTx.Positive (Positive) import PlutusTx.Ratio (Rational) import Test.QuickCheck.Plutus.Instances () import Test.Tasty (defaultMain, testGroup) import Test.Tasty.Plutus.Golden (g...
a9d31d14ba24565999907a52a9ab6675333110b9aeb5de5535554a2e6b10877c
ctford/overtunes
frere_jacques.clj
(ns overtunes.songs.frere-jacques (:use [overtone.live]) (:use [overtunes.core]) (:use [overtunes.instruments.foo])) (def Frère-Jacques [[:C4 :D4 :E4 :C4] [1/1 1/1 1/1 1/1]]) (def Dormez-vous? [[:E4 :F4 :G4 :rest] [1/1 1/1 1/1 1/1]]) (def S...
null
https://raw.githubusercontent.com/ctford/overtunes/44dc2d6482315e1893cf19000cfe3381a2c41da4/src/overtunes/songs/frere_jacques.clj
clojure
(ns overtunes.songs.frere-jacques (:use [overtone.live]) (:use [overtunes.core]) (:use [overtunes.instruments.foo])) (def Frère-Jacques [[:C4 :D4 :E4 :C4] [1/1 1/1 1/1 1/1]]) (def Dormez-vous? [[:E4 :F4 :G4 :rest] [1/1 1/1 1/1 1/1]]) (def S...
610d1c69d639931c0562653ef06a584c47e8c5ade6a0a8da1d39f8d5b4eafcc2
travelping/ergw
ergw_gtp_u_socket.erl
Copyright 2018 Travelping GmbH < > %% 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 2 of the License , or ( at your option ) any later version . -module(ergw_gtp_u_socket)...
null
https://raw.githubusercontent.com/travelping/ergw/1b6cc3ee89eea4cf9df1d7de612744f0a850dfd9/apps/ergw_core/src/ergw_gtp_u_socket.erl
erlang
This program is free software; you can redistribute it and/or API gen_server callbacks ==================================================================== API ==================================================================== =================================================================== call/cast wrapper ...
Copyright 2018 Travelping GmbH < > modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . -module(ergw_gtp_u_socket). -behavior(gen_server). -behavior(ergw_gtp_socket). -compile({...
a08bce1167eaa5671887e2e8d047bfc058028f673fd23733fab5b208a88a3426
darius/cant
nonmeta-primitives.scm
;; Primitive definitions meant for primordial-setting. ;; The ones here are ordinary Scheme procedures or values; the remaining ones added in primordia.scm/player.scm will have to do ;; with player internals. (library (player nonmeta-primitives) (export nonmeta-a-list) (import (chezscheme) (player util) (player ...
null
https://raw.githubusercontent.com/darius/cant/82097f015a842c332e67e9862cc5ca56e1360eb6/player/nonmeta-primitives.scm
scheme
Primitive definitions meant for primordial-setting. The ones here are ordinary Scheme procedures or values; the with player internals. just for self-evaluating? ? Compare primitives XXX raise an error instead? XXX raise an error instead? XXX raise an error instead? Misc primitives iteration number for quadratic...
remaining ones added in primordia.scm/player.scm will have to do (library (player nonmeta-primitives) (export nonmeta-a-list) (import (chezscheme) (player util) (player equality) (player source) (player read) (player setting) (player thing)) (define (char-compare x y) (cond ((char<? x y) '<) ...
302dc99d6effe23c74b6a607417efff89f8db6c347a8191ffcc9946783f75d05
derekmcloughlin/pearls
chap14c.hs
import Data.List maxtail :: Ord a => [a] -> [a] maxtail = foldl op [] op :: Ord a => [a] -> a -> [a] op ys x = maximum [zs ++ [x] | zs <- borders ys] Borders borders :: Eq a => [a] -> [[a]] borders [] = [[]] borders xs = xs : borders (border xs) -- Border after :: Eq a => [a] -> [a] -> [a] aft...
null
https://raw.githubusercontent.com/derekmcloughlin/pearls/42bc6ea0fecc105386a8b75789f563d44e05b772/chap14/chap14c.hs
haskell
Border
import Data.List maxtail :: Ord a => [a] -> [a] maxtail = foldl op [] op :: Ord a => [a] -> a -> [a] op ys x = maximum [zs ++ [x] | zs <- borders ys] Borders borders :: Eq a => [a] -> [[a]] borders [] = [[]] borders xs = xs : borders (border xs) after :: Eq a => [a] -> [a] -> [a] after [] ys = ...
9c4d2044fda57dbd5272ad8aa7cb3bc0ba2099e3e3a155f377feaa42f707a6ea
ocaml-ppx/ocamlformat
unclosed_module.ml
module M = struct let foo = foo let foo =
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/9324ea439a77b4f3a31e9302b97ce1812cf8f17d/vendor/parser-recovery/test/expect/structure/unclosed_module.ml
ocaml
module M = struct let foo = foo let foo =
c1625c593694e9bbddbaedf4a781822f7c3de569f31243b7570ae87801f9f410
xvw/preface
alternative.mli
(** [Alternative] is a kind of {!module:Monoid} on {!module:Applicative}. An [Alternative] is formally an {!module:Applicative} with [neutral] and [combine]. So an [Alternative] is also an {!module:Applicative} (and an {!module:Alt} which is also a {!module:Functor}).*) (** {2 Laws} To have a predicta...
null
https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_specs/alternative.mli
ocaml
* [Alternative] is a kind of {!module:Monoid} on {!module:Applicative}. An [Alternative] is formally an {!module:Applicative} with [neutral] and [combine]. So an [Alternative] is also an {!module:Applicative} (and an {!module:Alt} which is also a {!module:Functor}). * {2 Laws} To have a predictable beh...
* { 1 Minimal definition } module type WITH_NEUTRAL_AND_COMBINE = sig include Alt.WITH_COMBINE * @inline val neutral : 'a t end module type WITH_PURE_MAP_AND_PRODUCT = sig include Applicative.WITH_PURE_MAP_AND_PRODUCT * @inline include WITH_NEUTRAL_AND_COMBINE with type 'a t := 'a t * @inline end module ...
0c640c3ab85938c588443b70a5deab7c42ad7ef8fe251522d55412da1c35cf5e
dmjio/miso
Main.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module Main where import Control.Monad import Data.IORef import qualified Data.Map as M import GHCJS.Types import Miso import Miso.String data Action = GetTime | Init | SetTime !Double wit...
null
https://raw.githubusercontent.com/dmjio/miso/0be227bca6e0aec16a69a1c09f9a90624af070c1/examples/three/Main.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards # module Main where import Control.Monad import Data.IORef import qualified Data.Map as M import GHCJS.Types import Miso import Miso.String data Action = GetTime | Init | SetTime !Double withStats :: JSVal -> IO () -> IO () w...
ad70e1b3598c5498465bf16896d561df2d4ba644c21fe083fad72fd606f3baf3
msakai/cpl
AExp.hs
----------------------------------------------------------------------------- -- | Module : AExp Copyright : ( c ) 2004,2009 -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -- Annotated Expression. -- -------------------------------------...
null
https://raw.githubusercontent.com/msakai/cpl/a83ad4479cb95f98010b4f63a06b1e0b2bfd5736/src/AExp.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style Maintainer : Stability : provisional Portability : portable Annotated Expression. --------------------------------------------------------------------------- ------------------------------------------...
Module : AExp Copyright : ( c ) 2004,2009 module AExp ( AExp(..) , aexpType , isElement , TypeScheme , AExpScheme , quantify , skelton ) where import Variance import Funct import qualified FE import qualified CDT import Type (GenType(..), Type) import Subst import qualified Exp as...
dbfb34ebaa776ae4b6bc45002239bb15b0b923297a94e98bb353d35f3625e595
pirapira/coq2rust
aux_file.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2013 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/lib/aux_file.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2013 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * type aux_file val load_aux_f...
5b601e7ed62dc16d74cc6cfd07fbd0bc580b8201949fb696327a51bf79affdd7
zadean/xqerl
map_entry_SUITE.erl
-module('map_entry_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['map-entry-001-hof'/1]). -export(['map-entry-001'/1]). -export(['map-entry-002'/1]). ...
null
https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/map/map_entry_SUITE.erl
erlang
-module('map_entry_SUITE'). -include_lib("common_test/include/ct.hrl"). -export([ all/0, groups/0, suite/0 ]). -export([ init_per_suite/1, init_per_group/2, end_per_group/2, end_per_suite/1 ]). -export(['map-entry-001-hof'/1]). -export(['map-entry-001'/1]). -export(['map-entry-002'/1]). ...
7d3fd39342e20616a45b4fadac64a007e34af9b25d29058672289578c08cb6dd
mekispeter/haskell2019spring
haskell_feb11.hs
Functional Programming for Logicians , 2019 February 11 These are the functions defined in the first session . You can call them from the ghci prompt , after loading this file , e.g. > : l haskell_feb11.hs [ long echo ] > greeting_p " " " Hello , Haskell ! " > large 99 False > Functional Programm...
null
https://raw.githubusercontent.com/mekispeter/haskell2019spring/18fa81092cdc7a15c8ef92a2eff8274dfe79d00d/src/haskell_feb11.hs
haskell
This is not a function, since it has no arguments. This is a function that takes a string, and returns a message that includes the string. This function is a unary predicate; it takes a number, and tells whether the same as the "larger than" relation for the Int type.
Functional Programming for Logicians , 2019 February 11 These are the functions defined in the first session . You can call them from the ghci prompt , after loading this file , e.g. > : l haskell_feb11.hs [ long echo ] > greeting_p " " " Hello , Haskell ! " > large 99 False > Functional Programm...
f88ef4c7ce715bd931d19c02ae33c94619530b582710e033a440213a77a01cd6
xmonad/xmonad-contrib
EZConfig.hs
# LANGUAGE CPP # # LANGUAGE TupleSections # -------------------------------------------------------------------- -- | Module : XMonad . Util . EZConfig Description : Configure key bindings easily in Emacs style . Copyright : < > < > ( key parsing ) -- License : BSD3-styl...
null
https://raw.githubusercontent.com/xmonad/xmonad-contrib/29f0e03256e5ceaccd0bb15ee7b5b3747a544763/XMonad/Util/EZConfig.hs
haskell
------------------------------------------------------------------ | License : BSD3-style (see LICENSE) Useful helper functions for amending the default configuration, and for parsing keybindings specified in a special (emacs-like) format. (See also "XMonad.Util.CustomKeys" in xmonad-contrib.) -----------...
# LANGUAGE CPP # # LANGUAGE TupleSections # Module : XMonad . Util . EZConfig Description : Configure key bindings easily in Emacs style . Copyright : < > < > ( key parsing ) Maintainer : < > module XMonad.Util.EZConfig ( additionalKey...
cd6a00ce17788ced57fba046bd55605a923d8b2f2ae5823f0809e09633799a85
lemmaandrew/CodingBatHaskell
has23.hs
From Given an int array length 2 , return true if it contains a 2 or a 3 . Given an int array length 2, return true if it contains a 2 or a 3. -} import Test.Hspec ( hspec, describe, it, shouldBe ) has23 :: [Int] -> Bool has23 nums = undefined main :: IO () main = hspec $ describe "Tests:" $ do it "True"...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Array-1/has23.hs
haskell
From Given an int array length 2 , return true if it contains a 2 or a 3 . Given an int array length 2, return true if it contains a 2 or a 3. -} import Test.Hspec ( hspec, describe, it, shouldBe ) has23 :: [Int] -> Bool has23 nums = undefined main :: IO () main = hspec $ describe "Tests:" $ do it "True"...
5290002fd4252dac2011de2578de23dcfd8a4273155d81a71e6882b63c43127d
frankiesardo/minikusari
tutorial2.cljs
(ns minikusari.tutorial2 (:require [minikusari.core :refer [r]] [devcards.core] [datascript.core :as d]) (:require-macros [devcards.core :as dc :refer [defcard-doc deftest]] [cljs.test :refer [testing is]])) (defcard-doc "# Forward Chaining Inference for the modern detective" "> Key concep...
null
https://raw.githubusercontent.com/frankiesardo/minikusari/a0e8033fbe2f33a7d25bd20ff5295f2f286998a1/devcards/src/minikusari/tutorial2.cljs
clojure
An enemy is hostile A missile is a weapon If someone sold it and someone bought it, there should be an invoice somewhere, right?
(ns minikusari.tutorial2 (:require [minikusari.core :refer [r]] [devcards.core] [datascript.core :as d]) (:require-macros [devcards.core :as dc :refer [defcard-doc deftest]] [cljs.test :refer [testing is]])) (defcard-doc "# Forward Chaining Inference for the modern detective" "> Key concep...
61447573775919a47de9ed46ddbefc17c19b87a50ddf92748e29b78d0cb93e8b
haskell/haskell-language-server
Rename.hs
# LANGUAGE CPP # {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedLabels #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # ...
null
https://raw.githubusercontent.com/haskell/haskell-language-server/472947cdb9e711f6ef889bba3b83b0dd44a1b6bc/plugins/hls-rename-plugin/src/Ide/Plugin/Rename.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedLabels # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE RecordWildCards # Perform rename | Limit renaming across modules. ------------------------------------------------------------------------...
# LANGUAGE CPP # # LANGUAGE GADTs # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Ide.Plugin.Rename (descriptor, E.Log) where #if MIN_VERSION_ghc(9,2,1) import GHC.Parser.Annotation (AnnContext, Ann...
98f7af13204884c06925caaf852b5305576b757ef38783f515f98884fcf8d520
isavita/category-theory-for-programmers-with-erlang
ch1_tests.erl
-module(ch1_tests). -include_lib("eunit/include/eunit.hrl"). %% Identity function tests id_test() -> ?assertEqual(42, ch1:id(42)), ?assertEqual("the answer", ch1:id(ch1:id("the answer"))). %% Composition function tests comp_test() -> Add2 = fun(X) -> X + 2 end, Double = fun(X) -> X * X end, ?assertEqual(Dou...
null
https://raw.githubusercontent.com/isavita/category-theory-for-programmers-with-erlang/4ffa11dd9ffc77e6a909ccf36e19bdfd5af117ce/ch1_tests.erl
erlang
Identity function tests Composition function tests Identity function is composible tests
-module(ch1_tests). -include_lib("eunit/include/eunit.hrl"). id_test() -> ?assertEqual(42, ch1:id(42)), ?assertEqual("the answer", ch1:id(ch1:id("the answer"))). comp_test() -> Add2 = fun(X) -> X + 2 end, Double = fun(X) -> X * X end, ?assertEqual(Double(Add2(4)), (ch1:comp(Double, Add2))(4)), ?assertEqua...
b151d02e6ca1d8ad0f986ebaf7a4982505dc0f8360ecd7ce50240d7e89f13191
SNePS/SNePS2
findhelp.lisp
-*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*- Copyright ( C ) 1984 - -2013 Research Foundation of ;; State University of New York Version : $ I d : findhelp.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $ ;; This file is part of SNePS. $ BEGIN LICENSE$ ...
null
https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/sneps/fns/findhelp.lisp
lisp
Syntax : Common - Lisp ; Package : SNEPS ; Base : 10 -*- State University of New York This file is part of SNePS. you may not use this file except in compliance with the License. You may obtain a copy of the License at . edu/sneps/Downloads/ubpl.pdf. or implied. See the License for t...
Copyright ( C ) 1984 - -2013 Research Foundation of Version : $ I d : findhelp.lisp , v 1.2 2013/08/28 19:07:25 shapiro Exp $ $ BEGIN LICENSE$ The contents of this file are subject to the University at Software distributed under the License is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY...
d775b9796c701a7089df8458bc23c4a4f786fc7ae965d218bc52ad7c92668a24
huangz1990/SICP-answers
5-cons.scm
5-cons.scm (define (cons x y) (* (expt 2 x) (expt 3 y)))
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp2/code/5-cons.scm
scheme
5-cons.scm (define (cons x y) (* (expt 2 x) (expt 3 y)))
e20a0d948f69b56e5aa8321e9483b727066e092ff87092c523d1fe20ea94e1c0
DSiSc/why3
encoding.mli
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/transform/encoding.mli
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception val ft_select_kept : (Env.env,Ty.Sty.t) Trans.flag_trans val ft_enco_kept : (Env.env,Task.task) Trans.f...
53d20520231ea1d77c6515fc5b6aab936afba42a00e1fe68c4be0dff1ec2dae5
bradrn/Conkey
Print.hs
# LANGUAGE DeriveFunctor # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module XCompose.Print (XComposePrintMode(..), renderXCompose) where import Data.Functor ((<&>)) import Data.Text (Text) import qualified Data.Text as T import XCompose.Keyboard data XComposePrintMode = WithModifiers | WithMultiKe...
null
https://raw.githubusercontent.com/bradrn/Conkey/9b2cbea10f3d82c36c786eb336e2954189f83a7b/ms2mim/src/XCompose/Print.hs
haskell
# LANGUAGE OverloadedStrings # This makes the assumption that the input contains no characters needing to be escaped, which will usually be the case. It assumes this mostly because I can't get the escape characters to work on my system...
# LANGUAGE DeriveFunctor # # LANGUAGE LambdaCase # module XCompose.Print (XComposePrintMode(..), renderXCompose) where import Data.Functor ((<&>)) import Data.Text (Text) import qualified Data.Text as T import XCompose.Keyboard data XComposePrintMode = WithModifiers | WithMultiKey deriving (Show) data Comment...
21a58ae3031aad000561d10ce9bd68e82bfe065174deffb5ad816a4e6b61ed6f
LuxLang/lux
packager.clj
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns leiningen.lux.packager (:require [clojure.string :as string] [leiningen.core.classpath :as classpath] [leiningen.ub...
null
https://raw.githubusercontent.com/LuxLang/lux/91bc060bc498a0d2418198cfcb9dc39636d1d867/lux-lein/src/leiningen/lux/packager.clj
clojure
[Utils] [Resources] tools.nrepl-0.2.12.jar and clojure-complete-0.2.4.jar
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns leiningen.lux.packager (:require [clojure.string :as string] [leiningen.core.classpath :as classpath] [leiningen.ub...
969baaab6c8dfb7bf9525a4953c00ece26f552e23626c221c230c6e13fb3fbfd
cram2/cram
setf-row.lisp
Regression test SETF - ROW for GSLL , automatically generated ;; Copyright 2009 , 2010 , 2011 Distributed under the terms of the GNU General Public License ;; ;; 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 Fre...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/setf-row.lisp
lisp
This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Publi...
Regression test SETF - ROW for GSLL , automatically generated Copyright 2009 , 2010 , 2011 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have...
e3bd59fff85ce39bdb2a30c629224335862321442bad3a3c168de36dd77b930f
imdea-software/leap
tag.mli
(***********************************************************************) (* *) LEAP (* *) , IMDEA ...
null
https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/tag.mli
ocaml
********************************************************************* ...
LEAP , IMDEA Software Institute Copyright 2011 IMDEA Software Institute Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compl...
719a860b93a0951baf39600b90d955760ba38cb5e59f37b20ba38f2212cc84fa
Cantido/horizons
pool.clj
(ns horizons.telnet.pool "Pools connections to the HORIZONS Telnet server." (:require [horizons.telnet.connect :as connect] [clojure.tools.logging :as log] [com.stuartsierra.component :as component])) (defn ^:private valid-pool? [pool-component pool] (and (set? pool) (every? (pa...
null
https://raw.githubusercontent.com/Cantido/horizons/989e0964d5eebb82c3968049ffd05649625bc25d/src/horizons/telnet/pool.clj
clojure
We cannot create a new connection inside of a transaction, because creating a new connection triggers IO. Thus the double-checked locking. This exits the current transaction We should do assertions inside the transaction, otherwise we'd have a race condition.
(ns horizons.telnet.pool "Pools connections to the HORIZONS Telnet server." (:require [horizons.telnet.connect :as connect] [clojure.tools.logging :as log] [com.stuartsierra.component :as component])) (defn ^:private valid-pool? [pool-component pool] (and (set? pool) (every? (pa...
751a200a3891899b4ca5cf02c5485a8885785c77686aeda61779512e4aa1f068
pouriya/director
director_table_map.erl
%%% ------------------------------------------------------------------------------------------------ Director is available for use under the following license , commonly known as the 3 - clause ( or %%% "modified") BSD license: %%% Copyright ( c ) 2018 - 2019 , %%% () %%% All rights reserved. %%% %%% Redistributi...
null
https://raw.githubusercontent.com/pouriya/director/919c30db18c83330290fba9e68de330000978674/src/director_table_map.erl
erlang
------------------------------------------------------------------------------------------------ "modified") BSD license: () All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: conditions and the...
Director is available for use under the following license , commonly known as the 3 - clause ( or Copyright ( c ) 2018 - 2019 , 1 . Redistributions of source code must retain the above copyright notice , this list of 2 . Redistributions in binary form must reproduce the above copyright notice , this list of ...