_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
67500ae8c794d636fa50ef5fb47045489d85bd5f7586e63b567f655d3a0a291f
rtoy/cmucl
cell.lisp
-*- Package : RT ; Log : c.log -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/compiler/rt/cell.lisp $") ...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/rt/cell.lisp
lisp
Log : c.log -*- ********************************************************************** ********************************************************************** $Header: src/compiler/rt/cell.lisp $ This file contains the VM definition of various primitive memory access Data object definition macros. Symbol ...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/compiler/rt/cell.lisp $") VOPs for the IBM RT . Written by Converted by . (in-package "RT") (vm:define-for-each-primitive-object (...
bca441c5e09d02671b8fd1a2385530ef478e83225b17004cf2414469e43bfac2
haskell-tools/haskell-tools
FunTypeVar.hs
module Refactor.RenameDefinition.FunTypeVar where f :: a -> a f x = x
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/RenameDefinition/FunTypeVar.hs
haskell
module Refactor.RenameDefinition.FunTypeVar where f :: a -> a f x = x
7883277f97adf155e9c32eb528cd1b64e4d2dcfc0861064f94d547d3357f58b0
cram2/cram
manipulation.lisp
;;; Copyright ( c ) 2017 , < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this list...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_common/cram_common_failures/src/manipulation.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redi...
Copyright ( c ) 2017 , < > * Neither the name of the Institute for Artificial Intelligence/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ...
1b1d23330aec7e0e1dcc8de9a2c18e37dfc1e3df2422b885f05224833a3dc92f
emqx/emqx-exhook
emqx_extension_hook_app.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/emqx-exhook/906ba8c0ac907414b85738c24c7dbef880da844e/src/emqx_extension_hook_app.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_extension_hook_app). -behaviour(application). -include("emqx_extension_hook.hrl"). -emq...
3c986b46850c7791e1ce0aeac850140c025a0609d7fff759b3c4aef22a0e46ac
dalaing/little-languages
Term_flymake.hs
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleInstances # module Term ( Term(..) , lam_ ) where import Control.Monad (ap) import Data.Foldable (toList) import Data.List (elemIndex) import Bound import Bound.Name import Bound.Scope ...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/prototypes/prod/src/Term_flymake.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveTraversable # arguments are indexed backwards (so the indices stay valid over partial application) | Lam (Type l n d) (Scope (Name n ()) (Term l n d) a) | Test >>> 1 +2 want arbitrary here so that we can shrink terms TODO we want the ...
# LANGUAGE FlexibleInstances # module Term ( Term(..) , lam_ ) where import Control.Monad (ap) import Data.Foldable (toList) import Data.List (elemIndex) import Bound import Bound.Name import Bound.Scope import Prelude.Extras import Test.QuickCheck import Decl import Type TODO a pattern for multiple bin...
8b479e911b5c0d35af86894ec4062ce979d07b6ae0c6011ead25b1346951c899
namin/clpsmt-miniKanren
full-interp-extended.scm
The definition of ' letrec ' is based based on code , using the " half - closure " approach from 's definitional ;; interpreters. (define (evalo expr val) (eval-expo expr initial-env val)) (define (eval-expo expr env val) (conde ((== `(quote ,val) expr) (absento 'closure val) (absento 'prim ...
null
https://raw.githubusercontent.com/namin/clpsmt-miniKanren/4fa74fb973c95b7913f0e0239852f18a23073ccc/full-interp-extended.scm
scheme
interpreters. Multi-argument variadic Multi-argument Multiple argument need to make sure lambdas are well formed. grammar constraints would be useful here!!! we could use list-of-numbero instead but it causes more divergence with run* (list-of-numbero a*) we could use list-of-numbero instead but it causes m...
The definition of ' letrec ' is based based on code , using the " half - closure " approach from 's definitional (define (evalo expr val) (eval-expo expr initial-env val)) (define (eval-expo expr env val) (conde ((== `(quote ,val) expr) (absento 'closure val) (absento 'prim val) (not-in...
e7f40bc2eb3fe5ef3e7a0e547f94ca791822070bc530f1ea8ffc6b0248b21376
symbiont-io/detsys-testkit
NamedPipeCodec.hs
{-# language OverloadedStrings #-} module StuntDouble.Transport.NamedPipeCodec where import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy.Char8 as BSLC import Control.Concurrent.Async import Control.Exception import System.Directory import System.FilePath import System.IO import System.IO...
null
https://raw.githubusercontent.com/symbiont-io/detsys-testkit/29a3a0140730420e4c5cc8db23df6fdb03f9302c/src/runtime-prototype/src/StuntDouble/Transport/NamedPipeCodec.hs
haskell
# language OverloadedStrings # ----------------------------------------------------------------------
module StuntDouble.Transport.NamedPipeCodec where import qualified Data.ByteString.Lazy as BSL import qualified Data.ByteString.Lazy.Char8 as BSLC import Control.Concurrent.Async import Control.Exception import System.Directory import System.FilePath import System.IO import System.IO.Error import System.Posix.Files im...
d05bf19fa4b2f6abf939381570089cb3bbba03b8b5b18ef4b9df09f1f3a52108
PrecursorApp/precursor
dev.cljs
(ns ^:figwheel-no-load frontend.dev (:require [frontend.careful] [frontend.core :as core] [frontend.utils :as utils :include-macros true] [weasel.repl :as ws-repl])) (defn setup-browser-repl [] ;; this is harmless if it fails (ws-repl/connect "ws:9001" :verbose true) ...
null
https://raw.githubusercontent.com/PrecursorApp/precursor/30202e40365f6883c4767e423d6299f0d13dc528/dev-cljs/frontend/dev.cljs
clojure
this is harmless if it fails the repl tries to take over *out*, workaround for
(ns ^:figwheel-no-load frontend.dev (:require [frontend.careful] [frontend.core :as core] [frontend.utils :as utils :include-macros true] [weasel.repl :as ws-repl])) (defn setup-browser-repl [] (ws-repl/connect "ws:9001" :verbose true) (js/setInterval #(cljs.core/enabl...
f0de31223adb8ac841c14a8b5891987e62f340e4b272068c4924e35d4b620c0d
day8/re-frame-test
db.cljs
(ns todomvc.db (:require [cljs.reader] [clojure.spec.alpha :as s] [re-frame.core :as re-frame])) ;; -- Spec -------------------------------------------------------------------- ;; This is a clojure.spec specification for the value in app - db . It is like a ;; Schema. See: ;; ;; The value in ...
null
https://raw.githubusercontent.com/day8/re-frame-test/3238d7e2907f0effba005f79e801ea519f77be0c/examples/todomvc/src/todomvc/db.cljs
clojure
-- Spec -------------------------------------------------------------------- Schema. See: The value in app-db should always match this spec. Only event handlers can change the value in app-db so, after each event handler How is this done? Look in events.cljs and you'll notice that all handers have an "after" ...
(ns todomvc.db (:require [cljs.reader] [clojure.spec.alpha :as s] [re-frame.core :as re-frame])) This is a clojure.spec specification for the value in app - db . It is like a has run , we re - check app - db for correctness ( compliance with the ) . (s/def ::id int?) (s/def ::title ...
fe419b3ee05f30447e942033bc129010be272323e05ed347ddfbba60b6044ecf
jimpil/hotel-nlp
spelling.clj
(ns hotel_nlp.tools.spellcheck.spelling (:require [hotel_nlp.helper :as help] [hotel_nlp.algorithms.levenshtein :refer [levenshtein-distance]])) a quite literal translation of spell checker taken from the Wiki ( ) - apparently his majesty wrote this ! the text used himself (def test-cases ["acess...
null
https://raw.githubusercontent.com/jimpil/hotel-nlp/2647f999b5998595a5edac1900e850140f374de6/src/hotel_nlp/tools/spellcheck/spelling.clj
clojure
pretty basic tokenization my code follows could be empty if no correction was found (time (doall (for [s test-cases] (mem-correct s))) don't care about non-mistakes You can train on a different corpus in your namespace and use dynamic binding to re-assign *nwords*: (def my-corpus (slurp "path-to-my-corpus")) (binding [...
(ns hotel_nlp.tools.spellcheck.spelling (:require [hotel_nlp.helper :as help] [hotel_nlp.algorithms.levenshtein :refer [levenshtein-distance]])) a quite literal translation of spell checker taken from the Wiki ( ) - apparently his majesty wrote this ! the text used himself (def test-cases ["acess...
166a1b24dbe2cb5aa6bc5f605f367cb26e9a7ab33930f7f0ad3e076699a7fe73
kokobd/cabal-hoogle
Common.hs
# LANGUAGE RecordWildCards # module Hoogle.Cabal.Command.Common ( GlobalOptions (..), globalOptionsParser, hoogleDatabaseArg, Context (..), readContext, ) where import qualified Data.Map.Strict as Map import Distribution.Client.CmdBuild (BuildFlags, defaultBuildFlags, selectComponentTarget, select...
null
https://raw.githubusercontent.com/kokobd/cabal-hoogle/2fe4cd979f212c7f2582115b6e47ce7e64f021ea/src/Hoogle/Cabal/Command/Common.hs
haskell
| This is copied from the implementation of 'buildAction' Interpret the targets on the command line as build targets (as opposed to say repl or haddock targets).
# LANGUAGE RecordWildCards # module Hoogle.Cabal.Command.Common ( GlobalOptions (..), globalOptionsParser, hoogleDatabaseArg, Context (..), readContext, ) where import qualified Data.Map.Strict as Map import Distribution.Client.CmdBuild (BuildFlags, defaultBuildFlags, selectComponentTarget, select...
40d205457be7912f05ae1c1232570edfe922839e4cf254c98f714529ced63e6c
auser/hermes
thrift_transport.erl
-module(thrift_transport). -export([behaviour_info/1]). -export([new/2, write/2, read/2, flush/1, close/1 ]). behaviour_info(callbacks) -> [{read, 2}, {write, 2}, {flush, 1}, {close, 1} ]. -record(transport, {module, data}). new(Module, Data) when ...
null
https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/deps/thrift/src/thrift_transport.erl
erlang
-module(thrift_transport). -export([behaviour_info/1]). -export([new/2, write/2, read/2, flush/1, close/1 ]). behaviour_info(callbacks) -> [{read, 2}, {write, 2}, {flush, 1}, {close, 1} ]. -record(transport, {module, data}). new(Module, Data) when ...
334e13ed868383e8e6bd102cf74283d45baf439c0dddde6d4c0c7ba37604560e
rpav/CheckL
generate.lisp
(defpackage :checkl.docs (:use #:cl #:gendoc) (:export #:generate)) (in-package :checkl.docs) (defun generate () (gendoc (:output-system :checkl-docs :output-filename "index.html" :css "simple.css") (:mdf "intro.md") (:apiref :checkl)))
null
https://raw.githubusercontent.com/rpav/CheckL/80328800d047fef9b6e32dfe6bdc98396aee3cc9/doc/generate.lisp
lisp
(defpackage :checkl.docs (:use #:cl #:gendoc) (:export #:generate)) (in-package :checkl.docs) (defun generate () (gendoc (:output-system :checkl-docs :output-filename "index.html" :css "simple.css") (:mdf "intro.md") (:apiref :checkl)))
241fc6295eade7e01b13f1d1108880291cd98401d5abfe9a2c122ada0dbf00aa
casperschipper/ocaml-cisp
mem_sq.mli
type 'a t = { cache : ('a Array.t) Option.t ; input : 'a Seq.t } val eval :
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/618b19509c95ff5bd6e442e0a78942d4591a59be/src/mem_sq/mem_sq.mli
ocaml
type 'a t = { cache : ('a Array.t) Option.t ; input : 'a Seq.t } val eval :
57c8210862359f616797afe203a7e971a4d60c2ec5671a68464e363e0c8a510a
aimyskk/competitive-haskell
BinomialHeap.hs
: Purely Functional Data Structure module Heap.BinomialHeap ( BinomialHeap, empty, isEmpty, singleton, fromList, insert, merge, findMin, deleteMin, deleteFindMin ) where import Class data Tree a = Node Int a [Tree a] newtype BinomialHeap a = BH [Tree a] rank :: Tree a -> Int rank (Node r _ _...
null
https://raw.githubusercontent.com/aimyskk/competitive-haskell/703f78e29060459d8d857d785e473e9696e2d67f/Heap/BinomialHeap.hs
haskell
: Purely Functional Data Structure module Heap.BinomialHeap ( BinomialHeap, empty, isEmpty, singleton, fromList, insert, merge, findMin, deleteMin, deleteFindMin ) where import Class data Tree a = Node Int a [Tree a] newtype BinomialHeap a = BH [Tree a] rank :: Tree a -> Int rank (Node r _ _...
d7db21f2eec30cbe8f456686749f7cb0d798e303a825404f98bedc7617a5b309
APTE/APTE
term.ml
(************************ *** Types *** *************************) type quantifier = | Free | Existential | Universal type symbol_cat = | Tuple | Constructor | Destructor of term list * term and symbol = { name : string; arity : int; cat : symbol_cat } and link = | NoLink ...
null
https://raw.githubusercontent.com/APTE/APTE/d5f1bbd29c2fc324a6015ac50173a0cc8ad66623/Source/standard_library/term.ml
ocaml
*********************** *** Types *** ************************ ******************************** *** Variable generation *** ********************************* ******************************** *** Symbol *** ********************************* ******** Built-in constructors **********...
type quantifier = | Free | Existential | Universal type symbol_cat = | Tuple | Constructor | Destructor of term list * term and symbol = { name : string; arity : int; cat : symbol_cat } and link = | NoLink | TLink of term | VLink of variable and variable = { id_v : string; ...
9502d8683e8fa8eac8b15fcaa71c11ae02e35a1417c0bac4184d024c6b345b13
andrewmcloud/consimilo
core.clj
(ns consimilo.core (:require [consimilo.lsh-forest :as f] [consimilo.lsh-util :as util] [consimilo.minhash :as mh] [consimilo.minhash-util :as mhu] [consimilo.lsh-query :as q] [consimilo.text-processing :as text] [taoensso.nippy :as nippy] ...
null
https://raw.githubusercontent.com/andrewmcloud/consimilo/db96c1695248c3486e1d23de5589b39f0e0bd49f/src/consimilo/core.clj
clojure
default: create new forest default: create new forest
(ns consimilo.core (:require [consimilo.lsh-forest :as f] [consimilo.lsh-util :as util] [consimilo.minhash :as mh] [consimilo.minhash-util :as mhu] [consimilo.lsh-query :as q] [consimilo.text-processing :as text] [taoensso.nippy :as nippy] ...
067c4f4e8d799f06ccfcdecfbc6653239e7531593435208e7ce2885df401dbca
ideas-edu/ideas
Logging.hs
# LANGUAGE CPP , FlexibleContexts # ----------------------------------------------------------------------------- Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are incl...
null
https://raw.githubusercontent.com/ideas-edu/ideas/13bc304e78aa78d0dec6e0e5e9e7a31aa6715390/src/Ideas/Encoding/Logging.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- | Maintainer : Stability : provisional Facilities to create a log database -------------------------------------------------------------------------...
# LANGUAGE CPP , FlexibleContexts # Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . Portability : portable ( depends on ghc ) ...
4831254a4f45ac77a5317e3c7d6771457d5003dce60792886c5bcd6888b33065
conreality/conreality
target.mli
(* This is free and unencumbered software released into the public domain. *) class virtual interface : int -> object inherit Object.interface (* Object interface: *) method id : int method label : string option method position : Geometry.P3.t option method orientation : Geometry.Q.t option method linear...
null
https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/model/target.mli
ocaml
This is free and unencumbered software released into the public domain. Object interface:
class virtual interface : int -> object inherit Object.interface method id : int method label : string option method position : Geometry.P3.t option method orientation : Geometry.Q.t option method linear_velocity : Geometry.V3.t option method angular_velocity : Geometry.Q.t option method linear_acceler...
9901464e49c9ce8a5cbdc9a5d7b0930eee2212a1c2bc61d9d91e8877b5f43493
metabase/metabase
converters_test.cljs
(ns metabase.domain-entities.converters-test (:require [clojure.test :refer [deftest is testing]] [metabase.domain-entities.converters :as converters])) (deftest incoming-basics-test (testing "simple values are not transformed" (is (= identity (converters/incoming number?))) (is (= identity (conver...
null
https://raw.githubusercontent.com/metabase/metabase/4580eab946097e9dda36cc0bc0406fc10d5b01cd/test/metabase/domain_entities/converters_test.cljs
clojure
TODO: Can we get keyword enums? Not out of the box, but probably with a :js/something override the decoders can be taught to check for.
(ns metabase.domain-entities.converters-test (:require [clojure.test :refer [deftest is testing]] [metabase.domain-entities.converters :as converters])) (deftest incoming-basics-test (testing "simple values are not transformed" (is (= identity (converters/incoming number?))) (is (= identity (conver...
48dd8f672132f88682cf8b2b738b802290c968dc1cb9be9fcfc887348feb7546
throoze/hilbertR-Tree
RTree.hs
| Module : RTree Copyright : ( c ) - < > 2012 , ( c ) - 06 - 39749 - < > 2012 , ( c ) Universidad Sim&#243;n Bol&#237;var 2012 License : GNU GPL v3 Maintainer : , Stability : experimental Portability : portab...
null
https://raw.githubusercontent.com/throoze/hilbertR-Tree/db95ba73f4f052adb9394585e0bbff81bb6889d6/RTree.hs
haskell
* Rectangle Manipulation :: Rectangle :: Rectangle -> Bool :: Rectangle -> Rectangle -> Bool :: Rectangle -> Point :: Rectangle -> Int * Construction :: Int -> Int -> RTree * Insertion :: RTree -> Rectangle -> Either e RTree * Deletion :: RTree -> Rectangle -> Either e RTree * Queries :: RTree -> Rectangl...
| Module : RTree Copyright : ( c ) - < > 2012 , ( c ) - 06 - 39749 - < > 2012 , ( c ) Universidad Sim&#243;n Bol&#237;var 2012 License : GNU GPL v3 Maintainer : , Stability : experimental Portability : portab...
a3e3828cb30f42e8241ce83766809cff0c962e1a523b084c8ba141151fa54d9d
fyquah/hardcaml_zprize
test_ground_multipliers.ml
open Core open Hardcaml open Field_ops_lib.Ground_multiplier.For_testing let generate_z ~width = Quickcheck.Generator.map ~f:Bigint.to_zarith_bigint (Bigint.gen_incl Bigint.zero Bigint.((one lsl width) - one)) ;; type test_case = { big : Bits.t ; pivot : Bits.t } let test_24x7 f = let generate = ...
null
https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/field_ops/test/test_ground_multipliers.ml
ocaml
open Core open Hardcaml open Field_ops_lib.Ground_multiplier.For_testing let generate_z ~width = Quickcheck.Generator.map ~f:Bigint.to_zarith_bigint (Bigint.gen_incl Bigint.zero Bigint.((one lsl width) - one)) ;; type test_case = { big : Bits.t ; pivot : Bits.t } let test_24x7 f = let generate = ...
ec92ac0f1f25b0cfb08f8efae8607e54d45333a4d5b8c930856e23203f6b7b58
avh4/elm-format
Filesystem.hs
module CommandLine.Filesystem where import CommandLine.World import System.FilePath ((</>)) import qualified System.FilePath as FilePath collectFiles :: Monad m => (a -> m [a]) -> a -> m [a] collectFiles children root = do xs <- children root subChildren <- mapM (collectFiles children) xs ...
null
https://raw.githubusercontent.com/avh4/elm-format/57f77ee0a667869ceed3a61a0f4eeaca56a3964f/avh4-lib/src/CommandLine/Filesystem.hs
haskell
module CommandLine.Filesystem where import CommandLine.World import System.FilePath ((</>)) import qualified System.FilePath as FilePath collectFiles :: Monad m => (a -> m [a]) -> a -> m [a] collectFiles children root = do xs <- children root subChildren <- mapM (collectFiles children) xs ...
fc4a1833692b6a00e192bb9229e93b5cd930c79143d23dee22eeb605e33c34cf
Ramarren/cells
defpackage.lisp
;; -*- mode: Lisp; Syntax: Common-Lisp; Package: cells; -*- ;;; Copyright ( c ) 2008 by . ;;; ;;; Permission is hereby granted, free of charge, to any person obtaining a copy ;;; of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including withou...
null
https://raw.githubusercontent.com/Ramarren/cells/cced2e55c363572914358c0a693ebac2caed4e22/defpackage.lisp
lisp
-*- mode: Lisp; Syntax: Common-Lisp; Package: cells; -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to do so, subject to the...
Copyright ( c ) 2008 by . in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is furnished all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E...
41452ca9ec21e1ebf39d3cd6011c797efb5ff0a4168d729c0c4ad637a38c146e
tisnik/clojure-examples
project.clj
(defproject carmine8 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.1"] [com.taoensso/carmine "3.1.0"]] :main ^:skip-aot carmine8.co...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/303b7784f9238309af9b9853b426a88accf042e4/carmine8/project.clj
clojure
(defproject carmine8 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0" :url "-2.0/"} :dependencies [[org.clojure/clojure "1.10.1"] [com.taoensso/carmine "3.1.0"]] :main ^:skip-aot carmine8.co...
b591a1e3bed721e00d25684d104ad78f51a178a7dd4e8776aa533d35adac2bc0
ocamllabs/ocaml-effects
typeclass.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cri...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/typing/typeclass.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Parsetree open Asttypes open Path ope...
0c6d81bfaa0788dbdc33b8df6b53047617204bdaed10fad414b88ae77c6893fd
mjsottile/publicstuff
KDTree.hs
-- -- KDTree code -- -- -- module DLA.KDTree ( KDTreeNode(..), newKDTree, kdtAddPoints, kdtRangeSearch, kdtCollisionDetect, kdtInBounds, dumpKDTree ) where import DLA.Vec3 import Data.Maybe import System.IO data KDTreeNode a = Empty | Node (KDTreeNode a) Vec3 a (KDTreeNode a) | Leaf Vec3 a de...
null
https://raw.githubusercontent.com/mjsottile/publicstuff/46fccc93cc62eb9de46186f53012381750fbb17b/dla3d/optimized-haskell3/DLA/KDTree.hs
haskell
KDTree code
module DLA.KDTree ( KDTreeNode(..), newKDTree, kdtAddPoints, kdtRangeSearch, kdtCollisionDetect, kdtInBounds, dumpKDTree ) where import DLA.Vec3 import Data.Maybe import System.IO data KDTreeNode a = Empty | Node (KDTreeNode a) Vec3 a (KDTreeNode a) | Leaf Vec3 a deriving Show printVec :: Vec...
6b8bb2e83df31eefae91df5bb5a6266839df9429a4a778266e8ad53e7ec7dd0d
ragkousism/Guix-on-Hurd
hugs.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 < > Copyright © 2016 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; ei...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/hugs.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 < > Copyright © 2016 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages hugs) #:use-module (guix licenses) #:use-module (guix p...
111a092140137c449d9873e155fed6de97c156a879be8a90073745d8eb489204
logseq/logseq
hooks.clj
(ns shadow.hooks (:require [clojure.java.shell :refer [sh]] [clojure.string :as string])) ;; copied from (defn exec [& cmd] (let [cmd (string/split (string/join " " (flatten cmd)) #"\s+") _ (println (string/join " " cmd)) {:keys [exit out err]} (apply sh cmd)] (if (zero? exit) ...
null
https://raw.githubusercontent.com/logseq/logseq/8fc7fb14961700166b8ad7cad89595465869dee5/src/dev-cljs/shadow/hooks.clj
clojure
copied from
(ns shadow.hooks (:require [clojure.java.shell :refer [sh]] [clojure.string :as string])) (defn exec [& cmd] (let [cmd (string/split (string/join " " (flatten cmd)) #"\s+") _ (println (string/join " " cmd)) {:keys [exit out err]} (apply sh cmd)] (if (zero? exit) (when-not (str...
b23e716e363ac05fa6ab4c8f6cc304edc5a9b2d929a7cf52297fa24da7bc35d0
geremih/xcljb
shape_types.clj
This file is automatically generated . DO NOT MODIFY . (clojure.core/ns xcljb.gen.shape-types (:require [xcljb gen-common] [xcljb.gen xproto-types])) (def OP xcljb.gen.xproto-types/CARD8) (def KIND xcljb.gen.xproto-types/CARD8) (def QueryVersionRequest (xcljb.gen-common/->Request "SHAPE" 0 [])) (def Rectangle...
null
https://raw.githubusercontent.com/geremih/xcljb/59e9ff795bf00595a3d46231a7bb4ec976852396/src/xcljb/gen/shape_types.clj
clojure
Manually written.
This file is automatically generated . DO NOT MODIFY . (clojure.core/ns xcljb.gen.shape-types (:require [xcljb gen-common] [xcljb.gen xproto-types])) (def OP xcljb.gen.xproto-types/CARD8) (def KIND xcljb.gen.xproto-types/CARD8) (def QueryVersionRequest (xcljb.gen-common/->Request "SHAPE" 0 [])) (def Rectangle...
25821906a5663bdd0092db6c1fa6b44dfd116739298ba92648e73ac1c920943f
serokell/avl-plus
Deletion.hs
module Deletion (tests) where import Data.Traversable (for) import Data.List ((\\), nub) import Common import qualified Data.Tree.AVL as AVL tests :: Spec tests = describe "Delete" $ do it' "Tree is still balanced after delete" $ \list -> do tree <- AVL.fromList list trees <- scanM (AVL.delete...
null
https://raw.githubusercontent.com/serokell/avl-plus/3fb3933f4f11f282e8c498d128c3e5c79518ea9b/test/Deletion.hs
haskell
module Deletion (tests) where import Data.Traversable (for) import Data.List ((\\), nub) import Common import qualified Data.Tree.AVL as AVL tests :: Spec tests = describe "Delete" $ do it' "Tree is still balanced after delete" $ \list -> do tree <- AVL.fromList list trees <- scanM (AVL.delete...
1869531a988e1b2e844d4f832b5be5ca2c39e18ce5fb2d69b8cde285c542032e
wdebeaum/step
into.lisp
;;;; ;;;; W::INTO ;;;; (define-words :pos W::ADV :tags (:base500) :words ( (W::INTO (wordfeats (w::result-only +)) (SENSES ((LF-PARENT ONT::resulting-object) (example "fold it into a heart") (TEMPL BINARY-CONSTRAINT-np-TEMPL) (preference 0.985) ) ((LF-PARENT ONT::RESULT...
null
https://raw.githubusercontent.com/wdebeaum/step/aa18026a1370d1fba36dc20600c3a786b59c72b2/src/LexiconManager/Data/new/into.lisp
lisp
W::INTO goal-as-containment as container + for GROUND; the other senses don't have restrictions (other than abstr-obj)
(define-words :pos W::ADV :tags (:base500) :words ( (W::INTO (wordfeats (w::result-only +)) (SENSES ((LF-PARENT ONT::resulting-object) (example "fold it into a heart") (TEMPL BINARY-CONSTRAINT-np-TEMPL) (preference 0.985) ) ((LF-PARENT ONT::RESULTING-STATE) (exampl...
c1218d6a91aaff06744b930ccd46fef2bab5f18aae6f588b339a646eeeeb7527
heyoka/faxe
component_SUITE.erl
%%%------------------------------------------------------------------- @author ( C ) 2019 , < COMPANY > %%% @doc %%% %%% @end Created : 15 . Jul 2019 15:06 %%%------------------------------------------------------------------- -module(component_SUITE). -author("heyoka"). -include_lib("common_test/include/ct.hr...
null
https://raw.githubusercontent.com/heyoka/faxe/3718245c78169a89b5be87a92e64462ea9c93233/apps/faxe/test/component_SUITE.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API tests
@author ( C ) 2019 , < COMPANY > Created : 15 . Jul 2019 15:06 -module(component_SUITE). -author("heyoka"). -include_lib("common_test/include/ct.hrl"). -export([suite/0, all/0]). -export([test1/1, test2/1]). suite() -> [{timetrap, {minutes, 2}}]. all() -> [test1, test2]. test1(_Config) -> 1 = 1. ...
dd1e73820fd65f732b25838ecb36eecb7d6afc51e2e37c284c560d057d004e69
radian-software/kalyn
Util.hs
module Util where import Control.Arrow import Data.Char import Data.List import qualified Data.Map as Map class Pretty a where pretty :: a -> String fixedPoint :: Eq a => a -> (a -> a) -> a fixedPoint x f = let fx = f x in if x == fx then x else fixedPoint fx f f...
null
https://raw.githubusercontent.com/radian-software/kalyn/03d279eee4cf73cd355ed7a13c46340fbb15540b/src/Util.hs
haskell
important properties: deterministic, stateless, and injective
module Util where import Control.Arrow import Data.Char import Data.List import qualified Data.Map as Map class Pretty a where pretty :: a -> String fixedPoint :: Eq a => a -> (a -> a) -> a fixedPoint x f = let fx = f x in if x == fx then x else fixedPoint fx f f...
78579b0abccf87e4777174289ed99bd59ccc8fb193fc48e8d11f27ccd1c98942
Clojure2D/clojure2d-examples
ex30_generators.clj
;; Random or uniform generators See section " Random Vectors " : -math/userguide/random.html (ns ex30-generators (:require [clojure2d.core :as c2d] [fastmath.random :as r] [fastmath.vector :as v]) (:import [fastmath.vector Vec2])) (set! *warn-on-reflection* true) (set! *unchecked-math* :...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/9de82f5ac0737b7e78e07a17cf03ac577d973817/src/ex30_generators.clj
clojure
Random or uniform generators upper left upper middle upper right middle right right right middle bottom left bottom middle
See section " Random Vectors " : -math/userguide/random.html (ns ex30-generators (:require [clojure2d.core :as c2d] [fastmath.random :as r] [fastmath.vector :as v]) (:import [fastmath.vector Vec2])) (set! *warn-on-reflection* true) (set! *unchecked-math* :warn-on-boxed) (def cnvs (c2d/c...
60f80253f9fa03097df76861d88bf89010793a93eb1e7bd99db0fa77330f981c
malgo-lang/malgo
Build.hs
{-# LANGUAGE DeriveAnyClass #-} module Malgo.Build (run) where import Control.Lens import Data.Aeson (FromJSON, decodeFileStrict) import Data.Graph (graphFromEdges, reverseTopSort) import Data.List ((\\)) import Data.List qualified as List import Koriel.MonadUniq (UniqSupply (UniqSupply)) import Malgo.Driver qualifie...
null
https://raw.githubusercontent.com/malgo-lang/malgo/eb99b51415991513e7f9b169b66988ac7e447bd8/src/Malgo/Build.hs
haskell
# LANGUAGE DeriveAnyClass #
module Malgo.Build (run) where import Control.Lens import Data.Aeson (FromJSON, decodeFileStrict) import Data.Graph (graphFromEdges, reverseTopSort) import Data.List ((\\)) import Data.List qualified as List import Koriel.MonadUniq (UniqSupply (UniqSupply)) import Malgo.Driver qualified as Driver import Malgo.Monad i...
648dc4330b273a5a04659c3c4068d7098f969f303880ee857c84e7a23987e0e4
haskell-openal/OpenAL
Errors.hs
# LANGUAGE CPP # -------------------------------------------------------------------------------- -- | -- Module : Sound.OpenAL.AL.Errors Copyright : ( c ) 2003 - 2016 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- This module corresponds to ...
null
https://raw.githubusercontent.com/haskell-openal/OpenAL/5131984f172dffc43ca8b482f215d120523fb137/src/Sound/OpenAL/AL/Errors.hs
haskell
------------------------------------------------------------------------------ | Module : Sound.OpenAL.AL.Errors License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ Make the foreign imports happy. --------------...
# LANGUAGE CPP # Copyright : ( c ) 2003 - 2016 Maintainer : < > This module corresponds to section 2.7 ( AL Errors ) of the OpenAL Specification and Reference ( version 1.1 ) . module Sound.OpenAL.AL.Errors ( ALError(..), ALErrorCategory(..), alErrors ) where #if __GLASGOW_HASKELL__ >= 704 im...
de3c9fb56bf60fcefb9690127cb68f56b6a1938ff700e7ca5c54e9cb08ab1e02
matterhorn-chat/matterhorn
Logging.hs
module Matterhorn.State.Logging ( startLogging , stopLogging , logSnapshot , getLogDestination ) where import Prelude () import Matterhorn.Prelude import Matterhorn.Types startLogging :: FilePath -> MH () startLogging path = do mgr <- use (csResources.crLogManager) li...
null
https://raw.githubusercontent.com/matterhorn-chat/matterhorn/86fb97fae9aea66a2434fc085c1ff49c5bd96b86/src/Matterhorn/State/Logging.hs
haskell
module Matterhorn.State.Logging ( startLogging , stopLogging , logSnapshot , getLogDestination ) where import Prelude () import Matterhorn.Prelude import Matterhorn.Types startLogging :: FilePath -> MH () startLogging path = do mgr <- use (csResources.crLogManager) li...
cafdefd862d5e71ed5c3e357c1bb508d48d294e16af4b80e3a8325f6450d4577
schell/gelatin
Internal.hs
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # -- | Module : Gelatin . FreeType2 Copyright : ( c ) 2017 License : MIT Maintainer : < > -- This module provides easy freetype2 font rendering using gelatin 's -- graphics primitives. -- module Gelatin.FreeType2.Internal where import ...
null
https://raw.githubusercontent.com/schell/gelatin/04c1c83d4297eac4f4cc5e8e5c805b1600b3ee98/gelatin-freetype2/src/Gelatin/FreeType2/Internal.hs
haskell
| graphics primitives. ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ^ The V2V2 backend needed to render font glyphs. ^ The atlas to load the words into. ^ The string of words to load, with each word s...
# LANGUAGE LambdaCase # # LANGUAGE RecordWildCards # Module : Gelatin . FreeType2 Copyright : ( c ) 2017 License : MIT Maintainer : < > This module provides easy freetype2 font rendering using gelatin 's module Gelatin.FreeType2.Internal where import Gelatin.GL import Gela...
0e720165ac07064ef3d1cd47f8e81370fca38ae966e1d923be12b3f8aeb8c07c
haskell-hvr/regex-tdfa
CorePattern.hs
-- | The CorePattern module deconstructs the Pattern tree created by -- ReadRegex.parseRegex and returns a simpler Q\/P tree with -- annotations at each Q node. This will be converted by the TNFA -- module into a QNFA finite automata. -- -- Of particular note, this Pattern to Q\/P conversion creates and -- assigns all...
null
https://raw.githubusercontent.com/haskell-hvr/regex-tdfa/0dc80f58e3046e29e51ec33133b03447ac4f6800/lib/Text/Regex/TDFA/CorePattern.hs
haskell
| The CorePattern module deconstructs the Pattern tree created by ReadRegex.parseRegex and returns a simpler Q\/P tree with annotations at each Q node. This will be converted by the TNFA module into a QNFA finite automata. Of particular note, this Pattern to Q\/P conversion creates and assigns all the internal ...
postTag by one and only one location in the Q\/P tree . The Orbit tags are each held by one and only one Star node . Tags that stop a pattern unQ::P matches 0 zero characters . There can be redundancy in nullView , which is eliminated by cleanNullView . 2009 XXX TODO : we can avoid needing tags in the p...
a636ea8b0fd0da7949040542ed1d187f53cb84d776b336bda850c331b6710aaf
ppaml-op3/insomnia
Expr.hs
-- | Core Insomnia expression language. # LANGUAGE DeriveDataTypeable , DeriveGeneric , FlexibleContexts , MultiParamTypeClasses , ViewPatterns # FlexibleContexts, MultiParamTypeClasses, ViewPatterns #-} module Insomnia.Expr where import Control.Applicative (Applicative(..), (<$>)) im...
null
https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/src/Insomnia/Expr.hs
haskell
| Core Insomnia expression language. # SOURCE # # SOURCE # | Qualified variables - references to other modules. result type pack {{ M }} as S | internal node for explicit instantiation. The type unification algorithm inserts these. | Instantiation coercions record evidence for the instantiation of | The RHS of...
# LANGUAGE DeriveDataTypeable , DeriveGeneric , FlexibleContexts , MultiParamTypeClasses , ViewPatterns # FlexibleContexts, MultiParamTypeClasses, ViewPatterns #-} module Insomnia.Expr where import Control.Applicative (Applicative(..), (<$>)) import Control.Lens.Traversal import Contr...
85803a65bc2a8e56c1d68876a71627180f6273b87f586059b333d837499f6258
dgiot/dgiot
dgiot_json.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy...
null
https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot/src/utils/dgiot_json.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2021 DGIOT Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(dgiot_json). -compile(inline). -export([ encode/1 , encode/2 , safe_...
25d00938e253d1e193c0c17dffff18900cde8b86638ca98440640f0a0ae373c4
xmonad/xmonad-contrib
WindowSwitcherDecoration.hs
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , ViewPatterns # ---------------------------------------------------------------------------- -- | -- Module : XMonad.Layout.WindowSwitcherDecoration -- Description : Switch the position of windows by dragging them onto each other. Copyright : ( c ) Jan...
null
https://raw.githubusercontent.com/xmonad/xmonad-contrib/52998657ef641429518b5fe0dc1f63385bf44f71/XMonad/Layout/WindowSwitcherDecoration.hs
haskell
-------------------------------------------------------------------------- | Module : XMonad.Layout.WindowSwitcherDecoration Description : Switch the position of windows by dragging them onto each other. License : BSD3-style (see LICENSE) Maintainer : Stability : unstable Portability : not po...
# LANGUAGE FlexibleInstances , MultiParamTypeClasses , ViewPatterns # Copyright : ( c ) Jan Vornberger 2009 2010 module XMonad.Layout.WindowSwitcherDecoration windowSwitcherDecoration, windowSwitcherDecorationWithButtons, windowSwitcherDecorationWithImageButtons, W...
3cecd0f7a8d2db6e38e0dcfff864a8e33a76b0c4f0073ae19377551d1582579e
ssor/erlangDemos
cowboy_dispatcher.erl
Copyright ( c ) 2011 - 2012 , < > Copyright ( c ) 2011 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVID...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/cowboy/src/cowboy_dispatcher.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2011 - 2012 , < > Copyright ( c ) 2011 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(cowboy_dispat...
9fe32872b1310d6bbb5add3798bc00d417dee29a26dbe3df3c9af578ad20019a
yi-editor/yi
Buffer.hs
{-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Yi.Buffer -- License : GPL-2 -- Maintainer : -- Stability : experimental -- Portability : portable -- -- The 'Buffer' module defines monadic editing operations over one - dimensional buffers , maintaining a current /point/. -- -- This module ...
null
https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-core/src/Yi/Buffer.hs
haskell
# OPTIONS_HADDOCK show-extensions # | Module : Yi.Buffer License : GPL-2 Maintainer : Stability : experimental Portability : portable The 'Buffer' module defines monadic editing operations over This module acts as a facade for the Buffer.* modules. Implementation re-exports (move out of imp...
one - dimensional buffers , maintaining a current /point/. module Yi.Buffer ( module Yi.Buffer.Basic , module Yi.Buffer.HighLevel , module Yi.Buffer.Indent , module Yi.Buffer.Misc , module Yi.Buffer.Normal , module Yi.Buffer.Region , module Yi.Buffer.TextUnit , module Yi.Buffer.Undo , UIUpdate (.....
18ca16277859717230e77b4c440be878693020082123f43f8894be7b7515fd87
mariari/Misc-Lisp-Scripts
guess-my-number.lisp
(defparameter *big* 100) (defparameter *small* 1) (defun guess-my-number () (ash (+ *small* *big*) -1)) (defun smaller () (setf *big* (- (guess-my-number) 1)) (guess-my-number)) (defun bigger () (setf *small* (1+ (guess-my-number))) (guess-my-number)) ;; (defun bigger () ( setf * small * ( + 1 ( ...
null
https://raw.githubusercontent.com/mariari/Misc-Lisp-Scripts/acecadc75fcbe15e6b97e084d179aacdbbde06a8/Books/LandOfLisp/Chapter%202/guess-my-number.lisp
lisp
(defun bigger () (guess-my-number))
(defparameter *big* 100) (defparameter *small* 1) (defun guess-my-number () (ash (+ *small* *big*) -1)) (defun smaller () (setf *big* (- (guess-my-number) 1)) (guess-my-number)) (defun bigger () (setf *small* (1+ (guess-my-number))) (guess-my-number)) ( setf * small * ( + 1 ( guess - my - number ...
f71fcc23d27fa097eaca900e6fb4648f256f15016777c50ece15c8c7f89ffe1d
Clozure/ccl
x86-def.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright 2006 - 2009 Clozure Associates ;;; 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 ap...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/level-0/X86/x86-def.lisp
lisp
Package : CCL -*- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific la...
Copyright 2006 - 2009 Clozure Associates distributed under the License is distributed on an " AS IS " BASIS , (in-package "CCL") #+x8664-target (progn (defx86lapfunction %function-vector-to-function ((arg arg_z)) (trap-unless-typecode= arg x8664::subtag-function) (addb ($ (- x8664::fulltag-function x8664::ful...
7d35014fe415ca08c84c4070a70295d59feded3097aef04f397731b231209dc8
HeinrichApfelmus/david-cope-cmmc
hbirthday.lisp
(setq hbirthday '((1404 36 471 1 58) (1704 43 279 1 51) (1929 48 108 1 49) (2204 56 54 1 51) (2308 60 92 1 57) (2475 64 233 1 36) (2658 68 146 1 48) (2767 72 58 1 48) (2866 76 80 1 19) (2900 80 100 1 54) (3029 84 34 1 49) (3158 88 87 1 66) (3221 92 66 1 58) (3425 100 58 1 66) (3504 104 75 1 68) (4829 60 104 1 93) (5...
null
https://raw.githubusercontent.com/HeinrichApfelmus/david-cope-cmmc/bc48564fda68383811773b56590161387dcf09c0/improvise-chapter-4/sample-databases/hbirthday.lisp
lisp
(setq hbirthday '((1404 36 471 1 58) (1704 43 279 1 51) (1929 48 108 1 49) (2204 56 54 1 51) (2308 60 92 1 57) (2475 64 233 1 36) (2658 68 146 1 48) (2767 72 58 1 48) (2866 76 80 1 19) (2900 80 100 1 54) (3029 84 34 1 49) (3158 88 87 1 66) (3221 92 66 1 58) (3425 100 58 1 66) (3504 104 75 1 68) (4829 60 104 1 93) (5...
9abf8a003a669eee99d3385429ea481fe38d67054ab3e5458fe6ed7590e5d4bd
chapmanb/bcbio.variation
variantcontext.clj
(ns bcbio.variation.variantcontext "Helper functions to retrieve information from Picard/GATK VariantContext objects, which represent variant data stored in VCF files." (:import [htsjdk.tribble.index IndexFactory] [htsjdk.tribble AbstractFeatureReader] [htsjdk.tribble.util LittleEndianOutpu...
null
https://raw.githubusercontent.com/chapmanb/bcbio.variation/c48834a6819e63dcccb5bc51540c7e19b212a019/src/bcbio/variation/variantcontext.clj
clojure
Provide simple map-based access to important attributes of - VariantContext: Details about a variation. This captures a - Genotype: An individual genotype for a sample, at a variant position. - Allele: The actual alleles at a genotype. (doseq [[i x] (map-indexed vector (item-iter))] (println x)))
(ns bcbio.variation.variantcontext "Helper functions to retrieve information from Picard/GATK VariantContext objects, which represent variant data stored in VCF files." (:import [htsjdk.tribble.index IndexFactory] [htsjdk.tribble AbstractFeatureReader] [htsjdk.tribble.util LittleEndianOutpu...
b9f19587bfe6df13c128dfa4bedaa4eeb8e34eb3b796776dbb91e847e0926c86
himura/twitter-conduit
oauth_pin.hs
# LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} -- Example: -- $ export OAUTH_CONSUMER_KEY="your consumer key" -- $ export OAUTH_CONSUMER_SECRET="your consumer secret" $ runhaskell oauth_pin.hs module Main where import qualified Data.ByteString.Char8 as S8 import Data.Maybe import System.Env...
null
https://raw.githubusercontent.com/himura/twitter-conduit/f80058ba58fc6d71437324247eaa34b9fdd6d4d2/sample/oauth_pin.hs
haskell
# LANGUAGE OverloadedStrings # Example: $ export OAUTH_CONSUMER_KEY="your consumer key" $ export OAUTH_CONSUMER_SECRET="your consumer secret" | OAuth Consumer key and secret
# LANGUAGE FlexibleContexts # $ runhaskell oauth_pin.hs module Main where import qualified Data.ByteString.Char8 as S8 import Data.Maybe import System.Environment import System.IO (hFlush, stdout) import Web.Authenticate.OAuth as OA import Web.Twitter.Conduit getTokens :: IO OAuth getTokens = do consumerKey...
324345f5a8bee6a5e3b7acab8e05457c7c60dbcd9e376f59e1048f6cceeed96e
weavery/clarc
construct.ml
(* This is free and unencumbered software released into the public domain. *) type addr = string type ptr = int type slice = ptr * int let rec addr_of_int z = match from_int z with PUSH (_, s) -> s | _ -> unreachable () and ptr_of_int z = z and from_string = function | s when String.length s <= 32 -> PUSH (St...
null
https://raw.githubusercontent.com/weavery/clarc/1fb1c43210f52b4022e7f0ae30b7c7d4a9e7ca01/lib/EVM/construct.ml
ocaml
This is free and unencumbered software released into the public domain.
type addr = string type ptr = int type slice = ptr * int let rec addr_of_int z = match from_int z with PUSH (_, s) -> s | _ -> unreachable () and ptr_of_int z = z and from_string = function | s when String.length s <= 32 -> PUSH (String.length s, s) TODO and from_big_int z = match Big_int.int_of_big_int_...
94807b8c014ad0c305e808462f90eec49fdcdc86ff218eb7792d967db4652947
wilbowma/scribble-minted
info.rkt
#lang info (define collection 'multi) (define build-deps '("scribble-lib" "scribble-minted-lib" "racket-doc" "scribble-doc")) (define deps '("base")) (define pkg-desc "Documentation for scribble-minted") (define pkg-authors '(wilbowma)) (define version "0.5")
null
https://raw.githubusercontent.com/wilbowma/scribble-minted/0639c54c84c3294e575c1e70b2d17f5537c1750a/scribble-minted-doc/info.rkt
racket
#lang info (define collection 'multi) (define build-deps '("scribble-lib" "scribble-minted-lib" "racket-doc" "scribble-doc")) (define deps '("base")) (define pkg-desc "Documentation for scribble-minted") (define pkg-authors '(wilbowma)) (define version "0.5")
ea363ddf8b6aec89b8265c7b038c570e8d51a8714e857ba94df104d9e565fdc3
camlp5/camlp5
mlsyntax.ml
(* camlp5r *) (* mlsyntax.ml *) Copyright ( c ) INRIA 2007 - 2017 value symbolchar_or f st ?{lim} s = let list = ['!'; '$'; '%'; '&'; '*'; '+'; '-'; '.'; '/'; ':'; '<'; '='; '>'; '?'; '@'; '^'; '|'; '~'] in let lim = match lim with [ None -> String.length s | Some j -> j ] in loop st where rec loop ...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/main/mlsyntax.ml
ocaml
camlp5r mlsyntax.ml
Copyright ( c ) INRIA 2007 - 2017 value symbolchar_or f st ?{lim} s = let list = ['!'; '$'; '%'; '&'; '*'; '+'; '-'; '.'; '/'; ':'; '<'; '='; '>'; '?'; '@'; '^'; '|'; '~'] in let lim = match lim with [ None -> String.length s | Some j -> j ] in loop st where rec loop i = if i == lim then True ...
1d206ddffa3b3e3ea942bc24cd168382039ea19c2d784c221a12a1ce66600bc8
scvalex/daemons
Queue.hs
# LANGUAGE DeriveGeneric , OverloadedStrings # module Main where import Control.Concurrent.Chan ( Chan, newChan, readChan, writeChan ) import Control.Concurrent.MVar ( MVar, newMVar, modifyMVar ) import Control.Monad ( forever ) import Control.Monad.Trans.Class ( lift ) import Control.Pipe.Serialize ( serializer, des...
null
https://raw.githubusercontent.com/scvalex/daemons/15e55ff905a0b3a77dafdf1e4eaa5a096fd79659/examples/Queue.hs
haskell
Transfer a value from the given channel to the pipe. Get the channel for the given topic, and create it if it does not already exist.
# LANGUAGE DeriveGeneric , OverloadedStrings # module Main where import Control.Concurrent.Chan ( Chan, newChan, readChan, writeChan ) import Control.Concurrent.MVar ( MVar, newMVar, modifyMVar ) import Control.Monad ( forever ) import Control.Monad.Trans.Class ( lift ) import Control.Pipe.Serialize ( serializer, des...
c1bca191edac54a66c7d5403c2f25e055098403e787357966c53d224415b03fa
wireapp/wire-server
AssetKey_user.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/c428355b7683b7b7722ea544eba314fc843ad8fa/libs/wire-api/test/golden/Test/Wire/API/Golden/Generated/AssetKey_user.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Test.Wire.API.Golden.Gene...
9ad648f635037de7b3176f384f03ac5c2ddd505742973854b355cdfc32e7011c
Mayvenn/storefront
home.cljc
(ns design-system.home (:require [storefront.component :as component :refer [defcomponent]] #?@(:cljs [[storefront.loader :as loader]]) [storefront.components.ui :as ui] [storefront.events :as e] [storefront.platform.carousel :as carousel] ...
null
https://raw.githubusercontent.com/Mayvenn/storefront/51cf645fd16cf2359b48b8ce4439392e6299da7d/src-cljc/design_system/home.cljc
clojure
(ns design-system.home (:require [storefront.component :as component :refer [defcomponent]] #?@(:cljs [[storefront.loader :as loader]]) [storefront.components.ui :as ui] [storefront.events :as e] [storefront.platform.carousel :as carousel] ...
6e826126ecfaa567a21df11a655a86053cf88cf1e7cbbf64360e0ef64aadaa99
FreeProving/free-compiler
TypeSynExpansionTests.hs
| This module contains tests for " " . module FreeC.IR.TypeSynExpansionTests where import Test.Hspec import FreeC.IR.TypeSynExpansion import FreeC.Monad.Class.Testable import FreeC.Test.Environment import FreeC.Test.Expectations import FreeC.Test.Parser ...
null
https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/test/FreeC/IR/TypeSynExpansionTests.hs
haskell
| Test group for "FreeC.IR.TypeSynExpansion" tests. | Test group for 'testExpandTypeSynonym' tests. | Test group for 'expandAllTypeSynonyms' tests.
| This module contains tests for " " . module FreeC.IR.TypeSynExpansionTests where import Test.Hspec import FreeC.IR.TypeSynExpansion import FreeC.Monad.Class.Testable import FreeC.Test.Environment import FreeC.Test.Expectations import FreeC.Test.Parser ...
5028c47c1b7373c33d9cc901f61804cec70b45f056c972f890189ce65761951b
rixed/ramen
RamenAdvLock.ml
open Batteries open Legacy.Unix open RamenLog open RamenHelpers open RamenAtomic module N = RamenName module Files = RamenFiles let write_locked = Hashtbl.create 11 let with_lock op fname f = let mutex = if op = F_LOCK then Some ( match Hashtbl.find write_locked fname with | exception Not_found -> ...
null
https://raw.githubusercontent.com/rixed/ramen/11b1b34c3bf73ee6c69d7eb5c5fbf30e6dd2df4f/src/RamenAdvLock.ml
ocaml
Wait for that other thread...
open Batteries open Legacy.Unix open RamenLog open RamenHelpers open RamenAtomic module N = RamenName module Files = RamenFiles let write_locked = Hashtbl.create 11 let with_lock op fname f = let mutex = if op = F_LOCK then Some ( match Hashtbl.find write_locked fname with | exception Not_found -> ...
0b633f09f96b0a71abc75abfb8b922ad4bef634f03049d4aa337dbc37610825b
tek/proteome
ProjectSpec.hs
module Proteome.Data.ProjectSpec where import Ribosome (MsgpackDecode, MsgpackEncode) import Proteome.Data.ProjectLang (ProjectLang) import Proteome.Data.ProjectName (ProjectName) import Proteome.Data.ProjectRoot (ProjectRoot) import Proteome.Data.ProjectType (ProjectType) data ProjectSpec = ProjectSpec { name...
null
https://raw.githubusercontent.com/tek/proteome/0485af5e3803a0d077c7d54094cc9cab7e0a5009/packages/proteome/lib/Proteome/Data/ProjectSpec.hs
haskell
module Proteome.Data.ProjectSpec where import Ribosome (MsgpackDecode, MsgpackEncode) import Proteome.Data.ProjectLang (ProjectLang) import Proteome.Data.ProjectName (ProjectName) import Proteome.Data.ProjectRoot (ProjectRoot) import Proteome.Data.ProjectType (ProjectType) data ProjectSpec = ProjectSpec { name...
946ccf3efc32c37f2f9e5d9929d14dd8583cac314c29795ea8acfa5b9b1e3cf5
hasufell/hpath
CopyDirRecursiveCollectFailuresSpec.hs
{-# LANGUAGE OverloadedStrings #-} module System.Posix.RawFilePath.Directory.CopyDirRecursiveCollectFailuresSpec where import Test.Hspec import Data.List (sort) import "hpath-directory" System.Posix.RawFilePath.Directory import System.Posix.RawFilePath.Directory.Errors import System.IO.Error ( ioeGetErrorType...
null
https://raw.githubusercontent.com/hasufell/hpath/9fcc1890596e5b838bf3be9ed303165fbc692d11/hpath-directory/test/System/Posix/RawFilePath/Directory/CopyDirRecursiveCollectFailuresSpec.hs
haskell
# LANGUAGE OverloadedStrings # successes -- posix failures -- custom failures
module System.Posix.RawFilePath.Directory.CopyDirRecursiveCollectFailuresSpec where import Test.Hspec import Data.List (sort) import "hpath-directory" System.Posix.RawFilePath.Directory import System.Posix.RawFilePath.Directory.Errors import System.IO.Error ( ioeGetErrorType ) import GHC.IO.Exception ( ...
b075acf5997b5d886fa1faad781f60dababdd5e980f1cf84c7846a813105d659
deadpendency/deadpendency
DependencyAssessmentViolation.hs
module Common.Model.Assessment.DependencyAssessmentViolation ( DependencyAssessmentViolation (..), DAVDeprecationType (..), ) where import Common.Aeson.Aeson import Common.Model.Dependency.DependencyName import Common.Model.Ecosystem.Registry import Data.Aeson import Data.Vector qualified as V data Dependency...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/Assessment/DependencyAssessmentViolation.hs
haskell
module Common.Model.Assessment.DependencyAssessmentViolation ( DependencyAssessmentViolation (..), DAVDeprecationType (..), ) where import Common.Aeson.Aeson import Common.Model.Dependency.DependencyName import Common.Model.Ecosystem.Registry import Data.Aeson import Data.Vector qualified as V data Dependency...
7fcecfda2f0fd18f51eecbf4c8027ff963976292d011adabd350ba217c192bac
lukaszcz/coinduction
cProof.ml
(* Proof translation -- implementation *) open Names open CUtils open CPred open CStmt let get_canonical_ind_name s = get_ind_name (get_inductive s) let make_coproof evd s funs = let open EConstr in (* n - number of non-omitted binders up *) (* m - total number of binders up (including omitted ex binders) *) ...
null
https://raw.githubusercontent.com/lukaszcz/coinduction/b7437fe155a45f93042a5788dc62512534172dcd/src/cProof.ml
ocaml
Proof translation -- implementation n - number of non-omitted binders up m - total number of binders up (including omitted ex binders) k - absolute (top-down) index k - absolute (top-down) index n - how deep in the term is t Assume this is an equality proof TODO: check if eq is eq TODO: fix ctx by insp...
open Names open CUtils open CPred open CStmt let get_canonical_ind_name s = get_ind_name (get_inductive s) let make_coproof evd s funs = let open EConstr in let mk_copred_prf l n p = let pr = List.nth funs p n in if n = l then pr else mkApp (pr, Array.of_list (List.rev (List.map mkRel (ra...
862967c16434213b2753b93fabe1d3369b6792858aa1866afffccafa01943d9f
rizo/streams-bench
Pull_index.ml
type 'a t = { get : int -> 'a; start : int; stop : int; } let length slice = slice.stop - slice.start let start slice = slice.start let stop slice = slice.stop let of_array a = let get idx = Array.get a idx in let start, stop = 0, Array.length a in { get; start; stop } let to_array slice = ...
null
https://raw.githubusercontent.com/rizo/streams-bench/87baf838971c84613b801ab32b6473d397bcc23f/experiments/Pull_index.ml
ocaml
type 'a t = { get : int -> 'a; start : int; stop : int; } let length slice = slice.stop - slice.start let start slice = slice.start let stop slice = slice.stop let of_array a = let get idx = Array.get a idx in let start, stop = 0, Array.length a in { get; start; stop } let to_array slice = ...
428683e63661e6bbc59432bb5aa99693946b4add5cd1713fef9a97dc5abcbd55
otakar-smrz/elixir-fm
D.hs
module Elixir.Data.Sunny.Foreign.D (section) where import Elixir.Lexicon lexicon = include section cluster_1 = cluster |> ['s','I','r','^','g','i','y','U'] <| [ _____ `xtra` {- <sIr^giyU> -} [ ['S','e','r','g','i','o'] ] ] cluster_2 = cluster |> ['s','a','r','d','I','n'...
null
https://raw.githubusercontent.com/otakar-smrz/elixir-fm/fae5bab6dd53c15d25c1e147e7787b2c254aabf0/Haskell/ElixirFM/Elixir/Data/Sunny/Foreign/D.hs
haskell
<sIr^giyU> <sardIniyA> <sArs> <as-sArs> <sUrfI> <sirfAntis> <sUzA> <sUzAn> <sIsmIk> <sA^sA> <sa`d-ad-dIn> <sIfIrUmUrsk> <sUfUklIs> <sIfAn> <sAfIn> <sAkrAmintU> <sUksUmkIt> <sUlIdIr> <sAlAs> <sAlIsA^s> <sIlI^s> <sAlUnIk> <salAnIk> <sUlt> <saltA> <sAm> <sUmU> <sAmArA...
module Elixir.Data.Sunny.Foreign.D (section) where import Elixir.Lexicon lexicon = include section cluster_1 = cluster |> ['s','I','r','^','g','i','y','U'] <| [ cluster_2 = cluster |> ['s','a','r','d','I','n'] <| [ cluster_3 = cluster |> ['s','A','r','s'] <| [ cluster_4 = cluster |> ['s'...
04a2f43944e791adc55b917aa5dd0f050f4952604c5e8c853034c4cfad593615
srid/ka
Route.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # # LANGUAGE TemplateHaskell # module Ka.Route ( R, pattern (:/), DSum ((:=>)), Route (..), style, routeLink, dynRouteLink, renderRouteText, renderThingLink, ) where import Clay ((?)) import qualified Clay as C import Co...
null
https://raw.githubusercontent.com/srid/ka/9d020738215a752d30674063384cdc6bf10c4067/src/Ka/Route.hs
haskell
| Convenience builder for an 'R' using 'Identity' for the functor. # COMPLETE (:/) #
# LANGUAGE MultiParamTypeClasses # # LANGUAGE PatternSynonyms # # LANGUAGE TemplateHaskell # module Ka.Route ( R, pattern (:/), DSum ((:=>)), Route (..), style, routeLink, dynRouteLink, renderRouteText, renderThingLink, ) where import Clay ((?)) import qualified Clay as C import Co...
03c189fbb6a61c2f87f20499b51ed81a50ea3f6b1b606dda63b3fe81fd45b32d
finkel-lang/finkel
HDecl.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE ViewPatterns #-} -- | Syntax for declaration. module Language.Finkel.Syntax.HDecl where #include "Syntax.h" #include "ghc_modules.h" -- base import Data.Maybe (fromMaybe) ghc...
null
https://raw.githubusercontent.com/finkel-lang/finkel/74ce4bb779805ad2b141098e29c633523318fa3e/finkel-kernel/src/Language/Finkel/Syntax/HDecl.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # | Syntax for declaration. base --------------------------------------------------------------------- Declarations --------------------------------------------------------------------- # INLINABLE b_typeD # # INLINABLE b_...
# LANGUAGE CPP # module Language.Finkel.Syntax.HDecl where #include "Syntax.h" #include "ghc_modules.h" import Data.Maybe (fromMaybe) ghc import GHC_Core_DataCon (SrcStrictness (..)) import GHC_Data_FastString (FastString, unpackFS) import GHC_Data_Ord...
ead3f60a9bfbb44278fcf2a1cee878b3cebd14ae6af62b59b4b28fb8fc2c21ab
edicl/hunchentoot
packages.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; * Redistribut...
null
https://raw.githubusercontent.com/edicl/hunchentoot/460a32c0378c659cf8740ad84a47169484f9b131/packages.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the...
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :cl-user) (defpackage #:hunchentoot (:nicknames #:tbnl) (:use :cl :cl-ppcre :chunga :flexi-strea...
3a6eabba5c23be6702c0fceb49723a8642ee55f56ad4262f8d522714cc68e50a
haskell/bytestring
Main.hs
module Main (main) where import Test.Tasty import qualified Builder import qualified IsValidUtf8 import qualified LazyHClose import qualified Lift import qualified Properties main :: IO () main = defaultMain $ testGroup "All" [ Builder.testSuite , IsValidUtf8.testSuite , LazyHClose.testSuite , Lift.testSuite...
null
https://raw.githubusercontent.com/haskell/bytestring/731418d463c4c045893fe7cc8b17a7105671a09b/tests/Main.hs
haskell
module Main (main) where import Test.Tasty import qualified Builder import qualified IsValidUtf8 import qualified LazyHClose import qualified Lift import qualified Properties main :: IO () main = defaultMain $ testGroup "All" [ Builder.testSuite , IsValidUtf8.testSuite , LazyHClose.testSuite , Lift.testSuite...
b896e723fe03f46af70c866aed9fc78407fbbba7483ac3eee69fe28eec945c11
mishadoff/project-euler
problem019.clj
(ns project-euler.problem019 (import [java.util GregorianCalendar])) (defn calendar-for [year month] (doto (GregorianCalendar.) (.set GregorianCalendar/YEAR year) (.set GregorianCalendar/MONTH month) (.set GregorianCalendar/DAY_OF_MONTH 1))) Elapsed time : 30.138531 msecs (defn euler-019 [] (reduc...
null
https://raw.githubusercontent.com/mishadoff/project-euler/45642adf29626d3752227c5a342886b33c70b337/src/project_euler/problem019.clj
clojure
(ns project-euler.problem019 (import [java.util GregorianCalendar])) (defn calendar-for [year month] (doto (GregorianCalendar.) (.set GregorianCalendar/YEAR year) (.set GregorianCalendar/MONTH month) (.set GregorianCalendar/DAY_OF_MONTH 1))) Elapsed time : 30.138531 msecs (defn euler-019 [] (reduc...
5b0a5da177a9a77cbf202da3484eaff69312ab8677e7e01b3c05975d6275d597
rvalentini/fix.core
primitives_spec.clj
(ns fix.spec.primitives-spec (:require [clojure.spec.alpha :as spec] [clojure.string :as s] [fix.utils :refer [parse-number]])) (def utc-timestamp #"^(-?(?:[1-9][0-9]*)?[0-9]{4})(1[0-2]|0[1-9])(3[01]|0[1-9]|[12][0-9])-(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]{3})?$") (spec/def ::ut...
null
https://raw.githubusercontent.com/rvalentini/fix.core/bb4476842d0c876f8cced95b3e350cf64ce3ceae/src/fix/spec/primitives_spec.clj
clojure
amount
(ns fix.spec.primitives-spec (:require [clojure.spec.alpha :as spec] [clojure.string :as s] [fix.utils :refer [parse-number]])) (def utc-timestamp #"^(-?(?:[1-9][0-9]*)?[0-9]{4})(1[0-2]|0[1-9])(3[01]|0[1-9]|[12][0-9])-(2[0-3]|[01][0-9]):([0-5][0-9]):([0-5][0-9])(\.[0-9]{3})?$") (spec/def ::ut...
1fd144daf3eb246e80c03850ce0d54142fcc599f5a4e04b48cb90bb6748f032b
fpco/schoolofhaskell.com
Import.hs
# OPTIONS_GHC -fno - warn - orphans # module Import (module Import) where import ClassyPrelude.Yesod as Import hiding (fileName, runDB) import Data.Text.Lazy (strip) import qualified Data.UUID as U import Data.UUID.V4 (nextRandom) import qualified FP.Store.Blob as Blob import Fo...
null
https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Import.hs
haskell
^ aside, main body ^ XSS protection ^ aside, main body ^ XSS protection ^ aside, main body | Extract plain text from a body of @Html@. | Ellipsize the given text up to the given length. | A deconstructor form results.
# OPTIONS_GHC -fno - warn - orphans # module Import (module Import) where import ClassyPrelude.Yesod as Import hiding (fileName, runDB) import Data.Text.Lazy (strip) import qualified Data.UUID as U import Data.UUID.V4 (nextRandom) import qualified FP.Store.Blob as Blob import Fo...
3fcbb16510517586aeb7a9b110b2888ddb7162f4a65b0f018c5a98aca459684f
ivanjovanovic/sicp
e-1.40.scm
; Exercise 1.40. ; ; Define a procedure cubic that can be used together with the newtons-method ; procedure in expressions of the form ; ( newtons - method ( cubic a b c ) 1 ) ; to approximate zeros of the cubic x^3 + ax^2 + bx + c. ; ; -------------------------------------------------------- (load "1.3.scm") (lo...
null
https://raw.githubusercontent.com/ivanjovanovic/sicp/a3bfbae0a0bda414b042e16bbb39bf39cd3c38f8/1.3/e-1.40.scm
scheme
Exercise 1.40. Define a procedure cubic that can be used together with the newtons-method procedure in expressions of the form -------------------------------------------------------- expression. -1.27 approx (newline)
( newtons - method ( cubic a b c ) 1 ) to approximate zeros of the cubic x^3 + ax^2 + bx + c. (load "1.3.scm") (load "../common.scm") we define a procedure with three params a , b and c which will produce new procedure that has one argument x and will satisfy given (define (cubic a b c) (lambda (x) (+ ...
c9fa55e91875ad2154af31707fdd8f9c3d8b7c00d413c3733beba2fa268d6a07
avsm/eeww
cptest.ml
open Bos open Rresult open R.Infix let _reset_buffer_cache () = let shc = Cmd.(v "sh" % "-c" % "echo 1 > /proc/sys/vm/drop_caches") in OS.Cmd.run shc let fill_file_with_random ~count dst = let ofile = Fmt.strf "of=%s" dst in let count = Fmt.strf "count=%d" count in Cmd.(v "dd" % "if=/dev/urandom" % ofile % ...
null
https://raw.githubusercontent.com/avsm/eeww/17c68b93536cd382b901ba675411c2f69831fdac/lib/dispatch/bench/cptest.ml
ocaml
open Bos open Rresult open R.Infix let _reset_buffer_cache () = let shc = Cmd.(v "sh" % "-c" % "echo 1 > /proc/sys/vm/drop_caches") in OS.Cmd.run shc let fill_file_with_random ~count dst = let ofile = Fmt.strf "of=%s" dst in let count = Fmt.strf "count=%d" count in Cmd.(v "dd" % "if=/dev/urandom" % ofile % ...
6b3080b415122b0cd787a5b0670f3bf813bbff6edb9d93021e9fff186a3a58f3
funkenblatt/figwheel-test
project.clj
(defproject figwheel-test "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.170"] [org.clojure/core.rrb-vector "0.0...
null
https://raw.githubusercontent.com/funkenblatt/figwheel-test/03ca55406fde1f01b21c904f63840c3e1d6d8809/project.clj
clojure
(defproject figwheel-test "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.170"] [org.clojure/core.rrb-vector "0.0...
f113b127c715c8b27c09bfac684cce42541323917afa9faafce7ad19b5767298
erikd/vector-algorithms
RadSieve.hs
-- ------------------------------------------------------------------ -- Module : RadSieve Copyright : ( c ) 2009 -- -- ------------------------------------------------------------------ -- An implementation of a radical sieve, inspired by solving Project Euler problem # 124 . -- -- Reproduction fo...
null
https://raw.githubusercontent.com/erikd/vector-algorithms/d25f05648ebf419a96755eeba7352df6b7f7dd3f/bench/simple/RadSieve.hs
haskell
------------------------------------------------------------------ ------------------------------------------------------------------ An implementation of a radical sieve, inspired by solving Project Reproduction fo the problem text: The radical of n, rad(n), is the product of distinct prime factors and sort...
Module : RadSieve Copyright : ( c ) 2009 Euler problem # 124 . of n. For example , 504 = 23 × 32 × 7 , so rad(504 ) = 2 × 3 × 7 = 42 . If we calculate rad(n ) for 1 ≤ n ≤ 10 , then sort them on rad(n ) , n rad(n ) n rad(n ) k 1 1 1 1 1 ...
98b1cbb94fd7a69f7f4ceb66d81b87638a068afb492297ec115d48e450f959d9
wargrey/graphics
text.rkt
#lang typed/racket/base (provide (all-defined-out)) (require typed/racket/unsafe) (require "../base.rkt") (require "convert.rkt") (require "source.rkt") (require "font.rkt") (module unsafe racket/base (provide (all-defined-out)) (require "pangocairo.rkt") (require (submod "font.rkt" unsafe)) ;;;;;;;;;;;...
null
https://raw.githubusercontent.com/wargrey/graphics/059f55f74778ebb32ee266b1d27d7c8e84ab41b6/bitmap/digitama/unsafe/text.rkt
racket
-1 pango knows the minimum spacing
#lang typed/racket/base (provide (all-defined-out)) (require typed/racket/unsafe) (require "../base.rkt") (require "convert.rkt") (require "source.rkt") (require "font.rkt") (module unsafe racket/base (provide (all-defined-out)) (require "pangocairo.rkt") (require (submod "font.rkt" unsafe)) (define (bi...
c058c937bd08cf7eb22c5db41127f6cf1bd899ee4d1505ca58b9c066e63b35d8
rfkm/zou
context.clj
(ns zou.web.routing.context (:require [schema.core :as s] [zou.web.context :as ctx] [zou.web.routing.proto :as proto])) ;;; A router component that takes the servelet context into account (s/defrecord ContextAwareRouter [parent-router :- (s/protocol proto/Router) ...
null
https://raw.githubusercontent.com/rfkm/zou/228feefae3e008f56806589cb8019511981f7b01/web/src/zou/web/routing/context.clj
clojure
A router component that takes the servelet context into account
(ns zou.web.routing.context (:require [schema.core :as s] [zou.web.context :as ctx] [zou.web.routing.proto :as proto])) (s/defrecord ContextAwareRouter [parent-router :- (s/protocol proto/Router) request-context :- (s/protocol ctx/RequestAccessor)] proto/Rou...
a3e43893cfc387aa97c6331da5aa0c8eb122e83ea9eb525331b0a398a4347a00
RedPRL/asai
Asai_lsp.mli
* A LSP server for asai open Asai * { 1 LSP } A large part of the LSP protocol is about handling location - related information , which makes it possible to provide a generic LSP server for any tool using asai . A large part of the LSP protocol is about handling location-related information, which ...
null
https://raw.githubusercontent.com/RedPRL/asai/bef7bca8e6543bbc50131491db766da2f94d862f/src/lsp/Asai_lsp.mli
ocaml
* A LSP server for asai open Asai * { 1 LSP } A large part of the LSP protocol is about handling location - related information , which makes it possible to provide a generic LSP server for any tool using asai . A large part of the LSP protocol is about handling location-related information, which ...
ee18c613fde222686f93dea4fb3a5ac8005f9ca884a6eded7c23b986613ba6e5
falsetru/htdp
21.1.2.scm
( X ( listof X)->Y ) Y ( listof X ) - > Y (define (fold f base xs) (cond [(empty? xs) base] [else (f (first xs) (fold f base (rest xs)))])) (define (sum alon) (fold + 0 alon)) (define (product alon) (fold * 1 alon)) (define (append a b) (fold cons b a)) (define (map f xs) (local ((define...
null
https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/21/21.1.2.scm
scheme
( X ( listof X)->Y ) Y ( listof X ) - > Y (define (fold f base xs) (cond [(empty? xs) base] [else (f (first xs) (fold f base (rest xs)))])) (define (sum alon) (fold + 0 alon)) (define (product alon) (fold * 1 alon)) (define (append a b) (fold cons b a)) (define (map f xs) (local ((define...
2211b344ce09a3340badf22cebf7d2c2c933d595d144ff201e31f066b8ec3478
quil-lang/quilc
addresser-common.lisp
;;;; addresser-common.lisp ;;;; Author : , , (in-package #:cl-quil) ;;; This file contains the addresser, which solves the problem of mapping a sequence of Quil instructions acting on logical qubits to a scheduled sequence of Quil instructions acting on physical qubits . ;;; ;;; Logical qubits are agnost...
null
https://raw.githubusercontent.com/quil-lang/quilc/5c1142609691a817ec70442c103df3693b29d51a/src/addresser/addresser-common.lisp
lisp
addresser-common.lisp This file contains the addresser, which solves the problem of mapping a Logical qubits are agnostic of any particular QPU. In particular, incoming is suboptimal) on a specific chip. Physical qubits are meaningful with the addesser is to manage the rewiring of logical to physical qubits, co...
Author : , , (in-package #:cl-quil) sequence of Quil instructions acting on logical qubits to a scheduled sequence of Quil instructions acting on physical qubits . Quil programs may presuppose a certain connectivity that does not exist ( or respect to a given chip specification , and one of the respo...
7b250d0ceabd9ca38db5351d954f12c45265c744d54de23719f1d580e29d3465
binghe/cl-net-snmp
snmpv2-smi.lisp
;;;; -*- Mode: Lisp -*- Generated from MIB : IETF;SNMPV2 - SMI by CL - NET - SNMP (in-package :asn.1) (eval-when (:load-toplevel :execute) (setf *current-module* '|SNMPv2-SMI|)) (defpackage :|ASN.1/SNMPv2-SMI| (:nicknames :|SNMPv2-SMI|) (:use :common-lisp :asn.1)) (in-package :|SNMPv2-SMI|) (defoid |org| (|...
null
https://raw.githubusercontent.com/binghe/cl-net-snmp/3cf053bce75734097f0d7e2245a53fa0c45f5e05/compiled-mibs/snmpv2-smi.lisp
lisp
-*- Mode: Lisp -*- SNMPV2 - SMI by CL - NET - SNMP
(in-package :asn.1) (eval-when (:load-toplevel :execute) (setf *current-module* '|SNMPv2-SMI|)) (defpackage :|ASN.1/SNMPv2-SMI| (:nicknames :|SNMPv2-SMI|) (:use :common-lisp :asn.1)) (in-package :|SNMPv2-SMI|) (defoid |org| (|iso| 3) (:type 'object-identity)) (defoid |dod| (|org| 6) (:type 'object-identity))...
c30efdb29e07ac16be4f45e2014237da37bbf8115d4b3fd3f2ea7c7206d89e7f
mflatt/plait
use-untyped.rkt
#lang racket (require "untyped.rkt" (only-in plait s-exp-content)) (define-syntax-rule (test a b) (unless (equal? a b) (error 'test "failed: ~.s" 'b))) (test (s-exp-content x) '(a 2 "c" '(d))) (test "ok" ((v-f i) "ok")) (test add1 (v-f (v add1))) (test #t (v? i)) (test "a" (f "a")) (test 0 (f 0)) (te...
null
https://raw.githubusercontent.com/mflatt/plait/32420453c0890a505c4cb4ee13b0fdcc74655a18/tests/use-untyped.rkt
racket
#lang racket (require "untyped.rkt" (only-in plait s-exp-content)) (define-syntax-rule (test a b) (unless (equal? a b) (error 'test "failed: ~.s" 'b))) (test (s-exp-content x) '(a 2 "c" '(d))) (test "ok" ((v-f i) "ok")) (test add1 (v-f (v add1))) (test #t (v? i)) (test "a" (f "a")) (test 0 (f 0)) (te...
afda3f8d8fa02e2a7254053892150fd564f68d838950b2fd075f555be56d81fd
mirage/decompress
fuzz.ml
open De let w = make_window ~bits:15 let l = Lz77.make_window ~bits:15 let i = bigstring_create io_buffer_size let o = bigstring_create io_buffer_size let q = Queue.create 4096 exception End_of_input let zlib bytes = let off = ref 0 in let buf = Buffer.create 16 in try Zlib.uncompress ~header:false (...
null
https://raw.githubusercontent.com/mirage/decompress/716f7e37720b8b9684ed5a1aedc75c69071fd0fc/fuzz/fuzz.ml
ocaml
open De let w = make_window ~bits:15 let l = Lz77.make_window ~bits:15 let i = bigstring_create io_buffer_size let o = bigstring_create io_buffer_size let q = Queue.create 4096 exception End_of_input let zlib bytes = let off = ref 0 in let buf = Buffer.create 16 in try Zlib.uncompress ~header:false (...
9ecb22310554cdcc6e519d238ba93de18694298102eb4c0350239f2d7f824a4a
jimcrayne/jhc
tc240.hs
-- Checks that the types of the old binder and the binder implicitly introduced by grouping are linked {-# OPTIONS_GHC -XTransformListComp #-} module ShouldCompile where import List(inits) foo :: [[[Int]]] foo = [ x | x <- [1..10] , then group using inits , then group using inits ...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/uncat/tc240.hs
haskell
Checks that the types of the old binder and the binder implicitly introduced by grouping are linked # OPTIONS_GHC -XTransformListComp #
module ShouldCompile where import List(inits) foo :: [[[Int]]] foo = [ x | x <- [1..10] , then group using inits , then group using inits ]
3f747f656461076dc93ca52231b1f024f81500ff6fffc7754a8b649d3889dbb8
chrovis/cljam
cigar_test.clj
(ns cljam.io.sam.util.cigar-test (:require [clojure.test :refer [deftest is are]] [cljam.io.sam.util.cigar :as cigar]) (:import [java.nio ByteBuffer ByteOrder])) (defn- ints->bytes ^bytes [ints] (let [b (ByteBuffer/allocate (* 4 (count ints))) _ (.order b ByteOrder/LITTLE_ENDIAN) ib (...
null
https://raw.githubusercontent.com/chrovis/cljam/2cfa13e197df782ee3245e780d3a2b720d1f8e1b/test/cljam/io/sam/util/cigar_test.clj
clojure
^]* * * * A T G C A$ TODO: ^]* * * *+5TGCA=$ ^]* * A T G C A$ TODO: ^]* * * *+5TGCA=$ TODO: ^]A-2NN * *+1G G C$ TODO: ^]A > >+1G G C$ ^]A+1T * * G C$ ^]A+1T > > G C$ ^]A+4TGCA * * C A T G C$ ^]* * T G C A T$ ^]A T G+2CA T G C$ ^]* A T G C A$ ^]A T G C A-1N * T G C$ ^]A T G C A > T G C$ ^]G C A-1N \*$ ^]...
(ns cljam.io.sam.util.cigar-test (:require [clojure.test :refer [deftest is are]] [cljam.io.sam.util.cigar :as cigar]) (:import [java.nio ByteBuffer ByteOrder])) (defn- ints->bytes ^bytes [ints] (let [b (ByteBuffer/allocate (* 4 (count ints))) _ (.order b ByteOrder/LITTLE_ENDIAN) ib (...
3ff3887ffe3d25819ec5613e7931d54c2a54ddcd2ad95a29e9eb5ee78d9d0d10
bluelisp/hemlock
cmucl-hemlock-glue.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; File to fix Irritating Impedance Mismatch between CMU CL Hemlock and PortableHemlock . #+cmu (unless (find-package :hemlock-ext) #-hemlock (progn (load "/usr/share/common-lisp/systems/cmucl-hemlock.system") (mk:oos :cmucl-hemlock :load)) OK , here co...
null
https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/unused/elisp/cmucl-hemlock-glue.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- File to fix Irritating Impedance Mismatch between package (system-dependent stuff, basically). We expect things to be
CMU CL Hemlock and PortableHemlock . #+cmu (unless (find-package :hemlock-ext) #-hemlock (progn (load "/usr/share/common-lisp/systems/cmucl-hemlock.system") (mk:oos :cmucl-hemlock :load)) OK , here comes the nasty . CMUCLHemlock stuffs things in the " EXT " orderly and live in a Hemlock package . T...
b6d6fb0554052a56d14dbce0135fbef861d7aa72d08e5ca2e3f36b0bdb91b984
moonpolysoft/dynomite
dynomite.erl
-module(dynomite). -export([start/0, running/1, running_nodes/0, pause_all_sync/0, start_all_sync/0]). -include("../include/common.hrl"). start() -> crypto:start(), load_and_start_apps([os_mon, thrift, mochiweb, dynomite]). % running(Node) when Node == node() -> % true; running(Node) -> Ref = erlang:monito...
null
https://raw.githubusercontent.com/moonpolysoft/dynomite/a5618dcbe17b16cefdc9c567f27a1f4445aee005/elibs/dynomite.erl
erlang
running(Node) when Node == node() -> true; ==============================================================
-module(dynomite). -export([start/0, running/1, running_nodes/0, pause_all_sync/0, start_all_sync/0]). -include("../include/common.hrl"). start() -> crypto:start(), load_and_start_apps([os_mon, thrift, mochiweb, dynomite]). running(Node) -> Ref = erlang:monitor(process, {membership, Node}), R = receive ...
a75c8f8fa603cf2a83c7b385db63426d1695708531607b6c3eb7db4778ed424a
rubenbarroso/EOPL
1_13.scm
;The original context-free grammar: <top-level> ::= <s-list> <s-list> ::= () ::= (<symbol-expression> . <s-list>) <symbol-expression> ::= <symbol> | <s-list> This is the equivalent grammar using the Kleene star : <top-level> ::= <s-list> <s-list> ::= ({<symbo...
null
https://raw.githubusercontent.com/rubenbarroso/EOPL/f9b3c03c2fcbaddf64694ee3243d54be95bfe31d/src/chapter1/1_13.scm
scheme
The original context-free grammar: notate-depth according to this grammar, using map: Quick test: > (notate-depth '(a (b () c) ((d)) e))
<top-level> ::= <s-list> <s-list> ::= () ::= (<symbol-expression> . <s-list>) <symbol-expression> ::= <symbol> | <s-list> This is the equivalent grammar using the Kleene star : <top-level> ::= <s-list> <s-list> ::= ({<symbol-expression>}*) <symbol-expression>...
7e88b8bf76b760f8ff2caafdb3f175e65e10156eae97a09b718a64b1c34a6977
nwf/dyna
ANFSelftest.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE NoMonomorphismRestriction # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # -------------------------------------------------------------------------------- -- Don't forget to run the following command at the ghci promt -- g...
null
https://raw.githubusercontent.com/nwf/dyna/74bdc852b906b902b53ca07dab0c8e0639ace8ba/src/Dyna/Analysis/ANFSelftest.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ Don't forget to run the following command at the ghci promt ghci> :set -XOverloadedStrings hideous monster rule hideous monster rule
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE StandaloneDeriving # module Dyna.Analysis.ANFSelftest where import qualified Data.ByteString as B import qualified Data.List as L import qualified Data.Map ...
6ce8599830d28cd3747d41bd382763f071354791d9813619f6f96cd2d75a10dd
fakedata-haskell/fakedata
FunnyName.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Faker.Provider.FunnyName where import Config import Control.Monad.Catch import Control.Monad.IO.Class import Data.Map.Strict (Map) import Data.Monoid ((<>)) import Data.Text (Text) import Data.Vector (Vector) import Data.Yaml import Faker import F...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/FunnyName.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Provider.FunnyName where import Config import Control.Monad.Catch import Control.Monad.IO.Class import Data.Map.Strict (Map) import Data.Monoid ((<>)) import Data.Text (Text) import Data.Vector (Vector) import Data.Yaml import Faker import Faker.Internal import Faker.Provider...
89894ea6d28a2bd565abe09c543624d41a6a1713abb7c4acd07d3cddfd54f999
apauley/hledger-flow
Logging.hs
{-# LANGUAGE OverloadedStrings #-} module Hledger.Flow.Logging where import Hledger.Flow.Types import Control.Concurrent.STM import Control.Monad (when) import qualified Data.Text as T import qualified Data.Text.IO as T import Data.Time.LocalTime (getZonedTime) import qualified GHC.IO.Handle.FD as H import qualifie...
null
https://raw.githubusercontent.com/apauley/hledger-flow/b1d86dbd111cbacbace769fb4d4596b647951fc7/src/Hledger/Flow/Logging.hs
haskell
# LANGUAGE OverloadedStrings #
module Hledger.Flow.Logging where import Hledger.Flow.Types import Control.Concurrent.STM import Control.Monad (when) import qualified Data.Text as T import qualified Data.Text.IO as T import Data.Time.LocalTime (getZonedTime) import qualified GHC.IO.Handle.FD as H import qualified Turtle import Turtle ((%)) dummy...
0d0c0067d86a8c504404d9e4307c9433771ed6815c9c44b0b6e566f8d7d76ae7
ekmett/ekmett.github.com
Native.hs
------------------------------------------------------------------------------------------- -- | Module : Control . Category . Functor . Native Copyright : 2008 -- License : BSD -- Maintainer : < > -- Stability : experimental -- Portability : non-portable (class-associated types) -- -------------------...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/categories/src/Control/Category/Functor/Native.hs
haskell
----------------------------------------------------------------------------------------- | License : BSD Stability : experimental Portability : non-portable (class-associated types) -----------------------------------------------------------------------------------------
Module : Control . Category . Functor . Native Copyright : 2008 Maintainer : < > module Control.Category.Functor.Native where import Prelude hiding (Functor, map, id, (.), fst, snd, return, Monad) import qualified Prelude import Control.Category.Classes hiding ((>>=)) newtype NativeF f a = NativeF {...
4b57970840f056a07cfbc611a5c6bfcfcfe8a6419c413b88105ccb96339b64eb
NelosG/fp-tests
T11Spec.hs
# LANGUAGE QuasiQuotes # module Hi.Test.T11Spec (spec) where import Text.RawString.QQ import HW3.Base import Hi.Test.Common spec :: Spec -- spec = emptyTest spec = do describe "dictionaries" $ do it "dict literal" $ do [r|{ "width": 120, "height": 80 }|] ~=?? Ok [r|{ "height": 80, "width": 120 }|] ...
null
https://raw.githubusercontent.com/NelosG/fp-tests/4e6d6ae15eea7ab2fc6ae1eec15570902c2fb59c/hw3/test/Hi/Test/T11Spec.hs
haskell
spec = emptyTest i do n't know about that
# LANGUAGE QuasiQuotes # module Hi.Test.T11Spec (spec) where import Text.RawString.QQ import HW3.Base import Hi.Test.Common spec :: Spec spec = do describe "dictionaries" $ do it "dict literal" $ do [r|{ "width": 120, "height": 80 }|] ~=?? Ok [r|{ "height": 80, "width": 120 }|] [r|{}|] ~=?? Ok [r|{...
27eec6a825941ae42ab4785667515f4f1affaf498e70f8789c0a21929222d3bc
rrnewton/haskell-lockfree
ghci-test.hs
# LANGUAGE TemplateHaskell # -- | Test the invocation of the GHCi bytecode intepreter with atomic-primops. module Main where import Data.Atomics -- import needed to test whether ghci linking error occurs import TemplateHaskellSplices (tmap) import Test.Framework (defaultMain) import Test.Framework.Providers.HUnit (...
null
https://raw.githubusercontent.com/rrnewton/haskell-lockfree/87122157cbbc96954fcc575b4b110003d3e5c2f8/atomic-primops/testing/ghci-test.hs
haskell
| Test the invocation of the GHCi bytecode intepreter with atomic-primops. import needed to test whether ghci linking error occurs -------------------------------------- comment out for compilation to succeed --------------------------------------
# LANGUAGE TemplateHaskell # module Main where import TemplateHaskellSplices (tmap) import Test.Framework (defaultMain) import Test.Framework.Providers.HUnit (testCase) main :: IO () main = defaultMain [ testCase "Template_Haskell_invocation" $ do putStrLn "Attempting Template Haskell implementation of ma...
f5cbb26c32cd49639e068069a8d1de76264aed70d6bffadf38a15fc8b528bd87
icicle-lang/zebra-ambiata
Striped.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Test.Zebra.Serial.Text.Striped where import Disorder.Jack (Property, forAllProperties, quickCheckWithResult, maxSuccess, stdArgs) import Disorder.Jack (gamble, listOfN) import P import System.IO (IO) import ...
null
https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-core/test/Test/Zebra/Serial/Text/Striped.hs
haskell
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Test.Zebra.Serial.Text.Striped where import Disorder.Jack (Property, forAllProperties, quickCheckWithResult, maxSuccess, stdArgs) import Disorder.Jack (gamble, listOfN) import P import System.IO (IO) import ...
2a4af8f0da6166817717f8c664c0144102ee5b70142ad738a28ddcc606360dab
ymilky/franzy
cluster.clj
(ns franzy.clients.cluster "Helpers and useful functions for working with Cluster metadata." (:require [franzy.clients.codec :as codec] [franzy.clients.partitions :as partitions]) (:import (org.apache.kafka.common Cluster) (java.net InetSocketAddress))) (defn bootstrap-cluster-hosts "Boo...
null
https://raw.githubusercontent.com/ymilky/franzy/460eb00a6ffdcc993722cb3e1f6e25beb55a6929/src/franzy/clients/cluster.clj
clojure
(ns franzy.clients.cluster "Helpers and useful functions for working with Cluster metadata." (:require [franzy.clients.codec :as codec] [franzy.clients.partitions :as partitions]) (:import (org.apache.kafka.common Cluster) (java.net InetSocketAddress))) (defn bootstrap-cluster-hosts "Boo...
3e269c20ff41e86b28a0efd88d6429b89c8793c48e43eeb26b9a34accc981e8b
silviucpp/eredis_pool
erp_cached_config.erl
-module(erp_cached_config). %% Module stub. %% Will be replaced by the module with the same name at runtime. %% The only purpose for the module is to suppress warnings from code analyzers, %% as dynamically compiled module is not available during the build. -export([ get_shards_map/1 ]). -ifdef(common_test). -de...
null
https://raw.githubusercontent.com/silviucpp/eredis_pool/0a05a537ddb4ef6835b90f05de18ef9cd2e40f94/src/erp_cached_config.erl
erlang
Module stub. Will be replaced by the module with the same name at runtime. The only purpose for the module is to suppress warnings from code analyzers, as dynamically compiled module is not available during the build.
-module(erp_cached_config). -export([ get_shards_map/1 ]). -ifdef(common_test). -define(DO_NOT_LOAD, ok). -else. -define(DO_NOT_LOAD, do_not_load). -endif. -on_load(do_not_load/0). do_not_load() -> ?DO_NOT_LOAD. get_shards_map(_) -> {error, not_found}.
729f887e9e57bcd89360ea042a69ee2dce02118b712429f0270b065b2b618b01
lambdaisland/kanban
common_test.cljc
(ns kanban.common-test #? (:cljs (:require-macros [cljs.test :refer (is deftest testing)])) (:require [kanban.common :as sut] #?(:clj [clojure.test :refer :all] :cljs [cljs.test]))) (deftest example-passing-test-cljc (is (= 1 1)))
null
https://raw.githubusercontent.com/lambdaisland/kanban/c00c95ebfe67463efd8630b49362509c29ab6327/test/cljc/kanban/common_test.cljc
clojure
(ns kanban.common-test #? (:cljs (:require-macros [cljs.test :refer (is deftest testing)])) (:require [kanban.common :as sut] #?(:clj [clojure.test :refer :all] :cljs [cljs.test]))) (deftest example-passing-test-cljc (is (= 1 1)))
5dd52cbcd0a7faa9f2cee85db197f4c92c06d3a36c272f5888dcfc13e3b086a3
tenpureto/tenpureto
Internal.hs
module Tenpureto.TemplateLoader.Internal where import Control.Applicative ( (<|>) ) import Data.List import Data.Map ( Map ) import qualified Data.Map as Map import Data.Maybe import Data.Set (...
null
https://raw.githubusercontent.com/tenpureto/tenpureto/3294b4e4063bbd8924485c05930bbe68723c7d14/src/Tenpureto/TemplateLoader/Internal.hs
haskell
module Tenpureto.TemplateLoader.Internal where import Control.Applicative ( (<|>) ) import Data.List import Data.Map ( Map ) import qualified Data.Map as Map import Data.Maybe import Data.Set (...
f2407b4eb678a3298193b19e4f21d45cb11a3fb5977eb27561b1a5bb9b591e33
testdouble/clojurescript.csv
project.clj
(defproject testdouble/clojurescript.csv "0.7.1-SNAPSHOT" :description "A ClojureScript library for reading and writing comma (and other) separated values." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/c...
null
https://raw.githubusercontent.com/testdouble/clojurescript.csv/e6ebc2e53222e0f5bfbef39653d7d22d4243c1be/project.clj
clojure
PhantomJS tests "phantom-advanced" ["phantomjs" "phantom/runner.js" "test-resources/html/advanced.html"]
(defproject testdouble/clojurescript.csv "0.7.1-SNAPSHOT" :description "A ClojureScript library for reading and writing comma (and other) separated values." :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"] [org.clojure/c...