_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 |
|---|---|---|---|---|---|---|---|---|
5d6f16f4e62d02b9361fc5e3e06b0857f9a11909c76037235a19001b6da81b5c | silky/fashion | Main.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Main where
import Control.Monad (replicateM)
import Data.Char (toLower)
import Data.List hiding (find)
import Diagrams.Backend.Cairo.CmdLine
import Diagrams.Prelude
import GSL.Random... | null | https://raw.githubusercontent.com/silky/fashion/2b01d1e5c385fe99e8e54f5828114551e9c8e309/RandomImagePositions/src/Main.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE NoMonomorphismRestriction #
Lay things out in a grid instead:
Randomly
let ds = position (zip points diags) | # LANGUAGE FlexibleContexts #
module Main where
import Control.Monad (replicateM)
import Data.Char (toLower)
import Data.List hiding (find)
import Diagrams.Backend.Cairo.CmdLine
import Diagrams.Prelude
import GSL.Random.Quasi (halton, QRNGType, getListSample, newQRNG)
import System.FilePath
import System.F... |
3ce1804388cbe8b503c2ffd2984a27504c2097b821f8cd8efb352715fa1f7fef | dongcarl/guix | keymap.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2018 , 2020 < >
Copyright © 2019 < >
Copyright © 2020 >
;;;
;;; 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
t... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/installer/newt/keymap.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 © 2018 , 2020 < >
Copyright © 2019 < >
Copyright © 2020 >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu installer newt keymap)
#:use-modul... |
6b22b0c8449ae56b639c27ddfbfe6dfbdbc5db45e045997cba4896c2299c42cd | BranchTaken/Hemlock | test_wraparound.ml | open! Basis.Rudiments
open! Basis
open I32
let test () =
File.Fmt.stdout
|> Fmt.fmt "max_value + "
|> pp one
|> Fmt.fmt " -> "
|> fmt ~alt:true ~zpad:true ~width:8L ~radix:Radix.Hex ~pretty:true (max_value + one)
|> Fmt.fmt "\nmin_value - "
|> pp one
|> Fmt.fmt " -> "
|> fmt ~alt:true ~zpad:true ~wid... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/i32/test_wraparound.ml | ocaml | open! Basis.Rudiments
open! Basis
open I32
let test () =
File.Fmt.stdout
|> Fmt.fmt "max_value + "
|> pp one
|> Fmt.fmt " -> "
|> fmt ~alt:true ~zpad:true ~width:8L ~radix:Radix.Hex ~pretty:true (max_value + one)
|> Fmt.fmt "\nmin_value - "
|> pp one
|> Fmt.fmt " -> "
|> fmt ~alt:true ~zpad:true ~wid... | |
cabe3ba7c96dcaff40b8b20b792af39db5c83b16c02d9c3f2dbfba5520dc2441 | tolysz/prepare-ghcjs | Types.hs | # LANGUAGE OverloadedStrings
, LambdaCase
#
, LambdaCase
#-}
module PrepGhcJS.Types where
import Turtle
import Data.Either
data PrepConfig = PrepConfig
{ master :: Turtle.FilePath
, workdir :: Turtle.FilePath
, checkResolver :: IO Text
, tag :: Text
, copyIgnore :: [Text]
,... | null | https://raw.githubusercontent.com/tolysz/prepare-ghcjs/8499e14e27854a366e98f89fab0af355056cf055/lib/PrepGhcJS/Types.hs | haskell | # LANGUAGE OverloadedStrings
, LambdaCase
#
, LambdaCase
#-}
module PrepGhcJS.Types where
import Turtle
import Data.Either
data PrepConfig = PrepConfig
{ master :: Turtle.FilePath
, workdir :: Turtle.FilePath
, checkResolver :: IO Text
, tag :: Text
, copyIgnore :: [Text]
,... | |
1cc3988f3561f9f1429129dce09d7a31c53c7dfdb914446ed3f5a7907fc3489a | marcoheisig/Petalisp | packages.lisp | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(cl:in-package #:common-lisp-user)
(defpackage #:petalisp.native-backend
(:use
#:common-lisp
#:petalisp.core
#:petalisp.ir)
(:export
#:make-native-backend))
| null | https://raw.githubusercontent.com/marcoheisig/Petalisp/a1c85cf71da445ef9c7913cd9ddb5149373211a7/code/native-backend/packages.lisp | lisp | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(cl:in-package #:common-lisp-user)
(defpackage #:petalisp.native-backend
(:use
#:common-lisp
#:petalisp.core
#:petalisp.ir)
(:export
#:make-native-backend))
| |
5126aba7c40c876ebfbee1135b3d38ca4553eec9f6700fe7cf8738158753112d | release-project/portability-libs | dynattr.erl | Built - in Erlang node attributes for Linux .
( )
Written at the University of Glasgow as part of the RELEASE project : www.release-project.eu .
%% says not
%% to use {M, F}, but instead fun M:F/k.
%% ... except that file:consult fails when it gets such a term.
%% It looks as if fun M:F/k is in fact an expr... | null | https://raw.githubusercontent.com/release-project/portability-libs/3220c0e0a42774159c335228ed7c1aec3e7755f8/attr/dynattr.erl | erlang | says not
to use {M, F}, but instead fun M:F/k.
... except that file:consult fails when it gets such a term.
It looks as if fun M:F/k is in fact an expression rather than a term
Dialyzer -Wunderspecs complains if you use string() in some of the
specs below (eg, find_one_entry), but that seems to be because the
... | Built - in Erlang node attributes for Linux .
( )
Written at the University of Glasgow as part of the RELEASE project : www.release-project.eu .
-module(dynattr).
-export([loadavg1/0, loadavg5/0, loadavg15/0, kernel_entities/0,
num_erlang_processes/0, mem_total/0, mem_free/0, cpu_speed/0, cpu_model_name/0]... |
381f2dcb58432c99fe234da810063f3fc40575e912e280602a5aec7e98e0272e | zxymike93/SICP | 305.rkt | #lang sicp
(define (square x) (* x x))
;; int, P -> rat
(define (monte-carlo trials experiment)
(define (iter trials-remaining trials-passed)
(cond [(= trials-remaining 0)
(/ trials-passed trials)]
[(experiment)
(iter (- trials-remaining 1)
(+ trials-passed 1))]
... | null | https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter3/305.rkt | racket | int, P -> rat
P(x, y): if (x, y) in circle, true; else false
test
r^2 * pi = area-of-circle | #lang sicp
(define (square x) (* x x))
(define (monte-carlo trials experiment)
(define (iter trials-remaining trials-passed)
(cond [(= trials-remaining 0)
(/ trials-passed trials)]
[(experiment)
(iter (- trials-remaining 1)
(+ trials-passed 1))]
[else
... |
d06537105bffc66690c42a79e66be0c9979d253dea1f2694aa6973e065a5859b | logicmoo/wam_common_lisp | sysdef.lisp | -*- Mode : Lisp ; Base : 10 ; Syntax : Common - Lisp ; Package : DSYS -*-
;;; File: sysdef.lisp
Author :
;;;
ROSE - Rensselaer Object System for Engineering
;;; Common Lisp Implementation
;;;
Copyright ( c ) 1990 by
Rensselaer Polytechnic Institute , Troy , New York .
;;; All Rights Res... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/pcl/sysdef.lisp | lisp | Base : 10 ; Syntax : Common - Lisp ; Package : DSYS -*-
File: sysdef.lisp
Common Lisp Implementation
All Rights Reserved
THE SOFTWARE AND ACCOMPANYING WRITTEN MATERIALS ARE PROVIDED
\"AS IS\" AND WITHOUT ANY WARRANTY, INCLUDING BUT NOT LIMITED
TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS ... | Author :
ROSE - Rensselaer Object System for Engineering
Copyright ( c ) 1990 by
Rensselaer Polytechnic Institute , Troy , New York .
A PARTICULAR PURPOSE . THE ENTIRE RISK AS TO THE QUALITY AND
MATERIALS IS ASSUMED BY YOU . IN NO EVENT SHALL RENSSELAER
NONPERFORMANCE OF THIS SOFTWARE .... |
6824132c747b1132ac7131f4e6b475bda10b7f57ebe25e20105df48d29931e70 | schemedoc/implementation-metadata | picbit.scm | (title "PICBIT")
(person "Marc Feeley")
(person "Danny Dubé")
(academy "Université de Montréal")
(academy "Université Laval")
(paper
(type inproceedings)
(title "PICBIT: A Scheme system for the PIC microcontroller")
(author "Marc Feeley")
(author "Danny Dubé")
(booktitle "Proceedings of the Fourth Workshop on Sc... | null | https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/picbit.scm | scheme | (title "PICBIT")
(person "Marc Feeley")
(person "Danny Dubé")
(academy "Université de Montréal")
(academy "Université Laval")
(paper
(type inproceedings)
(title "PICBIT: A Scheme system for the PIC microcontroller")
(author "Marc Feeley")
(author "Danny Dubé")
(booktitle "Proceedings of the Fourth Workshop on Sc... | |
3abfa460cdb6d5140fe4bc056a92bb6fb36ab8bcbd889ca089cbeeeb43d0981e | windock/erlyvideo | misultin_echo.erl | % ==========================================================================================================
MISULTIN - Example : Echoes inputted GET variables into an XML .
%
% >-|-|-(°>
%
Copyright ( C ) 2009 , < >
% All rights reserved.
%
% BSD License
%
% Redistribution and use in source and binary forms, ... | null | https://raw.githubusercontent.com/windock/erlyvideo/80fdc4175de86f0ab5fb6db20a5b3c2fd4d5a075/deps/misultin/examples/misultin_echo.erl | erlang | ==========================================================================================================
>-|-|-(°>
All rights reserved.
BSD License
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
* Redistribu... | MISULTIN - Example : Echoes inputted GET variables into an XML .
Copyright ( C ) 2009 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR FOR
ANY DIRECT , INDIRECT , INCIDENT... |
b04c334ef38cd058d189075fb6c8724450eb7dbc3656f9bfa37d9433a13436c7 | LeiWangHoward/Common-Lisp-Playground | load-s-xml-rpc.lisp |
(in-package :cs325-user)
#+allegro
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :asdf))
#+allegro
(eval-when (:compile-toplevel :load-toplevel :execute)
(pushnew (merge-pathnames "s-xml/" *cs325-home*)
asdf:*central-registry* :test #'equal)
(pushnew (merge-pathnames "s-xml-rpc/... | null | https://raw.githubusercontent.com/LeiWangHoward/Common-Lisp-Playground/4130232954f1bbf8aa003d856ccb2ab382da0534/load-s-xml-rpc.lisp | lisp |
(in-package :cs325-user)
#+allegro
(eval-when (:compile-toplevel :load-toplevel :execute)
(require :asdf))
#+allegro
(eval-when (:compile-toplevel :load-toplevel :execute)
(pushnew (merge-pathnames "s-xml/" *cs325-home*)
asdf:*central-registry* :test #'equal)
(pushnew (merge-pathnames "s-xml-rpc/... | |
838d08ff504a0ab1c973efb07c45c7bc78a51683c5cee379dc32998ea64f8900 | mirage/capnp-rpc | request.mli | type 'a t
module RO_array = Capnp_rpc.RO_array
val create : ?message_size:int -> (Capnp.Message.rw Capnp.BytesMessage.Slice.t -> 'a) -> 'a t * 'a
val create_no_args : unit -> 'a t
val finish : (_, 'a, _) Capnp.RPC.MethodID.t -> 'a t -> Msg.Request.t
val release : 'a t -> unit
| null | https://raw.githubusercontent.com/mirage/capnp-rpc/f04fa96a583994b71731bc1288833f8304c9ce81/capnp-rpc-lwt/request.mli | ocaml | type 'a t
module RO_array = Capnp_rpc.RO_array
val create : ?message_size:int -> (Capnp.Message.rw Capnp.BytesMessage.Slice.t -> 'a) -> 'a t * 'a
val create_no_args : unit -> 'a t
val finish : (_, 'a, _) Capnp.RPC.MethodID.t -> 'a t -> Msg.Request.t
val release : 'a t -> unit
| |
d4a38a77943a5092b859aab92ff053c584437d704549b2944fc86a8751a2fc4a | sneeuwballen/zipperposition | logtk_arith.mli |
module Z : sig
type t
val zero : t
val one : t
val minus_one : t
val of_int : int -> t
val of_string : string -> t
val succ : t -> t
val pred : t -> t
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val rem : t -> t... | null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/333c4a5b0f8a726f414db901a77ca30921178da5/src/core/arith/logtk_arith.mli | ocaml |
module Z : sig
type t
val zero : t
val one : t
val minus_one : t
val of_int : int -> t
val of_string : string -> t
val succ : t -> t
val pred : t -> t
val abs : t -> t
val neg : t -> t
val add : t -> t -> t
val sub : t -> t -> t
val mul : t -> t -> t
val div : t -> t -> t
val rem : t -> t... | |
93c2f23131a6122a161c8e14b54dfe4b046a7a59e3be2cae0844e134a9edfb5b | rixed/ramen | RamenFieldMask.ml | (* The bits that are required on workers. See RamenFieldMaskLib for the real
* thing. *)
open Batteries
open RamenConsts
open DessserMasks
let print = print_mask
(* Note: recursive strings are compatible with the older format as long as
* there is no recursion. *)
let to_string = string_of_mask
let of_string s = D... | null | https://raw.githubusercontent.com/rixed/ramen/3ec6745b0affe1bbc7e4709170c957de0a3bbdfe/src/RamenFieldMask.ml | ocaml | The bits that are required on workers. See RamenFieldMaskLib for the real
* thing.
Note: recursive strings are compatible with the older format as long as
* there is no recursion.
$< Batteries
FIXME: when the output type is a single value, just [| Copy |]:
$> | open Batteries
open RamenConsts
open DessserMasks
let print = print_mask
let to_string = string_of_mask
let of_string s = DessserMasks.Parser.mask_of_string s
$ = of_string & ~printer : identity
" _ " ( of_string " _ " | > to_string )
" _ " ( of_string " ( _ _ ) " | > to_string )
" ( _ X ) " ( of_strin... |
3e261474e1a88f7c02d005a43ad41d5fa0296122fba400451225dd5c8e2090eb | cram2/cram | lookup.lisp | ;; Index lookup and acceleration
, Sun Nov 4 2007 - 18:09
Time - stamp : < 2012 - 01 - 13 12:01:25EST lookup.lisp >
;;
Copyright 2007 , 2008 , 2009 , 2011
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under th... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/interpolation/lookup.lisp | lisp | Index lookup and acceleration
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPO... | , Sun Nov 4 2007 - 18:09
Time - stamp : < 2012 - 01 - 13 12:01:25EST lookup.lisp >
Copyright 2007 , 2008 , 2009 , 2011
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of ... |
3759bfb2c28233c968bd6daefadba9dde67139acebe65d7ad517e080f20572cc | Mattiemus/LaneWars | UI.hs | module Game.Client.UI where
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Graphics.UI.SDL as SDL
import Graphics.UI.SDL.Events as SDL.Events
import Graphics.UI.SDL.Keysym as SDL.Keysym
import Game.Shared.Types
import Game.Client.Graphics
-- |Generates a graphic object that will draw... | null | https://raw.githubusercontent.com/Mattiemus/LaneWars/4c4a0a11f49cbd9ff722aedf3e0f352e49b140fe/Game/Client/UI.hs | haskell | |Generates a graphic object that will draw a progress bar
^Area in which the progress bar will be drawn
^Foreground color
^Background color
^Border width | module Game.Client.UI where
import FRP.Yampa as Yampa
import FRP.Yampa.Geometry
import Graphics.UI.SDL as SDL
import Graphics.UI.SDL.Events as SDL.Events
import Graphics.UI.SDL.Keysym as SDL.Keysym
import Game.Shared.Types
import Game.Client.Graphics
^Progress bar percentage
->... |
eaf2e87e38e5e0c503a77b74b4255d26a5f5fdff7b66a011b0d85164db745989 | mirage/irmin | libirmin.ml |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/libirmin/lib/libirmin.ml | ocaml |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | |
f8f79105cad2affe68e8477b5f312f7bc3645b36de2b8157916a82d02f50a0c8 | metaocaml/ber-metaocaml | pr7391.ml | (* TEST
* expect
*)
class virtual child1 parent =
object
method private parent = parent
end
class virtual child2 =
object(_ : 'self)
constraint 'parent = < previous: 'self option; .. >
method private virtual parent: 'parent
end
Worked in 4.03
let _ =
object(self)
method previous = None... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/typing-gadts/pr7391.ml | ocaml | TEST
* expect
|
class virtual child1 parent =
object
method private parent = parent
end
class virtual child2 =
object(_ : 'self)
constraint 'parent = < previous: 'self option; .. >
method private virtual parent: 'parent
end
Worked in 4.03
let _ =
object(self)
method previous = None
method child =
... |
0e7450901be4f68e6f3c029a435c1e0338758cf1aef7da2f06a8e51867dc1d80 | xxyzz/SICP | Exercise_3_54.rkt | #lang racket/base
(require racket/stream)
(define (stream-map proc . argstreams)
(if (stream-empty? (car argstreams))
empty-stream
(stream-cons
(apply proc (map stream-first argstreams))
(apply stream-map
(cons proc (map stream-rest argstreams))))))
(define (add-streams s1 s2... | null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/3_Modularity_Objects_and_State/3.5_Streams/Exercise_3_54.rkt | racket | #lang racket/base
(require racket/stream)
(define (stream-map proc . argstreams)
(if (stream-empty? (car argstreams))
empty-stream
(stream-cons
(apply proc (map stream-first argstreams))
(apply stream-map
(cons proc (map stream-rest argstreams))))))
(define (add-streams s1 s2... | |
2dd90cd9ee5d4774896958ef8192287077b9007efff4f9aac788ffecf9144970 | RichiH/git-annex | Notification.hs | git - annex desktop notifications
-
- Copyright 2014 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2014 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Annex.Notification (NotifyWitness, noNotification, notifyTransfer, notif... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Annex/Notification.hs | haskell | Witness that notification has happened.
Only use when no notification should be done.
Wrap around an action that performs a transfer, which may run multiple
- attempts. Displays notification when supported and when the user asked
- for it.
Is there a standard icon for success/completion? | git - annex desktop notifications
-
- Copyright 2014 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2014 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Annex.Notification (NotifyWitness, noNotification, notifyTransfer, notif... |
01a42a6051c87a7280d96a65ecbbe81d7d4a6f5a054bfbda7a5e6d19c90ae1e9 | gtk2hs/gtk2hs | GtkChap4-1b.hs | import Graphics.UI.Gtk
main :: IO ()
main = do
initGUI
window <- windowNew
set window [windowTitle := "Radio Button", containerBorderWidth := 5 ,
windowDefaultWidth := 200, windowDefaultHeight := 150 ]
box1 <- vBoxNew False 0
containerAdd window box1
box2 <- vBoxNew False 10
containerSetBor... | null | https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/docs/tutorial/Tutorial_Port/Example_Code/GtkChap4-1b.hs | haskell | import Graphics.UI.Gtk
main :: IO ()
main = do
initGUI
window <- windowNew
set window [windowTitle := "Radio Button", containerBorderWidth := 5 ,
windowDefaultWidth := 200, windowDefaultHeight := 150 ]
box1 <- vBoxNew False 0
containerAdd window box1
box2 <- vBoxNew False 10
containerSetBor... | |
8359960de09e5ce5463914420ade2ed29bd74c7b0ad7878496c1e8ed3ed886b5 | neonsquare/mel-base | folder.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Copyright ( c ) 2004 , < > .
;;; All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistribution... | null | https://raw.githubusercontent.com/neonsquare/mel-base/7edc8fb94f30d29637bae0831c55825b0021e0f8/folders/imap/folder.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list... |
Copyright ( c ) 2004 , < > .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :mel.folders.imap)
(defvar *imap-debug* nil)
(defclass sequence-table-mixin ()
((seq-table :initform (make-array 5000 :adj... |
c9b234b10a1019023a66b00322667a29a7912156ad4214f7ad6c0ff9f8352e15 | ocaml/oasis2debian | Input.ml | (******************************************************************************)
oasis2debian : Create and maintain Debian package for an OASIS package
(* *)
Copyright ( C ) 2013 ,
(* ... | null | https://raw.githubusercontent.com/ocaml/oasis2debian/41d268cada4afdac8c906ac99277d7c685bc15ae/src/Input.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | oasis2debian : Create and maintain Debian package for an OASIS package
Copyright ( C ) 2013 ,
the Free Software Foundation ; either version 2.1 of the License , or ( at
You should have received a copy of the GNU Lesser General Public License
along with t... |
ea364e9ad41d34041674525560a1890a073bc377d9c7a63e9bbfea18276dd7df | cbaggers/nineveh | misc.lisp | (in-package :nineveh.noise)
;;----------------------------------------------------------------------
;; 2D
(defun-g polka-dot-noise ((p :vec2) (radius-low :float) (radius-high :float))
(let* ((pi (floor p))
(pf (- p pi))
(hash (bs-fast32-hash-cell pi))
(radius
(max 0.0 (+ radius... | null | https://raw.githubusercontent.com/cbaggers/nineveh/0a10a84669cd9d1c584f54b9eab062986a5f1c47/noise/misc.lisp | lisp | ----------------------------------------------------------------------
2D
----------------------------------------------------------------------
---------------------------------------------------------------------- | (in-package :nineveh.noise)
(defun-g polka-dot-noise ((p :vec2) (radius-low :float) (radius-high :float))
(let* ((pi (floor p))
(pf (- p pi))
(hash (bs-fast32-hash-cell pi))
(radius
(max 0.0 (+ radius-low (* (z hash) (- radius-high radius-low)))))
(value (/ radius (max ... |
d9c149387710d33664dd2159589346d30cdae56c7b41917bd9131e42a04685c2 | luminus-framework/lein-uberwar | war_util.clj | (ns leiningen.war-util
(:use [leinjacker.eval :only (eval-in-project)])
(:require [clojure.string :as str]
[clojure.java.io :as io]
[leiningen.deps]
[leinjacker.utils :as lju]))
(defn find-namespaces [var-syms]
(->> (remove nil? var-syms)
(map (comp symbol namespace))
... | null | https://raw.githubusercontent.com/luminus-framework/lein-uberwar/8edb85e1c4f8ce0f726ee703848513d5a0363833/src/leiningen/war_util.clj | clojure | generated sources would be going into a dedicated directory and thus
be immune from the lifecycle around :target-dir; that would be | (ns leiningen.war-util
(:use [leinjacker.eval :only (eval-in-project)])
(:require [clojure.string :as str]
[clojure.java.io :as io]
[leiningen.deps]
[leinjacker.utils :as lju]))
(defn find-namespaces [var-syms]
(->> (remove nil? var-syms)
(map (comp symbol namespace))
... |
53aae6f3d59c522a8f9f6ab8d1f6c2cd062ae1e5b2727c828e99c0e3c6cb19df | ralsei/sawzall | reorder-df.rkt | #lang racket/base
(require data-frame
fancy-app
racket/vector
"helpers.rkt")
(provide reorder-df
reorder-default)
;; sorts a data-frame with the given columns and comparators
;; breaks ties using subsequent columns
;;
;; XXX: this function is used internally a lot. maybe it shouldn'... | null | https://raw.githubusercontent.com/ralsei/sawzall/d6ddb7ba098c223472d7fd6f153fa607e8a80fee/sawzall-lib/reorder-df.rkt | racket | sorts a data-frame with the given columns and comparators
breaks ties using subsequent columns
XXX: this function is used internally a lot. maybe it shouldn't be!
this is non-deterministic, but since we define it here, we can use it as a commonality
to zip the vectors later
MOST TIME here is spent in `vector-re... | #lang racket/base
(require data-frame
fancy-app
racket/vector
"helpers.rkt")
(provide reorder-df
reorder-default)
uses an index vector for grouping as metadata
(define (reorder-df df pairs)
(define row-count (df-row-count df))
(define index-vector (build-vector row-coun... |
bb305f417459d5b170afc2c7551909a716911ada37d0b07d9ff5b9f07cd8a596 | Helium4Haskell/helium | Export8.hs | module Export8(,) where
f :: Int
f = 3
main :: Int
main = f | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/exports/Export8.hs | haskell | module Export8(,) where
f :: Int
f = 3
main :: Int
main = f | |
f8ffcf8db652e71480ddd18a672783f44a54bd49a215550453db541856d2ea3e | reasonml/reason | migrate_parsetree_412_411_migrate.ml | open Stdlib0
module From = Ast_412
module To = Ast_411
let rec copy_out_type_extension :
Ast_412.Outcometree.out_type_extension ->
Ast_411.Outcometree.out_type_extension
=
fun
{ Ast_412.Outcometree.otyext_name = otyext_name;
Ast_412.Outcometree.otyext_params = otyext_params;
Ast_412.Outcometr... | null | https://raw.githubusercontent.com/reasonml/reason/4f6ff7616bfa699059d642a3d16d8905d83555f6/src/vendored-omp/src/migrate_parsetree_412_411_migrate.ml | ocaml | ignoring [Injective] is not quite correct | open Stdlib0
module From = Ast_412
module To = Ast_411
let rec copy_out_type_extension :
Ast_412.Outcometree.out_type_extension ->
Ast_411.Outcometree.out_type_extension
=
fun
{ Ast_412.Outcometree.otyext_name = otyext_name;
Ast_412.Outcometree.otyext_params = otyext_params;
Ast_412.Outcometr... |
d4f143c1730048beee8f6e0a7873a24e1d108f3a855764f93471662e418c3a9e | ucla-pls/jreduce | JReduce.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE ApplicativeDo #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE... | null | https://raw.githubusercontent.com/ucla-pls/jreduce/5158c87203b5d2235a49f9d960dd5617f472f259/src/JReduce.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE RecordWildCards #
lens
time
text
filepath
optparse-applicative
bytestring
reduce
casava
reduce-util
dirtree
containers
import qualified Data.Set as S
base
jreduce
... | # LANGUAGE ApplicativeDo #
# LANGUAGE LambdaCase #
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
module JReduce where
import Control.Lens
mtl
import Control.Monad... |
5eecb38b736b31f32266ce4f30aed0b467d1c81799316ce60c5c420f1e9571bf | PrincetonUniversity/lucid | Dedup.ml |
This pass deduplicates hash and Array accessors , by
moving them all into their own labeled blocks .
This applies only to labeled statements , not handlers .
Must be used after ActionForm.ml .
Note : This re - uses the labeled_statement cache and process_branch
code from ActionForm.ml .
Thi... | null | https://raw.githubusercontent.com/PrincetonUniversity/lucid/3a94505efa50e988b4c9ef28048be47cc65b4355/src/lib/backend/transformations/Dedup.ml | ocaml | dedup closures that represent tables |
This pass deduplicates hash and Array accessors , by
moving them all into their own labeled blocks .
This applies only to labeled statements , not handlers .
Must be used after ActionForm.ml .
Note : This re - uses the labeled_statement cache and process_branch
code from ActionForm.ml .
Thi... |
cdfba63f0aeb967f71b78516f4db3d24f25a4a2efc5a6f56101255f099d4c555 | sadiqj/ocaml-esp32 | typeopt.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/typing/typeopt.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Auxiliaries for type - based optimizations , e.g. array kinds
val is_function_type :
Env.t -> Ty... |
b4d41a883762b88cb60003a0958bd94ee347df74f972f411ae9e9ba216d24808 | janestreet/memtrace_viewer_with_deps | test_ppx_quickcheck.ml | open! Import
open Ppx_quickcheck_test_examples
module Helpers = struct
module type S = sig
type t
val quickcheck_generator : t Generator.t
val quickcheck_observer : t Observer.t
val quickcheck_shrinker : t Shrinker.t
end
let test (type a) ?config ?cr ?generator ?observer ?shrinker q m =
let... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/base_quickcheck/ppx_quickcheck/test/src/test_ppx_quickcheck.ml | ocaml | We disable CRs in test output because the observer is neither strictly transparent
nor strictly opaque, so it will fail the test in either observer mode we give it.
We disable CRs in test output because the observer is neither strictly transparent
nor strictly opaque, so it will fail the test in either obs... | open! Import
open Ppx_quickcheck_test_examples
module Helpers = struct
module type S = sig
type t
val quickcheck_generator : t Generator.t
val quickcheck_observer : t Observer.t
val quickcheck_shrinker : t Shrinker.t
end
let test (type a) ?config ?cr ?generator ?observer ?shrinker q m =
let... |
f97be8a1f0cf7196e3abfc761773de72e72ffbe1ae706b9066d3664045b074a0 | janestreet/hardcaml_verify | dimacs.mli | open Base
open Stdio
* Write a DIMACS formatted CNF file suitable for input into SAT solvers .
val write_problem : Cnf.t -> Out_channel.t -> unit
* the result of a SAT solver . Different solves use different formats , so the
parsing is quie relaxed and works with minisat , picosat and z3 .
parsing is quie ... | null | https://raw.githubusercontent.com/janestreet/hardcaml_verify/30a4c26f8913431d02c678af014eafecb501388a/src/dimacs.mli | ocaml | open Base
open Stdio
* Write a DIMACS formatted CNF file suitable for input into SAT solvers .
val write_problem : Cnf.t -> Out_channel.t -> unit
* the result of a SAT solver . Different solves use different formats , so the
parsing is quie relaxed and works with minisat , picosat and z3 .
parsing is quie ... | |
c461f19897830355803c52a2e9dc913c2d6a43d16b50e81ebbd3786fdda18514 | SjVer/Som-Lang | configs.ml | module Cli = Cli
let _path = List.fold_left Filename.concat ""
(* internally used configs *)
let force_tty = true
let print_std_trees = true
let extension = ".som"
let include_dir =
if Sys.unix then
(* "/usr/share/som/include" *)
"/home/sjoerd/Coding/Languages/Som/stdlib"
else
failwith ("unsupporte... | null | https://raw.githubusercontent.com/SjVer/Som-Lang/e69be8bad653b0ea3d6c003f3c2e69727b1d541e/somc/lib/configs/configs.ml | ocaml | internally used configs
"/usr/share/som/include"
globals | module Cli = Cli
let _path = List.fold_left Filename.concat ""
let force_tty = true
let print_std_trees = true
let extension = ".som"
let include_dir =
if Sys.unix then
"/home/sjoerd/Coding/Languages/Som/stdlib"
else
failwith ("unsupported os type: " ^ Sys.os_type)
let prelude_ident = "prelude"
let pr... |
38a130207709fe34c34821ec1d1e0c9526015b0e94a495cde2bbc3a90490bd8d | ygrek/mldonkey | serverLocate.ml | Copyright 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at y... | null | https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/networks/server/serverLocate.ml | ocaml | lprintf"parcourage for %s\n" (Ip.to_string loc.loc_ip);
lprintf("eXeption"); lprint_newline();
lprintf("element de la liste %s") (Ip.to_string (List.hd
reply).M.ip);
lprint_newline();
lprintf("eXeption dans find_peer");
lprint_newline(); | Copyright 2002 b8_bavard , b8_fee_carabine ,
This file is part of mldonkey .
mldonkey is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at y... |
21ea5538f803ce1f226af28747e86ff361dbccb52939beffbae983dbb95af19c | well-typed-lightbulbs/ocaml-esp32 | test.ml | (* TEST
* expect
*)
module Exp =
struct
type _ t =
| IntLit : int -> int t
| BoolLit : bool -> bool t
| Pair : 'a t * 'b t -> ('a * 'b) t
| App : ('a -> 'b) t * 'a t -> 'b t
| Abs : ('a -> 'b) -> ('a -> 'b) t
let rec eval : type s . s t -> s =
function
| IntL... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/typing-gadts/test.ml | ocaml | TEST
* expect
warn
warn
warn : Any
here s = s*s!
ok
fails
fails
fails
fails
fails
fails
ok!
ok!
ok
ok
ok
ok (u non-ambiguous)
fails because u : (int | a) option ref
ok
ok
fail
Effect of external consraints
ok
ok
ok
ok
returns 'a
Combination with local modules ... |
module Exp =
struct
type _ t =
| IntLit : int -> int t
| BoolLit : bool -> bool t
| Pair : 'a t * 'b t -> ('a * 'b) t
| App : ('a -> 'b) t * 'a t -> 'b t
| Abs : ('a -> 'b) -> ('a -> 'b) t
let rec eval : type s . s t -> s =
function
| IntLit x -> x
| Boo... |
4e054c6580494cc21972db0281d5b6ab6758d3d3dfd4225cfdc47afb6d4c2a47 | gklijs/bkes-demo | clients.clj | (ns nl.openweb.topology.clients
(:import (io.confluent.kafka.serializers KafkaAvroSerializer AbstractKafkaSchemaSerDeConfig KafkaAvroDeserializer KafkaAvroDeserializerConfig)
(io.confluent.kafka.serializers.subject TopicRecordNameStrategy)
(org.apache.kafka.clients CommonClientConfigs)
... | null | https://raw.githubusercontent.com/gklijs/bkes-demo/273f5abf7a993a3ef934ea757ea5c3e6f0e0842e/topology/src/nl/openweb/topology/clients.clj | clojure | (ns nl.openweb.topology.clients
(:import (io.confluent.kafka.serializers KafkaAvroSerializer AbstractKafkaSchemaSerDeConfig KafkaAvroDeserializer KafkaAvroDeserializerConfig)
(io.confluent.kafka.serializers.subject TopicRecordNameStrategy)
(org.apache.kafka.clients CommonClientConfigs)
... | |
ac196849e0b474f8a187260ca04723bb5ce1693a8ab5e209821228b89a3a5163 | AbstractMachinesLab/caramel | fiber_test.ml | open Stdune
let printf = Printf.printf
let print pp = Format.printf "%a@." Pp.render_ignore_tags pp
let print_dyn dyn = print (Dyn.pp dyn)
module Scheduler : sig
type t
exception Never
val yield : unit -> unit Fiber.t
val create : unit -> t
val run : t -> 'a Fiber.t -> 'a
end = struct
type t = unit ... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/fiber-test/fiber_test.ml | ocaml | We don't raise in this case b/c we assume something else is being tested | open Stdune
let printf = Printf.printf
let print pp = Format.printf "%a@." Pp.render_ignore_tags pp
let print_dyn dyn = print (Dyn.pp dyn)
module Scheduler : sig
type t
exception Never
val yield : unit -> unit Fiber.t
val create : unit -> t
val run : t -> 'a Fiber.t -> 'a
end = struct
type t = unit ... |
a9493bb181739a491d6e5ca9c52637c19b973c5cf2b83bd427e19a1752ac8fd6 | bostonaholic/ring-okta | okta.clj | (ns ring.middleware.okta
"Ring middleware for Okta Single Sign-on"
(:require [clojure.java.io :as io]
[compojure.core :refer [POST defroutes]]
[ring.ring-okta.predicates :as p]
[ring.ring-okta.session :as okta-session]
[ring.util.response :as ring-response]))
(defrou... | null | https://raw.githubusercontent.com/bostonaholic/ring-okta/dad8e7c90ce080cc1f0c1a7fb37c70c706a7a040/src/ring/middleware/okta.clj | clojure | (ns ring.middleware.okta
"Ring middleware for Okta Single Sign-on"
(:require [clojure.java.io :as io]
[compojure.core :refer [POST defroutes]]
[ring.ring-okta.predicates :as p]
[ring.ring-okta.session :as okta-session]
[ring.util.response :as ring-response]))
(defrou... | |
4a3b91a60246246948593346f010d75978121f9f9d0e09d217cc0c7ef21a6ea4 | mpickering/apply-refact | Default67.hs | h x y = return $! x | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default67.hs | haskell | h x y = return $! x | |
46f41c73e41cc66800a13c60c30dff7ad8432553126fcbbfb294ff6c9d8797bf | rd--/hsc3 | jmcc-narrow-band-filtered-crackle-noise.hs | narrow band filtered crackle noise ( jmcc ) # 2 ; texture = spawn,2,inf
let e = envLinen 2 5 2 1
rf1 = rand 0 2000 + 80
rf2 = rf1 + (rand2 0.2 * rf1)
rf = xLine kr rf1 rf2 9 DoNothing
c = crackle ar (1.97 + rand 0 0.03) * 0.15
in pan2 (resonz c rf 0.2) (rand2 1) (envGen ar 1 1 0 1 RemoveSynth e)
na... | null | https://raw.githubusercontent.com/rd--/hsc3/e1c9377f4985f4cc209a9cb11421bc8f1686c6f2/Help/Graph/jmcc-narrow-band-filtered-crackle-noise.hs | haskell | narrow band filtered crackle noise ( jmcc ) # 2 ; texture = spawn,2,inf
let e = envLinen 2 5 2 1
rf1 = rand 0 2000 + 80
rf2 = rf1 + (rand2 0.2 * rf1)
rf = xLine kr rf1 rf2 9 DoNothing
c = crackle ar (1.97 + rand 0 0.03) * 0.15
in pan2 (resonz c rf 0.2) (rand2 1) (envGen ar 1 1 0 1 RemoveSynth e)
na... | |
62eba8ae37a864040c5bee797fe2d1fff43ddaea4257b49708dd5b32e06ba493 | 2600hz-archive/whistle | webmachine_util.erl | @author < >
@author < >
2007 - 2008 Basho Technologies
( guess_mime/1 derived from code copyright 2007 Mochi Media , Inc. )
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of t... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/webmachine-1.8.0/src/webmachine_util.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
limitations under the License.
return... | @author < >
@author < >
2007 - 2008 Basho Technologies
( guess_mime/1 derived from code copyright 2007 Mochi Media , Inc. )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
See the License for the spe... |
f37fffc24682677fe4aaf64809eb1f386bd6f74c576aa529350c5ce5720f7cc2 | ryukzak/nitta | DataFlow.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE TypeFamilies #
|
Module : NITTA.Intermediate . DataFlow
Description : DataFlow graph
Copyright : ( c ) , 2021
License : :
Stability : experimental
Module : NITTA.Intermediate.DataFlow
Description : DataFlow graph
Copyright : (c) ... | null | https://raw.githubusercontent.com/ryukzak/nitta/1e1e571fd73b2cb9bea4e5781bf658e7edd264c0/src/NITTA/Intermediate/DataFlow.hs | haskell | # LANGUAGE ConstraintKinds #
| Convert @[ F v x ]@ to 'DataFlowGraph'. | # LANGUAGE TypeFamilies #
|
Module : NITTA.Intermediate . DataFlow
Description : DataFlow graph
Copyright : ( c ) , 2021
License : :
Stability : experimental
Module : NITTA.Intermediate.DataFlow
Description : DataFlow graph
Copyright : (c) Aleksandr Penskoi, 2021
License ... |
4b2e4613b12d34fc23bc1a5d1e913862194d7087b4ba77ab956d5fa5553b3e11 | waldheinz/ads | Types.hs | -----------------------------------------------------------------------------
-- |
-- Module : Codec.Archive.Tar.Types
Copyright : ( c ) 2007 ,
2008 ,
2008 - 2009
2011
-- License : BSD3
--
-- Maintainer :
-- Portability : porta... | null | https://raw.githubusercontent.com/waldheinz/ads/7695a157d76f35849351b2e039890eae1b419088/src/lib/Codec/Archive/Tar/Types.hs | haskell | ---------------------------------------------------------------------------
|
Module : Codec.Archive.Tar.Types
License : BSD3
Maintainer :
Portability : portable
---------------------------------------------------------------------------
| Tar archive entry.
| The path of the file or directory... | Copyright : ( c ) 2007 ,
2008 ,
2008 - 2009
2011
Types to represent the content of @.tar@ archives .
module Codec.Archive.Tar.Types (
Entry(..),
entryPath,
EntryContent(..),
FileSize,
Permissions,
Ownership(..),
EpochTime,
... |
b9dd3d250ad16141d607808aa20aebf13e7912d92f35ae19f968b9f6def50923 | heraldry/heraldicon | message.cljs | (ns heraldicon.frontend.message
(:require
[heraldicon.frontend.language :refer [tr]]
[heraldicon.frontend.macros :as macros]
[re-frame.core :as rf]))
(def ^:private db-path-base
[:messages])
(rf/reg-sub ::message
(fn [db [_ message-id]]
(get-in db (conj db-path-base message-id))))
(rf/reg-sub ::er... | null | https://raw.githubusercontent.com/heraldry/heraldicon/6fb727fc675e171db70a4d2080c54d7e6428bd87/src/heraldicon/frontend/message.cljs | clojure | (ns heraldicon.frontend.message
(:require
[heraldicon.frontend.language :refer [tr]]
[heraldicon.frontend.macros :as macros]
[re-frame.core :as rf]))
(def ^:private db-path-base
[:messages])
(rf/reg-sub ::message
(fn [db [_ message-id]]
(get-in db (conj db-path-base message-id))))
(rf/reg-sub ::er... | |
50e2a72678115f188fe3f170817e62b7bf36303dca8c66a599112aaa4d096e5d | OCamlPro/alt-ergo | emap.mli | (******************************************************************************)
(* *)
Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
(* ... | null | https://raw.githubusercontent.com/OCamlPro/alt-ergo/291523151417f4cd112744d740b58ab1e8a630b4/src/lib/util/emap.mli | ocaml | ****************************************************************************
This file is distributed under the terms of the license indicated
in the ... | Alt - Ergo : The SMT Solver For Software Verification
Copyright ( C ) 2013 - 2018
+ , projet Cristal , INRIA Rocquencourt +
+ Copyright 1996 Institut National de Recherche en Informatique et +
+ the GNU Lesser General Pu... |
c45cfe4a854bb2626c7bfaae9ccc5cd216ed18b209e7b993c2d643c37c15f6af | ParaPhrase/skel | queens.erl | -module(queens).
-compile(export_all).
run(N) -> rainhas(N).
rainhas(N) -> lists:map(fun(X) -> search(N, X) end, lists:seq(1, N)).
search(Numero, N) -> lists:takewhile( fun (A) -> head(A) == N end, prainhas(Numero, N)).
head([H|T]) -> H.
prainhas(Numero, Linha)
-> rainhas2(Numero, Linha, Numero).
check... | null | https://raw.githubusercontent.com/ParaPhrase/skel/bf55de94e64354592ea335f4375f4b40607baf43/examples/queens.erl | erlang | -module(queens).
-compile(export_all).
run(N) -> rainhas(N).
rainhas(N) -> lists:map(fun(X) -> search(N, X) end, lists:seq(1, N)).
search(Numero, N) -> lists:takewhile( fun (A) -> head(A) == N end, prainhas(Numero, N)).
head([H|T]) -> H.
prainhas(Numero, Linha)
-> rainhas2(Numero, Linha, Numero).
check... | |
4292919a202fb182682693d93ed3f516248f95909a2dd56bb8b614843ccdf9af | SamirTalwar/advent-of-code | AOC_12_1.hs | import Control.Monad (mapM_)
import Data.Array
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as IO
import Text.Parsec
import Text.Parsec.Text
data Instruction
= Copy Value Register
| Increment Register
| Decrement Register
| Jump Value Int
deriving (Eq, Show)
data ... | null | https://raw.githubusercontent.com/SamirTalwar/advent-of-code/66bd9e31f078c9b81ece0264fb869e48964afa63/2016/AOC_12_1.hs | haskell | import Control.Monad (mapM_)
import Data.Array
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as IO
import Text.Parsec
import Text.Parsec.Text
data Instruction
= Copy Value Register
| Increment Register
| Decrement Register
| Jump Value Int
deriving (Eq, Show)
data ... | |
6618e896deca5de89f7ecc7c37b2d54353cffeac47eecc3855093782f4d9e999 | essdotteedot/distributed | basic.ml | An example program intended to show the basics of the API ( spawn , monitor , send , receive ) .
The program can be run on the same computer or distributed across different computers .
If you want to run across different computers then tweak the node configurations below
to have the correct ip addresse... | null | https://raw.githubusercontent.com/essdotteedot/distributed/bce5906d87b28afa3d7fca4b069753667045b749/examples/basic_example/basic.ml | ocaml | Define the message type that will be used to send messages between processes.
If you are going to pass around functions/closure make sure you program is not composed of multiple executables
see .
create a Distributed_lwt implementation based on the message type defined above
a catch all case,... | An example program intended to show the basics of the API ( spawn , monitor , send , receive ) .
The program can be run on the same computer or distributed across different computers .
If you want to run across different computers then tweak the node configurations below
to have the correct ip addresse... |
87eaf0440da2df1f89081a4430a71496bedfd32a1531818d2fbfb5722f3fe291 | may-liu/qtalk | gen_mod.erl | %%%----------------------------------------------------------------------
%%% File : gen_mod.erl
Author : < >
%%% Purpose :
%%% Purpose :
Created : 24 Jan 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
mo... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/gen_mod.erl | erlang | ----------------------------------------------------------------------
File : gen_mod.erl
Purpose :
Purpose :
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRA... | Author : < >
Created : 24 Jan 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
5af054d93c189cdf1e3264e64a6e07cc9bb2d2406a5e09aed0b1f131ad2f0778 | radicle-dev/radicle-alpha | Json.hs | module Radicle.Lang.Json where
import Protolude
import Control.Monad.Fail
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as A
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Map.Strict as Map
import qualified Data.Scientific as Sci
import qualified Data.Se... | null | https://raw.githubusercontent.com/radicle-dev/radicle-alpha/b38a360d9830a938fa83fc066c1d131ec903b5e1/radicle-lang/src/Radicle/Lang/Json.hs | haskell | | Parses JSON into a Value. It expects the value to be encoded as a radicle
expression in a JSON string. Corresponds to the encoding given by
'valueToJson'.
>>> import qualified Data.Vector as Vector
>>> import Data.Sequence (fromList)
| Convert a radicle `Value` into an 'aeson' value, if possible.
"{\"Right\... | module Radicle.Lang.Json where
import Protolude
import Control.Monad.Fail
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as A
import qualified Data.HashMap.Strict as HashMap
import qualified Data.Map.Strict as Map
import qualified Data.Scientific as Sci
import qualified Data.Se... |
be9d53f18587dc59ecb9df863443a3f566fb788ae7674b4f7969ca0daee4525c | Workiva/eva | api.clj | Copyright 2015 - 2019 Workiva Inc.
;;
;; Licensed under the Eclipse Public License 1.0 (the "License");
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -1.0.php
;;
;; Unless required by applicable law or agreed to in writing, software
dist... | null | https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/v2/datastructures/bbtree/api.clj | clojure |
Licensed under the Eclipse Public License 1.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-1.0.php
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre... | Copyright 2015 - 2019 Workiva Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns eva.v2.datastructures.bbtree.api
"The function of this namespace is to collect the public-facing 'permanent' methods of the
btree code. As new versions are written, the constructors here should be update... |
d07db194e41550cf2a2a910d4ec7099edafbcec034e037278a5bb66d338bafa0 | dwayne/eopl3 | interpreter.rkt | #lang eopl
(require "./env.rkt")
(require "./parser.rkt")
(provide
;; Interpreter
run)
;; Values
;;
;; ExpVal = Int
DenVal = ExpVal
(define (run s)
(let ([init-env (extend-env
'i 1
(extend-env
'v 5
(extend-env
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/LET-3.14/interpreter.rkt | racket | Interpreter
Values
ExpVal = Int | #lang eopl
(require "./env.rkt")
(require "./parser.rkt")
(provide
run)
DenVal = ExpVal
(define (run s)
(let ([init-env (extend-env
'i 1
(extend-env
'v 5
(extend-env
'x 10
(empty-env))))])
... |
d2944fa8523f5f7686a83f0dcf3e1aaabc933db617d1da7ae6716f58ae79af62 | mkloczko/derive-storable | GenericTypeSpec.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
module GenericTypeSpec where
-- Test tools
import Test.Hspec
import Test.QuickCheck
-- Tested modules
import GenericType
-- Additional data
import Foreign.Storable.Generic
import Foreign.Ptr (Ptr)
import Foreign.Marshal.Alloc (malloc)
import Data.I... | null | https://raw.githubusercontent.com/mkloczko/derive-storable/e215ce0165e0de735189e9d55058df9f62bd8b2a/test/GenericRep/GenericTypeSpec.hs | haskell | Test tools
Tested modules
Additional data
Memory for the test data.
Save the gstor value in the pointer.
Assumes that gpokeByteOff works.
Get the values from generic reps back.
Compare:
Memory for the test data.
Poke the memory
Read the memory
Assumes that gpeekByteOff works | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
module GenericTypeSpec where
import Test.Hspec
import Test.QuickCheck
import GenericType
import Foreign.Storable.Generic
import Foreign.Ptr (Ptr)
import Foreign.Marshal.Alloc (malloc)
import Data.Int
import GHC.Generics
import Foreign.Storable.Gene... |
80e7f16fd30faf7be44b64e3055440be3492176425a3733ded6714c341e0e80d | apinf/proxy42 | p42_req.erl | -module(p42_req).
-compile([export_all]).
-type req() :: cowboyku_req:req().
-type body() :: binary().
-type path() :: iodata().
-type method() :: binary().
-type header() :: binary().
-type hdrval() :: binary() | undefined.
-type headers() :: cowboyku:http_headers().
-type qs() :: binary().
-type param() :: binary().... | null | https://raw.githubusercontent.com/apinf/proxy42/01b483b711881391e8306bf64b83b4df9d0bc832/apps/proxy42_core/src/p42_req.erl | erlang | TODO: See if ignoring _Req makes sense for all functions.
returned value. | -module(p42_req).
-compile([export_all]).
-type req() :: cowboyku_req:req().
-type body() :: binary().
-type path() :: iodata().
-type method() :: binary().
-type header() :: binary().
-type hdrval() :: binary() | undefined.
-type headers() :: cowboyku:http_headers().
-type qs() :: binary().
-type param() :: binary().... |
4c06b43011c1b7adf78bd92ee1fc2bceda2b4a85dada5553aae26fe27fc952fd | returntocorp/semgrep | Xpattern_match_comby.ml |
*
* Copyright ( C ) 2021 - 2022 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... | null | https://raw.githubusercontent.com/returntocorp/semgrep/70af5900482dd15fcce9b8508bd387f7355a531d/src/engine/Xpattern_match_comby.ml | ocaml | reusing line_col_of_charpos is fine for now |
*
* Copyright ( C ) 2021 - 2022 r2c
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation , with the
* special exception on linking described in file LICE... |
cb2363aa8a60d066d626235b2283b67ebad641b4ff90e5317a572e7ae6eadccf | larrychristensen/orcpub | common_test.clj | (ns orcpub.common-test
(:require [clojure.test :refer [is deftest]]
[clojure.spec.test.alpha :as stest]
[orcpub.common :as common]))
(deftest test-add-namespaces-to-keys
(stest/instrument `common/add-namespaces-to-keys)
(is (= {:db/id 88
:a.b.c/x 1
:a.b.c/y "sdlk"}
... | null | https://raw.githubusercontent.com/larrychristensen/orcpub/e83995857f7e64af1798009a45a0b03abcd3a4be/test/cljc/orcpub/common_test.clj | clojure | (ns orcpub.common-test
(:require [clojure.test :refer [is deftest]]
[clojure.spec.test.alpha :as stest]
[orcpub.common :as common]))
(deftest test-add-namespaces-to-keys
(stest/instrument `common/add-namespaces-to-keys)
(is (= {:db/id 88
:a.b.c/x 1
:a.b.c/y "sdlk"}
... | |
f53d4ba984a0e84084f7d25c28a6ba9846ef0309dd1418dcc4f0b281ef26098a | aws-beam/aws-erlang | aws_networkmanager.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Amazon Web Services enables you to centrally manage your Amazon Web
Services Cloud WAN core network and your Transit Gateway network across
Amazon Web Services accounts , Regions , and on - premises locations .
-module(... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_networkmanager.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
====================================================================
API
====================================================================
@doc Accepts a core network attachment request.
Once the attachment request is accepted by a core network owner, the
attachment i... | See -beam/aws-codegen for more details .
@doc Amazon Web Services enables you to centrally manage your Amazon Web
Services Cloud WAN core network and your Transit Gateway network across
Amazon Web Services accounts , Regions , and on - premises locations .
-module(aws_networkmanager).
-export([accept_attachme... |
08f68bdb1aae770c729491c5fb0687219d2655e44dedc4579a6c3fc3b3a52732 | exercism/haskell | Series.hs | module Series (slices) where
import Data.Char (digitToInt)
import Data.List (tails)
slices :: Int -> String -> [[Int]]
slices n s = map (take n) . take (length s - n + 1) . tails $ numberSeries
where numberSeries = map digitToInt s | null | https://raw.githubusercontent.com/exercism/haskell/ae17e9fc5ca736a228db6dda5e3f3b057fa6f3d0/exercises/practice/series/.meta/examples/success-standard/src/Series.hs | haskell | module Series (slices) where
import Data.Char (digitToInt)
import Data.List (tails)
slices :: Int -> String -> [[Int]]
slices n s = map (take n) . take (length s - n + 1) . tails $ numberSeries
where numberSeries = map digitToInt s | |
d5c55359951ac4f93d85c62b670d0a4bba1cd88fa73485df5e5be5a4ab89e90a | mattjbray/ocaml-decoders | main.ml | open OUnit2
let sexplib_suite =
let open Decoders_sexplib.Decode in
let decoder_test ~decoder ~input ~expected _test_ctxt =
match decode_string decoder input with
| Ok value ->
assert_equal value expected
| Error error ->
assert_string (Format.asprintf "%a" pp_error error)
in
"Sexp... | null | https://raw.githubusercontent.com/mattjbray/ocaml-decoders/32aa29da3102f78f96f3202fbe035b520dec6e8e/test-sexplib/main.ml | ocaml | open OUnit2
let sexplib_suite =
let open Decoders_sexplib.Decode in
let decoder_test ~decoder ~input ~expected _test_ctxt =
match decode_string decoder input with
| Ok value ->
assert_equal value expected
| Error error ->
assert_string (Format.asprintf "%a" pp_error error)
in
"Sexp... | |
706030c3a2c76e9ce20f144cc5c232c1ecf436472c1d58de68dccc3ac3b39300 | triffon/fp-2022-23 | 02-common-unitary.rkt | #lang racket
дадена наготово
(define (accumulate operation null-value start end term next)
(if (> start end)
null-value
(operation
(term start)
(accumulate operation null-value (next start) end term next))))
Казваме , че k е унитарен делител на n , ако след делението на n на ... | null | https://raw.githubusercontent.com/triffon/fp-2022-23/fb8549ecabc1a792442783b48dca7d294e8e2996/exercises/inf2/exams/01-exam/exam-2022-2023/a/02-common-unitary.rkt | racket | решение
алтернативно решение
(length (intersection (list-unitary-divisors n1) (list-unitary-divisors n2))))
; = > 4 ( общите унитарни делители са 1 , 4 , 5 , 20 ) | #lang racket
дадена наготово
(define (accumulate operation null-value start end term next)
(if (> start end)
null-value
(operation
(term start)
(accumulate operation null-value (next start) end term next))))
Казваме , че k е унитарен делител на n , ако след делението на n на ... |
372da7832e5b82a8623a09c83c850857a3b87673393c0ab08179236e6b1da9a3 | oakmac/atom-parinfer | core.cljs | (ns atom-parinfer.core
(:require
[atom-parinfer.util :as util]
[clojure.edn :as edn]
[clojure.set :as set]
[clojure.string :as str]
[clojure.walk :as walk]
[goog.array :as garray]
[goog.functions :as gfunctions]
[goog.string :as gstring]
[oops.core :refer [ocall oget oset!]]))
(declare
o... | null | https://raw.githubusercontent.com/oakmac/atom-parinfer/3e12b9722466e163a0b536ec71c7c3e4a34a0e53/src-cljs/atom_parinfer/core.cljs | clojure | -----------------------------------------------------------------------------
JS Requires
-----------------------------------------------------------------------------
Config
ClojureScript
Clojure + ClojureScript
Extensible Data Notation
Lisp Flavored Erlang
Racket
Scheme
Lisp
Lisp
Common Lisp
Fennel
)
\"... | (ns atom-parinfer.core
(:require
[atom-parinfer.util :as util]
[clojure.edn :as edn]
[clojure.set :as set]
[clojure.string :as str]
[clojure.walk :as walk]
[goog.array :as garray]
[goog.functions :as gfunctions]
[goog.string :as gstring]
[oops.core :refer [ocall oget oset!]]))
(declare
o... |
28e526e46c06496160466a1535342379b1cc3ec66d500d428101d25f572aaa07 | jyp/topics | HOAM.hs | data Term = Lam (Term -> Term) | App Term Term | Con String
-- deriving Show
parens s = "("++s++")"
-- Higher order encoding of lambda-calculus.
instance Show Term where
showsPrec d (Con x) = showString x
showsPrec d (Lam f) = showString "\\"
showsPrec d (App t1 t2) = showParen (d > 1) (showsPrec 1 t1 . ... | null | https://raw.githubusercontent.com/jyp/topics/8442d82711a02ba1356fd4eca598d1368684fa69/Machines/HOAM.hs | haskell | deriving Show
Higher order encoding of lambda-calculus.
Adaptation of the KAM to evaluate it. | data Term = Lam (Term -> Term) | App Term Term | Con String
parens s = "("++s++")"
instance Show Term where
showsPrec d (Con x) = showString x
showsPrec d (Lam f) = showString "\\"
showsPrec d (App t1 t2) = showParen (d > 1) (showsPrec 1 t1 . showString " " . showsPrec 2 t2)
data Closure = Term
derivin... |
df600ed0235ddb5bf08616f47974296ea0e7d2ba857a14a414e75f92dd183d78 | silviucpp/erlcass | integrity_test_SUITE.erl | -module(integrity_test_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
-include("erlcass.hrl").
-compile(export_all).
all() -> [
{group, database}
].
groups() -> [
{database, [sequence], [
create_keyspace,
create_table,
simple_insertion_... | null | https://raw.githubusercontent.com/silviucpp/erlcass/8eca8f3dff3aa922c93d422fa70440ad44e4fb05/test/integrity_test_SUITE.erl | erlang | a) use bind by name and add into the binding params only the one with values (not null).
b) while using binding by index use `undefined` atom for the values that are not set.
c) when you prepare the statement use the option: `null_binding` as false. | -module(integrity_test_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("stdlib/include/assert.hrl").
-include("erlcass.hrl").
-compile(export_all).
all() -> [
{group, database}
].
groups() -> [
{database, [sequence], [
create_keyspace,
create_table,
simple_insertion_... |
45ff8d71ad266939049e665f4635e1ad1deb2984b42d2cee02afce2c7d48381c | david-christiansen/brush | lang2.rkt | #lang racket/base
(require "common.rkt")
(require (only-in "../../private/lp.rkt" program PROGRAM))
(provide (except-out (all-from-out "common.rkt")
module-begin/plain
module-begin/doc)
program PROGRAM
(rename-out [module-begin/doc #%module-begin]))
| null | https://raw.githubusercontent.com/david-christiansen/brush/91b83cda313f77f2068f0c02753c55c2563680d5/lp/lang/lang2.rkt | racket | #lang racket/base
(require "common.rkt")
(require (only-in "../../private/lp.rkt" program PROGRAM))
(provide (except-out (all-from-out "common.rkt")
module-begin/plain
module-begin/doc)
program PROGRAM
(rename-out [module-begin/doc #%module-begin]))
| |
4f60a5727526c3311a9a0cd95bd68fe8ea3c050d435d082febfd933099aa59e5 | 8c6794b6/guile-tjit | t-pairs-09.scm | ;;; Simple loop to accumulate list of floating numbers.
(define (loop lst)
(let lp ((lst lst) (acc 0))
(if (null? lst)
acc
(lp (cdr lst) (+ acc (car lst))))))
(loop (map (lambda (x) (+ x 1000.0))
(iota #e1e3)))
| null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/t-pairs-09.scm | scheme | Simple loop to accumulate list of floating numbers. |
(define (loop lst)
(let lp ((lst lst) (acc 0))
(if (null? lst)
acc
(lp (cdr lst) (+ acc (car lst))))))
(loop (map (lambda (x) (+ x 1000.0))
(iota #e1e3)))
|
9b53cf6099847fc5e7005958e568d9ec92d135cdcf7b837c3740ef3674b781a7 | write-you-a-scheme-v2/scheme | ParserOld.hs | {-# LANGUAGE OverloadedStrings #-}
module Parser (
readExpr,
) where
import LispVal
import Text.Parsec
import Text.Parsec.Text
import qualified Text.Parsec.Token as Tok
import qualified Text.Parsec.Language as Lang
import qualified Data.Text as T
import Data.Functor.Identity (Identity)
lexer :: Tok.GenTokenPars... | null | https://raw.githubusercontent.com/write-you-a-scheme-v2/scheme/39f2edf3d2b0f04d76def72c7ea020312e54d601/archive/ParserOld.hs | haskell | # LANGUAGE OverloadedStrings #
used for '(', ')', '.'
Atom
whole file
"adam"
square
list or dotted List
( ... contents ...)
{expr}(1..n)
'(+ 1 2) => List [Atom quote, Atom "+", Number 1, Number 2)
toss me
int
parseExpr
sexp
=> {(list),(dottedLisp)}
list
=> {parseExpr}(many) |
module Parser (
readExpr,
) where
import LispVal
import Text.Parsec
import Text.Parsec.Text
import qualified Text.Parsec.Token as Tok
import qualified Text.Parsec.Language as Lang
import qualified Data.Text as T
import Data.Functor.Identity (Identity)
lexer :: Tok.GenTokenParser T.Text () Identity
lexer = Tok.m... |
b5b5719f01d7ed5b3e706e8e60f2c2b4a2c578144eb0461f0308eca390469d8e | ekmett/linear-logic | Internal.hs | # language BlockArguments #
{-# language ConstraintKinds #-}
# language DerivingStrategies #
# language EmptyCase #
{-# language ExplicitNamespaces #-}
{-# language FlexibleContexts #-}
# language ViewPatterns #
# language FlexibleInstances #
# language DataKinds #
# language NoImplicitPrelude #
# language GADTs #
# la... | null | https://raw.githubusercontent.com/ekmett/linear-logic/c6c0e00dd86ecadb016109bbdc202f9ffb8f3be5/src/Linear/Logic/Internal.hs | haskell | # language ConstraintKinds #
# language ExplicitNamespaces #
# language FlexibleContexts #
# language LinearTypes #
# language Trustworthy #
# language TupleSections #
# language TypeFamilies #
# language UndecidableInstances #
# options_haddock not-home #
@
('!=') :: a %1 -> 'Not' a %1 -> r
@
\(\texttt{()}^\bot... | # language BlockArguments #
# language DerivingStrategies #
# language EmptyCase #
# language ViewPatterns #
# language FlexibleInstances #
# language DataKinds #
# language NoImplicitPrelude #
# language GADTs #
# language LambdaCase #
# language NoStarIsType #
# language ImportQualifiedPost #
# language PolyKinds #
#... |
238beea91c23f767b9034b3f8f6399890af40da13113c6118e2099a3fc15f979 | overtone/overtone | blackrain.clj | (ns overtone.sc.examples.blackrain
(:use [overtone.sc.machinery defexample]
[overtone.sc ugens]))
(defexamples iir-filter
(:low-pass
"Create a low pass filter"
"Here we use blackrain's iir-filter to create a low pass filter. The
iir-filter has a 24db/oct rolloff. That means the frequency one
... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/sc/examples/blackrain.clj | clojure | (ns overtone.sc.examples.blackrain
(:use [overtone.sc.machinery defexample]
[overtone.sc ugens]))
(defexamples iir-filter
(:low-pass
"Create a low pass filter"
"Here we use blackrain's iir-filter to create a low pass filter. The
iir-filter has a 24db/oct rolloff. That means the frequency one
... | |
38963efc731377a78fc544f388ddcf122721a257eff2db703e59aac617d2374f | kudelskisecurity/scannerl | out_file_ip.erl | %% output module - output to a file only the ip of the target when fp successful
-module(out_file_ip).
-behavior(out_behavior).
-author("David Rossier - ").
-author("Adrien Giner - ").
-export([init/2, clean/1, output/2]).
-export([get_description/0]).
-export([get_arguments/0]).
-define(ERR_ARG, "arg=[Output_file_p... | null | https://raw.githubusercontent.com/kudelskisecurity/scannerl/8133065030d014401c47b2470e67a36e9df81b1e/src/outmodules/out_file_ip.erl | erlang | output module - output to a file only the ip of the target when fp successful
API
this is the initialization interface for this module
returns {ok, Obj} or {error, Reason}
this is the cleaning interface for this module
returns ok or {error, Reason}
this is the output interface
output'ing to file
returns ok o... |
-module(out_file_ip).
-behavior(out_behavior).
-author("David Rossier - ").
-author("Adrien Giner - ").
-export([init/2, clean/1, output/2]).
-export([get_description/0]).
-export([get_arguments/0]).
-define(ERR_ARG, "arg=[Output_file_path]").
-define(DESCRIPTION, "output to stdout (only ip)").
-define(ARGUMENTS, ["... |
1585bed112b7488b8c76cf8fa37d7a811d2735cd898e9a3315dc23057622072d | DrakeAxelrod/mrclean | Setup.hs | import Distribution.Simple
main :: IO ()
main = defaultMain
| null | https://raw.githubusercontent.com/DrakeAxelrod/mrclean/e07bebc7e287b9ca2804fd779ab781faa6eee22d/Setup.hs | haskell | import Distribution.Simple
main :: IO ()
main = defaultMain
| |
25adceeeae6e35a30ea7d70f89131955c845c67d7603f544d7f2bbd7dbc778e3 | adjkant/sql-sourcery | types.rkt | #lang racket
(provide TYPES
get-type-info)
;; An SQLData is one of:
;; - String
;; - Number
;; A SQLTypeName is one of:
;; - "STRING"
- " INTEGER "
- " BOOLEAN "
A SupportedStructType is one of :
;; - String
;; - Integer
;; - Boolean
;; A SQLSourceryTypeInfo is a:
;; (list SQLTypeName
;; [An... | null | https://raw.githubusercontent.com/adjkant/sql-sourcery/f6c0619ed9febbb66864f36aa41fa495df683f95/sql-sourcery/types.rkt | racket | An SQLData is one of:
- String
- Number
A SQLTypeName is one of:
- "STRING"
- String
- Integer
- Boolean
A SQLSourceryTypeInfo is a:
(list SQLTypeName
[Any -> Boolean]
[SupportedStructType -> SQLData]
[SQLData -> SupportedStructType])
Interpretation for list:
- SQLTypeName is the name o... | #lang racket
(provide TYPES
get-type-info)
- " INTEGER "
- " BOOLEAN "
A SupportedStructType is one of :
- predicate for the SupportedStructType
- translator from SupportedStructType to SQLData
[ SQLSourceryTypeInfo ]
(define TYPES
(list (list "INTEGER"
integer?
... |
d1e2c19ea0eca08e8a5e2527c9a8d74ea581536e0d342d3c6ca27fc05adbae2d | CLowcay/hgbc | Resources.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module HGBC.Debugger.Resources
( css,
js,
svgRun,
svgPause,
svgStep,
svgStepout,
svgStepthrough,
svgReset,
svgRunto,
svgBreakpoint,
svgBreakpointDisabled,
svgHome,
svgLabel,
svgDownload,
)
where
imp... | null | https://raw.githubusercontent.com/CLowcay/hgbc/76a8cf91f3c3b160eadf019bc8fc75ef07601c2f/main/src/HGBC/Debugger/Resources.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module HGBC.Debugger.Resources
( css,
js,
svgRun,
svgPause,
svgStep,
svgStepout,
svgStepthrough,
svgReset,
svgRunto,
svgBreakpoint,
svgBreakpointDisabled,
svgHome,
svgLabel,
svgDownload,
)
where
import qualified Data.ByteString.Lazy ... |
0cb76e83c85e628c5ce03aae4515e01cf5b75628b885640dc44a693dc7b77913 | degree9/meta | services.cljs | (ns meta.services
(:refer-clojure :exclude [find get update remove])
(:require [feathers.application :as app]
[feathers.services :as svc]))
(def service app/service)
(def find svc/find)
(def get svc/get)
(def create svc/create)
(def update svc/update)
(def patch svc/patch)
(def remove svc/remove)... | null | https://raw.githubusercontent.com/degree9/meta/16dee6b01dd6402250b4b7a30185c0c0466985b3/src/meta/services.cljs | clojure | (ns meta.services
(:refer-clojure :exclude [find get update remove])
(:require [feathers.application :as app]
[feathers.services :as svc]))
(def service app/service)
(def find svc/find)
(def get svc/get)
(def create svc/create)
(def update svc/update)
(def patch svc/patch)
(def remove svc/remove)... | |
9192beb263c38cb5cf147483365b018166beb4922f31e907cfb5e9529f0b9e14 | jasonstolaruk/CurryMUD | Liqs.hs | {-# LANGUAGE OverloadedStrings #-}
module Mud.TheWorld.Liqs ( liqList
, oilLiq
, oilTag
, potDxLiq
, potFpLiq
, potFpTag
, potHpLiq
, potHpTag
... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/TheWorld/Liqs.hs | haskell | # LANGUAGE OverloadedStrings #
---
---
---
mouthfuls
secs
---
---
---
---
---
---
---
---
--- |
module Mud.TheWorld.Liqs ( liqList
, oilLiq
, oilTag
, potDxLiq
, potFpLiq
, potFpTag
, potHpLiq
, potHpTag
, potHtLiq
... |
efcd8d98622a29968aad16d7e333ec672929ce7d25595f4239c2df9c5e816408 | scheme-live/live | output.scm | #("\\") | null | https://raw.githubusercontent.com/scheme-live/live/4c7c9d80f2fcf80692614e10935fa66be69e3708/live/json/data/y-string-unicodeEscapedBackslash/output.scm | scheme | #("\\") | |
9cd7cbdece4140a3f68d38a0518039c8eb7c45a8c709eeed60bd2be2d448e00a | maximedenes/native-coq | proof_global.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/proofs/proof_global.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
************************************... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Names
type pr... |
a9a69184ab7bd48a99f4d966d1f460321c6027799a78b9fbf8162ed36adfe241 | jqueiroz/lojban.io | Parser.hs | # LANGUAGE TypeFamilies , QuasiQuotes , PatternGuards #
module Language.Lojban.Parser.ZasniGerna.Parser where
import Prelude hiding (Word)
import Text.Papillon
import Data.Maybe
parse :: String -> Either String (Free, Text, Terminator)
parse src
| Right (r, _) <- parsed = Right r
| Left l <- parsed = Left $ showPa... | null | https://raw.githubusercontent.com/jqueiroz/lojban.io/68c3e919f92ea1294f32ee7772662ab5667ecef6/haskell/libs/zasni-gerna/src/Language/Lojban/Parser/ZasniGerna/Parser.hs | haskell | ****** A. GRAMMAR ******
stub
****** B. LOW LEVEL GRAMMAR ******
- 11. SELMAhO ---
- 12. Pseudo SELMAhO ---
- 13. Word Modifiers ---
****** C. MAGIC WORD CONSTRUCTS ******
****** D. WORDS ****** | # LANGUAGE TypeFamilies , QuasiQuotes , PatternGuards #
module Language.Lojban.Parser.ZasniGerna.Parser where
import Prelude hiding (Word)
import Text.Papillon
import Data.Maybe
parse :: String -> Either String (Free, Text, Terminator)
parse src
| Right (r, _) <- parsed = Right r
| Left l <- parsed = Left $ showPa... |
a39549185403ab0e1fc084777efee169dc255df59af10632f0fdb2ad0d78dc22 | Apress/common-lisp-condition-system | assertions.lisp | src / conditions.lisp
(in-package #:portable-condition-system)
;;; Case assertions - common
(defun case-failure (datum complex-type operator-name keys)
"Signals a CASE-FAILURE error using the provided datum, the name of the case
operator, complex type specifier, and the case keys which were not matched."
(erro... | null | https://raw.githubusercontent.com/Apress/common-lisp-condition-system/7f4533e20d6397a59ca5bbfdc139b3389a135c34/Sources%20-%20PCS/src/assertions.lisp | lisp | Case assertions - common
Case assertions - non-correctable
Case assertions - correctable
if yes, queries the programmer for an
The old value of ~S is ~S.~%~
Do you want to supply a new value?"
otherwise, signals a
CHECK-TYPE | src / conditions.lisp
(in-package #:portable-condition-system)
(defun case-failure (datum complex-type operator-name keys)
"Signals a CASE-FAILURE error using the provided datum, the name of the case
operator, complex type specifier, and the case keys which were not matched."
(error 'case-failure :datum datum
... |
0c4da5c563e91495843f17153e72ac7514bfc00af9e4515e08c6ec927557adfe | parsonsmatt/lambda | Untyped.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
module Lambda.Untyped where
import Data.Foldable
import Lambda.Untyped.Parser as Parser
import qualified Decl.Parser as D
import Data.Monoid
import System.IO
import Text.Megaparsec
import Data . Text ( Text )
import Data . Map ( Map )
import qualifi... | null | https://raw.githubusercontent.com/parsonsmatt/lambda/86f664ae789f894800c92aeef872cb8f72a61bd7/src/Lambda/Untyped.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleContexts #
module Lambda.Untyped where
import Data.Foldable
import Lambda.Untyped.Parser as Parser
import qualified Decl.Parser as D
import Data.Monoid
import System.IO
import Text.Megaparsec
import Data . Text ( Text )
import Data . Map ( Map )
import qualified Data.Map as Map
import qualified... |
c9031d1d7c575f9b46ff211d969c90b9337389decc77a858b87be2b05ea3f8ca | sbcl/sbcl | hash-2.pure.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in the public domain and is provided with
;;;;... | null | https://raw.githubusercontent.com/sbcl/sbcl/79c1bc6c68d600da2bf8bcba260fa647e85632a9/tests/hash-2.pure.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
Assert that the C code which computes a perturbation of the object
address for lazy stable ... | This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(defstruct foo)
(defstruct bar x y)
(defvar *things*)
(defun make-things-for-sxhash-test (n)
(setf *things* (make-array n :fill-pointer 0))
(flet ((store (obj)
... |
726663dda09c701c081e69aca2eee17cfeb72b01b9fc91da6bb0e39982d70a0d | kappelmann/engaging-large-scale-functional-programming | Exercise02.hs | module Exercise02 where
import Data.List (nub, sortBy)
-- startupRevenue :: [Int] -> Int
-- startupRevenue offers = maximum $ map profits (nub offers)
-- where
-- profits x = x * length (filter (>= x) offers)
startupRevenue :: [Int] -> Int
startupRevenue offers = maximum $ aux 0 $ sortBy (flip compare) ... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/02/uploads/haskellhackers/Exercise02.hs | haskell | startupRevenue :: [Int] -> Int
startupRevenue offers = maximum $ map profits (nub offers)
where
profits x = x * length (filter (>= x) offers) | module Exercise02 where
import Data.List (nub, sortBy)
startupRevenue :: [Int] -> Int
startupRevenue offers = maximum $ aux 0 $ sortBy (flip compare) offers
where
aux :: Int -> [Int] -> [Int]
aux _ [] = []
aux n (x : xs) = newprice : aux (n + 1 + length same) rest
where
(same, rest) = spa... |
5164208ba3948771a8c20b4a262205174109cc000030eeaac919546bdbc1ba7e | mbutterick/typesetting | attr-passes.rkt | #lang debug racket/base
(require racket/match
racket/string
racket/set
"attr.rkt"
"dimension.rkt"
"pipeline.rkt"
"struct.rkt"
"constants.rkt"
"quad.rkt"
"param.rkt")
(provide (all-defined-out))
(module+ test
(require rackunit))
(define... | null | https://raw.githubusercontent.com/mbutterick/typesetting/e2c2f9429c0f187e3f4d093629c75fd482c53bf4/quad2/attr-passes.rkt | racket | recursively descend from top to bottom.
we don't iterate with `in-hash` (or `in-hash-keys`) because
which invalidates the reference `in-hash` is using
void value: do nothing
otherwise treat return value as new attr value
convert attr keys from symbols to attr struct types
also lets us validate keys strictly, if ... | #lang debug racket/base
(require racket/match
racket/string
racket/set
"attr.rkt"
"dimension.rkt"
"pipeline.rkt"
"struct.rkt"
"constants.rkt"
"quad.rkt"
"param.rkt")
(provide (all-defined-out))
(module+ test
(require rackunit))
(define... |
3b1b1c32ec8c120ce50cf6313ec2e217c382d0e1c392b5db53685092d1b9ed15 | metabase/metabase | query_processor_test.clj | (ns metabase.query-processor-test
"Helper functions for various query processor tests. The tests themselves can be found in various
`metabase.query-processor-test.*` namespaces; there are so many that it is no longer feasible to keep them all in
this one. Event-based DBs such as Druid are tested in `metabase.driv... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/query_processor_test.clj | clojure | there are so many that it is no longer feasible to keep them all in
Non-"normal" drivers are tested in [[metabase.timeseries-query-processor-test]] and elsewhere
Can't use [[normal-drivers-with-feature]] during test initialization, because it means we end up having to load
plugins and a bunch of other nonsense.
wr... | (ns metabase.query-processor-test
"Helper functions for various query processor tests. The tests themselves can be found in various
this one. Event-based DBs such as Druid are tested in `metabase.driver.event-query-processor-test`."
(:require
[clojure.set :as set]
[clojure.string :as str]
[clojure.test :... |
99594d6fe6bbcb8b40aa61feafbe6761f042cc240d32025d11b6f2f0f974bd6e | mhuebert/re-db | history_test.cljc | (ns re-db.history-test
(:require [clojure.test :refer [is are deftest testing]]
[re-db.api :as d]
[re-db.history :as history]
[re-db.schema :as schema]))
(deftest history-snapshots
"History based on resetting to snapshots"
(d/with-conn {:children schema/many}
(let [!histor... | null | https://raw.githubusercontent.com/mhuebert/re-db/5e67ab652de8211b57b834b0658fac042abec656/src/test/re_db/history_test.cljc | clojure | removed test - history txs are dependent on global state | (ns re-db.history-test
(:require [clojure.test :refer [is are deftest testing]]
[re-db.api :as d]
[re-db.history :as history]
[re-db.schema :as schema]))
(deftest history-snapshots
"History based on resetting to snapshots"
(d/with-conn {:children schema/many}
(let [!histor... |
ba3882ace6cdf7a4814cb9849170d2da30872ca3da46c9bc44689ba037141ad3 | abdulapopoola/SICPBook | Ex2.51.scm | #lang planet neil/sicp
(define (below painter1 painter2)
(let ((split-point (make-vect 0.0 0.5)))
(let ((paint-below (transform-painter
painter1
(make-vect 0.0 0.0)
split-point
(make-vect 1.0 0.0)))
(paint... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%202/2.2/Ex2.51.scm | scheme | #lang planet neil/sicp
(define (below painter1 painter2)
(let ((split-point (make-vect 0.0 0.5)))
(let ((paint-below (transform-painter
painter1
(make-vect 0.0 0.0)
split-point
(make-vect 1.0 0.0)))
(paint... | |
679873c27c71e7a0ab9c4a997206769461106f56eadae42bbc7cfe963e16b650 | kana-sama/sicp | 2.25.scm | (print ((compose car cdaddr) '(1 3 (5 7) 9))
(caar '((7)))
((compose cadadr cadadr cadadr) '(1 (2 (3 (4 (5 (6 7))))))))
| null | https://raw.githubusercontent.com/kana-sama/sicp/fc637d4b057cfcae1bae3d72ebc08e1af52e619d/2/2.25.scm | scheme | (print ((compose car cdaddr) '(1 3 (5 7) 9))
(caar '((7)))
((compose cadadr cadadr cadadr) '(1 (2 (3 (4 (5 (6 7))))))))
| |
81121bdda872e23012fb8780600537d32712fff59b3604c00af2c6610968d4e6 | eholk/harlan | expand-include.scm | (library
(harlan front expand-include)
(export expand-include)
(import
(rnrs)
(only (elegant-weapons helpers) define-match)
(harlan driver)
(harlan compile-opts)
(elegant-weapons match))
(define-match expand-include
((module . ,decls)
`(module . ,(expand-decls (cons '(import core) dec... | null | https://raw.githubusercontent.com/eholk/harlan/3afd95b1c3ad02a354481774585e866857a687b8/harlan/front/expand-include.scm | scheme | (library
(harlan front expand-include)
(export expand-include)
(import
(rnrs)
(only (elegant-weapons helpers) define-match)
(harlan driver)
(harlan compile-opts)
(elegant-weapons match))
(define-match expand-include
((module . ,decls)
`(module . ,(expand-decls (cons '(import core) dec... | |
a7c5f3d497c43d0d66451b34a1ec93bc3ec3292c5ba94c1b51a3560b50d6088a | andrejv/cl-simple-tk | canvas.lisp | ;;;
Copyright ( c ) 2015 < >
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining a copy
;;; of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
;;; to use, copy, modify, merge, publis... | null | https://raw.githubusercontent.com/andrejv/cl-simple-tk/0ef565fedde588caa62148c2551be1520a955567/src/canvas.lisp | lisp |
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, and/or sell
furnished to do so, subject to the following conditions:
The above copyright notice... | Copyright ( c ) 2015 < >
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 Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
54e4df034685838428f0692d35343f10650190ecd27ce6a559d1f16f131c7d0f | realworldocaml/examples | alice_combined.ml | module Alice : sig
val friends : Bob.t list
end = struct
let friends = [ Bob.name ]
end
| null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/front-end/alice_combined.ml | ocaml | module Alice : sig
val friends : Bob.t list
end = struct
let friends = [ Bob.name ]
end
| |
8ea3bba4e3c491eefd6dcc2cf7488422e2f168ef6f7f22492e3454f03db01011 | xvw/preface | selective.ml | module Core_over_functor_via_select
(Functor : Preface_specs.Functor.WITH_MAP)
(Req : Preface_specs.Selective.WITH_PURE_AND_SELECT
with type 'a t = 'a Functor.t) =
struct
type 'a t = 'a Req.t
include (
Indexed_selective.Core_over_functor_via_select
(struct
type ('a, 'index) t... | null | https://raw.githubusercontent.com/xvw/preface/51892a7ce2ddfef69de963265da3617968cdb7ad/lib/preface_make/selective.ml | ocaml | module Core_over_functor_via_select
(Functor : Preface_specs.Functor.WITH_MAP)
(Req : Preface_specs.Selective.WITH_PURE_AND_SELECT
with type 'a t = 'a Functor.t) =
struct
type 'a t = 'a Req.t
include (
Indexed_selective.Core_over_functor_via_select
(struct
type ('a, 'index) t... | |
1b11c01ff710e853d26d5e855f1defcc5c3b3024fe159f37c49d6999ea6ecf57 | omnyway-labs/amplify_cljs_example | views.cljs |
(ns amplify-cljs-example.views
(:require
[re-frame.core :as re-frame]
[re-com.core :as re-com]
[clairvoyant.core :refer-macros [trace-forms]]
[re-frame-tracer.core :refer [tracer]]
[amplify-cljs-example.subs :as subs]
[amplify-cljs-example.events :as events]
[reagent.core :as reagent]
["... | null | https://raw.githubusercontent.com/omnyway-labs/amplify_cljs_example/67a82752a78c53703a0f13ce45fcfbb76199edf2/src/cljs/amplify_cljs_example/views.cljs | clojure | note: centered text wrt the button |
(ns amplify-cljs-example.views
(:require
[re-frame.core :as re-frame]
[re-com.core :as re-com]
[clairvoyant.core :refer-macros [trace-forms]]
[re-frame-tracer.core :refer [tracer]]
[amplify-cljs-example.subs :as subs]
[amplify-cljs-example.events :as events]
[reagent.core :as reagent]
["... |
3777e44be3b3ff476fd71f2432d8c13a16a713186c36aa68a0d621721fea14c0 | haskell-tools/haskell-tools | Stmts.hs | | UPattern matching on statement - level AST fragments for refactorings .
# LANGUAGE PatternSynonyms #
module Language.Haskell.Tools.Rewrite.Match.Stmts where
import Language.Haskell.Tools.AST
import Language.Haskell.Tools.Rewrite.ElementTypes
-- * Do-notation
-- | Binding statement (@ x <- action @)
pattern Bind... | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/rewrite/Language/Haskell/Tools/Rewrite/Match/Stmts.hs | haskell | * Do-notation
| Binding statement (@ x <- action @)
| Non-binding statement (@ action @)
| A recursive binding statement with (@ rec b <- f a c; c <- f b a @)
* List comprehensions
| Normal monadic statement of a list comprehension
* Commands
| Binding statement command (@ x <- action @)
| Non-binding statemen... | | UPattern matching on statement - level AST fragments for refactorings .
# LANGUAGE PatternSynonyms #
module Language.Haskell.Tools.Rewrite.Match.Stmts where
import Language.Haskell.Tools.AST
import Language.Haskell.Tools.Rewrite.ElementTypes
pattern BindStmt :: Pattern -> Expr -> Stmt
pattern BindStmt bound exp... |
0927588d7411d8ee1a96897ec07ec13bfcb187169e78fa7acd56612e46d12d65 | bradparker/servant-beam-realworld-example-app | All.hs | module RealWorld.Conduit.Articles.Web.All
( handler
, All
) where
import qualified Data.Set as Set
import Database.Beam (primaryKey)
import Prelude hiding (All)
import qualified RealWorld.Conduit.Articles.Database as Database
import qualified RealWorld.Conduit.Articles.Web.Articles as Articles
import RealWorld.C... | null | https://raw.githubusercontent.com/bradparker/servant-beam-realworld-example-app/d4a0d79d9dbc7e5b8987b367ac32f99ac3cc20e7/src/RealWorld/Conduit/Articles/Web/All.hs | haskell | module RealWorld.Conduit.Articles.Web.All
( handler
, All
) where
import qualified Data.Set as Set
import Database.Beam (primaryKey)
import Prelude hiding (All)
import qualified RealWorld.Conduit.Articles.Database as Database
import qualified RealWorld.Conduit.Articles.Web.Articles as Articles
import RealWorld.C... | |
bdf417368a0cdc87a0b13ec6bf2b0f52222009a65bb2802710dc2af3b8ebce35 | KenDickey/Crosstalk | st-xlate.scm | ;;; FILE: "st-xlate.scm"
;;; IMPLEMENTS: xlate -- translate st -> scheme
AUTHOR :
DATE : 04 January 2017
;; (requires 'st-core-classes)
(define (AST->scm ast)
;; transliterate Abstract Syntax Tree
;; ..into Scheme syntax
(cond
((astSequence? ast)
(xlateSequence ast))
;; ((astMessageSequence? ast) ..... | null | https://raw.githubusercontent.com/KenDickey/Crosstalk/c4a315baf039e714980e14f5b07860632b9bd0e6/st-xlate.scm | scheme | FILE: "st-xlate.scm"
IMPLEMENTS: xlate -- translate st -> scheme
(requires 'st-core-classes)
transliterate Abstract Syntax Tree
..into Scheme syntax
((astMessageSequence? ast) ...)
((astBrace? ast) ...)
((astBinarySend? ast) ...)
((astUnaryMessage? ast) ...)
((astBinaryMessage? ast) ...)
((astKeywordMessage?... | AUTHOR :
DATE : 04 January 2017
(define (AST->scm ast)
(cond
((astSequence? ast)
(xlateSequence ast))
( ( ? ast ) ... )
((astLetTemps? ast)
(xlateLetTemps ast))
((astSubexpression? ast)
(AST->scm (astSubexpression-expression ast)))
((astReturn? ast)
(xlateReturn ast))
((astAs... |
69e8fe4500b4704cf6941a2521d1c96eb7161b61bc909cb34a86ee43315ebafa | c089/haskell-craft3e | Chapter13.hs | -----------------------------------------------------------------------
--
Haskell : The Craft of Functional Programming , 3e
( c ) Addison - Wesley , 1996 - 2011 .
--
Chapter 13
--
-----------------------------------------------------------------------
module Chapter13 where
import Data.List
import Chapter... | null | https://raw.githubusercontent.com/c089/haskell-craft3e/869e382601cab50559c4473dfa9c7480f1acba58/Chapter13.hs | haskell | ---------------------------------------------------------------------
---------------------------------------------------------------------
Overloading and type classes
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Why overloading?
^^^^^^^^^^^^^^^^
Testing for membership of a general list, with the equality function as a
param... | Haskell : The Craft of Functional Programming , 3e
( c ) Addison - Wesley , 1996 - 2011 .
Chapter 13
module Chapter13 where
import Data.List
import Chapter5 (Shape(..),area)
Testing for membership of a Boolean list .
elemBool :: Bool -> [Bool] -> Bool
elemBool x [] = False
elemBool x (y:ys)
= (x ==... |
91c71bf16755127df9ec2312c193c1b94caac8d06cea5b54b13eab887da9a01b | DomainDrivenArchitecture/dda-masto-embed | browser.cljs | Licensed to the Apache Software Foundation ( ASF ) under one
; or more contributor license agreements. See the NOTICE file
; distributed with this work for additional information
; regarding copyright ownership. The ASF licenses this file
to you under the Apache License , Version 2.0 ( the
; "License"); you may not... | null | https://raw.githubusercontent.com/DomainDrivenArchitecture/dda-masto-embed/bb5d0eab5ff10969cd95752568f6eb1d23997f10/src/main/dda/masto_embed/browser.cljs | clojure | or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
"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 b... | Licensed to the Apache Software Foundation ( ASF ) under one
to you under the Apache License , Version 2.0 ( the
distributed under the License is distributed on an " AS IS " BASIS ,
(ns dda.masto-embed.browser)
(def masto-embed "masto-embed")
(defn element-from-document-by-name [name]
(-> js/document
(.... |
9a561df0f60e789e81ce7ac6a36ec35569bc403ff5e036ea2630865d04aa3201 | PacktPublishing/Mastering-Clojure | dining_philosophers_async.clj | (ns m-clj.c8.dining-philosophers-async
(:require [clojure.core.async :as a]
[m-clj.c2.refs :as c2]))
Example 8.4
(defn make-philosopher [name forks food]
{:name name
:forks forks
:food food})
(defn make-forks [nf]
(let [forks (repeatedly nf #(a/chan 1))]
(doseq [f forks]
(a/>!! f ... | null | https://raw.githubusercontent.com/PacktPublishing/Mastering-Clojure/5364ad907056c1c84c759491b17d45d06f4d7cdc/src/m_clj/c8/dining_philosophers_async.clj | clojure | take forks
eat
put down both acquired forks
think
put down any acquired forks
recur
user> (start-philosophers philosopher-chan all-philosophers)
nil
user> (print-philosophers philosopher-chan 5)
Philosopher 3: food=937
Philosopher 2: food=938
Philosopher 1: food=938
Philosopher 5: food=938
Philosopher... | (ns m-clj.c8.dining-philosophers-async
(:require [clojure.core.async :as a]
[m-clj.c2.refs :as c2]))
Example 8.4
(defn make-philosopher [name forks food]
{:name name
:forks forks
:food food})
(defn make-forks [nf]
(let [forks (repeatedly nf #(a/chan 1))]
(doseq [f forks]
(a/>!! f ... |
0333206dcf093609513d39fc83c5fd8350ebfb45574595c3101d5fe275d270f8 | imandra-ai/minisat-ml | Minisat_ml_util.ml |
module Dimacs = Dimacs
module System = System
let setup_gc() =
let g = Gc.get () in
g.Gc.space_overhead <- 3_000; (* major gc *)
g.Gc.max_overhead <- 10_000; (* compaction *)
×8 to obtain bytes on 64 bits -- >
Gc.set g
| null | https://raw.githubusercontent.com/imandra-ai/minisat-ml/7e942e95e88a2443bd449f8e470aa7d68cead2be/src/util/Minisat_ml_util.ml | ocaml | major gc
compaction |
module Dimacs = Dimacs
module System = System
let setup_gc() =
let g = Gc.get () in
×8 to obtain bytes on 64 bits -- >
Gc.set g
|
6c4e466714c33612e401fabc97839ff297429a7350f2b779fe1befb201495538 | caotic123/PomPom-Language | Main.hs | module Main where
import System.Environment
import Parser
import Term
import Debug.Trace
import Checker
import Control.Monad
import Data.Set hiding (map, foldr)
import Data.Functor
readKei :: String -> Set String -> IO (Maybe (Set String, [(String, Local)]))
readKei file set = do
n <- readFile (file ++ ".pom")
... | null | https://raw.githubusercontent.com/caotic123/PomPom-Language/d3046f5c381733d5f3abae3fda1f229cf6f27398/app/Main.hs | haskell | module Main where
import System.Environment
import Parser
import Term
import Debug.Trace
import Checker
import Control.Monad
import Data.Set hiding (map, foldr)
import Data.Functor
readKei :: String -> Set String -> IO (Maybe (Set String, [(String, Local)]))
readKei file set = do
n <- readFile (file ++ ".pom")
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.