_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
aebd0f732bdd326829c9e48ef087895258a1819e26842f691bc2bc1ce417243c
camlp5/camlp5
argl.ml
(* camlp5r *) (* argl.ml,v *) open Printf; open Versdep; value action_arg s sl = fun [ Arg.Set r -> if s = "" then do { r.val := True; Some sl } else None | Arg.Clear r -> if s = "" then do { r.val := False; Some sl } else None | Arg.String f -> if s = "" then match sl with [ [s :: sl] -...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/main/argl.ml
ocaml
camlp5r argl.ml,v
open Printf; open Versdep; value action_arg s sl = fun [ Arg.Set r -> if s = "" then do { r.val := True; Some sl } else None | Arg.Clear r -> if s = "" then do { r.val := False; Some sl } else None | Arg.String f -> if s = "" then match sl with [ [s :: sl] -> do { f s; Some sl } ...
8aff99d706ecef54b2d533c867b8ba60e65d9147b4701f2e91b15fec89fe39c1
mrkkrp/text-metrics
Main.hs
module Main (main) where import Control.DeepSeq import Criterion.Main import Data.Text (Text) import qualified Data.Text as T import Data.Text.Metrics main :: IO () main = defaultMain [ btmetric "levenshtein" levenshtein, btmetric "levenshteinNorm" levenshteinNorm, btmetric "damerauLevenshtein" dame...
null
https://raw.githubusercontent.com/mrkkrp/text-metrics/720cb2a92158410c64a7010e6cd150a504c2a8da/bench/speed/Main.hs
haskell
| Produce benchmark group to test. | The series of lengths to try with every function as part of 'btmetric'.
module Main (main) where import Control.DeepSeq import Criterion.Main import Data.Text (Text) import qualified Data.Text as T import Data.Text.Metrics main :: IO () main = defaultMain [ btmetric "levenshtein" levenshtein, btmetric "levenshteinNorm" levenshteinNorm, btmetric "damerauLevenshtein" dame...
d5c33ad7b4593a87832c01a38c1ff81b124bfc6057af5629d48b8345ccf7eb3d
tail-reversion/elle
require-provide.rkt
#lang racket/base (provide @%require require-for-syntax require-for-template require-for-label @%provide provide-for-syntax provide-for-template provide-for-label reprovide) (require (for-syntax racket/base syntax/datum racket/set) syntax/parse/define racket/contract elle/...
null
https://raw.githubusercontent.com/tail-reversion/elle/ed113df48d37c0481d2e6d068635e4699ea33d65/elle-lib/private/prebase/require-provide.rkt
racket
#lang racket/base (provide @%require require-for-syntax require-for-template require-for-label @%provide provide-for-syntax provide-for-template provide-for-label reprovide) (require (for-syntax racket/base syntax/datum racket/set) syntax/parse/define racket/contract elle/...
ec79aa5720e86e219e0414fd1ccff405988bfc2a820eb754a337de2be4dd1e04
fossas/fossa-cli
Carthage.hs
# LANGUAGE TemplateHaskell # module Strategy.Carthage ( discover, findProjects, getDeps, mkProject, analyze, ResolvedEntry (..), EntryType (..), CarthageProject (..), ) where import App.Fossa.Analyze.Types (AnalyzeProject, analyzeProject, analyzeProject') import Control.Effect.Diagnostics ( Diagnost...
null
https://raw.githubusercontent.com/fossas/fossa-cli/187f19afec2133466d1998c89fc7f1c77107c2b0/src/Strategy/Carthage.hs
haskell
We only care about top-level resolved cartfile errors, so we don't 'recover' here, but we do below in 'descend' checkouts directory Exemplary Cartfile.resolved: Additional documentation for cartfile can be found here:
# LANGUAGE TemplateHaskell # module Strategy.Carthage ( discover, findProjects, getDeps, mkProject, analyze, ResolvedEntry (..), EntryType (..), CarthageProject (..), ) where import App.Fossa.Analyze.Types (AnalyzeProject, analyzeProject, analyzeProject') import Control.Effect.Diagnostics ( Diagnost...
57ce721aca1ba3fff0856c6d6af165e2fe111614fe4c0b4fd0d9d434dd3d314b
ucsd-progsys/230-wi19-web
lec-1-17-2018.hs
{-@ LIQUID "--no-termination" @-} module Lec02 where import Text.Printf (printf) import Debug.Trace (trace) incr :: Int -> Int incr x = x + 1 zincr :: Int -> Int zincr = \x -> x + 1 eleven = incr (10 + 2) -- sumList xs = case xs of -- [] -> 0 -- (x:xs) -> x + sumList xs sumList ::...
null
https://raw.githubusercontent.com/ucsd-progsys/230-wi19-web/7f5fc5414886fae4e2382cd5a0e48f638be06f0f/static/hs/lec-1-17-2018.hs
haskell
@ LIQUID "--no-termination" @ sumList xs = case xs of [] -> 0 (x:xs) -> x + sumList xs -- fact :: Int -> Int let rec fact n = let res = if n <= 0 then 0 else n * fact (n-1) in let _ = Printf.printf "Fact n = %d res = %d\n" n res in res --
module Lec02 where import Text.Printf (printf) import Debug.Trace (trace) incr :: Int -> Int incr x = x + 1 zincr :: Int -> Int zincr = \x -> x + 1 eleven = incr (10 + 2) sumList :: [Int] -> Int sumList [] = 0 sumList (x:xs) = x + sumList xs isOdd x = x `mod` 2 == 1 oddsBelow100 = myfilter isOdd [0..100] my...
ac53c69b5e8ccb16ae6e58aa4ce43596f88c3d8dd14085a5ec5cf1da6cd7ad5e
metabase/metabase
ingest.clj
(ns metabase-enterprise.serialization.v2.ingest "Ingestion is the first step in deserialization - reading from the export format (eg. a tree of YAML files) and producing Clojure maps with `:serdes/meta` keys. See the detailed description of the (de)serialization processes in [[metabase.models.serialization.base]...
null
https://raw.githubusercontent.com/metabase/metabase/1f809593c2298ccf9c4070df3fa39d718eddb5d6/enterprise/backend/src/metabase_enterprise/serialization/v2/ingest.clj
clojure
This is written as a protocol since overriding it with [[reify]] is useful for testing.
(ns metabase-enterprise.serialization.v2.ingest "Ingestion is the first step in deserialization - reading from the export format (eg. a tree of YAML files) and producing Clojure maps with `:serdes/meta` keys. See the detailed description of the (de)serialization processes in [[metabase.models.serialization.base]...
f7f1a68b2304f832de9f761636edda1b9a2f969d57022eb055e2bef9714ad745
cnuernber/libjulia-clj
gc.clj
(ns libjulia-clj.impl.gc "Binding of various sort of gc semantics optimized specifically for libpython-clj. For general bindings, see tech.resource" (:import [java.util.concurrent ConcurrentHashMap ConcurrentLinkedDeque] [java.lang.ref ReferenceQueue] [tech.resource GCReference])) (set! *...
null
https://raw.githubusercontent.com/cnuernber/libjulia-clj/73502d92ba2e80fd122f5a0a8148d675555260d0/src/libjulia_clj/impl/gc.clj
clojure
We have to keep track of the pointer. If we do not the pointer gets gc'd then it will not be put on the reference queue when the object itself is gc'd. Nice little gotcha there. Ensure we don't lose track of the weak reference. If it gets cleaned up the gc system will fail.
(ns libjulia-clj.impl.gc "Binding of various sort of gc semantics optimized specifically for libpython-clj. For general bindings, see tech.resource" (:import [java.util.concurrent ConcurrentHashMap ConcurrentLinkedDeque] [java.lang.ref ReferenceQueue] [tech.resource GCReference])) (set! *...
f1b8deea700e35e0e76672bc47104e1c0c721e6a04f0df6464a49f53e208619f
flipstone/orville
InsertColumnList.hs
# LANGUAGE GeneralizedNewtypeDeriving # | Module : Orville . PostgreSQL.Internal . Expr . Insert . InsertColumnList Copyright : Flipstone Technology Partners 2016 - 2021 License : MIT Module : Orville.PostgreSQL.Internal.Expr.Insert.InsertColumnList Copyright : Flipstone Technology Partners 2016-20...
null
https://raw.githubusercontent.com/flipstone/orville/d68cc4a85bf84269e4883d232cf7bf91a626662b/orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/Expr/Insert/InsertColumnList.hs
haskell
# LANGUAGE GeneralizedNewtypeDeriving # | Module : Orville . PostgreSQL.Internal . Expr . Insert . InsertColumnList Copyright : Flipstone Technology Partners 2016 - 2021 License : MIT Module : Orville.PostgreSQL.Internal.Expr.Insert.InsertColumnList Copyright : Flipstone Technology Partners 2016-20...
9ae1edea5b7c1ccae4b9988410af7da6ed89cd39365b3ccce329196d9fafadd7
srfoster/codespells
release.rkt
#lang racket (require "./lib.rkt" raco/command-name file/zip aws/keys aws/s3 setup/getinfo) (define skip-zip? (make-parameter #f)) (command-line #:program (short-program+command-name) #:once-each [("-z" "--skip-zip") "Skip zipping BuildUnreal/" ...
null
https://raw.githubusercontent.com/srfoster/codespells/82c99d81611288b9ae92e5e290951e2a69bec869/modding/release.rkt
racket
Zip BuildUnreal Find S3 credentials Assuming a url like: "-org.s3.amazonaws.com/ModBuilds/fire-particles/0.0/BuildUnreal.zip" I guess we assume the region for now Push BuildUnreal.zip to s3 Record where it was pushed (or assume a convention), so it can be found for installations/updates
#lang racket (require "./lib.rkt" raco/command-name file/zip aws/keys aws/s3 setup/getinfo) (define skip-zip? (make-parameter #f)) (command-line #:program (short-program+command-name) #:once-each [("-z" "--skip-zip") "Skip zipping BuildUnreal/" ...
8c99eb0f9aaf5594bfba2577d24ffd37d0a6361873b670ea0e5099c8c089ab7f
evrim/core-server
table.lisp
(in-package :core-server) ;; ------------------------------------------------------------------------- ;; Table Component (Single Select) ;; ------------------------------------------------------------------------- (defcomponent <core:table (<:table cached-component slot-representations callable-component) ((...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/web/components/table.lisp
lisp
------------------------------------------------------------------------- Table Component (Single Select) ------------------------------------------------------------------------- Give emphasis on selected again function ResizeWidths(div) { var headerCells = $(div).find('.headerTable thead').find('th'); ...
(in-package :core-server) (defcomponent <core:table (<:table cached-component slot-representations callable-component) ((instances :host remote :initarg :instances :initform nil) (primary-field :host remote :initform "name") (template-class :initform nil :host remote) (hilight-class :initform "hiligh...
7ad6c0ea24606649f89ca5c6fe6d6bc416758921c6b4dc3429c529dfeba9a1c8
kfsm/pipe
pipe_SUITE.erl
%% Copyright ( c ) 2012 - 2013 , Copyright ( c ) 2012 - 2013 , %% 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 %% %% Un...
null
https://raw.githubusercontent.com/kfsm/pipe/aa38648c477aacbc71af03d4651834eb386a39be/test/pipe_SUITE.erl
erlang
All Rights Reserved. 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...
Copyright ( c ) 2012 - 2013 , Copyright ( c ) 2012 - 2013 , Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(pipe_SUITE). -include_lib("common_test/include/ct.hrl"). -export([all/0]). -export([ sta...
049bda06329fc68fadb11ce82f7d56b9103c28144f9a0f0856665c4ae6f9b6b9
tadeuzagallo/verve-lang
Util.hs
module Typing.Util where import Typing.Env import Typing.Kinds import {-# SOURCE #-} Typing.Stmt import Typing.Substitution import Typing.Subtyping import Typing.TypeError import Typing.Types import Util.Error import Absyn.Base import Absyn.Meta import qualified Absyn.Untyped as U import qualified Absyn.Typed as T ...
null
https://raw.githubusercontent.com/tadeuzagallo/verve-lang/c7db1f5d4bb399b6c2623dd2444a981b5aba1aa4/src/Typing/Util.hs
haskell
# SOURCE #
module Typing.Util where import Typing.Env import Typing.Kinds import Typing.Substitution import Typing.Subtyping import Typing.TypeError import Typing.Types import Util.Error import Absyn.Base import Absyn.Meta import qualified Absyn.Untyped as U import qualified Absyn.Typed as T import Control.Monad (when) import...
e99cc81b8ba3b5c2cfa922b116c23e73fb08fe74a95707eb8faf07a74b90afba
arttuka/reagent-material-ui
car_crash_sharp.cljs
(ns reagent-mui.icons.car-crash-sharp "Imports @mui/icons-material/CarCrashSharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def car-crash-sharp (create-svg...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/car_crash_sharp.cljs
clojure
(ns reagent-mui.icons.car-crash-sharp "Imports @mui/icons-material/CarCrashSharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def car-crash-sharp (create-svg...
de44a5e5afc411260fc5f2fa4d3b89fe5b9de51eecfb3b29247bdbcd10ff4cc1
bobzhang/fan
fun.ml
value f = fun []; value f = fun [ [] -> fun [ 4 -> () ] ]; value f = fun []; value f = fun []; value f = fun []; value f = g x y; value f = (g x) y;
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/fun.ml
ocaml
value f = fun []; value f = fun [ [] -> fun [ 4 -> () ] ]; value f = fun []; value f = fun []; value f = fun []; value f = g x y; value f = (g x) y;
8ff73e85f6f93f34fa0a5296ee36d53e628889c960ffaebd8de06eb75ff743db
dongweiming/lisp-koans-answer
contemplate.lsp
Copyright 2013 Google Inc. ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software ...
null
https://raw.githubusercontent.com/dongweiming/lisp-koans-answer/33eb6e38c7179c677db0df0a31cadd49617ae8db/contemplate.lsp
lisp
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language g...
Copyright 2013 Google Inc. distributed under the License is distributed on an " AS IS " BASIS , (in-package :cl-user) (load "lisp-unit.lsp") (defpackage :lisp-koans (:use :common-lisp) (:use :lisp-unit) #+sbcl (:use :sb-ext)) (in-package :lisp-koans) (defvar *koan-dir-name* "koans") (with-open-file ...
31d281c299be130f8696fcb26a4bd078c0f7cd1d476f8950845c83bc7fa1c919
pallet/pallet
strint_test.clj
(ns pallet.strint-test (:require [clojure.test :refer :all] [pallet.common.strint :refer :all] [pallet.strint :refer :all] [pallet.test-utils :refer :all])) (deftest interpolate-test (is (= '("a " a "") (#'pallet.common.strint/interpolate "a ~{a}")))) (deftest <<-test (testing "docstring examples" ...
null
https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/test/pallet/strint_test.clj
clojure
(ns pallet.strint-test (:require [clojure.test :refer :all] [pallet.common.strint :refer :all] [pallet.strint :refer :all] [pallet.test-utils :refer :all])) (deftest interpolate-test (is (= '("a " a "") (#'pallet.common.strint/interpolate "a ~{a}")))) (deftest <<-test (testing "docstring examples" ...
7176d3ced6de399aab1d383bb80a31624e2ffe1a149c662b7ba5e272c01bc550
juspay/atlas
Location.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/driver-offer-bpp/src/Product/Location.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
df2796b03c501bcdf2729ad9cdf319eafde0e1d80743541bdfb1169f34d7d8cb
Cascading/cascalog-tutorial-standalone
project.clj
;; Copyright ( c ) 2007 - 2015 Concurrent , Inc. All Rights Reserved . ;; Project and contact information : / ;; This file is part of the Cascading project . ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may ob...
null
https://raw.githubusercontent.com/Cascading/cascalog-tutorial-standalone/88a8c9cb604fb5cad016801822397b3bc35d8f8e/project.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing ...
Copyright ( c ) 2007 - 2015 Concurrent , Inc. All Rights Reserved . Project and contact information : / This file is part of the Cascading project . distributed under the License is distributed on an " AS IS " BASIS , (defproject cascalog-standalone-tutorial "2.1.1" :description "The cascalog tutorial" :ur...
e2ae57959797a7ea5f7332cb1fa68efe4ad8e04bd3bf06123a7f83f181a53bf3
e-bigmoon/haskell-blog
Example15.hs
#!/usr/bin/env stack {- stack repl --resolver lts-15.4 --package text --package yesod-core -} import Data.Text (pack) import Yesod.Core getHomeR :: LiteHandler TypedContent getHomeR = return $ TypedContent typeHtml $ toContent "<html><head><title>Hi There!</title>\ \<link rel='styl...
null
https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/sample-code/yesod/ch20/Example15.hs
haskell
stack repl --resolver lts-15.4 --package text --package yesod-core
#!/usr/bin/env stack import Data.Text (pack) import Yesod.Core getHomeR :: LiteHandler TypedContent getHomeR = return $ TypedContent typeHtml $ toContent "<html><head><title>Hi There!</title>\ \<link rel='stylesheet' href='/style.css'>\ \<script src='/script.js'></script></head>\ \...
c192057011311cdfcc7a5741b1f7f0134dd1af1309ce914b593df703f9ab2ad2
hellertime/time-recurrence
Schedule.hs
# LANGUAGE GADTs , FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , StandaloneDeriving , UndecidableInstances # -- This module is intended to be imported @qualified!, to avoid name clashes with " Prelude " functions . eg . -- -- > import qualified Data.Time.Recurrence.Schedule as S module Data.Tim...
null
https://raw.githubusercontent.com/hellertime/time-recurrence/56efaf58c48860d4547a664df9bded176a5860e9/src/Data/Time/Recurrence/Schedule.hs
haskell
This module is intended to be imported @qualified!, to avoid name > import qualified Data.Time.Recurrence.Schedule as S * Schedule * Freq * Adjust Interval * Adjust Start of Week * Default Freq * evaluate a Schedule into a function * run an evaluated Schedule from a moment | Typically called infix on an exis...
# LANGUAGE GADTs , FlexibleInstances , FunctionalDependencies , MultiParamTypeClasses , StandaloneDeriving , UndecidableInstances # clashes with " Prelude " functions . eg . module Data.Time.Recurrence.Schedule ( Schedule (..) , Freq * Function interface to Recur , recur , by , withStar...
689290a5b2ae04fc66005c8ab6431e593e0a5f4157ebd8745b38f674c1ffb3ff
MinaProtocol/mina
state_body_hash.ml
open Core_kernel open Snark_params.Tick include Data_hash.Make_full_size (struct let description = "State body hash" let version_byte = Base58_check.Version_bytes.state_body_hash end) let dummy = of_hash Outside_hash_image.t (* Data hash versioned boilerplate below *) [%%versioned module Stable = struct [@@@...
null
https://raw.githubusercontent.com/MinaProtocol/mina/465aed0f9c71268e3ebd8428f07005d253a0bde1/src/lib/mina_base/state_body_hash.ml
ocaml
Data hash versioned boilerplate below
open Core_kernel open Snark_params.Tick include Data_hash.Make_full_size (struct let description = "State body hash" let version_byte = Base58_check.Version_bytes.state_body_hash end) let dummy = of_hash Outside_hash_image.t [%%versioned module Stable = struct [@@@no_toplevel_latest_type] module V1 = stru...
0a5268292d9ce6417c15ecde500c79a0235a6deb267b0777233d9cae6421a6cf
sellout/haskerwaul
Groupoid.hs
# language UndecidableInstances , UndecidableSuperClasses # , UndecidableSuperClasses #-} module Haskerwaul.Groupoid ( module Haskerwaul.Groupoid -- * extended modules , module Haskerwaul.Category , module Haskerwaul.Group ) where import Haskerwaul.Category import Haskerwaul.Group im...
null
https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Groupoid.hs
haskell
* extended modules | [nLab]() __NB__: Instances for this are automatically coalesced.
# language UndecidableInstances , UndecidableSuperClasses # , UndecidableSuperClasses #-} module Haskerwaul.Groupoid ( module Haskerwaul.Groupoid , module Haskerwaul.Category , module Haskerwaul.Group ) where import Haskerwaul.Category import Haskerwaul.Group import Haskerwaul.Transfor...
ea1a4bec8ca6a87bc05f693b6cbae22c9163b68b2df8d017b7093cdcae360888
esl/MongooseIM
ldap_helper.erl
-module(ldap_helper). -behaviour(escalus_user_db). %% API -export([start/1, stop/1, create_users/2, delete_users/2, get_ldap_base/1, call_ldap/3]). -import(distributed_helper, [mim/0, rpc/4]). -type user_spec() :: escalus_users:user_spec(). ...
null
https://raw.githubusercontent.com/esl/MongooseIM/2de7beed551c40223e3a7721e26d4eb76934d7b8/big_tests/tests/ldap_helper.erl
erlang
API
-module(ldap_helper). -behaviour(escalus_user_db). -export([start/1, stop/1, create_users/2, delete_users/2, get_ldap_base/1, call_ldap/3]). -import(distributed_helper, [mim/0, rpc/4]). -type user_spec() :: escalus_users:user_spec(). -spec s...
3771649bab526eedffa2a4180373f239297887360842f7067d30fa7545ee1fe4
hopv/MoCHi
print.ml
open Format open Util open Type open Syntax module Debug_attr = Debug.Make(struct let check = Flag.Debug.make_check (__MODULE__ ^ ".attr") end) module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end) type config = {ty : bool; (** print types of arguments *) as_ocaml : bool; (** pri...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/print.ml
ocaml
* print types of arguments * print terms in OCaml syntax * Unimplemented * print terms for dmochi when as_ocaml=true * print let/type as in top-level * print unused arguments * max depth of printing terms TODO: fix
open Format open Util open Type open Syntax module Debug_attr = Debug.Make(struct let check = Flag.Debug.make_check (__MODULE__ ^ ".attr") end) module Debug = Debug.Make(struct let check = Flag.Debug.make_check __MODULE__ end) type config = let config_default = ref {ty=false; as_ocaml=false; for_dmochi=false; top=fal...
e9ca3917e5c0344f723df2a984d063dc5cb5764d1d9ba9cf26f029f65fa49379
Covariance/hi-language
Print.hs
module Print ( group ) where import Test.Hspec (Spec, it) import Test.Tasty (TestTree) import Test.Tasty.Hspec (testSpec) import HI.Base (HiError (..), HiExpr (..), HiFun (..), HiValue (..)) import Util (prints) spec :: Spec spec = do it "numbers" $ do "0.05" `prints` "0.05" "1 / 2" `prints` "0.5" ...
null
https://raw.githubusercontent.com/Covariance/hi-language/a395277811fdc7a9853c4241ff6ec07d6130480a/test/Print.hs
haskell
module Print ( group ) where import Test.Hspec (Spec, it) import Test.Tasty (TestTree) import Test.Tasty.Hspec (testSpec) import HI.Base (HiError (..), HiExpr (..), HiFun (..), HiValue (..)) import Util (prints) spec :: Spec spec = do it "numbers" $ do "0.05" `prints` "0.05" "1 / 2" `prints` "0.5" ...
2fd14901d15ca304388eaaead31980c884fc977f9a116d139040137cf4893abb
uber/queryparser
Test.hs
Copyright ( c ) 2017 Uber Technologies , Inc. -- -- Permission is hereby granted, free of charge, to any person obtaining a copy -- of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights -- to use, copy, modify, mer...
null
https://raw.githubusercontent.com/uber/queryparser/6015e8f273f4498326fec0315ac5580d7036f8a4/test/Database/Sql/Util/Catalog/Test.hs
haskell
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above copyright notice ...
Copyright ( c ) 2017 Uber Technologies , Inc. in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K...
6ba9c4da3a892ba988920bf68cef7628936a0482feb3a17054872467a3516315
aeternity/aeternity
contract_sophia_bytecode_aevm_SUITE.erl
-module(contract_sophia_bytecode_aevm_SUITE). %% Commented for avoiding warnings without implementing all dummy callback. %% -behaviour(aevm_chain_api). -include_lib("stdlib/include/assert.hrl"). -include_lib("aecontract/test/include/aect_sophia_vsn.hrl"). %% common_test exports -export([ all/0 , init_per_te...
null
https://raw.githubusercontent.com/aeternity/aeternity/f61163c89dc8bf01a8e2297f1189c02c3d3563f9/test/contract_sophia_bytecode_aevm_SUITE.erl
erlang
Commented for avoiding warnings without implementing all dummy callback. %% -behaviour(aevm_chain_api). common_test exports test case exports TODO: Handle Contract In State. The call fails for insufficient balance for the value specified in the remote call. Spending in nested call Beneficiary address Caller addre...
-module(contract_sophia_bytecode_aevm_SUITE). -include_lib("stdlib/include/assert.hrl"). -include_lib("aecontract/test/include/aect_sophia_vsn.hrl"). -export([ all/0 , init_per_testcase/2 , end_per_testcase/2 ]). -export( [ execute_identity_fun_from_sophia_file/1 , sophia_remote_call/1...
38d12ac5d3f174fa9f812e70ee27d0ca23ca11d43f5f589e9825987ae4728a31
OCamlPro/freeton_ocaml_sdk
mod_net_lwt.ml
(**************************************************************************) (* *) Copyright ( c ) 2021 OCamlPro SAS (* *) (* All right...
null
https://raw.githubusercontent.com/OCamlPro/freeton_ocaml_sdk/42a0d95252ed19c647fa86e9728af15d557fc5e3/src/freeton_client_lwt/mod_net_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.NET let query = Tc_lwt.request Query.f let batch_query = Tc_lwt.request BatchQuery.f let query_collection = Tc_lwt.request QueryCollection.f let agg...
dd21d9a36da43f9f49182881c7087c46ac210bbbe1246a2094fcb921fef32d10
yoriyuki/Camomile
iSet.ml
(** Set of integers *) Copyright ( C ) 2003 . distributed with LGPL (* This library is free software; you can redistribute it and/or *) (* modify it under the terms of the GNU Lesser General Public License *) as published by the Free Software Foundation ; either version 2 of the License , or ( at your option )...
null
https://raw.githubusercontent.com/yoriyuki/Camomile/d7d8843c88fae774f513610f8e09a613778e64b3/Camomile/internal/iSet.ml
ocaml
* Set of integers This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License may link, statically or dynamically, a "work that uses this library" with a publicly distributed version of this library to produce an executable file containing p...
Copyright ( C ) 2003 . distributed with LGPL as published by the Free Software Foundation ; either version 2 of the License , or ( at your option ) any later version . As a special exception to the GNU Library General Public License , you additional requirements listed in clause 6 of the GNU Library Gener...
8905f6ca339c28e55df95433b86769c2db2dcef6709640a838f3e99ae1d8a103
david-christiansen/pudding-old
proof-state.rkt
#lang racket (require zippers (rename-in "error-handling.rkt" [proof-get get] [proof-put put] [proof-modify modify]) "metavariables.rkt" "proofs.rkt" "infrastructure.rkt" "contexts.rkt") (provide init-proof-state ...
null
https://raw.githubusercontent.com/david-christiansen/pudding-old/6b9ee633b551226df61d40191bafa14386fc86ad/proof-state.rkt
racket
A proof state contains: Refinement rules A parameter position for a rule. The name is a symbol representing the name of the formal parameter, and the sort is a valid sort. A refinement rule is an operator that, when applied to a goal, returns a refinement in the proof monad. Refinement rules can take parameters...
#lang racket (require zippers (rename-in "error-handling.rkt" [proof-get get] [proof-put put] [proof-modify modify]) "metavariables.rkt" "proofs.rkt" "infrastructure.rkt" "contexts.rkt") (provide init-proof-state ...
438139245e63f0b0ac14ce3717cc45fb8127d4cd449285b61b1e159dd886e835
TorXakis/TorXakis
IfServer.hs
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} Copyright ( c ) 2015 - 2016 TNO and R...
null
https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/serverenv/src/IfServer.hs
haskell
----------------------------------------------------------------------------------------- -- ----------------------------------------------------------------------------------------- -- ----------------------------------------------------------------------------------------- -- export :: IOS (String,String) :...
TorXakis - Model Based Testing Copyright ( c ) 2015 - 2017 TNO and Radboud University See LICENSE at root directory of this repository . TorXakis - Model Based Testing Copyright (c) 2015-2017 TNO and Radboud University See LICENSE at root directory of this repository. -} Copyright ( c ) 2015 - 2016 TNO and R...
428bd362adc6515247d686c2aaaad3f7c55e8c0a4758e3bf478d9aa9c4523203
rtoy/ansi-cl-tests
sin.lsp
;-*- Mode: Lisp -*- Author : Created : Mon Feb 9 20:20:46 2004 Contains : Tests for SIN (in-package :cl-test) (deftest sin.1 (loop for i from -1000 to 1000 for rlist = (multiple-value-list (sin i)) for y = (car rlist) always (and (null (cdr rlist)) (<= ...
null
https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/sin.lsp
lisp
-*- Mode: Lisp -*- More accuracy tests here Error tests
Author : Created : Mon Feb 9 20:20:46 2004 Contains : Tests for SIN (in-package :cl-test) (deftest sin.1 (loop for i from -1000 to 1000 for rlist = (multiple-value-list (sin i)) for y = (car rlist) always (and (null (cdr rlist)) (<= -1 y 1) ...
7f0b539ce89ca8807f6b31d84bbb6ae194ad1ae37d5c7e0a7bf3439a7034b925
eugeneia/athens
namespace-let.lisp
(in-package :lispn) TODO namespace - let ;; renaming candidate: ;; namespace-let ;; where --- eazy to type in, but incosistent with common lisp ;; bind --- I dont think it is cool, similar reason to where ;; overwriting cl:let --- well, maybe optional (defmacro namespace-let (bindings &body body) "Bindings is ...
null
https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/lisp-namespace-20171130-git/src/namespace-let.lisp
lisp
renaming candidate: namespace-let where --- eazy to type in, but incosistent with common lisp bind --- I dont think it is cool, similar reason to where overwriting cl:let --- well, maybe optional -- equivalent to ((function x) (y) (1+ y)) mutual recursion function-like binding variable-like binding handler b...
(in-package :lispn) TODO namespace - let (defmacro namespace-let (bindings &body body) "Bindings is a list of bindings where each car is of form (NAMESPACE NAME), or a symbol NAME for a variable namespace. function, macro, label, symbol-macro, handler, restart is by default recognized as a namespace. Exampl...
6c3dbe74285be0606aaf693ecffb823b82c0140483ceedbb839f8ab72ab9543b
tomjridge/imp_fs
fl_summary.t.ml
(** Summary of main types *) (** {[ $(INCLUDE("GEN*")) ]} *)
null
https://raw.githubusercontent.com/tomjridge/imp_fs/ba86e8e9204c59b18f041bf21332a2a4846ae20b/src/freelist/fl_summary.t.ml
ocaml
* Summary of main types * {[ $(INCLUDE("GEN*")) ]}
63375dff05f8029cc9b174499895e7f898dd0202b7808b6f84a3cd0dc714d88f
josephwilk/musical-creativity
instruments.clj
(ns musical-creativity.instruments "Some instruments imported from Chris Ford's Whelmed: " (:require [overtone.live :refer :all] [overtone.music.pitch :as pitch] [overtone.inst.sampled-piano :as piano] [overtone.inst.synth :as synth] [overtone.synth.stringed :as stringed] [musical-creativit...
null
https://raw.githubusercontent.com/josephwilk/musical-creativity/c2e6aab2a26d69ee2e51f4fad84fa3a71805e6ca/src/musical_creativity/instruments.clj
clojure
(println event)
(ns musical-creativity.instruments "Some instruments imported from Chris Ford's Whelmed: " (:require [overtone.live :refer :all] [overtone.music.pitch :as pitch] [overtone.inst.sampled-piano :as piano] [overtone.inst.synth :as synth] [overtone.synth.stringed :as stringed] [musical-creativit...
91190b788acb4a4b7abd4d9aa343d44cee71125cd947730c6df25ebcdc7e23a8
exercism/scheme
test.scm
(load "test-util.ss") (define test-cases `((test-success "zero rows" equal? pascals-triangle '(0) '()) (test-success "single row" equal? pascals-triangle '(1) '((1))) (test-success "two rows" equal? pascals-triangle '(2) '((1) (1 1))) (test-success "three rows" equal? pascals-trian...
null
https://raw.githubusercontent.com/exercism/scheme/2064dd5e5d5a03a06417d28c33c5349bec97dad7/exercises/practice/pascals-triangle/test.scm
scheme
(load "test-util.ss") (define test-cases `((test-success "zero rows" equal? pascals-triangle '(0) '()) (test-success "single row" equal? pascals-triangle '(1) '((1))) (test-success "two rows" equal? pascals-triangle '(2) '((1) (1 1))) (test-success "three rows" equal? pascals-trian...
ef21d5b14a879ac6f8d3d5912f4d9b29e20870638a1a1b98a37837463a0f00f2
onaio/milia
images.clj
(ns milia.api.images (:require [milia.api.http :refer [parse-http]] [milia.api.io :refer [multipart-options]] [milia.utils.remote :refer [thumbor-server]])) (def upload-url (str thumbor-server "/image")) (defn upload "Process an avatar upload. Expects a binary avatar data object." [file ...
null
https://raw.githubusercontent.com/onaio/milia/c68b612bd640aa2499e4ac2f907a7ef793d0820a/src/milia/api/images.clj
clojure
(ns milia.api.images (:require [milia.api.http :refer [parse-http]] [milia.api.io :refer [multipart-options]] [milia.utils.remote :refer [thumbor-server]])) (def upload-url (str thumbor-server "/image")) (defn upload "Process an avatar upload. Expects a binary avatar data object." [file ...
1545d6fabb116f7756c87820ddfb7ab5d047740267caf9be56a2b8a636b1f1b6
stackbuilders/scalendar
Main.hs
module Main where import Booking.Config (exampleConf) import Booking.Interpreter (bookingProxy, server) import Network.Wai import Network.Wai.Handler.Warp import Network.Wai.Middleware.RequestLogger import Servant ...
null
https://raw.githubusercontent.com/stackbuilders/scalendar/3778aef23f736878669613fb01dad6f4e153384d/example/app/Main.hs
haskell
module Main where import Booking.Config (exampleConf) import Booking.Interpreter (bookingProxy, server) import Network.Wai import Network.Wai.Handler.Warp import Network.Wai.Middleware.RequestLogger import Servant ...
4a61a9ea5580facb54dba1fdaee6740ccea7c94d86d07f8cd2e69a1fb71b58ee
interstar/Patterning-Core
download.cljs
(ns tutorial.download (:require #_[om.core :as om :include-macros true] [sablono.core :as sab :include-macros true] [cljs.js :refer [eval empty-state js-eval]] ) (:require-macros [devcards.core :as dc :refer [defcard deftest]]) ) (defcard getting-patterning " # Get Patterning Patterning can...
null
https://raw.githubusercontent.com/interstar/Patterning-Core/4ff050026ed9d7ddf013e83444701599dfdbac73/tutorial/src/tutorial/download.cljs
clojure
(ns tutorial.download (:require #_[om.core :as om :include-macros true] [sablono.core :as sab :include-macros true] [cljs.js :refer [eval empty-state js-eval]] ) (:require-macros [devcards.core :as dc :refer [defcard deftest]]) ) (defcard getting-patterning " # Get Patterning Patterning can...
3e423adad6c0ce58a61a76d18d94d1d424497f145b1e7d8fef445ca07eea643b
xh4/web-toolkit
tree-hash.lisp
;;;; -*- mode: lisp; indent-tabs-mode: nil -*- (in-package :crypto) ;;; See the spec at ;;; -hackers/2002-June/000621.html (defparameter *leaf-byte* (make-array 1 :element-type '(unsigned-byte 8) :initial-element 0)) (defparameter *internal-byte* (make-array 1 :element-type '(unsi...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/digests/tree-hash.lisp
lisp
-*- mode: lisp; indent-tabs-mode: nil -*- See the spec at -hackers/2002-June/000621.html happens to work when branch is nil!
(in-package :crypto) (defparameter *leaf-byte* (make-array 1 :element-type '(unsigned-byte 8) :initial-element 0)) (defparameter *internal-byte* (make-array 1 :element-type '(unsigned-byte 8) :initial-element 1)) (defun make-tree-hash-lea...
b980c2adbd9c832f06008cb9a31e9adcd259d07bfa79240acf1a155c8cad1d65
sellout/haskerwaul
Hypergraph.hs
module Haskerwaul.Category.Hypergraph ( module Haskerwaul.Category.Hypergraph -- * extended modules , module Haskerwaul.Category.Monoidal.Symmetric , module Haskerwaul.Monoid.Frobenius.Commutative.Special ) where import Haskerwaul.Category.Monoidal.Symmetric import Haskerwaul.Monoid.Frobenius.Commutative.Spe...
null
https://raw.githubusercontent.com/sellout/haskerwaul/cf54bd7ce5bf4f3d1fd0d9d991dc733785b66a73/src/Haskerwaul/Category/Hypergraph.hs
haskell
* extended modules | [nLab](+category) -- | +category#examples instance Category c => SymmetricMonoidalCategory t
module Haskerwaul.Category.Hypergraph ( module Haskerwaul.Category.Hypergraph , module Haskerwaul.Category.Monoidal.Symmetric , module Haskerwaul.Monoid.Frobenius.Commutative.Special ) where import Haskerwaul.Category.Monoidal.Symmetric import Haskerwaul.Monoid.Frobenius.Commutative.Special import Haskerwaul.S...
8e95fec994e8d0e3ccd9c5563ae020821b12a8fe7907462145cec4bb9be1540b
unisonweb/unison
Name.hs
# OPTIONS_GHC -fno - warn - orphans # -- | Syntax-related combinators for Name (to/from string types). module Unison.Syntax.Name ( fromText, fromTextEither, unsafeFromString, unsafeFromText, unsafeFromVar, toString, toText, toVar, ) where import Data.List.NonEmpty (pattern (:|)) import...
null
https://raw.githubusercontent.com/unisonweb/unison/cf278f9fb66ccb9436bf8a2eb4ab03fc7a92021d/unison-syntax/src/Unison/Syntax/Name.hs
haskell
| Syntax-related combinators for Name (to/from string types). | Convert a name to a string representation. | Convert a name to a string representation. | Convert a name to a string representation, then parse that as a var. | Parse a name from a string literal. Performs very minor validation (a name can't be empt...
# OPTIONS_GHC -fno - warn - orphans # module Unison.Syntax.Name ( fromText, fromTextEither, unsafeFromString, unsafeFromText, unsafeFromVar, toString, toText, toVar, ) where import Data.List.NonEmpty (pattern (:|)) import qualified Data.List.NonEmpty as List (NonEmpty) import qualified...
c34bd90a3f141867bbce18704d8266c71d78ff838e241561ecf42579d9b9894b
mirage/alcotest
separator_testname.ml
let () = Alcotest.run __FILE__ [ ( "with/separator", [ Alcotest.test_case "First test case" `Quick (fun () -> ()) ] ); ]
null
https://raw.githubusercontent.com/mirage/alcotest/bb3492901dea03c72b4de6b5660852a020283921/test/e2e/alcotest/passing/separator_testname.ml
ocaml
let () = Alcotest.run __FILE__ [ ( "with/separator", [ Alcotest.test_case "First test case" `Quick (fun () -> ()) ] ); ]
6660d80be2a178b6a8a1b1c94cc7df1a05be6765f33f00265b77c25f7bf5de28
kelamg/HtDP2e-workthrough
ex82.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-beginner-reader.ss" "lang")((modname ex82) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Fixed-size-Data/ex82.rkt
racket
about the language level of this file in a form that our tools can easily process. even more designing with structures or #false if no letter fills that position produces a word where the letters of the given words agree and disagree produces a 1String if both letters are the same, false otherwise
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex82) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define-struct 3word (first second third)) A 3Word is a structur...
819d70edf9e4b36e82f6298878aca45ded2e413272d7ed4c05d828d092268820
fragnix/fragnix
Get.hs
{-# LANGUAGE OverloadedStrings #-} module Get (get) where import Control.Monad.IO.Class import Data.Text (Text, pack, unpack) import Network.HTTP.Req import Fragnix.Slice (Slice, writeSlice, sliceNestedPath, moduleNameReference, loadSliceIDsTransitive) import Fragnix.Core.Slice (Reference(OtherSlice, Builtin)) import...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/app/Get.hs
haskell
# LANGUAGE OverloadedStrings #
module Get (get) where import Control.Monad.IO.Class import Data.Text (Text, pack, unpack) import Network.HTTP.Req import Fragnix.Slice (Slice, writeSlice, sliceNestedPath, moduleNameReference, loadSliceIDsTransitive) import Fragnix.Core.Slice (Reference(OtherSlice, Builtin)) import Fragnix.Environment (writeSymbols)...
930ec81acf5b1c24f8e6f501915d5bea2bfe4c0ee43902b51bf9e1d52bea84d2
Atidot/language-powerquery
Spec.hs
{-# LANGUAGE PackageImports #-} module Main where import "hspec" Test.Hspec hiding (example) import " language - powerquery " Language . PowerQuery . AST.Annotation import " language - powerquery " Language . PowerQuery . import " language - powerquery " Language . PowerQuery . AST.AST import "language-...
null
https://raw.githubusercontent.com/Atidot/language-powerquery/e396e2c2f2855b1a82f1158b91c67db6495bc2d3/language-powerquery/test/Spec.hs
haskell
# LANGUAGE PackageImports #
module Main where import "hspec" Test.Hspec hiding (example) import " language - powerquery " Language . PowerQuery . AST.Annotation import " language - powerquery " Language . PowerQuery . import " language - powerquery " Language . PowerQuery . AST.AST import "language-powerquery" Language.PowerQuery....
ada313d7192854dc75914266b5e5977d44d67ca5a676add04557c609852eb251
afronski/bferl
bferl_compiler_codegen.erl
-module(bferl_compiler_codegen). -include("../include/common_definitions.hrl"). -include("../include/interpreter_definitions.hrl"). -export([ make_module/4 ]). map_opcode(inc) -> "+"; map_opcode(dec) -> "-"; map_opcode(left) -> "<"; map_opcode(right) -> ">"; map_opcode(in) -> ","; ma...
null
https://raw.githubusercontent.com/afronski/bferl/18d3482c71cdb0e39bde090d436245a2a9531f49/src/bferl_compiler_codegen.erl
erlang
`cerl` helpers. We need to replicate `module_info/{0,1}` functions because they are delivered to the Core Erlang representation. Helpers. Debugging facilities. Language logic and other helpers. Empty tape - read interactively from I/O. Tape has characters - take one. We should jump to the end of the loop. We ...
-module(bferl_compiler_codegen). -include("../include/common_definitions.hrl"). -include("../include/interpreter_definitions.hrl"). -export([ make_module/4 ]). map_opcode(inc) -> "+"; map_opcode(dec) -> "-"; map_opcode(left) -> "<"; map_opcode(right) -> ">"; map_opcode(in) -> ","; ma...
ab9c516075efe9c108e1ea349213072b0122c020a63352a03fcc1e56710da71b
ertugrulcetin/ClojureNews
submit.cljs
(ns view.submit (:require [reagent.core :as r])) (declare render change-component number-input-checker) (defn component-story [submit] [:table [:tbody [:tr [:td " type:"] [:td [:select {:id "submitTypeId" :name "type" :on-change #(change-component submit % "story")} ...
null
https://raw.githubusercontent.com/ertugrulcetin/ClojureNews/28002f6b620fa4977d561b0cfca0c7f6a635057b/src/cljs/view/submit.cljs
clojure
(ns view.submit (:require [reagent.core :as r])) (declare render change-component number-input-checker) (defn component-story [submit] [:table [:tbody [:tr [:td " type:"] [:td [:select {:id "submitTypeId" :name "type" :on-change #(change-component submit % "story")} ...
c8d6cd642df65c229d71de17c968d831f4843f81b8f1ab698edcad32c9a53b20
ocaml/dune
toplevel.mli
open Import module Source : sig type t val make : dir:Path.Build.t -> loc:Loc.t -> main:string -> name:string -> t val loc : t -> Loc.t val modules : t -> Pp_spec.t -> Modules.t Memo.t val obj_dir : t -> Path.Build.t Obj_dir.t end type t val setup_rules : t -> unit Memo.t val make : cctx:Compilat...
null
https://raw.githubusercontent.com/ocaml/dune/141c23f2281d22abddd6de62c06e1742b33a58eb/src/dune_rules/toplevel.mli
ocaml
open Import module Source : sig type t val make : dir:Path.Build.t -> loc:Loc.t -> main:string -> name:string -> t val loc : t -> Loc.t val modules : t -> Pp_spec.t -> Modules.t Memo.t val obj_dir : t -> Path.Build.t Obj_dir.t end type t val setup_rules : t -> unit Memo.t val make : cctx:Compilat...
93809f639cebbed0eca6414240e8c59489ed52d5a9bcfb0115ea1f2cd8d0a4ac
imrehg/ypsilon
atom.scm
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gdk atom) (export gdk_atom_intern gdk_atom_intern_static_string gdk_atom_name) (import (rnrs) (ypsilon ffi)) (de...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/atom.scm
scheme
GdkAtom gdk_atom_intern_static_string (const gchar* atom_name) gchar* gdk_atom_name (GdkAtom atom) [end]
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gdk atom) (export gdk_atom_intern gdk_atom_intern_static_string gdk_atom_name) (import (rnrs) (ypsilon ffi)) (de...
59964958c24c8b40973a7759db0f8d66766da1081a2328731b8c61e9f8d1e8d5
binaryage/chromex
signed_in_devices.clj
(ns chromex.ext.signed-in-devices "Use the chrome.signedInDevices API to get a list of devices signed into chrome with the same account as the current profile. * available since Chrome 87 * " (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [ge...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/signed_in_devices.clj
clojure
-- events ----------------------------------------------------------------------------------------------------------------- docs: /#tapping-events -- convenience ------------------------------------------------------------------------------------------------------------ --------------------------------------------...
(ns chromex.ext.signed-in-devices "Use the chrome.signedInDevices API to get a list of devices signed into chrome with the same account as the current profile. * available since Chrome 87 * " (:refer-clojure :only [defmacro defn apply declare meta let partial]) (:require [chromex.wrapgen :refer [ge...
81fb664df337f9e1db28c80c53a778845e9a96abf68e50faa32f128c19b2e027
UU-ComputerScience/uhc
Trace.hs
# LANGUAGE NoImplicitPrelude , CPP # ----------------------------------------------------------------------------- -- | -- Module : Debug.Trace Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : provis...
null
https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/uhcbase/Debug/Trace.hs
haskell
--------------------------------------------------------------------------- | Module : Debug.Trace License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : provisional Portability : portable The 'trace' function. ----------------------------------------------------...
# LANGUAGE NoImplicitPrelude , CPP # Copyright : ( c ) The University of Glasgow 2001 module Debug.Trace ( traceShow ) where import UHC.Base #ifndef __UHC_TARGET_CR__ import UHC.OldIO #endif import System.IO.Unsafe #ifdef __GLASGOW_HASKELL__ import Foreign.C.String #elif __UHC_TARGET_CR__ import Sy...
9d825b285c10feaf42d1a4b144effdcf055679ad3136d76661a5e427be21e62e
ninenines/cowboy
provide_range_callback_h.erl
%% This module defines many callbacks relevant to range requests %% and return something different depending on query string. -module(provide_range_callback_h). -export([init/2]). -export([content_types_provided/2]). -export([ranges_provided/2]). -export([expires/2]). -export([generate_etag/2]). -export([last_modifie...
null
https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/test/handlers/provide_range_callback_h.erl
erlang
This module defines many callbacks relevant to range requests and return something different depending on query string. This one only exists so we generate a vary header. Simulate the callback being missing, otherwise expect true/false. We check the range header we get and send everything hardcoded. We check the ...
-module(provide_range_callback_h). -export([init/2]). -export([content_types_provided/2]). -export([ranges_provided/2]). -export([expires/2]). -export([generate_etag/2]). -export([last_modified/2]). -export([get_text_plain/2]). -export([get_text_plain_bytes/2]). init(Req, State) -> {cowboy_rest, Req, State}. conte...
c0ba48c17904bd9c37e5296539339ed15c3faa328f2b9e02b8b9942035e60e1b
samaaron/arnold
lines.clj
(ns arnold.lines (:use quil.core [quil.helpers.seqs :only [steps seq->stream range-incl tap tally indexed-range-incl]] [quil.helpers.calc :only [mul-add]])) Inspired by an example from the excellent book " Generative Art " by (defn draw-point [x y noise-factor] (push-matrix) (translate x y...
null
https://raw.githubusercontent.com/samaaron/arnold/e8daa3ba14dc0d654740750d6cf02ef42cd0fc2e/src/arnold/lines.clj
clojure
(ns arnold.lines (:use quil.core [quil.helpers.seqs :only [steps seq->stream range-incl tap tally indexed-range-incl]] [quil.helpers.calc :only [mul-add]])) Inspired by an example from the excellent book " Generative Art " by (defn draw-point [x y noise-factor] (push-matrix) (translate x y...
84671252dc40b98b70d9b4f41c1d5ecdf8b693a2d81e089196ebb06e7474a0e8
savonet/ocaml-posix
gen_stubs.ml
module Stubs = Posix_base.Generators.Stubs (struct module Stubs = Posix_socket_stubs.Def let c_headers = {| #ifdef _WIN32 #include <winsock2.h> #include <ws2tcpip.h> #else #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #endif #include <string.h> |} let...
null
https://raw.githubusercontent.com/savonet/ocaml-posix/d46d011de16154b34324eae6ee6e7010138cf4af/posix-socket/src/generator/gen_stubs.ml
ocaml
module Stubs = Posix_base.Generators.Stubs (struct module Stubs = Posix_socket_stubs.Def let c_headers = {| #ifdef _WIN32 #include <winsock2.h> #include <ws2tcpip.h> #else #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <netdb.h> #endif #include <string.h> |} let...
45a6da701693ce649d07a955412ddbd5d864fd4ca20a3c7c4a53b1b567455ba5
MarcosPividori/push-notify
Send.hs
-- | This Module define the main functions to send Push Notifications. # LANGUAGE ScopedTypeVariables # module Network.PushNotify.General.Send( startPushService , closePushService , sendPush , withPushManager ) where import Network.PushNotify.General.Types import Network.PushNotify.General.YesodPushApp im...
null
https://raw.githubusercontent.com/MarcosPividori/push-notify/4c023c3fd731178d1d114774993a5e337225baa1/push-notify-general/Network/PushNotify/General/Send.hs
haskell
| This Module define the main functions to send Push Notifications. | 'closePushService' stops the Push service. | 'withPushManager' creates a new manager, uses it in the provided function, and then releases it. | 'sendPush' sends messages to the appropiate Push Servers.
# LANGUAGE ScopedTypeVariables # module Network.PushNotify.General.Send( startPushService , closePushService , sendPush , withPushManager ) where import Network.PushNotify.General.Types import Network.PushNotify.General.YesodPushApp import Yesod import Data.Text (Text) import Data.M...
b6725df5eb8c7577a515b360ea2928af1041bcf779649ae82af4165725eac6f7
wudeng/aho-corasick
aho_corasick.erl
%% %% author: %% -module(aho_corasick). -export([ build_tree/1, match/2 ]). build aho - corasick search tree from string patterns build_tree(StringList) -> %% first build goto and output table {Goto, Output} = build_goto_output(StringList, _Goto=#{0 => #{}}, _Output=#{}, _State=0), %% then b...
null
https://raw.githubusercontent.com/wudeng/aho-corasick/a678401e6c97a020b9c6521ff97a38cb9cd73e5f/src/aho_corasick.erl
erlang
author: first build goto and output table then build failure table state 0 is the root node Ouput: State -> String Failure: State -> State try to find patterns in string build failure with bfs search find the starting point: the parent's failure node children find failure node for all children add chi...
-module(aho_corasick). -export([ build_tree/1, match/2 ]). build aho - corasick search tree from string patterns build_tree(StringList) -> {Goto, Output} = build_goto_output(StringList, _Goto=#{0 => #{}}, _Output=#{}, _State=0), Failure = build_failure(Goto), {Goto, Failure, Output}. State i...
8df036c74a00d7861b175f1ad80c1e98aa6f83a5c6d3d2d052d820ff673da768
bytekid/mkbtt
nodeGoal.ml
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * is free software : you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation , either version 3 of the License , or (...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/nodeGoal.ml
ocaml
** SUBMODULES ********************************************************* ** FUNCTIONS ********************************************************** ------------------------------------------------------------------ CREATE goal -------------------------------------...
Copyright 2010 * GNU Lesser General Public License * * This file is part of MKBtt . * * is free software : you can redistribute it and/or modify it under * the terms of the GNU Lesser General Public License as published by the * Free Software Foundation , either version 3 of the License , or (...
f8066caa3304cafda12a64bb7a42cd2749d9549b5fbe82f075c988bf5b900fae
GaloisInc/daedalus
PdfParserNotSpecialized.hs
module PdfParserNotSpecialized (module E) where import PdfValue as E import PdfDecl as E import PdfXRef as E
null
https://raw.githubusercontent.com/GaloisInc/daedalus/016da6b2de23747e48642f6ece79c07b436ef5d1/formats/pdf/old/cos/src/PdfParserNotSpecialized.hs
haskell
module PdfParserNotSpecialized (module E) where import PdfValue as E import PdfDecl as E import PdfXRef as E
2dd0c85d99546c5efdc24ed75668d41316410692522fc807ceef7b511e19d367
glv2/peercoin-vote
test.lisp
(push "../" asdf:*central-registry*) (require 'peercoin-vote) (peercoin-vote:set-testnet t) (peercoin-vote:vote "b883a8983f9f8776a8353d81518bc6aaed6b157f7bc0475e5b7d01ce87efb099" "candidates.txt" "votes.txt" "balances.txt") (quit)
null
https://raw.githubusercontent.com/glv2/peercoin-vote/f10309a3210ed06566d3f5a272ee0330f58b06cf/test/test.lisp
lisp
(push "../" asdf:*central-registry*) (require 'peercoin-vote) (peercoin-vote:set-testnet t) (peercoin-vote:vote "b883a8983f9f8776a8353d81518bc6aaed6b157f7bc0475e5b7d01ce87efb099" "candidates.txt" "votes.txt" "balances.txt") (quit)
1bb74ede45e7ff91e0108e65cc3104017d902d57006ed7c027c364421a1eaf48
metabase/metabase
format_rows_test.clj
(ns metabase.query-processor.middleware.format-rows-test (:require [clojure.test :refer :all] [java-time :as t] [metabase.driver :as driver] [metabase.query-processor-test :as qp.test] [metabase.query-processor.middleware.format-rows :as format-rows] [metabase.test :as mt])) (set! *warn-on-reflecti...
null
https://raw.githubusercontent.com/metabase/metabase/f1fa503fa31657ac7009e44fdf4053ec3cf07442/test/metabase/query_processor/middleware/format_rows_test.clj
clojure
TIMEZONE FIXME but that's not true of ALL of these. Please make sure you add a note TIMEZONE FIXME `t` = original value `expected` = the same value when shifted to `zone` results should be completely independent of the system clock
(ns metabase.query-processor.middleware.format-rows-test (:require [clojure.test :refer :all] [java-time :as t] [metabase.driver :as driver] [metabase.query-processor-test :as qp.test] [metabase.query-processor.middleware.format-rows :as format-rows] [metabase.test :as mt])) (set! *warn-on-reflecti...
c91ffaa7c4ecd1fa2f3ba3d2d11bf9a52e142cdc60460c524d32dc5df0ea7a19
wdebeaum/step
z.lisp
;;;; ;;;; W::Z ;;;; (define-words :pos W::value :boost-word t :words ( (W::Z (senses((LF-PARENT ONT::letter-symbol) (TEMPL value-templ) (PREFERENCE 0.92) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/z.lisp
lisp
W::Z
(define-words :pos W::value :boost-word t :words ( (W::Z (senses((LF-PARENT ONT::letter-symbol) (TEMPL value-templ) (PREFERENCE 0.92) ) ) ) ))
76effb02c013d532b86888c8e455b1940100df1aaabf789e60666995631b26a7
PataphysicalSociety/soupault
builtin_widgets.ml
(* This should better be a Map *) let widgets = [ ("include", Inclusion_widgets.include_file); ("insert_html", Inclusion_widgets.insert_html); ("delete_element", Html_widgets.delete_element); ("wrap", Html_widgets.wrap); ("exec", Inclusion_widgets.include_program_output); ("title", Title_widget.set_title); ...
null
https://raw.githubusercontent.com/PataphysicalSociety/soupault/e9aa46af54933d0f4b3c2de257cf40dac708bf79/src/builtin_widgets.ml
ocaml
This should better be a Map
let widgets = [ ("include", Inclusion_widgets.include_file); ("insert_html", Inclusion_widgets.insert_html); ("delete_element", Html_widgets.delete_element); ("wrap", Html_widgets.wrap); ("exec", Inclusion_widgets.include_program_output); ("title", Title_widget.set_title); ("breadcrumbs", Breadcrumbs_widg...
9e86142e835c98b153e5a1b33906006d096f803da87dab9f6d1f08fe630d854f
static-analysis-engineering/codehawk
bCHFloc.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/dd2c3b9f84b4b5f3c88898505ee912e1e461e809/CodeHawk/CHB/bchlib/bCHFloc.mli
ocaml
bchlib * A [floc] represents a function location. It can be used to access various properties about that location, such as invariants, call target and call arguments (if the instruction at the location is a call instruction), branch target (if the instruction at the location is a branch instruction),...
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Binary Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) Co...
ddc7dc7760f77ac76d7d177271fb8daf972702154646afbba3b4b6fe8a290d34
show-matz/CL-STL
cl-stl-base.lisp
(provide :cl-stl) (defpackage :cl-stl (:nicknames :stl) (:use :common-lisp :cl-overload :cl-operator) (:export :stl_version ;-------------------------------------------------------------------- ; exceptions ;-------------------------------------------------------------------- :logic_e...
null
https://raw.githubusercontent.com/show-matz/CL-STL/c6ffeac2815fa933121bc4c8b331d9c3516dff88/src/cl-stl-base.lisp
lisp
-------------------------------------------------------------------- exceptions -------------------------------------------------------------------- [0x11] -------------------------------------------------------------------- support for operators -------------------------------------------------------------------- -...
(provide :cl-stl) (defpackage :cl-stl (:nicknames :stl) (:use :common-lisp :cl-overload :cl-operator) (:export :stl_version :logic_error :domain_error :length_error :invalid_argument :out_of_range :runtime_error :range_error :overflow_error :underflow_error #-cl-st...
ead5e43e8f43c063ec06cbce0c77bd455a46354998b32b40624740ec60b6c20d
jiangpengnju/htdp2e
russinan-dolls.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-beginner-reader.ss" "lang")((modname russinan-dolls) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-de...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/arbitrarily-large-data/designing-with-self-referential-data-dafinitions/russinan-dolls.rkt
racket
about the language level of this file in a form that our tools can easily process. doll that its color is "red" and the doll inside is inside-doll. - String RD -> Number
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname russinan-dolls) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) Russian doll -- " a set of dolls of decreasing size pla...
e5be19670f3337e059d4030ed0d14b06a9bc0871a7835da75dcb0872c2e40e40
wingo/fibers
posix-clocks-darwin.scm
POSIX clocks ( ) Copyright ( C ) 2016 < > Copyright ( C ) 2020 < > Copyright ( C ) 2020 - 2022 Flaqué < > ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; ei...
null
https://raw.githubusercontent.com/wingo/fibers/36a6cc707921f4ab503965fefd096d80afee72f0/fibers/posix-clocks-darwin.scm
scheme
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See...
POSIX clocks ( ) Copyright ( C ) 2016 < > Copyright ( C ) 2020 < > Copyright ( C ) 2020 - 2022 Flaqué < > version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public License Fibers uses POSIX clocks to be able to preempt...
4a8036c4a8abd81d3e14e09bf543e2307d9167a65dd68402c891ad18df722cb4
smtcoq/smtcoq
converter.ml
(**************************************************************************) (* *) (* SMTCoq *) Copyright ( C ) 2011 - 2022 (* ...
null
https://raw.githubusercontent.com/smtcoq/smtcoq/c0a1b83a76f9cf204de434eca969948c89c44598/src/lfsc/converter.ml
ocaml
************************************************************************ SMTCoq ...
Copyright ( C ) 2011 - 2022 See file " " for the list of authors open Ast open Builtin open Format open Translator_sig module Make (T : Translator_sig.S) = struct open T module MTerm = Map.Make (Term) type env = { * map for po...
918acd7b85bc4ddf8b73e2ae6bbf8df75e228c81281c7a85b9705122c5361c7c
Trattue/oktade
Interfaces.hs
-- | -- Module: Data.Oktade.Classfile.Class.Interfaces -- License: Apache-2.0 -- -- Types and functions for parsing and unparsing the classfile interfaces. module Data.Oktade.Classfile.Class.Interfaces ( -- * Interfaces Interfaces (..), ) where import Data.Attoparsec.ByteString.Lazy (count) import Data.ByteStr...
null
https://raw.githubusercontent.com/Trattue/oktade/95026501d01c6ffba6ad0e1318b20d47830a7d76/src/Data/Oktade/Classfile/Class/Interfaces.hs
haskell
| Module: Data.Oktade.Classfile.Class.Interfaces License: Apache-2.0 Types and functions for parsing and unparsing the classfile interfaces. * Interfaces ------------------------------------------------------------------------------ Interfaces ---------------------------------------------------------------------...
module Data.Oktade.Classfile.Class.Interfaces Interfaces (..), ) where import Data.Attoparsec.ByteString.Lazy (count) import Data.ByteString.Builder (word16BE) import Data.Oktade.ByteParser (anyWord16) import Data.Oktade.Classfile.Class.Parse (Parse (..), Unparse (..)) import Data.Oktade.Classfile.Metadata.Const...
c6cef2ef0a8573564d7f585bb4316700fa42ae56bf00bf1b500fbacb860fd8cc
aaronallen8455/hi-fi
GhcFacade.hs
# LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE CPP # module HiFi.GhcFacade ( module Ghc , getFieldPair , extractName , pattern HsPar' , mkStringExprFS' , mkTcPluginSolveResult , findImportedModule' , initDsTc' , adaptSolver ) where #if MIN_VERSION_ghc(9,4,0) import G...
null
https://raw.githubusercontent.com/aaronallen8455/hi-fi/2096083fede383d355c621eb6aadc56604fb35ad/src/HiFi/GhcFacade.hs
haskell
# LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE CPP # module HiFi.GhcFacade ( module Ghc , getFieldPair , extractName , pattern HsPar' , mkStringExprFS' , mkTcPluginSolveResult , findImportedModule' , initDsTc' , adaptSolver ) where #if MIN_VERSION_ghc(9,4,0) import G...
35d9d8b8d0bd7b925f0362f3dea29c749f46452b1befaffb38c80dc5a1fc5a88
dfordivam/tenjinreader
ReadingPane.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoImplicitPrelude # # LANGUAGE PartialTypeSignatures # {-# LANGUAGE MultiWayIf #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE RecursiveDo # # LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDerivin...
null
https://raw.githubusercontent.com/dfordivam/tenjinreader/894a6f6b23d52c9c048740c0ea62f4c0f47d9561/android/src/ReadingPane.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE MultiWayIf # Outside hidden => (e, e) -> _ setupInterObs ind options action = do cb <- DOM.newIntersectionObserverCallback DOM.newIntersectionObserver cb (Just options) intersectionObsCallback (ie,oe) action (e:_) _ = do rx <- DOM.getX =<< DOM.getRootBounds ...
# LANGUAGE NoImplicitPrelude # # LANGUAGE PartialTypeSignatures # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE RecursiveDo # # LANGUAGE CPP # # LANGUAGE GeneralizedNewtypeDeriving # module ReadingPane where import FrontendCommon import qua...
dd89b40cea59d279442d4930b4e813159c4e0e35cb94a322b09ce89aef8fee2b
hachreak/stepflow
stepflow_interceptor.erl
%%%------------------------------------------------------------------- @doc stepflow interceptor %% @end %%%------------------------------------------------------------------- -module(stepflow_interceptor). -author('Leonardo Rossi <>'). -export([ init/2, init_all/1, intercept/2, transform/2 ]). -type even...
null
https://raw.githubusercontent.com/hachreak/stepflow/4e0b2cec68343f24809a21b3bb1708baf805d04a/src/stepflow_interceptor.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- Callbacks ==================================================================== API ==================================================================== ========================...
@doc stepflow interceptor -module(stepflow_interceptor). -author('Leonardo Rossi <>'). -export([ init/2, init_all/1, intercept/2, transform/2 ]). -type event() :: stepflow_event:event(). -type ctx() :: any(). -type itctx() :: #{module => atom(), ctx => ctx()}. -callback handle_init(ctx()) -> {ok, ctx(...
92a960c7c138213a6697f690ed504a16300e2e79fe8f562b1a4fa443c82511e7
xtdb/core2
temporal.clj
(ns core2.temporal (:require [clojure.tools.logging :as log] core2.buffer-pool [core2.metadata :as meta] [core2.temporal.grid :as grid] [core2.temporal.kd-tree :as kd] [core2.types :as types] [core2.util :as util] [core2.vector :as ve...
null
https://raw.githubusercontent.com/xtdb/core2/5546a6c215631fbe4e5e67a2beb11e023dd01f11/core/src/main/clojure/core2/temporal.clj
clojure
Temporal proof-of-concept plan: timestamped tuple approach, which is the relation we want scan to described in the paper for snapshot equivalent representations, and that serves as a good reference, but not practical. The only update that needs to happen to the append only data is rows. Working around this is wha...
(ns core2.temporal (:require [clojure.tools.logging :as log] core2.buffer-pool [core2.metadata :as meta] [core2.temporal.grid :as grid] [core2.temporal.kd-tree :as kd] [core2.types :as types] [core2.util :as util] [core2.vector :as ve...
6cfad6b2c9c45468c356dacba375c90b41332b395c819c4a34fc0ca61e705c19
erlang/rebar3
rebar_prv_clean.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% ex: ts=4 sw=4 et -module(rebar_prv_clean). -behaviour(provider). -export([init/1, do/1, format_error/1]). -include("rebar.hrl"). -define(PROVIDER, clean). -define(DEPS, [app_discovery, install_deps]). %% ========================...
null
https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/rebar_prv_clean.erl
erlang
ex: ts=4 sw=4 et =================================================================== Public API =================================================================== =================================================================== =================================================================== nothing submi...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(rebar_prv_clean). -behaviour(provider). -export([init/1, do/1, format_error/1]). -include("rebar.hrl"). -define(PROVIDER, clean). -define(DEPS, [app_discovery, install_deps]). -spec init(rebar_state:t()) -> {ok, rebar_stat...
d6867607b8a835c1c4d7b7d377fe64136ad5150d45d91255654feb7e22b90c51
phadej/cabal-extras
Main.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} -- | Copyright : -- License: GPL-2.0-or-later module CabalHie.Main (main) where import Peura import Prelude () import Control.Applicative ((<**>)) import Data.Version (showVersion) impor...
null
https://raw.githubusercontent.com/phadej/cabal-extras/bb82ebb7fdaa939c27762e10cb4cad49249b553f/cabal-hie/src/CabalHie/Main.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # | License: GPL-2.0-or-later ----------------------------------------------------------------------------- Options parser ----------------------------------------------------------------------------- ----------...
Copyright : module CabalHie.Main (main) where import Peura import Prelude () import Control.Applicative ((<**>)) import Data.Version (showVersion) import qualified Cabal.Plan as Plan import qualified Data.Aeson as A import qualified Data.Map.Strict as Map import qualif...
cd1b4237086923b1df84f7fca7b171690b7a473eaa205c9392a4b8c9dbc88e8d
DestyNova/advent_of_code_2021
Part2ST.hs
module Main where import Text.Parsec import Data.List (group, sort) import qualified Data.Array.Unboxed as A import Data.Array.Unboxed ((//), (!)) import Data.Array.ST import Control.Monad.ST import Data.Bits ((.|.), shiftL) import Control.Monad (foldM) type Table s = STArray s Int (Int,Int) type Score = (Int, Int) ...
null
https://raw.githubusercontent.com/DestyNova/advent_of_code_2021/f9e9c908d38b15a800653711727e76d567883af9/day21/Part2ST.hs
haskell
module Main where import Text.Parsec import Data.List (group, sort) import qualified Data.Array.Unboxed as A import Data.Array.Unboxed ((//), (!)) import Data.Array.ST import Control.Monad.ST import Data.Bits ((.|.), shiftL) import Control.Monad (foldM) type Table s = STArray s Int (Int,Int) type Score = (Int, Int) ...
5cf5bf22104bc548d6067753bb3b13e90b5031761d677eee118b7e12f4099b35
cloudkj/lambda-ml
binary_tree.clj
(ns lambda-ml.data.binary-tree) (defn make-tree ([val] (make-tree val nil nil)) ([val left right] (vector val left right))) (defn get-value [tree] (nth tree 0)) (defn get-left [tree] (nth tree 1)) (defn get-right [tree] (nth tree 2)) (defn get-path [tree paths] (->> paths (map (fn ...
null
https://raw.githubusercontent.com/cloudkj/lambda-ml/a470a375d2b94f5e5e623a5e198ac312b018ffb3/src/lambda_ml/data/binary_tree.clj
clojure
(ns lambda-ml.data.binary-tree) (defn make-tree ([val] (make-tree val nil nil)) ([val left right] (vector val left right))) (defn get-value [tree] (nth tree 0)) (defn get-left [tree] (nth tree 1)) (defn get-right [tree] (nth tree 2)) (defn get-path [tree paths] (->> paths (map (fn ...
e4bcf4dc5b6104f56b5e659847b54e185b2e911bf08841456ab45844fdc15a72
benoitc-attic/barrel_tcp
echo_handler.erl
-module(echo_handler). -export([init/4]). init(_Ref, Transport, Socket, _Opts) -> wait_request(Transport, Socket). wait_request(Transport, Socket) -> case Transport:recv(Socket, 0, 30000) of {ok, <<".\r\n">>} -> io:format("remote exited", []), Transport:close(Socket); ...
null
https://raw.githubusercontent.com/benoitc-attic/barrel_tcp/e689d0f4286b97462e0fda455f87501dc0ef4487/example/echo/src/echo_handler.erl
erlang
-module(echo_handler). -export([init/4]). init(_Ref, Transport, Socket, _Opts) -> wait_request(Transport, Socket). wait_request(Transport, Socket) -> case Transport:recv(Socket, 0, 30000) of {ok, <<".\r\n">>} -> io:format("remote exited", []), Transport:close(Socket); ...
85c899978734d4fc9ae455b1548cdba229c1b07950aa39d4136d0715891b979e
vouillon/animals
download.ml
#! /usr/bin/ocaml unix.cma #load "str.cma" let success = ref true let _ = if Array.length Sys.argv < 3 then begin Format.eprintf "Usage: %s <refs> <cache_dir>@." Sys.argv.(0); exit 1 end let http_get url file = let tmp = file ^ ".tmp" in let res = Sys.command (Format.sprintf "curl -f -# -o %s '%s'" tmp url) ...
null
https://raw.githubusercontent.com/vouillon/animals/8dc1863e802c00aad352ca39ec2cd33a8c5565ec/tools/download.ml
ocaml
Format.printf "%s@." l;
#! /usr/bin/ocaml unix.cma #load "str.cma" let success = ref true let _ = if Array.length Sys.argv < 3 then begin Format.eprintf "Usage: %s <refs> <cache_dir>@." Sys.argv.(0); exit 1 end let http_get url file = let tmp = file ^ ".tmp" in let res = Sys.command (Format.sprintf "curl -f -# -o %s '%s'" tmp url) ...
70b3c6b84a43268fca7c6e372ea359074f06dfd615c64c171183a0b8e61ea2d6
lispnik/cl-http
odbc-package.lisp
;;;-*- Mode: Lisp; Package: COMMON-LISP-USER -*- ODBC module for MCL , LWW and ACL / Windows Version 0.85 Copyright ( C ) 1999 . All rights reserved . ;; ;; ;; Documentation and the license agreement can be found in file ;; "sql-odbc-documentation.lisp". ;; Bug reports and suggestions are highly welcome. (i...
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/contrib/pmeurer/sql/odbc/odbc-package.lisp
lisp
-*- Mode: Lisp; Package: COMMON-LISP-USER -*- Documentation and the license agreement can be found in file "sql-odbc-documentation.lisp". Bug reports and suggestions are highly welcome. "DB-QUERY-PARAMETERIZED" "SQL-CHUNK-STREAM" "CHUNK-LENGTH" "DB-OPEN-STREAM" ;"DB-CLOSE-STREAM" "%PREPARE-QUERY-VARS"
ODBC module for MCL , LWW and ACL / Windows Version 0.85 Copyright ( C ) 1999 . All rights reserved . (in-package :common-lisp-user) (defpackage "ODBC" (:use "SQL" "COMMON-LISP" #+mcl "CCL" "FFC") (:import-from "SQL" "DB-DISCONNECT" "DB-COMMIT" "DB-ROLLBACK" "DB-OPEN-QUER...
39bd9a69f30d3689d7968b56d6a1f424727d975f1ef9aeee755b128388abf29a
janestreet/base
or_error.mli
* Type for tracking errors in an [ Error.t ] . This is a specialization of the [ Result ] type , where the [ Error ] constructor carries an [ Error.t ] . A common idiom is to wrap a function that is not implemented on all platforms , e.g. , { [ do_something_linux_specific : ( unit - > unit ) ] } ...
null
https://raw.githubusercontent.com/janestreet/base/2f24978c4282695e56fba8f27eb4480113481d01/src/or_error.mli
ocaml
* Serialization and comparison of an [Error] force the error's lazy message. * [Applicative] functions don't have quite the same semantics as [Applicative.Of_Monad(Or_error)] would give -- [apply (Error e1) (Error e2)] returns the combination of [e1] and [e2], whereas it would only return [e1] if it were defin...
* Type for tracking errors in an [ Error.t ] . This is a specialization of the [ Result ] type , where the [ Error ] constructor carries an [ Error.t ] . A common idiom is to wrap a function that is not implemented on all platforms , e.g. , { [ do_something_linux_specific : ( unit - > unit ) ] } ...
d8f71d452ad6c0cd161fadc9dcee2144a64957df408fe9064972f5c7a3de154b
glv/snergly
core.clj
(ns snergly.core (:refer-clojure :exclude [parse-opts]) (:require [clojure.string :as string] [clojure.tools.cli :refer [parse-opts]] [snergly.algorithms :refer :all] [snergly.grid :as grid] [snergly.image :as image] [snergly.util :as util]) (:import [ja...
null
https://raw.githubusercontent.com/glv/snergly/2f09860b3b3f8d2a58d8a2b2b63184c4a7240f05/src/main/snergly/core.clj
clojure
Handle help and error conditions Execute program with options
(ns snergly.core (:refer-clojure :exclude [parse-opts]) (:require [clojure.string :as string] [clojure.tools.cli :refer [parse-opts]] [snergly.algorithms :refer :all] [snergly.grid :as grid] [snergly.image :as image] [snergly.util :as util]) (:import [ja...
cfb691c7d5e891579d1afa386f4272d41de2062c6fbba31486619c5abb10030e
drpjm/kalman-filter
project.clj
(defproject kalman-filter "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [net.mikera/core.matrix "0.32.1"] [net.mikera/vectorz-clj "0.28.0"] ...
null
https://raw.githubusercontent.com/drpjm/kalman-filter/16536cc50cf58ef6ea09a3144ed850b975a0badb/project.clj
clojure
(defproject kalman-filter "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.6.0"] [net.mikera/core.matrix "0.32.1"] [net.mikera/vectorz-clj "0.28.0"] ...
550355782442bde22da02234902915cb567f5e25d499c1a14ae4217bf81cb1d3
argp/bap
batComplex.mli
* BatComplex - Extended Complex * Copyright ( C ) 2007 Bluestorm < bluestorm dot dylc on - the - server gmail dot com > * 2008 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by t...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batComplex.mli
ocaml
* Additional and modified functions for complex numbers. * The complex number [0]. * The complex number [i]. * Unary negation. * Conjugate: given the complex [x + i.y], returns [x - i.y]. * Addition * Subtraction * Multiplication * Multiplicative inverse ([1/z]). * Division * Square root. The result [x + i.y]...
* BatComplex - Extended Complex * Copyright ( C ) 2007 Bluestorm < bluestorm dot dylc on - the - server gmail dot com > * 2008 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by t...
6b5107a3846572c0bf4c08d907495bf4d1ff83065ef247165229d28f87aed648
mmontone/gestalt
package.lisp
(defpackage stm (:use :common-lisp :gst.util :sb-mop :log5 :alexandria) (:export #:stm #:with-stm-vars #:let-stm-vars #:using-stm-vars #:atomically #:begin-stm-transaction #:rollback-stm-transaction #:commit-stm-transaction #:defunstm #:value #:with-bindings-as-stm-vars #:no-...
null
https://raw.githubusercontent.com/mmontone/gestalt/fd019c0ca03b4efc73b9ddd3db1e3ed211233428/deps/stm/package.lisp
lisp
(defpackage stm (:use :common-lisp :gst.util :sb-mop :log5 :alexandria) (:export #:stm #:with-stm-vars #:let-stm-vars #:using-stm-vars #:atomically #:begin-stm-transaction #:rollback-stm-transaction #:commit-stm-transaction #:defunstm #:value #:with-bindings-as-stm-vars #:no-...
f24dea3273b66bec860fb4684b7f9a4f3190fd10d6568673ab165b8630eb7887
takeoutweight/clojure-scheme
string_test.cljs
(ns clojure.string-test (:require [clojure.string :as s])) (defn test-string [] ;; reverse (assert (= "" (s/reverse ""))) (assert (= "tab" (s/reverse "bat"))) ;; replace (assert (= "faabar" (s/replace "foobar" \o \a))) (assert (= "barbarbar" (s/replace "foobarfoo" "foo" "bar"))) (assert (= "FOObarFOO...
null
https://raw.githubusercontent.com/takeoutweight/clojure-scheme/6121de1690a6a52c7dbbe7fa722aaf3ddd4920dd/test/cljscm/clojure/string_test.cljs
clojure
reverse replace join capitalize split split-lines blank escape replace-first trim trim-newline
(ns clojure.string-test (:require [clojure.string :as s])) (defn test-string [] (assert (= "" (s/reverse ""))) (assert (= "tab" (s/reverse "bat"))) (assert (= "faabar" (s/replace "foobar" \o \a))) (assert (= "barbarbar" (s/replace "foobarfoo" "foo" "bar"))) (assert (= "FOObarFOO" (s/replace "foobarfoo" #...
2e499cd92eb48774a897ac55c8ae8fa67d157df06ba1dddea89a77c0d28ed9e5
xvw/preface
void.ml
type t = | let absurd : t -> 'a = function _ -> . let left x = Stdlib.Either.fold ~left:Fun.id ~right:absurd x let right x = Stdlib.Either.fold ~left:absurd ~right:Fun.id x
null
https://raw.githubusercontent.com/xvw/preface/ece0829c9ede3e5a4975df3864edb657b96fe82c/lib/preface_core/void.ml
ocaml
type t = | let absurd : t -> 'a = function _ -> . let left x = Stdlib.Either.fold ~left:Fun.id ~right:absurd x let right x = Stdlib.Either.fold ~left:absurd ~right:Fun.id x
467927ef264f99a5100d397530247e372ff7f49719e38e22a30c2bc8bc83ac04
Ailrun/core-lang-haskell
StatHeap.hs
-- | This module is for exercise 2.7 module Data.StatHeap ( statHInitial , statHAlloc , statHUpdate , statHFree , statHLookup , statHAddresses , statHSize , statHNull , statHIsNull , statHGetStats , StatHeap , statHSInitial , statHSIncHAlloc , statHSGetHAlloc , statHSIncHUpdate , stat...
null
https://raw.githubusercontent.com/Ailrun/core-lang-haskell/f6f700ad08fe31bd765381b7e18b747ff2f07c44/src/Data/StatHeap.hs
haskell
| The number of heap allocations The number of heap updates The number of heap frees
This module is for exercise 2.7 module Data.StatHeap ( statHInitial , statHAlloc , statHUpdate , statHFree , statHLookup , statHAddresses , statHSize , statHNull , statHIsNull , statHGetStats , StatHeap , statHSInitial , statHSIncHAlloc , statHSGetHAlloc , statHSIncHUpdate , statHSGet...
3467568a713dff369f33cc10198a81ec76f7007205de85239ee771fdf4ce4a4d
VisionsGlobalEmpowerment/webchange
views.cljs
(ns webchange.ui.components.info.views (:require [reagent.core :as r] [webchange.ui.components.icon.views :refer [system-icon]] [webchange.ui.utils.get-class-name :refer [get-class-name]])) (defn info [{:keys [class-name]}] (->> (r/current-component) (r/children) (into [:div {:class-nam...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/5d5b492712fe34db3ea3b23230c8ad87f94e5865/src/cljs/webchange/ui/components/info/views.cljs
clojure
(ns webchange.ui.components.info.views (:require [reagent.core :as r] [webchange.ui.components.icon.views :refer [system-icon]] [webchange.ui.utils.get-class-name :refer [get-class-name]])) (defn info [{:keys [class-name]}] (->> (r/current-component) (r/children) (into [:div {:class-nam...
1744831b03f9f745ceaaae967de8ff610a0ba6460cece1488cafd97cecfdccdf
takikawa/tr-pfds
stream.rkt
#lang typed/racket (provide empty-stream? empty-stream stream-cons stream-car stream-cdr stream-append stream-reverse stream stream->list drop take Stream #;stream-map #;stream-foldl #;stream-foldr) (define-type (Stream A) (Rec Stream (U Null (Boxof (U (-> (Pair A Stream)) ...
null
https://raw.githubusercontent.com/takikawa/tr-pfds/1630af681e6bef5e75503649100b7f0d32a2e9fc/pfds/stream.rkt
racket
stream-map #;stream-foldl #;stream-foldr) (: stream-map : (All (A C B ...) ((A B ... B -> C) (Stream A) (Stream B) ... B -> (Stream C)))) empty (delay (make-InStream (apply func ...
#lang typed/racket (provide empty-stream? empty-stream stream-cons stream-car stream-cdr stream-append stream-reverse stream stream->list drop take Stream (define-type (Stream A) (Rec Stream (U Null (Boxof (U (-> (Pair A Stream)) (Pair A Stream)))))) (define empt...
ae1855a620042e8888e1cebaf7b41f235e689eba59a0b5ca1fb88e49fdce5702
ekmett/ekmett.github.com
Based.hs
------------------------------------------------------------------------------------------- -- | -- Module : Control.Category.Based Copyright : 2008 -- License : BSD -- Maintainer : < > -- Stability : experimental -- Portability : non-portable (class-associated types) -- -- This is the notion of a pointed ...
null
https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/categories/_darcs/pristine/src/Control/Category/Based.hs
haskell
----------------------------------------------------------------------------------------- | Module : Control.Category.Based License : BSD Stability : experimental Portability : non-portable (class-associated types) This is the notion of a pointed category from topology. Maps of pointed spaces that preserve ba...
Copyright : 2008 Maintainer : < > module Control.Category.Based where import Prelude hiding (Functor, map) import qualified Prelude import Control.Category import Control.Category.Functor class Category k => Based k where #ifndef __HADDOCK__ type Base k :: * #endif base :: k (Base k) (Base k) class ...
40f76bd6cf84a07f07206a30f09b0b71fe8d3a64171b7ee1c66c21222e3d39ba
ozusrl/SubtypedQuotedML
translate.ml
open Common let last_env_var = ref 0 let env_var _ = let r = !last_env_var in last_env_var := r + 1; "r" ^ (string_of_int r) let last_hole_var = ref 0 let hole_var _ = let r = !last_hole_var in last_hole_var := r + 1; "h" ^ (string_of_int r) type ctx = | Ctx of (id * exp) (* hole variable, box value *) ...
null
https://raw.githubusercontent.com/ozusrl/SubtypedQuotedML/7b09eb5518dea21fda3dc9db3b966a17225d91ff/src/staged/translate.ml
ocaml
hole variable, box value translate multi-staged language to language with records
open Common let last_env_var = ref 0 let env_var _ = let r = !last_env_var in last_env_var := r + 1; "r" ^ (string_of_int r) let last_hole_var = ref 0 let hole_var _ = let r = !last_hole_var in last_hole_var := r + 1; "h" ^ (string_of_int r) type ctx = | CtxL of (id * ctx * exp) type ctxs = ctx list le...
bfa11d0ecdee9866b7d07031e97013a4f34ef064ecda4d083c28b6a55492b2ac
basho-labs/mesos-erlang
erl_mesos_scheduler_sup.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2016 Basho Technologies Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file %% except in compliance with the License. You may obtain %...
null
https://raw.githubusercontent.com/basho-labs/mesos-erlang/b90bf62c2d614f12a0ac3cd55a915b3737198da5/src/erl_mesos_scheduler_sup.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the ...
Copyright ( c ) 2016 Basho Technologies Inc. All Rights Reserved . This file is provided to you under the Apache License , software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @private -module(erl_mesos_scheduler_sup). -behaviour(supervisor)....
eb01d1009f1f852c269c6993a558c04b220eb90388af0b2c57c2d17ee1ccc9e9
garrigue/labltk
mytypes.mli
(*************************************************************************) (* *) (* OCaml LablTk library *) (* *) ,...
null
https://raw.githubusercontent.com/garrigue/labltk/c7f50b4faed57f1ac03cb3c9aedc35b10d36bdb6/browser/mytypes.mli
ocaml
*********************************************************************** OCaml LablTk library ...
, Kyoto University RIMS Copyright 1999 Institut National de Recherche en Informatique et en Automatique and Kyoto University . All rights reserved . This file is distributed under the terms of the GNU Library $ Id$ open Widget type edit_window...
79ccbc9c4b11e7f8adc22f294a1add16eac27b33a2a0364cbdbd9bae6f9373e1
adityaathalye/sicp
ex1-38-eulers-expansion.scm
Ex . 1.38 Euler 's Expansion ; With cont-frac (recursive) as reference, Ni = 1 always Di = 1,2,1,1,4,1,1,6,1,1,8,1,1 .... For reference : e = 2.71828183 (define (eulers-expansion cont-frac times) (+ 2.0 (cont-frac (lambda (i) (if (= (remainder (+ i 1) 3) 0) (* (...
null
https://raw.githubusercontent.com/adityaathalye/sicp/c8b62c366dade1d5101238a32267dab177808105/ex1-38-eulers-expansion.scm
scheme
With cont-frac (recursive) as reference, d n
Ex . 1.38 Euler 's Expansion Ni = 1 always Di = 1,2,1,1,4,1,1,6,1,1,8,1,1 .... For reference : e = 2.71828183 (define (eulers-expansion cont-frac times) (+ 2.0 (cont-frac (lambda (i) (if (= (remainder (+ i 1) 3) 0) (* (/ (+ i 1) 3) 2) times))) (...
84723e807eb2a212eab7552270318d91b2219a665a4078c055ca805f40ce5d4c
jamesmacaulay/shopify-clj
auth.clj
(ns shopify.auth (:require [clojure.string :as str] digest)) (defn verify-params "Uses your shared secret to verify that a signed map of query params is from Shopify." [secret params] (let [signature (:signature params) params (dissoc params :signature) join-keypair (comp (partial s...
null
https://raw.githubusercontent.com/jamesmacaulay/shopify-clj/dcac775d260e4a7f4d54e0fd2aa84f74c864e338/src/shopify/auth.clj
clojure
(ns shopify.auth (:require [clojure.string :as str] digest)) (defn verify-params "Uses your shared secret to verify that a signed map of query params is from Shopify." [secret params] (let [signature (:signature params) params (dissoc params :signature) join-keypair (comp (partial s...
642745897a8270c4765e4880fa45967ff4658d50b02ee19c1f0fb402575e4f78
alex-gutev/generic-cl
package.lisp
package.lisp ;;;; Copyright 2018 ;;;; ;;;; Permission is hereby granted, free of charge, to any person ;;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;;;; restriction, including without limitation the rights to use, ;;;; copy, mod...
null
https://raw.githubusercontent.com/alex-gutev/generic-cl/e337b8d2198791994f4377a522bf0200d2285548/src/collector/package.lisp
lisp
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 Software is furnished to do so, subject to the following condi...
package.lisp Copyright 2018 files ( the " Software " ) , to deal in the Software without copies of the Software , and to permit persons to whom the included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (uiop:define-package :ge...
65c4d254de9110bf4e88e0d44c30bfed8633ae13fec4738ec291217bec88336a
yrashk/erlang
queue.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/stdlib/src/queue.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(queue). -export([new/0,is_queue/1,...
23c44c2ed72a6c5abe5af9b249d3e4b020a948af2d9e9451351d6072edcea762
kazu-yamamoto/dns
SimpleServer.hs
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative import Control.Concurrent import Control.Monad import Data.IP (IPv4) import Data.Maybe import Network.DNS hiding (lookup) import Network.Socket hiding (recvFrom) import Network.Socket.ByteString import System.Environment import System.Timeout import qualifi...
null
https://raw.githubusercontent.com/kazu-yamamoto/dns/067e91ae552d70eaeea890b2c78f983519a824db/examples/SimpleServer.hs
haskell
# LANGUAGE OverloadedStrings #
import Control.Applicative import Control.Concurrent import Control.Monad import Data.IP (IPv4) import Data.Maybe import Network.DNS hiding (lookup) import Network.Socket hiding (recvFrom) import Network.Socket.ByteString import System.Environment import System.Timeout import qualified Data.ByteString as S data Conf ...
8f79e1600ebe4fe6c2f9ceb48a80f58a6145fc0307f920dd2374c07541d02598
tonymorris/geo-osm
ChangesetL.hs
-- | Values with a @changeset@ optional string accessor. module Data.Geo.OSM.Lens.ChangesetL where import Control.Lens.Lens class ChangesetL a where changesetL :: Lens' a (Maybe String)
null
https://raw.githubusercontent.com/tonymorris/geo-osm/776542be2fd30a05f0f9e867128eca5ad5d66bec/src/Data/Geo/OSM/Lens/ChangesetL.hs
haskell
| Values with a @changeset@ optional string accessor.
module Data.Geo.OSM.Lens.ChangesetL where import Control.Lens.Lens class ChangesetL a where changesetL :: Lens' a (Maybe String)