_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
5e937c8797ecf33d9b1a5dec21c62586d49cb0e53cb64e1e789287fc460b9b1d
airbus-seclab/bincat
version.mli
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language well - suited for static analysis . Copyright ( C ) 2007 , 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 Fr...
null
https://raw.githubusercontent.com/airbus-seclab/bincat/493a03890b3b472fd198ce58c7e9280abd0f9f93/ocaml/src/npk/version.mli
ocaml
C2Newspeak : compiles C code into Newspeak . Newspeak is a minimal language well - suited for static analysis . Copyright ( C ) 2007 , 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 Fr...
f358c7b286626a642b7c6ed1be17b4bc0532b37411a57e3537306c773ecd7025
CardanoSolutions/kupo
Point.hs
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - orphans # module Kupo.Data.Cardano.Point ( pattern BlockPoint , pattern GenesisPoint , module Kupo.Data.Cardano.Point , pointSlot ) where import Kupo.Prelude import Cardano.Slotting.Slot ( WithOrigin (..) ) import Kupo.Data.Cardano....
null
https://raw.githubusercontent.com/CardanoSolutions/kupo/fd1cc035e6c6d703bb9d96caf97013490c305967/src/Kupo/Data/Cardano/Point.hs
haskell
- "origin" → for a points that refers to the beginning of the blockchain refers to a specific point on chain identified by this slot number and header hash.
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - orphans # module Kupo.Data.Cardano.Point ( pattern BlockPoint , pattern GenesisPoint , module Kupo.Data.Cardano.Point , pointSlot ) where import Kupo.Prelude import Cardano.Slotting.Slot ( WithOrigin (..) ) import Kupo.Data.Cardano....
c79e5d1cf65175bb8ed7e78074e847f0874519d7fda6bf86aaa9d861e65be9fc
unclebob/wator
water_imp.clj
(ns wator.water-imp (:require [wator [cell :as cell] [water :as water] [fish :as fish] [config :as config]])) (defmethod cell/tick ::water/water [water loc world] (if (> (rand) config/water-evolution-rate) [nil {loc (fish/make)}] [nil {loc water}]))
null
https://raw.githubusercontent.com/unclebob/wator/3c45455647deb1364e3102e189d0cf10340ceeb4/src/wator/water_imp.clj
clojure
(ns wator.water-imp (:require [wator [cell :as cell] [water :as water] [fish :as fish] [config :as config]])) (defmethod cell/tick ::water/water [water loc world] (if (> (rand) config/water-evolution-rate) [nil {loc (fish/make)}] [nil {loc water}]))
682b0d13075d4710bab101d7cabbb804d977bce612f9b5347e06814b8e8e5dab
racket/redex
rvm-3.rkt
#lang racket/base (require redex/benchmark "util.rkt" redex/reduction-semantics) (provide (all-defined-out)) (define the-error "application slots not initialized properly") applies in 3 places (define-rewrite bug3 (abs-push n not s) ==> (abs-push n uninit s)) (define-rewrite bug3-jdg (a...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-benchmark/redex/benchmark/models/rvm/rvm-3.rkt
racket
#lang racket/base (require redex/benchmark "util.rkt" redex/reduction-semantics) (provide (all-defined-out)) (define the-error "application slots not initialized properly") applies in 3 places (define-rewrite bug3 (abs-push n not s) ==> (abs-push n uninit s)) (define-rewrite bug3-jdg (a...
0774a3a9c8f3bd449c01ca26af50758056120032e412140f8c871adc10250be7
singleheart/programming-in-haskell
ex6b.hs
concat' :: [[a]] -> [a] concat' [] = [] concat' [x] = x concat' (x:xs) = x ++ concat' xs
null
https://raw.githubusercontent.com/singleheart/programming-in-haskell/80c7efc0425babea3cd982e47e121f19bec0aba9/ch06/ex6b.hs
haskell
concat' :: [[a]] -> [a] concat' [] = [] concat' [x] = x concat' (x:xs) = x ++ concat' xs
e0f6d1c05d97ceb5197c3b768a48807989c85e8a95450ef928fd8632b43b65b9
thobbs/genartlib
core.clj
(ns sketch.core (:require [quil.core :as q] [sketch.dynamic :as dynamic]) (:gen-class)) (q/defsketch example :title "Sketch" :setup dynamic/setup :draw dynamic/draw ; :renderer :p2d :size [1400 1400]) (defn refresh [] (use :reload 'ske...
null
https://raw.githubusercontent.com/thobbs/genartlib/032f685b326ef56235e1dc1198cacf02264d3c39/project-template/src/clj/sketch/core.clj
clojure
:renderer :p2d
(ns sketch.core (:require [quil.core :as q] [sketch.dynamic :as dynamic]) (:gen-class)) (q/defsketch example :title "Sketch" :setup dynamic/setup :draw dynamic/draw :size [1400 1400]) (defn refresh [] (use :reload 'sketch.dynamic) (.redraw exampl...
98eb88b230d328e7cd1e0bcd8ac8d5247ba8d6e3e4aa6eda8577f533a5b6954c
kelamg/HtDP2e-workthrough
ex323.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex323) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex323.rkt
racket
about the language level of this file in a form that our tools can easily process. – NONE produces true if n is contained in bt #false if n is not in bt
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex323) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (define-struct no-info []) (define NONE (make-no-info)...
f1f2fda85166bd477e3c4b47e23328f144e74f77cb0ec4d3e9b7d27b090cc4ee
vagarenko/static-tensor
Snoc_1.hs
# LANGUAGE TypeApplications # {-# LANGUAGE TypeInType #-} module CoreDump.Tensor.Snoc_1 where import Data.Tensor.Static import TensorInstances () snoc_1_ :: Tensor '[2, 3, 4] Float -> Tensor '[2, 4] Float -> Tensor '[2, 4, 4] Float snoc_1_ st t = snoc @1 st t
null
https://raw.githubusercontent.com/vagarenko/static-tensor/8409d281707c23f3fe2028e926f1d4e8f7a9bc2d/tests/CoreDump/Tensor/Snoc_1.hs
haskell
# LANGUAGE TypeInType #
# LANGUAGE TypeApplications # module CoreDump.Tensor.Snoc_1 where import Data.Tensor.Static import TensorInstances () snoc_1_ :: Tensor '[2, 3, 4] Float -> Tensor '[2, 4] Float -> Tensor '[2, 4, 4] Float snoc_1_ st t = snoc @1 st t
386f54ac32ea0025a98d120720f4829e05c36835d4945391f2f71cd6f0bf2de7
kazzmir/master-of-magic
exdata.ml
Example program for the Allegro library , by . * * This program demonstrates how to access the contents of an * Allegro datafile ( created by the grabber utility ) . The example * loads the file ` example.dat ' , then blits a bitmap and shows * a font , both from this datafile . * * Th...
null
https://raw.githubusercontent.com/kazzmir/master-of-magic/830bfd1c549a5ac7370fa6a72bb06be5d3435fa0/lib/ocaml-allegro-20080222/ml_examples/exdata.ml
ocaml
the grabber allegro program produces a C header "example.h", * which contains defines for the names of all the objects in * the datafile (BIG_FONT, SILLY_BITMAP, etc), that are here used * as indexes. load the datafile into memory select the palette which was loaded from the datafile display the bitmap from ...
Example program for the Allegro library , by . * * This program demonstrates how to access the contents of an * Allegro datafile ( created by the grabber utility ) . The example * loads the file ` example.dat ' , then blits a bitmap and shows * a font , both from this datafile . * * Th...
f807adff5d19d0f6036c275bfcaef8e1757637b9acc94fac0ec23e0e6556e9d1
lpeterse/haskell-socket
HelloWorldServer.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Control.Exception ( bracket, catch ) import Control.Monad ( forever ) import System.Socket import System.Socket.Family.Inet6 import System.Socket.Type.Stream import System.Socket.Protocol.TCP main :: IO () main = bracket ( socket :: IO (Socket Inet6 Strea...
null
https://raw.githubusercontent.com/lpeterse/haskell-socket/1d6afa0ec7804c113b70b283ac5ed4bd884be290/examples/HelloWorldServer.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Control.Exception ( bracket, catch ) import Control.Monad ( forever ) import System.Socket import System.Socket.Family.Inet6 import System.Socket.Type.Stream import System.Socket.Protocol.TCP main :: IO () main = bracket ( socket :: IO (Socket Inet6 Stream TCP) ) ( \s-> do close s ...
53b611c816316177132d57a082afa7794745cef5f560eda14659e538531ef5a0
darrenldl/ocaml-lxc
ffi_bindings.ml
open Ctypes open Types module Fun_stubs (F : Cstubs.FOREIGN) = struct open F let free = foreign "free" (ptr char @-> returning void) let strlen = foreign "strlen" (ptr char @-> returning long) let get_lxc_attach_options_default__glue = foreign "get_lxc_attach_options_default__glue" (void @-> retur...
null
https://raw.githubusercontent.com/darrenldl/ocaml-lxc/b3dd6155c39723930325bf87e081641d5c11c3ee/code_gen/ffi_bindings.ml
ocaml
$
open Ctypes open Types module Fun_stubs (F : Cstubs.FOREIGN) = struct open F let free = foreign "free" (ptr char @-> returning void) let strlen = foreign "strlen" (ptr char @-> returning long) let get_lxc_attach_options_default__glue = foreign "get_lxc_attach_options_default__glue" (void @-> retur...
9620485e0f3958b4e1116421fb65ec1122ec909f441c5cf5a3a0c95e2f1deeaf
gsakkas/rite
2902.ml
let rec clone x n = match n with | 0 -> [] | a -> if a < 0 then [] else (clone x (n - 1)) @ [x];; let padZero l1 l2 = if (List.length l1) > (List.length l2) then (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2)) else ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2);;...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/2902.ml
ocaml
let rec clone x n = match n with | 0 -> [] | a -> if a < 0 then [] else (clone x (n - 1)) @ [x];; let padZero l1 l2 = if (List.length l1) > (List.length l2) then (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2)) else ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2);;...
99e30e0fda6bc382486d72e3d57749077f11a6195c19926a4fefa64bbf7b45a2
RunOrg/RunOrg
o.ml
(* © 2014 RunOrg *) let config = SqlConnection.(Configuration.Database.({ host ; port ; user ; database ; password ; pool_size })) let cqrs cqrs = new Cqrs.cqrs_ctx cqrs class ctx (cqrs : Cqrs.cqrs) (logctx : LogReq.ctx) = object inherit Cqrs.cqrs_ctx cqrs val logreq = logctx # logreq method logreq = logreq ...
null
https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/o.ml
ocaml
© 2014 RunOrg
let config = SqlConnection.(Configuration.Database.({ host ; port ; user ; database ; password ; pool_size })) let cqrs cqrs = new Cqrs.cqrs_ctx cqrs class ctx (cqrs : Cqrs.cqrs) (logctx : LogReq.ctx) = object inherit Cqrs.cqrs_ctx cqrs val logreq = logctx # logreq method logreq = logreq end
b77692650da5ea5a3fe4018378cb9253a1bcb924dc1ca8fdfb24b50e44ad1333
dterei/SafeHaskellExamples
a8.hs
{-# OPTIONS -osuf xo #-} module Main where main = putStrLn "Hello World"
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/flags/a8.hs
haskell
# OPTIONS -osuf xo #
module Main where main = putStrLn "Hello World"
ed0d361bac49a99aeaf4d3ab52e1f6e93cc83ffb596e8b2ca37c9a15ad2d7ae6
babashka/babashka
split_test.cljc
(ns version-clj.split-test (:require #?(:clj [clojure.test :refer [deftest testing are is]] :cljs [cljs.test :refer-macros [deftest testing are is]]) [version-clj.split :refer [version->seq]])) (deftest t-split-once-sanity-check (let [split-once @#'version-clj.split/split-once rx...
null
https://raw.githubusercontent.com/babashka/babashka/665ae4dd97535bf72a5ce34a19d624e74e5c4fe8/test-resources/lib_tests/version_clj/split_test.cljc
clojure
(ns version-clj.split-test (:require #?(:clj [clojure.test :refer [deftest testing are is]] :cljs [cljs.test :refer-macros [deftest testing are is]]) [version-clj.split :refer [version->seq]])) (deftest t-split-once-sanity-check (let [split-once @#'version-clj.split/split-once rx...
93f4208c00bbd40cdc2a3b86028e952dff15963b5ea2f6e803d6c8aa64654b02
BitGameEN/bitgamex
lhttpc_manager_tests.erl
%%% -*- coding: latin-1 -*- %%% ---------------------------------------------------------------------------- Copyright ( c ) 2009 , Erlang Training and Consulting Ltd. %%% All rights reserved. %%% %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/lhttpc/test/lhttpc_manager_tests.erl
erlang
-*- coding: latin-1 -*- ---------------------------------------------------------------------------- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain...
Copyright ( c ) 2009 , Erlang Training and Consulting Ltd. * Neither the name of Erlang Training and Consulting Ltd. nor the IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL Erlang Training and Consulting Ltd. BE @author < > @author < >...
291aea8445c97943afce8588f890a911d957e2cd58582e563241979c2164473a
cwmaguire/zombunity-mud
dispatch.clj
(ns zombunity.dispatch (:import [java.util TimerTask Timer] [java.io File]) (:require [zombunity.data :as data] [zombunity.db :as db] [clojure.data.json :as json] [clojure.tools.namespace :as tools-ns])) (declare dispatch) (def conn-users (atom {})) (defn register-u...
null
https://raw.githubusercontent.com/cwmaguire/zombunity-mud/ec14406f4addac9b9a0742d3043a6e7bccef1fa6/zombunity_server/src/zombunity/dispatch.clj
clojure
msg-filters can be a msg-type keyword
(ns zombunity.dispatch (:import [java.util TimerTask Timer] [java.io File]) (:require [zombunity.data :as data] [zombunity.db :as db] [clojure.data.json :as json] [clojure.tools.namespace :as tools-ns])) (declare dispatch) (def conn-users (atom {})) (defn register-u...
1984402559f0039af8cd6a39a8f59bfab2bf9b203bca0d886b2298bffbc2a537
griffinbank/rules_clojure
worker.clj
(ns rules-clojure.worker (:require [clojure.set :as set] [clojure.data.json :as json] [clojure.java.io :as io] [clojure.spec.alpha :as s] [rules-clojure.jar :as jar] [rules-clojure.util :as util] [rules-clojure.persistent-classloader :as pcl]) ...
null
https://raw.githubusercontent.com/griffinbank/rules_clojure/fbef58769ef6ba78b7f8c97cd59ca01366e2f53b/src/rules_clojure/worker.clj
clojure
path to the *compile-files* dir path where the output jar should be written path to root of source tree, relative to execroot seq of paths to include in the jar seq of jars to put on compile classpath (util/print-err "got req" work-req)
(ns rules-clojure.worker (:require [clojure.set :as set] [clojure.data.json :as json] [clojure.java.io :as io] [clojure.spec.alpha :as s] [rules-clojure.jar :as jar] [rules-clojure.util :as util] [rules-clojure.persistent-classloader :as pcl]) ...
8ab36e66d63a3f45eca33a5394f321e66733cbb9670373b564815afee1d8a643
gusenov/stepik-functional-programming-hs
Demo.hs
module Demo where infixl 6 *+* a * + * b = a ^ 2 + b ^ 2 -- инфиксный стиль (*+*) a b = a ^ 2 + b ^ 2 -- префиксный стиль infixl 6 |-| возвращает модуль ему
null
https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/Operator/Demo.hs
haskell
инфиксный стиль префиксный стиль
module Demo where infixl 6 *+* infixl 6 |-| возвращает модуль ему
59445408f9c27aa3b8b93a423db2bf40be00f3eb90604c8af490c20d7f0c2beb
mgrabmueller/harpy
ArithTypes.hs
module ArithTypes where import Foreign data Stmt = Assign Char Exp | Print Exp | Cmd Cmd deriving (Show) data Cmd = Help | Quit | Verbose deriving (Show) data Exp = Add Exp Exp | Sub Exp Exp | Mul Exp Exp | Div Exp Exp | Li...
null
https://raw.githubusercontent.com/mgrabmueller/harpy/6df8f480e568a02c98e20d95effc5f35f204bff6/examples/evaluator/ArithTypes.hs
haskell
module ArithTypes where import Foreign data Stmt = Assign Char Exp | Print Exp | Cmd Cmd deriving (Show) data Cmd = Help | Quit | Verbose deriving (Show) data Exp = Add Exp Exp | Sub Exp Exp | Mul Exp Exp | Div Exp Exp | Li...
9ca66744a03e852549f49635dc5f7ed3f14ae141ddc40ce95a7545ee2de64001
mzp/coq-ide-for-ios
proof_type.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/proofs/proof_type.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i the boolean is for focus restri...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : proof_type.ml 13323...
622914633e94c4512d035a445e98db179117795121f1b2528a21efbe814e8dd6
mokus0/bindings-hdf5
Conventions.hs
# LANGUAGE GeneralizedNewtypeDeriving # -- |various common data-passing conventions module Foreign.Ptr.Conventions where -- TODO: make these all exception-safe -- TODO: reverse order of 'out' returns TODO : bytestring versions ? versions allocating by byte but using vectors ? import Foreign.C.Types import Foreign....
null
https://raw.githubusercontent.com/mokus0/bindings-hdf5/33474d78cf7ea6a11161f26491d56bd19d4de143/src/Foreign/Ptr/Conventions.hs
haskell
|various common data-passing conventions TODO: make these all exception-safe TODO: reverse order of 'out' returns * Input pointers |In by-ref parameter; memory is allocated and freed by caller |In by-ref array; memory is allocated and freed by caller * Output pointers and freed by caller elements are then read...
# LANGUAGE GeneralizedNewtypeDeriving # module Foreign.Ptr.Conventions where TODO : bytestring versions ? versions allocating by byte but using vectors ? import Foreign.C.Types import Foreign.Marshal import Foreign.Ptr import Foreign.ForeignPtr import Foreign.Storable import Control.Exception.Peel import Control....
b51f85899eb861e50c282be404e53d3f411309252f6b190041a07216e4fbea77
hstreamdb/hstreamdb_erl
hstreamdb.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/hstreamdb/hstreamdb_erl/7ba26bbcde321930052b5fdff724b187edcd1c8a/src/hstreamdb.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(hstreamdb). -export([ start_client/2 , stop_client/1 , start_producer/3...
c36f88470005813f4d29ee0a08d123d5643c2490b3b24b1f4cf04e475237b30b
d-cent/objective8
stonecutter_test.clj
(ns objective8.unit.workflows.stonecutter-test (:require [midje.sweet :refer :all] [stonecutter-oauth.client :as soc] [stonecutter-oauth.jwt :as so-jwt] [objective8.utils :as utils] [objective8.front-end.workflows.stonecutter :refer :all] [objective8.config ...
null
https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/test/objective8/unit/workflows/stonecutter_test.clj
clojure
token-content is the decoded version of token-expiring-in-year-2515 signed with test-auth-provider-public-key
(ns objective8.unit.workflows.stonecutter-test (:require [midje.sweet :refer :all] [stonecutter-oauth.client :as soc] [stonecutter-oauth.jwt :as so-jwt] [objective8.utils :as utils] [objective8.front-end.workflows.stonecutter :refer :all] [objective8.config ...
440f4f2e964eb59364d941f205eb70e3118233c3486c834203228126d685d042
hipsleek/hipsleek
layout.ml
#include "xdebug.cppo" open VarGen open Globals open Format module P = Cpure (* the formatter that fmt_ commands will use *) let fmt = ref (std_formatter) let fmt_string x = pp_print_string (!fmt) x let fmt_space x = pp_print_space (!fmt) x let fmt_break x = pp_print_break (!fmt) x let fmt_cut x = pp_print_cut (!fmt...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/layout.ml
ocaml
the formatter that fmt_ commands will use shorter op code used internally op code that will be printed this command will add a bracket around e if is simple yields false print op and a break after print op and a break before let pr_list x = pr_list_sep fmt_space x;; let pr_list_comma x = pr_list_sep (...
#include "xdebug.cppo" open VarGen open Globals open Format module P = Cpure let fmt = ref (std_formatter) let fmt_string x = pp_print_string (!fmt) x let fmt_space x = pp_print_space (!fmt) x let fmt_break x = pp_print_break (!fmt) x let fmt_cut x = pp_print_cut (!fmt) x let fmt_open_box n = pp_open_box (!fmt) n l...
04a792844c472555ca99cb80bb0d9cdebf7a1342e0e36898353e832379fde42c
snoyberg/conduit
Internal.hs
# OPTIONS_HADDOCK not - home # # LANGUAGE CPP # {-# LANGUAGE RankNTypes #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # module Data.Acquire.Internal ( Acquire (..) , Allocated (..) , with , mkAcquire , ReleaseType ...
null
https://raw.githubusercontent.com/snoyberg/conduit/8211635608dbebd987f8472f0f32eab93cb387c8/resourcet/Data/Acquire/Internal.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE DeriveDataTypeable # | The way in which a release is called. # COMPLETE ReleaseEarly, ReleaseNormal, ReleaseException # # DEPRECATED ReleaseException "Use `ReleaseExceptionWith`, which has the exception in the constructor. This pattern synonym hides the exception and can obscure pro...
# OPTIONS_HADDOCK not - home # # LANGUAGE CPP # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # module Data.Acquire.Internal ( Acquire (..) , Allocated (..) , with , mkAcquire , ReleaseType (.., ReleaseException) , mkAcquireType ) where import C...
3c9c15c707afb3ada3aec0ba7d3d6c4add5949e538f4d847638e0e29bd838060
erlang/epmd
epmd_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1998 - 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 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/erlang/epmd/c27e1e3d37f9bb7f657782be5809b78a58b98b4d/test/epmd_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 1998 - 2013 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(epmd_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("kernel/include/file.hrl"). -define(...
cbefd9897737ad1d539ff3ec5cc9d10cbfc0d2890edba3b14f8a8b97a16603b1
hoon0612/Lisp-in-OCaml
parser_tester.ml
open Lexer open Types open String open Buffer let rec indent level = if level > 0 then " " ^ (indent (level-1)) else "" ;; let fst (x, _) = x;; let snd (_, y) = y;; let string_of_atom atype value n_indent = ((indent n_indent) ^ "{\"type\": \"" ^ atype ^ "\", \"" ^ atype ^ "\": " ^ value ^ "}") let rec json_...
null
https://raw.githubusercontent.com/hoon0612/Lisp-in-OCaml/498ace173018af8f7772b3db803872e76b5902cf/parser_tester.ml
ocaml
open Lexer open Types open String open Buffer let rec indent level = if level > 0 then " " ^ (indent (level-1)) else "" ;; let fst (x, _) = x;; let snd (_, y) = y;; let string_of_atom atype value n_indent = ((indent n_indent) ^ "{\"type\": \"" ^ atype ^ "\", \"" ^ atype ^ "\": " ^ value ^ "}") let rec json_...
6793e7f37ac4bd81059c176807c640401fc0ceb4819cf2f1c83749bf6b730536
input-output-hk/marlowe-cardano
Types.hs
# LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE TypeFamilies # module Language.Marlowe.Protocol.Query.Types where import Data.Aeson (ToJSON(..), Value(..), object, (.=)) import Data.Bifunctor (Bifunctor(..)) import Data.Binary (Binary(..), G...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/ac2758520f4f94d810ed145dbda9fb31a9d59d52/marlowe-runtime/sync-api/Language/Marlowe/Protocol/Query/Types.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE DataKinds # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # module Language.Marlowe.Protocol.Query.Types where import Data.Aeson (ToJSON(..), Value(..), object, (.=)) import Data.Bifunctor (Bifunctor(..)) import Data.Binary (Binary(..), Get, Put, getWord8, putW...
a1b4ff68cc0c082d2a5f285c97b3b5fb30e3ec69dc17567a4293f605d826de12
pjones/themoviedb
Episode.hs
-- | -- -- Copyright: -- This file is part of the package themoviedb. It is subject to -- the license terms in the LICENSE file found in the top-level -- directory of this distribution and at: -- -- -- -- No part of this package, including this file, may be copied, -- modified, propagated, or distribute...
null
https://raw.githubusercontent.com/pjones/themoviedb/1b3f34cafda360cd26f44808cd4d311b691afa8e/src/Network/API/TheMovieDB/Types/Episode.hs
haskell
| Copyright: This file is part of the package themoviedb. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at: No part of this package, including this file, may be copied, modified, propagated, or distributed except according to ...
License : MIT module Network.API.TheMovieDB.Types.Episode ( Episode (..), episodeStillURLs, ) where import Data.Aeson import Data.Time (Day (..)) import Network.API.TheMovieDB.Internal.Configuration import Network.API.TheMovieDB.Internal.Date import Network.API.TheMovieDB.Internal.Types data Episode = Episo...
39f40a4ed1e180b322e714c3416ee515588c0b5c47275032456c0abe659ff30e
sdiehl/shamir
Packed.hs
| Module : . Packed Description : packed secrets sharing scheme Copyright : ( c ) 2019 Adjoint Inc. License : MIT Maintainer : " Adjoint Inc ( ) " Module : Shamir.Packed Description : Shamir packed secrets sharing scheme Copyright : (c) 2019 Adjoint Inc. License : MIT Maintaine...
null
https://raw.githubusercontent.com/sdiehl/shamir/167fe79cff88765ef573c948972c2550f2c9b607/src/Shamir/Packed.hs
haskell
Secret sharing scheme Roots of unity ------------------ Roots of unity -- ------------------ | Brute force algorithm to find primitive root of unity Do not use for very large prime numbers | As prime fields are integral domains, every primitive nth root of unity ----------------------------------- Newton Polynom...
| Module : . Packed Description : packed secrets sharing scheme Copyright : ( c ) 2019 Adjoint Inc. License : MIT Maintainer : " Adjoint Inc ( ) " Module : Shamir.Packed Description : Shamir packed secrets sharing scheme Copyright : (c) 2019 Adjoint Inc. License : MIT Maintaine...
bd4a9bf41b2c8f4d4d26688c55da9fa030738b2a620e315e58f4dd07770a47c2
jgrodziski/keycloak-clojure
server.clj
(ns server (:require [ring.adapter.jetty :as jetty] [keycloak.deployment :as deployment :refer [keycloak-client client-conf]])) (defn handler [request] {:status 200 :headers {"Content-Type" "text/html"} :body "Hello World"}) (def server (jetty/run-jetty handler {:port 3000 :join? false})) (...
null
https://raw.githubusercontent.com/jgrodziski/keycloak-clojure/b811fe4f3e5b0d5cea7b1ce0aba7825b447b7696/sample/ring-backend/src/server.clj
clojure
(ns server (:require [ring.adapter.jetty :as jetty] [keycloak.deployment :as deployment :refer [keycloak-client client-conf]])) (defn handler [request] {:status 200 :headers {"Content-Type" "text/html"} :body "Hello World"}) (def server (jetty/run-jetty handler {:port 3000 :join? false})) (...
71196a9579d48c16a2adbf4cd7c24e2e471b135ba9e042de7ac17933a50e7612
erlware/relx
rlx_resolve.erl
-module(rlx_resolve). -export([solve_release/2, format_error/1]). -include("relx.hrl"). -include("rlx_log.hrl"). -spec format_error(ErrorDetail::term()) -> iolist(). format_error({no_goals_specified, {RelName, RelVsn}}) -> io_lib:format("No applications configured to be included in release ~s-~s", [RelN...
null
https://raw.githubusercontent.com/erlware/relx/16a7972f7679778d9d7f40228b1a20351f1077bd/src/rlx_resolve.erl
erlang
here we still want to check for the system apps in the code path. so return `true' for `CheckCodeLibDirs' don't add to Seen since optional applications are only per-application and not global, so another app could depend on this dependency don't add excluded apps place the deps of the App before it put new apps...
-module(rlx_resolve). -export([solve_release/2, format_error/1]). -include("relx.hrl"). -include("rlx_log.hrl"). -spec format_error(ErrorDetail::term()) -> iolist(). format_error({no_goals_specified, {RelName, RelVsn}}) -> io_lib:format("No applications configured to be included in release ~s-~s", [RelN...
94730096d39cae3fed2c403497b6750ffc1a15aa46d06a038f6f4e9aaf89f0e8
Vortecsmaster/EmurgoAcademyPlutusExamples
JustRedeemerV2.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOperators #-} {-# LANGUAGE OverloadedStrings #-} mo...
null
https://raw.githubusercontent.com/Vortecsmaster/EmurgoAcademyPlutusExamples/9ec11ee7e8719664980efa026b0d48ef4c467768/V2_110/JustValidators/src/JustRedeemerV2.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TypeOperators # # LANGUAGE OverloadedStrings # Contract Monad Ledger "Normal " Haskell "Normal" Haskell -} THE ON-CHAIN CODE just the hash of the validator replaces: scrAddress = scriptAddress validator THE OFFCHAIN CODE This line w...
# LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module JustRedeemerV2 where PlutusTx import PlutusTx (Data (..)) import qualified PlutusTx import qualified PlutusTx....
b05cdb198e5b7172602a5af4e779dfa21d1074d0d54d1ea188d53f69b9e9a8c6
epgsql/epgsql
epgsql_codec_postgis.erl
%%% @doc %%% Codec for `geometry' PostGIS umbrella datatype. %%% XXX : PostGIS is not a Postgres 's built - in datatype ! It should be installed %%% separately and enabled via `CREATE EXTENSION postgis'. %%% <ul> %%% <li>[-2.4/geometry.html]</li> %%% <li>$POSTGIS$/postgis/lwgeom_inout.c</li> %%% </ul> %%% @end %%% ...
null
https://raw.githubusercontent.com/epgsql/epgsql/0b798b082c5dfe906b163e766420a106f8aec8f7/src/datatypes/epgsql_codec_postgis.erl
erlang
@doc Codec for `geometry' PostGIS umbrella datatype. separately and enabled via `CREATE EXTENSION postgis'. <ul> <li>[-2.4/geometry.html]</li> <li>$POSTGIS$/postgis/lwgeom_inout.c</li> </ul> @end @see ewkb @end
XXX : PostGIS is not a Postgres 's built - in datatype ! It should be installed Created : 14 Oct 2017 by < > -module(epgsql_codec_postgis). -behaviour(epgsql_codec). -export([init/2, names/0, encode/3, decode/3, decode_text/3]). -export_type([data/0]). -type data() :: ewkb:geometry(). init(_, _) -> []. nam...
c3d92a037e12770830e275e6d9f104bbc297318b834c466c10dc6a7128d8a775
jyh/metaprl
ocaml_str_sos.mli
* Semantics of structure items . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlma...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/ocaml_sos/ocaml_str_sos.mli
ocaml
* -*- * Local Variables: * Caml-master: "refiner" * End: * -*-
* Semantics of structure items . * * ---------------------------------------------------------------- * * This file is part of MetaPRL , a modular , higher order * logical framework that provides a logical programming * environment for OCaml and other languages . * * See the file doc / htmlma...
80e86c83447a6602f9d747d355e1ce0091a7b08b0e51d8efab9a0da683f9cdba
GaloisInc/parameterized-utils
Fin.hs
# LANGUAGE DataKinds # {-# LANGUAGE GADTs #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # {-# Language CPP #-} module Test.Fin ( finTests , genFin ) where import Numeric.Natural (Natural) import Hedgehog import qualified Hedgehog.Gen as HG imp...
null
https://raw.githubusercontent.com/GaloisInc/parameterized-utils/152445fb97c0c14d276a7411e62e1717e25489e1/test/Test/Fin.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # Language CPP #
# LANGUAGE DataKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # module Test.Fin ( finTests , genFin ) where import Numeric.Natural (Natural) import Hedgehog import qualified Hedgehog.Gen as HG import Hedgehog.Range (linear) import Test.Tasty (TestTree, te...
89058fe67c5400b96a8c256c4d3213798e35e9f45566272c0aee3b9c3a6e73fb
garrigue/lablgl
test12.ml
#!/usr/bin/env lablglut #load "unix.cma" Copyright ( c ) 1994 . (* This program is freely distributable without licensing fees and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. *) Ported to lablglut by Issac Trotts on Sat Aug 10 13:41:1...
null
https://raw.githubusercontent.com/garrigue/lablgl/d76e4ac834b6d803e7a6c07c3b71bff0e534614f/LablGlut/examples/glut3.7/test/test12.ml
ocaml
This program is freely distributable without licensing fees and is provided without guarantee or warrantee expressed or implied. This program is -not- in the public domain. try all Glut.WINDOW_* Glut.get's touch Glut.SCREEN_* Glut.get's supported
#!/usr/bin/env lablglut #load "unix.cma" Copyright ( c ) 1994 . Ported to lablglut by Issac Trotts on Sat Aug 10 13:41:11 MDT 2002 . open Printf let main () = ignore(Glut.init Sys.argv); let a = Glut.get Glut.ELAPSED_TIME in Unix.sleep 1; let b = Glut.get Glut.ELAPSED_TIME in let d = b - a in ...
b5f0d4c6796684604b54e200bd49872dc49cffbb6caf985c93a952290be49228
yigitozkavci/parquet-hs
ColumnChunk.hs
module Parquet.Types.ColumnChunk ( -- * Type definitions ColumnChunk (..), ColumnMetaData (..), -- * Internal type definitions PageEncodingStats (..), ) where ------------------------------------------------------------------------------ import Parquet.Prelude import Parquet.Types.Enums import Pa...
null
https://raw.githubusercontent.com/yigitozkavci/parquet-hs/eb5904c066092966a8a291dcdbd06088fe329586/src/Parquet/Types/ColumnChunk.hs
haskell
* Type definitions * Internal type definitions ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ----------------------------------------...
module Parquet.Types.ColumnChunk ColumnChunk (..), ColumnMetaData (..), PageEncodingStats (..), ) where import Parquet.Prelude import Parquet.Types.Enums import Parquet.Types.Primitives import Pinch data ColumnChunk = ColumnChunk { _ColumnChunk_file_path :: Field 1 (Maybe Text), _ColumnChunk_fil...
b4e9b25357d8f69ac7eecc146e9cfbef08a8339b36b3a92938372044f0d93d74
MarcoPolo/iso-country-codes
core.clj
(ns iso-country-codes.core (:require [clojure.string :refer [lower-case]]) (:use iso-country-codes.countries)) (declare get-country-attributes) (defn country-translate "Translates a certain type of country code into another type args: input-type output-type value e.g. (country-translate :alpha-2 :name \"US...
null
https://raw.githubusercontent.com/MarcoPolo/iso-country-codes/489fd3ad50e175714955e567917c07ceea7907df/src/iso_country_codes/core.clj
clojure
Have to check found-val seperately, as str/lower-case can not handle nil. Some examples
(ns iso-country-codes.core (:require [clojure.string :refer [lower-case]]) (:use iso-country-codes.countries)) (declare get-country-attributes) (defn country-translate "Translates a certain type of country code into another type args: input-type output-type value e.g. (country-translate :alpha-2 :name \"US...
13409a1c5c610f43b5d3d56ed1ba2ec29319e9d777da3deffd4ccf5a5bbbbfce
discord-haskell/discord-haskell
Invite.hs
{-# LANGUAGE GADTs #-} # LANGUAGE DataKinds # {-# LANGUAGE MultiWayIf #-} # LANGUAGE InstanceSigs # # LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} | Provides actions for Channel API interactions module Discord.Internal.Rest.Invite ( InviteRequest(..) ) where import Network.HTTP.Req ((/:)) impor...
null
https://raw.githubusercontent.com/discord-haskell/discord-haskell/f98f5935a0b4b30288d5fc40bdb04da428ed03ca/src/Discord/Internal/Rest/Invite.hs
haskell
# LANGUAGE GADTs # # LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Data constructor for requests. See </ API> | Get invite for given code | Delete invite by code
# LANGUAGE DataKinds # # LANGUAGE InstanceSigs # # LANGUAGE RecordWildCards # | Provides actions for Channel API interactions module Discord.Internal.Rest.Invite ( InviteRequest(..) ) where import Network.HTTP.Req ((/:)) import qualified Network.HTTP.Req as R import qualified Data.Text as T import Discord.Inte...
2a728b1e1ea1a8bd0b1f910945909311b19f8bf984c951f4236da3f80bf52be9
informatimago/lisp
shell.lisp
-*- coding : utf-8 -*- ;;;;**************************************************************************** ;;;;FILE: shell.lisp LANGUAGE : Common - Lisp ;;;;SYSTEM: clisp ;;;;USER-INTERFACE: clisp ;;;;DESCRIPTION ;;;; ;;;; This package export shell primitives (fork, pipe, redirect...
null
https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/clisp/shell.lisp
lisp
**************************************************************************** FILE: shell.lisp SYSTEM: clisp USER-INTERFACE: clisp DESCRIPTION This package export shell primitives (fork, pipe, redirections, exec). USAGE LEGAL This program is free software: you can redistribute it ...
-*- coding : utf-8 -*- LANGUAGE : Common - Lisp < PJB > < > MODIFICATIONS 2002 - 12 - 10 < PJB > Created . AGPL3 Copyright 2002 - 2016 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the Lic...
9c5e068bbbc48a432f52927b267e89853d56f7d7150de0f8bcffe37a9087578d
christiankissig/ocaml99
problem19.ml
(* Rotate a list N places to the left. *) let rotate l n = let len = List.length l in let n = ( ( ( n mod len ) + len ) mod len ) in let rec rotate l n = if (n=0) then l else match l with [] -> [] | h::t -> rotate (t@[h]) (n-1) in rotate l n ;; (* tes...
null
https://raw.githubusercontent.com/christiankissig/ocaml99/c25f1790f695f9dd68b23abb472dc7c860d840f8/problem19.ml
ocaml
Rotate a list N places to the left. test
let rotate l n = let len = List.length l in let n = ( ( ( n mod len ) + len ) mod len ) in let rec rotate l n = if (n=0) then l else match l with [] -> [] | h::t -> rotate (t@[h]) (n-1) in rotate l n ;; let rec print_list l = match l with [] -...
3fab15bc889ff3dcc95749250d950bd9721e1dae1ed3b7109301570b2262c57b
emqx/emqx
emqx_authn_app.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/73d5592b5af0cbbf347e5dc2b9b865b41228249f/apps/emqx_authn/src/emqx_authn_app.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_authn_app). -include("emqx_authn.hrl"). -behaviour(application). -export([ s...
9b38ac47135f0f7ef90bf033d34bbe1bb9034a15891788028461e259116d98c4
themattchan/advent-of-code
day11.hs
#! /usr/bin/env runhaskell -i../../ import Utils import Data.Semigroup (Max(..)) data Dir = N | NE | SE | S | SW | NW deriving (Show, Read, Ord, Eq) -- -map/part-1/ type HexCoord = (Sum Int, Sum Int) x and -- y is recoverable, see below mkCoord ns nwse = (Sum ns, Sum nwse) toCoord N = mkCoord 0 1 toCoord S ...
null
https://raw.githubusercontent.com/themattchan/advent-of-code/0b08a4fbadf7e713d40044523af3debb7d0cb6b9/2017/day11/day11.hs
haskell
-map/part-1/ y is recoverable, see below
#! /usr/bin/env runhaskell -i../../ import Utils import Data.Semigroup (Max(..)) data Dir = N | NE | SE | S | SW | NW deriving (Show, Read, Ord, Eq) type HexCoord = (Sum Int, Sum Int) x and mkCoord ns nwse = (Sum ns, Sum nwse) toCoord N = mkCoord 0 1 toCoord S = mkCoord 0 (-1) toCoord NE = mkCoord 1 0 toCoor...
7fbeb7f47c1755e9f056b341b6475a44da03c3e5458c74597d7ecc8402332a43
haskell-tools/haskell-tools
A.hs
# LANGUAGE TemplateHaskell # module A where import TH x
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/daemon/examples/Project/has-th/A.hs
haskell
# LANGUAGE TemplateHaskell # module A where import TH x
89e6aedee91ce674cfd0ba1e905a8bf4da44e6f3f2ededee7ce25bb4699f0dfe
polymeris/cljs-aws
cur.cljs
(ns cljs-aws.cur (:require [cljs-aws.base.requests]) (:require-macros [cljs-aws.base.service :refer [defservice]])) (defservice "CUR" "cur-2017-01-06.min.json")
null
https://raw.githubusercontent.com/polymeris/cljs-aws/3326e7c4db4dfc36dcb80770610c14c8a7fd0d66/src/cljs_aws/cur.cljs
clojure
(ns cljs-aws.cur (:require [cljs-aws.base.requests]) (:require-macros [cljs-aws.base.service :refer [defservice]])) (defservice "CUR" "cur-2017-01-06.min.json")
0c5270784e0bbecbc9236ddbd2e88abb4c98f2e578a8ac6570311a8d823ca084
AndrasKovacs/ELTE-func-lang
ParseWhile.hs
module ParseWhile where import Control.Applicative import Syntax import Parser2 iLit :: Parser Lit iLit = (LInt <$> natural) <* ws bLit :: Parser Lit bLit = token "true" *> pure (LBool True) <|> token "false" *> pure (LBool False) lit :: Parser Lit lit = iLit <|> bLit parens :: Parser a -> Parser a parens p ...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-1/While/ParseWhile.hs
haskell
module ParseWhile where import Control.Applicative import Syntax import Parser2 iLit :: Parser Lit iLit = (LInt <$> natural) <* ws bLit :: Parser Lit bLit = token "true" *> pure (LBool True) <|> token "false" *> pure (LBool False) lit :: Parser Lit lit = iLit <|> bLit parens :: Parser a -> Parser a parens p ...
d5655d5a3b5bf6ab4a94e427d7aa381cc9f95f4c41dc7449f08b0678d007fccf
pascal-knodel/haskell-craft
E'12'15.hs
-- -- -- ------------------ Exercise 12.15 . ------------------ -- -- -- module E'12'15 where
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'12'15.hs
haskell
---------------- ----------------
Exercise 12.15 . module E'12'15 where
8075c3fe19efc138cec047d316f2c01af2fa8ec73c636e21c3c611200872c3fd
aiya000/haskell-examples
JSON.hs
{-# LANGUAGE OverloadedStrings #-} import Data.Aeson import Data.Maybe ( fromJust ) import Data.Text ( Text () ) import Data.ByteString.Lazy ( ByteString () ) import qualified Data.ByteString.Lazy as BLazy data Timeline = Timeline { _text :: Text } deriving (Show) instance FromJSON Timeline where parseJSON (Obj...
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Data/Aeson/JSON.hs
haskell
# LANGUAGE OverloadedStrings #
import Data.Aeson import Data.Maybe ( fromJust ) import Data.Text ( Text () ) import Data.ByteString.Lazy ( ByteString () ) import qualified Data.ByteString.Lazy as BLazy data Timeline = Timeline { _text :: Text } deriving (Show) instance FromJSON Timeline where parseJSON (Object v) = Timeline <$> v .: "text" ...
adfd51e03bd2929e3d92a1e8a62d3f805021d15fb3c25979555a079a1c14978c
bytekid/mkbtt
triple.ml
Copyright 2008 , Christian Sternagel , * GNU Lesser General Public License * * This file is part of TTT2 . * * TTT2 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 ve...
null
https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/util/src/triple.ml
ocaml
** OPENS ******************************************************************* ** FUNCTIONS *************************************************************** Iterators Scan Functions Printers
Copyright 2008 , Christian Sternagel , * GNU Lesser General Public License * * This file is part of TTT2 . * * TTT2 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 ve...
5b7a01fb0d3d48f8e6bcaba0cad7841fca29522a9bad382971211fa9606415d7
paurkedal/viz
ast_utils.mli
Copyright ( C ) 2011 - -2016 Petter A. Urkedal < > * * This file is part of the Viz Compiler < / > . * * The Viz Compiler is free software : you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation , either version...
null
https://raw.githubusercontent.com/paurkedal/viz/ab1f1071fafdc51eae69185ec55d7a6e7bb94ea9/camlviz/ast_utils.mli
ocaml
* Auxiliary Functions for the Abstract Syntax Tree
Copyright ( C ) 2011 - -2016 Petter A. Urkedal < > * * This file is part of the Viz Compiler < / > . * * The Viz Compiler is free software : you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation , either version...
7bfff587adf0635d5c54258deff80e6031c3709fd09473863cdb89c4a47a0ced
fragnix/fragnix
Network.Wai.Internal.hs
# LANGUAGE Haskell98 # # LINE 1 " Network / Wai / Internal.hs " # # OPTIONS_HADDOCK not - home # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE CPP # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # -- | Internal constructors and helper funct...
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/application/Network.Wai.Internal.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE RankNTypes # | Internal constructors and helper functions. Note that no guarantees are given for stability of these interfaces. | Information on the request sent by the client. This abstracts away the details of the underlying implementation. | Request method such as GET....
# LANGUAGE Haskell98 # # LINE 1 " Network / Wai / Internal.hs " # # OPTIONS_HADDOCK not - home # # LANGUAGE CPP # # LANGUAGE RecordWildCards # module Network.Wai.Internal where import Blaze.ByteString.Builder (Builder) import qualified...
30c93416f29e8533d4a764ac39a6be9ff562618e91694fad67871c51ce608bcf
aiya000/haskell-examples
MuseMember.hs
import Data.Monoid data Muse = HanayoKoizumi | RinHoshizora | MakiNishikino | UmiSonoda | KotoriMinami | HonokaKosaka | EliAyase | NicoYazawa | NozomiTojo deriving (Eq, Ord, Enum, Show) next :: Muse -> Muse next HanayoKoizumi = RinHoshizora next RinHoshizora = MakiNishikino n...
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Room/MuseMember.hs
haskell
import Data.Monoid data Muse = HanayoKoizumi | RinHoshizora | MakiNishikino | UmiSonoda | KotoriMinami | HonokaKosaka | EliAyase | NicoYazawa | NozomiTojo deriving (Eq, Ord, Enum, Show) next :: Muse -> Muse next HanayoKoizumi = RinHoshizora next RinHoshizora = MakiNishikino n...
4a0f45d7cba561c70ab04b00df0ee80c2ae3344ef6b6a27a686c4c5c2533a68f
savonet/ocaml-mm
setup_enabled.ml
let is_set = true
null
https://raw.githubusercontent.com/savonet/ocaml-mm/916b007cc7cc4bf250e6f71203bb36afb4ed8634/src/config/setup_enabled.ml
ocaml
let is_set = true
f56f3cb8d93653fe608b8088fbc50dee353800ab7b6c361b30cb6f745e9e65ab
funcool/clojure.jdbc
proto.clj
Copyright 2014 - 2016 < > ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software distributed un...
null
https://raw.githubusercontent.com/funcool/clojure.jdbc/0828e9361e867181ddd2199f53ffa4de86904c83/src/jdbc/proto.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 perm...
Copyright 2014 - 2016 < > Licensed under the Apache License , Version 2.0 ( the " License " ) distributed under the License is distributed on an " AS IS " BASIS , (ns jdbc.proto) Internal Protocols (defprotocol IConnection "Represents a connection like object that wraps a raw jdbc connection with some...
eede519cc0f62071b869cdce7feb752c6cba8b1f227338d21bd9108201034144
exercism/ocaml
luhn.ml
let valid _ = failwith "'valid' is missing"
null
https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/luhn/luhn.ml
ocaml
let valid _ = failwith "'valid' is missing"
1610d185bd6b15d97ea5699abcfa38d8527b2a96d658b1789be9ee4d4dba60e1
input-output-hk/cardano-ledger
UTxOConfiguration.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # module Cardano.Chain.UTxO.UTxOConfiguration ( UTxOConfiguration (..), defaultUTxOConfiguration, mkUTxOConfiguration, ) where import Cardano.Chain.Common.Address (Address) import Cardano.Ch...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/byron/ledger/impl/src/Cardano/Chain/UTxO/UTxOConfiguration.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # | Additional configuration for ledger validation. ^ Set of source address which are asset-locked. Transactions which use these addresses as transaction inputs will be deemed invalid.
# LANGUAGE DeriveGeneric # # LANGUAGE TypeApplications # module Cardano.Chain.UTxO.UTxOConfiguration ( UTxOConfiguration (..), defaultUTxOConfiguration, mkUTxOConfiguration, ) where import Cardano.Chain.Common.Address (Address) import Cardano.Chain.Common.Compact (CompactAddress, toCompactAddress) import Cardan...
84d9a5ad566ac0c579f576fa8b9ef63abf447b23b443418707a57009c661675b
LennMars/algorithms_in_OCaml
main.ml
open Util module type Ring = sig type t val zero : t val one : t val ( +^ ) : t -> t -> t val ( *^ ) : t -> t -> t val ( =^ ) : t -> t -> bool end module Make (R : Ring) : sig type elt = R.t type t = elt array val dft : elt -> t -> t end = struct type elt = R.t type t = elt array let ( +^ ) =...
null
https://raw.githubusercontent.com/LennMars/algorithms_in_OCaml/f7fb8ca9f497883d86be3167bfc98a4a28ac73c9/DFT/main.ml
ocaml
open Util module type Ring = sig type t val zero : t val one : t val ( +^ ) : t -> t -> t val ( *^ ) : t -> t -> t val ( =^ ) : t -> t -> bool end module Make (R : Ring) : sig type elt = R.t type t = elt array val dft : elt -> t -> t end = struct type elt = R.t type t = elt array let ( +^ ) =...
df7265c42cbd058530234460c8d8352352a44ba1758a737b55a031d06a43b152
ULTRAKID/emqx_plugin_kafka
emqx_plugin_kafka_sup.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2019 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/ULTRAKID/emqx_plugin_kafka/0ef6cd954e53be63b786725b6b39ec3016c527db/src/emqx_plugin_kafka_sup.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2019 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_plugin_kafka_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). ...
9cba61c215ae68ec37605eeef5732d25de7665abe68c063ea908a03efe4c7f0e
philnguyen/soft-contract
ex-06.rkt
#lang racket (require soft-contract/fake-contract) (define (f x y) (if (and (number? x) (string? y)) (+ x (string-length y)) (string-length x))) (provide/contract [f (#|HERE|# any/c string? . -> . number?)])
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/unsafe/octy/ex-06.rkt
racket
HERE
#lang racket (require soft-contract/fake-contract) (define (f x y) (if (and (number? x) (string? y)) (+ x (string-length y)) (string-length x)))
993da076c594aa60a79d46b8fa657685f3bec0179fcc19e595b397ff4cf28779
takikawa/racket-ppa
frame.rkt
#lang racket/base (module install-pkg racket/base (require racket/class pkg/gui) (provide install-pkg pkg-manager) (define pkg-gui #f) (define (pkg-manager wrap-terminal-action) (if pkg-gui (send pkg-gui show #t) (set! pkg-gui (make-pkg-gui #:wrap-terminal-action w...
null
https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/share/pkgs/drracket/drracket/private/frame.rkt
racket
) "semicolon"] (printf "user-key? ~s\n" user-key?) pre: (can-show-keybindings?) = #t add-keybindings-item : keybindings-item[path or planet spec] -> boolean boolean indicates if the addition happened sucessfully install-plt-file : (union #f dialog% frame%) -> void asks the user for a .plt file, either from the we...
#lang racket/base (module install-pkg racket/base (require racket/class pkg/gui) (provide install-pkg pkg-manager) (define pkg-gui #f) (define (pkg-manager wrap-terminal-action) (if pkg-gui (send pkg-gui show #t) (set! pkg-gui (make-pkg-gui #:wrap-terminal-action w...
dea1c17cf1bd2c03fa15e9fb743c088100c35fbbe8997e0cd169041ae436d7e2
CloudI/CloudI
hackney_manager.erl
%%% -*- erlang -*- %%% This file is part of hackney released under the Apache 2 license . %%% See the NOTICE for more information. -module(hackney_manager). -behaviour(gen_server). -export([new_request/1, start_async_response/1, stop_async_response/1, cancel_request/1, close_request/1, controlling_proces...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_hackney/src/hackney_manager.erl
erlang
-*- erlang -*- See the NOTICE for more information. private gen_server api initialize the request store the current state in the process dictionnary supervise the process owner only the owner can cancel the request remove the request stop to monitor the request return the latest state remove the request st...
This file is part of hackney released under the Apache 2 license . -module(hackney_manager). -behaviour(gen_server). -export([new_request/1, start_async_response/1, stop_async_response/1, cancel_request/1, close_request/1, controlling_process/2]). -export([get_state/1, get_state/2, update_state/1, upd...
5a5907b318f7b6202fe92f0c9b5e95f05ef2bbf39dc90ed3f61860b07c0dcee1
NorfairKing/the-notes
License.hs
module License (license) where import Notes url :: Note -> Note url = comm1 "url" license :: Note license = do comm1 "section*" "License" s ["This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License"] s ["To view a copy of this license, ...
null
https://raw.githubusercontent.com/NorfairKing/the-notes/ff9551b05ec3432d21dd56d43536251bf337be04/src/License.hs
haskell
module License (license) where import Notes url :: Note -> Note url = comm1 "url" license :: Note license = do comm1 "section*" "License" s ["This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License"] s ["To view a copy of this license, ...
dd05c8ec611dc2b7a2fdb237d65f48ee9b28a56493faea7e7d8ba4ff9a6177c6
samrocketman/home
xtns-bodor-chrominium.scm
; ; The GIMP -- an image manipulation program Copyright ( C ) 1995 and ; Chrominium for GIMP 2.4 Copyright ( C ) 2007 < > ; ; Tags: logo ; ; Author statement: A Script - Fu that create a Chrome effect with gradient shadow ; ; ; -------------------------------------------------------------------- Dist...
null
https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/xtns-bodor-chrominium.scm
scheme
The GIMP -- an image manipulation program Tags: logo Author statement: -------------------------------------------------------------------- -------------------------------------------------------------------- - Changelog - -------------------------------------------------------------------- This progr...
Copyright ( C ) 1995 and Chrominium for GIMP 2.4 Copyright ( C ) 2007 < > A Script - Fu that create a Chrome effect with gradient shadow Distributed by Gimp FX Foundry project Updated to Gimp2.4 ( 11 - 2007 ) - it under the terms of the GNU General Public License as published by You should hav...
3884659ce4792ea05d1bb20e69a5ef589a3dba809853490b6981e5f12482e7f8
alanz/ghc-exactprint
SlidingDoClause.hs
: bounds narrowing 35 bndCom tenv args = do { (bound,size) <- getBounds fail args ; let get (s,m,ref) = do { n <- readRef ref; return(s++" = "++show n++ m)} ; if bound == "" then do { xs <- mapM get boundRef; warnM [Dl xs "\n"]} else case find (\ (nm,info,ref) -> nm==bound) boundRef ...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/SlidingDoClause.hs
haskell
: bounds narrowing 35 bndCom tenv args = do { (bound,size) <- getBounds fail args ; let get (s,m,ref) = do { n <- readRef ref; return(s++" = "++show n++ m)} ; if bound == "" then do { xs <- mapM get boundRef; warnM [Dl xs "\n"]} else case find (\ (nm,info,ref) -> nm==bound) boundRef ...
a2a3adb3708ac2a03e2c59864494a1d4e5faab45044209ba7c14a16fa675d0f9
CryptoKami/cryptokami-core
Crypto.hs
-- | Re-export of Crypto modules. # OPTIONS_GHC -F -pgmF autoexporter # {-# OPTIONS_GHC -Wno-unused-imports #-} # OPTIONS_GHC -Wno - dodgy - exports # import Pos.Binary.Crypto ()
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/crypto/Pos/Crypto.hs
haskell
| Re-export of Crypto modules. # OPTIONS_GHC -Wno-unused-imports #
# OPTIONS_GHC -F -pgmF autoexporter # # OPTIONS_GHC -Wno - dodgy - exports # import Pos.Binary.Crypto ()
92d7d5c1a175566c8f62846b4fb19ec022b78ad3a68c94130ccdeebc5d6953fa
srid/emanote
TagIndex.hs
module Emanote.View.TagIndex (renderTagIndex) where import Data.List qualified as List import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Data.Map.Syntax ((##)) import Data.Tree (Forest, Tree) import Data.Tree qualified as Tree import Emanote.Model (Model) import Emanote.Model qua...
null
https://raw.githubusercontent.com/srid/emanote/66dad06ca8fff73e30c52aee28f6458c73c900e3/src/Emanote/View/TagIndex.hs
haskell
An index view into the notebook indexed by the given tag path. ^ User descriptive title of this index ^ All notes tagged precisely with this tag path ^ Tags immediately under this tag path. If the tag path being index is "foo/bar", this will contain "foo/bar/qux". The root index displays all top-level tags (no n...
module Emanote.View.TagIndex (renderTagIndex) where import Data.List qualified as List import Data.List.NonEmpty qualified as NE import Data.Map.Strict qualified as Map import Data.Map.Syntax ((##)) import Data.Tree (Forest, Tree) import Data.Tree qualified as Tree import Emanote.Model (Model) import Emanote.Model qua...
3c27f33f427499b5a40587c118fb96dc53684a6de0aec3808742af799d757499
racket/compatibility
package-arrows.rkt
#lang racket (require rackunit drracket/check-syntax compatibility/package setup/path-to-relative (for-syntax setup/path-to-relative)) (define-syntax (identifier stx) (syntax-case stx () [(_ x) (identifier? #'x) #`(let ([p (open-input-string (format "~s" 'x))]) ...
null
https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-test/tests/racket/package-arrows.rkt
racket
arrows for sequential let*-like scope
#lang racket (require rackunit drracket/check-syntax compatibility/package setup/path-to-relative (for-syntax setup/path-to-relative)) (define-syntax (identifier stx) (syntax-case stx () [(_ x) (identifier? #'x) #`(let ([p (open-input-string (format "~s" 'x))]) ...
2f6c3841ac2f70928d8e1ae38c1354d52c3b703fb9e6c773d2cedc4c3a6873b3
bsaleil/lc
sumloop.scm.scm
;;------------------------------------------------------------------------------ Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst...
null
https://raw.githubusercontent.com/bsaleil/lc/ee7867fd2bdbbe88924300e10b14ea717ee6434b/tools/benchtimes/resultbak/m5inter/sumloop.scm.scm
scheme
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Gabriel benchmarks C benchmarks Other benchmarks
Macros (##define-macro (def-macro form . body) `(##define-macro ,form (let () ,@body))) (def-macro (FLOATvector-const . lst) `',(list->vector lst)) (def-macro (FLOATvector? x) `(vector? ,x)) (def-macro (FLOATvector . lst) `(vector ,@lst)) (def-macro (FLOATmake-vector n . init) `(make-vector ,...
bb1aac2af2ba1f55490f81f555604c84f1542f8ae3f4a58db5fc7c2d8f3f360f
kaos/ecapnp
ecapnp_get_tests.erl
%% Copyright 2013 , < > %% 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/kaos/ecapnp/f351c07730ba134b41b137dd6a6b93069a0908fc/test/ecapnp_get_tests.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lang...
Copyright 2013 , < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ecapnp_get_tests). -ifdef(TEST). -include_lib("eunit/include/eunit.hrl"). -include("include/ecapnp.hrl"). root_test() -> Msg = [<<0,...
510115e5f20e19df3d647cff33965fd92ded0cb532738077708dd7f8b58cb3ad
haslab/HAAP
Tarefa6.hs
{-| Module : Tarefa6_${group} Description : Módulo da Tarefa 6 para LI1 17/18 Módulo para a realização da Tarefa 6 de LI1 em 2017/18. -} module Tarefa6_${group} where import LI11718 | Função usada para simular um /bot/ no /Micro Machines/. Em cada instante , dado o , o estado do do jogador , toma um...
null
https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/plab/svn/2017li1g186/src/Tarefa6.hs
haskell
| Module : Tarefa6_${group} Description : Módulo da Tarefa 6 para LI1 17/18 Módulo para a realização da Tarefa 6 de LI1 em 2017/18. ^ identificador do jogador dentro do estado
module Tarefa6_${group} where import LI11718 | Função usada para simular um /bot/ no /Micro Machines/. Em cada instante , dado o , o estado do do jogador , toma uma ação . Função usada para simular um /bot/ no jogo /Micro Machines/. Em cada instante, dado o tempo decorrido, o estado do jogo e o identifi...
814fac0e2589b5285baa65cee9a60fc4c673230a4dbc77687f2ffc29db0b0347
clojure-emacs/cider-nrepl
complete_test.clj
(ns cider.nrepl.middleware.complete-test (:require [cider.nrepl.middleware.complete :as c] [cider.nrepl.test-session :as session] [clojure.test :refer :all])) (use-fixtures :each session/session-fixture) (deftest complete (testing "blank" (let [response (session/message {:op "complete" ...
null
https://raw.githubusercontent.com/clojure-emacs/cider-nrepl/a2bc49818a3b4c699fba0e322388a08eebc8a933/test/clj/cider/nrepl/middleware/complete_test.clj
clojure
(ns cider.nrepl.middleware.complete-test (:require [cider.nrepl.middleware.complete :as c] [cider.nrepl.test-session :as session] [clojure.test :refer :all])) (use-fixtures :each session/session-fixture) (deftest complete (testing "blank" (let [response (session/message {:op "complete" ...
2a454d47b290f0ac83382e0f8c42b3f1d4cf2e9c7acaaa822f77f91a2fcbface
chenyukang/eopl
equal-up-to-gensyms.scm
(module equal-up-to-gensyms (lib "eopl.ss" "eopl") (provide equal-types?) (define equal-types? (lambda (ty1 ty2) (equal-up-to-gensyms? ty1 ty2))) ;; S-exp = Sym | Listof(S-exp) A - list = Listof(Pair(TvarTypeSym , TvarTypesym ) ) ;; a tvar-type-sym is a symbol ending with a digit. ;; equal-up-...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/base/chapter7/inferred/equal-up-to-gensyms.scm
scheme
S-exp = Sym | Listof(S-exp) a tvar-type-sym is a symbol ending with a digit. equal-up-to-gensyms? : S-exp * S-exp -> Bool canonicalize : S-exp -> A-list loop : sexp * alist -> alist sexp is already bound, no more to do the length of the table serves as a counter! tvar-type-sym? : Sym -> Bool symbol->list : S...
(module equal-up-to-gensyms (lib "eopl.ss" "eopl") (provide equal-types?) (define equal-types? (lambda (ty1 ty2) (equal-up-to-gensyms? ty1 ty2))) A - list = Listof(Pair(TvarTypeSym , TvarTypesym ) ) Page : 271 (define equal-up-to-gensyms? (lambda (sexp1 sexp2) (equal? (apply-su...
724d53306653e0e4d99dd66dbb12193cd762a2be462b0082a6aebfc0bcbac74f
viebel/klipse-app
core.cljs
(ns ^:figwheel-no-load klipse.core (:require [gadjett.core-fn :as gadjett])) (enable-console-print!) (gadjett/settings! :max-function-calls 100) (goog-define version "n/a") (js/console.info "Klipse " version) (js/console.info "Clojurescript " *clojurescript-version*)
null
https://raw.githubusercontent.com/viebel/klipse-app/46809aaf4dd9bc89aae3bd81110125f81cbd11a4/src/klipse/core.cljs
clojure
(ns ^:figwheel-no-load klipse.core (:require [gadjett.core-fn :as gadjett])) (enable-console-print!) (gadjett/settings! :max-function-calls 100) (goog-define version "n/a") (js/console.info "Klipse " version) (js/console.info "Clojurescript " *clojurescript-version*)
eb7b0e8013023f85f87ef18bdc1047ea6328340cace5aef333c5f3b067617372
input-output-hk/cardano-sl
Logic.hs
{-# LANGUAGE RankNTypes #-} | Different logic depending on " MonadCede " . module Pos.DB.Delegation.Cede.Logic ( getPskChain , detectCycleOnAddition , dlgLastPsk , dlgVerifyHeader , CheckForCycle(..) , dlgVerifyPskHeavy ) where import Universum i...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/db/src/Pos/DB/Delegation/Cede/Logic.hs
haskell
# LANGUAGE RankNTypes # | Given an issuer, retrieves all certificate chains starting in issuer. This function performs a series of sequential db reads so it must be used under the shared lock. See doc for 'getPskChain'. This function also stops traversal if encounters anyone in 'toIgnore' set. This may be used to...
| Different logic depending on " MonadCede " . module Pos.DB.Delegation.Cede.Logic ( getPskChain , detectCycleOnAddition , dlgLastPsk , dlgVerifyHeader , CheckForCycle(..) , dlgVerifyPskHeavy ) where import Universum import Control.Lens...
b64e5ffbabd789d44d246c70195516b43fadd488d34828bc37c0630d6a3a1e2e
brite-code/brite
DiagnosticMarkup.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} module Brite.DiagnosticMarkup ( Markup , plain , code , toText , toANSIDoc ) where import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Text.Lazy as Text.Lazy import qualified Data.Text.Lazy.Builder as T...
null
https://raw.githubusercontent.com/brite-code/brite/154d7fc93be050626af48051f71a446ec329f612/old/src/Brite/DiagnosticMarkup.hs
haskell
# LANGUAGE OverloadedStrings # A simple markup string builder to be used when rendering diagnostic messages. This is not intended to be a full markdown parsing and printing framework. Just enough for diagnostic messages. Some plain text without formatting. Text formatted as inline code. NOTE: When adding escape...
# LANGUAGE GeneralizedNewtypeDeriving # module Brite.DiagnosticMarkup ( Markup , plain , code , toText , toANSIDoc ) where import Data.Text (Text) import qualified Data.Text as Text import qualified Data.Text.Lazy as Text.Lazy import qualified Data.Text.Lazy.Builder as Text (Builder) import qualified Data...
9a01565895d0914607e3344475afce67e347267671d78d7860cd950a74b64c01
JHU-PL-Lab/jaylang
echo_firstclass_module.ml
open Langdk let () = let module Echo_E = (val (module struct type e = string let eval e = e let of_string e = e let to_string e = e end) : Repl.E_sig) in let module Echo...
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/a88468ce8fb7507ec77a88a4cf8146da104328fb/src-vendor/langdk/examples/echo_firstclass_module.ml
ocaml
open Langdk let () = let module Echo_E = (val (module struct type e = string let eval e = e let of_string e = e let to_string e = e end) : Repl.E_sig) in let module Echo...
8291a7680d4c13a55f3bd27e529cd16889ec7970ff8203a87feec91795a51784
xsc/ancient-clj
leiningen_test.clj
(ns ancient-clj.zip.leiningen-test (:require [ancient-clj.zip.leiningen :refer [visit-project-clj visit-profiles-clj]] [ancient-clj.test [zip :refer [form->zloc]] [generators :as test]] [rewrite-clj.zip :as z] [clojure.test.check ...
null
https://raw.githubusercontent.com/xsc/ancient-clj/c34d96553c74ee1909a71e014e54a718933d1dd0/test/ancient_clj/zip/leiningen_test.clj
clojure
## Helpers
(ns ancient-clj.zip.leiningen-test (:require [ancient-clj.zip.leiningen :refer [visit-project-clj visit-profiles-clj]] [ancient-clj.test [zip :refer [form->zloc]] [generators :as test]] [rewrite-clj.zip :as z] [clojure.test.check ...
88f346f0d2dc9fb807c199bb61ecb26dec8f94029ba62e0399223fcc636392ed
kostmo/circleci-failure-tracker
StatusEventQuery.hs
{-# LANGUAGE DeriveGeneric #-} # LANGUAGE DuplicateRecordFields # module StatusEventQuery where import Data.Aeson import Data.Text.Lazy (Text) import Data.Time (UTCTime) import GHC.Generics import qualified JsonUtils | This is just like Webhooks . GitHubStatus...
null
https://raw.githubusercontent.com/kostmo/circleci-failure-tracker/393d10a72080bd527fdb159da6ebfea23fcd52d1/app/fetcher/src/StatusEventQuery.hs
haskell
# LANGUAGE DeriveGeneric # except without the @sha@ and @name@ fields. ^ we care about "failure" and "success" ^ the build number and CI provider hostname can be extracted from this
# LANGUAGE DuplicateRecordFields # module StatusEventQuery where import Data.Aeson import Data.Text.Lazy (Text) import Data.Time (UTCTime) import GHC.Generics import qualified JsonUtils | This is just like Webhooks . GitHubStatusEvent data GitHubStatusEventGetter = Gi...
fcfa8975a8fd8a65de3a295fe69d27a30f2587a6238f9cdb6a82456a1a8ae890
commercialhaskell/stack
UploadSpec.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Stack.UploadSpec ( spec ) where import RIO import RIO.Directory import RIO.FilePath ((</>)) import Stack.Upload import Test.Hspec import System.Permissions (osIsWindows) import System.PosixCompat.Files (getFileStatus, fileMode) import System...
null
https://raw.githubusercontent.com/commercialhaskell/stack/bd3ea5e4a5411bb8f08f7e63a61d45ff701764d6/src/test/Stack/UploadSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # module Stack.UploadSpec ( spec ) where import RIO import RIO.Directory import RIO.FilePath ((</>)) import Stack.Upload import Test.Hspec import System.Permissions (osIsWindows) import System.PosixCompat.Files (getFileStatus, fileMode) import System.Environment (setEnv, unsetEnv) imp...
174f769dfeef83203667f4b7ab34c7156f92d3cb2013204c721f3cb16bfbf8d1
marcoheisig/Petalisp
wsdeque-sbcl.lisp
© 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*- (in-package #:petalisp.utilities) ;;; This file contains an implementation of a work-stealing deque. It is closely modeled after the paper " Dynamic Circular Work - Stealing Deque " by and ( ) . ;;; ;;; The work-stealing deque allows i...
null
https://raw.githubusercontent.com/marcoheisig/Petalisp/a1c85cf71da445ef9c7913cd9ddb5149373211a7/code/utilities/wsdeque-sbcl.lisp
lisp
This file contains an implementation of a work-stealing deque. It is The work-stealing deque allows its owner to push and pop elements at the bottom, and it allows other threads to steal elements from the top. Work Stealing Deque The bottom index is incremented whenever an element is pushed, and decremented w...
© 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*- (in-package #:petalisp.utilities) closely modeled after the paper " Dynamic Circular Work - Stealing Deque " by and ( ) . (defstruct (wsdeque (:copier nil) (:predicate wsdequep) (:constructor make-w...
0649a4665b1f19ee0a7ed90d0fa1d5d41b399dfa3ad8d373074e20c5bfc7127d
clojure-interop/java-jdk
MultiTabbedPaneUI.clj
(ns javax.swing.plaf.multi.MultiTabbedPaneUI "A multiplexing UI used to combine TabbedPaneUIs. This file was automatically generated by AutoMulti." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.multi MultiTabbedPaneUI])) (defn ->multi-tabbed-pane-ui "Constructor." (^MultiTabb...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/multi/MultiTabbedPaneUI.clj
clojure
(ns javax.swing.plaf.multi.MultiTabbedPaneUI "A multiplexing UI used to combine TabbedPaneUIs. This file was automatically generated by AutoMulti." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.multi MultiTabbedPaneUI])) (defn ->multi-tabbed-pane-ui "Constructor." (^MultiTabb...
e8e84886c5e4b6d9ea988eded26a62652c42bbb9f7102aa13739b377e2c07b14
stepcut/plugins
Utils.hs
-- Copyright ( C ) 2004 -- -- 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.1 of the License , or ( at your option ) any later version . -- -- This library is d...
null
https://raw.githubusercontent.com/stepcut/plugins/52c660b5bc71182627d14c1d333d0234050cac01/src/System/Eval/Utils.hs
haskell
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public 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 the GN...
Copyright ( C ) 2004 License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA mo...
c78a0fed77f6d85207e9f66fc721988ad040a834257dfb6f98ce8c350b1bac72
alanz/ghc-exactprint
SlidingDataClassDecl.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOperators #-} {-# LANGUAGE TypeSynonymInstances #-} instance HasTrie R2Basis where data R2Basis :->: x = R2Trie...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc710/SlidingDataClassDecl.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE TypeOperators # # LANGUAGE TypeSynonymInstances #
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # instance HasTrie R2Basis where data R2Basis :->: x = R2Trie x x trie f = R2Trie (f XB) (f YB) untrie (R2Trie x _y) XB = x untrie (R2Trie _x y) YB = y enumerate (R2Trie x y) =...
a51a1af96c3ced669cee44908d451dfbfb35ff54a7f0421a3de99b9d271b6367
chaoxu/fancy-walks
B.hs
import Control.Applicative data Direction = HEAD | TAIL deriving (Show, Eq) simulate n sto con dir turn seqs | con == sto = "Controller " ++ show turn | seqs == [] = "Stowaway" | head seqs == '1' = simulate n targetPos nextCon nextDir (turn + 1) (tail seqs) | otherwise ...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/codeforces.com/74/B.hs
haskell
import Control.Applicative data Direction = HEAD | TAIL deriving (Show, Eq) simulate n sto con dir turn seqs | con == sto = "Controller " ++ show turn | seqs == [] = "Stowaway" | head seqs == '1' = simulate n targetPos nextCon nextDir (turn + 1) (tail seqs) | otherwise ...
dec2254ed684bddc033505f83fce741243e52c94288c442f3f55fa1a22544600
babashka/babashka
shell_test.clj
(ns babashka.impl.clojure.java.shell-test (:require [babashka.main :as main] [babashka.test-utils :as test-utils] [clojure.string :as str] [clojure.test :as t :refer [deftest is testing]])) (deftest ^:skip-windows with-sh-env-test (is (= "\"BAR\"" (str/trim (test-utils...
null
https://raw.githubusercontent.com/babashka/babashka/16911a54f06e5e07fa27bf0320c9229e2117feda/test/babashka/impl/clojure/java/shell_test.clj
clojure
(ns babashka.impl.clojure.java.shell-test (:require [babashka.main :as main] [babashka.test-utils :as test-utils] [clojure.string :as str] [clojure.test :as t :refer [deftest is testing]])) (deftest ^:skip-windows with-sh-env-test (is (= "\"BAR\"" (str/trim (test-utils...
ce6b37b175a7b5fd775864265dc16b26248f8f01b12ec370abe06cc290cf3f8e
naveen-negi/functional-domain-driven-design
placing_on_hold_policies_test.clj
(ns library.placing-on-hold-policies-test (:require [library.placing-on-hold-policies :as sut] [clojure.test :refer [deftest testing is]] [mock-clj.core :as mock-clj] [library.specs :as specs] [clojure.spec.gen.alpha :as gen] [clojure.spec.alpha :as s] ...
null
https://raw.githubusercontent.com/naveen-negi/functional-domain-driven-design/d0bc66af8f52e7e2d265f2e5601c92689bbb12c6/test/library/placing_on_hold_policies_test.clj
clojure
(ns library.placing-on-hold-policies-test (:require [library.placing-on-hold-policies :as sut] [clojure.test :refer [deftest testing is]] [mock-clj.core :as mock-clj] [library.specs :as specs] [clojure.spec.gen.alpha :as gen] [clojure.spec.alpha :as s] ...
27fbed1228a85442f12b7bc06ec551479abb7aec412db37d457385086401ce2d
metametadata/carry
core.cljs
(ns app.core (:require [carry.core :as carry] [carry-reagent.core :as carry-reagent] [reagent.core :as r] [reagent.ratom :refer [reaction]] [cljs.core.match :refer-macros [match]] [datascript.core :as d])) (enable-console-print!) (def counter-id 1) (def in...
null
https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/examples/counter-datascript/src/app/core.cljs
clojure
Because in such case time travel debugger will not be able to correctly toggle past actions. Figwheel stuff
(ns app.core (:require [carry.core :as carry] [carry-reagent.core :as carry-reagent] [reagent.core :as r] [reagent.ratom :refer [reaction]] [cljs.core.match :refer-macros [match]] [datascript.core :as d])) (enable-console-print!) (def counter-id 1) (def in...
f91422f748c6c4feb71559c434f1e597da339e1c14551fb550683a7afbe331eb
hoelzl/Clicc
startup.lisp
;;;----------------------------------------------------------------------------- Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany ;;;----------------------------------------------------------------------------- Projekt : APPLY - A Practicable And Portable Lisp Implementation ;;; ...
null
https://raw.githubusercontent.com/hoelzl/Clicc/cea01db35301144967dc74fd2f96dd58aa52d6ea/src/runtime/lisp/startup.lisp
lisp
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ------------------------------------------------------ $Log: startup.lisp,v $ *package-array* und *keyword-package* werden jetzt in packg.lisp defin...
Copyright ( C ) 1993 Christian - Albrechts - Universitaet zu Kiel , Germany Projekt : APPLY - A Practicable And Portable Lisp Implementation Funktion : Laufzeitsystem , Initialisierung $ Revision : 1.12 $ Revision 1.12 1993/12/09 17:14:26 sma Revision 1.11 1993/06/16 15:20:38 hk Copyright ...
956b4138536eb1b8829a3513e7cf249def4e42cb03bed717b1983126a938cd1a
skanev/playground
72-tests.scm
(require rackunit rackunit/text-ui) (load "../72.scm") (define sicp-3.72-tests (test-suite "Tests for SICP exercise 3.72" (check-equal? (stream-take (three-ways-of-two-squares) 20) '( 325 425 650 725 845 850 925 1025 1105 1250 1300 1325 1445 1450 1525 1625 1690 17...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/tests/72-tests.scm
scheme
(require rackunit rackunit/text-ui) (load "../72.scm") (define sicp-3.72-tests (test-suite "Tests for SICP exercise 3.72" (check-equal? (stream-take (three-ways-of-two-squares) 20) '( 325 425 650 725 845 850 925 1025 1105 1250 1300 1325 1445 1450 1525 1625 1690 17...
aef151664b7d0c13d52c47742c0d931c7a0ca2572de2b91bdd910e76ecdb9133
wireapp/wire-server
ConverProtoLens.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/8d0c53abd7eb1e0237b39dfdd216acd88d537d98/libs/wire-api/src/Wire/API/ConverProtoLens.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Wire.API.ConverProtoLens ...
c42e16541269837600b6c7726bdc5de4660a479ee20d4b3a28935258814aff15
cdaringe/freshawair
Log.ml
type log_message = { timestamp : string; message : string; level : int } [@@deriving yojson { exn = true }] type log_format = Plain | Json exception Invald_log_format of string [@@deriving sexp] let log_format_from_str = function | "json" -> `Json | "plain" -> `Plain | str -> raise (Invald_log_fo...
null
https://raw.githubusercontent.com/cdaringe/freshawair/e0736cdadcd9c76461725e8f168ea18db351f212/lib/freshcommon/Log.ml
ocaml
#Severity_level
type log_message = { timestamp : string; message : string; level : int } [@@deriving yojson { exn = true }] type log_format = Plain | Json exception Invald_log_format of string [@@deriving sexp] let log_format_from_str = function | "json" -> `Json | "plain" -> `Plain | str -> raise (Invald_log_fo...
725b7cc64a0b22b6f2570cb50fb44eab443b16b28bfc188404c1a56cf1ef6a21
galdor/tungsten
assertions.lisp
(in-package :test-test) (deftest check-true () (check-true t) (check-true (= 1 1)) (check-true (member 3 (list 1 2 3)))) (deftest check-false () (check-false nil) (check-false (= 1 2)) (check-false (member 4 (list 1 2 3)))) (deftest check-equal () (check= 1 1) (check-eq 'foo 'foo))
null
https://raw.githubusercontent.com/galdor/tungsten/5d6e71fb89af32ab3994c5b2daf8b902a5447447/tungsten-test/t/assertions.lisp
lisp
(in-package :test-test) (deftest check-true () (check-true t) (check-true (= 1 1)) (check-true (member 3 (list 1 2 3)))) (deftest check-false () (check-false nil) (check-false (= 1 2)) (check-false (member 4 (list 1 2 3)))) (deftest check-equal () (check= 1 1) (check-eq 'foo 'foo))
9613e7383bf3e4d7448cf1b79a194f1b454f6a639ab1bdb398c9171afe091681
b0-system/b0
b00_github.ml
--------------------------------------------------------------------------- Copyright ( c ) 2018 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/src/b00/kit/b00_github.ml
ocaml
Token User Higher-level interfaces JSON Requests JSON Requests log header This makes sure [p] is in the repo Could be better
--------------------------------------------------------------------------- Copyright ( c ) 2018 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
421c93adbde779a0279a297ca979ce5637e76303ec93e7b21fe0cd5552c89b29
kupl/FixML
sub3.ml
type btree = | Empty | Node of int * btree * btree;; let rec mem : int -> btree -> bool = fun n tree -> match tree with |Empty -> false |Node(_,Empty,_) -> if n = 1 then true else false |Node(_,left,right) -> mem (n/2) left;;
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/mem/mem/submissions/sub3.ml
ocaml
type btree = | Empty | Node of int * btree * btree;; let rec mem : int -> btree -> bool = fun n tree -> match tree with |Empty -> false |Node(_,Empty,_) -> if n = 1 then true else false |Node(_,left,right) -> mem (n/2) left;;
e9cf0d099cb99701d0a96ad2ceed19b8a0ddb807b84700fe5b878dc157dc4863
imalooney/t3tr0s
rules.cljs
(ns client.game.rules) (defn get-points "Determine how many points were scored." [rows-cleared level] (case rows-cleared 1 (* 40 level) 2 (* 100 level) 3 (* 300 level) 4 (* 1200 level))) (defn level-up? "Determine if we should level up given the current level lines cleared." [level-lines] ...
null
https://raw.githubusercontent.com/imalooney/t3tr0s/2f9529e7138a0bc3a8578aa89c9661fc89e81cc0/src/client/game/rules.cljs
clojure
Initial shift speed is the amount of time before a piece starts rapidly shifting. Shift speed is the amount of time in between each rapid shift.
(ns client.game.rules) (defn get-points "Determine how many points were scored." [rows-cleared level] (case rows-cleared 1 (* 40 level) 2 (* 100 level) 3 (* 300 level) 4 (* 1200 level))) (defn level-up? "Determine if we should level up given the current level lines cleared." [level-lines] ...
8e5d248bf5a5087bac8ebe2e8ad242b930ddbe58e0666cf08e4a821c50e4cc1b
samuelrivas/moka
dynamic_exports_aux.erl
Copyright ( c ) 2012 , < > %%% All rights reserved. %%% Redistribution and use in source and binary forms, with or without %%% modification, are permitted provided that the following conditions are met: %%% * Redistributions of source code must retain the above copyright %%% notice, this list of conditio...
null
https://raw.githubusercontent.com/samuelrivas/moka/92521e43d1d685794f462ed49403c99baeae0226/test/acceptance/dynamic_exports_aux.erl
erlang
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistr...
Copyright ( c ) 2012 , < > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTI...
9f659a26ca088c986bbfe6bdf553b60549a086534476f39751a6647d5e615d92
ocaml-batteries-team/batteries-included
batDeque.ml
* Deque -- functional double - ended queues * Copyright ( C ) 2011 Batteries Included Development Team * * 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 * ...
null
https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/f143ef5ec583d87d538b8f06f06d046d64555e90/src/batDeque.ml
ocaml
* Deque -- functional double - ended queues * Copyright ( C ) 2011 Batteries Included Development Team * * 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 * ...
1604c83c6592db3670d985b5365e04795f5e563e3ce29b9f365de08e66533a32
jrh13/hol-light
asym.ml
override_interface ("-->",`(tends_num_real)`);; prioritize_real();; (* ---------------------------------------------------------------------- *) (* properites of num sequences *) (* ---------------------------------------------------------------------- *) let LIM_INV_1N = pr...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/Rqe/asym.ml
ocaml
---------------------------------------------------------------------- properites of num sequences ---------------------------------------------------------------------- {{{ Proof }}} {{{ Proof }}} {{{ Proof }}} {{{ Proof }}} {{{ Proof }}} {{{ Proof ...
override_interface ("-->",`(tends_num_real)`);; prioritize_real();; let LIM_INV_1N = prove_by_refinement( `(\n. &1 / &n) --> &0`, [ REWRITE_TAC[SEQ;real_sub;REAL_ADD_RID;REAL_NEG_0;real_gt;real_ge;GT;GE]; REPEAT STRIP_TAC; MP_TAC (ISPEC `&2 / e` REAL_ARCH_SIMPLE); STRIP_TAC; EXISTS_TAC `n`; REPEAT STRI...