_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
d9c6cccfda42d6c76cc78da955e5a549ad43629544d2f09949964cd496a6f5ec
rabbitmq/rabbitmq-test
rabbit_runtime_parameters_test.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-test/c77ef827396a32aa67b4cbfe9c237485a2650d2d/src/rabbit_runtime_parameters_test.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. ----------------...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2015 Pivotal Software , Inc. All rights reserved . ...
cb4d393acdb8f8b6555ef572276ed7f3fe4eec3b6d68e6aae900874039367089
brendanhay/terrafomo
Types.hs
-- This module was auto-generated. If it is modified, it will not be overwritten. -- | Module : . Cloudflare . Types Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > -- Stability : auto-generated Portability : non - portable ( GH...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-cloudflare/src/Terrafomo/Cloudflare/Types.hs
haskell
This module was auto-generated. If it is modified, it will not be overwritten. | Stability : auto-generated import Formatting (Format, (%))
Module : . Cloudflare . Types Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > Portability : non - portable ( GHC extensions ) module Terrafomo.Cloudflare.Types where import Data . Text ( Text ) import Terrafomo import Te...
5b85c62c0c233f7e74c772345c0989cfc5b3ffd1874e7daeb2c8c6a0458e661a
yrashk/socket.io-erlang
socketio_transport_tests.erl
-module(socketio_transport_tests). -include_lib("../include/socketio.hrl"). -include_lib("eunit/include/eunit.hrl"). -behaviour(gen_event). -export([init/1, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]). -export([handle_request/3]). -export([transport_tests/1, transport_tests/2]). t_echoes...
null
https://raw.githubusercontent.com/yrashk/socket.io-erlang/7a6c768a28cf18d58efd7abe0eb276a22dbc7974/test/socketio_transport_tests.erl
erlang
suppress annoying kernel logger "socket.on('connect',function(){\n" "});\n" gen_event
-module(socketio_transport_tests). -include_lib("../include/socketio.hrl"). -include_lib("eunit/include/eunit.hrl"). -behaviour(gen_event). -export([init/1, handle_event/2, handle_call/2, handle_info/2, terminate/2, code_change/3]). -export([handle_request/3]). -export([transport_tests/1, transport_tests/2]). t_echoes...
3840445ec0d8eff5ac4595ebbca377ccd969485202932ffd57dd3d604564b3fd
mhuebert/maria
linked_graph.cljc
(ns cells.linked-graph (:require [clojure.set :as set])) (defprotocol ILinkedGraph "Protocol for graphs that store relationships directly on nodes." (add-dependency! [cell dep]) (remove-dependency! [cell dep]) (add-dependent! [cell dep]) (remove-dependent! [cell dep]) (immediate-dependencies [cell]) (i...
null
https://raw.githubusercontent.com/mhuebert/maria/15586564796bc9273ace3101b21662d0c66b4d22/cells/src/cells/linked_graph.cljc
clojure
(ns cells.linked-graph (:require [clojure.set :as set])) (defprotocol ILinkedGraph "Protocol for graphs that store relationships directly on nodes." (add-dependency! [cell dep]) (remove-dependency! [cell dep]) (add-dependent! [cell dep]) (remove-dependent! [cell dep]) (immediate-dependencies [cell]) (i...
f2c6ebf8ba23a6028e27be0783b900449fe041cf3f97dfe8d687c996ef207faf
rnons/ted2srt
TestUtils.hs
# LANGUAGE QuasiQuotes # module ReTed.TestUtils ( resetDb ) where import RIO import System.Process (callCommand) import Text.Printf.TH (s) resetDb :: IO () resetDb = do loadFixture "truncate" loadFixture "data" loadFixture :: FilePath -> IO () loadFixture = loadSql . [s|te...
null
https://raw.githubusercontent.com/rnons/ted2srt/7456f109bce2b9f07d0c929bef2fd42e6bc4f75d/backend/test/ReTed/TestUtils.hs
haskell
# LANGUAGE QuasiQuotes # module ReTed.TestUtils ( resetDb ) where import RIO import System.Process (callCommand) import Text.Printf.TH (s) resetDb :: IO () resetDb = do loadFixture "truncate" loadFixture "data" loadFixture :: FilePath -> IO () loadFixture = loadSql . [s|te...
7dedfc191121347548084b4fd701719388bcfce7277b2296f603e3bcc6a3e0ff
mukul-rathi/bolt
type_subord_capabilities.mli
(** This module type-checks potential accesses to subordinate capabilities of objects *) open Desugaring.Desugared_ast open Ast.Ast_types open Core val type_subord_capabilities_block_expr : class_defn list -> obj_var_and_capabilities list -> block_expr -> block_expr val type_subord_capabilities_method_prototype : ...
null
https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/src/frontend/data_race_checker/type_subord_capabilities.mli
ocaml
* This module type-checks potential accesses to subordinate capabilities of objects * type check any potential subordinate state passed into ([obj_var_and_capabilities list]) or returned from a method ([type_expr]) given the class the method belongs to.
open Desugaring.Desugared_ast open Ast.Ast_types open Core val type_subord_capabilities_block_expr : class_defn list -> obj_var_and_capabilities list -> block_expr -> block_expr val type_subord_capabilities_method_prototype : class_defn list -> Class_name.t -> Method_name.t -> type_expr -> obj_var_and...
075177ec5e0eace099702b1d5138bca35b9c1b6c58c09a402a73f3516976c79f
lathe/punctaffy-for-racket
expanders.rkt
#lang parendown racket/base ; expanders.rkt ; Syntax expanders for q - expression - building macros ( aka bracros ) as ; well as an implementation of bracroexpansion. Copyright 2017 - 2018 The Lathe Authors ; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ; you may not use this file...
null
https://raw.githubusercontent.com/lathe/punctaffy-for-racket/399657556e22ecaca53c7d3d8310bf22e9394f00/notes/code-sketches/single-phase/expanders.rkt
racket
expanders.rkt well as an implementation of bracroexpansion. 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, either express or implied. See the License for the specific la...
#lang parendown racket/base Syntax expanders for q - expression - building macros ( aka bracros ) as Copyright 2017 - 2018 The Lathe Authors software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , (require #/for-meta -1 racket/base) ...
6fccdca74b7894467f98cb512c71aae42fa0f2722713de8b211e6faec94a158f
artyom-poptsov/guile-smc
transition.scm
(add-to-load-path (getenv "abs_top_srcdir")) (use-modules (srfi srfi-64) (srfi srfi-26) (ice-9 receive) (ice-9 regex) (oop goops) (tests common) (smc context char-context) (smc core transition)) (define %test-name "transition...
null
https://raw.githubusercontent.com/artyom-poptsov/guile-smc/bfee22bf82ff54c4c83924c611f4671e3aee8049/tests/transition.scm
scheme
(add-to-load-path (getenv "abs_top_srcdir")) (use-modules (srfi srfi-64) (srfi srfi-26) (ice-9 receive) (ice-9 regex) (oop goops) (tests common) (smc context char-context) (smc core transition)) (define %test-name "transition...
0ec03a56dcdcd0d2fd797fc54c3da268fa0dea0ee7588ffdd7fc91e72b2b09a9
jacekschae/learn-re-frame-course-files
message_card.cljs
(ns app.inbox.views.message-card (:require [re-frame.core :as rf] [app.helpers :as h] ["@smooth-ui/core-sc" :refer [Box Typography]])) (defn message-card [{:keys [message author created-at]}] (let [user-image @(rf/subscribe [:user-image author])] [:> Box {:p 2 :pl 3} ...
null
https://raw.githubusercontent.com/jacekschae/learn-re-frame-course-files/a86e6f14b89c595b4389b03459539a9544af4e1d/increments/49-request-to-cook/src/app/inbox/views/message_card.cljs
clojure
(ns app.inbox.views.message-card (:require [re-frame.core :as rf] [app.helpers :as h] ["@smooth-ui/core-sc" :refer [Box Typography]])) (defn message-card [{:keys [message author created-at]}] (let [user-image @(rf/subscribe [:user-image author])] [:> Box {:p 2 :pl 3} ...
01091436a536ddc8d46b2cdee8f9cf5fa74553bfbb4c691dbd0486e17c1d8c76
jakemcc/sicp-study
ex3_1.clj
Exercise 3.1 (use 'clojure.test) ; Should this be doing using refs instead? (defn make-accumulator [starting-value] (let [initial (atom starting-value)] (fn [additional] (swap! initial (partial + additional))))) (deftest accumulator-accumulates (let [accum (make-accumulator 10) other (make-accumulator...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section3.1/ex3_1.clj
clojure
Should this be doing using refs instead?
Exercise 3.1 (use 'clojure.test) (defn make-accumulator [starting-value] (let [initial (atom starting-value)] (fn [additional] (swap! initial (partial + additional))))) (deftest accumulator-accumulates (let [accum (make-accumulator 10) other (make-accumulator 5)] (is (= 15 (accum 5))) (is (= 25 (a...
a8ec36964c64b06483457f7ed2de03ee94348a81b3e6062746b7a9d92fcf6a78
MastodonC/kixi.datastore
schemastore.clj
(ns kixi.datastore.schemastore (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [kixi.datastore.schemastore.conformers :as sc :refer [ns-keyword timestamp uuid]])) (s/def ::id uuid) (s/def ::tag keyword?) (s/def ::create...
null
https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/src/kixi/datastore/schemastore.clj
clojure
(ns kixi.datastore.schemastore (:require [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [kixi.datastore.schemastore.conformers :as sc :refer [ns-keyword timestamp uuid]])) (s/def ::id uuid) (s/def ::tag keyword?) (s/def ::create...
d4b6584d85412157f5ae34e72c9cbeb72c152c58611aae949716768278202021
thelema/ocaml-community
frx_color.mli
(***********************************************************************) (* *) MLTk , Tcl / Tk interface of OCaml (* *) , , and ...
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/otherlibs/labltk/frx/frx_color.mli
ocaml
********************************************************************* described in file LICENSE found in the...
MLTk , Tcl / Tk interface of OCaml , , and projet Cristal , INRIA Rocquencourt , Kyoto University RIMS Copyright 2002 Institut National de Recherche en Informatique et en Automatique and...
b27a5a497e44baca09062e1d0f610f2f5dd7586a6d8d154cc58b193935f7224a
shayan-najd/QFeldspar
GADTFirstOrder.hs
module QFeldspar.Expression.Utils.Equality.GADTFirstOrder (eql) where import QFeldspar.MyPrelude import QFeldspar.Variable.Typed import QFeldspar.Environment.Typed import QFeldspar.Expression.GADTFirstOrder import QFeldspar.Singleton import qualified QFeldspar.Type.GADT as TG tt :: TG.Typ a tt = tt eql :: forall s ...
null
https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/QFeldspar/Expression/Utils/Equality/GADTFirstOrder.hs
haskell
ignore tags
module QFeldspar.Expression.Utils.Equality.GADTFirstOrder (eql) where import QFeldspar.MyPrelude import QFeldspar.Variable.Typed import QFeldspar.Environment.Typed import QFeldspar.Expression.GADTFirstOrder import QFeldspar.Singleton import qualified QFeldspar.Type.GADT as TG tt :: TG.Typ a tt = tt eql :: forall s ...
7b563ff3ad448ec436d80c179881022e20a1cc7ce92b942a9f88a4b814921320
fpco/ide-backend
ide-backend-server.hs
module Main where import System.Environment (getArgs) import Server (ghcServer) main :: IO () main = getArgs >>= ghcServer
null
https://raw.githubusercontent.com/fpco/ide-backend/860636f2d0e872e9481569236bce690637e0016e/ide-backend-server/ide-backend-server.hs
haskell
module Main where import System.Environment (getArgs) import Server (ghcServer) main :: IO () main = getArgs >>= ghcServer
352d58612af6e906e2d9ad19fdfb2c261f054151aabbffc7b56cb6a60923b628
Leystryku/mpbomberman_racket
sh_tick.rkt
#lang racket ;; import (require 2htdp/image) (require "sh_tick_explosion.rkt") (require "sh_tick_bomb.rkt") (require "sh_tick_breakingtile.rkt") (require "sh_config.rkt" ) (require "sh_structs.rkt") (require "sh_collisions.rkt") (require "sh_helper.rkt") ;; export (provide (all-defined-out)) ;; [elementTick] calls ...
null
https://raw.githubusercontent.com/Leystryku/mpbomberman_racket/059d95040cfad2e27237f8dd41fc32a4fc698afe/game/sh_tick.rkt
racket
import export [elementTick] calls the fitting tick function for a given element [doElementTicks] calls the tick function on the given elements [doSharedTick] is currently only a wrapper around doElementTicks but more might be added when there's more shared logic
#lang racket (require 2htdp/image) (require "sh_tick_explosion.rkt") (require "sh_tick_bomb.rkt") (require "sh_tick_breakingtile.rkt") (require "sh_config.rkt" ) (require "sh_structs.rkt") (require "sh_collisions.rkt") (require "sh_helper.rkt") (provide (all-defined-out)) (define (elementTick setGameFieldFn current...
dbd965fd5f4ac83b948eef52e0ee5fc4b174b1283ba45f1e3eb6a742edd6b9d2
aryx/xix
eval.ml
Copyright 2016 , see copyright.txt open Common module A = Ast module E = Env module R = Rules module P = Percent module Set = Set_ (*****************************************************************************) (* Prelude *) (*****************************************************************************) (******...
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/mk/eval.ml
ocaml
*************************************************************************** Prelude *************************************************************************** *************************************************************************** Error management ***************************************************************...
Copyright 2016 , see copyright.txt open Common module A = Ast module E = Env module R = Rules module P = Percent module Set = Set_ let error loc s = failwith (spf "%s:%d: Semantic error, %s" loc.A.file loc.A.line s) let warning loc s = pr2 (spf "warning: %s (at %s:%d)" s loc.A.file loc.A.line) let rec ...
a51eda54f8a2cfaca8bef552ead580d3d5ae98f352c066c104ce4133e1dd4c3d
mirage/ocaml-cohttp
cohttp_eio.mli
module Body : sig type t = | Fixed of string | Chunked of chunk_writer | Custom of (Eio.Buf_write.t -> unit) | Empty and chunk_writer = { body_writer : (chunk -> unit) -> unit; trailer_writer : (Http.Header.t -> unit) -> unit; } (** [Chunk] encapsulates HTTP/1.1 chunk transfer encoding...
null
https://raw.githubusercontent.com/mirage/ocaml-cohttp/d5ab5ba3f5263a68147438694883064cd922857b/cohttp-eio/src/cohttp_eio.mli
ocaml
* [Chunk] encapsulates HTTP/1.1 chunk transfer encoding data structures. #section-4.1 * The request headers, a reader for the socket, and the address of the client. To read the request body, use {!read_fixed} or {!read_chunked}. * [connection_handler request_handler] is a connection handler, suitable for ...
module Body : sig type t = | Fixed of string | Chunked of chunk_writer | Custom of (Eio.Buf_write.t -> unit) | Empty and chunk_writer = { body_writer : (chunk -> unit) -> unit; trailer_writer : (Http.Header.t -> unit) -> unit; } and chunk = Chunk of chunk_body | Last_chunk of chunk_ext...
94ed0eaaad6ff79d769c9c5f7fece05dc73b6f0b57cc5cc7265d1c9c6327e369
metabase/metabase
scoring_test.clj
(ns metabase-enterprise.search.scoring-test (:require [cheshire.core :as json] [clojure.math.combinatorics :as math.combo] [clojure.string :as str] [clojure.test :refer :all] [java-time :as t] [metabase-enterprise.search.scoring :as ee-scoring] [metabase.public-settings.premium-features :as premi...
null
https://raw.githubusercontent.com/metabase/metabase/1f809593c2298ccf9c4070df3fa39d718eddb5d6/enterprise/backend/test/metabase_enterprise/search/scoring_test.clj
clojure
verified item is promoted using the ee implementation that isn't wrapped by enable-enhancements? check c is verified and is now last or highest score ; size 0 ; size 1 ; size 2 ; size 3
(ns metabase-enterprise.search.scoring-test (:require [cheshire.core :as json] [clojure.math.combinatorics :as math.combo] [clojure.string :as str] [clojure.test :refer :all] [java-time :as t] [metabase-enterprise.search.scoring :as ee-scoring] [metabase.public-settings.premium-features :as premi...
690d4dc1554abc2a28e670b7760f86af67ea6277dfe82bed012f826636cfd433
tisnik/clojure-examples
project.clj
; ( C ) Copyright 2016 , 2020 , 2021 ; ; All rights reserved. This program and the accompanying materials ; are made available under the terms of the Eclipse Public License v1.0 ; which accompanies this distribution, and is available at -v10.html ; ; Contributors: ; (defproject async5 "0.1.0-SNA...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/async5/project.clj
clojure
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors:
( C ) Copyright 2016 , 2020 , 2021 -v10.html (defproject async5 "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License", :url "-v10.html"} :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/core.async "0.2...
a3c26dd725eadfb72a530e8f48a15eafc556fe2ce2d7c61fb5193aa1a11f9d1c
argp/bap
flip.ml
open BatPervasives open BatSet let of_list l = List.fold_left (flip add) empty l let of_list2 l = List.fold_left (fun x y -> add y x) empty l let of_list3 l = BatList.enum l |> BatSet.of_enum let wrap f () = f [1;3;5;7;9;2;4;6;8;10; 2; 5; 8; 3; 1; 9; 6] let () = Bench.bench ["flip", wrap of_list; ...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/benchsuite/flip.ml
ocaml
open BatPervasives open BatSet let of_list l = List.fold_left (flip add) empty l let of_list2 l = List.fold_left (fun x y -> add y x) empty l let of_list3 l = BatList.enum l |> BatSet.of_enum let wrap f () = f [1;3;5;7;9;2;4;6;8;10; 2; 5; 8; 3; 1; 9; 6] let () = Bench.bench ["flip", wrap of_list; ...
a1114db62a2d3423ab3f9a62c5d83cec4fc5f225bd8eae87d9a51cd253ea3dc4
ih/ikarus.dev
analyse-results.scm
(define results '( ("boyer" (1500 "" "" " -fno-thread-jumps" " -fno-guess-branch-probability" "" "" " -fno-delayed-branch" "" " -ftree-ccp" "" "" " -ftree-dse" "" "" "" " -ftree-copyrename" " -ftree-fre" "" " -fmerge-constants" " -fcrossjumping" "" "" " -fexpensive-optimiz...
null
https://raw.githubusercontent.com/ih/ikarus.dev/8bb0c8e4d1122cf0f9aeb675cb51bc7df178959b/benchmarks.larceny/analyse-results.scm
scheme
(define results '( ("boyer" (1500 "" "" " -fno-thread-jumps" " -fno-guess-branch-probability" "" "" " -fno-delayed-branch" "" " -ftree-ccp" "" "" " -ftree-dse" "" "" "" " -ftree-copyrename" " -ftree-fre" "" " -fmerge-constants" " -fcrossjumping" "" "" " -fexpensive-optimiz...
db7f09c9251f1d9aca15b9f1595585aef2a89ce102e052746ac1368e5067c35d
digital-asset/ghc
T13068m.hs
import T13068 main = print (f :: Int)
null
https://raw.githubusercontent.com/digital-asset/ghc/323dc6fcb127f77c08423873efc0a088c071440a/testsuite/tests/typecheck/should_fail/T13068m.hs
haskell
import T13068 main = print (f :: Int)
5a76381cef6bc58ce39da02007f8f55242c89c104303f227563fe2ac04e8ba6c
scrintal/heroicons-reagent
wifi.cljs
(ns com.scrintal.heroicons.solid.wifi) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M1.371 8.143c5.858-5.857 15.356-5.857 21.213 0a.75.75 0 010 1.061l-.53.53a.75.75 0 01...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/wifi.cljs
clojure
(ns com.scrintal.heroicons.solid.wifi) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M1.371 8.143c5.858-5.857 15.356-5.857 21.213 0a.75.75 0 010 1.061l-.53.53a.75.75 0 01...
73c3bcf149234197e291554f4ae9a7240c847978aa47d968bacda241d81524b4
ondrap/mapbox-filter
Types.hs
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # module Types where import qualified Data.ByteString.Lazy as BL import qualified Data.Text as T import Database.SQLite.Simple.FromField (FromField (..)) impor...
null
https://raw.githubusercontent.com/ondrap/mapbox-filter/77e0477664901f966d8bbf3801e9c84ea576c677/app/Types.hs
haskell
| Flip y coordinate between xyz and tms schemes
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # module Types where import qualified Data.ByteString.Lazy as BL import qualified Data.Text as T import Database.SQLite.Simple.FromField (FromField (..)) impor...
9dae34f35c82710f59c343f628a3df5ab65515ed21fcaa742bbfa293d1bfb615
ghollisjr/cl-ana
typespec.lisp
cl - ana is a Common Lisp data analysis library . Copyright 2013 , 2014 ;;;; This file is part of cl - ana . ;;;; ;;;; cl-ana is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the ...
null
https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/typespec/typespec.lisp
lisp
cl-ana is free software: you can redistribute it and/or modify it (at your option) any later version. cl-ana 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 GNU General Public Lice...
cl - ana is a Common Lisp data analysis library . Copyright 2013 , 2014 This file is part of cl - ana . under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License ...
87380c3fa4829420f9c343baa173f676457abf9c8c910581fae54176f8832860
nasa/Common-Metadata-Repository
spatial.clj
(ns cmr.search.data.complex-to-simple-converters.spatial "Contains converters for spatial condition into the simpler executable conditions" (:require [clojure.string :as string] [cmr.common-app.services.search.complex-to-simple :as c2s] [cmr.common-app.services.search.elastic-search-index :as idx] [cmr....
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/b9d9ce072fb7534255aec8d33980c20653893d68/search-app/src/cmr/search/data/complex_to_simple_converters/spatial.clj
clojure
If the back-tracking doesn't find a valid range it returns and empty vector for the longitudes, but this is paired with the latitudes that were originally sent in. Use the orbit parameters to perform orbital back tracking to longitude ranges to be used in the search. ascending descending
(ns cmr.search.data.complex-to-simple-converters.spatial "Contains converters for spatial condition into the simpler executable conditions" (:require [clojure.string :as string] [cmr.common-app.services.search.complex-to-simple :as c2s] [cmr.common-app.services.search.elastic-search-index :as idx] [cmr....
72bb162295cebddb79272b2657c4278220188f626e9ca1b82fcd7fcc032b236d
lgessler/fulcro-material-ui-template
service.clj
(ns fmuit.server.service (:require [clojure.pprint :refer [pprint]] [ring.util.request :as ring-req] [clojure.string :as string] [com.fulcrologic.fulcro.server.api-middleware :refer [handle-api-request]] [com.fulcrologic.guardrails.core :refer [>defn => | ?]] [hiccup.page :refer [html5]] [...
null
https://raw.githubusercontent.com/lgessler/fulcro-material-ui-template/efc36f25675de10800f63274616a8ff42d08f088/src/main/fmuit/server/service.clj
clojure
needed for specs (log/info "writing session: at key: " key) end ring session store try just a file read ================================================================================ Dynamically generated HTML. We do this so we can safely embed the CSRF token in a js var for use by the client, and to use hashed...
(ns fmuit.server.service (:require [clojure.pprint :refer [pprint]] [ring.util.request :as ring-req] [clojure.string :as string] [com.fulcrologic.fulcro.server.api-middleware :refer [handle-api-request]] [com.fulcrologic.guardrails.core :refer [>defn => | ?]] [hiccup.page :refer [html5]] [...
580dd4e6e27ec3c18d86e08897c3bf0ff964708b3575cac7c87c91693588feba
acowley/GLUtil
BufferObjects.hs
# LANGUAGE ScopedTypeVariables # |Utilities for filling ' BufferObject 's . module Graphics.GLUtil.BufferObjects where import Data.Word (Word32) import Graphics.Rendering.OpenGL import Foreign.ForeignPtr import Foreign.Ptr import Foreign.Storable import Data.Array.Storable import qualified Data.Vector.Storable as V i...
null
https://raw.githubusercontent.com/acowley/GLUtil/09faac00072b08c72ab12bcc57d4ab2a02ff1c88/src/Graphics/GLUtil/BufferObjects.hs
haskell
whose length is explicitly given. This is useful when the list is of known length, as it avoids a traversal to find the length. |@replaceBuffer target elements@ replaces the buffer data attached to the buffer object currently bound to @target@ with the supplied list. Any previous data is deleted. from the supplie...
# LANGUAGE ScopedTypeVariables # |Utilities for filling ' BufferObject 's . module Graphics.GLUtil.BufferObjects where import Data.Word (Word32) import Graphics.Rendering.OpenGL import Foreign.ForeignPtr import Foreign.Ptr import Foreign.Storable import Data.Array.Storable import qualified Data.Vector.Storable as V i...
02908772e98a3d6e3c133fb73811cf8e6c7694003271b7076718456c1548344f
babashka/nbb
example.cljs
(ns example (:require ["sharp$default" :as sharp] [nbb.core :refer [await]])) ;; see / for docs (await (-> (sharp "./clojure_logo.svg") (.toFile "./clojure_logo.png"))) = > # js { : format " png " , : width 256 , : height 256 , : channels 4 , : premultiplied false , : size 13165 }
null
https://raw.githubusercontent.com/babashka/nbb/25f61824a348579ecd7dd506c3cf701d451d72f1/examples/sharp/example.cljs
clojure
see / for docs
(ns example (:require ["sharp$default" :as sharp] [nbb.core :refer [await]])) (await (-> (sharp "./clojure_logo.svg") (.toFile "./clojure_logo.png"))) = > # js { : format " png " , : width 256 , : height 256 , : channels 4 , : premultiplied false , : size 13165 }
21a83c7f86e76b66b701a9e8a778be9ee987db885e086627ba48e0f9f9c7b579
theodormoroianu/SecondYearCourses
LambdaChurch_20210415164453.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164453.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
6d5af7dc8f4cad8bf792a2278a4eb3e65b8cee1cc3173d5377d7c60e9b189049
pqwy/lru
adapt.ml
module M_as_F (K: Hashtbl.HashedType) (V: Lru.Weighted): Lru.F.S with type k = K.t and type v = V.t = struct let nope name _ = invalid_arg @@ Format.sprintf "M_as_F.%s: not implemented" name include Lru.M.Make (K) (V) let unadd = nope "unadd" let pop_lru = nope "pop_lru" let empty n = create n ...
null
https://raw.githubusercontent.com/pqwy/lru/b88a102bcb14c900c4233c47202678e948181009/test/adapt.ml
ocaml
module M_as_F (K: Hashtbl.HashedType) (V: Lru.Weighted): Lru.F.S with type k = K.t and type v = V.t = struct let nope name _ = invalid_arg @@ Format.sprintf "M_as_F.%s: not implemented" name include Lru.M.Make (K) (V) let unadd = nope "unadd" let pop_lru = nope "pop_lru" let empty n = create n ...
9f2912d5c688e1e804323f0f1509f9bef0a09f011ed3fe08905a911a4c12c8c7
fccm/OCamlSDL2
sdlpower.mli
OCamlSDL2 - An OCaml interface to the SDL2 library Copyright ( C ) 2013 This software is provided " AS - IS " , without any express or implied warranty . In no event will the authors be held liable for any damages arising from the use of this software . Permission is granted to anyone to use this...
null
https://raw.githubusercontent.com/fccm/OCamlSDL2/01fa29187cab90052d2581eb509d1bca1a85418f/src/sdlpower.mli
ocaml
* Power management * cannot determine power status * Not plugged in, running on the battery * Plugged in, no battery available * Plugged in, charging battery * Plugged in, battery charged
OCamlSDL2 - An OCaml interface to the SDL2 library Copyright ( C ) 2013 This software is provided " AS - IS " , without any express or implied warranty . In no event will the authors be held liable for any damages arising from the use of this software . Permission is granted to anyone to use this...
f1d6b75438566dd817826672276ff05c2ee4aec3d55e9cc00ffc12717226c653
wdebeaum/DeepSemLex
steam.lisp
;;;; ;;;; W::steam ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::steam (SENSES ((LF-PARENT ONT::cloud-like-object) (templ mass-pred-templ) (meta-data :origin mobius :entry-date 20060712 :change-date nil :comments engine-texts) ) ) ) )) (define-words :pos W::V :TE...
null
https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/steam.lisp
lisp
W::steam
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::steam (SENSES ((LF-PARENT ONT::cloud-like-object) (templ mass-pred-templ) (meta-data :origin mobius :entry-date 20060712 :change-date nil :comments engine-texts) ) ) ) )) (define-words :pos W::V :TEMPL AGENT-AFFECTED-XP-NP...
0d1f5cbd35b430fa8ea8c9a749f7cf5bd3681209815e1e7e8da8535be674da58
anoma/juvix-circuits
vampir.lisp
(in-package :alu-test) (def-suite vampir :description "Test the vampir layer") (in-suite vampir) (defparameter *vamp-example-1* (list (vspc:make-pub :wires (list :fi :bar)) (vspc:make-alias :name :xor :inputs '(:a :b) :body (list (vspc:make-bind :names (li...
null
https://raw.githubusercontent.com/anoma/juvix-circuits/c424e9cfab641e146c33001e669955a2ef97d439/test/vampir.lisp
lisp
(in-package :alu-test) (def-suite vampir :description "Test the vampir layer") (in-suite vampir) (defparameter *vamp-example-1* (list (vspc:make-pub :wires (list :fi :bar)) (vspc:make-alias :name :xor :inputs '(:a :b) :body (list (vspc:make-bind :names (li...
30fa54d6d8b3102885b9c16fefc9b7e4efeb9a6020fccaffc13961c27af8f9cc
NorfairKing/cursor
Bench.hs
# LANGUAGE TypeApplications # module Main where import Criterion.Main as Criterion import Cursor.Forest.Gen () import Cursor.List import Cursor.List.Gen () import Cursor.List.NonEmpty.Gen () import Cursor.Map.Gen () import Cursor.Map.KeyValue.Gen () import Cursor.Simple.Forest import Cursor.Simple.List.NonEmpty impor...
null
https://raw.githubusercontent.com/NorfairKing/cursor/71ec3154809e229efbf35d500ac6d1a42ae5fdc0/cursor-gen/bench/Bench.hs
haskell
# LANGUAGE TypeApplications # module Main where import Criterion.Main as Criterion import Cursor.Forest.Gen () import Cursor.List import Cursor.List.Gen () import Cursor.List.NonEmpty.Gen () import Cursor.Map.Gen () import Cursor.Map.KeyValue.Gen () import Cursor.Simple.Forest import Cursor.Simple.List.NonEmpty impor...
297234af33d9e4e1b10b36db77f6c2b4e2f7ad02b710193b7a8fe076d08e808a
PacktPublishing/Haskell-High-Performance-Programming
vector-testing.hs
-- file: vector-testing.hs import qualified Data.Vector.Unboxed as U import System.Random (randomIO) type Obs = U.Vector (TimeStamp, Double) type TimeStamp = Int type Period = Int -- | O(1) values :: Obs -> U.Vector Double values obs = snd (U.unzip obs) -- | O(n+m), no copying. window :: TimeStamp -> TimeStamp -> ...
null
https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter02/vector-testing.hs
haskell
file: vector-testing.hs | O(1) | O(n+m), no copying. | O(n)
import qualified Data.Vector.Unboxed as U import System.Random (randomIO) type Obs = U.Vector (TimeStamp, Double) type TimeStamp = Int type Period = Int values :: Obs -> U.Vector Double values obs = snd (U.unzip obs) window :: TimeStamp -> TimeStamp -> Obs -> Obs window from until v = let (_, start) = U.span...
649e47c2976a8ff231ec6dd50c983dc5213f584c4dc3ee34c210962cb369ee6a
iamFIREcracker/adventofcode
day01.lisp
(defpackage :aoc/2019/01 #.cl-user::*aoc-use*) (in-package :aoc/2019/01) (defun fuel-req (mass) (- (floor mass 3) 2)) (defun fuel-req-recursive (mass) (loop :for fuel = (fuel-req mass) :then (fuel-req fuel) :while (> fuel 0) :summing fuel)) (define-solution (2019 1) (data parse-integers) (values ...
null
https://raw.githubusercontent.com/iamFIREcracker/adventofcode/c395df5e15657f0b9be6ec555e68dc777b0eb7ab/src/2019/day01.lisp
lisp
(defpackage :aoc/2019/01 #.cl-user::*aoc-use*) (in-package :aoc/2019/01) (defun fuel-req (mass) (- (floor mass 3) 2)) (defun fuel-req-recursive (mass) (loop :for fuel = (fuel-req mass) :then (fuel-req fuel) :while (> fuel 0) :summing fuel)) (define-solution (2019 1) (data parse-integers) (values ...
33be8c9b227d502ac3a21fdece2fb70519641759057eba1285185d13e16cd66f
erlang/corba
ic_plainbe.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1998 - 2016 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applic...
null
https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/src/ic_plainbe.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 1998 - 2016 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ic_plainbe). -export([do_gen/3]). -import(ic_util, [mk_var/1, mk_oe_name/2, to_atom/1, to_list/1]). -impor...
e9a2639758cbb4c5964e1e85f5c110989a2bf97fcb2d6306b64b99edd32fd49f
rvantonder/hack_parallel
hack_polymorphic_compare.mli
(* For use in combination with [No_polymorphic_compare]. *) val compare : 'a -> 'a -> int * [ ascending ] is identical to [ compare ] . [ descending x y = ascending y x ] . These are intended to be mnemonic when used like [ List.sort ~cmp : ascending ] and [ List.sort ~cmp : descending ] , since they...
null
https://raw.githubusercontent.com/rvantonder/hack_parallel/c9d0714785adc100345835c1989f7c657e01f629/src/third-party/hack_core/hack_polymorphic_compare.mli
ocaml
For use in combination with [No_polymorphic_compare].
val compare : 'a -> 'a -> int * [ ascending ] is identical to [ compare ] . [ descending x y = ascending y x ] . These are intended to be mnemonic when used like [ List.sort ~cmp : ascending ] and [ List.sort ~cmp : descending ] , since they cause the list to be sorted in ascending or descending ...
681b5b62fc6a5ddd784418e6f2aec6525d488216527bb1ee1758227c6d6a980f
levex/wacc
Optimizations.hs
module WACC.Optimizations where import Control.Monad.State import WACC.Parser.Types import WACC.Optimizations.Types import WACC.Optimizations.Expressions optimizeProgram :: Program -> Program optimizeProgram p = (flip evalState OptimizerState . runOptimizer) $ do minimizeExpr...
null
https://raw.githubusercontent.com/levex/wacc/c77164f0c9aeb53d3d13a0370fdedc448b6009a3/src/WACC/Optimizations.hs
haskell
module WACC.Optimizations where import Control.Monad.State import WACC.Parser.Types import WACC.Optimizations.Types import WACC.Optimizations.Expressions optimizeProgram :: Program -> Program optimizeProgram p = (flip evalState OptimizerState . runOptimizer) $ do minimizeExpr...
1505983456fc3c9eae4779e3d06e2b0c1a52cc4e2bd26450b97dd7ce966c0424
discus-lang/ddc
Base.hs
module DDC.Core.Discus.Convert.Type.Base ( Context (..) , extendKindEnv , extendsKindEnv , convertBindNameM) where import DDC.Core.Discus.Convert.Error import DDC.Type.Exp import DDC.Type.DataDef import DDC.Control.Check (throw) import DDC.Type.Env ...
null
https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core-discus/DDC/Core/Discus/Convert/Type/Base.hs
haskell
| Context of a type conversion. | Data type definitions. These are all the visible data type definitions, from both the current module and imported ones. | Type equations. | Names of foreign boxed data type contructors. These are names like 'Ref' and 'Array' that are defined in the runtime system rather...
module DDC.Core.Discus.Convert.Type.Base ( Context (..) , extendKindEnv , extendsKindEnv , convertBindNameM) where import DDC.Core.Discus.Convert.Error import DDC.Type.Exp import DDC.Type.DataDef import DDC.Control.Check (throw) import DDC.Type.Env ...
189f199127da9426168c36d68342d18279b37eb046cb91c7e0850b77361395aa
jhartikainen/hs-language-php
runtests.hs
module Main where import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.HUnit import Test.HUnit hiding (Test) import Tokenizer import Control.Monad main :: IO () main = defaultMain [testSuite] testSuite :: Test testSuite = testGroup "Parser" [ testCase "Assign int" (testF...
null
https://raw.githubusercontent.com/jhartikainen/hs-language-php/23ba35cb6462f9c51bac73573b35bcd0b07bf1e9/runtests.hs
haskell
module Main where import Test.Framework (defaultMain, testGroup, Test) import Test.Framework.Providers.HUnit import Test.HUnit hiding (Test) import Tokenizer import Control.Monad main :: IO () main = defaultMain [testSuite] testSuite :: Test testSuite = testGroup "Parser" [ testCase "Assign int" (testF...
d19d956ae86d2602fe14e1b03dd6ea19a9a3fc51e59e3e48fb2a67bf9eb107aa
tanders/cluster-engine
7b.lisp
(in-package cluster-engine) (setf *random-state* (make-random-state t)) (print (cluster-engine::ClusterEngine 30 t nil (append (cluster-engine::R-metric-hierarchy 0 :durations) (r-meter-note #'(lambda (x) (equal x '(0 1/4))) 0 :1st-beat :offset_dur :n...
null
https://raw.githubusercontent.com/tanders/cluster-engine/064ad4fd107f8d9a3dfcaf260524c2ab034c6d3f/test_files/7b.lisp
lisp
(in-package cluster-engine) (setf *random-state* (make-random-state t)) (print (cluster-engine::ClusterEngine 30 t nil (append (cluster-engine::R-metric-hierarchy 0 :durations) (r-meter-note #'(lambda (x) (equal x '(0 1/4))) 0 :1st-beat :offset_dur :n...
4f080570f414d1885f01dcf7ff489f75d79e38f408ddd9a1812ba362f17cdff4
MinaProtocol/mina
initial_validator.ml
open Core_kernel open Async_kernel open Pipe_lib.Strict_pipe open Mina_base open Mina_state open Signature_lib open Mina_block open Network_peer type validation_error = [ `Invalid_time_received of [ `Too_early | `Too_late of int64 ] | `Invalid_genesis_protocol_state | `Invalid_proof of Error.t | `Invalid_delta...
null
https://raw.githubusercontent.com/MinaProtocol/mina/d84d63a0a2522603f3183eb0a49321399763c43a/src/lib/transition_router/initial_validator.ml
ocaml
maintain a map from block producer key, epoch, slot to state hashes order of fields significant, compare by epoch, then slot, then producer create dummy block to split map on
open Core_kernel open Async_kernel open Pipe_lib.Strict_pipe open Mina_base open Mina_state open Signature_lib open Mina_block open Network_peer type validation_error = [ `Invalid_time_received of [ `Too_early | `Too_late of int64 ] | `Invalid_genesis_protocol_state | `Invalid_proof of Error.t | `Invalid_delta...
9715b2229fe2294aec1e9c5e611cb5c56537b11bea16f44077915d0e4315e3ec
Beluga-lang/Beluga
debug.ml
open Equality exception NotInitialized type flags = int type 'a io = 'a -> unit module Fmt = Format open Fmt let r_flags : flags ref = ref 0 let enable () = Printexc.record_backtrace true; r_flags := lnot 0 let out : Format.formatter option ref = ref None (** Tests if a given flag is set. *) let flag (n : i...
null
https://raw.githubusercontent.com/Beluga-lang/Beluga/4d1c1bd917daac43c304c527b155c12dba76391a/src/support/debug.ml
ocaml
* Tests if a given flag is set.
open Equality exception NotInitialized type flags = int type 'a io = 'a -> unit module Fmt = Format open Fmt let r_flags : flags ref = ref 0 let enable () = Printexc.record_backtrace true; r_flags := lnot 0 let out : Format.formatter option ref = ref None let flag (n : int) : bool = 1 = !r_flags land (1 lsl...
20496733d3c97c8a01379cb666d71dac0bec2aa5cab38947bada304209d5bb72
zclj/replication-packages
parse.clj
(ns openapi-pbt.parse (:require [cheshire.core :as json] [openapi-pbt.jschema :as jschema] [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [openapi-pbt.api-specs :as api-specs])) (defn get-json-from-path [path] (json/parse-string (slurp path))) (defn s...
null
https://raw.githubusercontent.com/zclj/replication-packages/8a5cb02e4fdda74107b5dcc34cbfa5cb5ae34dcf/ICST-2020/src/openapi_pbt/parse.clj
clojure
Params to spec Response to spec
(ns openapi-pbt.parse (:require [cheshire.core :as json] [openapi-pbt.jschema :as jschema] [clojure.spec.alpha :as s] [clojure.spec.gen.alpha :as gen] [openapi-pbt.api-specs :as api-specs])) (defn get-json-from-path [path] (json/parse-string (slurp path))) (defn s...
926adfc1e36c28ec8562ce092ddadc377b5d09f15a6a8e6e3758d309400bd8d9
hikettei/cl-waffe
utils.lisp
(in-package :cl-waffe) #| Utils for documentation |# (defparameter *gendoc-mode* t "Enable this nil for general usage. Owing to inlined-generic-function's bugs, without this param be t, stackoverflow occurs.") (defstruct WaffeObjectUsage "An structure of restoring waffe objects usage When you define object (de...
null
https://raw.githubusercontent.com/hikettei/cl-waffe/c52a840f77c236e30f84b8785d7121d6e752f0ad/source/utils.lisp
lisp
Utils for documentation Todo ArgsDesc
(in-package :cl-waffe) (defparameter *gendoc-mode* t "Enable this nil for general usage. Owing to inlined-generic-function's bugs, without this param be t, stackoverflow occurs.") (defstruct WaffeObjectUsage "An structure of restoring waffe objects usage When you define object (defmodel defnode etc...) all of ...
7540a104eeef98ffae808793a82d0cee5662c97480f481fbbf9fc6594f6f7859
MaskRay/99-problems-ocaml
16.ml
let drop xs n = let rec go x = let x' = x + 1 in function | [] -> [] | b::bs -> if x' == n then go 0 bs else b :: go x' bs in go 0 xs
null
https://raw.githubusercontent.com/MaskRay/99-problems-ocaml/652604f13ba7a73eee06d359b4db549b49ec9bb3/11-20/16.ml
ocaml
let drop xs n = let rec go x = let x' = x + 1 in function | [] -> [] | b::bs -> if x' == n then go 0 bs else b :: go x' bs in go 0 xs
2ad9750f58f7e7fab605eed3a4b1ff6bb0546b2faa99ccb787618657d07daed4
restyled-io/restyler
PullRequestSpecSpec.hs
module Restyler.PullRequestSpecSpec ( spec ) where import SpecHelper import GitHub.Data (IssueNumber(..)) import Restyler.PullRequestSpec newtype Named = Named Text deriving newtype (Eq, Show) instance Arbitrary Named where arbitrary = arbitrary `suchThatMap` mkNamed where mkNamed :: S...
null
https://raw.githubusercontent.com/restyled-io/restyler/3da7d1cb62ec078c03794d4a2c5fbeb5c26fd005/test/Restyler/PullRequestSpecSpec.hs
haskell
module Restyler.PullRequestSpecSpec ( spec ) where import SpecHelper import GitHub.Data (IssueNumber(..)) import Restyler.PullRequestSpec newtype Named = Named Text deriving newtype (Eq, Show) instance Arbitrary Named where arbitrary = arbitrary `suchThatMap` mkNamed where mkNamed :: S...
ab8fd60a2a1f441d8f886bf75e84c2d40a503847362b2fcf33f4f2476b3c74d7
racket/plai
mutator0.rkt
#lang plai/gc2/mutator
null
https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc2/bad-mutators/mutator0.rkt
racket
#lang plai/gc2/mutator
08edb759f718bd164779cffa66c1500f0f936a65955c0d1af776aaed6bd4c9b8
ryanpbrewster/haskell
fizz_buzz.hs
-- fizz_buzz.hs - Players generally sit in a circle . The player designated to go first says - the number " 1 " , and each player thenceforth counts one number in turn . - However , any number divisible by ' A ' e.g. three is replaced by the word fizz - and any divisible by ' B ' e.g. five by the word buzz ...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/fizz_buzz.hs
haskell
fizz_buzz.hs
- Players generally sit in a circle . The player designated to go first says - the number " 1 " , and each player thenceforth counts one number in turn . - However , any number divisible by ' A ' e.g. three is replaced by the word fizz - and any divisible by ' B ' e.g. five by the word buzz . Numbers divisi...
51ce01944bb023c4faff00adec1edcf8282979d77015f63a55d437e732dbd2f2
goblint/analyzer
edge.ml
open GoblintCil open Pretty type asm_out = (string option * string * CilType.Lval.t) list [@@deriving eq, ord, hash, to_yojson] type asm_in = (string option * string * CilType.Exp.t ) list [@@deriving eq, ord, hash, to_yojson] type t = | Assign of CilType.Lval.t * CilType.Exp.t (** Assignments lval = exp *) | ...
null
https://raw.githubusercontent.com/goblint/analyzer/3ef473c647571c9cb2992ade3b0d3c45c6b5a70f/src/framework/edge.ml
ocaml
* Assignments lval = exp * Function calls of the form lva = fexp (e1, e2, ...) * Entry edge that relates function declaration to function body. You can use * this to initialize the local variables. * Return edge is between the return statement, which may optionally contain * a return value, and the function....
open GoblintCil open Pretty type asm_out = (string option * string * CilType.Lval.t) list [@@deriving eq, ord, hash, to_yojson] type asm_in = (string option * string * CilType.Exp.t ) list [@@deriving eq, ord, hash, to_yojson] type t = | Assign of CilType.Lval.t * CilType.Exp.t | Proc of CilType.Lval.t option * ...
e6f86d2c33f0c4c66b96d22c9ee28017b68f0293619a37ec37185f4cff409de8
BekaValentine/SimpleFP-v2
Elaboration.hs
{-# OPTIONS -Wall #-} -- | This module defines how elaboration of programs is performed. module Dependent.Monadic.Elaboration where import Utils.ABT import Utils.Elaborator import Utils.Pretty import Utils.Telescope import Utils.Vars import Dependent.Core.ConSig import Dependent.Core.Program import Dependent.C...
null
https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/Dependent/Monadic/Elaboration.hs
haskell
# OPTIONS -Wall # | This module defines how elaboration of programs is performed. | We can add a new defined value declaration given a name, term, and type. | We can add a new constructor by giving a name and a signature. kind of declaration is being elaborated. A definition of the form @let f : A = M end@ is elab...
module Dependent.Monadic.Elaboration where import Utils.ABT import Utils.Elaborator import Utils.Pretty import Utils.Telescope import Utils.Vars import Dependent.Core.ConSig import Dependent.Core.Program import Dependent.Core.Term import Dependent.Monadic.Elaborator import Dependent.Monadic.TypeChecking impor...
cac98badd0e48f0413268d66402ae29ea2c9fba394de044fe11bc7571f44204f
andrei-dubovik/centrality
package.lisp
Copyright ( c ) 2020 < > ;; Package definition (defpackage :centrality (:use :common-lisp :trivial-garbage :trivial-gray-streams :cffi :flexi-streams :iterate :bordeaux-threads :usocket))
null
https://raw.githubusercontent.com/andrei-dubovik/centrality/b2f86bc045fe3712b543ae28843127781ffee80f/src/package.lisp
lisp
Package definition
Copyright ( c ) 2020 < > (defpackage :centrality (:use :common-lisp :trivial-garbage :trivial-gray-streams :cffi :flexi-streams :iterate :bordeaux-threads :usocket))
f84f9216bb7255882b432caf47d2773bb436a02d900d0049ccc30d51e97d4873
philnguyen/soft-contract
t-view.rkt
#lang racket ;; implement the view (renderer) for the T path finder (provide ;; type Manage = ;; (Class ; ; disable the given station : # f for sucecss , String for failure ;; [add-to-disabled (-> String [Maybe String]] ; ; enable the given station : # f for sucecss , String for failure ;; [remove-from...
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/gradual-typing-benchmarks/mbta/t-view.rkt
racket
implement the view (renderer) for the T path finder type Manage = (Class ; disable the given station : # f for sucecss , String for failure [add-to-disabled (-> String [Maybe String]] ; enable the given station : # f for sucecss , String for failure [remove-from-disabled (-> String [Maybe String]] ; turn th...
#lang racket (provide manage%) (require "t-graph.rkt") [ X - > Real ] [ ] - > X select an [ X ] that satisfies certain length criteria (define selector (curry argmin (lambda (p) (length (filter string? p))))) (define INTERNAL "find path: it is impossible to get from ~a to ~a [internal error]...
f52ba25d0de009cabbb6b8df6cb0a0ce8025dee85d1fbb69e58ec6b1d1cb6ac2
bobatkey/CS316-17
Lec12.hs
# LANGUAGE FlexibleInstances # module Lec12 where import Prelude hiding (Applicative (..), Monad (..)) LECTURE 12 : APPLICATIVES AND MONADS In the previous lecture we wrote five different evaluators : 1 . A ' pure ' evaluator for expressions with just addition and numbers ( ' evaluate ' ) . ...
null
https://raw.githubusercontent.com/bobatkey/CS316-17/36eb67c335cd0e6f5b7a4b8eafdea3cd4b715e0c/lectures/Lec12.hs
haskell
And here is the evaluator we wrote for this little language: actually apply the function , and combine the ' String 's actually apply the function, and combine the 'String's Looking at our solution above for 'Maybe', we can also see that we needed a way to "lift" values up to some kind of "adorned" value ...
# LANGUAGE FlexibleInstances # module Lec12 where import Prelude hiding (Applicative (..), Monad (..)) LECTURE 12 : APPLICATIVES AND MONADS In the previous lecture we wrote five different evaluators : 1 . A ' pure ' evaluator for expressions with just addition and numbers ( ' evaluate ' ) . ...
07d74800d82bcbeb67aa6fe117a7b2487da30336c97d4dab8dbc0021fa545b1d
expipiplus1/vulkan
VK_AMD_gpu_shader_half_float.hs
{-# language CPP #-} -- | = Name -- VK_AMD_gpu_shader_half_float - device extension -- = = VK_AMD_gpu_shader_half_float -- -- [__Name String__] -- @VK_AMD_gpu_shader_half_float@ -- -- [__Extension Type__] -- Device extension -- -- [__Registered Extension Number__] 37 -- -- [__Revision__] 2 -- --...
null
https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Extensions/VK_AMD_gpu_shader_half_float.hs
haskell
# language CPP # | = Name [__Name String__] @VK_AMD_gpu_shader_half_float@ [__Extension Type__] Device extension [__Registered Extension Number__] [__Revision__] [__Extension and Version Dependencies__] [__Deprecation state__] - Which in turn was /promoted/ to <-exten...
VK_AMD_gpu_shader_half_float - device extension = = VK_AMD_gpu_shader_half_float 37 2 - Requires support for Vulkan 1.0 - /Deprecated/ by extension - < -Docs/issues/new?body=[VK_AMD_gpu_shader_half_float ] @dominikwitczakamd%0A*Here describe the issue or question ...
a3b32afa8a821ee29b9cbc229a98ccc9c6c706d571bc34b8cd6c1019cad46d49
i-am-tom/world-building-in-haskell
Generator.hs
module Generator ( Smoother (..) , smooth , anneal , cluster , boolify , normal , perlin , uniform , Cell , Connections , Prop , collapse , connect , runAll , runOne , runMany ) where import Generator.Noise (boolify, normal, perlin, uniform) import Generator.Smoother (Smoother (..),...
null
https://raw.githubusercontent.com/i-am-tom/world-building-in-haskell/fe7369b9069793ee6dd2a11e031a53b4af764d1a/src/Generator.hs
haskell
module Generator ( Smoother (..) , smooth , anneal , cluster , boolify , normal , perlin , uniform , Cell , Connections , Prop , collapse , connect , runAll , runOne , runMany ) where import Generator.Noise (boolify, normal, perlin, uniform) import Generator.Smoother (Smoother (..),...
83b3a0d7bb45dd8ff7043ac44dc0a8a13fb9e849bed58ab813e69fe93821404a
7c6f434c/lang-os
props-to-tags.lisp
(in-package :stumpwm) (unless (boundp '*property-notify-hook*) (defvar *property-notify-hook* ()) (defvar *update-window-properties-function* (function update-window-properties)) (defun update-window-properties (window atom) (run-hook-with-args *property-notify-hook* window atom) (funcall *update-win...
null
https://raw.githubusercontent.com/7c6f434c/lang-os/94c1c7fc682b43d261a6532441e94a919a33ff56/stumpwm/props-to-tags.lisp
lisp
(in-package :stumpwm) (unless (boundp '*property-notify-hook*) (defvar *property-notify-hook* ()) (defvar *update-window-properties-function* (function update-window-properties)) (defun update-window-properties (window atom) (run-hook-with-args *property-notify-hook* window atom) (funcall *update-win...
70287f6d658449b11349c04348ad33468a29990827b82900fac4d4849ca5cfc6
ulricha/dsh
Typing.hs
# LANGUAGE FlexibleContexts # module Database.DSH.SL.Typing ( inferSLTypes ) where import Control.Monad.Except import Control.Monad.Reader import Data.List import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) import qualified Text.PrettyPrint.ANSI.Leijen ...
null
https://raw.githubusercontent.com/ulricha/dsh/e6cd5c6bea575e62a381e89bfc4cc7cb97485106/src/Database/DSH/SL/Typing.hs
haskell
------------------------------------------------------------------------------ Typing Helpers | Typecheck a tuple expression with the given input type ------------------------------------------------------------------------------ Typing of operators -------------------------------------------------------------------...
# LANGUAGE FlexibleContexts # module Database.DSH.SL.Typing ( inferSLTypes ) where import Control.Monad.Except import Control.Monad.Reader import Data.List import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) import qualified Text.PrettyPrint.ANSI.Leijen ...
1990a170e3c79f354e837581b2401f289f41e7ea1a2d9784780e509e53782599
BillHallahan/G2
Casts.hs
# LANGUAGE FlexibleContexts # module G2.Language.Casts ( unsafeElimCast , unsafeElimOuterCast , splitCast , simplifyCasts , liftCasts , exprInCasts , typeInCasts ...
null
https://raw.githubusercontent.com/BillHallahan/G2/696975222c54341a8e22c37e31ff3dfc72b02c52/src/G2/Language/Casts.hs
haskell
| Removes all casts from the expression. Makes no guarantees about the type correctness of the resulting expression. In particular, the expression is likely to not actually type correctly if it contains variables that are mapped in the Expression Environment seperate casts, from t1 to t1', and from t2 to t2'. G...
# LANGUAGE FlexibleContexts # module G2.Language.Casts ( unsafeElimCast , unsafeElimOuterCast , splitCast , simplifyCasts , liftCasts , exprInCasts , typeInCasts ...
ceb65cfd9d2b49116161811084575189fb1d3fce2a7e362bd1fe710184d7505e
synduce/Synduce
Expression.ml
(** An expression is a term without let-bindings or function values. *) open Base open EProps open Term open Utils open Option.Let_syntax let box_id : int ref = ref 0 let new_box_id () = let i = !box_id in Int.incr box_id; i ;; type boxkind = | Indexed of int | Typed of RType.t | Position of int [@@der...
null
https://raw.githubusercontent.com/synduce/Synduce/48a258db3fc677d97587d0fb34eaa11f9d239ed5/src/lang/Expression.ml
ocaml
* An expression is a term without let-bindings or function values. Simple equality Expression construction. Expression reduction / transformation. * [alpha_equal e1 e2] returns true if [equal e1 e2] up to variable renaming. * `matches x y` checks if `y` matches expression `x`. If it does, returns `Some s...
open Base open EProps open Term open Utils open Option.Let_syntax let box_id : int ref = ref 0 let new_box_id () = let i = !box_id in Int.incr box_id; i ;; type boxkind = | Indexed of int | Typed of RType.t | Position of int [@@deriving sexp, hash] type t = | ETrue | EFalse | EApp of int * t list...
9c36920c4641b1676fee7770cde8d768760af80e004ee95e208ec067377606e9
epiccastle/spire
test_require.clj
#!/usr/bin/env spire (ns test-require (:require [test_require_import :as t])) (assert (= t/val 10)) (assert (= (t/square 10) 100)) (def val 5) (assert (= (load-file "test_require_load_file.clj") 50))
null
https://raw.githubusercontent.com/epiccastle/spire/7439a0a17c25fd54e3d86712d2a44b38fd71877a/test/scripts/test_require.clj
clojure
#!/usr/bin/env spire (ns test-require (:require [test_require_import :as t])) (assert (= t/val 10)) (assert (= (t/square 10) 100)) (def val 5) (assert (= (load-file "test_require_load_file.clj") 50))
ddfbfd57fd59b240dfb564c3b1a2b6b409021cf0353f4cd5406658b29deb3fa4
privet-kitty/cl-competitive
spanning-tree.lisp
(defpackage :cp/spanning-tree (:use :cl) (:export #:get-spanning-tree)) (in-package :cp/spanning-tree) (declaim (inline get-spanning-tree) (ftype (function * (values (simple-array list (*)) &optional)) get-spanning-tree)) (defun get-spanning-tree (graph &optional (src 0)) "Returns a directed spanning tr...
null
https://raw.githubusercontent.com/privet-kitty/cl-competitive/4d1c601ff42b10773a5d0c5989b1234da5bb98b6/module/spanning-tree.lisp
lisp
(defpackage :cp/spanning-tree (:use :cl) (:export #:get-spanning-tree)) (in-package :cp/spanning-tree) (declaim (inline get-spanning-tree) (ftype (function * (values (simple-array list (*)) &optional)) get-spanning-tree)) (defun get-spanning-tree (graph &optional (src 0)) "Returns a directed spanning tr...
8787fba9cfac450b4933985529560c5f927be2c57b3a184bcff7ba305057c752
michaelklishin/langohr
publishing_test.clj
Copyright ( c ) 2011 - 2020 , , and the ClojureWerkz Team ;; ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing...
null
https://raw.githubusercontent.com/michaelklishin/langohr/0c63ac3c6bc97d73e290ed366e9e97e07d39dedb/test/langohr/test/publishing_test.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. T...
Copyright ( c ) 2011 - 2020 , , and the ClojureWerkz Team Eclipse Public License 1.0 ( -1.0.php ) (ns langohr.test.publishing-test (:require [langohr.core :as lhc] [langohr.queue :as lhq] [langohr.exchange :as lhe] [langohr.basic :as lhb] [clojur...
25b1df9619b785b717142c91da513639851ff8c434ceb79af3b2fb96d8e7d9cb
eeng/shevek
api_test.clj
(ns shevek.reports.api-test (:require [clojure.test :refer [deftest testing is use-fixtures]] [shevek.test-helper :refer [it wrap-unit-tests]] [shevek.asserts :refer [submap? without?]] [shevek.reports.api :as api] [shevek.db :refer [db]] [shevek.lib.mongodb...
null
https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/test/clj/shevek/reports/api_test.clj
clojure
(ns shevek.reports.api-test (:require [clojure.test :refer [deftest testing is use-fixtures]] [shevek.test-helper :refer [it wrap-unit-tests]] [shevek.asserts :refer [submap? without?]] [shevek.reports.api :as api] [shevek.db :refer [db]] [shevek.lib.mongodb...
32ea5fa62744292f37cc0150d559a4faa7e87771efe42c64692c32913d255aab
solbloch/stumpwm-configs
last-command.lisp
(in-package :stumpwm) (defvar *command-history* '()) (defvar *menu-command-history* '()) (defun remember-history (command) (push command *command-history*)) (defun remember-menu (menu) (push (list menu (car *command-history*)) *menu-command-history*)) (when *initializing* (add-hook *pre-command-hook* #'rememb...
null
https://raw.githubusercontent.com/solbloch/stumpwm-configs/687118d5202e3e3c8317ba1ba8404034a5bca667/last-command.lisp
lisp
if repeating a command, return last choice
(in-package :stumpwm) (defvar *command-history* '()) (defvar *menu-command-history* '()) (defun remember-history (command) (push command *command-history*)) (defun remember-menu (menu) (push (list menu (car *command-history*)) *menu-command-history*)) (when *initializing* (add-hook *pre-command-hook* #'rememb...
5e5ca623f3d15b0f6cba9113e78fa05c90eed005c59777595770e16e781548ef
pascal-knodel/haskell-craft
E'11'18.hs
-- -- -- ------------------ Exercise 11.18 . ------------------ -- -- -- module E'11'18 where curryList :: ([a] -> d) -> (a -> [a] -> d) curryList function Partial anonymous function application . GHCi > curryList sum 1 [ 2 ] curryList sum 1 [2] -} 3 uncurryList :: (a -> [a] -> d) -> ([a] -> d)...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'11'18.hs
haskell
---------------- ---------------- List constructor in lambda abstraction argument. Can you use "curry" and "uncurry" in defining "curryList" and "uncurryList"? ----------------------------------------------------------------------------- Using: curry (uncurry f) = f <=> curry $ uncurry f...
Exercise 11.18 . module E'11'18 where curryList :: ([a] -> d) -> (a -> [a] -> d) curryList function Partial anonymous function application . GHCi > curryList sum 1 [ 2 ] curryList sum 1 [2] -} 3 uncurryList :: (a -> [a] -> d) -> ([a] -> d) uncurryList function GHCi > : { let sum ' ...
ab3a847e2d606f9f8e394f8c540c4850830ca5b08d56d778bf8e736cbcde33f0
facet-lang/facet
Inject.hs
# LANGUAGE UndecidableInstances # module Facet.Carrier.Throw.Inject ( -- * Throw carrier runThrow , ThrowC(..) -- * Throw effect , module Control.Effect.Throw ) where import Control.Algebra import Control.Carrier.Reader import Control.Effect.Throw import Control.Monad.IO.Class runThrow :: (f -> m e) -> ThrowC e f...
null
https://raw.githubusercontent.com/facet-lang/facet/4626eed1395cd91acc2d38910f27809ad6e753fa/src/Facet/Carrier/Throw/Inject.hs
haskell
* Throw carrier * Throw effect
# LANGUAGE UndecidableInstances # module Facet.Carrier.Throw.Inject runThrow , ThrowC(..) , module Control.Effect.Throw ) where import Control.Algebra import Control.Carrier.Reader import Control.Effect.Throw import Control.Monad.IO.Class runThrow :: (f -> m e) -> ThrowC e f m a -> m a runThrow inject (ThrowC m) = ...
c178d61ee3c2ea29330240a00665b9e42c9d6ae117df7e7f1a3b6880268882e7
ledyba/language-krkr
Tree.hs
module Language.TJS.Tree ( Stmt(..) ,Expr(..) ,Identifer(..) ,ApplyArg(..) ,FuncArg(..) ,SrcSpan(..) module Text . ParserCombinators . Parsec . Pos , SourcePos , SourceName, Line, Column , sourceName, sourceLine, sourceColumn ) where import Data.Text import Text.ParserCombinators.Parsec ( Sourc...
null
https://raw.githubusercontent.com/ledyba/language-krkr/da01694ff6322fe187ca1be8eedc378e4c5d9a8c/lib/Language/TJS/Tree.hs
haskell
module Language.TJS.Tree ( Stmt(..) ,Expr(..) ,Identifer(..) ,ApplyArg(..) ,FuncArg(..) ,SrcSpan(..) module Text . ParserCombinators . Parsec . Pos , SourcePos , SourceName, Line, Column , sourceName, sourceLine, sourceColumn ) where import Data.Text import Text.ParserCombinators.Parsec ( Sourc...
865b18a72a5479cfb4ef6c0f471f58d6d4433b4884af989bd5aa86e62f02ea8a
sionescu/bordeaux-threads
impl-corman.lisp
;;;; -*- indent-tabs-mode: nil -*- (in-package :bordeaux-threads-2) ;;; ;;; Threads ;;; (deftype native-thread () 'threads:thread) (defun %make-thread (function name) (declare (ignore name)) (threads:create-thread function)) (defun %current-thread () threads:*current-thread*) (defun %thread-name (thread) ...
null
https://raw.githubusercontent.com/sionescu/bordeaux-threads/6131a9c6da2a0fc38e0cadfbb22614f2787a830f/apiv2/impl-corman.lisp
lisp
-*- indent-tabs-mode: nil -*- Threads Introspection/debugging Locks Condition variables
(in-package :bordeaux-threads-2) (deftype native-thread () 'threads:thread) (defun %make-thread (function name) (declare (ignore name)) (threads:create-thread function)) (defun %current-thread () threads:*current-thread*) (defun %thread-name (thread) (declare (ignore thread)) nil) (mark-not-implement...
6ad6ba61afd6f02b5e0d62b356b4214159d797b9d689177dc900ef8b73f012aa
amnh/PCG
Moves.hs
------------------------------------------------------------------------------ -- | -- Module : Data.Graph.Moves Copyright : ( c ) 2015 - 2021 Ward Wheeler -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- -----------------------------------------...
null
https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/graph/src/Data/Graph/Moves.hs
haskell
---------------------------------------------------------------------------- | Module : Data.Graph.Moves License : BSD-style Maintainer : Stability : provisional Portability : portable --------------------------------------------------------------------------- |
Copyright : ( c ) 2015 - 2021 Ward Wheeler # # # LANGUAGE FlexibleContexts # module Data.Graph.Moves where import Control.Lens import Data.Graph.Hash import Data.Graph.NodeContext import Data.Graph.Type import qualified Data.Vector as V import qualified ...
3cd52313a872963b2fa34856894dc48865d74bf0d6878d4b98944ffac1d2cff5
hasktorch/ffi-experimental
NN.hs
-- generated by using spec/Declarations.yaml # LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} module Torch.Managed.NN where import Foreign.C.String import Foreign.C.Types import Foreign import ATe...
null
https://raw.githubusercontent.com/hasktorch/ffi-experimental/54192297742221c4d50398586ba8d187451f9ee0/ffi/src/Torch/Managed/NN.hs
haskell
generated by using spec/Declarations.yaml # LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE ScopedTypeVariables # module Torch.Managed.NN where import Foreign.C.String import Foreign.C.Types import Foreign import ATen.Type import ATen.Class import ATen.Cast import qualified Torch.Unmanaged.NN as...
e63355c509e7bbb2d1bc491af1b545d5679371e5b42809a496d1ed0ab57b3440
videolang/video
11-include.rkt
#lang video (external-video "2-colorfade.rkt")
null
https://raw.githubusercontent.com/videolang/video/3c69669063c56ff8d269768589cb9506a33315e5/video/examples/11-include.rkt
racket
#lang video (external-video "2-colorfade.rkt")
c3427b5eb6cd462219db898aa64dba51b23c0cfb9c015111b4b25470f14deaf8
ksk/Rho
rho.ml
open Format open Store open Cycle (* slim expression *) type expr = Index of int | Lambda of int * expr | App of expr * expr (* Lambda(N,exp) ... N nested lambda abstraction *) (* \lambda(\lambda(...(\lambda exp)...)) *) type algorithm = Naive | Floyd | Brent | Gosper (* Num operators *) (* let (?/) = num_of_int *) ...
null
https://raw.githubusercontent.com/ksk/Rho/5025fd186d30b67b4acc93a45a85106be41c03af/rho.ml
ocaml
slim expression Lambda(N,exp) ... N nested lambda abstraction \lambda(\lambda(...(\lambda exp)...)) Num operators let (?/) = num_of_int let (!/) = string_of_num let (%/) = mod_num Variables for command-line options exp1[m:=exp2] n > m n < m n = m n > m n < m n = m let num_to_alphabet n = ...
open Format open Store open Cycle type expr = Index of int | Lambda of int * expr | App of expr * expr type algorithm = Naive | Floyd | Brent | Gosper let limit = ref 65535 let expr_str = ref "" let init_exp = ref (Lambda(1,Index 1)) let no_eta = ref false let loop_detection = ref Naive let show_argnum = ref false ...
b0559aaf4387b30b26afffa45b4b28010eab66db63ad4eb86c2e6d4868423084
ygmpkk/house
Test.hs
module Kernel.Driver.NE2000.Test where import Kernel.Driver.NE2000.Driver as NE2000 import Net.Test as Net(initialize) import H.Interrupts(IRQ(..)) import Net.H() testnet putStrLn pci config = case pci of Nothing -> do eth <- NE2000.initialize putStrLn IRQ9 0x300 Just `fmap` start eth Just...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/kernel/Kernel/Driver/NE2000/Test.hs
haskell
module Kernel.Driver.NE2000.Test where import Kernel.Driver.NE2000.Driver as NE2000 import Net.Test as Net(initialize) import H.Interrupts(IRQ(..)) import Net.H() testnet putStrLn pci config = case pci of Nothing -> do eth <- NE2000.initialize putStrLn IRQ9 0x300 Just `fmap` start eth Just...
7bda351a3207cc618f651bca60244c92ff82037ae490959bcb207132f034c13f
hurricane/hurricane
hurricane_tcp_server.erl
%%% Provides the ability to message with external processes over %%% TCP. Does not manage processes (if they are connecting over a %%% network, they are expected to manage themselves). Supports the %%% scatter-gather pattern of messaging transparently. -module(hurricane_tcp_server). -export([start/1, socket_loop/3])....
null
https://raw.githubusercontent.com/hurricane/hurricane/be15b78952b9ae21aeca84a408ee0df82c018aa0/erl_modules/hurricane_tcp_server.erl
erlang
Provides the ability to message with external processes over TCP. Does not manage processes (if they are connecting over a network, they are expected to manage themselves). Supports the scatter-gather pattern of messaging transparently. Enters the acceptor loop. Accepts new connections and spawns new processes to...
-module(hurricane_tcp_server). -export([start/1, socket_loop/3]). Starts the listener socket on the configured port ( default 81 ) . start(Options) -> ListenPort = proplists:get_value(listen_port, Options, 81), {ok, ListenSocket} = gen_tcp:listen( ListenPort, [binary, {packet, 4}, {active, false}] ...
eb4ed1b4f125c2b82d0acbe7ac0413f325b975ced4dfc7d183479dc090d9e2a0
richmit/mjrcalc
exp-ClassicOptBanana.lisp
;; -*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; @file exp-ClassicOptBanana.lisp @author < > @brief ...
null
https://raw.githubusercontent.com/richmit/mjrcalc/0c5bf50a8fe3d9bc6e2636d6629138271b99c1ae/exp-ClassicOptBanana.lisp
lisp
-*- Mode:Lisp; Syntax:ANSI-Common-LISP; Coding:us-ascii-unix; fill-column:158 -*- @file exp-ClassicOptBanana.lisp @std Common Lisp Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: and/or other materia...
@author < > @brief Analysis of 's classic banana optimization test function.@EOL @parblock Copyright ( c ) 2012 , 2015 , < > All rights reserved . 1 . Redistributions of source code must retain the above copyright notice , this list of conditions , and the following disclaimer . 2 . ...
5bc14d78db615272602e668c9aa633aaf8de258ad98cceaa17ddea7ab3890e7b
xapi-project/xen-api
service.mli
Copyright ( C ) Citrix Systems Inc. This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; version 2.1 only . with the special exception on linking described in file LICENSE ....
null
https://raw.githubusercontent.com/xapi-project/xen-api/de99204bd135105669a7036546e3648bfbf2c27a/ocaml/xenopsd/xc/service.mli
ocaml
* path of file containing the pid value
Copyright ( C ) Citrix Systems Inc. This program is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; version 2.1 only . with the special exception on linking described in file LICENSE ....
8661c668f8ea3291974c0600fb07ed099edd11af83f795a1097bbbb4d6b5f847
siers/zn
UMVar.hs
module Zn.Data.UMVar where import Control.Concurrent import Data.Aeson import System.IO.Unsafe (unsafePerformIO) data UnserializableMVar a = UMVar { umvar :: MVar a } instance Show (UnserializableMVar a) where show _ = "<unshowable>" instance ToJSON (UnserializableMVar a) where toJSON (UMVar m) = Null instan...
null
https://raw.githubusercontent.com/siers/zn/b78692910fc5c4c725b3133cb91f5e1e3da94808/src/Zn/Data/UMVar.hs
haskell
module Zn.Data.UMVar where import Control.Concurrent import Data.Aeson import System.IO.Unsafe (unsafePerformIO) data UnserializableMVar a = UMVar { umvar :: MVar a } instance Show (UnserializableMVar a) where show _ = "<unshowable>" instance ToJSON (UnserializableMVar a) where toJSON (UMVar m) = Null instan...
9ff79126d1eaa7cfbba763efab22faa9e01ba1c9e059712cc36356504086ca0d
rm-hull/jasentaa
position_test.cljc
(ns jasentaa.position-test (:require #?(:clj [clojure.test :refer :all] :cljs [cljs.test :refer-macros [deftest is testing]]) [jasentaa.position :as pos #?@(:cljs [:refer [Location]])]) #?(:clj (:import [jasentaa.position Location]))) (deftest check-augment-then-strip (is (= "the quick br...
null
https://raw.githubusercontent.com/rm-hull/jasentaa/aeb0738d05db6ad536ee67253c6716c7a0b1c586/test/jasentaa/position_test.cljc
clojure
(ns jasentaa.position-test (:require #?(:clj [clojure.test :refer :all] :cljs [cljs.test :refer-macros [deftest is testing]]) [jasentaa.position :as pos #?@(:cljs [:refer [Location]])]) #?(:clj (:import [jasentaa.position Location]))) (deftest check-augment-then-strip (is (= "the quick br...
eb5b9998ae62e80ec5e591ca1c9d8a8cbe6e6f99f1ac339fe8b407a212a3a3fb
nuprl/gradual-typing-performance
iserver.rkt
#lang racket (require "incubot.rkt" (only-in "corpus.rkt" add-string-to-corpus corpus? make-corpus ) (only-in "vars.rkt" *incubot-logger*) (only-in "utterance.rkt" utterance-text) racket/async-channel) (provide make-incubot-server) (define (make-incubot-server) (define server-thread ;; Reads 'g...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/rudybot/iserver.rkt
racket
Reads 'get' or 'put-string' commands from a client, and does the corresponding work.
#lang racket (require "incubot.rkt" (only-in "corpus.rkt" add-string-to-corpus corpus? make-corpus ) (only-in "vars.rkt" *incubot-logger*) (only-in "utterance.rkt" utterance-text) racket/async-channel) (provide make-incubot-server) (define (make-incubot-server) (define server-thread (thread ...
8d681baf39315d7515ee0bc3f5954ec0596fe0a5e70eded3716e3ab00ef60fa8
fiigii/gomoku-CommonLisp
main.lisp
(in-package :cl-user) (defpackage gomoku (:use :cl) (:import-from :gomoku.config :config) (:import-from :clack :clackup) (:export :start :stop)) (in-package :gomoku) (defvar *appfile-path* (asdf:system-relative-pathname :gomoku #P"app.lisp")) (defvar *handler* nil)...
null
https://raw.githubusercontent.com/fiigii/gomoku-CommonLisp/e89af746feb1a51c5e569d7a6befea100391b16b/src/main.lisp
lisp
(in-package :cl-user) (defpackage gomoku (:use :cl) (:import-from :gomoku.config :config) (:import-from :clack :clackup) (:export :start :stop)) (in-package :gomoku) (defvar *appfile-path* (asdf:system-relative-pathname :gomoku #P"app.lisp")) (defvar *handler* nil)...
c70818c729a2a9f853123b33a59e2d0bf3d1a73e551e2d3695c432f63d6d2820
koka-lang/koka
Kind.hs
----------------------------------------------------------------------------- Copyright 2012 - 2021 , Microsoft Research , . -- -- This is free software; you can redistribute it and/or modify it under the terms of the Apache License , Version 2.0 . A copy of the License can be -- found in the LICENSE file at the ...
null
https://raw.githubusercontent.com/koka-lang/koka/2909df715aebf57966fbdd4afdc7a477f55f239e/src/Type/Kind.hs
haskell
--------------------------------------------------------------------------- This is free software; you can redistribute it and/or modify it under the found in the LICENSE file at the root of this distribution. --------------------------------------------------------------------------- allow `alloc<global>` etc. bu...
Copyright 2012 - 2021 , Microsoft Research , . terms of the Apache License , Version 2.0 . A copy of the License can be module Type.Kind ( HasKind( getKind ) , handledToLabel , HandledSort(..) , getHandledEffect, getHandledEffectX, isHandledEffect ...
500d31fd9e3711eb08f936a97288db288b68e20f70ea3fa69ea6dfe4eeb65616
m4dc4p/haskelldb
top.hs
import Database.HaskellDB import TestConnect import Dp037.D3proj_users victor said that top , topPercent and union produce SQL errors opts = ODBCOptions{dsn="mysql-dp037", uid="dp037", pwd="teent333"} withDB f = odbcConnect opts f q1 = do users <- table d3proj_users top 2 order [asc users xid] re...
null
https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/test/old/top.hs
haskell
pp q2 putStrLn ""
import Database.HaskellDB import TestConnect import Dp037.D3proj_users victor said that top , topPercent and union produce SQL errors opts = ODBCOptions{dsn="mysql-dp037", uid="dp037", pwd="teent333"} withDB f = odbcConnect opts f q1 = do users <- table d3proj_users top 2 order [asc users xid] re...
303465d1782ad9b1145b0619eb3e7cee977a2406c019da45e27e0f85ec378b52
d-cent/objective8
stars.clj
(ns objective8.integration.front-end.stars (:require [midje.sweet :refer :all] [ring.mock.request :as mock] [peridot.core :as p] [oauth.client :as oauth] [objective8.front-end.api.http :as http-api] [objective8.config :as config] [objective8.util...
null
https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/test/objective8/integration/front_end/stars.clj
clojure
(ns objective8.integration.front-end.stars (:require [midje.sweet :refer :all] [ring.mock.request :as mock] [peridot.core :as p] [oauth.client :as oauth] [objective8.front-end.api.http :as http-api] [objective8.config :as config] [objective8.util...
b82999f30c3e3a51d9520a4334d02cd3349795f8e3645c0d96e317d333d1b4bb
samrushing/irken-compiler
autoffi.scm
;; -*- Mode: Irken -*- (require "lib/cmap.scm") ;; AutoFFI - when the compiler comes across a 'require-ffi' form, it needs ;; to emit code that will Do the Right Thing depending on which backend ;; is being used. We do this by inserting macro calls with enough information ;; to create the needed code for all b...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/self/autoffi.scm
scheme
-*- Mode: Irken -*- AutoFFI - when the compiler comes across a 'require-ffi' form, it needs to emit code that will Do the Right Thing depending on which backend is being used. We do this by inserting macro calls with enough information to create the needed code for all backends. The macros (and their trans...
(require "lib/cmap.scm") build - ffi - fun : FFI functions like open ( ) build - ffi - ob : FFI objects like ` errno ` (define (cint->sexp cint signed?) (sexp:symbol (match cint signed? with (cint:int) #t -> 'int (cint:int) #f -> 'uint (cint:short) #t -> 'short (cint:short) ...
f395685e714add75b05db2c68d34888aea809c123da99ec3ec96720357910797
CryptoKami/cryptokami-core
ConnectionBuffers.hs
{-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeFamili...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/networking/src/Network/Transport/ConnectionBuffers.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # buffer such that the head can be inspected and modified. | Read from the head of the buffer, with the option to replace the front with some other value. Useful in case you wan...
# LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE KindSignatures # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # module Network.Transport.ConnectionBuffers ( connectionBufferQDisc , Buffer(..) , BufferT , writeBuffer , readBuffer ...
fdb5ad832cb4ecd180072e814b55f2d52f57136a6d76cca6e0fc19acf768f23e
johnridesabike/acutis
dagmap.ml
(**************************************************************************) (* *) Copyright ( c ) 2022 . (* *) This Source Code For...
null
https://raw.githubusercontent.com/johnridesabike/acutis/5c352a4892bee60b9bdc7e60ff57f2ddb950d6e1/lib/dagmap.ml
ocaml
************************************************************************ ****************************...
Copyright ( c ) 2022 . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. module M = Map.String type ('a, 'b) t = | Not_linke...
28846a44c9e56e204f2bb4b112dc4e14e7445884059d4ece6b0e00faf6f6cbd8
openmusic-project/openmusic
menu.lisp
;========================================================================= OM API Multiplatform API for OpenMusic LispWorks Implementation ; Copyright ( C ) 2007- ... IRCAM - Centre , Paris , France . ; This file is part of the OpenMusic environment sources ; OpenMusic is free softwa...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/om-LW/menu.lisp
lisp
========================================================================= (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ======...
OM API Multiplatform API for OpenMusic LispWorks Implementation Copyright ( C ) 2007- ... IRCAM - Centre , Paris , France . This file is part of the OpenMusic environment sources OpenMusic is free software : you can redistribute it and/or modify it under the terms of the GNU Genera...
2d7fd5c1e0e27159d484593bed96f889a68de8d0f3042cbfbe01a5911a5b3615
stonebuddha/eopl
core.ml
open Syntax type refer = int and store = expval list and environment = refer list and expval = | NumVal of int | BoolVal of bool | ProcVal of proc and proc = expression * environment ref let string_of_expval eval = match eval with | NumVal num -> string_of_int num | BoolVal bool -> string_of_bool bool...
null
https://raw.githubusercontent.com/stonebuddha/eopl/88ea636110421706f900e753c30240ff1ea26f67/CALL-BY-NEED-EXT/core.ml
ocaml
open Syntax type refer = int and store = expval list and environment = refer list and expval = | NumVal of int | BoolVal of bool | ProcVal of proc and proc = expression * environment ref let string_of_expval eval = match eval with | NumVal num -> string_of_int num | BoolVal bool -> string_of_bool bool...
105cf51be45a41a630220f4bb216d91a588581611cefea3792e22b4aac49eb04
Ericson2314/lighthouse
List.hs
{-# OPTIONS -fallow-undecidable-instances #-} Needed for the same reasons as in Reader , State etc ----------------------------------------------------------------------------- -- | Module : Control . . List Copyright : ( c ) 2001 , ( c ) Oregon Graduate Institute of Science and ...
null
https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/ghc-6.8.2/libraries/mtl/Control/Monad/List.hs
haskell
# OPTIONS -fallow-undecidable-instances # --------------------------------------------------------------------------- | License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : non-portable (multi-parameter type classes) The List monad. ---------...
Needed for the same reasons as in Reader , State etc Module : Control . . List Copyright : ( c ) 2001 , ( c ) Oregon Graduate Institute of Science and Technology , 2001 module Control.Monad.List ( ListT(..), mapListT, module Control.Monad, module Control.Monad.Tr...
416c83fd00f945bee174f6a8417ab7292a2bc00bc58f9330dc7ffb40acd4683e
OlafChitil/hat
BlackHat.hs
module Main where import NonTermLib import LowLevel import SExp import System.Process (system) import System.Environment (getArgs,getProgName,getEnv) import System.Exit (exitWith,ExitCode(..)) import Data.List (isPrefixOf,isSuffixOf,group,groupBy) import Control.Monad (when) import System.IO ...
null
https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/tools/BlackHat.hs
haskell
This function calls the function which implements the search process proper. It also cuts off the head of the list, if the correct option is set. shouldn't happen This function looks for a black-hole path in the ART graph. It implements the search process documented in the report. Basically, the function uses ...
module Main where import NonTermLib import LowLevel import SExp import System.Process (system) import System.Environment (getArgs,getProgName,getEnv) import System.Exit (exitWith,ExitCode(..)) import Data.List (isPrefixOf,isSuffixOf,group,groupBy) import Control.Monad (when) import System.IO ...
0c80aaad72b88ae2af99a89c71f6ba639760e377afcb202f32826bcab9cf90bc
Practical-Formal-Methods/adiff
ParseAndPrint.hs
-- Minimal example: parse a file, and pretty print it again module Main where import System.Environment import System.Exit import System.IO import Control.Monad import Text.PrettyPrint.HughesPJ import Language.C -- simple API import Language.C.System.GCC -- preprocessor used usageMsg :: String -> Strin...
null
https://raw.githubusercontent.com/Practical-Formal-Methods/adiff/c18872faf3e31572437686d766f9972e00274588/language-c-extensible/examples/ParseAndPrint.hs
haskell
Minimal example: parse a file, and pretty print it again simple API preprocessor used parse pretty print
module Main where import System.Environment import System.Exit import System.IO import Control.Monad import Text.PrettyPrint.HughesPJ usageMsg :: String -> String usageMsg prg = render $ text "Usage:" <+> text prg <+> hsep (map text ["CPP_OPTIONS","input_file.c"]) main :: IO () main = do let usageErr = (hPutSt...
5b20d83d00975046dc1ae809e83f9ff8bddc370e1c48ce02c951bac678bb122a
simplegeo/erlang
gen_server_SUITE.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/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/stdlib/test/gen_server_SUITE.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(gen_server_SUITE). -include("test_...
e0832dcf58c7be815fccc1e1ec56435c33225cf3a5827c5b6d85be8045a80d32
stevebleazard/ocaml-json-of-jsonm
jsonm_error.mli
type t = [ `Expected of [ `Aval of bool | `Comment | `Eoi | `Json | `Name | `Name_sep | `Omem of bool | `Value ] | `Illegal_BOM | `Illegal_bytes of string | `Illegal_escape of [ `Lone_hi_surrogate of int | `Lone_lo_surrogate of int | `Not_esc_uchar of Uchar.t ...
null
https://raw.githubusercontent.com/stevebleazard/ocaml-json-of-jsonm/595b90e19c5399316fcd013aa9ad6a2df48a3d73/src/jsonm_error.mli
ocaml
type t = [ `Expected of [ `Aval of bool | `Comment | `Eoi | `Json | `Name | `Name_sep | `Omem of bool | `Value ] | `Illegal_BOM | `Illegal_bytes of string | `Illegal_escape of [ `Lone_hi_surrogate of int | `Lone_lo_surrogate of int | `Not_esc_uchar of Uchar.t ...
afbdce58d26146deb830969676aac3f5b0f1740088b50ad9a65a1904fa3fe6a8
smimram/monadic-synth
song3.ml
open Msynth open Stream let tempo = 130. let s = let synth = Pattern.concat [[0.,8.,`Chord([69;71;72;76],1.)];[0.,8.,`Chord([68;71;74;76],1.)]] in let synth = Pattern.arpeggiate `Up synth in let synth = Pattern.transpose (-12) synth in let sound () = saw () in let synth = Instrument.play (Note.adsr ~r:(ret...
null
https://raw.githubusercontent.com/smimram/monadic-synth/100d5cb6f84443c2379311faae5ab950214abcae/examples/song3.ml
ocaml
open Msynth open Stream let tempo = 130. let s = let synth = Pattern.concat [[0.,8.,`Chord([69;71;72;76],1.)];[0.,8.,`Chord([68;71;74;76],1.)]] in let synth = Pattern.arpeggiate `Up synth in let synth = Pattern.transpose (-12) synth in let sound () = saw () in let synth = Instrument.play (Note.adsr ~r:(ret...
903a07e7440401fd7cf5f6dd4e158b2b00250d8cfcf3e432f0de3a323db57c41
joegallo/doric
raw.clj
(ns doric.raw (:refer-clojure :exclude [join]) (:use [clojure.string :only [join]] [doric.core :only [aligned-th aligned-td]])) (def th aligned-th) (def td aligned-td) (defn render [table] (cons (join " " (first table)) (for [tr (rest table)] (join " " tr))))
null
https://raw.githubusercontent.com/joegallo/doric/8747fdce565187a5c368c575cf4ca794084b0a5c/src/doric/raw.clj
clojure
(ns doric.raw (:refer-clojure :exclude [join]) (:use [clojure.string :only [join]] [doric.core :only [aligned-th aligned-td]])) (def th aligned-th) (def td aligned-td) (defn render [table] (cons (join " " (first table)) (for [tr (rest table)] (join " " tr))))
2a7121f83731de682b0fec170c4d01a318e802ed6428aec30dc4939a51c0b157
ninjudd/cake
nsdeps.clj
by , / December 1 , 2010 Copyright ( c ) , 2010 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse ;; Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this ;; distribution. By using this software in any fashion, ...
null
https://raw.githubusercontent.com/ninjudd/cake/3a1627120b74e425ab21aa4d1b263be09e945cfd/dev/bake/nsdeps.clj
clojure
Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software. copied from lazytest.nsdeps moved from...
by , / December 1 , 2010 Copyright ( c ) , 2010 . All rights reserved . The use and distribution terms for this software are covered by the Eclipse (ns bake.nsdeps "Parsing namespace declarations for dependency information." (:use [clojure.set :only (union)] [bake.find-namespaces :only [fin...
66fc02a816bbea391228ea4a8c4eef7082b7518d633091752d5d39305bcb5e66
serperu/secer
test_turing.erl
-module(test_turing). -compile(export_all). % GENERAL file(o) -> 'turing.erl'; file(n) -> 'turing_ok.erl'. poi_rel(POI) -> {POI(o), POI(n)}. % POIs poi1(Version) -> {file(Version), 39, tuple, 1}. poi1_1(Version) -> {file(Version), 56, call, 1}. poi1_2(Version) -> {file(Version), 57, call, 1}. poi2_1(Ve...
null
https://raw.githubusercontent.com/serperu/secer/ffe2f9602356c34c9465c44534c82cc758b809b5/benchmarks/turing/test_turing.erl
erlang
GENERAL POIs
-module(test_turing). -compile(export_all). file(o) -> 'turing.erl'; file(n) -> 'turing_ok.erl'. poi_rel(POI) -> {POI(o), POI(n)}. poi1(Version) -> {file(Version), 39, tuple, 1}. poi1_1(Version) -> {file(Version), 56, call, 1}. poi1_2(Version) -> {file(Version), 57, call, 1}. poi2_1(Version) -> {file(...