_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
ecf8d45f0a7b010a82f70b2e394701f5e8e41b0bdb3d5f7bf8744cddcb563767
mark-watson/loving-common-lisp
utils.lisp
(in-package #:kgn) (ql:quickload "sqlite") ;;; command line arguments: (defun command-line-args () (or #+SBCL *posix-argv* #+LISPWORKS system:*line-arguments-list* #+CMU extensions:*command-line-words* nil)) SqList caching for SPARQL queries : (defvar *db-path* (pathname "~/.kgn_cache.db")) (de...
null
https://raw.githubusercontent.com/mark-watson/loving-common-lisp/32f6abf3d2e500baeffd15c085a502b03399a074/src/kgn/utils.lisp
lisp
command line arguments: stop words/noise words removal
(in-package #:kgn) (ql:quickload "sqlite") (defun command-line-args () (or #+SBCL *posix-argv* #+LISPWORKS system:*line-arguments-list* #+CMU extensions:*command-line-words* nil)) SqList caching for SPARQL queries : (defvar *db-path* (pathname "~/.kgn_cache.db")) (defun create-dbpedia () (sql...
19698f297cfbf69cd0cc4f263ab66c14145ffce1c39caba67dea37f2fd452e41
Ekdohibs/camlboot
functions.ml
let _ = print_endline "Functions:" let () = print_string "simple: " let g x = let z = x * 2 in fun y - > z * 3 let g x y = x - y let h = g 6 let () = show_int (6 - 3) let () = show_int (g 6 3) let () = show_int (h 3) let () = print_newline () let () = print_string "currified: " let f1 = fun x -> fun y -> x * y ...
null
https://raw.githubusercontent.com/Ekdohibs/camlboot/506280c6e0813e0e794988151a8e46be55373ebc/miniml/compiler/test/functions.ml
ocaml
regression test for nested let-rec this ensures that the 'let' are not substituted away... as long as we don't support constant-folding
let _ = print_endline "Functions:" let () = print_string "simple: " let g x = let z = x * 2 in fun y - > z * 3 let g x y = x - y let h = g 6 let () = show_int (6 - 3) let () = show_int (g 6 3) let () = show_int (h 3) let () = print_newline () let () = print_string "currified: " let f1 = fun x -> fun y -> x * y ...
7ddaf246048225de3e1bb90d2d8f1f1549e1654d227317c85f7058f1092efa54
ocaml/odoc
generator.ml
open Odoc_document open Types open Doctree Manpages relies on the ( g|t|n)roff document language . This language has a fairly long history ( see (software ) ) . Unfortunately , this language is very old and quite clunky . Most manpages relies on a set of high - level macros ( -pages/man7/groff_man.7.html ...
null
https://raw.githubusercontent.com/ocaml/odoc/088a374fb2e759d69b1c8313ecbfe09a238c6c86/src/manpage/generator.ml
ocaml
copied from cmdliner escapes [s] from doc language. We ignore those Partial support for now Should hopefully make people notice and report
open Odoc_document open Types open Doctree Manpages relies on the ( g|t|n)roff document language . This language has a fairly long history ( see (software ) ) . Unfortunately , this language is very old and quite clunky . Most manpages relies on a set of high - level macros ( -pages/man7/groff_man.7.html ...
9197ec60124927ba6b54c640398e66845c518e6fcbb17e00a8a63de4fc845f02
turbopape/postagga
core_test.cljc
Copyright ( c ) 2017 < > ;;Distributed under the MIT License (ns postagga.core-test (:require [clojure.test :refer :all] [postagga.trie :refer [insert-str-in-trie completions]] [postagga.tools :refer [load-edn get-row get-column]] [postagga.parser :refer [parse-tags-rules]] ...
null
https://raw.githubusercontent.com/turbopape/postagga/a17a20942024be00800a15de7aeb7c0277023660/test/postagga/core_test.cljc
clojure
Distributed under the MIT License Here we force the use of a model, but in trainer.clj we have the means to create such a model How does a model look like? as trained by train in trainer.clj I can plug any pos-tagger, given a vector of words returns a vector or [w [pos-tags]] How to create a tagger fn to pass to ...
Copyright ( c ) 2017 < > (ns postagga.core-test (:require [clojure.test :refer :all] [postagga.trie :refer [insert-str-in-trie completions]] [postagga.tools :refer [load-edn get-row get-column]] [postagga.parser :refer [parse-tags-rules]] [postagga.tagger :refer [vit...
7a179a940435be6a555024688870c8b8a58017d7489e7a332bd57fcf78421f1d
simoncourtenage/quanthas
Functions.hs
Copyright ( C ) 2010 , ( ) This file is part of QuantHas , an open - source Haskell implementation of the QuantLib library for quantitative finance . is free software : you can redistribute it and/or modify it under the terms of the QuantHas license . You should have receiv...
null
https://raw.githubusercontent.com/simoncourtenage/quanthas/6e0b2cc9a60bb7d1709f98ed10d09aa6c071c8dd/src/QuantHas/Time/Calendar/Functions.hs
haskell
^ which date to advance from ^ how much to advance by ^ time units to advance by ^ end of month flag the meaning of the function and prevent any name clashes that might arise from open imports.
Copyright ( C ) 2010 , ( ) This file is part of QuantHas , an open - source Haskell implementation of the QuantLib library for quantitative finance . is free software : you can redistribute it and/or modify it under the terms of the QuantHas license . You should have receiv...
a6d4d306b2bb79bc4c5e0c09d761be11c6291f931f23b724833e9615bf8110d2
arcfide/oleg
time-apply.scm
;; Implementation of time-apply ; ; This software is in Public Domain. IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND . ; ; Please send bug reports and comments to: ; Dmitry Lizorkin ; (lambda f argv) ; Applies procedure `f' to its argument list `argv' ; Returns: (cons f-res...
null
https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/sxml-tools/benchmarks/time-apply.scm
scheme
Implementation of time-apply This software is in Public Domain. Please send bug reports and comments to: Dmitry Lizorkin (lambda f argv) Applies procedure `f' to its argument list `argv' Returns: (cons f-result exec-time) f-result - result produced by applying procedure `f' exec-time - time ...
IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND . (cond-expand (chicken (define (sxml:time-apply f argv) (call-with-values (lambda () (cpu-time)) (lambda (user-begin system-begin) (let ((res (apply f argv))) (call-with-values (lambda () ...
5e683a522373019947bd21f05eb830e3457300c283364ad5e2a418c2e6b676b9
bvaugon/ocapic
rtgen.ml
(*************************************************************************) (* *) (* OCaPIC *) (* *) ...
null
https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/src/rtgen/rtgen.ml
ocaml
*********************************************************************** OCaPIC ...
This file is distributed under the terms of the CeCILL license . let split str = let rec f i res = try let ind = String.index_from str i ' ' in let len = ind - i in if len <> 0 then f (ind + 1) ((String.sub str i len...
add8ac935ff72348d7000482e47a55a0ea402bdfc6ca0d741a21499956dd7886
haskell-opengl/OpenGLRaw
RegisterCombiners2.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | Module : Graphics . Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- -----------------------------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/NV/RegisterCombiners2.hs
haskell
------------------------------------------------------------------------------ | License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums * Functions
# LANGUAGE PatternSynonyms # Module : Graphics . Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.NV.RegisterCombiners2 ( glGetNVRegisterCombiners2, gl_NV_register_combiners2, pattern GL_PER_STAGE_CONSTANTS_NV, glCombinerStageParameterfvNV, glGetCombinerStageParameterfv...
3f970d99b16f7c577facb2543e57baa16e2359c74f234ad4c0052d7879696fe7
cedlemo/OCaml-GI-ctypes-bindings-generator
Scroll_type.ml
open Ctypes open Foreign type t = None | Jump | Step_backward | Step_forward | Page_backward | Page_forward | Step_up | Step_down | Page_up | Page_down | Step_left | Step_right | Page_left | Page_right | Start | End let of_value v = if v = Unsigned.UInt32.of_int 0 then None else if v = Unsigned.UInt32.of_int 1 th...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Scroll_type.ml
ocaml
open Ctypes open Foreign type t = None | Jump | Step_backward | Step_forward | Page_backward | Page_forward | Step_up | Step_down | Page_up | Page_down | Step_left | Step_right | Page_left | Page_right | Start | End let of_value v = if v = Unsigned.UInt32.of_int 0 then None else if v = Unsigned.UInt32.of_int 1 th...
db678058789e00c4e19c66a1c7e0ca4edfca26b1b261137bc936d08d2f342ae2
lukeg101/lplzoo
Main.hs
| Module : Main Description : The Main access point for ULC . Copyright : ( c ) , 2018 License : GPL-3 Maintainer : Stability : stable Portability : POSIX The " Main " module provides the access point for running ULC . This is targeted by main when compiled and run . Module ...
null
https://raw.githubusercontent.com/lukeg101/lplzoo/463ca93f22f018ee07bdc18d84b3b0c966d51766/ULC/Main.hs
haskell
| Simple ULC Repl
| Module : Main Description : The Main access point for ULC . Copyright : ( c ) , 2018 License : GPL-3 Maintainer : Stability : stable Portability : POSIX The " Main " module provides the access point for running ULC . This is targeted by main when compiled and run . Module ...
537c0b9bca3b90b8a0eb8d6b54834bca04efb36f201477d35f2615324d7fcb40
pedestal/samples
user.clj
Copyright 2013 Relevance , Inc. ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( ) ; which can be found in the file epl-v10.html at the root of this distribution. ; ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this licens...
null
https://raw.githubusercontent.com/pedestal/samples/caaf04afe255586f8f4e1235deeb0c1904179355/helloworld-app/dev/user.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright 2013 Relevance , Inc. Eclipse Public License 1.0 ( ) (defn dev [] (require 'dev) (in-ns 'dev))
da2fd3ee1608aa21b18f55dbab5d9ca87281982f6af073383b7dedc768794aa7
ingolia-lab/RiboSeq
StartSites.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # module Main where import Control.Applicative import Control.Monad import qualified Data.ByteString.Char8 as BS import Data.Char import Data.Maybe import Numeric import System.Exit import System.FilePath import System.I...
null
https://raw.githubusercontent.com/ingolia-lab/RiboSeq/a14390cd95528910a258434c7b84c787f5e1d119/src/StartSites.hs
haskell
# LANGUAGE OverloadedStrings # mapM_ (\f -> BS.hPutStrLn hout $ (unSeqLabel . geneId $ trx) `BS.append` "\t" `BS.append` BS.pack f) fs trxs <- Bed.readBedTranscripts bed hPutStrLn stderr $ "Read " ++ show (length trxs) ++ " testing transcripts" tsc <- testLtm ltmmod samps defaultTrainPosns trxs ...
# LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # module Main where import Control.Applicative import Control.Monad import qualified Data.ByteString.Char8 as BS import Data.Char import Data.Maybe import Numeric import System.Exit import System.FilePath import System.IO import qualified Data.Vector.Unb...
a33cfe6645318277475145d1817b931b64656f0deae293ffc0de3ceba56e0649
irastypain/sicp-on-language-racket
exercise_2_04.rkt
#lang racket ; Набор процедур для представления пар (define (cons x y) (lambda (m) (m x y))) (define (car z) (z (lambda (p q) p))) (define (cdr z) (z (lambda (p q) q))) процедур (provide cons car cdr)
null
https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/src/chapter02/exercise_2_04.rkt
racket
Набор процедур для представления пар
#lang racket (define (cons x y) (lambda (m) (m x y))) (define (car z) (z (lambda (p q) p))) (define (cdr z) (z (lambda (p q) q))) процедур (provide cons car cdr)
228e0aa8e0d4e1a0ca71c7a7a53cee8f07ea4822c7b64a10650fbc20a05ec2a7
ragkousism/Guix-on-Hurd
bison.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2012 , 2013 , 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/bison.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 © 2012 , 2013 , 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages bison) #:use-module (guix licenses) #:use-module (guix packages) ...
b9b555374a14de3fe3a169680a7eb526731a7f9dec47eecacf700eaba68b1379
tweag/linear-base
Traverse.hs
# LANGUAGE DataKinds # {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DerivingVia # # LANGUAGE LambdaCase # {-# LANGUAGE LinearTypes #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # mod...
null
https://raw.githubusercontent.com/tweag/linear-base/4fd6e84f1e734b048ea8ec30bd14a0fa35e9bb76/examples/Generic/Traverse.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE LinearTypes # # LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE LambdaCase # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # module Generic.Traverse (genericTraverseTests) where import Data.Functor.Linear (genericTraverse) ...
bcc3f1843979df9b67a9f43cfc2700f1012af0c99198cdbdf10ac8992ab4ef5f
metosin/kekkonen
upload_test.clj
(ns kekkonen.upload-test (:require [midje.sweet :refer :all] [kekkonen.upload :as upload] [ring.core.protocols :refer [StreamableResponseBody]])) (defn- response-body? [x] (satisfies? StreamableResponseBody x)) (facts "response" (upload/response (.getBytes "hello" "UTF-8") "text/plain...
null
https://raw.githubusercontent.com/metosin/kekkonen/5a38c52af34a0eb0f19d87e9f549e93e6d87885f/test/kekkonen/upload_test.clj
clojure
(ns kekkonen.upload-test (:require [midje.sweet :refer :all] [kekkonen.upload :as upload] [ring.core.protocols :refer [StreamableResponseBody]])) (defn- response-body? [x] (satisfies? StreamableResponseBody x)) (facts "response" (upload/response (.getBytes "hello" "UTF-8") "text/plain...
32a4edbc7beb5f662592b966743cad7396f1af0b00ac2f0b5df1faa39c35c029
clojure-lsp/clojure-lsp
call_hierarchy.clj
(ns clojure-lsp.feature.call-hierarchy (:require [clojure-lsp.feature.document-symbol :as f.document-symbol] [clojure-lsp.feature.file-management :as f.file-management] [clojure-lsp.parser :as parser] [clojure-lsp.queries :as q] [clojure-lsp.refactor.edit :as edit] [clojure-lsp.shared :as shared] ...
null
https://raw.githubusercontent.com/clojure-lsp/clojure-lsp/2b078904ff3bcb79640f20264b8faa16a6c5b204/lib/src/clojure_lsp/feature/call_hierarchy.clj
clojure
(ns clojure-lsp.feature.call-hierarchy (:require [clojure-lsp.feature.document-symbol :as f.document-symbol] [clojure-lsp.feature.file-management :as f.file-management] [clojure-lsp.parser :as parser] [clojure-lsp.queries :as q] [clojure-lsp.refactor.edit :as edit] [clojure-lsp.shared :as shared] ...
f0ed615e23fae755bc785ccd118ab447aa2f9e25892e7634b4cc433e6229cc86
MarcosPividori/push-notify
Send.hs
-- GSoC 2013 - Communicating with mobile devices. # LANGUAGE OverloadedStrings , ScopedTypeVariables # -- | This Module define the main function to send Push Notifications through Cloud Connection Server (GCM). module Network.PushNotify.Ccs.Send ( startCCS , closeCCS , sendCCS , withCCS , withCCS'...
null
https://raw.githubusercontent.com/MarcosPividori/push-notify/4c023c3fd731178d1d114774993a5e337225baa1/push-notify-ccs/Network/PushNotify/Ccs/Send.hs
haskell
GSoC 2013 - Communicating with mobile devices. | This Module define the main function to send Push Notifications through Cloud Connection Server (GCM). ^ The main configuration for the GCM service. ^ A callback function to be called each time a message arrives from a device. Main worker thread. restarts. this fu...
# LANGUAGE OverloadedStrings , ScopedTypeVariables # module Network.PushNotify.Ccs.Send ( startCCS , closeCCS , sendCCS , withCCS , withCCS' ) where import Network.PushNotify.Ccs.Constants import Network.PushNotify.Ccs.Types import Network.PushNotify.Gcm.Types import Control.Applicative impo...
eaad1dfabe2866a1a3493a420f26495b9d63c49a5b5b4fb6d5d6d6623d3cd8b3
deadpendency/deadpendency
DependencyAssessment.hs
module Common.Model.Assessment.DependencyAssessment ( DependencyAssessment (..), ) where import Common.Aeson.Aeson import Common.Model.Assessment.DependencyAssessmentResult import Common.Model.Dependency.Enriched.EnrichedDependency import Data.Aeson data DependencyAssessment = DependencyAssessment { _enrichedDe...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/Assessment/DependencyAssessment.hs
haskell
module Common.Model.Assessment.DependencyAssessment ( DependencyAssessment (..), ) where import Common.Aeson.Aeson import Common.Model.Assessment.DependencyAssessmentResult import Common.Model.Dependency.Enriched.EnrichedDependency import Data.Aeson data DependencyAssessment = DependencyAssessment { _enrichedDe...
59319ccc8c1fc560f9ed1816dd4808b7acc1905c679efc17e82266a761dc64c5
elaforge/karya
EffectC.hs
Copyright 2020 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt -- | Low level binding to faust dsps, specialized for ones that process -- audio, rather than generating it. module Synth.Faust.EffectC ( EffectT(_name, _doc, _controls) , Patch, ...
null
https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Synth/Faust/EffectC.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt | Low level binding to faust dsps, specialized for ones that process audio, rather than generating it. * Patch * Effect ** state | A patch can be used to create 'Effect's. | An allocated patch. * Patch ...
Copyright 2020 module Synth.Faust.EffectC ( EffectT(_name, _doc, _controls) , Patch, Effect , State , get, patches , allocate, destroy , render , getState, unsafeGetState, putState ) where import qualified Data.ByteString as ByteString import qualified Data.Map as Map import qualified D...
a913d97efb738e76fe786bba9d65ea48f092967c937353f0aecf63d7c0d93cd4
bobatkey/CS316-2020
Week05Solutions.hs
# OPTIONS_GHC -fwarn - incomplete - patterns # module Week05Solutions where import Prelude hiding (Left, Right, Semigroup (..), Foldable (..), Functor (..), Monoid (..), Maybe (..)) import Data.Char WEEK 5 : CLASSES OF TYPES takes types very seriously . Every program must have a type , and will ref...
null
https://raw.githubusercontent.com/bobatkey/CS316-2020/21d9edca6445d4287697cad0523ffae6a5b51f23/lecture-notes/Week05Solutions.hs
haskell
This defines 'Metres' as a synonym for the type 'Double', the built-in type of double precision floating point values. Now if we are writing some definitions where we intend the numbers to be interpreted as metres, then we can use 'Metres' as the type, instead of 'Double'. For example: (astronomy) Then ...
# OPTIONS_GHC -fwarn - incomplete - patterns # module Week05Solutions where import Prelude hiding (Left, Right, Semigroup (..), Foldable (..), Functor (..), Monoid (..), Maybe (..)) import Data.Char WEEK 5 : CLASSES OF TYPES takes types very seriously . Every program must have a type , and will ref...
95fd4102d5ef65d66c95bff9bf4dfb035b55983dbbe5cbe254d24aac20e45c7e
cyga/real-world-haskell
SyslogTypes.hs
file : ch27 / SyslogTypes.hs module SyslogTypes where {- | Priorities define how important a log message is. -} data Priority = DEBUG -- ^ Debug messages | INFO -- ^ Information | NOTICE -- ^ Normal runtime conditions | ...
null
https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch27/SyslogTypes.hs
haskell
| Priorities define how important a log message is. ^ Debug messages ^ Information ^ Normal runtime conditions ^ General Warnings ^ General Errors ^ Severe situations ^ Take immediate action ^ System is unusable | Facilities are used by the system to determine where messages are sent. ^ General userland me...
file : ch27 / SyslogTypes.hs module SyslogTypes where data Priority = deriving (Eq, Ord, Show, Read, Enum) data Facility = ^ messages ^ Daemon ( server process ) messages ^ UUCP messages ^ Cron messages | LOCAL0 | LOCAL1 | L...
489840192cac061dfc645d797d025d89d7fef11a51d1a775620cf394a7c15ed1
hopbit/sonic-pi-snippets
use_bpm.sps
# key: ub # point_line: 0 # point_index: 7 # -- use_bpm
null
https://raw.githubusercontent.com/hopbit/sonic-pi-snippets/2232854ac9587fc2f9f684ba04d7476e2dbaa288/syntax/use_bpm.sps
scheme
# key: ub # point_line: 0 # point_index: 7 # -- use_bpm
9df8dbd2f2b906f56335258e38fd267768a88e5b0de36e090f3c62f4da7efd80
8c6794b6/guile-tjit
renumber.scm
Continuation - passing style ( CPS ) intermediate language ( IL ) Copyright ( C ) 2013 , 2014 , 2015 Free Software Foundation , Inc. ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Founda...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/language/cps/renumber.scm
scheme
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See ...
Continuation - passing style ( CPS ) intermediate language ( IL ) Copyright ( C ) 2013 , 2014 , 2015 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , ...
588c5241d85d38e2fd28b1706772305666ee2aed9eed4a41472d9fb287b05284
spawnfest/eep49ers
wxSplashScreen.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxSplashScreen.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(wxSplashScreen). -include("wxe.hrl"). -export([destroy/1,getSplashStyle/1,getTimeout/1,new/5,new/6]). -expo...
a757dfb867e4a6f891bf70b1cb191f8f1aff0081b53c263f0b47bd8375c0cff5
dustin/mqttd
Main.hs
module MQTTD.Main where import Control.Concurrent (newChan, newEmptyMVar, putMVar, readChan, takeMVar) import Control.Lens import Control.Monad.Catch (MonadMask (..)) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.Logger (LogLevel (....
null
https://raw.githubusercontent.com/dustin/mqttd/0aed214776cde156f01083831e58969bd83c1472/src/MQTTD/Main.hs
haskell
The generic TCP listener is featureful enough to allow us to block until binding is done. Block forever. withConnection is not used here because this action spawns a close the connection before it returns. Instead, I hold the
module MQTTD.Main where import Control.Concurrent (newChan, newEmptyMVar, putMVar, readChan, takeMVar) import Control.Lens import Control.Monad.Catch (MonadMask (..)) import Control.Monad.IO.Class (MonadIO (..)) import Control.Monad.Logger (LogLevel (....
aef7d407a49d1c1d0b2e1d25515d4834f5fb4d65cae920288987d06cc451a73a
IBM/openai-gym-ocaml
test01.ml
open Openai_gym open Gym_j open Gym_t let instance_id = Format.printf "-------------------------------@."; Format.printf "Test env_create@."; let instance_id = Gym_client.env_create "CartPole-v0" in Format.printf "%s@." instance_id.instance_id; instance_id let () = Format.printf "-------------------------...
null
https://raw.githubusercontent.com/IBM/openai-gym-ocaml/7556dea6a189b0502e6832034104a3aff22a8ec1/examples/test01.ml
ocaml
let () = Format.printf "-------------------------------@."; Format.printf "Test shutdown@."; let resp = Gym_client.shutdown_server () in Format.printf "server shutdowned: %s@." resp
open Openai_gym open Gym_j open Gym_t let instance_id = Format.printf "-------------------------------@."; Format.printf "Test env_create@."; let instance_id = Gym_client.env_create "CartPole-v0" in Format.printf "%s@." instance_id.instance_id; instance_id let () = Format.printf "-------------------------...
371f1fd02ff8cc154fe2867a1a9949bf8bf7604f13dae8e1ce3a0964c34331ad
patperry/hs-linear-algebra
Banded.hs
{-# OPTIONS -fglasgow-exts -fno-excess-precision -cpp #-} ----------------------------------------------------------------------------- -- | Copyright : Copyright ( c ) 2008 , < > -- License : BSD3 Maintainer : < > -- Stability : experimental -- module Banded( tests_Banded ) where import Driver import...
null
https://raw.githubusercontent.com/patperry/hs-linear-algebra/887939175e03687b12eabe2fce5904b494242a1a/tests-old/Banded.hs
haskell
# OPTIONS -fglasgow-exts -fno-excess-precision -cpp # --------------------------------------------------------------------------- | License : BSD3 Stability : experimental
Copyright : Copyright ( c ) 2008 , < > Maintainer : < > module Banded( tests_Banded ) where import Driver import Monadic import qualified Test.QuickCheck.BLAS as Test import Data.Elem.BLAS import Data.Vector.Dense import Data.Vector.Dense.ST import Data.Matrix.Dense ( Matrix, identityMatrix ) import Dat...
657185dd56cbde2dd8f6ab11b8419daba89f7823a06e11d1eda0ec28661e883e
HealthSamurai/us-npi
api.clj
(ns usnpi.api "REST API handlers." (:require [usnpi.db :as db] [usnpi.beat :as beat] [usnpi.env :refer [env]] [usnpi.warmup :as wm] [usnpi.http :refer [http-resp]])) (defn api-env "An API that returns some of ENV vars." [request] (http-resp (select-keys env ...
null
https://raw.githubusercontent.com/HealthSamurai/us-npi/a28a8ec8d45e19fadab0528791e7de78f19dc87e/src/usnpi/api.clj
clojure
(ns usnpi.api "REST API handlers." (:require [usnpi.db :as db] [usnpi.beat :as beat] [usnpi.env :refer [env]] [usnpi.warmup :as wm] [usnpi.http :refer [http-resp]])) (defn api-env "An API that returns some of ENV vars." [request] (http-resp (select-keys env ...
4c02e4cb0c9b24e1d040fb7c6b820af43d1bf30085a030b7ea9abcbf9ae1d919
poroh/ersip
ersip_proxy_common_test.erl
%% Copyright ( c ) 2018 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% Common proxy routinges tests %% -module(ersip_proxy_common_test). -include_lib("eunit/include/eunit.hrl"). %%%=================================================================...
null
https://raw.githubusercontent.com/poroh/ersip/60afa92a53898f6692f3a30d04b5b88a580c8153/test/proxy/ersip_proxy_common_test.erl
erlang
All rights reserved. =================================================================== Cases =================================================================== Checking strict routing information update: last Route, last Route must be removed from the message. Check strict-routing message recovery Checking...
Copyright ( c ) 2018 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . Common proxy routinges tests -module(ersip_proxy_common_test). -include_lib("eunit/include/eunit.hrl"). -define(crlf, "\r\n"). stateless_proxy_forward_to_proxy_test() -> If RURI is this proxy then it m...
fe1660e55396819ae8245a5c1beedd84f459f3bc7374dddecc553aa5e64eb305
nedap/formatting-stack
deletable.clj
(ns deletable "A namespace that can be deleted by the test suite, for exercising `strategies`. If doing so, remember to restore that file, within your test.")
null
https://raw.githubusercontent.com/nedap/formatting-stack/c43e74d5409e9338f208457bb8928ce437381a3f/test-resources/deletable.clj
clojure
(ns deletable "A namespace that can be deleted by the test suite, for exercising `strategies`. If doing so, remember to restore that file, within your test.")
a53183b35ceb5192545d87f2c004aaa96fb1ef0ec81b02dcb53ffaab44a696d1
NorfairKing/autodocodec
ShowSpec.hs
# LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Autodocodec.ShowSpec (spec) where import Autodocodec import Autodocodec.Usage import qualified Data.Aeson as JSON import Data.Data import Data.Int import Data.List.NonEmpty (NonEmp...
null
https://raw.githubusercontent.com/NorfairKing/autodocodec/90305e01282364951e2e0da2c2f284a03310f4c2/autodocodec-api-usage/test/Autodocodec/ShowSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Autodocodec.ShowSpec (spec) where import Autodocodec import Autodocodec.Usage import qualified Data.Aeson as JSON import Data.Data import Data.Int import Data.List.NonEmpty (NonEmpty) import Data.Map (Map) import Da...
dea08294d61004617bfaa9c0232e548facbcaf202bb4a69dd49361d3e7638542
plumatic/schema-generators
project.clj
(defproject prismatic/schema-generators "0.1.6-SNAPSHOT" :description "Clojure(Script) library for data generation from schemas" :url "-generators" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/test.check "0.9.0"] [prismatic/schema "1.2.1"]]...
null
https://raw.githubusercontent.com/plumatic/schema-generators/e53576fa1b035ab4e84fd7f155089d04c8accddf/project.clj
clojure
(defproject prismatic/schema-generators "0.1.6-SNAPSHOT" :description "Clojure(Script) library for data generation from schemas" :url "-generators" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/test.check "0.9.0"] [prismatic/schema "1.2.1"]]...
97014fbbec14d84b985fbd72aa3ad98417cdc7870e809608b0decfc545ddb905
cacheaudit/cacheaudit
cacheAD.mli
Copyright ( c ) 2013 - 2015 , IMDEA Software Institute . (* See ../../LICENSE for authorship and licensing information *) (** Cache abstract domain: keeps track of CPU cache configurations *) open AD.DS type replacement_strategy = | LRU (** least-recently used *) * first in , first out * tree ...
null
https://raw.githubusercontent.com/cacheaudit/cacheaudit/f0b52f85771ee31fed2a0a84a7e767a9d19e4b15/abstract_domains/cache/cacheAD.mli
ocaml
See ../../LICENSE for authorship and licensing information * Cache abstract domain: keeps track of CPU cache configurations * least-recently used * cache size * line size * associativity * strategy * optimize precision (may run slower) * compute maximum information leakage * the cache parameters are given...
Copyright ( c ) 2013 - 2015 , IMDEA Software Institute . open AD.DS type replacement_strategy = * first in , first out * tree - based pseudo LRU type cache_param = { module type S = sig include AD.S val init : cache_param -> t val touch : t -> int64 -> NumAD.DS.rw_t -> t val touch_hm : t ...
0e2a1e19cff16414e7b037966b5b4613b656a603b35587f3bd0406832228ecf4
seriyps/mtproto_proxy
prop_mtp_rpc.erl
%% @doc property-based tests for mtp_rpc -module(prop_mtp_rpc). -include_lib("proper/include/proper.hrl"). -export([prop_nonce/1, prop_handshake/1, prop_s2c_packet/1, prop_c2s_packet/1]). prop_nonce(doc) -> "Tests encode/decode of 'nonce' RPC packet". prop_nonce() -> ?FORALL(Packe...
null
https://raw.githubusercontent.com/seriyps/mtproto_proxy/5ad7c536da57ff89dea488941c7ff4711372d858/test/prop_mtp_rpc.erl
erlang
@doc property-based tests for mtp_rpc Data ConnId
-module(prop_mtp_rpc). -include_lib("proper/include/proper.hrl"). -export([prop_nonce/1, prop_handshake/1, prop_s2c_packet/1, prop_c2s_packet/1]). prop_nonce(doc) -> "Tests encode/decode of 'nonce' RPC packet". prop_nonce() -> ?FORALL(Packet, nonce_gen(), nonce(Packet)). nonce_ge...
16a750cf4879c6ddf56cce4d1db2a819088d972002ed582cefa32982381d1f18
racket/scribble
info.rkt
#lang info (define collection 'multi) (define deps '("scribble-lib" "scribble-doc")) (define implies '("scribble-lib" "scribble-doc")) (define pkg-desc "Racket documentatation and typesetting tool") (define pkg-authors '(mflatt eli)) (define license '(Apache-2.0 OR MIT))
null
https://raw.githubusercontent.com/racket/scribble/359c0cddf7ba1cf6cf8502f9396f24d362d1eba5/scribble/info.rkt
racket
#lang info (define collection 'multi) (define deps '("scribble-lib" "scribble-doc")) (define implies '("scribble-lib" "scribble-doc")) (define pkg-desc "Racket documentatation and typesetting tool") (define pkg-authors '(mflatt eli)) (define license '(Apache-2.0 OR MIT))
6e86c5da877c9eb0961390ccfd7ca0195e00f464cd736c99edf7461ef2d2f0e1
dselsam/arc
ColorBlast.hs
# LANGUAGE ScopedTypeVariables # {-# LANGUAGE StrictData #-} module Solver.Tactics.Blast.BabyBlasts.ColorBlast.ColorBlast where import qualified Data.Maybe as Maybe import Debug.Trace import Util.Imports import qualified Search.History as History import Util.List as List import Data.List hiding (partition) import qual...
null
https://raw.githubusercontent.com/dselsam/arc/7e68a7ed9508bf26926b0f68336db05505f4e765/src/Solver/Tactics/Blast/BabyBlasts/ColorBlast/ColorBlast.hs
haskell
# LANGUAGE StrictData # optionally add middle row optionally add middle col add corners
# LANGUAGE ScopedTypeVariables # module Solver.Tactics.Blast.BabyBlasts.ColorBlast.ColorBlast where import qualified Data.Maybe as Maybe import Debug.Trace import Util.Imports import qualified Search.History as History import Util.List as List import Data.List hiding (partition) import qualified Data.Set as Set import...
16335f01d34812ff74013abc46aef981c690702ddef076b536b29018398e385c
racket/sgl
gl-vectors.rkt
(module gl-vectors mzscheme (require mzlib/foreign (only racket/base for/list in-list in-naturals) "gl-types.rkt") (define-syntax gl-vector-binop (syntax-rules () ((_ op name make-res) (case-lambda ((v) (unless (gl-vector? v) (raise-argument-e...
null
https://raw.githubusercontent.com/racket/sgl/7999abdf79058cc709da0e49dee4ec0569249085/gl-vectors.rkt
racket
(module gl-vectors mzscheme (require mzlib/foreign (only racket/base for/list in-list in-naturals) "gl-types.rkt") (define-syntax gl-vector-binop (syntax-rules () ((_ op name make-res) (case-lambda ((v) (unless (gl-vector? v) (raise-argument-e...
bc1e5ef9a1ab63ef9cedc4f7db9703098c78f4ee903fde1153b4348d911ec4c4
kingcons/advent-of-code
day09.lisp
(mgl-pax:define-package :aoc.2022.09 (:nicknames :2022.09) (:use :cl :mgl-pax :aoc.util :esrap) (:import-from :aoc.parsers #:integer) (:import-from :serapeum #:partial)) (in-package :2022.09) (defsummary (:title "Rope Bridge") "**Parsing**" (parsing-source (include (:start (*first-rule* variable) :end ...
null
https://raw.githubusercontent.com/kingcons/advent-of-code/ffd6569ce4dfaf80e7b29a6521202c07cb58a58d/src/2022/day09.lisp
lisp
(mgl-pax:define-package :aoc.2022.09 (:nicknames :2022.09) (:use :cl :mgl-pax :aoc.util :esrap) (:import-from :aoc.parsers #:integer) (:import-from :serapeum #:partial)) (in-package :2022.09) (defsummary (:title "Rope Bridge") "**Parsing**" (parsing-source (include (:start (*first-rule* variable) :end ...
cb7ac5850fafdf62a478810b667d8c730030be7b1b3580ae400dac8826828e18
fakedata-haskell/fakedata
Pokemon.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Faker.Game.Pokemon where import Data.Text import Faker import Faker.Internal import Faker.Provider.Pokemon import Faker.TH $(generateFakeField "pokemon" "names") $(generateFakeField "pokemon" "locations") $(generateFakeField "pokemon" "moves")
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/Game/Pokemon.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Game.Pokemon where import Data.Text import Faker import Faker.Internal import Faker.Provider.Pokemon import Faker.TH $(generateFakeField "pokemon" "names") $(generateFakeField "pokemon" "locations") $(generateFakeField "pokemon" "moves")
976326acd84696c754910b0e2d44aeb0df5291f970bc4ef10098ea84473e5335
lambdaclass/holiday_pinger
mailgun.erl
-module(mailgun). -export([send_email/5]). send_email(Email, FullBody, Subject, FromEmail, []) -> MailgunDomain = list_to_binary(os:getenv("MAILGUN_DOMAIN")), MailgunKey = list_to_binary(os:getenv("MAILGUN_KEY")), Url = <<"/", MailgunDomain/binary, "/messages">>, Options = [{basic_auth, {<<"api">>, MailgunKey...
null
https://raw.githubusercontent.com/lambdaclass/holiday_pinger/a8a6d1e28de57cf24d6205d275981a718305b351/src/mailgun.erl
erlang
-module(mailgun). -export([send_email/5]). send_email(Email, FullBody, Subject, FromEmail, []) -> MailgunDomain = list_to_binary(os:getenv("MAILGUN_DOMAIN")), MailgunKey = list_to_binary(os:getenv("MAILGUN_KEY")), Url = <<"/", MailgunDomain/binary, "/messages">>, Options = [{basic_auth, {<<"api">>, MailgunKey...
cadda2048a105110f16a6950cfa96cdfbcd49837554014f24137e8312a65c71f
static-analysis-engineering/codehawk
cCHFunctionsDisplay.ml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk C Analyzer Author : and and ------------------------------------------------------------------------------ The MIT License ( MIT...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHC/cchgui/cCHFunctionsDisplay.ml
ocaml
cchlib cchgui ----------------------------------------------------- button box ----------------------------------------------------- file buttons precondition requests postcondition requests global variables ------------------------------------------------------ function buttons spo's assumptions g...
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk C Analyzer Author : and and ------------------------------------------------------------------------------ The MIT License ( MIT...
75d76ec8381d34864ce95552e8117b9622025d795c3036c814dbcb72e5c697a6
clj-commons/potemkin
namespaces_test.clj
(ns potemkin.namespaces-test (:require [clojure.repl :as repl :refer :all] [clojure.string :as str] [clojure.test :refer :all] [potemkin :refer :all] [potemkin.imports-test :as i])) (import-macro i/multi-arity-macro) (import-macro i/multi-arity-macro alt-macro-name) (import-fn i/multi-arity-fn) (...
null
https://raw.githubusercontent.com/clj-commons/potemkin/f22d9725a2203f9c5cab90fc3459da78e7229956/test/potemkin/namespaces_test.clj
clojure
(ns potemkin.namespaces-test (:require [clojure.repl :as repl :refer :all] [clojure.string :as str] [clojure.test :refer :all] [potemkin :refer :all] [potemkin.imports-test :as i])) (import-macro i/multi-arity-macro) (import-macro i/multi-arity-macro alt-macro-name) (import-fn i/multi-arity-fn) (...
6434e646e8e3ec2346bd321a86ab969474d020d3044776059e0d9d09eed84fe7
sam46/Paskell
Paskell.hs
module Paskell where import Text.Parsec import Text.Parsec.String import Text.Parsec.Combinator import Data.Char import Grammar import ExtraParsers import KeywordParse import Utils (p') parseIdent :: Parser Ident parseIdent = tok . try $ do x <- letter xs <- many alphaNum let ident = x:xs if (toLow...
null
https://raw.githubusercontent.com/sam46/Paskell/634881e980def791b9869d6bf8fa647aff0c5b1d/src/Paskell.hs
haskell
var a,b : char; c,d : integer; todo <|> any OP (relation, additive, mult, unary) OPunary <$> OPadd <$> OPrelation <$> non-empty non-empty todo double check exactTok is the right choice non-empty todo hex todo hex parseSubprogDeclList ----------------------------------------------------
module Paskell where import Text.Parsec import Text.Parsec.String import Text.Parsec.Combinator import Data.Char import Grammar import ExtraParsers import KeywordParse import Utils (p') parseIdent :: Parser Ident parseIdent = tok . try $ do x <- letter xs <- many alphaNum let ident = x:xs if (toLow...
92db08056262b99c68dddd14cd4c1b1a4b37a0d5291163534b15a122ed39ab9d
LeventErkok/sbv
DogCatMouse.hs
----------------------------------------------------------------------------- -- | -- Module : TestSuite.Puzzles.DogCatMouse Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- Test suite for Documentation.SBV.Examples.Puzzles.DogCatMouse --------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVTestSuite/TestSuite/Puzzles/DogCatMouse.hs
haskell
--------------------------------------------------------------------------- | Module : TestSuite.Puzzles.DogCatMouse License : BSD3 Maintainer: Stability : experimental Test suite for Documentation.SBV.Examples.Puzzles.DogCatMouse --------------------------------------------------------------------------- ...
Copyright : ( c ) module TestSuite.Puzzles.DogCatMouse(tests) where import Utils.SBVTestFramework tests :: TestTree tests = testGroup "Puzzles.DogCatMouse" [ goldenVsStringShow "dogCatMouse" (allSat p) ] where p = do [dog, cat, mouse] <- sIntegers ["dog", "cat", "mouse"] at least one dog at least...
180bcffbdcc0f8f0fe4378a49e0b4d4d29c9f192ca47e788e3d13d858610e281
ocaml-sf/learn-ocaml-corpus
choose_left.ml
let return (x : 'a) : 'a m = let compute s f = s x f in { compute } let (>>=) (m1 : 'a m) (f2 : 'a -> 'b m) : 'b m = let compute s f = m1.compute (fun x f' -> (f2 x).compute s f') f in { compute } let fail : 'a m = let compute s f = f() in { compute } let choose (m1 : 'a m) (m2 : 'a m) : 'a m = m1 (* w...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/nondet_monad_cont/wrong/choose_left.ml
ocaml
wrong The functions [reflect] and [msplit] witness an isomorphism between the type ['a m] and the type [unit -> ('a * 'a m) option].
let return (x : 'a) : 'a m = let compute s f = s x f in { compute } let (>>=) (m1 : 'a m) (f2 : 'a -> 'b m) : 'b m = let compute s f = m1.compute (fun x f' -> (f2 x).compute s f') f in { compute } let fail : 'a m = let compute s f = f() in { compute } let choose (m1 : 'a m) (m2 : 'a m) : 'a m = let sols...
3d8866e45a0e9131b12ff6a4f56f760e9f5918f3df9c49df0a2d5d4272a4d3a2
mzp/coq-ide-for-ios
pptactic.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/parsing/pptactic.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** if the boolean is false then the ex...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : pptactic.mli 13323 ...
5f9fb50e7f7104fc0c574710c93ab470f67da8efe1b81fc042486ed9168162eb
aantron/luv
timer.ml
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) type t = [ `Timer ] Handle.t let init ?loop () = let timer = Handle.allocate C.Types.Timer.t in C.Functions.Timer.init (Loop.or_default loop) timer |> Error.to_result timer le...
null
https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/timer.ml
ocaml
This file is part of Luv , released under the MIT license . See LICENSE.md for details , or visit . details, or visit . *) type t = [ `Timer ] Handle.t let init ?loop () = let timer = Handle.allocate C.Types.Timer.t in C.Functions.Timer.init (Loop.or_default loop) timer |> Error.to_result timer le...
df2f466990329b33783cac432648bf214f4de23c4fe0a0e10e1f51151956f1bc
racket/rackunit
info.rkt
#lang info (define collection 'multi) (define deps '("base" "rackunit-lib" "rackunit-gui" "gui-lib" "drracket-plugin-lib")) (define pkg-desc "RackUnit testing framework DrRacket plugin") (define pkg-authors '(ryanc noel)) (define license '(Apache-2.0 OR...
null
https://raw.githubusercontent.com/racket/rackunit/6c04ee267d258a13f9c5cbc437dac60234e54ef4/rackunit-plugin-lib/info.rkt
racket
#lang info (define collection 'multi) (define deps '("base" "rackunit-lib" "rackunit-gui" "gui-lib" "drracket-plugin-lib")) (define pkg-desc "RackUnit testing framework DrRacket plugin") (define pkg-authors '(ryanc noel)) (define license '(Apache-2.0 OR...
79f71b0f3c65703281983b8e0c72feec91e5a52c5c692fee3072feed2951898f
noinia/hgeometry
GrahamFamPeano.hs
# LANGUAGE UndecidableInstances # module Algorithms.Geometry.ConvexHull.GrahamFamPeano( convexHull , upperHull , lowerHull, fromP ) where import Control....
null
https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry/benchmark/Algorithms/Geometry/ConvexHull/GrahamFamPeano.hs
haskell
given in clockwise order. | Helper function so that that can compute both the upper or the lower hull, depending on the function f | Precondition: The list of input points is sorted
# LANGUAGE UndecidableInstances # module Algorithms.Geometry.ConvexHull.GrahamFamPeano( convexHull , upperHull , lowerHull, fromP ) where import Control....
76de400bc5e2633d00d98ad9b2bbe8298d1e09570d43f0d9fcc256a9b4f39b0b
penpot/penpot
shadow.cljc
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. ;; ;; Copyright (c) KALEIDOS INC (ns app.common.types.shape.shadow (:require [app.common.spec :as us] [app.common.types.color :as ctc] ...
null
https://raw.githubusercontent.com/penpot/penpot/5463671db13441ba3f730a34118547d34a5a36f1/common/src/app/common/types/shape/shadow.cljc
clojure
Copyright (c) KALEIDOS INC SHADOW EFFECT
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns app.common.types.shape.shadow (:require [app.common.spec :as us] [app.common.types.color :as ctc] [app.common.types.shape.shadow...
cca56da797bcf1b30e96140936cd253849f001575c682995e92c2df084b76bb7
oxidizing/sihl-demo
auth.ml
let login_index req = let open Lwt.Syntax in let* user = Service.User.Web.user_from_session req in match user with | Some _ -> Sihl.Web.Response.redirect_to "/ingredients" |> Lwt.return | None -> let csrf = Sihl.Web.Csrf.find req |> Option.get in let alert = Sihl.Web.Flash.find_alert req in Lwt.re...
null
https://raw.githubusercontent.com/oxidizing/sihl-demo/e8fdba64ed628af003140242502149f16e958225/web/handler/auth.ml
ocaml
let login_index req = let open Lwt.Syntax in let* user = Service.User.Web.user_from_session req in match user with | Some _ -> Sihl.Web.Response.redirect_to "/ingredients" |> Lwt.return | None -> let csrf = Sihl.Web.Csrf.find req |> Option.get in let alert = Sihl.Web.Flash.find_alert req in Lwt.re...
68778adccde81f96223123e1d2af6f215bb6904c28985ae79a392e8b08608ffc
ageneau/ecl-android
glkit.lisp
(in-package :iphone) (clines "#import <CoreGraphics/CoreGraphics.h>" "#import <Foundation/Foundation.h>" "#import <UIKit/UIKit.h>" "#import <GLKit/GLKit.h>" "#import \"LispGLKViewController.h\"" ) (defun set-setupgl-handler (glkviewcontroller fun) (when fun (c-fficall ((glkviewcontroller :pointer-void) ...
null
https://raw.githubusercontent.com/ageneau/ecl-android/324180b7701eaa24228d8602fafe7c040c976867/lisp-packages/iphone/glkit.lisp
lisp
(in-package :iphone) (clines "#import <CoreGraphics/CoreGraphics.h>" "#import <Foundation/Foundation.h>" "#import <UIKit/UIKit.h>" "#import <GLKit/GLKit.h>" "#import \"LispGLKViewController.h\"" ) (defun set-setupgl-handler (glkviewcontroller fun) (when fun (c-fficall ((glkviewcontroller :pointer-void) ...
a063bdd4c545dc5e53d37f337986c7be97e6a8cf17e37be71f1abb20d54a07f4
haskell/ghcup-hs
Stack.hs
{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # | Module : GHCup . Stack Description : GHCup installation functions for Stack Copyr...
null
https://raw.githubusercontent.com/haskell/ghcup-hs/54af66d11525587326e7652de8c4ed3ac84876e1/lib/GHCup/Stack.hs
haskell
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # ------------------ [ Installation ]-- ------------------ | Installs stack into @~\/.ghcup\/bin/stack-\<ver\>@ and creates a default @stack -> stack-x.y.z.q@ symlink for the latest installed version. ^ Force inst...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # | Module : GHCup . Stack Description : GHCup installation functions for Stack Copyright : ( c ) , 2020 License : LGPL-3.0 Maintainer : Stability : experimental Portability : po...
609caef7fdb2956c52264fc7c0d19cad51528de5c91313ef240ec881e7ab3c45
acl2/acl2
object-designators@useless-runes.lsp
(TMP-DEFTYPES-NATP-OF-NFIX) (TMP-DEFTYPES-NFIX-WHEN-NATP (1 1 (:REWRITE DEFAULT-<-2)) (1 1 (:REWRITE DEFAULT-<-1)) ) (C::ADDRESSP (182 14 (:REWRITE OMAP::ALISTP-WHEN-MAPP)) (70 14 (:REWRITE OMAP::MFIX-IMPLIES-MAPP)) (70 14 (:REWRITE OMAP::MAPP-WHEN-NOT-EMPTY)) (57 56 (:REWRITE DEFAULT-CDR)) (56 56 (:TYPE-PRESCR...
null
https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/kestrel/c/language/.sys/object-designators%40useless-runes.lsp
lisp
(TMP-DEFTYPES-NATP-OF-NFIX) (TMP-DEFTYPES-NFIX-WHEN-NATP (1 1 (:REWRITE DEFAULT-<-2)) (1 1 (:REWRITE DEFAULT-<-1)) ) (C::ADDRESSP (182 14 (:REWRITE OMAP::ALISTP-WHEN-MAPP)) (70 14 (:REWRITE OMAP::MFIX-IMPLIES-MAPP)) (70 14 (:REWRITE OMAP::MAPP-WHEN-NOT-EMPTY)) (57 56 (:REWRITE DEFAULT-CDR)) (56 56 (:TYPE-PRESCR...
baca4adab224fda74aaaf2ec6572d0d3b7c4bda1b3486670d1241883904cf395
hikettei/cl-waffe
package.lisp
(defpackage :cl-termgraph (:documentation "An package for plotting graphs in terminals") (:use :cl :cl-ansi-text) (:export #:figure-graph-frame #:*dif* #:make-listplot-frame #:listplot-write #:listplot-print #:init-line))
null
https://raw.githubusercontent.com/hikettei/cl-waffe/e6e46d3eab8133e30ce9d25dc773a1f3620cb718/source/cl-termgraph/package.lisp
lisp
(defpackage :cl-termgraph (:documentation "An package for plotting graphs in terminals") (:use :cl :cl-ansi-text) (:export #:figure-graph-frame #:*dif* #:make-listplot-frame #:listplot-write #:listplot-print #:init-line))
f0f613eec45ebc9608a415c68b256858e53f7f62117530a2e4f5fc87904c4f2f
tnelson/Forge
main.rkt
#lang racket/base TODO - annotate syntax as we go ... build a map like TR ( hasheq syntax ? type ? ) ;; - send original syntax to helper functions, not just the types ;; - serialize type env, restore on import ;; - ... TODO can we use turnstile ? ;; collect env and then use turnstile? (provide typecheck) (...
null
https://raw.githubusercontent.com/tnelson/Forge/912b34b335608e9f9e373e2455a34fcbcedf6072/froglet/typecheck/main.rkt
racket
- send original syntax to helper functions, not just the types - serialize type env, restore on import - ... collect env and then use turnstile? ----------------------------------------------------------------------------- (or/c #f ;; uninitialized symbol? ;; quant (list symb...
#lang racket/base TODO - annotate syntax as we go ... build a map like TR ( hasheq syntax ? type ? ) TODO can we use turnstile ? (provide typecheck) (require forge/lang/alloy-syntax/syntax-class (only-in froglet/util type-env-name log-froglet-info log-froglet-warning) froglet/typecheck/error froglet...
a30259b691806f60705899989b991a477e4f475ff565a2900128751b2b993d76
hgoes/vvt
State.hs
{-# LANGUAGE DeriveDataTypeable,TypeFamilies #-} module Realization.Threaded.State where import Args import Realization.Threaded.Value import Language.SMTLib2 import LLVM.FFI hiding (GetType,getType) import Foreign.Ptr (Ptr) import Data.Map (Map) import qualified Data.Map as Map import Data.Typeable import Text.Show ...
null
https://raw.githubusercontent.com/hgoes/vvt/dd2809753d7e5059d9103ea578f36afa8294cd84/Realization/Threaded/State.hs
haskell
# LANGUAGE DeriveDataTypeable,TypeFamilies #
module Realization.Threaded.State where import Args import Realization.Threaded.Value import Language.SMTLib2 import LLVM.FFI hiding (GetType,getType) import Foreign.Ptr (Ptr) import Data.Map (Map) import qualified Data.Map as Map import Data.Typeable import Text.Show import Data.GADT.Show import Data.GADT.Compare d...
dcb909bfee53923b65f33cfe32c2429c4f89957c2c9ef5e3071b5b9d5f00cfb8
janestreet/hardcaml
test_constants.ml
open! Import open Signal let sexp_of_const_signal ?(depth = 1) signal = let open Signal in match signal with | Empty -> [%sexp "empty"] | _ -> if is_const signal then if width signal <= 8 then [%sexp (Int.to_string (width signal) ^ "'b" ^ Signal.to_bstr signal : string)] else ...
null
https://raw.githubusercontent.com/janestreet/hardcaml/15727795c2bf922dd852cc0cd895a4ed1d9527e5/test/lib/test_constants.ml
ocaml
open! Import open Signal let sexp_of_const_signal ?(depth = 1) signal = let open Signal in match signal with | Empty -> [%sexp "empty"] | _ -> if is_const signal then if width signal <= 8 then [%sexp (Int.to_string (width signal) ^ "'b" ^ Signal.to_bstr signal : string)] else ...
b644e5c0a6b7ce4eda055e653add61abab2aca2c3a916d12c3748f614d8a4199
TerrorJack/ghc-alter
Unsafe.hs
# LANGUAGE Unsafe # # LANGUAGE NoImplicitPrelude # ----------------------------------------------------------------------------- -- | Module : System . Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stabilit...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/System/IO/Unsafe.hs
haskell
--------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable \"Unsafe\" IO operations. --------------------------------------------------------------------------- ...
# LANGUAGE Unsafe # # LANGUAGE NoImplicitPrelude # Module : System . Copyright : ( c ) The University of Glasgow 2001 module System.IO.Unsafe ( unsafePerformIO, unsafeDupablePerformIO, unsafeInterleaveIO, unsafeFixIO, ) where import GHC.Base import GHC.IO import GHC.IORef import GHC.E...
a95c7129f7e8f10c8a4602fc62aa49dfabb2c92ebfbf434744289970dca8c612
ucsd-progsys/nate
arith_status.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet Crista...
null
https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/num/arith_status.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ I d : arith_status.ml , v 1.4 2001/12/07 13:4...
c9c8942ad23626b27f87a2be866b92b49f9799883536d1f2c71ef2a13254c628
cedlemo/OCaml-GI-ctypes-bindings-generator
Page_setup.mli
open Ctypes type t val t_typ : t typ val create : unit -> t ptr val create_from_file : string -> (t ptr option, Error.t structure ptr option) result val create_from_gvariant : Variant.t structure ptr -> t ptr val create_from_key_file : Key_file.t structure ptr -> string option -> (t ptr option, Error.t struct...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Page_setup.mli
ocaml
open Ctypes type t val t_typ : t typ val create : unit -> t ptr val create_from_file : string -> (t ptr option, Error.t structure ptr option) result val create_from_gvariant : Variant.t structure ptr -> t ptr val create_from_key_file : Key_file.t structure ptr -> string option -> (t ptr option, Error.t struct...
48384775db2ac4172c8dbfe4351e801f04dc99495b852b9961cc6bd33c89c088
jarmitage/jarmlib
SampleBuffer.hs
-- Sample Buffer Rack :{ sb_ = "sampleoffset fmdepth bufferlength recordrestart erase looprecord att hold dec sus rel filtershape cutoff res oscshape osctune oscpw mix" sb_sampleoffset x = control x # controlchannel 0 sb_fmdepth x = control x # controlchannel 1 sb_bufferlength x = control x # controlchannel 2 sb_record...
null
https://raw.githubusercontent.com/jarmitage/jarmlib/853f6d18ab32630397be91ea89846d55e59e3d70/tidal/osc/targets/LiveCore/NanoBlockMappings/SampleBuffer.hs
haskell
Sample Buffer Rack
:{ sb_ = "sampleoffset fmdepth bufferlength recordrestart erase looprecord att hold dec sus rel filtershape cutoff res oscshape osctune oscpw mix" sb_sampleoffset x = control x # controlchannel 0 sb_fmdepth x = control x # controlchannel 1 sb_bufferlength x = control x # controlchannel 2 sb_recordrestart x = control x ...
477c381c35429acf7d703c7d8588410e354ed6e5db2c4feb1cff3e695f40993f
gedge-platform/gedge-platform
rabbit_top_wm_process.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_top_wm_process). -export([init/2,...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_top/src/rabbit_top_wm_process.erl
erlang
-------------------------------------------------------------------- --------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_top_wm_process). -export([init/2, to_js...
5c16ca069632e3d3222ec33f54060b5b2e4a6bd056bfe10698a4e964fc978440
inventi/seed
event_bus.clj
(ns seed.core.event-bus (:require [mount.core :refer [defstate]] [clojure.core.async :as async :refer [chan mult]] [seed.core.event-store :as es])) (defrecord Pub [chan pub]) (defn start-publisher! [publish-chan] (async/pipe (es/live-event-stream) publish-chan)) (defstate publish-chan :s...
null
https://raw.githubusercontent.com/inventi/seed/0a0088a587d6b147215694dcba585b6782eeec80/src/seed/core/event_bus.clj
clojure
(ns seed.core.event-bus (:require [mount.core :refer [defstate]] [clojure.core.async :as async :refer [chan mult]] [seed.core.event-store :as es])) (defrecord Pub [chan pub]) (defn start-publisher! [publish-chan] (async/pipe (es/live-event-stream) publish-chan)) (defstate publish-chan :s...
0d9d9239750f474851d150e33c9d3a610541eec9e963a6625b382725c47c253e
caml-pkcs11/opkcs11-tool
p11_infos.ml
open P11_common open P11_objects open Printf Replace cK(A|F|R| ... ) _ by _ from the helpers to deal with case let caml_case_replace in_string = let regexp = Str.regexp "cK\\(A\\|F\\|R\\|K\\|M\\|O\\|C\\)_" in (Str.replace_first regexp "CK\\1_" in_string) let match_cKF_token_value a = match a with | 1n -> "cKF...
null
https://raw.githubusercontent.com/caml-pkcs11/opkcs11-tool/269d5e435c3142782568d37ca2af57c1a0722527/p11_infos.ml
ocaml
FIXME: Handle unkown flags Token info Slot description GetTokenInfo Token info Token in not initialized No token in slot ********** ATTRIBUTES ******************************** Print an attribute depending on its class ** Common attributes ** ** Common keys attributes *** ** Secret keys attributes ...
open P11_common open P11_objects open Printf Replace cK(A|F|R| ... ) _ by _ from the helpers to deal with case let caml_case_replace in_string = let regexp = Str.regexp "cK\\(A\\|F\\|R\\|K\\|M\\|O\\|C\\)_" in (Str.replace_first regexp "CK\\1_" in_string) let match_cKF_token_value a = match a with | 1n -> "cKF...
a699fe378e693b100704fa861bbbb9da0b0c3677500b0a33a188e7793d3e162c
juxd/dogs
cont.mli
open Base include Monad.S2 val from_thunk : (unit -> 'a) -> ('a, _) t val get : ('a, 'a) t -> 'a val forever : ('a, 'r) t -> ('a, 'r) t val repeat : ('a, 'r) t -> n:int -> ('a, 'r) t
null
https://raw.githubusercontent.com/juxd/dogs/021de2b2aa35d9b05c00f2b1170a75a1ab66609c/lib/cont.mli
ocaml
open Base include Monad.S2 val from_thunk : (unit -> 'a) -> ('a, _) t val get : ('a, 'a) t -> 'a val forever : ('a, 'r) t -> ('a, 'r) t val repeat : ('a, 'r) t -> n:int -> ('a, 'r) t
26c9b39b0a6a1097972fca9db53af5583d3dbc53346ab2f82965af1927f0a872
klarna/erlavro
avro_decoder_hooks_tests.erl
%%%------------------------------------------------------------------- Copyright ( c ) 2013 - 2016 Klarna AB %%% This file is provided to you under the Apache License , %%% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %%% a copy of the License at ...
null
https://raw.githubusercontent.com/klarna/erlavro/c55e55238ed879642c65d00c8105e498b4acc8db/test/avro_decoder_hooks_tests.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions...
Copyright ( c ) 2013 - 2016 Klarna AB This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(avro_decoder_hooks_tests). -incl...
eec920db5de8b2a65db864e39ac06816bde8a6da8b3409ad9460a3644a29323d
couchbase/chronicle
chronicle_dump.erl
-module(chronicle_dump). -include("chronicle.hrl"). -export([main/1]). -export([raw/1]). -define(fmt(Msg), ?fmt(Msg, [])). -define(fmt(Fmt, Args), ?fmt(group_leader(), Fmt, Args)). -define(fmt(IoDevice, Fmt, Args), io:format(IoDevice, Fmt ++ "~n", Args)). -define(error(Msg), ?error(Msg, [])). -define(error(Fmt, Arg...
null
https://raw.githubusercontent.com/couchbase/chronicle/3084f42e9824911e1de98c685acc6301400b00d8/scripts/chronicle_dump/chronicle_dump.erl
erlang
-module(chronicle_dump). -include("chronicle.hrl"). -export([main/1]). -export([raw/1]). -define(fmt(Msg), ?fmt(Msg, [])). -define(fmt(Fmt, Args), ?fmt(group_leader(), Fmt, Args)). -define(fmt(IoDevice, Fmt, Args), io:format(IoDevice, Fmt ++ "~n", Args)). -define(error(Msg), ?error(Msg, [])). -define(error(Fmt, Arg...
0b6ae9307dbe8e0543b5434cb4266ceb15ee073e96731179ab61a93861258cdb
arenadotio/pgx
test_pgx_value.ml
open Printf open Sexplib0 open Sexplib0.Sexp_conv open Pgx.Value let pp_value ppf x = Sexp.pp_hum ppf (sexp_of_t x) let equal_value (x : t) (y : t) = x = y let pp_hstore ppf x = Sexp.pp_hum ppf (sexp_of_hstore x) let equal_hstore x y = Sexp.equal (sexp_of_hstore x) (sexp_of_hstore y) let printer sexp value = sexp valu...
null
https://raw.githubusercontent.com/arenadotio/pgx/5cc53c729e8ec5171d1909e47505137c7427c2c0/pgx/test/test_pgx_value.ml
ocaml
open Printf open Sexplib0 open Sexplib0.Sexp_conv open Pgx.Value let pp_value ppf x = Sexp.pp_hum ppf (sexp_of_t x) let equal_value (x : t) (y : t) = x = y let pp_hstore ppf x = Sexp.pp_hum ppf (sexp_of_hstore x) let equal_hstore x y = Sexp.equal (sexp_of_hstore x) (sexp_of_hstore y) let printer sexp value = sexp valu...
ded30b78f3de571787a2f5cc12cd9eafb32e7ee35f2aad6f4b18a4a95ff96fc9
m4dc4p/haskelldb
DBDirect.hs
----------------------------------------------------------- -- | Module : Database . HaskellDB.DBDirect Copyright : ( c ) 1999 , HWT Group ( c ) 2003 , ( c ) 2005 - 2006 , -- License : BSD-style -- Maintainer : -- Stability : experimental -- Portab...
null
https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/src/Database/HaskellDB/DBDirect.hs
haskell
--------------------------------------------------------- | License : BSD-style Stability : experimental Portability : portable a 'Catalog' data type. After that it pretty prints that can be used to perform queries on the database. --------------------------------------------------------- | Shows usa...
Module : Database . HaskellDB.DBDirect Copyright : ( c ) 1999 , HWT Group ( c ) 2003 , ( c ) 2005 - 2006 , Maintainer : DBDirect generates a Haskell module from a database . It first reads the system catalog of the database into data structure in an ...
d7cc0f7e6b3c737fa5f836e5382e93ddae79fa756cf900c4a18cca5fe1aec2bf
ZHaskell/stdio
BaseSpec.hs
# LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # module Std.Data.Parser.BaseSpec where import qualified Data.List as L import Data.Word import Data.Int import GHC.Float import Text.Printf (printf) import Data.Word8 ...
null
https://raw.githubusercontent.com/ZHaskell/stdio/7887b9413dc9feb957ddcbea96184f904cf37c12/std-data/test/Std/Data/Parser/BaseSpec.hs
haskell
# LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # module Std.Data.Parser.BaseSpec where import qualified Data.List as L import Data.Word import Data.Int import GHC.Float import Text.Printf (printf) import Data.Word8 ...
42790afe5f66f5324e197102adb9103c50da4769cb6bd47f2af5a4c04bd0b77a
robrix/sequoia
Exp.hs
module Sequoia.Profunctor.Exp ( -- * Exponential functors Exp(..) * syntax , type (~~) , type (~>) -- * Construction , exp , exp' , expFn -- * Elimination , appExp , runExp , elimExp , (#) , getExpFn , (↑) , (↓) -- * Computation , dnE * Coexponential functors , Coexp(..) * syntax , type (>-) , type (-~)...
null
https://raw.githubusercontent.com/robrix/sequoia/592b87cd901475dd1363760ac3ebc30d980c609b/src/Sequoia/Profunctor/Exp.hs
haskell
* Exponential functors * Construction * Elimination * Computation * Construction * Elimination * Computation Exponential functors Mixfix syntax Construction Elimination Computation Mixfix syntax Construction Elimination Computation
module Sequoia.Profunctor.Exp Exp(..) * syntax , type (~~) , type (~>) , exp , exp' , expFn , appExp , runExp , elimExp , (#) , getExpFn , (↑) , (↓) , dnE * Coexponential functors , Coexp(..) * syntax , type (>-) , type (-~) , (>-) , runCoexp , elimCoexp , withCoexp , cocurry , uncocurry , coap ) where impor...
3939f358d4dae4160a5bf25f35b7074cf6c0f77e2de3b05143e41f6650cddaab
haskell/xhtml
Attributes.hs
{-# OPTIONS_HADDOCK hide #-} module Text.XHtml.Strict.Attributes where import Text.XHtml.Internals -- * Attributes in XHTML Strict action :: String -> HtmlAttr align :: String -> HtmlAttr alt :: String -> HtmlAttr altcode :: String -> HtmlAttr archive ...
null
https://raw.githubusercontent.com/haskell/xhtml/ecf5fd1ae4dbe773d9e37d49206dd6b8a0c1432c/Text/XHtml/Strict/Attributes.hs
haskell
# OPTIONS_HADDOCK hide # * Attributes in XHTML Strict
module Text.XHtml.Strict.Attributes where import Text.XHtml.Internals action :: String -> HtmlAttr align :: String -> HtmlAttr alt :: String -> HtmlAttr altcode :: String -> HtmlAttr archive :: String -> HtmlAttr base :: String -> Ht...
721021d8c91f47ca7e078c00801b06de4761d7f4ffb4fcf9f461831dde46d304
tomahawkins/atom
Analysis.hs
-- | -- Module: Analysis -- Description: - Copyright : ( c ) 2013 Lee Pike module Language.Atom.Analysis ( topo , ruleComplexity ) where import Language.Atom.Elaboration import Language.Atom.UeMap -- | Topologically sorts a list of expressions and subexpressions. topo :: UeMap -> [Hash] -> [(Hash, String...
null
https://raw.githubusercontent.com/tomahawkins/atom/e552e18859c6d249af4b293e9d2197878c0fd4fd/Language/Atom/Analysis.hs
haskell
| Module: Analysis Description: - | Topologically sorts a list of expressions and subexpressions.
Copyright : ( c ) 2013 Lee Pike module Language.Atom.Analysis ( topo , ruleComplexity ) where import Language.Atom.Elaboration import Language.Atom.UeMap topo :: UeMap -> [Hash] -> [(Hash, String)] topo mp ues = reverse ues' where start = 0 (_, ues') = foldl collect (start, []) ues collect :: (Int...
1ffca2cc59b26e19c8dcdb18678dce2f67e6edb90f490a68431840137c700abd
borodust/mortar-combat
commands.lisp
(in-package :mortar-combat.proxy) (defmacro when-peer-identified (&body body) `(if *peer* (progn ,@body) (list :command :error :type :unidentified-peer :text "Unauthorized access. Identify first."))) (defmethod process-command ((command (eql :version)) message) (list :com...
null
https://raw.githubusercontent.com/borodust/mortar-combat/548bdda21594185f36c365f25015c5edcc37b828/proxy/commands.lisp
lisp
fixme: add client limit
(in-package :mortar-combat.proxy) (defmacro when-peer-identified (&body body) `(if *peer* (progn ,@body) (list :command :error :type :unidentified-peer :text "Unauthorized access. Identify first."))) (defmethod process-command ((command (eql :version)) message) (list :com...
c685847b7c83f51694b01dd28c8d85dde7f7a3edb23e0fed7afcd953e79d8915
dyzsr/ocaml-selectml
directive_failure.ml
TEST ocaml_script_as_argument = " true " ocaml_exit_status = " 125 " * setup - ocaml - build - env * * ocaml_script_as_argument = "true" ocaml_exit_status = "125" * setup-ocaml-build-env ** ocaml *) #use "no";; let () = () ;;
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-ocaml/directive_failure.ml
ocaml
TEST ocaml_script_as_argument = " true " ocaml_exit_status = " 125 " * setup - ocaml - build - env * * ocaml_script_as_argument = "true" ocaml_exit_status = "125" * setup-ocaml-build-env ** ocaml *) #use "no";; let () = () ;;
be27ddfb645ee360e85fbc5ed8e4473a090531d2a795d196ce3d60fd101656bc
mejgun/haskell-tdlib
Usernames.hs
{-# LANGUAGE OverloadedStrings #-} -- | module TD.Data.Usernames where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U -- | data Usernames = -- | Describes usernames assigned to a user, a supergroup, or a channel Usernames | The active username , which can be c...
null
https://raw.githubusercontent.com/mejgun/haskell-tdlib/d9868e9231a4ec23e4bcbf7f6627ff9f43acea21/src/TD/Data/Usernames.hs
haskell
# LANGUAGE OverloadedStrings # | | | Describes usernames assigned to a user, a supergroup, or a channel | List of currently disabled usernames; the username can be activated with toggleUsernameIsActive/toggleSupergroupUsernameIsActive
module TD.Data.Usernames where import qualified Data.Aeson as A import qualified Data.Aeson.Types as T import qualified Utils as U Usernames | The active username , which can be changed with / editable_username :: Maybe String, disabled_usernames :: Maybe [String], | List of active usernames ; the fi...
79b3307cdbb53cd8adfb75671aeda8467339691795153614b05502cd1b77db93
ijvcms/chuanqi_dev
city_boss_config.erl
%%%------------------------------------------------------------------- @author zhengsiying %%% @doc %%% 自动生成文件,不要手动修改 %%% @end Created : 2016/10/12 %%%------------------------------------------------------------------- -module(city_boss_config). -include("common.hrl"). -include("config.hrl"). -compile([export_a...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/city_boss_config.erl
erlang
------------------------------------------------------------------- @doc 自动生成文件,不要手动修改 @end -------------------------------------------------------------------
@author zhengsiying Created : 2016/10/12 -module(city_boss_config). -include("common.hrl"). -include("config.hrl"). -compile([export_all]). get_list_conf() -> [ city_boss_config:get(X) || X <- get_list() ]. get_list() -> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. get(1) -> #city_boss_conf{ id = 1, boss_id = 8150...
8db06b5677403df607c60cc5440b0da16ac76b0139f8cf08993035c8ee04a646
dyzsr/ocaml-selectml
rec_check.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/a0b21d8d104e7b451d853781c86930f9445b57f8/typing/rec_check.ml
ocaml
************************************************************************ OCaml ...
, University of Cambridge , , INRIA Saclay , ENS Lyon Copyright 2017 Copyright 2018 the GNU Lesser General Public License version 2.1 , with the * Static checking of recurs...
fbf8beb02f0f947e27c7a416c5a9ae152580bf29e6a58081be920b0a90908760
elaforge/karya
Patches.hs
Copyright 2017 -- This program is distributed under the terms of the GNU General Public -- License 3.0, see COPYING or -3.0.txt module Ness.Patches where import qualified Data.Map as Map import qualified Util.Seq as Seq import Global import qualified Ness.Guitar as Guitar import qualified Ness.Guitar.Patch as Guit...
null
https://raw.githubusercontent.com/elaforge/karya/471a2131f5a68b3b10b1a138e6f9ed1282980a18/Ness/Patches.hs
haskell
This program is distributed under the terms of the GNU General Public License 3.0, see COPYING or -3.0.txt
Copyright 2017 module Ness.Patches where import qualified Data.Map as Map import qualified Util.Seq as Seq import Global import qualified Ness.Guitar as Guitar import qualified Ness.Guitar.Patch as Guitar.Patch import qualified Ness.Multiplate as Multiplate import qualified Ness.Multiplate.Patch as Multiplate.Patc...
ad6f4c93878757cb5c26ac5b59f54bc1166efcc3b54f2a0911a8997eabb56507
ghc/nofib
Problem.hs
module Problem(readProblem) where import Data.Char(isUpper,toLower) import Board readProblem :: String -> (Board, (Colour, Int)) readProblem = parseProblem . lines comment s = (s == [] || take 2 s == "--") parseProblem :: [String] -> (Board, (Colour, Int)) parseProblem s = (bd, gl) where bd = parseBoard bdtxt gl...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/spectral/mate/Problem.hs
haskell
module Problem(readProblem) where import Data.Char(isUpper,toLower) import Board readProblem :: String -> (Board, (Colour, Int)) readProblem = parseProblem . lines comment s = (s == [] || take 2 s == "--") parseProblem :: [String] -> (Board, (Colour, Int)) parseProblem s = (bd, gl) where bd = parseBoard bdtxt gl...
3455358b00175eb5edf2cc8b6c1cee32bd93d3997731ff9a8b2eb5925b085e70
jayrbolton/coursework
Primitive.hs
{-# LANGUAGE EmptyDataDecls , ExistentialQuantification , ScopedTypeVariables , NoMonomorphismRestriction #-} module MAlonzo.IO.Primitive where import qualified Unsafe.Coerce import qualified MAlonzo.Data.Char import qualified MAlonzo.Data.String import qualified MAlonzo.Foreign.Haske...
null
https://raw.githubusercontent.com/jayrbolton/coursework/f0da276527d42a6751fb8d29c76de35ce358fe65/computability_and_formal_languages/project__/agda/MAlonzo/IO/Primitive.hs
haskell
# LANGUAGE EmptyDataDecls , ExistentialQuantification , ScopedTypeVariables , NoMonomorphismRestriction #
module MAlonzo.IO.Primitive where import qualified Unsafe.Coerce import qualified MAlonzo.Data.Char import qualified MAlonzo.Data.String import qualified MAlonzo.Foreign.Haskell name2 = ("IO.Primitive.IO") d2 = ((error) ("MAlonzo Runtime Error: postulate evaluated: IO.Primitive.IO")) name4 = ("IO.Primitive.ret...
9271332cdc299c2cee22cb4c8c126fb58b34e172d3125523473c9d7a70187243
proper-testing/proper
magic.erl
-*- coding : utf-8 ; erlang - indent - level : 2 -*- %%% ------------------------------------------------------------------- Copyright ( c ) 2017 - 2021 , < > %%% This file is part of PropEr . %%% %%% PropEr is free software: you can redistribute it and/or modify it under the terms of the GNU General Public ...
null
https://raw.githubusercontent.com/proper-testing/proper/9f6a6501430479bed66d08cd795cd34d36ec83aa/examples/magic.erl
erlang
------------------------------------------------------------------- PropEr is free software: you can redistribute it and/or modify (at your option) any later version. PropEr is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITN...
-*- coding : utf-8 ; erlang - indent - level : 2 -*- Copyright ( c ) 2017 - 2021 , < > This file is part of PropEr . it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General ...
31cde99d3361c187d2f9af03d257d34d4a547e7cc51e9a5dd167e094c5e4b32f
rleonid/oml
omlf_solvedLPViaSvd.ml
open Omlf_lacaml_util open Lacaml.D module Svd = Omlf_svd ' Solved ' ( via SVD ) linear problem . type solved_lp = { coef : vec ; vaco : [ `Svd of Svd.t | `Cov of mat ] (* variance-covariance rep *) ; resi : vec ; looe : vec } let to_lambda f g l2_regularizer = let bestl = match l2_regularizer with...
null
https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/src-full/rgr/omlf_solvedLPViaSvd.ml
ocaml
variance-covariance rep Either figure out the best lambda (aka ridge parameter) or solve the system without it. This is only needed for the residuals later, is there a more efficient way? Odd, that we should know the error on the coefficients _before_ computing them! There's probably a better way t...
open Omlf_lacaml_util open Lacaml.D module Svd = Omlf_svd ' Solved ' ( via SVD ) linear problem . type solved_lp = { coef : vec ; resi : vec ; looe : vec } let to_lambda f g l2_regularizer = let bestl = match l2_regularizer with | `S l -> l | `From arr -> let loess = Array.map (fun l -...
779136c2359bf3506546f7d3a32ffdff91eabbd272123bdde080540712d83d86
cyga/real-world-haskell
Prettify.hs
-- file: ch05/Prettify.hs punctuate :: Doc -> [Doc] -> [Doc] punctuate p [] = [] punctuate p [d] = [d] punctuate p (d:ds) = (d <> p) : punctuate p ds -- file: ch05/Prettify.hs data Doc = Empty | Char Char | Text String | Line | Concat Doc Doc | Union Doc Doc ...
null
https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch05/Prettify.hs
haskell
file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: ch05/Prettify.hs file: c...
punctuate :: Doc -> [Doc] -> [Doc] punctuate p [] = [] punctuate p [d] = [d] punctuate p (d:ds) = (d <> p) : punctuate p ds data Doc = Empty | Char Char | Text String | Line | Concat Doc Doc | Union Doc Doc deriving (Show,Eq) empty :: Doc empty = Empty c...
2e39931481acfb9b9aa6a9ef3735a1cd4a0dfc81fed06f592478c54be350bfb4
realworldocaml/book
ppx_log_kernel.ml
open Ppxlib let log_source_position = ref false let () = Driver.add_arg "-log-source-position" (Set log_source_position) ~doc: " If set, adds a \"pos\" tag with a source code position to every logged message." ;; let expand ~level ~loc ~path:_ log message_args = let loc = { loc with loc_ghost =...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ppx_log/kernel/ppx_log_kernel.ml
ocaml
In order to use ppx_metaquot, we pass in a loc parameter to level. [Global] has a similar structure to the above code, except that it doesn't bother with parsing out a [log] parameter.
open Ppxlib let log_source_position = ref false let () = Driver.add_arg "-log-source-position" (Set log_source_position) ~doc: " If set, adds a \"pos\" tag with a source code position to every logged message." ;; let expand ~level ~loc ~path:_ log message_args = let loc = { loc with loc_ghost =...
217757dd75c104d09f2ba3a33807468519c0afac3b9251d792d2920295f87a07
aconchillo/guile-redis
pubsub.scm
( redis pubsub ) --- redis module for . Copyright ( C ) 2013 - 2022 Aleix Conchillo Flaque < > ;; ;; This file is part of guile-redis. ;; ;; guile-redis 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 ; ...
null
https://raw.githubusercontent.com/aconchillo/guile-redis/aded8d90b73a2b3a73a8bb776d6e6173c916cf5e/redis/pubsub.scm
scheme
This file is part of guile-redis. guile-redis is free software: you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. guile-redis is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTA...
( redis pubsub ) --- redis module for . Copyright ( C ) 2013 - 2022 Aleix Conchillo Flaque < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License Redis module for (define-module (redis pubsub) #:use-module (redis com...
540a1377eef84c80d345cabfa40d636b699bf55d055076a659d04713d2198524
promesante/hn-clj-pedestal-re-frame
system.clj
(ns hn-clj-pedestal-re-frame.system (:require [com.stuartsierra.component :as component] [hn-clj-pedestal-re-frame.schema :as schema] [hn-clj-pedestal-re-frame.server :as server] [hn-clj-pedestal-re-frame.db :as db])) (defn new-system [] (merge (component/system-map) (server/new-server) ...
null
https://raw.githubusercontent.com/promesante/hn-clj-pedestal-re-frame/76b62dbbcc1c803c8e233809796eda75893cf7c9/src/clj/hn_clj_pedestal_re_frame/system.clj
clojure
(ns hn-clj-pedestal-re-frame.system (:require [com.stuartsierra.component :as component] [hn-clj-pedestal-re-frame.schema :as schema] [hn-clj-pedestal-re-frame.server :as server] [hn-clj-pedestal-re-frame.db :as db])) (defn new-system [] (merge (component/system-map) (server/new-server) ...
5f2552420562163978285e018a959632c5e411e58a993d64946c50041f395f15
theodormoroianu/SecondYearCourses
HaskellChurch_20210415163120.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163120.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = show $ cIf b True False The boolean constant true always chooses the first alternative cTrue :: C...
c97fda3a719a755120f5884fc53a63a84cf1e42d9ffbb9e0c1732ff5983f5aa2
eponai/sulolive
specs.cljc
(ns eponai.web.ui.store.business.specs (:require [clojure.spec.alpha :as s] [eponai.common :as c] [eponai.client.utils :as client-utils])) (s/def :field.legal-entity.address/line1 (s/and string? #(not-empty %))) (s/def :field.legal-entity.address/postal (s/and string? #(not-empty %))) (s/def :field.legal...
null
https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/src/eponai/web/ui/store/business/specs.cljc
clojure
(ns eponai.web.ui.store.business.specs (:require [clojure.spec.alpha :as s] [eponai.common :as c] [eponai.client.utils :as client-utils])) (s/def :field.legal-entity.address/line1 (s/and string? #(not-empty %))) (s/def :field.legal-entity.address/postal (s/and string? #(not-empty %))) (s/def :field.legal...
6f0140b4d6779d385ae148424aa42b0ca2ec8bb9e4dc0c60c48d194e988b18fa
bobeff/playground
044.rkt
; Sample Problem: Design a program that moves a car from left to right on the world canvas , three pixels per clock tick . If the mouse is clicked anywhere ; on the canvas, the car is placed at the x-coordinate of that click. Exercise 44 . Formulate the examples as BSL tests . #lang racket (require 2htdp/image 2...
null
https://raw.githubusercontent.com/bobeff/playground/7072dbd7e0acd690749abe1498dd5f247cc21637/htdp-second-edition/exercises/044.rkt
racket
Sample Problem: Design a program that moves a car from left to right on the on the canvas, the car is placed at the x-coordinate of that click. WorldState -> WorldState Launches the program from some initial world state "ws". WorldState -> Image Places the car into the BACKGROUND scene, according to the given wor...
world canvas , three pixels per clock tick . If the mouse is clicked anywhere Exercise 44 . Formulate the examples as BSL tests . #lang racket (require 2htdp/image 2htdp/universe rackunit) (define WHEEL-RADIUS 10) (define CAR-BODY-WIDTH (* 8 WHEEL-RADIUS)) (define CAR-BODY-HEIGHT (* 2 WHEEL-RADIUS)) (define CA...
73c4c73f3c2803f7bdb636798405151d97241a52a63512cd75ae7f8c963ac771
avh4/elm-format
ResolveFiles.hs
module CommandLine.ResolveFiles (resolveElmFiles, Error(..)) where This module provides reusable functions to resolve command line arguments into a list of Elm files import Prelude () import Relude import CommandLine.InfoFormatter (ToConsole(..)) import qualified CommandLine.Filesystem as Filesystem import Command...
null
https://raw.githubusercontent.com/avh4/elm-format/57f77ee0a667869ceed3a61a0f4eeaca56a3964f/elm-format-lib/src/CommandLine/ResolveFiles.hs
haskell
module CommandLine.ResolveFiles (resolveElmFiles, Error(..)) where This module provides reusable functions to resolve command line arguments into a list of Elm files import Prelude () import Relude import CommandLine.InfoFormatter (ToConsole(..)) import qualified CommandLine.Filesystem as Filesystem import Command...
6971ba967be47d26bb5453ae7de12e1598b2f9188baa03bbb0c26203941bf9a4
BekaValentine/SimpleFP-v2
Term.hs
{-# OPTIONS -Wall #-} # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeSynonymInstances #-} -- | This module defines the terms ...
null
https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/Continuations/Core/Term.hs
haskell
# OPTIONS -Wall # # LANGUAGE DeriveTraversable # # LANGUAGE TypeSynonymInstances # | This module defines the terms of the dependently typed lambda calculus. we also now have terms for record types, record terms, and record projection. | A case motive is a telescope that describes the arguments of a case expression...
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TypeFamilies # module Continuations.Core.Term where import Utils.ABT import Utils.Names import Utils.Plicity import Utils.Pretty import Utils.T...
39fe91aa4898aff0f6f46e4844a7dd04a26a009bdd2ad02028f1ac6ea6ba15fe
khotyn/4clojure-answer
95-to-tree-or-not-to-tree.clj
(fn [s] (letfn [(binary-tree? [s] (and (= (count s) 3) (let [a (second s) b (last s)] (and (or (nil? a) (and (sequential? a) (binary-tree? a))) (or (nil? b) (and (sequential? b) (binary-tree? b)))))))] (binary-tree? s)))
null
https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/95-to-tree-or-not-to-tree.clj
clojure
(fn [s] (letfn [(binary-tree? [s] (and (= (count s) 3) (let [a (second s) b (last s)] (and (or (nil? a) (and (sequential? a) (binary-tree? a))) (or (nil? b) (and (sequential? b) (binary-tree? b)))))))] (binary-tree? s)))
082843ec903877c83bad01fa36c88ab2e82652a7a63dd00862dbfaeb0f1aa7ba
racket/web-server
xexpr.rkt
#lang racket/base (require racket/contract racket/list racket/match xml web-server/private/xexpr (except-in net/cookies/server make-cookie) "request-structs.rkt" "cookie.rkt" "response-structs.rkt" "status-code.rkt") (...
null
https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/http/xexpr.rkt
racket
rfc2109 also recommends some cache-control stuff here for cookies sanity check: we get a response code present, message absent unknown status code used, no message known code used, #f used as message known code used, message lookup overridden
#lang racket/base (require racket/contract racket/list racket/match xml web-server/private/xexpr (except-in net/cookies/server make-cookie) "request-structs.rkt" "cookie.rkt" "response-structs.rkt" "status-code.rkt") (...
b41d1f06a8671eca3679738c32722820f9e66ee154bd546f862de8130eaf9a18
jimweirich/sicp-study
ex2_26.scm
SICP 2.26 Exercise 2.26 . Suppose we define x and y to be two lists : ;; (define x (list 1 2 3)) ( define y ( list 4 5 6 ) ) ;; What result is printed by the interpreter in response to evaluating ;; each of the following expressions: ;; ;; (append x y) ;; (cons x y) ;; (list x y) ;; ANSWER -----------------...
null
https://raw.githubusercontent.com/jimweirich/sicp-study/bc5190e04ed6ae321107ed6149241f26efc1b8c8/scheme/chapter2/ex2_26.scm
scheme
(define x (list 1 2 3)) What result is printed by the interpreter in response to evaluating each of the following expressions: (append x y) (cons x y) (list x y) ANSWER ------------------------------------------------------------ => (1 2 3 4 5 6)
SICP 2.26 Exercise 2.26 . Suppose we define x and y to be two lists : ( define y ( list 4 5 6 ) ) (define x (list 1 2 3)) (define y (list 4 5 6)) = > ( ( 1 2 3 ) 4 5 6 ) = > ( ( 1 2 3 ) ( 4 5 6 ) )
ce85d294aa0a21ff02392a361016136f96d95a573b9bb583cb42604f6da950ec
hurryabit/pukeko
Pos.hs
# LANGUAGE UndecidableInstances # module Pukeko.AST.Pos ( SourcePos , noPos , HasPos (..) , Where (..) , here , here' , Lctd (..) , lctd ) where import Prelude import Control.Lens (Lens) import Control.Monad.Freer import Control.Monad.Freer.Reader import Data.Aeson import Data.Functor.Compose import...
null
https://raw.githubusercontent.com/hurryabit/pukeko/d11a101a41123c5151bcdd7dd2d0ef53c65483c2/src/Pukeko/AST/Pos.hs
haskell
# LANGUAGE UndecidableInstances # module Pukeko.AST.Pos ( SourcePos , noPos , HasPos (..) , Where (..) , here , here' , Lctd (..) , lctd ) where import Prelude import Control.Lens (Lens) import Control.Monad.Freer import Control.Monad.Freer.Reader import Data.Aeson import Data.Functor.Compose import...
8be6f792aac5687cf37d8c321970af902eaf6072be211ef23edc45ab50a63cf2
rabbitmq/rabbitmq-peer-discovery-common
rabbit_peer_discovery_common_app.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_peer_discovery_common_app). -beha...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-peer-discovery-common/02e664d07de5b2ce4589227cc14b8ef4142175a2/src/rabbit_peer_discovery_common_app.erl
erlang
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_peer_discovery_common_app). -behaviour(...
55e5cd81faa320be331be142f8f63541389b0494beea0c7fe2981ddebfae8cd0
project-oak/hafnium-verification
starvation.mli
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/concurrency/starvation.mli
ocaml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...