_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
0fe8bbeb8cc001666e87eb219384554734e448891284f6b5535639f1917623c6
jiesoul/soul-talk
db.cljs
(ns soul-talk.db) (def default-db {:active-page :home :navs [{:key :home :name "主页" :url "/"} {:key :articles :name "文章" :url "/articles"} {:key :about :name "关于" :url "/about"}] :contacts [{:name "github" :icon "github" :url ""} {:name "weibo" :icon "weibo" :url ""} ...
null
https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/home/src/soul_talk/db.cljs
clojure
(ns soul-talk.db) (def default-db {:active-page :home :navs [{:key :home :name "主页" :url "/"} {:key :articles :name "文章" :url "/articles"} {:key :about :name "关于" :url "/about"}] :contacts [{:name "github" :icon "github" :url ""} {:name "weibo" :icon "weibo" :url ""} ...
c092dafc3c7d7de0240ceff401898df3d46d2bc5f2e831520094a399d2c4582b
fragnix/fragnix
C2.hs
module C2 where class C2 a where c2 :: a
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/quick/CrazyCycles/C2.hs
haskell
module C2 where class C2 a where c2 :: a
ad487276dcce5ddb4345b95e8d1a436269cedf3818a397b16cccb4c5ddb1f5f1
OCamlPro/freeton_ocaml_sdk
mod_processing_lwt.ml
(**************************************************************************) (* *) Copyright ( c ) 2021 OCamlPro SAS (* *) (* All right...
null
https://raw.githubusercontent.com/OCamlPro/freeton_ocaml_sdk/42a0d95252ed19c647fa86e9728af15d557fc5e3/src/freeton_client_lwt/mod_processing_lwt.ml
ocaml
************************************************************************ All rights reserved. This file is distributed u...
Copyright ( c ) 2021 OCamlPro SAS Public License version 2.1 , with the special exception on linking include Ton_client.PROCESSING let send_message = Tc_lwt.request SendMessage.f let wait_for_transaction = Tc_lwt.request WaitForTransaction.f let process_message = Tc_l...
46a8b5afc5b4611baa5c805a99cb9e6d381bc41c0965a384908dd3d62ea53a86
Lovesan/bike
callbacks.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- Copyright ( C ) 2019 , < lovesan.ru at gmail.com > ;;; 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, inclu...
null
https://raw.githubusercontent.com/Lovesan/bike/3f43b6c503f6fb3d40d02c75b99e8525253a6bb5/examples/callbacks.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do...
Copyright ( C ) 2019 , < lovesan.ru at gmail.com > files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KI...
e9b75ed932b69a3def96a2fe16f5ba63a87d87fc0c28308e4022cc61eb2e7feb
smuenzel/opile
flambda_to_clambda.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/smuenzel/opile/190ca86df6440550d0fddf0222e16ba2e52bca64/raw-compiler/flambda_to_clambda.mli
ocaml
************************************************************************ OCaml ...
, OCamlPro and , Copyright 2014 - -2016 Jane Street Group LLC the GNU Lesser General Public License version 2.1 , with the [@@@ocaml.warning "+a-4-9-30-40-41-42"] type result = { expr : Cl...
e6a1afdb50e97a7f89fe083b592cd7944619f8c3c3cc31d0da3844e2361b4635
google/codeworld
MultiMap.hs
Copyright 2020 The CodeWorld Authors . 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 applicable law or agreed to ...
null
https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-prediction/src/Data/MultiMap.hs
haskell
| License : Apache-2.0 A simple MultiMap. This differs from the one in the @multimap@ package by using 'Data.Sequence.Seq' for efficient insert-at-end and other improved speeds. TODO: replace with M.spanAntitone once containers is updated
Copyright 2020 The CodeWorld Authors . 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 applicable law or agreed to ...
d8111a13cf4cc7eb0f2fbb0514c6a561f2c5044a92f740e07ca312a925ecd52c
tek/polysemy-hasql
AtomicStateTest.hs
module Polysemy.Hasql.Test.AtomicStateTest where import Exon (exon) import Polysemy.Db.Data.DbError (DbError) import Polysemy.Test (UnitTest, (===)) import Polysemy.Hasql.AtomicState (interpretAtomicStateDbAsAuto) import Polysemy.Hasql.Test.Run (integrationTest) data Cat = Cat { number :: Int, name :: Text...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/443ccf348bb8af0ec0543981d58af8aa26fc4c10/packages/hasql/integration/Polysemy/Hasql/Test/AtomicStateTest.hs
haskell
module Polysemy.Hasql.Test.AtomicStateTest where import Exon (exon) import Polysemy.Db.Data.DbError (DbError) import Polysemy.Test (UnitTest, (===)) import Polysemy.Hasql.AtomicState (interpretAtomicStateDbAsAuto) import Polysemy.Hasql.Test.Run (integrationTest) data Cat = Cat { number :: Int, name :: Text...
142f0e16ab03cf7f7870c685fa6dc7072344a5590ec2153833e4228f8f5e04c7
gergoerdi/chip8-papilio
Types.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE RecordWildCards # # LANGUAGE FlexibleInstances # module Types (Addr, Byte, Nybble, VidX, VidY, PixData, FrameBuffer) where import Data.Sized.Unsigned type Addr = U12 type Byte = U8 type Nybble = U4 type VidX = U6 type VidY = U5 type PixData = Bool type FrameBuffer = (VidX,...
null
https://raw.githubusercontent.com/gergoerdi/chip8-papilio/6bf0cbf0e8830495ec4298d7de586f69d5526de0/src/Types.hs
haskell
# LANGUAGE ScopedTypeVariables # # LANGUAGE RecordWildCards # # LANGUAGE FlexibleInstances # module Types (Addr, Byte, Nybble, VidX, VidY, PixData, FrameBuffer) where import Data.Sized.Unsigned type Addr = U12 type Byte = U8 type Nybble = U4 type VidX = U6 type VidY = U5 type PixData = Bool type FrameBuffer = (VidX,...
056c579e6f000627af6af8f03553afbb1c1ba95faab96f11916a227d3fb7b51b
ml4tp/tcoq
mltop.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/toplevel/mltop.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** This path is where we look for .cmo...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open CErrors open Util open P...
251abc46ba3c1cd7d3bb90c0e14025a82420ba05cfe48aa08bd4d49007271b2a
gafiatulin/codewars
Numbers.hs
-- Catching Car Mileage Numbers -- / module Awesome.Numbers where import Data.Tuple (swap) import Data.List (unfoldr, isInfixOf) import Control.Applicative (liftA2) data Answer = No | Almost | Yes deriving (Show, Read, Eq, Ord) isInteresting :: Integer -> [Integer] -> Answer isInteresting x xs | g x = Yes ...
null
https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/4%20kyu/Numbers.hs
haskell
Catching Car Mileage Numbers /
module Awesome.Numbers where import Data.Tuple (swap) import Data.List (unfoldr, isInfixOf) import Control.Applicative (liftA2) data Answer = No | Almost | Yes deriving (Show, Read, Eq, Ord) isInteresting :: Integer -> [Integer] -> Answer isInteresting x xs | g x = Yes | g (x+1) || g (x+2) = Almo...
3704f141b0153bbebb47188807a34bc1ae4de4c7b67a8f4542b53c351e9e0439
lojic/LearningRacket
day18-arithmetic.rkt
#lang racket Arithmetic expression evaluator inspired by Haskal 's solution to AoC 2020 Day 18 . ;; See other examples here: ;; -tools/tree/master/parser-tools-lib/parser-tools/examples (require parser-tools/lex parser-tools/yacc (prefix-in : parser-tools/lex-sre)) (define-tokens nums [ nu...
null
https://raw.githubusercontent.com/lojic/LearningRacket/eb0e75b0e16d3e0a91b8fa6612e2678a9e12e8c7/advent-of-code-2020/day18-arithmetic.rkt
racket
See other examples here: -tools/tree/master/parser-tools-lib/parser-tools/examples
#lang racket Arithmetic expression evaluator inspired by Haskal 's solution to AoC 2020 Day 18 . (require parser-tools/lex parser-tools/yacc (prefix-in : parser-tools/lex-sre)) (define-tokens nums [ number ]) (define-empty-tokens syms [ + - * / lp rp lb rb eof ]) (define-lex-abbrev digit...
74303a75294608dc97a2235914b19fbbab42d8e2b2190f3f826f92b5ec4294b6
donaldsonjw/bigloo
expdtrace.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / runtime / Eval / expdtrace.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/runtime/Eval/expdtrace.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ *=====================================================================*/ *---------------------------...
* serrano / prgm / project / bigloo / runtime / Eval / expdtrace.scm * / * Author : * / * Creation : Tue Sep 1 16:21:59 1992 * / * Last change : Sat Nov 15 07:43:28 2014 ( serrano ) * / * Tra...
ad90764a2710877efa3ee506034343592dd9852f2b06efe2162d2d32dfe77b62
nstack/nstack
Types.hs
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wno - orphans # module NStack.Comms.Types (module NStack.Comms.Types) where import Control.Lens (makeLenses, Lens', Iso') from : bytestring import Data.Coerce (coerce) import qualified Data.Map as Map import Data.Monoid ((<>)) import Data.SafeCopy (deriveSafeCopy, base, S...
null
https://raw.githubusercontent.com/nstack/nstack/c987557511134ed61db152a0bccbb80216b07a4b/nstack/src/NStack/Comms/Types.hs
haskell
general newtypes used from client/server comms systemd dbus object path ^ the 'QFnName' is a function with this type signature ^ the 'QFnName' is a type with this definition Maybe acknowledges that not all nstack methods have a proper 'MTypeRepresentation'. Only monomorphic methods do. | Simplified nstack-server...
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -Wno - orphans # module NStack.Comms.Types (module NStack.Comms.Types) where import Control.Lens (makeLenses, Lens', Iso') from : bytestring import Data.Coerce (coerce) import qualified Data.Map as Map import Data.Monoid ((<>)) import Data.SafeCopy (deriveSafeCopy, base, S...
a63a2e6984a7fe4cbcd196f03488cb03e28ca614206352dcdc25a3b09728373b
inaka/beam_olympics
bo_awesomeness.erl
-module(bo_awesomeness). -behaviour(bo_task). -export([description/0, spec/0, score/0, timeout/0, tests/0]). -spec description() -> binary(). description() -> <<"Awesomeness Factor: Measure the awesomeness of things.\n" "You should write a function (let's call it Aw) " "that measures how awesome any Erlang...
null
https://raw.githubusercontent.com/inaka/beam_olympics/9b16afd54f25c0996430139e9646c3cfdfbdf86b/src/tasks/bo_awesomeness.erl
erlang
-module(bo_awesomeness). -behaviour(bo_task). -export([description/0, spec/0, score/0, timeout/0, tests/0]). -spec description() -> binary(). description() -> <<"Awesomeness Factor: Measure the awesomeness of things.\n" "You should write a function (let's call it Aw) " "that measures how awesome any Erlang...
8d67e8c80791deb1ebc56c136942426e898d3d0417eafd7eb51d72684a693d05
mwand/5010-examples
08-5a-implicit-graphs.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 08-4-implicit-graphs) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constru...
null
https://raw.githubusercontent.com/mwand/5010-examples/ac24491ec2e533d048e11087ccc30ff1c087c218/08-5a-implicit-graphs.rkt
racket
about the language level of this file in a form that our tools can easily process. Node = Int Int -> SetOfInt GIVEN: an integer RETURNS: the list of its successors in the implicit graph. For this graph, this is always a set (no repetitions) SetOfInt -> SetOfInt GIVEN: A set of nodes RETURNS: the set of all the...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname 08-4-implicit-graphs) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) (require rackunit) (require "extras.rkt") ...
1d2d958ef1162b0425ae04d5713a8fdbdc9e99819de6cb70c072beb0b6ac8497
dgtized/shimmers
hand_drawn.cljc
(ns shimmers.algorithm.hand-drawn (:require [quil.core :as q :include-macros true] [shimmers.math.deterministic-random :as dr] [thi.ng.geom.core :as g] [thi.ng.geom.vector :as gv] [thi.ng.math.core :as tm])) ;; See also: / (defn random-point-in-circle [r] (-> (gv/vec2 (* r (Math/sqrt (dr/ran...
null
https://raw.githubusercontent.com/dgtized/shimmers/f096c20d7ebcb9796c7830efcd7e3f24767a46db/src/shimmers/algorithm/hand_drawn.cljc
clojure
See also: / Implementing squiggly line drawing as described in norm-range is inclusive of the last position Seems safer to use abs, but something weird is flipped with mix here? this should be biased toward normal at point? TODO: add controls for dt and displacement quantity
(ns shimmers.algorithm.hand-drawn (:require [quil.core :as q :include-macros true] [shimmers.math.deterministic-random :as dr] [thi.ng.geom.core :as g] [thi.ng.geom.vector :as gv] [thi.ng.math.core :as tm])) (defn random-point-in-circle [r] (-> (gv/vec2 (* r (Math/sqrt (dr/random-double))) ...
d2541e06d546e82260e39f95f6b22b369594261c224ff35a108ce51570cf012e
k0ral/imm
Record.hs
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StandaloneDeriving #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeFamilies #-} # LANGUAGE UndecidableInstances...
null
https://raw.githubusercontent.com/k0ral/imm/af3743ebfaaabe152d5c818edbdc9d334f6459f2/src/main/Database/Record.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # | Stateful information on a feed | Stateful information on a feed item | Consistent record of information for a single feed | Consistent record of information for a single feed item
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # # LANGUAGE UndecidableInstances # module Database.Record ( FeedStatus(..) , markFeedAsUnprocessed , touchFeed , FeedItemStatus(..) , ma...
041b0a476a3ecef40310d6de9038fe60e414f93a932d49247dd96c644690600f
avatar29A/hs-aitubots-api
DatePicker.hs
# LANGUAGE DuplicateRecordFields # # LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} module Aitu.Bot.Forms.Content.DatePicker ( DatePicker(..) ) where import Data.Aeson hiding ( Options ) import Data.Text import Aitu.Bot.Forms.ValidationRules ( Validat...
null
https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/src/Aitu/Bot/Forms/Content/DatePicker.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE DuplicateRecordFields # # LANGUAGE RecordWildCards # module Aitu.Bot.Forms.Content.DatePicker ( DatePicker(..) ) where import Data.Aeson hiding ( Options ) import Data.Text import Aitu.Bot.Forms.ValidationRules ( ValidationRules ) import Aitu.Bo...
403fe23b65e6d6e4f9c5e0881fa4ff104f4d9cfb7aaa674af502b2d4e35ee399
conjure-cp/conjure
AtMost.hs
# LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable # module Conjure.Language.Expression.Op.AtMost where import Conjure.Prelude import Conjure.Language.Expression.Op.Internal.Common import qualified Data.Aeson as JSON -- aeson import qualified Data.HashMap.Strict as M ...
null
https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Language/Expression/Op/AtMost.hs
haskell
aeson unordered-containers vector X: variables o[i] is an upper bound for the nb of occurrences of v[i] in X, indexed by T v[i] values, indexed by T TODO: check the indices and the category of vals&occs
# LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable # module Conjure.Language.Expression.Op.AtMost where import Conjure.Prelude import Conjure.Language.Expression.Op.Internal.Common deriving (Eq, Ord, Show, Data, Functor, Traversable, Foldable, Typeable, Generic) instance Seriali...
2f24ef46844eb06b55397bdd8a5d522b080729604659bf9b4aee967e7f08fc25
monadfix/ormolu-live
OccName.hs
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE OverloadedStrings #-} -- | -- #nam...
null
https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/basicTypes/OccName.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE BangPatterns # # LANGUAGE OverloadedStrings # | #name_types# * 'OccName.OccName' represents names as strings with just a little more information: data constructors * 'Name.Name': see "Name#name_types" * 'Id.Id': see "Id#name_types" Abstract ** Construction $rea...
( c ) The University of Glasgow 2006 ( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998 (c) The University of Glasgow 2006 (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 -} GHC uses several kinds of name internally : the \"namespace\ " that the name came from , e.g. the namespace...
b53d72dcbc828c8fefcb36d5bebc6e4bd29c871a0b4dbd5ba93321ea678c6775
ghcjs/jsaddle-dom
GainNode.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.GainNode (getGain, GainNode(..), gTypeGainNode) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Dou...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/GainNode.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/GainNode.gain Mozilla GainNode.gain documentation>
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.GainNode (getGain, GainNode(..), gTypeGainNode) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe, fromIntegral, round, realToFrac, fmap, Show, Read, Eq, Ord, Maybe(..))...
66d8aa4dc047bcc12b2b2bbb905223c3859e9860729144dc973e6d003714dcee
bobbae/gosling-emacs
mh-extras.ml
; This autoloaded file implements the "x" key of mhe: extended commands. (defun (&mh-extras (&mh-pop-to-buffer (concat "+" mh-folder)) (save-excursion (&mh-pop-to-buffer "mh-xcommands") (use-local-map "&mh-x-keymap") (if (= 0 (buffer-size)) (insert-string "Key Meaning (Type extended comm...
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/mh-extras.ml
ocaml
; This autoloaded file implements the "x" key of mhe: extended commands. (defun (&mh-extras (&mh-pop-to-buffer (concat "+" mh-folder)) (save-excursion (&mh-pop-to-buffer "mh-xcommands") (use-local-map "&mh-x-keymap") (if (= 0 (buffer-size)) (insert-string "Key Meaning (Type extended comm...
d6523188c50daff84f8af7468c9180941373b7075a2f6a354852895bd4c21da9
sanette/oplot
iglut.ml
interface glut bidon , à partir de 0.3 les anciennes versions sont en commentaires , et ne marchent que si insérées dans oplotmain.ml dans oplotmain.ml *) nécessite lablglut exception Not_compiled of string let noway () = raise (Not_compiled "GLUT interface") let fullscreen () = noway () let fullscree...
null
https://raw.githubusercontent.com/sanette/oplot/16f36ef5cdedf4699d633a84d5aac46baa52e9f6/lib/iglut.ml
ocaml
let swapbuffers () = Glut.swapBuffers () let freeze t = raise (Not_implemented "GLUT freeze") initialisation d'une fenêtre opengl par GLUT let glut_init () = let _ = Glut.init Sys.argv in Glut.initDisplayMode ~double_buffer:true (); Glut.idleFunc ~cb:(Some Glut.postRedisplay); Glut.keyboardFunc ~cb:...
interface glut bidon , à partir de 0.3 les anciennes versions sont en commentaires , et ne marchent que si insérées dans oplotmain.ml dans oplotmain.ml *) nécessite lablglut exception Not_compiled of string let noway () = raise (Not_compiled "GLUT interface") let fullscreen () = noway () let fullscree...
a94e04fb2acffe765de68376c67f6e1018e530396b41162bec25949258dfad60
erlang/otp
bs_utf_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2023 . 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 applic...
null
https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/erts/emulator/test/bs_utf_SUITE.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 l...
Copyright Ericsson AB 2008 - 2023 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(bs_utf_SUITE). -export([all/0, suite/0, init_per_suite/1, end_per_suite/1, utf8_roundtrip/1,utf16_roundtr...
34d17c8f8e2d8891747f5d6cece449a34bf1a84bdd313e582846fc07f4199f68
williamleferrand/aws
s3c.ml
* command - line client to Amazon 's S3 open Lwt open Creds open Printf module C = CalendarLib.Calendar module P = CalendarLib.Printer.CalendarPrinter module Util = Aws_util let redirect = function | Some region -> print_endline ("premament redirect to region " ^ (S3.string_of_region region)) | None -> ...
null
https://raw.githubusercontent.com/williamleferrand/aws/d591ef0a2b89082caac6ddd6850b2d8b7824e577/tools/s3c.ml
ocaml
get the acl now that we have the acl, modified it by adding to it yet another grant ignore display name construct the grant we wish to remove get the acl find the grant needing to be removed construct a new acl without that grant get the acl now that we have the acl, modified it by adding to it yet ...
* command - line client to Amazon 's S3 open Lwt open Creds open Printf module C = CalendarLib.Calendar module P = CalendarLib.Printer.CalendarPrinter module Util = Aws_util let redirect = function | Some region -> print_endline ("premament redirect to region " ^ (S3.string_of_region region)) | None -> ...
b9f876f5f9e6332d820e8074e67e3fd5028aa9f52246d8527ab5449951da751f
kappelmann/engaging-large-scale-functional-programming
Exercise03.hs
# LANGUAGE ViewPatterns # module Exercise03 where import Data.Array.Unboxed import qualified Data.IntSet as IS import qualified Data.Set as S import Data.List primeMayor :: Integer -> Integer primeMayor vv | even vv && vv > 2 = 2 | vv' `IS.member` candidates = 1 | otherwise = go 0 lows highs where ...
null
https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/03/uploads/syzygy/Exercise03.hs
haskell
candidates = S.fromDistinctAscList $ primes vv Taken from primesToNA
# LANGUAGE ViewPatterns # module Exercise03 where import Data.Array.Unboxed import qualified Data.IntSet as IS import qualified Data.Set as S import Data.List primeMayor :: Integer -> Integer primeMayor vv | even vv && vv > 2 = 2 | vv' `IS.member` candidates = 1 | otherwise = go 0 lows highs where ...
ed9d711311060c9d67a7099b79f6ea480305f2e479267f33f799eeb826ef2210
patrickt/co-log-fused-effects
CoLogFusedEffects.hs
| Copyright : ( c ) 2020 SPDX - License - Identifier : MPL-2.0 Maintainer : < > A fused - effects interface to the co - log ecosystem . Copyright: (c) 2020 Patrick Thomson SPDX-License-Identifier: MPL-2.0 Maintainer: Patrick Thomson <> A fused-effects interface to the co-log ecosystem. -} module CoL...
null
https://raw.githubusercontent.com/patrickt/co-log-fused-effects/1820c388f3da626f5c6a1bbc2265db252e64d852/src/CoLogFusedEffects.hs
haskell
| Copyright : ( c ) 2020 SPDX - License - Identifier : MPL-2.0 Maintainer : < > A fused - effects interface to the co - log ecosystem . Copyright: (c) 2020 Patrick Thomson SPDX-License-Identifier: MPL-2.0 Maintainer: Patrick Thomson <> A fused-effects interface to the co-log ecosystem. -} module CoL...
921a3ba7b77224e1664e9721aef21aa415034972643eebf184ddab14bc899a44
acl2/acl2
fty-omap.lisp
FTY Library ; Copyright ( C ) 2023 Kestrel Institute ( ) ; License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . ; Authors : ( ) ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "FTY") (include-book "centaur/fty/dat...
null
https://raw.githubusercontent.com/acl2/acl2/ea1669961a650700f6be7befe7c8b61423e4b281/books/kestrel/fty/fty-omap.lisp
lisp
Special function for inferring already-definedp already-defined lists/alists, so assume we're not already-defined. Special function for inferring already-definedp already-defined lists/alists, so assume we're not already-defined. bozo how could this not hold? bozo how could this not hold? :no-count :pr...
FTY Library Copyright ( C ) 2023 Kestrel Institute ( ) License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . Authors : ( ) ( ) (in-package "FTY") (include-book "centaur/fty/database" :dir :system) (include-book "centaur/fty/fty-parseutils" :dir :system) (include-...
db4b905566a36fba2955b0154a11f508517798f724b444d4a3a08af06a3e95df
mmottl/gsl-ocaml
multiroot.mli
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 * Multidimensional Root - Finding open Fun open Vector module NoDeriv : sig type kind = | HYBRIDS | HYBRID | DNEWTON | BR...
null
https://raw.githubusercontent.com/mmottl/gsl-ocaml/76f8d93cccc1f23084f4a33d3e0a8f1289450580/src/multiroot.mli
ocaml
gsl - ocaml - OCaml interface to GSL Copyright ( © ) 2002 - 2012 - Olivier Andrieu Distributed under the terms of the GPL version 3 * Multidimensional Root - Finding open Fun open Vector module NoDeriv : sig type kind = | HYBRIDS | HYBRID | DNEWTON | BR...
7fe19545dd81062f662c2cab64a1b38d52f3c8ec75572a6778e0c3174b5c05a7
borkdude/advent-of-cljc
mfikes.cljc
(ns aoc.y2018.d13.mfikes (:refer-clojure :exclude [read-string format]) (:require [aoc.utils :as u :refer [deftest read-string format some']] [aoc.y2018.d13.data :refer [input answer-1 answer-2]] [clojure.string :as string] [clojure.test :as t :refer [is testing]])) (def tracks #{\/ \\ \+}) (def dirs ...
null
https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2018/d13/mfikes.cljc
clojure
comment added to retrigger build. can be removed next time
(ns aoc.y2018.d13.mfikes (:refer-clojure :exclude [read-string format]) (:require [aoc.utils :as u :refer [deftest read-string format some']] [aoc.y2018.d13.data :refer [input answer-1 answer-2]] [clojure.string :as string] [clojure.test :as t :refer [is testing]])) (def tracks #{\/ \\ \+}) (def dirs ...
225bf58a735ec098ed3b6d9cfe03711467c9fba54a9b1f93ea9ab983c350ef7c
xapi-project/xen-api
xapi_pgpu.ml
* Copyright ( C ) 2006 - 2011 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/48cc1489fff0e344246ecf19fc1ebed6f09c7471/ocaml/xapi/xapi_pgpu.ml
ocaml
Determine whether dom0 can access the GPU. On boot, we determine * this from the boot config and put the result in the database. * Otherwise, we determine this from the database. Makes DB match reality for pgpus on local host Pick up any new supported vGPU configs on the host Calculate the maximum ...
* Copyright ( C ) 2006 - 2011 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
47db6dad384b16cf32b55141a33f73ff827b7a99ba69c9dd843623b541e5f293
MinaProtocol/mina
coinbase_intf.ml
open Core_kernel open Mina_base_import module type Full = sig module Fee_transfer = Coinbase_fee_transfer module Stable : sig module V1 : sig type t = private { receiver : Public_key.Compressed.Stable.V1.t ; amount : Currency.Amount.Stable.V1.t ; fee_transfer : Fee_transfer.Stabl...
null
https://raw.githubusercontent.com/MinaProtocol/mina/2bfe8358b46cfac5486f1f8bfe161729a08f6673/src/lib/mina_base/coinbase_intf.ml
ocaml
bin_io intentionally omitted in deriving list
open Core_kernel open Mina_base_import module type Full = sig module Fee_transfer = Coinbase_fee_transfer module Stable : sig module V1 : sig type t = private { receiver : Public_key.Compressed.Stable.V1.t ; amount : Currency.Amount.Stable.V1.t ; fee_transfer : Fee_transfer.Stabl...
55bfca78d41a18626b1c0b3e1c7cd4a6c274c494226f3dbefdcd99054c61545d
roblaing/erlang-webapp-howto
pong_handler.erl
-module(pong_handler). -behaviour(cowboy_websocket). -export([ init/2 , websocket_handle/2 , websocket_info/2 , terminate/3 ] ). init(Req, State) -> {cowboy_websocket, Req, State}. % Responds to Frames from client % InFrame :: ping | pong | {text | binary | ping | pong, binary()}...
null
https://raw.githubusercontent.com/roblaing/erlang-webapp-howto/e1731dfc4e2cfdfee88e982d67155b83acd5cc04/unit7/apps/unit7/src/pong_handler.erl
erlang
Responds to Frames from client InFrame :: ping | pong | {text | binary | ping | pong, binary()} This has to be here, but isn't used.
-module(pong_handler). -behaviour(cowboy_websocket). -export([ init/2 , websocket_handle/2 , websocket_info/2 , terminate/3 ] ). init(Req, State) -> {cowboy_websocket, Req, State}. websocket_handle(InFrame, State) -> io:format("Received ~p~n", [InFrame]), io:format("Sent Pong~n"...
21005cf2fcd6d51a6d7c3b27fb13e63508ef65eb7c59a8479bacf467a447d35b
tek/polysemy-hasql
DeleteTest.hs
module Polysemy.Hasql.Test.DeleteTest where import Polysemy.Db.Data.DbError (DbError) import Polysemy.Db.Data.Rep (Auto) import qualified Polysemy.Db.Data.Store as Store import Polysemy.Db.Data.Store (Store) import Polysemy.Test (UnitTest) import Polysemy.Hasql.Test.Database (withTestStore) import Polysemy.Hasql.Test...
null
https://raw.githubusercontent.com/tek/polysemy-hasql/443ccf348bb8af0ec0543981d58af8aa26fc4c10/packages/hasql/integration/Polysemy/Hasql/Test/DeleteTest.hs
haskell
module Polysemy.Hasql.Test.DeleteTest where import Polysemy.Db.Data.DbError (DbError) import Polysemy.Db.Data.Rep (Auto) import qualified Polysemy.Db.Data.Store as Store import Polysemy.Db.Data.Store (Store) import Polysemy.Test (UnitTest) import Polysemy.Hasql.Test.Database (withTestStore) import Polysemy.Hasql.Test...
6089fd89dbc0b542dec432c35c106ec8a4d8ccd279fc042003ccaae5ca1879fc
CryptoKami/cryptokami-core
SanityCheck.hs
-- | Functions for sanity checking the GState DB. module Pos.GState.SanityCheck ( sanityCheckDB ) where import Universum import System.Wlog (WithLogger) import UnliftIO (MonadUnliftIO) import Pos.DB.Class (MonadDBRead) import Pos.DB.GState.Stakes (getR...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/block/src/Pos/GState/SanityCheck.hs
haskell
| Functions for sanity checking the GState DB. | Check that GState DB is consistent.
module Pos.GState.SanityCheck ( sanityCheckDB ) where import Universum import System.Wlog (WithLogger) import UnliftIO (MonadUnliftIO) import Pos.DB.Class (MonadDBRead) import Pos.DB.GState.Stakes (getRealTotalStake) import Pos.Txp.DB (sanity...
c1904142296459bcada4477d36c9c7b8433f0a0c44720969b220c2d254424cc1
mirage/mirage-tcpip
ipv6.mli
* Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE A...
null
https://raw.githubusercontent.com/mirage/mirage-tcpip/3ab30ab7b43dede75abf7b37838e051e0ddbb23a/src/ipv6/ipv6.mli
ocaml
* Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE A...
8608f63b5c76dfed7f286776930dd6a0486cde9db7f6f074ef8cb7784b704886
ocramz/decision-trees
InformationTheory.hs
module Numeric.InformationTheory where import Control.Monad.Catch (MonadThrow(..)) import Data.Dataset import Numeric.Classification.Exceptions | Entropy of a Dataset -- -- Entropy is defined as: sum (p_i * log_2 p_i) -- where p_i = |{ x | x has Label i}|/|Dataset| -- NB : returns Nothing if any class contains ...
null
https://raw.githubusercontent.com/ocramz/decision-trees/a94f46cebeb715770cdd4d9b614f51bf0b1096c5/src/Numeric/InformationTheory.hs
haskell
Entropy is defined as: sum (p_i * log_2 p_i) where p_i = |{ x | x has Label i}|/|Dataset| | Differential entropy has a singularity at 0 but converges slowly to 0 for small positive values. | Gini index (expected error rate)
module Numeric.InformationTheory where import Control.Monad.Catch (MonadThrow(..)) import Data.Dataset import Numeric.Classification.Exceptions | Entropy of a Dataset NB : returns Nothing if any class contains 0 points ( i.e. if the integration support contains any 0 - measure subsets ) entropy :: (Foldable t, ...
4f90ae5976ee33a8691b6b68bf829091ecbff2a0057cdbcb4d5fe241bd8fc2dd
diffusionkinetics/open
Histogram.hs
{-| Simple histograms -} module Graphics.Plotly.Histogram where import Graphics.Plotly.Base hiding (sort) import Data.List (sort, group) import Lens.Micro import Data.Aeson (toJSON) import Data.Text (Text) -- | build a histogram with a given binsize histogram :: Int -- ^ number of bins -> [Double] -- ^ t...
null
https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/plotlyhs/src/Graphics/Plotly/Histogram.hs
haskell
| Simple histograms | build a histogram with a given binsize ^ number of bins ^ the individual observations
module Graphics.Plotly.Histogram where import Graphics.Plotly.Base hiding (sort) import Data.List (sort, group) import Lens.Micro import Data.Aeson (toJSON) import Data.Text (Text) -> Trace histogram nbins pts = let (lo, hi) = (minimum pts, maximum pts) binSize = (hi - lo) / realToFrac nbins ...
75dd8d242b93e2f998663e67f99b1cf95dd9856c188ac641ce457ce75f28f80a
quil-lang/sbcl-librarian
script.lisp
(require '#:asdf) (asdf:load-system '#:benchmark) (in-package #:sbcl-librarian/benchmark) (build-bindings benchmark ".") (build-python-bindings benchmark ".") (build-core-and-die benchmark ".")
null
https://raw.githubusercontent.com/quil-lang/sbcl-librarian/6dfefa1789e60a21e14cde8f7fac001a67d993a7/benchmark/script.lisp
lisp
(require '#:asdf) (asdf:load-system '#:benchmark) (in-package #:sbcl-librarian/benchmark) (build-bindings benchmark ".") (build-python-bindings benchmark ".") (build-core-and-die benchmark ".")
eb3eaf5ae9f75db56afff2f6fc73477076b59af729a8d5b4973379d6d15c4641
drathier/elm-offline
Compiler.hs
{-# LANGUAGE OverloadedStrings #-} module Elm.Compiler ( version , Compile.DocsFlag(..) , Compile.Artifacts(..) , compile , Error.Error , errorsToDoc , errorsToJson , Warning.Warning ) where import qualified Data.ByteString as BS import qualified Data.Map as Map import qualified Data.Text as Text ...
null
https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/compiler/src/Elm/Compiler.hs
haskell
# LANGUAGE OverloadedStrings # VERSION ERRORS TO JSON
module Elm.Compiler ( version , Compile.DocsFlag(..) , Compile.Artifacts(..) , compile , Error.Error , errorsToDoc , errorsToJson , Warning.Warning ) where import qualified Data.ByteString as BS import qualified Data.Map as Map import qualified Data.Text as Text import qualified Compile import qu...
50fd96f824f37fdbb8bc6707b2097baab339205c92a948a06c228f21415b1bb0
andorp/bead
UserStory.hs
# LANGUAGE CPP # module Test.Unit.UserStory ( tests ) where import Control.Monad.Trans (lift) import qualified Data.Map as Map import Prelude hiding (log) import Data.Time.Clock import Bead.Controller.ServiceContext import Bead.Controller.UserStories as U impor...
null
https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/test/Test/Unit/UserStory.hs
haskell
* Tests * Helpers
# LANGUAGE CPP # module Test.Unit.UserStory ( tests ) where import Control.Monad.Trans (lift) import qualified Data.Map as Map import Prelude hiding (log) import Data.Time.Clock import Bead.Controller.ServiceContext import Bead.Controller.UserStories as U impor...
52dc0317168cec974b63dc3640b39f22e8188b619be5b9841bf2deefa614878f
c-cube/trustee
LRU.ml
module type KEY = sig type t include Sigs.EQ with type t := t include Sigs.HASH with type t := t end module type S = sig type key type 'a t val create : size:int -> unit -> 'a t val size : _ t -> int val max_size : _ t -> int val get : 'a t -> compute:(key -> 'a) -> key -> 'a end module Make(K...
null
https://raw.githubusercontent.com/c-cube/trustee/397841b8ff813255f5643fef43a7187e81db21f5/src/core/LRU.ml
ocaml
remove b add b make room, if required
module type KEY = sig type t include Sigs.EQ with type t := t include Sigs.HASH with type t := t end module type S = sig type key type 'a t val create : size:int -> unit -> 'a t val size : _ t -> int val max_size : _ t -> int val get : 'a t -> compute:(key -> 'a) -> key -> 'a end module Make(K...
247cf1c9b7baa879959ec3a4fbe5f9ac421f38213665375487587b9a87bdc661
NorfairKing/the-notes
Macro.hs
module Cryptography.ComputationalProblems.Games.Abstract.Macro where import Types import Macro.MetaMacro import Functions.Application.Macro import Logic.PropositionalLogic.Macro -- * Games -- ** Winning condition wins_ :: Note wins_ = omega wins :: Note -> Note -> Note wins...
null
https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/Cryptography/ComputationalProblems/Games/Abstract/Macro.hs
haskell
* Games ** Winning condition ** Deterministic games ** Probabillistic games * Multigames
module Cryptography.ComputationalProblems.Games.Abstract.Macro where import Types import Macro.MetaMacro import Functions.Application.Macro import Logic.PropositionalLogic.Macro wins_ :: Note wins_ = omega wins :: Note -> Note -> Note wins = fn2 wins_ gme_ :: Note gme_ = "...
4d0898e86ee1b92daadd54220af6c830878e3af540e250d901eaba4185e2c8c0
input-output-hk/ouroboros-network
Combinator.hs
# LANGUAGE PatternSynonyms # -- | The hard fork combinator -- -- Intended for unqualified import module Ouroboros.Consensus.HardFork.Combinator (module X) where -- Defines 'SingleEraInfo' and 'LedgerEraInfo' import Ouroboros.Consensus.HardFork.Combinator.Info as X -- Defines 'SingleEraBlock' and 'CanHardFo...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/8d44955afdebcf9cc521f60e3a9f31e853ace2c1/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator.hs
haskell
| The hard fork combinator Intended for unqualified import Defines 'SingleEraInfo' and 'LedgerEraInfo' Defines 'SingleEraBlock' and 'CanHardFork' as well as various config types. Defines 'HasPartialConsensusConfig' and 'HasPartialLedgerConfig' Instances for 'BlockHasCodecConfig', 'GetHeader', 'HasHeader', 'Bas...
# LANGUAGE PatternSynonyms # module Ouroboros.Consensus.HardFork.Combinator (module X) where import Ouroboros.Consensus.HardFork.Combinator.Info as X import Ouroboros.Consensus.HardFork.Combinator.Abstract as X Defines ' HardForkProtocol ' , ' HardForkBlock ' , and ' LedgerState ' , import ...
c719ad7eea286101fe76f0746383df27fc04ca7e8a54fd109e423286906a5e1e
alpheccar/HPDF
Documentation.hs
| Quick documentation for the PDF library . For detailed examples , download the tar.gz package from Hackage and look at the test.hs in folder Test . For detailed examples, download the tar.gz package from Hackage and look at the test.hs in folder Test. -} module Graphics.PDF.Documentation( -- * Creating a...
null
https://raw.githubusercontent.com/alpheccar/HPDF/5a901376470b549b2354cdd8013e655f7ac19e0b/Graphics/PDF/Documentation.hs
haskell
* Creating a document $creating * Adding pages $pages * Creating the page content $content * Text $text $monadstyle * Geometry $geometry * X Form $xform * Image $image * Annotations $annotations * Warning $warning $warning The PDF format is full of extensions. Depending on the viewer that yo...
| Quick documentation for the PDF library . For detailed examples , download the tar.gz package from Hackage and look at the test.hs in folder Test . For detailed examples, download the tar.gz package from Hackage and look at the test.hs in folder Test. -} module Graphics.PDF.Documentation( * * ...
b7cb0ff0fe45e9b2c58d250443bcf2f61a9567694df262cbe0e66b89ff63d534
census-instrumentation/opencensus-erlang
oc_trace.erl
%%%------------------------------------------------------------------------ Copyright 2017 , OpenCensus Authors 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...
null
https://raw.githubusercontent.com/census-instrumentation/opencensus-erlang/7fb276ff73d677c00458922c9180df634f45e018/src/oc_trace.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 o...
Copyright 2017 , OpenCensus Authors Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(oc_trace). -export([from_ctx/1, current_span_ctx/1, parent_span_ctx/1, with_span_ctx/2, with...
785eda48bd8b5fd8deee60479a3b20af4e45e2d189a8c12b2a7d3d146d9f0a27
iburzynski/EMURGO_71
Main.hs
{-# OPTIONS_GHC -Wno-unrecognised-pragmas #-} {-# HLINT ignore "Avoid lambda" #-} {-# HLINT ignore "Redundant bracket" #-} {-# HLINT ignore "Redundant lambda" #-} {-# HLINT ignore "Use <$>" #-} module Main where import Lib -- Using bind/sequence: main' :: IO () main' = putStrLn "Enter the secret number:" >> getNumber ...
null
https://raw.githubusercontent.com/iburzynski/EMURGO_71/ec4f335b99ccada4e8577c255150b90be20813e7/IO/Guessing/Main.hs
haskell
# OPTIONS_GHC -Wno-unrecognised-pragmas # # HLINT ignore "Avoid lambda" # # HLINT ignore "Redundant bracket" # # HLINT ignore "Redundant lambda" # # HLINT ignore "Use <$>" # Using bind/sequence: Using do-notation: Using bind/sequence: if guess is correct, print the winning message and terminate else print the mess...
module Main where import Lib main' :: IO () main' = putStrLn "Enter the secret number:" >> getNumber >>= (\secret -> processGuess secret) main :: IO () main = do putStrLn "Enter the secret number:" secret <- getNumber processGuess secret processGuess' :: Int -> IO () processGuess' secret = putStrLn "Enter your...
3cd606557b701d1ed80351898fa87e8528151635cf6f54519ea1d8ed2a3a74bc
pkamenarsky/synchron
Log.hs
module Connector.Log where import Control.Concurrent.Async import Control.Concurrent.STM import Control.Concurrent.STM.TChan import Control.Monad (forever) import Concur import Debug.Trace (traceIO) logger :: ((String -> Concur ()) -> IO ()) -> IO () logger k = do ch <- newTChanIO done <- newEmptyTMVarIO ...
null
https://raw.githubusercontent.com/pkamenarsky/synchron/8fa21f586b974da830c202b58a46a652176a6933/src/Connector/Log.hs
haskell
module Connector.Log where import Control.Concurrent.Async import Control.Concurrent.STM import Control.Concurrent.STM.TChan import Control.Monad (forever) import Concur import Debug.Trace (traceIO) logger :: ((String -> Concur ()) -> IO ()) -> IO () logger k = do ch <- newTChanIO done <- newEmptyTMVarIO ...
3f3ddc9f475970daa96efa6a61bb3875ff6da3d980d3b8d297d857367f72a506
facebook/duckling
Rules.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Duckling.Numeral.N...
null
https://raw.githubusercontent.com/facebook/duckling/c6a48a1d0678a389f86d17db2676e1a289e355ce/Duckling/Numeral/NB/Rules.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. # LANGUAGE LambdaCase # module Duckling.Numeral.NB.Rules ( rules ) where import Data.HashMap.Strict (HashMap) import Data.Maybe import Data.String import Data.Text (Text) import Prelude import qualified Data.HashMap.Strict as HashMap import qualified Data.Text ...
21bb0cb7af1b144a11a7d20df752ac02779a9238736268dfd6529fdb128b8290
plumatic/grab-bag
max_ent.clj
(ns classify.algorithms.max-ent (:use plumbing.core) (:require [schema.core :as s] [hiphip.double :as dbl] [plumbing.index :as plumbing-index] [plumbing.logging :as log] [plumbing.math :as math] [plumbing.parallel :as parallel] [plumbing.resource :as resource] [flop.array :as fa] [flop.ma...
null
https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/classify/src/classify/algorithms/max_ent.clj
clojure
To avoid creating a new array and subtract log(weight) from log-likelihood Initially sum x_i Initially sum x_i^2 if labels are true/false make true get the weights Compute Column mean/std-devs
(ns classify.algorithms.max-ent (:use plumbing.core) (:require [schema.core :as s] [hiphip.double :as dbl] [plumbing.index :as plumbing-index] [plumbing.logging :as log] [plumbing.math :as math] [plumbing.parallel :as parallel] [plumbing.resource :as resource] [flop.array :as fa] [flop.ma...
d3c331b709584f56617e3d60155ab7d5f5436d5ae71cad028ea777e23e37b8fd
bbc/haskell-workshop
ch1.hs
Write a function to subtract two numbers sub x y = x - y -- calculate area of a circle from its radius area r = pi * r^2 Take two arguments and concatenate them together Example : myConcat " hello " " Haskell " returns " hello " myConcat x y = x ++ y Get the third element from a list using only head and tai...
null
https://raw.githubusercontent.com/bbc/haskell-workshop/475b9bac04167665030d7863798ccd27dfd589d0/aidylewis/exercises/week1/ch1.hs
haskell
calculate area of a circle from its radius Example: getLetters 8 returns ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h'] Generate a palindrome from any input string (doesn't have to be meaningful) Example: fizzBuzz returns ["Fizz","1","2","Fizz","4","Buzz"... etc
Write a function to subtract two numbers sub x y = x - y area r = pi * r^2 Take two arguments and concatenate them together Example : myConcat " hello " " Haskell " returns " hello " myConcat x y = x ++ y Get the third element from a list using only head and tail Example : myThirdFirst [ 1,2,3,4,5 ] retur...
ea5a9ba6b42b3cbe5db1debf8721b01b9e5708645578f9b069e6213719e986c1
rescript-lang/syntax
parmatch.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/rescript-lang/syntax/c6807e87c112a22657c21f43f26e012ad4ba1ce2/compiler-libs-406/parmatch.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Misc open Asttypes open Types open Typedtree Utilities for building patterns let make_pat de...
fb1ce78be74539abe6eee5289279f6894585bf190001260ab191b1d4d7342b63
fjvallarino/monomer
Types.hs
| Module : . Main . Types Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Basic types for Main module . Module : Monomer.Main.Types Copyright : (c) 2018 Francisco Vallarino License ...
null
https://raw.githubusercontent.com/fjvallarino/monomer/5b90aebae9f8d1d6c11265750823c016fdd3d785/src/Monomer/Main/Types.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE Strict # | Main Monomer monad. | Messages received by the rendering thread. | Result from attempting to set up the secondary rendering thread. | Requirements for periodic rendering by a widget. Start time is stored to calculate next frame based on the step ms. A maximum number...
| Module : . Main . Types Copyright : ( c ) 2018 License : BSD-3 - Clause ( see the LICENSE file ) Maintainer : Stability : experimental Portability : non - portable Basic types for Main module . Module : Monomer.Main.Types Copyright : (c) 2018 Francisco Vallarino License ...
6fb9d88679b1e2325b445eba61a10e26e0ae843f448279d69e1296690918cb8c
bobzhang/ocaml-book
pa_ctyp.ml
open Camlp4.PreCast; module Caml = Camlp4OCamlParser.Make (Camlp4OCamlRevisedParser.Make (Camlp4.OCamlInitSyntax.Make Ast Gram Quotation )); module Printers = Camlp4.Printers.OCaml.Make Caml; * Use all from (** File PreCast.ml (** Camlp4.PreCast.Syntax is global and shared *) module Loc = Str...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/camlp4/examples/pa_ctyp.ml
ocaml
* File PreCast.ml (** Camlp4.PreCast.Syntax is global and shared 'a -> 'b
open Camlp4.PreCast; module Caml = Camlp4OCamlParser.Make (Camlp4OCamlRevisedParser.Make (Camlp4.OCamlInitSyntax.Make Ast Gram Quotation )); module Printers = Camlp4.Printers.OCaml.Make Caml; * Use all from module Loc = Struct.Loc; module Ast = Struct.Camlp4Ast.Make Loc; module Token = Struct...
ff5ff49fc7330435fe89572ec0c21c248d05b25c941443d9207a3f85084175a1
andreas/ocaml-graphql-server
graphql_lwt.mli
(** GraphQL schema with Lwt support *) module Schema : sig include Graphql_intf.Schema with type 'a Io.t = 'a Lwt.t and type 'a Io.Stream.t = 'a Lwt_stream.t * (unit -> unit) and type field_error = string end
null
https://raw.githubusercontent.com/andreas/ocaml-graphql-server/d615cbb164d4ddfdc2efeb246a198dfe114adf24/graphql-lwt/src/graphql_lwt.mli
ocaml
* GraphQL schema with Lwt support
module Schema : sig include Graphql_intf.Schema with type 'a Io.t = 'a Lwt.t and type 'a Io.Stream.t = 'a Lwt_stream.t * (unit -> unit) and type field_error = string end
ee5e36b561e2ba494598328a4a84f8efee9802e134cceb6a3980bfd86eff0fb6
flotsfacetieux/sorcery-es
data.lisp
(in-package :sorcery-es) (defparameter *items-cells* '(amphora 0 axe 1 coatofarms 2 goldkey 3 flail 4 fleurdelys 5 goblet 6 goldenchalice 7 jewelledcrown 8 littlelyre 9 magicwand 10 moon 11 spellbag 12 spellbook 13 scroll 14 sword 15 shootingstar 16)) (defun start...
null
https://raw.githubusercontent.com/flotsfacetieux/sorcery-es/9780a31fa2b61451d294cc23775b30098fcd3b4d/data.lisp
lisp
E1 H1
(in-package :sorcery-es) (defparameter *items-cells* '(amphora 0 axe 1 coatofarms 2 goldkey 3 flail 4 fleurdelys 5 goblet 6 goldenchalice 7 jewelledcrown 8 littlelyre 9 magicwand 10 moon 11 spellbag 12 spellbook 13 scroll 14 sword 15 shootingstar 16)) (defun start...
c0b4ed02d05da1602b0e049c797f820c2d02f8450a65120ffbdf5df87b38da71
mathematical-systems/clml
circularities.lisp
-*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;; See the file LICENCE for licence information. ;; Defines a special backend type which specializes various methods ;; in plumbing.lisp to make it nice and easy to ;; resolve possible circularities in objects. ;; Most of the work is done using the res...
null
https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/addons/cl-store/circularities.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- See the file LICENCE for licence information. Defines a special backend type which specializes various methods in plumbing.lisp to make it nice and easy to resolve possible circularities in objects. Most of the work is done using the resolving-object macro which kno...
programs according to the Hyperspec(notes in EQ ) . (in-package :cl-store) (defvar *check-for-circs* t) (defstruct delay value (completed nil)) (defmacro delay (&rest body) `(make-delay :value #'(lambda () ,@body))) (defun force (delay) (unless (delay-completed delay) (setf (delay-value delay) (funca...
f4cd04800b120aebf71ee8b53100972d351592afa8e5404fc2a4e5281c607021
diffusionkinetics/open
TestSVM.hs
module Main where import Numeric.Datasets.Iris import Numeric.Datasets.OldFaithful import Fuml.Svm import Fuml.Core import Fuml.Supervised.Accuracy import Data.Function (on) import Data.Tuple import AI.SVM.Simple import Control.Arrow import Data.Random import qualified Data.Vector.Storable as V toVector = swap . fm...
null
https://raw.githubusercontent.com/diffusionkinetics/open/673d9a4a099abd9035ccc21e37d8e614a45a1901/fuml-svm/TestSVM.hs
haskell
main = testRegression main = testClassifier
module Main where import Numeric.Datasets.Iris import Numeric.Datasets.OldFaithful import Fuml.Svm import Fuml.Core import Fuml.Supervised.Accuracy import Data.Function (on) import Data.Tuple import AI.SVM.Simple import Control.Arrow import Data.Random import qualified Data.Vector.Storable as V toVector = swap . fm...
06bf2f90f790a73d73cd1b12697f93c3b65e17e072eac7127525270d77dc0d51
rafaeldelboni/nota
clj_kondo_hooks.clj
(ns com.fulcrologic.fulcro.clj-kondo-hooks (:require [clj-kondo.hooks-api :as api])) (defn defmutation [{:keys [node]}] (let [args (rest (:children node)) mutation-name (first args) ?docstring (when (string? (api/sexpr (second args))) (second args)) arg...
null
https://raw.githubusercontent.com/rafaeldelboni/nota/4ca2be956ecb0e81679ff694d0e2b7eb06424a24/.clj-kondo/com.fulcrologic/fulcro/com/fulcrologic/fulcro/clj_kondo_hooks.clj
clojure
(ns com.fulcrologic.fulcro.clj-kondo-hooks (:require [clj-kondo.hooks-api :as api])) (defn defmutation [{:keys [node]}] (let [args (rest (:children node)) mutation-name (first args) ?docstring (when (string? (api/sexpr (second args))) (second args)) arg...
b0520945573153161fe85cc917cab5ae82308e7dcb82ed781adbfa486f2e7678
haskell-tools/haskell-tools
BiDirectional.hs
# LANGUAGE PatternSynonyms # module BiDirectional where pattern X :: a -> [a] {-* PatternSynonyms *-} pattern X a = [a] {-* PatternSynonyms *-}
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/PatternSynonymsTest/BiDirectional.hs
haskell
* PatternSynonyms * * PatternSynonyms *
# LANGUAGE PatternSynonyms # module BiDirectional where
9b040db3f098366a3d79cd662a0df54a83dc8029ad9635129ecf3eb938468dab
grin-compiler/ghc-wpc-sample-programs
ModeCommon.hs
| Module : . ModeCommon Description : Common utilities used by all modes . License : : The Idris Community . Module : Idris.ModeCommon Description : Common utilities used by all modes. License : BSD3 Maintainer : The Idris Community. -} # OPTIONS_GHC -fwarn - incomplete - patterns # ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Idris/ModeCommon.hs
haskell
furthest line to read in input source files if we're in --check and not outputting anything, don't bother loading, as it gets really slow if there's lots of modules in a package (instead, reload all at the end to check for consistency only) so that they don't interfere with each other when checking return the fi...
| Module : . ModeCommon Description : Common utilities used by all modes . License : : The Idris Community . Module : Idris.ModeCommon Description : Common utilities used by all modes. License : BSD3 Maintainer : The Idris Community. -} # OPTIONS_GHC -fwarn - incomplete - patterns # ...
bd34b6af6dfc24a010a5773c4d66d83c0e8cfffe332802483c6d180232597237
ocaml-multicore/lockfree
mpmc_relaxed_queue.ml
# General idea It is the easiest to explain the general idea on an array of infinite size . Let 's start with that . Each element in such an array constitutes a single - use exchange slot . Enqueuer increments [ tail ] and treats prior value as index of its slot . Same for dequeuer and [ head ] ....
null
https://raw.githubusercontent.com/ocaml-multicore/lockfree/9d5ef7f434b66e09b023a289641edfc2dfd742e8/src/mpmc_relaxed_queue.ml
ocaml
[spin_threshold] Number of times on spin on a slot before trying an exit strategy. spin for a bit define clean up function succedded to push rolled back tail pushed forward head retry if succeeded return true otherwise clean up spin for a bit define clean up function dequeued an item, return it r...
# General idea It is the easiest to explain the general idea on an array of infinite size . Let 's start with that . Each element in such an array constitutes a single - use exchange slot . Enqueuer increments [ tail ] and treats prior value as index of its slot . Same for dequeuer and [ head ] ....
b2fd6cc0b303685353cf2f45a46b5ec00b1b47723504088baa4a6312668fa6df
LightTable/LightTable
workspace.cljs
(ns lt.objs.sidebar.workspace "Provide sidebar for managing workspaces and files within a workspace" (:require [lt.object :as object] [lt.objs.command :as cmd] [lt.objs.context :as ctx] [lt.objs.files :as files] [lt.objs.workspace :as workspace] [lt.objs.o...
null
https://raw.githubusercontent.com/LightTable/LightTable/3b36b7bbf3737e1fdace5beb72b92f2d5fbe01e7/src/lt/objs/sidebar/workspace.cljs
clojure
(dom/trigger (input) :click)
(ns lt.objs.sidebar.workspace "Provide sidebar for managing workspaces and files within a workspace" (:require [lt.object :as object] [lt.objs.command :as cmd] [lt.objs.context :as ctx] [lt.objs.files :as files] [lt.objs.workspace :as workspace] [lt.objs.o...
67acabea13086cebf896b66d63c68c6b75c0af49dac18eac52dcd4e44acd041b
7theta/re-frame-via
user.clj
;; Copyright (c) 7theta. All rights reserved. ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-v10.html) ;; which can be found in the LICENSE file at the root of this ;; distribution. ;; ;; By using this software in any fashion, you are agreeing to be bo...
null
https://raw.githubusercontent.com/7theta/re-frame-via/ae530337eff4098991e937d6e06aa413d8ad7b45/example/dev/clj/user.clj
clojure
Copyright (c) 7theta. All rights reserved. The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-v10.html) which can be found in the LICENSE file at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the ...
(ns user) (defn dev "Load and switch to the 'dev' namespace." [] (require 'dev :reload) (in-ns 'dev))
98318d50676aedf6f37dd1ae5c8db4a08e5c2e46eba669496db0b0c8b78d89d0
Clozure/ccl-tests
copy-readtable.lsp
;-*- Mode: Lisp -*- Author : Created : Fri Dec 31 07:15:35 2004 ;;;; Contains: Tests of COPY-READTABLE (in-package :cl-test) (deftest copy-readtable.1 (notnot-mv (typep (copy-readtable) 'readtable)) t) (deftest copy-readtable.2 (notnot-mv (typep (copy-readtable *readtable*) 'readtable)) t) (d...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/copy-readtable.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests of COPY-READTABLE Error tests
Author : Created : Fri Dec 31 07:15:35 2004 (in-package :cl-test) (deftest copy-readtable.1 (notnot-mv (typep (copy-readtable) 'readtable)) t) (deftest copy-readtable.2 (notnot-mv (typep (copy-readtable *readtable*) 'readtable)) t) (deftest copy-readtable.3 (notnot-mv (typep (copy-readtable *re...
4d2a9d8265d204718839097c9bcdf4c7ced50192f0c0df0d58edb0be174914d6
racket/old-plt
reorder-tests.scm
;; This library is used by match.ss ;; This requires the test data structure. (module reorder-tests mzscheme (provide reorder-all-lists) (require "test-structure.scm") (require-for-template mzscheme "test-structure.scm") ;; There really ought to be a stable sort in the std li...
null
https://raw.githubusercontent.com/racket/old-plt/a580d75deae2a0d2f3d8a93bc3c4f8f1f619b5b7/collects/mzlib/private/reorder-tests.scm
scheme
This library is used by match.ss This requires the test data structure. There really ought to be a stable sort in the std library. !(function insertion-sort (form (insertion-sort ls less-than?) -> list) (contract (list (any any -> bool) -> list))) This is the classic stable sort. Any stable sor...
(module reorder-tests mzscheme (provide reorder-all-lists) (require "test-structure.scm") (require-for-template mzscheme "test-structure.scm") (define insertion-sort (lambda (ls less-than?) (define (insert el ls) (define (ins ls) (cond ((null? ...
5e53a53a0608270d70ff49ac006442680bb675700b719c61b4252a4f468273f0
rbkmoney/cds
cds_storage_ets.erl
-module(cds_storage_ets). -behaviour(cds_storage). -behaviour(gen_server). %% cds_storage behaviour -export([start/1]). -export([put/5]). -export([get/2]). -export([update/5]). -export([delete/2]). -export([search_by_index_value/5]). -export([search_by_index_range/6]). -export([get_keys/3]). %% gen_server behaviour ...
null
https://raw.githubusercontent.com/rbkmoney/cds/7daa88e44a95de6ba0404ff492344d73fae64a95/apps/cds/src/cds_storage_ets.erl
erlang
cds_storage behaviour gen_server behaviour cds_storage behaviour gen_server behaviour
-module(cds_storage_ets). -behaviour(cds_storage). -behaviour(gen_server). -export([start/1]). -export([put/5]). -export([get/2]). -export([update/5]). -export([delete/2]). -export([search_by_index_value/5]). -export([search_by_index_range/6]). -export([get_keys/3]). -export([init/1]). -export([handle_call/3]). -exp...
e9d902d9d8898ac670e2e292927d2de8614ed31e426de3f3dce90a253215051a
typelead/intellij-eta
Layout00018.hs
module Layout00018 where getDB :: [String] getDB = return dirs where local = do maybe (return []) f (maybeHasLibs flatten) # NOINLINE getDB # f :: String f = "Hello"
null
https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/test/resources/fixtures/eta/sources/Layout00018.hs
haskell
module Layout00018 where getDB :: [String] getDB = return dirs where local = do maybe (return []) f (maybeHasLibs flatten) # NOINLINE getDB # f :: String f = "Hello"
576a239fdd0d33e6c0d9bcf77732d79ebb8cba0112cd294a0ab53fe9e7e9cd96
camllight/camllight
main.ml
(* The Caml Light compiler. Command-line parsing. *) #open "config";; #open "misc";; #open "modules";; #open "compiler";; let anonymous s = if filename__check_suffix s ".ml" then let filename = filename__chop_suffix s ".ml" in compile_implementation (filename__basename filename) filename ".ml" else if fil...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/src/compiler/main.ml
ocaml
The Caml Light compiler. Command-line parsing. profiler temp files
#open "config";; #open "misc";; #open "modules";; #open "compiler";; let anonymous s = if filename__check_suffix s ".ml" then let filename = filename__chop_suffix s ".ml" in compile_implementation (filename__basename filename) filename ".ml" let filename = filename__chop_suffix s ".mlt" in compile_i...
791021ae4b1474eb0f18a38574b25f0993bbf0e58862350cb0a1c290774fe7dc
sudo-rushil/lambda
Repl.hs
| Module : Control . Repl Description : Repl functionality for lambda License : MIT Maintainer : Module : Control.Repl Description : Repl functionality for lambda License : MIT Maintainer : Rushil Mallarapu -} {-# LANGUAGE OverloadedStrings #-} module Control.Repl ( repl ...
null
https://raw.githubusercontent.com/sudo-rushil/lambda/70474f5053540a693be2f317062074417a687ff7/src/Control/Repl.hs
haskell
# LANGUAGE OverloadedStrings # debug flag process threaded bindings
| Module : Control . Repl Description : Repl functionality for lambda License : MIT Maintainer : Module : Control.Repl Description : Repl functionality for lambda License : MIT Maintainer : Rushil Mallarapu -} module Control.Repl ( repl ) where import Control....
1356e0a87f14a7de02fa84f4d72b6924544a4f8dfc8cf986f0da0719cf03b93f
heroku/sdiff
model_client.erl
-module(model_client). -define(MAGIC_KEY, <<"$$ THIS IS SPECIAL $$">>). -export([start/0, write/2, ready/0, delete/1, sync_diff/0, wait_connected/0]). start() -> {ok, {Mod, Config}} = application:get_env(sdiff, config), sdiff_client:start_link({local,client}, fun({write, K,...
null
https://raw.githubusercontent.com/heroku/sdiff/15e3fb2974919b7349387288a89881c2850f3073/test/model_client.erl
erlang
manual insert manual delete To make model checking easier, we work with the assumption that sync_diff forces a state convergence. Otherwise it is very difficult to know when prior operations will have finished when the model is synchronous but the system asynchronous (except for
-module(model_client). -define(MAGIC_KEY, <<"$$ THIS IS SPECIAL $$">>). -export([start/0, write/2, ready/0, delete/1, sync_diff/0, wait_connected/0]). start() -> {ok, {Mod, Config}} = application:get_env(sdiff, config), sdiff_client:start_link({local,client}, fun({write, K,...
e71f68536f30b5a46926c3ddd9048e21ae6f1ddded5bcbcd8e219ae1ba401360
cnuernber/dtype-next
native_buffer_mmodel_jdk19.clj
(ns tech.v3.datatype.ffi.native-buffer-mmodel-jdk19 (:require [tech.v3.datatype.protocols :as dtype-proto] [tech.v3.datatype.errors :as errors] [tech.v3.datatype.native-buffer :as native-buffer] [tech.v3.datatype.casting :as casting]) (:import [java.lang.foreign MemorySegment Mem...
null
https://raw.githubusercontent.com/cnuernber/dtype-next/71477752fc376fad4b678fa9607ef54a40b2b1ff/src/tech/v3/datatype/ffi/native_buffer_mmodel_jdk19.clj
clojure
(ns tech.v3.datatype.ffi.native-buffer-mmodel-jdk19 (:require [tech.v3.datatype.protocols :as dtype-proto] [tech.v3.datatype.errors :as errors] [tech.v3.datatype.native-buffer :as native-buffer] [tech.v3.datatype.casting :as casting]) (:import [java.lang.foreign MemorySegment Mem...
b62c91392050dc3921708d1962472ac573988c8910ec48e3468493e34d73b9b0
hiredman/clojurebot
shutup.clj
(ns hiredman.clojurebot.shutup (:use (hiredman.clojurebot core)) (:import (java.util.concurrent TimeUnit))) (def mute (ref {})) (defn muted? [channel] (@mute channel)) (defmethod responder ::mute [bot msg] (when (not (muted? (:channel msg))) #(responder bot (assoc msg ::ignore true)))) (add-dispatch...
null
https://raw.githubusercontent.com/hiredman/clojurebot/1e8bde92f2dd45bb7928d4db17de8ec48557ead1/src/hiredman/clojurebot/shutup.clj
clojure
(ns hiredman.clojurebot.shutup (:use (hiredman.clojurebot core)) (:import (java.util.concurrent TimeUnit))) (def mute (ref {})) (defn muted? [channel] (@mute channel)) (defmethod responder ::mute [bot msg] (when (not (muted? (:channel msg))) #(responder bot (assoc msg ::ignore true)))) (add-dispatch...
552780540bb28740f70bdd750523ffa6902cc6e52dd998169d1eeb35f3236b68
GaloisInc/lustre
ModelState.hs
module Language.Lustre.ModelState ( -- * Locations and Navigation Loc, locTop, ModelInfo, locCalls, enterCall, exitCall, locName, -- * Call sites CallSiteId, callSiteName, -- * Accessing Variables S, Vars(..), lookupVars, locVars, -- * Names CoreValue, SourceValue, ) where import Data...
null
https://raw.githubusercontent.com/GaloisInc/lustre/685a47d9ce5f95da18dbba817672c0fd27f219f8/Language/Lustre/ModelState.hs
haskell
* Locations and Navigation * Call sites * Accessing Variables * Names | A state for a core lustre program. ^ Value for a core expression ------------------------------------------------------------------------------ | A 'Loc' is an instantiation of a function with specific arguments. It helps is traverse the ca...
module Language.Lustre.ModelState Loc, locTop, ModelInfo, locCalls, enterCall, exitCall, locName, CallSiteId, callSiteName, S, Vars(..), lookupVars, locVars, CoreValue, SourceValue, ) where import Data.Map (Map) import qualified Data.Map as Map import Language.Lustre.Name import qualified Language...
bfc387013b9ba7308fac95638b14e33820a017fe735b6207e2a473402e66c1df
golems/motion-grammar-kit
make-core.lisp
;;;; -*- Lisp -*- ;;;; Copyright ( c ) 2012 , Georgia Tech Research Corporation ;;;; All rights reserved. ;;;; Author(s ): < > Georgia Tech Humanoid Robotics Lab Under Direction of Prof. ;;;; ;;;; This file is provided under the following "BSD-style" License: ;;;; ;;;; Redistribution and use in source a...
null
https://raw.githubusercontent.com/golems/motion-grammar-kit/42e8e19e25c4333f76cba4b3c4e589b24f98d660/scripts/make-core.lisp
lisp
-*- Lisp -*- All rights reserved. This file is provided under the following "BSD-style" License: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above c...
Copyright ( c ) 2012 , Georgia Tech Research Corporation Author(s ): < > Georgia Tech Humanoid Robotics Lab Under Direction of Prof. CONTRIBUTORS " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMA...
c770993f7afa5ed274955368921cbbb4061e36fa0f24dc35128f5c691ecf06fb
cachix/elm2nix
FixedOutput.hs
{-# LANGUAGE OverloadedStrings #-} module Elm2Nix.FixedOutput ( FixedDerivation(..) , prefetch ) where import System.Exit import System.Process import qualified Data.ByteString.Lazy.Char8 as BS -- fixed output derivation metadata data FixedDerivation = FixedDerivation { drvHash :: String -- ^ Computed sha256...
null
https://raw.githubusercontent.com/cachix/elm2nix/e4df54baf154d6474553cc2af9f31c353bb37f53/src/Elm2Nix/FixedOutput.hs
haskell
# LANGUAGE OverloadedStrings # fixed output derivation metadata ^ Computed sha256 hash ^ Nix store path of the derivation ^ URL to the tarball | Use nix-prefetch-url to obtain resulting path and it's hash | Partially taken from cabal2nix/src/Distribution/Nixpkgs/Fetch.hs
module Elm2Nix.FixedOutput ( FixedDerivation(..) , prefetch ) where import System.Exit import System.Process import qualified Data.ByteString.Lazy.Char8 as BS data FixedDerivation = FixedDerivation , drvName :: String , drvVersion :: String } deriving (Show, Eq) prefetch :: String -> String -> IO FixedD...
3e7358addc37d14692f2bc2ee63d30c4919f61f0b81bfc9276e87ceca1aa5ed9
nedap/formatting-stack
integrant.clj
(ns functional.formatting-stack.integrant (:require [clojure.test :refer [deftest is testing]] [formatting-stack.integrant :as sut] [formatting-stack.reporters.passthrough :as reporters.passthrough] [integrant.core :as integrant] [nedap.utils.spec.api :refer [check!]])) (def sample-report {:source ...
null
https://raw.githubusercontent.com/nedap/formatting-stack/c43e74d5409e9338f208457bb8928ce437381a3f/test/functional/formatting_stack/integrant.clj
clojure
pass an empty stack (except for the `proof`), so that no side-effects will be triggered (would muddy the test suite):
(ns functional.formatting-stack.integrant (:require [clojure.test :refer [deftest is testing]] [formatting-stack.integrant :as sut] [formatting-stack.reporters.passthrough :as reporters.passthrough] [integrant.core :as integrant] [nedap.utils.spec.api :refer [check!]])) (def sample-report {:source ...
c11cc3c86d9c216fd86a8e02e457d12f54c14c5caa388b9c03e7d365026c15de
thepower/tpnode
tpnode_ws.erl
-module(tpnode_ws). -include("include/tplog.hrl"). -export([init/2]). -export([ websocket_init/1, websocket_handle/2, websocket_info/2 ]). init(Req, _Opts) -> ?LOG_DEBUG("WS Upgrade req ~p",[Req]), case Req of #{headers:=#{<<"sec-websocket-protocol">> := <<"thepower-nodesync-v1">>}=H}...
null
https://raw.githubusercontent.com/thepower/tpnode/6212422bc9061d44d150ef2d777d6e694396ed15/apps/tpnode/src/tpnode_ws.erl
erlang
-module(tpnode_ws). -include("include/tplog.hrl"). -export([init/2]). -export([ websocket_init/1, websocket_handle/2, websocket_info/2 ]). init(Req, _Opts) -> ?LOG_DEBUG("WS Upgrade req ~p",[Req]), case Req of #{headers:=#{<<"sec-websocket-protocol">> := <<"thepower-nodesync-v1">>}=H}...
9b3704b7ab1f41abc026d5950061d451bb4fa02e5820284d790377d787a4a31b
SamirTalwar/smoke
Shell.hs
module Test.Smoke.Shell where import Control.Monad.Trans.Except (ExceptT) import Test.Smoke.Paths import Test.Smoke.Types defaultShellScriptName :: String defaultShellScriptName = "smoke.sh" defaultShell :: ExceptT PathError IO Shell defaultShell = do sh <- findExecutable $ parseFile "sh" pure $ Shell sh mempty
null
https://raw.githubusercontent.com/SamirTalwar/smoke/5b71bb39dea9db9e74fb1f9957ded51307572a73/src/lib/unix/Test/Smoke/Shell.hs
haskell
module Test.Smoke.Shell where import Control.Monad.Trans.Except (ExceptT) import Test.Smoke.Paths import Test.Smoke.Types defaultShellScriptName :: String defaultShellScriptName = "smoke.sh" defaultShell :: ExceptT PathError IO Shell defaultShell = do sh <- findExecutable $ parseFile "sh" pure $ Shell sh mempty
1b39f0328b517da3a173ee79d6107959bea5891831f197036358e7446f8acf9f
dinosaure/contruno
contruno.mli
module Certificate : sig type certchain = Tls.Config.certchain type own_cert = [ `Multiple of certchain list | `Multiple_default of certchain * certchain list | `Single of certchain ] type t = { own_cert : own_cert ; ip : Ipaddr.t ; port : int ; alpn : alpn list } an...
null
https://raw.githubusercontent.com/dinosaure/contruno/7e6ce1fbe23ddc47911690277eec6c0ef9c09627/lib/contruno.mli
ocaml
module Certificate : sig type certchain = Tls.Config.certchain type own_cert = [ `Multiple of certchain list | `Multiple_default of certchain * certchain list | `Single of certchain ] type t = { own_cert : own_cert ; ip : Ipaddr.t ; port : int ; alpn : alpn list } an...
7d5acb6c7e68033c6b66215b297a68bce5222b409e166f448328257b6f7ce57f
Otann/morse
polling.clj
(ns morse.polling "Declares long-polling routines to communicate with Telegram Bot API" (:require [clojure.tools.logging :as log] [clojure.core.async :as a :refer [chan go go-loop thread >!! >! <! close! alts!]] [morse.api :as api])) (defn new-offset "Re...
null
https://raw.githubusercontent.com/Otann/morse/bbb2efc6a8eb17603a56121fbe10e1592ce5d8ee/src/morse/polling.clj
clojure
fix for JDK bug -8075484 running got closed by the user
(ns morse.polling "Declares long-polling routines to communicate with Telegram Bot API" (:require [clojure.tools.logging :as log] [clojure.core.async :as a :refer [chan go go-loop thread >!! >! <! close! alts!]] [morse.api :as api])) (defn new-offset "Re...
bb4cc15ae1720f5bfb3eaa769ef29d18d802f59449ccc238c9ec7adf15979b21
rd--/hsc3
clearSched.help.hs
Sound.Sc3.Lang.Help.viewServerHelp "/clearSched"
null
https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Server/clearSched.help.hs
haskell
Sound.Sc3.Lang.Help.viewServerHelp "/clearSched"
99fc6d29f22e5547af2de49b7eb95be40ad76489cb903f5fc2248997bbda18e7
cognitect-labs/vase
project.clj
Copyright 2017 Cognitect , Inc. ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( ) ; which can be found in the file epl-v10.html at the root of this distribution. ; ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this licens...
null
https://raw.githubusercontent.com/cognitect-labs/vase/d882bc8f28e8af2077b55c80e069aa2238f646b7/template/project.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright 2017 Cognitect , Inc. Eclipse Public License 1.0 ( ) (defproject vase/lein-template "0.9.3-SNAPSHOT" :description "A Pedestal Service + Vase template." :url "" :scm "" :license {:name "Eclipse Public License" :url "-v10.html"} :min-lein-version "2.0.0" :eval-in-leiningen true ...
7e0ea2413b6359083538852f09c586b31998a765e56ac9f0c19af3edde13f929
dparis/gen-phzr
poly_k.cljs
(ns phzr.pixi.poly-k (:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]] [phzr.impl.extend :as ex] [cljsjs.phaser])) (defn triangulate "Triangulates shapes for webGL graphic fills." ([poly-k] (phaser->clj (.Triangulate poly-k))))
null
https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/pixi/poly_k.cljs
clojure
(ns phzr.pixi.poly-k (:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]] [phzr.impl.extend :as ex] [cljsjs.phaser])) (defn triangulate "Triangulates shapes for webGL graphic fills." ([poly-k] (phaser->clj (.Triangulate poly-k))))
76d2bf1422f0fdcb1aec7bc44618eee701f739d321a8d94f32aafdb246153275
fragnix/fragnix
System.PosixCompat.Temp.hs
# LANGUAGE Haskell98 # # LINE 1 " src / System / PosixCompat / Temp.hs " # # LANGUAGE CPP # # LANGUAGE ForeignFunctionInterface # | This module makes the operations exported by . . Temp@ available on all platforms . On POSIX systems it re - exports operations from...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/System.PosixCompat.Temp.hs
haskell
Re-export unix package
# LANGUAGE Haskell98 # # LINE 1 " src / System / PosixCompat / Temp.hs " # # LANGUAGE CPP # # LANGUAGE ForeignFunctionInterface # | This module makes the operations exported by . . Temp@ available on all platforms . On POSIX systems it re - exports operations from...
38013690b7a9e56935f916ec226e13ed4db48724586fddefd2d132a73d93e619
zshipko/ocaml-py
py_test.ml
open Py let py_test_int t = Test.check t "Python int to OCaml int" (fun () -> !$(Int 99999) |> Object.to_int) 99999; Test.check t "Python int to OCaml string" (fun () -> !$(Int 123) |> Object.to_string) "123" let py_test_string t = Test.check t "Python string to OCaml string" (fun () -> !$(String "testing...
null
https://raw.githubusercontent.com/zshipko/ocaml-py/c6c94d8fea0c69e34cb89df52f63ae86be837a45/test/py_test.ml
ocaml
Notice b was set twice Python runtime errors are converted to ocaml exceptions. Wrapping with an incorrect type will result in a runtime error. The numpy array and the bigarray share memory so modifying the bigarray also changes the numpy array.
open Py let py_test_int t = Test.check t "Python int to OCaml int" (fun () -> !$(Int 99999) |> Object.to_int) 99999; Test.check t "Python int to OCaml string" (fun () -> !$(Int 123) |> Object.to_string) "123" let py_test_string t = Test.check t "Python string to OCaml string" (fun () -> !$(String "testing...
9a8cfb547df1d3da55a2ef7ccc9401ea6d735b8f022a89acff77e3b73602a43e
WorksHub/client
subs.cljs
(ns wh.admin.create-offer.subs (:require [cljs.spec.alpha :as s] [clojure.set :refer [rename-keys]] [goog.string :as gstring] [goog.string.format] [re-frame.core :refer [reg-sub]] [wh.admin.create-offer.db :as create-offer] [wh.common.data :as data] [wh.common.specs.primitives :as p] ...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/admin/create_offer/subs.cljs
clojure
(ns wh.admin.create-offer.subs (:require [cljs.spec.alpha :as s] [clojure.set :refer [rename-keys]] [goog.string :as gstring] [goog.string.format] [re-frame.core :refer [reg-sub]] [wh.admin.create-offer.db :as create-offer] [wh.common.data :as data] [wh.common.specs.primitives :as p] ...
c883c1841a1e7cbe55caddb1695b8757fc8a52b774c89e53d1e00154b98ad3a4
Jell/euroclojure-2016
cool_things.cljs
(ns euroclojure.cool-things (:require [euroclojure.demo :as demo])) (defn slide [{:keys [speaker]}] [:div.slide.left [:h1.centered "Cool things"] [:ul [:li "Upload whole app state on exceptions"] [:li "REPL-driven tests"] [:li "Time-travelling debugger (" demo/link ")"]]])
null
https://raw.githubusercontent.com/Jell/euroclojure-2016/a8ca883e8480a4616ede19995aaacd4a495608af/src/euroclojure/cool_things.cljs
clojure
(ns euroclojure.cool-things (:require [euroclojure.demo :as demo])) (defn slide [{:keys [speaker]}] [:div.slide.left [:h1.centered "Cool things"] [:ul [:li "Upload whole app state on exceptions"] [:li "REPL-driven tests"] [:li "Time-travelling debugger (" demo/link ")"]]])
428aeb9c144440dbdafc9877be5442d5671e1c751a4cd57f8a6efd61f40b9f29
mars0i/free
arithmetic.cljc
This software is copyright 2016 by , and is distributed under the Gnu General Public License version 3.0 as specified in the ;; the file LICENSE. ;; matrix arithmetic macros ;; there's another free.arithmetic with scalar operations Note that for Clojurescript , this is a macro namespace , which means that it ...
null
https://raw.githubusercontent.com/mars0i/free/fe0fdc1c0bf1866cb07b4558a009a829f8d6ba23/src/cljc/matrix/free/arithmetic.cljc
clojure
the file LICENSE. matrix arithmetic macros there's another free.arithmetic with scalar operations except to prevent something from happening during Clojurescript pre-compilation. to require core.matrix, since the macros below will expand into functions containing NEEDED? Since this is a macro file, and therefor...
This software is copyright 2016 by , and is distributed under the Gnu General Public License version 3.0 as specified in the Note that for Clojurescript , this is a macro namespace , which means that it only runs in Clojure , before Clojurescript compilation . So there 's no reason to use any reader macro...
55457a4151a9086d219dfb26d610314e8d51b8c8217c4d145d5bf47337a9111f
kadena-io/digraph
FloydWarshall.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE ExplicitNamespaces # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # -- | -- Module: Data.DiGraph.FloydWarshall Copyright : Copyright © 2018 - 2021 Kadena LLC . License : MIT ...
null
https://raw.githubusercontent.com/kadena-io/digraph/c31c35d0270b8da16815cb7e6f5a09e3fc012bd8/src/Data/DiGraph/FloydWarshall.hs
haskell
# LANGUAGE BangPatterns # | Module: Data.DiGraph.FloydWarshall Stability: experimental * Graph Representations * Conversions * FloydWarshall Algorithm * Legacy exports -------------------------------------------------------------------------- -- Graph Representations | Adjacency matrix representation of a d...
# LANGUAGE CPP # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE ExplicitNamespaces # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # Copyright : Copyright © 2018 - 2021 Kadena LLC . License : MIT Maintainer : < > TODO module Data.DiGraph.FloydWarshall ( DenseAd...
4a6bac4888f82a9d9f50e61800c59e856247a9f02ff177ac1de019afec0b2506
OCamlPro/drom
min.ml
let key = Types.Table.Key.of_string let of_key_values = Types.Table.of_key_values
null
https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/toml.7.1.0/min.ml
ocaml
let key = Types.Table.Key.of_string let of_key_values = Types.Table.of_key_values
e3a0079eb96cd3442c453be6da40721216ac7cb5df3da8ff8c9eb0aaf78a9492
timmolderez/inspector-jay
tree_model.clj
Copyright ( c ) 2013 - 2015 . ; ; All rights reserved. This program and the accompanying materials ; are made available under the terms of the 3-Clause BSD License ; which accompanies this distribution, and is available at ; -3-Clause (ns inspector-jay.model.tree-model "Defines the tree model of the object inspe...
null
https://raw.githubusercontent.com/timmolderez/inspector-jay/0035beae482c49e0f215a54e17baf405e42f2398/src/inspector_jay/model/tree_model.clj
clojure
All rights reserved. This program and the accompanying materials are made available under the terms of the 3-Clause BSD License which accompanies this distribution, and is available at -3-Clause if the index does not go beyond the number of methods , we 're retrieving a method Otherwise, we must be retrieving a ...
Copyright ( c ) 2013 - 2015 . (ns inspector-jay.model.tree-model "Defines the tree model of the object inspector" {:author "Tim Molderez"} (:require [inspector-jay.model.tree-node :as node]) (:import [java.util Collection Map RandomAccess] [javax.swing.tree TreeModel] [javax.swing.event ...
b3532b3cab4bbf35b1da4999ca1d56351ce969b6664cb17ec2514ccc87d03b57
alesaccoia/festival_flinger
cmu_us_aup_cg.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Carnegie Mellon University ; ; ; Copyright ( c ) 1998 - 2011 ; ; ; ...
null
https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_aup_cg/festvox/cmu_us_aup_cg.scm
scheme
;;; ; ; ; ; ; ; ;;; Permission is hereby granted, free of charge, to use and distribute ;;; this software and its documentation without restriction, including ;;; without lim...
(if (assoc 'cmu_us_aup_cg voice-locations) (defvar cmu_us_aup::dir (cdr (assoc 'cmu_us_aup_cg voice-locations))) (defvar cmu_us_aup::dir (string-append (pwd) "/"))) (if (not (probe_file (path-append cmu_us_aup::dir "festvox/"))) (begin (format stderr "cmu_us_aup::clustergen: Can't find voice s...
28910114805a998442bda5de06865b3141a7fe9d6cc26c626a5f8e7bc2f181a6
kawasima/darzana
api.clj
(ns darzana.command.api "The commands for calling APIs." (:require [clojure.pprint :refer :all] [clojure.core.async :as async] [darzana.context :as context] [darzana.api-spec :as api-spec] [darzana.http-client :as http-client] [darzana.module.jcache :as jc...
null
https://raw.githubusercontent.com/kawasima/darzana/4b37c8556f74219b707d23cb2d6dce70509a0c1b/src/darzana/command/api.clj
clojure
(ns darzana.command.api "The commands for calling APIs." (:require [clojure.pprint :refer :all] [clojure.core.async :as async] [darzana.context :as context] [darzana.api-spec :as api-spec] [darzana.http-client :as http-client] [darzana.module.jcache :as jc...
23ff2a944ef5c0b7ef0a0dd3f223a74acdda3c0b1736e1178aed613ab5aa587f
trptcolin/reply
jline_input_reader_spec.clj
(ns reply.reader.jline.jline-input-reader-spec (:use [speclj.core]) (:import [reply.reader.jline JlineInputReader])) (defprotocol LineReader (readLine [_])) (defrecord FakeJlineReader [f] LineReader (readLine [this] (f))) (defn fake-reader ([input-fn] (fake-reader input-fn #())) ([input-fn set-empty-pr...
null
https://raw.githubusercontent.com/trptcolin/reply/f0c730e7a6753494f9f90f02234bc040318da393/spec/reply/reader/jline/jline_input_reader_spec.clj
clojure
(ns reply.reader.jline.jline-input-reader-spec (:use [speclj.core]) (:import [reply.reader.jline JlineInputReader])) (defprotocol LineReader (readLine [_])) (defrecord FakeJlineReader [f] LineReader (readLine [this] (f))) (defn fake-reader ([input-fn] (fake-reader input-fn #())) ([input-fn set-empty-pr...
01b1f8807839f7c7b360de2b06cc0975eee93d0585597cfc48b2d3988340bdb9
namin/relational-virology
virus.scm
(load "load.scm") ;; [[Q]] = Q (run 1 (q) (evalo q q)) ;; [[(Q-fun X)]] = (Q-fun X) // for all X but a few ;; [[(Q-fun 'backdoor)]] = (Q-fun' a) // changing Q-fun instead of reproducing it ;; [[(Q-fun' X)]] = (Q-fun' b) // Q-fun' perpetuates, behavior to be decided flexibly (run 1 (q-fun) (absento 'x q-fun) (fr...
null
https://raw.githubusercontent.com/namin/relational-virology/1cb2493d5beea1c21edf783fbca387ce38190a72/virus.scm
scheme
[[Q]] = Q [[(Q-fun X)]] = (Q-fun X) // for all X but a few [[(Q-fun 'backdoor)]] = (Q-fun' a) // changing Q-fun instead of reproducing it [[(Q-fun' X)]] = (Q-fun' b) // Q-fun' perpetuates, behavior to be decided flexibly more hints this is it! The axioms of virus life the host can reproduce itself virus cannot...
(load "load.scm") (run 1 (q) (evalo q q)) (run 1 (q-fun) (absento 'x q-fun) (fresh (e) (== q-fun `(lambda (arg) ,e))) (evalo `(,q-fun 'x) `(,q-fun x))) (run 1 (q-fun) (absento 'x q-fun) (fresh (e) (== q-fun `(lambda (arg) ((lambda (in) ,e) ',e)))) (evalo `(,q-fun 'x) `(,q-fun x))) (run 1 (q-fu...
037d1c5a7bc510eb6075fe92c19f8b2279b32db2b944fc78f6ee1f85ccedb170
vehicle-lang/vehicle
Type.hs
module Vehicle.Compile.Type.Subsystem.Standard.Type ( typeStandardBuiltin, handleStandardTypingError, relevanceOfTypeClass, typeOfTypeClassOp, ) where import Control.Monad.Except (MonadError (..)) import Data.Monoid (Endo (..), appEndo) import Data.Text (pack) import Vehicle.Compile.Error (CompileError...
null
https://raw.githubusercontent.com/vehicle-lang/vehicle/3a3548f9b48c3969212ccb51e954d4d4556ea815/vehicle/src/Vehicle/Compile/Type/Subsystem/Standard/Type.hs
haskell
| Return the type of the provided builtin. Arithmetic operations Comparisons Conversion functions
module Vehicle.Compile.Type.Subsystem.Standard.Type ( typeStandardBuiltin, handleStandardTypingError, relevanceOfTypeClass, typeOfTypeClassOp, ) where import Control.Monad.Except (MonadError (..)) import Data.Monoid (Endo (..), appEndo) import Data.Text (pack) import Vehicle.Compile.Error (CompileError...
a825431d6308829a341565455d9bdcb8c302d166f9d5990f8a80d208a48104cc
ibabushkin/hapstone
Test2.hs
| Description : MIPS Example using Hapstone Copyright : ( c ) , 2017 License : : < > Stability : experimental This is example code that shows how to use the Hapstone bindings , based on a MIPS example provided with the python bindings to Capstone . For more information , see -engine....
null
https://raw.githubusercontent.com/ibabushkin/hapstone/4ac11f0a1e23e5a0f23351149c70bd541ddf5344/examples/Test2.hs
haskell
^ buffer to disassemble, as [Word8] ^ number of instructions to disassemble (0 for maximum) ^ include detailed information? True/False ^ setup SKIPDATA options, as Maybe CsSkipdataStruct ^ action to run on each instruction, a function with signature Csh -> CsInsn -> IO a; default is defaultAction
| Description : MIPS Example using Hapstone Copyright : ( c ) , 2017 License : : < > Stability : experimental This is example code that shows how to use the Hapstone bindings , based on a MIPS example provided with the python bindings to Capstone . For more information , see -engine....
95d1029f7609701cbe5317a2caae5656cf6a120d65e4f6d0f921c3a83a1682bc
typedclojure/typedclojure
instant.clj
(ns clojure.core.typed.test.instant (:require [typed.clojure :as t] [clojure.test :refer :all] [typed.clj.checker.test-utils :refer :all])) (deftest read-instant-date-test (is-tc-e (read-instant-date "2014-04-23T10:13Z") java.util.Date :requires [[clojure.instant...
null
https://raw.githubusercontent.com/typedclojure/typedclojure/5fd7cdf7941c6e7d1dd5df88bf44474fa35e1fca/typed/clj.checker/test/clojure/core/typed/test/instant.clj
clojure
(ns clojure.core.typed.test.instant (:require [typed.clojure :as t] [clojure.test :refer :all] [typed.clj.checker.test-utils :refer :all])) (deftest read-instant-date-test (is-tc-e (read-instant-date "2014-04-23T10:13Z") java.util.Date :requires [[clojure.instant...
c0b3011b0db50754acf91c8ab9cb618064a265280de080aec9c694cbf8fe0625
silverpond/hat
descriptions.clj
(ns hat.descriptions) (defn generate-description [{:keys [singular-name singular-titlecase plural-name plural-titlecase fields conn db-search-attr]}] {;Singular resource :singular-class singular-name :delete-action-name (str "de...
null
https://raw.githubusercontent.com/silverpond/hat/4e4a5dd89cac29c0a0cf68e4f02b76523e096276/src/hat/descriptions.clj
clojure
Singular resource Collection resource Entity Shared Routes Index
(ns hat.descriptions) (defn generate-description [{:keys [singular-name singular-titlecase plural-name plural-titlecase fields conn db-search-attr]}] :singular-class singular-name :delete-action-name (str "delete-" singular-name) ...