_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
db258b1e706ef442d0e281e5f878bf4c0d73583387f01077a24cdf6261ff826f
duckyuck/flare
map.cljc
(ns flare.map (:require [clojure.set :as set] [flare.indexed :as indexed] [flare.util :refer [pluralize flatten-when-single]])) (defn report-keys-diff [{:keys [only-in keys]} & rest] (case only-in :a [(str "expected map to contain " (pluralize keys "key") ": " (pr-str (fl...
null
https://raw.githubusercontent.com/duckyuck/flare/4d983fda75fab718b5ec0bf4e3f8ab4bfa1a2080/src/flare/map.cljc
clojure
(ns flare.map (:require [clojure.set :as set] [flare.indexed :as indexed] [flare.util :refer [pluralize flatten-when-single]])) (defn report-keys-diff [{:keys [only-in keys]} & rest] (case only-in :a [(str "expected map to contain " (pluralize keys "key") ": " (pr-str (fl...
b315032eb7dfbef29976c6521a03c77f846c37a458fa940d2a16ea2bf02f6f32
ds-wizard/engine-backend
Detail_GET.hs
module Registry.Specs.API.Organization.Detail_GET ( detail_get, ) where import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai import Registry.Api.Resource.Organization.OrganizationDTO import Registry.Database.Migration.Development.Organization.Data.Organizations import R...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-registry/test/Registry/Specs/API/Organization/Detail_GET.hs
haskell
------------------------------------------------------------------------ GET /organizations/{orgId} ------------------------------------------------------------------------ ---------------------------------------------------- ---------------------------------------------------- -----------------------------------...
module Registry.Specs.API.Organization.Detail_GET ( detail_get, ) where import Network.HTTP.Types import Network.Wai (Application) import Test.Hspec import Test.Hspec.Wai import Registry.Api.Resource.Organization.OrganizationDTO import Registry.Database.Migration.Development.Organization.Data.Organizations import R...
5bfbe3cdce73314ca5fb983d434f02f611f90f4bbad974d4f0e048175ed77b0a
bbss/cljsc2
fulcro.cljs
(ns cljsc2.cljs.ui.fulcro (:require [fulcro.client.primitives :as prim :refer [defsc]] [fulcro.ui.form-state :as fs] [fulcro.client.mutations :as m :refer [defmutation]] [fulcro.ui.bootstrap3 :as bs] [cljsc2.cljs.material_ui :refer [ui-input]])) (defn clear-jupyter-events [i] (when (and js/window.Ju...
null
https://raw.githubusercontent.com/bbss/cljsc2/70e720f5bae9b58248df86f3f50d855878ae4f49/src/cljsc2/cljs/ui/fulcro.cljs
clojure
(ns cljsc2.cljs.ui.fulcro (:require [fulcro.client.primitives :as prim :refer [defsc]] [fulcro.ui.form-state :as fs] [fulcro.client.mutations :as m :refer [defmutation]] [fulcro.ui.bootstrap3 :as bs] [cljsc2.cljs.material_ui :refer [ui-input]])) (defn clear-jupyter-events [i] (when (and js/window.Ju...
46c1a7de4736ef3115b6d0833da08d8e3d7c5e3710f1de987b066729b5cb838d
ocaml/oloop
example.ml
let first = "123" let second = "hello" Part 2.5 type foo = string type bar = int let baz = 123 Part 3 let () = print_endline "first"; print_endline "second"
null
https://raw.githubusercontent.com/ocaml/oloop/d0dc99fdfb9d1a88d1f45cfaa41422254951b0a8/tests/example.ml
ocaml
let first = "123" let second = "hello" Part 2.5 type foo = string type bar = int let baz = 123 Part 3 let () = print_endline "first"; print_endline "second"
bbdcfd34e415bd7865e6a479155fce53632e51a8dd4f067e74459d46944cdad2
arttuka/reagent-material-ui
image_list_item.cljs
(ns reagent-mui.material.image-list-item "Imports @mui/material/ImageListItem as a Reagent component. Original documentation is at -ui/api/image-list-item/ ." (:require [reagent.core :as r] ["@mui/material/ImageListItem" :as MuiImageListItem])) (def image-list-item (r/adapt-react-class (.-default Mu...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/image_list_item.cljs
clojure
(ns reagent-mui.material.image-list-item "Imports @mui/material/ImageListItem as a Reagent component. Original documentation is at -ui/api/image-list-item/ ." (:require [reagent.core :as r] ["@mui/material/ImageListItem" :as MuiImageListItem])) (def image-list-item (r/adapt-react-class (.-default Mu...
70f96f25c57825b38292f981e4aec3b427f56ac069ed0e8abaeb9a2a567feb87
glguy/5puzzle
Tokens.hs
module Crosscells.Tokens ( Direction(..) , Token(..) , parseTokens ) where import Data.Char import Data.Foldable import Data.Vector (Vector) import qualified Data.Vector as V import Crosscells.Region data Token = Arrow Direction | Box | Plus Int | Times Int | Bracketed Int | Number Int deriving...
null
https://raw.githubusercontent.com/glguy/5puzzle/4d86cf9fad3ec3f70c57a167417adea6a3f9f30b/Crosscells/Tokens.hs
haskell
module Crosscells.Tokens ( Direction(..) , Token(..) , parseTokens ) where import Data.Char import Data.Foldable import Data.Vector (Vector) import qualified Data.Vector as V import Crosscells.Region data Token = Arrow Direction | Box | Plus Int | Times Int | Bracketed Int | Number Int deriving...
47634ec4ffbe42561665ee212f9abc794598cecc121325f3c03a055e672e7a63
dangtv/BIRDS
intro.mli
(* Unused *)
null
https://raw.githubusercontent.com/dangtv/BIRDS/fdf9263df9bbb7ba836674e9f1ff1a0ec78634e7/src/logic/intro.mli
ocaml
Unused
3b2124d7053e063d2bde53e5e496ddc3da76ad5970ee79531da9159ba3d16f78
abailly/hevents
test.hs
# LANGUAGE DeriveFunctor # {-# LANGUAGE RankNTypes #-} import Control.Comonad import Data.Functor.Identity import Network.Wai data Store s a = Store s (s -> a) instance Functor (Store s) where fmap f (Store s k) = Store s (f . k) instance Comonad (Store s) where extract (Store s...
null
https://raw.githubusercontent.com/abailly/hevents/d38789bf5ae787c35d496b72fe47419d965032de/test/Hevents/Eff/test.hs
haskell
# LANGUAGE RankNTypes # /show
# LANGUAGE DeriveFunctor # import Control.Comonad import Data.Functor.Identity import Network.Wai data Store s a = Store s (s -> a) instance Functor (Store s) where fmap f (Store s k) = Store s (f . k) instance Comonad (Store s) where extract (Store s k) = k s duplicate (Store s ...
c273d3b90437674918e65ce2c06870ad0b0c0a339373ef77c1b1c781f0dff18e
cfpb/qu
resources.clj
(ns qu.resources "RESTful resources for datasets and slices. Uses Liberator (-liberator.github.com/) to handle exposing the resources. In Liberator, returning a map from a function adds that map to the context passed to subsequent functions. We use that heavily in exists? functions to return the resource that will b...
null
https://raw.githubusercontent.com/cfpb/qu/f460d9ab2f05ac22f6d68a98a9641daf0f7c7ba4/src/qu/resources.clj
clojure
If the query string is malformed, url-like will return nil. We prevent that by using the base-href in that case.
(ns qu.resources "RESTful resources for datasets and slices. Uses Liberator (-liberator.github.com/) to handle exposing the resources. In Liberator, returning a map from a function adds that map to the context passed to subsequent functions. We use that heavily in exists? functions to return the resource that will b...
9ae63b6ff74725679a5d1dafae51a70bf205fcaf8fef706cf64d907db17e6ec1
AdRoll/rebar3_format
inline_no_attributes.erl
-module(inline_no_attributes). -format #{inline_attributes => none}. -export([these/0, functions/0, shouldnt/0, be/0, inlined/0]). -callback these() -> {elements, shouldnt, be, inlined}. -callback functions() -> [should | 'not' | be | inlined | either]. -callback shouldnt() -> sho...
null
https://raw.githubusercontent.com/AdRoll/rebar3_format/5ffb11341796173317ae094d4e165b85fad6aa19/test_app/after/src/inline_items/inline_no_attributes.erl
erlang
-module(inline_no_attributes). -format #{inline_attributes => none}. -export([these/0, functions/0, shouldnt/0, be/0, inlined/0]). -callback these() -> {elements, shouldnt, be, inlined}. -callback functions() -> [should | 'not' | be | inlined | either]. -callback shouldnt() -> sho...
c54e12586624fa3dade406646dbfa96d0786d9752db6e84c52f89703d49e5524
BrunoBonacci/mulog
project.clj
(defn ver [] (-> "../ver/mulog.version" slurp .trim)) (defn ts [] (System/currentTimeMillis)) (defn jdk [] (clojure.string/replace (str (System/getProperty "java.vm.vendor") "-" (System/getProperty "java.vm.version")) #" " "_")) (defproject com.brunobonacci/mulog (ver) :description "μ/log is a micro-logging library...
null
https://raw.githubusercontent.com/BrunoBonacci/mulog/96e2c126c898d77109e918d4ee59394f9faa0162/mulog-core/project.clj
clojure
(defn ver [] (-> "../ver/mulog.version" slurp .trim)) (defn ts [] (System/currentTimeMillis)) (defn jdk [] (clojure.string/replace (str (System/getProperty "java.vm.vendor") "-" (System/getProperty "java.vm.version")) #" " "_")) (defproject com.brunobonacci/mulog (ver) :description "μ/log is a micro-logging library...
fbca122f1808270bdc06c95cef0ba6114ffbefb1c6ad9a30c095cb01463b5beb
oakes/Nightweb
crypto.clj
(ns nightweb.crypto (:import [java.security MessageDigest] [net.i2p I2PAppContext] [net.i2p.crypto DSAEngine] [net.i2p.data Signature SigningPrivateKey SigningPublicKey])) (def priv-key (atom nil)) (def pub-key (atom nil)) (defn gen-priv-key [] (let [context (I2PAppContext/getGl...
null
https://raw.githubusercontent.com/oakes/Nightweb/089c7a99a9a875fde33cc29d56e1faf54dc9de84/common/clojure/nightweb/crypto.clj
clojure
(ns nightweb.crypto (:import [java.security MessageDigest] [net.i2p I2PAppContext] [net.i2p.crypto DSAEngine] [net.i2p.data Signature SigningPrivateKey SigningPublicKey])) (def priv-key (atom nil)) (def pub-key (atom nil)) (defn gen-priv-key [] (let [context (I2PAppContext/getGl...
3c6b3883eed73e4ca1c7a0df6f3c02d236e5e6de368c65b15eb6b218b50ae67e
adrieng/pulsar
seq.mli
This file is part of Pulsar , a temporal functional language . * Copyright ( C ) 2017 * * This program is free software : you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software * Foundation , either version 3 of the License , or ...
null
https://raw.githubusercontent.com/adrieng/pulsar/c3901388659d9c7978b04dce0815e3ff9aea1a0c/warp/seq.mli
ocaml
* This is strongly inspired from -cube/sequence/
This file is part of Pulsar , a temporal functional language . * Copyright ( C ) 2017 * * 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 ...
68a8bfeb8377a8c072e173036530fa619dd7bbc8dc419e4a6ad9a2cfc8c76ccc
skinkade/uniformity
processing.cljc
(ns uniformity.internals.crypto.processing (:require [uniformity.internals.validation :refer [compat-bytes? compat-byte-array compat-count]] [uniformity.random :refer [rand-bytes]] [unifor...
null
https://raw.githubusercontent.com/skinkade/uniformity/e9d007a7be833e70b4358c02700fd81866de775a/src/uniformity/internals/crypto/processing.cljc
clojure
Top level Slots future feature Flags bug: data.json wraps in an array hack to get around async limitations
(ns uniformity.internals.crypto.processing (:require [uniformity.internals.validation :refer [compat-bytes? compat-byte-array compat-count]] [uniformity.random :refer [rand-bytes]] [unifor...
97ca70602fbb793d4edb4a61faa706ead5d905f986df1b391d4beb28aa999e1e
goldfirere/th-desugar
Sweeten.hs
Language / Haskell / TH / / Sweeten.hs ( c ) 2013 Converts desugared TH back into real TH . (c) Richard Eisenberg 2013 Converts desugared TH back into real TH. -} # LANGUAGE CPP # {-# LANGUAGE TemplateHaskellQuotes #-} ----------------------------------------------------------------------------- --...
null
https://raw.githubusercontent.com/goldfirere/th-desugar/968a106d860cccf1dfdd384ebaf9a5704589a25a/Language/Haskell/TH/Desugar/Sweeten.hs
haskell
# LANGUAGE TemplateHaskellQuotes # --------------------------------------------------------------------------- | License : BSD-style (see LICENSE) Stability : experimental Portability : non-portable -------------------------------------------------------------------------- type applications, we will sim...
Language / Haskell / TH / / Sweeten.hs ( c ) 2013 Converts desugared TH back into real TH . (c) Richard Eisenberg 2013 Converts desugared TH back into real TH. -} # LANGUAGE CPP # Module : Language . . TH.Desugar . Sweeten Copyright : ( C ) 2014 Maintainer : The functi...
6073fc555d04d46921dcce1c1bb488ad5d1da4b89ffe283af9a156369d8f95f4
ekmett/ad
Tower.hs
{-# LANGUAGE Rank2Types #-} ----------------------------------------------------------------------------- -- | Copyright : ( c ) 2010 - 2021 -- License : BSD3 -- Maintainer : -- Stability : experimental Portability : GHC only -- -- Higher order derivatives via a \"dual number tower\". -- --------------...
null
https://raw.githubusercontent.com/ekmett/ad/6454d35d1aa6e2af04db9e549146c9cfe8d8bd3b/src/Numeric/AD/Mode/Tower.hs
haskell
# LANGUAGE Rank2Types # --------------------------------------------------------------------------- | License : BSD3 Maintainer : Stability : experimental Higher order derivatives via a \"dual number tower\". --------------------------------------------------------------------------- * Taylor Series * ...
Copyright : ( c ) 2010 - 2021 Portability : GHC only module Numeric.AD.Mode.Tower ( AD , Tower , auto , taylor , taylor0 , maclaurin , maclaurin0 answer and first derivative of ( a - > a ) zero padded derivatives of ( a - > a ) zero padded derivatives of ( a - > f a ) answer and all zero ...
2a4ba2553523c3dffe1c097da2a0118e8f3f590f13f5a3c66a2aa4ead986343a
c4-project/c4f
abstract_stm.ml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/litmus_c/test/abstract_stm.ml
ocaml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
16fe772b3db56182fb1f4bb44948182aa78fda2f396e00b467d6a15fd0779696
Elzair/nazghul
doris.scm
;;---------------------------------------------------------------------------- ;; Schedule ;; In Green Tower . ;;---------------------------------------------------------------------------- (kern-mk-sched 'sch_doris (list 0 0 doris-bed "sleeping") (list 8 0 white-stag-counter "worki...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/doris.scm
scheme
---------------------------------------------------------------------------- Schedule ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Gob ------------------------------------------------------------------------...
In Green Tower . (kern-mk-sched 'sch_doris (list 0 0 doris-bed "sleeping") (list 8 0 white-stag-counter "working")) (define (doris-mk) nil) is the female innkeeper of the White Stag Lodge in Green Tower . (define (doris-name kdoris kplayer) (say kdoris "Hi, I'm Doris, innkeepe...
36897dae45da6672a0cca38496c64f28b60d8c5132d33d079fabd9da9024d6b1
bartima3us/erline-dht
erline_dht_bencoding.erl
%%%------------------------------------------------------------------- %%% @doc Bencoding implementation in Erlang . %%% Source: %%% @end %%%------------------------------------------------------------------- -module(erline_dht_bencoding). %% API -export([decode/1, encode/1]). %% You are able to choose the dict im...
null
https://raw.githubusercontent.com/bartima3us/erline-dht/7de9bee0b5b86a347b9527369877e3d97b863d9d/src/erline_dht_bencoding.erl
erlang
------------------------------------------------------------------- @doc Source: @end ------------------------------------------------------------------- API You are able to choose the dict implementation ==================================================================== API ===================================...
Bencoding implementation in Erlang . -module(erline_dht_bencoding). -export([decode/1, encode/1]). -define(DICT, dict). -define(DICT , ) . decode(Data) -> case catch dec(Data) of {'EXIT', _} -> {error, unparsed}; {Res, _} -> {ok, Res} end. encode(Struct) -> iol...
dd747ab3e02c10e873f3e7d8681406770ff8ca2f4c1f8918cbf4e17dd8dbb963
akabe/ocaml-jupyter
evaluation.mli
ocaml - jupyter --- An OCaml kernel for Jupyter Copyright ( c ) 2017 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 limitat...
null
https://raw.githubusercontent.com/akabe/ocaml-jupyter/7ea00fde81a915ee9d86c979f295f4c5dac28db8/src/repl/evaluation.mli
ocaml
* Top-level loop of OCaml code evaluation * {2 Communication}
ocaml - jupyter --- An OCaml kernel for Jupyter Copyright ( c ) 2017 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 limitat...
baac7cbdc21c16e303bdbacfc60b789f93c09f0d378f9db81935ecd1d3e7e6bd
fetburner/Coq2SML
clenv.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/proofs/clenv.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Abbreviations ********************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Util open Names ...
03cbf499088f7426d1ad6306dd5b47a98f8edb95ed9900a2d641c32492a705db
jrh13/hol-light
lib_ext.ml
let rec drop i list = match (i,list) with (_,[]) -> failwith "drop null" | (0,a::b) -> b | (i,a::b) -> a::(drop (i-1) b);; let rec take i j = function [] -> [] | a::b -> match (i,j) with (0,0) -> [] | (0,j) -> a::(take 0 (j-1) b) | _ -> take (i-1) (j-1)...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Jordan/lib_ext.ml
ocaml
------------------------------------------------------------------ UNIT TESTS ------------------------------------------------------------------ ------------------------------------------------------------------ LOCAL DEFINITIONS ------------------------------------------------------------------ ----------...
let rec drop i list = match (i,list) with (_,[]) -> failwith "drop null" | (0,a::b) -> b | (i,a::b) -> a::(drop (i-1) b);; let rec take i j = function [] -> [] | a::b -> match (i,j) with (0,0) -> [] | (0,j) -> a::(take 0 (j-1) b) | _ -> take (i-1) (j-1)...
80823bab56be3f684104db7eff9c57d366a4d5cf4daf9445c3812eb26eaf6c2e
yoriyuki/Camomile
bitsvect.mli
(** bits vector *) Copyright ( C ) 2002 . (* This library is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . As...
null
https://raw.githubusercontent.com/yoriyuki/Camomile/d7d8843c88fae774f513610f8e09a613778e64b3/Camomile/internal/bitsvect.mli
ocaml
* bits vector This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License may link, statically or dynamically, a "work that uses this library" with a publicly distributed version of this library to produce an executable file containing porti...
Copyright ( C ) 2002 . as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . As a special exception to the GNU Library General Public License , you additional requirements listed in clause 6 of the GNU Library General we mean either th...
a91e47f9bd4d73581ff235c75d1fa4f10fa1ae29980325d87dc0cd68e008de9f
j3pic/lisp-binary
utils.lisp
(cl:defpackage lisp-binary-utils (:use :common-lisp :moptilities) (:shadowing-import-from :closer-mop) (:export :subst* :struct-like-defclass :bind-class-slots :remove-plist-keys :recursive-find :recursive-map :assoc-cdr :aif :awhen :it :destructuring-case :destructuring-lambda :no-destructuring-match :re...
null
https://raw.githubusercontent.com/j3pic/lisp-binary/5d16a2dc80dfb54efb04b8fdcbb30bda8ec8a1a2/utils.lisp
lisp
(lazily (cons ,obj ,place))))
(cl:defpackage lisp-binary-utils (:use :common-lisp :moptilities) (:shadowing-import-from :closer-mop) (:export :subst* :struct-like-defclass :bind-class-slots :remove-plist-keys :recursive-find :recursive-map :assoc-cdr :aif :awhen :it :destructuring-case :destructuring-lambda :no-destructuring-match :re...
05087dfd03fb8c1d9c809986e36c344450fbb0695f527d964219b34a2baa1a20
AdaCore/why3
py_ast.mli
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University (* ...
null
https://raw.githubusercontent.com/AdaCore/why3/be1023970d48869285e68f12d32858c3383958e0/plugins/python/py_ast.mli
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University General Public License version 2.1 , with the special exception open Why3 type ident = Ptree.ident type unop = type binop = type typ = Ptree.pty type is_function = bo...
21086fee52452be631e266e397416002b01a1746246c2dc24829cbeda0926391
VisionsGlobalEmpowerment/webchange
handler.clj
(ns webchange.school.handler (:require [buddy.auth :refer [throw-unauthorized]] [compojure.api.sweet :refer [GET POST PUT DELETE defroutes context]] [compojure.route :refer [not-found]] [ring.util.response :refer [response]] [webchange.school.core :as core] [clojure.tools.logging :as log] ...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/8b64c57a4ba384d08d2f078648c36b6f70039d5d/src/clj/webchange/school/handler.clj
clojure
(ns webchange.school.handler (:require [buddy.auth :refer [throw-unauthorized]] [compojure.api.sweet :refer [GET POST PUT DELETE defroutes context]] [compojure.route :refer [not-found]] [ring.util.response :refer [response]] [webchange.school.core :as core] [clojure.tools.logging :as log] ...
5cc89b70c6862e7e0c38013880b18d246b39890b7c5c355d2bba09d56b69be38
2Latinos/nuntius
nuntius_history.erl
%% @hidden -module(nuntius_history). -export([get/1]). -export([received/2]). -export([reset/1]). %% @doc Returns the history of messages received by a mocked process. -spec get(nuntius:process_name()) -> [nuntius:event()]. get(ProcessName) -> nuntius_mocker:call(ProcessName, history). %% @doc Returns whether a ...
null
https://raw.githubusercontent.com/2Latinos/nuntius/4e470ae5bca9d874db812ec401c268d6a5a7ee05/src/nuntius_history.erl
erlang
@hidden @doc Returns the history of messages received by a mocked process. @doc Returns whether a particular message was received already. Note that there is no gen:cast(...), gen_server and others basically just send the message and move on, like us.
-module(nuntius_history). -export([get/1]). -export([received/2]). -export([reset/1]). -spec get(nuntius:process_name()) -> [nuntius:event()]. get(ProcessName) -> nuntius_mocker:call(ProcessName, history). -spec received(nuntius:process_name(), term()) -> boolean(). received(ProcessName, Message) -> nuntius_...
fa44c56ea9c22908bc8fab43d8176d99c358b1374341eaae2deee6126b8dd198
cjay/vulkyrie
Pipeline.hs
# LANGUAGE FlexibleContexts # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE NoStarIsType # # LANGUAGE UndecidableInstances # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ConstraintKinds #-} # LANGUAGE MultiParamTypeClasses...
null
https://raw.githubusercontent.com/cjay/vulkyrie/b12149e252a9eaa2adc00c052825520271818f83/src/Vulkyrie/Engine/Pipeline.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE ConstraintKinds # Pairs each element with a number starting at 0, usable as array indices pass first type argument pass first type argument | See pipelineIndex | Has to be used as a terminator after a `+:` chain. If you use `Tagged []` instead of this on the value level, the t...
# LANGUAGE FlexibleContexts # # LANGUAGE KindSignatures # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE NoStarIsType # # LANGUAGE UndecidableInstances # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE PolyKinds # # LANGUAGE MultiParamTypeClasses # module Vulkyrie.Engine.Pipeline where import Data.Kind (...
2365815b1ea64323b04fe4b9c73ccff57200bfd77eb91411e0070c202e8be78b
cj1128/sicp-review
eval.scm
;; definition of eval (define (eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp) (lookup-variable-value exp env)) ((quoted? exp) (text-of-quotation exp)) ((assignment? exp) (eval-assignment exp env)) ((definition? exp) (eval-definition exp env)) ((if? exp) (eva...
null
https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-4/eval.scm
scheme
definition of eval the only self-evaluating items are numbers and strings variables are represented by symbols quotations have the form (quote <text-of-quotation>) assignments have the form (set! <var> <value>) definitions have the form (define <var> <value>) or the form <define (<var> <parameter1> <paramter2>...
(define (eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp) (lookup-variable-value exp env)) ((quoted? exp) (text-of-quotation exp)) ((assignment? exp) (eval-assignment exp env)) ((definition? exp) (eval-definition exp env)) ((if? exp) (eval-if exp env)) ...
4dacf5e96f9bcb1271da3315cdf585cfa4a6f1b1d95d23803979db9c423e6e46
psilord/option-9
pvec.lisp
(in-package :option-9) #+(or (not option-9-optimize-pvec) option-9-debug) (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3))) (defparameter *pvec-tol* (as-double-float 10d-10)) (eval-when (:compile-toplevel :load-toplevel :execute) (deftype pvec () `(simple-array double-float (3))) (defstruct (pvec ...
null
https://raw.githubusercontent.com/psilord/option-9/44d96cbc5543ee2acbdcf45d300207ef175462bc/pvec.lisp
lisp
NOTE: I must use the pprint-dispatch table to emit nicely formatted I am using. So PRINT-OBJECT doesn't work on PVEC types. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;...
(in-package :option-9) #+(or (not option-9-optimize-pvec) option-9-debug) (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3))) (defparameter *pvec-tol* (as-double-float 10d-10)) (eval-when (:compile-toplevel :load-toplevel :execute) (deftype pvec () `(simple-array double-float (3))) (defstruct (pvec ...
a1a30852d5928d1451b3ef82de94cbb22fa6de641403a32278be5a873638e159
ryanpbrewster/haskell
trie.hs
-- trie.hs import qualified Data.Map as M import System.Environment (getArgs) import Data.List (intercalate, sortBy) import Data.Ord (comparing) data Node = Node { getMap :: M.Map Char Node } deriving (Show) showNode (Node nm) = "[" ++ intercalate "," [ show x ++ " -> " ++ showNode n' | (x,n'...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/hello-world/trie.hs
haskell
trie.hs indicate that a word is complete with a '$'
import qualified Data.Map as M import System.Environment (getArgs) import Data.List (intercalate, sortBy) import Data.Ord (comparing) data Node = Node { getMap :: M.Map Char Node } deriving (Show) showNode (Node nm) = "[" ++ intercalate "," [ show x ++ " -> " ++ showNode n' | (x,n') <- M.toLi...
3b862cd8f6c1ba8ddfb4c0a87d368b633b759d0306d7fa64a4178452bbdba52f
rtoy/cmucl
trapezoid.lisp
-*- Mode : Lisp ; Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*- CLX trapezoid Extension test program ;;; TEXAS INSTRUMENTS INCORPORATED ;;; P.O. BOX 2909 AUSTIN , TEXAS 78769 ;;; Copyright ( C ) 1987 Texas Instruments Incorporated . ;;; ;;; Permission is granted to any indi...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/clx/demo/trapezoid.lisp
lisp
Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : T -*- P.O. BOX 2909 Permission is granted to any individual or institution to use, copy, modify, and distribute this software, provided that this complete copyright and permission notice is maintained, intact, in all copies and supporting documentat...
CLX trapezoid Extension test program TEXAS INSTRUMENTS INCORPORATED AUSTIN , TEXAS 78769 Copyright ( C ) 1987 Texas Instruments Incorporated . Texas Instruments Incorporated provides this software " as is " without (in-package :xlib) (defun zoid-test () Display the part picture in /extensio...
612a6f10d02ab1f5e19ec1ad9336e63272cafd8f5df82a07a61222e6fd3259fd
plandes/cisql
pref.clj
(ns ^{:doc "Preference support using the Java Preferences system." :author "Paul Landes"} zensols.cisql.pref (:import (com.zensols.gui.pref PrefSupport)) (:require [clojure.tools.logging :as log])) (definterface PrefNode (_ [])) (def ^:private pref-inst (atom nil)) (def ^:private pref-ns *ns*) (def driv...
null
https://raw.githubusercontent.com/plandes/cisql/8001864f1596d191386a3787b49e8a640705fee2/src/clojure/zensols/cisql/pref.clj
clojure
(ns ^{:doc "Preference support using the Java Preferences system." :author "Paul Landes"} zensols.cisql.pref (:import (com.zensols.gui.pref PrefSupport)) (:require [clojure.tools.logging :as log])) (definterface PrefNode (_ [])) (def ^:private pref-inst (atom nil)) (def ^:private pref-ns *ns*) (def driv...
45c646ad37b11c7f9d91b75bc67e6e31d30de0c4ef15f608709ab2602584ec0a
cognitect-labs/aws-api
jdk.clj
(ns cognitect.aws.jdk (:require [clojure.java.io :as io] [clojure.string :as str] [cognitect.aws.util :as util]) (:import [java.net URI] [com.amazonaws DefaultRequest] [com.amazonaws.auth AWS4Signer] [com.amazonaws.auth BasicAWSCredentials] [com.am...
null
https://raw.githubusercontent.com/cognitect-labs/aws-api/dbd5c31d2c7de3e9c38cd1eee5a9c94ff83ca5d3/test/src/cognitect/aws/jdk.clj
clojure
(ns cognitect.aws.jdk (:require [clojure.java.io :as io] [clojure.string :as str] [cognitect.aws.util :as util]) (:import [java.net URI] [com.amazonaws DefaultRequest] [com.amazonaws.auth AWS4Signer] [com.amazonaws.auth BasicAWSCredentials] [com.am...
9b523547f84248bd36f7cba47b2135fb7746a2a447cbf0a275ae6424b59b605a
dbuenzli/gg
gg_top_init.ml
--------------------------------------------------------------------------- Copyright ( c ) 2013 The gg programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/dbuenzli/gg/89c2b8a8a3d3bf60316d722fc2eec3b20252eb01/src/gg_top_init.ml
ocaml
--------------------------------------------------------------------------- Copyright ( c ) 2013 The gg programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
8dd7ef338c49a48d2582823e74ca5748f26b5aa5aa8ae115773ed0e4329a89a7
nibbula/yew
finfo-cmds.lisp
;;; ;;; finfo-cmds.lisp - Commands for finfo. ;;; (in-package :finfo) #+lish (lish:defcommand finfo ((follow-links boolean :short-arg #\l :help "True to give information about the linked thing, not the link." ) (style choice :short-arg #\s :default *default-style* :choices '("generic" "unix" "ms") :h...
null
https://raw.githubusercontent.com/nibbula/yew/a62473dae637fb33a92aa75f260bf77b34cdbcfd/los/finfo-cmds.lisp
lisp
finfo-cmds.lisp - Commands for finfo. End
(in-package :finfo) #+lish (lish:defcommand finfo ((follow-links boolean :short-arg #\l :help "True to give information about the linked thing, not the link." ) (style choice :short-arg #\s :default *default-style* :choices '("generic" "unix" "ms") :help "Operating system specific output style.") ...
942fd432b0aa6c849c30c5090e4bfa91fdbd6276c27a3200ae6d30bdc12811e8
janestreet/bonsai
main.ml
open! Core open! Bonsai_web open Bonsai.Let_syntax module Rpgdice = Bonsai_web_rpgdice_example module Input_method = struct type t = | Text | Clicker [@@deriving compare, enumerate, equal, sexp, variants] let to_string = Variants.to_name let name = Source_code_position.to_string [%here] end module In...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/rpgdice/bin/main.ml
ocaml
open! Core open! Bonsai_web open Bonsai.Let_syntax module Rpgdice = Bonsai_web_rpgdice_example module Input_method = struct type t = | Text | Clicker [@@deriving compare, enumerate, equal, sexp, variants] let to_string = Variants.to_name let name = Source_code_position.to_string [%here] end module In...
faa5cfb1ba8c6ae7efa236a64b8968bec5ff43bbccc9a11cb0becdabafc9cc75
ruricolist/cloture
readtable.lisp
(in-package #:cloture) (defunit eof) (defconst %splicing-conditional '%splicing-conditional) (defmacro #.%splicing-conditional (&rest forms) `(|clojure.core|:|do| ,@forms)) (defun subread (stream) (read stream t nil t)) (defun read-meta (stream char) (declare (ignore char)) (let* ((meta (clojurize (subread...
null
https://raw.githubusercontent.com/ruricolist/cloture/623c15c8d2e5e91eb87f46e3ecb3975880109948/readtable.lisp
lisp
Don't interpret backslash escapes. Strings with escapes. Reading regexes. Reading maps and sets. ~ instead of ,. , is whitespace. Reader conditionals. Anonymous function. Read eval.
(in-package #:cloture) (defunit eof) (defconst %splicing-conditional '%splicing-conditional) (defmacro #.%splicing-conditional (&rest forms) `(|clojure.core|:|do| ,@forms)) (defun subread (stream) (read stream t nil t)) (defun read-meta (stream char) (declare (ignore char)) (let* ((meta (clojurize (subread...
3a00dd59f3ea877e9a60845d7bdc098b5b4861bccf94d1571b194f13c442752e
soegaard/bracket
testing3.rkt
#lang bracket DeclareVars(x,y); {2}+x; x+{3}; x+{4,5}; {4,5}+x; {3,4}+{x,y}; {3,4,5}+{x,y}; {6}*x; x*{7}; x*{8,9}; {10,11}*{x,y}
null
https://raw.githubusercontent.com/soegaard/bracket/3d0ace16cf0dbcee4952fd729796e4362e27faa0/bracket/tests/testing3.rkt
racket
#lang bracket {10,11}*{x,y}
b131b59fb5640dec5e38d7401c7b5d474e04753e6cba92c68b1b4e315559b797
haskell/hackage-security
Canonical.hs
# LANGUAGE CPP # -------------------------------------------------------------------- -- | Module : Text . JSON.Parsec Copyright : ( c ) Galois , Inc. 2007 - 2009 , 2015 -- -- -- Minimal implementation of Canonical JSON. -- -- <> -- -- A \"canonical JSON\" format is provided in order to provide meaningful and...
null
https://raw.githubusercontent.com/haskell/hackage-security/745b294e8cda2b46a21a6d1766a87f699a0277a8/hackage-security/src/Text/JSON/Canonical.hs
haskell
------------------------------------------------------------------ | Minimal implementation of Canonical JSON. <> A \"canonical JSON\" format is provided in order to provide meaningful and repeatable hashes of JSON-encoded data. Canonical JSON is parsable with any full JSON parser, but security-conscious appl...
# LANGUAGE CPP # Module : Text . JSON.Parsec Copyright : ( c ) Galois , Inc. 2007 - 2009 , 2015 * Decoding / encoding Unicode code - points beyond @U+00ff@ is currently broken module Text.JSON.Canonical ( JSValue(..) , Int54 , parseCanonicalJSON , renderCanonicalJSON , prettyCanonicalJSON ) whe...
2920a330dcfc4bfb3f929c90092b812116d9329ae35ad54dbed4cb9a8401c8f8
ghc/packages-Cabal
Internal.hs
-- | This module re-exports the non-exposed -- "Distribution.Compat.Prelude" module for reuse by - install@ 's -- "Distribution.Client.Compat.Prelude" module. -- -- It is highly discouraged to rely on this module for @Setup.hs@ scripts since its API is /not/ -- stable. module Distribution.Compat.Prelude.Internal #...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Compat/Prelude/Internal.hs
haskell
| This module re-exports the non-exposed "Distribution.Compat.Prelude" module for "Distribution.Client.Compat.Prelude" module. It is highly discouraged to rely on this module stable.
reuse by - install@ 's for @Setup.hs@ scripts since its API is /not/ module Distribution.Compat.Prelude.Internal # WARNING " This modules ' API is not stable . Use at your own risk , or better yet , use @base - compat@ ! " # ( module Distribution.Compat.Prelude ) where import Distribution.Compat.Prelude
c611a85fd1655618dbed6a5f044757202773020d7d874690ad8cf81d44f83237
kupl/FixML
sub18.ml
type formula = | True | False | Not of formula | AndAlso of formula * formula | OrElse of formula * formula | Imply of formula * formula | Equal of exp * exp and exp = | Num of int | Plus of exp * exp | Minus of exp * exp let rec eval : formula -> bool = fun f -> let rec calculate f2 = match f2 wi...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula1/submissions/sub18.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of formula * formula | OrElse of formula * formula | Imply of formula * formula | Equal of exp * exp and exp = | Num of int | Plus of exp * exp | Minus of exp * exp let rec eval : formula -> bool = fun f -> let rec calculate f2 = match f2 wi...
53df92a304e71957b8bb61fbe2a776d6a8ecdfeb999a54a7cc1d1c5cdfcd4ab4
awakesecurity/proto3-suite
Wrappers.hs
module Proto3.Suite.DotProto.Generate.Swagger.Wrappers () where
null
https://raw.githubusercontent.com/awakesecurity/proto3-suite/f54801824bbfc752477338c37a93eba9e2983a37/src/no-swagger-wrapper-format/Proto3/Suite/DotProto/Generate/Swagger/Wrappers.hs
haskell
module Proto3.Suite.DotProto.Generate.Swagger.Wrappers () where
87ef6a94fc249719f3385879027a5b352d71a21f3c5cc985323f3edc74d7f0e8
clojure-garden/clojure-garden
github_sql.clj
(ns platform.github.github-sql (:require [clojure.instant :as instant] [clojure.string :as str] [honey.sql.helpers :as helpers] [platform.storage.jdbc-wrappers :as jw]) (:import (com.zaxxer.hikari HikariDataSource) (java.util UUID))) (defn- insert-license! [^HikariDataSource ...
null
https://raw.githubusercontent.com/clojure-garden/clojure-garden/f0ea2b5dd9b1bf5823dcb97eba4e775afa755ad8/modules/backend/src/platform/github/github_sql.clj
clojure
(ns platform.github.github-sql (:require [clojure.instant :as instant] [clojure.string :as str] [honey.sql.helpers :as helpers] [platform.storage.jdbc-wrappers :as jw]) (:import (com.zaxxer.hikari HikariDataSource) (java.util UUID))) (defn- insert-license! [^HikariDataSource ...
e9b0937f9ef372c5dde3d37fb5fbec1be7a8c846cded8a3001236daef48790b6
soarlab/FPTaylor
version.mli
(* ========================================================================== *) : A Tool for Rigorous Estimation of Round - off Errors (* *) Author : , University of Utah (* ...
null
https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/version.mli
ocaml
========================================================================== ==========================================================================
: A Tool for Rigorous Estimation of Round - off Errors Author : , University of Utah This file is distributed under the terms of the MIT license val version : string
f9d57315c6e6da1a6ff0b6814d860c8e0e2167125ef67b9407d0b969720a4510
GaloisInc/saw-script
Versions.hs
module SAWScript.Prover.Versions where import Data.List (intercalate) import Data.Maybe (catMaybes) import System.Directory (findExecutable) import System.Process (readProcess) import Text.Read (readMaybe) data Version = Version [Int] deriving (Eq, Ord, Show) parseVersion :: String -> Version parseVersion = Vers...
null
https://raw.githubusercontent.com/GaloisInc/saw-script/46249dbc7bae5f48623a709b1df1cc1ea002d4c5/src/SAWScript/Prover/Versions.hs
haskell
module SAWScript.Prover.Versions where import Data.List (intercalate) import Data.Maybe (catMaybes) import System.Directory (findExecutable) import System.Process (readProcess) import Text.Read (readMaybe) data Version = Version [Int] deriving (Eq, Ord, Show) parseVersion :: String -> Version parseVersion = Vers...
dfcf8e5e3270b253add2e4c775d4de094b06e02d6e80d4f19fa81607076a9117
sdiehl/elliptic-curve
SECT163K1.hs
module Data.Curve.Binary.SECT163K1 ( module Data.Curve.Binary , Point(..) -- * SECT163K1 curve , module Data.Curve.Binary.SECT163K1 ) where import Protolude import Data.Field.Galois import GHC.Natural (Natural) import Data.Curve.Binary ----------------------------------------------------------------------...
null
https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve/Binary/SECT163K1.hs
haskell
* SECT163K1 curve ----------------------------------------------------------------------------- Types ----------------------------------------------------------------------------- | SECT163K1 curve. | Field of points of SECT163K1 curve. | Field of coefficients of SECT163K1 curve. SECT163K1 curve is a binary curve...
module Data.Curve.Binary.SECT163K1 ( module Data.Curve.Binary , Point(..) , module Data.Curve.Binary.SECT163K1 ) where import Protolude import Data.Field.Galois import GHC.Natural (Natural) import Data.Curve.Binary data SECT163K1 type F2m = Binary P type P = 0x800000000000000000000000000000000000000c9 ty...
bb470d82b5b25b8fa1fd479ae0ccb95a20444b488d7d5fb931ff42f18c9600dc
jadeallenx/darcy
darcy_ddb_api.erl
%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! %% See -codegen for more details. %% @doc <fullname>Amazon DynamoDB</fullname> %% Amazon DynamoDB is a fully managed NoSQL database service that provides %% fast and predictable performance with seamless scalability. DynamoDB lets %% you offload the administrative burden...
null
https://raw.githubusercontent.com/jadeallenx/darcy/ab9640850fdde631e6911026c3e929478b90d580/src/darcy_ddb_api.erl
erlang
WARNING: DO NOT EDIT, AUTO-GENERATED CODE! See -codegen for more details. @doc <fullname>Amazon DynamoDB</fullname> fast and predictable performance with seamless scalability. DynamoDB lets you offload the administrative burdens of operating and scaling a distributed database, so that you don't have to worry abo...
Amazon DynamoDB is a fully managed NoSQL database service that provides performance degradation , and use the AWS Management Console to monitor -module(darcy_ddb_api). -export([batch_get_item/2, batch_get_item/3, batch_write_item/2, batch_write_item/3, create_backup/2, ...
8ff55a187f2605df3c2a1f53a44078525cc04183458f98629786f524fcc7b009
tonsky/Clojure-Sublimed
reader_conditionals.cljc
#?(:clj :clj :cljs :cljs)
null
https://raw.githubusercontent.com/tonsky/Clojure-Sublimed/9ee85cc384d24e3a6e09820e70d0f247c02ab43b/test_repl/reader_conditionals.cljc
clojure
#?(:clj :clj :cljs :cljs)
fdbf67a0a98b2cf405e6c1412ca416de956f0d73f5fd0a237fc46d3cf4f69927
yutopp/rill
trans.ml
* Copyright yutopp 2019 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2019 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * )...
null
https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/lib/sema/trans.ml
ocaml
* Copyright yutopp 2019 - . * * Distributed under the Boost Software License , Version 1.0 . * ( See accompanying file LICENSE_1_0.txt or copy at * ) * Copyright yutopp 2019 - . * * Distributed under the Boost Software License, Version 1.0. * (See accompanying file LICENSE_1_0.txt or copy at * )...
107075dc685899970488a06c36bc7d64bb4dfb7cf743b843e5f821effe00535d
ohua-dev/ohua-core
PPrint.hs
# OPTIONS_GHC -fno - warn - orphans # module Ohua.DFLang.PPrint where import Ohua.Prelude import Data.Text.Prettyprint.Doc as PP import Ohua.ALang.PPrint () import Ohua.DFLang.Lang prettyDFExpr :: DFExpr -> Doc a prettyDFExpr DFExpr {..} = vsep $ map prettyLetExpr (toList letExprs) <> [pretty returnVar] insta...
null
https://raw.githubusercontent.com/ohua-dev/ohua-core/978fa3369922f86cc3fc474d5f2c554cc87fd60a/core/src/Ohua/DFLang/PPrint.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module Ohua.DFLang.PPrint where import Ohua.Prelude import Data.Text.Prettyprint.Doc as PP import Ohua.ALang.PPrint () import Ohua.DFLang.Lang prettyDFExpr :: DFExpr -> Doc a prettyDFExpr DFExpr {..} = vsep $ map prettyLetExpr (toList letExprs) <> [pretty returnVar] insta...
7bcc823ec6118a7840293f736434e4a05ca2c88917c81ec905839a3b5d97014d
evertedsphere/noether
Ring.hs
module Noether.Algebra.Multiple.Ring where import Noether.Lemmata.TypeFu import Noether.Algebra.Multiple.Semiring import Noether.Algebra.Single type family RingS (add :: ka) (mul :: km) (a :: Type) = (r :: RingE) data RingE = Ring_Semiring_Cancellative { ring_semiring ::...
null
https://raw.githubusercontent.com/evertedsphere/noether/c4223f64b9df5b0dbbeec1fea726bfff7f5810f5/library/Noether/Algebra/Multiple/Ring.hs
haskell
module Noether.Algebra.Multiple.Ring where import Noether.Lemmata.TypeFu import Noether.Algebra.Multiple.Semiring import Noether.Algebra.Single type family RingS (add :: ka) (mul :: km) (a :: Type) = (r :: RingE) data RingE = Ring_Semiring_Cancellative { ring_semiring ::...
0a9af087640cf3bcc3eae7b0ba35b4350ae9e312e8c23f9b5a735fe3b693d088
ucsd-progsys/dsolve
blowfish.ml
type key = { data : int array; p_lsb : int array; p_msb : int array; subkeys : 18 elements of 16 bits p_lsb_rev : int array; p_msb_rev : int array; (* subkeys in reverse order *) s1_lsb : int array; s1_msb : int array; s2_lsb : int array; s2_msb : int array; ...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/blowfish.ml
ocaml
subkeys in reverse order pmr: nothing to see here A weak key is one in which two entries for a given S-box are identical shift register
type key = { data : int array; p_lsb : int array; p_msb : int array; subkeys : 18 elements of 16 bits p_lsb_rev : int array; p_msb_rev : int array; s1_lsb : int array; s1_msb : int array; s2_lsb : int array; s2_msb : int array; s3_lsb : int array; s3_ms...
55388fa997ee31f99d8ce03de70d6bcda5f28dda4901f7c5d71d97c36bde5981
Ptival/ocamelf
Safe32.ml
" Hacker 's Delight " , section 2.12 let ( + ) x y = Int32.( let z = add x y in Overflow occurs iff x and y have same sign and z 's sign is different if logand (logxor z x) (logxor z y) < 0l then raise Exc.Int32Overflow else z ) let ( - ) x y = Int32.( let z = sub x y in (* Overflow occurs iff x and y...
null
https://raw.githubusercontent.com/Ptival/ocamelf/da5821aef102f3f60e4bd072b9e44b9a5cb6bf1f/src/Safe32.ml
ocaml
Overflow occurs iff x and y have opposite signs and z and x have opposite signs
" Hacker 's Delight " , section 2.12 let ( + ) x y = Int32.( let z = add x y in Overflow occurs iff x and y have same sign and z 's sign is different if logand (logxor z x) (logxor z y) < 0l then raise Exc.Int32Overflow else z ) let ( - ) x y = Int32.( let z = sub x y in if logand (logxor x y) (logxor...
f01d11a693e1c7a68782a47ec091ccd898104725337efc6a7dc714cdf39acd80
amnh/PCG
Internal.hs
----------------------------------------------------------------------------- -- | -- Module : Bio.Graph.Node.Internal Copyright : ( c ) 2015 - 2021 Ward Wheeler -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -----------------------------------...
null
https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/data-structures/src/Bio/Graph/Node/Internal.hs
haskell
--------------------------------------------------------------------------- | Module : Bio.Graph.Node.Internal License : BSD-style Maintainer : Stability : provisional Portability : portable --------------------------------------------------------------------------- # LANGUAGE DeriveAnyClass ...
Copyright : ( c ) 2015 - 2021 Ward Wheeler # LANGUAGE DeriveFoldable # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplicati...
fe9e1e1745c3963b1de7e0fa9461b04b3ac4c3fc8053cafda12c103e841344c0
PacktPublishing/Haskell-High-Performance-Programming
bitstore.hs
-- file: bitstore.hs {-# LANGUAGE BangPatterns #-} import Data.Array.Unboxed import Data.Bits (xor) type BitTuple = (Bool, Bool, Bool) data BitStruct = BitStruct !Bool !Bool !Bool deriving Show type BitArray = UArray Int Bool test :: Int -> Int -> Bool test n x = x `mod` n == 0 go :: BitStruct -> [Int] -> BitStruc...
null
https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter02/bitstore.hs
haskell
file: bitstore.hs # LANGUAGE BangPatterns # 80 MB , 0.075s 176 MB , 0.1s
import Data.Array.Unboxed import Data.Bits (xor) type BitTuple = (Bool, Bool, Bool) data BitStruct = BitStruct !Bool !Bool !Bool deriving Show type BitArray = UArray Int Bool test :: Int -> Int -> Bool test n x = x `mod` n == 0 go :: BitStruct -> [Int] -> BitStruct go res [] = res go (Bit...
91f330124f7bac7fffa0d0ad69da77a382aa8fd458203966dc625c816b5e4272
willijar/LENS
message.lisp
;; Message and packet definitions Copyright ( C ) 2013 - 2014 Dr. Author : Dr. < > ;; Keywords: ;;; Copying: ;; This file is part of Lisp Educational Network Simulator (LENS) ;; This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as...
null
https://raw.githubusercontent.com/willijar/LENS/646bc4ca5d4add3fa7e0728f14128e96240a9f36/core/message.lisp
lisp
Message and packet definitions Keywords: Copying: This file is part of Lisp Educational Network Simulator (LENS) This program is free software: you can redistribute it and/or modify (at your option) any later version. LENS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without eve...
Copyright ( C ) 2013 - 2014 Dr. Author : Dr. < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License (in-package :lens) (defclass message(eve...
938cb4a55566e156fa39d66aa403da60741a4971c135a28ab9588f0fb3aa9ac6
exercism/clojure
accumulate.clj
(ns accumulate) (defn accumulate [] ;; <- arglist goes here ;; your code goes here )
null
https://raw.githubusercontent.com/exercism/clojure/7ed96a5ae3c471c37db2602baf3db2be3b5a2d1a/exercises/practice/accumulate/src/accumulate.clj
clojure
<- arglist goes here your code goes here
(ns accumulate) )
aea5138c7beb4cca33c9c2620e1b3a676ff76069f6ee5201e42d754cc933d747
clash-lang/clash-compiler
ROM.hs
| Copyright : ( C ) 2015 - 2016 , University of Twente , 2017 , Google Inc. 2019 , Myrtle Software Ltd , 2021 - 2022 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > ROMs Copyright : (...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/491b331e9e42b698d65eb3e308fc2ffcf295d535/clash-prelude/src/Clash/Prelude/ROM.hs
haskell
# LANGUAGE RankNTypes # # OPTIONS_HADDOCK show-extensions # * Asynchronous ROM * Synchronous ROM synchronized to an arbitrary clock * Internal === See also: for ideas on how to use ROMs and RAMs. is constructed. See 'Clash.Prelude.ROM.File.asyncRomFile' and 'Clash.Prelude.ROM.Blob.asyncRomBlob' for different a...
| Copyright : ( C ) 2015 - 2016 , University of Twente , 2017 , Google Inc. 2019 , Myrtle Software Ltd , 2021 - 2022 , QBayLogic B.V. License : BSD2 ( see the file LICENSE ) Maintainer : QBayLogic B.V. < > ROMs Copyright : (...
3a3ee7f73147d05628ff6a3f162a074537475e177f9f34acf9920646bbeeb8f5
FlowForwarding/loom
iof.erl
%%------------------------------------------------------------------------------ Copyright 2014 FlowForwarding.org %% 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 %%...
null
https://raw.githubusercontent.com/FlowForwarding/loom/86a9c5aa8b7d4776062365716c9a3dbbf3330bc5/icontrol/apps/icontrol/src/iof.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, eithe...
Copyright 2014 FlowForwarding.org Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author Erlang Solutions Ltd. < > 2014 FlowForwarding.org set default switch ( defaults to * first * switch connected ) -define(...
5144dd53ff89cfe7eab6da7f926efdc1f112dad66e5d04a937ad914fd9a5b1fb
jamii/erl-telehash
telehash.erl
-module(telehash). -export([start/0]). start() -> ensure(crypto), ok = application:start(telehash). ensure(App) -> case application:start(App) of ok -> ok; {error, {already_started, App}} -> ok end.
null
https://raw.githubusercontent.com/jamii/erl-telehash/2c0218bbf7a543e318ed50a1d48fb481963f151e/src/telehash.erl
erlang
-module(telehash). -export([start/0]). start() -> ensure(crypto), ok = application:start(telehash). ensure(App) -> case application:start(App) of ok -> ok; {error, {already_started, App}} -> ok end.
e1bdd09334f061a2d545f6ad25bda6644f093d3501a8e76cc39e15498b718914
zkat/squirl
plink.lisp
(in-package :squirl-demo) (defclass plink-demo (demo) ((num-verts :initarg :num-verts :initform 5 :accessor plink-num-verts) (static-body :initarg :static-body :initform (make-body :actor :not-grabbable) :accessor demo-static-body) (angle :accessor plink-angle)) (:default-initargs :name "Plin...
null
https://raw.githubusercontent.com/zkat/squirl/d5ab125b389008696a66f5a0d1bbb7449584db90/demo/plink.lisp
lisp
(in-package :squirl-demo) (defclass plink-demo (demo) ((num-verts :initarg :num-verts :initform 5 :accessor plink-num-verts) (static-body :initarg :static-body :initform (make-body :actor :not-grabbable) :accessor demo-static-body) (angle :accessor plink-angle)) (:default-initargs :name "Plin...
9aea36e5a4c913fbdf242e6abcf4b081774beb5fa77bb4ad108f750f6674817f
norvig/paip-lisp
prologc1.lisp
;;;; -*- Mode: Lisp; Syntax: Common-Lisp -*- Code from Paradigms of AI Programming Copyright ( c ) 1991 File prologc1.lisp : Version 1 of the prolog compiler , including the destructive unification routines from Chapter 11 . (requires "prolog") (defconstant unbound "Unbound") (defstruct var name (binding ...
null
https://raw.githubusercontent.com/norvig/paip-lisp/9d3b83bdae923299aac3132dc4d8540fd57e347f/lisp/prologc1.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp -*- Compile the clauses with this arity Compile all the clauses with any other arity Note NAME is the raw name, not the name/arity
Code from Paradigms of AI Programming Copyright ( c ) 1991 File prologc1.lisp : Version 1 of the prolog compiler , including the destructive unification routines from Chapter 11 . (requires "prolog") (defconstant unbound "Unbound") (defstruct var name (binding unbound)) (defun bound-p (var) (not (eq (var...
7b357aeecfebfe0d7f7bc288a03d4af5e968601fdb5629b9ddff3a8985e1cebf
sdiehl/bulletproofs
Prover.hs
{-# LANGUAGE NamedFieldPuns, MultiWayIf #-} module Bulletproofs.InnerProductProof.Prover ( generateProof, ) where import Protolude import Control.Exception (assert) import Data.Curve.Weierstrass.SECP256K1 (PA, Fr, mul) import Bulletproofs.Utils import Bulletproofs.InnerProductProof.Internal -- | Generate proof t...
null
https://raw.githubusercontent.com/sdiehl/bulletproofs/6cb356a2ad44dea139abb81214f1babab8456b91/Bulletproofs/InnerProductProof/Prover.hs
haskell
# LANGUAGE NamedFieldPuns, MultiWayIf # | Generate proof that a witness l, r satisfies the inner product relation whose inner product is t ^ Vectors l and r that hide bit vectors aL and aR, respectively --------------------------- Checks ---------------------------
module Bulletproofs.InnerProductProof.Prover ( generateProof, ) where import Protolude import Control.Exception (assert) import Data.Curve.Weierstrass.SECP256K1 (PA, Fr, mul) import Bulletproofs.Utils import Bulletproofs.InnerProductProof.Internal on public input ( Gs , Hs , h ) generateProof ^ Generators Gs...
b877610af48175fa88ee7874f170ab29fe33c33d64c7c7345633a47dd5c09d4b
dada-lang/dada-model
opsem-lease-cancellation.rkt
#lang racket ;; Convention: uppercase names are things that only exist at runtime (require "../dada.rkt") (; Test lease cancellation dada-seq-test ((var vec1 = (class-instance Vec (int) (22))) (var vec2 = (lend (vec1))) (var vec3 = (lend (vec1))) (set (vec3 value0) = 44)) [(vec1 (my box Heap-addr1)) (vec2 ...
null
https://raw.githubusercontent.com/dada-lang/dada-model/8978cd0346480686005e971a8d6e83ced65af265/racket/z-tests/opsem-lease-cancellation.rkt
racket
Convention: uppercase names are things that only exist at runtime Test lease cancellation Test lease cancellation on read--reading vec1 cancels vec2/vec3 Test lease cancellation on read--reading vec2 cancels vec3 Test lent leases are not called when lent ref is dropped (see opsem-lent for an example of why) on...
#lang racket (require "../dada.rkt") dada-seq-test ((var vec1 = (class-instance Vec (int) (22))) (var vec2 = (lend (vec1))) (var vec3 = (lend (vec1))) (set (vec3 value0) = 44)) [(vec1 (my box Heap-addr1)) (vec2 expired) (vec3 ((lent Lease-id1) box Heap-addr1)) ] [(Heap-addr1 (box 1 ((class Vec) ((valu...
b075d01639c44d698b016a10b1820aed652f9fd6821ec583a1f173f626d1319c
sbcl/sbcl
mb-util.lisp
(in-package "SB-IMPL") (defmacro define-multibyte-mapper (name list) (let* ((list (sort (copy-list list) #'< :key #'car)) (hi (loop for x in list maximize (max (car x) (cadr x)))) (array (make-array `(,(length list) 2) :element-type `(integer 0 ,hi) ...
null
https://raw.githubusercontent.com/sbcl/sbcl/077affa9121970175d78296c41d4793f62d96e13/src/code/external-formats/mb-util.lisp
lisp
This used to invoke MAKE-ARRAY in the defining form, but a quoted constant is better - it's literal and therefore implicitly readonly. but guess what, this is compiled in warm build anyway, so who even cares what the cross-compiler used to not be OK with? FIXME: better to change make-od-name() to accept multiple ...
(in-package "SB-IMPL") (defmacro define-multibyte-mapper (name list) (let* ((list (sort (copy-list list) #'< :key #'car)) (hi (loop for x in list maximize (max (car x) (cadr x)))) (array (make-array `(,(length list) 2) :element-type `(integer 0 ,hi) ...
374d4516a66d7531f8a514861843eea8184fb49cc464afd79910b9c38acc542b
erlang/erlide_kernel
erlide_noparse.erl
%% Description: Split source files into functions and clauses and collects references %% Author: jakob Created : Mar 23 , 2006 -module(erlide_noparse). %% %% Exported Functions %% called from Java -export([initial_parse/6, reparse/2, remove_cache_files/2]). called from Erlang -export([get_module_refs/4]). %%...
null
https://raw.githubusercontent.com/erlang/erlide_kernel/071c7cea0dbd29516a08859d9ac89d072ba540e0/ide/apps/erlide_ide_core/src/erlide_noparse.erl
erlang
Description: Split source files into functions and clauses and collects references Author: jakob Exported Functions Include files API Functions TODO: shouldn't we check that .refs is up-to-date? using renew function etc. would probably be more straight-forward... remove all cache files for an erlang modul...
Created : Mar 23 , 2006 -module(erlide_noparse). called from Java -export([initial_parse/6, reparse/2, remove_cache_files/2]). called from Erlang -export([get_module_refs/4]). -define(DEBUG , 1 ) . -define(CACHE_VERSION, 31). -define(SERVER, erlide_noparse). -include_lib("erlide_common/include/erlide_db...
097f4d3af9a2402dcefb626fec39da29602ad1957b997d1bbe6016ddae1868fa
sigscale/rim
im_xml_epcn3ai.erl
%%% -2.0 %%% %%% Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " AS IS " BASIS , %%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. %%% See the License for the specific language governing permissions and %%% limitat...
null
https://raw.githubusercontent.com/sigscale/rim/f806a0c52430f86bf1d54324fd0b4b6e510aea43/src/im_xml_epcn3ai.erl
erlang
-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 permissions and limitations under the License. @doc This library module implements the public API for the {...
distributed under the License is distributed on an " AS IS " BASIS , -module(im_xml_epcn3ai). -copyright('Copyright (c) 2018 - 2021 SigScale Global Inc.'). -export([parse_server/2, parse_proxy/2]). -include("im.hrl"). -include_lib("inets/include/mod_auth.hrl"). -include("im_xml.hrl"). -define(PathCatalogSchema, "/...
06128cedb7a9816e89cce7fa49efab693416382fb5ac7811ba98550668b7fe8f
DerekCuevas/interview-cake-clj
core.clj
(ns reverse-linked-list.core (:require [reverse-linked-list.list :as list]) (:gen-class)) (defn reverse-list "O(n) time & space - not in-place, returns new list." [head] (loop [head head reversed nil] (if (nil? head) reversed (recur (:next head) (list/insert reversed (:v...
null
https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/reverse-linked-list/src/reverse_linked_list/core.clj
clojure
(ns reverse-linked-list.core (:require [reverse-linked-list.list :as list]) (:gen-class)) (defn reverse-list "O(n) time & space - not in-place, returns new list." [head] (loop [head head reversed nil] (if (nil? head) reversed (recur (:next head) (list/insert reversed (:v...
e96e88f6f94f0cbad60a97e5e261af1c1efaeda3b186b08aca92574c450e6994
RBornat/jape
termstring.ml
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either ver...
null
https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/termstring.ml
ocaml
************* printing out internal structure of term ************ for those who need to know *exactly* what they have got ******* rebuilding bindings ***************** ------------------------------------------------------------------------------------- Bernard's pretty-printer in all its glory spurious not r...
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either ver...
73d25c6164e2e412ec6e135fd43023c3031104a2ba2c6646631c39e9ffb91031
mivoq/hunpos
ocamap.ml
module Make(Ord: Map.OrderedType): (Amap.S with type key = Ord.t) = struct module OMap = Map.Make(Ord) type key = Ord.t type 'a t = {mutable contents : 'a OMap.t} let empty () = {contents = OMap.empty} let update init update m key = let value = try update (OMap.find key m.contents ) with Not_found -> ini...
null
https://raw.githubusercontent.com/mivoq/hunpos/0f0f775039fa749e67711c07ac681a16c0979349/util/ocamap.ml
ocaml
module Make(Ord: Map.OrderedType): (Amap.S with type key = Ord.t) = struct module OMap = Map.Make(Ord) type key = Ord.t type 'a t = {mutable contents : 'a OMap.t} let empty () = {contents = OMap.empty} let update init update m key = let value = try update (OMap.find key m.contents ) with Not_found -> ini...
4ef47fcc614af0a946b0b37d3bc8826f0225239d8e51631b7c2af2eb330a6fd3
8c6794b6/guile-tjit
http.scm
;;; Web I/O: HTTP Copyright ( C ) 2010 , 2011 , 2012 , 2015 Free Software Foundation , Inc. ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 3 of the License , or...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/web/server/http.scm
scheme
Web I/O: HTTP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR...
Copyright ( C ) 2010 , 2011 , 2012 , 2015 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA (define-modu...
975056c3a7ed2fe00ae71e4c1fecd07737b8fd4f7daae75efc5f6425d49a4d18
genenetwork/guix-bioinformatics
arrayfire.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2016 < > Copyright © 2019 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; ei...
null
https://raw.githubusercontent.com/genenetwork/guix-bioinformatics/9e1e668e4f9f9e2b595620fda831da0525db4095/gn/packages/arrayfire.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2016 < > Copyright © 2019 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gn packages arrayfire) #:use-module (guix packages) #:use-module ((g...
c07e34ae82c3fd04980d868e709316db9872fbd3c42fd55e64e611af6b7141e4
benoitc/econfig
econfig_watcher.erl
%%% -*- erlang -*- %%% This file is part of econfig released under the Apache 2 license . %%% See the NOTICE for more information. %% @hidden -module(econfig_watcher). -behaviour(gen_server). -export([start_link/2, start_link/3, pause/1, restart/1]). -export([init/1, handle_call/3, han...
null
https://raw.githubusercontent.com/benoitc/econfig/84d7cec15f321c4ac5f5c6e08e5a9a8adea01986/src/econfig_watcher.erl
erlang
-*- erlang -*- See the NOTICE for more information. @hidden -- internal functions
This file is part of econfig released under the Apache 2 license . -module(econfig_watcher). -behaviour(gen_server). -export([start_link/2, start_link/3, pause/1, restart/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_chan...
469c2f068c82ac82c962e34d78086a31ec4c3890dcae2f8d4be4ef60f370a9c5
quux00/go-lightly
go_lightly_test.clj
(ns thornydev.go-lightly-test (:refer-clojure :exclude [peek take]) (:use clojure.test thornydev.go-lightly)) --- [ helper fns ] --- ; ; (defn- put-with-sleeps [ch n] (dotimes [_ 50] (Thread/sleep (rand-int 125)) (put ch n))) (defn- put-20 "puts the provided seconds arg 20 times into the ch...
null
https://raw.githubusercontent.com/quux00/go-lightly/815052a72af678e8c84d7a9716c50f7008d8971e/go-lightly/test/thornydev/go_lightly_test.clj
clojure
; ---[ tests ]--- ;; wait for element to be on the channel wait for element to be on the channel wait for element to be on the channel now should read from unpreferred now close now close ch -> will throw (silent) exception in go routine now preferred channel is empty, so unpreferred is read from prefer! modi...
(ns thornydev.go-lightly-test (:refer-clojure :exclude [peek take]) (:use clojure.test thornydev.go-lightly)) (defn- put-with-sleeps [ch n] (dotimes [_ 50] (Thread/sleep (rand-int 125)) (put ch n))) (defn- put-20 "puts the provided seconds arg 20 times into the channel if no second arg pro...
981d99ae7fbd1f31993c17d8ca1ee959e6a00432d7fd9a8e2ecfbd8755ef7ed5
oreillymedia/etudes-for-erlang
teeth.erl
%% @author J D Eisenberg <> %% @doc Show teeth that need attention due to excessive pocket depth. 2013 J D Eisenberg %% @version 0.1 -module(teeth). -export([alert/1]). %% @doc Create a list of tooth numbers that require attention. -spec(alert([integer()]) -> [integer()]). alert(ToothList) -> alert(ToothList, 1,...
null
https://raw.githubusercontent.com/oreillymedia/etudes-for-erlang/07200372503a8819f9fcc2856f8cb82451be7b48/code/ch06-04/teeth.erl
erlang
@author J D Eisenberg <> @doc Show teeth that need attention due to excessive pocket depth. @version 0.1 @doc Create a list of tooth numbers that require attention. @doc Helper function that accumulates the list of teeth needing attention
2013 J D Eisenberg -module(teeth). -export([alert/1]). -spec(alert([integer()]) -> [integer()]). alert(ToothList) -> alert(ToothList, 1, []). -spec(alert([integer()], integer(), [integer()]) -> [integer()]). alert([], _Tooth_number, Result) -> lists:reverse(Result); alert([Head | Tail ], ToothNumber, Result ...
7e104b352d927f49c2453d0056d87e713869ff77cad9d79f8c56b838229e9912
clojure-emacs/refactor-nrepl
protocol_usage.clj
(ns com.example.protocol-usage (:require [com.example.protocol-def :refer :all])) (defrecord MyRecord [] MyProtocol (my-fn [arg] (println arg))) (deftype MyType [] MyProtocol (my-fn [arg] (println arg)))
null
https://raw.githubusercontent.com/clojure-emacs/refactor-nrepl/8457b0341fdb220d4cba577ed150565e4d103364/testproject/src/com/example/protocol_usage.clj
clojure
(ns com.example.protocol-usage (:require [com.example.protocol-def :refer :all])) (defrecord MyRecord [] MyProtocol (my-fn [arg] (println arg))) (deftype MyType [] MyProtocol (my-fn [arg] (println arg)))
9eb7824c4c70797fd3acb321a30da9327c729b6f413902b7952ea8732dba575f
basho/riak_core
riak_core_schema_tests.erl
-module(riak_core_schema_tests). -include_lib("eunit/include/eunit.hrl"). -compile([export_all, nowarn_export_all]). %% basic schema test will check to make sure that all defaults from %% the schema make it into the generated app.config basic_schema_test() -> %% The defaults are defined in priv/riak_core.schema. ...
null
https://raw.githubusercontent.com/basho/riak_core/762ec81ae9af9a278e853f1feca418b9dcf748a3/test/riak_core_schema_tests.erl
erlang
basic schema test will check to make sure that all defaults from the schema make it into the generated app.config The defaults are defined in priv/riak_core.schema. it is the file under test. Tests that configurations which should be prohibited by validators defined in the schema are, in fact, reported as invalid...
-module(riak_core_schema_tests). -include_lib("eunit/include/eunit.hrl"). -compile([export_all, nowarn_export_all]). basic_schema_test() -> Config = cuttlefish_unit:generate_templated_config( "priv/riak_core.schema", [], context()), cuttlefish_unit:assert_config(Config, "riak_core.default_buck...
5187cc764f7a285d2dd88ee17cb348d6fd6635d4efdec545bf67cc282c341099
bet365/soap
soap_mime.erl
%% %% %CopyrightBegin% %% Copyright Hillside Technology Ltd. 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by ap...
null
https://raw.githubusercontent.com/bet365/soap/856b5c418d8d40a6b5bcbbe3fd390c6a0b8d4f18/src/soap_mime.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Hillside Technology Ltd. 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , This is a minimal MIME parser , to support what is needed -module(soap_mime). -export([decode/2]). -export...
cf5add3cc0d7f163ecf8e883d654cb188c3205cf1482f4841778b5282574e3da
carlosavieira/self-study
04.hs
myLength :: (Num b, Eq b) => [a] -> b myLength [] = 0 myLength (x:xs) = 1 + (myLength xs)
null
https://raw.githubusercontent.com/carlosavieira/self-study/c7f998875f34a9d3623ade6deb75980affad2047/programming/Haskell/99%20problems/solutions/04.hs
haskell
myLength :: (Num b, Eq b) => [a] -> b myLength [] = 0 myLength (x:xs) = 1 + (myLength xs)
dc23ded8e42b0e41b5cc8f133bb10fc0e469e42374300a3b85edbcf8f96e86dd
lispbuilder/lispbuilder
primitive.lisp
(in-package #:rm) (defclass primitive (foreign-object) () (:default-initargs :display-list t :gc t :free (simple-free #'rm-cffi::rm-primitive-delete 'primitive))) (defclass poly-primitive (primitive)() (:default-initargs :fp (rm-cffi::rm-Primitive-New :rm-polys))) (defclass quad-primitive (primitive...
null
https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-openrm/openrm/primitive.lisp
lisp
A color array RGBA A single color RGBA A vertex array xyz xy A single vertex xyz xy A vertex array xyz A single vertex xyz
(in-package #:rm) (defclass primitive (foreign-object) () (:default-initargs :display-list t :gc t :free (simple-free #'rm-cffi::rm-primitive-delete 'primitive))) (defclass poly-primitive (primitive)() (:default-initargs :fp (rm-cffi::rm-Primitive-New :rm-polys))) (defclass quad-primitive (primitive...
a173e7249361fddf47ebbb48a6289e5c5305f24e7bddf2788176c66abb6eff86
degree9/enterprise
socket_io.cljs
(ns degree9.socket-io (:require ["socket.io-client" :as client] [degree9.events.emitter :as emitter])) (defn io "Create a socket.io-client instance." ([] (client)) ([url] (client url)) ([url opts] (client url (clj->js opts)))) (defn connect-error [socket listener] (emitter/on socket "connect_e...
null
https://raw.githubusercontent.com/degree9/enterprise/65737c347e513d0a0bf94f2d4374935c7270185d/src/degree9/socket_io.cljs
clojure
(ns degree9.socket-io (:require ["socket.io-client" :as client] [degree9.events.emitter :as emitter])) (defn io "Create a socket.io-client instance." ([] (client)) ([url] (client url)) ([url opts] (client url (clj->js opts)))) (defn connect-error [socket listener] (emitter/on socket "connect_e...
43fa5869da11acdb14ac278640ac2b7a9dbc1bc5402084d83f7902099c031257
alanz/ghc-exactprint
MonadFailErrors.hs
-- Test purpose: Break properly if MonadFail is live {- # LANGUAGE MonadFailDesugaring # -} module MonadFailWarnings where import Control.Monad.Fail import Control.Monad.ST import Data.Functor.Identity general :: Monad m => m a general = do Just x <- undefined undefined general' :: MonadFail m => m a...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/103bc706c82300639985a15ba6cf762316352c92/tests/examples/ghc80/MonadFailErrors.hs
haskell
Test purpose: # LANGUAGE MonadFailDesugaring #
Break properly if MonadFail is live module MonadFailWarnings where import Control.Monad.Fail import Control.Monad.ST import Data.Functor.Identity general :: Monad m => m a general = do Just x <- undefined undefined general' :: MonadFail m => m a general' = do Just x <- undefined undefined ...
07d6fb4281d4eb35c4a46fb65c05c9f1a4a47c6097b37082c43786a63f297301
jackfirth/racket-expect
base.rkt
#lang racket/base (require racket/contract) (provide (contract-out [expect-any expectation?] [expectation (->* ((-> any/c (listof fault?))) (#:name (or/c symbol? #f)) expectation?)] [expectation? predicate/c] [expectation-apply (-> expectation? any/c (listof fault?))] ...
null
https://raw.githubusercontent.com/jackfirth/racket-expect/9530df30537ae05400b6a3add9619e5f697dca52/private/lite/base.rkt
racket
#lang racket/base (require racket/contract) (provide (contract-out [expect-any expectation?] [expectation (->* ((-> any/c (listof fault?))) (#:name (or/c symbol? #f)) expectation?)] [expectation? predicate/c] [expectation-apply (-> expectation? any/c (listof fault?))] ...
ff825221268028d60fc032729a615c2cf4ad8e115c11c55cdbaa7624f0882172
clojerl/clojerl
clj_utils.erl
%% @doc Utility functions. -module(clj_utils). -include("clojerl.hrl"). -include("clojerl_int.hrl"). -include("clojerl_expr.hrl"). -compile({no_auto_import, [throw/1, error/1]}). -export([ char_type/1 , char_type/2 , parse_number/2 , parse_symbol/1 , check_erl_fun/1 , parse_er...
null
https://raw.githubusercontent.com/clojerl/clojerl/506000465581d6349659898dd5025fa259d5cf28/src/erl/clj_utils.erl
erlang
@doc Utility functions. ------------------------------------------------------------------------------ Exported functions ------------------------------------------------------------------------------ @doc Parses a binary into an integer or a float. Generates an error when it can't parse the input into a either. ...
-module(clj_utils). -include("clojerl.hrl"). -include("clojerl_int.hrl"). -include("clojerl_expr.hrl"). -compile({no_auto_import, [throw/1, error/1]}). -export([ char_type/1 , char_type/2 , parse_number/2 , parse_symbol/1 , check_erl_fun/1 , parse_erl_fun/1 , desugar_m...
e856972823be2281123645e80de0b93895df3b0d133fb6f10ebc936afe9c39e3
tezos-checker/checker
testCommon.ml
open OUnit2 open TestLib open Error open Common let suite = "CommonTests" >::: [ "pow_int_nat" >:: (fun _ -> assert_int_equal ~expected:(Ligo.int_from_literal "1") ~real:(pow_int_nat (Ligo.int_from_literal "3") (Ligo.nat_from_literal "0n")); assert_int_equal ~expected...
null
https://raw.githubusercontent.com/tezos-checker/checker/32dcc6135ebec83a96edd3ee221bebbb0f01a42c/tests/testCommon.ml
ocaml
open OUnit2 open TestLib open Error open Common let suite = "CommonTests" >::: [ "pow_int_nat" >:: (fun _ -> assert_int_equal ~expected:(Ligo.int_from_literal "1") ~real:(pow_int_nat (Ligo.int_from_literal "3") (Ligo.nat_from_literal "0n")); assert_int_equal ~expected...
d26ac5a2c8d7e286c25d1b48df094815acfe559168240bcdfb09f5eb056aa31e
sleexyz/hylogen
Core.hs
| Primitives for use in Hylide module Hylogen.WithHylide.Core where import Data.Monoid import Hylogen import Hylogen.Expr Writes , without sharing -- toGLSL' :: Vec4 -> String -- toGLSL' v = unlines [ "void main() {" -- , " gl_FragColor = " <> show v <> ";" -...
null
https://raw.githubusercontent.com/sleexyz/hylogen/0e5eb3f117e0dd960ec0aef1da581402efee1148/hylide/src/Hylogen/WithHylide/Core.hs
haskell
toGLSL' :: Vec4 -> String toGLSL' v = unlines [ "void main() {" , " gl_FragColor = " <> show v <> ";" , "}" ] | Pixel coordinates (0, 0) is the lower left corner | Pixel coordinates (0, 0) is the center of the screen | Time in milliseconds sin...
| Primitives for use in Hylide module Hylogen.WithHylide.Core where import Data.Monoid import Hylogen import Hylogen.Expr Writes , without sharing ( 1 , 1 ) is the upper right corner uv :: Vec2 uv = uniform "uv()" ( 1 , 1 ) is the upper right corner uvN :: Vec2 uvN = unifor...
6b23c317aec1880bd8914189a1fb703bb0e095512b6991143ac23f09a33ab840
ocaml/dune
build_path_prefix_map.ml
type path = string type path_prefix = string type error_message = string let errorf fmt = Printf.ksprintf (fun err -> Error err) fmt let encode_prefix str = let buf = Buffer.create (String.length str) in let push_char = function | '%' -> Buffer.add_string buf "%#" | '=' -> Buffer.add_string buf "%+" |...
null
https://raw.githubusercontent.com/ocaml/dune/bf97454e2202098f3a08a13c8ccd1d0087f047a2/vendor/build_path_prefix_map/src/build_path_prefix_map.ml
ocaml
read key/value pairs from right to left, as the spec demands
type path = string type path_prefix = string type error_message = string let errorf fmt = Printf.ksprintf (fun err -> Error err) fmt let encode_prefix str = let buf = Buffer.create (String.length str) in let push_char = function | '%' -> Buffer.add_string buf "%#" | '=' -> Buffer.add_string buf "%+" |...
60848ea79e0bdce3a5f538305d7d46368d2cf922c33b872445a911d316098c16
unisonweb/unison
Main.hs
module Main where import Control.Monad import qualified Data.Set as Set import System.IO.CodePage (withCP65001) import System.Random import Test.Tasty.Bench import Unison.Prelude import Unison.Util.Relation (Relation) import qualified Unison.Util.Relation as R main :: IO () main = withCP65001 $ defaultMain ...
null
https://raw.githubusercontent.com/unisonweb/unison/7843e48cddbe46436bffb5a2e1bb5fb444f55302/lib/unison-util-relation/benchmarks/relation/Main.hs
haskell
module Main where import Control.Monad import qualified Data.Set as Set import System.IO.CodePage (withCP65001) import System.Random import Test.Tasty.Bench import Unison.Prelude import Unison.Util.Relation (Relation) import qualified Unison.Util.Relation as R main :: IO () main = withCP65001 $ defaultMain ...
ba8404b99bfd69c24bf59c4d3ad0f98a78a307b732c3758e45ee0e1c90a2c099
dfinity/motoko
note.mli
open Mo_types type t = { typ : Type.typ; eff : Type.eff; const : bool; check_run : int; } val def : t
null
https://raw.githubusercontent.com/dfinity/motoko/399b8e8b0b47890388cd38ee0ace7638d9092b1a/src/ir_def/note.mli
ocaml
open Mo_types type t = { typ : Type.typ; eff : Type.eff; const : bool; check_run : int; } val def : t
19ba62614ca5f8f613962c945770b5f50cb6b475e1ec72080081173e242ea79c
GNOME/gimp-tiny-fu
spyrogimp.scm
; spyrogimp.scm -*-scheme-*- Draws , and . ; More info at /~elad/spyrogimp/ Version 1.2 ; Copyright ( C ) 2003 by < > ; ; 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 versi...
null
https://raw.githubusercontent.com/GNOME/gimp-tiny-fu/a64d85eec23b997e535488d67f55b44395ba3f2e/scripts/spyrogimp.scm
scheme
spyrogimp.scm -*-scheme-*- More info at /~elad/spyrogimp/ This program is free software: you can redistribute it and/or modify either version 3 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the imp...
Draws , and . Version 1.2 Copyright ( C ) 2003 by < > it under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License (define (script-fu-spyrogimp img drw type shape oteeth...
f3590a08e100597b58827b26930a8f2c0ca5e4b3adec7eed18f296739ab4942b
AbstractMachinesLab/caramel
query_json.ml
{ { { COPYING * ( This file is part of Merlin , an helper for ocaml editors Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net > refis.thomas(_)gmail.com > < simon.castellan(_)iuwt.fr > Permission is hereby granted , free...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/src/frontend/ocamlmerlin/query_json.ml
ocaml
{ { { COPYING * ( This file is part of Merlin , an helper for ocaml editors Copyright ( C ) 2013 - 2015 < frederic.bour(_)lakaban.net > refis.thomas(_)gmail.com > < simon.castellan(_)iuwt.fr > Permission is hereby granted , free...
b7172b3926e143cc38d9175a202cff0ad4c134176aec71bdba8fcf64d20683e8
larcenists/larceny
nucleic.scm
NUCLEIC -- 3D structure determination of a nucleic acid . Author : ( ) ; Last modified : January 27 , 1996 ; ; This program is a modified version of the program described in the paper: ; , , , " Using Multilisp for Solving ; Constraint Satisfaction Problems: an Application to Nucleic Acid 3D S...
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Stress/src/nucleic.scm
scheme
This program is a modified version of the program described in the paper: Constraint Satisfaction Problems: an Application to Nucleic Acid 3D Computation". The differences between this program and the original are described in the paper: -- MATH UTILITIES -------------------------------------------------...
NUCLEIC -- 3D structure determination of a nucleic acid . Author : ( ) Last modified : January 27 , 1996 , , , " Using Multilisp for Solving Structure Determination " published in the journal " Lisp and Symbolic " ? ? ? " published in the " Journal of Functional Programming " . (define con...
afa7645bd0bdc9340a096472bf5d959df46f299adb3fb851ff2bdffa6b5b42ea
alanz/ghc-exactprint
WCompatWarningsNotOn.hs
-- Test purpose: -- Ensure that not using -Wcompat does not enable its warnings { - # OPTIONS_GHC -Wcompat # - } -- {-# OPTIONS_GHC -Wno-compat #-} module WCompatWarningsNotOn where import qualified Data.Semigroup as Semi monadFail :: Monad m => m a monadFail = do Just _ <- undefined undefined (<>) = und...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/WCompatWarningsNotOn.hs
haskell
Test purpose: Ensure that not using -Wcompat does not enable its warnings {-# OPTIONS_GHC -Wno-compat #-} Semigroup warnings -fwarn-noncanonical-monoid-instances
{ - # OPTIONS_GHC -Wcompat # - } module WCompatWarningsNotOn where import qualified Data.Semigroup as Semi monadFail :: Monad m => m a monadFail = do Just _ <- undefined undefined newtype S = S Int instance Semi.Semigroup S where (<>) = mappend instance Semi.Monoid S where S a `mappend` S b = S (a...
0ee187dcb28f730256f891e55d7ba292cb2e8c3631788cf402a509a6a2130c00
AppsFlyer/ketu
producer.clj
(ns ketu.shape.producer (:import (org.apache.kafka.clients.producer ProducerRecord))) (defn- dispatch "Dispatch value for the shape multimethods. Currently shapes that are a single keyword dispatch on themselves and sequential shapes dispatch on their first item. Examples: :value dispatches on :value. [:...
null
https://raw.githubusercontent.com/AppsFlyer/ketu/deadce66cb72a0b272ce4397808aba09c1702392/src/ketu/shape/producer.clj
clojure
(ns ketu.shape.producer (:import (org.apache.kafka.clients.producer ProducerRecord))) (defn- dispatch "Dispatch value for the shape multimethods. Currently shapes that are a single keyword dispatch on themselves and sequential shapes dispatch on their first item. Examples: :value dispatches on :value. [:...
7f0fb583b1a74781eff148b0c2c9132c83ec5743f55a6adab731d5d8f2cb4f98
magnetcoop/hydrogen-ce
landing.cljs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this ;; file, You can obtain one at / (ns hyd.client.landing (:require [ajax.core :as ajax] [hyd.client.session :as session] [hyd.client.view :as view] ...
null
https://raw.githubusercontent.com/magnetcoop/hydrogen-ce/83450437eaeaaa47171e4de152b2951d32cf2c7a/src/hyd/client/landing.cljs
clojure
file, You can obtain one at /
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this (ns hyd.client.landing (:require [ajax.core :as ajax] [hyd.client.session :as session] [hyd.client.view :as view] [re-frame.core :as re-fra...
cc73096cfa91f6c6cf0aa7ff4aeff47a0854641f3643abd6cf225d868d4c082a
S8A/htdp-exercises
ex499.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex499) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex499.rkt
racket
about the language level of this file in a form that our tools can easily process. [List-of Number] -> Number computes the product of the list of numbers [List-of Number] Number -> Number computes the product of the given list of numbers accumulator r is the product of the numbers in l0 that are not in l Q: The...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex499) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define (product l0) (define (product/a l r) ...
0870fc5475397ae64839ff6933ae43e68e90454befe650ad7f2f8b818312ea5b
v-kolesnikov/sicp
1_30.clj
(ns sicp.chapter01.1-30) (defn sum [term a next-element b] (loop [i a acc 0] (if (> i b) acc (recur (next-element i) (+ acc (term i))))))
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter01/1_30.clj
clojure
(ns sicp.chapter01.1-30) (defn sum [term a next-element b] (loop [i a acc 0] (if (> i b) acc (recur (next-element i) (+ acc (term i))))))
37b065e3d08ebc6a47a518b6c381547db88c09713768e91197298ad3c7870c25
riemann/riemann
zabbix.clj
(ns riemann.zabbix "Forwards events to Zabbix" (:require [cheshire.core :as json] [clojure.java.io :as io] [clojure.string :as s] [clojure.tools.logging :refer [error]]) (:import (java.io ByteArrayOutputStream OutputStream) (java.nio ByteBuffer ByteOrder) (java.net Socket))) The Zab...
null
https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/src/riemann/zabbix.clj
clojure
is the name of the command line client utility. For consistency here, the following conventions are used: followed by request (or response) data. datapoints.
(ns riemann.zabbix "Forwards events to Zabbix" (:require [cheshire.core :as json] [clojure.java.io :as io] [clojure.string :as s] [clojure.tools.logging :refer [error]]) (:import (java.io ByteArrayOutputStream OutputStream) (java.nio ByteBuffer ByteOrder) (java.net Socket))) The Zab...
f5df43cc017ba8caf994a099907991fe3d86c80fbd1c6fba7475aa56225c1769
tolysz/postgresql-simple-typed
TypedQuery.hs
{-# Language TemplateHaskell #-} # OPTIONS_GHC -fno - warn - orphans # module Database.PostgreSQL.Simple.TypedQuery ( genJsonQuery , genTypedQuery , TQ.genUncurry , TQ.TypedQuery(..) , S.Query ) where import qualified Database.PostgreSQL.Simple.Types as S (fromQuery) import qualified Database.PostgreSQL.Simple ...
null
https://raw.githubusercontent.com/tolysz/postgresql-simple-typed/69718cf6bf52d8d663e4c2661db9d8e337f1bbb9/src/Database/PostgreSQL/Simple/TypedQuery.hs
haskell
# Language TemplateHaskell # Move this somewhere
# OPTIONS_GHC -fno - warn - orphans # module Database.PostgreSQL.Simple.TypedQuery ( genJsonQuery , genTypedQuery , TQ.genUncurry , TQ.TypedQuery(..) , S.Query ) where import qualified Database.PostgreSQL.Simple.Types as S (fromQuery) import qualified Database.PostgreSQL.Simple as S (query, query_, execute, exe...