_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 |
|---|---|---|---|---|---|---|---|---|
f54bd6b92377e033d5121d69268b3f79a9e911410dbfb49a92a873c9c9077ad0 | nikodemus/SBCL | pack.lisp | ;;;; This file contains the implementation-independent code for Pack
phase in the compiler . Pack is responsible for assigning TNs to
;;;; storage allocations or "register allocation".
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/compiler/pack.lisp | lisp | This file contains the implementation-independent code for Pack
storage allocations or "register allocation".
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
for debugging: some parameters ... | phase in the compiler . Pack is responsible for assigning TNs to
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!C")
(defvar *pack-assign-costs* t)
(defva... |
52a516c86da3c474f6b382168556813cef707f291fa23eabe219c9a2d7202507 | facebookarchive/pfff | alias_type.ml | type list2 = int list
type use_list2 =
| Constructor of list2
let f = function
| Constructor [] -> 1
| _ -> 2
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/tests/ml/cmt/alias_type.ml | ocaml | type list2 = int list
type use_list2 =
| Constructor of list2
let f = function
| Constructor [] -> 1
| _ -> 2
| |
122e4261439e84ae48a832a50da7b4d171b7fa333941300bdfc4f5bb5cb874a9 | roman01la/clojurescript-workshop | assignment.cljs | Develop Clojure 's data to JSON converter
;; which handles strings, numbers, booleans, keywords and vectors
;; using protocols
;; test
(to-json [:keyword "string" 1 true false [:nested [:vector]]])
" [ \"keyword\ " , \"string\ " , 1 , true , false , [ \"nested\ " , [ \"vector\ " ] ] ] "
| null | https://raw.githubusercontent.com/roman01la/clojurescript-workshop/48b02266d65cae8113edd4ce34c4ab282ad256d1/11.protocols_and_named_data_types/assignment.cljs | clojure | which handles strings, numbers, booleans, keywords and vectors
using protocols
test | Develop Clojure 's data to JSON converter
(to-json [:keyword "string" 1 true false [:nested [:vector]]])
" [ \"keyword\ " , \"string\ " , 1 , true , false , [ \"nested\ " , [ \"vector\ " ] ] ] "
|
da765f091f30ed9e05b8f5eea55d89651101fdcf3a6c6728040f804e63f5d0cf | dotemacs/pdfboxing | common.clj | (ns pdfboxing.common
(:require [clojure.java.io :as io])
(:import (java.io File)
(org.apache.pdfbox.pdmodel PDDocument)
(org.apache.pdfbox.io RandomAccessFile)
(org.apache.pdfbox.pdfparser PDFParser)))
(defn try-get-as-pdf
"Try and get the pdf-file-or-path as a PDF.
Returns nil... | null | https://raw.githubusercontent.com/dotemacs/pdfboxing/3dafff7102d99df072b09626c9349ba3a9719bf6/src/pdfboxing/common.clj | clojure | (ns pdfboxing.common
(:require [clojure.java.io :as io])
(:import (java.io File)
(org.apache.pdfbox.pdmodel PDDocument)
(org.apache.pdfbox.io RandomAccessFile)
(org.apache.pdfbox.pdfparser PDFParser)))
(defn try-get-as-pdf
"Try and get the pdf-file-or-path as a PDF.
Returns nil... | |
59f8ced7588d2f5ce2db459e3ed98a82197241e56c45efefbdd439d5cb5b2a53 | lspitzner/exference | MonadLoops.hs | module Control.Monad.Loops where
whileM : : Control . Monad . Monad m = > m Data . Bool . m a - > m [ a ]
whileM' :: (Control.Monad.Monad m, Control.Monad.MonadPlus f) => m Data.Bool.Bool -> m a -> m (f a)
iterateWhile :: Control.Monad.Monad m => (a -> Bool) -> m a -> m a
-- this is evil, prove-wise
iterateM... | null | https://raw.githubusercontent.com/lspitzner/exference/d8a336f8b9df905e54173339f78ba892daa3f688/environment/MonadLoops.hs | haskell | this is evil, prove-wise
this is evil, in it discards results | module Control.Monad.Loops where
whileM : : Control . Monad . Monad m = > m Data . Bool . m a - > m [ a ]
whileM' :: (Control.Monad.Monad m, Control.Monad.MonadPlus f) => m Data.Bool.Bool -> m a -> m (f a)
iterateWhile :: Control.Monad.Monad m => (a -> Bool) -> m a -> m a
iterateM_ :: Control.Monad.Monad m =... |
3dda983ae818db6aedbae865a02ba404e9ae827279ab84226564694eb0fe669b | shirok/Gauche | libmacbase.scm | ;;;
;;; libmacbase.scm - macro basic staff
;;;
Copyright ( c ) 2000 - 2022 < >
;;;
;;; 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... | null | https://raw.githubusercontent.com/shirok/Gauche/c1354197084f83941d3f13cdd6e2335e8e9332ee/src/libmacbase.scm | scheme |
libmacbase.scm - macro basic staff
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 list of conditions and the following dis... | Copyright ( c ) 2000 - 2022 < >
" 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
(select-module gauche.internal)
(use util.ma... |
6ef8589299159a9e968cdf09be0c46488a0b8618c552deb3690cae97e2af54fa | prg-titech/baccaml | m.ml | (* customized version of Map *)
module M = struct
include Map.Make (struct
type t = Id.t
let compare = compare
end)
let rec find_greedy key env =
let open Option in
let rec find_greedy' key env =
match find_opt key env with
| Some v' -> find_greedy' v' env
| None -> some key
... | null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/base/m.ml | ocaml | customized version of Map |
module M = struct
include Map.Make (struct
type t = Id.t
let compare = compare
end)
let rec find_greedy key env =
let open Option in
let rec find_greedy' key env =
match find_opt key env with
| Some v' -> find_greedy' v' env
| None -> some key
in
match find_opt key env ... |
c46a83d48444d67cadd6dacb1750bbccfb5888c553beabef7f024afe12c99d0c | snmsts/cl-langserver | slynk-loader.lisp | ;;;; -*- indent-tabs-mode: nil -*-
;;;
slynk-loader.lisp --- Compile and load the backend .
;;;
Created 2003 , < >
;;;
;;; This code has been placed in the Public Domain. All warranties
;;; are disclaimed.
;;;
;; If you want customize the source- or fasl-directory you can set
;; ls-loader:*source-directory* r... | null | https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/helitage/slynk-loader.lisp | lisp | -*- indent-tabs-mode: nil -*-
This code has been placed in the Public Domain. All warranties
are disclaimed.
If you want customize the source- or fasl-directory you can set
ls-loader:*source-directory* resp. ls-loader:*fasl-directory*
before loading this files.
E.g.:
(load ".../slynk-loader.lisp")
(s... | slynk-loader.lisp --- Compile and load the backend .
Created 2003 , < >
(cl:defpackage :ls-loader
(:use :cl)
(:export #:init
#:dump-image
#:*source-directory*
#:*fasl-directory*
#:*load-path*))
(cl:in-package :ls-loader)
(defvar *source-directory*
(make-path... |
2e5e0badeb5221642d8da8afce026d952f903951973fdef3bbc0f39fec64798b | russmatney/ralphie | rofi.clj | (ns ralphie.rofi
(:require
[babashka.process :refer [$ check]]
[clojure.string :as string]
[ralphie.zsh :as zsh]
[ralphie.awesome :as awm]
[ralphie.doctor :as doctor]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; rofi-general
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/russmatney/ralphie/b096c1c5d05154feff59975135896c0555233295/src/ralphie/rofi.clj | clojure |
rofi-general
TODO Tests for this,especially that ensure the result is returned
push any floating windows into the view
set all ontops false
NOTE may want this to be optional
; row height
-dynamic
-no-fixed-num-lines
check for type of error
(println "on-select found" on-select)
(println "argslists" (-> on-s... | (ns ralphie.rofi
(:require
[babashka.process :refer [$ check]]
[clojure.string :as string]
[ralphie.zsh :as zsh]
[ralphie.awesome :as awm]
[ralphie.doctor :as doctor]))
(defn escape-rofi-label [label]
(string/escape label {\& "&"}))
(defn rofi
"Expects `xs` to be a coll of maps with a `:labe... |
e784db5e3aa6e96298eef2905d824f1d0b8ee5253e987860c7164132db24219d | nomeata/tasty-expected-failure | ExpectedFailure.hs | # LANGUAGE CPP #
# LANGUAGE DeriveDataTypeable , ScopedTypeVariables , LambdaCase #
module Test.Tasty.ExpectedFailure (expectFail, expectFailBecause, ignoreTest, ignoreTestBecause, wrapTest) where
import Test.Tasty.Options
import Test.Tasty.Runners
import Test.Tasty.Providers
#if MIN_VERSION_tasty(1,3,1)
import Test.T... | null | https://raw.githubusercontent.com/nomeata/tasty-expected-failure/33b71e694b954e35c05859fff3ca886d8cfe5bfe/Test/Tasty/ExpectedFailure.hs | haskell | Re-implement timeouts and exception handling *inside* the
wrapper. The primary location for timeout and exception
Test.Tasty.Run implementation, but that handling is above the
level of this wrapper which therefore cannot absorb timeouts
and exceptions as *expected* failures.
Ensure exceptions trying to show the
... | # LANGUAGE CPP #
# LANGUAGE DeriveDataTypeable , ScopedTypeVariables , LambdaCase #
module Test.Tasty.ExpectedFailure (expectFail, expectFailBecause, ignoreTest, ignoreTestBecause, wrapTest) where
import Test.Tasty.Options
import Test.Tasty.Runners
import Test.Tasty.Providers
#if MIN_VERSION_tasty(1,3,1)
import Test.T... |
b6be119eb93073ba0f49dd35fdc9abb4f3b97dc999fd8f2383ab1ed9b16d4fd1 | bennn/dissertation | main.rkt | #lang racket
;; Run a Simulation of Interacting Automata
(random-seed 7480)
;; =============================================================================
(require require-typed-check
"../base/untyped.rkt"
"automata.rkt"
"population.rkt"
"utilities.rkt")
(define (payoff? x)
(and (real? x) (<= 0 x)))
;; effe... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/fsm/untyped/main.rkt | racket | Run a Simulation of Interacting Automata
=============================================================================
effect run timed simulation, create and display plot of average payoffs
effect measure time needed for the simulation
c cycles of of match-ups with r rounds per match and at birth/death rate of s
... | #lang racket
(random-seed 7480)
(require require-typed-check
"../base/untyped.rkt"
"automata.rkt"
"population.rkt"
"utilities.rkt")
(define (payoff? x)
(and (real? x) (<= 0 x)))
(define (main)
(simulation->lines
(evolve (build-random-population 300) 500 100 20))
(void))
(define (simulation->lines d... |
bf1a4e6d80e5af07461a4cebe8ca19de9b8bf0f13fa290c1c377a476ec22810f | typelead/eta | tc190.hs | {-# LANGUAGE CPP, KindSignatures #-}
The record update triggered a kind error in GHC 6.2
module Foo where
data HT (ref :: * -> *)
= HT { kcount :: Int }
set_kcount :: Int -> HT s -> HT s
set_kcount kc ht = ht{kcount=kc}
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc190.hs | haskell | # LANGUAGE CPP, KindSignatures # |
The record update triggered a kind error in GHC 6.2
module Foo where
data HT (ref :: * -> *)
= HT { kcount :: Int }
set_kcount :: Int -> HT s -> HT s
set_kcount kc ht = ht{kcount=kc}
|
da0bc3515602cf22a6b5335b81837ec8373edcb699d7af7e111947cf17c38bfb | Clozure/ccl | scribe.lisp | ;;; -*- Log: hemlock.log; Package: Hemlock -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
#+CMU (ext:file-comment
"$Header$")
;;;
;;; ****... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/cocoa-ide/hemlock/unused/archive/scribe.lisp | lisp | -*- Log: hemlock.log; Package: Hemlock -*-
**********************************************************************
**********************************************************************
Variables.
Characters that open a Scribe paren: #\[, #\{, #\(, #\<.
Characters that close a Scribe paren: #\], #\}, #\),... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
#+CMU (ext:file-comment
"$Header$")
(in-package :hemlock)
(defvar *scribe-para-break-table* (make-hash-table :test #'equal)
"A table of the Scribe commands that should be ... |
bacc759edbe8e51c8fd2f670b02051ab1b38cdf07b1469cb904ff7f59fae9c82 | marigold-dev/deku | message_pool.ml | open Deku_concepts
type message_state =
| Accepted
| Pending of { queue : string list }
| Unknown
| Late
type message_pool =
| Message_pool of {
current : Level.t;
by_level : message_state Message_hash.Map.t Level.Map.t;
}
and t = message_pool
let message_state_encoding =
let open Data_e... | null | https://raw.githubusercontent.com/marigold-dev/deku/cdf82852196b55f755f40850515580be4fd9a3fa/deku-p/src/core/gossip/message_pool.ml | ocaml | helpers
external
TODO: content hash to prevent double encoding
TODO: be resilient to double apply
TODO: worst case scenario this becomes n log n,
probably limit the drop until | open Deku_concepts
type message_state =
| Accepted
| Pending of { queue : string list }
| Unknown
| Late
type message_pool =
| Message_pool of {
current : Level.t;
by_level : message_state Message_hash.Map.t Level.Map.t;
}
and t = message_pool
let message_state_encoding =
let open Data_e... |
5fa5bcab9b40c0dfc84eb19cc1f940bdc4f53526b03a7a88c168e6f7b36f9704 | waymonad/waymonad | SeatMapping.hs |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2017
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your op... | null | https://raw.githubusercontent.com/waymonad/waymonad/18ab493710dd54c330fb4d122ed35bc3a59585df/src/Waymonad/Hooks/SeatMapping.hs | haskell |
waymonad A wayland compositor in the spirit of xmonad
Copyright ( C ) 2017
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your op... | |
e2529f2fcc2f122bc6bb7933ae82ed3577a7f8029eee11df899a45c52ab749f3 | paurkedal/ocaml-mediawiki-api | mwapi_prereq.ml | Copyright ( C ) 2013 - -2017 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/paurkedal/ocaml-mediawiki-api/6a1c1043a8ad578ea321a314fbe0a12a8d0933cf/lib/mwapi_prereq.ml | ocaml | Copyright ( C ) 2013 - -2017 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... | |
81399c12a8c8d22877ca5fca6c3639dce8ceb560ec4b999bbf56b0bab12c0f61 | lambdamikel/VISCO | draw15.lisp | -*- Mode : Lisp ; Syntax : Ansi - Common - Lisp ; Package : GUI ; Base : 10 -*-
(in-package gui)
(defconstant +label-text-style+
(parse-text-style '(:sans-serif nil :very-small)))
(defconstant +highlighted-label-text-style+
(parse-text-style '(:sans-serif (:bold :italic) :small)))
(defconstant +at-most-la... | null | https://raw.githubusercontent.com/lambdamikel/VISCO/836d325b5c6037517470835c635b3063446d3d8a/src/GUI/draw15.lisp | lisp | Syntax : Ansi - Common - Lisp ; Package : GUI ; Base : 10 -*-
ar = atomic rubberband
fwo = transparency without origin
|
(in-package gui)
(defconstant +label-text-style+
(parse-text-style '(:sans-serif nil :very-small)))
(defconstant +highlighted-label-text-style+
(parse-text-style '(:sans-serif (:bold :italic) :small)))
(defconstant +at-most-label-text-style+
(parse-text-style '(:sans-serif nil :very-large)))
(defconsta... |
38301d926cac337fef752154b16758ee53be7f1145f13530f444d4b1b25c343e | headwinds/reagent-reframe-material-ui | pprint.cljs | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/resources/public/js/out/cljs/pprint.cljs | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns cljs.pprint
(:refer-clojure :exclude [deftype print println pr prn float?])
(:require-macros
[cljs.pprint :as m :refer [with-pretty-writer getf setf deftype
pprint-logical-block print-length-loop
def... |
1bc0c382e76c88766dd1a8eee581e0dc5d40efce0fa440b2dc858380354fc93a | RedBrainLabs/system-graph | utils_test.clj | (ns com.redbrainlabs.system-graph.utils-test
(:require [midje.sweet :refer :all]
[plumbing.core :refer [fnk]]
[plumbing.graph :as graph]
[schema.core :as s]
[com.redbrainlabs.system-graph.utils :refer :all]))
(facts "#'topo-sort"
sanity / characteristic test since w... | null | https://raw.githubusercontent.com/RedBrainLabs/system-graph/928d5d7de34047e54b0f05d33cf5104d0d9be53a/test/com/redbrainlabs/system_graph/utils_test.clj | clojure | (ns com.redbrainlabs.system-graph.utils-test
(:require [midje.sweet :refer :all]
[plumbing.core :refer [fnk]]
[plumbing.graph :as graph]
[schema.core :as s]
[com.redbrainlabs.system-graph.utils :refer :all]))
(facts "#'topo-sort"
sanity / characteristic test since w... | |
3f7483209e875e1ac7a2a26e7acffa9b934aa1dc90fb62f1f4f025741f59acf0 | verystable/warframe-autobuilder | MagazineMods.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
-- |
Module : Builder . Mods . ShotgunMods . MagazineMods
-- Maintainer :
-- Stability : experimental
--
-- Contains function that modify magazine size, applicable on primary (shotguns) weapons.
module Builder.Mods.ShotgunMods.MagazineMods ... | null | https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/Builder/Mods/ShotgunMods/MagazineMods.hs | haskell | # LANGUAGE OverloadedStrings #
|
Maintainer :
Stability : experimental
Contains function that modify magazine size, applicable on primary (shotguns) weapons.
| Burdened Magazine [+90% Magazine, -18% Reload Speed (+18% Reload Time)] | # LANGUAGE NoImplicitPrelude #
Module : Builder . Mods . ShotgunMods . MagazineMods
module Builder.Mods.ShotgunMods.MagazineMods where
import ClassyPrelude
import Control.Lens ( (^.) )
import GenericFunctions.GenericFunctions
import Types.GenericWeapo... |
60a71ba1fee41b8a64c22af0d0814e261b5e984be6e25a60e1db906240371aad | okuoku/nausicaa | test-all.scm | #!/usr/local/bin/csi -script
;; just run this file as "csi -script test-all.scm" to run the full
;; test suite
(use test extras utils irregex)
(test-begin)
(load "test-irregex.scm")
(load "test-irregex-gauche.scm")
(load "test-irregex-scsh.scm")
(load "test-irregex-pcre.scm")
(load "test-irregex-utf8.scm")
(test-e... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/foreign/irregex-0.8.1/test-all.scm | scheme | just run this file as "csi -script test-all.scm" to run the full
test suite | #!/usr/local/bin/csi -script
(use test extras utils irregex)
(test-begin)
(load "test-irregex.scm")
(load "test-irregex-gauche.scm")
(load "test-irregex-scsh.scm")
(load "test-irregex-pcre.scm")
(load "test-irregex-utf8.scm")
(test-end)
(test-exit)
|
4eccba320f08e87ffaade6145f54706effbd81c1d02e0c5e82f4bd3de8f6fa9c | CorticalComputer/Book_NeuroevolutionThroughErlang | substrate.erl | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
%%
Copyright ( C ) 2012 by , DXNN Research Group ,
%All rights reserved.
%
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for th... | null | https://raw.githubusercontent.com/CorticalComputer/Book_NeuroevolutionThroughErlang/81b96e3d7985624a6183cb313a7f9bff0a7e14c5/Ch_16/substrate.erl | erlang |
All rights reserved.
io:format("InitState:~p~n",[InitState]),
io:format("reseting:~n"),
io:format("reverting:~n"),
io:format("********ERROR: Substrate Crashed:~p~n",[S])
All sensory signals received
io:format("reset~n"),
io:format("Iterative~n"),
io:format("hold~n"),
=========================================... | This source code and work is provided and developed by DXNN Research Group WWW.DXNNResearch . COM
Copyright ( C ) 2012 by , DXNN Research Group ,
This code is licensed under the version 3 of the GNU General Public License . Please see the LICENSE file that accompanies this project for the terms of use .
-module(s... |
5857b8cd4f205c544f072f594e3c44f81e939dff8943d8d2dd74ca7dfbbab517 | ml-in-barcelona/ppxlib-simple-example | ppx.ml | open Ppxlib
let expander ~loc ~path:_ =
Ast_builder.Default.estring ~loc "r3p14ccd 70 r4nd0m 5tr1n9"
let pattern =
let open Ast_pattern in
pstr nil
let extension =
Context_free.Rule.extension
(Extension.declare "yay" Expression pattern expander)
let () = Driver.register_transformation ~rules:[ extension... | null | https://raw.githubusercontent.com/ml-in-barcelona/ppxlib-simple-example/14ce34f859f9ba5125584cf4bd28518cbaa3939c/src/ppx.ml | ocaml | open Ppxlib
let expander ~loc ~path:_ =
Ast_builder.Default.estring ~loc "r3p14ccd 70 r4nd0m 5tr1n9"
let pattern =
let open Ast_pattern in
pstr nil
let extension =
Context_free.Rule.extension
(Extension.declare "yay" Expression pattern expander)
let () = Driver.register_transformation ~rules:[ extension... | |
2c094db2d2bea58a5c0a815948c5f6e3b8e39f1f1ee4b00bd73071e21ffb661f | TrustInSoft/tis-interpreter | cabs_debug.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/ast_printing/cabs_debug.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
2ee35d68c020dcab47b1b58c39c7366a59539cc450812e3f5e031b90668a915f | c-cube/trustee | env.ml |
open Common_
module TA = Type_ast
type expr = TA.expr
type ty = TA.ty
type const = TA.const
type 'a meta_var = 'a TA.Meta_var.t
type t = {
consts: const Str_map.t; (* const -> ty *)
}
let empty = {
consts=
Str_map.empty
|> Str_map.add "bool" TA.Const.bool;
}
let add_const (c:const) self : t =
{ cons... | null | https://raw.githubusercontent.com/c-cube/trustee/8ae3d777f55ef2b499b43c0b26e5fde1f2ea7761/src/syntax/env.ml | ocaml | const -> ty
cut a range of the map that has chances of completing [str]
iterate and check |
open Common_
module TA = Type_ast
type expr = TA.expr
type ty = TA.ty
type const = TA.const
type 'a meta_var = 'a TA.Meta_var.t
type t = {
}
let empty = {
consts=
Str_map.empty
|> Str_map.add "bool" TA.Const.bool;
}
let add_const (c:const) self : t =
{ consts=Str_map.add c.name c self.consts; }
let f... |
842e760c0b24294ff3a7fa46f001d91284dd2b5444cf64a5c6d890b27048f723 | ucsd-progsys/dsolve | typedtree.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/typing/typedtree.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 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 .
$ I d : typedtree.mli , v 1.35 2006/0... |
dd8e136aa8098120aecbb0240e9cd3ce2b1a0565e830eeee0a345aadec3771c7 | IronScheme/IronScheme | run.sps | #!r6rs
(import (tests r6rs run)
(tests r6rs test)
(rnrs io simple))
(display "Running tests for (rnrs run)\n")
(run-run-tests)
(report-test-results)
| null | https://raw.githubusercontent.com/IronScheme/IronScheme/687cde5d4e463a119e4ba28296f2af42a5c4a9df/IronScheme/IronScheme.Console/tests/r6rs/run/run.sps | scheme | #!r6rs
(import (tests r6rs run)
(tests r6rs test)
(rnrs io simple))
(display "Running tests for (rnrs run)\n")
(run-run-tests)
(report-test-results)
| |
cb56bfd8ed2cbc6c72e8b49c1f52c94e641196074a3a0927ab8efe5f66bf0539 | OCamlPro/ocaml-solidity | solidity_common.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro & Origin Labs
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/ocaml-solidity/9c03ceb24ad42a16dd3678849ba7eefbe27c347e/src/solidity-common/solidity_common.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro & Origin Labs
Public License version 2.1 , with the special exception on linking
open Ez_file.V1
type pos = string * (int * int) * (int * int)
let dummy_pos = "", (-1, -1), (-1, -1)
exception GenericError of string
let error fmt =
Format.kaspr... |
b9d906ab6f09b74d201ec39fc199be3ef773ba20fceefc3231489993fe99e121 | plumatic/grab-bag | queue.clj | (ns plumbing.queue
(:refer-clojure :exclude [peek])
(:import
[java.util.concurrent
BlockingQueue
LinkedBlockingQueue
PriorityBlockingQueue]))
(set! *warn-on-reflection* true)
(defn poll [^java.util.Queue q] (.poll q))
(defn peek [^java.util.Queue q] (.peek q))
(defn offer [^java.util.Queue q x]
... | null | https://raw.githubusercontent.com/plumatic/grab-bag/a15e943322fbbf6f00790ce5614ba6f90de1a9b5/lib/plumbing/src/plumbing/queue.clj | clojure | (ns plumbing.queue
(:refer-clojure :exclude [peek])
(:import
[java.util.concurrent
BlockingQueue
LinkedBlockingQueue
PriorityBlockingQueue]))
(set! *warn-on-reflection* true)
(defn poll [^java.util.Queue q] (.poll q))
(defn peek [^java.util.Queue q] (.peek q))
(defn offer [^java.util.Queue q x]
... | |
8b0795ea37dfd5938809a5c96a2cf1ae664f2ed9e6fc48cd72df90e07da2d334 | borkdude/advent-of-cljc | borkdude.cljc | (ns aoc.y2018.d04.borkdude
(:refer-clojure :exclude [read-string format])
(:require
[aoc.utils :as u :refer [deftest read-string format]]
[aoc.y2018.d04.data :refer [input answer-1 answer-2]] ;; :reload
[clojure.test :refer [is testing]]
[clojure.string :as str]))
(def re #"\[(\d{4})-(\d{2})-(\d{2}) (\... | null | https://raw.githubusercontent.com/borkdude/advent-of-cljc/17c8abb876b95ab01eee418f1da2e402e845c596/src/aoc/y2018/d04/borkdude.cljc | clojure | :reload
max-key takes a comparison function. a more appropriate name might be max-by | (ns aoc.y2018.d04.borkdude
(:refer-clojure :exclude [read-string format])
(:require
[aoc.utils :as u :refer [deftest read-string format]]
[clojure.test :refer [is testing]]
[clojure.string :as str]))
(def re #"\[(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2})\] (Guard #\d+ )?(.*)")
(defn parse-line [s]
(let [[... |
64dab68f33483987ad2bdc6b0ff132bb284a58d8ce9ddb78f771d7f05d7bd0a7 | tfidfwastaken/loosie | model.rkt | #lang racket/base
(require db database-url
deta threading
racket/string)
(provide init-db port app-url
upload-file get-file-data
(schema-out loosie))
; A loosie is a text-based file we want to share
(define-schema loosie
([id id/f #:primary-key #:auto-increment]
[name string... | null | https://raw.githubusercontent.com/tfidfwastaken/loosie/5209731fca52d1b6df1a26919464f564b382b3e4/loosie/model.rkt | racket | A loosie is a text-based file we want to share
make-pg-connection : (-> connection)
pgc : connection
creates table if not present | #lang racket/base
(require db database-url
deta threading
racket/string)
(provide init-db port app-url
upload-file get-file-data
(schema-out loosie))
(define-schema loosie
([id id/f #:primary-key #:auto-increment]
[name string/f #:contract non-empty-string?]
[mime-type bi... |
02f05ac2dc7bd6fa2c42032a751941efd8af067889c2aabb72630261aee744e8 | richcarl/erlguten | eg_font_server.erl | %%==========================================================================
Copyright ( C ) 2003
%%
%% Permission is hereby granted, free of charge, to any person obtaining a
%% copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
... | null | https://raw.githubusercontent.com/richcarl/erlguten/debd6120907e5e18b4bca5fbd5bdd9cb653f282d/src/eg_font_server.erl | erlang | ==========================================================================
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
following conditions:
The above cop... | Copyright ( C ) 2003
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to permit
persons to whom the Software is furnished to do so , subject to the
in all copies or substantial portions of the Software .
THE SOFTWAR... |
642159abbbed8740b8e0b901d0b9edd7cebdda1bf08d4a5be8b6f41f4376fcc1 | semerdzhiev/fp-2020-21 | exam-prep.rkt | #lang racket
(define empty-tree '())
(define (make-tree root left right) (list root left right))
(define (make-leaf root) (make-tree root empty-tree empty-tree))
;getters
(define root-tree car)
(define left-tree cadr)
(define right-tree caddr)
; validation
(define (tree? t)
(or (null? t)
(and (list? t)
... | null | https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/group-b/class/exam-prep.rkt | racket | getters
validation
(invert tree)
/ \ invert / \
/ \ / \
поток от всички пълни дървета с дадена стойност | #lang racket
(define empty-tree '())
(define (make-tree root left right) (list root left right))
(define (make-leaf root) (make-tree root empty-tree empty-tree))
(define root-tree car)
(define left-tree cadr)
(define right-tree caddr)
(define (tree? t)
(or (null? t)
(and (list? t)
(= (length t) 3)
... |
6381a60db3f390f196f0e3479bed0d5813604c60141febc5ba4f5ea1fcb987d1 | rlepigre/subml | subml.ml | (****************************************************************************)
* { 3 Main file }
(****************************************************************************)
let quit = ref false
let spec = Arg.align
[ ( "--verbose"
, Arg.Set Ast.v... | null | https://raw.githubusercontent.com/rlepigre/subml/d410898910399b3286e80b129656bd7b3bc208c5/src/subml.ml | ocaml | **************************************************************************
**************************************************************************
Reading the command lien arguments and gathering the files.
Handle the files given on the command line.
Run the toplevel.
Close opened file and exit. | * { 3 Main file }
let quit = ref false
let spec = Arg.align
[ ( "--verbose"
, Arg.Set Ast.verbose
, " Display the defined types and values" )
; ( "--quit"
, Arg.Set quit
, " Quit after evaluating the files" )
; ( "--gml-file"
, A... |
6df76916aa89679c42a027b747f98e3f428ae60e7a2caaca10efb508d2fa8159 | clj-commons/claypoole | test_helpers.clj | (ns com.climate.claypoole.test-helpers)
(defn eval+ex-unwrap
"Test helper.
Clojure 1.10 throws CompilerException from eval.
We unwrap that exception to get the original."
[code]
(try
(eval code)
(catch clojure.lang.Compiler$CompilerException e
(let [cause (.getCause e)]
;; Update the ... | null | https://raw.githubusercontent.com/clj-commons/claypoole/a4bd33f3dd50d04a72d4eb81807ed2d050e7e002/test/com/climate/claypoole/test_helpers.clj | clojure | Update the stack trace to include e | (ns com.climate.claypoole.test-helpers)
(defn eval+ex-unwrap
"Test helper.
Clojure 1.10 throws CompilerException from eval.
We unwrap that exception to get the original."
[code]
(try
(eval code)
(catch clojure.lang.Compiler$CompilerException e
(let [cause (.getCause e)]
(.setStackTrac... |
56a70c60a1159f0169199a0119cb804f1e3c05bbec964026b8d89a4ce7f827ae | clojure-lsp/lsp4clj | errors_test.clj | (ns lsp4clj.lsp.errors-test
(:require
[clojure.test :refer [deftest is]]
[lsp4clj.lsp.errors :as lsp.errors]))
(deftest body-should-look-up-error-by-code
;; Uses known code and message
(is (= {:code -32001
:message "Unknown error"}
(lsp.errors/body :unknown-error-code nil nil)))
;; Pre... | null | https://raw.githubusercontent.com/clojure-lsp/lsp4clj/1edff25befa7cef6911436644abbabe195221267/test/lsp4clj/lsp/errors_test.clj | clojure | Uses known code and message
Prefers custom message with known code
Uses custom code
Uses custom code and message
Uses custom code, message, and data | (ns lsp4clj.lsp.errors-test
(:require
[clojure.test :refer [deftest is]]
[lsp4clj.lsp.errors :as lsp.errors]))
(deftest body-should-look-up-error-by-code
(is (= {:code -32001
:message "Unknown error"}
(lsp.errors/body :unknown-error-code nil nil)))
(is (= {:code -32001
:message... |
14957f303678b00ffa4b0dbd27a3d7e3c6588a8c58e8dc7d8a5f40910eeaa3cf | bytekid/mkbtt | choose.ml | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mkbtt/choose.ml | ocaml | Module provides functions to control the choice of a process/node from
the current node set. Corresponds to strategy mkbtt1 used in old
implementation.
** SUBMODULES *********************************************************
** TYPES **************************************************************
** EXCEPTIONS ... | Copyright 2010
* GNU Lesser General Public License
*
* This file is part of MKBtt .
*
* is free software : you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation , either version 3 of the License , or (... |
27058e437c0c0dc443bdf32de4838f75c7511d5e45f264dcae213bd4d199a688 | brandonchinn178/advent-of-code | Day3.hs | {- stack script
--resolver lts-14.12
-}
# OPTIONS_GHC -Wall #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
import Data.List.Split (splitOn)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
main :: IO ()
main = do
input <- readFile "Day3.txt"
let (cmds1, cmds2) = splitCommands in... | null | https://raw.githubusercontent.com/brandonchinn178/advent-of-code/a4b0616f8764620e28759276c333fe37d6685d57/2019/Day3.hs | haskell | stack script
--resolver lts-14.12
((dx, dy), number of steps)
A list of visited points, mapped to the number of steps it took to get there.
If a point was visited multiple times, keep the lowest number of steps |
# OPTIONS_GHC -Wall #
# LANGUAGE LambdaCase #
# LANGUAGE TypeApplications #
import Data.List.Split (splitOn)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
main :: IO ()
main = do
input <- readFile "Day3.txt"
let (cmds1, cmds2) = splitCommands input
pointsMap1 = toPointsMap cmds1
... |
f54e3cb6d0173f35bad72bceb972c6783d52642b5bc92265d2208f28b1cabfb9 | taiki45/hs-vm | Parser.hs | module Parser
( parse
, instructionsParser ) where
import Control.Applicative ((<$>), (<$))
import Data.Maybe (catMaybes)
import Text.ParserCombinators.Parsec hiding (label)
import VM.Instruction
instructionsParser :: Parser [Instruction]
instructionsParser = catMaybes <$> (comment <|> instruction <|> blank) ... | null | https://raw.githubusercontent.com/taiki45/hs-vm/c979d594e957179c64b42ffa82e3022167cc8ad6/src/Parser.hs | haskell | module Parser
( parse
, instructionsParser ) where
import Control.Applicative ((<$>), (<$))
import Data.Maybe (catMaybes)
import Text.ParserCombinators.Parsec hiding (label)
import VM.Instruction
instructionsParser :: Parser [Instruction]
instructionsParser = catMaybes <$> (comment <|> instruction <|> blank) ... | |
8d4ebc467d710b856655535dfd2eacb7bf19d871373c8703477d31508e528362 | callum-oakley/advent-of-code | 23.clj | (ns aoc.2015.23
(:require
[clojure.string :as str]))
(defn parse [s]
(mapv #(map read-string (re-seq #"\S+" %)) (str/split-lines s)))
(defn run [m head registers]
(if-let [[op x y] (get m head)]
(case op
hlf (recur m (inc head) (update registers x quot 2))
tpl (recur m (inc head) (update regi... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/fa79f6483157e3aeeb43dd8661ca5d308d203933/src/aoc/2015/23.clj | clojure | (ns aoc.2015.23
(:require
[clojure.string :as str]))
(defn parse [s]
(mapv #(map read-string (re-seq #"\S+" %)) (str/split-lines s)))
(defn run [m head registers]
(if-let [[op x y] (get m head)]
(case op
hlf (recur m (inc head) (update registers x quot 2))
tpl (recur m (inc head) (update regi... | |
24317d1a418af55dd3b6e40dd195a538ed5922501fa120b2edec2f48513765fb | winny-/aoc | lib.rkt | #lang racket
(provide (all-defined-out))
(define (rassoc v alist [eq equal?])
(for/first ([a (in-list alist)]
#:when (eq (cdr a) v))
a))
(define ORTHOGINAL-OFFSETS '((-1 0) (1 0) (0 -1) (0 1)))
(define DIAGONAL-OFFSETS '((-1 -1) (-1 1) (1 -1) (1 1)))
(define ALL-OFFSETS (append ORTHOGINAL-OFFSETS... | null | https://raw.githubusercontent.com/winny-/aoc/9882fd358d8c30f09c7a390bf806f06dc0da3f23/lib.rkt | racket | todo does not work | #lang racket
(provide (all-defined-out))
(define (rassoc v alist [eq equal?])
(for/first ([a (in-list alist)]
#:when (eq (cdr a) v))
a))
(define ORTHOGINAL-OFFSETS '((-1 0) (1 0) (0 -1) (0 1)))
(define DIAGONAL-OFFSETS '((-1 -1) (-1 1) (1 -1) (1 1)))
(define ALL-OFFSETS (append ORTHOGINAL-OFFSETS... |
fa018b0c149c5bfa0afc1b3accd3899962980dbbfa4f1ae1e65b40a0d361ce5d | hopv/MoCHi | fdef.ml | open Util
open Combinator
(** Function definitions *)
(** @require a.name = b.name => length a.args = length b.args *)
type t = {
name: string;
@require length length > 0
guard: Formula.t; (* a boolean expression that does not
involve side-effects and function calls *)
body: Term.t
}
l... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/fdef.ml | ocaml | * Function definitions
* @require a.name = b.name => length a.args = length b.args
a boolean expression that does not
involve side-effects and function calls | open Util
open Combinator
type t = {
name: string;
@require length length > 0
body: Term.t
}
let make name args guard body =
{ name = name; args = args; guard = guard; body = body }
let name_of f = f.name
let args_of f = f.args
let guard_of f = f.guard
let body_of f = f.body
let pr ppf fdef =
if Formula.... |
a7d14f6dbef6ca7020b7b35757f3f916cc308ffa60a12d6c0b25cebc37071b6c | mbj/stratosphere | InputFileLocationProperty.hs | module Stratosphere.Transfer.Workflow.InputFileLocationProperty (
module Exports, InputFileLocationProperty(..),
mkInputFileLocationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.Tr... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/transfer/gen/Stratosphere/Transfer/Workflow/InputFileLocationProperty.hs | haskell | # SOURCE #
# SOURCE # | module Stratosphere.Transfer.Workflow.InputFileLocationProperty (
module Exports, InputFileLocationProperty(..),
mkInputFileLocationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourcePropertie... |
3adecfe007f42032d6c765f49aa02d68a84a28fe173919542acf6458d0f886f1 | jesperes/aoc_erlang | aoc2019_day02.erl | -module(aoc2019_day02).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2019,
day = 2,
name = "1202 Program Alarm",
expe... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2019/aoc2019_day02.erl | erlang | -module(aoc2019_day02).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2019,
day = 2,
name = "1202 Program Alarm",
expe... | |
7b1d995111147758c5e06d190e76f7f5214baca94f398e91261e1ec5ad8eba07 | facebookarchive/duckling_old | numbers.clj | (; Context map
{}
"1"
"um"
"uma"
(number 1)
"2"
"dois"
"duas"
(number 2)
"3"
"três"
"tres"
(number 3)
"6"
"seis"
(number 6)
"11"
"onze"
(number 11)
"12"
"doze"
"uma dúzia"
"uma duzia"
(number 12)
"14"
"catorze"
"quatorze"
(number 14)
"16"
"dezesseis"
... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/pt/corpus/numbers.clj | clojure | Context map | {}
"1"
"um"
"uma"
(number 1)
"2"
"dois"
"duas"
(number 2)
"3"
"três"
"tres"
(number 3)
"6"
"seis"
(number 6)
"11"
"onze"
(number 11)
"12"
"doze"
"uma dúzia"
"uma duzia"
(number 12)
"14"
"catorze"
"quatorze"
(number 14)
"16"
"dezesseis"
"dezasseis"
... |
9ed9de34a9001468245b3219fd539a4ec6a0745431591da3dbf44a190ffe3a4e | AccelerateHS/accelerate-cuda | Paths_accelerate_cuda.hs | -- Helper script to shadow that automatically generated by cabal, but pointing
-- to our local development directory.
--
module Paths_accelerate_cuda where
import Data.Version
import System.Directory
version :: Version
version = Version {versionBranch = [2,0,0,0], versionTags = ["dev"]}
getDataDir :: IO FilePath
ge... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-cuda/6285f87859788628ce68d1ff76ce7b348f585f9e/utils/Paths_accelerate_cuda.hs | haskell | Helper script to shadow that automatically generated by cabal, but pointing
to our local development directory.
|
module Paths_accelerate_cuda where
import Data.Version
import System.Directory
version :: Version
version = Version {versionBranch = [2,0,0,0], versionTags = ["dev"]}
getDataDir :: IO FilePath
getDataDir = getCurrentDirectory
|
69e474e77c25ded9215c61b1109be4bb811a54cf57a188c87c37521bdea078ac | Ptival/language-ocaml | ParseTree.hs | # LANGUAGE DeriveGeneric #
module Language.OCaml.Definitions.Parsing.ParseTree
( Attribute,
Attributes,
Case (..),
ClassDeclaration,
ClassExpr (..),
ClassField (..),
ClassInfos (..),
ClassSignature (..),
ClassStructure (..),
ClassType (..),
ClassTypeDeclaration,
ClassTypeF... | null | https://raw.githubusercontent.com/Ptival/language-ocaml/7b07fd3cc466bb2ad2cac4bfe3099505cb63a4f4/lib/Language/OCaml/Definitions/Parsing/ParseTree.hs | haskell | | PsigType Asttypes.recFlag * typeDeclaration list
| PsigTypext type_extension
| Psig_exception extensionConstructor
| PsigInclude includeDescription
| PsigClassType classTypeDeclaration list
C of ... [@id1] [@id2] | # LANGUAGE DeriveGeneric #
module Language.OCaml.Definitions.Parsing.ParseTree
( Attribute,
Attributes,
Case (..),
ClassDeclaration,
ClassExpr (..),
ClassField (..),
ClassInfos (..),
ClassSignature (..),
ClassStructure (..),
ClassType (..),
ClassTypeDeclaration,
ClassTypeF... |
27815fd48b2fd3cc827438231f22b9252bb18c824cc21ebeadd346335ed825eb | processone/ejabberd | ejabberd_sql_pt.erl | %%%-------------------------------------------------------------------
%%% File : ejabberd_sql_pt.erl
Author : < >
Description : Parse transform for SQL queries
Created : 20 Jan 2016 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2023 ProcessOne
%%%
%%% This program is free software; you can red... | null | https://raw.githubusercontent.com/processone/ejabberd/c103182bc7e5b8a8ab123ce02d1959a54e939480/src/ejabberd_sql_pt.erl | erlang | -------------------------------------------------------------------
File : ejabberd_sql_pt.erl
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 useful,
but WITHOUT ANY WARRANTY; without even ... | Author : < >
Description : Parse transform for SQL queries
Created : 20 Jan 2016 by < >
ejabberd , Copyright ( C ) 2002 - 2023 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... |
15d291a6a4f5aaad04dd81594c92399819a857dbd8a3db29cac281aba72fb162 | kelsey-sorrels/zaffre | text_test.cljc | (ns zaffre.text-test
(:require
[zaffre.text :as ztext]
[cashmere.core-graal :as cm]
[taoensso.timbre :as log]
[clojure.inspector :refer :all]
[clojure.test :refer :all]))
(log/set-level! :warn)
(deftest should-word-wrap
(are [input expected] (= expected (apply ztext/word-wrap input))
[5 "N... | null | https://raw.githubusercontent.com/kelsey-sorrels/zaffre/eb16a9b2095b54c835d39fa035533e5083fe7b02/test/zaffre/text_test.cljc | clojure | pass through
cascade multiple levels
children should override parent styles
pass through
seq multiple levels
should work with multiple leaf scenarios
pass through | (ns zaffre.text-test
(:require
[zaffre.text :as ztext]
[cashmere.core-graal :as cm]
[taoensso.timbre :as log]
[clojure.inspector :refer :all]
[clojure.test :refer :all]))
(log/set-level! :warn)
(deftest should-word-wrap
(are [input expected] (= expected (apply ztext/word-wrap input))
[5 "N... |
c1018a7360f24f11114404d313b739192d3d2a2f269b6997716506e9201654b4 | alinpopa/qerl | qerl_stomp_utils.erl | -module(qerl_stomp_utils).
-export([drop/2]).
-import(binary, [replace/4]).
-define(LF,10).
-define(CR,13).
-define(NULL,0).
%% Drop specific byte from the given binary
drop(_,<<>>) -> <<>>;
drop(What,Bin) when is_binary(Bin) ->
case What of
cr -> replace(Bin,<<?CR>>,<<>>,[global]);
lf -> replace... | null | https://raw.githubusercontent.com/alinpopa/qerl/4c10c4617eea14d451101775a1feb20fb3709f9d/src/qerl_stomp_utils.erl | erlang | Drop specific byte from the given binary | -module(qerl_stomp_utils).
-export([drop/2]).
-import(binary, [replace/4]).
-define(LF,10).
-define(CR,13).
-define(NULL,0).
drop(_,<<>>) -> <<>>;
drop(What,Bin) when is_binary(Bin) ->
case What of
cr -> replace(Bin,<<?CR>>,<<>>,[global]);
lf -> replace(Bin,<<?LF>>,<<>>,[global]);
null ->... |
8641b75fe4b5fcd3f6a2cf4c8cbe8d580591558334ab71fedb541690589ddc95 | clj-commons/claypoole | claypoole.clj | The Climate Corporation licenses this file to you under 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
;;
;; See the NOTICE file distributed with this work for additional information
;... | null | https://raw.githubusercontent.com/clj-commons/claypoole/a5c7114b60fdd6ec215b88e0db5094e063a37b7e/src/clj/com/climate/claypoole.clj | clojure | License, Version 2.0 (the "License"); you may not use this file except in
-2.0
See the NOTICE file distributed with this work for additional information
regarding copyright ownership. Unless required by applicable law or agreed
or implied. See the License for the specific language governing permissions
and ... | The Climate Corporation licenses this file to you under under the Apache
compliance with the License . You may obtain a copy of the License at
to in writing , software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , either express
(ns com.cl... |
0271916b0d838e8fb69706f03732eb7ab14fb159ad350080892d9c99356bbfa0 | jaredly/reason-language-server | location.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/406/location.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Lexing
let absname = ref false
This reference should be in Clflags , but it would create an addit... |
98afca3efad9f9dff56ee7cc0cc49894caf14b7913121ced34c978ecb610dd87 | BranchTaken/Hemlock | test_fold2_until.ml | open! Basis.Rudiments
open! Basis
open Ordset
let test () =
let test ms0 ms1 = begin
let ordset0 = of_list (module Uns) ms0 in
let ordset1 = of_list (module Uns) ms1 in
let ordset = union ordset0 ordset1 in
let ms = to_list ordset in
(* Compute the number of elements in the triangle defined by fo... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/07922d4658ca6ecf37dfd46f5aca31c8b58e06e4/bootstrap/test/basis/ordset/test_fold2_until.ml | ocaml | Compute the number of elements in the triangle defined by folding n times, each time
* terminating upon encounter of a distinct set member. The size of the triangle is insensitive
* to fold order. | open! Basis.Rudiments
open! Basis
open Ordset
let test () =
let test ms0 ms1 = begin
let ordset0 = of_list (module Uns) ms0 in
let ordset1 = of_list (module Uns) ms1 in
let ordset = union ordset0 ordset1 in
let ms = to_list ordset in
assert ((List.length ms) = (length ordset));
let n = length... |
a8d3056dc4cf8f0c36841d4423536f271db49b9c44e9858f5edcae174656bf24 | ghcjs/ghcjs-base | Array.hs | {-# LANGUAGE ForeignFunctionInterface, JavaScriptFFI #-}
module JavaScript.Array
( JSArray
, MutableJSArray
, create
, length
, lengthIO
, null
, fromList
, fromListIO
, toList
, toListIO
, index, (!)
, read
, write
, append
, push
, pop
, unshift
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/JavaScript/Array.hs | haskell | # LANGUAGE ForeignFunctionInterface, JavaScriptFFI #
# INLINE fromList #
# INLINE (!) #
# INLINE index #
# INLINE drop #
# INLINE take #
# INLINE shift # | module JavaScript.Array
( JSArray
, MutableJSArray
, create
, length
, lengthIO
, null
, fromList
, fromListIO
, toList
, toListIO
, index, (!)
, read
, write
, append
, push
, pop
, unshift
, shift
, reverse
, take
, takeIO
, drop
... |
4136256a54be37bd35ae4817cf4c5723af921df4540bcea11e997148772b4288 | unison-code/unison | RelocateDefines.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Tools/Import/RelocateDefines.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
2900af965e7786bd812a369c63a7ab16c2770fb92f3c29e3b591b847fe19d6e2 | avsm/mirage-duniverse | ping.ml |
let src =
let src = Logs.Src.create "ping" ~doc:"Mirage ping" in
Logs.Src.set_level src (Some Logs.Info);
src
module Log = (val Logs.src_log src : Logs.LOG)
Construct a payload buffer of a given size
let make_payload ~size () =
let buf = Cstruct.create size in
let pattern = "plz reply i'm so lonely" in
... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tcpip/examples/ping/ping.ml | ocaml | to compute the standard deviation, we store the sum and the sum of squares
Send ICMP ECHO_REQUEST packets forever
Return a thread and a receiver callback. The thread is woken up when we have
received [count] packets |
let src =
let src = Logs.Src.create "ping" ~doc:"Mirage ping" in
Logs.Src.set_level src (Some Logs.Info);
src
module Log = (val Logs.src_log src : Logs.LOG)
Construct a payload buffer of a given size
let make_payload ~size () =
let buf = Cstruct.create size in
let pattern = "plz reply i'm so lonely" in
... |
511dcfc63394fbd345d0e5b5f1b62a8b0d9e453a2af113e981b0b8650094f1e4 | danehuang/augurv2 | KernSyn.hs |
- Copyright 2017 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... | null | https://raw.githubusercontent.com/danehuang/augurv2/480459bcc2eff898370a4e1b4f92b08ea3ab3f7b/compiler/augur/src/Core/KernSyn.hs | haskell | --------------------------------------------------------------------
---------------------------------
== Syntax
^ proposal
^ proposal, swap, likelihood, top-level
^ gradient, proposal
^ gradient, proposal
^ gradient, proposal
^ sample
^ statistic, sample
^ individual likelihood, proposal
---------------------... |
- Copyright 2017 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... |
bcc89f7909f1258b9aed249e69be96b1f16e94266a4bf8520db1136306429430 | tsoding/louis | Louis.hs | # LANGUAGE BinaryLiterals #
# LANGUAGE QuasiQuotes #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Louis
Copyright : ( c ) 2019
License : MIT
-- Maintainer :
-- Portability : portable
--
-- >>> import Louis
-- >>> import qualified Data.Text as T
-- >>> putStrLn . T.unpack . T.unlines =<< bra... | null | https://raw.githubusercontent.com/tsoding/louis/bc6b810161cc461a9e3ad0bb360f90440a07f3c6/src/Louis.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Louis
Maintainer :
Portability : portable
>>> import Louis
>>> import qualified Data.Text as T
>>> putStrLn . T.unpack . T.unlines =<< braillizeFile "image.png"
⠀⠀⠀⡸⠿⠿⠿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣯⣾⣿⣿⣿⣿⣇⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿... | # LANGUAGE BinaryLiterals #
# LANGUAGE QuasiQuotes #
Copyright : ( c ) 2019
License : MIT
⠀ ⢀ ⣴ ⣶ ⣶ ⣶ ⣦ ⣬ ⣉ ⠻ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿
⠀ ⣸ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⡿ ⣿ ⡆ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⡿ ⠿ ⠿ ⠿ ⢿ ⣿ ⣿ ⣿ ⣿
⠀ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⣿ ⠁ ⢠ ⣿ ⠡ ⠿ ⠿ ⠿ ⠿ ⣿ ⣿ ⣿ ⢃ ⣶ ⣿ ⣷ ⣶ ⣤ ⣍ ⡛
⣿ ⣿ ⣤ ⣾ ⠋ ⠐ ⠲ ⠶ ⣦ ⣤ ⣌ ⡙ ⠋ ... |
d638936a08afc49103b3c326a4f41d5e57234e1f00d70c395c397cc761a3e50f | dedbox/racket-neuron | info.rkt | #lang info
(define collection 'multi)
(define deps
'("neuron-lib"
"neuron-doc"))
(define implies
'("neuron-lib"
"neuron-doc"))
| null | https://raw.githubusercontent.com/dedbox/racket-neuron/a8ecafec0c6398c35423348cb02ec229869c8b15/neuron/info.rkt | racket | #lang info
(define collection 'multi)
(define deps
'("neuron-lib"
"neuron-doc"))
(define implies
'("neuron-lib"
"neuron-doc"))
| |
eae9c844434fbfc1b81d036f3b2c9542546a7d7b6f903c3fa4e5f68343bd84dd | earl-ducaine/cl-garnet | gilt-compiler.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : COMMON - LISP - USER ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This c... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/gilt/gilt-compiler.lisp | lisp | Syntax : Common - Lisp ; Package : COMMON - LISP - USER ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
; ;
please contact to be put on the mailing list. ;;;
(eval-when (:compile-toplevel :load-toplevel :execute)
(proclaim
(if *debug-gilt-mode*
Garnet... |
(in-package "COMMON-LISP-USER")
(defvar *debug-gilt-mode* nil)
( and ( boundp ' Garnet - Compile - Debug - Settings )
( and ( boundp ' Default - Garnet - Proclaim )
) ) ) )
(format t "Compiling Gilt...~%")
check first to see if pathname variable is set
(unless (boundp 'Garnet-Gi... |
cbc1272fff43653780bb217d7301b46eae10ab57d7f9c88a7bd189393f965535 | reasonml/reason | migrate_parsetree_407_408.ml | (**************************************************************************)
(* *)
(* OCaml Migrate Parsetree *)
(* *)
... | null | https://raw.githubusercontent.com/reasonml/reason/4f6ff7616bfa699059d642a3d16d8905d83555f6/src/vendored-omp/src/migrate_parsetree_407_408.ml | ocaml | ************************************************************************
OCaml Migrate Parsetree
... |
Copyright 2017 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
include Migrate_parsetree_407_408_migrate
$ open Printf
let fields = [
" attribute " ; " attribut... |
f81ff0e27810ca278d9b2336f66d3b143c588fef7c748ab0f4818b834d3b3b69 | dscarpetti/codax | test_logging.clj | (ns codax.test-logging)
(def ^:dynamic *logging* false)
(defn logln [& args]
(when *logging* (apply println args)))
| null | https://raw.githubusercontent.com/dscarpetti/codax/68edc73dbdfe4d33f5d08f658052edbc3de85121/test/codax/test_logging.clj | clojure | (ns codax.test-logging)
(def ^:dynamic *logging* false)
(defn logln [& args]
(when *logging* (apply println args)))
| |
fe921d5c022d38103a33a1a24290ba29728094233c98c9158eb4ef0a3a2f8ede | runtimeverification/haskell-backend | Condition.hs | module Test.Kore.Simplify.Condition (
test_simplify_local_functions,
test_predicateSimplification,
test_simplifyPredicates,
) where
import Data.Map.Strict qualified as Map
import Kore.Equation (Equation)
import Kore.Internal.Condition (
Condition,
Conditional (..),
)
import Kore.Internal.Condition... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/454211800a577c6b8d13c28457ebcdfffe2a871c/kore/test/Test/Kore/Simplify/Condition.hs | haskell | Constructor at top
Sort injection at top
Int at top
Bool at top
String at top | module Test.Kore.Simplify.Condition (
test_simplify_local_functions,
test_predicateSimplification,
test_simplifyPredicates,
) where
import Data.Map.Strict qualified as Map
import Kore.Equation (Equation)
import Kore.Internal.Condition (
Condition,
Conditional (..),
)
import Kore.Internal.Condition... |
e4b47c27dfd743b56f8a69d7cb32d49c2fb5da1d8d78a2693409487bfd1b9bb0 | haskell-suite/haskell-tc | Pretty.hs | module Language.Haskell.TypeCheck.Pretty
( Pretty(..)
, parensIf
, module Text.PrettyPrint.ANSI.Leijen
) where
import Text.PrettyPrint.ANSI.Leijen hiding (Pretty(..))
class Pretty a where
prettyPrec :: Int -> a -> Doc
prettyPrec _ = pretty
pretty :: a -> Doc
pretty = prettyPrec 0
# MINIMAL prettyPrec ... | null | https://raw.githubusercontent.com/haskell-suite/haskell-tc/abf5e3cc624e0095cae14c3c1c695b76ea8ffcb9/src/Language/Haskell/TypeCheck/Pretty.hs | haskell | module Language.Haskell.TypeCheck.Pretty
( Pretty(..)
, parensIf
, module Text.PrettyPrint.ANSI.Leijen
) where
import Text.PrettyPrint.ANSI.Leijen hiding (Pretty(..))
class Pretty a where
prettyPrec :: Int -> a -> Doc
prettyPrec _ = pretty
pretty :: a -> Doc
pretty = prettyPrec 0
# MINIMAL prettyPrec ... | |
ed9e575a29bdcac8691bee6fc79bbb03bc5449cb5524048fe66a047fa0694254 | jaked/ocamljs | camlinternalOO.ml |
* This file is part of ocamljs , OCaml to Javascript compiler
* Copyright ( C ) 2007 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Softwar... | null | https://raw.githubusercontent.com/jaked/ocamljs/378080ff1c8033bb15ed2bd29bf1443e301d7af8/src/stdlib/patches/3.12.0/camlinternalOO.ml | ocaml | *********************************************************************
Objective Caml
... |
* This file is part of ocamljs , OCaml to Javascript compiler
* Copyright ( C ) 2007 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Softwar... |
1a619c81f4961ec008845fb290bad961cea087648afbcd6ff6474d4c568b43a4 | erpuno/upl | upl_app.erl | -module(upl_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) -> upl_sup:start_link().
stop(_State) -> ok.
| null | https://raw.githubusercontent.com/erpuno/upl/170f71900feadd1160305a589b13b0846b51772d/src/upl_app.erl | erlang | -module(upl_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) -> upl_sup:start_link().
stop(_State) -> ok.
| |
96d3cec9d1cbb718158eb15c5b8a33a086963499a8318c535163172a1555ae6f | QDelta/fcomp | Gen.hs | module Core.Gen (genCore) where
import qualified Data.Map as M
import qualified Data.Set as S
import Common.Def
import Common.AST
import Type.Inf
import Core.Def
import Prim.Name
import Prim.Core
type GlobalInfo = (M.Map Ident Int, S.Set Ident) -- constructor tag, global name
genCore :: Program Name -> CoreProgram
... | null | https://raw.githubusercontent.com/QDelta/fcomp/eceb8e4ab9b10ece7f4671689b96e73ea7a8e8b3/app/Core/Gen.hs | haskell | constructor tag, global name | module Core.Gen (genCore) where
import qualified Data.Map as M
import qualified Data.Set as S
import Common.Def
import Common.AST
import Type.Inf
import Core.Def
import Prim.Name
import Prim.Core
genCore :: Program Name -> CoreProgram
genCore (dataGroups, valGroups) =
(coreConstrs, coreFns)
where
coreConstr... |
9fecda774986c5dcdbd0dd75f5125fbb0a023730e12b1a471262c1f76cfc0f17 | zlatozar/study-paip | examples-krep1.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CH14 - FIRST ; Base : 10 -*-
;;; Code from Paradigms of Artificial Intelligence Programming
Copyright ( c ) 1991
;;;; File examples-krep1.lisp
(in-package #:ch14-first)
(defexamples 14.1 "Knowledge Representation and Reasoning"
""
"In this chapter we ex... | null | https://raw.githubusercontent.com/zlatozar/study-paip/dfa1ca6118f718f5d47d8c63cbb7b4cad23671e1/ch14/examples-krep1.lisp | lisp | Syntax : COMMON - LISP ; Package : CH14 - FIRST ; Base : 10 -*-
Code from Paradigms of Artificial Intelligence Programming
File examples-krep1.lisp
store unique vars |
Copyright ( c ) 1991
(in-package #:ch14-first)
(defexamples 14.1 "Knowledge Representation and Reasoning"
""
"In this chapter we explore means of indexing facts so that they can be"
"retrieved and reasoned with efficiently."
""
"Section 14.1 to 14.7 discuss problems with logical reasoning systems"
"... |
d8e39e8096a5e63101c50c9ba6922f0a99994f5a768aaa78297ee6ae835d4a8a | vernemq/vernemq | vmq_reg_sup.erl | Copyright 2018 Erlio GmbH Basel Switzerland ( )
%%
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, sof... | null | https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_server/src/vmq_reg_sup.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2018 Erlio GmbH Basel Switzerland ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(vmq_reg_sup).
-behaviour(supervisor).
-export([
start_link/0,
start_reg_view/1,
stop_reg_view/1,
re... |
c694b13071c030d5e6edd4ac9b7449470d2ecf2fb8314a8c3c0aa81a9a435b9a | ANSSI-FR/mabo | printers.ml | MaBo - MRT & BGP pretty printers
* < >
* Guillaume Valadon <>
*)
open Types
open MrtTools
(** Split a string into a string list using the character c as the delimiter. *)
let rec split s c =
try
let w = String.index s c in
(safe_sub s 0 w)::(split ((safe_sub s (w+1) ((String.length s) -w-1))... | null | https://raw.githubusercontent.com/ANSSI-FR/mabo/19000c66f7ecf58eb9cfa66a4cc75a4c76f3ab20/src/printers.ml | ocaml | * Split a string into a string list using the character c as the delimiter.
* Return the last u elements of a list.
* Print an AS path
* Print the COMMUNITY attribute
* Print a list of prefixes
* Print the FROM line
* Sort the attributes according to their attr_type values.
Return BGPAttributeAS4_PATH only
De... | MaBo - MRT & BGP pretty printers
* < >
* Guillaume Valadon <>
*)
open Types
open MrtTools
let rec split s c =
try
let w = String.index s c in
(safe_sub s 0 w)::(split ((safe_sub s (w+1) ((String.length s) -w-1))) c)
with
|Not_found -> [s]
* a list of strings with a delimiter .
let rec... |
95b69f1d5ec1c17de68921153777a1fe1cd5b93928488162f9db6e220da6acf3 | LaurentMazare/ocaml-tqdm | utils.ml | open Base
let format_rate rate =
match Float.classify rate with
| Infinite | Nan | Zero -> "n/a"
| Normal | Subnormal ->
if Float.( < ) rate 1e-3
then Printf.sprintf "s/%5.0fit" (1. /. rate)
else if Float.( < ) rate 1.
then Printf.sprintf "s/%5.2fit" (1. /. rate)
else if Float.( < ) rate 1e3
... | null | https://raw.githubusercontent.com/LaurentMazare/ocaml-tqdm/a69e02408007038c2cb0cbb4793f564d5725a2ec/src/utils.ml | ocaml | open Base
let format_rate rate =
match Float.classify rate with
| Infinite | Nan | Zero -> "n/a"
| Normal | Subnormal ->
if Float.( < ) rate 1e-3
then Printf.sprintf "s/%5.0fit" (1. /. rate)
else if Float.( < ) rate 1.
then Printf.sprintf "s/%5.2fit" (1. /. rate)
else if Float.( < ) rate 1e3
... | |
59177e09cdf05eb7109d0ad9a3eb541812983265396eef334521ccd12dc75065 | acl2/acl2 | doc.lisp | C Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "C")
(i... | null | https://raw.githubusercontent.com/acl2/acl2/1e94e0bfb92e8caa9e90d9d5fe6afbed655bf8db/books/kestrel/c/atc/doc.lisp | lisp |
and
| C Library
Copyright ( C ) 2023 Kestrel Institute ( )
Copyright ( C ) 2023 Kestrel Technology LLC ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "C")
(include-book "kestrel/event-macros/xdoc-constructors" :dir :system)
(defxdoc atc
:p... |
b64b65da14286430a17ad82b00fed8da6f73ca4b13582ad56b1d7aca2655c93e | gvolpe/haskell-book-exercises | cipherspecs.hs | module CipherSpecs where
import Test.QuickCheck
import VigenereCipher (encode, decode)
TODO : It does not work for " a\NAK " find out why
vigenereSpec :: String -> Bool
vigenereSpec x = x == (decode (encode x))
cipherSpec :: IO ()
cipherSpec = do
quickCheck vigenereSpec
| null | https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter14/wordnumber/tests/cipherspecs.hs | haskell | module CipherSpecs where
import Test.QuickCheck
import VigenereCipher (encode, decode)
TODO : It does not work for " a\NAK " find out why
vigenereSpec :: String -> Bool
vigenereSpec x = x == (decode (encode x))
cipherSpec :: IO ()
cipherSpec = do
quickCheck vigenereSpec
| |
5aa3429c8912f433505b509950d7cf33c150627f402e459414ff5a0a79f40e02 | nikita-volkov/rerebase | NonEmpty.hs | module Data.List.NonEmpty
(
module Rebase.Data.List.NonEmpty
)
where
import Rebase.Data.List.NonEmpty
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/List/NonEmpty.hs | haskell | module Data.List.NonEmpty
(
module Rebase.Data.List.NonEmpty
)
where
import Rebase.Data.List.NonEmpty
| |
131badc4169743e6649e218c55bc62dbb37470ab094eaae32e42438670665780 | moby/vpnkit | fs9p.ml | open Lwt.Infix
open Fs9p_error.Infix
module P = Protocol_9p
let src = Logs.Src.create "fs9p" ~doc:"VFS to 9p"
module Log = (val Logs.src_log src : Logs.LOG)
let pp_fid =
let str x = P.Types.Fid.sexp_of_t x |> Sexplib.Sexp.to_string in
Fmt.of_to_string str
type 'a or_err = 'a Protocol_9p.Error.t Lwt.t
let ok x ... | null | https://raw.githubusercontent.com/moby/vpnkit/eb9ba90261fcfe167888d209339d4d8fb0985243/src/fs9p/fs9p.ml | ocaml | Note: we always need an extension for the Unix protocol, or
mortdeus will crash
Done
No more room
Linux will abort if we return an error. Instead, just return 0 items. Linux
will free up space in its buffer and try again.
if len = 0 && remaining <> [] then err_buffer_too_small
* Handle incom... | open Lwt.Infix
open Fs9p_error.Infix
module P = Protocol_9p
let src = Logs.Src.create "fs9p" ~doc:"VFS to 9p"
module Log = (val Logs.src_log src : Logs.LOG)
let pp_fid =
let str x = P.Types.Fid.sexp_of_t x |> Sexplib.Sexp.to_string in
Fmt.of_to_string str
type 'a or_err = 'a Protocol_9p.Error.t Lwt.t
let ok x ... |
9af1f106eb1b02f203fd154c0499bf672672fd52e4dbe37c06088ebb4dadee3d | spell-music/temporal-music-notation | Scales.hs | -- | Specific scales. Scale constructor makes scale that starts
-- at the given frequency.
module Temporal.Music.Scales
(
-- * just scales
ji3, ji5, ji7,
pyth,
hindGb,
hindFs,
justBP,
partchean,
luScale,
superJust, harmonicJust,
sruti,
-- * Irregular scales
eqt, eqts... | null | https://raw.githubusercontent.com/spell-music/temporal-music-notation/48e556e59e08c845aac40ea101266b144eab31c5/src/Temporal/Music/Scales.hs | haskell | | Specific scales. Scale constructor makes scale that starts
at the given frequency.
* just scales
* Irregular scales
* Subscales
-------------------------------------------------
-------------------------------------------------
equal temperament
| 12 tone equal temperament scale
| general equal temperam... |
module Temporal.Music.Scales
(
ji3, ji5, ji7,
pyth,
hindGb,
hindFs,
justBP,
partchean,
luScale,
superJust, harmonicJust,
sruti,
eqt, eqts, eqBP, hind,
| extracting 5 - tone scales out of 12 - tone scales
minor5, major5,
bluesMinor5, bluesMajor5, egyptian5,
| extr... |
54e77f8742a32ff726d76a051087914bbfb4539a8942f8998599903b5191dc5a | ocaml-multicore/tezos | block_locator.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/lib_base/block_locator.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2019 - 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , W... |
01a0697561d75a74d5873bb8125fe734c1a4b86046ac01cb7982937424874eec | re-ops/re-cipes | python.clj | (ns re-cipes.python
"Installing latest python versions"
(:require
[re-cog.resources.exec :refer [run]]
[re-cog.common.recipe :refer (require-recipe)]
[re-cog.resources.package :refer (package repository update-)]))
(require-recipe)
(def-inline python-3.7
"Setting up python 3.7"
[]
(repository "ppa:... | null | https://raw.githubusercontent.com/re-ops/re-cipes/183bdb637e54df1c6f20e8d529132e0c004e8ead/src/re_cipes/python.clj | clojure | (ns re-cipes.python
"Installing latest python versions"
(:require
[re-cog.resources.exec :refer [run]]
[re-cog.common.recipe :refer (require-recipe)]
[re-cog.resources.package :refer (package repository update-)]))
(require-recipe)
(def-inline python-3.7
"Setting up python 3.7"
[]
(repository "ppa:... | |
c1af0782bf4903322b203d79f6ea45f3512282f94d6e4f5d7646be121ce905d7 | hubski/hubski | publications.rkt | This file has been VERSIONED into the hub repo .
;; DO NOT change it from hub. Change in github.com/hubski/hubski,
;; and update the versioned file. Contributors WILL update this
;; file in hub without checking for changes.
#lang racket
(require json)
(require "arc-utils.rkt")
(provide
jsexpr->pub-sexp
pub-sexp->... | null | https://raw.githubusercontent.com/hubski/hubski/97ddebb02ff404edcf8db6e1a7889cfdf43b367a/publications.rkt | racket | DO NOT change it from hub. Change in github.com/hubski/hubski,
and update the versioned file. Contributors WILL update this
file in hub without checking for changes.
Whether the publication is publically viewable, or private to certain users.
\todo add contract
returns a list of the given value. Used because Arc ... | This file has been VERSIONED into the hub repo .
#lang racket
(require json)
(require "arc-utils.rkt")
(provide
jsexpr->pub-sexp
pub-sexp->jsexpr
publication-jsexpr?
try-string->jsexpr
pub-sexp->pub-hash
publication-is-public
nil->null
safe-unlist
hash-ref-or-nil
un-nil-list
list-add-hash-member
list-ad... |
4c568bd5966e3da5953a45b1b31c69b1ade072010a62593345f440b2f06df520 | geneweb/geneweb | hutil.mli | Copyright ( c ) 2007 INRIA
open Config
val header_without_http : config -> (bool -> unit) -> unit
* [ header_without_http conf title ] prints HTML page header in the body of the current response on the socket .
HTML page header consists of :
- < ! DOCTYPE > Declaration
- < head > tag where :
... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/hutil.mli | ocaml | * Calls for [Util.html] to print HTTP header and for [header_without_http] to print HTML page header.
Additionaly prints opening container <div> tag on the socket.
* [header conf title] calls for [header_without_page_title] to print HTTP header and HTML page header.
Additionaly prints page title with [title tr... | Copyright ( c ) 2007 INRIA
open Config
val header_without_http : config -> (bool -> unit) -> unit
* [ header_without_http conf title ] prints HTML page header in the body of the current response on the socket .
HTML page header consists of :
- < ! DOCTYPE > Declaration
- < head > tag where :
... |
e0eb89682303bde45afb3685f9aadec4051f335d42187e1c146e6f6eadd31b4e | kyleburton/sandbox | core.cljs | (ns web-app.core
(:require ))
(enable-console-print!)
(println "This text is printed from src/web-app/core.cljs. Go ahead and edit it and see reloading in action.")
;; define your app data so that it doesn't get over-written on reload
(defonce app-state (atom {:text "Hello world!"}))
(defn on-js-reload []
;... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/neo4j/web-app/src/web_app/core.cljs | clojure | define your app data so that it doesn't get over-written on reload
optionally touch your app-state to force rerendering depending on
your application
(swap! app-state update-in [:__figwheel_counter] inc) | (ns web-app.core
(:require ))
(enable-console-print!)
(println "This text is printed from src/web-app/core.cljs. Go ahead and edit it and see reloading in action.")
(defonce app-state (atom {:text "Hello world!"}))
(defn on-js-reload []
)
|
512291471747cf93e4a46b0c187fb5a15420dea6fb6ae2bd243160f4e1ed983f | RBornat/jape | usefile.ml |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either ver... | null | https://raw.githubusercontent.com/RBornat/jape/d2f507023c8a227e6862f9e5a16bb16ddeda692c/distrib/camlengine/usefile.ml | ocaml | Remove the stern of a path
Path separator is immaterial so we can mix unix/windows-style paths
in source files.
spurious |
Copyright ( C ) 2003 - 19
This file is part of the proof engine , which is part of .
is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either ver... |
8bbbcfcdc2d3029ee59a6a6829d714a4f5cc93e514b4d451667c37675334a2b1 | yesodweb/yesod | Media.hs | # LANGUAGE QuasiQuotes , TypeFamilies , TemplateHaskell , MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleInstances , ViewPatterns #
# OPTIONS_GHC -fno - warn - orphans #
module YesodCoreTest.Media (mediaTest, Widget) where
import Test.Hspec
import Yesod.Core
import Network.Wai
import Net... | null | https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-core/test/YesodCoreTest/Media.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes , TypeFamilies , TemplateHaskell , MultiParamTypeClasses #
# LANGUAGE FlexibleInstances , ViewPatterns #
# OPTIONS_GHC -fno - warn - orphans #
module YesodCoreTest.Media (mediaTest, Widget) where
import Test.Hspec
import Yesod.Core
import Network.Wai
import Network.Wai.Test
import YesodCoreTest.... |
4a3edc74528e9d396ad044afe12b9a56e1be0764a6df2f9070c2313f1b5dfa74 | haskellfoundation/error-message-index | NullaryClass.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DerivingStrategies #
# LANGUAGE StandaloneDeriving #
module NullaryClass where
class ThisClassHasNoParameters
deriving stock instance ThisClassHasNoParameters
| null | https://raw.githubusercontent.com/haskellfoundation/error-message-index/6b80c2fe6d8d2941190bda587bcea6f775ded0a4/message-index/messages/GHC-04956/nullary-class/before/NullaryClass.hs | haskell | # LANGUAGE DeriveAnyClass # | # LANGUAGE DerivingStrategies #
# LANGUAGE StandaloneDeriving #
module NullaryClass where
class ThisClassHasNoParameters
deriving stock instance ThisClassHasNoParameters
|
783dde879ff338f7eeecad8ffc65e54c4faf7174bb10449995a8cf6666fca01a | ghc/ghc | T22645.hs | module T22645 where
import Data.Coerce
type T :: (* -> *) -> * -> *
data T m a = MkT (m a)
p :: Coercible a b => T Maybe a -> T Maybe b
p = coerce
| null | https://raw.githubusercontent.com/ghc/ghc/3d55d8ab51ece43c51055c43c9e7aba77cce46c0/testsuite/tests/typecheck/should_fail/T22645.hs | haskell | module T22645 where
import Data.Coerce
type T :: (* -> *) -> * -> *
data T m a = MkT (m a)
p :: Coercible a b => T Maybe a -> T Maybe b
p = coerce
| |
ce50e38c2c4a95ab2f09e85306a3c6592df180f5c9c5dfb6ac685cc06d3eec9b | fredrikt/yxa | event_handler.erl | %%%-------------------------------------------------------------------
%%% File : event_handler.erl
@author < >
%%% @doc Event handler event manager. Receives all the events and
%%% sends them on to all your configured event handlers.
%%%
@since 6 Dec 2004 by < >
%%% @end
%%%---------... | null | https://raw.githubusercontent.com/fredrikt/yxa/85da46a999d083e6f00b5f156a634ca9be65645b/src/event_handler/event_handler.erl | erlang | -------------------------------------------------------------------
File : event_handler.erl
@doc Event handler event manager. Receives all the events and
sends them on to all your configured event handlers.
@end
-------------------------------------------------------------------
-compile(export_... | @author < >
@since 6 Dec 2004 by < >
-module(event_handler).
-export([
start_link/1,
stop/0,
generic_event/4,
generic_event/5,
new_request/6,
request_info/3,
uas_result/5,
uac_result/4
]).
-include("siprecords.hrl").
Macros
-define(SERVER, event_mgr).
@spec ( AppName ) -... |
2cadd4731e8a2082fb8f77486b9f3b345ddf884bf68950623d15f74776731ba6 | wdebeaum/step | walnut.lisp | ;;;;
W::WALNUT
;;;;
(define-words :pos W::n
:words (
(W::WALNUT
(senses
((LF-PARENT ONT::NUTS-SEEDS)
(TEMPL COUNT-PRED-TEMPL)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/walnut.lisp | lisp | W::WALNUT
(define-words :pos W::n
:words (
(W::WALNUT
(senses
((LF-PARENT ONT::NUTS-SEEDS)
(TEMPL COUNT-PRED-TEMPL)
)
)
)
))
| |
0de5907db0a75f44995a1a90e53751900ecb5a2e5278df0519e8a20dfc7c3e58 | ryszard/clsql | test-oodml.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; ======================================================================
File :
Author : < >
;;;; Created: 01/04/2004
;;;; Updated: $Id$
;;;;
;;;; Tests for the CLSQL Object Oriented Data Definition Language
;;;; (OODML).
;;;;
This fil... | null | https://raw.githubusercontent.com/ryszard/clsql/9aafcb72bd7ca1d7e908938b6a5319753b3371d9/tests/test-oodml.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
======================================================================
Created: 01/04/2004
Updated: $Id$
Tests for the CLSQL Object Oriented Data Definition Language
(OODML).
(), also known as the LLGPL.
===========================================================... | File :
Author : < >
This file is part of CLSQL .
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
(in-package #:clsql-tests)
#.(clsql:locally-enable-sql-reader-syntax)
(setq *rt-oodml*
'(
(deftest ... |
d90bc0cc1d85ee9e24b9fbb60de1b08c3f3b2d7db978feef7dd3cb3ab29e0df0 | kana-sama/sicp | 1.40 - cubic equation.scm | (load "1/1.35 - search golden ratio by fixed point.scm")
(define dx 0.0001)
(define (deriv g)
(lambda (x) (/ (- (g (+ x dx)) (g x)) dx)))
(define (newton-transform g)
(let ((g* (deriv g)))
(lambda (x) (- x (/ (g x) (g* x))))))
(define (newtons-method g guess)
(fixed-point (newton-transform g) guess))
y ... | null | https://raw.githubusercontent.com/kana-sama/sicp/fc637d4b057cfcae1bae3d72ebc08e1af52e619d/1/1.40%20-%20cubic%20equation.scm | scheme | (load "1/1.35 - search golden ratio by fixed point.scm")
(define dx 0.0001)
(define (deriv g)
(lambda (x) (/ (- (g (+ x dx)) (g x)) dx)))
(define (newton-transform g)
(let ((g* (deriv g)))
(lambda (x) (- x (/ (g x) (g* x))))))
(define (newtons-method g guess)
(fixed-point (newton-transform g) guess))
y ... | |
52a7b51f85cdfd98e418c08e4d7a8924a7d36062342a17175b36e06d1d9ae14f | MinaProtocol/mina | impls.mli | open Pickles_types
module Wrap_impl :
module type of Snarky_backendless.Snark.Run.Make (Backend.Tock)
module Step : sig
module Impl : module type of Snarky_backendless.Snark.Run.Make (Backend.Tick)
include module type of Impl
module Verification_key = Backend.Tick.Verification_key
module Proving_key = B... | null | https://raw.githubusercontent.com/MinaProtocol/mina/8403887a428f56e91bfdf4187c6b8dc260e5424a/src/lib/pickles/impls.mli | ocaml | open Pickles_types
module Wrap_impl :
module type of Snarky_backendless.Snark.Run.Make (Backend.Tock)
module Step : sig
module Impl : module type of Snarky_backendless.Snark.Run.Make (Backend.Tick)
include module type of Impl
module Verification_key = Backend.Tick.Verification_key
module Proving_key = B... | |
775ca1835e130f6186ee557408da419bc07f0d23fbaf13e482cdb484b83cc64e | klarna-incubator/system_monitor | system_monitor_sup.erl | %%--------------------------------------------------------------------------------
%% Copyright 2020 Klarna Bank AB
%%
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
%%
... | null | https://raw.githubusercontent.com/klarna-incubator/system_monitor/8c323a005417159b124f462e8722a7ea664a3b18/src/system_monitor_sup.erl | erlang | --------------------------------------------------------------------------------
Copyright 2020 Klarna Bank AB
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... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(system_monitor_sup).
TODO : does n't like this one :
-export([start_link/0]).
-export([init/1, post_init/1]).
Macros
-define(SERVER, ?MODULE).
-define(SUP2, sys... |
0e3b04bec2386e369263b17bddb76cb9322e42a6cdeda04702f3d18bfb04e00e | clojureverse/clojurians-log-app | datomic.clj | (ns clojurians-log.datomic
(:require [com.stuartsierra.component :as component]
[datomic.client.api :as d]))
(def cloud? true)
(defrecord Datomic [config client conn]
component/Lifecycle
(start [component]
(let [client (d/client config)
db (d/create-database client {:db-name (:db-n... | null | https://raw.githubusercontent.com/clojureverse/clojurians-log-app/d34c9bd715e492c8f1899653548716d32c623fad/profiles/datomic_cloud/clojurians_log/datomic.clj | clojure | (ns clojurians-log.datomic
(:require [com.stuartsierra.component :as component]
[datomic.client.api :as d]))
(def cloud? true)
(defrecord Datomic [config client conn]
component/Lifecycle
(start [component]
(let [client (d/client config)
db (d/create-database client {:db-name (:db-n... | |
655614f57afe24a83ac6da8b36fa8cd987e0eee1e4939079367897ae39f13a64 | bobot/FetedelascienceINRIAsaclay | movement.ml | File : movement.ml
Copyright ( C ) 2008
< >
< >
WWW : /
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the ... | null | https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/examples_mindstorm_lab/rubik/movement.ml | ocaml | * We parametrise the solver by the connections to the ports (so as to
change them easily)
* Indicates whether the cube is is not held by the "hand".
* Reset the position of the fighter after having kicked the cube
let the bump happen before measuring again
* Turn the platform slowly to adjust it with precisio... | File : movement.ml
Copyright ( C ) 2008
< >
< >
WWW : /
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the ... |
17a93e06d510d95f627082b81a64335346bc914fec114b5b69cb111832c2dc1a | appleshan/cl-http | cl-http-70-65.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
Patch file for CL - HTTP version 70.65
;;; Reason: I saw a case where the indices were in the right relationship but stream-input-buffer was
NIL , so the call to % SETUP - NEXT - PHYSICAL - INPUT - BUFFER was being skippe... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/server/patch/cl-http-70/cl-http-70-65.lisp | lisp | Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
Reason: I saw a case where the indices were in the right relationship but stream-input-buffer was
Function (DEFUN-IN-FLAVOR TCP::%READ-BYTE TCP::CHUNK-TRANSFER-DECODING-INPUT-STREAM-MIXIN): include existence of si:stream-input-buffer in te... | Patch file for CL - HTTP version 70.65
NIL , so the call to % SETUP - NEXT - PHYSICAL - INPUT - BUFFER was being skipped when it ought not
to be . --
Written by , 8/28/00 07:39:45
while running on from FUJI:/usr / users / reti / Genera-8 - 5 - MIT - all - who - calls - inc.vlod
with Open Genera 2.0 , Gen... |
f4f1e1f54824064a2dcf1c999b5009ce1c907327ec1b23c7b2eeeb907a219e3c | SecPriv/webspec | config.ml | (********************************************************************************)
Copyright ( c ) 2021
(* *)
(* Permission is hereby granted, free of charge, to any person obtaining a *)
(* c... | null | https://raw.githubusercontent.com/SecPriv/webspec/9f500bd85400551d8bf0e117ac5aa57088f9bc20/compiler/src/config.ml | ocaml | ******************************************************************************
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
th... | Copyright ( c ) 2021
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABI... |
9744b6fc76863dbb188f289461b9f762cd3e555ee585d25f27ad261d3e14a571 | yogthos/krueger | common.clj | (ns krueger.routes.services.common
(:require
[clojure.tools.logging :as log]
[ring.util.http-response :refer [internal-server-error]]
[schema.core :as s]))
(s/defschema Success {:result s/Keyword})
(defn user-id [req]
(get-in req [:session :identity :id]))
(defmacro handler
"wraps handler in a try-... | null | https://raw.githubusercontent.com/yogthos/krueger/782e1f8ab358867102b907c5a80e56ee6bc6ff82/src/clj/krueger/routes/services/common.clj | clojure | (ns krueger.routes.services.common
(:require
[clojure.tools.logging :as log]
[ring.util.http-response :refer [internal-server-error]]
[schema.core :as s]))
(s/defschema Success {:result s/Keyword})
(defn user-id [req]
(get-in req [:session :identity :id]))
(defmacro handler
"wraps handler in a try-... | |
608d7f7ec33d946cfb5c1a4e16b18e1473618348892ece2bc4559b80bf4d9929 | locusmath/locus | object.clj | (ns locus.partial.copresheaf.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.mapping.function.image.image-function :refer :all]
[locus.set.logic.structur... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/partial/copresheaf/object.clj | clojure | A functor F : C -> Sets[Part] is a functor from a category to the category of sets and partial
functions. The category Sets[Part] of sets and partial functions is a concrete category,
partial function don't exist. It follows therefore that as a functor to a concrete category,
it is a structure copresheaf. So it wil... | (ns locus.partial.copresheaf.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.sequence.object :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.mapping.function.image.image-function :refer :all]
[locus.set.logic.structur... |
50ae1b8da88f40595f4e22b84ef7bd451718a05354718d9d46a3b5e5cc4f95f1 | exoscale/clojure-kubernetes-client | extensions_v1beta1_pod_security_policy.clj | (ns clojure-kubernetes-client.specs.extensions-v1beta1-pod-security-policy
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.extensions-v1beta1-pod-security-policy-spec :r... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/extensions_v1beta1_pod_security_policy.clj | clojure | (ns clojure-kubernetes-client.specs.extensions-v1beta1-pod-security-policy
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.extensions-v1beta1-pod-security-policy-spec :r... | |
c0fc5b0b61ff1922067ece70c076986edfda5c7c00a7bd24eeec9977788ad07b | samply/blaze | app.clj | (ns blaze.handler.app
(:require
[blaze.handler.health.spec]
[blaze.rest-api.spec]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[reitit.ring]
[ring.util.response :as ring]
[taoensso.timbre :as log]))
(defn- options-handler [_ respond _]
(-> (ring/response nil)
(ring/status 4... | null | https://raw.githubusercontent.com/samply/blaze/a2cfdd8d37b92c7c454dc2322301b6a5188e578f/src/blaze/handler/app.clj | clojure | (ns blaze.handler.app
(:require
[blaze.handler.health.spec]
[blaze.rest-api.spec]
[clojure.spec.alpha :as s]
[integrant.core :as ig]
[reitit.ring]
[ring.util.response :as ring]
[taoensso.timbre :as log]))
(defn- options-handler [_ respond _]
(-> (ring/response nil)
(ring/status 4... | |
2f93d2fb560a7029501539579cf99ec9d505fdeb62058f126052da93a880c608 | ralph-schleicher/read-number | tests.lisp | ;;; tests.lisp --- test procedure
Copyright ( C ) 2016
;; Redistribution and use in source and binary forms, with or without
;; modification, are permitted provided that the following conditions
;; are met:
;;
;; * Redistributions of source code must retain the above copyright
;; notice, this list of cond... | null | https://raw.githubusercontent.com/ralph-schleicher/read-number/79fba40febd77b7793c42b5c5aa2bfdc5dfe80a2/tests.lisp | lisp | tests.lisp --- test procedure
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
... |
Copyright ( C ) 2016
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING ,
CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN CONTRACT , STRICT
(in-package :common... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.