_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 |
|---|---|---|---|---|---|---|---|---|
f4cd67bb3f997a08bb7ff82f745a144f923a06100a6f9455d176621919b369e3 | CodyReichert/qi | io.lisp | ;; -*- lisp -*-
(in-package :it.bese.arnesi)
;;;; * Utilites for file system I/O
(defmacro with-input-from-file ((stream-name file-name &rest args &key
(direction nil direction-provided-p)
external-format
... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/arnesi-master/src/io.lisp | lisp | -*- lisp -*-
* Utilites for file system I/O
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
- Redistributions of source code must retain the above copyright
notice, this list of condition... |
(in-package :it.bese.arnesi)
(defmacro with-input-from-file ((stream-name file-name &rest args &key
(direction nil direction-provided-p)
external-format
&allow-other-keys)
... |
ce41f463b9b4546f8875309501e3159ed91eb26256f041c64d4778efecb2a834 | ice1000/learn | correct-movie-title.hs | module MovieTitle where
import Data.Char
import Data.List.Split
correctMovieTitle :: String -> String
correctMovieTitle ls = tail $ (f <$> splitOn " " ls) >>= id
where f (h : t) = ' ' : toUpper h : (toLower <$> t)
--
| null | https://raw.githubusercontent.com/ice1000/learn/4ce5ea1897c97f7b5b3aee46ccd994e3613a58dd/Haskell/CW-Kata/correct-movie-title.hs | haskell | module MovieTitle where
import Data.Char
import Data.List.Split
correctMovieTitle :: String -> String
correctMovieTitle ls = tail $ (f <$> splitOn " " ls) >>= id
where f (h : t) = ' ' : toUpper h : (toLower <$> t)
| |
b880c057ff41ea868d052af64a02dc7ad010d56b6f8447b38e807b48fa786ffd | Octachron/codept | a.mli | type t = B.t
open D
| null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/tests/complex/mixed/a.mli | ocaml | type t = B.t
open D
| |
c1518d7d625d365fe636f5f8b882910d56eeaf2964811369bfeb089f50ad36b6 | fortytools/holumbus | XmlArrows.hs | # OPTIONS #
-- ------------------------------------------------------------
module Holumbus.Crawler.XmlArrows
where
import Text.XML.HXT.Core
-- ------------------------------------------------------------
-- | Remove contents, when document status isn't ok, but remain meta info
checkDocumentStatus ... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/Holumbus-Searchengine/src/Holumbus/Crawler/XmlArrows.hs | haskell | ------------------------------------------------------------
------------------------------------------------------------
| Remove contents, when document status isn't ok, but remain meta info
------------------------------------------------------------ | # OPTIONS #
module Holumbus.Crawler.XmlArrows
where
import Text.XML.HXT.Core
checkDocumentStatus :: IOSArrow XmlTree XmlTree
checkDocumentStatus = replaceChildren none
`whenNot`
documentStatusOk
|
731f91fbead0198c2995fb8c013bae113500aa5483e2d3ac57a03da6c54674fd | LightTable/LightTable | user.cljs | (ns lt.plugins.user
(:require [lt.object :as object]
[lt.objs.tabs :as tabs]
[lt.objs.command :as cmd])
(:require-macros [lt.macros :refer [defui behavior]]))
;; UI to be associated with an object
(defui hello-panel [this]
[:h1 "Hello World!"])
;; Define an object prototype
(object/objec... | null | https://raw.githubusercontent.com/LightTable/LightTable/3760844132a17fb0c9cf3f3b099905865aed7e3b/deploy/core/User/src/lt/plugins/user.cljs | clojure | UI to be associated with an object
Define an object prototype
Currently used by :user.hello but could be reused by any
object with a declaration in user.behaviors.
Create a user command. Commands can call any function
and be bound to any keystroke. | (ns lt.plugins.user
(:require [lt.object :as object]
[lt.objs.tabs :as tabs]
[lt.objs.command :as cmd])
(:require-macros [lt.macros :refer [defui behavior]]))
(defui hello-panel [this]
[:h1 "Hello World!"])
(object/object* ::user.hello
:tags [:user.hello]
... |
fcefe58a9533d57c1e162e84a187d1d317193d0667f9d20c525f20b7fe597e3c | purebred-mua/purebred | UI.hs | -- This file is part of purebred
Copyright ( C ) 2017 - 2021 and
--
-- purebred is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later ... | null | https://raw.githubusercontent.com/purebred-mua/purebred/5ad48e262133f0d274c42640eff158725c9cda83/src/Purebred/Types/UI.hs | haskell | This file is part of purebred
purebred is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... | Copyright ( C ) 2017 - 2021 and
it under the terms of the GNU Affero 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 Affero General Public License
# LANGUAGE DeriveGeneric #
# LANGUAGE TypeFamilies #
modu... |
a599c6a11905025010719766450b2fa7b567c588cbe751ac83416c6ef54f458c | etarasov/iptadmin | Utils.hs |
module IptAdmin.EditForm.Utils where
import Control.Monad.Error
import IptAdmin.EditForm.Class
import IptAdmin.EditForm.Types
import IptAdmin.System
import IptAdmin.Types
import Iptables.Types
import Iptables
nullSelForm :: String -- ^ Table name
-> String -- ^ Chain name
-> Ipt... | null | https://raw.githubusercontent.com/etarasov/iptadmin/ceaca3424a0b2891da4d5d91eaf516a3566f2885/src/IptAdmin/EditForm/Utils.hs | haskell | ^ Table name
^ Chain name
^ Table name
^ Chain name
^ Rule to convert
^ Table name
^ Chain name |
module IptAdmin.EditForm.Utils where
import Control.Monad.Error
import IptAdmin.EditForm.Class
import IptAdmin.EditForm.Types
import IptAdmin.System
import IptAdmin.Types
import Iptables.Types
import Iptables
-> IptAdmin PackedEditForm
nullSelForm tableName chainName =
case (tableName, chainName) of
... |
4fc7976c3289254865c99ab3efe62f2b7e447151d3c96db62453e63c1b7c8dbf | city41/reagent-breakout | core.cljs | (ns breakout.core
(:require [reagent.core :as reagent]
[breakout.engine.main :as main]
[breakout.scenes.level :as level]
[breakout.scenes.title :as title]
[breakout.scenes.game-over :as game-over]
[breakout.scenes.win :as win]))
(def scenes {:level leve... | null | https://raw.githubusercontent.com/city41/reagent-breakout/84907d0cbc2d3cae917e30f955bc8e42fcb2d505/src/cljs/breakout/core.cljs | clojure | (ns breakout.core
(:require [reagent.core :as reagent]
[breakout.engine.main :as main]
[breakout.scenes.level :as level]
[breakout.scenes.title :as title]
[breakout.scenes.game-over :as game-over]
[breakout.scenes.win :as win]))
(def scenes {:level leve... | |
126963c974ae8a61cae8dfa77627026e9ca4e239dd208a993f5c63f346c2dfab | MLstate/opalang | orderedTypeSig.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/orderedTypeSig.ml | ocaml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | |
d1965ca5e23ecc0c140d1dbebd0fe9633db1177187fb57320cdc192fea605e35 | ujamjar/ctypes_of_clang | info.ml | open Printf
open Ctypes_of_clang
module Clang = Coc_clang.Make(struct let from = None end)
module Cinfo = Coc_info.Make(Clang)
open Cinfo
let clang_args = ref []
let code = ref []
let log_level = ref Log.WARN
let log_levels = [
"debug", Log.DEBUG;
"info", Log.INFO;
"warn", Log.WARN;
"error", Log.ERROR;
"fa... | null | https://raw.githubusercontent.com/ujamjar/ctypes_of_clang/08d5179be6f3f5ef07ceae6565301f12192ab4b7/tools/info.ml | ocaml | open Printf
open Ctypes_of_clang
module Clang = Coc_clang.Make(struct let from = None end)
module Cinfo = Coc_info.Make(Clang)
open Cinfo
let clang_args = ref []
let code = ref []
let log_level = ref Log.WARN
let log_levels = [
"debug", Log.DEBUG;
"info", Log.INFO;
"warn", Log.WARN;
"error", Log.ERROR;
"fa... | |
6e6044b3751ae811b3cf19cfec21c360cd1ce991e325684e96baf86948d9246b | janestreet/ecaml | test_syntax_table.mli | open! Core
open! Import
val show : Syntax_table.t -> unit
| null | https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/test/test_syntax_table.mli | ocaml | open! Core
open! Import
val show : Syntax_table.t -> unit
| |
c6f585cc6990defe495d504117b768fb086371900b86f385f86535911cfc156b | arrdem/stacks | articles.clj | (ns stacks.tools.articles
"A thin wrapper around common mark which adds extensions for writing stacks articles."
{:authors ["Reid \"arrdem\" McKenzie <>"]
:license "-v10.html"}
(:require [clojure.string :as string]
[clojure.walk :as walk]
[clojure.edn :as edn]
[clojure.java.... | null | https://raw.githubusercontent.com/arrdem/stacks/a16a7a6301e400c0c40c8774d07df0a86f9806f5/src/main/clj/stacks/tools/articles.clj | clojure | raw content | (ns stacks.tools.articles
"A thin wrapper around common mark which adds extensions for writing stacks articles."
{:authors ["Reid \"arrdem\" McKenzie <>"]
:license "-v10.html"}
(:require [clojure.string :as string]
[clojure.walk :as walk]
[clojure.edn :as edn]
[clojure.java.... |
38c53d572d4f0ecf6db691826d16c9dd4e4a57b1d1c3042405a44435c1a4eea2 | CodyReichert/qi | tf-mcl.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; tf-mcl.lisp --- Digitool MCL trivial-features implementation.
;;;
Copyright ( C ) 2010 , ( binghe ) < >
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Softw... | null | https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/trivial-features-latest/src/tf-mcl.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
tf-mcl.lisp --- Digitool MCL trivial-features implementation.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, pu... | Copyright ( C ) 2010 , ( binghe ) < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-packag... |
d1b42f7c4eb2b1359fae08259e6a7ea910ec0335560ffefab42ab73983895fc8 | roman01la/clojurescript-workshop | app.cljs | (ns calculator.components.app
(:require [re-frame.core :refer [subscribe]]
[calculator.components.base :refer [ctrl-panel input]]
[calculator.components.pad :refer [number-pad]]))
(defn app []
(let [[value next-value] @(subscribe [:values])] ;; subscribe to state changes
[:div.container... | null | https://raw.githubusercontent.com/roman01la/clojurescript-workshop/48b02266d65cae8113edd4ce34c4ab282ad256d1/16.re-frame/calculator/src/calculator/components/app.cljs | clojure | subscribe to state changes | (ns calculator.components.app
(:require [re-frame.core :refer [subscribe]]
[calculator.components.base :refer [ctrl-panel input]]
[calculator.components.pad :refer [number-pad]]))
(defn app []
[:div.container
[:div.header
[ctrl-panel]
[input {:value (or next-value value)
... |
7d79f1b72d3f274a3d496cf0434f31a4883ef4d267a405d07bf9ff5e85dfc230 | dtgoitia/civil-autolisp | CIVIL - Add to level.lsp | (defun C:ATL ( / *error* )
; SET - Error handling function
(defun *error* ( msg )
(if (not (member msg '("Function cancelled" "quit / exit abort")))
(princ (strcat "\nError: " msg))
)
; RESET to original "osmode" and "cmdecho".
(setvar "osmode" oldosmode)
(setvar "cmdecho" oldcmdecho)
... | null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/CIVIL%20-%20Add%20to%20level.lsp | lisp | SET - Error handling function
RESET to original "osmode" and "cmdecho".
SAVE "osmode" and "cmdecho"
CHANGE "osmode" and "cmdecho"
OPERATION - Cut the extracted text
OPERATION - Convert the cutted text, to be a real number
OPERATION - Convert new level to string with underline code before
RESET to original "osmo... | (defun C:ATL ( / *error* )
(defun *error* ( msg )
(if (not (member msg '("Function cancelled" "quit / exit abort")))
(princ (strcat "\nError: " msg))
)
(setvar "osmode" oldosmode)
(setvar "cmdecho" oldcmdecho)
(princ)
)
(setq oldosmode (getvar "osmode"))
(setq oldcmdecho (getvar "cmd... |
cca5f0dc334194df5a10347d30272af3f0a4e72d2ac07086f33f2b375a5c5d3b | typelead/etlas | ConfiguredConversion.hs | module Distribution.Solver.Modular.ConfiguredConversion
( convCP
) where
import Data.Maybe
import Prelude hiding (pi)
import Data.Either (partitionEithers)
import Distribution.Package (UnitId, packageId)
import qualified Distribution.Simple.PackageIndex as SI
import Distribution.Solver.Modular.Configured
im... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Solver/Modular/ConfiguredConversion.hs | haskell | | Converts from the solver specific result @CP QPN@ into
a 'ResolverPackage', which can then be converted into
the install plan.
lib
exe
is lib
is exe
qualified. So the way to tell if this is an executable
dependency is to make sure the qualifier is pointing
at the actual thing. Fortunately for us, I wa... | module Distribution.Solver.Modular.ConfiguredConversion
( convCP
) where
import Data.Maybe
import Prelude hiding (pi)
import Data.Either (partitionEithers)
import Distribution.Package (UnitId, packageId)
import qualified Distribution.Simple.PackageIndex as SI
import Distribution.Solver.Modular.Configured
im... |
38741a05509ce5c10ed9e29772f9977732eafe8fe04f6f9ae759438568a01d5d | kellino/microML | EvalSpec.hs | module EvalSpec where
import Test.Hspec
import Repl.Eval
import MicroML.Syntax
import Control.Exception (evaluate)
evalspec :: IO ()
evalspec = hspec $
describe "evalspec" $ do
describe "eval" $ do
it "should eval an int to an int" $
eval emptyTmenv (Lit (LInt 1)) `shouldBe` Li... | null | https://raw.githubusercontent.com/kellino/microML/26a4e0ad7542e26f51945eb92db19f63f69b6962/test/EvalSpec.hs | haskell | module EvalSpec where
import Test.Hspec
import Repl.Eval
import MicroML.Syntax
import Control.Exception (evaluate)
evalspec :: IO ()
evalspec = hspec $
describe "evalspec" $ do
describe "eval" $ do
it "should eval an int to an int" $
eval emptyTmenv (Lit (LInt 1)) `shouldBe` Li... | |
a06cadbfbc02cf3e11144e8a874fc6498ed5997c2cd22880edce94a7cabd43ba | halturin/mx | mx_broker_sup.erl | Copyright ( C ) 2015 < >
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
%% to use, copy, modify, merge, publish, distr... | null | https://raw.githubusercontent.com/halturin/mx/4ccce0f7233aea255576b9d01c0114d5ab4b199f/src/mx_broker_sup.erl | erlang |
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above copyright notice ... | Copyright ( C ) 2015 < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
... |
66933d3ca44b47a21c4d26699fb5d6eb24eca99f761d7867f8867c43ee8d6351 | AbstractMachinesLab/caramel | daemonize.ml | type status =
| Started of
{ daemon_info : string
; pid : Pid.t
}
| Already_running of
{ daemon_info : string
; pid : Pid.t
}
| Finished
let retry ?message ?(count = 100) f =
let rec loop = function
| x when x >= count ->
Result.Error
( Printf.sprintf "too ... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/daemonize.ml | ocaml | Unfortunately the logger may not be set. Print on stderr directly? | type status =
| Started of
{ daemon_info : string
; pid : Pid.t
}
| Already_running of
{ daemon_info : string
; pid : Pid.t
}
| Finished
let retry ?message ?(count = 100) f =
let rec loop = function
| x when x >= count ->
Result.Error
( Printf.sprintf "too ... |
974b80144ab6888b0a19f059b852f74c26e4c1fe48faaaf0506ef24887887a3e | paurkedal/ocaml-cothrift | thrift_protocol_binary.ml | Copyright ( C ) 2016 < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any later version , with the ... | null | https://raw.githubusercontent.com/paurkedal/ocaml-cothrift/4410e5123ec6b3769c0d046f1abf4a73e9b56a0f/lib/thrift_protocol_binary.ml | ocaml | Fixed-Size Buffering
Compound Read
Fixed-Size Buffering
Scalar Write
Compound Write | Copyright ( C ) 2016 < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any later version , with the ... |
60f0c867d2a16cce45257dda3dcddc18c5d552341774bac65d9846b95fafecda | rtoy/cmucl | pkg.lisp | Copyright ( C ) 2002 < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
1 . Redistributions of source code must retain the above copyright
;;; notice, this list of condi... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/tests/pcl/pkg.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
document... | Copyright ( C ) 2002 < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . The name of the author may not be used to endorse or promote
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS
ARE DISCL... |
e26627610834a380e5b0904bf8752929b5edb858ac90a1d9192205577ef2e563 | GaloisInc/halvm-web | Syslog.hs | module Syslog(createSyslogger, getLoggerArgs) where
import Control.Monad(foldM)
import Data.ByteString(ByteString)
import qualified Data.ByteString.Char8 as S8
import Data.List(isPrefixOf)
import Data.Word(Word16)
import Data.Time.Clock(getCurrentTime)
import ... | null | https://raw.githubusercontent.com/GaloisInc/halvm-web/a01a84433df76caaa4edea6305797ccf588138c2/src/Syslog.hs | haskell | module Syslog(createSyslogger, getLoggerArgs) where
import Control.Monad(foldM)
import Data.ByteString(ByteString)
import qualified Data.ByteString.Char8 as S8
import Data.List(isPrefixOf)
import Data.Word(Word16)
import Data.Time.Clock(getCurrentTime)
import ... | |
99d797a87e828e8c4890259f066ea2ba519dd53256715e575058ac71b57c36c4 | KestrelInstitute/Specware | load-utilities.lisp | #+Lispworks
(setq *default-package-use-list* '("CL"))
#+mcl
(setq ccl:*make-package-use-defaults* '("CL"))
(defpackage :Specware (:use :cl))
(defpackage :System-Spec)
(in-package :Specware)
(terpri) ; purely cosmetic
(defvar cygwin? nil)
(defvar System-Spec::msWindowsSystem? #+(or win32 mswindows) t
... | null | https://raw.githubusercontent.com/KestrelInstitute/Specware/2be6411c55f26432bf5c9e2f7778128898220c24/Applications/Handwritten/Lisp/load-utilities.lisp | lisp | purely cosmetic
The following flag disables the collection of xref information when a lisp
file is compiled and loaded. When true, it collects such information,
but it seems that for monadic code (with lots of closures), compiling
load time, there is no change to the behaviour of a program.
---------------
file.... | #+Lispworks
(setq *default-package-use-list* '("CL"))
#+mcl
(setq ccl:*make-package-use-defaults* '("CL"))
(defpackage :Specware (:use :cl))
(defpackage :System-Spec)
(in-package :Specware)
(defvar cygwin? nil)
(defvar System-Spec::msWindowsSystem? #+(or win32 mswindows) t
#-(o... |
04468006f4fad6a224c53155d1908ffd4be1e4a7f81f9eacfb9f9db5887de9e3 | xapi-project/xenopsd | suspend_image.ml |
* Copyright ( C ) 2006 - 2014 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xenopsd/837d1ce49f2bb68092298a3d0a3dbaeb82c10058/lib/suspend_image.ml | ocaml | All additional fields below should use the [@sexp.option] extension
length |
* Copyright ( C ) 2006 - 2014 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
287166749fc2e8cacd4a038d005d50c352a07bcb8c04a334755e0df593141c99 | jafingerhut/clojure-benchmarks | revcomp.clj-3.clj | Author : ( )
Date : Jul 29 , 2009
(ns revcomp
(:gen-class))
(set! *warn-on-reflection* true)
(defn fasta-description-line
"Return true when the line l is a FASTA description line"
[l]
(= \> (first (seq l))))
(defn fasta-desc-dna-str-pairs
"Take a sequence of lines from a FASTA format file. Return... | null | https://raw.githubusercontent.com/jafingerhut/clojure-benchmarks/474a8a4823727dd371f1baa9809517f9e0b508d4/revcomp/revcomp.clj-3.clj | clojure | If you do this, and invoke the macro many many times, it seems to
each run-time call of the macro. If you change it to a function
it to a 'def', so the map is created only once, is much faster.
[c]
`({\w \W, \W \W,
[c]
({\w \W, \W \W, | Author : ( )
Date : Jul 29 , 2009
(ns revcomp
(:gen-class))
(set! *warn-on-reflection* true)
(defn fasta-description-line
"Return true when the line l is a FASTA description line"
[l]
(= \> (first (seq l))))
(defn fasta-desc-dna-str-pairs
"Take a sequence of lines from a FASTA format file. Return... |
7d5313a4114c691bac7da6f816a2a3c74b3eb496bc89647e51edc8977df0828b | ayazhafiz/plts | main.ml | open Lexing
open SimpleSub.Lib
(* Repl + File reader *)
let string_of_position lexbuf =
let pos = lexbuf.lex_curr_p in
Printf.sprintf "%s:%d:%d" pos.pos_fname pos.pos_lnum
(pos.pos_cnum - pos.pos_bol + 1)
let parse lexbuf =
let result =
try Some (SimpleSub.Parser.program SimpleSub.Lexer.read lexbuf) wi... | null | https://raw.githubusercontent.com/ayazhafiz/plts/59b3996642f4fd5941c96a4987643303acc3dee6/simple_sub/main.ml | ocaml | Repl + File reader | open Lexing
open SimpleSub.Lib
let string_of_position lexbuf =
let pos = lexbuf.lex_curr_p in
Printf.sprintf "%s:%d:%d" pos.pos_fname pos.pos_lnum
(pos.pos_cnum - pos.pos_bol + 1)
let parse lexbuf =
let result =
try Some (SimpleSub.Parser.program SimpleSub.Lexer.read lexbuf) with
| SimpleSub.Lexer.... |
6ca3483146a02a1fd8a74b007233075f93e9e5c28a949e69f17787aff86b7a9e | armedbear/abcl | make-string-output-stream.lisp | ;;; make-string-output-stream.lisp
;;;
Copyright ( C ) 2004
$ Id$
;;;
;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later... | null | https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/src/org/armedbear/lisp/make-string-output-stream.lisp | lisp | make-string-output-stream.lisp
This program is free software; you can redistribute it and/or
either version 2
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General... | Copyright ( C ) 2004
$ Id$
modify it under the terms of the GNU General Public License
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
(in-pack... |
d1b61f0c7efb7b2a218e68617012670fa824b198fd8786591b573b618cc80240 | benzap/fif | stack_machine_test.cljc | (ns fif.stack-machine-test
(:require [clojure.test :refer [deftest testing is are]]
[fif.stack-machine :refer [push-stack
get-stack
pop-stack
push-ret
... | null | https://raw.githubusercontent.com/benzap/fif/972adab8b86c016b04babea49d52198585172fe3/test/fif/stack_machine_test.cljc | clojure | (ns fif.stack-machine-test
(:require [clojure.test :refer [deftest testing is are]]
[fif.stack-machine :refer [push-stack
get-stack
pop-stack
push-ret
... | |
7db486ce814b2427bf83e61d15ff7a9a2e9cba7691df9d381c0bcedfa1c78bc3 | mirage/ptt | ptt_tuyau.mli | module Lwt_backend : module type of Lwt_backend
open Lwt_backend
module type FLOW = Ptt.Sigs.FLOW with type +'a io = 'a Lwt.t
module Client (Stack : Tcpip.Stack.V4V6) : sig
val sendmail :
?encoder:(unit -> bytes)
-> ?decoder:(unit -> bytes)
-> ?queue:(unit -> (char, Bigarray.int8_unsigned_elt) Ke.Rke... | null | https://raw.githubusercontent.com/mirage/ptt/25b39546262d8f2dcc79ee98eb35a6ed4b453686/lib/ptt_tuyau.mli | ocaml | module Lwt_backend : module type of Lwt_backend
open Lwt_backend
module type FLOW = Ptt.Sigs.FLOW with type +'a io = 'a Lwt.t
module Client (Stack : Tcpip.Stack.V4V6) : sig
val sendmail :
?encoder:(unit -> bytes)
-> ?decoder:(unit -> bytes)
-> ?queue:(unit -> (char, Bigarray.int8_unsigned_elt) Ke.Rke... | |
7f0b39aada7db9e5e9db7719f88b39a4c6d95312295de90b143eb3dcb377c243 | nikodemus/screamer | screams.lisp | -*- Mode : LISP ; Package : ( SCREAMS : USE CL : COLON - MODE : EXTERNAL ) ; Base : 10 ; Syntax : Ansi - common - lisp -*-
LaHaShem
(in-package :screamer-user)
(screamer:define-screamer-package :screams (:use :iterate))
(in-package :screams)
(defun pythagorean-triples (n)
(all-values
(let ((a (an-integ... | null | https://raw.githubusercontent.com/nikodemus/screamer/86b7b99e6910c946c3a6b5d8bc817dfef06217ca/screams.lisp | lisp | Package : ( SCREAMS : USE CL : COLON - MODE : EXTERNAL ) ; Base : 10 ; Syntax : Ansi - common - lisp -*-
Note how lists with variables in their CDR print out as dotted pairs
since the Common Lisp printer for cons cells won't dereference bound
variables to determine that a cons cell can be printed in list notation.
... |
LaHaShem
(in-package :screamer-user)
(screamer:define-screamer-package :screams (:use :iterate))
(in-package :screams)
(defun pythagorean-triples (n)
(all-values
(let ((a (an-integer-between 1 n))
(b (an-integer-between 1 n))
(c (an-integer-between 1 n)))
(unless (= (+ (* a a) (... |
65600fa90ddbb649b17ba2ca7b2edd3eb65039056317a9890a8b1708e020539b | mbutterick/beautiful-racket | parse-only.rkt | #lang br/quicklang
(require "parser.rkt" "tokenizer.rkt")
(define (read-syntax path port)
(define parse-tree (parse path (make-tokenizer port path)))
(strip-bindings
#`(module basic-parser-mod basic-demo-3/parse-only
#,parse-tree)))
(module+ reader (provide read-syntax))
(define-macro (parser-only-mb PA... | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/basic-demo-3/parse-only.rkt | racket | #lang br/quicklang
(require "parser.rkt" "tokenizer.rkt")
(define (read-syntax path port)
(define parse-tree (parse path (make-tokenizer port path)))
(strip-bindings
#`(module basic-parser-mod basic-demo-3/parse-only
#,parse-tree)))
(module+ reader (provide read-syntax))
(define-macro (parser-only-mb PA... | |
b2936e9eefb51564365c3d160d509e680159f06309f08cff98a5b1e290827d66 | danneu/klobbdown | project.clj | (defproject klobbdown "0.1.0-SNAPSHOT"
:description "a Clojure Markdown implementation expressed with a context-free grammar"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[hiccup "1.0.3"]
[instaparse... | null | https://raw.githubusercontent.com/danneu/klobbdown/962f17a9ca36c08a0e37bcb935345b7122c46362/project.clj | clojure | (defproject klobbdown "0.1.0-SNAPSHOT"
:description "a Clojure Markdown implementation expressed with a context-free grammar"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[hiccup "1.0.3"]
[instaparse... | |
af8c70725240575f57a12a4e0580c1da8d6f8f879b5883fa024da499db5a8645 | flipstone/orville | TableDefinition.hs | module Test.Expr.TableDefinition
( tableDefinitionTests,
)
where
import qualified Control.Monad.IO.Class as MIO
import Data.List.NonEmpty (NonEmpty ((:|)))
import qualified Data.Pool as Pool
import qualified Orville.PostgreSQL as Orville
import qualified Orville.PostgreSQL.Connection as Conn
import qualified Orvi... | null | https://raw.githubusercontent.com/flipstone/orville/a018288c5d3fe8c567b156b980d9f8aab2d06b28/orville-postgresql-libpq/test/Test/Expr/TableDefinition.hs | haskell | module Test.Expr.TableDefinition
( tableDefinitionTests,
)
where
import qualified Control.Monad.IO.Class as MIO
import Data.List.NonEmpty (NonEmpty ((:|)))
import qualified Data.Pool as Pool
import qualified Orville.PostgreSQL as Orville
import qualified Orville.PostgreSQL.Connection as Conn
import qualified Orvi... | |
e8ab8841338bcc591df6c9fd2e2ad81517850e86690ad2e6c4db6eccbede8c72 | Bogdanp/koyo | app.rkt | #lang racket/base
(require koyo
koyo/database/migrator
racket/contract
racket/list
threading
web-server/dispatch
(prefix-in sequencer: web-server/dispatchers/dispatch-sequencer)
web-server/managers/lru
web-server/servlet-dispatch
"../page... | null | https://raw.githubusercontent.com/Bogdanp/koyo/830af934756d1605aa3ebbf22622d082cb7b8758/koyo-lib/blueprints/standard/app-name-here/components/app.rkt | racket | #lang racket/base
(require koyo
koyo/database/migrator
racket/contract
racket/list
threading
web-server/dispatch
(prefix-in sequencer: web-server/dispatchers/dispatch-sequencer)
web-server/managers/lru
web-server/servlet-dispatch
"../page... | |
b2952a550616c129c1a47d75becb69c40ac4e8c93584553f566b0c672e45927d | ocaml/dune | encoder.ml | open Stdune
open T
type nonrec 'a t = 'a -> t
let unit () = List []
let char c = atom_or_quoted_string (String.make 1 c)
let string = atom_or_quoted_string
let int n = Atom (Atom.of_int n)
let float f = Atom (Atom.of_float f)
let bool b = Atom (Atom.of_bool b)
let pair fa fb (a, b) = List [ fa a; fb b ]
let tr... | null | https://raw.githubusercontent.com/ocaml/dune/fb085c087e330dc8c4a1909d5493170817369cca/src/dune_sexp/encoder.ml | ocaml | open Stdune
open T
type nonrec 'a t = 'a -> t
let unit () = List []
let char c = atom_or_quoted_string (String.make 1 c)
let string = atom_or_quoted_string
let int n = Atom (Atom.of_int n)
let float f = Atom (Atom.of_float f)
let bool b = Atom (Atom.of_bool b)
let pair fa fb (a, b) = List [ fa a; fb b ]
let tr... | |
88b681db1e3fa83e4d00fa2de554a4c57ad337a51fb6b596482a1c86833ca110 | bracevac/corrl | File.hs | -----------------------------------------------------------------------------
Copyright 2012 Microsoft Corporation .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the roo... | null | https://raw.githubusercontent.com/bracevac/corrl/416cd107087ac070a6bcabf8e7937211b6f415bb/koka/src/Common/File.hs | haskell | ---------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
---------------------------------------------------------------------------
Internal errors and assertions.
------------------------------------------------------... | Copyright 2012 Microsoft Corporation .
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the root of this distribution .
module Common.File(
getEnvPaths, getEnvVar
, searchPaths, searchPathsEx
, run... |
f3addb5aa2e122797e63f4c08cabff261a4a08e67210c7c797a8cce9495da553 | cedlemo/OCaml-GI-ctypes-bindings-generator | DBus_message_flags.mli | open Ctypes
type t = None | No_reply_expected | No_auto_start | Allow_interactive_authorization
type t_list = t list
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val list_of_value:
Unsigned.uint32 -> t_list
val list_to_value:
t_list -> Unsigned.uint32
val t_list_view : t_list typ
... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gio/DBus_message_flags.mli | ocaml | open Ctypes
type t = None | No_reply_expected | No_auto_start | Allow_interactive_authorization
type t_list = t list
val of_value:
Unsigned.uint32 -> t
val to_value:
t -> Unsigned.uint32
val list_of_value:
Unsigned.uint32 -> t_list
val list_to_value:
t_list -> Unsigned.uint32
val t_list_view : t_list typ
... | |
ff6ff6aa86476b5c64c890e7d3ca9e17bb930e06473c6d693e996b6f73636e9b | nwforrer/cl-rltut | game-map.lisp | (in-package #:cl-rltut)
(defclass tile ()
((blocked :initarg :blocked
:accessor tile/blocked
:initform nil)
(block-sight :initarg :block-sight
:accessor tile/block-sight
:initform nil)
(visible :initarg :visible
:accessor tile/visible
... | null | https://raw.githubusercontent.com/nwforrer/cl-rltut/62dd68dd24b5403bad1b5f681defd31a04e3edb6/game-map.lisp | lisp | (in-package #:cl-rltut)
(defclass tile ()
((blocked :initarg :blocked
:accessor tile/blocked
:initform nil)
(block-sight :initarg :block-sight
:accessor tile/block-sight
:initform nil)
(visible :initarg :visible
:accessor tile/visible
... | |
5571c70b86d5adbd591cb5780128103af4fb8806441add6b373979e10a4d4114 | Clozure/ccl-tests | logandc1.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Sep 8 21:47:22 2003
Contains : Tests of
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
;;; Error tests
(deftest logandc1.error.1
(check-type-error #'(lambda (x) (logandc1 x 0)) #'integerp)
nil)
(deftest logandc1.error.2
(check-type-er... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/logandc1.lsp | lisp | -*- Mode: Lisp -*-
Error tests
Non-error tests | Author :
Created : Mon Sep 8 21:47:22 2003
Contains : Tests of
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(deftest logandc1.error.1
(check-type-error #'(lambda (x) (logandc1 x 0)) #'integerp)
nil)
(deftest logandc1.error.2
(check-type-error #'(lambda (x) (logandc1 0 x)) #'inte... |
dcbd23e9eb99d510e0dd1240605644d558efdf67b8073c4480e1d4cb545e7278 | Yvee1/hascard | Info.hs | module UI.Info (State, drawUI, handleEvent, theMap) where
import Brick
import Brick.Widgets.Border
import Brick.Widgets.Border.Style
import Brick.Widgets.Center
import States
import StateManagement
import qualified Graphics.Vty as V
drawUI :: IS -> [Widget Name]
drawUI = (:[]) . const ui
ui :: Widget Name
ui =
joi... | null | https://raw.githubusercontent.com/Yvee1/hascard/4ddeb44d6f85cd52e87f16e919b6f20c64e24e3b/src/UI/Info.hs | haskell | module UI.Info (State, drawUI, handleEvent, theMap) where
import Brick
import Brick.Widgets.Border
import Brick.Widgets.Border.Style
import Brick.Widgets.Center
import States
import StateManagement
import qualified Graphics.Vty as V
drawUI :: IS -> [Widget Name]
drawUI = (:[]) . const ui
ui :: Widget Name
ui =
joi... | |
f50bde5975512f1266731591cb9d1e5deebaba03effd8fea4256baa6b32b96c7 | jiangpengnju/htdp2e | ex80.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex80) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/fixed-size-data/adding-structure/ex80.rkt | racket | about the language level of this file in a form that our tools can easily process.
Create templates for functions that consume instances of the following structure
types: | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex80) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(define-struct movie [title director year])
(define (f1 m)
(...... |
1afb6a8229241caeffdb1bb06a44e7a4edc11bd4619f3078809b165402d4f958 | mcorbin/riemann-discovery | file.clj | (ns riemann-discovery.file
(:require [clojure.edn :as edn]
[riemann-discovery.config :as config])
(:import java.io.File))
(defn get-extension
"takes a file path and returns the file extension"
[filename]
(let [index (.lastIndexOf filename ".")]
(when (>= index 0)
(.substring filename (i... | null | https://raw.githubusercontent.com/mcorbin/riemann-discovery/c9f68ed4c90e12526c511e459261f2c408ddc234/src/riemann_discovery/file.clj | clojure | tags [\"foo\"] | (ns riemann-discovery.file
(:require [clojure.edn :as edn]
[riemann-discovery.config :as config])
(:import java.io.File))
(defn get-extension
"takes a file path and returns the file extension"
[filename]
(let [index (.lastIndexOf filename ".")]
(when (>= index 0)
(.substring filename (i... |
e8178ce116233085ad012046c77c7d30c86099821f8e4b13039504ae144d6a5b | solita/mnt-teet | system_queries.clj | (ns teet.system.system-queries
(:require [teet.db-api.core :as db-api :refer [defquery]]
[teet.util.build-info :as build-info]
[teet.environment :as environment]
[datomic.client.api :as d]))
(defn db-state-response [_db-result]
(with-meta
{:status 200
:body (build-info/... | null | https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/backend/src/clj/teet/system/system_queries.clj | clojure | The actual query here is irrelevant. This provides an endpoint for
checking whether the db is alive. | (ns teet.system.system-queries
(:require [teet.db-api.core :as db-api :refer [defquery]]
[teet.util.build-info :as build-info]
[teet.environment :as environment]
[datomic.client.api :as d]))
(defn db-state-response [_db-result]
(with-meta
{:status 200
:body (build-info/... |
9c509f8e07f3179cdc64ea49c90abb25fc69bb431c87e1fe5096301334669b88 | haroldcarr/learn-haskell-coq-ml-etc | HDPSpec.hs | module HDPSpec where
import Ch00_Tests
import Ch06_01_generics_sum_of_products
import Ch06_02_generics_origami_recursion_schemes_fix
import Ch06_03_generics_scrap_your_boilerplate
import Test.Hspec
spec :: Spec
spec = do
_ <- runIO main
describe "HDP" $ do
ch0... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/book/2015-Haskell_Design_Patterns/test/HDPSpec.hs | haskell | module HDPSpec where
import Ch00_Tests
import Ch06_01_generics_sum_of_products
import Ch06_02_generics_origami_recursion_schemes_fix
import Ch06_03_generics_scrap_your_boilerplate
import Test.Hspec
spec :: Spec
spec = do
_ <- runIO main
describe "HDP" $ do
ch0... | |
e29b61a069a6181b787547a896f0af9db4f2eb1eb2c5f4259cac6a1498a06095 | Axect/HNumeric | CSV.hs | |
Module : HNum . CSV
Description : Simple CSV Library for HNumeric
CopyRight : ( c ) , 2018
License : :
Stability : Experimental
Module : HNum.CSV
Description : Simple CSV Library for HNumeric
CopyRight : (c) Tae Geun Kim, 2018
License : BSD3
Maintainer :
Stability ... | null | https://raw.githubusercontent.com/Axect/HNumeric/95e5b55d8ee54f991547f5587f867d84e520f26c/src/HNum/CSV.hs | haskell | ---------------------------------------------
Declaration
---------------------------------------------
| Type Aliases for convenience
| DataFrame structure to write csv
^ Row Based
| dataframe constructor
| dataframe from vectors
| Extract Vector in DataFrame
---------------------------------------------
Write... | |
Module : HNum . CSV
Description : Simple CSV Library for HNumeric
CopyRight : ( c ) , 2018
License : :
Stability : Experimental
Module : HNum.CSV
Description : Simple CSV Library for HNumeric
CopyRight : (c) Tae Geun Kim, 2018
License : BSD3
Maintainer :
Stability ... |
b545ddbcc51734c8dfb6b081e3a621e19032f5199bbe11c7e554ed3f39cced6e | GaloisInc/macaw | Symbolic.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeInType #-}
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orpha... | null | https://raw.githubusercontent.com/GaloisInc/macaw/659cfff6c95f9a85742826e90e47635c577f6160/macaw-aarch32-symbolic/src/Data/Macaw/AArch32/Symbolic.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE TypeInType #
| All of the registers tracked in the AArch32 machine code model
Note that this set is significantly larger than the user-visible
semantics
See Note [ARM Registers]
condition evaluates to true during symbolic execution) and the False label
(to fall through to otherwis... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Data.Macaw.AArch32.Symbolic (
aarch32... |
f09817d77e64aa3623d719d5ef4500422a5e8658c1b148abee89d457104ab56e | shayan-najd/NativeMetaprogramming | T11698.hs | # LANGUAGE MonoLocalBinds #
module T11698 where
f x = (k 'v', k True)
where
h = const True x
k z = const h (k z) -- k type should not be generalized because h is closed.
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/T11698.hs | haskell | k type should not be generalized because h is closed. | # LANGUAGE MonoLocalBinds #
module T11698 where
f x = (k 'v', k True)
where
h = const True x
|
e5ed8e40311386dd1740975d5b5b0cc2377b12b927258ba2493b7f79ef6abe96 | AccelerateHS/accelerate | Table.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE BangPatterns #
# LANGUAGE CPP #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE MagicHash ... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/5d32f1710e39f8aa7596f6beffebd2e8369cc36d/src/Data/Array/Accelerate/Array/Remote/Table.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE MagicHash #
# LANGUAGE OverloadedStrings #
# LANGUAGE PatternGuards #
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators #
# OPTIONS_HADDOCK hide #
|
Module ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE BangPatterns #
# LANGUAGE CPP #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE UnboxedTuples ... |
02e62718339888292e048ad813d161e0a446ae746176834eb22b96163ef72de0 | nibbula/lish | horrible.lisp | ;;;
;;; horrible.lisp - Things are in here so you don't have look at them.
;;;
(defun msg (fmt &rest args)
(when *build-verbose*
(format t "~&~?~%" fmt args)
(finish-output)))
(defun sf-getenv (s)
#+clisp (ext:getenv s)
#+sbcl (sb-ext:posix-getenv s)
#+openmcl (ccl::getenv s)
#+cmu (let ((v (assoc (... | null | https://raw.githubusercontent.com/nibbula/lish/3711f1b5db899c643277a6d36d10cf65769170bd/build/horrible.lisp | lisp |
horrible.lisp - Things are in here so you don't have look at them.
@@@ maybe we could get this added to cormanlisp?
But not necessarily the operating system.
&key all-p |
(defun msg (fmt &rest args)
(when *build-verbose*
(format t "~&~?~%" fmt args)
(finish-output)))
(defun sf-getenv (s)
#+clisp (ext:getenv s)
#+sbcl (sb-ext:posix-getenv s)
#+openmcl (ccl::getenv s)
#+cmu (let ((v (assoc (intern (string-upcase s) :keyword)
ext:*environment-list*)))
(if v (cdr v... |
ee876005dad6ef2ab7d04cab718f6fdde6710c89c6e252229af61ccda53b9dc3 | day8/re-frame-10x | trace.cljs | (ns day8.re-frame-10x.fx.trace
(:require
[re-frame.trace]
[day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.core :as rf]
[day8.re-frame-10x.navigation.epochs.events :as epochs.events]))
(defn enable!
[{:keys [key]}]
(re-frame.trace/register-trace-cb key
#(rf/dispatch [::e... | null | https://raw.githubusercontent.com/day8/re-frame-10x/dad02ff85793119f6ccfeeb9df328cfe91ec6354/src/day8/re_frame_10x/fx/trace.cljs | clojure | (ns day8.re-frame-10x.fx.trace
(:require
[re-frame.trace]
[day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.core :as rf]
[day8.re-frame-10x.navigation.epochs.events :as epochs.events]))
(defn enable!
[{:keys [key]}]
(re-frame.trace/register-trace-cb key
#(rf/dispatch [::e... | |
a5a77fdab648fd8928ddbed75743e34bd10c8203db9181bad533fe1c062bf539 | labra/Haws | shacl.hs | -- Semantics of Shacl
Axiomatic semantics of SHACL
This paper follows the Shapes vocabulary defined by RDF Data Shapes group SHACL proposal
Author :
module Shacl where
import RDF
import Typing
import Sets
import Data.Set (Set)
import qualified Data.Set as Set
import RDFUtils
data Schema = Schema (Set (Label,... | null | https://raw.githubusercontent.com/labra/Haws/2417adc37522994e2bbb8e9e397481a1f6f4f038/papers/shacl.hs | haskell | Semantics of Shacl
Shape Expressions
A set of objects
A value with a shape identified by Label
A lang literal with some language tag
From m = m | m + 1 | ...
Between m and n
Checked triples
Remaining triples
Resulting typing
Match Shape
validateArcFrom
validateArcRange
TODO: Check which is the datatyp... | Axiomatic semantics of SHACL
This paper follows the Shapes vocabulary defined by RDF Data Shapes group SHACL proposal
Author :
module Shacl where
import RDF
import Typing
import Sets
import Data.Set (Set)
import qualified Data.Set as Set
import RDFUtils
data Schema = Schema (Set (Label,Shape))
instance Show... |
da5c94e229352e85bfc6cba2c02091970acab231eb149715d1f81e071f324e02 | hipsleek/hipsleek | inliner.ml |
*
* Copyright ( c ) 2007 ,
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must retain the abov... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/ext/inliner.ml | ocaml | * This module provides inlining functions. You can run it from the cilly
* command line by passing the names of the functions to inline:
*
* cilly --save-temps --inline=toinline module.c
*
* This module has not been tested extensively, so you should run it with
* the --check argument to ensure that i... |
*
* Copyright ( c ) 2007 ,
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must retain the abov... |
4a979c4665163e51b153aab9d8663e36073cd069eeff41bad6e4eb43060fa51d | adamdoupe/find_ear_rails | unify.ml |
type 'a t = TypeVar of 'a * 'a t option ref
let create t = TypeVar(t,ref None)
let current t = match t with TypeVar(c,_) -> c
let rec ecr t = match t with TypeVar(r,opt) ->
match !opt with
| None -> t
| Some t2 ->
let root = ecr t2 (* path compression *)
in opt := Some root;root
... | null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/src/typing/unify.ml | ocaml | path compression
point t1 to t2
leaf -> root fold of the tree |
type 'a t = TypeVar of 'a * 'a t option ref
let create t = TypeVar(t,ref None)
let current t = match t with TypeVar(c,_) -> c
let rec ecr t = match t with TypeVar(r,opt) ->
match !opt with
| None -> t
| Some t2 ->
in opt := Some root;root
let value t = current (ecr t)
let uni... |
52160bf87bc4d3063088de2204534b1f9070dd64c244defa9127d82d5f7230c3 | ocaml-doc/doc-ock | docOckComponents.ml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/ocaml-doc/doc-ock/788aabe6e3d157633890f67042d6a4d0161835a7/src/docOckComponents.ml | ocaml | Sets and maps for components
Tables for caches
Read labels from documentation |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
844f928241bfe673fe33ea9a788fe2bb29ad856fd75e934d9031bcc21d6aea35 | philnguyen/soft-contract | graphs.rkt | #lang racket/base
(require soft-contract/fake-contract)
Modified 2 March 1997 by to add graphs - benchmark
and to expand the four macros below .
Modified 11 June 1997 by to eliminate assertions
; and to replace a use of "recur" with a named let.
Modified 4 May 2010 by to get rid of one - armed ifs
;
... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/safe/termination/r5rs-ish/graphs.rkt | racket | and to replace a use of "recur" with a named let.
End of new code.
==== std.ss ====
(define-syntax assert
(syntax-rules ()
((assert test info-rest ...)
#f)))
(define-syntax deny
(syntax-rules ()
((deny test info-rest ...)
#f)))
(define-syntax when
(syntax-rules ()
(if tes... | #lang racket/base
(require soft-contract/fake-contract)
Modified 2 March 1997 by to add graphs - benchmark
and to expand the four macros below .
Modified 11 June 1997 by to eliminate assertions
Modified 4 May 2010 by to get rid of one - armed ifs
Performance note : ( graphs - benchmark 7 ) allocates... |
f5498c7f54786990167213ed59a0405d98ba54d7b0b70b2b180e234643022ae1 | skanev/playground | 24.scm | SICP exercise 3.24
;
; In the table implementations above, the keys are tested for equality using
; equal? (called by assoc). This is not always the appropriate test. For
; instance, we might have a table with numeric keys in which we don't need an
; exact match to the number we're looking up, but only a number withi... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/24.scm | scheme |
In the table implementations above, the keys are tested for equality using
equal? (called by assoc). This is not always the appropriate test. For
instance, we might have a table with numeric keys in which we don't need an
exact match to the number we're looking up, but only a number within some
tolerance of it. D... | SICP exercise 3.24
(require r5rs/init)
(define (make-table same-key?)
(let ((table '(*table*)))
(define (find-pair key)
(define (search remaining)
(cond ((null? remaining) #f)
((same-key? key (caar remaining)) (car remaining))
(else (search (cdr remaining)))))
... |
a9453c9cd96187a10e3e9e5456df707dffb3298c20cd1631db77d684b39c9ac8 | maximedenes/native-coq | validate.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/checker/validate.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This module defines validation func... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
let rec pr_obj_rec o =
if ... |
d5b22d0f53d2b3032cddd080223d4ab275f6ef7b569556ad282e524e8ee0ac41 | aphyr/gifdex | project.clj | (defproject gifdex.core "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.3"]
[aleph "0.4.6"]
[ring "1.9.5"]
... | null | https://raw.githubusercontent.com/aphyr/gifdex/ee7b1ca2db2c9a0035455b7cf04c84eae9f2e727/project.clj | clojure | For etags | (defproject gifdex.core "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url "-2.0/"}
:dependencies [[org.clojure/clojure "1.10.3"]
[aleph "0.4.6"]
[ring "1.9.5"]
... |
a8f23805aac23a2e636839a431406a767814119d9a1440cb6e7d3d2335da0eda | samrushing/irken-compiler | t1.scm | #\A
| null | https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/vm/tests/t1.scm | scheme | #\A
| |
26636cca0844f8945d1b1575fe36c48e8d798e15c627b42a86367970f977b5de | ddssff/refact-global-hse | M1.hs | -- Test moving s2 to a place that imports it
module M1
( s1
#if MIN_VERSION_base(4,8,0)
, s2
#endif
) where
s1 :: Int
s1 = 1
#if MIN_VERSION_base(4,8,0)
s2 :: Int
s2 = s1 + 1
#endif
| null | https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/tests/input/simple5/M1.hs | haskell | Test moving s2 to a place that imports it | module M1
( s1
#if MIN_VERSION_base(4,8,0)
, s2
#endif
) where
s1 :: Int
s1 = 1
#if MIN_VERSION_base(4,8,0)
s2 :: Int
s2 = s1 + 1
#endif
|
9d30e3c3de8f35af24c7d4264f4f6b168236504d6f76c54ab2fa79cc66930fd4 | EveryTian/Haskell-Codewars | Tests.hs | # LANGUAGE RecordWildCards #
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Diamond (diamond)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
specs = describe "... | null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/exercism/diamond/test/Tests.hs | haskell | # LANGUAGE RecordWildCards #
import Data.Foldable (for_)
import Test.Hspec (Spec, describe, it, shouldBe)
import Test.Hspec.Runner (configFastFail, defaultConfig, hspecWith)
import Diamond (diamond)
main :: IO ()
main = hspecWith defaultConfig {configFastFail = True} specs
specs :: Spec
specs = describe "... | |
60ebbe026a3f7534ef9a21ac983b92a208f7eeacb23c5e68414cb31f321c3d0b | NoRedInk/haskell-libraries | Set.hs | -- | A set of unique values. The values can be any comparable type. This
includes @Int@ , , @Time@ , @Char@ , @String@ , and tuples or lists
-- of comparable types.
--
Insert , remove , and query operations all take /O(log n)/ time .
module Set
( -- * Sets
Set,
-- * Build
empty,
singleton,
i... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/7af1e05549e09d519b08ab49dff956b5a97d4f7e/nri-prelude/src/Set.hs | haskell | | A set of unique values. The values can be any comparable type. This
of comparable types.
* Sets
* Build
* Query
* Combine
* Lists
* Transform
@(Set String)@ is a set of strings.
| Create an empty set.
| Insert a value into a set.
| Remove a value from a set. If the value is not found, no changes are made... | includes @Int@ , , @Time@ , @Char@ , @String@ , and tuples or lists
Insert , remove , and query operations all take /O(log n)/ time .
module Set
Set,
empty,
singleton,
insert,
remove,
isEmpty,
member,
size,
union,
intersect,
diff,
toList,
fromList,
map,
... |
8069d06c633721fb36c4aa0d7be0dc80976885d98e889e5576667fd332b63345 | diagrams/SVGFonts | CharReference.hs | module Graphics.SVGFonts.CharReference (charsFromFullName, characterStrings) where
import Control.Applicative ((<|>), many)
import Data.Attoparsec.Text
import qualified Data.Text as T
import Data.List (sortBy)
charRef :: Parser Int
charRef
= do
_ <- try (string (T.pack "&#x"))
d <- hexadecima... | null | https://raw.githubusercontent.com/diagrams/SVGFonts/66fa56c5a80f1aaaddf5c3e938ee844f90b60b9d/src/Graphics/SVGFonts/CharReference.hs | haskell | | Parsing of xml character references.
will never be called, just to get rid of the warning message
or accept a single char
| module Graphics.SVGFonts.CharReference (charsFromFullName, characterStrings) where
import Control.Applicative ((<|>), many)
import Data.Attoparsec.Text
import qualified Data.Text as T
import Data.List (sortBy)
charRef :: Parser Int
charRef
= do
_ <- try (string (T.pack "&#x"))
d <- hexadecima... |
06273ff40de9da4fcc4a61a811e6e2272cbe03c22abafd2f6278830ae76b1e29 | johnmn3/cljs-thread | footer.cljs | (ns dashboard.footer
(:require
[comp.el :as c]))
(defn copyright []
[c/text {:variant "body2" :color "textSecondary" :align "center" :padding 5}
[c/link {:color "inherit" :href "-thread"}
"cljs-thread dashboard "]
(.getFullYear (js/Date.))])
| null | https://raw.githubusercontent.com/johnmn3/cljs-thread/e98edc26ae71d1e17cea96a1f0e978df41b34d3f/shadow_dashboard/src/screen/dashboard/footer.cljs | clojure | (ns dashboard.footer
(:require
[comp.el :as c]))
(defn copyright []
[c/text {:variant "body2" :color "textSecondary" :align "center" :padding 5}
[c/link {:color "inherit" :href "-thread"}
"cljs-thread dashboard "]
(.getFullYear (js/Date.))])
| |
28999bb109e384b60ab2ef0a756b7d4560766c3ff8ad912a290c733d41614c58 | kyleburton/clj-etl-utils | ref_data.clj | (ns
^{:doc "Commonly used reference data, such as US state codes and area codes.
Some of the sources:
"
:author "Kyle Burton"}
clj-etl-utils.ref-data
(:require [clojure.java.io :as io]))
(def us-states
(partition 2
["AL" "ALABAMA"
"AK" "ALASKA"
... | null | https://raw.githubusercontent.com/kyleburton/clj-etl-utils/bcc927b3e05464ecac15cf33540c8a99cdd431a8/src/clj_etl_utils/ref_data.clj | clojure | from: -pages/area.html
(generate-iso-3-xsd)
(generate-iso-2-xsd) | (ns
^{:doc "Commonly used reference data, such as US state codes and area codes.
Some of the sources:
"
:author "Kyle Burton"}
clj-etl-utils.ref-data
(:require [clojure.java.io :as io]))
(def us-states
(partition 2
["AL" "ALABAMA"
"AK" "ALASKA"
... |
367530158bb669223805c1a992dab0cf325bc28aeaae9935df521974f3adc442 | RBornat/jape | lexparse.ml |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
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 ver... | null | https://raw.githubusercontent.com/RBornat/jape/d2f507023c8a227e6862f9e5a16bb16ddeda692c/distrib/camlengine/lexparse.ml | ocaml |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
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 ver... | |
55d08c7b7807431e8a31b4365f82fcd0c8cb0d7274c19910ad0e9565357e1780 | kuchma19/hi | Base.hs | # LANGUAGE BlockArguments #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
module HW3.Base where
import Codec.Serialise (Serialise)
import Control.Exception (throwIO)
import Control.Monad (filterM)
import Data.ByteString (Byte... | null | https://raw.githubusercontent.com/kuchma19/hi/7d4d06acbd73deb625c48a91de269bebe9c2a3fb/hw3/src/HW3/Base.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE BlockArguments #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
module HW3.Base where
import Codec.Serialise (Serialise)
import Control.Exception (throwIO)
import Control.Monad (filterM)
import Data.ByteString (ByteString)
import qualified Data.ByteSt... |
a248479761db5df9f142ab8038611d6d51a38597b5a7bd3977e49745a4450f45 | informatimago/lisp | rdp-basic-gen.lisp | -*- mode : lisp;coding : utf-8 -*-
;;;;**************************************************************************
FILE : rdp-basic-gen.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
;;;; A (pseudo) basic generator for the re... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/small-cl-pgms/rdp/rdp-basic-gen.lisp | lisp | coding : utf-8 -*-
**************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
A (pseudo) basic generator for the recusive descent parser generator.
LEGAL
This program is free software: you can redistribute it and/or ... | FILE : rdp-basic-gen.lisp
USER - INTERFACE :
< PJB > < >
MODIFICATIONS
2011 - 07 - 19 < PJB > Updated for new rdp .
2006 - 09 - 10 < PJB > Created .
AGPL3
Copyright 2006 - 2016
it under the terms of the GNU Affero General Public License as published by
th... |
5e7ea62a6a53318988d7f21c0c28d79c1a3f6bc931c8cd2624ce9ffbac4e9c85 | binaryage/cljs-devtools | main.cljs | (ns devtools.main
(:require [devtools.dead-code.core]))
| null | https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/test/src/dead-code-no-require/devtools/main.cljs | clojure | (ns devtools.main
(:require [devtools.dead-code.core]))
| |
a217c58d2d29914c589732b44d60574b06c712b36076d5dc98aa33a3cb702dbf | alexeispirit/AutoCAD-Utils | utils-prosteel.lsp | ;;; <LISPDOC>
< SUBR>(acad - dicts)</SUBR >
;;; <DESC>AutoCAD ActiveDocument dictionaries collection</DESC>
;;; <ARG>actdoc - AutoCAD ActiveDocument pointer</ARG>
;;; <RET>vlax Dictionaries collection</RET>
;;; </LISPDOC>
(defun acad-dicts (actdoc)
(if actdoc
(vla-get-dictionaries actdoc)))
(defun acad-dicts... | null | https://raw.githubusercontent.com/alexeispirit/AutoCAD-Utils/852ddebaa66ff4fb77be99317e6180d5b5dfcc49/utils/utils-prosteel.lsp | lisp | <LISPDOC>
<DESC>AutoCAD ActiveDocument dictionaries collection</DESC>
<ARG>actdoc - AutoCAD ActiveDocument pointer</ARG>
<RET>vlax Dictionaries collection</RET>
</LISPDOC>
<LISPDOC>
<SUBR>(prosteel-dicts)</SUBR>
<DESC>Prosteel dictionaries names</DESC>
</LISPDOC>
<LISPDOC>
<SUBR>(prosteel-check)</SUBR>
<DES... | < SUBR>(acad - dicts)</SUBR >
(defun acad-dicts (actdoc)
(if actdoc
(vla-get-dictionaries actdoc)))
(defun acad-dicts-list (dicts / lst)
(vlax-for dict
dicts
(if (vlax-property-available-p dict 'Name)
(setq lst (append (list (vlax-get dict 'Name)) lst))))
lst)
(d... |
375f3c13616acd4144780c0200abde683ff4e108e79a3e884ba0712218648a51 | tomas-abrahamsson/gpb | gpb_defs.erl | Copyright ( C ) 2019
%%%
Author : < >
%%%
%%% This library is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
%... | null | https://raw.githubusercontent.com/tomas-abrahamsson/gpb/87f2b7bd05337a331e592886ba4550f409c8a7be/src/gpb_defs.erl | erlang |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
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 the GN... | Copyright ( C ) 2019
Author : < >
License as published by the Free Software Foundation ; either
version 2.1 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 , Fifth Floor , Boston ,
MA ... |
6e8baa3f0040145d9719640f912a33df88d40d230d72e694eb93854f8f5bb2c1 | EasyCrypt/easycrypt | ecMemory.mli | (* -------------------------------------------------------------------- *)
open EcSymbols
open EcTypes
(* -------------------------------------------------------------------- *)
type memory = EcIdent.t
val mem_equal : memory -> memory -> bool
(* -------------------------------------------------------------------- *)
... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/9c03562504539621757a9bdaff2fd022bfeeff2b/src/ecMemory.mli | ocaml | --------------------------------------------------------------------
--------------------------------------------------------------------
--------------------------------------------------------------------
type of the procedure argument "arg"
projection
------------------------------------------------------... | open EcSymbols
open EcTypes
type memory = EcIdent.t
val mem_equal : memory -> memory -> bool
type proj_arg =
}
type memtype
val mt_equal_gen : (ty -> ty -> bool) -> memtype -> memtype -> bool
val mt_equal : memtype -> memtype -> bool
val mt_fv : memtype -> int EcIdent.Mid.t
val mt_iter_ty : (ty -> unit)... |
a6d3c5a0e61bb78ba091539f9ae9f69fdd80b37817890be5b628efc2530dd066 | biocaml/biocaml | biocaml_fasta.ml | open Core.Std
open Biocaml_internal_utils
module Lines = Biocaml_lines
type char_seq = string [@@deriving sexp]
type int_seq = int list [@@deriving sexp]
type 'a item =
{ header : string
; sequence : 'a
}
[@@deriving sexp]
type 'a raw_item =
[ `comment of string
| `header of string
| `partial_sequence of... | null | https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/src/tmp/biocaml_fasta.ml | ocaml | open Core.Std
open Biocaml_internal_utils
module Lines = Biocaml_lines
type char_seq = string [@@deriving sexp]
type int_seq = int list [@@deriving sexp]
type 'a item =
{ header : string
; sequence : 'a
}
[@@deriving sexp]
type 'a raw_item =
[ `comment of string
| `header of string
| `partial_sequence of... | |
1096c34a8880d5426e805507cc493356a1ee691f6422f55bff9947a5166a4662 | Fuuzetsu/yi-haskell-utils | Internal.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Yi.Mode.Haskell.Utils.Internal
Copyright : ( c ) 2013
-- License : GPL-3
--
-- Maintainer :
-- Stability : experimental
module Yi.Mode.Haskell.Utils.Internal where
import Control.Applicative ((<$>))
import... | null | https://raw.githubusercontent.com/Fuuzetsu/yi-haskell-utils/e7a7292848b6d169fa662d55be814a7b9af8cf4f/src/Yi/Mode/Haskell/Utils/Internal.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Yi.Mode.Haskell.Utils.Internal
License : GPL-3
Maintainer :
Stability : experimental
| Function name and string representing the type.
| HConstr denotes the constructor name and number of parameters.
We don't particularly care what the parameters are.
... | # LANGUAGE LambdaCase #
Copyright : ( c ) 2013
module Yi.Mode.Haskell.Utils.Internal where
import Control.Applicative ((<$>))
import Control.Monad (liftM, void)
import Data.Char (isDigit)
import Data.List
import Data.List.Split
import Data.Monoid
i... |
a3f4ff6c127cbf29ab7169c8a8f4e35a220a4c9606880a23783666455d3987a2 | 8thlight/hyperion | types.clj | (ns hyperion.gae.types
(:require [chee.coerce :refer [->int ->string ->keyword]]
[hyperion.coerce :refer [->float ->byte ->biginteger ->short ->char]]
[hyperion.api :refer [pack unpack]])
(:import [com.google.appengine.api.datastore
Key KeyFactory ShortBlob Blob Category Email Ge... | null | https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/gae/src/hyperion/gae/types.clj | clojure | (ns hyperion.gae.types
(:require [chee.coerce :refer [->int ->string ->keyword]]
[hyperion.coerce :refer [->float ->byte ->biginteger ->short ->char]]
[hyperion.api :refer [pack unpack]])
(:import [com.google.appengine.api.datastore
Key KeyFactory ShortBlob Blob Category Email Ge... | |
f748e95968c1b82041407c4cb3cd582bb0c996b7baf2d595636e9ba87b2d29d4 | smart-chain-fr/tokenomia | Value.hs | # LANGUAGE ImportQualifiedPost #
{-# LANGUAGE OverloadedStrings #-}
module Tokenomia.Common.Parser.Value
( value
) where
import Tokenomia.Common.Parser.AssetClass qualified as Parser
( assetClass )
import Data.Attoparsec.Text
( Parser
, decimal
, sepBy1
, skipSpace
)
... | null | https://raw.githubusercontent.com/smart-chain-fr/tokenomia/01a6fdc97ccd9229a3fca1a821d0054f38a60e6b/src/Tokenomia/Common/Parser/Value.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ImportQualifiedPost #
module Tokenomia.Common.Parser.Value
( value
) where
import Tokenomia.Common.Parser.AssetClass qualified as Parser
( assetClass )
import Data.Attoparsec.Text
( Parser
, decimal
, sepBy1
, skipSpace
)
import Prelude hiding ( take )
im... |
09d591571f655dc66e671ef6d8d65b35d5714716829fc1c33f0a6a2957fb4034 | xclerc/ocamljava | forkJoinPool.mli |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/concurrent/src/forkjoin/forkJoinPool.mli | ocaml | * Thread pools for fork/join computations.
* The type of thread pools to be used for fork/join computations.
* Returns the parallelism of the pool; see
{java java.util.concurrent.ForkJoinPool#getParallelism()}.
* Returns the number of threads that have started and not terminated in
the pool; see
{java ja... |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... |
df498513002b967fab08e7e7f1c85a3a04d2e75d43c5a9310a8803e402fcf1a4 | onedata/op-worker | archive_gui_gs_translator.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module handles translation of... | null | https://raw.githubusercontent.com/onedata/op-worker/055e1a2a8b89414a46a8affcb550ba984def50e7/src/graph_sync/server/gui_translators/archive_gui_gs_translator.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module handles translation of middleware results concerning
@end
-------------------------------------------------------------------
API
Util functions
===========... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
archive entities into GUI GRAPH SYNC responses .
-module(archive_gui_gs_translator).
-author("Jakub Kudzia").
-include("middleware/middleware.hrl").
-include("proto/oneprovider/provider_messages.... |
589d73224fe629894d416ea94b9bd1f32e19da366e5dc7eceb5bc06fc3e1b75a | savonet/ocaml-posix | posix_types.mli | open Ctypes
open Posix_base.Types
* POSIX types from < sys / types.h > . This module is used to build
further POSIX bindings . See { ! Posix_time2_types } for an example .
further POSIX bindings. See {!Posix_time2_types} for an example. *)
* { 2 POSIX arithmetic types }
* { 3 Base modules }
module Blkcnt ... | null | https://raw.githubusercontent.com/savonet/ocaml-posix/d46d011de16154b34324eae6ee6e7010138cf4af/posix-types/src/posix_types.mli | ocaml | * {3 Types}
* {3 Types} | open Ctypes
open Posix_base.Types
* POSIX types from < sys / types.h > . This module is used to build
further POSIX bindings . See { ! Posix_time2_types } for an example .
further POSIX bindings. See {!Posix_time2_types} for an example. *)
* { 2 POSIX arithmetic types }
* { 3 Base modules }
module Blkcnt ... |
465527d8a647e59e67fea3ac623f3c3c53d4843de37bbadf269b1f29e5f8b1b8 | rmloveland/scheme48-0.53 | gc.scm | ; -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; Collector
The interface to the GC consists of
; (S48-BEGIN-COLLECTION) ; call either this
( BEGIN - WRITING - IMAGE ) ; or this first
; (S48-TRACE-LOCATIONS! start end) ; trace all roots
;... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/vm/gc.scm | scheme | -*- Mode: Scheme; Syntax: Scheme; Package: Scheme; -*-
Collector
(S48-BEGIN-COLLECTION) ; call either this
or this first
(S48-TRACE-LOCATIONS! start end) ; trace all roots
(S48-TRACE-VALUE value) => copied value
(S48-TRACE-STOB-CONTENTS! stob)
then do the GC
(S48-END-COLLECTION) ; and either finish
(ABORT-... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
The interface to the GC consists of
(define *gc-count* 0)
(define (s48-gc-count) *gc-count*)
True if the GC is being done for the purpose of dumping an image , in which
(define *writing-image?*)
(define *undumpable-records*)
(define *undumpable-coun... |
c158470b6eaaef0e029328ac82c642b093a3765fc0ab7a021ee16ce2a925c908 | mlang/chessIO | pgnio.hs | module Main where
import Game.Chess.PGN
import System.Environment
import System.Exit
import System.IO
main :: IO ()
main = getArgs >>= readPGNFiles >>= \case
Right pgn -> do
hPutPGN stdout breadthFirst pgn
exitSuccess
Left err -> do
hPutStr stderr err
exitWith $ ExitFailure 1
readPGNFiles :: [Fil... | null | https://raw.githubusercontent.com/mlang/chessIO/3cefdcce46fa9cd485376ca60d987f42860f80db/examples/pgnio.hs | haskell | module Main where
import Game.Chess.PGN
import System.Environment
import System.Exit
import System.IO
main :: IO ()
main = getArgs >>= readPGNFiles >>= \case
Right pgn -> do
hPutPGN stdout breadthFirst pgn
exitSuccess
Left err -> do
hPutStr stderr err
exitWith $ ExitFailure 1
readPGNFiles :: [Fil... | |
5c5e04a40f10810d753e2fa17faa2a8fc4d0646b29f6bf73fbacd1ad036e8a15 | herbelin/coq-hh | conv_oracle.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/kernel/conv_oracle.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
expand k2
summary operations | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Created by as part of the... |
ce364bc37290630a08df69f59b36eeb5f8ef342e8d0808399cc40ed7bd299407 | tel/saltine | Auth.hs | # LANGUAGE DeriveDataTypeable , , DeriveGeneric , ForeignFunctionInterface #
-- |
-- Module : Crypto.Saltine.Internal.Auth
Copyright : ( c ) 2021
License : MIT
--
-- Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
module Crypto.Saltine.Internal.Auth (
auth_bytes
,... | null | https://raw.githubusercontent.com/tel/saltine/531997fb4b884bbc15eda56cca88d0f207c4329e/src/Crypto/Saltine/Internal/Auth.hs | haskell | |
Module : Crypto.Saltine.Internal.Auth
Maintainer :
Stability : experimental
Portability : non-portable
| An opaque 'auth' cryptographic key.
| An opaque 'auth' authenticator.
Authentication
| Size of a @crypto_auth@ authenticator.
| Size of a @crypto_auth@ authenticator key.
^ Authenticator outp... | # LANGUAGE DeriveDataTypeable , , DeriveGeneric , ForeignFunctionInterface #
Copyright : ( c ) 2021
License : MIT
module Crypto.Saltine.Internal.Auth (
auth_bytes
, auth_keybytes
, c_auth
, c_auth_verify
, Key(..)
, Authenticator(..)
) where
import Control.DeepSeq
import Crypto.Saltine.Cl... |
6e46956eae5d467cb2e85e6a15136e4b3bc7cca82c186cb74c177311143ad925 | cognitect/clojure-lab | start.clj | gorilla-repl.fileformat = 1
;; **
# Welcome to Clojure !
;;;
;;;
;; **
;; **
;;; ## How does this work?
;;;
You are currently reading a page hosted by [ Gorilla REPL]( - repl.org/ ) . A " REPL " is the * * Read - Eval - Print - Loop**--the beating heart inside any LISP . The Gorilla REPL creates interactive ... | null | https://raw.githubusercontent.com/cognitect/clojure-lab/f32947e75c999310a84bf0650c22beea18271a94/src/cljlab/start.clj | clojure | **
**
**
## How does this work?
As you follow along in this course, you can
* Evaluate any code block with Shift-Enter, or
* Save any page with Ctrl-G Ctrl-S.
For the full set of commands, type Ctrl-G Ctrl-G, or use the drop-down menu in the upper-right corner.
Because this page is editable, it ... | gorilla-repl.fileformat = 1
# Welcome to Clojure !
You are currently reading a page hosted by [ Gorilla REPL]( - repl.org/ ) . A " REPL " is the * * Read - Eval - Print - Loop**--the beating heart inside any LISP . The Gorilla REPL creates interactive web pages that are a mix of text ( in ) and code ( live REP... |
fb851a612cc64a1401da91ce665353fe73ee36c27f3d41129fee907318f27891 | SamB/coq | declaremods.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/library/declaremods.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i $Id$ i
i
i
s This modules provides... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Names
open ... |
cf8b1e2cbed484f970a2b7814ce5913c1a5cea2d001f917fb3ab13be95a658ec | deadpendency/deadpendency | DependencyRepoStats.hs | module Common.Model.Dependency.Repo.DependencyRepoStats
( DependencyRepoStats (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Dependency.Repo.DependencyRepoCommit
import Data.Aeson
import Data.Vector qualified as V
data DependencyRepoStats = DependencyRepoStats
{ _twoYearlyCommitHistory :: V.Vector ... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/Dependency/Repo/DependencyRepoStats.hs | haskell | module Common.Model.Dependency.Repo.DependencyRepoStats
( DependencyRepoStats (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Dependency.Repo.DependencyRepoCommit
import Data.Aeson
import Data.Vector qualified as V
data DependencyRepoStats = DependencyRepoStats
{ _twoYearlyCommitHistory :: V.Vector ... | |
5a53c91ceaead2417092101c8e70abbe6f0f38fb48b53ad7b5ef7faf926edd0c | tonyg/racket-ansi | ansi.rkt | #lang racket/base
ANSI / VT10x escape sequences .
;;
;; Based initially on ,
;; but it doesn't have very many definitions; this page, however, is
;; comprehensive and excellent:
;; -escapes/all-escapes.txt
;;
;; See also
(provide (except-out (all-defined-out)
CSI
ST
OSC
format-parameter
... | null | https://raw.githubusercontent.com/tonyg/racket-ansi/c14081de59bc7273f1f9088a51d6d9c202b2b9d0/ansi/ansi.rkt | racket |
Based initially on ,
but it doesn't have very many definitions; this page, however, is
comprehensive and excellent:
-escapes/all-escapes.txt
See also
Basic ANSI sequences
See dec-device-attributes-response below.
direction along character path.
xterm sequences
Parameters for select-graphic-rendition... | #lang racket/base
ANSI / VT10x escape sequences .
(provide (except-out (all-defined-out)
CSI
ST
OSC
format-parameter
define-variable-arity-escape-sequence
define-escape-sequence))
(define CSI "\033[")
(define ST "\033\\")
(define OSC "\033]")
(define (format-parameter v)
... |
f97ed692d6dbf5e23bf7b10bd0c4cbaaf204a1f6ae1415244177c82acefb5ab0 | oofp/Beseder | TypeHelper.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE TypeOperators ... | null | https://raw.githubusercontent.com/oofp/Beseder/a0f5c5e3138938b6fa18811d646535ee6df1a4f4/src/Beseder/Utils/TypeHelper.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE KindSignatures #
# LANGUAGE TypeOperators # | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeApplications #
# LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
module Beseder.Utils.TypeHelper
( typeName
, ListNames (..)
) where
import Protolude hiding (TypeError)
typeName :: forall a. Typeable a => ... |
46e2f84e9ced198d04500be0b49f97adc5226fed5e4240d36eebedda5ee016d0 | jrm-code-project/LISP-Machine | nprim.lisp | -*- Mode : LISP ; Package : ZWEI ; ; : CL -*-
;The new undo system. Written by RMS. Feel free to use it,
;provided you make all improvements and changes public.
An UNDO - ITEM object records one change , for undoing it .
; Its components are:
; UNDO-ITEM-TYPE - a string starting with a capital letter
; describ... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/zwei/nprim.lisp | lisp | Package : ZWEI ; ; : CL -*-
The new undo system. Written by RMS. Feel free to use it,
provided you make all improvements and changes public.
Its components are:
UNDO-ITEM-TYPE - a string starting with a capital letter
describing the kind of operation that made the changes. For example, "Yank".
UNDO-ITEM-STAR... |
An UNDO - ITEM object records one change , for undoing it .
There is one element for each BP recorded , and it is a list of length 3 .
The car is the BP it records . The cadr is the line - number inside the interval
that the BP used to point at . The caddr is the index within its line of the BP .
Ea... |
c12ae9d115ba45fc1655f2a5a24c56823f7a588be7da82574d22a947c8afc034 | ucsd-progsys/dsolve | mymappos.ml | (* functions *)
let g x = x + 1
let m0 = g
let m1 = Mymap.set m0 2 3
let m2 = Mymap.set m1 3 4
let rec store n m =
if n = 100 then m else
let m' = Mymap.set m n (n+1) in
store (n+1) m'
let mn = store 1 g
let rec retr n m =
if n = 99 then () else
let n' = Mymap.get m n in
let _ = assert (n' > n) in
... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/postests/mymappos.ml | ocaml | functions
constructed types |
let g x = x + 1
let m0 = g
let m1 = Mymap.set m0 2 3
let m2 = Mymap.set m1 3 4
let rec store n m =
if n = 100 then m else
let m' = Mymap.set m n (n+1) in
store (n+1) m'
let mn = store 1 g
let rec retr n m =
if n = 99 then () else
let n' = Mymap.get m n in
let _ = assert (n' > n) in
retr (n+1) m... |
64be48174ba1468875e5ea242f0d3205395805cdc82d387a56fca496026f2972 | fxfactorial/ocaml-corecount | corecount.ml | (** Get a count of cores on the current machine, simple exposure of
*)
(** Raised when the value is not well defined or not computable*)
exception Count_not_defined
let () =
Callback.register_exception
"count_not_defined_exn"
Count_not_defined
(** Returns the number of cores on the current machine*)
e... | null | https://raw.githubusercontent.com/fxfactorial/ocaml-corecount/58630ab8bfd4a79e42cee5c8795bcbdf0af7c6bc/src/corecount.ml | ocaml | * Get a count of cores on the current machine, simple exposure of
* Raised when the value is not well defined or not computable
* Returns the number of cores on the current machine |
exception Count_not_defined
let () =
Callback.register_exception
"count_not_defined_exn"
Count_not_defined
external count : unit -> Nativeint.t = "core_count_ml"
|
4142cbdaf84770e68be935c4ccf361bade7dae5f5dc266736440d0eb4d02b616 | slagyr/joodo | request_spec.clj | (ns joodo.middleware.request-spec
(:use
[speclj.core]
[joodo.middleware.request]))
(describe "Request Middleware"
(with handled-request (atom nil))
(with mock-handler
(fn [request]
(reset! @handled-request *request*)
{}))
(with wrapper (wrap-bind-request @mock-handler))
(it "binds *... | null | https://raw.githubusercontent.com/slagyr/joodo/e7edbc707a7901d1a1c5465382dd25db368f4596/joodo/spec/joodo/middleware/request_spec.clj | clojure | (ns joodo.middleware.request-spec
(:use
[speclj.core]
[joodo.middleware.request]))
(describe "Request Middleware"
(with handled-request (atom nil))
(with mock-handler
(fn [request]
(reset! @handled-request *request*)
{}))
(with wrapper (wrap-bind-request @mock-handler))
(it "binds *... | |
f33fe671df507b66ddc8a496b1cbf53803495b4cb10632eb47be85a833f7d086 | Plutonomicon/plutarch-plutus | Contexts.hs | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Plutarch.Api.V1.Contexts (
type PTuple,
PScriptContext (PScriptContext),
PTxInfo (PTxInfo),
PScriptPurpose (PMinting, PSpending, PRewarding, PCertifying),
) where
import PlutusLedgerApi.V1 qualified as Plutus
import Plutarch.Api.V1.Addre... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/9b83892057f2aaaed76e3af6193ad1ae242244cc/Plutarch/Api/V1/Contexts.hs | haskell | | A pending transaction. This is the view as seen by the validator script.
Transaction inputs
Transaction outputs
The fee paid by this transaction.
The value minted by the transaction.
Staking withdrawals
The valid range for the transaction.
The hash of the pending transaction.
| Script context consists of the... | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Plutarch.Api.V1.Contexts (
type PTuple,
PScriptContext (PScriptContext),
PTxInfo (PTxInfo),
PScriptPurpose (PMinting, PSpending, PRewarding, PCertifying),
) where
import PlutusLedgerApi.V1 qualified as Plutus
import Plutarch.Api.V1.Addre... |
2b1fb465d6b9da0709d81bcee877292a4aa3a2c957d11f80ccdb390a16fefc2c | bldl/magnolisp | test-foreign-4.rkt | #lang magnolisp
(require (only-in racket/base + - /))
(typedef int #:: (foreign))
(define (mul x y) #:: (foreign ^(-> int int int)))
(define (div x y) #:: (foreign ^(-> int int int)) #:function /)
(define (sub x y) #:: (foreign ^(-> int int int))
#:function ((lambda () (let () -))))
(define (add x y) #:: (forei... | null | https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-foreign-4.rkt | racket | #lang magnolisp
(require (only-in racket/base + - /))
(typedef int #:: (foreign))
(define (mul x y) #:: (foreign ^(-> int int int)))
(define (div x y) #:: (foreign ^(-> int int int)) #:function /)
(define (sub x y) #:: (foreign ^(-> int int int))
#:function ((lambda () (let () -))))
(define (add x y) #:: (forei... | |
b1b6b38bc5222f60ff7d23aef84b08880b810b1dabfb82731f814ae690b229d4 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415165405.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415165405.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
8e33112645ac3798f72fd3a63fe73346936272497ae2f6da79d262389241e404 | mitchellwrosen/planet-mitchell | Getting.hs | module Optic.Getting
( -- * Getting
Getting
, (^.)
, view
) where
import Control.Lens.Getter (Getting, view, (^.))
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Optic/Getting.hs | haskell | * Getting | module Optic.Getting
Getting
, (^.)
, view
) where
import Control.Lens.Getter (Getting, view, (^.))
|
a5897536bdafe64831d8a9067050ce57a99567097d40b08749d053285165f518 | dschrempf/elynx | AminoAcidSpec.hs | -- |
Module : ELynx . . AminoAcidSpec
Copyright : 2021
License : GPL-3.0 - or - later
--
-- Maintainer :
-- Stability : unstable
-- Portability : portable
--
Creation date : Tue Jan 29 10:47:40 2019 .
module ELynx.MarkovProcess.AminoAcidSpec
( spec,
)
where
import qualified Da... | null | https://raw.githubusercontent.com/dschrempf/elynx/f73f4474c61c22c6a9e54c56bdc34b37eff09687/elynx-markov/test/ELynx/MarkovProcess/AminoAcidSpec.hs | haskell | |
Maintainer :
Stability : unstable
Portability : portable
| Module : ELynx . . AminoAcidSpec
Copyright : 2021
License : GPL-3.0 - or - later
Creation date : Tue Jan 29 10:47:40 2019 .
module ELynx.MarkovProcess.AminoAcidSpec
( spec,
)
where
import qualified Data.Vector.Storable as V
import ELynx.MarkovProcess.AminoAcid
import qualified ELynx.... |
77e46f24eb603b28349b1a6eb678716d239878eefa66962d55296d8fc04da312 | alex314159/ib-re-actor-976-plus | translation.clj | (ns ib-re-actor-976-plus.translation
(:require
[ : as tc ]
;[clj-time.core :as time]
;[clj-time.format :as tf]
[clojure.string :as str]))
Unfortunately it is important to know the TWS version here , because of the Decimal issue
(def tws-version
(let [separator (if (= (subs (System/getProperty "os.nam... | null | https://raw.githubusercontent.com/alex314159/ib-re-actor-976-plus/d021272292830d9d326444c3085ae281d73a8bdb/src/ib_re_actor_976_plus/translation.clj | clojure | [clj-time.core :as time]
[clj-time.format :as tf]
in practice we have to stringify these - odd behaviour
below doesn't work for real-time bars
POSSIBLE THAT THIS IF MESS-UP AND STRINGS WAS ENOUGH
:ACTIVETIM "ACTIVETIM"
:ADJUST "ADJUST"
:ALGO "ALGO"
:ALLOC "ALLOC"
:AUC "AUC"
:average-cost "AVGCOST"
:basket "BASKET"
:CO... | (ns ib-re-actor-976-plus.translation
(:require
[ : as tc ]
[clojure.string :as str]))
Unfortunately it is important to know the TWS version here , because of the Decimal issue
(def tws-version
(let [separator (if (= (subs (System/getProperty "os.name") 0 3) "Win") #"\\" #"/")]
(last
(drop-last
... |
74777fcdf5ab0652eefe8ae8fee1afea550800166e406ecf801a3202f4a5d80d | futurice/haskell-mega-repo | MegaRepoTool.hs | {-# LANGUAGE OverloadedStrings #-}
module Futurice.App.MegaRepoTool (defaultMain) where
import Data.Aeson (Value (Null, String), eitherDecodeStrict)
import Data.Char (isAlphaNum)
import Futurice.Prelude
import Prelude ()
import System.Exit
import System.Process
import qualified Data.Map as Map... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/c6bbcc6cc9dd3776059c87f3f4c8f6d75ccdcbd0/mega-repo-tool/src/Futurice/App/MegaRepoTool.hs | haskell | # LANGUAGE OverloadedStrings #
if it's not valid JSON, but looks like an identifier | module Futurice.App.MegaRepoTool (defaultMain) where
import Data.Aeson (Value (Null, String), eitherDecodeStrict)
import Data.Char (isAlphaNum)
import Futurice.Prelude
import Prelude ()
import System.Exit
import System.Process
import qualified Data.Map as Map
import qualified Data.Text ... |
d729dea5857acff4594f3f6d9287fdc8b9d969b29e6a95dd5dd71c201fc47e3e | wireless-net/erlang-nommu | wxCloseEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxCloseEvent.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxCloseEvent).
-include("wxe.hrl"... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.