_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
ad68eac33dbd873c7ec09073506dd2feda66d667635a31068f6bd69d04628751
triffon/fp-2022-23
streams.rkt
#lang racket ;;; Допускаме, че боравим с безкрайни потоци. Така можем да си пишем бездънни рекурсии . (define-syntax cons-stream (syntax-rules () ((cons-stream h t) (cons h (delay t))))) (define (first n s) (if (= n 0) '() (cons (head s) (first (- n 1) (tail s))))) (define (from n) (cons...
null
https://raw.githubusercontent.com/triffon/fp-2022-23/92c1560dfc542abb08d0843af168dd57898cd033/exercises/cs2/07.scheme.assoc-graphs-streams/solutions/streams.rkt
racket
Допускаме, че боравим с безкрайни потоци. -- друго решение -- друго решение ако няма такава, връща #f премахва #f
#lang racket Така можем да си пишем бездънни рекурсии . (define-syntax cons-stream (syntax-rules () ((cons-stream h t) (cons h (delay t))))) (define (first n s) (if (= n 0) '() (cons (head s) (first (- n 1) (tail s))))) (define (from n) (cons-stream n (from (+ n 1)))) (define head car) ...
81fe7491b304fa81eb44a598b9f2d6658d5a7177a5674810af3900eb373fd292
MercuryTechnologies/moat
Moat.hs
{-# LANGUAGE BangPatterns #-} # language PatternSynonyms # # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE DerivingStrategies # {-# LANGUAGE MultiWayIf #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # ...
null
https://raw.githubusercontent.com/MercuryTechnologies/moat/6fc4d51ed976265c55be6bef17486f09044093b5/src/Moat.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE DeriveTraversable # # LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # to the library should be the documentation and examples of 'mobileGen'. See also 'mobileGenWith' and 'mobileGenWithTags'. This library is in alpha and there are a number of known bugs which shouldn't aff...
# language PatternSynonyms # # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # | The moat library allows generation of and ...
2c354f887b1ca037f884eea8d777b3d39758ed08e01b2179ca3ddf21eb8c5191
KDr2/sb-fastcgi
test.lisp
;;; ;;; sb-fastcgi : -fastcgi.html ;;; Author : KDr2 < > ;;; ;;; License : BSD License ;;; A1 . load sb - fascgi asdf (asdf:operate 'asdf:load-op 'sb-fastcgi) ;;; A2. load libfcgi.so (sb-fastcgi:load-libfcgi "/usr/lib/libfcgi.so.0.0.0") ;;; B1. simple app using fcgi-style interface (defun simple-app (req) ...
null
https://raw.githubusercontent.com/KDr2/sb-fastcgi/f22dc600a853a6d404ade7451070611942e02adc/test.lisp
lisp
sb-fastcgi : -fastcgi.html License : BSD License A2. load libfcgi.so B1. simple app using fcgi-style interface post body B2. run the simple app above C4. a nested WSGI-style app example call inner app reset X-author in headers
Author : KDr2 < > A1 . load sb - fascgi asdf (asdf:operate 'asdf:load-op 'sb-fastcgi) (sb-fastcgi:load-libfcgi "/usr/lib/libfcgi.so.0.0.0") (defun simple-app (req) (let ((c (format nil "Content-Type: text/plain Hello, I am a fcgi-program using Common-Lisp ~%~A~%" (sb-fastcgi:fcgx-getenv...
b257d9ef264641d1d417acb994fdf21dd335ab26d3898888a4502dcfd34ae9c9
Decentralized-Pictures/T4L3NT
test_activation.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/test/test_activation.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETH...
628fee66035dda4fb77d784056ecdaea99dfaec6ab08e64d7134e42407d296c9
theodormoroianu/SecondYearCourses
lab6-sol_20210115144207.hs
-- / import Data.Char import Data.List import Test.QuickCheck 1 . rotate :: Int -> [Char] -> [Char] rotate n l | n > 0 , n < length l = suf ++ pre where (pre, suf) = splitAt n l rotate _ _ = error "număr negativ sau prea mare" 2 . prop_rotate :: Int -> String -> Bool prop_rotate k str = rotate (l ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab6/lab6-sol_20210115144207.hs
haskell
/
import Data.Char import Data.List import Test.QuickCheck 1 . rotate :: Int -> [Char] -> [Char] rotate n l | n > 0 , n < length l = suf ++ pre where (pre, suf) = splitAt n l rotate _ _ = error "număr negativ sau prea mare" 2 . prop_rotate :: Int -> String -> Bool prop_rotate k str = rotate (l - m) ...
5769886f58b90a42bd4351d09362fbdc6dc372532ae90748984da8af72cc182b
YoEight/eventstore
Bus.hs
# LANGUAGE ScopedTypeVariables # -------------------------------------------------------------------------------- -- | -- Module : Test.Bus Copyright : ( C ) 2017 -- License : (see the file LICENSE) -- Maintainer : < > -- Stability : provisional -- Portability : non-portable -- --------------------------------...
null
https://raw.githubusercontent.com/YoEight/eventstore/8ca0f72acfc85b97de0a1862d38ee6e9f2ae2e4c/tests/Test/Bus.hs
haskell
------------------------------------------------------------------------------ | Module : Test.Bus License : (see the file LICENSE) Stability : provisional Portability : non-portable ------------------------------------------------------------------------------ ---------------------------------------------------...
# LANGUAGE ScopedTypeVariables # Copyright : ( C ) 2017 Maintainer : < > module Test.Bus where import Database.EventStore.Internal.Test hiding (i) import Test.Common import Test.Tasty.Hspec spec :: Spec spec = beforeAll (createLoggerRef testGlobalLog) $ do specify "Bus dispatches only one time" $ \logRef ...
477897bf3a954c2c892eee86241b0c3c751bbf5a2de0ad8b2ce7718dd06fc107
Bodigrim/linear-builder
Buffer.hs
-- | Copyright : ( c ) 2022 Licence : BSD3 Maintainer : < > -- -- 'Buffer' for strict 'Text', based on linear types. module Data.Text.Builder.Linear.Buffer ( Buffer, runBuffer, runBufferBS, dupBuffer, consumeBuffer, eraseBuffer, foldlIntoBuffer, (|>), (|>.), (|>#), (<|), (.<...
null
https://raw.githubusercontent.com/Bodigrim/linear-builder/6a3fb0ff0ed5d7cfd6d23c1696dfef402b7953ae/src/Data/Text/Builder/Linear/Buffer.hs
haskell
| 'Buffer' for strict 'Text', based on linear types. | Append 'Text' suffix to a 'Buffer' by mutating it. If a suffix is statically known, consider using '(|>#)' for optimal performance. >>> :set -XOverloadedStrings -XLinearTypes >>> runBuffer (\b -> b |> "foo" |> "bar") | Prepend 'Text' prefix to a 'Buffer' b...
Copyright : ( c ) 2022 Licence : BSD3 Maintainer : < > module Data.Text.Builder.Linear.Buffer ( Buffer, runBuffer, runBufferBS, dupBuffer, consumeBuffer, eraseBuffer, foldlIntoBuffer, (|>), (|>.), (|>#), (<|), (.<|), (<|#), (><), (|>$), ($<|), (|>%), (%<|), (|>...
2abdf914435514a77f2272d81c5ee4887ac2b5ab95c648fc3262847f113939f6
ocsigen/ocsigenserver
ocsigen_lib_base.ml
Ocsigen * Copyright ( C ) 2005 - 2008 , * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at ...
null
https://raw.githubusercontent.com/ocsigen/ocsigenserver/d468cf464dcc9f05f820c35f346ffdbe6b9c7931/src/baselib/ocsigen_lib_base.ml
ocaml
*************************************************************************** *************************************************************************** circular lists *************************************************************************** ***************************************************************************...
Ocsigen * Copyright ( C ) 2005 - 2008 , * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at ...
fbc26bc367aa1169a5f7810cd9c98cfbf2b9cae70229dbe251d67a830651e34e
haskus/packages
Allocator.hs
-- | Memory allocators module ViperVM.Utils.Allocator ( ) where -- We can allocate and manage memory in different ways. -- * it can be garbage-collected or not -- * pinned or not -- * aligned or not
null
https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-utils/src/lib/Haskus/Utils/Allocator.hs
haskell
| Memory allocators We can allocate and manage memory in different ways. * it can be garbage-collected or not * pinned or not * aligned or not
module ViperVM.Utils.Allocator ( ) where
7bedc2cb1704a88bd4b7474eed486bdbe170e83dfe59db43eee988618fecac22
coccinelle/coccinelle
arrayLabels.mli
type 'a t = 'a array external length : 'a array -> int = "%array_length" external get : 'a array -> int -> 'a = "%array_safe_get" external set : 'a array -> int -> 'a -> unit = "%array_safe_set" external make : int -> 'a -> 'a array = "caml_make_vect" external create : int -> 'a -> 'a array = "caml_make_vect" val init ...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.11/arrayLabels.mli
ocaml
type 'a t = 'a array external length : 'a array -> int = "%array_length" external get : 'a array -> int -> 'a = "%array_safe_get" external set : 'a array -> int -> 'a -> unit = "%array_safe_set" external make : int -> 'a -> 'a array = "caml_make_vect" external create : int -> 'a -> 'a array = "caml_make_vect" val init ...
e9b1a179b735f11658472f0a3e65fece33f8a1745badfc3fc20589aa4bdd5938
aantron/luv
buffer.mli
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) (** Data buffers. *) (** {1 Basics} *) type t = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t * Buffers with C storage . These are ( [ char ] bi...
null
https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/buffer.mli
ocaml
* Data buffers. * {1 Basics} * Allocates a fresh buffer of the given size. * Evaluates to the size of the given buffer. * [Luv.Buffer.get buffer index] retrieves the character in [buffer] at [index]. Can also be written as [buffer.{index}]. * Like {!Luv.Buffer.get}, but does not perform a bounds check. *...
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) type t = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t * Buffers with C storage . These are ( [ char ] bigarrays ) . Roughly speaking , they ...
ef54a5e2e24031636e181c8a07dc4250a0c7b97535282fd3ea6ea3895f446b78
scarvalhojr/haskellbook
cipher.hs
import Data.Char (chr, ord, isAsciiUpper, isAsciiLower) rotateLetter :: Char -> Int -> Char rotateLetter c r | isAsciiLower c = shift (ord 'a') | isAsciiUpper c = shift (ord 'A') | otherwise = c where shift base = chr (base + (((ord c) - base + r) `mod` len)) len = 1 + (ord 'z') - (ord 'a'...
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter11/cipher.hs
haskell
import Data.Char (chr, ord, isAsciiUpper, isAsciiLower) rotateLetter :: Char -> Int -> Char rotateLetter c r | isAsciiLower c = shift (ord 'a') | isAsciiUpper c = shift (ord 'A') | otherwise = c where shift base = chr (base + (((ord c) - base + r) `mod` len)) len = 1 + (ord 'z') - (ord 'a'...
dae67c83c529935946512acc26c8536b22119be04327453c52b3db14146bc4a8
dongcarl/guix
cve.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2015 , 2016 , 2019 < > ;;; ;;; 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...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/tests/cve.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 © 2015 , 2016 , 2019 < > 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 (test-cve) #:use-module (guix cve) #:use-module (srfi srfi-1) #:use-module (srf...
e16d86517f881297a3dfee9df0caca9bd6b1d2177ac9ebab1e20b3c6693b0342
CodyReichert/qi
ffi.lisp
Copyright ( C ) 2001 , 2003 Copyright ( C ) 2005 " the conditions and ENSURE - SSL - FUNCALL are by . " ;;; ;;; See LICENSE for details. #+xcvb (module (:depends-on ("package" "conditions"))) (eval-when (:compile-toplevel) (declaim (optimize (speed 3) (space 1) (safety 1) (debug 0) (compilation-s...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/cl%2Bssl-latest/ffi.lisp
lisp
See LICENSE for details. Global state Constants Misc Function definitions We don't refer SSLv2_client_method as the default of the SSL v2 protocol (see and -plus-ssl/cl-plus-ssl/issues/6) (cffi:defcfun ("SSLv2_client_method" ssl-v2-client-method) ssl-method) either +ssl-filetype-pem+ or +ssl-file...
Copyright ( C ) 2001 , 2003 Copyright ( C ) 2005 " the conditions and ENSURE - SSL - FUNCALL are by . " #+xcvb (module (:depends-on ("package" "conditions"))) (eval-when (:compile-toplevel) (declaim (optimize (speed 3) (space 1) (safety 1) (debug 0) (compilation-speed 0)))) (in-package :cl+ssl) ...
bef0c728348f5d53ae84cfd21ab440089897806704fb88880d6500bb46efd876
ucsd-progsys/dsolve
funtuple.ml
let produce _ = (5, 20) let _ = match produce () with (a, b) -> assert(a < b)
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/funtuple.ml
ocaml
let produce _ = (5, 20) let _ = match produce () with (a, b) -> assert(a < b)
5970f54d4104d04d56149d5dfba7ec91432c106a09fbbfe77eb0fe1ebd54525c
janestreet/memtrace_viewer
fragment_trie_intf.ml
open! Core module type Location = sig type t [@@deriving bin_io, sexp, equal] include Hashable.S with type t := t val dummy : t module Debug : sig type nonrec t = t [@@deriving sexp_of] end end module type Entry = sig type t [@@deriving bin_io, sexp] module Debug : sig type nonrec t = t [@@d...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/common/fragment_trie_intf.ml
ocaml
* A backtrace, represented from toplevel to allocation site * * A backtrace, represented from allocation site to toplevel * A fragment and an orientation. Can be thought of as a tree node -- with its extensions as children and it's retraction as parent. * An iterator that iterates through the prefixes of a fr...
open! Core module type Location = sig type t [@@deriving bin_io, sexp, equal] include Hashable.S with type t := t val dummy : t module Debug : sig type nonrec t = t [@@deriving sexp_of] end end module type Entry = sig type t [@@deriving bin_io, sexp] module Debug : sig type nonrec t = t [@@d...
0c947efc1cfc4a6a6a366e31060db8ca111ae4018b41b467c80096e80fa5dbd9
AndrasKovacs/ELTE-func-lang
Notes06.hs
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveTraversable #-} import Control.Monad newtype State s a = State {runState :: s -> (a, s)} deriving Functor instance Applicative (State s) where pure = return (<*>) = ap instance Monad (State s) where return a = State (\s -> (a, s)) S...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2020-21-1/gyak_1/Notes06.hs
haskell
# LANGUAGE DeriveTraversable # ------------------------------------------------------------------------------ sum, length, elem foldr (:) [] (Leaf a) == (a : []) : : b foldr (:) [] (Leaf a) = (:) a [] = a:[] = [a] foldr (:) [] (Node (Leaf x) (Leaf y)) = foldr (:) (foldr (:) [] (Leaf y)) (Leaf x) fo...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # import Control.Monad newtype State s a = State {runState :: s -> (a, s)} deriving Functor instance Applicative (State s) where pure = return (<*>) = ap instance Monad (State s) where return a = State (\s -> (a, s)) State f >>= g = State (\s -> case f ...
de6222e270b6c41e5d155e5010671885d1c267607ce274c7e3a26e81e237c614
FranklinChen/learn-you-some-erlang
kitty_server.erl
Naive version -module(kitty_server). -export([start_link/0, order_cat/4, return_cat/2, close_shop/1]). -record(cat, {name, color=green, description}). %%% Client API start_link() -> spawn_link(fun init/0). %% Synchronous call order_cat(Pid, Name, Color, Description) -> Ref = erlang:monitor(proces...
null
https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/kitty_server.erl
erlang
Client API Synchronous call This call is asynchronous Synchronous call Server functions got to empty the stock do some logging here too Private functions
Naive version -module(kitty_server). -export([start_link/0, order_cat/4, return_cat/2, close_shop/1]). -record(cat, {name, color=green, description}). start_link() -> spawn_link(fun init/0). order_cat(Pid, Name, Color, Description) -> Ref = erlang:monitor(process, Pid), Pid ! {self(), Ref, {or...
866b4ddd48a560226c6573eda190218f973b3bf5f590e14edbc28ce718f10045
jrm-code-project/LISP-Machine
streams.lisp
-*- Mode : LISP ; Package : LISP - IO ; ; : CL -*- ;;; ;;; STREAMS.LISP ;;; ;;; Still to do: ;;; with-open-stream, with-input-from-string, with-output-to-string ;;; (the latter need fooling around with declarations) ;;; Make-string-output-stream sorely needs optimization. ;;;--------------------------------...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/rauen/streams.lisp
lisp
Package : LISP - IO ; ; : CL -*- STREAMS.LISP Still to do: with-open-stream, with-input-from-string, with-output-to-string (the latter need fooling around with declarations) Make-string-output-stream sorely needs optimization. ---------------------------------------------------------------------------- ...
stream by either the INVOKE - INPUT - OPERATION or the INVOKE - OUTPUT - OPERATION : INPUT - STREAM - P , no arguments , in the INPUT - STREAM - PRED slot . Returns : INPUT - TYPE , no arguments , in the INPUT - ELEMENT - TYPE - PROC slot . : - CHAR , one argument , in the UNREAD - CHAR - PROC slot ....
2c379b8b97e9967ae9902b0daceda7e7afba83d6831bef8b48b873bf43f927a8
techascent/tech.datatype
masked.clj
(ns tech.v2.datatype.iterable.masked (:require [tech.v2.datatype.protocols :as dtype-proto] [tech.v2.datatype.casting :as casting] [tech.v2.datatype.typecast :as typecast])) (defmacro make-masked-iterable-impl [datatype] `(fn [datatype# values# mask# unchecked?#] (reify dtype...
null
https://raw.githubusercontent.com/techascent/tech.datatype/8cc83d771d9621d580fd5d4d0625005bd7ab0e0c/src/tech/v2/datatype/iterable/masked.clj
clojure
(ns tech.v2.datatype.iterable.masked (:require [tech.v2.datatype.protocols :as dtype-proto] [tech.v2.datatype.casting :as casting] [tech.v2.datatype.typecast :as typecast])) (defmacro make-masked-iterable-impl [datatype] `(fn [datatype# values# mask# unchecked?#] (reify dtype...
3849ca188bdbf275cf0119f02f86ebe2993c7a064c4fe2f3ff269a0f0abd35d3
dstorrs/struct-plus-plus
test_make_functional_setter.rkt
#!/usr/bin/env racket #lang at-exp racket (require handy/test-more "../make_functional_setter.rkt") (expect-n-tests 8) (when #t (test-suite "basics" (struct book (title num-pages filepath) #:transparent) (define orig-args (list "Foundation" 297 (build-path "/foo/bar"))) (define b (apply book...
null
https://raw.githubusercontent.com/dstorrs/struct-plus-plus/e9e09232533d6c3bc3f5f69554605bba379836e6/tests/test_make_functional_setter.rkt
racket
#!/usr/bin/env racket #lang at-exp racket (require handy/test-more "../make_functional_setter.rkt") (expect-n-tests 8) (when #t (test-suite "basics" (struct book (title num-pages filepath) #:transparent) (define orig-args (list "Foundation" 297 (build-path "/foo/bar"))) (define b (apply book...
08aeaf7d36bbed330bac19e969eb9e699e96ed9e659858e719bbdb0d3426f7ea
hsyl20/haskus-system
Solver.hs
# LANGUAGE LambdaCase # -- | Constraint solver module Haskus.Arch.X86_64.ISA.Solver ( X86Rule , X86Constraint -- * Predicates , X86Pred (..) , X86Err , ContextPred (..) , InsnPred (..) , PrefixPred (..) , EncodingPred (..) , X86PredOracle , PredError (..) , checkOracle , pPrefix ...
null
https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system/src/lib/Haskus/Arch/X86_64/ISA/Solver.hs
haskell
| Constraint solver * Predicates * Rules | Context predicate ^ Execution mode ^ CS.D segment descriptor flag | Prefix predicates ^ W bit ^ L bit | Instruction specific predicates ^ Set Force8Bit bit in the opcode ^ Set Size bit in the FPU opcode ^ Sign-extend opcode bit set | Encoding predicates ^ Legacy...
# LANGUAGE LambdaCase # module Haskus.Arch.X86_64.ISA.Solver ( X86Rule , X86Constraint , X86Pred (..) , X86Err , ContextPred (..) , InsnPred (..) , PrefixPred (..) , EncodingPred (..) , X86PredOracle , PredError (..) , checkOracle , pPrefix , sPrefix , pRegModRM , sRegModRM...
4a50fab80338057f650681cef7d64ee16a5253c658d39b1ccc154686369ba3bd
pavankumarbn/DroneGUIROS
FlightAnim.lisp
; Auto-generated. Do not edit! (cl:in-package ardrone_autonomy-srv) // ! \htmlinclude (cl:defclass <FlightAnim-request> (roslisp-msg-protocol:ros-message) ((type :reader type :initarg :type :type cl:fixnum :initform 0) (duration :reader duration :initarg :duration :type cl:integer...
null
https://raw.githubusercontent.com/pavankumarbn/DroneGUIROS/745320d73035bc50ac4fea2699e22586e10be800/devel/share/common-lisp/ros/ardrone_autonomy/srv/FlightAnim.lisp
lisp
Auto-generated. Do not edit! //! \htmlinclude FlightAnim-response.msg.html
(cl:in-package ardrone_autonomy-srv) // ! \htmlinclude (cl:defclass <FlightAnim-request> (roslisp-msg-protocol:ros-message) ((type :reader type :initarg :type :type cl:fixnum :initform 0) (duration :reader duration :initarg :duration :type cl:integer :initform 0)) ) (cl:defcl...
29c878865dc07287fc1866336664cd2deb185bbe3a9b22256810e2b12a038bd5
ralsei/sawzall
combining-join.rkt
#lang racket/base (require data-frame fancy-app racket/contract/base racket/list "generic-join.rkt" "grouped-df.rkt" "grouping.rkt") (provide (contract-out [left-join (-> (or/c data-frame? grouped-data-frame?) (or/c data-frame? ...
null
https://raw.githubusercontent.com/ralsei/sawzall/99ce018608025b39f8d3ee6e8b18c825ea0daa66/sawzall-lib/combining-join.rkt
racket
combine on all shared matches if df1 > df2, do nothing only do something if we're equal keep adding #f no matter what
#lang racket/base (require data-frame fancy-app racket/contract/base racket/list "generic-join.rkt" "grouped-df.rkt" "grouping.rkt") (provide (contract-out [left-join (-> (or/c data-frame? grouped-data-frame?) (or/c data-frame? ...
3bd462bc4ad41f89db37b39e5104bb64bc56eaee92c9d35f966a6b2d27aeab84
ocsigen/lwt
test.ml
let () = let p1 = let open Lwt.Let_syntax in let%bind x = Lwt.return 1 in let%map y = Lwt.return (x + 1) in y + 1 in let p2 = let open Lwt_result.Let_syntax in let%bind x = Lwt_result.return 2 in let%map y = Lwt_result.return (x + 3) in x + y in let p = let%bind.Lwt p1 = ...
null
https://raw.githubusercontent.com/ocsigen/lwt/9943ba77a5508feaea5e1fb60b011db4179f9c61/test/ppx_let/test.ml
ocaml
let () = let p1 = let open Lwt.Let_syntax in let%bind x = Lwt.return 1 in let%map y = Lwt.return (x + 1) in y + 1 in let p2 = let open Lwt_result.Let_syntax in let%bind x = Lwt_result.return 2 in let%map y = Lwt_result.return (x + 3) in x + y in let p = let%bind.Lwt p1 = ...
045a3b4ef08021a6dae7937e78bc2cf4028a93eeae89fff88fdced42c360720e
input-output-hk/cardano-ledger-byron
Signature.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DerivingStrategies #-} {-# LANGUAGE DerivingVia #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/crypto/src/Cardano/Crypto/Signing/Signature.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DerivingVia # # LANGUAGE OverloadedStrings # * Signature * Signing * Verification ------------------------------------------------------------------------------ -...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # module Cardano.Crypto.Signing.Signature ( Signature(..) , toCBORXSignature , fromCBORXSignature , fullS...
2b85ec84b2188320e837680b2375ca29aa2527ba356c551ac22aad1f38155644
ndmitchell/weeder
QuasiQuoter.hs
# OPTIONS_GHC -Wno - missing - fields # module Dir.QuasiQuoter(quasi) where import Language.Haskell.TH.Quote # NOINLINE quasi # quasi :: QuasiQuoter quasi = QuasiQuoter {quoteDec = const $ return []}
null
https://raw.githubusercontent.com/ndmitchell/weeder/3bc7ee09de6faf34cd60a0f4554aa1baf36f25e8/test/foo/src/Dir/QuasiQuoter.hs
haskell
# OPTIONS_GHC -Wno - missing - fields # module Dir.QuasiQuoter(quasi) where import Language.Haskell.TH.Quote # NOINLINE quasi # quasi :: QuasiQuoter quasi = QuasiQuoter {quoteDec = const $ return []}
6420d9c5eeed3b00c45f3e6bc3273b398aaaf6cd60d8e484fd6c7f5537c54302
repl-electric/cassiopeia
learning.clj
(ns cassiopeia.destination.mr (:use overtone.live) (:use mud.core) (:use cassiopeia.waves.synths) (:use cassiopeia.samples) (:use cassiopeia.engine.buffers) (:use cassiopeia.dirt) (:require [mud.timing :as time] [clojure.math.numeric-tower :as math] [overtone.studio.fx :as fx])) (...
null
https://raw.githubusercontent.com/repl-electric/cassiopeia/a42c01752fc8dd04ea5db95c8037f393c29cdb75/src/cassiopeia/destination/learning.clj
clojure
release release (kill deep-basz) (kill highlight-deep) (kill deep-basz2) Play around with some random inversions BEGIN Drums enter + melody High voice enters Drums stop, rising tension Drums kick back in, background note pushing END Play around with some random inversions
(ns cassiopeia.destination.mr (:use overtone.live) (:use mud.core) (:use cassiopeia.waves.synths) (:use cassiopeia.samples) (:use cassiopeia.engine.buffers) (:use cassiopeia.dirt) (:require [mud.timing :as time] [clojure.math.numeric-tower :as math] [overtone.studio.fx :as fx])) (...
8f839afcc99dcba88a0ab8a02445d66ea2abfcb184f98f4ee66c40d9b73eb0a4
tonsky/grumpy
url.cljc
(ns grumpy.core.url (:require [clojure.string :as str])) (defn encode-uri-component [s] (-> #?(:clj (java.net.URLEncoder/encode ^String s "UTF-8") :cljs (js/encodeURIComponent s)) (str/replace #"\+" "%20") (str/replace #"\%21" "!") (str/replace #"\%27" "'") (str/replace #"\%28" "(") ...
null
https://raw.githubusercontent.com/tonsky/grumpy/5d4876535cd1fd6ab2b5a2c6e21f522a9c3e4e21/src/grumpy/core/url.cljc
clojure
(ns grumpy.core.url (:require [clojure.string :as str])) (defn encode-uri-component [s] (-> #?(:clj (java.net.URLEncoder/encode ^String s "UTF-8") :cljs (js/encodeURIComponent s)) (str/replace #"\+" "%20") (str/replace #"\%21" "!") (str/replace #"\%27" "'") (str/replace #"\%28" "(") ...
39bf63f1f31bc4305415d5866c4673a7dd8f423a70a6c2442c5a26c7170f6a90
abailly/dojo-nantes
Tests.hs
module Tests where import Test.HUnit import M = " La meilleure main est " ~ : [ bestHand [ H2,D3,S5,C9,DK ] [ C2,H3,S4,C8,HA ] ~?= ( White,[HA ] ) -- ] can_detect_pair = TestList [ combination [ d2 ] ~?= HighCard 2, combination [ h3 ] ~?= HighCard 3, combination [ d4 ] ~?= HighCard...
null
https://raw.githubusercontent.com/abailly/dojo-nantes/31600a7c74d540cb0c7d4b0c5cbe239f9a2104ac/2014-05-16/Tests.hs
haskell
] recette
module Tests where import Test.HUnit import M = " La meilleure main est " ~ : [ bestHand [ H2,D3,S5,C9,DK ] [ C2,H3,S4,C8,HA ] ~?= ( White,[HA ] ) can_detect_pair = TestList [ combination [ d2 ] ~?= HighCard 2, combination [ h3 ] ~?= HighCard 3, combination [ d4 ] ~?= HighCard 3, ...
9dc9c69af547b7e41d375a93b6e2cf50d3e15bbc0262db868908609276993e44
bos/llvm
XCore.hs
# LANGUAGE ForeignFunctionInterface # module LLVM.Target.XCore(initializeTarget) where initializeTarget :: IO () initializeTarget = do initializeXCoreTargetInfo initializeXCoreTarget foreign import ccall unsafe "LLVMInitializeXCoreTargetInfo" initializeXCoreTargetInfo :: IO () foreign import ccall unsafe "LLV...
null
https://raw.githubusercontent.com/bos/llvm/819b94d048c9d7787ce41cd7c71b84424e894f64/base/LLVM/Target/XCore.hs
haskell
# LANGUAGE ForeignFunctionInterface # module LLVM.Target.XCore(initializeTarget) where initializeTarget :: IO () initializeTarget = do initializeXCoreTargetInfo initializeXCoreTarget foreign import ccall unsafe "LLVMInitializeXCoreTargetInfo" initializeXCoreTargetInfo :: IO () foreign import ccall unsafe "LLV...
b0368dbfa34d530c56aeaca9ed8b26d3c60d4359314291f63532cc2cc08a8003
jlollis/sicp-solutions
1.06.scm
#lang sicp does n't see why if needs to be provided as a special form . ` ` Why ca n't I just define it as an ordinary procedure in terms of cond ? '' she asks . 's friend claims this can indeed be done , and she defines a new version of if : ; (define (new-if predicate then-clause else-clause) ; (cond (pr...
null
https://raw.githubusercontent.com/jlollis/sicp-solutions/7b03befcfe82e26a7fb28d94bc99292bc484f9dd/Chapter%201%20Exercises/1.06.scm
scheme
(define (new-if predicate then-clause else-clause) (cond (predicate then-clause) (else else-clause))) (define (sqrt-iter guess x) (new-if (good-enough? guess x) guess (sqrt-iter (improve guess x) x))) Answer: Conditional expressions are special forms - cases...
#lang sicp does n't see why if needs to be provided as a special form . ` ` Why ca n't I just define it as an ordinary procedure in terms of cond ? '' she asks . 's friend claims this can indeed be done , and she defines a new version of if : Eva demonstrates the program for : ( new - if (= 2 3 ) 0 5 ...
73057ba1a0b9e33be48e26ac577ff9d1bde184a925b514f50dbe4d7e0a43c815
rtoy/ansi-cl-tests
continue.lsp
;-*- Mode: Lisp -*- Author : Created : Sun Mar 23 08:37:15 2003 ;;;; Contains: Tests of CONTINUE restart and function (in-package :cl-test) (deftest continue.1 (restart-case (progn (continue) 'bad) (continue () 'good)) good) (deftest continue.2 (let ((c1 (make-condition 'error)) (c...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/continue.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of CONTINUE restart and function All conditions are now associated with c1
Author : Created : Sun Mar 23 08:37:15 2003 (in-package :cl-test) (deftest continue.1 (restart-case (progn (continue) 'bad) (continue () 'good)) good) (deftest continue.2 (let ((c1 (make-condition 'error)) (c2 (make-condition 'error))) (restart-case (with-condition-restarts ...
6fda0dd094de8a8140cef33f1f21811e1557a4a4d40838333619b7e146399c9f
ocaml-multicore/multicoretests
lin_tests_dsl_domain.ml
(* ********************************************************************** *) (* Tests of in and out channels *) (* ********************************************************************** *) open Lin_tests_dsl_common_io.Lin_tests_dsl_common module IC_domain = Lin_domain.Make(IC...
null
https://raw.githubusercontent.com/ocaml-multicore/multicoretests/01300b78f680544f490d4975b5d57f779f907a58/src/io/lin_tests_dsl_domain.ml
ocaml
********************************************************************** Tests of in and out channels **********************************************************************
open Lin_tests_dsl_common_io.Lin_tests_dsl_common module IC_domain = Lin_domain.Make(ICConf) module OC_domain = Lin_domain.Make(OCConf) let _ = QCheck_base_runner.run_tests_main [ IC_domain.neg_lin_test ~count:1000 ~name:"Lin DSL In_channel test with Domain"; OC_domain.neg_lin_test ~count:1000 ~name:"Lin D...
bc767de151292b5a63308999356daf3d34c6044ca7ac689263c84e4711b154f3
facebook/duckling
AF_XX.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory . -------------...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ranking/Classifiers/AF_XX.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant --------------------------------------------------------------- Auto-generated by regenClassifiers DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW W...
Copyright ( c ) 2016 - present , Facebook , Inc. of patent rights can be found in the PATENTS file in the same directory . @generated module Duckling.Ranking.Classifiers.AF_XX (classifiers) where import Data.String import Prelude import qualified Data.HashMap.Strict as HashMap import Duckling.Ranking.Types cla...
84794f4522401015943a5d75639b904f943b789fd832b466a7a383189c044091
jdevuyst/termcat
core_macros.clj
(ns termcat.core-macros (:require [clojure.core.match :refer (match)] [clojure.core.reducers :as r] [termcat.term :as t] [termcat.rewrite :as rw])) (defmacro with-cache [cache & body] `(binding [rw/!*cache* ~cache] ~@body)) (defmacro window [init-state proj [& arg-list] & ...
null
https://raw.githubusercontent.com/jdevuyst/termcat/5b4d89da67de89e6d62933c8c407e7a79ffdb0cb/src/clj/termcat/core_macros.clj
clojure
(ns termcat.core-macros (:require [clojure.core.match :refer (match)] [clojure.core.reducers :as r] [termcat.term :as t] [termcat.rewrite :as rw])) (defmacro with-cache [cache & body] `(binding [rw/!*cache* ~cache] ~@body)) (defmacro window [init-state proj [& arg-list] & ...
9d12cb92ed1d513e84fd8dcf31a15fd87f489c33fd64c0602934c83ed6a6fdc7
atdixon/me.untethr.nostr-relay
store_migrate.clj
(ns me.untethr.nostr.common.store-migrate (:require [clojure.java.io :as io] [clojure.string :as str] [clojure.tools.logging :as log] [me.untethr.nostr.common.json-facade :as json-facade] [me.untethr.nostr.common.store :as store] [me.untethr.nostr.common.validation :as validation] [next.jd...
null
https://raw.githubusercontent.com/atdixon/me.untethr.nostr-relay/724a2af1599b630de413d78555e70bc57073552c/src/me/untethr/nostr/common/store_migrate.clj
clojure
useful for sanity or if you want to enable/disable w/in same connection. also note that when jdbc connection closes -- and presumably is the last conn closing? -- it blocks in DB while protracted checkpoint-truncate happens ... interesting. if we're using hikari we'll have to ignore connection leaks btw consider...
(ns me.untethr.nostr.common.store-migrate (:require [clojure.java.io :as io] [clojure.string :as str] [clojure.tools.logging :as log] [me.untethr.nostr.common.json-facade :as json-facade] [me.untethr.nostr.common.store :as store] [me.untethr.nostr.common.validation :as validation] [next.jd...
103ba598b77e55cae170ad26d5e7f8ec48d7841a3aeb059d0a71e7a43a0980ce
brendanhay/amazonka
ServiceId.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived fr...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/Types/ServiceId.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated | /See:/ 'newServiceId' smart constructor. | The following record fields are available, with the corresponding lenses provided for backwards compatibility: 'accountId', 'serviceId_accountId' - 'name', 'serviceId_name' - ...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived from AWS service descriptions , licensed under Apache 2.0 . Mo...
9d03f00fcea01416ed334201d94db5ce3a296cd4d4b4774b0ba8e75c5e49e712
nikivazou/liquid-meta
Unrefine.hs
{-@ LIQUID "--reflection" @-} module Unrefine where import Syntax @ reflect utype @ utype :: Type -> FType utype (TBase (TPrim p) _) = FTBase p utype (TFun _ t1 t2) = FTFun (utype t1) (utype t2) utype (TEx _ _ t) = utype t {-@ reflect uenv @-} {-@ uenv :: g:Env -> {u:UEnv | udom u == dom g } @-} ...
null
https://raw.githubusercontent.com/nikivazou/liquid-meta/c3e9f85529ab6d1135ca886bfb2808737e134f22/src/Unrefine.hs
haskell
@ LIQUID "--reflection" @ @ reflect uenv @ @ uenv :: g:Env -> {u:UEnv | udom u == dom g } @
module Unrefine where import Syntax @ reflect utype @ utype :: Type -> FType utype (TBase (TPrim p) _) = FTBase p utype (TFun _ t1 t2) = FTFun (utype t1) (utype t2) utype (TEx _ _ t) = utype t uenv :: Env -> UEnv uenv EEmp = UEEmp uenv (EBind x t e) = UEBind x (utype t) (uenv e)
dba0c28b2c8020218da9ad9dd1f4f638d7dc94a5600d0231863e8f01aaaaf82f
nervous-systems/eulalie
common.cljc
(ns eulalie.test.common (:require [eulalie.core :as eulalie] [eulalie.util :refer [env!]] #? (:clj [clojure.core.async.impl.protocols :as async-protocols]) [glossop.core :as g #? (:clj :refer :cljs :refer-macros) [go-catching <?]] #?@ (:clj ...
null
https://raw.githubusercontent.com/nervous-systems/eulalie/ee435987278f5ed628f576700b716d9d0bc17c61/test/eulalie/test/common.cljc
clojure
Most of the time, the runner is expecting a channel
(ns eulalie.test.common (:require [eulalie.core :as eulalie] [eulalie.util :refer [env!]] #? (:clj [clojure.core.async.impl.protocols :as async-protocols]) [glossop.core :as g #? (:clj :refer :cljs :refer-macros) [go-catching <?]] #?@ (:clj ...
79643b63f87035bece86313ac33301ba6ea6d8b1a2be9ccf75a9bcad5ea94cd9
shenxs/about-scheme
30.1.rkt
#lang racket ;; 这一小节介绍了如何用一般的思路来设计算法 ;; 1,对于一个问题的描述,首先我们要确定合理的数据结构(呈现数据的方式) 2,写下大致的函数的头 , 申明他们的功能 , 并且是如何得到结果的 3,理一个程序使如何计算的是非常重要的 , 他可以让你更加深入的理解你的代码 , 也可以让未来的代码的阅读者们更加容易理解这份代码 4,对于一个通用的算法来说 , 我们的设计分为两部分"trivially 对于此 , 我的理解如下 , 一个通用算法通常要考虑所面对的情况 , 有些是琐碎和边界情况 , 或者叫做特殊情况 另外一些是通常情况 . 对于特使的条件特殊处理 , 基于以上的认...
null
https://raw.githubusercontent.com/shenxs/about-scheme/d458776a62cb0bbcbfbb2a044ed18b849f26fd0f/HTDP/30.1.rkt
racket
这一小节介绍了如何用一般的思路来设计算法 1,对于一个问题的描述,首先我们要确定合理的数据结构(呈现数据的方式) (cond [else (合并解 ....问题.... .....
#lang racket 2,写下大致的函数的头 , 申明他们的功能 , 并且是如何得到结果的 3,理一个程序使如何计算的是非常重要的 , 他可以让你更加深入的理解你的代码 , 也可以让未来的代码的阅读者们更加容易理解这份代码 4,对于一个通用的算法来说 , 我们的设计分为两部分"trivially 对于此 , 我的理解如下 , 一个通用算法通常要考虑所面对的情况 , 有些是琐碎和边界情况 , 或者叫做特殊情况 另外一些是通常情况 . 对于特使的条件特殊处理 , 基于以上的认识 , 所有的算法都可以大致的如下处理 ( define ( 问题 ) [ ( 特殊问题吗 ? 问题 ) ( ...
0d6e282f1c8d394ff77dbb69db2d178c690c9a7f685004517867f59e566b80e7
forked-from-1kasper/bravo
elab.ml
open Ident open Error open Expr let extPi : value -> value * clos = function | VPi (t, g) -> (t, g) | u -> raise (ExpectedPi u) let extSig : value -> value * clos = function | VSig (t, g) -> (t, g) | u -> raise (ExpectedSig u) let extSet : value -> Z.t = function | VPre n | VKan n -> n | v ...
null
https://raw.githubusercontent.com/forked-from-1kasper/bravo/5ebc1d575119e28707035bf170bf29c35c0d9acb/elab.ml
ocaml
open Ident open Error open Expr let extPi : value -> value * clos = function | VPi (t, g) -> (t, g) | u -> raise (ExpectedPi u) let extSig : value -> value * clos = function | VSig (t, g) -> (t, g) | u -> raise (ExpectedSig u) let extSet : value -> Z.t = function | VPre n | VKan n -> n | v ...
e0811d6d5340168f25d6918f8ae7d07ba23fdcf6a757f54ff1e5403d54db1ac2
jrm-code-project/LISP-Machine
m-p.lisp
-*- Mode : LISP ; Package : SYSTEM - INTERNALS ; Base:8 ; : ZL -*- (defun blt-micro-paging-area-into-i-mem () (let ((paging-area-origin (%region-origin micro-code-paging-area))) (do ((adr 0 (+ adr 2))) ((>= adr (* 2 (* 16. (read-meter '%highest-handcode-ucode-page))))) (let ((halfword-0 (%p-ldb ...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/jrm/m-p.lisp
lisp
Package : SYSTEM - INTERNALS ; Base:8 ; : ZL -*- spot for register-symbols spot for info-list search for a line beginning with '-4' search for a line beginning with '-2' some interesting ranges:
(defun blt-micro-paging-area-into-i-mem () (let ((paging-area-origin (%region-origin micro-code-paging-area))) (do ((adr 0 (+ adr 2))) ((>= adr (* 2 (* 16. (read-meter '%highest-handcode-ucode-page))))) (let ((halfword-0 (%p-ldb (byte 16. 0) (%pointer-plus paging-area-origin adr))) (hal...
e60889339006b57f672c681892710164399ae281d0f37371886b1d9bc73ee8cd
arcadia-unity/catcon
data.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/arcadia-unity/catcon/6c69f424d3c14639ff11a3ea7d9da6aa81328f8a/Arcadia/Internal/clojure/data.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns ^{:author "Stuart Halloway", :doc "Non-core data functions."} clojure.data (:require [clojure.set :as set])) (declare diff) (defn- atom-diff "Internal helper for diff." [a b] (if (= a b) [nil nil a] [a b nil])) (defn- vectorize "Convert an associa...
a20d206fc989861d0f804ef910c01c299dd8cdd259c5622c57aaebdc389c20af
geophf/1HaskellADay
Percentage.hs
module Data.Percentage where import Control.Presentation data Percentage = P { percent :: Rational } deriving (Eq, Ord) instance Show Percentage where show = (++ "%") . rep instance Raw Percentage where rep = laxmi 2 . (100 *) . percent
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Data/Percentage.hs
haskell
module Data.Percentage where import Control.Presentation data Percentage = P { percent :: Rational } deriving (Eq, Ord) instance Show Percentage where show = (++ "%") . rep instance Raw Percentage where rep = laxmi 2 . (100 *) . percent
dc5aee38782d48ce4244a07578058c9d8b60c77db62cde9d518edbda5054e9e3
vincenthz/hs-crypto-pubkey
RNG.hs
module RNG where import Data.Word import Data.List (foldl') import Data.Byteable import qualified Data.ByteString as B import Crypto.Random import Control.Arrow (first) {- this is a just test rng. this is absolutely not a serious RNG. DO NOT use elsewhere -} data Rng = Rng (Int, Int) getByte :: Rng -> (Word8, Rng) g...
null
https://raw.githubusercontent.com/vincenthz/hs-crypto-pubkey/c4192a87a03c329eadceb11c3406b4db14b56f11/Tests/RNG.hs
haskell
this is a just test rng. this is absolutely not a serious RNG. DO NOT use elsewhere
module RNG where import Data.Word import Data.List (foldl') import Data.Byteable import qualified Data.ByteString as B import Crypto.Random import Control.Arrow (first) data Rng = Rng (Int, Int) getByte :: Rng -> (Word8, Rng) getByte (Rng (mz, mw)) = (r, g) where mz2 = 36969 * (mz `mod` 65536) mw2 = 18...
612fd5ccfb608d5edd5d6e2e98583a9230eb9abecab44850b5e9971a8248bca1
pallet/pallet-jclouds
jclouds_ssh_test.clj
(ns pallet.compute.jclouds-ssh-test (:require [clojure.tools.logging :as logging]) (:import org.jclouds.domain.Credentials org.jclouds.domain.LoginCredentials org.jclouds.compute.domain.ExecResponse org.jclouds.io.Payload org.jclouds.ssh.SshClient com.google.common.net.HostAndPort)) (defn jclo...
null
https://raw.githubusercontent.com/pallet/pallet-jclouds/29f0af244da1b5ecb7e44d815343a3036a4ab006/test/pallet/compute/jclouds_ssh_test.clj
clojure
define an instance or implementation of the following interfaces:
(ns pallet.compute.jclouds-ssh-test (:require [clojure.tools.logging :as logging]) (:import org.jclouds.domain.Credentials org.jclouds.domain.LoginCredentials org.jclouds.compute.domain.ExecResponse org.jclouds.io.Payload org.jclouds.ssh.SshClient com.google.common.net.HostAndPort)) (defn jclo...
c74d46707face46e818cb859dbea97e6e5c94c62f23d298148a21e4c03288afc
cloojure/tupelo
test_runner.cljs
(ns tst.minerva.test-runner (:require [cljs.test :refer [report] :refer-macros [run-tests]] [figwheel.main.async-result :as async-result] ; ********** REQUIRE ALL TESTING NS ********** ;----------------------------------------------------------------------------- [tst.minerva.core] [tst.miner...
null
https://raw.githubusercontent.com/cloojure/tupelo/4105fefbb1c4d1b2f06fa4993f9dd007e5e41e00/misc/test_runner.cljs
clojure
********** REQUIRE ALL TESTING NS ********** ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- tests can be asynchronous, we must hook test end ********** MUST REPEAT HERE ALL TEST NS FROM ABOVE `(:require ...)`...
(ns tst.minerva.test-runner (:require [cljs.test :refer [report] :refer-macros [run-tests]] [figwheel.main.async-result :as async-result] [tst.minerva.core] [tst.minerva.util] )) (defmethod report [:cljs.test/default :end-run-tests] [test-data] (if (cljs.test/successful? test-data) (async...
0f4041a5f11a63eb31b0493af5267a5ccf0222c67145460565345f0c2903ee1f
nklein/FFT
package.lisp
(defpackage #:fft (:use :cl) (:export #:fft #:ifft))
null
https://raw.githubusercontent.com/nklein/FFT/5cf6132c49f3868cac4ce20284fbb6c1b4a62ba0/package.lisp
lisp
(defpackage #:fft (:use :cl) (:export #:fft #:ifft))
fc353df3f8828d01915b1f355ad4cdb8645dd65205ae2ad3602a35c8aadda4d0
denisidoro/rosebud
core.clj
(ns rosebud.handlers.core (:require [ring.util.response :as ring.resp])) (def respond ring.resp/response) (defn home-page [_] (respond "Hello <b>world</b>!"))
null
https://raw.githubusercontent.com/denisidoro/rosebud/90385528d9a75a0e17803df487a4f6cfb87e981c/server/src/rosebud/handlers/core.clj
clojure
(ns rosebud.handlers.core (:require [ring.util.response :as ring.resp])) (def respond ring.resp/response) (defn home-page [_] (respond "Hello <b>world</b>!"))
167ccc8253e663675ad27a6dcfc5dfe7d30d65cbb68e7f62dba68009c0d095f2
imitator-model-checker/imitator
TilesManagerList.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Université Paris 13 , LIPN , CNRS , France * Université de Lorraine , CNRS , , LORIA , Nancy , France * * Module description : Concrete impl...
null
https://raw.githubusercontent.com/imitator-model-checker/imitator/105408ae2bd8c3e3291f286e4d127defd492a58b/src/TilesManagerList.ml
ocaml
********************************************************** ********************************************************** Modules ********************************************************** ********************************************************** ********************************************************** ***************...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * IMITATOR * * Université Paris 13 , LIPN , CNRS , France * Université de Lorraine , CNRS , , LORIA , Nancy , France * * Module description : Concrete impl...
e1bb9fef797a2b075a73772882d107f2bea9e8d4b48642e733e34c3e9415289b
WorksHub/client
verticals.cljc
(ns wh.verticals (:require [clojure.set :as set] [wh.common.data :as data])) (def vertical-functional "functional") (def vertical-blockchain "blockchain") (def vertical-javascript "javascript") (def vertical-ai "ai") (def vertical-golang "golang") (def vertical-java "java") (def vertical-python "python") (de...
null
https://raw.githubusercontent.com/WorksHub/client/a73ddfb93bb768fb076b83969c4ad644bb3eca92/common/src/wh/verticals.cljc
clojure
Available verticals This should be used to allow admins to publish jobs for future verticals. TODO [FEATURE-298]: Pick footer links out of the vertical-associated tags.
(ns wh.verticals (:require [clojure.set :as set] [wh.common.data :as data])) (def vertical-functional "functional") (def vertical-blockchain "blockchain") (def vertical-javascript "javascript") (def vertical-ai "ai") (def vertical-golang "golang") (def vertical-java "java") (def vertical-python "python") (de...
a4fd750ba00fae90ffa2b626b2419200f3934d64ed1ff317e1ced80129ad4eaf
madvas/catlantis
categories.cljs
(ns catlantis.ios.screens.categories (:require [catlantis.shared.ui :as ui] [re-frame.core :as rf] [print.foo :as pf :include-macros true])) (declare styles) (defn on-categ-press [ctg] (rf/dispatch [:category-select ctg]) (rf/dispatch [:nav/toggle-drawer])) (defn categories [] (let [c...
null
https://raw.githubusercontent.com/madvas/catlantis/b8880ec2cab27ecfcb3c0ab30e2bbc7767db0d1c/src/catlantis/ios/screens/categories.cljs
clojure
(ns catlantis.ios.screens.categories (:require [catlantis.shared.ui :as ui] [re-frame.core :as rf] [print.foo :as pf :include-macros true])) (declare styles) (defn on-categ-press [ctg] (rf/dispatch [:category-select ctg]) (rf/dispatch [:nav/toggle-drawer])) (defn categories [] (let [c...
01821b0a8ae7fb568705ea414961027e6ab86f31191797df54e764792274075b
depressed-pho/HsOpenSSL
GenRSAKey.hs
import Control.Monad hiding (join) import OpenSSL import OpenSSL.EVP.PKey import OpenSSL.PEM import OpenSSL.RSA import System.IO import Text.Printf main = withOpenSSL $ do let keyBits = 512 keyE = 65537 printf "Generating RSA key-pair, nbits = %d, e = %d:\n" keyBits keyE ...
null
https://raw.githubusercontent.com/depressed-pho/HsOpenSSL/9e6a2be8298a9cbcffdfff55eab90e1e497628c3/examples/GenRSAKey.hs
haskell
import Control.Monad hiding (join) import OpenSSL import OpenSSL.EVP.PKey import OpenSSL.PEM import OpenSSL.RSA import System.IO import Text.Printf main = withOpenSSL $ do let keyBits = 512 keyE = 65537 printf "Generating RSA key-pair, nbits = %d, e = %d:\n" keyBits keyE ...
2a166df206b90adfd918b60909e6219401951048af3b98dbe525fbcccfe89e81
cch1/http.async.client
sample.clj
(ns sample (:require [http.async.client :as c])) (with-client {} (let [r (c/GET "/")] (println "done?" (c/done? r)) (c/await r) (println "done?" (c/done? r)) (c/string r)))
null
https://raw.githubusercontent.com/cch1/http.async.client/f49e67980f7d3c3f252a4044452efdcf2ca4dd11/sample.clj
clojure
(ns sample (:require [http.async.client :as c])) (with-client {} (let [r (c/GET "/")] (println "done?" (c/done? r)) (c/await r) (println "done?" (c/done? r)) (c/string r)))
4415a26ef7be7e142ed2318cd6aa5d350e57454e2fb88633206952d5362f1fe7
janestreet/base
test_base_containers.ml
open! Import open Test_container include (Test_S1 (Array) : sig end) include (Test_S1 (List) : sig end) include (Test_S1 (Queue) : sig end) include ( Test_S0 (struct include String let mem t c = mem t c module Elt = struct type t = char [@@deriving sexp] let of_int = Char.of_int_exn ...
null
https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/test/test_base_containers.ml
ocaml
Quickcheck-based expect tests [Array.concat] has a slightly different type than S1 expects [to_list] and [to_array] proceed in the opposite order as everything else. This is likely a performance hack to reuse [fold] without adding a [List.rev]. It is not particularly problematic, since hash table...
open! Import open Test_container include (Test_S1 (Array) : sig end) include (Test_S1 (List) : sig end) include (Test_S1 (Queue) : sig end) include ( Test_S0 (struct include String let mem t c = mem t c module Elt = struct type t = char [@@deriving sexp] let of_int = Char.of_int_exn ...
806e0c4ac6f5e198e7a4439b92e6c86cb33f3ef9bc2df3bc36cf45a5f72ab6e6
jiangpengnju/htdp2e
finite-state-machines.v4.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-abbr-reader.ss" "lang")((modname finite-state-machines.v4) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t construct...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/arbitrarily-large-data/extended-exercises-lists/finite-state-machines.v4.rkt
racket
about the language level of this file in a form that our tools can easily process. ---------------------------------------------------------------------------; - '() A Transition is key strokes Examples: Traffic light equality predicate for states. SimulationState.v2 -> Image renders a world state as an im...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname finite-state-machines.v4) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) The BW Machine is a FSM that flips from ...
6586360dac58c05265e84058a67c5ed37d80c6126ca64282860ceac3db367f49
marcoheisig/sealable-metaobjects
specializer-prototype.lisp
(in-package #:sealable-metaobjects) Finding a suitable prototype for eql specializers is easy . (defmethod specializer-prototype ((eql-specializer eql-specializer) &optional excluded-specializers) (if (member eql-specializer excluded-specializers) (values nil nil) (val...
null
https://raw.githubusercontent.com/marcoheisig/sealable-metaobjects/e09ec97252e0844528f61abdc0c7ee256875f8ee/code/specializer-prototype.lisp
lisp
The prototype must not be a member of the excluded objects. are classes. Ideally, we want several prototypes for each class, such each class, which we store in the hash table *CLASS-PROTOTYPES*. Surprisingly, some implementations don't always return a CLASS-PROTOTYPE that is an instance of the given class. So w...
(in-package #:sealable-metaobjects) Finding a suitable prototype for eql specializers is easy . (defmethod specializer-prototype ((eql-specializer eql-specializer) &optional excluded-specializers) (if (member eql-specializer excluded-specializers) (values nil nil) (val...
f33dd53208e7dad17af070ef9cfc5cc349e914f4cd7fa7a5ba1f7390350ad842
ocaml-flambda/flambda-backend
linear.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/bed9613a24b4bc5ed377ca20c3b685195c993e21/backend/linear.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Mach type label = Cmm.label type instruction = { mutable desc: instruction_desc; mutable next...
e6449e2d50eb2dfea70fa3b4805181c2adc348a1902567635accc0c459732a2c
haskell/containers
SetOperations-Set.hs
module Main where import Data.Set as C import SetOperations main = benchmark fromList True [("union", C.union), ("difference", C.difference), ("intersection", C.intersection)]
null
https://raw.githubusercontent.com/haskell/containers/7fb91ca53b1aca7c077b36a0c1f8f785d177da34/containers-tests/benchmarks/SetOperations/SetOperations-Set.hs
haskell
module Main where import Data.Set as C import SetOperations main = benchmark fromList True [("union", C.union), ("difference", C.difference), ("intersection", C.intersection)]
7be35dbe34b5c61d09f78cf973c9e0c2068db63a9b3ccc9cbaef1275c55bf704
input-output-hk/marlowe-cardano
Forward.hs
{-# LANGUAGE OverloadedStrings #-} module Marlowe.Contracts.Forward ( forward ) where import Language.Marlowe.Extended.V1 import Marlowe.Contracts.Common import Marlowe.Contracts.Swap -- A forward contract is contract between to parties A and B to buy or sell an -- underlying asset at a specified price on a futur...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/78a3dbb1cd692146b7d1a32e1e66faed884f2432/marlowe-contracts/src/Marlowe/Contracts/Forward.hs
haskell
# LANGUAGE OverloadedStrings # A forward contract is contract between to parties A and B to buy or sell an underlying asset at a specified price on a future date ^ Party A ^ Token A ^ Value A ^ Deposit timeout A ^ Party B ^ Token B ^ Value B:ta ^ Deposit timeout B ^ Delivery date ^ Forward contract
module Marlowe.Contracts.Forward ( forward ) where import Language.Marlowe.Extended.V1 import Marlowe.Contracts.Common import Marlowe.Contracts.Swap forward :: forward partyA tokenA valueA timeoutA partyB tokenB valueB timeoutB deliveryDate = waitUntil deliveryDate $ swap partyA tokenA val...
0ee3f9bd8f39179ae52c9c88326f40c377c5af8f9bb23b5e3ca192c5706035e6
mbutterick/beautiful-racket
tokenizer.rkt
#lang br (require "lexer.rkt" brag/support) (define (make-tokenizer ip [path #f]) (port-count-lines! ip) (lexer-file-path path) (define (next-token) (basic-lexer ip)) next-token) (provide make-tokenizer)
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo-2/tokenizer.rkt
racket
#lang br (require "lexer.rkt" brag/support) (define (make-tokenizer ip [path #f]) (port-count-lines! ip) (lexer-file-path path) (define (next-token) (basic-lexer ip)) next-token) (provide make-tokenizer)
c59e2577e00124446368a2705aedb4d1559c5f04067044befac68b1f6e0035f0
jamesmacaulay/zelkova
project.clj
(defproject drag-and-drop "0.1.0-SNAPSHOT" :description "FIXME: write this!" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0-beta1"] [org.clojure/clojurescript "0.0-3196"] [org.clojure/core.async "0.1.34...
null
https://raw.githubusercontent.com/jamesmacaulay/zelkova/a8e00dc51b48c5b429fe2e2fb4aa2d557571829c/examples/drag_and_drop/project.clj
clojure
default and assumes "resources" default watch and update CSS if you want to embed a ring handler into the figwheel http-kit server, this is simple ring servers, if this doesn't work for you just run your own server :) :ring-handler hello_world.server/handler To be able to open files in your editor from the hea...
(defproject drag-and-drop "0.1.0-SNAPSHOT" :description "FIXME: write this!" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0-beta1"] [org.clojure/clojurescript "0.0-3196"] [org.clojure/core.async "0.1.34...
9275afdbef6857ab0a59dc37098244afaafa15ce4474f7afebf1e98ca3eb7109
zotonic/mqtt_packet_map
mqtt_packet_map_topic_SUITE.erl
-module(mqtt_packet_map_topic_SUITE). -compile([export_all, nowarn_export_all]). -include_lib("common_test/include/ct.hrl"). %%-------------------------------------------------------------------- %% COMMON TEST CALLBACK FUNCTIONS %%-------------------------------------------------------------------- init_per_suite(C...
null
https://raw.githubusercontent.com/zotonic/mqtt_packet_map/15732f5443a6392d9c81867fd1f7488baa25fbee/test/mqtt_packet_map_topic_SUITE.erl
erlang
-------------------------------------------------------------------- COMMON TEST CALLBACK FUNCTIONS -------------------------------------------------------------------- -------------------------------------------------------------------- TEST CASES -------------------------------------------------------------------- ...
-module(mqtt_packet_map_topic_SUITE). -compile([export_all, nowarn_export_all]). -include_lib("common_test/include/ct.hrl"). init_per_suite(Config) -> Config. end_per_suite(_Config) -> ok. init_per_testcase(_TestCase, Config) -> Config. end_per_testcase(_TestCase, _Config) -> ok. all() -> [ ...
e80620b4ce81cf079febde18349f6587bf823a317ed181acbfb08ebe0f7c1cbc
rmculpepper/crypto
argon2.rkt
Copyright 2018 ;; ;; This library is free software: you can redistribute it and/or modify ;; it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ;; (at your option) any later version. ;; ;; This library is distributed in...
null
https://raw.githubusercontent.com/rmculpepper/crypto/fec745e8af7e3f4d5eaf83407dde2817de4c2eb0/crypto-lib/argon2.rkt
racket
This library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCH...
Copyright 2018 by the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License #lang racket/base (require "private/argon2/factory.rkt") (provide argon2-factory)
49d077231a3f2561e92f37a5656f1507be54d49fe7fcf4facac86baa45ee8e51
orbitz/kaiju
kaiju_kv_backend.mli
open Async.Std type t module Obj : sig type t val create : k:string -> v:string -> c:string option -> t val get_key : t -> string val get_value : t -> string val get_context : t -> string option end module Callbacks : sig module Init_args : sig type t = { log : Zolog_std_event.t Zolo...
null
https://raw.githubusercontent.com/orbitz/kaiju/9da6a07770cdfddde7d33b12f636df2615c36676/lib/kaiju_kv/kaiju_kv_backend.mli
ocaml
open Async.Std type t module Obj : sig type t val create : k:string -> v:string -> c:string option -> t val get_key : t -> string val get_value : t -> string val get_context : t -> string option end module Callbacks : sig module Init_args : sig type t = { log : Zolog_std_event.t Zolo...
b01f7130c98ef63f6043137a8562cfff708d94d56b1e7bae636b7fe340a62311
michiakig/LispInSmallPieces
chap1b.scm
$ I d : chap1b.scm , v 4.0 1995/07/10 06:50:53 ;;;(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) ;;; This file is part of the files that accompany the book: LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ;;; Newest version may be...
null
https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/src/chap1b.scm
scheme
(((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) This file is part of the files that accompany the book: Newest version may be retrieved from: Check the README file before using this file. (((((((((((((((((((((((((((((((( L i S P )))))))))))))))))))))))))))))))) Sort of dynamic binding impl...
$ I d : chap1b.scm , v 4.0 1995/07/10 06:50:53 LISP Implantation Semantique Programmation ( InterEditions , France ) By Christian Queinnec < > ( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz variants of chapter 1 . (define (d.evaluate e env) ...
3f4739b3fd752e1bc705700ff8967c39483d93196e0325aed21326679743c4de
seek-oss/serverless-haskell
TestUtil.hs
module Data.Aeson.TestUtil where import Data.Aeson import Data.ByteString.Lazy (ByteString) import Test.Hspec testEncodeDecode :: (FromJSON a, ToJSON a, Show a, Eq a) => String -> ByteString -> a -> Spec testEncodeDecode description bytestring value = describe description $ do it "decodes" $ decode...
null
https://raw.githubusercontent.com/seek-oss/serverless-haskell/dbea96e657e23fd4a3fef03bdf182f060dc2590d/test/Data/Aeson/TestUtil.hs
haskell
module Data.Aeson.TestUtil where import Data.Aeson import Data.ByteString.Lazy (ByteString) import Test.Hspec testEncodeDecode :: (FromJSON a, ToJSON a, Show a, Eq a) => String -> ByteString -> a -> Spec testEncodeDecode description bytestring value = describe description $ do it "decodes" $ decode...
5db3a5463952d0e2ccdcd08b2d5cf99d8333f239eeff8981b427073238befa6c
kupl/LearnML
patch.ml
let rec uniq (lst : 'b list) : 'a list = match lst with | [] -> [] | h :: t -> h :: uniq (List.filter (fun __s5 -> __s5 != h) t)
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/uniq/sub2/patch.ml
ocaml
let rec uniq (lst : 'b list) : 'a list = match lst with | [] -> [] | h :: t -> h :: uniq (List.filter (fun __s5 -> __s5 != h) t)
f887f677201d66f511f6de30d86bc81a77cd20396d50a753f3b11e4121a7f46d
tweag/ormolu
Main.hs
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Main (main) where import Control.Exception (throwIO) import Control.Monad im...
null
https://raw.githubusercontent.com/tweag/ormolu/c81320d8a1069674c17fa5ee52b64c18604f84de/app/Main.hs
haskell
| Entry point of the program. | Format a single input. | How to use .cabal files | Mode of operation | Configuration ormoluStdin is not used because we need the originalInput input source = a file ormoluFile is not used because we need originalInput ormoluFile is not used because we need originalInput --------...
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # module Main (main) where import Control.Exception (throwIO) import Control.Monad im...
e9f12ee65c3dcad6fd95a309587fcc3b8a515d5fcc20a5dce5168801d1b10510
serokell/universum
DeepSeq.hs
# LANGUAGE Trustworthy # -- | This module contains useful functions to evaluate expressions to weak-head -- normal form or just normal form. Useful to force traces or @error@ inside -- monadic computation or to remove space leaks. module Universum.DeepSeq ( module Control.DeepSeq , evaluateNF , e...
null
https://raw.githubusercontent.com/serokell/universum/7fc5dd3951d1177d1873e36b0678c759aeb5dc08/src/Universum/DeepSeq.hs
haskell
| This module contains useful functions to evaluate expressions to weak-head normal form or just normal form. Useful to force traces or @error@ inside monadic computation or to remove space leaks. | Like 'evaluateWNHF' but discards value. but discards resulting value.
# LANGUAGE Trustworthy # module Universum.DeepSeq ( module Control.DeepSeq , evaluateNF , evaluateNF_ , evaluateWHNF , evaluateWHNF_ ) where import Control.DeepSeq (NFData (..), deepseq, force, ($!!)) import Universum.Base (seq) import Universum.Function ((.)) import Univer...
d2447524b5f98cf37fbc9a8a00df7d8f5df5c0e0dcd49a508cadf6ab2003ab55
chenyukang/eopl
translator.scm
;; translation-of-program : Program -> Nameless-program (define translation-of-program (lambda (pgm) (cases program pgm (a-program (exp1) (a-program (translation-of exp1 (init-senv))))))) ;; translation-of : Exp * Senv -> Nameless-exp Page 97 (define translation-of (lambda (exp senv) ...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch3/base/translator.scm
scheme
translation-of-program : Program -> Nameless-program translation-of : Exp * Senv -> Nameless-exp static environments ;;;;;;;;;;;;;;;; empty-senv : () -> Senv extend-senv : Var * Senv -> Senv apply-senv : Senv * Var -> Lexaddr init-senv : () -> Senv
(define translation-of-program (lambda (pgm) (cases program pgm (a-program (exp1) (a-program (translation-of exp1 (init-senv))))))) Page 97 (define translation-of (lambda (exp senv) (cases expression exp (const-exp (num) (const-exp num)) (diff-exp (exp1 exp2) (diff-exp...
7a29a4240957b379cbd0ee9033476d07a2cc03e87f5c9c6f3f79198f279b59c3
aantron/bisect_ppx
runtime.ml
This file is part of Bisect_ppx , released under the MIT license . See LICENSE.md for details , or visit . LICENSE.md for details, or visit . *) let get_coverage_data = Bisect_common.runtime_data_to_string let write_coverage_data () = match get_coverage_data () with | None -> () | Som...
null
https://raw.githubusercontent.com/aantron/bisect_ppx/29b406eda85564af5c07b168385afba3067a9418/src/runtime/js/runtime.ml
ocaml
This file is part of Bisect_ppx , released under the MIT license . See LICENSE.md for details , or visit . LICENSE.md for details, or visit . *) let get_coverage_data = Bisect_common.runtime_data_to_string let write_coverage_data () = match get_coverage_data () with | None -> () | Som...
3fb4fd8664fc435c79b2803164742a9f246735ccac7cfffbdfe5d15140b4fd6f
rollacaster/sketches
noise_car.cljs
(ns sketches.nature-of-code.vectors.noise-car (:require [quil.core :as q] [sketches.vector :as v] [quil.middleware :as md])) (defn setup [] (q/background 255) (q/ellipse-mode :center) {:acceleration [0 0] :velocity [0 0] :location [150 150] :xoff 0.0 :yoff 0.0}) (defn move-...
null
https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/nature_of_code/vectors/noise_car.cljs
clojure
(ns sketches.nature-of-code.vectors.noise-car (:require [quil.core :as q] [sketches.vector :as v] [quil.middleware :as md])) (defn setup [] (q/background 255) (q/ellipse-mode :center) {:acceleration [0 0] :velocity [0 0] :location [150 150] :xoff 0.0 :yoff 0.0}) (defn move-...
1ba3645aab104d1c37ae3b26d38438b80d4fa238cce76cff84f4d79f86145097
BinaryAnalysisPlatform/bap
arm_lifter.ml
open Core_kernel[@@warning "-D"] open Bap_core_theory open Or_error open Bap.Std open Arm_types open Arm_utils include Self() module Basic = Disasm_expert.Basic module Bit = Arm_bit module Branch = Arm_branch module Env = Arm_env module Mem = Arm_mem module Mem_shift = Arm_mem_shift module M...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/arm/arm_lifter.ml
ocaml
* Special Data Instructions extends extracts bit field bit reverse Swap bytes Pack half shift is always asr reverses POS_SIGN_BIT POS_SIGN_BIT POS_SIGN_BIT POS_SIGN_BIT POS_SIGN_BIT Exclusive access, we may later want to do something special to these supervisor call All of these are nops...
open Core_kernel[@@warning "-D"] open Bap_core_theory open Or_error open Bap.Std open Arm_types open Arm_utils include Self() module Basic = Disasm_expert.Basic module Bit = Arm_bit module Branch = Arm_branch module Env = Arm_env module Mem = Arm_mem module Mem_shift = Arm_mem_shift module M...
b1d255c2b36b69d1997c62d98d7252f34aec96227d753f7392a5600a50dcd055
bondy-io/bondy
bondy_table.erl
%% ============================================================================= %% bondy_table.erl - %% Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% ...
null
https://raw.githubusercontent.com/bondy-io/bondy/a1267e7e5526db24f278e12315020753f3168b44/apps/bondy/src/bondy_table.erl
erlang
============================================================================= bondy_table.erl - you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR COND...
Copyright ( c ) 2016 - 2022 Leapsight . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(bondy_table). -define(TAB, ?MODULE). -type update_op() :: integer() | { ...
153cc34547da8f0490cfa7ed5fa9f7bd20273589648ffc0651b81037d8d2b22f
igorhvr/bedlam
alist.scm
;;;"alist.scm", alist functions for Scheme. Copyright ( C ) 1992 , 1993 , 2003 ; ;Permission to copy this software, to modify it, to redistribute it, ;to distribute modified versions, and to use it for any purpose is ;granted, subject to the following restrictions and understandings. ; 1 . Any copy made of this sof...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/alist.scm
scheme
"alist.scm", alist functions for Scheme. Permission to copy this software, to modify it, to redistribute it, to distribute modified versions, and to use it for any purpose is granted, subject to the following restrictions and understandings. in full. this software will be error-free, and I am under no obligation to ...
Copyright ( C ) 1992 , 1993 , 2003 1 . Any copy made of this software must include this copyright notice 2 . I have made no warranty or representation that the operation of 3 . In conjunction with products arising from the use of this @ftindex alist Alist functions provide utilities for treating a list of key ...
0c24d337bf9c1447401365390f9327674aaeb34250fcd20b2471d031643fc491
dancrossnyc/multics
emacs-console-messages.lisp
;;; *********************************************************** ;;; * * * Copyright , ( C ) Honeywell Information Systems Inc. , 1982 * ;;; * * * Copyright ( c ) 1978 by Massachusetts Institute of ...
null
https://raw.githubusercontent.com/dancrossnyc/multics/dc291689edf955c660e57236da694630e2217151/library_dir_dir/system_library_unbundled/source/bound_emacs_packages_.s.archive/emacs-console-messages.lisp
lisp
*********************************************************** * * * * * * *********************************************************** Interactive ...
* Copyright , ( C ) Honeywell Information Systems Inc. , 1982 * * Copyright ( c ) 1978 by Massachusetts Institute of * * Technology and Honeywell Information Systems , Inc. * Coded in a peek of phit 1978.08.07 - 11 by Qsends by bsg , 4/15/79 , to enable better communications with...
3d2580b3bdbc258c8c28784505643551db6d430e890b29e7e60d21a001ca5105
nebularis/systest
systest_rebar_plugin.erl
-*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et %% ---------------------------------------------------------------------------- %% Copyright ( c ) 2005 - 2012 Nebularis . %% %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this ...
null
https://raw.githubusercontent.com/nebularis/systest/fbef181fd0203137f9f6ca6a471c75ca180ec375/src/systest_rebar_plugin.erl
erlang
ex: ts=4 sw=4 et ---------------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, an...
-*- tab - width : 4;erlang - indent - level : 4;indent - tabs - mode : nil -*- Copyright ( c ) 2005 - 2012 Nebularis . in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the ...
80cbced33b55c375d6b70085fbf1984d20a04662911f15bf55e5fd1cce55c50f
GriffinScribe-LLC/clojure-aes
inverse_sub_bytes.clj
(ns clojure-aes.decrypt.inverse-sub-bytes (:require [clojure-aes.constants :as c] [clojure-aes.utils :as utils])) (defn inv-subWord "Takes a four-byte input word and substitutes each byte in that word with its appropriate value from the inverse S-Box." [word] (let [extract-bytes (fn [word mask shif...
null
https://raw.githubusercontent.com/GriffinScribe-LLC/clojure-aes/1924d1e6ca8c42e74040fc69f5eb208d71ed831a/src/clojure_aes/decrypt/inverse_sub_bytes.clj
clojure
(ns clojure-aes.decrypt.inverse-sub-bytes (:require [clojure-aes.constants :as c] [clojure-aes.utils :as utils])) (defn inv-subWord "Takes a four-byte input word and substitutes each byte in that word with its appropriate value from the inverse S-Box." [word] (let [extract-bytes (fn [word mask shif...
45c6257a4c3999ebb31950e0f12ae8ff7c567714c7049e1c79ba485cead1eb2d
ChrisPenner/advent-of-code-haskell
Day02.hs
# LANGUAGE TypeApplications # # LANGUAGE QuasiQuotes # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE BlockArguments # {-# LANGUAGE RankNTypes #-} # LANGUAGE LambdaCase # module Y2019.Day02 where import Control.Lens import Control.Lens.Regex.Text import Data.Text.Lens import Data.Text.I...
null
https://raw.githubusercontent.com/ChrisPenner/advent-of-code-haskell/da10d53b3e98b67c9cb499dd8b2ddadd121c932e/src/Y2019/Day02.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # input <- TIO.readFile "./src/Y2019/day02.txt" print $ input & ix 1 .~ 12 & (,) 0 &~ fix (\continue -> do out <- getOp <$> loadNext <*> getArg <*> getArg outputReg <- loadNext ...
# LANGUAGE TypeApplications # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # # LANGUAGE BlockArguments # # LANGUAGE LambdaCase # module Y2019.Day02 where import Control.Lens import Control.Lens.Regex.Text import Data.Text.Lens import Data.Text.IO as TIO import Data.Map.Lens import qualified Data.Map as M im...
2de156fa5a2148b316a0376ecae767346eb639ddd87b9e2e8235040194a251b4
input-output-hk/cardano-sl
Main.hs
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Main where import Universum import qualified Data.List.NonEmpty as NonEmpty import Test.QuickCheck (Property, Result (..), conjoin, counterexample, ioProperty, label, property, quic...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/x509/test/Main.hs
haskell
Main NOTE running 'quickCheck prop' doesn't make 'cabal test' fails even if the property fails. So this little one cope with this Properties | Verify that each certificate generated is valid. Is uses the default validation check of 'Data.X509.Validation' | Verify that each server certificate generated is inv...
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Main where import Universum import qualified Data.List.NonEmpty as NonEmpty import Test.QuickCheck (Property, Result (..), conjoin, counterexample, ioProperty, label, property, quic...
3cb684ac1ba9564860b5f706fd63a040978491ba3f62bab898d9402817b3e802
danehuang/augurv2
DensSyn.hs
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agreed to in writing , software - distributed...
null
https://raw.githubusercontent.com/danehuang/augurv2/480459bcc2eff898370a4e1b4f92b08ea3ab3f7b/compiler/augur/src/Core/DensSyn.hs
haskell
-------------------------------------------------------------------- | [Note] Syntax for densities. --------------------------------- == Syntax --------------------------------- == Instances === Pretty === FreeVar === Substitutable === AlphaEquiv Should normalize --------------------------------- == Operati...
- Copyright 2017 under the Apache License , Version 2.0 ( the " License " ) ; - you may not use this file except in compliance with the License . - You may obtain a copy of the License at - - -2.0 - - Unless required by applicable law or agreed to in writing , software - distributed...
d2df385ec8bb9a0ea80324bdf0c74286c4335359b20b99171aed04c78722f13c
BinaryAnalysisPlatform/bap-frames
test_enum.ml
open Core_kernel.Std open OUnit2 open Frame_enum type t = A | B | C | D | E [@@deriving enumerate, variants] module E = struct include Make(struct type nonrec t = t let rank = Variants.to_rank let all = all end) end module S = struct include Make_substitute(struct type nonrec t = t ...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-frames/c9f957492c13106171b04914dab4badc9ff5bcad/test/test_enum.ml
ocaml
open Core_kernel.Std open OUnit2 open Frame_enum type t = A | B | C | D | E [@@deriving enumerate, variants] module E = struct include Make(struct type nonrec t = t let rank = Variants.to_rank let all = all end) end module S = struct include Make_substitute(struct type nonrec t = t ...
2564b6010c6bda1f419fbaaf4857460b4c76836bf239883f72e478749dc4d270
Frama-C/Qed
intmap.mli
(**************************************************************************) (* *) This file is part of Qed Library (* *) Copyright ( ...
null
https://raw.githubusercontent.com/Frama-C/Qed/69fa79d9ede7a76f320c935405267a97c660814e/src/intmap.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Qed Library Copyright ( C ) 2007 - 2016 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , ver...
f49573b493f0d37ab95fbc8a41e0138a02b454da003b39a88627dec89c198ec6
dannypsnl/racket-llvm
pass-manager.rkt
#lang racket (provide llvm-pass-manager-builder-create llvm-pass-manager-builder-set-opt-level llvm-pass-manager-builder-populate-module-pass-manager llvm-pass-manager-builder-populate-function-pass-manager llvm-pass-manager-create llvm-pass-manager-run llvm-functio...
null
https://raw.githubusercontent.com/dannypsnl/racket-llvm/b36947aedf9b03d97de42ad617c85d9bb5de1443/pass-manager.rkt
racket
Pass manager builder Whole module pass manager Function pass manager
#lang racket (provide llvm-pass-manager-builder-create llvm-pass-manager-builder-set-opt-level llvm-pass-manager-builder-populate-module-pass-manager llvm-pass-manager-builder-populate-function-pass-manager llvm-pass-manager-create llvm-pass-manager-run llvm-functio...
78286c4e32c512f3b6233557059bd924f665a32860816c34fd5cdfd906dcfdec
sigrlami/haskellcosm
Api.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE BlockArguments # {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDep...
null
https://raw.githubusercontent.com/sigrlami/haskellcosm/4b2dcb89a82cf3f2e6fd191e942c4290c2bb84e1/app/api/src/Api.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric # # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # ----------------------------------------...
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE BlockArguments # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards ...
d0297209f22ec073bd0fcc213f57b91e0313ae00583c5eb858cc6c1e1f98f4bc
ktakashi/sagittarius-scheme
algorithms.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; text/xml/dsig/algorithms.scm - XML signature algorithms ;;; Copyright ( c ) 2020 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; ...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/9aecac6e95589345d768e6bfcd76efb7d7a691eb/sitelib/text/xml/dsig/algorithms.scm
scheme
coding : utf-8 ; -*- text/xml/dsig/algorithms.scm - XML signature algorithms Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, th...
Copyright ( c ) 2020 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING XML Signature Syntax and Processing Version 1.1 (...
2d89a26b8afb552e19b104c2137025358e2ee3c00d117ebebb796d04ec21a4b7
dterei/SafeHaskellExamples
UnsafePlugin.hs
{-# LANGUAGE Safe #-} # LANGUAGE FlexibleContexts # module UnsafePlugin ( runPlugin ) where import safe RIO import safe ReCoerce -- We defer the creation of the dictionary, relying on trusted code generting -- it for us, somewhat in a confused deputy manner. runPlugin :: Coercible a (String) => a -> RIO () runP...
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/roles4/UnsafePlugin.hs
haskell
# LANGUAGE Safe # We defer the creation of the dictionary, relying on trusted code generting it for us, somewhat in a confused deputy manner.
# LANGUAGE FlexibleContexts # module UnsafePlugin ( runPlugin ) where import safe RIO import safe ReCoerce runPlugin :: Coercible a (String) => a -> RIO () runPlugin lv = do rPutStrLn "plugin..." let (v) = coerce lv rPutStrLn $ "Labeled value: " ++ v
24c7a5ade2349b02600bef56ff5fcf02858d5d43678a4e2c0fe78c5d56d40526
trainline/optimus
dynamo_util.clj
Copyright ( c ) Trainline Limited , 2017 . All rights reserved . See LICENSE.txt in the project root for license information (ns optimus.service.backends.dynamo-util "Common utilities for DynamoDB implementations" (:require [optimus.service.util :refer [throw-too-many-requests]]) (:import [com.amazonaws.servi...
null
https://raw.githubusercontent.com/trainline/optimus/caf4d065f40d5edef87eeb60d767b8379465501e/service/src/optimus/service/backends/dynamo_util.clj
clojure
Copyright ( c ) Trainline Limited , 2017 . All rights reserved . See LICENSE.txt in the project root for license information (ns optimus.service.backends.dynamo-util "Common utilities for DynamoDB implementations" (:require [optimus.service.util :refer [throw-too-many-requests]]) (:import [com.amazonaws.servi...
537ce36e869c2112e2b7b4130960c63f3e18d55d0c6ee62b6222715dcebd6747
blacktaxi/inversion
Preview.hs
#!/usr/bin/env stack -- stack --resolver lts-3.7 --install-ghc runghc module Main where import Control.Applicative ((<$>), (<*>)) import Control.Monad (forM_) import Data.Int (Int16 (..)) import Data.Binary (encode) import qualified Data.ByteString.Lazy as BS (ByteString, concat, putStr) type Amplitude = Double type ...
null
https://raw.githubusercontent.com/blacktaxi/inversion/f11aa90d6fe6ab7a1f7fa3c3b19bfcf5c1fca451/src/Preview.hs
haskell
stack --resolver lts-3.7 --install-ghc runghc
#!/usr/bin/env stack module Main where import Control.Applicative ((<$>), (<*>)) import Control.Monad (forM_) import Data.Int (Int16 (..)) import Data.Binary (encode) import qualified Data.ByteString.Lazy as BS (ByteString, concat, putStr) type Amplitude = Double type Time = Double type Signal = Time -> Amplitude m...
fc28ebbe8058d53f627a2a5758f7b2d02df8d0ce855d5f3f08865f73ea2d6536
alda-lang/alda-core
duration_test.clj
(ns alda.lisp.duration-test (:require [clojure.test :refer :all] [alda.test-helpers :refer (get-instrument dur->ms)] [alda.lisp :refer :all])) (deftest duration-tests (testing "note-length converts note length to number of beats" (is (== 1 (:value (note-length 4)))) (is...
null
https://raw.githubusercontent.com/alda-lang/alda-core/4c92eb4fe363485193c58b77b1ec8e36c8866fb5/test/alda/lisp/duration_test.clj
clojure
(ns alda.lisp.duration-test (:require [clojure.test :refer :all] [alda.test-helpers :refer (get-instrument dur->ms)] [alda.lisp :refer :all])) (deftest duration-tests (testing "note-length converts note length to number of beats" (is (== 1 (:value (note-length 4)))) (is...
6d9c94de20bf887cc7e3bcc23cf272bbdddf60360f45036206d090738a4fc744
Shinmera/tooter
staple.ext.lisp
(defmethod staple:packages ((system (eql (asdf:find-system :tooter)))) (list :tooter-client :tooter-objects :tooter-queries))
null
https://raw.githubusercontent.com/Shinmera/tooter/b8d4b245b1d946bc9da6f51a3d8c2dc43e4d3868/staple.ext.lisp
lisp
(defmethod staple:packages ((system (eql (asdf:find-system :tooter)))) (list :tooter-client :tooter-objects :tooter-queries))
2cb182fd16328acd64db7e6dcb25f4fce0a239f5f444d1496d61cbfe96ac5037
nyu-acsys/drift
apply.ml
(* USED: PLDI2011 as apply *) let apply (f: int -> bool) x = f x let g (y:int) (z:int) = (y = z) let rec k i n = if i >= n then true else (apply (g n) n && k (i+1) n) let main_p (mn:int) = assert(k 0 mn = true) let main (w:unit) = let _ = main_p 20 in let _ = for i = 1 to 1000000 do main ( Ra...
null
https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/r_type/high/apply.ml
ocaml
USED: PLDI2011 as apply
let apply (f: int -> bool) x = f x let g (y:int) (z:int) = (y = z) let rec k i n = if i >= n then true else (apply (g n) n && k (i+1) n) let main_p (mn:int) = assert(k 0 mn = true) let main (w:unit) = let _ = main_p 20 in let _ = for i = 1 to 1000000 do main ( Random.int 1000 ) done ...
81d10a825e64a25be0830e249ac0872362d77745924b2f0c25fad2b5f7ce00e1
karamellpelle/grid
Make.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid 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 optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/LevelTools/Make.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 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 module LevelTools.Make ( lvlFromEdit, mak...
7add685d16817623dce0c6519ddcbb23211f7965573b2b21c4f852f6497ea27d
fjvallarino/monomer
Tutorial05_Producers.hs
| Module : Tutorial05_Producers Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Main module for the ' 05 - Producers ' tutorial . Module : Tutorial05_Producers Copyright : (c) 2018 F...
null
https://raw.githubusercontent.com/fjvallarino/monomer/51ce06f613eeb5a7e1172ae1a17cf099e053c9cb/examples/tutorial/Tutorial05_Producers.hs
haskell
# LANGUAGE OverloadedStrings #
| Module : Tutorial05_Producers Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Main module for the ' 05 - Producers ' tutorial . Module : Tutorial05_Producers Copyright : (c) 2018 F...
e10115bcba4232a46d9ac2fe0efbe02018899d71270cbb3928e4c2c15c3eb7a5
2600hz-archive/whistle
riak_core_node_watcher.erl
%% ------------------------------------------------------------------- %% %% riak_core: Core Riak Application %% Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. 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...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/riak_core-0.14.0/src/riak_core_node_watcher.erl
erlang
------------------------------------------------------------------- riak_core: Core Riak Application 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 sp...
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. 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 -...
f77d4a122234967a78075beff301490d126ea04576c831ec9f5f4cb15218f706
runeksvendsen/bitcoin-payment-channel
Parse.hs
# LANGUAGE DeriveGeneric , DeriveAnyClass # module PaymentChannel.RBPCP.Parse ( fromPaymentData , toPaymentData , RBPCP.PaymentData(..) , ParseError(..) , parseRedeemScript ) where import RBPCP.Types (PaymentData(..), JsonHex(..)) import qualified RBPCP.Types as RBPCP import PaymentChannel.Internal.Util import Payme...
null
https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/src/PaymentChannel/RBPCP/Parse.hs
haskell
# LANGUAGE DeriveGeneric , DeriveAnyClass # module PaymentChannel.RBPCP.Parse ( fromPaymentData , toPaymentData , RBPCP.PaymentData(..) , ParseError(..) , parseRedeemScript ) where import RBPCP.Types (PaymentData(..), JsonHex(..)) import qualified RBPCP.Types as RBPCP import PaymentChannel.Internal.Util import Payme...
5789fad52edc6e498fdce8584b93504a097a7ba2a7537a2acf300a32aede99dc
backtracking/ocamlgraph
dirTree.mli
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and (* ...
null
https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/editor/dirTree.mli
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking type t va...
d356c7e0f87d2ca5e88705597e9353e18d57273d4f01c444cc33915c3d91b67e
solita/mnt-teet
account_commands_test.clj
(ns ^:db teet.account.account-commands-test (:require [clojure.test :refer [is deftest testing use-fixtures]] [teet.test.utils :as tu] teet.account.account-commands [datomic.client.api :as d])) (use-fixtures :each tu/with-environment (tu/with-db)) (deftest change-account-email ...
null
https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/backend/test/teet/account/account_commands_test.clj
clojure
(ns ^:db teet.account.account-commands-test (:require [clojure.test :refer [is deftest testing use-fixtures]] [teet.test.utils :as tu] teet.account.account-commands [datomic.client.api :as d])) (use-fixtures :each tu/with-environment (tu/with-db)) (deftest change-account-email ...