_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
8ae4aa9dfe46ae0dfde5fc44d86a330934c38e9f12fd80c838e597054a35d423
facebookarchive/pfff
main_db.ml
(* * Please imagine a long and boring gnu-style copyright notice * appearing just here. *) open Common (*****************************************************************************) (* Purpose *) (*****************************************************************************) * pfff_db computes a " light " cod...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/main_db.ml
ocaml
* Please imagine a long and boring gnu-style copyright notice * appearing just here. *************************************************************************** Purpose *************************************************************************** *******************************************************************...
open Common * pfff_db computes a " light " code database ; something lighter than a * full berkeley database but still more powerful than just a TAGS file . * Such a light_database can be leveraged by the codemap visualizer * to convey visual semantic information that can help navigate a * big codebase...
fcf35b4e3ae00c22050da6c56b9578ef97a750ecc40570da013c7a96397560fd
danr/hipspec
Definitions.hs
# LANGUAGE RecordWildCards # module HipSpec.Sig.Definitions where import Test.QuickSpec.Term (Symbol) import qualified Test.QuickSpec.Term as QS import qualified Test.QuickSpec.Equation as QS import Data.Bifunctor import qualified HipSpec.Lang.Type as T import HipSpec.Sig.Symbols import HipSpec.Lang.PolyFOL import ...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/src/HipSpec/Sig/Definitions.hs
haskell
permutations in case quantifiers have become shuffled around
# LANGUAGE RecordWildCards # module HipSpec.Sig.Definitions where import Test.QuickSpec.Term (Symbol) import qualified Test.QuickSpec.Term as QS import qualified Test.QuickSpec.Equation as QS import Data.Bifunctor import qualified HipSpec.Lang.Type as T import HipSpec.Sig.Symbols import HipSpec.Lang.PolyFOL import ...
c569097de6c7255ce01543dddb3fe7966ad1c771c7b064ac2a1ba2ebff2488fd
ocurrent/mirage-ci
opam_repository.mli
val open_store : Fpath.t -> Git_unix.Store.t Lwt.t val oldest_commit_with : from:Git_unix.Store.Hash.t -> Fpath.t -> OpamPackage.t list -> string Lwt.t * Use " git - log " to find the oldest commit with these package versions . This avoids invalidating the build cache on every update to opam - repositor...
null
https://raw.githubusercontent.com/ocurrent/mirage-ci/855223ba8dffb153964e0df4f0f1b76713e77199/src/solver/opam_repository.mli
ocaml
val open_store : Fpath.t -> Git_unix.Store.t Lwt.t val oldest_commit_with : from:Git_unix.Store.Hash.t -> Fpath.t -> OpamPackage.t list -> string Lwt.t * Use " git - log " to find the oldest commit with these package versions . This avoids invalidating the build cache on every update to opam - repositor...
bad379c3c32b983f319563641fcf8b4d0cfce6b4b529625744a7f67e41283def
jave/practicaldevops
middleware.clj
(ns usermanager.middleware (:require [usermanager.layout :refer [*app-context* error-page]] [taoensso.timbre :as timbre] [environ.core :refer [env]] [selmer.middleware :refer [wrap-error-page]] [prone.middleware :refer [wrap-exceptions]] [ring.middleware.fla...
null
https://raw.githubusercontent.com/jave/practicaldevops/4c8f3bbee2d1ef37533107afc46863ceed385ef5/ch6/usermanager/src/usermanager/middleware.clj
clojure
If we're not inside a servlet environment (for example when using mock requests), then .getContextPath might not exist if the context is not specified in the request we check if one has been specified in the environment instead
(ns usermanager.middleware (:require [usermanager.layout :refer [*app-context* error-page]] [taoensso.timbre :as timbre] [environ.core :refer [env]] [selmer.middleware :refer [wrap-error-page]] [prone.middleware :refer [wrap-exceptions]] [ring.middleware.fla...
e9989c7f49c2a072f50fa0cf07c83a0b4f6389940a72b09945caee43d6144bf5
heyoka/faxe
s7_utils.erl
%%%------------------------------------------------------------------- @author ( C ) 2022 , < COMPANY > %%% @doc %%% %%% @end Created : 22 . Jun 2022 19:24 %%%------------------------------------------------------------------- -module(s7_utils). -author("heyoka"). %% API -export([add_client_addresses/3, build...
null
https://raw.githubusercontent.com/heyoka/faxe/0990e68d502fda8029a1f865612e7e37e703a3f6/apps/faxe/src/lib/s7_utils.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API if this client is the only one for the current address, then remove the whole address otherwise delete just the client from the list should not be the case partit...
@author ( C ) 2022 , < COMPANY > Created : 22 . Jun 2022 19:24 -module(s7_utils). -author("heyoka"). -export([add_client_addresses/3, build_addresses/2, remove_client/3, merge_addresses/2, bit_count/1]). -define(S7_HEADER_LENGTH_BYTES, 7). -define(S7_FUNCTION_HEADER_BYTES, 12). -define(S7_HEADER_BYTES, ?S7_H...
116b1cffb4e64c0fab97a94871e31e8654eaec78f1b8ff1ae19008d47c5d1742
rtrusso/scp
scheme-gluec.scm
(need pat/pat) (need util/list) (need util/string) (need sasm/sasm-insn) (need scheme/compiler/codegen/pretty-print) (need scheme/compiler/labels) (need scheme/meta-eval) (define (replace obj env) (define (append-improper l obj) (if (null? l) obj (cons (car l) (append-i...
null
https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/scheme-gluec.scm
scheme
(need pat/pat) (need util/list) (need util/string) (need sasm/sasm-insn) (need scheme/compiler/codegen/pretty-print) (need scheme/compiler/labels) (need scheme/meta-eval) (define (replace obj env) (define (append-improper l obj) (if (null? l) obj (cons (car l) (append-i...
ccbd0f50e5043a3d6552528ed5d05c6b3398d35982bab6de98e094c5a38a125e
fukamachi/supertrace
logger.lisp
(defpackage #:supertrace/tests/logger (:use #:cl #:rove #:supertrace/logger)) (in-package #:supertrace/tests/logger) (defpackage #:supertrace/tests/logger/test-package (:export #:say-hello)) (defun supertrace/tests/logger/test-package:say-hello (to) (format t "~&Hello, ~A!~%" to)) (deftest ensur...
null
https://raw.githubusercontent.com/fukamachi/supertrace/66d22c3ff131ecd1c8048dfced1d62ed6024ecb0/tests/logger.lisp
lisp
(defpackage #:supertrace/tests/logger (:use #:cl #:rove #:supertrace/logger)) (in-package #:supertrace/tests/logger) (defpackage #:supertrace/tests/logger/test-package (:export #:say-hello)) (defun supertrace/tests/logger/test-package:say-hello (to) (format t "~&Hello, ~A!~%" to)) (deftest ensur...
d03c7eb7879c1d8ded35c02ed374bb11a1150600e976c25184aa5ffcc45bc01c
anuyts/menkar
Parser.hs
# LANGUAGE AllowAmbiguousTypes # module Menkar.System.Parser where import Menkar.Parser.Class import Menkar.System.Basic import qualified Menkar.Raw as Raw import qualified Menkar.System.PrettyPrint.Raw as Raw class (Raw.SysRawPretty sys) => SysParser (sys :: KSys) where sysExprC :: CanParse m => m (Raw.SysExprC s...
null
https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/src/Menkar/System/Parser.hs
haskell
# LANGUAGE AllowAmbiguousTypes # module Menkar.System.Parser where import Menkar.Parser.Class import Menkar.System.Basic import qualified Menkar.Raw as Raw import qualified Menkar.System.PrettyPrint.Raw as Raw class (Raw.SysRawPretty sys) => SysParser (sys :: KSys) where sysExprC :: CanParse m => m (Raw.SysExprC s...
c5aa90f6b4f190930ec279808526732acc58787d5f6ecf57d1038cdc14c09261
metabase/metabase
card_and_dashboard_detail.clj
(ns metabase-enterprise.audit-app.pages.common.card-and-dashboard-detail "Common queries used by both Card (Question) and Dashboard detail pages." (:require [metabase-enterprise.audit-app.pages.common :as common] [metabase.models.card :refer [Card]] [metabase.models.dashboard :refer [Dashboard]] [metaba...
null
https://raw.githubusercontent.com/metabase/metabase/fab6832052f8312ec37b1f24e1faf4b9df265ed1/enterprise/backend/src/metabase_enterprise/audit_app/pages/common/card_and_dashboard_detail.clj
clojure
SELECT {{group-fn(timestamp}} AS "date", count(*) AS views FROM view_log WHERE model = {{model}} GROUP BY {{group-fn(timestamp}} ORDER BY {{group-fn(timestamp}} ASC
(ns metabase-enterprise.audit-app.pages.common.card-and-dashboard-detail "Common queries used by both Card (Question) and Dashboard detail pages." (:require [metabase-enterprise.audit-app.pages.common :as common] [metabase.models.card :refer [Card]] [metabase.models.dashboard :refer [Dashboard]] [metaba...
8267ad673ace2822d5a6d4e4dad1de5b6ab2fb55cd67a21050ef3bdfe43b89d2
Drup/dowsing
Feature.ml
module type S = sig type t val name : String.t val compute : Type.t -> t val compare : t CCOrd.t val compatible : query:t -> data:t -> Bool.t end module Head : S = struct let name = "head" type t = Type.Kind'.t let compute ty = Type.(kind' @@ head ty) let compare = Type.Kind'.compare let co...
null
https://raw.githubusercontent.com/Drup/dowsing/96c199284bd33a359ca233e882ae197af6c6ccf3/lib/index/Feature.ml
ocaml
number of tail spine non-variables kinds of tail spine non-variables
module type S = sig type t val name : String.t val compute : Type.t -> t val compare : t CCOrd.t val compatible : query:t -> data:t -> Bool.t end module Head : S = struct let name = "head" type t = Type.Kind'.t let compute ty = Type.(kind' @@ head ty) let compare = Type.Kind'.compare let co...
bb691ca5bd7b09ffeae2d8e61481d7558ab4db22856000793cc905c345d72fff
aarkerio/ZentaurLMS
shared.cljc
(ns zentaur.febe.shared (:require [struct.core :as st])) (defn asterisks-to-spaces "Replace sub-strings surrounded by asterisks for spaces" [text] (clojure.string/replace text #"\*(.*?)\*" #(clojure.string/join (take (count (% 1)) (repeat "_")))))
null
https://raw.githubusercontent.com/aarkerio/ZentaurLMS/adb43fb879b88d6a35f7f556cb225f7930d524f9/src/cljc/zentaur/febe/shared.cljc
clojure
(ns zentaur.febe.shared (:require [struct.core :as st])) (defn asterisks-to-spaces "Replace sub-strings surrounded by asterisks for spaces" [text] (clojure.string/replace text #"\*(.*?)\*" #(clojure.string/join (take (count (% 1)) (repeat "_")))))
0dc7539f38a3c9439744422eb461aac7b3f10cd2e401bcdcf31e4b97a0679c68
rudymatela/extrapolate
Utils.hs
-- | -- Module : Test.Extrapolate.Utils Copyright : ( c ) 2017 - 2019 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > -- -- This module is part of Extrapolate, -- a library for generalization of counter-examples. -- -- Miscellaneous utility functions. -- -- This is not int...
null
https://raw.githubusercontent.com/rudymatela/extrapolate/0b3ca28eed0d04358b2fb033664476f8b29821a6/src/Test/Extrapolate/Utils.hs
haskell
| Module : Test.Extrapolate.Utils This module is part of Extrapolate, a library for generalization of counter-examples. Miscellaneous utility functions. This is not intended to be used by users of Extrapolate, only by modules of Extrapolate itself. Expect symbols exported here to come and go with every ...
Copyright : ( c ) 2017 - 2019 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > module Test.Extrapolate.Utils ( (+++) , nubMerge , nubMergeOn , nubMergeBy , foldr0 , fromLeft , fromRight , elemBy , listEq, listOrd , maybeEq, maybeOrd , eitherEq, eitherOrd...
cf7bd5332f73ed8635409737d30c13931ac071a0c0a292bacf4140b60735a0b7
anishathalye/rtlv
main.rkt
#lang racket/base (require racket/bool racket/list racket/format racket/contract racket/match racket/set racket/function syntax/parse/define yosys (prefix-in @ (combine-in rosette/safe rosutil)) (for-syntax racket/base syntax/parse)) (provide (contract-out [with-invariants (-> ...
null
https://raw.githubusercontent.com/anishathalye/rtlv/c10e4ddca3e36e2cb860859d7d69d2c90ef9b8f1/shiva/main.rkt
racket
state should be a new state constructed with new-symbolic-{type} with-invariants will return that state with the constant fields, as indicated by the invariant, to their constant values rather than being this does a best-effort job at figuring out constant fields in the state it won't work, for example, for a l...
#lang racket/base (require racket/bool racket/list racket/format racket/contract racket/match racket/set racket/function syntax/parse/define yosys (prefix-in @ (combine-in rosette/safe rosutil)) (for-syntax racket/base syntax/parse)) (provide (contract-out [with-invariants (-> ...
a348b6c294a31aa89f114b11be98e93c208fe825e0c71669291f007aa88bea74
khibino/haskell-relational-record
SQLite3.hs
# LANGUAGE TemplateHaskell # module Database.Record.TH.SQLite3 ( defineTable, ) where import GHC.Generics (Generic) import Database.Relational.HDBC.TH (defineTableFromDB) import Database.Schema.HDBC.Driver (typeMap) import Database.Schema.HDBC.SQLite3 (driverSQLite3) import Database.HDBC.Sqlite3 (connectSqlite3) ...
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-record-examples/lib/Database/Record/TH/SQLite3.hs
haskell
overwrite the default type map with yours
# LANGUAGE TemplateHaskell # module Database.Record.TH.SQLite3 ( defineTable, ) where import GHC.Generics (Generic) import Database.Relational.HDBC.TH (defineTableFromDB) import Database.Schema.HDBC.Driver (typeMap) import Database.Schema.HDBC.SQLite3 (driverSQLite3) import Database.HDBC.Sqlite3 (connectSqlite3) ...
648981567c2933cebc067e4f2c593d0add3eb3818fb9800f915b388f356ed2c0
m4dc4p/haskelldb
test-bounded.hs
import System.Environment import TestConnect import Database.HaskellDB import Database.HaskellDB.BoundedList import Database.HaskellDB.HSQL.ODBC import Dp037_bounded.D3proj_users q n = do users <- table d3proj_users restrict (users!xid .==. constant (trunc n)) project (first_name << users!first_nam...
null
https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/test/old/test-bounded.hs
haskell
import System.Environment import TestConnect import Database.HaskellDB import Database.HaskellDB.BoundedList import Database.HaskellDB.HSQL.ODBC import Dp037_bounded.D3proj_users q n = do users <- table d3proj_users restrict (users!xid .==. constant (trunc n)) project (first_name << users!first_nam...
6f4f0cb102e7927aec620e169d64595957d3e9792282dc3d05b2d2633fb29017
gadfly361/rid3
scatter_intermediate.cljs
(ns rid3.scatter-intermediate (:require [reagent.core :as reagent] [rid3.core :as rid3 :refer [rid3->]] [rid3.examples-util :as util] [goog.object :as gobj] )) (def cursor-key :scatter-intermediate) (def height 140) (def width 260) (def margin {:top 8 :left 32 :right ...
null
https://raw.githubusercontent.com/gadfly361/rid3/cae79fdbee3b5aba45e29b589425f9a17ef8613b/src/examples/rid3/scatter_intermediate.cljs
clojure
Scales lighten path light text light line create axis Add did-update version that transitions on re-render (i.e., when data changes) dots common did-mount did-update Example
(ns rid3.scatter-intermediate (:require [reagent.core :as reagent] [rid3.core :as rid3 :refer [rid3->]] [rid3.examples-util :as util] [goog.object :as gobj] )) (def cursor-key :scatter-intermediate) (def height 140) (def width 260) (def margin {:top 8 :left 32 :right ...
4e82877c4d7065fdbefa4e444e05dd8cd698608ae8748dc1c2f0400077e8793f
reflectionalist/S9fES
string-last-position.scm
Scheme 9 from Empty Space , Function Library By , 2010 ; Placed in the Public Domain ; ( string - last - position ) = = > integer | # f ( string - ci - last - position ) = = > integer | # f ( string - last - word - position ) = = > integer | # f ( string - ci - last - wo...
null
https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/lib/string-last-position.scm
scheme
Placed in the Public Domain string STRING2. Return the position of the rightmost substring of function, but ignores case. STRING-LAST-WORD-POSITION (STRING-CI-LAST-WORD-POSITION) differs from STRING-LAST-POSITION (STRING-CI-LAST-POSITION) in that is matches only full words, where a full word is a subsequence ...
Scheme 9 from Empty Space , Function Library By , 2010 ( string - last - position ) = = > integer | # f ( string - ci - last - position ) = = > integer | # f ( string - last - word - position ) = = > integer | # f ( string - ci - last - word - position ) = = > inte...
3f490946a7485fe18a348abcd4b7a47a242b3afa6e5d0ad7a49dbed5fcca6d00
zxymike93/SICP
343.rkt
(define (make-account balance) ;; (withdraw account amount) (set! balance (- balance amount)) ;; (deposit account amount) (set! balance (+ balance amount)) (let ((s (make-serializer))) (define (dispatch m) ;; serialize (s withdraw) (s deposit)))) (define (exchange acc1 acc2) (let ((...
null
https://raw.githubusercontent.com/zxymike93/SICP/9d8e84d6a185bf4d7f28c414fc3359741384beb5/chapter3/343.rkt
racket
(withdraw account amount) (deposit account amount) serialize Q2 假设有上述三个账户 a1, a2, a3, 每个账户都使用了单独的 serializer。Peter,Paul 分别进行一笔转账。 a2 a1 a3 20 10 30 a2 - a1 算出的差额是 10,a3 - a1 算出的差额是 20。因为两个 diff 是可以并发执行的 。 dp 20 40 dp Q4 说明如果连单个账户的 serializer 去除,三个账户...
(define (make-account balance) (set! balance (- balance amount)) (set! balance (+ balance amount)) (let ((s (make-serializer))) (define (dispatch m) (s withdraw) (s deposit)))) (define (exchange acc1 acc2) (let ((diff (- (acc1 'balance) (acc2 'balance)))) ((acc1 'withdraw...
60cf9d0485d06d810cd96d7bd0e6f493532b1c3814052bdcb10d7232f5c080f4
rentpath/rp-jackdaw-clj
project.clj
(defproject com.rentpath/rp-jackdaw-clj "0.3.5-SNAPSHOT" :description "Clojure Kafka components using Jackdaw" :url "-jackdaw-clj" :license {:name "MIT" :url ""} :dependencies [[org.clojure/clojure "1.10.0"] [com.stuartsierra/component "0.4.0"] [com.rentpath/jackdaw...
null
https://raw.githubusercontent.com/rentpath/rp-jackdaw-clj/bec14f6220b256238b77ada3890d3b6b2bceafd0/project.clj
clojure
(defproject com.rentpath/rp-jackdaw-clj "0.3.5-SNAPSHOT" :description "Clojure Kafka components using Jackdaw" :url "-jackdaw-clj" :license {:name "MIT" :url ""} :dependencies [[org.clojure/clojure "1.10.0"] [com.stuartsierra/component "0.4.0"] [com.rentpath/jackdaw...
25b9791f8da17927ad8d1b6aaaa120711b43e85e659829e98be61ec9a17ba215
czan/stateful-check
exception.clj
(ns stateful-check.exception (:require [clojure.test :refer [deftest is]] [clojure.test.check.generators :as gen] [stateful-check.core :refer :all])) (def counter (atom 0)) (def inc-command {:args (fn [state] [gen/int]) :command #(swap! counter + %) :next-state (fn [state ...
null
https://raw.githubusercontent.com/czan/stateful-check/f7a369c9306d17849981283ac04f5a524db5745f/test/stateful_check/exception.clj
clojure
(ns stateful-check.exception (:require [clojure.test :refer [deftest is]] [clojure.test.check.generators :as gen] [stateful-check.core :refer :all])) (def counter (atom 0)) (def inc-command {:args (fn [state] [gen/int]) :command #(swap! counter + %) :next-state (fn [state ...
198c5e35ded7df79282c58f5a9fbc586b08feeac4024cd41c150c3985174753c
vmware-archive/diegotaskscheduler
web.clj
(ns diegoscheduler.web (:require [com.stuartsierra.component :as component] [clojure.core.async :refer [<! >! put! go-loop chan pipe onto-chan]] [clojure.tools.logging :as log] [compojure.core :refer :all] [compojure.route :as route] [ring.util.response :ref...
null
https://raw.githubusercontent.com/vmware-archive/diegotaskscheduler/080fa07815f3e66cdbf1ce804d0944d0561812fc/src/diegoscheduler/web.clj
clojure
(ns diegoscheduler.web (:require [com.stuartsierra.component :as component] [clojure.core.async :refer [<! >! put! go-loop chan pipe onto-chan]] [clojure.tools.logging :as log] [compojure.core :refer :all] [compojure.route :as route] [ring.util.response :ref...
6a60ba4c8c26e3173e16afb1a67de5acd47b224a058b63c62721fa2636dc8714
huangz1990/SICP-answers
45-make-account-and-serializer.scm
45-make-account-and-serializer.scm (load "parallel.scm") (load "p215-serialized-exchange.scm") (define (make-account-and-serializer balance) (define (withdraw amount) (if (>= balance amount) (begin (set! balance (- balance amount)) balance) "Insufficient funds")) (define (de...
null
https://raw.githubusercontent.com/huangz1990/SICP-answers/15e3475003ef10eb738cf93c1932277bc56bacbe/chp3/code/45-make-account-and-serializer.scm
scheme
45-make-account-and-serializer.scm (load "parallel.scm") (load "p215-serialized-exchange.scm") (define (make-account-and-serializer balance) (define (withdraw amount) (if (>= balance amount) (begin (set! balance (- balance amount)) balance) "Insufficient funds")) (define (de...
796130cde4b375f32cdd86b71d6c5010edf09e71a2609137c3c638d5d895788b
neilprosser/mr-maestro
responses.clj
(ns maestro.responses (:require [clojure.tools.logging :refer [warn]] [maestro.log :as log]) (:import (com.amazonaws AmazonServiceException))) (def retry-exception-backoff-millis 5000) (defn retry-after [millis] {:status :retry :backoff-ms millis}) (defn success [parameters] {:status :su...
null
https://raw.githubusercontent.com/neilprosser/mr-maestro/469790fd712262016729c1d83d4b4e11869237a2/src/maestro/responses.clj
clojure
(ns maestro.responses (:require [clojure.tools.logging :refer [warn]] [maestro.log :as log]) (:import (com.amazonaws AmazonServiceException))) (def retry-exception-backoff-millis 5000) (defn retry-after [millis] {:status :retry :backoff-ms millis}) (defn success [parameters] {:status :su...
4c8753ef595061aac803cff4ee2a719eb3120785cadbec1e2ebda3cc96ec9252
facebook/pyre-check
reference.mli
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/536e4a2c008726d0ce5589eaef681166923b6183/source/ast/reference.mli
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
cebef42d2cd3c47103ef758b6f59a250aad46116dfbcddc29de8fb4aec36fb4e
mirage/ocaml-openflow
ofswitch_standalone.mli
* Copyright ( c ) 2012 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE A...
null
https://raw.githubusercontent.com/mirage/ocaml-openflow/dcda113745e8edc61b5508eb8ac2d1e864e1a2df/lib/ofswitch_standalone.mli
ocaml
* Copyright ( c ) 2012 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE A...
cc615f8e8f45602c71c7ca2fdd0969be716c4909c111fc3ef91168bd302d754e
ocaml-ppx/ocamlformat
match_fun.ml
let reset_cond = match states with | [ _ ] -> fun _ v _ -> e_id v | _ -> fun s v clk -> (* … *)
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/failing/tests/match_fun.ml
ocaml
let reset_cond = match states with | [ _ ] -> fun _ v _ -> e_id v
4ea0171f17decc463e421a45c3f312c120be368780b676d8484e244e4bd6b14f
froggey/Mezzano
generate-bochs-map-file.lisp
Generate a Bochs - compatible map file containing every function in the current image . (in-package :mezzano.internals) (defun generate-bochs-map-file (path) (let ((total-functions 0) (areas '(:wired-function :function))) (dolist (area areas) (walk-area area (lambda (object addr...
null
https://raw.githubusercontent.com/froggey/Mezzano/f0eeb2a3f032098b394e31e3dfd32800f8a51122/tools/generate-bochs-map-file.lisp
lisp
Generate a Bochs - compatible map file containing every function in the current image . (in-package :mezzano.internals) (defun generate-bochs-map-file (path) (let ((total-functions 0) (areas '(:wired-function :function))) (dolist (area areas) (walk-area area (lambda (object addr...
fed81e8be07ed775590dc0cc1e38d4d0842d1b382cda6ff738e2b79163a2e07e
MichaelDrogalis/dire
project.clj
(defproject dire "0.5.4" :description "Erlang-style supervisor error handling for Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/core.incubator "0.1.3"] [slingshot "0.10.3"] ...
null
https://raw.githubusercontent.com/MichaelDrogalis/dire/84b31cc30b1d30b74918c73928d4e148e80e494c/project.clj
clojure
(defproject dire "0.5.4" :description "Erlang-style supervisor error handling for Clojure" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.5.1"] [org.clojure/core.incubator "0.1.3"] [slingshot "0.10.3"] ...
e6000d08c4bb81d7d7ee2b80d07292d9df02c02847e207957a09d520aacf55cb
err0r500/realworld-app-simple-haskell
Lib.hs
module Http.Lib where import qualified Adapter.Logger as Logger import qualified Network.Wai as Wai import RIO import qualified Usecase.Interactor as UC import qualified Usecase.LogicHandler as UC import qualified Usecase.UserRegistration as UC unit replaces State since we do n't need any newtype App a = App (RIO (...
null
https://raw.githubusercontent.com/err0r500/realworld-app-simple-haskell/20ec982256ec890f0c77b572eccef987cd3799bf/test/Http/Lib.hs
haskell
module Http.Lib where import qualified Adapter.Logger as Logger import qualified Network.Wai as Wai import RIO import qualified Usecase.Interactor as UC import qualified Usecase.LogicHandler as UC import qualified Usecase.UserRegistration as UC unit replaces State since we do n't need any newtype App a = App (RIO (...
9fbf11cb247c8df3378ad19832f6bf005c0e97941bd76a8206c3ba6744315a94
jjsimpso/molasses
newcanvas.rkt
#lang racket/gui (require "../dlist.rkt" "../gopher.rkt" "../config.rkt") #;(require mred/private/mrcanvas mred/private/wx mred/private/wxcanvas (prefix-in wx: mred/private/wxme/text)) (define frame (new (class frame% (super-new)) [label "Layout canvas test"] ...
null
https://raw.githubusercontent.com/jjsimpso/molasses/dfc762fce1ecf1d7963ba4cd9781b63aba2b8306/src/test/newcanvas.rkt
racket
(require mred/private/mrcanvas tentative mode options: 'plaintext, 'columnar, 'layout initially hide both scrollbars store the drawing context for efficiency size of canvas's content, which doesn't include margins if they exist equivalent to virtual size minus the margins scroll position. upper left coordinate...
#lang racket/gui (require "../dlist.rkt" "../gopher.rkt" "../config.rkt") mred/private/wx mred/private/wxcanvas (prefix-in wx: mred/private/wxme/text)) (define frame (new (class frame% (super-new)) [label "Layout canvas test"] [width 800] [height ...
85c62a094025868f480f8a9002c63c80188042cbd16ac92725ddab6cae8070a4
returntocorp/semgrep
visitor_java.ml
Copyright ( C ) 2012 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file license.txt . *...
null
https://raw.githubusercontent.com/returntocorp/semgrep/00f1e67bbb80f00e29db3381288fc00398b6868a/languages/java/ast/visitor_java.ml
ocaml
Disable warnings against unused variables Continuation-style visitor for a subset of concepts; similar to visitor_php. The bulk of this file was generated with: ocamltarzan -choice vi ast_java.ml (cf. 'generated by' comment below). The main visitor hooks were carefully handcrafted during a coffee binge...
Copyright ( C ) 2012 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file license.txt . *...
6df0d286ed0cb4a16aa6af4a24e17025abef53855c06f0a3879323ec7ca39eb9
chansey97/clprosette-miniKanren
sign-domain.rkt
#lang racket (require "../mk.rkt") (require "../rosette-bridge.rkt") (provide (all-defined-out)) (define s/declare-bito (lambda (b) (rosette-typeo b r/@boolean?))) (define s/declareo (lambda (s) (rosette-typeo s (r/bitvector 3)))) ;; (define s/haso ;; (lambda (p) ;; (lambda (s b) ( z / asse...
null
https://raw.githubusercontent.com/chansey97/clprosette-miniKanren/0fd95aa8d2da48a87817f9436e64da6735f5e139/clprosette-miniKanren/tests/sign-domain.rkt
racket
(define s/haso (lambda (p) (lambda (s b) (define s/hasnto (lambda (p) (lambda (s b) (define s/chaso (lambda (p) (lambda (s) (define s/chasnto (lambda (p) (lambda (s) (define s/z3-alphao (lambda (n s) For example, {−}⊗{+,0}={−,0} and {−,+}⊗{0}={0} 这里可能要转成rosette 输入一个op,返回一张表 ...
#lang racket (require "../mk.rkt") (require "../rosette-bridge.rkt") (provide (all-defined-out)) (define s/declare-bito (lambda (b) (rosette-typeo b r/@boolean?))) (define s/declareo (lambda (s) (rosette-typeo s (r/bitvector 3)))) ( z / assert ` (= , s ( ite , b ( , s , p ) ( bvand , s ( bvnot ,...
5b8d70526b6e55a47e04676d2a7c29274c63d07149f71336b3b8987aaf4a32f7
htmfilho/minimily
string_test.clj
(ns minimily.utils.string-test (:require [clojure.test :refer :all] [minimily.utils.string :refer :all])) (deftest test-tech (testing "Tests if a string is compatible with low level systems." (is (.contains (tech "onça") "c")) (is (.equals (tech "&don't") "dont")) (is (.equals (tech "àãáâ")...
null
https://raw.githubusercontent.com/htmfilho/minimily/b317b6b67bc79773163f1a6f7c3b46db795ef979/test/minimily/utils/string_test.clj
clojure
(ns minimily.utils.string-test (:require [clojure.test :refer :all] [minimily.utils.string :refer :all])) (deftest test-tech (testing "Tests if a string is compatible with low level systems." (is (.contains (tech "onça") "c")) (is (.equals (tech "&don't") "dont")) (is (.equals (tech "àãáâ")...
fd6d7c945e910c883051ceabc125486490008c5d146a5cbf3e62dc5ba6d981da
facebook/Haxl
SleepDataSource.hs
Copyright ( c ) 2014 - present , Facebook , Inc. -- All rights reserved. -- This source code is distributed under the terms of a BSD license , -- found in the LICENSE file. {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE St...
null
https://raw.githubusercontent.com/facebook/Haxl/8f018dc9cffe641bc0d88d29934d378c82a1246d/tests/SleepDataSource.hs
haskell
All rights reserved. found in the LICENSE file. # LANGUAGE DeriveDataTypeable # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings #
Copyright ( c ) 2014 - present , Facebook , Inc. This source code is distributed under the terms of a BSD license , # LANGUAGE MultiParamTypeClasses # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FlexibleInstances # module SleepDataSource ( Sleep...
93ac114b29fc8e316da18dee02e1859667cee0888b35c4e2b9281c68e35a4d31
K2InformaticsGmbH/egambo
egambo_session.erl
-module(egambo_session). -behaviour(gen_server). -include("egambo.hrl"). -include("egambo_game.hrl"). -export([ start_link/3, get_xsrfToken/1, request/3 ]). %% gen_server callbacks -export([ init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3 ]). -reco...
null
https://raw.githubusercontent.com/K2InformaticsGmbH/egambo/e8bdf971f188a2139db52712ab5b9d87b2f11520/src/egambo_session.erl
erlang
gen_server callbacks TODO: Review seco as probably this will leak :) TODO: Do we really need a configurable policy, also we might want to have a stronger policy for dderl users, suggested Ids need to be sent as string otherwise javascript precision problems might arise. We need to read the type to know the...
-module(egambo_session). -behaviour(gen_server). -include("egambo.hrl"). -include("egambo_game.hrl"). -export([ start_link/3, get_xsrfToken/1, request/3 ]). -export([ init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3 ]). -record(state, { playerId...
fc86c5d7def709b983aca7c29697f1e2125ae285ac5646cd6cd13674d97a82b8
jakemcc/sicp-study
ex3_2.clj
Exercise 3.2 (use 'clojure.test) (defn make-monitored [f] (let [num-calls (atom 0)] (fn [x] (cond (= x 'how-many-calls?) @num-calls (= x 'reset-calls) (swap! num-calls (fn [x] 0)) :else (do (swap! num-calls inc) (f x)))))) (deftest test-make-monitored (let [...
null
https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section3.1/ex3_2.clj
clojure
Exercise 3.2 (use 'clojure.test) (defn make-monitored [f] (let [num-calls (atom 0)] (fn [x] (cond (= x 'how-many-calls?) @num-calls (= x 'reset-calls) (swap! num-calls (fn [x] 0)) :else (do (swap! num-calls inc) (f x)))))) (deftest test-make-monitored (let [...
e80f2a4054835512b644d3038ce354716f4123e0ae6f66ddf530e7ab6325394c
csabahruska/jhc-components
Binary.hs
module E.Binary() where import Data.Binary import E.Type import FrontEnd.HsSyn() import Name.Binary() import Support.MapBinaryInstance import {-# SOURCE #-} Info.Binary(putInfo,getInfo) instance Binary TVr where put TVr { tvrIdent = eid, tvrType = e, tvrInfo = nf} = do put eid put e putIn...
null
https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/jhc-core/src/E/Binary.hs
haskell
# SOURCE #
module E.Binary() where import Data.Binary import E.Type import FrontEnd.HsSyn() import Name.Binary() import Support.MapBinaryInstance instance Binary TVr where put TVr { tvrIdent = eid, tvrType = e, tvrInfo = nf} = do put eid put e putInfo nf get = do x <- get e <- g...
861336f116bf280889da02f30a38e943bfe0913d951be3e6753cee729b7ce5d7
MaskRay/OJHaskell
14.hs
import Data.List import Data.Array.IO import Data.Array.Base import Data.Ord maxn = 1000000 collatz :: (IOUArray Int Int) -> Integer -> IO Int collatz a 1 = return 1 collatz a n = do ans <- if n <= maxn then unsafeRead a (fromIntegral n) :: IO Int else return 0 -- print $ show n...
null
https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/14.hs
haskell
print $ show n ++ " " ++ show ans
import Data.List import Data.Array.IO import Data.Array.Base import Data.Ord maxn = 1000000 collatz :: (IOUArray Int Int) -> Integer -> IO Int collatz a 1 = return 1 collatz a n = do ans <- if n <= maxn then unsafeRead a (fromIntegral n) :: IO Int else return 0 if (ans > 0) ...
10e008c44a2d118fe10fb3c7892952541c08f52274bab9b0dbbedf54b7a15cf7
erlcloud/erlcloud
erlcloud_inspector_tests.erl
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(erlcloud_inspector_tests). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud.hrl"). %% Unit tests for inspector. These tests work by using to mock erlcloud_httpc . There are two classes of test : input and output . %% %...
null
https://raw.githubusercontent.com/erlcloud/erlcloud/d1d60130929436b5524a0e70ae17f6da6a2a14b9/test/erlcloud_inspector_tests.erl
erlang
Unit tests for inspector. Input tests verify that different function args produce the desired JSON request. An input test list provides a list of funs and the JSON that is expected to result. Output tests verify that the http response produces the correct return from the fun. An output test lists provides a list...
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- -module(erlcloud_inspector_tests). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud.hrl"). These tests work by using to mock erlcloud_httpc . There are two classes of test : input and output . -define(_inspector_test(T), {?LI...
686bf64056262ffa690e25c8bd7c956a8fb3c3239fe203783b91e532ff707d6a
coccinelle/coccinelle
queue.mli
type !'a t exception Empty val create : unit -> 'a t val add : 'a -> 'a t -> unit val push : 'a -> 'a t -> unit val take : 'a t -> 'a val take_opt : 'a t -> 'a option val pop : 'a t -> 'a val peek : 'a t -> 'a val peek_opt : 'a t -> 'a option val top : 'a t -> 'a val clear : 'a t -> unit val copy : 'a t -> 'a t val is...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.13/queue.mli
ocaml
type !'a t exception Empty val create : unit -> 'a t val add : 'a -> 'a t -> unit val push : 'a -> 'a t -> unit val take : 'a t -> 'a val take_opt : 'a t -> 'a option val pop : 'a t -> 'a val peek : 'a t -> 'a val peek_opt : 'a t -> 'a option val top : 'a t -> 'a val clear : 'a t -> unit val copy : 'a t -> 'a t val is...
95badfaeb523c8b45366e4aa1d363e021937f91aeaf74219e93b307a8771a3ee
carotene/carotene
carotene_publisher_sup.erl
-module(carotene_publisher_sup). -behaviour(supervisor). %% API -export([start_link/0]). -export([start_child/1]). %% Supervisor callbacks -export([init/1]). %% =================================================================== %% API functions %% ===================================================================...
null
https://raw.githubusercontent.com/carotene/carotene/963ecad344ec1c318c173ad828a5af3c000ddbfc/src/carotene_publisher_sup.erl
erlang
API Supervisor callbacks =================================================================== API functions =================================================================== =================================================================== Supervisor callbacks ================================================...
-module(carotene_publisher_sup). -behaviour(supervisor). -export([start_link/0]). -export([start_child/1]). -export([init/1]). start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). start_child(Args) -> supervisor:start_child(?MODULE, Args). init([]) -> {ok, { {simple_one_for_one, 5, ...
899740a291aa216082520ee0877f77e82e756d875917e05afbc2876a75fb54e7
juji-io/datalevin
data_readers.clj
{datalevin/Datom datalevin.datom/datom-from-reader datalevin/DB datalevin.db/db-from-reader datalevin/bytes datalevin.bits/bytes-from-reader datalevin/regex datalevin.bits/regex-from-reader datalevin/bigint datalevin.bits/bigint-from-reader datalevin/inter-fn datalevin.interpret/inter-fn-from-read...
null
https://raw.githubusercontent.com/juji-io/datalevin/9c1e7c6fce94496fbc57e79c9a47b9ee15a68979/src/data_readers.clj
clojure
{datalevin/Datom datalevin.datom/datom-from-reader datalevin/DB datalevin.db/db-from-reader datalevin/bytes datalevin.bits/bytes-from-reader datalevin/regex datalevin.bits/regex-from-reader datalevin/bigint datalevin.bits/bigint-from-reader datalevin/inter-fn datalevin.interpret/inter-fn-from-read...
8b6e2202ac3df07c85a2bc1a85031287f90d68e20e97497284c738e3622482aa
shentufoundation/deepsea
ast.ml
type op = Add | Sub | Times | Divide | Equal | Neq | And | Or | LGT | RGT | LGTEQ | RGTEQ | PASSIGN type typ = | Bool | Int | Uint of string | Address of string | Void of string | Mapstruct of typ list * typ (* Need change *) (* type ocamlbuiltin = Int | Bool | String *) (* type param = *) type expr = ...
null
https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/OpenSC/src/ast.ml
ocaml
Need change type ocamlbuiltin = Int | Bool | String type param = number literal control flow statement: if, while ?? type program = interface_def list * consturctor_def list consturctor list is bad ! pretty printing
type op = Add | Sub | Times | Divide | Equal | Neq | And | Or | LGT | RGT | LGTEQ | RGTEQ | PASSIGN type typ = | Bool | Int | Uint of string | Address of string | Void of string | Mapstruct of typ list * typ type expr = | BoolLit of bool | StrLit of string | Id of string | EnvLit of string * string ...
516e7f5753082e7736ab880d2975caa8de83014153676c31956024350b1a1b40
hhucn/decide3
appbar_ws.cljs
(ns decide.appbar-ws (:require [nubank.workspaces.core :as ws] [nubank.workspaces.model :as wsm] [nubank.workspaces.card-types.fulcro3 :as ct.fulcro] [decide.ui.components.appbar :as appbar])) (ws/defcard appbar-card {::wsm/card-width 7 ::wsm/card-height 5 ::wsm/align ...
null
https://raw.githubusercontent.com/hhucn/decide3/e27ea04033d94a0a61f8118a58050b86ed0f1327/src/workspaces/decide/appbar_ws.cljs
clojure
(ns decide.appbar-ws (:require [nubank.workspaces.core :as ws] [nubank.workspaces.model :as wsm] [nubank.workspaces.card-types.fulcro3 :as ct.fulcro] [decide.ui.components.appbar :as appbar])) (ws/defcard appbar-card {::wsm/card-width 7 ::wsm/card-height 5 ::wsm/align ...
01b0f2bbfae4a51cd07752486d2532a433e0f0daead103325d90f737e5b5a98a
wdebeaum/step
while.lisp
;;;; ;;;; W::while ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::while (SENSES ((meta-data :origin monroe :entry-date 20031219 :change-date nil :wn ("while%1:28:00") :comments s11) (LF-PARENT ONT::time-interval) (example "they waited a long while") (TEMPL count-pred-templ) ...
null
https://raw.githubusercontent.com/wdebeaum/step/8d91a150c39f8eb146a6e16242c9c0a99bb08090/src/LexiconManager/Data/new/while.lisp
lisp
W::while FIXME -- we might want syntax to be pre-only ;; not true. We can say "A is true while B is not"
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::while (SENSES ((meta-data :origin monroe :entry-date 20031219 :change-date nil :wn ("while%1:28:00") :comments s11) (LF-PARENT ONT::time-interval) (example "they waited a long while") (TEMPL count-pred-templ) ) ) ) )) (d...
0aa1443de86bd51e773828b5241f1fe4709a3954f797f75a1704bb44005784f3
Perry961002/SICP
exa3.3.4-digital-circuit.scm
(load "Chap3\\example\\exa3.3.2-queue.scm") (load "Chap3\\exercise\\exe3.28-or-gate.scm") 待处理表的实现 ;这种待处理表由一些时间段组成,每个时间段是由一个数值和一个队列组成的序对 (define (make-time-segment time queue) (cons time queue)) (define (segment-time s) (car s)) (define (segment-queue s) (cdr s)) ;待处理表本身就是时间段的一个一维表格,时间段按时间递增的顺序 (define (make-ag...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap3/example/exa3.3.4-digital-circuit.scm
scheme
这种待处理表由一些时间段组成,每个时间段是由一个数值和一个队列组成的序对 待处理表本身就是时间段的一个一维表格,时间段按时间递增的顺序 将一个动作加入待处理的表 ------------------------------------------------------------------ 一条线路是一个具有两个局部状态变量的计算对象,其中一个是信号值signal-value,另一个是一组过程action-procedures 逐个调用一个无参过程表中的每个过程 ------------------------------------------------------------------ -----------------...
(load "Chap3\\example\\exa3.3.2-queue.scm") (load "Chap3\\exercise\\exe3.28-or-gate.scm") 待处理表的实现 (define (make-time-segment time queue) (cons time queue)) (define (segment-time s) (car s)) (define (segment-queue s) (cdr s)) (define (make-agenda) (list 0)) (define (current-time agenda) (car agenda)) (define ...
aed5dcc21fbad367ea20922130343e6d332745eade8d5d1020a4263f90e8375a
rntz/moxy
util.rkt
#lang racket (require (for-syntax syntax/parse)) (require racket/stream) (provide const flip iter funcall call-with curry nary unary zip-with zip mkid mktemp define-syntax-parser define-many eta foldl1 dict - union hash - unions show repr printfln) (define (const x) (lambda _ x)) (define ((flip f) x y)...
null
https://raw.githubusercontent.com/rntz/moxy/18015aed1596ae55658be4ac9eb5cbb3debb1644/util.rkt
racket
zips arbitrary sequences; always outputs a list Some syntactic help Data structure manipulations (define (foldl1 f xs) (match xs [`(,x) x] Reduces a list using a monoid String formatting & IO (show x) shows x in human-readable form, with some nice abbreviations. (repr x) shows x in (read)-able form, wit...
#lang racket (require (for-syntax syntax/parse)) (require racket/stream) (provide const flip iter funcall call-with curry nary unary zip-with zip mkid mktemp define-syntax-parser define-many eta foldl1 dict - union hash - unions show repr printfln) (define (const x) (lambda _ x)) (define ((flip f) x y)...
d09f66596c9395bd48e55c9058df010d7302aa90510dedf412f8b6086aa768cf
robert-strandh/SICL
rassoc-defun.lisp
(cl:in-package #:sicl-cons) (defun |rassoc key=identity test=eq| (item alist) (with-alist-elements (element alist rassoc) (when (eq item (cdr element)) (return element)))) (defun |rassoc key=identity test=eql| (item alist) (with-alist-elements (element alist rassoc) (when (eql item (cdr element)) ...
null
https://raw.githubusercontent.com/robert-strandh/SICL/32d995c4f8e7d228e9c0cda6f670b2fa53ad0287/Code/Cons/rassoc-defun.lisp
lisp
(cl:in-package #:sicl-cons) (defun |rassoc key=identity test=eq| (item alist) (with-alist-elements (element alist rassoc) (when (eq item (cdr element)) (return element)))) (defun |rassoc key=identity test=eql| (item alist) (with-alist-elements (element alist rassoc) (when (eql item (cdr element)) ...
8b311f8c2b4e14b7c14a4c087a7f9abc18ba8c054a7514dfe10309b864e4a75d
lokedhs/maxima-client
maxima-plot.lisp
(in-package :maxima) #+nil (maxima-client.common::wrap-function check-option-format (option) (if (eq (cadr option) '$clim) '$clim ;; ELSE: Call into the old implementation (funcall *OLD-FN-CHECK-OPTION-FORMAT* option))) #+nil (maxima-client.common::wrap-function $plot2d (fun &optional range &rest ...
null
https://raw.githubusercontent.com/lokedhs/maxima-client/ed7175e3aa006101a832f9e29deb276ae7284234/src/maxima-plot.lisp
lisp
ELSE: Call into the old implementation 1- Put fun in its most general form: a maxima list with several objects that can be expressions (simple functions) and maxima lists (parametric functions or discrete sets of points). A single parametric or discrete plot is placed inside a maxima list If at this point fun is ...
(in-package :maxima) #+nil (maxima-client.common::wrap-function check-option-format (option) (if (eq (cadr option) '$clim) '$clim (funcall *OLD-FN-CHECK-OPTION-FORMAT* option))) #+nil (maxima-client.common::wrap-function $plot2d (fun &optional range &rest extra-options) (apply #'cplot2d fun range extr...
9df5257d935ec41b056912087be11ed95fd646fb7a4add33763d547e0429d6b3
emqx/ecql
ecql_types_tests.erl
%%%----------------------------------------------------------------------------- Copyright ( c ) 2015 eMQTT.IO , All Rights Reserved . %%% %%% Permission is hereby granted, free of charge, to any person obtaining a copy %%% of this software and associated documentation files (the "Software"), to deal in the Softwar...
null
https://raw.githubusercontent.com/emqx/ecql/f29d05fb8bdf1167877ec07ef7f0950f6feeab95/test/ecql_types_tests.erl
erlang
----------------------------------------------------------------------------- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnishe...
Copyright ( c ) 2015 eMQTT.IO , All Rights Reserved . in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF A...
35332c888aa24c28ccd50673d45abe63cef1e1e252d2359678457784ea1d681e
spawnfest/eep49ers
filename_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2017 . 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/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/test/filename_SUITE.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific l...
Copyright Ericsson AB 1997 - 2017 . 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(filename_SUITE). -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_...
07f2ee71dadede110869c1b825d9c8ba390a81408cc02493aec5a3be7a47734d
emaphis/HtDP2e-solutions
06_Programming_with_Structures.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname 06_Programming_with_Structures) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t construc...
null
https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/05-Adding-Structure/06_Programming_with_Structures.rkt
racket
about the language level of this file in a form that our tools can easily process. some data defininitions are obvious: A Posn1 is a structure: (make-posn1 Number Number) interpretation. a point x pixels from left, y from top clearly x,y are numbers An Entry is a structure: interpretation. a contact's name, pho...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname 06_Programming_with_Structures) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) HtDP 2e - 5 Adding Structure 5.6 Prog...
2fe04c92b863b383dc5dac13fbf55fd54548f47dbffdaadd406a8d0f941464e9
city41/reagent-breakout
logo_bg.cljs
(ns breakout.cmp.logo-bg) (defn cmp [label] [:div#title {:style {:position "relative" :background-image "url(img/bg_prerendered.png)" :width 320 :height 412}} [:div.logo {:style {:position "absolute" :background-image "url...
null
https://raw.githubusercontent.com/city41/reagent-breakout/84907d0cbc2d3cae917e30f955bc8e42fcb2d505/src/cljs/breakout/cmp/logo_bg.cljs
clojure
(ns breakout.cmp.logo-bg) (defn cmp [label] [:div#title {:style {:position "relative" :background-image "url(img/bg_prerendered.png)" :width 320 :height 412}} [:div.logo {:style {:position "absolute" :background-image "url...
674cb009e8a38f65033e611c36c4aa0060e0d2d3ddae8b9b0c043537be65214b
scalaris-team/scalaris
art_SUITE.erl
2010 - 2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software d...
null
https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/art_SUITE.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2010 - 2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > -module(art_SUITE). -author(''). -vsn('$Id$'). -compile(export_all). -include("scalaris.hrl"). -include("unittest....
e498703035c6db2698a3572dbc07422282a4d675d45c15c9ec9144cbf79bd9f4
UU-ComputerScience/uulib
MachineInterface.hs
# LANGUAGE MagicHash , UnboxedTuples # UnboxedTuples #-} module UU.Parsing.MachineInterface where import GHC.Prim | The ' InputState ' class contains the interface that the AnaParser -- parsers expect for the input. A minimal complete instance definition consists of ' splitStateE '...
null
https://raw.githubusercontent.com/UU-ComputerScience/uulib/68a5e661547908979545b493da3a55418ca5a6aa/src/UU/Parsing/MachineInterface.hs
haskell
parsers expect for the input. A minimal complete instance definition | Splits the state in a strict variant of 'Either', with 'Left'' if a symbol can be split off and 'Right'' if none can | Gets the current position in the input | Reports an error | Modify the state as the result of inserting a symbol 's' in th...
# LANGUAGE MagicHash , UnboxedTuples # UnboxedTuples #-} module UU.Parsing.MachineInterface where import GHC.Prim | The ' InputState ' class contains the interface that the AnaParser consists of ' splitStateE ' , ' splitState ' and ' ' . class InputState state s pos | state -> s, ...
108710c44763569182ab07dfc174f1ca218e46165762bfdb21c4d4625116c80f
tomferon/eventsourcing
Internal.hs
# LANGUAGE PatternSynonyms # # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleIns...
null
https://raw.githubusercontent.com/tomferon/eventsourcing/54bed807bf7700ec696cb16a041e1594702e7f63/eventsourcing/src/Database/CQRS/TabularData/Internal.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE RankNTypes # # LANGUAGE GADTs # | Kind of types that describe columns of a table. This is not intended as a type. It's promoted to a kind. do upserts and/or store tuples in memory with a hash map instead of a list. | A named tuple representing a row in the table. # OVERLAPP...
# LANGUAGE PatternSynonyms # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE FunctionalDependencies # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # # L...
8e4a209cceb218c8ba3c9fedd5948963dc2169fe003dac148511df218a1c4d61
avh4/elm-format
Cli.hs
# LANGUAGE DataKinds # module ElmFormat.Cli (mainIO, main, main') where import Prelude () import Relude hiding (exitFailure, exitSuccess, putStr, putStrLn) import AST.Module (Module) import AST.Structure import AST.V0_16 import CommandLine.Program (ProgramIO) import CommandLine.TransformFiles (TransformMode(..), Vali...
null
https://raw.githubusercontent.com/avh4/elm-format/63a81c4526c2c81bc77667599365fa4db933907c/src/ElmFormat/Cli.hs
haskell
# LANGUAGE DataKinds # module ElmFormat.Cli (mainIO, main, main') where import Prelude () import Relude hiding (exitFailure, exitSuccess, putStr, putStrLn) import AST.Module (Module) import AST.Structure import AST.V0_16 import CommandLine.Program (ProgramIO) import CommandLine.TransformFiles (TransformMode(..), Vali...
262512202ee75a6a8d43defe908c80dab3fda93f150bc9c90f0b5e62f88280b7
ghc/ghc
Types.hs
# LANGUAGE CPP , FlexibleInstances , OverloadedStrings # FlexibleInstances, OverloadedStrings #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.StgToJS.Rts.Apply Copyright : ( c ) The University of...
null
https://raw.githubusercontent.com/ghc/ghc/cc25d52e0f65d54c052908c7d91d5946342ab88a/compiler/GHC/StgToJS/Rts/Types.hs
haskell
--------------------------------------------------------------------------- | Module : GHC.StgToJS.Rts.Apply License : BSD-style (see the file LICENSE) Stability : experimental Types and utility functions used in the JS RTS. --------------------------------------------------------------------------...
# LANGUAGE CPP , FlexibleInstances , OverloadedStrings # FlexibleInstances, OverloadedStrings #-} Copyright : ( c ) The University of Glasgow 2001 Maintainer : < > Luite Stegeman < > > ...
798b440f3c1b663820e96c573e8c9ffc76804f069fedfec092d0cf94c10227f4
racketscript/racketscript
arithmatic.rkt
#lang racket/base (require "../test-utils.rkt") Division is not included in this test case ;; as semantics of numbers are not preserved (displayln (+ 1 2 3 4 5)) (displayln (- 1 2 3 4 5)) (displayln (* 1 2 3 4 5)) (displayln (/ 4 2)) (displayln (+ 2)) (displayln (- 2)) (displayln (- (- 2))) (displayln (* 2)) (dis...
null
https://raw.githubusercontent.com/racketscript/racketscript/0e2c0f6b8784a159e7b51c5506c69d34ecdebf0e/tests/basic/arithmatic.rkt
racket
as semantics of numbers are not preserved test multiple arities test bitwise operations -6
#lang racket/base (require "../test-utils.rkt") Division is not included in this test case (displayln (+ 1 2 3 4 5)) (displayln (- 1 2 3 4 5)) (displayln (* 1 2 3 4 5)) (displayln (/ 4 2)) (displayln (+ 2)) (displayln (- 2)) (displayln (- (- 2))) (displayln (* 2)) (displayln (< 1 2 3 4 5)) (displayln (> 1 2 3 4 5...
88e36ff927009e96d91c172b968a40fdf481f46a7f5e8f5422ee07e4b16ebc57
pqwy/ocb-stubblr
ocb_stubblr_topkg.mli
Copyright ( c ) 2016 . All rights reserved . See LICENSE.md . See LICENSE.md. *) * Hook up { ! } with [ topkg ] . open Topkg (** {1 Activating [ocb-stubblr]} *) val build_arg : Cmd.t * [ build_arg ] is the command - line parameter that needs to be passed to [ ocamlbuild ] in order to access { ! ...
null
https://raw.githubusercontent.com/pqwy/ocb-stubblr/34dcbede6b51327172a0a3d83ebba02843aca249/src-topkg/ocb_stubblr_topkg.mli
ocaml
* {1 Activating [ocb-stubblr]} * [build_cmd c os] is the default {!Topkg.build_cmd} extended with {{!build_arg}[build_arg]}. * [cmd c os files] is a full invocation of {{!build_cmd}[build_cmd]}.
Copyright ( c ) 2016 . All rights reserved . See LICENSE.md . See LICENSE.md. *) * Hook up { ! } with [ topkg ] . open Topkg val build_arg : Cmd.t * [ build_arg ] is the command - line parameter that needs to be passed to [ ocamlbuild ] in order to access { ! } inside [ myocamlbuild.ml ] . ...
dcca8cc3adf7c3e7e5f5196968db05324ddbef654241901557d25659ccfadeee
ghcjs/ghcjs-dom
SVGFEConvolveMatrixElement.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.SVGFEConvolveMatrixElement (pattern SVG_EDGEMODE_UNKNOWN, pattern SVG_EDGEMODE_DUPLICAT...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGFEConvolveMatrixElement.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/SVGFEConvolveMatrixElement.in1 Mozilla SVGFEConvolveMatrixElement.in1 documentation> | <-US/docs/Web/API/SVGFEConvolveMatrixElement.orderY Mozilla SVGFEConvolveMatrixElement.orderY documentation> | <-US...
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.SVGFEConvolveMatrixElement (pattern SVG_EDGEMODE_UNKNOWN, pattern SVG_EDGEMODE_DUPLICATE, pattern SVG_EDGEMODE_WRAP, pattern SVG_EDGEMODE_NONE, js_getIn1, getIn1, js_getO...
5933852767a5cf4a53ce925fc8b99ac751c461edc6d6c9c0dd7ba0b558545c52
biocad/math-grads
Paths.hs
-- | Module that provides functions for different kinds of path-finding in graph. -- module Math.Grads.Algo.Paths ( allPathsInGraph , allPathsFromVertex , dfsAllPaths , dfsSearch , findBeginnings ) where import Control.Monad (forM_) import Control.Monad.State (Stat...
null
https://raw.githubusercontent.com/biocad/math-grads/df7bdc48f86f57f3d011991c64188489e8d73bc1/src/Math/Grads/Algo/Paths.hs
haskell
| Module that provides functions for different kinds of path-finding in graph. | Calculates all branched paths in graph up to the given length. | Calculates all branched paths up to the given length from given vertex in graph considering indices of vertices that shouldn't be visited during path-finding. Graph ...
module Math.Grads.Algo.Paths ( allPathsInGraph , allPathsFromVertex , dfsAllPaths , dfsSearch , findBeginnings ) where import Control.Monad (forM_) import Control.Monad.State (State, execState) import Control.Monad.State.Class (get, modify) import ...
fe9e2f95edeb198480b9d187c39bd21ce955b0c9f8fd38e426445422d6c71884
google/mlir-hs
Vector.hs
Copyright 2021 Google LLC -- Licensed under the Apache License , Version 2.0 ( the " License " ) ; -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- -2.0 -- -- Unless required by applicable law or agreed to in writing, software distributed un...
null
https://raw.githubusercontent.com/google/mlir-hs/b464be8b3e782693849fc2476b5c124238687e71/src/MLIR/AST/Dialect/Vector.hs
haskell
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2021 Google LLC Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module MLIR.AST.Dialect.Vector ( module MLIR.AST.Dialect.Vector , module MLIR.AST.Dialect.Generated.Vector ) where import qualified Data.Map...
deb7507ec21b235f08512e0231639dd2c0d51fd01d34051d2bb6af6d2998c17a
ngrunwald/clj-spore
generator.clj
(ns clj-spore.test.generator (:use [clj-spore.generator] :reload) (:use [clojure.test])) (deftest params (testing "Missing Params" (is (= (check-missing-params ["foo" "bar"] {:foo 1 :bar 2 :baz 3}) '()) "None missing") (is (= (check-missing-params ["foo" "bar"] {:foo 1 :baz 3}) '("bar")) "bar missing")) ...
null
https://raw.githubusercontent.com/ngrunwald/clj-spore/20f88f09dedb68bb296f45330bbbb598554871b0/test/clj_spore/test/generator.clj
clojure
(ns clj-spore.test.generator (:use [clj-spore.generator] :reload) (:use [clojure.test])) (deftest params (testing "Missing Params" (is (= (check-missing-params ["foo" "bar"] {:foo 1 :bar 2 :baz 3}) '()) "None missing") (is (= (check-missing-params ["foo" "bar"] {:foo 1 :baz 3}) '("bar")) "bar missing")) ...
513af5906abc1b72545c6c68adb931c661fc0406d871ecb799097947e842d335
puppetlabs/puppetdb
jdbc.clj
(ns puppetlabs.puppetdb.jdbc "Database utilities" (:require [clojure.java.jdbc :as sql] [clojure.string :as str] [clojure.tools.logging :as log] [honey.sql :as hsql] [puppetlabs.kitchensink.core :as kitchensink] [puppetlabs.puppetdb.time :as pl-time] ...
null
https://raw.githubusercontent.com/puppetlabs/puppetdb/ef929079ae4750ebc6740bcc68369fdee90b6ef0/src/puppetlabs/puppetdb/jdbc.clj
clojure
END STOLEN FUNCTIONS rows or values sequence, bypass it here if either of those are empty Cancel the current query Cancel the current query #ARRAYS-INPUT -syntax-lexical.html#SQL-SYNTAX-CONSTANTS #ARRAYS-INPUT Q: move/replace? still used by the legacy query engines and should be removed once it is canceled sh...
(ns puppetlabs.puppetdb.jdbc "Database utilities" (:require [clojure.java.jdbc :as sql] [clojure.string :as str] [clojure.tools.logging :as log] [honey.sql :as hsql] [puppetlabs.kitchensink.core :as kitchensink] [puppetlabs.puppetdb.time :as pl-time] ...
bd5e060bdc25e6a9b95ac0968249ea4cbd65cd2b1e1828ecb1a8dffa74be8dd0
Shirakumo/trial
upload.lisp
(in-package #:org.shirakumo.fraf.trial.release) ( setf dexador:*use - connection - pool * NIL ) (defmethod upload ((service (eql :ftp)) &key (release (release)) (bundles (config :ftp :bundles)) (user (config :ftp :user)) (port (config :ftp :port)) (hostname (config :ftp :hostname)) (password (config :ftp :password)) ...
null
https://raw.githubusercontent.com/Shirakumo/trial/c4882a4526b91ef700270b29702d723f98ff5817/release/upload.lisp
lisp
(in-package #:org.shirakumo.fraf.trial.release) ( setf dexador:*use - connection - pool * NIL ) (defmethod upload ((service (eql :ftp)) &key (release (release)) (bundles (config :ftp :bundles)) (user (config :ftp :user)) (port (config :ftp :port)) (hostname (config :ftp :hostname)) (password (config :ftp :password)) ...
9bb5926b61fce13e3286b3d97e1d60b89088f29c63ca0241ed9a215f82365001
robstewart57/hdph-rs
Deque.hs
-- Doubly-ended queue (deque) with size and max size -- Author : ------------------------------------------------------------------------------- module Control.Parallel.HdpH.Internal.Data.Deque ( -- * functional deque Deque, -- no instances : : a fromList, -- :: [a] -> Deque a : : a - > ...
null
https://raw.githubusercontent.com/robstewart57/hdph-rs/5074e7de02ec13707361b1c117fa25c8a796b59e/src/Control/Parallel/HdpH/Internal/Data/Deque.hs
haskell
Doubly-ended queue (deque) with size and max size ----------------------------------------------------------------------------- * functional deque no instances :: [a] -> Deque a * stateful, concurrently accessible deque no instances :: IO (DequeIO a) :: [a] -> IO (DequeIO a) :: DequeIO a -> a -> IO () :: Deq...
Author : module Control.Parallel.HdpH.Internal.Data.Deque : : a : : a - > a - > Deque a : : a - > a - > Deque a : : a - > ( Maybe a , a ) : : a - > ( Maybe a , a ) : : a - > Maybe a : : a - > Maybe a : : a - > Bool : : Int : : Int ) where import Prelude hiding (error, last...
dfd17f623e7c81e674419cff7fa8a0c9b6f9b272dde2f86acf4c6adc2d6588a9
kupl/FixML
sub23.ml
let rec max : int list -> int = fun lst -> match lst with | [] -> 0 | hd::tl -> let getmax x y = if x > y then x else y in getmax hd (max tl);;
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/maxmin/maxmin/submissions/sub23.ml
ocaml
let rec max : int list -> int = fun lst -> match lst with | [] -> 0 | hd::tl -> let getmax x y = if x > y then x else y in getmax hd (max tl);;
3a6d38bd0c7a6f52e327d2ae9c0bfc9a119e3b26bfc3b36a0b5f2435f55de211
kadena-io/pact
Translate.hs
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} #if __GLASGOW_HASKELL__ >= 810 # options_ghc -fmax - pmcheck - models=100000000 # #else # options_ghc -fmax - pmcheck - iterations=100000000 # #endif module Analyze.Tr...
null
https://raw.githubusercontent.com/kadena-io/pact/44d5ba03508768d5b93ba7c395059b0c04eebd47/tests/Analyze/Translate.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # core terms: term-specific terms: Some SBool (NameAuthorized x) Some ty (Sequence etm tm) -> do t1 <- toPactTm etm t2 <- toPactTm (Some ty tm) Some ty (Let name _vid etm bodyTm) -> do t1 <- toPactTm etm t2 <- toPactTm (Some ty bodyTm) ...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # #if __GLASGOW_HASKELL__ >= 810 # options_ghc -fmax - pmcheck - models=100000000 # #else # options_ghc -fmax - pmcheck - iterations=100000000 # #endif module Analyze.Translate where import Control.Lens hiding (op, ...
9cac4218ee4ac1e692489d39484a9ee104aa191bb305d36031f776b89a9d4c5d
returntocorp/semgrep
dots_nested_stmts.ml
(* ERROR: *) let foo = if x = 1 then 2 else 2
null
https://raw.githubusercontent.com/returntocorp/semgrep/8c379c2c73b4ece1b1316655b00e21a8af3f00bb/tests/patterns/ocaml/dots_nested_stmts.ml
ocaml
ERROR:
let foo = if x = 1 then 2 else 2
a14114c05f72d1b7d0e42ac007634f04cb3d5c4a3d6636bf29b0c1496a47bc43
den1k/vimsical
handlers.cljc
(ns vimsical.frontend.player.handlers (:require [re-frame.core :as re-frame] [vimsical.frontend.util.re-frame :as util.re-frame] [vimsical.vcs.core :as vcs] [vimsical.frontend.vcs.subs :as vcs.subs] [vimsical.frontend.timeline.ui-db :as timeline.ui-db] [vims...
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/frontend/vimsical/frontend/player/handlers.cljc
clojure
(ns vimsical.frontend.player.handlers (:require [re-frame.core :as re-frame] [vimsical.frontend.util.re-frame :as util.re-frame] [vimsical.vcs.core :as vcs] [vimsical.frontend.vcs.subs :as vcs.subs] [vimsical.frontend.timeline.ui-db :as timeline.ui-db] [vims...
514054e587b2a866e3b116d77f4921f75316ae4632c593933ba50924b593a7b0
hmage/mp3packer
mp3info_test.ml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is a part of mp3packer . is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as publi...
null
https://raw.githubusercontent.com/hmage/mp3packer/2afb10dd0451da7359a10e147fd10cd41c1ce5e7/mp3info_test.ml
ocaml
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is a part of mp3packer . is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as publi...
ec72564577d1b532f4b96f3ab6f06ba72f888cc958cd81837a6cc071bf404d50
vbrankov/opencl-ocaml
matrix_mult_nvidia.ml
open Bigarray let program_source = " /* Matrix multiplication: C = A * B. * Device code. */ #define BLOCK_SIZE 16 #define AS(i, j) As[j + i * BLOCK_SIZE] #define BS(i, j) Bs[j + i * BLOCK_SIZE] /////////////////////////////////////////////////////////////////////////////// //! Matrix multiplication on ...
null
https://raw.githubusercontent.com/vbrankov/opencl-ocaml/bbfe6b6353e2d508363b8e22e15dd8f3656c88f5/examples/matrix_mult_nvidia.ml
ocaml
open Bigarray let program_source = " /* Matrix multiplication: C = A * B. * Device code. */ #define BLOCK_SIZE 16 #define AS(i, j) As[j + i * BLOCK_SIZE] #define BS(i, j) Bs[j + i * BLOCK_SIZE] /////////////////////////////////////////////////////////////////////////////// //! Matrix multiplication on ...
cfeb1feee54955c238d9142c94dffd00fd280c30da23922f6b44eb88cbbef790
grin-compiler/ghc-wpc-sample-programs
Signature.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE NondecreasingIndentation # # LANGUAGE TypeFamilies # module Agda.TypeChecking.Monad.Signature where import Prelude hiding (null) import qualified Control.Monad.Fail as Fail import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer import Control...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/TypeChecking/Monad/Signature.hs
haskell
# LANGUAGE BangPatterns # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE # | Add a constant to the signature. Lifts the definition to top level. if the record value is part of the telescope, its hiding should left unchanged | Set termination info of a defined function symbol. | Set CompiledCla...
# LANGUAGE NondecreasingIndentation # # LANGUAGE TypeFamilies # module Agda.TypeChecking.Monad.Signature where import Prelude hiding (null) import qualified Control.Monad.Fail as Fail import Control.Monad.State import Control.Monad.Reader import Control.Monad.Writer import Control.Monad.Trans.Maybe import Control.M...
1a11e77ea2f5ec03133c7f452bf450eac51fc415c762618fb2c45d27a4d2e334
hanshuebner/vlm
stacklis.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : POWERPC - INTERNALS ; Base : 10 ; Lowercase : T -*- (in-package "POWERPC-INTERNALS") ;;; This file is intended to provide a clean interface to the stack. ;;; this way, it is hoped that we can experiment with the stack implementation. With these primitives , VMA...
null
https://raw.githubusercontent.com/hanshuebner/vlm/20510ddc98b52252a406012a50a4d3bbd1b75dd0/g5-emulator/stacklis.lisp
lisp
Syntax : Common - Lisp ; Package : POWERPC - INTERNALS ; Base : 10 ; Lowercase : T -*- This file is intended to provide a clean interface to the stack. this way, it is hoped that we can experiment with the stack implementation. For backwards compatibility, we let all the stack ops take an optional comment plus key...
(in-package "POWERPC-INTERNALS") With these primitives , VMA is always a pointer within the stackcache , and read / write is always to the stackcache and NOT to main memory . (defun process-stack-options (options) (if (lisp:or (null options) (stringp (first options)) (null (first options))) options ...
1d251b4e7846e2d225d527adacf4e1b57320ae9c9277b99afcad1031774948a0
thelema/ocaml-community
odoc_ast.ml
(***********************************************************************) (* *) (* OCamldoc *) (* *) , projet ...
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/ocamldoc/odoc_ast.ml
ocaml
********************************************************************* OCamldoc ...
, projet Cristal , INRIA Rocquencourt Copyright 2001 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Misc open Asttypes open Types open Ty...
a48f96962e48e8f9461c63288b2cf1a389653a8608c4592534fbc19654cd0450
nonguix/nonguix
benchmark.scm
SPDX - License - Identifier : GPL-3.0 - or - later Copyright © 2021 - 2022 Petr Hodina < > (define-module (nongnu packages benchmark) #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (gnu packages gcc) #:use-module (guix gexp) #:use-module (guix download) #:use-module (nongui...
null
https://raw.githubusercontent.com/nonguix/nonguix/71252d2d9d1908a1f1b005d2025b0907d5d5c377/nongnu/packages/benchmark.scm
scheme
TODO: For some reason it fails validate-runpath
SPDX - License - Identifier : GPL-3.0 - or - later Copyright © 2021 - 2022 Petr Hodina < > (define-module (nongnu packages benchmark) #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (gnu packages gcc) #:use-module (guix gexp) #:use-module (guix download) #:use-module (nongui...
e825b832fc5ae63bc35869d6681a58411fb246431e15295e5507613980401b8a
PeterDWhite/Osker
TCBPool.hs
Copyright ( c ) , 2001 , 2002 , 2003 Copyright ( c ) OHSU , 2001 , 2002 , 2003 module TCBPool ( TCBPool ) where ---------------------------------------------------------------------- -- The partitioned state for the kernel core ---------------------------------------------------------------------- Osker impo...
null
https://raw.githubusercontent.com/PeterDWhite/Osker/301e1185f7c08c62c2929171cc0469a159ea802f/Kernel/Message/TCBPool.hs
haskell
-------------------------------------------------------------------- The partitioned state for the kernel core --------------------------------------------------------------------
Copyright ( c ) , 2001 , 2002 , 2003 Copyright ( c ) OHSU , 2001 , 2002 , 2003 module TCBPool ( TCBPool ) where Osker imports import qualified OskerPool as OP import qualified TimerControlBlock as TCB type TCBPool = OP.OskerPool TCB.TimerControlBlock
ee982dd615eb0f5ab8ccee95ccfe15eb3681c3c7cd98901ed69e82c9129f12a4
mariari/Misc-ML-Scripts
lenses.hs
# LANGUAGE DeriveGeneric # import qualified Data.Text as T import qualified Data.Aeson as JSON import GHC.Generics import qualified Data.HashTable.IO as H import Control.Concurrent.STM import Data.Monoid import Control.Monad.IO.Class import Control.Concur...
null
https://raw.githubusercontent.com/mariari/Misc-ML-Scripts/d18aecf539c2d2ccf7ba9eb796f90e3ca809f5bf/Haskell/lenses.hs
haskell
- TYPES ------------------------------------------------------------------------------------- - DATA STRUCTURES --------------------------------------------------------------------------- Stores the Hash Information per channel Generates GlobalState about the same channel
# LANGUAGE DeriveGeneric # import qualified Data.Text as T import qualified Data.Aeson as JSON import GHC.Generics import qualified Data.HashTable.IO as H import Control.Concurrent.STM import Data.Monoid import Control.Monad.IO.Class import Control.Concur...
c9ee25ed6962e72ec5f4d893b95cbba58fc081aba244abdc91dd002660c83edd
mainland/nikola
NikolaV1.hs
{-# LANGUAGe BangPatterns #-} # LANGUAGE ScopedTypeVariables # {-# LANGUAGe TemplateHaskell #-} module Mandelbrot.NikolaV1 (mandelbrotImage) where import Data.Array.Nikola.Backend.CUDA.TH (compile) import Data.Array.Repa import Data.Array.Repa.Repr.ForeignPtr import Data.Array.Repa.Repr.UnboxedForeign import Data.Arr...
null
https://raw.githubusercontent.com/mainland/nikola/d86398888c0a76f8ad1556a269a708de9dd92644/examples/mandelbrot/Mandelbrot/NikolaV1.hs
haskell
# LANGUAGe BangPatterns # # LANGUAGe TemplateHaskell #
# LANGUAGE ScopedTypeVariables # module Mandelbrot.NikolaV1 (mandelbrotImage) where import Data.Array.Nikola.Backend.CUDA.TH (compile) import Data.Array.Repa import Data.Array.Repa.Repr.ForeignPtr import Data.Array.Repa.Repr.UnboxedForeign import Data.Array.Repa.Repr.CUDA.UnboxedForeign import qualified Data.Vector.U...
87e4e69d8b5890fdbc9a048127b3bf73fe2147c6adba1529e4c1cabf2e75b698
spurious/sagittarius-scheme-mirror
inquiry.scm
-*- mode : scheme ; coding : utf-8 ; -*- ;;; ;;; inquiry.scm - R7RS large (scheme inquiry) ;;; Copyright ( c ) 2010 - 2013 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;;...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/scheme/inquiry.scm
scheme
coding : utf-8 ; -*- inquiry.scm - R7RS large (scheme inquiry) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this lis...
Copyright ( c ) 2010 - 2013 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING (library (scheme inquiry) (export :all) ...
bc02478eaf1926ec61a746e906a497ec299ff09a863d4f4d513889d6dc1eb649
JeffreyBenjaminBrown/hode
Binary.hs
module Hode.Rslt.Binary where -- | * Used in sorting and transitive searches, for binary `Tplt`s. -- | The direction in which to run a search. " Left " and " right " are defined by the binary ` ` : the first member is on the left , the second member on the right . data SearchDir = SearchLeftward | SearchRightwa...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/7e94994494cf512164b07b540e795e55548aec84/hode/Hode/Rslt/Binary.hs
haskell
| * Used in sorting and transitive searches, for binary `Tplt`s. | The direction in which to run a search. For instance, if a sort on the relation `_ #needs _` then the neediest things will be at the top of the screen, and the most-needed at the bottom.
module Hode.Rslt.Binary where " Left " and " right " are defined by the binary ` ` : the first member is on the left , the second member on the right . data SearchDir = SearchLeftward | SearchRightward deriving (Show, Eq, Ord) data BinMember = LeftMember | RightMember deriving (Show, Eq, Ord) | Describe...
fbfaa6879d433cf3509e57fb817736bc41537ae52d0604adc3327ebc6d9d5ec3
dbuenzli/bos
watch.ml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The bos programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2...
null
https://raw.githubusercontent.com/dbuenzli/bos/fcc5d5a5f05ae0e75c231bf847313c4b9b030b21/test/watch.ml
ocaml
returns list of (path, modification time)
--------------------------------------------------------------------------- Copyright ( c ) 2015 The bos programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2...
a99145aeaff4af199dcc19a879fb5ecd74bea218c0aded24f42a867d6fa106c6
mbutterick/beautiful-racket
factorial.rkt
#lang reader "reader.rkt" >++++++++++>>>+>+[>>>+[-[<<<<<[+<<<<<]>>[[-]>[<<+>+>-] <[>+<-]<[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<- [>[-]>>>>+>+<<<<<<-[>+<-]]]]]]]]]]]>[<+>-]+>>>>>]<<<<< [<<<<<]>>>>>>>[>>>>>]++[-<<<<<]>>>>>>-]+>>>>>]<[>++<-] <<<<[<[>+<-]<<<<]>>[->[-]++++++[<++++++++>-]>>>>]<<<<< [<[>+>+<<-]>.<<<<<]>...
null
https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/bf-demo/factorial.rkt
racket
#lang reader "reader.rkt" >++++++++++>>>+>+[>>>+[-[<<<<<[+<<<<<]>>[[-]>[<<+>+>-] <[>+<-]<[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<-[>+<- [>[-]>>>>+>+<<<<<<-[>+<-]]]]]]]]]]]>[<+>-]+>>>>>]<<<<< [<<<<<]>>>>>>>[>>>>>]++[-<<<<<]>>>>>>-]+>>>>>]<[>++<-] <<<<[<[>+<-]<<<<]>>[->[-]++++++[<++++++++>-]>>>>]<<<<< [<[>+>+<<-]>.<<<<<]>...
fff2577182ea215067ef864fb5cf42ea85ff6e11703ad4744067972129a19797
SRI-CSL/f3d
sysdef-ev-pathnames.lisp
(in-package :cl) #+sbcl (defpackage :lisp (:use "COMMON-LISP") (:export load open probe-file delete-file truename dribble file-author file-write-date cd ensure-directories-exist rename-file compile-file)) (in-package :system-tool) (defpackage :ev-pathnames (:use :common-lisp ) (:nicknames :evp) (:i...
null
https://raw.githubusercontent.com/SRI-CSL/f3d/93285f582198bfbab33ca96ff71efda539b1bec7/f3d-core/system-tool/sysdef-ev-pathnames.lisp
lisp
"EV-PATHNAME-REGISTER"
(in-package :cl) #+sbcl (defpackage :lisp (:use "COMMON-LISP") (:export load open probe-file delete-file truename dribble file-author file-write-date cd ensure-directories-exist rename-file compile-file)) (in-package :system-tool) (defpackage :ev-pathnames (:use :common-lisp ) (:nicknames :evp) (:i...
8fe5f302d00694c76964d706af380ca932464b4ee21459011f3297f696feb866
zw/PoLtree
s11n.clj
; An implementation of (the proof-of-inclusion-in-liabilities part of) gmaxwell 's proof - of - reserves-(non)fractionality system , as described at ; <-bitcoin-reserves>. ; Copyright 2014 . 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 dis...
null
https://raw.githubusercontent.com/zw/PoLtree/3ec526ecadc5db1df0bc2427016d7047fb7f7dbd/src/uk/me/iwilcox/poltree/s11n.clj
clojure
An implementation of (the proof-of-inclusion-in-liabilities part of) <-bitcoin-reserves>. of <-of-liabilities>. This does NOT complain if you feed it balances with excessive numbers of decimal places for the currency. Helpers FIXME: could do more validation but at the moment it's a test format only and the...
gmaxwell 's proof - of - reserves-(non)fractionality system , as described at Copyright 2014 . 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 /. Serialisation to / from formats described...
4d56f7e815b1c915843c887b3f595ce7bf32c0bb1bf3888022d3aa9cf256453c
marick/fp-oo
add-and-make-2a.clj
Exercise 2 This version would not work with Triangle because it requires exactly two arguments (def make (fn [type arg1 arg2] (type arg1 arg2))) (prn (make Point 1 2))
null
https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/solutions/pieces/add-and-make-2a.clj
clojure
Exercise 2 This version would not work with Triangle because it requires exactly two arguments (def make (fn [type arg1 arg2] (type arg1 arg2))) (prn (make Point 1 2))
e650d45c618a49879c1ae55a06d69fa43f05b17bfc57a6d1d0c9876dc33b0a0e
mirage/mirage-lambda
main.ml
Generated by mirage configure --net = socket ( We d , 18 Jul 2018 13:48:14 GMT ) . open Lwt.Infix let return = Lwt.return let run = OS.Main.run let _ = Printexc.record_backtrace true module Unikernel1 = Unikernel.Main(Block)(Tcpip_stack_socket) module Mirage_logs1 = Mirage_logs.Make(Pclock) let tcpv4_socket11 = ...
null
https://raw.githubusercontent.com/mirage/mirage-lambda/a89b265b552f8b63ff725fc942f41a276fabb4f5/mirage/main.ml
ocaml
Generated by mirage configure --net = socket ( We d , 18 Jul 2018 13:48:14 GMT ) . open Lwt.Infix let return = Lwt.return let run = OS.Main.run let _ = Printexc.record_backtrace true module Unikernel1 = Unikernel.Main(Block)(Tcpip_stack_socket) module Mirage_logs1 = Mirage_logs.Make(Pclock) let tcpv4_socket11 = ...
f743d78f988ea7c40071c6eb9a563c22d911a170bc28e0cb29b06ed0bad5fcf3
cstar/ejabberd-old
ejabberd_admin.erl
%%%------------------------------------------------------------------- %%% File : ejabberd_admin.erl Author : < > %%% Purpose : Administrative functions and commands Created : 7 May 2006 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne %%% %%% This program is free software; you can...
null
https://raw.githubusercontent.com/cstar/ejabberd-old/559f8b6b0a935710fe93e9afacb4270d6d6ea00f/src/ejabberd_admin.erl
erlang
------------------------------------------------------------------- File : ejabberd_admin.erl Purpose : Administrative functions and commands This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be ...
Author : < > Created : 7 May 2006 by < > ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License Found...
2171ca27b90d2fb276dd5ecd98203235e78e73fd2cdb1e5e4f4fa77e2af897ab
sharetribe/dumpr
stream.clj
(ns dumpr.stream "Transformations for the stream of parsed binlog events." (:require [clojure.core.async :as async :refer [go go-loop <! >! thread chan]] [schema.core :as s] [dumpr.table-schema :as table-schema] [clojure.tools.logging :as log] [manifold.stream] ...
null
https://raw.githubusercontent.com/sharetribe/dumpr/c7d23ef44f175b467e39811b1ba2791ff54b64c9/src/dumpr/stream.clj
clojure
Delay table-map events Return [table-map op] as pair Wrap op
(ns dumpr.stream "Transformations for the stream of parsed binlog events." (:require [clojure.core.async :as async :refer [go go-loop <! >! thread chan]] [schema.core :as s] [dumpr.table-schema :as table-schema] [clojure.tools.logging :as log] [manifold.stream] ...
5f65ed198f9adefd663919978d97665c40b75ea6f4697a4d16a53bd58d90ba65
jhidding/lyonesse
foreign-structs.scm
(library (lyonesse foreign-structs) (export define-foreign-struct) (import (rnrs base (6)) (rnrs syntax-case (6)) (only (chezscheme) define-ftype ftype-ref trace-define-syntax)) (define-syntax define-foreign-struct (lambda (x) Define a new symbol , code from TSPL Chapter 8 . (defi...
null
https://raw.githubusercontent.com/jhidding/lyonesse/9d9624e3141ea3acaa670526cbe52c2d6546beef/lyonesse/foreign-structs.scm
scheme
Define the names of member access functions.
(library (lyonesse foreign-structs) (export define-foreign-struct) (import (rnrs base (6)) (rnrs syntax-case (6)) (only (chezscheme) define-ftype ftype-ref trace-define-syntax)) (define-syntax define-foreign-struct (lambda (x) Define a new symbol , code from TSPL Chapter 8 . (defi...
e7993f27c9ea3b6c2d1280a180c98780c8197f50e82bc8eb8057f86ec9b70b2e
patricoferris/ocaml-multicore-monorepo
xor.ml
module Nat = struct include Nativeint let ( lxor ) = Nativeint.logxor end module type BUFFER = sig type t val length : t -> int val sub : t -> int -> int -> t val copy : t -> t val benat_to_cpu : t -> int -> nativeint val cpu_to_benat : t -> int -> nativeint -> unit end let imin (a : int) (b : i...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/digestif/src-ocaml/xor.ml
ocaml
module Nat = struct include Nativeint let ( lxor ) = Nativeint.logxor end module type BUFFER = sig type t val length : t -> int val sub : t -> int -> int -> t val copy : t -> t val benat_to_cpu : t -> int -> nativeint val cpu_to_benat : t -> int -> nativeint -> unit end let imin (a : int) (b : i...
e51ff88003dd83ee82bb83b4e51bcc2ce497a0cc802cd3e974d63a3d70aa6dcc
haskell-opengl/OpenGLRaw
PointSprite.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.NV.PointSprite Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- ---------------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/NV/PointSprite.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.NV.PointSprite License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums * Functions
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.NV.PointSprite ( glGetNVPointSprite, gl_NV_point_sprite, pattern GL_COORD_REPLACE_NV, pattern GL_POINT_SPRITE_NV, pattern GL_POINT_SPRITE_R_MODE_NV, glPointParameteriNV, glPointParameterivNV ) where ...
5bce55607323f0bcba26d9355ac48b20d7529e1a4a2c8c50cbaea73953e5f47d
pauleve/pint
ph_useropts.ml
open Ph_types;; let initial_procs = ref PSet.empty;; let autoinit = ref (None : bool option);;
null
https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/phlib/ph_useropts.ml
ocaml
open Ph_types;; let initial_procs = ref PSet.empty;; let autoinit = ref (None : bool option);;
efdd4451bfd1b18da7c7e21921646383464ab32b1227ffb171de72d9f2e92992
brendanhay/amazonka
GetInsightEvents.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/GetInsightEvents.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated X-Ray reevaluates insights periodically until they\'re resolved, and records each intermediate state as an event. You can review an X-Ray console. * Creating a Request * Request Lenses * Destructuring the Response * Response...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
425275fcc39199d5cd6f04fe654270864de93928c1a594bd643bd6481d4ebfe7
dnadales/sandbox
EchoTVarWrong.hs
-- | WRONG Echo implementation using transactional variables. module EchoTVarWrong (mkEchoTVarWrong) where import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TVar (TVar, newTVarIO, readTVarIO, writeTVar) import Ech...
null
https://raw.githubusercontent.com/dnadales/sandbox/401c4f0fac5f8044fb6e2e443bacddce6f135b4b/hedgehog-sm-echo/src/EchoTVarWrong.hs
haskell
| WRONG Echo implementation using transactional variables. | Input a string. Returns 'True' iff the buffer was empty and the given string was added to it. | Output the buffer contents. | Reset the environment
module EchoTVarWrong (mkEchoTVarWrong) where import Control.Concurrent.STM (atomically) import Control.Concurrent.STM.TVar (TVar, newTVarIO, readTVarIO, writeTVar) import Echo (Echo, input, output, reset) newtype...
3173423c2485d13a0d9c4629007fbd911e60427197a1a2d1ba388356156cc254
mbutterick/typesetting
pdftest.rkt
#lang racket/base (require (for-syntax racket/base) "core.rkt" racket/class racket/string br/define "check-pdf.rkt") (provide check-copy-equal? check-pdfkit? make-doc check-font-subsets-equal?) (test-mode #t) (require rackunit pitfall/pdf pitfall/vector pitfall/color pitfall/text pitfall/font pitfall/ima...
null
https://raw.githubusercontent.com/mbutterick/typesetting/6f7a8bbc422a64d3a54cbbbd78801a01410f5c92/pitfall/pitfall/pdftest.rkt
racket
#lang racket/base (require (for-syntax racket/base) "core.rkt" racket/class racket/string br/define "check-pdf.rkt") (provide check-copy-equal? check-pdfkit? make-doc check-font-subsets-equal?) (test-mode #t) (require rackunit pitfall/pdf pitfall/vector pitfall/color pitfall/text pitfall/font pitfall/ima...
7b27d4bc5bdd1def9e93e4e593de4d85a83d3d7fb13ce1b83d74dddc994904aa
yqrashawn/GokuRakuJoudo
core_test.clj
(ns karabiner-configurator.core-test (:require [clojure.test :as t] [karabiner-configurator.core :as sut] [karabiner-configurator.data :refer [init-conf-data]] [karabiner-configurator.misc :refer [load-edn load-result-edn]])) (def vi-mode-example (load-edn "resources/configuration...
null
https://raw.githubusercontent.com/yqrashawn/GokuRakuJoudo/2295ee42923d439ec5c60bb9ff1655becfad273d/test/karabiner_configurator/core_test.clj
clojure
(ns karabiner-configurator.core-test (:require [clojure.test :as t] [karabiner-configurator.core :as sut] [karabiner-configurator.data :refer [init-conf-data]] [karabiner-configurator.misc :refer [load-edn load-result-edn]])) (def vi-mode-example (load-edn "resources/configuration...
eaec20ddf71f620fead1db92763ccf6b07dff404955f0a4eeb024b1c07c8b1dd
racket/math
strictness-memory-leak-test.rkt
#lang racket (require math/array rackunit) ;; Make a procedure that returns a random value to keep the optimizer from converting it to a ;; top-level, non-closure; if that happens, the module keeps a reference to it, which makes this ;; test always fail (define bx (make-weak-box (let ([v (random)]) (λ (js) ...
null
https://raw.githubusercontent.com/racket/math/dcd2ea1893dc5b45b26c8312997917a15fcd1c4a/math-test/math/tests/strictness-memory-leak-test.rkt
racket
Make a procedure that returns a random value to keep the optimizer from converting it to a top-level, non-closure; if that happens, the module keeps a reference to it, which makes this test always fail Making `arr' strict should release the only remaining reference to the contents of `bx'
#lang racket (require math/array rackunit) (define bx (make-weak-box (let ([v (random)]) (λ (js) v)))) (define arr (build-array #() (weak-box-value bx))) (array-strict! arr) (collect-garbage) (check-false (weak-box-value bx))
1247a1f08e2a06c2d1b776f8e5fd8f8b63922cf5be2bc736bd1c2191b39f855f
bobatkey/CS316-2020
Ex1.hs
# OPTIONS_GHC -fwarn - incomplete - patterns # module Ex1 where import Prelude hiding (words) import qualified Prelude as P {----------------------------------------------------------------------} ( 2020/21 ) EXERCISE 1 : FIRST - ORDER PROGRAMMING {---------------------------------------------------...
null
https://raw.githubusercontent.com/bobatkey/CS316-2020/21d9edca6445d4287697cad0523ffae6a5b51f23/exercises/Ex1.hs
haskell
-------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- -------------------------------------------------------------------- HINT: 'splitOnHelper' works by gathering el...
# OPTIONS_GHC -fwarn - incomplete - patterns # module Ex1 where import Prelude hiding (words) import qualified Prelude as P ( 2020/21 ) EXERCISE 1 : FIRST - ORDER PROGRAMMING Please read this file carefully . Questions are numbered 1.X.Y and usually consist of unfinished definitions that you...