_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
bdeca11cfeaa92e48ca7f1cccf155dc17ca70f46b258730ece73d8c2de1b481f
idream-build/idream
DepsTest.hs
module Idream.DepsTest where import qualified Data.Map as Map import qualified Data.Set as Set import Idream.Deps (Deps (..), closureDeps, composeAndUnionDeps, composeDeps, depsFromEdges, depsFromGroups, depsFromPath, depsVertices, linearizeDeps, restrictDeps, revDeps) import Prelude import Test.Ta...
null
https://raw.githubusercontent.com/idream-build/idream/61af6ef68abe6d4f9b67c10f1a3efde9bd93827b/test/Idream/DepsTest.hs
haskell
module Idream.DepsTest where import qualified Data.Map as Map import qualified Data.Set as Set import Idream.Deps (Deps (..), closureDeps, composeAndUnionDeps, composeDeps, depsFromEdges, depsFromGroups, depsFromPath, depsVertices, linearizeDeps, restrictDeps, revDeps) import Prelude import Test.Ta...
d4b5bd6525a266f0f1ada7e3245e821c5047e5e6b744e10d18c8d9f2a144b7fb
clj-puredata/clj-puredata
layout.clj
(ns clj-puredata.layout "Rudimentary graph layouter for arranging nodes, to simplify debugging of generated patches. " (:require [clojure.set] [clj-puredata.common :refer :all])) (def node-map (atom {})) ;; map of nodes, keyed by node id (def connections-map (atom {})) ;; map of connections, keyed by ...
null
https://raw.githubusercontent.com/clj-puredata/clj-puredata/bb4879891b4960fee0fc511d4289a967ff0be393/src/clj_puredata/layout.clj
clojure
map of nodes, keyed by node id map of connections, keyed by node id of originating node minimum indentation for next call of run-chain FIXME: this map contains key `nil` when some nodes have not been processed (e.g. circularly connected ones) and `(cols (count cols))` will return `nil` (because the numeric key is...
(ns clj-puredata.layout "Rudimentary graph layouter for arranging nodes, to simplify debugging of generated patches. " (:require [clojure.set] [clj-puredata.common :refer :all])) (def visited-nodes (atom [])) (defn set-row! "Only assigns new row when higher (push nodes down, never up)." [node r...
89368ef591d2b4ab17a12bde91ca9e77f2d0f08305e38b8aa72e0c9590215d2c
tsurucapital/franz
URI.hs
{-# LANGUAGE OverloadedStrings #-} module Database.Franz.Internal.URI ( FranzPath(..) , toFranzPath , fromFranzPath ) where import Data.List (stripPrefix) import Data.String import Network.Socket (HostName, PortNumber) import Text.Read (readMaybe) data FranzPath = FranzPath { franzHost :: !HostName , fran...
null
https://raw.githubusercontent.com/tsurucapital/franz/ea00ed8d3e29df012299bb811340c22fe87e42da/src/Database/Franz/Internal/URI.hs
haskell
# LANGUAGE OverloadedStrings # | Render 'FranzPath' as a franz URI.
module Database.Franz.Internal.URI ( FranzPath(..) , toFranzPath , fromFranzPath ) where import Data.List (stripPrefix) import Data.String import Network.Socket (HostName, PortNumber) import Text.Read (readMaybe) data FranzPath = FranzPath { franzHost :: !HostName , franzPort :: !PortNumber , franzDir :...
77f76811b200efad0a2ea64a88e895b5ca78c7e6513b317fef9fdd61358f73cb
CicadaBank/bips
bip32_test.clj
Copyright © 2022 CicadaBank ;; Permission is hereby granted, free of charge, to any person obtaining a copy of ;; this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights to ;; use, copy, modify, merge, publish, distrib...
null
https://raw.githubusercontent.com/CicadaBank/bips/e597dfaf5008fcaf67a8cd765a8c05de53765fd8/test/bips/bip32_test.clj
clojure
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 use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of subject to the following conditions: The above copyright notice and this per...
Copyright © 2022 CicadaBank the Software without restriction , including without limitation the rights to the Software , and to permit persons to whom the Software is furnished to do so , copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EX...
6f9e393a1181de1d4bec23696d77fb5e00549a0f9ad3918b6cd63eaeaf10dcde
QuickChick/TestingNoninterference
DriverUtils.hs
# LANGUAGE FlexibleContexts , UndecidableInstances , RecordWildCards , TupleSections , ScopedTypeVariables , NamedFieldPuns # TupleSections, ScopedTypeVariables, NamedFieldPuns #-} module DriverUtils where import Test.QuickCheck import qualified Test.QuickCheck.Property as QCProp import Test.QuickCheck.Stat...
null
https://raw.githubusercontent.com/QuickChick/TestingNoninterference/29cc71ec6aa734e84b4087556ddf8d5555cf8819/stack/DriverUtils.hs
haskell
Import just Arbitrary ---------------------------- Properties to test ---------------------------- ---- Abstract machine---- Wrapper around Variation AS to allow switching between Arbitrary instances more easily This tests that at every step of the observed executions, the abstract machines are indistinguishable f...
# LANGUAGE FlexibleContexts , UndecidableInstances , RecordWildCards , TupleSections , ScopedTypeVariables , NamedFieldPuns # TupleSections, ScopedTypeVariables, NamedFieldPuns #-} module DriverUtils where import Test.QuickCheck import qualified Test.QuickCheck.Property as QCProp import Test.QuickCheck.Stat...
686c69f3182d12115db896f8b13621c7968f87bc0e6b68b3729544c76102a57c
qfpl/sv
Columnar.hs
{-# LANGUAGE OverloadedStrings #-} module Data.Sv.Example.Columnar where import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.List.NonEmpty (NonEmpty, nonEmpty) import Data.Semigroup (Semigroup ((<>))) import Data.Semigroup.Foldable (Foldable1 (foldMap1)) import Data.Sv import Data.S...
null
https://raw.githubusercontent.com/qfpl/sv/74aa56bcdcc0d7f1d7b5783bf59e3878dfbb64bc/examples/src/Data/Sv/Example/Columnar.hs
haskell
# LANGUAGE OverloadedStrings # which decode based on column name rather than position. Decoding this way makes our decoders tolerant to field reordering and makes it much easier to extract only a subset of fields from a large CSV. To demonstrate this, this file decodes a CSV with far more columns than this, and ...
module Data.Sv.Example.Columnar where import Data.ByteString (ByteString) import qualified Data.ByteString as BS import Data.List.NonEmpty (NonEmpty, nonEmpty) import Data.Semigroup (Semigroup ((<>))) import Data.Semigroup.Foldable (Foldable1 (foldMap1)) import Data.Sv import Data.Sv.Decode as D import System.Exit (e...
8263743d075501ff9d0ca3c6941c3d7527a56e0fa70cc88b4175d564e12bde53
pascal-knodel/haskell-craft
E'8'19.hs
-- -- -- ----------------- Exercise 8.19 . ----------------- -- -- -- module E'8'19 where copy :: IO () copy = do line <- getLine let whileCopy = do if (line == "") then (return () ) else ( do putStrLn line ...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Chapter%208/E'8'19.hs
haskell
--------------- --------------- In the 'outermost' do-block a local definition "line" is introduced, that holds a user-defined string. Then a function named "whileCopy" is defined, which has another 'inner' do-block. It contains an "if-function" which uses the ex- pression "line" to compare it with the empty...
Exercise 8.19 . module E'8'19 where copy :: IO () copy = do line <- getLine let whileCopy = do if (line == "") then (return () ) else ( do putStrLn line line <- getLine ...
9b6ec687bcd5b848df52fcc60a48327c602f62ff54d3d2e846f2d3300ae5f51a
ekmett/reactive
PrimReactive.hs
# LANGUAGE CPP , TypeOperators , ScopedTypeVariables , FlexibleInstances , MultiParamTypeClasses , GeneralizedNewtypeDeriving # , FlexibleInstances, MultiParamTypeClasses , GeneralizedNewtypeDeriving #-} # OPTIONS_GHC -Wall -fno - warn - orphans # -- For ghc-6.6 comp...
null
https://raw.githubusercontent.com/ekmett/reactive/61b20b7a2e92af372b5bd9a2af294db0fbdfa9d8/src/FRP/Reactive/PrimReactive.hs
haskell
For ghc-6.6 compatibility {-# OPTIONS_GHC -fglasgow-exts -Wall #-} -------------------------------------------------------------------- | License : GNU AGPLv3 (see COPYING) Maintainer : Stability : experimental Functional /events/ and /reactive values/. Semantically, an 'Event' is stream of futu...
# LANGUAGE CPP , TypeOperators , ScopedTypeVariables , FlexibleInstances , MultiParamTypeClasses , GeneralizedNewtypeDeriving # , FlexibleInstances, MultiParamTypeClasses , GeneralizedNewtypeDeriving #-} # OPTIONS_GHC -Wall -fno - warn - orphans # Module : ...
24c2e00d49d5ace12b6db12b0a83c0897294613d469846bd74896f6df6681076
tonyrog/dbus
dbus_launcher.erl
%% %% Control browser %% -module(dbus_launcher). -export([open/1]). open(Url) -> {ok, C} = dbus_connection:open(session), Fs = [{path,"/io/snapcraft/Launcher"}, {destination, "io.snapcraft.Launcher"}], io_snapcraft_launcher:open_url(C, Fs, Url).
null
https://raw.githubusercontent.com/tonyrog/dbus/d0ed42f5eda26b333643c235307ff1f3607f6a59/src/dbus_launcher.erl
erlang
Control browser
-module(dbus_launcher). -export([open/1]). open(Url) -> {ok, C} = dbus_connection:open(session), Fs = [{path,"/io/snapcraft/Launcher"}, {destination, "io.snapcraft.Launcher"}], io_snapcraft_launcher:open_url(C, Fs, Url).
f5fc6d107535d1d95f80caae4f4ee64d92956819067278a30ada55db13e800b6
pershyn/storm-metrics-opentsdb
project.clj
(defproject storm.metric/opentsdb-metrics-consumer "0.1.1" :description "Storm Metrics OpenTSDB Metrics Consumer" :min-lein-version "2.0.0" :global-vars {*warn-on-reflection* true} :aot :all :main storm.metric.OpenTSDBMetricsConsumer :profiles {:provided {:dependencies [ ...
null
https://raw.githubusercontent.com/pershyn/storm-metrics-opentsdb/a968279ff8832ad23adb76c46def8fb2eada0e61/project.clj
clojure
the storm server only provides the storm-core. so storm-core jar should be excluded when building uberjar other storm-related jars like storm-kafka should be compiled-in see: -archives.apache.org/mod_mbox/storm-user/201407.mbox/%%3E there are also some other jars that are provided. They are in normally in `lib` fo...
(defproject storm.metric/opentsdb-metrics-consumer "0.1.1" :description "Storm Metrics OpenTSDB Metrics Consumer" :min-lein-version "2.0.0" :global-vars {*warn-on-reflection* true} :aot :all :main storm.metric.OpenTSDBMetricsConsumer :profiles {:provided {:dependencies [ ...
fbe08654a9dbd734e2aa3354690b949772ab4baacc0a57b74a0961b7bd9afe0c
gsakkas/rite
0032.ml
ListG [BopG EmptyG EmptyG] [addit mod 10] [n mod 10] [sum / 10 ; sum mod 10] [z mod 10] [a + hd] [n / 10 ; n mod 10] [(h1 + h2) / 10] [(h1 + h2) mod 10] [(h * i) mod 10 ; ((h * i) / 10) + h] [v mod 10]
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/clusters/0032.ml
ocaml
ListG [BopG EmptyG EmptyG] [addit mod 10] [n mod 10] [sum / 10 ; sum mod 10] [z mod 10] [a + hd] [n / 10 ; n mod 10] [(h1 + h2) / 10] [(h1 + h2) mod 10] [(h * i) mod 10 ; ((h * i) / 10) + h] [v mod 10]
23d6e1cb01e115317415138c4188e4d61211f323594f828c0470b4e6d2acb4f2
GillianPlatform/Gillian
global_env.ml
type err_t = Symbol_not_found of string type def = FunDef of string | GlobVar of string let location_of_symbol str = "$l_" ^ str (** maps location to definition *) type t = (string, def) PMap.t let empty = PMap.empty let add_fundef genv loc fdef = PMap.add loc (FunDef fdef) genv let add_globvar genv loc gvar = PMap....
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/2e28b0187d20dbfe4d0543107b3a5ef2f51f55ef/Gillian-C/lib/global_env.ml
ocaml
* maps location to definition
type err_t = Symbol_not_found of string type def = FunDef of string | GlobVar of string let location_of_symbol str = "$l_" ^ str type t = (string, def) PMap.t let empty = PMap.empty let add_fundef genv loc fdef = PMap.add loc (FunDef fdef) genv let add_globvar genv loc gvar = PMap.add loc (GlobVar gvar) genv let add...
d4144e8b5a77d27ebfb46c697d6af7d80fbd7a426703217bb189688824a908cc
apache/couchdb-mochiweb
mochiweb_socket_server.erl
@author < > 2007 Mochi Media , Inc. @doc MochiWeb socket server . -module(mochiweb_socket_server). -author(''). -behaviour(gen_server). -include("internal.hrl"). -export([start/1, start_link/1, stop/1]). -export([init/1, handle_call/3, handle_cast/2, terminate/2, code_change/3, handle_info/2]). -...
null
https://raw.githubusercontent.com/apache/couchdb-mochiweb/53114ba91470e1b9d90e3f6fb663ff6bba43619a/src/mochiweb_socket_server.erl
erlang
Internal API XXX: `recbuf' value which is passed to `gen_tcp' and value reported by `inet:getopts(P, [recbuf])' may differ. They depends on underlying OS. From linux mans: The kernel doubles this value (to allow space for bookkeeping overhead) when it is set using setsockopt(2), and this doubled value is return...
@author < > 2007 Mochi Media , Inc. @doc MochiWeb socket server . -module(mochiweb_socket_server). -author(''). -behaviour(gen_server). -include("internal.hrl"). -export([start/1, start_link/1, stop/1]). -export([init/1, handle_call/3, handle_cast/2, terminate/2, code_change/3, handle_info/2]). -...
18b69a0fc3af5af0ccae8f70541f634245d62cbc2c4731492f20e3c3a0c6410f
sadiqj/ocaml-esp32
t110-addint.ml
open Lib;; let x = 1 in if 1 + x <> 2 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 CONST1 10 PUSHCONST2 11 PUSHACC1 12 PUSHCONST1 13 ADDINT 14 NEQ 15 BRANCHIFNOT 22 17 GETGLO...
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/tool-ocaml/t110-addint.ml
ocaml
open Lib;; let x = 1 in if 1 + x <> 2 then raise Not_found ;; * 0 CONSTINT 42 2 PUSHACC0 3 MAKEBLOCK1 0 5 POP 1 7 9 CONST1 10 PUSHCONST2 11 PUSHACC1 12 PUSHCONST1 13 ADDINT 14 NEQ 15 BRANCHIFNOT 22 17 GETGLO...
30d8b0ddef4f6fb92a19f72a255efeb8b7f2680a1cfe9332d43bb7abc5dd2225
vbrankov/hdf5-ocaml
create_groups.ml
open Hdf5_raw let _FILE = "group.h5" let file_info loc_id name () = let grp = H5g.open_ loc_id name in Printf.printf "\n"; Printf.printf "Name : "; print_endline name; H5g.close grp; H5_raw.Iter.CONT let () = let file = H5f.create _FILE H5f.Acc.([ TRUNC ]) in let _ = H5g.create file "/Data" in let ...
null
https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/examples/h5_intro/create_groups.ml
ocaml
open Hdf5_raw let _FILE = "group.h5" let file_info loc_id name () = let grp = H5g.open_ loc_id name in Printf.printf "\n"; Printf.printf "Name : "; print_endline name; H5g.close grp; H5_raw.Iter.CONT let () = let file = H5f.create _FILE H5f.Acc.([ TRUNC ]) in let _ = H5g.create file "/Data" in let ...
f71bbf7160d3f1e4aae933cb0ac855c78c6403dd0de8faee356cc50af8c2d792
dQuadrant/kuber
DataTransformation.hs
{-# LANGUAGE GADTs #-} # LANGUAGE FlexibleContexts # module Cardano.Kuber.Utility.DataTransformation where import Cardano.Api import qualified Cardano.Api.Shelley as Shelley import Cardano.Api.Byron (Address(ByronAddress)) import Cardano.Api.Shelley (Address(ShelleyAddress), fromPlutusData, fromShelleyPaymentCredential...
null
https://raw.githubusercontent.com/dQuadrant/kuber/93d590bda421d428752fd6ee3cfdd716e7ddf2e4/src/Cardano/Kuber/Utility/DataTransformation.hs
haskell
# LANGUAGE GADTs # Note that the transformation Address <-> Pkh is not symmetrical for all addresses It's symmetrical for Enterprise addresses (because enterprise addresses have no stake Key in it) convert address to corresponding PubKeyHash. Note that the transformation Address <-> Pkh is not symmetrical for al...
# LANGUAGE FlexibleContexts # module Cardano.Kuber.Utility.DataTransformation where import Cardano.Api import qualified Cardano.Api.Shelley as Shelley import Cardano.Api.Byron (Address(ByronAddress)) import Cardano.Api.Shelley (Address(ShelleyAddress), fromPlutusData, fromShelleyPaymentCredential, shelleyPayAddrToPlutu...
c815c598322f23ca1bff578111906e89ff21b2409cb106f1ae07d0f765fc2379
blockapps/eth-pruner
InsertHandler.hs
{-# LANGUAGE OverloadedStrings #-} module Prune.InsertHandler where import Control.Concurrent import Data.Monoid ((<>)) -- import Control.Concurrent.MVar import Control.Monad import Control.Monad.Loops import qualified Database.LevelDB as DB import ...
null
https://raw.githubusercontent.com/blockapps/eth-pruner/513fcc884c93974a29b380ca80669dc0aebec125/src/Prune/InsertHandler.hs
haskell
# LANGUAGE OverloadedStrings # import Control.Concurrent.MVar
module Prune.InsertHandler where import Control.Concurrent import Data.Monoid ((<>)) import Control.Monad import Control.Monad.Loops import qualified Database.LevelDB as DB import System.IO import Database insertLoop :: MVar Bool -> MVar Bool ->...
6e39464e9bbbdc8f04f884ced434ef0e9b8e89ebd8354be3be2df295bfea8f7c
inaka/sumo_db
sumo_find_test_helper.erl
-module(sumo_find_test_helper). %% Test Cases - Helpers -export([ find_by_sort/1, find_all_sort/1, init_store/1 ]). -type config() :: [{atom(), term()}]. %%%============================================================================= %%% Test Cases - Helpers %%%================================================...
null
https://raw.githubusercontent.com/inaka/sumo_db/331ea718c13a01748a7739ad4078b0032f4d32e5/src/adapter_test_helpers/sumo_find_test_helper.erl
erlang
Test Cases - Helpers ============================================================================= Test Cases - Helpers =============================================================================
-module(sumo_find_test_helper). -export([ find_by_sort/1, find_all_sort/1, init_store/1 ]). -type config() :: [{atom(), term()}]. -spec find_by_sort(config()) -> ok. find_by_sort(Config) -> {_, Name} = lists:keyfind(name, 1, Config), Module = sumo_config:get_prop_value(Name, module), [First, Second | _...
566ebcd9decd9b96580632f0144c889098f6772251579836cb5cdcc0f85635d7
Blue-Sky-Skunkworks/cl-ascii-art
bitmaps.lisp
(in-package :cl-ascii-art) (defun make-bitmap (width height) (make-array (list height width) :initial-element nil)) (defun clear-bitmap (bitmap) (destructuring-bind (height width) (array-dimensions bitmap) (iter (for x from 0 to (1- width)) (iter (for y from 0 to (1- height)) (setf (aref bitmap ...
null
https://raw.githubusercontent.com/Blue-Sky-Skunkworks/cl-ascii-art/7e8a3203371cfa245b2327d676ed9fd438e12ad5/bitmaps.lisp
lisp
Described in █ ▄▀ ▄▀ ▄▀ ▄▀ █ █ █ ▄▀ ▄▀ █ █ █ █ ▄▀ █ █ █ ▄▀ ▄▀ █ █ █ █ ▄▀ ▄▀▀ █ █ █ ▄▀ ▄▀ ▄▀▀ █ █ █ ▄▀ ▄▀ ▄▄▀ █ █ █ ▄▀ ▄▀ ▄▀ █ █ █ ▄▀ ▄▀ ▄▀▀ ▄▄▀▀▀ █ █ █ ▄▀ ▄▀ ▄▄▀ ▄▄▀▀ ...
(in-package :cl-ascii-art) (defun make-bitmap (width height) (make-array (list height width) :initial-element nil)) (defun clear-bitmap (bitmap) (destructuring-bind (height width) (array-dimensions bitmap) (iter (for x from 0 to (1- width)) (iter (for y from 0 to (1- height)) (setf (aref bitmap ...
a4d4c8b5fe1dd8dc34450b7a96f5e28b46f095fd201671af54b03f9d8d39e548
manuel-serrano/bigloo
jfile.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / bde / jfile / jfile.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/bde/jfile/jfile.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Package access file generator. */ *===========================...
* serrano / prgm / project / bigloo / bde / jfile / jfile.scm * / * Author : * / * Creation : We d Mar 17 10:49:15 1993 * / * Last change : Tue Mar 20 11:49:24 2012 ( serrano ) * / (module ...
bf6469b21ca0027f29fbfa556572f732cf7981a17b0874e24b27202ae7d2382e
alex-hhh/ActivityLog2
make-checksums.rkt
#lang racket/base ;; make-checksums.rkt -- produce checksums of a distribution, this is used ;; from the build pipeline. ;; ;; This file is part of ActivityLog2 -- -hhh/ActivityLog2 Copyright ( c ) 2022 < > ;; ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU ...
null
https://raw.githubusercontent.com/alex-hhh/ActivityLog2/4f8793668ee5a4fd5b7fc225cf6e95951fd0495e/etc/scripts/make-checksums.rkt
racket
make-checksums.rkt -- produce checksums of a distribution, this is used from the build pipeline. This file is part of ActivityLog2 -- -hhh/ActivityLog2 This program is free software: you can redistribute it and/or modify it any later version. This program is distributed in the hope that it will be useful, but ...
#lang racket/base Copyright ( c ) 2022 < > under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) You should have received a copy of the GNU General Public License along (require file/sha1 racket/stri...
34d43eab2810eb3eeb3c955ac8f7354e4db3287d2e9225a8c1c057782a4293eb
ninenines/gun
proxied_h.erl
%% Feel free to use, reuse and abuse the code in this file. -module(proxied_h). -export([init/2]). -spec init(cowboy_req:req(), _) -> no_return(). init(Req, _) -> _ = cowboy_req:stream_reply(200, #{<<"content-type">> => <<"text/plain">>}, Req), %% We never return to allow querying the stream_info. receive after i...
null
https://raw.githubusercontent.com/ninenines/gun/fe25965f3a2f1347529fec8c7afa981313378e31/test/handlers/proxied_h.erl
erlang
Feel free to use, reuse and abuse the code in this file. We never return to allow querying the stream_info.
-module(proxied_h). -export([init/2]). -spec init(cowboy_req:req(), _) -> no_return(). init(Req, _) -> _ = cowboy_req:stream_reply(200, #{<<"content-type">> => <<"text/plain">>}, Req), receive after infinity -> ok end.
8e0470a0e12aa5c24b22476b18d18f19665f9a0b726ef9aeb3e65e87e6caa863
eeng/mercurius
progress_test.clj
(ns mercurius.util.progress-test (:require [clojure.test :refer [deftest testing is]] [mercurius.util.progress :refer [new-progress-tracker advance! current finish!]])) (deftest new-progress-tracker-test (testing "returns a function that should allow to advance the progress" (let [progress (new-pro...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/test/mercurius/util/progress_test.clj
clojure
(ns mercurius.util.progress-test (:require [clojure.test :refer [deftest testing is]] [mercurius.util.progress :refer [new-progress-tracker advance! current finish!]])) (deftest new-progress-tracker-test (testing "returns a function that should allow to advance the progress" (let [progress (new-pro...
305d9d06a6f15821d65d10d599478edc2500b0af6e39590dbba4efc372339240
fiddlerwoaroof/lisp-sandbox
transform-ct.lisp
(ql:quickload '(:plump :lquery :serapeum :alexandria :flexi-streams :chipz :babel :net.didierverna.clon)) (in-package #:org.shirakumo.plump.parser) (define-tag-dispatcher (script *tag-dispatchers* *html-tags...
null
https://raw.githubusercontent.com/fiddlerwoaroof/lisp-sandbox/38ff817c95af35db042faf760b477675264220d2/transform-ct.lisp
lisp
(uiop:directory-files "." (uiop:merge-pathnames* (make-pathname :type "bz2") uiop:*wild-file*)) (uiop:directory-files "." (uiop:merge-pathnames* (make-pathname :type "bz2") uiop:*wild-file*)) (car *) (plump:parse *) (lquery:initialize *) ($ "p[title]" (combine (attr :title) (text)))
(ql:quickload '(:plump :lquery :serapeum :alexandria :flexi-streams :chipz :babel :net.didierverna.clon)) (in-package #:org.shirakumo.plump.parser) (define-tag-dispatcher (script *tag-dispatchers* *html-tags...
e92c126fd990b8e62bc84926712bc3d46f2567b526f2a6d7dc7bdf830163c68a
scalaris-team/scalaris
rr_resolve.erl
2011 - 2015 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable request_resolvelaw or agreed to in writing, ...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/rrepair/rr_resolve.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 request_resolvelaw or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specif...
2011 - 2015 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > Updates local and/or remote Key - Value - Pairs ( kv - pair ) 1 ) key_upd : updates local db en...
008357f91313c7783660f7def86ab68ca8cff02c49f5aba7cbe5b03cf789ffef
samrushing/irken-compiler
t_enum.scm
(include "lib/core.scm") (define (print-imm x) (%%cexp ('a -> int) "fprintf (stderr, \"code=%%p\\n\", (object*)%0)" x)) (datatype foo (:one) (:two) (:three) ) (datatype glork (:a) (:b) ) (define bar (foo:one) -> 1 (foo:two) -> 2 (foo:three) -> 3 ) (printn (bar (foo:one))) (printn (bar (foo...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_enum.scm
scheme
(print-imm #t) (print-imm #f) (print-imm (glork:a)) (print-imm (glork:b))
(include "lib/core.scm") (define (print-imm x) (%%cexp ('a -> int) "fprintf (stderr, \"code=%%p\\n\", (object*)%0)" x)) (datatype foo (:one) (:two) (:three) ) (datatype glork (:a) (:b) ) (define bar (foo:one) -> 1 (foo:two) -> 2 (foo:three) -> 3 ) (printn (bar (foo:one))) (printn (bar (foo...
2b934025a792af072be940482b6db14b8088056a87e4b371977afe18c96606d3
tsloughter/kuberl
kuberl_apiregistration_api.erl
-module(kuberl_apiregistration_api). -export([get_api_group/1, get_api_group/2]). -define(BASE_URL, ""). %% @doc %% get information of a group -spec get_api_group(ctx:ctx()) -> {ok, kuberl_v1_api_group:kuberl_v1_api_group(), kuberl_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), kuberl_utils:r...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_apiregistration_api.erl
erlang
@doc get information of a group
-module(kuberl_apiregistration_api). -export([get_api_group/1, get_api_group/2]). -define(BASE_URL, ""). -spec get_api_group(ctx:ctx()) -> {ok, kuberl_v1_api_group:kuberl_v1_api_group(), kuberl_utils:response_info()} | {ok, hackney:client_ref()} | {error, term(), kuberl_utils:response_info()}. get_api_group(Ctx) -> ...
ae23626cc378a2f4d76d55cba298dd34dd2b5bc2c60d6c0a3306eca20dce220e
pouriya/posthaste
posthaste_SUITE.erl
-module(posthaste_SUITE). -author(""). %% ------------------------------------------------------------------------------------------------- %% Exports: %% ct callbacks: -export([init_per_suite/1 ,end_per_suite/1 ,all/0 ,init_per_testcase/2 ,end_per_testcase/2]). -export(['1'/1 ...
null
https://raw.githubusercontent.com/pouriya/posthaste/2210d0487d0a8a97111d113e433e4efd67e172e4/test/posthaste_SUITE.erl
erlang
------------------------------------------------------------------------------------------------- Exports: ct callbacks:
-module(posthaste_SUITE). -author(""). -export([init_per_suite/1 ,end_per_suite/1 ,all/0 ,init_per_testcase/2 ,end_per_testcase/2]). -export(['1'/1 ,'2'/1 ,'3'/1 ,'4'/1 ,'5'/1 ,'6'/1]). -include_lib("common_test/include/ct.hrl"). -include_lib("e...
167e708fcdfc3a38734c392cc44bb97184da1a061d71c872c4923bc610bb8e87
mankyKitty/cautious-sniffle
Timeout.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # -- | Timeout settings for the driver to use. -- module Protocol.Webdriver.ClientAPI.Types.Timeout where import Data.Functor.Contravariant ((>$<)) import GHC.Word (Word32) impo...
null
https://raw.githubusercontent.com/mankyKitty/cautious-sniffle/8916ef6e2d310158a76f8f573841e09ce3a0d7da/lib/Protocol/Webdriver/ClientAPI/Types/Timeout.hs
haskell
| Timeout settings for the driver to use. | The given timeout period. [spec](/#timeouts)
# LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # module Protocol.Webdriver.ClientAPI.Types.Timeout where import Data.Functor.Contravariant ((>$<)) import GHC.Word (Word32) import Protocol.Webdriver.ClientAPI.Types....
72a275c2b1d609b8fd6eca906aa033b0b158220717365c52ef5f27df772a2de9
zilch-lang/nstar
Instructions.hs
# LANGUAGE TupleSections # # LANGUAGE TypeFamilies # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE MultiWayIf #-} module Language.NStar.Typechecker.Instructions where import Language.NStar.Typechecker.Errors import Language.NStar.Typechecker.TC import Language.NStar.Typechecker.Free import Language.NStar.Typechecke...
null
https://raw.githubusercontent.com/zilch-lang/nstar/9d56d1e2ac3f2f71c1081f5a47a96bc4ade61ccb/lib/nsc-typechecker/src/Language/NStar/Typechecker/Instructions.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE MultiWayIf # > r is a register > n ∈ ℕ > r, d are registers > Γ ⊢ᴷ t : T8 > t ≠ ! > r is a register > r is a register > n ∈ ℕ > n ≤ p > n ≤ p > χ ∼ χ′ ∪ ρ > ⋀(r ∉ ρ | r ∈ bang(χ′)) > σ′ = t ∷ σ > m ∈ ℕ > Γ ⊢ᴷ t : Tm > n ∈ ℕ > n ≤ p > n ∈ ℕ > n ≤ p > tₙ ∼ ∀()...
# LANGUAGE TupleSections # # LANGUAGE TypeFamilies # module Language.NStar.Typechecker.Instructions where import Language.NStar.Typechecker.Errors import Language.NStar.Typechecker.TC import Language.NStar.Typechecker.Free import Language.NStar.Typechecker.Subst import Language.NStar.Typechecker.Core import Language....
6d7fe446648b10b02359b7d60773932115ce5ce4f60867e9467e0bd5739ecab2
joewilliams/erl_geo_dns
couchbeam.erl
Copyright 2009 . Licensed under the Apache License , Version 2.0 ( the " License " ) ; %%% you may not use this file except in compliance with the License. %%% You may obtain a copy of the License at %%% %%% -2.0 %%% %%% Unless required by applicable law or agreed to in writing, software distributed under t...
null
https://raw.githubusercontent.com/joewilliams/erl_geo_dns/682c3925959db61ead99f13160ef8bd77486a871/apps/couchbeam/src/couchbeam.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
Copyright 2009 . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , start_app has been borrowed to couchdb project under Apache2 license @author < > 2009 . -module(couchbeam). -author('Benoît Chesneau <>'). -...
4c6bc8bbf25cbd4a6041e6b274103ae505cc5a5c8516b3419183e58215771358
joelwilliamson/bimap
Util.hs
# LANGUAGE TemplateHaskell # module Test.Util ( extractTests, ) where import Control.Arrow import Data.List import Language.Haskell.TH import Language.Haskell.TH.Syntax import Test.QuickCheck import Text.Printf Use ' propertyNames ' to extract all QuickCheck test names from a file . Use 'propertyNames' to ...
null
https://raw.githubusercontent.com/joelwilliamson/bimap/013a0639c222b3f5572ae20ce364815e5d8f2156/Test/Util.hs
haskell
# LANGUAGE TemplateHaskell # module Test.Util ( extractTests, ) where import Control.Arrow import Data.List import Language.Haskell.TH import Language.Haskell.TH.Syntax import Test.QuickCheck import Text.Printf Use ' propertyNames ' to extract all QuickCheck test names from a file . Use 'propertyNames' to ...
19f8e22df4662473d421942185038bd5c40928db8cf3593a76e11b347b3e75fc
qitab/ace.core
once-only-test.lisp
Copyright 2020 Google LLC ;;; Use of this source code is governed by an MIT - style ;;; license that can be found in the LICENSE file or at ;;; . ;;; Tests the macro utilities. (defpackage #:ace.core.once-only-test (:use #:common-lisp #:ace.core.macro #:ace.core.once-only #:ace.test) (...
null
https://raw.githubusercontent.com/qitab/ace.core/e6eb21ff67b0c5eaec21c9b543b6dce18d7c8e6d/once-only-test.lisp
lisp
license that can be found in the LICENSE file or at . Tests the macro utilities. ONCE-ONLY tests. The form expansion captures the lexical environment. Since the x argument was not provided, it will not be bound to a temporary variable and evaluated once. Since "(cc)" is not constant, The init form `(1+ ,x)...
Copyright 2020 Google LLC Use of this source code is governed by an MIT - style (defpackage #:ace.core.once-only-test (:use #:common-lisp #:ace.core.macro #:ace.core.once-only #:ace.test) (:import-from #:ace.core.once-only ace.core.once-only::generate-once-only-content)...
feadfe2b783e9c55e65caf5b610fb13d64a48e936cc747b793a5ed48b2f4d25a
s-expressionists/Concrete-Syntax-Tree
variables.lisp
(cl:in-package #:concrete-syntax-tree) ;;; This variable is used internally to maintain a reference to a lambda list ;;; that bindings are being generated for. It is used in error reporting. (defvar *current-lambda-list*) ;;; This variable is used internally to maintain a reference to the name of a ;;; macro for whic...
null
https://raw.githubusercontent.com/s-expressionists/Concrete-Syntax-Tree/a56a5246fbaa90b98a29368c011a6616f2bcb482/Destructuring/variables.lisp
lisp
This variable is used internally to maintain a reference to a lambda list that bindings are being generated for. It is used in error reporting. This variable is used internally to maintain a reference to the name of a macro for which a lambda list is being parsed, for error reporting.
(cl:in-package #:concrete-syntax-tree) (defvar *current-lambda-list*) If no macro is being parsed , its value is NIL . (defvar *current-macro-name* nil)
7826305638d279b3735eb37371e0d1a874709f4cdcc79987a0f5d9d1e2471de3
racket/typed-racket
do.rkt
#lang typed/racket/shallow (define-type-alias Nb Number) (let: ([x : Nb 3]) x) (let ([x '(1 3 5 7 9)]) (let: doloop : Nb ([x : (Listof Nb) x] [sum : Number 0]) (if (null? x) sum (doloop (cdr x) (+ sum (car x)))))) (let ((x '(1 3 5 7 9))) (do: : Nb ((x : (Listof Nb) x (cdr x)) (sum : Number 0 (+ s...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/do.rkt
racket
#lang typed/racket/shallow (define-type-alias Nb Number) (let: ([x : Nb 3]) x) (let ([x '(1 3 5 7 9)]) (let: doloop : Nb ([x : (Listof Nb) x] [sum : Number 0]) (if (null? x) sum (doloop (cdr x) (+ sum (car x)))))) (let ((x '(1 3 5 7 9))) (do: : Nb ((x : (Listof Nb) x (cdr x)) (sum : Number 0 (+ s...
d26a776c312a9fda4654a411c5081c0fdc2dc8569b5f6a96fed3526258d13567
roburio/http-lwt-client
http_lwt_client.ml
open Lwt_result.Infix let open_err r = let open Lwt.Infix in r >|= function Ok _ as r -> r | Error (`Msg _) as r -> r let connect he ?port ?tls_config hostname = let port = match port, tls_config with | None, None -> 80 | None, Some _ -> 443 | Some p, _ -> p in open_err (Happy_eyeballs_lwt.conne...
null
https://raw.githubusercontent.com/roburio/http-lwt-client/853e1f070b44b3eb3644164072d9ceb14bbe37e3/src/http_lwt_client.ml
ocaml
proto :// user : pass @ host : port / path XXX(dinosaure): we must do the copy before the [>>=]. [Httpaf] will re-use [bs] then. XXX(dinosaure): we must do the copy before the [>>=]. [H2] will re-use [bs] then.
open Lwt_result.Infix let open_err r = let open Lwt.Infix in r >|= function Ok _ as r -> r | Error (`Msg _) as r -> r let connect he ?port ?tls_config hostname = let port = match port, tls_config with | None, None -> 80 | None, Some _ -> 443 | Some p, _ -> p in open_err (Happy_eyeballs_lwt.conne...
ca6ff02741a29155b26f7c83debebd6dca6f3b7c747cf087911a211f0dba2036
deusdat/waller
files.clj
(ns waller.files (:require [clojure.string :as cstr] [clojure.java.io :as io] [waller.core :as core] [travesedo.database :as tdb] [travesedo.collection :as tcol] [travesedo.query :as tqry] [travesedo.graph :as tgraph] [travesedo.index...
null
https://raw.githubusercontent.com/deusdat/waller/bf003cf328defe73fc6189c0d7912eea687af6f9/src/waller/files.clj
clojure
-------- Picking the right reaction ---------------- Added 7/25/2015 --------------- End Picking the Right Reaction ---------
(ns waller.files (:require [clojure.string :as cstr] [clojure.java.io :as io] [waller.core :as core] [travesedo.database :as tdb] [travesedo.collection :as tcol] [travesedo.query :as tqry] [travesedo.graph :as tgraph] [travesedo.index...
bc64348e5ff32687a677ff270e554f9ed2af58b5ce01cfda686e6a79d57412ce
ostera/serde.ml
starfleet_expanded.ml
[@@@ocaml.ppx.context { tool_name = "ppx_driver"; include_dirs = []; load_path = []; open_modules = []; for_package = None; debug = false; use_threads = false; use_vmthreads = false; recursive_types = false; principal = false; transparent_modules = false; unboxed_types = false; unsafe_string =...
null
https://raw.githubusercontent.com/ostera/serde.ml/88604884cf3e6a928916f33c4bca1444bc2e12a2/examples/starfleet_expanded.ml
ocaml
[@@@ocaml.ppx.context { tool_name = "ppx_driver"; include_dirs = []; load_path = []; open_modules = []; for_package = None; debug = false; use_threads = false; use_vmthreads = false; recursive_types = false; principal = false; transparent_modules = false; unboxed_types = false; unsafe_string =...
51f8e789b366f0d6115f4574fd31ac5757bee011d7710e12de61d78fd6730157
omnyway-labs/re-crud
core.cljs
(ns re-crud.core (:require [re-crud.events :as events] [re-crud.swagger :as swagger] [re-frame.core :as re-frame :refer [dispatch reg-event-db]])) (defn init-service [db service-name service-config] (dispatch [:crud-swagger-get service-name service-config]) (assoc-in db [:crud-service-con...
null
https://raw.githubusercontent.com/omnyway-labs/re-crud/2fe9cbcf0a19d8c09a86d9025577e6271e9dd5a3/src/cljs/re_crud/core.cljs
clojure
(ns re-crud.core (:require [re-crud.events :as events] [re-crud.swagger :as swagger] [re-frame.core :as re-frame :refer [dispatch reg-event-db]])) (defn init-service [db service-name service-config] (dispatch [:crud-swagger-get service-name service-config]) (assoc-in db [:crud-service-con...
16c27a587e0c8b93db7073be2e261ad50f6a81b0f182e938425badb8d1fd0976
sanette/snake-bogue
snake2.ml
BOGUE version 2 of the snake game . San Vu Ngoc , 2022 Adapted with minimal changes from an ocaml / javascript version by , -re-tut.html Version 2 : this version is more BOGUEsque . The snake is a layout composed of several layouts , one for each snake " cell " . A " screen " layout is used to ...
null
https://raw.githubusercontent.com/sanette/snake-bogue/2e17f5706b068ae992bca7dc46bf514768cd10e4/src/snake2.ml
ocaml
Background The snake cells layouts will be added to the snake rooms.
BOGUE version 2 of the snake game . San Vu Ngoc , 2022 Adapted with minimal changes from an ocaml / javascript version by , -re-tut.html Version 2 : this version is more BOGUEsque . The snake is a layout composed of several layouts , one for each snake " cell " . A " screen " layout is used to ...
3dde75fd2bc6697c78429c255ecd62282de8720b3b91eab497d5c2576b19e577
haskell-game/tiny-games-hs
template1.hs
#!/usr/bin/env runghc main = do putStrLn "playable game here" s <- getLine putStrLn $ "you entered: " ++ s -- ^10 ------------------------------------------------------------------ 80> -- prelude-10 - 80 / template1 ( mynick ) , ghc 9.2.5 -}
null
https://raw.githubusercontent.com/haskell-game/tiny-games-hs/e56b1c6e6d994631a4ab5cf0bfb5ab5c62d1fa86/prelude/template1.hs
haskell
^10 ------------------------------------------------------------------ 80> --
#!/usr/bin/env runghc main = do putStrLn "playable game here" s <- getLine putStrLn $ "you entered: " ++ s prelude-10 - 80 / template1 ( mynick ) , ghc 9.2.5 -}
e791e86bf719451d184b9b6ecd7b69fb35ee20d0358d2bee8f4c0ca389868323
geophf/1HaskellADay
Exercise.hs
{-# LANGUAGE OverloadedStrings #-} module Y2018.M05.D18.Exercise where -- Before we insert new articles, let's step back in time for a moment. Recall import Y2018.M04.D09.Exercise - where we uploaded tags , we uploaded a sample set of 10 tags . There are a lot more tags than 10 for the World Policy Journal . To...
null
https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M05/D18/Exercise.hs
haskell
# LANGUAGE OverloadedStrings # Before we insert new articles, let's step back in time for a moment. Recall } The JSON format we already know and parse (see above exercise) and the tags are exhausted when the Value returned is the empty list. How many tags are there for this REST endpoint? You may want to use some ...
module Y2018.M05.D18.Exercise where import Y2018.M04.D09.Exercise - where we uploaded tags , we uploaded a sample set of 10 tags . There are a lot more tags than 10 for the World Policy Journal . Today we 're going to find out how many . The REST endpoint for the tags is as follows : - where we uploaded ...
c01d5c85ffe8242d031d6d2bbc55451aab9b05d087445c348d7926c473271bb3
smimram/ocaml-alg
hypergraph.ml
* . module type T = sig (** Vertices. *) module V : Alphabet.T (** Edges. *) module E : Alphabet.T (** Source. *) val src : E.t -> V.t list (** Target. *) val tgt : E.t -> V.t list end module Full (V : Alphabet.T) (E : Alphabet.T) = struct module V = struct type t = { label : V.t } let ...
null
https://raw.githubusercontent.com/smimram/ocaml-alg/99a18d844118fc375757dd0179d9cfb389ca9203/src/hypergraph.ml
ocaml
* Vertices. * Edges. * Source. * Target. * Presentation of an hypergraph.
* . module type T = sig module V : Alphabet.T module E : Alphabet.T val src : E.t -> V.t list val tgt : E.t -> V.t list end module Full (V : Alphabet.T) (E : Alphabet.T) = struct module V = struct type t = { label : V.t } let label x = x.label let eq x y = x == y let compare x y = V.c...
36a37ecdee70fc603f41ca88591dfec342db518b2f991f0a0c318362d24b3072
wdebeaum/step
insensitive.lisp
;;;; ;;;; W::insensitive ;;;; (define-words :pos W::adj :words ( (W::insensitive (SENSES ((meta-data :origin cardiac :entry-date 20080520 :change-date nil :comments nil) (LF-PARENT ONT::physical-reaction) (TEMPL adj-central-figure-ground-optional-templ (XP (% W::PP (W::ptype W::to)))) (SYNTAX...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/insensitive.lisp
lisp
W::insensitive
(define-words :pos W::adj :words ( (W::insensitive (SENSES ((meta-data :origin cardiac :entry-date 20080520 :change-date nil :comments nil) (LF-PARENT ONT::physical-reaction) (TEMPL adj-central-figure-ground-optional-templ (XP (% W::PP (W::ptype W::to)))) (SYNTAX (W::COMP-OP W::LESS) (W::ATYP...
994742df4fceddcd5b247a5555151df15d9a121f244f59e1a67467035ac68cee
SchornacklabSLCU/amfinder
amfCallback.ml
AMFinder - amfCallback.ml * * MIT License * Copyright ( c ) 2021 * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to * deal in the Software without restriction , including without limi...
null
https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/407c09ddda9c04a31e513b6bd32963c1d4d27388/amfbrowser/sources/amfCallback.ml
ocaml
Size of the overview window. Retrieve current drawing Generate filename Save snapshot.
AMFinder - amfCallback.ml * * MIT License * Copyright ( c ) 2021 * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to * deal in the Software without restriction , including without limi...
94fdb4bf5e92f04311059fb636098c07057b41c39c5cd30fe6f293e2e9603788
mstepniowski/project-euler
euler_041.clj
Solution to Project Euler problem 41 ;; ;; We shall say that an n - digit number is pandigital if it makes use of all the digits 1 to n exactly once . For example , 2143 is a 4 - digit pandigital and is also prime . ;; What is the largest n - digit pandigital prime that exists ? (ns com.stepniowski.euler-041...
null
https://raw.githubusercontent.com/mstepniowski/project-euler/01d64aa46b21d96fc5291fdf216bf4bad8249029/src/com/stepniowski/euler_041.clj
clojure
Solution to Project Euler problem 41 We shall say that an n - digit number is pandigital if it makes use of all the digits 1 to n exactly once . For example , 2143 is a 4 - digit pandigital and is also prime . What is the largest n - digit pandigital prime that exists ? (ns com.stepniowski.euler-041 (:use c...
8092fb3bbf7c843eb00d5196e25e357f41eb9d8a241efdc60c83aa2efbac17a6
EFanZh/EOPL-Exercises
exercise-1.9-test.rkt
#lang racket/base (require rackunit) (require "../solutions/exercise-1.9.rkt") (check-equal? (remove 'a '()) '()) (check-equal? (remove 'a '(a)) '()) (check-equal? (remove 'a '(a b)) '(b)) (check-equal? (remove 'a '(b)) '(b)) (check-equal? (remove 'a '(b c)) '(b c)) (check-equal? (remove 'b '(a b)) '(a)) (check-equal...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-1.9-test.rkt
racket
#lang racket/base (require rackunit) (require "../solutions/exercise-1.9.rkt") (check-equal? (remove 'a '()) '()) (check-equal? (remove 'a '(a)) '()) (check-equal? (remove 'a '(a b)) '(b)) (check-equal? (remove 'a '(b)) '(b)) (check-equal? (remove 'a '(b c)) '(b c)) (check-equal? (remove 'b '(a b)) '(a)) (check-equal...
96b5aefb5f023109fe3b43f2999041da24e47bb1eb1d877dd70656ee2dc8e9c7
ocaml-flambda/ocaml-jst
stack.mli
# 1 "stack.mli" (**************************************************************************) (* *) (* OCaml *) (* ...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/stdlib/stack.mli
ocaml
************************************************************************ OCaml ...
# 1 "stack.mli" , projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open! Stdlib * Last - in first - out stacks . This module implements stacks ( LIFO...
03ac884329b7735af73f4bc30055bca09dbc4962e02c7f447cfe3ac96ce9a8cf
zehnpaard/kontlang
valcont.ml
type valt = | Nil | Int of int | Str of string | Bool of bool | Op of string * (valt list -> valt) | Fn of string * string list * (string * valt) list ref * Exp.t | Macro of string list * Exp.t | Cons of valt * valt | Cont of string * (string * valt) list list * contt list | Module of (string * valt) list and contt = |...
null
https://raw.githubusercontent.com/zehnpaard/kontlang/adf295f5582988930df36b343fcebd5568dbc7a6/src/valcont.ml
ocaml
type valt = | Nil | Int of int | Str of string | Bool of bool | Op of string * (valt list -> valt) | Fn of string * string list * (string * valt) list ref * Exp.t | Macro of string list * Exp.t | Cons of valt * valt | Cont of string * (string * valt) list list * contt list | Module of (string * valt) list and contt = |...
4fcd70905d8432978f28111b41df6459f81f40cbafca12bd075ea4045a04c1a8
noinia/hgeometry
OrphanInstances.hs
# OPTIONS_GHC -fno - warn - orphans # {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE OverloadedStrings #-} module Geometry.Web.OrphanInstances where import Data.Colour.SRGB (RGB(..)) import Data.Fixed import qualified Ipe as Ipe import qualified Ipe.Attributes as IA import ...
null
https://raw.githubusercontent.com/noinia/hgeometry/89cd3d3109ec68f877bf8e34dc34b6df337a4ec1/hgeometry-web/src/Geometry/Web/OrphanInstances.hs
haskell
# LANGUAGE UndecidableInstances # # LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ * Dealing with attributes FIXME: This does not actually show the path
# OPTIONS_GHC -fno - warn - orphans # module Geometry.Web.OrphanInstances where import Data.Colour.SRGB (RGB(..)) import Data.Fixed import qualified Ipe as Ipe import qualified Ipe.Attributes as IA import Ipe.Color (IpeColor(..)) import Ipe.Value import Geometry.Matrix...
ce54c7b2232f78b4cf6c5f47689b1f06d161393091d4de9a0dc4f1442d228b07
morpheusgraphql/morpheus-graphql
Merge.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE NoImplicitPrelude # module Data.Mergeable.Internal.Merge ( mergeConcat, Merge (..), mergeNoDuplicates...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/f9684d1451fd4ee3aabdb821424fd352003a3982/morpheus-graphql-core/src/Data/Mergeable/Internal/Merge.hs
haskell
Merge Object with of Failure as an Option
# LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE NoImplicitPrelude # module Data.Mergeable.Internal.Merge ( mergeConcat, Merge (..), mergeNoDuplicates...
443abd1d6ff4c624c549d3d332b256a07c77e57013bd55568fda9ec7a4eddc12
sneeuwballen/zipperposition
SolidSubsumption.mli
exception UnsupportedLiteralKind module Make (S : sig val st : Flex_state.t end) : sig val subsumes : Literals.t -> Literals.t -> bool end
null
https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/core/SolidSubsumption.mli
ocaml
exception UnsupportedLiteralKind module Make (S : sig val st : Flex_state.t end) : sig val subsumes : Literals.t -> Literals.t -> bool end
6a096a4ee36496c00841703afe59b6b7c64ad6ed98c7f72bcf10e8bed2f29bb1
otto-de/tesla-microservice
keep_alive.clj
(ns de.otto.tesla.stateful.keep-alive "This component is responsible for keeping the system alive by creating a non-deamonized noop thread." (:require [clojure.tools.logging :as log] [com.stuartsierra.component :as component]) (:import (java.util.concurrent CountDownLatch))) (defn exit-keep-alive [] ...
null
https://raw.githubusercontent.com/otto-de/tesla-microservice/eb2190dacc1634f625ed216186cad00fc9853868/src/de/otto/tesla/stateful/keep_alive.clj
clojure
(ns de.otto.tesla.stateful.keep-alive "This component is responsible for keeping the system alive by creating a non-deamonized noop thread." (:require [clojure.tools.logging :as log] [com.stuartsierra.component :as component]) (:import (java.util.concurrent CountDownLatch))) (defn exit-keep-alive [] ...
d50fe8dadd9a52110a1c1526b4856e67a008c3398da54640c69b3a75ed3db992
jacekschae/learn-pedestal-course-files
routes.clj
(ns cheffy.routes (:require [io.pedestal.http.route :as route] [cheffy.recipes :as recipes] [cheffy.recipes.steps :as steps] [cheffy.recipes.ingredients :as ingredients] [cheffy.conversations :as conversations] [cheffy.account :as account])) (defn routes ...
null
https://raw.githubusercontent.com/jacekschae/learn-pedestal-course-files/76ae71ffd11d32f306cd9ab4bd158461d8c81782/increments/70-aws-ssm/src/main/cheffy/routes.clj
clojure
account recipes steps ingredients conversations
(ns cheffy.routes (:require [io.pedestal.http.route :as route] [cheffy.recipes :as recipes] [cheffy.recipes.steps :as steps] [cheffy.recipes.ingredients :as ingredients] [cheffy.conversations :as conversations] [cheffy.account :as account])) (defn routes ...
398e880563b8cc9aae9af5da45fb84469673e3c585d3784d026c8bf85024a360
Rainist/kubeletter
deliverer_test.clj
(ns kubeletter.deliver.deliverer-test (:require [clojure.test :refer :all] [kubeletter.deliver.slack :as slack] [kubeletter.deliver.deliverer :refer :all])) (deftest deliverer-test (->> (hand-over {:top-node {:added [] :terminated [] ...
null
https://raw.githubusercontent.com/Rainist/kubeletter/da326a067147f45b069a49d22730ea07675f9e16/kubeletter/test/kubeletter/deliver/deliverer_test.clj
clojure
(ns kubeletter.deliver.deliverer-test (:require [clojure.test :refer :all] [kubeletter.deliver.slack :as slack] [kubeletter.deliver.deliverer :refer :all])) (deftest deliverer-test (->> (hand-over {:top-node {:added [] :terminated [] ...
106b50bcf4da7ee3e69bb6e9b03da8cf9b57f434d2c01fb7e6d5097138f828b3
mfoemmel/erlang-otp
ex1.erl
%%<copyright> %% <year>1996-2007</year> < holder > Ericsson AB , All Rights Reserved</holder > %%</copyright> %%<legalnotice> The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/snmp/examples/ex1/ex1.erl
erlang
<copyright> <year>1996-2007</year> </copyright> <legalnotice> compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specif...
< holder > Ericsson AB , All Rights Reserved</holder > The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " The Initial Developer of the Original Code i...
c3d9f1fd44a314a9561ffdde764c2ced50964e8199e114281db11d97810f43ff
seagreen/ian
Widget.hs
-- | General widgets that don't reference the game. module Cr2d.Replica.Widget where import Concur.Core (Widget) import Concur.Replica (HTML) import qualified Concur.Replica.DOM as H import qualified Concur.Replica.DOM.Events as P import qualified Concur.Replica.DOM.Props as P import Cr2d.Prelude -- | Modified from t...
null
https://raw.githubusercontent.com/seagreen/ian/f245fb68d94299f0e3e12744e9d1549447ad529a/concur-replica-example-2d/src/Cr2d/Replica/Widget.hs
haskell
| General widgets that don't reference the game. | Modified from the concur-replica examples. | Placeholder | Starting value
module Cr2d.Replica.Widget where import Concur.Core (Widget) import Concur.Replica (HTML) import qualified Concur.Replica.DOM as H import qualified Concur.Replica.DOM.Events as P import qualified Concur.Replica.DOM.Props as P import Cr2d.Prelude inputOnEnter :: Text -> Text -> Widget HTML Text inputOnEnter p v ...
f695ad8ceaf0eb52a2d0c023d630869347e80502fb2151ec1f2f626c5af087cd
a-nikolaev/wanderers
view.ml
Wanderers - open world adventure game . Copyright ( C ) 2013 - 2014 . This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at...
null
https://raw.githubusercontent.com/a-nikolaev/wanderers/054c1cdc6dd833d8938357e6d898def510531d67/src/view.ml
ocaml
small small inventory coordinates switch texture choose color lor gl_depth_buffer_bit Clear The Screen And The Depth Buffer Reset The View *. (melee.Item.Melee.duration) output_object_description mountains background -1 usually -1 usually below shadowed currently visible above mark pla...
Wanderers - open world adventure game . Copyright ( C ) 2013 - 2014 . This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at...
c9b00e9b56fc097fc74c4c81339720a332d2af3e72193927a419857a39571636
ronxin/stolzen
1.scm
#lang scheme (define (paired? seq) true ) (define input '(1 2 3)) (if (paired? input) (map (lambda (x) (* x x x)) input) (foldr + 1 input) )
null
https://raw.githubusercontent.com/ronxin/stolzen/bb13d0a7deea53b65253bb4b61aaf2abe4467f0d/sicp/other-stuff/1.scm
scheme
#lang scheme (define (paired? seq) true ) (define input '(1 2 3)) (if (paired? input) (map (lambda (x) (* x x x)) input) (foldr + 1 input) )
733cced15ecdde6487f52167dfe5581202989d1b91891a6b3bcf63eb5d2f208b
NorfairKing/hastory
Gen.hs
# LANGUAGE FlexibleInstances # # OPTIONS_GHC -Wno - orphans # module Hastory.Gen where import Control.Applicative import Data.GenValidity import Data.GenValidity.Text import qualified Data.Text as T import Database.Persist.Sql (fromSqlKey, toSqlKey) import Hastory.Data import Hastory.Data.Client.DB import Hastory.Dat...
null
https://raw.githubusercontent.com/NorfairKing/hastory/35abbc79155bc7c5a0f6e0f3618c8b8bcd3889a1/hastory-data-gen/src/Hastory/Gen.hs
haskell
don't shrink Password
# LANGUAGE FlexibleInstances # # OPTIONS_GHC -Wno - orphans # module Hastory.Gen where import Control.Applicative import Data.GenValidity import Data.GenValidity.Text import qualified Data.Text as T import Database.Persist.Sql (fromSqlKey, toSqlKey) import Hastory.Data import Hastory.Data.Client.DB import Hastory.Dat...
947b6e28e781413e73adaa5184e7a2e56151fb3d8c382316ab10021087d821e2
OCamlPro/OCamlPro-OCaml-Branch
testing.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet...
null
https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/inline-more/testsuite/lib/testing.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 2006 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : testing.mli , v 1.1 2006/01/...
34feee7792fe5b32672de44e7fef6501aea32066580e846c0ab37c0b2a9d7929
nanocaml/nanocaml
docs_example.ml
open OUnit2 let is_primitive id = List.mem id [ "+"; "-"; "*"; "/"; "cons"; "car"; "cdr"; "pair?"; "vector" ; "make-vector"; "vector-length"; "vector-ref"; "vector-set!" ; "vector?"; "string"; "make-string"; "string-length" ; "string-ref"; "string-set!"; "string?"; "void"] ...
null
https://raw.githubusercontent.com/nanocaml/nanocaml/c856268dc8986bd9fb739c8cd6b972052997a30c/test/docs_example.ml
ocaml
open OUnit2 let is_primitive id = List.mem id [ "+"; "-"; "*"; "/"; "cons"; "car"; "cdr"; "pair?"; "vector" ; "make-vector"; "vector-length"; "vector-ref"; "vector-set!" ; "vector?"; "string"; "make-string"; "string-length" ; "string-ref"; "string-set!"; "string?"; "void"] ...
6cb9ce31ef6a54a95e36b1877faf3a69deb60e441a47be34f6d7f575ce215685
Netflix/PigPen
io.clj
;; ;; Copyright 2013 - 2015 Netflix , Inc. ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to ...
null
https://raw.githubusercontent.com/Netflix/PigPen/18d461d9b2ee6c1bb7eee7324889d32757fc7513/pigpen-core/src/main/clojure/pigpen/extensions/io.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the speci...
Copyright 2013 - 2015 Netflix , Inc. distributed under the License is distributed on an " AS IS " BASIS , (set! *warn-on-reflection* true) (ns pigpen.extensions.io (:import [java.io File])) (defn list-files "List files in a folder" [dir] (if (string? dir) (map #(.getAbsolutePath ^File %) ...
2e55a8424008d1931ae2facda7ac9671600e5dacf8b47663ee4f037b1ec4f960
nezavisimost/wgctrl
selectors.clj
(ns wgctrl.cluster.selectors (:require [wgctrl.cluster.checks :as c] [wgctrl.cluster.utils :as u])) (defn interface-by-name [name node] (first (filter #(= name (:name %)) @(.interfaces node)))) (defn nodes-by-location [nodes location] (filter #(= location (-> % .location :code)) nodes)) (defn uuid-...
null
https://raw.githubusercontent.com/nezavisimost/wgctrl/2d5929bfaddcb87f844ea3fe856328376b499536/src/wgctrl/cluster/selectors.clj
clojure
(ns wgctrl.cluster.selectors (:require [wgctrl.cluster.checks :as c] [wgctrl.cluster.utils :as u])) (defn interface-by-name [name node] (first (filter #(= name (:name %)) @(.interfaces node)))) (defn nodes-by-location [nodes location] (filter #(= location (-> % .location :code)) nodes)) (defn uuid-...
34f67f9d7495310acb9be965457d6e924f0b3974e4386be22ce6b5e135434688
tmattio/js-bindings
es2018_asyncgenerator.ml
[@@@js.dummy "!! This code has been generated by gen_js_api !!"] [@@@ocaml.warning "-7-32-39"] [@@@ocaml.warning "-7-11-32-33-39"] open Es2017 open Es2018_asynciterable module AsyncGenerator = struct include struct include AsyncIterator end type ('T, 'TReturn) t_2 = ('T, 'TReturn, unknown) t let rec t_2_o...
null
https://raw.githubusercontent.com/tmattio/js-bindings/fe1d40a5b8cae157af85fa84ca482fb6b0ddf1e0/lib/es2018/es2018_asyncgenerator.ml
ocaml
[@@@js.dummy "!! This code has been generated by gen_js_api !!"] [@@@ocaml.warning "-7-32-39"] [@@@ocaml.warning "-7-11-32-33-39"] open Es2017 open Es2018_asynciterable module AsyncGenerator = struct include struct include AsyncIterator end type ('T, 'TReturn) t_2 = ('T, 'TReturn, unknown) t let rec t_2_o...
85f083223b3a27b03bbbb66129a5d33b1dde6fef0ca0d5c5f45fd1fe7da3962c
haskell-suite/haskell-src-exts
Nounpack2.hs
data Foo = Foo {-# NOUNPACK #-} Int
null
https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/Nounpack2.hs
haskell
# NOUNPACK #
97e47118942ad9ff7460fd0b44ad9918dadc4ce0a05c5edd53800afb35f40717
dstarcev/stepic-haskell
Task16.hs
module Module5.Task16 where import Control.Monad.Reader (Reader, asks) -- system code type User = String type Password = String type UsersTable = [(User, Password)] -- solution code usersWithBadPasswords :: Reader UsersTable [User] usersWithBadPasswords = asks $ map fst . filter isBad where isBad = ("123456" ==) . ...
null
https://raw.githubusercontent.com/dstarcev/stepic-haskell/6a8cf4b3cc17333ac4175e825db57dbe151ebae0/src/Module5/Task16.hs
haskell
system code solution code
module Module5.Task16 where import Control.Monad.Reader (Reader, asks) type User = String type Password = String type UsersTable = [(User, Password)] usersWithBadPasswords :: Reader UsersTable [User] usersWithBadPasswords = asks $ map fst . filter isBad where isBad = ("123456" ==) . snd
b9f5d05d7400481d913f28e802d7c7e10742f481c89e5252d401244ebc9be4d8
factisresearch/opensource
StrictVector.hs
# OPTIONS_GHC -fno - warn - type - defaults -fno - warn - name - shadowing -F -pgmF htfpp # module StrictVector where import Data.Option import Data.StrictVector import Control.Exception import Test.Framework import qualified Data.List as L import qualified Data.Vector.Generic as VG prop_groupBy :: [(Int,Int)] -> Bo...
null
https://raw.githubusercontent.com/factisresearch/opensource/d8b1fdf39d945bfcbc045ca9f73ab5aa84f89fa0/strict-data/test/StrictVector.hs
haskell
prop_groupOn :: [(Int,Int)] -> Bool prop_groupOn l = res1 = groupOn proj (fromList l) in res2 == res1
# OPTIONS_GHC -fno - warn - type - defaults -fno - warn - name - shadowing -F -pgmF htfpp # module StrictVector where import Data.Option import Data.StrictVector import Control.Exception import Test.Framework import qualified Data.List as L import qualified Data.Vector.Generic as VG prop_groupBy :: [(Int,Int)] -> Bo...
6f32a1e78995f0391a40cdb03e0d701d5d4ef3c69e6761fbf3a513c491a9d846
futurice/haskell-mega-repo
Timereports.hs
{-# LANGUAGE ApplicativeDo #-} # LANGUAGE DerivingVia # # LANGUAGE DataKinds # # LANGUAGE InstanceSigs # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # {-# LANGUAGE TypeFamilies #-...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/futuqu/src/Futuqu/Rada/Timereports.hs
haskell
# LANGUAGE ApplicativeDo # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # ----------------------------------------------------------------------------- Data ----------------------------------------------------------------------------- There aren't timereport id. not s...
# LANGUAGE DerivingVia # # LANGUAGE DataKinds # # LANGUAGE InstanceSigs # # LANGUAGE StandaloneDeriving # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # module Futuqu.Rada.Timereports where import Control.Lens (toListOf) import Dat...
f5c1b2e3bb2404e0b08e3eecc8279cbfadf6c58116cc155e1a3b23568b2ed5ca
stain/rdf-clj
protocols.clj
(ns rdf.protocols) (defprotocol RDF (graph [f] [f g]) (iri [f iri]) (literal [f lit] [f lit type-or-lang] [f lit type lang]) (blanknode [f] [f name]) (triple [f t] [f subj pred obj]) ) (defprotocol Term (iri? ^Boolean [term]) (literal? ^Boolean [term]) (blanknode?...
null
https://raw.githubusercontent.com/stain/rdf-clj/3fc767af3c561cf85b661c27b8d014d395190519/src/rdf/protocols.clj
clojure
Below should do (str t) if t is not already a literal nil: not iri, literal or blanknode deliberately let the rest of the functions fail Default: not iri, literal or blanknode deliberately let the rest of the functions fail
(ns rdf.protocols) (defprotocol RDF (graph [f] [f g]) (iri [f iri]) (literal [f lit] [f lit type-or-lang] [f lit type lang]) (blanknode [f] [f name]) (triple [f t] [f subj pred obj]) ) (defprotocol Term (iri? ^Boolean [term]) (literal? ^Boolean [term]) (blanknode?...
1830cd597523b234439e5fc91ada4d47872b98108722313baa0f6444373e8c04
donnerpeter/Constructor
Testing.hs
module Constructor.Tests.Testing where data TranslateTest = TranslateTest { src:: String, target:: String, timeLimit:: Int } translateTest src target = textTranslateTest 80 src target textTranslateTest time src target = TranslateTest src target time
null
https://raw.githubusercontent.com/donnerpeter/Constructor/5b76403eb2356127fcf2a6d86c23cf3447a77402/src_hs/Constructor/Tests/Testing.hs
haskell
module Constructor.Tests.Testing where data TranslateTest = TranslateTest { src:: String, target:: String, timeLimit:: Int } translateTest src target = textTranslateTest 80 src target textTranslateTest time src target = TranslateTest src target time
604973be4a3ba6b3cb130cde10ca1e4a6cc0e8fbc7e95d6351f6ab5c0414deb6
anton-k/processing-for-haskell
Color.hs
module Graphics.Proc.Lib.Color( stroke, noStroke, fill, noFill, background, clear, strokeFill, rgb, grey, rgba, greya, setAlpha, hsv, hsva, white, black, navy, blue, aqua, teal, olive, green, lime, yellow, orange, red, maroon, fushsia, purple, gray, silver ) where import Control.Monad.State.Strict ...
null
https://raw.githubusercontent.com/anton-k/processing-for-haskell/7f99414f3c266135b6a2848978fcb572fd7b67b1/src/Graphics/Proc/Lib/Color.hs
haskell
| Sets the color used to draw lines and borders around shapes. processing docs: <> processing docs: <> processing docs: <> processing docs: <> | Sets stroke and fill to the same color. ---------------------------------------------------- processing docs: <> | Clears the pixels within a buffer. processing...
module Graphics.Proc.Lib.Color( stroke, noStroke, fill, noFill, background, clear, strokeFill, rgb, grey, rgba, greya, setAlpha, hsv, hsva, white, black, navy, blue, aqua, teal, olive, green, lime, yellow, orange, red, maroon, fushsia, purple, gray, silver ) where import Control.Monad.State.Strict ...
afd2064969c70ca8faf8fc9b5ddb55aa19c5115a6c2eacc11e8d7b660ed0b8fc
andrejbauer/spartan-type-theory
name.mli
(** Kinds of names. *) type fixity = | Word (** an ordinary word *) | Anonymous of int (** an anonymous name _ *) | Prefix (** prefix operator *) | Infix of Level.infix (** infix operator *) (** An identifier. *) type ident = Ident of string * fixity (** Print an identifier. *) val print_ident : ?parentheses:...
null
https://raw.githubusercontent.com/andrejbauer/spartan-type-theory/3806830b2a52a630696b7d218f033fd92b148d2e/src/name.mli
ocaml
* Kinds of names. * an ordinary word * an anonymous name _ * prefix operator * infix operator * An identifier. * Print an identifier. * Create a fresh anonymous name. * Given a list [xs] of forbidden names and a name [x], find a new name for [x] which does not clash with any from [xs].
type fixity = type ident = Ident of string * fixity val print_ident : ?parentheses:bool -> ident -> Format.formatter -> unit val anonymous : unit -> ident val refresh : ident list -> ident -> ident
8e40b553ac6b26c9cdccec7d40803164ab3c2fce034e7d8ea64184a398cc92f6
mbenke/zpf2013
arr1.hs
class Arrow a where arr :: (b->c) -> a b c (>>>) :: a b c -> a c d -> a b d newtype Kleisli m a b = K(a -> m b) instance Monad m => Arrow (Kleisli m) where arr f = K(return . f) K f >>> K g = K(f >=> g) (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> (a -> m c) f >=> g = \x -> (f x >>= g)
null
https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Slides/12Arrow/arr1.hs
haskell
class Arrow a where arr :: (b->c) -> a b c (>>>) :: a b c -> a c d -> a b d newtype Kleisli m a b = K(a -> m b) instance Monad m => Arrow (Kleisli m) where arr f = K(return . f) K f >>> K g = K(f >=> g) (>=>) :: Monad m => (a -> m b) -> (b -> m c) -> (a -> m c) f >=> g = \x -> (f x >>= g)
00eb74cdbfef75768bb98f9a73b4fe781337840852917aabe1ae789118891792
finnishtransportagency/harja
kulut.cljs
(ns harja.views.urakka.kulut.kulut (:require [tuck.core :as tuck] [reagent.core :as r] [goog.string :as gstring] [goog.string.format] [harja.domain.kulut :as kulut] [harja.tiedot.urakka.urakka :as tila] [harja.tiedot.urakka.kulut.mhu-kulut :as ti...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/1c9ed494fe3e33b8bb919b59b4e2b336bad50cc0/src/cljs/harja/views/urakka/kulut/kulut.cljs
clojure
viimeisestä kohdistuksesta. päivitetään molempien lomakkeiden validointi
(ns harja.views.urakka.kulut.kulut (:require [tuck.core :as tuck] [reagent.core :as r] [goog.string :as gstring] [goog.string.format] [harja.domain.kulut :as kulut] [harja.tiedot.urakka.urakka :as tila] [harja.tiedot.urakka.kulut.mhu-kulut :as ti...
93dcc314830fefdf96cf6a11f0f97acf24f644feba353ddadfbb190f1ff6f2b6
JuneKelly/hicdown
html.clj
(ns wtf.halt.hicdown.html (:require [clojure.core.match :refer [match]] [clojure.string :as s])) (defn escape-html-char [ch] (match ch "&" "&amp;" "<" "&lt;" ">" "&gt;" :else ch)) (defn un-escape [e] (subs e 1)) (defn as-chars [xs] (map #(if (vector? %1) (un-escape (seco...
null
https://raw.githubusercontent.com/JuneKelly/hicdown/2f071846673d7b9a503422f21f18f059f4b8527d/src/wtf/halt/hicdown/html.clj
clojure
(ns wtf.halt.hicdown.html (:require [clojure.core.match :refer [match]] [clojure.string :as s])) (defn escape-html-char [ch] (match ch "&" "&amp;" "<" "&lt;" ">" "&gt;" :else ch)) (defn un-escape [e] (subs e 1)) (defn as-chars [xs] (map #(if (vector? %1) (un-escape (seco...
fdde65ad1f42c96711c573c7dc71b7160a711b1835ebf6515768425231581ec1
racket/web-server
web-cell-component.rkt
#lang racket/base (require (for-syntax racket/base) (for-template racket/base)) (provide define-component) (define-syntax define-component (syntax-rules (define) [(_ (include-name id formals embed/url) body ...) (define include-name (lambda formals (let/cc k (define (id) ...
null
https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/lang/web-cell-component.rkt
racket
#lang racket/base (require (for-syntax racket/base) (for-template racket/base)) (provide define-component) (define-syntax define-component (syntax-rules (define) [(_ (include-name id formals embed/url) body ...) (define include-name (lambda formals (let/cc k (define (id) ...
f3c7aab2a2d78d1f576db58b7776cb6611c58922f788b6ff6df12037c1469a6d
ska80/thinlisp
c-files.lisp
(in-package "TLI") ;;;; Module C-FILES Copyright ( c ) 1999 - 2001 The ThinLisp Group Copyright ( c ) 1995 Gensym Corporation . ;;; All rights reserved. This file is part of ThinLisp . ThinLisp is open source ; you can redistribute it and/or modify it under the terms of the ThinLisp License as published b...
null
https://raw.githubusercontent.com/ska80/thinlisp/173573a723256d901887f1cbc26d5403025879ca/tlt/lisp/c-files.lisp
lisp
Module C-FILES All rights reserved. you can redistribute it and/or modify it either version 1 or ( at your option ) any later version . WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. C File Structures This module implements structures and operatio...
(in-package "TLI") Copyright ( c ) 1999 - 2001 The ThinLisp Group Copyright ( c ) 1995 Gensym Corporation . This file is part of ThinLisp . under the terms of the ThinLisp License as published by the ThinLisp ThinLisp is distributed in the hope that it will be useful , but For additional information s...
f1dc398f5080c9b9b23355063159cdffa6ee7316068352edcc245785e7535295
grayjay/json-rpc-server
Server.hs
# LANGUAGE CPP # {-# LANGUAGE Rank2Types #-} {-# LANGUAGE OverloadedStrings #-} | Functions for implementing the server side of JSON - RPC 2.0 . -- See <>. module Network.JsonRpc.Server ( -- ** Instructions -- $instructions -- ** Reques...
null
https://raw.githubusercontent.com/grayjay/json-rpc-server/5a8844e8c8ef426b1ede83495932edafccf44fb2/src/Network/JsonRpc/Server.hs
haskell
# LANGUAGE Rank2Types # # LANGUAGE OverloadedStrings # See <>. ** Instructions $instructions ** Requests $requests ** Example $example ** Methods ** Errors ** Deprecated $instructions * Create methods by calling 'toMethod' and providing the method names, lists of parameters, and functions to be called....
# LANGUAGE CPP # | Functions for implementing the server side of JSON - RPC 2.0 . module Network.JsonRpc.Server ( RpcResult , Method , toMethod , call , callWithBatchStrategy ...
9884b7345c748b535aa52825025658767f33fd3998a95bf211db82a1a7215dc1
donaldsonjw/bigloo
c.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / comptime / BackEnd / c.scm * / ;* ------------------------------------------------------------- */ * Author : * / ;* Creation :...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/comptime/BackEnd/c.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * Creation : Mon Aug 4 14:10:06 2003 */ * ------------------------------------------------------------- */ * The C back-end ...
* serrano / prgm / project / bigloo / comptime / BackEnd / c.scm * / * Author : * / * Last change : Tue Dec 10 16:10:26 2013 ( serrano ) * / * Copyright : 2003 - 13 * / (module backend_c ...
ccc819d49be47fb576d660d194903920341bdc236fcefa5965b8d38528289cb9
aryx/xix
first_follow.ml
(*s: yacc/first_follow.ml *) s : copyright ocamlyacc * * Copyright ( C ) 2015 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/yacc/first_follow.ml
ocaml
s: yacc/first_follow.ml for the augmented grammar *************************************************************************** Prelude *************************************************************************** *************************************************************************** Types *********************...
s : copyright ocamlyacc * * Copyright ( C ) 2015 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking describ...
28cbf185d01ffa01b9b4daf3768c4976feb558801a9cd0253766d822312a2e10
ndpar/erlang
poker.erl
%% @doc 5 - card Poker hand evaluator , ported to Erlang . %% -module(poker). -export([hand_rank/1, sort_hands/1, winners/1]). Return a list of the ranks , sorted with higher first . Hand is a list of 2 - char strings , i.e. [ " 6H","3D","AS","TH","JC " ] . card_ranks(Hand) -> Ranks = [string:str("-234567...
null
https://raw.githubusercontent.com/ndpar/erlang/e215841a1d370e0fc5eb6b9ff40ea7ae78fc8763/lib/examples/src/poker.erl
erlang
Return a value indicating the ranking of a hand. To find winners, we just sort hands according to their rankings ============================================================================ Unit tests ============================================================================
@doc 5 - card Poker hand evaluator , ported to Erlang . -module(poker). -export([hand_rank/1, sort_hands/1, winners/1]). Return a list of the ranks , sorted with higher first . Hand is a list of 2 - char strings , i.e. [ " 6H","3D","AS","TH","JC " ] . card_ranks(Hand) -> Ranks = [string:str("-23456789TJQK...
518d0096a76eb9e2388de802f82624ba750729edd4a3686177748456c9cc8f0a
aufishgrp/cowpaths
cowpaths_socket_sup.erl
-module(cowpaths_socket_sup). -behavior(supervisor). -include("cowpaths.hrl"). %% Supervisor exports -export([init/1]). %% API Exports -export([start_link/0, start_socket/1]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Supervisor Implementation %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -spec init(term()) -> {ok, supervisor:strate...
null
https://raw.githubusercontent.com/aufishgrp/cowpaths/04d2639eccd66183dccd45a457a4b69dc18acb56/src/cowpaths_socket_sup.erl
erlang
Supervisor exports API Exports Supervisor Implementation %% @doc Initializes the supervisor. @end API Implementation %% @doc Starts the socket supervisor @end Private Functions %%
-module(cowpaths_socket_sup). -behavior(supervisor). -include("cowpaths.hrl"). -export([init/1]). -export([start_link/0, start_socket/1]). -spec init(term()) -> {ok, supervisor:strategy(), non_neg_integer(), non_neg_integer(), [supervisor:child_spec()]} | ignore. init(_) -> { ok, { #{ strategy => simpl...
37f7289317838cb14b7f579274740697fb462bf00121c0d7bad2233f8adbc560
iu-parfunc/haskell_dsl_tour
L23RemoveComplexOpera.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE StandaloneDeriving # module FrameworkHs.GenGrammars.L23RemoveComplexOpera where import FrameworkHs.Prims import FrameworkHs.Helpers import Text.PrettyPrint.HughesPJ (text) import Blaze.ByteString.Builder (fromByteString) data Tail = IfT Pred Tail Tail | BeginT [Effe...
null
https://raw.githubusercontent.com/iu-parfunc/haskell_dsl_tour/f75a7e492a1e5d219a77fb128f70441d54a706eb/middle_end/nanopass/course_example/FrameworkHs/GenGrammars/L23RemoveComplexOpera.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE StandaloneDeriving # module FrameworkHs.GenGrammars.L23RemoveComplexOpera where import FrameworkHs.Prims import FrameworkHs.Helpers import Text.PrettyPrint.HughesPJ (text) import Blaze.ByteString.Builder (fromByteString) data Tail = IfT Pred Tail Tail | BeginT [Effect] Tail | TrivT Triv | AllocT ...
809b8b6ab6485ad51ba7ec2ed8ec49bfdaa1bee25c8adbdfdfdf7b2dd6a1ca77
racket/typed-racket
type-printer-single-level.rkt
#lang racket ;; Make sure that the type printer expands only a single ;; level for (:type ...) (require rackunit racket/sandbox) (define out (open-output-string)) (define tr-eval (parameterize ([sandbox-output out]) (call-with-trusted-sandbox-configuration (thunk (make-evaluator 'typed/racket)))...
null
https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/succeed/type-printer-single-level.rkt
racket
Make sure that the type printer expands only a single level for (:type ...) if #:verbose, make sure it's the full type
#lang racket (require rackunit racket/sandbox) (define out (open-output-string)) (define tr-eval (parameterize ([sandbox-output out]) (call-with-trusted-sandbox-configuration (thunk (make-evaluator 'typed/racket))))) (tr-eval '(require typed/racket)) (tr-eval '(define-type Foo (U String Integer...
2c4eebab474228a3efc6b8f8ea50f9401bf0d2f00cff9c1242ba436a3636b1ac
ocsigen/eliom
eliom_request.client.mli
Ocsigen * * Copyright ( C ) 2010 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your ...
null
https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_request.client.mli
ocaml
*/*
Ocsigen * * Copyright ( C ) 2010 * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version 2.1 of the License , or ( at your ...
9a339b17641de9d8096f27038dd6288c830e868ed62f0e7e5f5fee04b58ec02d
bos/rwh
hj1.hs
{-- snippet all --} import Control.Exception catchIt :: Exception -> Maybe () catchIt (ArithException DivideByZero) = Just () catchIt _ = Nothing handler :: () -> IO () handler _ = putStrLn "Caught error: divide by zero" safePrint :: Integer -> IO () safePrint x = handleJust catchIt handler (print x) {-- /snippet al...
null
https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch19/hj1.hs
haskell
- snippet all - - /snippet all -
import Control.Exception catchIt :: Exception -> Maybe () catchIt (ArithException DivideByZero) = Just () catchIt _ = Nothing handler :: () -> IO () handler _ = putStrLn "Caught error: divide by zero" safePrint :: Integer -> IO () safePrint x = handleJust catchIt handler (print x)
88e730b02e259a5bba5a814b00f12779ea05399c6286e006d3774d95e9ac6ff7
patricoferris/ocaml-multicore-monorepo
baijiu_whirlpool.ml
module By = Digestif_by module Bi = Digestif_bi module Int64 = struct include Int64 let ( lsl ) = Int64.shift_left let ( lsr ) = Int64.shift_right_logical let ( asr ) = Int64.shift_right let ( lor ) = Int64.logor let ( land ) = Int64.logand let ( lxor ) = Int64.logxor let ( + ) = Int64.add le...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/digestif/src-ocaml/baijiu_whirlpool.ml
ocaml
module By = Digestif_by module Bi = Digestif_bi module Int64 = struct include Int64 let ( lsl ) = Int64.shift_left let ( lsr ) = Int64.shift_right_logical let ( asr ) = Int64.shift_right let ( lor ) = Int64.logor let ( land ) = Int64.logand let ( lxor ) = Int64.logxor let ( + ) = Int64.add le...
150b8134bd26a87974fc89decd59a76072a60a122d2dd39ec3cabcff5508245d
Javran/advent-of-code
Day15.hs
module Javran.AdventOfCode.Y2022.Day15 ( ) where import Control.Monad import Data.List import qualified Data.Set as S import Javran.AdventOfCode.GridSystem.RowThenCol.Uldr import Javran.AdventOfCode.Prelude import Javran.AdventOfCode.TestExtra (consumeExtra) import Text.ParserCombinators.ReadP hiding (count, get, ma...
null
https://raw.githubusercontent.com/Javran/advent-of-code/0fd590fccd5bb3f34b243d19f213b2a23bae2141/src/Javran/AdventOfCode/Y2022/Day15.hs
haskell
unchecked: for (i, j), it must satisfy i <= j. Merges a probably unsorted list of ranges into sorted, non-overlapping ranges. Generates all coords that is `d` units of distance away from a coord. Area is a sensor coordinate and its radius to the beacon closest to it. This also represents the area that ...
module Javran.AdventOfCode.Y2022.Day15 ( ) where import Control.Monad import Data.List import qualified Data.Set as S import Javran.AdventOfCode.GridSystem.RowThenCol.Uldr import Javran.AdventOfCode.Prelude import Javran.AdventOfCode.TestExtra (consumeExtra) import Text.ParserCombinators.ReadP hiding (count, get, ma...
4d7398dea270c302e701d0ad4fa3ac83e7c00e91ec9f93dfa26c3778247d3654
MUSTE-Project/MULLE
Selection.hs
# OPTIONS_GHC -Wall # {-# Language DeriveGeneric, GeneralizedNewtypeDeriving, StandaloneDeriving, TypeFamilies #-} | A ' Set ' with a dfferent ' ' instance . module Muste.Selection ( Interval(Interval, runInterval) , Selection(Selection, runSelection) ) where import Control.Category ((>>>)) import ...
null
https://raw.githubusercontent.com/MUSTE-Project/MULLE/7908a97e765a21a869ff4ee5c46def9e12360c29/muste/src/Muste/Selection.hs
haskell
# Language DeriveGeneric, GeneralizedNewtypeDeriving, StandaloneDeriving, TypeFamilies # The added small constant is so that empty intervals are also counted.
# OPTIONS_GHC -Wall # | A ' Set ' with a dfferent ' ' instance . module Muste.Selection ( Interval(Interval, runInterval) , Selection(Selection, runSelection) ) where import Control.Category ((>>>)) import GHC.Generics (Generic) import GHC.Exts (IsList(fromList, toList, Item)) import qualified Data.Li...
49d807bec41961d6df8373d7a4c28e2b46a46a7f627c8e7c14f2498eff2e65b9
tweag/linear-base
Iso.hs
| This module provides linear isomorphisms . -- -- An @Iso a b s t@ is equivalent to a @(s %1-> a, b %1-> t)@. In the simple -- case of an @Iso' a s@, this is equivalent to inverse functions -- @(s %1-> a, a %1-> s)@. In the general case an @Iso a b s t@ means if you have the isomorphisms @(a % 1- > b , b % 1- > ...
null
https://raw.githubusercontent.com/tweag/linear-base/eedda420101f50be4e9e8c8fdee4d10711c6207a/src/Control/Optics/Linear/Iso.hs
haskell
An @Iso a b s t@ is equivalent to a @(s %1-> a, b %1-> t)@. In the simple case of an @Iso' a s@, this is equivalent to inverse functions @(s %1-> a, a %1-> s)@. In the general case an @Iso a b s t@ means if you = Example @ {-# LANGUAGE LinearTypes #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE GADTs #...
| This module provides linear isomorphisms . have the isomorphisms @(a % 1- > b , b % 1- > a)@ and @(s % 1- > t , t % 1- > s)@ , then you can form isomorphisms between @s@ , @t@ , @a@ and import Control . Optics . Linear . Internal import Prelude . Linear closureFmap : : ( a % 1- > b ) - > ClosureEither x ...
eeacc613f587c9d750875c4eebd118793814bc969ba22e0f813c370405bd9eac
bmeurer/ocaml-arm
typeclass.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cri...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/typing/typeclass.mli
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 . $ Id$ open Asttypes open Types open For...
d74d4ac17143a6929261c4e9926820907770d28ae3bfa506318f3acd96d23e73
lepisma/pigeon
transform.lisp
;;; Functions for transforming expressions (in-package #:pigeon) (cl-interpol:enable-interpol-syntax)
null
https://raw.githubusercontent.com/lepisma/pigeon/226f06298d18192bd9f7a677d04f1a5cd5928217/src/transform.lisp
lisp
Functions for transforming expressions
(in-package #:pigeon) (cl-interpol:enable-interpol-syntax)
dbe2395a476f53006193200b7af69515df100d78161a895f2c5931f2c6ecf90f
pfdietz/ansi-test
handler-bind.lsp
;-*- Mode: Lisp -*- Author : Created : Fri Feb 28 22:07:25 2003 Contains : Tests of HANDLER - BIND (deftest handler-bind.1 (handler-bind ()) nil) (deftest handler-bind.2 (handler-bind () (values))) (deftest handler-bind.3 (handler-bind () (values 1 2 3)) 1 2 3) (deftest handler-bind.4 ...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/conditions/handler-bind.lsp
lisp
-*- Mode: Lisp -*- can never succeed More handler-bind tests elsewhere
Author : Created : Fri Feb 28 22:07:25 2003 Contains : Tests of HANDLER - BIND (deftest handler-bind.1 (handler-bind ()) nil) (deftest handler-bind.2 (handler-bind () (values))) (deftest handler-bind.3 (handler-bind () (values 1 2 3)) 1 2 3) (deftest handler-bind.4 (let ((x 0)) (value...
fe1d9b8664b3165b9ff148eae8f04a2dbc43aac8c83f99986b03094a057d0b1f
maralorn/kassandra
Api.hs
module Kassandra.Api ( SocketMessage (..), SocketRequest (..), ) where import Kassandra.Calendar import Kassandra.Config (UIConfig) type SocketError = Text data SocketMessage = TaskUpdates (NESeq Task) | CalendarEvents (Seq CalendarEvent) | UIConfigResponse UIConfig | SocketError SocketError | Connecti...
null
https://raw.githubusercontent.com/maralorn/kassandra/598133b89ab4e4a6209da920636e9e6ee540f38a/apps/kassandra/kassandra/src/Kassandra/Api.hs
haskell
module Kassandra.Api ( SocketMessage (..), SocketRequest (..), ) where import Kassandra.Calendar import Kassandra.Config (UIConfig) type SocketError = Text data SocketMessage = TaskUpdates (NESeq Task) | CalendarEvents (Seq CalendarEvent) | UIConfigResponse UIConfig | SocketError SocketError | Connecti...
295bfae80d6a17986ec98efb864df7dd7576ef5249ba0fa2c2d65e8c5314fefd
theosotr/buildfs
task_info.ml
* Copyright ( c ) 2018 - 2020 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , version 3 . * * This program is distributed in the hope that it will be useful , but ...
null
https://raw.githubusercontent.com/theosotr/buildfs/3cd287da0d1184934c1bcd28d301f2545196f44b/src/task_info.ml
ocaml
* The name of task. * The file where this task is declared. * The line where this task is declared.
* Copyright ( c ) 2018 - 2020 * * This program is free software : you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation , version 3 . * * This program is distributed in the hope that it will be useful , but ...
eb179f53367d5d9567cbb421a5d3da363a1d79295c162c55c97b2255b429f183
Th30n/cl-shake
obj.lisp
;;;; Loading Wavefront OBJ 3D model files (in-package #:shake.obj) (alexandria:define-constant +cube+ " # Bottom vertices v 1 -1 -1 v 1 -1 1 v -1 -1 1 v -1 -1 -1 # Top vertices v 1 1 -1 v 1 1 1 v -1 1 1 v -1 1 -1 vn 0 -1 0 vn 0 1 0 vn 1 -0 0 vn 0 -0 1 vn -1 -0 -0 vn 0 0 -1 vt 0 0 vt 1 0 vt 1 1 vt 0 1 # Front face...
null
https://raw.githubusercontent.com/Th30n/cl-shake/80550dba138fee977bf2f6deb62739dc7f381216/shake/obj.lisp
lisp
Loading Wavefront OBJ 3D model files Don't unread, since `read-comment' does no checking and simply reads the whole line. geometric vertex -- v x y z (w 1.0, required for rational curve and surface) vertex normal -- vn x y z Element Data index means immediately before the element in the file. points -- p v1 (.....
(in-package #:shake.obj) (alexandria:define-constant +cube+ " # Bottom vertices v 1 -1 -1 v 1 -1 1 v -1 -1 1 v -1 -1 -1 # Top vertices v 1 1 -1 v 1 1 1 v -1 1 1 v -1 1 -1 vn 0 -1 0 vn 0 1 0 vn 1 -0 0 vn 0 -0 1 vn -1 -0 -0 vn 0 0 -1 vt 0 0 vt 1 0 vt 1 1 vt 0 1 # Front face (+Z towards camera) f 6/2/4 3/4/4 2/3/4 f...
6238180989f09b1c336fb614370e298e6c1b109d9029d1e0ccf05768fb223843
ku-fpg/sunroof-compiler
Number.hs
# LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # -- | Numbers in Javascript. module Language.Sunroof.JS.Number ( JSNumber , int ) where import Prelude () import Prelude.Compat hiding ( div, mod, quot, rem, floor , ceiling, isNaN, isInfinite , (<*) ) import Data.Boolean ( BooleanOf, Bool...
null
https://raw.githubusercontent.com/ku-fpg/sunroof-compiler/5d8edafea515c4c2b4e7631799f35d8df977e289/Language/Sunroof/JS/Number.hs
haskell
| Numbers in Javascript. ------------------------------------------------------------- ------------------------------------------------------------- | Show the Javascript JSNumber $ uniOp "ERROR" e1 ------------------------------------------------------------- ----------------------------------------------------...
# LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # module Language.Sunroof.JS.Number ( JSNumber , int ) where import Prelude () import Prelude.Compat hiding ( div, mod, quot, rem, floor , ceiling, isNaN, isInfinite , (<*) ) import Data.Boolean ( BooleanOf, Boolean(..), IfB(..), EqB(..), O...
c767e001ce25f941b0165113353c5f697fd557b3212a421a296b282e2c508717
ejgallego/coq-lsp
jCoq.ml
module Names = Serlib.Ser_names module Evar = Serlib.Ser_evar let rec pp_opt d = let open Pp in let rec flatten_glue l = match l with | [] -> [] | Ppcmd_glue g :: l -> flatten_glue (List.map repr g @ flatten_glue l) | Ppcmd_string s1 :: Ppcmd_string s2 :: l -> flatten_glue (Ppcmd_string (s1 ^...
null
https://raw.githubusercontent.com/ejgallego/coq-lsp/dbc7b1f3966834f562eda76060c9848679ebf928/lsp/jCoq.ml
ocaml
module Names = Serlib.Ser_names module Evar = Serlib.Ser_evar let rec pp_opt d = let open Pp in let rec flatten_glue l = match l with | [] -> [] | Ppcmd_glue g :: l -> flatten_glue (List.map repr g @ flatten_glue l) | Ppcmd_string s1 :: Ppcmd_string s2 :: l -> flatten_glue (Ppcmd_string (s1 ^...
df3ef3ab03596294b5da650b4911ebe685631f657ccea3497825ab0b5fb1975e
mage2tv/magento-cache-clean
app.cljs
(ns magento.app (:require [file.system :as fs] [cache.storage :as storage] [log.log :as log] [cache.config :as config] [clojure.string :as string] [goog.json :as json] [clojure.string :as str] [util.crypto :refer [md5]])) (defonce ch...
null
https://raw.githubusercontent.com/mage2tv/magento-cache-clean/ccbe5a4c16a454d101975bd7332394de1923f7bc/src/magento/app.cljs
clojure
see -cache-clean/issues/71#issuecomment-584044808
(ns magento.app (:require [file.system :as fs] [cache.storage :as storage] [log.log :as log] [cache.config :as config] [clojure.string :as string] [goog.json :as json] [clojure.string :as str] [util.crypto :refer [md5]])) (defonce ch...