_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 |
|---|---|---|---|---|---|---|---|---|
fc43baba2a5a1fd56a3116d9e3d0dd213d9c5dc76facb7efeffdd7b290403c35 | awslabs/s2n-bignum | bignum_mul_8_16.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_mul_8_16.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "x86/fastmul/bignum_mul_8_16.o";;
***
PUSH (% rbp)
PUSH (% rbx)
PUSH (% r12)
PUSH (% r13)
PUSH (% r14)
PUSH (% r15)
ADC (% r9) ... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
MULX - based 8x8->16 multiplication . ... |
b65729259f2d964dbf498047bf013b8e7b0a85d068d20c5711b4a2b532a8a0dd | jabber-at/ejabberd | ejabberd_websocket.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_websocket.erl
Author : < >
%%% Purpose : XMPP Websocket support
Created : 09 - 10 - 2010 by < >
%%%
Some code lifted from MISULTIN - WebSocket misultin_websocket.erl - > -|-|- ( ° >
%%% ()
Copyright ( C ) 20... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/ejabberd_websocket.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_websocket.erl
Purpose : XMPP Websocket support
()
All rights reserved.
<-is-dead-long-live-websockets.html>
BSD License
Redistribution and use in source and binary forms, with or without modification, are permitted prov... | Author : < >
Created : 09 - 10 - 2010 by < >
Some code lifted from MISULTIN - WebSocket misultin_websocket.erl - > -|-|- ( ° >
Copyright ( C ) 2010 , < > , .
Code portions from have been originally taken under MIT license at the address :
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND... |
86044bb8ee7164915e927e87eba3b2cac9df91199a3fe48fbdc1836e24e3ec54 | LaurentMazare/cmt-fun | cmt_test.ml | open! Base
open Cmt_python
let rec print_sign : string -> Types.signature_item -> env:Module_env.t -> unit =
fun indent s ~env ->
match s with
| Sig_value (ident, value_description, Exported) ->
let simple_type = Simple_type.of_type_desc value_description.val_type.desc ~env in
let simple_type =
matc... | null | https://raw.githubusercontent.com/LaurentMazare/cmt-fun/29581b968ed58929a41c237a414a56ece663f9ce/examples/cmt_test.ml | ocaml | open! Base
open Cmt_python
let rec print_sign : string -> Types.signature_item -> env:Module_env.t -> unit =
fun indent s ~env ->
match s with
| Sig_value (ident, value_description, Exported) ->
let simple_type = Simple_type.of_type_desc value_description.val_type.desc ~env in
let simple_type =
matc... | |
b274c43717a3eb779390c34175f6491035c02a3bf279ad7903c7a14e337b812e | binsec/haunted | llvm_decoder.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/llvm/llvm_decoder.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
40a4cff627b8d39b89b73e531e2c6ce2570847d25379d0a10e141b78358b21b5 | ucsd-progsys/dsolve | unused_var.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet C... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/typing/unused_var.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2004 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : unused_var.mli , v 1.2 2006/01/... |
1c4e790eb4a393c44b8c46aed07c79c280f371c4f26d13858f11185d01a59909 | HugoPeters1024/hs-sleuth | Replace.hs | {-# LANGUAGE BangPatterns #-}
-- | Replace a string by another string
--
-- Tested in this benchmark:
--
-- * Search and replace of a pattern in a text
--
module Benchmarks.Replace
( benchmark
, initEnv
) where
import Criterion (Benchmark, bgroup, bench, nf)
import qualified Data.ByteString.Char8 as B
impo... | null | https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/385655e62031959a14a3bac5e9ccd1c42c045f0c/test-project/text-1.2.4.0/benchmarks/haskell/Benchmarks/Replace.hs | haskell | # LANGUAGE BangPatterns #
| Replace a string by another string
Tested in this benchmark:
* Search and replace of a pattern in a text
| module Benchmarks.Replace
( benchmark
, initEnv
) where
import Criterion (Benchmark, bgroup, bench, nf)
import qualified Data.ByteString.Char8 as B
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.Search as BL
import qualified Data.ByteString.Search as B
import qualified Da... |
c9fcfc1964f60cf72a106433714d3d19a6a7ec6a5fc98eeff3e2edd00995ab64 | flipstone/haskell-for-beginners | 3_the_newtype_keyword.hs | import Data.List (sort)
Declare a new type , DescedingInt , that wraps an Int .
Derive an EQ instance for it .
--
Declare an instance for DescendingInt that will
-- sort the integers in descending order, rather than ascending.
--
-- Use sort to sort the list of integers below in descending
order using you... | null | https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/problems/chapter_11/3_the_newtype_keyword.hs | haskell |
sort the integers in descending order, rather than ascending.
Use sort to sort the list of integers below in descending
but can be used with any orderable type.
Define a function, sortDescending, that using your Descending
type to sort any orderable type in descending order.
| import Data.List (sort)
Declare a new type , DescedingInt , that wraps an Int .
Derive an EQ instance for it .
Declare an instance for DescendingInt that will
order using your DescedingInt type .
Construct a new type , Descending , which is like DescedingInt
Demonstrate the difference in laziness... |
f4dc35ba4ba2b7e3e18d1a2ae9f0f611e6bece75f1b5723f4239530b168e26cd | alexandergunnarson/quantum | filesystem.cljc | (ns quantum.core.io.filesystem
(:require [quantum.core.convert :as convert])
#?(:clj
(:import
On a ...
(java.nio.file FileSystems WatchService WatchEvent WatchKey
StandardWatchEventKinds
WatchEvent$Modifier)
quantum.core.data.queue.LinkedBlockingQueue)))
#_(:clj
(defn java-file-watcher
"@eve... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/io/filesystem.cljc | clojure | Blocks until whatsit
Necessary to receive more watches
(ns me.raynes.fs
(:refer-clojure :exclude [name parents])
(:require [clojure.zip :as zip]
[clojure.java.io :as io]
[clojure.string :as string]
[clojure.java.shell :as sh])
(:import [java.io File FilenameFilter]))
... | (ns quantum.core.io.filesystem
(:require [quantum.core.convert :as convert])
#?(:clj
(:import
On a ...
(java.nio.file FileSystems WatchService WatchEvent WatchKey
StandardWatchEventKinds
WatchEvent$Modifier)
quantum.core.data.queue.LinkedBlockingQueue)))
#_(:clj
(defn java-file-watcher
"@eve... |
6101a3a1e80ec8967c56865f1b7ee168ab65e9c85e6bf584f3091f658f4b3c38 | fetburner/Coq2SML | flags.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/lib/flags.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Compatibility mode
Current means ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
let with_option o f x =
let... |
42e69595209e2b99cb2a4b9097b6cf2c511be04a2882c03bade895be31d20b52 | clojurewerkz/ogre | has_test.clj | (ns clojurewerkz.ogre.suite.has-test
(:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse sort shuffle])
(:require [clojurewerkz.ogre.core :refer :all])
(:import (org.apache.tinkerpop.gremlin.structure T)
(org.apache.tinkerp... | null | https://raw.githubusercontent.com/clojurewerkz/ogre/04573451a9f4d47c6a18430ea492137613db45c7/test/clojure/clojurewerkz/ogre/suite/has_test.clj | clojure | (ns clojurewerkz.ogre.suite.has-test
(:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse sort shuffle])
(:require [clojurewerkz.ogre.core :refer :all])
(:import (org.apache.tinkerpop.gremlin.structure T)
(org.apache.tinkerp... | |
0877b69c26019f56119ccd424c831479681d0062b86bbc06e3b96f8dda88dcc1 | zotonic/zotonic | z_config_tests.erl | -module(z_config_tests).
-include_lib("eunit/include/eunit.hrl").
yaml_nested_test() ->
Out = #{
a => [ 1, 2, 3 ],
b => #{
c => 1,
d => [ 1, 2, 3 ],
e => #{
f => 1,
g => 2
}
}
},
{ok, Out} = z_sites_con... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_core/test/z_config_tests.erl | erlang | -module(z_config_tests).
-include_lib("eunit/include/eunit.hrl").
yaml_nested_test() ->
Out = #{
a => [ 1, 2, 3 ],
b => #{
c => 1,
d => [ 1, 2, 3 ],
e => #{
f => 1,
g => 2
}
}
},
{ok, Out} = z_sites_con... | |
5fa50fd02ce8c0612ed1858dfa32adf4a542656bebd7abb11e5ac3fe586940f1 | synduce/Synduce | Predicates.mli | open Lang
open Term
open Env
open ProblemDefs
val find : ctx:Env.env -> key:term -> (term_info * cond_lemma list) option
val find_lemma_info
: ctx:Env.env
-> term * term option
-> (term_info * cond_lemma option) option
val get : ?count_reuse:bool -> ctx:Env.env -> p:Psi.t -> term -> term option
val get_with_p... | null | https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/src/common/Predicates.mli | ocaml | open Lang
open Term
open Env
open ProblemDefs
val find : ctx:Env.env -> key:term -> (term_info * cond_lemma list) option
val find_lemma_info
: ctx:Env.env
-> term * term option
-> (term_info * cond_lemma option) option
val get : ?count_reuse:bool -> ctx:Env.env -> p:Psi.t -> term -> term option
val get_with_p... | |
0518602412f94aa5d1185c9c66c043f5971e66d6dae81a09e27fe5868be0b636 | Lisp-Stat/lisp-stat | variables.lisp | -*- Mode : LISP ; Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : LS -*-
Copyright ( c ) 2021 by Symbolics Pte . Ltd. All rights reserved .
Copyright ( c ) 2009 by
(in-package #:lisp-stat)
;;;; Listing and Saving Variables and Functions
(defvar *variables* nil)
(defvar *ask-on-redefine* nil)
(defmacro... | null | https://raw.githubusercontent.com/Lisp-Stat/lisp-stat/2431c757abab1922a0711730e1af6e26d6a20818/base/variables.lisp | lisp | Base : 10 ; Syntax : ANSI - Common - Lisp ; Package : LS -*-
Listing and Saving Variables and Functions | Copyright ( c ) 2021 by Symbolics Pte . Ltd. All rights reserved .
Copyright ( c ) 2009 by
(in-package #:lisp-stat)
(defvar *variables* nil)
(defvar *ask-on-redefine* nil)
(defmacro def (name value &optional (documentation nil documentation-p))
"Define a data variable
VALUE is not evaluated and must be a sy... |
b5a070e4ce197f65f472875efdb5ee2fe0d7c02c31aacc024a7c25ab29da2537 | abridgewater/nq-clim | standard-rectangle-set-tests.lisp | ;;;
standard-rectangle-set-tests.lisp
;;;
Tests for regions composed of more than one rectangle .
;;;
(cl:defpackage :nq-clim/tests/standard-rectangle-set-tests
(:use :cl :sb-rt)
(:import-from :nq-clim/geometry/standard-rectangle-set
"DIFFER-Y-SPAN-SETS"
"DIFFERENCE-OPERATION"
... | null | https://raw.githubusercontent.com/abridgewater/nq-clim/11d339fd0ac77b6d624fc5537b170294a191a3de/tests/standard-rectangle-set-tests.lisp | lisp | standard-rectangle-set-tests.lisp
Tests for regions composed of more than one rectangle .
(cl:defpackage :nq-clim/tests/standard-rectangle-set-tests
(:use :cl :sb-rt)
(:import-from :nq-clim/geometry/standard-rectangle-set
"DIFFER-Y-SPAN-SETS"
"DIFFERENCE-OPERATION"
... | |
ef83e969e6d71e4825266fa99c79cdf5272442d266b0fa51de6353b1fd6cdb7e | martintrojer/datalog | datalog.clj | Copyright ( c ) . All rights reserved . The use and
;; distribution terms for this software are covered by the Eclipse Public
;; License 1.0 (-1.0.php) which can
;; be found in the file epl-v10.html at the root of this distribution. By
;; using this software in any fashion, you are agreeing to be bound by t... | null | https://raw.githubusercontent.com/martintrojer/datalog/bd64e76ceb02c0494a654010c0221ada5fc2a002/src/datalog/datalog.clj | clojure | distribution terms for this software are covered by the Eclipse Public
License 1.0 (-1.0.php) which can
be found in the file epl-v10.html at the root of this distribution. By
using this software in any fashion, you are agreeing to be bound by the
terms of this license. You must not remove this notice, or an... | Copyright ( c ) . All rights reserved . The use and
A Clojure implementation of Datalog
straszheimjeffrey ( gmail )
Created 2 March 2009
Converted to Clojure1.4 by 2012 .
(ns ^{:author "Jeffrey Straszheim",
:doc "A Clojure implementation of Datalog"}
datalog.datalog
(:use [datalog.rule... |
434b1d374cdf5a278088c36532f04c13f40ba05179971ed689e9c8d888219400 | sharplispers/slitch | packet-socket.lisp | (defpackage :packet-socket
(:use :common-lisp :unix :alien :c-call)
(:export :open-packet-socket :send :recv))
(in-package :packet-socket)
From < linux / if.h > , tuntap , lisp
(defconstant IFNAMSIZ 16)
(defconstant PF_PACKET 17)
(defconstant SOCK_RAW 3)
(defconstant ETH_P_ALL #.(ext:htons 3))
(defconstant S... | null | https://raw.githubusercontent.com/sharplispers/slitch/edd96fde7722ed4ce4678d7041aad69eb0762c9f/src/packet-socket.lisp | lisp | From <linux/if.h>
From <linux/if_packet.h> | (defpackage :packet-socket
(:use :common-lisp :unix :alien :c-call)
(:export :open-packet-socket :send :recv))
(in-package :packet-socket)
From < linux / if.h > , tuntap , lisp
(defconstant IFNAMSIZ 16)
(defconstant PF_PACKET 17)
(defconstant SOCK_RAW 3)
(defconstant ETH_P_ALL #.(ext:htons 3))
(defconstant S... |
2275520e08c3c9c167f2bc1c5211af435680d8e8e312b6854d6dfd3cf0967646 | clash-lang/clash-compiler | T478.hs | module T478 where
import Clash.Prelude
topEntity :: Vec 6 Bool -> Bool
topEntity = (==) (pure False)
| null | https://raw.githubusercontent.com/clash-lang/clash-compiler/39a62558c2414699d98610e3808443b0a2da8471/tests/shouldwork/Vector/T478.hs | haskell | module T478 where
import Clash.Prelude
topEntity :: Vec 6 Bool -> Bool
topEntity = (==) (pure False)
| |
58b757326afcc5343cba13a5d72a705f7bffcd755f36d88e5247bc1211db90d9 | grin-compiler/ext-stg-interpreter-presentation-demos | GameLogic.hs | # LANGUAGE LambdaCase , RecordWildCards , TupleSections , NoMonomorphismRestriction , FlexibleContexts #
module GameLogic where
import Control.Monad
import Data.Maybe
import System.Random.Mersenne.Pure64
import Lens.Micro.Platform
import Graphics.Gloss.Data.Vector
import Graphics.Gloss.Geometry.Angle
import Control.M... | null | https://raw.githubusercontent.com/grin-compiler/ext-stg-interpreter-presentation-demos/f4b1a3b3ab746146859a1512f910e9e62c62a0e6/demo-02-minigame/minigame/GameLogic.hs | haskell | entity update monad (mutable state + collect new entities/visuals)
visual item update monad + collect new visual items
monad for collect new entites or visuals
INTERPRETER FIX
t' <- getRandomR (t + 5, t + 10)
player item
player level
bullet
add: bullet-level,bullet-item
collect collided entities
transform ... | # LANGUAGE LambdaCase , RecordWildCards , TupleSections , NoMonomorphismRestriction , FlexibleContexts #
module GameLogic where
import Control.Monad
import Data.Maybe
import System.Random.Mersenne.Pure64
import Lens.Micro.Platform
import Graphics.Gloss.Data.Vector
import Graphics.Gloss.Geometry.Angle
import Control.M... |
22e1f519c8521a353b01b3ba2eb2d5f4c28ad0ebcbdccc633dcda05adeae7f4f | jeromesimeon/Galax | top_project.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/toplevel/top_project.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : galax - project.ml , v 1.37 2007/09/19 20:01:50 mff Exp $
Module : Top_project
Description :
This module implements a simple front - end for Galax XML
projection algorithm .
Description:
This module imp... |
b6fd10cb45855c4339266bf9c2b6e042c933fbe50032dc1235ebd78f51b5bad1 | haskell-opengl/OpenGL | TextureObject.hs | {-# OPTIONS_HADDOCK hide #-}
--------------------------------------------------------------------------------
-- |
Module : Graphics . Rendering . OpenGL.GL.Texturing . TextureObject
Copyright : ( c ) 2002 - 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portabil... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGL/f7af8fe04b0f19c260a85c9ebcad612737cd7c8c/src/Graphics/Rendering/OpenGL/GL/Texturing/TextureObject.hs | haskell | # OPTIONS_HADDOCK hide #
------------------------------------------------------------------------------
|
License : BSD3
Stability : stable
Portability : portable
This is a purely internal module for handling texture objects.
-----------------------------------------------------------------------------... | Module : Graphics . Rendering . OpenGL.GL.Texturing . TextureObject
Copyright : ( c ) 2002 - 2019
Maintainer : < >
module Graphics.Rendering.OpenGL.GL.Texturing.TextureObject (
TextureObject(..)
) where
import Control.Monad.IO.Class
import Data.ObjectName
import Foreign.Marshal.Array ( ... |
f481cb32f0218e8b780f0c4e219f698d70ce9609d2193804d99d4f17f9750b73 | eudoxia0/cl-libyaml | macros.lisp | (in-package :cl-user)
(defpackage libyaml.macros
(:use :cl)
(:import-from :cffi
:foreign-alloc
:with-foreign-string)
(:export :with-parser
:with-event)
(:documentation "Some macros to simplify managing foreign objects."))
(in-package :libyaml.macros)
(defmacro with-pa... | null | https://raw.githubusercontent.com/eudoxia0/cl-libyaml/a7fe9f68bddfd00b7ca467b65b3b41b276336843/src/macros.lisp | lisp | (in-package :cl-user)
(defpackage libyaml.macros
(:use :cl)
(:import-from :cffi
:foreign-alloc
:with-foreign-string)
(:export :with-parser
:with-event)
(:documentation "Some macros to simplify managing foreign objects."))
(in-package :libyaml.macros)
(defmacro with-pa... | |
c7190dffd14c7fdf3586e018ec424e4384717171c4c4dee0e917730056e0e1da | Deltaphish/UwUpp | StdLib.hs | module StdLib(initST) where
import Type
import Control.Monad.Except (liftIO,throwError)
import Runtime
import qualified Data.Map as Map
import Data.Maybe
import Data.List
import Data.List.Split (splitOn)
initST :: SymbolTable
initST = Map.fromList init
where init = [ ("dumpState", FType dump_st)
... | null | https://raw.githubusercontent.com/Deltaphish/UwUpp/4b993e7bd989e31dafd5e12cf3e9e53cc4f9882a/src/StdLib.hs | haskell | debug
Array
IO
String
Concat StrArrayType to StrType | module StdLib(initST) where
import Type
import Control.Monad.Except (liftIO,throwError)
import Runtime
import qualified Data.Map as Map
import Data.Maybe
import Data.List
import Data.List.Split (splitOn)
initST :: SymbolTable
initST = Map.fromList init
where init = [ ("dumpState", FType dump_st)
... |
3157973e125c704cf7164592fc5378e50a329e934b589cc1cefe441fa6ab0ae6 | rotty/conjure | base.scm | ;;; base.scm --- Unit tests for (conjure base)
Copyright ( C ) 2009 , 2010 < >
Author : < >
;; 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 3 of the License , or... | null | https://raw.githubusercontent.com/rotty/conjure/19f3aaeb8cb73277a2c61a36a77cdb6aefd7f894/tests/base.scm | scheme | base.scm --- Unit tests for (conjure base)
This program is free software; you can
redistribute it and/or modify it under the terms of the GNU General
either
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 FO... |
Copyright ( C ) 2009 , 2010 < >
Author : < >
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
(import (except (rnrs) file-exists? delete-file)
(spells pathname)
(spells filesys)
(wak trc-t... |
54e0ad1e704ff861173ac270165e67b1e46b613bbb5b32d4f14bebedbb67f43f | RichiH/git-annex | Control.hs | git - annex assistant webapp control
-
- Copyright 2012 , 2013 < >
-
- Licensed under the GNU AGPL version 3 or higher .
-
- Copyright 2012, 2013 Joey Hess <>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
# LANGUAGE TypeFamilies , QuasiQuotes , MultiParamTypeClasses , TemplateHaskell... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Assistant/WebApp/Control.hs | haskell | Remove all alerts for currently running activities.
Stop transfers the assistant is running,
- otherwise they would continue past shutdown.
- Pausing transfers prevents more being started up (and stops
- the transfer processes).
Wait 2 seconds before shutting down, to give the web
- page time to load in... | git - annex assistant webapp control
-
- Copyright 2012 , 2013 < >
-
- Licensed under the GNU AGPL version 3 or higher .
-
- Copyright 2012, 2013 Joey Hess <>
-
- Licensed under the GNU AGPL version 3 or higher.
-}
# LANGUAGE TypeFamilies , QuasiQuotes , MultiParamTypeClasses , TemplateHaskell... |
f1f2a8a7069c661b498e16d5fe0588033f3f0fe1d2f0f62eaeb143c159f9edc3 | victorvianna/mini-gcc | main.ml |
Fichier principal du compilateur mini - c
open Format
open Lexing
let () = Printexc.record_backtrace true
let parse_only = ref false
let type_only = ref false
let interp_rtl = ref false
let interp_ertl = ref false
let interp_ltl = ref false
let save_asm = ref false
let debug = ref false
let ifile = ref ""
let s... | null | https://raw.githubusercontent.com/victorvianna/mini-gcc/04659816d0a1097ae12b57243572fff9e91c0b13/main.ml | ocaml | ... |
Fichier principal du compilateur mini - c
open Format
open Lexing
let () = Printexc.record_backtrace true
let parse_only = ref false
let type_only = ref false
let interp_rtl = ref false
let interp_ertl = ref false
let interp_ltl = ref false
let save_asm = ref false
let debug = ref false
let ifile = ref ""
let s... |
37cb8836bf405acc2e11dd0deb6e6a936c732338d73c45e0e88a88991f813bc1 | Netflix/PigPen | map_test.clj | ;;
;;
Copyright 2013 - 2015 Netflix , Inc.
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to ... | null | https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-core/src/test/clojure/pigpen/map_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the speci... | Copyright 2013 - 2015 Netflix , Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(ns pigpen.map-test
(:require [clojure.test :refer :all]
[pigpen.map]))
|
02684bc862cd3501b5f10e59af52f6314a6cfc2138bd9a27634c1bef668448a4 | biocad/hasbolt-extras | Persisted.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
module Database.Bolt.Extras.Internal.Persisted
(
BoltId
, Persisted (..)
, GetBoltId (..)
, fromInt
) where
import Data.Aeson (FromJSON (..), ToJSON (..),
genericParseJSON, genericToJSON)
import ... | null | https://raw.githubusercontent.com/biocad/hasbolt-extras/279193edf8bec50d2facd2ec0ce5153600dcabc9/src/Database/Bolt/Extras/Internal/Persisted.hs | haskell |
| 'Persisted' is wrapper for some object that can be identified with 'BoltId'.
| This is just check that your 'BoltId' is valid.
| Common class to get 'BoltId' from the object.
| # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveGeneric #
module Database.Bolt.Extras.Internal.Persisted
(
BoltId
, Persisted (..)
, GetBoltId (..)
, fromInt
) where
import Data.Aeson (FromJSON (..), ToJSON (..),
genericParseJSON, genericToJSON)
import ... |
6a3df6258240329bbf8ed069d813bb61e33c2cfd1f738a3750b25f4f9163f75d | MinaProtocol/mina | balance_exemption.ml |
* This file has been generated by the OCamlClientCodegen generator for openapi - generator .
*
* Generated by : -generator.tech
*
* Schema : BalanceExemption indicates that the balance for an exempt account could change without a corresponding Operation . This typically occurs with staking rewards , ves... | null | https://raw.githubusercontent.com/MinaProtocol/mina/a80b00221953c26ff158e7375a948b5fa9e7bd8b/src/lib/rosetta_models/balance_exemption.ml | ocaml |
* This file has been generated by the OCamlClientCodegen generator for openapi - generator .
*
* Generated by : -generator.tech
*
* Schema : BalanceExemption indicates that the balance for an exempt account could change without a corresponding Operation . This typically occurs with staking rewards , ves... | |
03e64fe771e0d1088c66ab8c71ba6839f628c8a2af5ae59f281ad9b050ac9937 | jrm-code-project/LISP-Machine | sysmen.lisp | -*- Mode : LISP ; Package : TV ; Base:8 ; : ZL -*-
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
Operations for moving , reshaping and creating windows ,
;;; and menus to get them from.
Copied from LAD : RELEASE-3.WINDOW ; SYSMEN.LISP#195 on 2 - Oct-86 04:04:58
;;;; Item lists for th... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/window/sysmen.lisp | lisp | Package : TV ; Base:8 ; : ZL -*-
and menus to get them from.
SYSMEN.LISP#195 on 2 - Oct-86 04:04:58
Item lists for the System Menu
General window operations
SYSMEN.LISP#195 on 2 - Oct-86 04:04:59
Operations on window mouse is over
SYSMEN.LISP#195 on 2 - Oct-86 04:05:00
Invoke the most commonly-needed programs
... | * * ( c ) Copyright 1980 Massachusetts Institute of Technology * *
Operations for moving , reshaping and creating windows ,
'(("Create" :FUNCALL SYSTEM-MENU-CREATE-WINDOW
:DOCUMENTATION " Create a new window. Flavor of window selected from a menu.")
("Select" :FUNCALL SYSTEM-MENU-SELEC... |
30235fd3c141a97a5ec84c6f248362db1db5ce9ddcf0ba0d531adc379eaf1c7f | Relph1119/sicp-solutions-manual | p1-38-e.scm | (load "src/practices/ch01/p1-37-rec-cont-frac.scm")
(define (e k)
(define (N i) 1)
(define (D i)
(if (= 0 (remainder (+ i 1) 3))
(* 2 (/ (+ i 1) 3))
1))
(+ 2.0 (cont-frac N D k))) | null | https://raw.githubusercontent.com/Relph1119/sicp-solutions-manual/f2ff309a6c898376209c198030c70d6adfac1fc1/src/practices/ch01/p1-38-e.scm | scheme | (load "src/practices/ch01/p1-37-rec-cont-frac.scm")
(define (e k)
(define (N i) 1)
(define (D i)
(if (= 0 (remainder (+ i 1) 3))
(* 2 (/ (+ i 1) 3))
1))
(+ 2.0 (cont-frac N D k))) | |
a627cda30e32d4d229762c21c289c74810ec022c9f70dc0e71c6a8b34e99a99b | evolutics/haskell-formatter | Input.hs |
root = root
| null | https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/testsuite/resources/source/comments/empty_lines/at_bounds_of_file/start/1/Input.hs | haskell |
root = root
| |
175812c71eb0de6e8bd635fe04335eaa3ddce72dfb05cf9a6be2c21a975b44dc | cbaggers/nineveh | buffer-streamer.lisp | (in-package :nineveh.streams)
Based on the wonderful article from here :
;;
;; -object-streaming-in-opengl.html
;; {TODO} the is a lot of accessing non exported symbols in here. This means
that CEPL is not exposing everything user 's need . Revisit CEPL and
;; see how to help users use the 'make... | null | https://raw.githubusercontent.com/cbaggers/nineveh/0a10a84669cd9d1c584f54b9eab062986a5f1c47/streams/buffer-streamer.lisp | lisp |
-object-streaming-in-opengl.html
{TODO} the is a lot of accessing non exported symbols in here. This means
see how to help users use the 'make before gl-context' stuff. | (in-package :nineveh.streams)
Based on the wonderful article from here :
that CEPL is not exposing everything user 's need . Revisit CEPL and
(defstruct (buffer-streamer (:include buffer-stream)
(:constructor %make-buffer-streamer))
(arr (error "buffer-streamer: bug[0]")
... |
17f75cc20195a11fcae01393d2ada3649859a637069f2d63df9d3157f79cbdda | vii/teepeedee2 | js-library.lisp | (in-package #:tpd2.webapp)
#+use-ps-console.log
(pushnew :use-ps-console.log *features*)
(ps:defpsmacro debug-log (&rest args)
(declare (ignorable args))
#+use-ps-console.log
`(when (and (~ window console) (~ console log))
(! (console log) ,@args)))
(ps:defpsmacro ! ((&rest object-paths) &rest args )
`(... | null | https://raw.githubusercontent.com/vii/teepeedee2/a2ed78c51d782993591c3284562daeed3aba3d40/src/webapp/js-library.lisp | lisp | error occurred so actually submit the form normally | (in-package #:tpd2.webapp)
#+use-ps-console.log
(pushnew :use-ps-console.log *features*)
(ps:defpsmacro debug-log (&rest args)
(declare (ignorable args))
#+use-ps-console.log
`(when (and (~ window console) (~ console log))
(! (console log) ,@args)))
(ps:defpsmacro ! ((&rest object-paths) &rest args )
`(... |
7cba1bb72730a2017314ebb419f7fa72c5fce986187dc89b358c4ab219926def | tarcieri/reia | reia_internal.erl | %
% reia_internal.erl: A potpourri of internal functions
Copyright ( C)2008 - 10
%
Redistribution is permitted under the MIT license . See LICENSE for details .
%
-module(reia_internal).
-export([
load/2,
compile/1, compile/2,
execute_file/1,
load_submodule/2,
load_core/0,
load_stdlib/0,
print_er... | null | https://raw.githubusercontent.com/tarcieri/reia/77b8b5603ae5d89a0d8fc0b3e179ef052260b5bf/src/core/reia_internal.erl | erlang |
reia_internal.erl: A potpourri of internal functions
Walk the Reia load path attempting to load the given file
If the binary already exists, load it
Ensure changes haven't been made to the sources
Otherwise compile the source code
Thunk for reiac
Compile and load the given Reia source code
Thunk for loading ... | Copyright ( C)2008 - 10
Redistribution is permitted under the MIT license . See LICENSE for details .
-module(reia_internal).
-export([
load/2,
compile/1, compile/2,
execute_file/1,
load_submodule/2,
load_core/0,
load_stdlib/0,
print_error/2,
invoke_callable/3
]).
-include("reia_types.hrl").
l... |
421ea7c01c65cc2ee7d69dde6ec5031016e98cc69864cd261147e42ae7ce2aa5 | tali713/mit-scheme | rtest.scm | ;;; -*- Scheme -*-
;; to make this possible to debug
( set ! * unparser - list - breadth - limit * 10 )
( set ! * unparser - list - depth - limit * 10 )
GC stress test
(define (a)
(gc-flip)
(gc-flip)
(kick-uitk-thread)
(gc-flip)
(gc-flip)
(kick-uitk-thread))
(define (foo test n)
(if (> n 0)
... | null | https://raw.githubusercontent.com/tali713/mit-scheme/6c703a838081fe2418bc0dbfe003bdb429d8c479/src/swat/scheme/other/rtest.scm | scheme | -*- Scheme -*-
to make this possible to debug
Test the Rectangle widget
(define application (make-application "Test Scheme Application"))
to-switch is list ((text command) (text command)) |
( set ! * unparser - list - breadth - limit * 10 )
( set ! * unparser - list - depth - limit * 10 )
GC stress test
(define (a)
(gc-flip)
(gc-flip)
(kick-uitk-thread)
(gc-flip)
(gc-flip)
(kick-uitk-thread))
(define (foo test n)
(if (> n 0)
(begin
(test)
(foo test (- n 1)))))
(define (f... |
801f3219f19fd56c3c4196b05e91a45f1166d88c262a0199909b88d5a0508aeb | LispEngineer/aiband | commands.clj | Copyright 2016 , Jr.
symbolics _ at _ lisp.engineer
;; /
;;
Aiband - The Artificial Intelligence Roguelike
;;;; End-user game commands which will all impact the game state.
;; These functions are all likely to be state monadic on the game state.
;; (when I get around to that)
(ns aiband.commands
(:req... | null | https://raw.githubusercontent.com/LispEngineer/aiband/c29181401ba8767099aac52120651f99d36af7a3/Assets/aiband/commands.clj | clojure | /
End-user game commands which will all impact the game state.
These functions are all likely to be state monadic on the game state.
(when I get around to that)
We specifically don't want update-val and update-state as we
made better versions of these
Game Commands ---------------------------------------------... | Copyright 2016 , Jr.
symbolics _ at _ lisp.engineer
Aiband - The Artificial Intelligence Roguelike
(ns aiband.commands
(:require [aiband.v2d :refer :all :reload true]
[aiband.bsp :as bsp :reload true]
[aiband.item :as i :reload true]
[aiband.fov :as fov :reload true]... |
795e396fad08b81dc3fe8ce9900bba165510c58cf85a96a970eb3207e81ae92e | kmi/irs | ocmltl.lisp |
sdfsdfsd | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/profile/transform/ocmltl.lisp | lisp |
sdfsdfsd | |
620eb904f22aa2f1b14ca9bd2bfce9404224deb1a89d23f9b213faf19eb32f03 | RunOrg/RunOrg | key.mli | (* © 2014 RunOrg *)
(** Cryptographic signature keys. Global (per-database). *)
(** The identifier of a key. *)
module I : sig
include Id.PHANTOM
end
(** All supported hash functions. *)
module Hash : Fmt.FMT with type t = [ `SHA1 ]
(** Create a new key in the current database, using the provided hash and bytes. ... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/key.mli | ocaml | © 2014 RunOrg
* Cryptographic signature keys. Global (per-database).
* The identifier of a key.
* All supported hash functions.
* Create a new key in the current database, using the provided hash and bytes.
* Information about a key stored in the database. Obviously, the key bytes are not
available.
* List a... |
module I : sig
include Id.PHANTOM
end
module Hash : Fmt.FMT with type t = [ `SHA1 ]
val create :
PId.t option ->
IpAddress.t ->
Hash.t -> string -> ( #O.ctx, [ `OK of I.t * Cqrs.Clock.t
| `NeedAccess of Id.t ]) Run.t
* HMAC an assertion with the specified key . Returns [ None ] if the key does
... |
50a1cc2128f228cce881204850ea6e3124d53adf2e0414cc87b7df95aad9f276 | orbitz/oort | mdb_bhv_action.erl | %%% File : mdb_bhv_action.erl
Author : < >
%%% Purpose : Answer with Action IRC usage
Created : 12 Aug 2003 by < >
%%%----------------------------------------------------------------------
%%%
This file is part of Manderlbot .
%%%
Manderlbot is free software ; you can redistribute it and/or modify
... | null | https://raw.githubusercontent.com/orbitz/oort/a61ec85508917ae9a3f6672a0b708d47c23bb260/manderlbot-0.9.2/src/mdb_bhv_action.erl | erlang | File : mdb_bhv_action.erl
Purpose : Answer with Action IRC usage
----------------------------------------------------------------------
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General... | Author : < >
Created : 12 Aug 2003 by < >
This file is part of Manderlbot .
Manderlbot 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
Manderlbot is dis... |
c2bcea95ea7f5462188c16ca5b28d15f73a4c077cde1a3943364081e666b0df2 | skanev/playground | 68-tests.scm | (require rackunit rackunit/text-ui)
(load-relative "helpers/query.scm")
(load "../68.scm")
(define sicp-4.68-tests
(test-suite
"Tests for SICP exercise 4.68"
(check-equal? (matches-of '(reverse (1 2 3) ?x))
'((reverse (1 2 3) (3 2 1))))
))
(run-tests sicp-4.68-tests)
| null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/04/tests/68-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load-relative "helpers/query.scm")
(load "../68.scm")
(define sicp-4.68-tests
(test-suite
"Tests for SICP exercise 4.68"
(check-equal? (matches-of '(reverse (1 2 3) ?x))
'((reverse (1 2 3) (3 2 1))))
))
(run-tests sicp-4.68-tests)
| |
1d485acdb312463ec688f7301fb31e731440b15130530f3c66cd327a32f93090 | macourtney/Dark-Exchange | terms.clj | (ns darkexchange.model.terms
(:import [java.util ResourceBundle Locale])
(:require [clojure.contrib.logging :as logging]
[clojure.tools.html-utils :as html-utils]
[clojure.tools.loading-utils :as loading-utils]
[clojure.tools.string-utils :as string-utils]))
(defn
par... | null | https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/model/terms.clj | clojure | (ns darkexchange.model.terms
(:import [java.util ResourceBundle Locale])
(:require [clojure.contrib.logging :as logging]
[clojure.tools.html-utils :as html-utils]
[clojure.tools.loading-utils :as loading-utils]
[clojure.tools.string-utils :as string-utils]))
(defn
par... | |
17b46f1dedcd8abf33412f62252383192def9b77f79829ba68d2c09814fae497 | jabber-at/ejabberd | mod_muc.erl | %%%----------------------------------------------------------------------
%%% File : mod_muc.erl
Author : < >
Purpose : MUC support ( XEP-0045 )
Created : 19 Mar 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/mod_muc.erl | erlang | ----------------------------------------------------------------------
File : mod_muc.erl
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the i... | Author : < >
Purpose : MUC support ( XEP-0045 )
Created : 19 Mar 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of th... |
f961e41a7a58caace7fb38714f67160eb864c99f31ee28377d4d81c924456d94 | rvantonder/hack_parallel | hack_result.mli | (** [Result] is often used to handle error messages. *)
* [ ' a ] is a function 's expected return type , and [ ' b ] is often an error message string .
{ [ let ric_of_ticker = function
| " IBM " - > Ok " IBM.N "
| " MSFT " - > Ok " MSFT.OQ "
| " AA " - > Ok " AA.N "
| " C... | null | https://raw.githubusercontent.com/rvantonder/hack_parallel/c9d0714785adc100345835c1989f7c657e01f629/src/third-party/hack_core/hack_result.mli | ocaml | * [Result] is often used to handle error messages.
Returns Ok if both are Ok and Error otherwise.
[ok_if_true] returns [Ok ()] if [bool] is true, and [Error error] if it is false
* [ok_exn t] returns [x] if [t = Ok x], and raises [exn] if [t = Error exn]
raises Failure in the Error case
* [ok_unit = Ok ()], use... |
* [ ' a ] is a function 's expected return type , and [ ' b ] is often an error message string .
{ [ let ric_of_ticker = function
| " IBM " - > Ok " IBM.N "
| " MSFT " - > Ok " MSFT.OQ "
| " AA " - > Ok " AA.N "
| " CSCO " - > Ok " CSCO.OQ "
| _ as ticker - > Err... |
ba328eb2be79674e6b10919dc9c8e155ec1e0f9ce9df0dc71bb497a42ac9b508 | unison-code/uni-instr-sel | CheckDispatcher.hs | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... | null | https://raw.githubusercontent.com/unison-code/uni-instr-sel/2edb2f3399ea43e75f33706261bd6b93bedc6762/uni-is/UniIS/Drivers/CheckDispatcher.hs | haskell | -----------
Functions
-----------
| Function for executing this dispatcher.
| Dispatches execution to the correct driver. | |
Copyright : Copyright ( c ) 2012 - 2017 , < >
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2012-2017, Gabriel Hjort Blindell <>
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
Main authors:
Gabriel Hjort ... |
b1ded7733e28c620d26d836ae1fb0d5179c92cc75ec0e0c4479f5a484e8e288d | hercules-ci/hercules-ci-agent | ServiceInfo.hs | {-# LANGUAGE DeriveAnyClass #-}
module Hercules.API.Agent.LifeCycle.ServiceInfo
( ServiceInfo (..),
)
where
import Hercules.API.Prelude
data ServiceInfo = ServiceInfo
{ version :: (Int, Int),
agentSocketBaseURL :: Text,
bulkSocketBaseURL :: Text
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJS... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/216a1d178d57471b05f60bf3e21ce46d3fdc5f94/hercules-ci-api-agent/src/Hercules/API/Agent/LifeCycle/ServiceInfo.hs | haskell | # LANGUAGE DeriveAnyClass # |
module Hercules.API.Agent.LifeCycle.ServiceInfo
( ServiceInfo (..),
)
where
import Hercules.API.Prelude
data ServiceInfo = ServiceInfo
{ version :: (Int, Int),
agentSocketBaseURL :: Text,
bulkSocketBaseURL :: Text
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON)
|
fa9215f1b72935b417bf38913f5440d4f90eea344d8439a65634d18b3bc8265e | orivej/pzmq | c-api.lisp | (in-package #:pzmq)
(define-foreign-library libzmq
(unix (:or "libzmq.so.3.0.0" "libzmq.so.3" "libzmq"))
(t (:default "libzmq")))
(use-foreign-library libzmq)
libzmq may depend on libsodium . Help Deploy copy it .
;;; See
(define-foreign-library libsodium (t (:default "libsodium")))
(ignore-errors (use-foreig... | null | https://raw.githubusercontent.com/orivej/pzmq/6f7b2ca02c23ea53510a9b0e0f181d5364ce9d32/c-api.lisp | lisp | See
Misc
Error
Generate from "grovel.lisp", export in "package.lisp"
required docstring
Context
Message
equivalent to @fun{MSG-MORE}.
Socket
deprecated by :routing-id
deprecated by :ipv6
deprecated by :router-mandatory
deprecated
deprecated by :immediate
deprecated
deprecated
deprecated
uint64
int
... | (in-package #:pzmq)
(define-foreign-library libzmq
(unix (:or "libzmq.so.3.0.0" "libzmq.so.3" "libzmq"))
(t (:default "libzmq")))
(use-foreign-library libzmq)
libzmq may depend on libsodium . Help Deploy copy it .
(define-foreign-library libsodium (t (:default "libsodium")))
(ignore-errors (use-foreign-library... |
684a0562ad94bc4cdc7b7c366e580293cc6bf5b42fce389a6c00570e43fe33a8 | maralorn/nix-output-monitor | JSON.hs | # OPTIONS_GHC -Wno - orphans #
module NOM.IO.Input.JSON (parseStreamSimple) where
import Control.Exception qualified as Exception
import Data.ByteString qualified as ByteString
import Data.Hermes qualified as JSON
import NOM.Error (NOMError (..))
import NOM.IO (Stream)
import NOM.IO.Input (NOMInput (..), UpdateResult... | null | https://raw.githubusercontent.com/maralorn/nix-output-monitor/ef6ac1e9f63bc1351445f0435fa8e51c28678a2c/lib/NOM/IO/Input/JSON.hs | haskell | Forward Exceptions, when we encounter them | # OPTIONS_GHC -Wno - orphans #
module NOM.IO.Input.JSON (parseStreamSimple) where
import Control.Exception qualified as Exception
import Data.ByteString qualified as ByteString
import Data.Hermes qualified as JSON
import NOM.Error (NOMError (..))
import NOM.IO (Stream)
import NOM.IO.Input (NOMInput (..), UpdateResult... |
b5fddb7fe2c84db0b584ca9563716e0cb157f5cef2ebc7f6c40774e79dbeef63 | alura-cursos/datomic-introducao | db.clj | (ns ecommerce.db
(:use clojure.pprint)
(:require [datomic.api :as d]))
(def db-uri "datomic:dev:4334/ecommerce")
(defn abre-conexao []
(d/create-database db-uri)
(d/connect db-uri))
(defn apaga-banco []
(d/delete-database db-uri))
; Produtos
; id?
nome String 1 = = > Computador Novo
; slug String 1 ==> ... | null | https://raw.githubusercontent.com/alura-cursos/datomic-introducao/cfb214135fed0670ee90090b63a38d8287673ac6/aula3.2/ecommerce/src/ecommerce/db.clj | clojure | Produtos
id?
slug String 1 ==> /computador_novo
id_entidade atributo valor
String sql = "meu codigo sql";
conexao.query(sql)
esse aqui eh similar ao String sql
em clojure
)
não estou usando notacao hungara e extract
eh comum no sql: String sql = "select * from where slug=::SLUG::"
conexao.query(sql, {::SLUG:... | (ns ecommerce.db
(:use clojure.pprint)
(:require [datomic.api :as d]))
(def db-uri "datomic:dev:4334/ecommerce")
(defn abre-conexao []
(d/create-database db-uri)
(d/connect db-uri))
(defn apaga-banco []
(d/delete-database db-uri))
nome String 1 = = > Computador Novo
preco ponto flutuante 1 = = > 3500.... |
f04c76fcedb9d4c40b907c2f6ba01b9a20c0f2522aa88dd5082514a75d2cff58 | metaocaml/ber-metaocaml | main.ml | TEST
modules = " inner.ml alias.ml "
* ocamldoc
ocamldoc_backend="latex "
ocamldoc_flags= " -open . Container -open Aliased_inner "
modules = "inner.ml alias.ml"
* ocamldoc
ocamldoc_backend="latex"
ocamldoc_flags=" -open Alias.Container -open Aliased_inner "
*)
(** Document... | null | https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocamldoc-open/main.ml | ocaml | * Documentation test | TEST
modules = " inner.ml alias.ml "
* ocamldoc
ocamldoc_backend="latex "
ocamldoc_flags= " -open . Container -open Aliased_inner "
modules = "inner.ml alias.ml"
* ocamldoc
ocamldoc_backend="latex"
ocamldoc_flags=" -open Alias.Container -open Aliased_inner "
*)
type t = a
... |
cb8c9bcd96a6c7f4435239bc620fecb7ce32f246ffa4ef9d0466e187c08ad0ef | LadyBoonami/wsedit | Data.hs | module WSEdit.Arguments.Data
( ArgBlock
(..)
, ArgBlockProto
(..)
, Argument
(..)
, FileMatchProto
(..)
, unProtoFM
, unProtoAB
) where
import WSEdit.Data
( CanonicalPath
()
, FileMatch
( MatchFilename
, MatchPath
)
... | null | https://raw.githubusercontent.com/LadyBoonami/wsedit/c230f1f4406ba19b8d9a0f3f96b5667a0e619e01/src/WSEdit/Arguments/Data.hs | haskell | | Block of arguments that share a common file selector.
^ Only match file name
| Argument type. | module WSEdit.Arguments.Data
( ArgBlock
(..)
, ArgBlockProto
(..)
, Argument
(..)
, FileMatchProto
(..)
, unProtoFM
, unProtoAB
) where
import WSEdit.Data
( CanonicalPath
()
, FileMatch
( MatchFilename
, MatchPath
)
... |
187601e7ed9290c4f232ab73f1e9e30c05197e0c5de3527b95ff0a14c660f548 | gigasquid/vsa-clj | intro_to_hdv.clj | (ns intro-to-hdv
(:require
[gigasquid.vsa-base :as vb]))
Following examples in " An Introduction to Hyperdimensional Computing for Robotics "
;; -019-00623-z
(vb/reset-hdv-mem!)
(vb/add-hdv! :name)
(vb/add-hdv! "Alice")
(vb/add-hdv! :yob)
(vb/add-hdv! 1980)
(vb/add-hdv! :high-score)
(vb/add-hdv! 1000)
(d... | null | https://raw.githubusercontent.com/gigasquid/vsa-clj/e11b09d68034b02b7fc9996afe5fb8e9fe0f1fd7/examples/intro_to_hdv.clj | clojure | -019-00623-z
["Alice" #tech.v3.tensor<int8>[1000000]
[:name #tech.v3.tensor<int8>[1000000]
[-1 1 -1 ... -1 -1 -1]] | (ns intro-to-hdv
(:require
[gigasquid.vsa-base :as vb]))
Following examples in " An Introduction to Hyperdimensional Computing for Robotics "
(vb/reset-hdv-mem!)
(vb/add-hdv! :name)
(vb/add-hdv! "Alice")
(vb/add-hdv! :yob)
(vb/add-hdv! 1980)
(vb/add-hdv! :high-score)
(vb/add-hdv! 1000)
(def H
(-> (vb/b... |
6dd993b5ba7bc2e8d5ab3d11595df44bdecd2842688e44c1f6e3e032eae7ff11 | GNOME/gimp-tiny-fu | select-to-pattern.scm | ; GIMP - The GNU Image Manipulation Program
Copyright ( C ) 1995 and
;
; Based on select-to-brush by
Copyright ( c ) 1997
Author , /
;
; Takes the current selection, saves it as a pattern and makes it the active
; pattern
;
; This program is free software: you can redistribute it and/or modify
... | null | https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/select-to-pattern.scm | scheme | GIMP - The GNU Image Manipulation Program
Based on select-to-brush by
Takes the current selection, saves it as a pattern and makes it the active
pattern
This program is free software: you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
This program ... | Copyright ( C ) 1995 and
Copyright ( c ) 1997
Author , /
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(define (script-fu-selection-to-pattern image drawable desc filename)
(let* (
(selection... |
f3d87319272e5df8625153a7d31af2e6c7f959b7a48d59100485564145fe43d8 | ml4tp/tcoq | configure.ml | (**********************************)
* Configuration script for Coq
(**********************************)
(** This file should be run via: ocaml configure.ml <opts>
You could also use our wrapper ./configure <opts> *)
#load "unix.cma"
#load "str.cma"
open Printf
let coq_version = "8.6.1"
* " [ ... ] should be... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/configure.ml | ocaml | ********************************
********************************
* This file should be run via: ocaml configure.ml <opts>
You could also use our wrapper ./configure <opts>
for debugging this script
* * Utility functions
Will be set later on, when the suffix is known
Ensure prog ends with exe
* Splitting a ... |
* Configuration script for Coq
#load "unix.cma"
#load "str.cma"
open Printf
let coq_version = "8.6.1"
* " [ ... ] should be a string comprised of
three non - negative , period - separated integers [ ... ] "
three non-negative, period-separated integers [...]" *)
let vo_magic = 8600
let state_magic = 58600
let ... |
da3d8bff43339388d917233a3d149f63bc14f64509249771b63ba4649bcdbe7a | ppelleti/hs-wiringPi | WiringPi.hs | |
Module : System . Hardware . WiringPi
Description : Bindings to wiringPi library
Copyright : , 2017
License : :
Stability : experimental
Portability :
This is a binding to the < / wiringPi library > .
The functions here ( mostly ) correspond directly to the functions in t... | null | https://raw.githubusercontent.com/ppelleti/hs-wiringPi/18b01a2b9e43dc83638297e96fc8aa6562e1961a/src/System/Hardware/WiringPi.hs | haskell | * Types
* Setup function
| See </ WiringPi Setup functions>.
The only reason to call it manually is if you want to check for errors
numbering scheme is always used internally, but the 'Pin' constructors
allow you to choose whichever numbering scheme you want, on a pin-by-pin
basis. This avoids having to choose ... | |
Module : System . Hardware . WiringPi
Description : Bindings to wiringPi library
Copyright : , 2017
License : :
Stability : experimental
Portability :
This is a binding to the < / wiringPi library > .
The functions here ( mostly ) correspond directly to the functions in t... |
d6aea56d0832c87a6c32b3071fc9b75b2763e174c72202842d37164e8f7a0883 | ajnsit/wai-routes | ContentTypes.hs | # LANGUAGE OverloadedStrings , TypeFamilies #
|
Module : Routes .
Copyright : ( c ) 2013
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable ( uses ghc extensions )
Defines the commonly used content types
Modul... | null | https://raw.githubusercontent.com/ajnsit/wai-routes/4d6b240af57a95353373ddba81c4905db0234459/src/Routes/ContentTypes.hs | haskell | * Construct content Type
* Various common content types
| The request header for accpetable content types
| Construct an appropriate content type header from a file name
| Creates a content type header
Ready to be passed to `responseLBS` | # LANGUAGE OverloadedStrings , TypeFamilies #
|
Module : Routes .
Copyright : ( c ) 2013
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable ( uses ghc extensions )
Defines the commonly used content types
Modul... |
046ca042a004425bc74cafb93571f48ec0a82878173581dabb0f97fb9f8eabbf | rd--/hsc3 | fbSineL.help.hs | --
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/fbSineL.help.hs | haskell | ||
9023547db850962857624ff31c82d5ea433a18a90ecd56bc950e2a7f9a03633d | danielfm/bencode | core.clj | (ns bencode.core
(:require [bencode.protocol :as protocol])
(:use [bencode.type.number]
[bencode.type.string]
[bencode.type.list]
[bencode.type.dict]
[bencode.type.stream])
(:import [java.io ByteArrayOutputStream]))
(defn bencode
"Bencodes the given object."
([obj]
(benco... | null | https://raw.githubusercontent.com/danielfm/bencode/4b47e1c94394c1b5b74171f053873a5df772a8c7/src/main/clojure/bencode/core.clj | clojure | (ns bencode.core
(:require [bencode.protocol :as protocol])
(:use [bencode.type.number]
[bencode.type.string]
[bencode.type.list]
[bencode.type.dict]
[bencode.type.stream])
(:import [java.io ByteArrayOutputStream]))
(defn bencode
"Bencodes the given object."
([obj]
(benco... | |
add9ac2639faaa8f5ba4a893c7bfb6e5b62b442a33281eb88271727a3fe1f558 | BillHallahan/G2 | HigherOrder3.hs | {-@ LIQUID "--short-names" @-}
{-@ LIQUID "--no-termination" @-}
{-@ LIQUID "--prune-unsorted" @-}
module Combined () where
{-@ m :: (Int -> Int) -> { ys:Int | false } @-}
m :: (Int -> Int) -> Int
m f = f 1 | null | https://raw.githubusercontent.com/BillHallahan/G2/21c648d38c380041a9036d0e375ec1d54120f6b4/tests_lh/Liquid/HigherOrder3.hs | haskell | @ LIQUID "--short-names" @
@ LIQUID "--no-termination" @
@ LIQUID "--prune-unsorted" @
@ m :: (Int -> Int) -> { ys:Int | false } @ |
module Combined () where
m :: (Int -> Int) -> Int
m f = f 1 |
c9b11eb2eeacdf2bf3e812932d9b0f72b33df1c7ad48b0e42043057abc910c9e | unclebob/AdventOfCode2021 | core_spec.clj | (ns day10.core-spec
(:require [speclj.core :refer :all]
[day10.core :refer :all]))
(describe "parses input"
(it "simply breaks into lines"
(should= ["abc" "def"] (parse-input "abc\ndef\n")))
)
(describe "utilities"
(it "empty string is a chunk"
(should= "" (parse-chunk "")))
(it "knows ... | null | https://raw.githubusercontent.com/unclebob/AdventOfCode2021/ad3f8dbd051b51b8321311348e0df06b742ec1f6/day10/spec/day10/core_spec.clj | clojure | (ns day10.core-spec
(:require [speclj.core :refer :all]
[day10.core :refer :all]))
(describe "parses input"
(it "simply breaks into lines"
(should= ["abc" "def"] (parse-input "abc\ndef\n")))
)
(describe "utilities"
(it "empty string is a chunk"
(should= "" (parse-chunk "")))
(it "knows ... | |
44e64d532e44e42d2a2ff5622f1d8a1afc9bca7d37928887cc11296e54b07783 | lamdu/momentu | Align.hs | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , TypeFamilies #
# LANGUAGE UndecidableInstances , FlexibleInstances #
module GUI.Momentu.Align
( Aligned(..), alignmentRatio, value
, boxAlign, hboxAlign, vboxAlign
, WithTextPos(..), textTop, tValue
,... | null | https://raw.githubusercontent.com/lamdu/momentu/7ba3c75469cfbad521d446e2bbefee1ed69d4406/src/GUI/Momentu/Align.hs | haskell | | Vertical glue takes the top text pos
Duplicates the logic from underlying glue: | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
# LANGUAGE TemplateHaskell , MultiParamTypeClasses , TypeFamilies #
# LANGUAGE UndecidableInstances , FlexibleInstances #
module GUI.Momentu.Align
( Aligned(..), alignmentRatio, value
, boxAlign, hboxAlign, vboxAlign
, WithTextPos(..), textTop, tValue
,... |
f05cf84eef6f42134c1a90584963f0cca9d8b97243a48ad6e658ed9486fb419d | cljfx/cljfx | anchor_pane.clj | (ns cljfx.fx.anchor-pane
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.fx.pane :as fx.pane]
[cljfx.prop :as prop]
[cljfx.mutator :as mutator])
(:import [javafx.scene.layout AnchorPane]))
(set! *warn-on-refle... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/anchor_pane.clj | clojure | (ns cljfx.fx.anchor-pane
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.fx.pane :as fx.pane]
[cljfx.prop :as prop]
[cljfx.mutator :as mutator])
(:import [javafx.scene.layout AnchorPane]))
(set! *warn-on-refle... | |
95dcdfd42de655aa7243b59814acde955795ca08bc081105cff95ce8eecd3fa9 | mlabs-haskell/bot-plutus-interface | Main.hs | # LANGUAGE TemplateHaskell #
module Main (main) where
import BotPlutusInterface qualified
import BotPlutusInterface.Config qualified as BotPlutusInterface
import BotPlutusInterface.Types (
HasDefinitions (..),
SomeBuiltin (..),
endpointsToSchemas,
)
import Cardano.PlutusExample.Game (
GameSchema,
GuessPara... | null | https://raw.githubusercontent.com/mlabs-haskell/bot-plutus-interface/1ab405a131c4dea2fbc85873da38f85b7a08e229/examples/plutus-game/app/Main.hs | haskell | # LANGUAGE TemplateHaskell #
module Main (main) where
import BotPlutusInterface qualified
import BotPlutusInterface.Config qualified as BotPlutusInterface
import BotPlutusInterface.Types (
HasDefinitions (..),
SomeBuiltin (..),
endpointsToSchemas,
)
import Cardano.PlutusExample.Game (
GameSchema,
GuessPara... | |
b3d25c744e1c7c83fce3a7b4685ac36533abb0111e77c116ba29eaedd7c26880 | haroldcarr/learn-haskell-coq-ml-etc | E6ReadUtf8WriteUtf16.hs | #!/usr/bin/env stack
-- stack --resolver lts-8.12 script
# OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -fno - warn - type - defaults #
{-# LANGUAGE OverloadedStrings #-}
module E6ReadUtf8WriteUtf16 where
import qualified Data.ByteString as B
import Data.Text.Encoding as TE
e6 =... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/course/2017-05-snoyman-applied-haskell-at-lambdaconf/E6ReadUtf8WriteUtf16.hs | haskell | stack --resolver lts-8.12 script
# LANGUAGE OverloadedStrings # | #!/usr/bin/env stack
# OPTIONS_GHC -fno - warn - missing - signatures #
# OPTIONS_GHC -fno - warn - type - defaults #
module E6ReadUtf8WriteUtf16 where
import qualified Data.ByteString as B
import Data.Text.Encoding as TE
e6 = main
main :: IO ()
main = do
let nameIn = "E6ReadUtf8WriteUtf16.h... |
9cc44c5c994794bd87805210b72c8f35385037a3b544b85def9d737acc28ba65 | haroldcarr/learn-haskell-coq-ml-etc | X_2012_01_04_state.hs | module X_2012_01_04_state
where
Created : 2014 Oct 21 ( Tue ) 14:51:28 by .
Last Modified : 2015 Sep 01 ( Tue ) 14:46:08 by .
-for-mainstream-programmers_04.html
Created : 2014 Oct 21 (Tue) 14:51:28 by Harold Carr.
Last Modified : 2015 Sep 01 (Tue) 14:46:08 by Harold Carr.
-for-mainstream-pro... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/general/haskellforall/src/X_2012_01_04_state.hs | haskell | actually a newtype, and output flipped
put (update state)
example:
explicit lambda version
remove boilerplate : manually passing state around above.
shorten original code
do notation not just syntactic sugar for stateful functions, syntactic sugar for anything that's a monad
i.e. type IO a = RealWorld - > ( a ,... | module X_2012_01_04_state
where
Created : 2014 Oct 21 ( Tue ) 14:51:28 by .
Last Modified : 2015 Sep 01 ( Tue ) 14:46:08 by .
-for-mainstream-programmers_04.html
Created : 2014 Oct 21 (Tue) 14:51:28 by Harold Carr.
Last Modified : 2015 Sep 01 (Tue) 14:46:08 by Harold Carr.
-for-mainstream-pro... |
5a6d1b32791b5440dc955e81f9975e8e11b391dbf1a28e604963977736ed2f24 | okTurtles/strings | strings.ml | open! Core
type line =
| Translation of (string * string)
| Comment
let parser =
let open Angstrom in
let open Basic in
let double_quoted_string = escapable_string_parser ~escape:'\\' ~separator:'"' in
let line =
lift2
(fun x y -> Translation (x, y))
(mlws *> double_quoted_string <* mlws <... | null | https://raw.githubusercontent.com/okTurtles/strings/f893f71c0bce2bb7630fd1ba6f9da35880c66ae1/src/parsing/strings.ml | ocaml | open! Core
type line =
| Translation of (string * string)
| Comment
let parser =
let open Angstrom in
let open Basic in
let double_quoted_string = escapable_string_parser ~escape:'\\' ~separator:'"' in
let line =
lift2
(fun x y -> Translation (x, y))
(mlws *> double_quoted_string <* mlws <... | |
a6464a723e88c46529474e9ddfb265dda9dc30bc1e991d41afefb68f2be09af0 | synduce/Synduce | mts.ml | type 'a list = Nil | Cons of 'a * 'a list
let rec spec l = (sum l, mts l)
and sum = function Nil -> 0 | Cons (hd, tl) -> hd + sum tl
and mts = function Nil -> 0 | Cons (hd, tl) -> max (hd + sum tl) (mts tl)
let rec target t = f [%synt s0] t
and f s = function Nil -> s | Cons (hd, tl) -> f ([%synt oplus] s hd) tl
| null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/combine/mts.ml | ocaml | type 'a list = Nil | Cons of 'a * 'a list
let rec spec l = (sum l, mts l)
and sum = function Nil -> 0 | Cons (hd, tl) -> hd + sum tl
and mts = function Nil -> 0 | Cons (hd, tl) -> max (hd + sum tl) (mts tl)
let rec target t = f [%synt s0] t
and f s = function Nil -> s | Cons (hd, tl) -> f ([%synt oplus] s hd) tl
| |
8ebd10b2b82a7ad213a2e12866369ce4d2dbddc28334b629ad21929f435d944f | jorinvo/letsdo.events | auth.clj | (ns lde.core.auth
(:refer-clojure :exclude [hash])
(:require [buddy.hashers :as hashers]))
(def password-algorithm :bcrypt+blake2b-512)
(defn hash [s]
(hashers/derive s {:alg password-algorithm}))
(defn validate [password hash]
(hashers/check password hash))
(comment
(validate "hi" (hash "hi"))
)
| null | https://raw.githubusercontent.com/jorinvo/letsdo.events/4cd2a5d401d37524c0bac265f48923ab5f91b220/src/lde/core/auth.clj | clojure | (ns lde.core.auth
(:refer-clojure :exclude [hash])
(:require [buddy.hashers :as hashers]))
(def password-algorithm :bcrypt+blake2b-512)
(defn hash [s]
(hashers/derive s {:alg password-algorithm}))
(defn validate [password hash]
(hashers/check password hash))
(comment
(validate "hi" (hash "hi"))
)
| |
f13ca84ab47462c76ca93703306e4545841feacfd9f90044fd6215d41f0d78d5 | ladderlife/autochrome | core.clj | (ns autochrome.core
(:require [autochrome.diff :as diff]
[autochrome.github :as github]
[autochrome.page :as page]
[clojure.java.io :as io]
[clojure.tools.cli :as cli])
(:import [java.awt Desktop]
[java.io File])
(:gen-class))
(def cli-options
[[nil "-... | null | https://raw.githubusercontent.com/ladderlife/autochrome/d454e4450658b4799bfd939f2a84690921800806/src/autochrome/core.clj | clojure | (ns autochrome.core
(:require [autochrome.diff :as diff]
[autochrome.github :as github]
[autochrome.page :as page]
[clojure.java.io :as io]
[clojure.tools.cli :as cli])
(:import [java.awt Desktop]
[java.io File])
(:gen-class))
(def cli-options
[[nil "-... | |
4077355062851fe25113e5d6de932717036b82a66193f158da22edf1b8a1c5cb | mpickering/apply-refact | Default84.hs | pairs (x:xs) = map (\y -> (x,y)) xs ++ pairs xs | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default84.hs | haskell | pairs (x:xs) = map (\y -> (x,y)) xs ++ pairs xs | |
881800e13b05967a65a6895fa4aabc19dc0cacb562fe33f890c23305cdf55ba9 | jrheard/voke | core.cljs | (ns voke.core
(:require [cljs.spec.test :as stest]
[voke.entity :as e]
[voke.events]
[voke.clock :refer [add-time!]]
[voke.state :refer [make-game-state add-entity!]]
[voke.system.core :refer [initialize-systems! process-a-tick]]
[voke.system.ren... | null | https://raw.githubusercontent.com/jrheard/voke/15b272955d214ce0c531fb2b8d645feb217255c2/src/voke/core.cljs | clojure | Useful in dev, so figwheel doesn't cause a jillion ticks of the system to happen at once | (ns voke.core
(:require [cljs.spec.test :as stest]
[voke.entity :as e]
[voke.events]
[voke.clock :refer [add-time!]]
[voke.state :refer [make-game-state add-entity!]]
[voke.system.core :refer [initialize-systems! process-a-tick]]
[voke.system.ren... |
0f88783ab99ed050b83f3267f5dc535a9b1332780881f5e53947b2c22c2b67ed | cse-bristol/110-thermos-ui | admin.clj | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-backend.pages.admin
(:require [thermos-backend.pages.common :refer [page]]
[thermos-backend.db.users :refer [user-... | null | https://raw.githubusercontent.com/cse-bristol/110-thermos-ui/e13b96329f3c95e5a10bae431e8ae9bccdb475f4/src/thermos_backend/pages/admin.clj | clojure | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-backend.pages.admin
(:require [thermos-backend.pages.common :refer [page]]
[thermos-backend.db.users :refer [user-... | |
6dcced599c909ab6453decb653ad92e483dc40fb1166b6a05ecf299360422000 | appleshan/cl-http | cl-http-70-50.lisp | -*- Mode : lisp ; Syntax : common - lisp ; Package : user ; Base : 10 ; Patch - File : t -*-
Patch file for CL - HTTP version 70.50
;;; Reason: Function HTTP::PRINT-VIA-HEADER: -
;;; Function HTML::%WRITE-MAKE-FONT-ARGS: handle negative relative sizez.
Function HTTP::%EXECUTE - REQUEST : do n't escape URLs an... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-50.lisp | lisp | Syntax : common - lisp ; Package : user ; Base : 10 ; Patch - File : t -*-
Reason: Function HTTP::PRINT-VIA-HEADER: -
Function HTML::%WRITE-MAKE-FONT-ARGS: handle negative relative sizez.
Function WWW-UTILS:CLEAN-UP-CONTIGUOUS-FILE-VERSIONS: don't error if there is no pathname there.
DOMAIN - FIXES.LISP.33 ) ,
M... | Patch file for CL - HTTP version 70.50
Function HTTP::%EXECUTE - REQUEST : do n't escape URLs and finese broken search URLS .
Written by JCMa , 5/23/00 19:29:23
while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod
with Open Genera 2.0 , Genera 8.5 , Documentatio... |
a09c233962bfda80dd85d5259a987f20470038993e8b2f6d3caacac4f09f77b6 | disco-lang/disco | Typecheck.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE GADTs #
# LANGUAGE KindSignatures #
{-# LANGUAGE TypeOperators #-}
A version of Typecheck.agda . We have no dependent types
-- here to ensure we are doing it properly, which is why it's helpful
to model it on the Agda version .
module Typecheck where
impor... | null | https://raw.githubusercontent.com/disco-lang/disco/68b96b233b04f26229fe6277678eeb8710422523/explore/typecheck/Typecheck.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
here to ensure we are doing it properly, which is why it's helpful
----------------------------------------------------------
Types and type equality
----------------------------------------------------------
Sym m means t2 ~/~ t1 where m proves t1 ~/~ t2
N... | # LANGUAGE GADTs #
# LANGUAGE KindSignatures #
A version of Typecheck.agda . We have no dependent types
to model it on the Agda version .
module Typecheck where
import qualified Data.Map as M
data Type where
Nat :: Type
(:=>) :: Type -> Type -> Type
infixr 0 :=>
In general , ( m : : ) pr... |
11286c0fe04a6b5a9a5281c63465f90d7a5a226ed212cd4c125b36b06c365f81 | ocaml-flambda/flambda-backend | translcore.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/14e94c382a2ea09956a217c1ffb25ad5c24e3c89/ocaml/lambda/translcore.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Asttypes
open Primitive
open Types
open Typedtree
open Typeopt
open Lambda
open Translmod... |
f9af61d23a630d1a2d8ccc4e31072f6e06122675f6b2ccc455f8eab0874b6321 | reflex-frp/reflex-vty | Layout.hs | |
Module : Reflex . Vty . Widget . Layout
Description : transformer and tools for arranging widgets and building screen layouts
Module: Reflex.Vty.Widget.Layout
Description: Monad transformer and tools for arranging widgets and building screen layouts
-}
{-# Language UndecidableInstances #-}
module Reflex.Vty.W... | null | https://raw.githubusercontent.com/reflex-frp/reflex-vty/832956cf4c679a642509ebfe11160e5449558a74/src/Reflex/Vty/Widget/Layout.hs | haskell | # Language UndecidableInstances #
* Focus
$focus
The focus monad tracks which element is currently focused and processes
can manually request focus or receive focus due to some other action (e.g.,
a tab press in a sibling element, a click event).
more find-grained control of focus behavior.
** Storing focus s... | |
Module : Reflex . Vty . Widget . Layout
Description : transformer and tools for arranging widgets and building screen layouts
Module: Reflex.Vty.Widget.Layout
Description: Monad transformer and tools for arranging widgets and building screen layouts
-}
module Reflex.Vty.Widget.Layout where
import Control.App... |
3c0de53d7d586cb024f00baaccf9b5fcb2c3523923b6bb04d7537ae034164cac | adomokos/haskell-katas | Ex66_ExercisesBalancedBinaryTreeSpec.hs | module Solutions.Ex66_ExercisesBalancedBinaryTreeSpec
( spec
) where
import Test.Hspec
import Data.List
main :: IO ()
main = hspec spec
Given this tree :
20
10 30
5 15 18 35
Given this tree:
20
10 30
5 15 18 35
-}
data Tree a
= Leaf
| Node a
(Tree a)
... | null | https://raw.githubusercontent.com/adomokos/haskell-katas/be06d23192e6aca4297814455247fc74814ccbf1/test/Solutions/Ex66_ExercisesBalancedBinaryTreeSpec.hs | haskell | module Solutions.Ex66_ExercisesBalancedBinaryTreeSpec
( spec
) where
import Test.Hspec
import Data.List
main :: IO ()
main = hspec spec
Given this tree :
20
10 30
5 15 18 35
Given this tree:
20
10 30
5 15 18 35
-}
data Tree a
= Leaf
| Node a
(Tree a)
... | |
cdcc7d33c06078ea3874bccc1662f0f8d96649607abfc9c74a664c797532db87 | puffnfresh/sonic2 | Collision.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
module Game.Sega.Sonic.Collision (
CollisionBlock(..)
, collisionHeight
, collisionBitmap
, loadCollisionTexture
, loadCollisionBlocks
, loadCollisionIndex
) where
import Control.Applicative (liftA2)
import Control.Len... | null | https://raw.githubusercontent.com/puffnfresh/sonic2/0abc3e109a847582c2e16edb13e83e611419fc8a/src/Game/Sega/Sonic/Collision.hs | haskell | # LANGUAGE FlexibleContexts #
| <-cult.org/SCHG/General/CollisionFormat/CollisionFormat.htm SCHG page on the collision format> | # LANGUAGE MultiParamTypeClasses #
module Game.Sega.Sonic.Collision (
CollisionBlock(..)
, collisionHeight
, collisionBitmap
, loadCollisionTexture
, loadCollisionBlocks
, loadCollisionIndex
) where
import Control.Applicative (liftA2)
import Control.Lens (ix, view, (^?))
import ... |
4b82724a7c544e319d7cc201b220fdd3f86b1eb8420706fe97b8d26d6fb18a39 | clojure-quant/infra-guix | channels-arm.scm | ;; This channel file can be passed to 'guix pull -C' or to
' guix time - machine -C ' to obtain the revision that was
;; used to populate this profile.
; (append
(list
(channel
(name 'guix)
(url ""))
(channel
(name 'nonguix)
(url "")) ; binary build system, clojure, d... | null | https://raw.githubusercontent.com/clojure-quant/infra-guix/ee047dcae9347dff319b5a0173dc108e430cfdfb/channels-arm.scm | scheme | This channel file can be passed to 'guix pull -C' or to
used to populate this profile.
(append
binary build system, clojure, dotnet, wine
rdesktop
(channel
(name 'gorilla)
vs - codium
%default-channels) | ' guix time - machine -C ' to obtain the revision that was
(list
(channel
(name 'guix)
(url ""))
(channel
(name 'nonguix)
(channel
(name 'science)
)
|
4b70895d07770f41a3e599ba3302e9c09ccacb932010b99db0ad935c2fdc3241 | Frama-C/Frama-C-snapshot | basic.ml | This datatype tests the bug fix of BTS # 1277
module A =
Datatype.Pair
(Datatype.List(Datatype.String))
(Datatype.List(Datatype.String))
module StateA =
State_builder.Ref
(Datatype.Int)
(struct
let name = "Project.Test.StateA"
let dependencies = []
let default () = 0
end)
... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/tests/saveload/basic.ml | ocaml | This datatype tests the bug fix of BTS # 1277
module A =
Datatype.Pair
(Datatype.List(Datatype.String))
(Datatype.List(Datatype.String))
module StateA =
State_builder.Ref
(Datatype.Int)
(struct
let name = "Project.Test.StateA"
let dependencies = []
let default () = 0
end)
... | |
46499e3c2f39d8209c568bc88d8d8bfa5f6460914b6f6337f56a91cadd2bbd7d | folq/haskell-to-elm | DerivingVia.hs | # language DataKinds #
{-# language DeriveAnyClass #-}
# language DeriveGeneric #
{-# language DerivingVia #-}
{-# language FlexibleContexts #-}
# language KindSignatures #
# language MultiParamTypeClasses #
{-# language OverloadedStrings #-}
{-# language ScopedTypeVariables #-}
# language TypeApplications #
{-# langua... | null | https://raw.githubusercontent.com/folq/haskell-to-elm/8621bb349611787726a0a3f85990ed1a56e26dec/examples/DerivingVia.hs | haskell | # language DeriveAnyClass #
# language DerivingVia #
# language FlexibleContexts #
# language OverloadedStrings #
# language ScopedTypeVariables #
# language UndecidableInstances #
-----------------------------------------------------------------------------
A type to derive via, which should typically only be defined... | # language DataKinds #
# language DeriveGeneric #
# language KindSignatures #
# language MultiParamTypeClasses #
# language TypeApplications #
module DerivingVia where
import qualified Data.Aeson as Aeson
import Data.Foldable
import qualified Data.HashMap.Lazy as HashMap
import Data.Proxy
import Data.String (fromStrin... |
e706cf867bec0671d0ca335a24f17df04966d7dbb0ba027cb482be4aa1d087a8 | alexandergunnarson/quantum | transcode.cljc | (ns quantum.core.io.transcode)
TODO the logic in here is good , but it requires the |sh| dep which is at the moment incomplete / broken
(comment "
Advanced Audio Coding (AAC) is the successor format to MP3.
It is defined in MPEG-4 part 3 (ISO/IEC 14496-3).
It is often used within an MP4 container format;
for music... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/io/transcode.cljc | clojure |
average | (ns quantum.core.io.transcode)
TODO the logic in here is good , but it requires the |sh| dep which is at the moment incomplete / broken
(comment "
Advanced Audio Coding (AAC) is the successor format to MP3.
It is defined in MPEG-4 part 3 (ISO/IEC 14496-3).
for music the .m4a extension is customarily used.
Conta... |
aa0c81372ed2c7e7798135dec138daedc74f567b96badad80c12fab90d48b275 | rajasegar/ccl-demo-raja | layout.lisp | (in-package :ccl-demo-raja)
(defmacro demo-page ((&key title active) &body body)
`(with-html-output-to-string
(*standard-output* nil :prologue t :indent t)
(:html :lang "en"
(:head
(:meta :charset "utf-8")
(:title, title)
(:link :href "/styles.css" :rel "stylesheet")
)
(... | null | https://raw.githubusercontent.com/rajasegar/ccl-demo-raja/d30e82ba85f8ee4ed25b471f3f8d3f29e483c039/views/layout.lisp | lisp | (in-package :ccl-demo-raja)
(defmacro demo-page ((&key title active) &body body)
`(with-html-output-to-string
(*standard-output* nil :prologue t :indent t)
(:html :lang "en"
(:head
(:meta :charset "utf-8")
(:title, title)
(:link :href "/styles.css" :rel "stylesheet")
)
(... | |
0f8f07c73720ffd5cd5b85a98805bf2b20e852b07cd996ba9442aede9aa2a34f | BernhardWenzel/clojure-spell-checker-beginner-tutorial | core_test.clj | (ns clojure-spellchecker.core-test
(:require [clojure.test :refer :all]
[clojure-spellchecker.core :refer :all]))
(deftest spelling-test
(testing
(is (= "spelling" (min-distance "spellling")))
(is (= "spelling" (min-distance "spellling")))
(is (= "spilling" (min-distance "spillling")))
... | null | https://raw.githubusercontent.com/BernhardWenzel/clojure-spell-checker-beginner-tutorial/ca6363e717e9663a6fc5c5368312a0663b663759/test/clojure_spellchecker/core_test.clj | clojure | (ns clojure-spellchecker.core-test
(:require [clojure.test :refer :all]
[clojure-spellchecker.core :refer :all]))
(deftest spelling-test
(testing
(is (= "spelling" (min-distance "spellling")))
(is (= "spelling" (min-distance "spellling")))
(is (= "spilling" (min-distance "spillling")))
... | |
7ef2f880bb3a4dc6ace371ac847b3ecf15171ee9c5ad2c0fa0cda0710845b0bf | bravit/hid-examples | implemented-show.hs | # LANGUAGE StandaloneDeriving #
import Person
instance Show Person where
show (Person name Nothing) = name
show (Person name (Just age)) = name ++ " (" ++ show age ++ ")"
main :: IO ()
main = do
print homer
print spj
| null | https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch02/person/implemented-show.hs | haskell | # LANGUAGE StandaloneDeriving #
import Person
instance Show Person where
show (Person name Nothing) = name
show (Person name (Just age)) = name ++ " (" ++ show age ++ ")"
main :: IO ()
main = do
print homer
print spj
| |
05d7f213ed63baafba85c16cbb0a3585f6393c107b0a1c975330c57de543823f | benzap/fif | repl.cljc | (ns fif.stdlib.repl
"Includes operations which are used primarily in a fif repl."
(:require
[clojure.string :as str]
[fif.stack-machine.stash :as stack-machine.stash]
[fif.stack-machine.words :as words]
[fif.stack-machine.mode :as mode]
[fif.stack-machine :as stack]))
(def arg-meta-op 'meta)
(d... | null | https://raw.githubusercontent.com/benzap/fif/972adab8b86c016b04babea49d52198585172fe3/src/fif/stdlib/repl.cljc | clojure |
Group Mode
Remove any entries that are part of stdlib, and keep any
words without metadata
TODO: use proper mode function | (ns fif.stdlib.repl
"Includes operations which are used primarily in a fif repl."
(:require
[clojure.string :as str]
[fif.stack-machine.stash :as stack-machine.stash]
[fif.stack-machine.words :as words]
[fif.stack-machine.mode :as mode]
[fif.stack-machine :as stack]))
(def arg-meta-op 'meta)
(d... |
f21848239a3ecbfa5a110fd6f9658ba9b2b18c462df9a3cb16831ed75dda292f | ml4tp/tcoq | nativecode.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/kernel/nativecode.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Local names *
* Global names *
pr... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open CErrors
open Names
open ... |
3260bb3986e58f44bfd18479e1ea0df391e0df7d1b2641eb1d7c0f3cbb181b57 | 2600hz-archive/whistle | proper_fsm.erl | Copyright 2010 - 2011 < > ,
< >
and < >
%%%
This file is part of PropEr .
%%%
%%% PropEr is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/proper-1.0/src/proper_fsm.erl | erlang |
PropEr is free software: you can redistribute it and/or modify
(at your option) any later version.
PropEr is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License fo... | Copyright 2010 - 2011 < > ,
< >
and < >
This file is part of PropEr .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Pub... |
0b0dc13e6411d66c3c6b9c321947397594e59e63908660efc21fe8b52813b8e7 | chrovis/cljam | sam_bench.clj | (ns cljam.io.sam-bench
(:require [libra.bench :refer [defbench are]]
[libra.criterium :as c]
[clojure.java.io :as cio]
[cljam.test-common :as tcommon]
[cljam.util :as util]
[cljam.io.sam :as sam]))
(defbench encode-alignment-short-bench
(are [f]
(u... | null | https://raw.githubusercontent.com/chrovis/cljam/2cfa13e197df782ee3245e780d3a2b720d1f8e1b/bench/cljam/io/sam_bench.clj | clojure | (ns cljam.io.sam-bench
(:require [libra.bench :refer [defbench are]]
[libra.criterium :as c]
[clojure.java.io :as cio]
[cljam.test-common :as tcommon]
[cljam.util :as util]
[cljam.io.sam :as sam]))
(defbench encode-alignment-short-bench
(are [f]
(u... | |
7e1188b2c99f4741138d182e1be197eb2e1515f4213d457a43f0bf6a6966f603 | shoreleave/shoreleave-browser | blob.cljs | (ns shoreleave.browser.blob
"An idiomatic interface to Blobs")
;; -----
;;
HTML5 File API supports the creation of .
;;
allow you to take arbitrary text ( like functions ) and create file - like
;; objects, that get their own unique URL wuth a `blob://...` schema.
;;
;; This is useful if you're making an ap... | null | https://raw.githubusercontent.com/shoreleave/shoreleave-browser/8623525398eaf3d7bfba88ee22f608f282df2af9/src/shoreleave/browser/blob.cljs | clojure | -----
objects, that get their own unique URL wuth a `blob://...` schema.
This is useful if you're making an app that wants to use on-demand assets,
or you need to build something like embedded web workers.
It also comes in handy if you want to build dynamic content on the fly,
like streaming images.
To crea... | (ns shoreleave.browser.blob
"An idiomatic interface to Blobs")
HTML5 File API supports the creation of .
allow you to take arbitrary text ( like functions ) and create file - like
The [ / en - US / docs / DOM / Blob ) is now a stable spec in HTML5 .
(defn- window-url-prop
[]
(or (.-URL js/window) (... |
12629b9223709d6e8ead2671a80c5438eb6341567446f64c7eea174f82234380 | Clojure2D/clojure2d-examples | moving_sphere.clj | (ns rt4.the-next-week.ch05c.moving-sphere
(:require [rt4.the-next-week.ch05c.hittable :as hittable]
[rt4.the-next-week.ch05c.interval :as interval]
[rt4.the-next-week.ch05c.ray :as ray]
[fastmath.core :as m]
[fastmath.vector :as v]
[rt4.the-next-week.ch05c.a... | null | https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch05c/moving_sphere.clj | clojure | (ns rt4.the-next-week.ch05c.moving-sphere
(:require [rt4.the-next-week.ch05c.hittable :as hittable]
[rt4.the-next-week.ch05c.interval :as interval]
[rt4.the-next-week.ch05c.ray :as ray]
[fastmath.core :as m]
[fastmath.vector :as v]
[rt4.the-next-week.ch05c.a... | |
9bda7aa5c95a97020798abee57d63b9f2dbd3d3830de58fd3a37786bc550d7c8 | TristeFigure/shuriken | virtual_test_namespace.clj | (ns shuriken.virtual-test-namespace)
(def a-var :a-var)
(def another-var :another-var)
(def .dot-var :dot-var)
(deftype AType [])
(defprotocol AProtocol)
| null | https://raw.githubusercontent.com/TristeFigure/shuriken/cd36dd2a4005c85260125d89d5a3f475d248e6e4/test/shuriken/virtual_test_namespace.clj | clojure | (ns shuriken.virtual-test-namespace)
(def a-var :a-var)
(def another-var :another-var)
(def .dot-var :dot-var)
(deftype AType [])
(defprotocol AProtocol)
| |
cef08953e43ca5f21702c9a6c3366659faee1f9134040cf5dc98eb618ccc0f43 | LeapYear/aeson-schemas | MkGetter.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Tests.MkGetter where
import Control.DeepSeq (deepseq)
import Data.Text (Text)
import Language.Haskell.TH.TestU... | null | https://raw.githubusercontent.com/LeapYear/aeson-schemas/b1788b06e98c5f74ee951a18883e703602d7dbcd/test/Tests/MkGetter.hs | haskell | # LANGUAGE OverloadedStrings #
run same mkGetter expression that was spliced, for coverage | # LANGUAGE DataKinds #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Tests.MkGetter where
import Control.DeepSeq (deepseq)
import Data.Text (Text)
import Language.Haskell.TH.TestUtils (
QMode (..),
QState (..),... |
0dea7fcae663fb5cd30662483fb4586b432cf97f707f777f9ece802b79768b6b | juspay/euler-hs | HttpAPI.hs | {-# LANGUAGE DeriveAnyClass #-}
|
Module : EulerHS.Core . Types . HttpAPI
Copyright : ( C ) Juspay Technologies Pvt Ltd 2019 - 2022
License : Apache 2.0 ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable
This module contains type... | null | https://raw.githubusercontent.com/juspay/euler-hs/0fdda6ef43c1a6c9c7221d7c194c278e375b9936/src/EulerHS/Core/Types/HttpAPI.hs | haskell | # LANGUAGE DeriveAnyClass #
* Core Logger
** Types
^ timeout, in microseconds
| Used when some IO (or other) exception ocurred during a request
------------------------------------------------------------------------
Convenience functions
------------------------------------------------------------------------
| ... |
|
Module : EulerHS.Core . Types . HttpAPI
Copyright : ( C ) Juspay Technologies Pvt Ltd 2019 - 2022
License : Apache 2.0 ( see the file LICENSE )
Maintainer :
Stability : experimental
Portability : non - portable
This module contains types and helper functions for the l... |
f5072f03288f37e59f6e8451822162baf08c40110e3264e7a40496ca4ac4b608 | hunt-framework/hunt | Documents.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE PatternGuards #
# LANGUAGE RecordWildCards #
module Hunt.SegmentIndex.Directory.Documents where
import Hunt.Common.BasicTypes
import Hunt.Common.DocDesc (FieldValue (..))
import qualified Hunt.Common.DocDesc as DocDesc
imp... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-searchengine/src/Hunt/SegmentIndex/Directory/Documents.hs | haskell | # LANGUAGE BangPatterns #
for efficient retrieval.
For each field of a document write the fields one
by one, sorted in 'fields' order.
For each document write its fields to the
field data buffer
write the offset of the document field data
to the document field index.
Helper which flushes and retries if buffe... | # LANGUAGE PatternGuards #
# LANGUAGE RecordWildCards #
module Hunt.SegmentIndex.Directory.Documents where
import Hunt.Common.BasicTypes
import Hunt.Common.DocDesc (FieldValue (..))
import qualified Hunt.Common.DocDesc as DocDesc
import Hunt.Common.DocId
i... |
31608ce5ad5d7a96c6cd5d8c39e59b9c0d77c5a1c8b5d1cfd83bc4d8fdec4248 | cphyc/compilateur | ast.mli | Définition de la structure de l'arbre de syntaxe abstraite
(* Localisation d'un token *)
type loc = Lexing.position * Lexing.position
(* Ensemble de type de l'arbre de syntaxe abstraite *)
type fichier = {iostr: bool; fichierDecl: decl list; fichierLoc: loc}
and decl =
| DeclVars of declVars
| DeclClass of declCl... | null | https://raw.githubusercontent.com/cphyc/compilateur/6df0919f45d322f6f7d0ef27a3d6376d7d274d91/ast.mli | ocaml | Localisation d'un token
Ensemble de type de l'arbre de syntaxe abstraite | Définition de la structure de l'arbre de syntaxe abstraite
type loc = Lexing.position * Lexing.position
type fichier = {iostr: bool; fichierDecl: decl list; fichierLoc: loc}
and decl =
| DeclVars of declVars
| DeclClass of declClass
| ProtoBloc of proto * bloc
and declVars = {declVarsTyp: typ; varList: var l... |
5df3b88004f02981af0fcb83d885364656f0145ad79dc838671dea2adacb8f9f | tonsky/down-the-rabbit-hole | core.clj | (ns down-the-rabbit-hole.core
(:refer-clojure :exclude [find])
(:require
[clojure.java.io :as io]
[clojure.stacktrace :as stacktrace]
[clojure.string :as str]
[datascript.core :as ds])
(:import
[java.io ByteArrayOutputStream]
[java.util Random]
[org.jetbrains.skija Canvas Color4f Font FontSty... | null | https://raw.githubusercontent.com/tonsky/down-the-rabbit-hole/0629b7cbad7cf3b44b40efc443e305b70ea0ed40/src/down_the_rabbit_hole/core.clj | clojure | (ns down-the-rabbit-hole.core
(:refer-clojure :exclude [find])
(:require
[clojure.java.io :as io]
[clojure.stacktrace :as stacktrace]
[clojure.string :as str]
[datascript.core :as ds])
(:import
[java.io ByteArrayOutputStream]
[java.util Random]
[org.jetbrains.skija Canvas Color4f Font FontSty... | |
88bd91ded2eddad1b652a86f7264c2202be3a63f7c8a9e3aab546566eae7b49a | khotyn/4clojure-answer | 150-palindromic-numbers.clj | (defn palindromic-num [num]
(letfn [(reverse-digit [num result]
(if
(zero? (quot num 10))
(+ (mod num 10) (* result 10))
(reverse-digit (quot num 10) (+ (mod num 10) (* result 10)))))
(palindromic-in-i-digit [low up]
(lazy-cat
(... | null | https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/150-palindromic-numbers.clj | clojure | (defn palindromic-num [num]
(letfn [(reverse-digit [num result]
(if
(zero? (quot num 10))
(+ (mod num 10) (* result 10))
(reverse-digit (quot num 10) (+ (mod num 10) (* result 10)))))
(palindromic-in-i-digit [low up]
(lazy-cat
(... | |
3cc4f50b04fadd7e1a82a31844e1e705548bd0237a71f2750107aa044427cd5f | zenhack/mule | intrinsics.ml | open Common_ast
module C = Const
module D = Desugared_ast
module R = Runtime_ast
module S = Surface_ast
open Typecheck_types
let int_t = D.Type.Named{n_info = ktype; n_name = `Int}
let text_t = D.Type.Named{n_info = ktype; n_name = `Text}
let fn_t p r = D.Type.Fn {
fn_info = ktype;
fn_pvar = None;
fn_par... | null | https://raw.githubusercontent.com/zenhack/mule/f3e23342906d834abb9659c72a67c1405c936a00/src/mule/lib/intrinsics.ml | ocaml | open Common_ast
module C = Const
module D = Desugared_ast
module R = Runtime_ast
module S = Surface_ast
open Typecheck_types
let int_t = D.Type.Named{n_info = ktype; n_name = `Int}
let text_t = D.Type.Named{n_info = ktype; n_name = `Text}
let fn_t p r = D.Type.Fn {
fn_info = ktype;
fn_pvar = None;
fn_par... | |
e9d75fa3e78122e8e343b61779e7212690397ab26b5a445c97a4424da3ea4122 | typedclojure/typedclojure | test_utils.clj | (ns typed.clj.spec.test-utils
"Helpers for unit testing typed.clj.spec definitions
with clojure.test."
(:require [clojure.alpha.spec :as s]
[clojure.test :as test]))
(defmacro is-valid [s v]
`(let [s# ~s
v# ~v
valid# (s/valid? s# v#)]
(test/testing ~(str (list 's/valid? s v))... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/2f756998e52e1cd2e9261831aa1541c56d00f334/typed/clj.spec/src/typed/clj/spec/test_utils.clj | clojure | (ns typed.clj.spec.test-utils
"Helpers for unit testing typed.clj.spec definitions
with clojure.test."
(:require [clojure.alpha.spec :as s]
[clojure.test :as test]))
(defmacro is-valid [s v]
`(let [s# ~s
v# ~v
valid# (s/valid? s# v#)]
(test/testing ~(str (list 's/valid? s v))... | |
ad0b843902e248a9698a8da50a3addfc237a511a0ec9a13dc44d3bb0e19ead81 | mivoq/hunpos | messages.ml | open Unix
open Message_node
open File_node
open Io
open Files
open Message_graph
open Observables_graph
let dot_dir = "./dots";;
let main () =
if Array.length(Sys.argv) < 2
then
begin
print_string "usage: ";
print_string Sys.argv.(0);
print_string " <dir>\n";
print_string "... | null | https://raw.githubusercontent.com/mivoq/hunpos/0f0f775039fa749e67711c07ac681a16c0979349/ocaml-cmake/examples/code-analysis/messages.ml | ocaml | * let o = get_peer_path n in
* print_message_nodes n;
* start * | open Unix
open Message_node
open File_node
open Io
open Files
open Message_graph
open Observables_graph
let dot_dir = "./dots";;
let main () =
if Array.length(Sys.argv) < 2
then
begin
print_string "usage: ";
print_string Sys.argv.(0);
print_string " <dir>\n";
print_string "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.