_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
83defdcf9de74e084ff7e643d106911162dbf3815f629bd9b079e7da88956cb3
NorfairKing/smos
TimeBlockSpec.hs
# LANGUAGE TypeApplications # module Smos.Report.TimeBlockSpec where import Smos.Report.TimeBlock import Smos.Report.TimeBlock.Gen () import Test.Syd import Test.Syd.Validity import Test.Syd.Validity.Aeson spec :: Spec spec = do genValidSpec @(Block Int Int) jsonSpec @(Block Int Int) genValidSpec @TimeBlock ...
null
https://raw.githubusercontent.com/NorfairKing/smos/489f5b510c9a30a3c79fef0a0d1a796464705923/smos-report-gen/test/Smos/Report/TimeBlockSpec.hs
haskell
# LANGUAGE TypeApplications # module Smos.Report.TimeBlockSpec where import Smos.Report.TimeBlock import Smos.Report.TimeBlock.Gen () import Test.Syd import Test.Syd.Validity import Test.Syd.Validity.Aeson spec :: Spec spec = do genValidSpec @(Block Int Int) jsonSpec @(Block Int Int) genValidSpec @TimeBlock ...
aad1150030ef5576b0403b34c49aa426b9c682b7e749c6c2f955c570f726fbf1
pbv/codex
AceEditor.hs
-------------------------------------------------------------------------------- -- | Heist splice for Ace Editor -------------------------------------------------------------------------------- {-# LANGUAGE OverloadedStrings #-} module Codex.AceEditor ( textEditorSplice , languageSplices , langua...
null
https://raw.githubusercontent.com/pbv/codex/1a5a81965b12f834b436e2165c07120360aded99/src/Codex/AceEditor.hs
haskell
------------------------------------------------------------------------------ | Heist splice for Ace Editor ------------------------------------------------------------------------------ # LANGUAGE OverloadedStrings # make a single XHTML node | Splice for an Ace text editor form input | splice pulldown selector fo...
module Codex.AceEditor ( textEditorSplice , languageSplices , languageExtensions ) where import qualified Data.Text as T import Data.Map.Syntax import Heist import Heist.Interpreted import qualified Text.XmlHtml as X import Text...
762e3a4615d373eb97380c0e5694809f4e97645350ef9aa479fdbe2b1bf18150
esb-lwb/lwb
jabeh.clj
lwb Logic WorkBench -- Propositional Logic SAT ; Examples: jabeh Copyright ( c ) 2016 , , THM . All rights reserved . ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) . ; By using this software in any fashion, you are agreeing to be bound by ; the ...
null
https://raw.githubusercontent.com/esb-lwb/lwb/bba51ada7f7316341733d37b0dc4848c4891ef3a/src/lwb/prop/examples/jabeh.clj
clojure
Examples: jabeh The use and distribution terms for this software are covered by the By using this software in any fashion, you are agreeing to be bound by the terms of this license. The puzzle is given by a map with the keys :col-holes, :row-holes and :field e.g. :col-holes is a vector of the number of holes in...
lwb Logic WorkBench -- Propositional Logic SAT Copyright ( c ) 2016 , , THM . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) . (ns lwb.prop.examples.jabeh (:require [lwb.prop :refer :all]) (:require [lwb.prop.cardinality :refer (min-kof kof)]) (:require [lwb.prop.sat :refer (sat)]) (:...
f866e8b5a13d41d107dcb2ea785083d979c3716fa72d6ae98172731b44051be8
roman/Haskell-Reactive-Extensions
DistinctTest.hs
module Rx.Observable.DistinctTest where import qualified Rx.Observable as Rx import Test.HUnit import Test.Hspec tests :: Spec tests = do describe "Rx.Observable.distinct" $ it "doesn't emit an item more than once" $ do let source = Rx.distinct $ Rx.fromList Rx.newThread (concat...
null
https://raw.githubusercontent.com/roman/Haskell-Reactive-Extensions/0faddbb671be7f169eeadbe6163e8d0b2be229fb/rx-core/test/Rx/Observable/DistinctTest.hs
haskell
module Rx.Observable.DistinctTest where import qualified Rx.Observable as Rx import Test.HUnit import Test.Hspec tests :: Spec tests = do describe "Rx.Observable.distinct" $ it "doesn't emit an item more than once" $ do let source = Rx.distinct $ Rx.fromList Rx.newThread (concat...
dc523594163267348103f83723524d30b3d0c44c5febe0807ecaf1644c435dd0
alakahakai/hackerrank
maxmin.hs
-children Author : < > Date : June 10th , 2015 Max Min -children Author: Ray Qiu <> Date: June 10th, 2015 -} {-# OPTIONS -O2 #-} import Control.Applicative (liftA) import Control.Monad (forM) import Data.List (sort) import System....
null
https://raw.githubusercontent.com/alakahakai/hackerrank/465d17107bbe402daf750651bb57cf092305acf9/fp/maxmin.hs
haskell
# OPTIONS -O2 # n <- readLn :: IO Int k <- readLn :: IO Int readLn :: IO Int
-children Author : < > Date : June 10th , 2015 Max Min -children Author: Ray Qiu <> Date: June 10th, 2015 -} import Control.Applicative (liftA) import Control.Monad (forM) import Data.List (sort) import System.IO main :: IO () ma...
507f4ca726f8728f474ff6cc8e7b7246c7ffea96fdf62073049571dd0db8b043
OCamlPro/ocp-build
ocpArray.ml
(**************************************************************************) (* *) (* Typerex Libraries *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-lang/ocpArray.ml
ocaml
************************************************************************ Typerex Libraries ...
Copyright 2011 - 2017 OCamlPro SAS the GNU Lesser General Public License version 2.1 , with the let rev t = let len = Array.length t in let last = len-1 in for i = 0 to len/2 - 1 do let x = t.(i) in t.(i) <- t.(last-i); t.(last-i) <- x; done l...
62a2b2efaf4d47cfcb047995a4a1cfa431bdf28926487dd87021e04aa4e740ff
mjrusso/joy-of-clojure-examples
ch6.clj
(ns joc.ch6) ; immutability: all of the possible properties of immutable objects ; are defined at the time of their construction and can't be changed ; thereafter (def baselist (list :barnabas :adam)) (def lst1 (cons :willie baselist)) (def lst2 (cons :phoenix baselist)) lst1 lst2 (= (next lst1) (next lst2)) {:val...
null
https://raw.githubusercontent.com/mjrusso/joy-of-clojure-examples/d59fddbb416ff613af63d540d3f1076de0c79bc0/src/joc/ch6.clj
clojure
immutability: all of the possible properties of immutable objects are defined at the time of their construction and can't be changed thereafter rec-step will blow the stack on large sets -- with a lazy seq, we can apply laziness to our functions, and sidestep this issues. steps: sequence producing expression(s) ...
(ns joc.ch6) (def baselist (list :barnabas :adam)) (def lst1 (cons :willie baselist)) (def lst2 (cons :phoenix baselist)) lst1 lst2 (= (next lst1) (next lst2)) {:val 5, :L nil, :R nil} (defn xconj [t v] (cond (nil? t) {:val v, :L nil, :R nil})) (xconj nil 5) (defn xconj [t v] (cond (nil? t) {:va...
508821092c49de71bca14705e545a56d20f90e6978911f149aaf87a114dc6451
NetComposer/nksip
t13_auth.erl
%% ------------------------------------------------------------------- %% %% auth_test: Authentication Tests %% Copyright ( c ) 2013 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the Licen...
null
https://raw.githubusercontent.com/NetComposer/nksip/7fbcc66806635dc8ecc5d11c30322e4d1df36f0a/test/tests/t13_auth.erl
erlang
------------------------------------------------------------------- auth_test: Authentication Tests Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the spe...
Copyright ( c ) 2013 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(t13_auth). -include...
72ce69c508d5c1568c84927275bdbb0c0eaa76fef093033eeb1c04af78493f0c
Eduap-com/WordMat
mdu.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/odepack/src/mdu.lisp
lisp
Compiled by f2cl version: Using Lisp CMU Common Lisp snapshot-2013-11 (20E Unicode) 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 single-float))
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl6.l , v 1d5cbacbb9...
d60228f6ba740086bf23c0bf17f410eb3fb2a0e89a9a5f24796a0a2424f41e2f
EFanZh/EOPL-Exercises
exercise-5.19-test.rkt
#lang racket/base (require rackunit) (require "../solutions/exercise-5.19.rkt") (check-equal? (run "2") (num-val 2)) (check-equal? (run "-(3, 3)") (num-val 0)) (check-equal? (run "-(3, 4)") (num-val -1)) (check-equal? (run "-(4, 3)") (num-val 1)) (check-equal? (run "zero?(0)") (bool-val #t)) (check-equal? (run "zero?...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-5.19-test.rkt
racket
#lang racket/base (require rackunit) (require "../solutions/exercise-5.19.rkt") (check-equal? (run "2") (num-val 2)) (check-equal? (run "-(3, 3)") (num-val 0)) (check-equal? (run "-(3, 4)") (num-val -1)) (check-equal? (run "-(4, 3)") (num-val 1)) (check-equal? (run "zero?(0)") (bool-val #t)) (check-equal? (run "zero?...
666c8465fbe32ea698ac5cb30839d2bb9c1a776584bdeffe3989546d470e3d32
fpottier/mpri-2.4-projet-2022-2023
ansi.ml
(**************************************************************************) (* *) (* OCaml *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/fpottier/mpri-2.4-projet-2022-2023/1ce08cadfb3a8ec8bc72609bc82873b29d2ce241/vendor/ansi/ansi.ml
ocaml
************************************************************************ OCaml en Automatique. ...
Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the use ANSI color codes , see type color = | Black | Red | Green | Yellow | Blue | Magenta | Cyan | White type style = | Bold | Reset let () = i...
a3e7eb4148a63ef4df038022a97d7a080dabf4b8b179bbed39637ae4b25d65e5
vernemq/vernemq
vmq_mqtt5_demo_plugin_SUITE.erl
-module(vmq_mqtt5_demo_plugin_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("common_test/include/ct.hrl"). -include_lib("vmq_commons/include/vmq_types.hrl"). init_per_suite(Config) -> vmq_test_utils:setup(), vmq_server_cmd:listener_start(1888, [{allowed_protocol_versions, "5"}]), ...
null
https://raw.githubusercontent.com/vernemq/vernemq/eb1a262035af47e90d9edf07f36c1b1503557c1f/apps/vmq_server/test/vmq_mqtt5_demo_plugin_SUITE.erl
erlang
re-do the auth... because it's allowed: let's try to authentication with 'bad' data
-module(vmq_mqtt5_demo_plugin_SUITE). -compile(export_all). -compile(nowarn_export_all). -include_lib("common_test/include/ct.hrl"). -include_lib("vmq_commons/include/vmq_types.hrl"). init_per_suite(Config) -> vmq_test_utils:setup(), vmq_server_cmd:listener_start(1888, [{allowed_protocol_versions, "5"}]), ...
42fa8ea2b1cdf1dbbabd1600a2f9caa9617a5c3f61f24a9ff38859745a57e966
cornell-netlab/p4check
util.mli
Copyright 2019 - present Cornell University * * Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not * use this file except in compliance with the License . You may obtain a copy * of the License at * * -2.0 * * Unless required by applicable law or agreed to in ...
null
https://raw.githubusercontent.com/cornell-netlab/p4check/61438e23f2c742504c4ceca6858230990db34f2a/lib/util.mli
ocaml
Copyright 2019 - present Cornell University * * Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not * use this file except in compliance with the License . You may obtain a copy * of the License at * * -2.0 * * Unless required by applicable law or agreed to in ...
cdd42bc3eda7ba119fca93ed253fe42d135eb786cf88ca83d300a8991dfc10b3
inzva/DOH
Domain.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # module Network.DigitalOcean.Services.Domain where ----------------------------------------------------------------- import Data.Aeson import Data.Aeson.Casing import Data.Time.Clock import GHC.Gene...
null
https://raw.githubusercontent.com/inzva/DOH/2b25572e1bc33a7a79f5d7df739b269e83bb32fb/src/Network/DigitalOcean/Services/Domain.hs
haskell
# LANGUAGE OverloadedStrings # --------------------------------------------------------------- --------------------------------------------------------------- ---------------------------------------------------------------
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # module Network.DigitalOcean.Services.Domain where import Data.Aeson import Data.Aeson.Casing import Data.Time.Clock import GHC.Generics import Network.DigitalOcean.Types import Network.DigitalOcean.Utils.Pagination imp...
3b8df9b99d548d74beb19bc019148f6396df4d3867e9050726188fc59ec4c454
sbcl/sbcl
pred.lisp
;;;; predicate VOPs for the ARM VM This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the public domain and is...
null
https://raw.githubusercontent.com/sbcl/sbcl/0168999bcebad49f479193cddd49fbe1aafc8594/src/compiler/arm/pred.lisp
lisp
predicate VOPs for the ARM VM more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. The unconditional branch, emitted when we can't drop through to the desired destination. Dest is the continuat...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB-VM") The Branch VOP . (define-vop (branch) (:info dest) (:generator 5 (inst b dest))) Gene...
ea98c4179edd852497d02445b3c720268518ca27692fc06ce3df845bf3e1c328
mwand/5010-examples
02-4-ball-after-mouse.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 02-4-ball-after-mouse) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repea...
null
https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/02-4-ball-after-mouse.rkt
racket
about the language level of this file in a form that our tools can easily process. Use of a template on partition data, followed by using of template functions, depending on the value of the partition data. DATA DEFINITIONS x and y are the coordinates of the center of the ball, in pixels, relative to the origi...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname 02-4-ball-after-mouse) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) on another value . The data is handed off to one ...
73d65db9063f5f204d69a9ef645f625eb77cc78c2fc1ca7c6755a68408061107
acid-state/acid-state
Common.hs
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving , GADTs # ----------------------------------------------------------------------------- -- | -- Module : Data.Acid.Common Copyright : PublicDomain -- -- Maintainer : Portability : non - portable ( uses GHC extensions ) -- -- Common structures us...
null
https://raw.githubusercontent.com/acid-state/acid-state/60b75c5cb75fdd760c3f2a2c3f0394a620cf2e8c/src/Data/Acid/Common.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Acid.Common Maintainer : Common structures used by the various backends (local, memory). ^ List of events capable of updating or querying the state. | Context monad for Update events. simple enough. | Context...
# LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving , GADTs # Copyright : PublicDomain Portability : non - portable ( uses GHC extensions ) module Data.Acid.Common where import Data.Acid.Core import Control.Monad import Control.Monad.State (MonadState, get, State) import Control.Monad.Reader (MonadRe...
98c0d3c903c686493539336a10cc158e12b8510151c41959cedd59a90ba76d14
plumatic/fnhouse
core_test.clj
(ns guesthouse.core-test (:use plumbing.core clojure.test guesthouse.core) (:require [schema.core :as s] [clj-http.client :as client] [cheshire.core :as cheshire] [guesthouse.schemas :as schemas])) (def +port+ "A random port on which to host the service" 6054) (def +base-url+ (format ":%s/guestb...
null
https://raw.githubusercontent.com/plumatic/fnhouse/e27ec5649a91470b63285ef9e28c6a77494f7ffd/examples/guesthouse/test/guesthouse/core_test.clj
clojure
update it back
(ns guesthouse.core-test (:use plumbing.core clojure.test guesthouse.core) (:require [schema.core :as s] [clj-http.client :as client] [cheshire.core :as cheshire] [guesthouse.schemas :as schemas])) (def +port+ "A random port on which to host the service" 6054) (def +base-url+ (format ":%s/guestb...
b1d609a3deb354ee0d8ca529dd307553cc698c6a555a321cb2e36392bbb87094
rd--/hsc3
offsetOut.help.hs
-- offsetOut let a = offsetOut 0 (impulse ar 5 0) b = out 0 (sinOsc ar 60 0 * 0.1) in mrg2 a b offsetOut ; c.f . out let a = out 0 (impulse ar 5 0) b = out 0 (sinOsc ar 60 0 * 0.1) in mrg [a,b]
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/offsetOut.help.hs
haskell
offsetOut
let a = offsetOut 0 (impulse ar 5 0) b = out 0 (sinOsc ar 60 0 * 0.1) in mrg2 a b offsetOut ; c.f . out let a = out 0 (impulse ar 5 0) b = out 0 (sinOsc ar 60 0 * 0.1) in mrg [a,b]
d1a5506db619e8846f33de7bce62a6f70de42501f8928c065965a1078117f658
twashing/edgaru
readdata.clj
(ns edgaru.eight (:require [clojure.java.io :as io] [clojure.edn :as edn])) ;; 0. with-open explanation 1 . read one file ;; slurp (def one-file (slurp "data/08-15-2015-04:55:56-ticks.edn")) (def one-edn (edn/read-string one-file)) ;; [ok] problem with the written data -> string within a string [...
null
https://raw.githubusercontent.com/twashing/edgaru/7a6bb30eee5fa2dfdf3baabe8b25e9bcc5019181/src/edgaru/eight/readdata.clj
clojure
0. with-open explanation slurp [ok] problem with the written data -> string within a string -> discuss engineering tradeoffs file-seq slurp takes a file name or a file object we've now demonstrated roundtripping of our data regular expressions nil filter on the type of file basic lookup -> use of `comp` f...
(ns edgaru.eight (:require [clojure.java.io :as io] [clojure.edn :as edn])) 1 . read one file (def one-file (slurp "data/08-15-2015-04:55:56-ticks.edn")) (def one-edn (edn/read-string one-file)) [ ok ] problems reading in JodaTime dates - > 2 options change your Clojure reader to use JodaTime...
52b68c098fbc5ff9a4204495f442e31c670a4cd5ca7e714c614bb274cc71fa3e
rroohhh/guix_system
linux.scm
(define-module (config linux) #:use-module (vup linux) #:use-module (ice-9 match) #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix download) #:use-module (guix gexp) #:use-module (gnu packages cpio)) (define (config->string options) (string-join (map (match-lambda ...
null
https://raw.githubusercontent.com/rroohhh/guix_system/3ed37fdca8ad782e431b2b7a94caae336d188187/config/linux.scm
scheme
Needed for probes kheaders module also helpful for tracing optional, for tc filters optional, for tc actions ("CONFIG_HAVE_BPF_JIT" . y) configs module
(define-module (config linux) #:use-module (vup linux) #:use-module (ice-9 match) #:use-module (guix packages) #:use-module (guix utils) #:use-module (guix download) #:use-module (guix gexp) #:use-module (gnu packages cpio)) (define (config->string options) (string-join (map (match-lambda ...
cd746f297e89fc16a837e2de17c96a8d99f4d85fc4534e3565db728f5ceabd3d
hakaru-dev/hakaru
IClasses.hs
TODO : move this file somewhere else , like " Language . Hakaru . IClasses " # LANGUAGE CPP , PolyKinds , DataKinds , TypeOperators , GADTs , TypeFamilies , Rank2Types , ScopedTypeVariables , ConstraintKinds ...
null
https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Language/Hakaru/Syntax/IClasses.hs
haskell
# OPTIONS_GHC -Wall -fwarn-tabs # -------------------------------------------------------------- 2016.04.28 | Module : Language.Hakaru.Syntax.IClasses License : BSD3 Maintainer : Stability : experimental A collection of classes generalizing sta...
TODO : move this file somewhere else , like " Language . Hakaru . IClasses " # LANGUAGE CPP , PolyKinds , DataKinds , TypeOperators , GADTs , TypeFamilies , Rank2Types , ScopedTypeVariables , ConstraintKinds ...
fe12ece8c8f2efc083158886e0064a09cffeb1ca18bd00bbb90e816a58ec62fc
hypernumbers/hypernumbers
wp_logged_out_form_test_SUITE.erl
%%%----------------------------------------------------------------------------- %%% File : webpage_test_suite.erl Author : < > %%% Description : tests security for a webpage view %%% Created : 30 August 2010 by %%%----------------------------------------------------------------------------- ...
null
https://raw.githubusercontent.com/hypernumbers/hypernumbers/281319f60c0ac60fb009ee6d1e4826f4f2d51c4e/tests/security_test/wp_logged_out_form_test_SUITE.erl
erlang
----------------------------------------------------------------------------- File : webpage_test_suite.erl Description : tests security for a webpage view ----------------------------------------------------------------------------- Note: This directive should only be used in test suites. callbacks tests ...
Author : < > Created : 30 August 2010 by -module(wp_logged_out_form_test_SUITE). -compile(export_all). -include("test_server.hrl"). -define(SITE, ":9000"). -define(test(Name, Path, Input, Expected), Name(_Config) -> URL = ?SITE++Path, Got = test:post_logged...
1863722d37e3e0d5796ba51fdec3c3f0b965c30372a8d63edef5152b1baba257
jberryman/unagi-bloomfilter
Main.hs
module Main(main) where import qualified Control.Concurrent.BloomFilter as Bloom main = do b_5_20 <- Bloom.new (Bloom.SipKey 1 1) 5 20 p <- Bloom.lookup b_5_20 (1::Int) print p
null
https://raw.githubusercontent.com/jberryman/unagi-bloomfilter/45a526d8ca4ab39fc0cd0166b10b6d0d08db7866/core-example/Main.hs
haskell
module Main(main) where import qualified Control.Concurrent.BloomFilter as Bloom main = do b_5_20 <- Bloom.new (Bloom.SipKey 1 1) 5 20 p <- Bloom.lookup b_5_20 (1::Int) print p
b9792a2fcaa7cb1f6f171fa270f182bc22b515d460a3ac4100fa2ad3dee3970a
scrintal/heroicons-reagent
clock.cljs
(ns com.scrintal.heroicons.mini.clock) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M10 18a8 8 0 100-16 8 8 0 000 16zm.75-13a.75.75 0 00-1.5 0v5c0 .414.336.75.75.75h4a.7...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/clock.cljs
clojure
(ns com.scrintal.heroicons.mini.clock) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M10 18a8 8 0 100-16 8 8 0 000 16zm.75-13a.75.75 0 00-1.5 0v5c0 .414.336.75.75.75h4a.7...
5f595719d477ec2221046613c664a6b8fc27187bc59134bb6d2b6825e4867e6d
WorksHub/client
side_card_mobile.cljc
(ns wh.styles.side-card-mobile) (def card "side_card_mobile__card--ovTDb") (def card__content "side_card_mobile__card__content--35OeO") (def connected-entity "side_card_mobile__connected-entity--2DQg_") (def connected-entity__title "side_card_mobile__connected-entity__title--1KVjL") (def connected-entity__avatar "side_...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/common/src/wh/styles/side_card_mobile.cljc
clojure
(ns wh.styles.side-card-mobile) (def card "side_card_mobile__card--ovTDb") (def card__content "side_card_mobile__card__content--35OeO") (def connected-entity "side_card_mobile__connected-entity--2DQg_") (def connected-entity__title "side_card_mobile__connected-entity__title--1KVjL") (def connected-entity__avatar "side_...
65925e16b683ea9b53c33252cafb0522fd39e927e667b2238c72c078810877a4
clojure-interop/google-cloud-clients
core.clj
(ns com.google.cloud.tasks.v2.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.tasks.v2.CloudTasksClient$ListQueuesFixedSizeCollection]) (require '[com.google.cloud.tasks.v2.CloudTasksClient$ListQueuesPage]) (require '[com.google.cloud.tasks.v2.CloudTasksClient$ListQueu...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.tasks/src/com/google/cloud/tasks/v2/core.clj
clojure
(ns com.google.cloud.tasks.v2.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.tasks.v2.CloudTasksClient$ListQueuesFixedSizeCollection]) (require '[com.google.cloud.tasks.v2.CloudTasksClient$ListQueuesPage]) (require '[com.google.cloud.tasks.v2.CloudTasksClient$ListQueu...
f07030e2b5758977dea104ca3a4247889c03232b85863e7735e9f54c19aeab05
janestreet/learn-ocaml-workshop
problem.mli
open! Base type person val add_one_to_age : person -> person val modify_person : person -> person
null
https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/02-exercises/17-records/problem.mli
ocaml
open! Base type person val add_one_to_age : person -> person val modify_person : person -> person
36996c0520b881a0632a78470f3d88f688a1ddb74ff3bdd385f937a505f9a6f0
2600hz/kazoo
knm_didww.erl
%%%----------------------------------------------------------------------------- ( C ) 2015 - 2020 , 2600Hz %%% @doc Handle client requests for phone number 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 o...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/carriers/knm_didww.erl
erlang
----------------------------------------------------------------------------- @doc Handle client requests for phone number @end ----------------------------------------------------------------------------- ------------------------------------------------------------------------------ @doc @end --------------------...
( C ) 2015 - 2020 , 2600Hz This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(knm_didww). -behaviour(knm_gen_carrier). -export([info/0]). -export([is_local/0]). -export([find_numbers/...
b7c6a84e708762ae044695eaf38267ac15b0b659fafc7812444c0eb41ad9b9fd
serioga/clojure-benhcmarks
fib.clj
(ns clojure-benchmarks.fib (:require [criterium.core :as criterium]) (:import (clojure.lang BigInt))) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) #_(defn fib-tail [n second first] (cond (< n 3) (+ second first) true (recur (dec n) first (+ second first)))) ...
null
https://raw.githubusercontent.com/serioga/clojure-benhcmarks/266caad3f5d4f9082d650a8dc1be1d6adb968fb8/src/clojure_benchmarks/fib.clj
clojure
(ns clojure-benchmarks.fib (:require [criterium.core :as criterium]) (:import (clojure.lang BigInt))) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) #_(defn fib-tail [n second first] (cond (< n 3) (+ second first) true (recur (dec n) first (+ second first)))) ...
3d7b6fc39683b17b1bcd8b1483afebf5e6f6298727ee55c2939713c8755c32af
basho/riak_test
ts_cluster_updowngrade_order_by_SUITE.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 , 2017 Basho Technologies , Inc. %% This file is provided to you 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...
null
https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/ts_cluster_updowngrade_order_by_SUITE.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2016 , 2017 Basho Technologies , Inc. This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(ts_cluster_updown...
b4e2d9b15391cc463b9ecd8783d8c4e086fec84c06480b829a440abd6cfa2bcd
ocaml/ocamlbuild
param_tags.ml
(***********************************************************************) (* *) (* ocamlbuild *) (* *) , , projet Galliu...
null
https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/src/param_tags.ml
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with open My_std Original author : module StringSet =...
b5d99746cd3f206668706303606d723ef0d8c6b67471f41672ab6a6b6731168b
aarvid/SmackLisp
utils.lisp
(in-package :smacklisp) ;; copied from arvid-utils ;; alexandria has similar for sequences stolen from paip (defun list-of-length-p (l n) (if (= n 0) (null l) (and (consp l) (list-of-length-p (rest l) (1- n))))) (defun singlep (l) (and (consp l) (null (rest l)))) (defun doublep (l) (...
null
https://raw.githubusercontent.com/aarvid/SmackLisp/ad245d28ed8792a7f2a63551e0e2da8e3751bff1/utils.lisp
lisp
copied from arvid-utils alexandria has similar for sequences copied from arvid-utils from my own idiot brain maybe should be macro? not likely to map/funcall this. wrapper macro for named-readtables
(in-package :smacklisp) stolen from paip (defun list-of-length-p (l n) (if (= n 0) (null l) (and (consp l) (list-of-length-p (rest l) (1- n))))) (defun singlep (l) (and (consp l) (null (rest l)))) (defun doublep (l) (and (consp l) (singlep (rest l)))) (defun make-adjustable-string (...
23d7ba85519a55753b4f48e099405245e1d9ea22efc1f15080351f77da45f87c
nikomatsakis/a-mir-formality
initialization-check.rkt
#lang racket (require redex/reduction-semantics "../grammar.rkt" "../cfg.rkt" "move-set.rkt" "dataflow/moved-places.rkt" ) (provide initialization-check ) (define-judgment-form formality-body ;; Check that the function body only uses initialized data, given the...
null
https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/bc951e21bff2bae1ccab8cc05b2b39cfb6365bfd/racket-src/body/borrow-check/initialization-check.rkt
racket
Check that the function body only uses initialized data, given the set `MoveSetMap` of places moved on entry to each block. Check that the block only uses initialized data, given the set `MoveSetMap` of places moved on entry to each block. Also checks that the moved-on-entry sets for the successors of this block a...
#lang racket (require redex/reduction-semantics "../grammar.rkt" "../cfg.rkt" "move-set.rkt" "dataflow/moved-places.rkt" ) (provide initialization-check ) (define-judgment-form formality-body #:mode (initialization-check I I) #:contract (initialization-check ...
0ef226d2188fa95c560fe1fda0d7f39cd55c1dccaa3c84be1871cd4f8561c037
spurious/sagittarius-scheme-mirror
deriv.scm
;;; DERIV -- Symbolic derivation. ;;; Returns the wrong answer for quotients. ;;; Fortunately these aren't used in the benchmark. (define (deriv a) (cond ((not (pair? a)) (if (eq? a 'x) 1 0)) ((eq? (car a) '+) (cons '+ (map deriv (cdr a)))) ((eq? (car a) '-) ...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/bench/gambit-benchmarks/deriv.scm
scheme
DERIV -- Symbolic derivation. Returns the wrong answer for quotients. Fortunately these aren't used in the benchmark.
(define (deriv a) (cond ((not (pair? a)) (if (eq? a 'x) 1 0)) ((eq? (car a) '+) (cons '+ (map deriv (cdr a)))) ((eq? (car a) '-) (cons '- (map deriv (cdr a)))) ((eq? (car a) '*) (list '* a (cons...
577de69d638c3bb80ed7dc4e814d22ca27c80695703dcc4ca06031eb971adf1c
aaronc/c-in-clj
msvc.clj
(ns c-in-clj.msvc (:import [System.Diagnostics Process ProcessStartInfo] [System.IO Path File Directory] [System.Runtime.InteropServices Marshal GCHandle GCHandleType]) (:require [clojure.string :as str] [c-in-clj.platform :as platform]) (:use [c-in-clj.lang] [c-in...
null
https://raw.githubusercontent.com/aaronc/c-in-clj/3a3c6ac5b3ba9404b7a6f2328a4157dc915c3a2f/src/c_in_clj/msvc.clj
clojure
(msvc-module TestMsvcModule) (cpackage TestMsvcModule test_msvc1) str0) (cstruct T1 (i32 a)) (declare ^T1 x) (cdefn ^i32 t5 []
(ns c-in-clj.msvc (:import [System.Diagnostics Process ProcessStartInfo] [System.IO Path File Directory] [System.Runtime.InteropServices Marshal GCHandle GCHandleType]) (:require [clojure.string :as str] [c-in-clj.platform :as platform]) (:use [c-in-clj.lang] [c-in...
c933669d5480c82812b8f8e30828a68074d10a81815cef412381ceb99733ebb0
dongcarl/guix
sysctl.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2017 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 3 of the Lice...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/services/sysctl.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2017 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu services sysctl) #:use-module (gnu services) #:use-module (gnu services shepherd) #:use-...
cc9a242b1ff532e90a24f999e134391f281e7583520faaa17b233a88075215ec
reflectionalist/S9fES
cond-expand.scm
Scheme 9 from Empty Space , Function Library By , 2009 ; Placed in the Public Domain ; ; (cond-expand (symbol expression ...)) ==> object ; ; This is a subset of SRFI-0 COND-EXPAND. Each argument of COND-EXPAND ; is a clause consisting of a leading "feature ID" (a symbol) and any ; number of trailing expressio...
null
https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/cond-expand.scm
scheme
Placed in the Public Domain (cond-expand (symbol expression ...)) ==> object This is a subset of SRFI-0 COND-EXPAND. Each argument of COND-EXPAND is a clause consisting of a leading "feature ID" (a symbol) and any number of trailing expressions (a body). It evaluates to the body of S9FES, or ELSE. The body is...
Scheme 9 from Empty Space , Function Library By , 2009 the first clause having a feature ID of SCHEME-9 - FROM - EMPTY - SPACE , Example : ( cond - expand ( s9fes ( cons 1 2 ) ) ) = = > ( 1 . 2 ) ( cond - expand ( foo ( cons 1 2 ) ) ( else ( + 1 2 ) ) ) = = > 3 (define-s...
ea6e19fbedd3d3e82500ac659dc778e13226d4371ab3453abb969848654f35a7
igorhvr/bedlam
match.scm
match.scm -- portable hygienic pattern matcher -*- coding : utf-8 -*- ;; This code is written by and placed in the ;; Public Domain. All warranties are disclaimed. ;;> @example-import[(srfi 9)] > This is a full superset of the popular @hyperlink [ ;;> "-repository/code.match.html"]{match} > package by , writ...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/match/other/matchable/synthcode/match.scm
scheme
Public Domain. All warranties are disclaimed. > @example-import[(srfi 9)] > "-repository/code.match.html"]{match} > and thus preserving hygiene. > The most notable extensions are the ability to use @emph{non-linear} > patterns - patterns in which the same identifier occurs multiple > times, tail patterns after ellip...
match.scm -- portable hygienic pattern matcher -*- coding : utf-8 -*- This code is written by and placed in the > This is a full superset of the popular @hyperlink [ > package by , written in fully portable @scheme{syntax - rules } > turn , and the corresponding body is evaluated for the first to > succe...
4490ec06c88767355429a74ebc3501d2522abe873a94ab6cd587ea6358ba1a40
TyOverby/mono
comparable_intf.ml
open! Import module type Infix = Comparisons.Infix module type Polymorphic_compare = Comparisons.S module Sign = Sign0 (** @canonical Base.Sign *) module type With_compare = sig (** Various combinators for [compare] and [equal] functions. *) * [ lexicographic y ] compares [ x ] and [ y ] lexicographically using...
null
https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-base/src/comparable_intf.ml
ocaml
* @canonical Base.Sign * Various combinators for [compare] and [equal] functions. * [lift cmp ~f x y] compares [x] and [y] by comparing [f x] and [f y] via [cmp]. * The functions below are analogues of the type-specific functions exported by the [Comparable.S] interface. * [ascending] is identical to [compare...
open! Import module type Infix = Comparisons.Infix module type Polymorphic_compare = Comparisons.S module type With_compare = sig * [ lexicographic y ] compares [ x ] and [ y ] lexicographically using functions in the list [ cmps ] . list [cmps]. *) val lexicographic : ('a -> 'a -> int) list -> 'a...
47ebdbd358543f4d2e9cfcc3273e4e45f974af2c42a5c278385111e36e9e9d85
eareese/htdp-exercises
245.rkt
;;--------------------------------------------------------------------------------------------------- #lang htdp/isl Exercise 245 . Develop function = at-1.2 - 3 - and-5.775 ? . Given two functions from numbers to numbers , the function determines whether the two produce the same results for 1.2 , 3 , and -5.775 . ...
null
https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part03-abstraction/245.rkt
racket
--------------------------------------------------------------------------------------------------- Number -> Number Number -> Number Number -> Number Function Function -> Boolean same input—for all possible inputs. are equal? If so, define the function. If not, explain why and consider the implication that you ...
#lang htdp/isl Exercise 245 . Develop function = at-1.2 - 3 - and-5.775 ? . Given two functions from numbers to numbers , the function determines whether the two produce the same results for 1.2 , 3 , and -5.775 . add 2 to the given number (check-expect (add2 3) 5) (define (add2 n) (+ 2 n)) subtract 7 from th...
e59a1be96ebaa6d96fff6b7b37005b3f909d039967783d16512e057c3c169973
schemeorg-community/index.scheme.org
srfi.54.scm
(((name . "CAT") (signature lambda (object formatting-specifier ...) string?) (tags pure) (spec-values (formatting-specifier ("<exactness%>" "symbol: exact or inexact") ("<radix%>" "symbol: binary, octal, decimal, or hexadecimal") ("<sign%>" "if <sign%> is a symbol that takes the form of 'sign...
null
https://raw.githubusercontent.com/schemeorg-community/index.scheme.org/32e1afcfe423a158ac8ce014f5c0b8399d12a1ea/types/srfi.54.scm
scheme
(((name . "CAT") (signature lambda (object formatting-specifier ...) string?) (tags pure) (spec-values (formatting-specifier ("<exactness%>" "symbol: exact or inexact") ("<radix%>" "symbol: binary, octal, decimal, or hexadecimal") ("<sign%>" "if <sign%> is a symbol that takes the form of 'sign...
e26219a9ac284374dfcab5fb35408d47a0a9257fed86a018b39f337b55e46805
metabase/metabase
order_by_test.cljc
(ns metabase.lib.order-by-test (:require [clojure.test :refer [deftest is testing]] [metabase.lib.core :as lib] [metabase.lib.metadata :as lib.metadata] [metabase.lib.test-metadata :as meta]) #?(:cljs (:require [metabase.test-runner.assert-exprs.approximately-equal]))) (deftest ^:parallel order-by-test...
null
https://raw.githubusercontent.com/metabase/metabase/02e9aa420ef910138b9b5e05f74c96e31286bcf2/test/metabase/lib/order_by_test.cljc
clojure
(ns metabase.lib.order-by-test (:require [clojure.test :refer [deftest is testing]] [metabase.lib.core :as lib] [metabase.lib.metadata :as lib.metadata] [metabase.lib.test-metadata :as meta]) #?(:cljs (:require [metabase.test-runner.assert-exprs.approximately-equal]))) (deftest ^:parallel order-by-test...
391f0a066dc1f4de62985016de50e392648f49f9c1411d4ee956f2abc073adc8
goosedb/InterpolatePlugin
MyLibTest.hs
module MyLibTest (main) where main :: IO () main = pure ()
null
https://raw.githubusercontent.com/goosedb/InterpolatePlugin/fc9eafbe68ae390135b05520d2dde2c3638c83a8/test/MyLibTest.hs
haskell
module MyLibTest (main) where main :: IO () main = pure ()
9be4af9fa50d89c15d10a26ccb495fb773837315dc44a71783179b70fb01bda0
moby/vpnkit
test_half_close.ml
open Lwt.Infix let src = let src = Logs.Src.create "tcp" ~doc:"Test TCP half-close in the proxy" in Logs.Src.set_level src (Some Logs.Debug); src let failf fmt = Fmt.kstr failwith fmt module Log = (val Logs.src_log src : Logs.LOG) module Server = struct type t = { server: Host.Sockets.Stream.Tcp.server;...
null
https://raw.githubusercontent.com/moby/vpnkit/6039eac025e0740e530f2ff11f57d6d990d1c4a1/src/hostnet_test/test_half_close.ml
ocaml
Write a response. If the connection is fully closed rather than half-closed then this will fail. Now that the server is running, connect to it and send a request. This will perform a TCP half-close Verify the response is still intact Write a request This will perform a TCP half-close ...
open Lwt.Infix let src = let src = Logs.Src.create "tcp" ~doc:"Test TCP half-close in the proxy" in Logs.Src.set_level src (Some Logs.Debug); src let failf fmt = Fmt.kstr failwith fmt module Log = (val Logs.src_log src : Logs.LOG) module Server = struct type t = { server: Host.Sockets.Stream.Tcp.server;...
c36abe91791dc9d997182fa0648c4f5fbc697742347ca93df46eb900e175b43f
ocaml-multicore/ocaml-tsan
main.ml
TEST readonly_files = " a.ml api.ml b.ml bug.ml c.ml factorial.c pack_client.ml \ packed1_client.ml packed1.ml plugin2.ml plugin4.ml plugin_ext.ml \ plugin_high_arity.ml plugin.ml plugin.mli plugin_ref.ml \ plugin_simple.ml plugin_thread.ml " subdirectories = " sub " * hassyst...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/testsuite/tests/lib-dynlink-native/main.ml
ocaml
We will add them manually where appropriated Removes the -ccopt -no-pie on ised on OpenBSD
TEST readonly_files = " a.ml api.ml b.ml bug.ml c.ml factorial.c pack_client.ml \ packed1_client.ml packed1.ml plugin2.ml plugin4.ml plugin_ext.ml \ plugin_high_arity.ml plugin.ml plugin.mli plugin_ref.ml \ plugin_simple.ml plugin_thread.ml " subdirectories = " sub " * hassyst...
7d532fdbc5ba5c6ba6cf2cc0cb952c127e75d646b460d3df3b1f9d6a12bd6f28
grin-compiler/grin
SplitFetch.hs
# LANGUAGE LambdaCase # module Transformations.Simplifying.SplitFetch where import Data.Functor.Foldable as Foldable import Grin.Grin splitFetch :: Exp -> Exp splitFetch = ana builder where builder :: Exp -> ExpF Exp builder = \case EBind (SFetch name) (ConstTagNode _ args) exp -> project $ newBinds name...
null
https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Transformations/Simplifying/SplitFetch.hs
haskell
# LANGUAGE LambdaCase # module Transformations.Simplifying.SplitFetch where import Data.Functor.Foldable as Foldable import Grin.Grin splitFetch :: Exp -> Exp splitFetch = ana builder where builder :: Exp -> ExpF Exp builder = \case EBind (SFetch name) (ConstTagNode _ args) exp -> project $ newBinds name...
46f9f005e59840084302f4a6640bca21f1db8c556891774a740be2c36899d668
ocaml-flambda/flambda-backend
simplify_static_const.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/0c3afa3d6835e8c8263934f0cd4aa9a850f1b383/middle_end/flambda2/simplify/simplify_static_const.ml
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2014 - -2020 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the open! Flambda.Import open! Simplify_import let simplify_field_of_bl...
409ca7e089572ea5e2fa92b6f5518fa5856a50dece5bfc5568568c0083061ecd
footprintanalytics/footprint-web
execution.clj
(ns metabase.actions.execution (:require [clojure.set :as set] [clojure.tools.logging :as log] [medley.core :as m] [metabase.actions :as actions] [metabase.actions.http-action :as http-action] [metabase.api.common :as api] [metabase.models :refer [Card Dashboard DashboardCard ModelAction T...
null
https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/actions/execution.clj
clojure
(ns metabase.actions.execution (:require [clojure.set :as set] [clojure.tools.logging :as log] [medley.core :as m] [metabase.actions :as actions] [metabase.actions.http-action :as http-action] [metabase.api.common :as api] [metabase.models :refer [Card Dashboard DashboardCard ModelAction T...
743354f385a7fabf06bcc328fe6e94d6fcfb38f43749c6826d2f5aa5d65466de
remyzorg/pendulum
runtime_ast.ml
type signal = string type label = Label of string type statement = | Loop of statement | Seq of statement * statement | Par of statement * statement | Emit of signal | Nothing | Pause | Suspend of statement * signal | Trap of label * statement | Exit of label | Present of signal * statement * st...
null
https://raw.githubusercontent.com/remyzorg/pendulum/a532681c6f99d77129e31fbe27cc56c396a7c63c/src/runtime/runtime_ast.ml
ocaml
of (unit -> unit)
type signal = string type label = Label of string type statement = | Loop of statement | Seq of statement * statement | Par of statement * statement | Emit of signal | Nothing | Pause | Suspend of statement * signal | Trap of label * statement | Exit of label | Present of signal * statement * st...
9888a36e1c700670ac684cb15ad7e1f2da9f6eceddf1035f6bcc9771a3491fa1
ZHaskell/z-data
Converter.hs
| Module : Z.Data . JSON.Converter Description : IR Converter Copyright : ( c ) , 2019 License : BSD Maintainer : Stability : experimental Portability : non - portable This module provides tools for converting protocol IR ( e.g. ' Value ' ) to : Module : Z.Data.JSON.Conv...
null
https://raw.githubusercontent.com/ZHaskell/z-data/baca6f17121c9a6587e38052f8cc76bce5e08957/Z/Data/JSON/Converter.hs
haskell
| Run a 'Converter' with input value. | Elements of a (JSON) Value path used to describe the location of an error. # UNPACK # ^ Path element of a key into an object, \"object.key\". # UNPACK # ^ Path element of an index into an array, \"array[index]\". ^ path of a embedded (JSON) String | Error info with (JSON)...
| Module : Z.Data . JSON.Converter Description : IR Converter Copyright : ( c ) , 2019 License : BSD Maintainer : Stability : experimental Portability : non - portable This module provides tools for converting protocol IR ( e.g. ' Value ' ) to : Module : Z.Data.JSON.Conv...
0555c0ddd31f2edb3516c46d9c94c3914f9515151667343f0368a02d1f4ac6a5
manuel-serrano/bigloo
tspec.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / cigloo / Translate / tspec.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/cigloo/Translate/tspec.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * The type specification handling */ *===========================...
* serrano / prgm / project / bigloo / cigloo / Translate / tspec.scm * / * Author : * / * Creation : Thu Nov 30 17:24:36 1995 * / * Last change : Mon Mar 11 14:30:27 2013 ( serrano ) * / (module t...
27275e24766cef507ecadf3412cfd6ff90e5888090b116a64af255547fb18904
i-am-tom/learn-me-a-haskell
Logarithms.hs
-- | Module : Math . . Logarithms Copyright : ( c ) 2011 Licence : MIT Maintainer : < > -- Stability: Provisional Portability : Non - portable ( GHC extensions ) -- Integer Logarithms . For efficiency , the internal representation of ' Integer 's -- from integer-gmp is used. -- # LAN...
null
https://raw.githubusercontent.com/i-am-tom/learn-me-a-haskell/08271f6cdd4fc88c26ed7a62ed1e786a900824be/vendor/integer-logarithms-1.0.2.1/src/Math/NumberTheory/Logarithms.hs
haskell
| Stability: Provisional from integer-gmp is used. * Integer logarithms with input checks * Integer logarithms without input checks | These functions are total, however, don't rely on the values with out-of-domain arguments. | Calculate the integer logarithm for an arbitrary base. whose logarithm is soug...
Module : Math . . Logarithms Copyright : ( c ) 2011 Licence : MIT Maintainer : < > Portability : Non - portable ( GHC extensions ) Integer Logarithms . For efficiency , the internal representation of ' Integer 's # LANGUAGE CPP # # LANGUAGE MagicHash # module Math.NumberTheory.Logarith...
221b94a735f76e0e1138acaebbcf3205ff31bc69708265c4ad374cfef0518721
sellout/haskerwaul
Closed.hs
# language UndecidableInstances , UndecidableSuperClasses # , UndecidableSuperClasses #-} module Haskerwaul.Category.Closed ( module Haskerwaul.Category.Closed -- * extended modules , module Haskerwaul.Category ) where import Data.Constraint ((:-), (:=>)) import Dat...
null
https://raw.githubusercontent.com/sellout/haskerwaul/bb197cacf348c0f189d218f35bf8bbb220d3e402/src/Haskerwaul/Category/Closed.hs
haskell
* extended modules | [nLab](+category) __TODO__: This should have a constraint, but it's been troublesome making an instance for `(:=>)`, so we skip the constraint here and add it on the instances that make use of it. | = references - [nLab](+hom) | This is a natural transf...
# language UndecidableInstances , UndecidableSuperClasses # , UndecidableSuperClasses #-} module Haskerwaul.Category.Closed ( module Haskerwaul.Category.Closed , module Haskerwaul.Category ) where import Data.Constraint ((:-), (:=>)) import Data.Kind (Type) import Ha...
6126bf9be7944723d00dc48454847121949c2e8cc0c17109f14664f545f58a7f
pol-is/polisMath
runner.clj
Copyright ( C ) 2012 - present , The Authors . This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . This program is distributed in the hope that it will be useful , but WITHOUT A...
null
https://raw.githubusercontent.com/pol-is/polisMath/dfe233e8c9207c2ce11e1379286ad0cf0f732067/test/runner.clj
clojure
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the GNU Affero General Public License for more details . You should have received a copy of the GNU Affero General Public License along with this program . If not , see < / > . (try (catch Exception e (println "XXX Err...
(ns runner (:require [cluster-tests] [conv-man-tests] [conversation-test] [index-hash-test] [named-matrix-test] [pca-test] [silhouette-test] [stats-test] [utils-test] [ptpt-stats-test] [clojure.tes...
2b807f6e2d4db9fd5a0ac079a557dcb7b30cd0008c6d3b535ce8a5eb31521f99
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} module Duckling.TimeGrain.JA.Rules ( rules ) wh...
null
https://raw.githubusercontent.com/facebook/duckling/dd70d80dc1c9b47a8b68ce36ba12c0da4e376d3e/Duckling/TimeGrain/JA/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.TimeGrain.JA.Rules ( rules ) where import Data.Text (Text) import Prelude import Data.String import Duckling.Dimensions.Types import qualified Duckling.TimeGrain.Types as TG import Duckling.Types grains :: [(Text, String, TG.Grain)] grains = [ (...
f5504b684958dfa3adc85d103ca545b5139cb1d4cd22b35b4801dce3d371c0dc
sol/logging-facade
Helper.hs
module Helper ( module Test.Hspec , logSinkSpy ) where import Test.Hspec import Data.IORef import System.Logging.Facade.Types import System.Logging.Facade.Sink logSinkSpy :: IO (IO [LogRecord], LogSink) logSinkSpy = do ref <- newIORef [] let spy :: LogSink spy reco...
null
https://raw.githubusercontent.com/sol/logging-facade/2ed4f0b00a3a8db11c948ff215578ba5bdbcd188/test/Helper.hs
haskell
module Helper ( module Test.Hspec , logSinkSpy ) where import Test.Hspec import Data.IORef import System.Logging.Facade.Types import System.Logging.Facade.Sink logSinkSpy :: IO (IO [LogRecord], LogSink) logSinkSpy = do ref <- newIORef [] let spy :: LogSink spy reco...
9909e6916db206702a5b546a68a79d60a6a557f4e95ca352b12e4dd6ad93c74d
keyfender/keyfender
protocol_j.ml
(* Auto-generated from "protocol.atd" *) [@@@ocaml.warning "-27-32-35-39"] type node = Protocol_t.node = { key: string; createdIndex: int; modifiedIndex: int; expiration: string option; value: string option; dir: bool option; nodes: node list option } type response = Protocol_t.response = { action: st...
null
https://raw.githubusercontent.com/keyfender/keyfender/af7d1b1ada0c70ec98f04b2a701095efac805106/src/etcd/protocol_j.ml
ocaml
Auto-generated from "protocol.atd"
[@@@ocaml.warning "-27-32-35-39"] type node = Protocol_t.node = { key: string; createdIndex: int; modifiedIndex: int; expiration: string option; value: string option; dir: bool option; nodes: node list option } type response = Protocol_t.response = { action: string; node: node; prevNode: node opti...
f2fd75029e0d04b9ceb6e86caa687dbf4ca89a5750a91e17e30ba35602cddd57
Liqwid-Labs/agora
Create.hs
{- | Module : Sample.Proposal.Create Maintainer : Description: Generate sample data for testing the functionalities of creating proposals Sample and utilities for testing the functionalities of creating proposals. -} module Sample.Proposal.Create ( Parameters (..), mkTestTree, totallyValidParameters, inva...
null
https://raw.githubusercontent.com/Liqwid-Labs/agora/00c10198e86800aa59c107043e7961ee32d987a2/agora-specs/Sample/Proposal/Create.hs
haskell
| Module : Sample.Proposal.Create Maintainer : Description: Generate sample data for testing the functionalities of creating proposals Sample and utilities for testing the functionalities of creating proposals. | Parameters for creating a proposal. ^ Try creating more than maximum amount of proposals. ^ Shou...
module Sample.Proposal.Create ( Parameters (..), mkTestTree, totallyValidParameters, invalidOutputGovernorDatumParameters, useStakeOwnBySomeoneElseParameters, invalidOutputStakeParameters, addInvalidLocksParameters, exceedMaximumProposalsParameters, timeRangeNotTightParameters, timeRangeNotClosedPar...
36d9a85ba3572f7957deae633b3dc2aa8253e08b2bc1eac31b18415f121b0c6f
joearms/elib1
elib1_parse_dtd.erl
-module(elib1_parse_dtd). -export([parse/1, parse_and_scan/1, format_error/1]). -file("elib1_parse_dtd.yrl", 116). %% -compile(export_all). -export([test/1, parse_dtd_in_string/2, parse_dtd_in_file/2]). -import(lists, [filter/2, member/2, partition/2, reverse/1]). -define(IN(X,L,H), L=<X,X=<H). fix_type(A, nil) ->...
null
https://raw.githubusercontent.com/joearms/elib1/d617d0ec70a058ef102749eadf51c024444c28d9/lib/tmp/elib1_parse_dtd.erl
erlang
-compile(export_all). expand the entity ',_},{name,_,Name}, ',_},{name,_,Name},{name,_,_Vis}, Vis = "PUBLIC" | "PRIVATE" Defining a parameter entity fetch the entity and store as a string now expand any inner entities ; H =:= $;; ---------------------------------------------------------------------- Some checkin...
-module(elib1_parse_dtd). -export([parse/1, parse_and_scan/1, format_error/1]). -file("elib1_parse_dtd.yrl", 116). -export([test/1, parse_dtd_in_string/2, parse_dtd_in_file/2]). -import(lists, [filter/2, member/2, partition/2, reverse/1]). -define(IN(X,L,H), L=<X,X=<H). fix_type(A, nil) -> A; fix_type(A, {'$seq',B...
7bc74929408e1909bb60e63f065915dfd1a7476d115b564202e1db12597821de
playegs/prs
prs.erl
Copyright ( c ) 2013 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS A...
null
https://raw.githubusercontent.com/playegs/prs/ca6e605b41830bd861802f4ae710b9f25441b310/src/prs.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2013 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(prs). -compile([native]). -export([compress/1]). -e...
21d315d9441183786d950b829a53f7bc239c02611b50e83df8524a1c7ad946bd
mmontone/cl-rest-server
api.lisp
(in-package :rest-server-demo) (define-api users-demo-api () (:title "Users demo api" :documentation "An api demo with a simple users CRUD" :client-package :rest-server-demo.client :export-client-functions t) (users (:produces (:json :xml) :consumes (:json) :documentation "User...
null
https://raw.githubusercontent.com/mmontone/cl-rest-server/cd3a08681a1c3215866fedcd36a6bc98d223d52d/demo/api.lisp
lisp
(in-package :rest-server-demo) (define-api users-demo-api () (:title "Users demo api" :documentation "An api demo with a simple users CRUD" :client-package :rest-server-demo.client :export-client-functions t) (users (:produces (:json :xml) :consumes (:json) :documentation "User...
8215258fd11df1eb12baed2afaed2b3071b989507fdbdb7c643a19f3ac0045a9
smucclaw/dsl
Maude.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE DerivingStrategies # # LANGUAGE DisambiguateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE ImportQualifiedPost # # LANGUAGE KindSignatures # # LANGUAGE NamedFieldPuns # # LANGUAGE NoMonomorphismRestriction # {-# LANGUAGE OverloadedStr...
null
https://raw.githubusercontent.com/smucclaw/dsl/d0093b723dc1ed40c361322f9f03da49e26a94aa/lib/haskell/natural4/src/LS/XPile/Maude.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # Based on experiments being run here: -Abg2H_OINGGv-8Gpf9mzuX1RR56v0Sss/edit#gid=929226277 testRule :: String testRule = rules2maudeStr [Regulative {..}] where rkeyword = RParty deontic = DMust lest = Nothing -- The remaining fiel...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DerivingStrategies # # LANGUAGE DisambiguateRecordFields # # LANGUAGE FlexibleContexts # # LANGUAGE ImportQualifiedPost # # LANGUAGE KindSignatures # # LANGUAGE NamedFieldPuns # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables...
1778db69ca4b49486cb1aa480492f9da6fe8a49c6147836facd2237d6101401e
BillHallahan/G2
M32.hs
{-@ LIQUID "--no-termination" @-} module M32 (main) where @ main : : Bool - > Int - > { b : | b } @ main :: Bool -> Int -> Bool main b ij = case while 100 (b, ij, ij, 0) of (b', i, j, n) -> i == j {-@ while :: Int -> (Bool, Int, Int, Int) -> (Bool, Int, Int, Int) @-} while :: Int -> (Bool, Int, Int,...
null
https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/Compare/M32.hs
haskell
@ LIQUID "--no-termination" @ @ while :: Int -> (Bool, Int, Int, Int) -> (Bool, Int, Int, Int) @
module M32 (main) where @ main : : Bool - > Int - > { b : | b } @ main :: Bool -> Int -> Bool main b ij = case while 100 (b, ij, ij, 0) of (b', i, j, n) -> i == j while :: Int -> (Bool, Int, Int, Int) -> (Bool, Int, Int, Int) while k (b, i, j, n) = if n < 2 * k then while k (not b, if b ...
f9532c95d8ff2700afac894397e82f1e4484f04f6f82c7c0be816b36c2301c99
templexxx/maxprime
maxprime.erl
-module(maxprime). %-export([get/1]). -compile(export_all). %% get the max prime < 3317044064679887385961981 get(Num) -> Answer = xmr_test(Num), if Answer =/= true -> FirstGuess = first_guess(Num), if FirstGuess =/= Num -> UpTest = up_test(FirstGuess, Num), if UpTest =/= [] -> UpTest;...
null
https://raw.githubusercontent.com/templexxx/maxprime/64e38387a5f8ca95d70387b2fa1b60673a192b93/maxprime.erl
erlang
-export([get/1]). get the max prime 求1~Num 间所有素数的和 ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑%%%%% ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑ YOU NEED CARE ABOUT ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑%%%%% ...
-module(maxprime). -compile(export_all). < 3317044064679887385961981 get(Num) -> Answer = xmr_test(Num), if Answer =/= true -> FirstGuess = first_guess(Num), if FirstGuess =/= Num -> UpTest = up_test(FirstGuess, Num), if UpTest =/= [] -> UpTest; true -> down_test(FirstGuess) ...
770e2661e61935b7336a711bb1361d2982a80b38a2085e532dd3750e98bb38eb
imteekay/functional-programming-learning-path
list_replication.clj
Problem : -list-replication/problem (defn list-replication [n list] (sort (flatten (repeat n list)))) (list-replication 3 [1 2 3]) (list-replication 2 [4 5]) (list-replication 1 [10 100])
null
https://raw.githubusercontent.com/imteekay/functional-programming-learning-path/07dac09c9fabfa54f8b4d80b62f43b092cb87b0d/programming_challenges/hacker_rank/list_replication/list_replication.clj
clojure
Problem : -list-replication/problem (defn list-replication [n list] (sort (flatten (repeat n list)))) (list-replication 3 [1 2 3]) (list-replication 2 [4 5]) (list-replication 1 [10 100])
0ba793dc3fee6461b1fe74d81f76e54f8bfbfd817afdc5ecba95102d3b413b6f
sergv/hkanren
MMap.hs
---------------------------------------------------------------------------- -- | Module : Data . Copyright : ( c ) 2015 -- License : BSD3-style (see LICENSE) -- -- Maintainer : -- Stability : -- Portability : -- -- --------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/sergv/hkanren/94a9038f5885471c9f4d3b17a8e52af4e7747af3/src/Data/MMap.hs
haskell
-------------------------------------------------------------------------- | License : BSD3-style (see LICENSE) Maintainer : Stability : Portability : --------------------------------------------------------------------------
Module : Data . Copyright : ( c ) 2015 # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Data.MMap (MMap) where import Control.Applicative import Data.GMap (GMap(..)) import Data.HUtils import Data.Map (Map) import qualified Data.Map as M import Unsafe.Coerce import Language.HKanr...
f9a2763fdf3398d81dcc7c671ee1104259defd966a6f7bc6274d0cc3894eb419
zoranbosnjak/asterix-specs
Types.hs
-- Asterix data types. module Asterix.Specs.Types where import GHC.Generics (Generic) import Data.Text type RegisterSize = Int type RepetitionSize = Int type FractBits = Int type Name = Text type Title = Text type UapName = Text type Unit = Text data Documentation = Documentation { docDefin...
null
https://raw.githubusercontent.com/zoranbosnjak/asterix-specs/007b2147d07298716983f2be870adf1e0fecd03f/tools/lib/Asterix/Specs/Types.hs
haskell
Asterix data types. unsigned/signed scaling factor number for fractional bits unit leaf of the structure item with explicit size value lookup table User applicaton profile type multiple UAPs Basic category definition Expansion category definition
module Asterix.Specs.Types where import GHC.Generics (Generic) import Data.Text type RegisterSize = Int type RepetitionSize = Int type FractBits = Int type Name = Text type Title = Text type UapName = Text type Unit = Text data Documentation = Documentation { docDefinition :: Maybe Text...
69740303be7720888d8a37946bc06b3d3e42a7a4a90377abc88579fbb3d19e9b
gwkkwg/trivial-shell
openmcl.lisp
(in-package #:trivial-shell) (defun %shell-command (command input) (let* ((process (create-shell-process command t input)) (output (file-to-string-as-lines (ccl::external-process-output-stream process))) (error (file-to-string-as-lines (ccl::external-process-erro...
null
https://raw.githubusercontent.com/gwkkwg/trivial-shell/e02ec191b34b52deca5d1c4ee99d4fa13b8772e0/dev/openmcl.lisp
lisp
(in-package #:trivial-shell) (defun %shell-command (command input) (let* ((process (create-shell-process command t input)) (output (file-to-string-as-lines (ccl::external-process-output-stream process))) (error (file-to-string-as-lines (ccl::external-process-erro...
99582ea76ccba86c86c195c73df880c3b3f319eb594ee44efb510fc05fce026e
anmonteiro/ocaml-mongodb
mongo.ml
module Config = Config module Response = Response module Connection = Connection
null
https://raw.githubusercontent.com/anmonteiro/ocaml-mongodb/535ae1b003b9c8a3844b92a78d2123881f2d404b/src/mongo.ml
ocaml
module Config = Config module Response = Response module Connection = Connection
fc876012338294ad8a70c2a64259d2fd2f09dfbcd15c69d1ceea463f98f3eb27
aphyr/interval-metrics
t_core.clj
(ns interval-metrics.t-core (:use midje.sweet interval-metrics.core criterium.core) (:import (interval_metrics.core Rate) (java.util.concurrent CountDownLatch TimeUnit))) (defn fill! [reservoir coll] (->> coll (partition-all 10000) (map shuffle)...
null
https://raw.githubusercontent.com/aphyr/interval-metrics/423fb03546f264a0b5e52b4c7d8fb1ada43e4817/test/interval_metrics/t_core.clj
clojure
Uniformly distributed numbers Check for those zeroes (to verify the snapshot isolated us) Check to see that the most recent snapshot emptied things out Verify that dereferencing the rate in progress is correct And take a snapshot But our snapshot should be the mean. (prn (snapshot! metric)) (fa...
(ns interval-metrics.t-core (:use midje.sweet interval-metrics.core criterium.core) (:import (interval_metrics.core Rate) (java.util.concurrent CountDownLatch TimeUnit))) (defn fill! [reservoir coll] (->> coll (partition-all 10000) (map shuffle)...
b27eb0ff4b09d3b7bc309367d427e153310e4bf81bd0058a2ca728bd2dec9bd7
facebookarchive/pfff
errors_code.mli
type error = { typ: error_kind; loc: Parse_info.token_location; sev: severity; } and severity = Fatal | Warning and error_kind = | Deadcode of entity | UndefinedDefOfDecl of entity | UnusedExport of entity * Common.filename | UnusedVariable of string * Scope_code.scope and entity = (string * Entity_code...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/h_program-lang/errors_code.mli
ocaml
@xxx to acknowledge or explain false positives to detect false positives (we use the Hashtbl.find_all property) !modify g_errors!
type error = { typ: error_kind; loc: Parse_info.token_location; sev: severity; } and severity = Fatal | Warning and error_kind = | Deadcode of entity | UndefinedDefOfDecl of entity | UnusedExport of entity * Common.filename | UnusedVariable of string * Scope_code.scope and entity = (string * Entity_code...
d5cb3edbd54716fde35c49bb53829f491687141932fb5cda82872d223615b9df
MegaLoler/Music
song.lisp
(in-package :music) (defmacro defsong (name-and-metadata &body body) "Define a song." (let ((name (if (symbolp name-and-metadata) name-and-metadata (car name-and-metadata))) (metadata (when (listp name-and-metadata) (cdr name-and-metadata)))) `(defparameter ,name (make-instance 'song :b...
null
https://raw.githubusercontent.com/MegaLoler/Music/6d69042f6ed98994d3f2ec474c71c569e0ee06be/src/song.lisp
lisp
(in-package :music) (defmacro defsong (name-and-metadata &body body) "Define a song." (let ((name (if (symbolp name-and-metadata) name-and-metadata (car name-and-metadata))) (metadata (when (listp name-and-metadata) (cdr name-and-metadata)))) `(defparameter ,name (make-instance 'song :b...
e55fba3bcd1e50d44aee1a7402c481ac8558ae591f9dbc8bbd69cd6695e24dcb
6502/JSLisp
forms.lisp
(defobject document (name description pages)) (defobject page (width height entities)) (defobject rect (x0 y0 x1 y1 color)) (defobject image (x0 y0 x1 y1 url)) (defobject text (x0 y0 x1 y1 text color size family bold italic)) (defvar *docs* null) (when node-js (defun load-docum...
null
https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/examples/forms.lisp
lisp
(defobject document (name description pages)) (defobject page (width height entities)) (defobject rect (x0 y0 x1 y1 color)) (defobject image (x0 y0 x1 y1 url)) (defobject text (x0 y0 x1 y1 text color size family bold italic)) (defvar *docs* null) (when node-js (defun load-docum...
f6613b72c0954d0b438d8359bff013d54cb341b1db006a1300ce44278409f6ff
anchpop/wise_mans_haskell
map.hs
map' :: (a -> b) -> [a] -> [b] map' f [] = [] map' f (x:xs) = (f x):(map f xs)
null
https://raw.githubusercontent.com/anchpop/wise_mans_haskell/021ca3f3d96ebc0ecf2daf1a802fc33d067e24cc/haskelltests/should_compile/map.hs
haskell
map' :: (a -> b) -> [a] -> [b] map' f [] = [] map' f (x:xs) = (f x):(map f xs)
5b6d439ede8036a9b158db61eb7631d6d9734d2c7329189d67bb3b62b29ccdad
buildsome/buildsome
Binary.hs
module Lib.Binary (runGet, runPut, encode, decode) where import Data.Binary (Binary, Get, Put) import qualified Data.Binary as Binary import qualified Data.Binary.Get as Get import qualified Data.Binary.Put as Put import qualified Data.ByteString as BS import Lib.ByteString (strictify, lazify) imp...
null
https://raw.githubusercontent.com/buildsome/buildsome/479b92bb74a474a5f0c3292b79202cc850bd8653/src/Lib/Binary.hs
haskell
# INLINE runGet # # INLINE runPut #
module Lib.Binary (runGet, runPut, encode, decode) where import Data.Binary (Binary, Get, Put) import qualified Data.Binary as Binary import qualified Data.Binary.Get as Get import qualified Data.Binary.Put as Put import qualified Data.ByteString as BS import Lib.ByteString (strictify, lazify) imp...
ba23d502400f883722ceb65c4adbf097183ff18c5bb600f7132e6466f1be3c8d
manuel-serrano/bigloo
jvm.scm
(module main (java (class point (constructor init-default-point ()) (field x::int "x") (method show::void (::point) "show") (method static pointstatistics::int () "PointStatistics") "Point") (class point (field y::int "y") (field static point-num::int "point_num") (construct...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/www/src/jvm.scm
scheme
(module main (java (class point (constructor init-default-point ()) (field x::int "x") (method show::void (::point) "show") (method static pointstatistics::int () "PointStatistics") "Point") (class point (field y::int "y") (field static point-num::int "point_num") (construct...
c30050a34b6fe68f9ba89be0669caeae24ea842191d5e2fdc22ef30da6ac1ba8
gerritjvv/tcp-driver
pool.clj
(ns ^{:doc "TCP connection pools see: create-tcp-pool Pool keys: Note keys (not keywords) passed are in fact host addresses of the format {:host <host> :port <port>} The tcp-driver.io.conn/host-address can be used for convinience to return a record Any other ke...
null
https://raw.githubusercontent.com/gerritjvv/tcp-driver/2a9373cda20d176bfb5b00e63f4816fa83c88591/src/clojure/tcp_driver/io/pool.clj
clojure
Protocols Private Public API Remember that all keys should be created by tcp-driver.io.conn/host-address create a tcp pool factory where each key is the address to connect to
(ns ^{:doc "TCP connection pools see: create-tcp-pool Pool keys: Note keys (not keywords) passed are in fact host addresses of the format {:host <host> :port <port>} The tcp-driver.io.conn/host-address can be used for convinience to return a record Any other ke...
2b4531821c8997e3b490f89eff85df3347847778971d4fad7d3b2ed77739c53b
janestreet/core
type_immediacy_witness_unit_tests.ml
open! Core open Expect_test_helpers_core (* Tests to make sure the implementation of values hasn't changed and that witnesses are provided correctly. *) (* Tests are bound to the value returned by Immediate.of_typerep, as the test cases are designed along the value returned and so that they must be revised if ...
null
https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/test/type_immediacy_witness_unit_tests.ml
ocaml
Tests to make sure the implementation of values hasn't changed and that witnesses are provided correctly. Tests are bound to the value returned by Immediate.of_typerep, as the test cases are designed along the value returned and so that they must be revised if changes are made. Where appropriate, unit is...
open! Core open Expect_test_helpers_core let%test_module _ = (module struct type t = | Always | Sometimes | Never | Unknown let imm_t = typerep_of_unit let box_t = typerep_of_ref typerep_of_int let is_imm v = Obj.is_int (Obj.repr v) When [ expected ] and the actual result...
138cf17631036cacab699747ae862bfc0422f9698604b36fbff96ec52430281d
samrushing/irken-compiler
t14.scm
(include "lib/core.scm") (print (>= 20 10)) (print (>= 10 20)) (print (>= 10 10))
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t14.scm
scheme
(include "lib/core.scm") (print (>= 20 10)) (print (>= 10 20)) (print (>= 10 10))
0c46599dc089e3ea5cd4d44e92c378f51de78ce962580280a18206fc087ef3f7
oakes/Nightmod
repl.clj
(ns nightmod.repl (:require [clojure.main] [nightcode.editors :as editors] [nightcode.ui :as ui] [nightcode.utils :as nc-utils] [nightmod.utils :as u] [seesaw.core :as s])) (defn redirect-io [[in out] func] (binding [*out* out *err* out ...
null
https://raw.githubusercontent.com/oakes/Nightmod/e1145a49d96c5322aaf4bdd5493ae14a7f0c0f8a/src/clojure/nightmod/repl.clj
clojure
(ns nightmod.repl (:require [clojure.main] [nightcode.editors :as editors] [nightcode.ui :as ui] [nightcode.utils :as nc-utils] [nightmod.utils :as u] [seesaw.core :as s])) (defn redirect-io [[in out] func] (binding [*out* out *err* out ...
bdb608d07dfa05e2084e73ae848d097cccfe31b0a8ae366afb2c3bed9ee099b7
vyorkin/tiger
driver.ml
open Core open Lexer open Syntax let rec tokens buf = match read buf with | EOF -> [EOF] | tok -> tok::tokens buf let lex_print ch = ch |> Lexing.from_channel |> tokens |> List.iter ~f:(fun e -> Format.printf "%s\n" (show_exp e)) let run filename () = In_channel.with_file filename ~f:lex_print let (...
null
https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter2/driver.ml
ocaml
open Core open Lexer open Syntax let rec tokens buf = match read buf with | EOF -> [EOF] | tok -> tok::tokens buf let lex_print ch = ch |> Lexing.from_channel |> tokens |> List.iter ~f:(fun e -> Format.printf "%s\n" (show_exp e)) let run filename () = In_channel.with_file filename ~f:lex_print let (...
a4d64d405919aef4c872fe670deb39dddff33147da81ad4663520d711f262a75
well-typed-lightbulbs/ocaml-esp32
alias_analysis.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/middle_end/flambda/alias_analysis.ml
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2014 - -2016 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the [@@@ocaml.warning "+a-4-9-30-40-41-42-66"] open! Int_replace_polymor...
60135148da410d32d6c30f319ec9fc599b8f3b23cd67ca855bac393cc394c7df
AccelerateHS/accelerate-llvm
State.hs
{-# LANGUAGE CPP #-} # LANGUAGE TemplateHaskell # -- | Module : Data . Array . Accelerate . . State Copyright : [ 2014 .. 2015 ] The Accelerate Team -- License : BSD3 -- Maintainer : < > -- Stability : experimental Portability : non - portable ( GHC extensions ) -- module Data...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/cf081587fecec23a19f68bfbd31334166868405e/icebox/accelerate-llvm-multidev/Data/Array/Accelerate/LLVM/Multi/State.hs
haskell
# LANGUAGE CPP # | License : BSD3 Stability : experimental accelerate cuda standard library environment; copied from that backend. targets. This spawns a thread to control each execution unit. A lazy binary splitting work-stealing scheduler is used to balance the load amongst the availab...
# LANGUAGE TemplateHaskell # Module : Data . Array . Accelerate . . State Copyright : [ 2014 .. 2015 ] The Accelerate Team Maintainer : < > Portability : non - portable ( GHC extensions ) module Data.Array.Accelerate.LLVM.Multi.State ( evalMulti, createTarget, defaultTarget ) where impor...
ed8e7dbe66ad4dc641c6a6de1c44e7448dac2cd60ddeee8743dc1e0babaa52db
c-cube/frog-utils
foo.ml
open OUnit2 let id x = x (* Testing for froglock *) let expect_line stream l = let s = String.init (String.length l) (fun _ -> Stream.next stream) in assert_equal ~printer:id l s; assert_equal '\n' (Stream.next stream) let expect lines s = List.iter (expect_line s) lines let lock_echo_1 ctxt = assert_comma...
null
https://raw.githubusercontent.com/c-cube/frog-utils/3f68c606a7abe702f9e22a0606080191a2952b18/test/foo.ml
ocaml
Testing for froglock Testing for frogmap All tests
open OUnit2 let id x = x let expect_line stream l = let s = String.init (String.length l) (fun _ -> Stream.next stream) in assert_equal ~printer:id l s; assert_equal '\n' (Stream.next stream) let expect lines s = List.iter (expect_line s) lines let lock_echo_1 ctxt = assert_command ~foutput:(expect ["1...
51bc780f1b6f9de7df33b973976103975974a563d47189d340b041d5f6663e95
MyDataFlow/ttalk-server
rest_pastebin_app.erl
%% Feel free to use, reuse and abuse the code in this file. @private -module(rest_pastebin_app). -behaviour(application). %% API. -export([start/2]). -export([stop/1]). %% API. start(_Type, _Args) -> Dispatch = cowboy_router:compile([ {'_', [ {"/[:paste_id]", toppage_handler, []} ]} ]), {ok, _} = cowboy...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/examples/rest_pastebin/src/rest_pastebin_app.erl
erlang
Feel free to use, reuse and abuse the code in this file. API. API.
@private -module(rest_pastebin_app). -behaviour(application). -export([start/2]). -export([stop/1]). start(_Type, _Args) -> Dispatch = cowboy_router:compile([ {'_', [ {"/[:paste_id]", toppage_handler, []} ]} ]), {ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [ {env, [{dispatch, Dispatch}]} ])...
f4d0d8f23bf37db5475c4f2cc7d8cfebaa090ac1f17082ccadb4e1d27cd45bf7
SimulaVR/godot-haskell
GIProbe.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.GIProbe (Godot.Core.GIProbe._SUBDIV_64, Godot.Core.G...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/GIProbe.hs
haskell
# NOINLINE bindGIProbe_get_extents # # NOINLINE bindGIProbe_get_probe_data # | How much light propagates through the probe internally. A higher value allows light to spread further. | How much light propagates through the probe internally. A higher value allows light to spread further. | How much light propagates th...
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.GIProbe (Godot.Core.GIProbe._SUBDIV_64, Godot.Core.G...
2765f089a08ac9a3bedf3d96cb46306a92d720c8432f756752c1a7b5e8db2693
whalliburton/academy
cellular-automata.lisp
(in-package :academy) (defparameter *rule-patterns* '((nil nil nil) (nil nil t) (nil t nil) (nil t t) (t nil nil) (t nil t) (t t nil) (t t t))) (defun pick-rules (rule) (loop for row in *rule-patterns* for index from 0 when (logbitp index rule) collect row)) (defun cellular-automata (&opt...
null
https://raw.githubusercontent.com/whalliburton/academy/87a1a13ffbcd60d8553e42e647c59486c761e8cf/cellular-automata.lisp
lisp
(in-package :academy) (defparameter *rule-patterns* '((nil nil nil) (nil nil t) (nil t nil) (nil t t) (t nil nil) (t nil t) (t t nil) (t t t))) (defun pick-rules (rule) (loop for row in *rule-patterns* for index from 0 when (logbitp index rule) collect row)) (defun cellular-automata (&opt...
0f4b9d41b55ee3b71e2c4aaf881d0f3a7e24ca73f142f187ee1125d8119d3a0d
rudenoise/mirage-dashboard
repo_info.mli
val get_info : Github_wrapper.repo_with_token -> Yojson.json Lwt.t
null
https://raw.githubusercontent.com/rudenoise/mirage-dashboard/f109ad96d68701addd2ac7cc0be87d706f7eab50/src/repo_info.mli
ocaml
val get_info : Github_wrapper.repo_with_token -> Yojson.json Lwt.t
c807e8b8927bb2be32f47be14a77d884ff8d51579a1fb5406358621ebb421068
zachgk/catln
Show.hs
-------------------------------------------------------------------- -- | Module : . Show Copyright : ( c ) 2019 License : MIT -- Maintainer: -- Stability : experimental -- Portability: non-portable -- -- This module is used in the middle of type checking to print -- sections of the program (in...
null
https://raw.githubusercontent.com/zachgk/catln/4fc0ed5d64fbf5f5f07b1a602d72de1fca9632ee/src/TypeCheck/Show.hs
haskell
------------------------------------------------------------------ | Maintainer: Stability : experimental Portability: non-portable This module is used in the middle of type checking to print sections of the program (in modified type checking form) out to the user. It is most often used for printing errors t...
Module : . Show Copyright : ( c ) 2019 License : MIT module TypeCheck.Show where import Semantics import Semantics.Prgm import TypeCheck.Common showM :: FEnv -> VarMeta -> TypeCheckResult ShowMeta showM env m = do stype <- descriptor env m return $ mapMetaDat (...
0a5799b0909ba19f731931d07ae74075369d93d7e6a75b775381e8a58f48439d
jgoerzen/gopherbot
DBProcs.hs
Copyright ( C ) 2005 < > 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 . This program is distributed in ...
null
https://raw.githubusercontent.com/jgoerzen/gopherbot/6e83120d108d7b73d82e9949c41148bd260d17aa/DBProcs.hs
haskell
Copyright ( C ) 2005 < > 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 . This program is distributed in ...
b2c1f59375b69fdb1e994c084585b7e0747287e7233bd51d8b7415b7c88cd546
maxima-project-on-github/maxima-packages
parse_token_list.lisp
parse_token_list.lisp -- supply list of tokens to parser to construct Maxima expression copyright 2021 by I release this work under terms of the GNU General Public License ;; It is assumed that the list of tokens IS NOT terminated by $; ;; therefore $; is appended to the list. (defparameter *token-list* nil) ...
null
https://raw.githubusercontent.com/maxima-project-on-github/maxima-packages/0f5440b683e453115738cdcda7227adbc631c76b/robert-dodier/from_wxmx/parse_token_list.lisp
lisp
It is assumed that the list of tokens IS NOT terminated by $; therefore $; is appended to the list. What else? Unicode plus sign? Other multiplication signs? )))) token "0" just shows there is input present; it isn't used Spurious line info shows up in the values returned by this implementation. ))))
parse_token_list.lisp -- supply list of tokens to parser to construct Maxima expression copyright 2021 by I release this work under terms of the GNU General Public License (defparameter *token-list* nil) (let ((f (symbol-function 'peek-one-token)) (g (symbol-function 'scan-one-token))) (defun peek-one...
d43d8468a5b7bd0bfab0fc3fdce30851ecb04a6bfefae0bdc891961bb5514d71
clojure-interop/google-cloud-clients
SecurityCenterClient$ListSourcesPage.clj
(ns com.google.cloud.securitycenter.v1.SecurityCenterClient$ListSourcesPage (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.securitycenter.v1 SecurityCenterClient$ListSourcesPage])) (defn create-page-async "context - `com.google.api.gax.rpc.PageContext` future-response - `com.google...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.securitycenter/src/com/google/cloud/securitycenter/v1/SecurityCenterClient%24ListSourcesPage.clj
clojure
(ns com.google.cloud.securitycenter.v1.SecurityCenterClient$ListSourcesPage (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.securitycenter.v1 SecurityCenterClient$ListSourcesPage])) (defn create-page-async "context - `com.google.api.gax.rpc.PageContext` future-response - `com.google...
fa7a286b71bd2beeb43276d42018caccbd6ae6fc6bd0eea534cbb75ff04b3cf0
denisidoro/rosebud
mock_servlet.clj
(ns quark.beta.server.components.mock-servlet (:require [com.stuartsierra.component :as component] [io.pedestal.http :as bootstrap])) (defrecord MockServlet [service] component/Lifecycle (start [this] (assoc this :instance (-> service :runnable-service bootstrap/create-server))) (stop [this] (...
null
https://raw.githubusercontent.com/denisidoro/rosebud/90385528d9a75a0e17803df487a4f6cfb87e981c/server/src/quark/beta/server/components/mock_servlet.clj
clojure
(ns quark.beta.server.components.mock-servlet (:require [com.stuartsierra.component :as component] [io.pedestal.http :as bootstrap])) (defrecord MockServlet [service] component/Lifecycle (start [this] (assoc this :instance (-> service :runnable-service bootstrap/create-server))) (stop [this] (...
16cccc92a4ab5e0c0ba563a9e93491479d27e068a16b040f0f4778b0aee8f979
shriphani/tree-edit-distance
url.clj
(ns tree-edit-distance.url "Contains the URL components in the Vidal et. al paper" (:require (org.bovinegenius [exploding-fish :as uri]))) (def *num-levels-match* 2) (defn url-sim [url1 url2] (let [p1 (filter #(not (empty? %)) (-> url1 uri/path (clojure.string/split #"/"))) p2 ...
null
https://raw.githubusercontent.com/shriphani/tree-edit-distance/c26df4b0c7dc0a1c88f4dc71137889a649b6105f/src/tree_edit_distance/url.clj
clojure
(ns tree-edit-distance.url "Contains the URL components in the Vidal et. al paper" (:require (org.bovinegenius [exploding-fish :as uri]))) (def *num-levels-match* 2) (defn url-sim [url1 url2] (let [p1 (filter #(not (empty? %)) (-> url1 uri/path (clojure.string/split #"/"))) p2 ...
8129079139d8a6514cebf9a86cb8175b391ad8be3113ab7b7caef0c7a89f5ab0
onyx-platform/onyx
segment_encoder.clj
(ns ^{:no-doc true} onyx.messaging.serializers.segment-encoder (:require [taoensso.timbre :refer [debug info error warn trace fatal]]) (:import [org.agrona.concurrent UnsafeBuffer])) (defprotocol PEncoder (has-capacity? [this n-bytes]) (add-message [this bs]) (offset [this]) (length [this]) (segment-coun...
null
https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/src/onyx/messaging/serializers/segment_encoder.clj
clojure
(ns ^{:no-doc true} onyx.messaging.serializers.segment-encoder (:require [taoensso.timbre :refer [debug info error warn trace fatal]]) (:import [org.agrona.concurrent UnsafeBuffer])) (defprotocol PEncoder (has-capacity? [this n-bytes]) (add-message [this bs]) (offset [this]) (length [this]) (segment-coun...
a1124141a18de85117a30769cc57b3862dba14cf6a5d43a734ec98309a7a9f67
mattgreen/hython
Object.hs
module Hython.Object (lookup) where import Prelude hiding (lookup) import Control.Monad.IO.Class (MonadIO) import Data.Text (Text) import qualified Hython.AttributeDict as AttributeDict import qualified Hython.Class as Class import Hython.Ref import Hython.Types lookup :: (MonadIO m) => Text -> ObjectInfo -> m (Mayb...
null
https://raw.githubusercontent.com/mattgreen/hython/fcbde98e9b5a033f0d4bea73ac9914bc5e12b746/src/Hython/Object.hs
haskell
module Hython.Object (lookup) where import Prelude hiding (lookup) import Control.Monad.IO.Class (MonadIO) import Data.Text (Text) import qualified Hython.AttributeDict as AttributeDict import qualified Hython.Class as Class import Hython.Ref import Hython.Types lookup :: (MonadIO m) => Text -> ObjectInfo -> m (Mayb...
d14063b1ede84a200cfb3bb947a7f81bc16338f05d4af7b44e29b8e2f762b284
DerekCuevas/interview-cake-clj
project.clj
(defproject in-place-shuffle "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :main ^:skip-aot in-place-shuffle.core :target-path "target/%s" :profiles {:uberjar {:aot :all}...
null
https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/in-place-shuffle/project.clj
clojure
(defproject in-place-shuffle "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :main ^:skip-aot in-place-shuffle.core :target-path "target/%s" :profiles {:uberjar {:aot :all}...
63d13ea517bb1d2d8f10e1b2346174b946ff60044f7d795b926cd4bf367ca162
SahilKang/cl-avro
timestamp-micros.lisp
Copyright 2021 Google LLC ;;; ;;; This file is part of cl-avro. ;;; ;;; cl-avro is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option) any later version. ;...
null
https://raw.githubusercontent.com/SahilKang/cl-avro/70fcaa32514cfb59b75812b2eab45ed24cce9d27/src/logical/timestamp-micros.lisp
lisp
This file is part of cl-avro. cl-avro is free software: you can redistribute it and/or modify (at your option) any later version. cl-avro 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 t...
Copyright 2021 Google LLC it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package #:cl-user) (defpackage #:cl-avro.internal.timestamp-micros (:use #:c...
58b9c2272a2469ba17fb540b6ed6eb42e98f43535a04869a6759c89f6b7f5831
robert-strandh/SICL
remove-unused-block-asts.lisp
(cl:in-package #:cleavir-ast-transformations) We turn unused BLOCK - ASTs into PROGN - ASTs . (defun remove-unused-block-asts (ast) (let ((used-block-asts '())) ;; For each RETURN-FROM-AST, register its corresponding BLOCK-AST ;; as being used. (map-asts (lambda (ast) (when (typep ast '...
null
https://raw.githubusercontent.com/robert-strandh/SICL/598a3170980fb8e2f0a62678d688e6b79356a086/Code/Cleavir/AST-transformations/remove-unused-block-asts.lisp
lisp
For each RETURN-FROM-AST, register its corresponding BLOCK-AST as being used. For each unused BLOCK-AST, turn it into a PROGN-AST.
(cl:in-package #:cleavir-ast-transformations) We turn unused BLOCK - ASTs into PROGN - ASTs . (defun remove-unused-block-asts (ast) (let ((used-block-asts '())) (map-asts (lambda (ast) (when (typep ast 'cleavir-ast:return-from-ast) (pushnew (cleavir-ast:block-ast ast) used-blo...