_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 |
|---|---|---|---|---|---|---|---|---|
569448ed3f796664b4c9227004ed3114e816a9a12cdab8a14739d22f27d81111 | tschady/advent-of-code | d09_test.clj | (ns aoc.2017.d09-test
(:require [aoc.2017.d09 :as sut]
[clojure.test :refer :all]))
(deftest challenges
(is (= 7640 (sut/part-1 sut/input)))
(is (= 4368 (sut/part-2 sut/input))))
| null | https://raw.githubusercontent.com/tschady/advent-of-code/9ec6b4e493dca78af43b7d95676628109181da0a/test/aoc/2017/d09_test.clj | clojure | (ns aoc.2017.d09-test
(:require [aoc.2017.d09 :as sut]
[clojure.test :refer :all]))
(deftest challenges
(is (= 7640 (sut/part-1 sut/input)))
(is (= 4368 (sut/part-2 sut/input))))
| |
55800a60e53a51c965e02ca8b7c8ae49cb3dffa4d97bfc99e1ec9d9ddcdea891 | instedd/planwise | file_store.clj | (ns planwise.component.file-store
(:require [planwise.boundary.file-store :as boundary]
[planwise.util.files :as files]
[integrant.core :as ig]
[clojure.spec.alpha :as s]
[clojure.java.io :as io]
[taoensso.timbre :as timbre]))
(timbre/refer-timbre)
;; Ser... | null | https://raw.githubusercontent.com/instedd/planwise/1bc2a5742ae3dc377dddf1f9e9bb60f0d2f59084/src/planwise/component/file_store.clj | clojure | Service implementation ====================================================
Service definition ========================================================
REPL testing ===============================================================
| (ns planwise.component.file-store
(:require [planwise.boundary.file-store :as boundary]
[planwise.util.files :as files]
[integrant.core :as ig]
[clojure.spec.alpha :as s]
[clojure.java.io :as io]
[taoensso.timbre :as timbre]))
(timbre/refer-timbre)
(defn... |
4530bb890543b0c156fb146b6dcd3ef833d400d837da2aaaa381f51c60300e5a | melhadad/fuf | type.lisp | ;;; -*- Mode:Lisp; Syntax:Common-Lisp; Package:FUG5 -*-
;;; -----------------------------------------------------------------------
;;; File: type.l
;;; Description: Functions to define and manipulate types for FUGs
Author :
;;; Created: 02-Nov-88
Modified : 27 - Nov-88
3... | null | https://raw.githubusercontent.com/melhadad/fuf/57bd0e31afc6aaa03b85f45f4c7195af701508b8/src/type.lisp | lisp | -*- Mode:Lisp; Syntax:Common-Lisp; Package:FUG5 -*-
-----------------------------------------------------------------------
File: type.l
Description: Functions to define and manipulate types for FUGs
Created: 02-Nov-88
20 Jun 90 Allowed for equations in special-unify.
28... | Author :
Modified : 27 - Nov-88
30 Apr 90 Define special attributes with proc . .
02 Jul 90 use .
27 Nov 91 added unify - cset
17 May 92 Use path2 instead of path1 in proc.unification .
01 Jun 93 : Added option = = in cs... |
564cd8bd560bf2c090329f6b2b4682e553d4867a66d1d1fb646bce4712051769 | racket/web-server | status-code.rkt | #lang racket/base
(require racket/contract
racket/match
(only-in racket/string
non-empty-string?))
(provide/contract
[message-for-status-code
(number? . -> . (or/c false/c non-empty-string?))]
[DEFAULT-STATUS-MESSAGE
bytes?]
[infer-response-message
(number? (or/c false/c b... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/http/status-code.rkt | racket | HTTP status codes coming from
+ Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content
()
+ Hypertext Transfer Protocol (HTTP/1.1): Authentication
()
RFC 7233
RFC 7538 | #lang racket/base
(require racket/contract
racket/match
(only-in racket/string
non-empty-string?))
(provide/contract
[message-for-status-code
(number? . -> . (or/c false/c non-empty-string?))]
[DEFAULT-STATUS-MESSAGE
bytes?]
[infer-response-message
(number? (or/c false/c b... |
33b6725f10038d17eb66fb54d69df4b93d6244a18847049d4f39c1fbdf305a72 | rksm/clj-org-analyzer | file_chooser.cljs | (ns org-analyzer.view.file-chooser
(:require [reagent.core :as r]))
(defn file-chooser [title files non-existing-files on-confirm]
(r/with-let [files (r/atom files)
adding (r/atom nil)]
[:div.file-chooser
[:h3 title]
(doall (for [f @files]
^{:key f} [:div.file
... | null | https://raw.githubusercontent.com/rksm/clj-org-analyzer/19da62aa4dcf1090be8f574f6f2d4c7e116163a8/src/org_analyzer/view/file_chooser.cljs | clojure | (ns org-analyzer.view.file-chooser
(:require [reagent.core :as r]))
(defn file-chooser [title files non-existing-files on-confirm]
(r/with-let [files (r/atom files)
adding (r/atom nil)]
[:div.file-chooser
[:h3 title]
(doall (for [f @files]
^{:key f} [:div.file
... | |
9ba3a1fe65fc9544a9b97667c64ec29ec39b679d830fd67578da936c25437d4e | ndmitchell/catch | Prepare.hs |
module Prepare.Firstify.Prepare(prepare) where
import Yhc.Core hiding (collectAllVars,collectFreeVars,uniqueBoundVars,replaceFreeVars)
import Yhc.Core.FreeVar2
import Data.List
import Data.Maybe
import qualified Data.Map as Map
prepare :: Core -> CoreFuncMap
prepare = lambdas . zeroApp . toCoreFuncMap . removeRecu... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/catch_1/Prepare/Firstify/Prepare.hs | haskell | insert explicit lambdas
make sure all applications are explicit |
module Prepare.Firstify.Prepare(prepare) where
import Yhc.Core hiding (collectAllVars,collectFreeVars,uniqueBoundVars,replaceFreeVars)
import Yhc.Core.FreeVar2
import Data.List
import Data.Maybe
import qualified Data.Map as Map
prepare :: Core -> CoreFuncMap
prepare = lambdas . zeroApp . toCoreFuncMap . removeRecu... |
be1e601b9a0907dd93153066dd6aad3d6b4a3f0fb212ad491b01f1b55e5fbae9 | etalab/sill.etalab.gouv.fr | test.clj | Copyright ( c ) 2019 - 2022 DINUM , < >
SPDX - License - Identifier : EPL-2.0
;; License-Filename: LICENSES/EPL-2.0.txt
(ns sillweb.test
(:require [clojure.test :refer :all]
[sillweb.config :as config]))
(deftest test-environment-variables
(testing "Checking if all environment variables contain... | null | https://raw.githubusercontent.com/etalab/sill.etalab.gouv.fr/1a2e866cd2ada33f7c5ab7cb81042a456fa368f5/test/sillweb/test.clj | clojure | License-Filename: LICENSES/EPL-2.0.txt | Copyright ( c ) 2019 - 2022 DINUM , < >
SPDX - License - Identifier : EPL-2.0
(ns sillweb.test
(:require [clojure.test :refer :all]
[sillweb.config :as config]))
(deftest test-environment-variables
(testing "Checking if all environment variables contain strings."
(is (and (string? (System/g... |
8b7171dda26b69bd6b29c7664ba407379ac3be888e163c7fa39be11e68d73a4c | HealthSamurai/dojo.clj | redirect.cljs | (ns zframes.redirect
(:require [re-frame.core :as rf]
[zframes.window-location :as window-location]
[zframes.routing]
[clojure.string :as str]))
(defn page-redirect [url]
(set! (.-href (.-location js/window)) url))
(defn redirect [url]
(set! (.-hash (.-location js/window)) ur... | null | https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/ui/src/zframes/redirect.cljs | clojure | (ns zframes.redirect
(:require [re-frame.core :as rf]
[zframes.window-location :as window-location]
[zframes.routing]
[clojure.string :as str]))
(defn page-redirect [url]
(set! (.-href (.-location js/window)) url))
(defn redirect [url]
(set! (.-hash (.-location js/window)) ur... | |
155fd148166dcff64656ed5955559d67ee378e2c17f5af755e61f8c6e57656e4 | fulcro-legacy/fulcro-datomic | util_spec.clj | (ns fulcro.datomic.impl.util-spec
(:require [fulcro-spec.core :refer [specification assertions]]
[fulcro.datomic.impl.util :as util]
[taoensso.timbre :refer [debug info fatal error]]
[clojure.tools.namespace.find :refer [find-namespaces]]
[clojure.java.classpath :refer ... | null | https://raw.githubusercontent.com/fulcro-legacy/fulcro-datomic/262fb629fc250a8675afacf7b16ac876d47cb597/specs/fulcro/datomic/impl/util_spec.clj | clojure | (ns fulcro.datomic.impl.util-spec
(:require [fulcro-spec.core :refer [specification assertions]]
[fulcro.datomic.impl.util :as util]
[taoensso.timbre :refer [debug info fatal error]]
[clojure.tools.namespace.find :refer [find-namespaces]]
[clojure.java.classpath :refer ... | |
254690018bc1e510d20c5d2ffb0fe8a149b9f2d1e0b38c2041b1f69eb4979df0 | input-output-hk/hydra | LogFilter.hs | -- | Utility functions to filter and simplify raw logs.
module Hydra.LogFilter where
import Control.Lens (Traversal', at, (.~), (?~), (^..), (^?))
import Data.Aeson (Value (Array, Null))
import Data.Aeson.Lens (key, values, _Object)
import Hydra.Prelude
filterLog :: Value -> Maybe Value
filterLog entry = do
guard (... | null | https://raw.githubusercontent.com/input-output-hk/hydra/54d6e4507fa4a67bb52a1507249e836e23e592bf/hydra-cluster/src/Hydra/LogFilter.hs | haskell | | Utility functions to filter and simplify raw logs. | module Hydra.LogFilter where
import Control.Lens (Traversal', at, (.~), (?~), (^..), (^?))
import Data.Aeson (Value (Array, Null))
import Data.Aeson.Lens (key, values, _Object)
import Hydra.Prelude
filterLog :: Value -> Maybe Value
filterLog entry = do
guard (entry ^? key "message" . key "tag" == Just "Node")
nod... |
10edc74aef686e0d72cdb31620aea62e8dfbca12f95aff78779184ed1799010c | metosin/reitit | project.clj | (defproject metosin/reitit-http "0.6.0"
:description "Reitit: HTTP routing with interceptors"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url ""
:dir "../.."}
:plugins [[lein-parent "0.3.2"]]
:parent-project {:path "../../project.clj"
... | null | https://raw.githubusercontent.com/metosin/reitit/47f1ee0c8407cdc6a6dbf7bf58b6eb682531a3f7/modules/reitit-http/project.clj | clojure | (defproject metosin/reitit-http "0.6.0"
:description "Reitit: HTTP routing with interceptors"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git"
:url ""
:dir "../.."}
:plugins [[lein-parent "0.3.2"]]
:parent-project {:path "../../project.clj"
... | |
0977df64dd45e5fe37d855fa6dabe531d1bd3ede4807cee7e9ff5630411e6438 | zachjs/sv2v | NamedBlock.hs | sv2v
- Author : < >
-
- Conversion for unnamed blocks with contain data declarations
-
- SystemVerilog allows data declarations to appear in all blocks , but Verilog
- allows them to appear only in blocks that are named . This conversion gives
- such blocks a unique name to placate strict Veri... | null | https://raw.githubusercontent.com/zachjs/sv2v/54ea7d55d549e355823aa76664eba55d5959efa4/src/Convert/NamedBlock.hs | haskell | sv2v
- Author : < >
-
- Conversion for unnamed blocks with contain data declarations
-
- SystemVerilog allows data declarations to appear in all blocks , but Verilog
- allows them to appear only in blocks that are named . This conversion gives
- such blocks a unique name to placate strict Veri... | |
85c27d1757e79ccbf75fc800dd1f476c84f50213e6e39c8d0e43e3e77ecb8f61 | jaredloomis/Haskell-OpenGL | Main.hs | # LANGUAGE DataKinds #
module Main where
import Control.Monad.State (unless, execStateT)
import Data.Vec ((:.)(..), Vec2)
import qualified Graphics.UI.GLFW as GLFW
import Graphics.Rendering.OpenGL.Raw (GLfloat)
import Engine.Core.Types (
World(..), WorldState(..),
Input(..), Pla... | null | https://raw.githubusercontent.com/jaredloomis/Haskell-OpenGL/5c7363bbc07c5064e49b608d689cda2cab99f3eb/src/Main.hs | haskell | Create default world.
Make cursor Hidden.
Set cursor as hidden or visible.
Update the world time and delta.
Update player input.
print $ playerRotation player
Update player
Update the rest of the world. | # LANGUAGE DataKinds #
module Main where
import Control.Monad.State (unless, execStateT)
import Data.Vec ((:.)(..), Vec2)
import qualified Graphics.UI.GLFW as GLFW
import Graphics.Rendering.OpenGL.Raw (GLfloat)
import Engine.Core.Types (
World(..), WorldState(..),
Input(..), Pla... |
3b3483d77e05510d01bd84ef75efd2e54d697ed3a289bc5a84affa09eb6137ae | janestreet/accessor_base | accessor_set.ml | open! Base
open! Import
let memi key =
Accessor.fieldi
~get:(fun t -> key, Set.mem t key)
~set:(fun t is_mem -> if is_mem then Set.add t key else Set.remove t key)
;;
let mem key = memi key @> Accessor.map_index Accessor.Index.tl
let foundi key = memi key @> Accessor_bool.true_
let found key = foundi key @>... | null | https://raw.githubusercontent.com/janestreet/accessor_base/8384c29a37e557168ae8a43b2a5a531f0ffc16e4/src/accessor_set.ml | ocaml | open! Base
open! Import
let memi key =
Accessor.fieldi
~get:(fun t -> key, Set.mem t key)
~set:(fun t is_mem -> if is_mem then Set.add t key else Set.remove t key)
;;
let mem key = memi key @> Accessor.map_index Accessor.Index.tl
let foundi key = memi key @> Accessor_bool.true_
let found key = foundi key @>... | |
d0001da3d860ba9064a8d9b6478fa39825bdf4e5c4a31ee298ae8226ae5dfb7e | sky-big/RabbitMQ | rabbit_tracing_files.erl | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WA... | null | https://raw.githubusercontent.com/sky-big/RabbitMQ/d7a773e11f93fcde4497c764c9fa185aad049ce2/plugins-src/rabbitmq-tracing/src/rabbit_tracing_files.erl | erlang | compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
--------------------------------------------------------------------
列出当前所有的... | The contents of this file are subject to the Mozilla Public License
Version 1.1 ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
... |
48471c1b70b2f63638e5d00bb1a36518f46f782b2705965404e42ac9812d9e29 | adamdoupe/find_ear_rails | parse_helper.ml |
open Utils
let set_lexbuf_fname lexbuf name =
lexbuf.Lexing.lex_curr_p <-
{lexbuf.Lexing.lex_curr_p with
Lexing.pos_fname = name
}
let set_lexbuf_lineno lexbuf line =
lexbuf.Lexing.lex_curr_p <-
{lexbuf.Lexing.lex_curr_p with
Lexing.pos_lnum = line
}
let uniq_list lst =
let rec... | null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/src/parser/parse_helper.ml | ocaml | determines if the given Ast.expr is a special case
return a string delimiter (%|..|) that is not used in the string
Ast.mod_ast (replace_heredoc state) ast |
open Utils
let set_lexbuf_fname lexbuf name =
lexbuf.Lexing.lex_curr_p <-
{lexbuf.Lexing.lex_curr_p with
Lexing.pos_fname = name
}
let set_lexbuf_lineno lexbuf line =
lexbuf.Lexing.lex_curr_p <-
{lexbuf.Lexing.lex_curr_p with
Lexing.pos_lnum = line
}
let uniq_list lst =
let rec... |
dd167bdd145e384fe4a5791ab9bdae74a40a7ce9eb9edf5003b1b24006293da3 | pkhuong/Napa-FFT3 | example.lisp | (defun emit-raw32-file (file data &optional (max 1d0))
(with-open-file (s file :direction :output :element-type '(signed-byte 32)
:if-exists :supersede)
(write-sequence (map-into (make-array (length data) :element-type '(signed-byte 32))
(lambda (data)
... | null | https://raw.githubusercontent.com/pkhuong/Napa-FFT3/f2d9614c7167da327c9ceebefb04ff6eae2d2236/example.lisp | lisp | this would be a heap or a quickselect if I cared | (defun emit-raw32-file (file data &optional (max 1d0))
(with-open-file (s file :direction :output :element-type '(signed-byte 32)
:if-exists :supersede)
(write-sequence (map-into (make-array (length data) :element-type '(signed-byte 32))
(lambda (data)
... |
ef00af7f1c1ef9bb7922b1f3e7a4593ee29be3f034e20f11f4659d08ed81969f | heroku/clojure-getting-started | project.clj | (defproject clojure-getting-started "1.0.0-SNAPSHOT"
:description "Demo Clojure web app"
:url "-getting-started.herokuapp.com"
:license {:name "Eclipse Public License v1.0"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]
[compojure "1.6.1"]
[ring/rin... | null | https://raw.githubusercontent.com/heroku/clojure-getting-started/66b7456a4f2a42cbf4b9851283a9dc61b86af3e8/project.clj | clojure | (defproject clojure-getting-started "1.0.0-SNAPSHOT"
:description "Demo Clojure web app"
:url "-getting-started.herokuapp.com"
:license {:name "Eclipse Public License v1.0"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.0"]
[compojure "1.6.1"]
[ring/rin... | |
43c2800c4c69d6ff8e5665d54e561b5afc4d348987ae0bc5bd7387f167462984 | hidaris/thinking-dumps | ast.rkt | #lang typed/racket
(provide (all-defined-out))
;;; Expr
(define-type Expr
(U Const
Var
Nullary
Unary
Binary
If
Let
Cond))
(struct Const
([v : (U Real Boolean)])
#:transparent)
(struct Unary
([op : Var]
[e : Expr])
#:transparent)
(struct Binary
([op : Var]
[n1 : ... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-12/ast.rkt | racket | Expr
Value | #lang typed/racket
(provide (all-defined-out))
(define-type Expr
(U Const
Var
Nullary
Unary
Binary
If
Let
Cond))
(struct Const
([v : (U Real Boolean)])
#:transparent)
(struct Unary
([op : Var]
[e : Expr])
#:transparent)
(struct Binary
([op : Var]
[n1 : Expr]
... |
c4f97e3c1c9e6a042c0763a7bdb7b9605b765122d8fb11dfabd6e17fb329fe2b | janestreet/incr_dom | main.ml | open! Core
open! Incr_dom
open! Js_of_ocaml
module App = Incr_dom_text_input_example_lib.App
let () =
Start_app.start
(module App)
~bind_to_element_with_id:"app"
~initial_model:App.initial_model
;;
| null | https://raw.githubusercontent.com/janestreet/incr_dom/56c04e44d6a8f1cc9b2b841495ec448de4bf61a1/example/text_input/bin/main.ml | ocaml | open! Core
open! Incr_dom
open! Js_of_ocaml
module App = Incr_dom_text_input_example_lib.App
let () =
Start_app.start
(module App)
~bind_to_element_with_id:"app"
~initial_model:App.initial_model
;;
| |
42e4b0d002d6c8e064dabb33457ac2a3e7700c31ba5730bba6132ffbcda700ac | Soostone/hs-d3 | ChartSpec.hs | # LANGUAGE ExtendedDefaultRules #
{-# LANGUAGE ScopedTypeVariables #-}
# OPTIONS_GHC -fno - warn - type - defaults #
# OPTIONS_GHC -fno - warn - orphans #
module ChartSpec where
import Test.Hspec
import Graphics.HSD3.Chart
import Graphics.HSD3.Theme
import Utils
spec :: Spec
spec = describe "Chart" $ do
des... | null | https://raw.githubusercontent.com/Soostone/hs-d3/fb319ba444e263d7bc9655436db2723115a01c46/test/suite/ChartSpec.hs | haskell | # LANGUAGE ScopedTypeVariables # | # LANGUAGE ExtendedDefaultRules #
# OPTIONS_GHC -fno - warn - type - defaults #
# OPTIONS_GHC -fno - warn - orphans #
module ChartSpec where
import Test.Hspec
import Graphics.HSD3.Chart
import Graphics.HSD3.Theme
import Utils
spec :: Spec
spec = describe "Chart" $ do
describe "Bar Graph, with records" $ do
... |
f14524f4c11b1897d0e2eab3641aa8477a3bce91ffd50daef6697617dc6581bf | asivitz/Hickory | GLFW.hs | module Platforms.GLFW where
import Data.IORef (IORef)
import Hickory.Input
import Hickory.Platform
import Hickory.Types (Size)
import qualified Graphics.UI.GLFW as GLFW
import qualified Platforms.GLFW.Bridge as Bridge
makeGLFWInputPoller :: GLFW.Window -> IO (IO [RawInput])
makeGLFWInputPoller win = makeInputPoller (... | null | https://raw.githubusercontent.com/asivitz/Hickory/d2cea2f1751cf1cdf328dc48f03a1be9c5e70bec/GLFW/Platforms/GLFW.hs | haskell | module Platforms.GLFW where
import Data.IORef (IORef)
import Hickory.Input
import Hickory.Platform
import Hickory.Types (Size)
import qualified Graphics.UI.GLFW as GLFW
import qualified Platforms.GLFW.Bridge as Bridge
makeGLFWInputPoller :: GLFW.Window -> IO (IO [RawInput])
makeGLFWInputPoller win = makeInputPoller (... | |
ff714a10440413808a39fef7ac2be574c52e4b66c1380049e2a5c69c168bafed | msakai/data-interval | TestIntervalMap.hs | # OPTIONS_GHC -Wall -fno - warn - orphans #
# LANGUAGE CPP , TemplateHaskell , ScopedTypeVariables #
module TestIntervalMap (intervalMapTestGroup) where
import Control.DeepSeq
import Control.Exception (evaluate)
import Control.Monad
import Data.Functor.Identity
import qualified Data.Foldable as F
import Data.Generics.... | null | https://raw.githubusercontent.com/msakai/data-interval/8c7596ff71fd2055b006c3bbf8c6765b00ebeabe/test/TestIntervalMap.hs | haskell | -------------------------------------------------------------------
empty
-------------------------------------------------------------------
-------------------------------------------------------------------
whole
-------------------------------------------------------------------
--------------------------------... | # OPTIONS_GHC -Wall -fno - warn - orphans #
# LANGUAGE CPP , TemplateHaskell , ScopedTypeVariables #
module TestIntervalMap (intervalMapTestGroup) where
import Control.DeepSeq
import Control.Exception (evaluate)
import Control.Monad
import Data.Functor.Identity
import qualified Data.Foldable as F
import Data.Generics.... |
04c864474f834856df3d1fbf67fa016589430bbe58d8629766480633eacd445e | openvstorage/alba | osd_bench.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Asd_protocol
open Lwt.Infix
open Generic_bench
open Checksum
open Slice... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/osd_bench.ml | ocaml | TODO: this affects performance as there is compression going
on inside the database
|
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Asd_protocol
open Lwt.Infix
open Generic_bench
open Checksum
open Slice... |
b7f9ca025072f5dde311f85da6354fe7bbeb1ed4b0a200e8f42d2b8a9eddf0de | fogfish/oauth2 | oauth2_email.erl | -module(oauth2_email).
-compile({parse_transform, category}).
-export([
password_reset/2
]).
password_reset(Access, Link) ->
try
[either ||
Email <- permit:as_access(Access),
erlcloud_aws:auto_config(),
erlcloud_ses:send_email(
Email,
[{html, [
{charset, <<"ut... | null | https://raw.githubusercontent.com/fogfish/oauth2/f758bf689833aa97947e7740e64cbb9211dfa5c2/libs/oauth2/src/oauth2_email.erl | erlang | -module(oauth2_email).
-compile({parse_transform, category}).
-export([
password_reset/2
]).
password_reset(Access, Link) ->
try
[either ||
Email <- permit:as_access(Access),
erlcloud_aws:auto_config(),
erlcloud_ses:send_email(
Email,
[{html, [
{charset, <<"ut... | |
8779eb8cd0a97e47259f32ff651f2fa5180089c0d6662c37e03fbecd05d960fc | patricoferris/ocaml-multicore-monorepo | mirage_crypto_ec.ml | type error = [
| `Invalid_format
| `Invalid_length
| `Invalid_range
| `Not_on_curve
| `At_infinity
| `Low_order
]
let error_to_string = function
| `Invalid_format -> "invalid format"
| `Not_on_curve -> "point is not on curve"
| `At_infinity -> "point is at infinity"
| `Invalid_length -> "invalid le... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/mirage-crypto/ec/mirage_crypto_ec.ml | ocaml | ensure cs < p:
x3
ax
y^2
number must not be in montgomery domain
number must not be in montgomery domain
FIPS 186-4 B 4.2
point is infinity
TODO: is this congruent with C code?
TODO: is this congruent with C code?
RFC 7748
RFC 8032
section 5.1.6
check s within 0 <= s < L | type error = [
| `Invalid_format
| `Invalid_length
| `Invalid_range
| `Not_on_curve
| `At_infinity
| `Low_order
]
let error_to_string = function
| `Invalid_format -> "invalid format"
| `Not_on_curve -> "point is not on curve"
| `At_infinity -> "point is at infinity"
| `Invalid_length -> "invalid le... |
3671db634694026f8ba987bec3e1df52c44f6dc18b75f9a88abf9df76a555e62 | simmsb/calamity | Category.hs | # LANGUAGE TemplateHaskell #
module Calamity.Types.Model.Channel.Guild.Category (Category (..)) where
import Calamity.Internal.SnowflakeMap (SnowflakeMap)
import {-# SOURCE #-} Calamity.Types.Model.Channel
import {-# SOURCE #-} Calamity.Types.Model.Guild.Guild
import Calamity.Types.Model.Guild.Overwrite
import Calami... | null | https://raw.githubusercontent.com/simmsb/calamity/be310255b446e87e7432673de1fbc67ef46de3ae/calamity/Calamity/Types/Model/Channel/Guild/Category.hs | haskell | # SOURCE #
# SOURCE # | # LANGUAGE TemplateHaskell #
module Calamity.Types.Model.Channel.Guild.Category (Category (..)) where
import Calamity.Internal.SnowflakeMap (SnowflakeMap)
import Calamity.Types.Model.Guild.Overwrite
import Calamity.Types.Snowflake
import Data.Aeson ((.!=), (.:), (.:?))
import Data.Aeson qualified as Aeson
import Data... |
e4cdf1eb3d9408d65b5cc6325794f08deddf809315df28c0017142a29e69d02b | janestreet/base | import.ml | include Base
include Stdio
include Base_for_tests
include Base_test_helpers
include Base_quickcheck.Export
include Expect_test_helpers_base
let () = Int_conversions.sexp_of_int_style := `Underscores
let is_none = Option.is_none
let is_some = Option.is_some
let ok_exn = Or_error.ok_exn
let stage = Staged.stage
let unst... | null | https://raw.githubusercontent.com/janestreet/base/5c5bd644d5efdd5002f21008811ec8f09017ee12/test/import.ml | ocaml | include Base
include Stdio
include Base_for_tests
include Base_test_helpers
include Base_quickcheck.Export
include Expect_test_helpers_base
let () = Int_conversions.sexp_of_int_style := `Underscores
let is_none = Option.is_none
let is_some = Option.is_some
let ok_exn = Or_error.ok_exn
let stage = Staged.stage
let unst... | |
ae481a5472649bc197d6d02bdfe48cfb5feffc0a67330136c217af1326c439c9 | nuvla/ui | subs.cljs | (ns sixsq.nuvla.ui.apps-application.subs
(:require [re-frame.core :refer [reg-sub]]
[sixsq.nuvla.ui.apps-application.spec :as spec]))
(reg-sub
::docker-compose
:<- [::module-application]
(fn [module]
(::spec/docker-compose module)))
(reg-sub
::files
(fn [db]
(get-in db [::spec/module... | null | https://raw.githubusercontent.com/nuvla/ui/c10704eabd339489722fa53bc99f11f21103c070/code/src/cljs/sixsq/nuvla/ui/apps_application/subs.cljs | clojure | (ns sixsq.nuvla.ui.apps-application.subs
(:require [re-frame.core :refer [reg-sub]]
[sixsq.nuvla.ui.apps-application.spec :as spec]))
(reg-sub
::docker-compose
:<- [::module-application]
(fn [module]
(::spec/docker-compose module)))
(reg-sub
::files
(fn [db]
(get-in db [::spec/module... | |
d6966db7b6d23a8343df126b2615640f822d8749c96e9674e878ffbfffe9a9f8 | finnishtransportagency/harja | suunnittelu.cljs | (ns harja.tiedot.urakka.suunnittelu
"Tämä nimiavaruus hallinnoi urakan suunnittelun tietoja"
(:require [reagent.core :refer [atom] :as r]
[cljs-time.core :as time]
[cljs-time.coerce :as tc]
[harja.asiakas.kommunikaatio :as k]
[harja.asiakas.tapahtumat :as t]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/f1203ca855ffe5105d3d7ea94c6374911571beeb/src/cljs/harja/tiedot/urakka/suunnittelu.cljs | clojure | (ns harja.tiedot.urakka.suunnittelu
"Tämä nimiavaruus hallinnoi urakan suunnittelun tietoja"
(:require [reagent.core :refer [atom] :as r]
[cljs-time.core :as time]
[cljs-time.coerce :as tc]
[harja.asiakas.kommunikaatio :as k]
[harja.asiakas.tapahtumat :as t]
... | |
a2e396dd6370c442aecc6d538da74b5dba82af0ab7ce9d34afc195635de9d297 | dmbarbour/awelon | Main.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- | a REPL for AO
module Main (main) where
import Control.Applicative
import Control.Monad.Trans.State.Strict
import Control.Monad.Trans.Class
import Data . Text ( Text )
import qualified Data.Text as T
import qualified Data.Sequence as S
import qualified Data.Map as M
impo... | null | https://raw.githubusercontent.com/dmbarbour/awelon/af9124654dd9462cc4887dccf67b3e33302c7351/hsrc_aoi/Main.hs | haskell | | a REPL for AO
AO imports
LOCAL UTILITIES (from ../hsrc_aort)
a dubiously useful help message
when persistence is working, perhaps add an AO_HOME or similar.
It primarily manages the dictionaries and histories.
loaded and compiled dictionary
root dictionary text
active runtime value
current runtime context
... | # LANGUAGE GeneralizedNewtypeDeriving #
module Main (main) where
import Control.Applicative
import Control.Monad.Trans.State.Strict
import Control.Monad.Trans.Class
import Data . Text ( Text )
import qualified Data.Text as T
import qualified Data.Sequence as S
import qualified Data.Map as M
import qualified Data.L... |
23567741cf247972c05b9108fa970da3992013e051968fcfbabd6f67c0ce085c | theobat/massalia | Spec.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
import Protolude
import qualified SpecGraphQLSelect
import qualified SpecStaticInsert
import qualified SpecStati... | null | https://raw.githubusercontent.com/theobat/massalia/66d65c3431132091107d07e041f33c907f9d08cb/test/unit/Spec.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE NoImplicitPrelude #
import Protolude
import qualified SpecGraphQLSelect
import qualified SpecStaticInsert
import qualified SpecStaticSelect
import Test.Tasty
main :: IO ()
main = defaultMain tests
... |
3e1b67157e3b7f4df2d04abbdf6760c1f24b10bf2b3aafde1241c90ad75bde45 | qkrgud55/ocamlmulti | typecore.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/typing/typecore.mli | ocaml | *********************************************************************
OCaml
... | , 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 : typecore.mli 12521 2012 - 05 ... |
df38ac45542c206df39f39c90c20a6b93ba4624f3b6ef5454daf884369152373 | tlaplus/tlapm | sysconf.ml |
* sysconf.ml --- thin interface to POSIX.1 sysconf(2 )
*
* Author : < >
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* sysconf.ml --- thin interface to POSIX.1 sysconf(2)
*
* Author: Kaustuv Chaudhuri <>
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
exte... | null | https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/sysconf.ml | ocaml |
* sysconf.ml --- thin interface to POSIX.1 sysconf(2 )
*
* Author : < >
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* sysconf.ml --- thin interface to POSIX.1 sysconf(2)
*
* Author: Kaustuv Chaudhuri <>
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
exte... | |
9d127045e106a2f0bc59b4cb57cd06f78935e80c011f7cf31498b0a804b14e34 | merijn/broadcast-chan | PipeTest.hs | import Control.Foldl (purely, set)
import Data.Set (Set)
import Pipes
import qualified Pipes.Prelude as P
import Pipes.Safe (runSafeT)
import BroadcastChan.Pipes
import BroadcastChan.Test
sequentialSink :: [a] -> (a -> IO b) -> IO ()
sequentialSink inputs f = runSafeT . runEffect $
each inputs >-> P.mapM_ (liftIO... | null | https://raw.githubusercontent.com/merijn/broadcast-chan/1a884f9ffa6f9f5628f575aec1e06502c853ab9f/broadcast-chan-pipes/tests/PipeTest.hs | haskell | import Control.Foldl (purely, set)
import Data.Set (Set)
import Pipes
import qualified Pipes.Prelude as P
import Pipes.Safe (runSafeT)
import BroadcastChan.Pipes
import BroadcastChan.Test
sequentialSink :: [a] -> (a -> IO b) -> IO ()
sequentialSink inputs f = runSafeT . runEffect $
each inputs >-> P.mapM_ (liftIO... | |
e918607fc9ef88e07502c116ceda1777f1196ab6c9f428cd5afd3491ca1bbb7d | Storkle/clj-forex | tray.clj |
(ns forex.interface.tray
(:use forex.util.gui)
(:import
(javax.swing JFrame)
(java.awt Toolkit SystemTray EventQueue TrayIcon TrayIcon$MessageType PopupMenu MenuItem)
(java.awt.event ActionListener)))
(defn remove-system-icon [icon] (.remove (SystemTray/getSystemTray) icon))
(def... | null | https://raw.githubusercontent.com/Storkle/clj-forex/1800b982037b821732b9df1e2e5ea1eda70f941f/src/forex/interface/tray.clj | clojure | (def icon (add-system-icon (system-icon {:image "/home/seth/Desktop/clojure.gif" :on-click (fn [_] (println "HI"))}))) |
(ns forex.interface.tray
(:use forex.util.gui)
(:import
(javax.swing JFrame)
(java.awt Toolkit SystemTray EventQueue TrayIcon TrayIcon$MessageType PopupMenu MenuItem)
(java.awt.event ActionListener)))
(defn remove-system-icon [icon] (.remove (SystemTray/getSystemTray) icon))
(def... |
ed3fd752f87e5066847c055ad8b2da957270f8011d8454939e91c7dddaa85d8e | uw-unsat/leanette-popl22-artifact | bounded.rkt | #lang rosette
(provide bounded! **BOUND** define/rec current-bound!)
(require (only-in racket string-append symbol->string))
(define **BOUND** 10)
(define (current-bound! [n 0])
(if (= n 0)
**BOUND**
(set! **BOUND** n)))
(define-syntax (bounded! stx)
(syntax-case stx ()
[(_ fun n)
... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/bonsai/bounded.rkt | racket | #lang rosette
(provide bounded! **BOUND** define/rec current-bound!)
(require (only-in racket string-append symbol->string))
(define **BOUND** 10)
(define (current-bound! [n 0])
(if (= n 0)
**BOUND**
(set! **BOUND** n)))
(define-syntax (bounded! stx)
(syntax-case stx ()
[(_ fun n)
... | |
c83247b223419a7812e4a3d6af7b816317bc817e633895aa511a03eccdedf482 | fluree/raft | kv_example.clj | (ns fluree.raft.kv-example
(:require [clojure.java.io :as io]
[taoensso.nippy :as nippy]
[clojure.core.async :as async]
[fluree.raft :as raft]
[clojure.tools.logging :as log]
[fluree.raft.log :as raft-log])
(:refer-clojure :exclude [read])
(:import (java... | null | https://raw.githubusercontent.com/fluree/raft/42e02264d913192241ac9c4b2e1b2ac46bcd660b/src/fluree/raft/kv_example.clj | clojure | delete any old file if exists
will hold state of our started raft instances
if system was shut down, there will not be a server-chan... no-op on send-rpc call
wait for response and call back
for now a single response channel is created for each request, so we need to match up requests/responses
tiny delay receivi... | (ns fluree.raft.kv-example
(:require [clojure.java.io :as io]
[taoensso.nippy :as nippy]
[clojure.core.async :as async]
[fluree.raft :as raft]
[clojure.tools.logging :as log]
[fluree.raft.log :as raft-log])
(:refer-clojure :exclude [read])
(:import (java... |
9192c6408a9f298f318418e08100f3ed9f0a0ea3b63c2c0610e12c79cb247189 | janestreet/base | sequence.ml | open! Import
open Container_intf.Export
module Array = Array0
module List = List1
module Step = struct
(* 'a is an item in the sequence, 's is the state that will produce the remainder of
the sequence *)
type ('a, 's) t =
| Done
| Skip of { state : 's }
| Yield of
{ value : 'a
; st... | null | https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/src/sequence.ml | ocaml | 'a is an item in the sequence, 's is the state that will produce the remainder of
the sequence
'a is an item in the sequence, 's is the state that will produce the remainder of the
sequence | open! Import
open Container_intf.Export
module Array = Array0
module List = List1
module Step = struct
type ('a, 's) t =
| Done
| Skip of { state : 's }
| Yield of
{ value : 'a
; state : 's
}
[@@deriving_inline sexp_of]
let sexp_of_t :
'a 's.
('a -> Sexplib0.Sexp.t)
... |
bbe290432cc3471ffa215d6ade889598c5275827f50d82b8b1ba6f4142ad8c14 | rd--/hsc3 | bLowPass4.help.hs | -- bLowPass4
let i = mix (saw ar (mce [0.99, 1, 1.01] * 440) * 0.3)
f = mouseX kr 100 20000 Exponential 0.2
rq = mouseY kr 0.1 1 Linear 0.2
in bLowPass4 i f rq
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/bLowPass4.help.hs | haskell | bLowPass4 | let i = mix (saw ar (mce [0.99, 1, 1.01] * 440) * 0.3)
f = mouseX kr 100 20000 Exponential 0.2
rq = mouseY kr 0.1 1 Linear 0.2
in bLowPass4 i f rq
|
6e1793d00956abb575908e2f2a221fccb60d97935e244a592c8fea3d226ca888 | denisshevchenko/circlehs | HTTPS.hs | |
Module : Network . CircleCI.Common . HTTPS
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : alpha
Connection manager for @https@-requests . CircleCI uses TLS .
Module : Network.CircleCI.Common.HTTPS
Copyright : (c) Denis Shevchenko, 2016
License : MIT
Mai... | null | https://raw.githubusercontent.com/denisshevchenko/circlehs/0c01693723a234bb46ff8d1e6e114cce91dfa032/src/Network/CircleCI/Common/HTTPS.hs | haskell | | Connection manager with TLS support. | |
Module : Network . CircleCI.Common . HTTPS
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : alpha
Connection manager for @https@-requests . CircleCI uses TLS .
Module : Network.CircleCI.Common.HTTPS
Copyright : (c) Denis Shevchenko, 2016
License : MIT
Mai... |
b59518212e06912f646b7ddb8cbd32468d31585dc68473e526c51c67638f7ec4 | luminus-framework/examples | dev_middleware.clj | (ns multi-client-ws-immutant.dev-middleware
(:require
[ring.middleware.reload :refer [wrap-reload]]
[selmer.middleware :refer [wrap-error-page]]
[prone.middleware :refer [wrap-exceptions]]))
(defn wrap-dev [handler]
(-> handler
wrap-reload
wrap-error-page
(wrap-exceptions {:app-namesp... | null | https://raw.githubusercontent.com/luminus-framework/examples/cbeee2fef8f457a6a6bac2cae0b640370ae2499b/multi-client-ws-immutant/env/dev/clj/multi_client_ws_immutant/dev_middleware.clj | clojure | (ns multi-client-ws-immutant.dev-middleware
(:require
[ring.middleware.reload :refer [wrap-reload]]
[selmer.middleware :refer [wrap-error-page]]
[prone.middleware :refer [wrap-exceptions]]))
(defn wrap-dev [handler]
(-> handler
wrap-reload
wrap-error-page
(wrap-exceptions {:app-namesp... | |
b76c87faddcf4ede1b208fdaeb94e74694a0c1532da35f888f79f9ec96509787 | yzh44yzh/practical_erlang | list_zipper_tests.erl | -module(list_zipper_tests).
-include_lib("eunit/include/eunit.hrl").
move_test() ->
Z = list_zipper:from_list([1,2,3,4,5]),
Actions = [
{get, 1},
right, {get, 2},
right, {get, 3},
right, {get, 4},
right, {get, 5},
right... | null | https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/final_exercise/test/list_zipper_tests.erl | erlang | -module(list_zipper_tests).
-include_lib("eunit/include/eunit.hrl").
move_test() ->
Z = list_zipper:from_list([1,2,3,4,5]),
Actions = [
{get, 1},
right, {get, 2},
right, {get, 3},
right, {get, 4},
right, {get, 5},
right... | |
40de2a7b17c9ab8154ceb8a7e1dbff5a0595bfa993a21df4a44120a6d2f0f078 | CryptoKami/cryptokami-core | Util.hs | -- | Module for command-line utilites, parsers and convenient handlers.
module Pos.Client.CLI.Util
( printFlags
, printInfoOnStart
, attackTypeParser
, attackTargetParser
, defaultLoggerConfig
, readLoggerConfig
, stakeholderIdParser
, dumpGenesisData
) wh... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/src/Pos/Client/CLI/Util.hs | haskell | | Module for command-line utilites, parsers and convenient handlers.
| Default logger config. Will be used if `--log-config` argument is
not passed.
| Reads logger config from given path. By default returns
'defaultLoggerConfig'. |
module Pos.Client.CLI.Util
( printFlags
, printInfoOnStart
, attackTypeParser
, attackTargetParser
, defaultLoggerConfig
, readLoggerConfig
, stakeholderIdParser
, dumpGenesisData
) where
import Universum
import qualified Data.ByteString.Lazy a... |
e6d80238d8171a8371cd640745f0ebd6575360dd2649031147c8d6aa371b896f | cxphoe/SICP-solutions | 3.56.rkt | (load "stream.rkt")
(define (scale-stream s n)
(stream-map (lambda (x) (* x n)) s))
(define (merge s1 s2)
(cond ((stream-null? s1) s2)
((stream-null? s2) s1)
(else
(let ((s1car (stream-car s1))
(s2car (stream-car s2)))
(cond ((< s1car s2car)
(co... | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%203-Modeling%20with%20Mutable%20Data/5.Stream/3.56.rkt | racket | (load "stream.rkt")
(define (scale-stream s n)
(stream-map (lambda (x) (* x n)) s))
(define (merge s1 s2)
(cond ((stream-null? s1) s2)
((stream-null? s2) s1)
(else
(let ((s1car (stream-car s1))
(s2car (stream-car s2)))
(cond ((< s1car s2car)
(co... | |
ee844ec46591f927ac839e8b27f81006a3e4319e2d92a720fba7be1edeb35e87 | c-cube/funarith | Simplex_intf.ml |
copyright ( c ) 2014 - 2018 , ,
copyright (c) 2014-2018, Guillaume Bury, Simon Cruanes
*)
(** {1 Modular and incremental implementation of the general simplex}. *)
* The simplex is used as a decision procedure for linear rational arithmetic
problems .
More information can be found on the ... | null | https://raw.githubusercontent.com/c-cube/funarith/1c86ac45e9608efaa761e3f14455402730885339/src/Simplex_intf.ml | ocaml | * {1 Modular and incremental implementation of the general simplex}.
* Rational number implementation
* The given type of the variables
* A map on variables
* The type of a (possibly not solved) linear system
* Generic type returned when solving the simplex. A solution is a list of
bindings that satisfies al... |
copyright ( c ) 2014 - 2018 , ,
copyright (c) 2014-2018, Guillaume Bury, Simon Cruanes
*)
* The simplex is used as a decision procedure for linear rational arithmetic
problems .
More information can be found on the particular flavor of this
implementation at -m2.pdf
problems.
... |
723d684096f26b93b969b557a18274d17692478ec3954f09ab6fed718415495f | dangtv/BIRDS | derivation.ml | (*******************************************************)
(** Functions for transforming from a put datalog program to get datalog program
*)
(********************************************************)
@author :
@author: Vandang Tran
*)
open Lib
open Formulas
open Fol
open Skolem
open Fol_ex
open Expr
open Utils
... | null | https://raw.githubusercontent.com/dangtv/BIRDS/a5824b780a1d9fc92bc3920694b490a981c5e36c/src/derivation.ml | ocaml | *****************************************************
* Functions for transforming from a put datalog program to get datalog program
******************************************************
let get_view_in_rterms (view:rterm) lst =
* Return a list of head of rules which have a positive view in its body.
* Given a li... |
@author :
@author: Vandang Tran
*)
open Lib
open Formulas
open Fol
open Skolem
open Fol_ex
open Expr
open Utils
open Rule_preprocess
open Stratification
open Lib
* Datalog normalization : convert Deltainsert and predicates to normal Pred with a name having prefix
let deltapred_to_pred prefix expr =
let rterm... |
e755472709d80e3dc89cc9977bedb2cad3cd3a686d5d6787063a5a769507afc2 | ymilky/franzy-admin | codec.clj | (ns franzy.admin.codec
"Codec and supporting functionality for managing Kafka property-based configuration."
(:require [franzy.common.configuration.codec :as config-codec]
[taoensso.timbre :as timbre])
(:import (scala Predef Some Tuple2 Tuple3 None Option)
(scala.collection JavaConverters J... | null | https://raw.githubusercontent.com/ymilky/franzy-admin/94588c5ce1b50f4a61b2fb4a4ec4d47568b83287/src/franzy/admin/codec.clj | clojure |
General Notes
Originally, postwalk was used, but we found this too slow and cumbersome.
As such, you're welcome to moan and no one will listen.
TODO: find better way of dealing with encoding enums from keywords
TODO: better way/add to codec protocol - crude placeholder
TODO: use from main lib and find a better wa... | (ns franzy.admin.codec
"Codec and supporting functionality for managing Kafka property-based configuration."
(:require [franzy.common.configuration.codec :as config-codec]
[taoensso.timbre :as timbre])
(:import (scala Predef Some Tuple2 Tuple3 None Option)
(scala.collection JavaConverters J... |
7fb8d725ff694dedf281f83a615702f3a35124f36d5a3b6d2d0f438e6523b5e2 | LCBH/UKano | syntax.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/proverif2.01/src/syntax.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | |
7d9a9fdd3609dcdf7b78faade34a48a4409a8066f7595d5535d539234cd6a7b0 | seriyps/xhttpc | referer_middleware_tests.erl | @author < >
( C ) 2013 ,
%%% @doc
%%%
%%% @end
Created : 27 Jun 2013 by < >
-module(referer_middleware_tests).
-include_lib("eunit/include/eunit.hrl").
-include("xhttpc.hrl").
-include("xhttpc_test.hrl").
auto_referer_test() ->
S1 = xhttpc:init([{referer_middleware, []}], test_client),
{S2, {o... | null | https://raw.githubusercontent.com/seriyps/xhttpc/ae5a8ab5f1d9a301e31dcf0b0b464de747816637/test/referer_middleware_tests.erl | erlang | @doc
@end | @author < >
( C ) 2013 ,
Created : 27 Jun 2013 by < >
-module(referer_middleware_tests).
-include_lib("eunit/include/eunit.hrl").
-include("xhttpc.hrl").
-include("xhttpc_test.hrl").
auto_referer_test() ->
S1 = xhttpc:init([{referer_middleware, []}], test_client),
{S2, {ok, {_, _, BinRequest}}... |
e3f1d8c5e57cdb9bd433899f641c9fa1d5f93f782cb300457236b2cc4c49e70c | nextjournal/viewers | context.cljs | (ns nextjournal.view.context
"The following provide and consume Reagent components expose React contexts without fuss.
* Contexts can be keywords or React context instances. In the case of keywords, React context instances are created behind the scenes.
* Context values are left alone, they remain as JS or Cloju... | null | https://raw.githubusercontent.com/nextjournal/viewers/ff9c4a20ff2554eecebac831ef4f0d3674983309/modules/view/src/nextjournal/view/context.cljs | clojure | consume one context at a time | (ns nextjournal.view.context
"The following provide and consume Reagent components expose React contexts without fuss.
* Contexts can be keywords or React context instances. In the case of keywords, React context instances are created behind the scenes.
* Context values are left alone, they remain as JS or Cloju... |
260f05aaf1ce72cd92cdf55872118d7e34a42f5f66bb6356e68c8c2218656815 | michaelklishin/neocons | records_test.clj | Copyright ( c ) 2011 - 2018 , , and The ClojureWerkz
Team
;;
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreei... | null | https://raw.githubusercontent.com/michaelklishin/neocons/30f30e95686a01f7a34082600bc1221877c2acbd/test/clojurewerkz/neocons/rest/test/records_test.clj | clojure |
The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright ( c ) 2011 - 2018 , , and The ClojureWerkz
Team
Eclipse Public License 1.0 ( -1.0.php )
(ns clojurewerkz.neocons.rest.test.records-test
(:require [clojurewerkz.neocons.rest.records :refer :all]
[clojure.test :refer :all]))
(deftest test-path-escaping
(are [input output] (is (= (e... |
6f7bae6d7db07ca6d8b261e335ebf9215a1404b17c54e8ac1a7abc95bcae35e8 | mthbernardes/inspector-gadget | parser.clj | (ns inspector-gadget.logic.parser
(:require [inspector-gadget.adapter.regex :as regex]
[inspector-gadget.logic.function :as function]
[inspector-gadget.logic.namespace :as namespace]))
(defmulti parse-rule-check (fn [_ {{:keys [type]} :check}] (identity type)))
(defmethod parse-rule-check :u... | null | https://raw.githubusercontent.com/mthbernardes/inspector-gadget/68635f695146a26aa8d37e0465cbf64f6f03c890/src/inspector_gadget/logic/parser.clj | clojure | (ns inspector-gadget.logic.parser
(:require [inspector-gadget.adapter.regex :as regex]
[inspector-gadget.logic.function :as function]
[inspector-gadget.logic.namespace :as namespace]))
(defmulti parse-rule-check (fn [_ {{:keys [type]} :check}] (identity type)))
(defmethod parse-rule-check :u... | |
fa8dc7eb9b2244299e4330303f022a05197ed477ac5117e35da9b5760c64264c | spectrum-finance/cardano-dex-contracts | PMintingValidators.hs | module ErgoDex.PMintingValidators (
poolNftMiningValidator,
poolLqMiningValidator,
wrapMintingValidator,
) where
import Plutarch
import Plutarch.Api.V1 (mkMintingPolicy)
import Plutarch.Api.V2.Contexts (PScriptContext)
import Plutarch.Prelude
import Plutarch.Unsafe (punsafeCoerce)
import qualified ErgoDex... | null | https://raw.githubusercontent.com/spectrum-finance/cardano-dex-contracts/87bdbc26dbe9ae5f6c59e608d728330f8166f19c/cardano-dex-contracts-onchain/ErgoDex/PContracts/PMintingValidators.hs | haskell | > PScriptContext :--> PBool) ->
> PScriptContext :--> POpaque) | module ErgoDex.PMintingValidators (
poolNftMiningValidator,
poolLqMiningValidator,
wrapMintingValidator,
) where
import Plutarch
import Plutarch.Api.V1 (mkMintingPolicy)
import Plutarch.Api.V2.Contexts (PScriptContext)
import Plutarch.Prelude
import Plutarch.Unsafe (punsafeCoerce)
import qualified ErgoDex... |
982098a43e34181127599d7b6c7d92a96fcf6d00952f9e345199032307fbe84a | AyaMorisawa/aya-script | AyaScript.hs | module AyaScript (compile, parse) where
import AyaScript.Parser
parse = ayaScriptParser
| null | https://raw.githubusercontent.com/AyaMorisawa/aya-script/86624e248a9c52dfa16b9ebdca345ecbdc421dbe/src/AyaScript.hs | haskell | module AyaScript (compile, parse) where
import AyaScript.Parser
parse = ayaScriptParser
| |
2fdee1fb71d3ea3ffcc842afd8988cf866d93136c99742a8346737d016587f8a | FlowerWrong/mblog | lib_trigrams_complete.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/lib_trigrams_complete.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
An iterator that iterates through all trigrams in the ... | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(lib_trigrams).
-export([for_each_trigram_in_the_english_language/2,
make_tables/0, timer_tests/0,
open/0, close/1, is_word/2,
how_many_trigrams/0,
make_ets_set/0, make_ets_ordered_set/0, make_mod_set/0... |
a948d1fbb5e389735746386c419cee46cf03f6fefadb6c482116140b96e5f343 | charlieg/Sparser | delete.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1994,1995 , 2011 -- all rights reserved
;;;
;;; File: "delete"
;;; Module: "objects;model:individuals:"
version : April 1995
initiated 8/9/94 v2.3 . Tweeking ... 8/18 . 9/28 Added capacity to look for op
off of super... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/model/individuals/delete.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "delete"
Module: "objects;model:individuals:"
--------
driver
--------
maybe it's inherited?
--------------------------------------------------------------------
cases corresponding to the different ways an individual is indexed
---------------... | copyright ( c ) 1994,1995 , 2011 -- all rights reserved
version : April 1995
initiated 8/9/94 v2.3 . Tweeking ... 8/18 . 9/28 Added capacity to look for op
off of superc . 4/19/95 wrapped gates around the breaks
1/11/11 Patched unindex - individual to not assume that the category has
and ope... |
8b7521cb0dfc6e60e3a3a030b71efb4f0c8928947042479914cafb8e60fe41e7 | grin-compiler/ghc-whole-program-compiler-project | gen-exe2.hs | # LANGUAGE RecordWildCards #
module Main where
import Data.List.Split
import Control.Monad
import Control.Concurrent.Async.Pool
import System.FilePath
import System.Directory
import System.Environment
import System.Process
import Stg.DeadFunctionElimination.Analysis (timeItNamed)
import Stg.GHC.Backend
import Stg.I... | null | https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/88a5d2590ecb5a5367347bdce426f3c850092bec/external-stg-compiler/app/gen-exe2.hs | haskell | HINT: `readModpakS` reads from zip files, so it works for .fullpak also | # LANGUAGE RecordWildCards #
module Main where
import Data.List.Split
import Control.Monad
import Control.Concurrent.Async.Pool
import System.FilePath
import System.Directory
import System.Environment
import System.Process
import Stg.DeadFunctionElimination.Analysis (timeItNamed)
import Stg.GHC.Backend
import Stg.I... |
1a181d3e1108a02b300449142d4ead58eb9fc847f156b996e413943659946f56 | OlivierSohn/hamazed | Server.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
|
This mod... | null | https://raw.githubusercontent.com/OlivierSohn/hamazed/c0df1bb60a8538ac75e413d2f5bf0bf050e5bc37/imj-game-hamazed/src/Imj/Game/Hamazed/Network/Server.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE BangPatterns #
# UNPACK #
^ The actual 'World' is stored on the clients
unpack sum
unpack sum
# UNPACK #
^ When set, it informs the scheduler thread that it should run the game.
^ The environment for emitting requests to the high score server.
ignore errors
replace this by... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE LambdaCase #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE GeneralizedNewtypeDeriving #
|
This module exports types related to networking for Hamazed game .
Gam... |
e4241a97833bf7fdbf8a9ed7179fe1b89c9686ec04a6854a04a551d69362386e | mirage/alcotest | config.ml | include Config_intf
include Config_intf.Types
open! Import
open Cmdliner_syntax
(* Keys are configuration properties, which have defaults and may be
customisable via a CLI. *)
module Key = struct
module type S = sig
type t
val default : t
end
module type Cli = sig
include S
val term : t opt... | null | https://raw.githubusercontent.com/mirage/alcotest/6e455956513a3a6abe0d579486960767bb0c5870/src/alcotest-engine/config.ml | ocaml | Keys are configuration properties, which have defaults and may be
customisable via a CLI.
User configs before defaults have been applied.
Lift a config-sensitive function to one that consumes optional arguments that
override config defaults. | include Config_intf
include Config_intf.Types
open! Import
open Cmdliner_syntax
module Key = struct
module type S = sig
type t
val default : t
end
module type Cli = sig
include S
val term : t option Cmdliner.Term.t
end
module Flag (X : sig
val term : bool Cmdliner.Term.t
end) : Cli ... |
ecddc06f28bddc30d8ab17ba2b25312531f205aacff2c6791a2df5c856b75ef0 | helins/wasm.cljc | module.clj | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns helins.wasmer.module
""
{:author "Adam Helinski"}
(:import java.io.File
java.nio.file.Files
org.wasmer.Modu... | null | https://raw.githubusercontent.com/helins/wasm.cljc/2ef8ffc0cf1f92bea7fcd15b925cd3168fab2fab/wasmer/src/main/helins/wasmer/module.clj | clojure | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(ns helins.wasmer.module
""
{:author "Adam Helinski"}
(:import java.io.File
java.nio.file.Files
org.wasmer.Modu... | |
61a49d7d5000c7ffaa2062f09a6688fc259c6c7675f7d38afe9e9591f185dde8 | bvaugon/ocapic | simul2.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/serial2/simul2.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Serial;;
type t = Clear | Moveto of int * int | Int of int | Text of string
let (chan : (t, unit) channel) =
open_prog
"ocasim usart.hex 'ocapic_lcd_simulator 20x4 e=RD0 r... |
18beba8b59258966464d7367ad9a4e12be210c4a8c20b8d82d6b1ab0c8e8f7b2 | eareese/htdp-exercises | 165-subst-robot-and-generalize.rkt | #lang htdp/bsl
Exercise 165 . Design the function subst - robot , which consumes a list of toy descriptions ( one - word strings ) and replaces all occurrences of " robot " with " r2d2 " ; all other descriptions remain the same .
;;
subst - robot to substitute . The latter consumes two strings , called new and o... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part02-arbitrarily-large-data/165-subst-robot-and-generalize.rkt | racket | all other descriptions remain the same .
produces new list of strings by replacing all "robot" with "r2d2"
produces new list of strings by replacing all 'old' with 'new' | #lang htdp/bsl
subst - robot to substitute . The latter consumes two strings , called new and old , and a list of strings . It produces a new list of strings by substituting all occurrences of old with new .
consumes a list of toy descriptions , which are one - word strings .
(check-expect (subst-robot (cons "ba... |
044169802e557fb701d58283eda9a4bb486527add692f2c3482b44249281882f | lazy-cat-io/metaverse | sign_in.cljs | (ns metaverse.renderer.pages.sign-in
(:require
[metaverse.renderer.components :as components]
[re-frame.core :as rf]))
(defn page
[]
(let [readiness @(rf/subscribe [:auth/readiness])]
^{:key readiness}
[:div.flex.justify-center.justify-items-center.content-center.items-center
[:button.bg-wh... | null | https://raw.githubusercontent.com/lazy-cat-io/metaverse/1fc129ebcca37392f7efc3fd5a9ec98aa23cf92b/src/main/clojure/metaverse/renderer/pages/sign_in.cljs | clojure | (ns metaverse.renderer.pages.sign-in
(:require
[metaverse.renderer.components :as components]
[re-frame.core :as rf]))
(defn page
[]
(let [readiness @(rf/subscribe [:auth/readiness])]
^{:key readiness}
[:div.flex.justify-center.justify-items-center.content-center.items-center
[:button.bg-wh... | |
4db921531bb0e5310bd106899027de84d7e038df4119e35d3a1fd20b00c843e7 | commercialhaskell/pantry | StaticBytesSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoImplicitPrelude #
module Pantry.Internal.StaticBytesSpec (spec) where
import RIO
import Pantry.Internal.StaticBytes
import Control.Monad (replicateM)
import qualified Data.ByteString as B
import qualified Data.Vector.Unboxed as VU
import ... | null | https://raw.githubusercontent.com/commercialhaskell/pantry/c7923fc963e36efd179ba301ac426139a9dc182d/test/Pantry/Internal/StaticBytesSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
# LANGUAGE NoImplicitPrelude #
module Pantry.Internal.StaticBytesSpec (spec) where
import RIO
import Pantry.Internal.StaticBytes
import Control.Monad (replicateM)
import qualified Data.ByteString as B
import qualified Data.Vector.Unboxed as VU
import qualified Data.Vector.Primitive as ... |
c977644dac822d8ef35c9c3150fe74a71fdf0193ce78f4187ceeb2405d4e5d18 | dedbox/racket-algebraic | box.rkt | #lang algebraic/racket/base
(require algebraic/control/applicative
algebraic/control/monad
algebraic/data/functor)
(provide (all-defined-out))
(define-syntax box-functor
(instance functor
[fmap (λ (f x) (box (f (unbox x))))]))
(define-syntax box-applicative
(instance applicative
extend... | null | https://raw.githubusercontent.com/dedbox/racket-algebraic/706b2d01ab735a01e372c33da49995339194e024/algebraic/data/box.rkt | racket | ---------------------------------------------------------------------------- | #lang algebraic/racket/base
(require algebraic/control/applicative
algebraic/control/monad
algebraic/data/functor)
(provide (all-defined-out))
(define-syntax box-functor
(instance functor
[fmap (λ (f x) (box (f (unbox x))))]))
(define-syntax box-applicative
(instance applicative
extend... |
79041882a91f47b0f1cdbb08bc3e8a642b521b0b3751d4673ffb196c302bd7ad | camlp5/camlp5 | test16.ml | class virtual f (a, b) =
object(self)
end
;;
| null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/testsuite/maquette/files-original/test16.ml | ocaml | class virtual f (a, b) =
object(self)
end
;;
| |
71d3d152f93dec0f2c1347fe0a0247ed9def7a50a237216bd37f17cf284d5193 | skanev/playground | 23.scm | EOPL exercise 2.23
;
; The define of lc-exp ignores the condition in definition 1.1.8 that says
; "Identifier is any symbol other than lambda." Modify the definition of
; identifier? to capture this condition. As a hint, remember that any
; predicate can be used in define datatype, even ones you define.
(define (id?... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/02/23.scm | scheme |
The define of lc-exp ignores the condition in definition 1.1.8 that says
"Identifier is any symbol other than lambda." Modify the definition of
identifier? to capture this condition. As a hint, remember that any
predicate can be used in define datatype, even ones you define. | EOPL exercise 2.23
(define (id? sym)
(and (symbol? sym)
(not (eqv? sym 'lambda))))
(define-datatype lc-exp lc-exp?
(var-exp
(var id?))
(lambda-exp
(bound-var id?)
(body lc-exp?))
(app-exp
(rator lc-exp?)
(rand lc-exp?)))
|
ec35502a5590607fd385a7ff7ec65a6a7ebfa66fb1c00360be2d8f1af651751a | ocaml/ood | academic_institution.ml |
type location = { lat : float; long : float }
type course =
{ name : string
; acronym : string option
; online_resource : string option
}
type t =
{ name : string
; slug : string
; description : string
; url : string
; logo : string option
; continent : string
; courses : course list
; locati... | null | https://raw.githubusercontent.com/ocaml/ood/7b2e15544ba90cca5f6a5baf606a3761ed62742b/src/ood/academic_institution.ml | ocaml |
type location = { lat : float; long : float }
type course =
{ name : string
; acronym : string option
; online_resource : string option
}
type t =
{ name : string
; slug : string
; description : string
; url : string
; logo : string option
; continent : string
; courses : course list
; locati... | |
3e0883970cd193ffbcc2083cfe6234fe04b755313a4e93f0c18abaaaef6bb22c | sdroege/html-rss-proxy | ToVima.hs | {-# LANGUAGE OverloadedStrings #-}
module ToVima
( getChannel
)
where
import Types
import Utils
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Catch
import Data.String
import Data.Monoid
import Data.Text (Text)
import qualified Data.Text as T
import Data.List.Split
import qualifie... | null | https://raw.githubusercontent.com/sdroege/html-rss-proxy/7ccac2d4e74f7e6b575143802e90c2aa9732a9c0/src/ToVima.hs | haskell | # LANGUAGE OverloadedStrings #
Parsing of HTML into Articles |
module ToVima
( getChannel
)
where
import Types
import Utils
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Catch
import Data.String
import Data.Monoid
import Data.Text (Text)
import qualified Data.Text as T
import Data.List.Split
import qualified Data.ByteString.Lazy as BL
impor... |
86b981e77456f7a82f9d0ebc631e61d362314b62e6310ccd5e14cd1bdae7a175 | simingwang/emqx-plugin-kafkav5 | kpro_brokers.erl | Copyright ( c ) 2018 - 2021 , Klarna Bank AB ( publ )
%%%
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 a... | null | https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/emqx_plugrel/emqx_plugin_kafka-5.0.0/kafka_protocol-4.0.3/src/kpro_brokers.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 go... | Copyright ( c ) 2018 - 2021 , Klarna Bank AB ( publ )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(kpro_brokers).
-export([ connect_any/2
, connect_controller/3
, connect_coordinator/3
... |
e8739cf2522cd1060de08559e4d5b3e7c20d8fff7ae8120660bd0984f10859ab | mfoemmel/erlang-otp | orber_ifr_uniondef.erl | %%--------------------------------------------------------------------
%%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1997 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/orber/src/orber_ifr_uniondef.erl | erlang | --------------------------------------------------------------------
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. S... | Copyright Ericsson AB 1997 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
File : orber_ifr_uniondef.erl
Purpo... |
e1411a012d8d931ec40842fa674e5f37a6234a73913bf1381e198f5998ff0ad6 | hipsleek/hipsleek | slk2smt.ml | #include "xdebug.cppo"
open VarGen
open Globals
open Sleekcommons
open Gen
open Cformula
let smt_number = ref (0:int)
let subst_pred_self = ref (true: bool)
let smt_self = ("in": string)
let pred_pre_fix_var = ref ("?": string)
let smt_string_of_primed p =
match p with
| Primed -> "prm"
| Unprimed -> ""
le... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/slk2smt.ml | ocaml | Iprinter.string_of_formula_exp e
if s = "null" then "nil" else s
"bvar"
| Ipure.VarPerm _ ->
";varperm"
"other"
if Gen.BList.mem_eq (fun s1 s2 -> String.compare s1 s2 = 0) heap_name all_view_names then
"index alpha" ^ (string_of_int pred_abs_num) ^ " ", pred_abs_num+1 else
let heap_name = ... | #include "xdebug.cppo"
open VarGen
open Globals
open Sleekcommons
open Gen
open Cformula
let smt_number = ref (0:int)
let subst_pred_self = ref (true: bool)
let smt_self = ("in": string)
let pred_pre_fix_var = ref ("?": string)
let smt_string_of_primed p =
match p with
| Primed -> "prm"
| Unprimed -> ""
le... |
54af0aa008278a679d5736b240b8f589fbef0251c3dce08af3c1409e35d43026 | mauny/the-functional-approach-to-programming | eval_strict.ml | #open "lexer";;
#open "ml_ops";;
#open "ml_strict";;
#open "parser_strict";;
(* +ml_eval+ *)
let ml_eval_binop = fun
Ml_add (Int_Const m) (Int_Const n) -> Int_Const (add_int m n)
| Ml_sub (Int_Const m) (Int_Const n) -> Int_Const (sub_int m n)
| Ml_mult (Int_Const m) (Int_Const n) -> Int_Const (mult_int m n)
| Ml_eq... | null | https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Eval/eval_strict.ml | ocaml | +ml_eval+
+ml_eval+
+ml_eval_examples+
+ml_eval_examples+ | #open "lexer";;
#open "ml_ops";;
#open "ml_strict";;
#open "parser_strict";;
let ml_eval_binop = fun
Ml_add (Int_Const m) (Int_Const n) -> Int_Const (add_int m n)
| Ml_sub (Int_Const m) (Int_Const n) -> Int_Const (sub_int m n)
| Ml_mult (Int_Const m) (Int_Const n) -> Int_Const (mult_int m n)
| Ml_eq(Int_Const m) (I... |
6151e6edb4925a3e240cd50f7286ef9fc43980ab8ad5551644671cac26ea547c | argp/bap | batScanf.ml |
* BatScanf - Extended Scanf module
* Copyright ( C ) 2009 , LIFO , Universite d'Orleans
*
* 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 o... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batScanf.ml | ocaml |
* BatScanf - Extended Scanf module
* Copyright ( C ) 2009 , LIFO , Universite d'Orleans
*
* 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 o... | |
21bdb99f6b3f6ca77469682cf6168cfef0de1e1dc19ae6b0f7fe27dc106d31f5 | music-suite/music-score | Slide.hs |
-- | Provides a representation of musical /slides/, commonly known as /glissando/ or
-- /portamento/.
module Music.Score.Slide (
-- * Slides and glissando
HasSlide(..),
SlideT(..),
slide,
glissando,
) where
import Control.Applicative
import Control.Comona... | null | https://raw.githubusercontent.com/music-suite/music-score/aa7182d8ded25c03a56b83941fc625123a7931f8/src/Music/Score/Slide.hs | haskell | | Provides a representation of musical /slides/, commonly known as /glissando/ or
/portamento/.
* Slides and glissando
(eg,es,a,bg,bs)
Lifted instances
|
|
|
module Music.Score.Slide (
HasSlide(..),
SlideT(..),
slide,
glissando,
) where
import Control.Applicative
import Control.Comonad
import Control.Lens hiding (transform)
import Data.Foldable
import Data.Foldable
import ... |
781f068b5f38d652eb09da80cb71f971612be3731af34186e049411ba049f068 | clojure-interop/java-jdk | MultiRootPaneUI.clj | (ns javax.swing.plaf.multi.MultiRootPaneUI
"A multiplexing UI used to combine RootPaneUIs.
This file was automatically generated by AutoMulti."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.multi MultiRootPaneUI]))
(defn ->multi-root-pane-ui
"Constructor."
(^MultiRootPaneUI [... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/multi/MultiRootPaneUI.clj | clojure | (ns javax.swing.plaf.multi.MultiRootPaneUI
"A multiplexing UI used to combine RootPaneUIs.
This file was automatically generated by AutoMulti."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.multi MultiRootPaneUI]))
(defn ->multi-root-pane-ui
"Constructor."
(^MultiRootPaneUI [... | |
98bd43b5f0ee58e74353a62b0306f80e388fca9f7e81c7a6ee28a00e8a1acd88 | ryantm/nixpkgs-update | NVD.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
module NVD
( withVulnDB,
getCVEs,
Connection,
ProductID,
Version,
CVE,
CVEID,
UTCTime,
)
where
import CVE
( CPEMatch (..),
CPEMatchRow (..),
CVE (..),
CVEID,
cpeMatches,
parseFeed,
)
import Codec.Com... | null | https://raw.githubusercontent.com/ryantm/nixpkgs-update/c78b63b4432444f33e62709382c9c89ae85e9305/src/NVD.hs | haskell | # LANGUAGE OverloadedStrings #
| Database version the software expects. If the software version is
higher than the database version or the database has not been updated in more
this when the database layout changes or the build-time data filtering
changes.
| Rebuild the entire database, redownloading all data.
| ... | # LANGUAGE NamedFieldPuns #
module NVD
( withVulnDB,
getCVEs,
Connection,
ProductID,
Version,
CVE,
CVEID,
UTCTime,
)
where
import CVE
( CPEMatch (..),
CPEMatchRow (..),
CVE (..),
CVEID,
cpeMatches,
parseFeed,
)
import Codec.Compression.GZip (decompress)
import C... |
743f3dcdf3c227c1e7e8b88832e14b7767360ad696152131c359ec0b35b491fa | music-suite/music-suite | Track.hs | # OPTIONS_GHC -fno - warn - name - shadowing
-fno - warn - unused - top - binds
-fno - warn - redundant - constraints
-fno - warn - unused - matches
-fno - warn - unused - imports #
-fno-warn-unused-top-binds
-fno-warn-redundant-constraints
-fno-warn-unused-matches
-fno-warn-unused-imports #-}
{... | null | https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Time/Internal/Track.hs | haskell | # OPTIONS_HADDOCK hide #
* Track type
* Construction
|
A 'Track' is a parallel composition of values.
| Create a track from a list of notes. | # OPTIONS_GHC -fno - warn - name - shadowing
-fno - warn - unused - top - binds
-fno - warn - redundant - constraints
-fno - warn - unused - matches
-fno - warn - unused - imports #
-fno-warn-unused-top-binds
-fno-warn-redundant-constraints
-fno-warn-unused-matches
-fno-warn-unused-imports #-}
... |
53d7ec59922cb1e62b5853481ee2e073a18292490212fb9862ea0eaf4e4d6b8b | glutamate/bugpan | OpenGL.hs | # LANGUAGE GADTs , OverlappingInstances , UndecidableInstances , NoMonomorphismRestriction , CPP #
{-# OPTIONS -fglasgow-exts #-}
module OpenGL where
import Data.IORef
import qualified Allegro . Shape as S
import Control.Concurrent.STM
import System.Mem
import System.Time
import System.IO.Unsafe
import Signal . TSig... | null | https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/OpenGL.hs | haskell | # OPTIONS -fglasgow-exts #
hiding (Sink, get)
import qualified Data.Map as M
# NOINLINE leftMouseDownTVar #
# NOINLINE globalTimeStartTVar #
DisplayDepthBits 24,
shadeModel $= Smooth
blend $= Enabled
cullFace $= Just Back
wait until running
texture Texture2D $= Enabled
preservingMatrix $
return ()
... | # LANGUAGE GADTs , OverlappingInstances , UndecidableInstances , NoMonomorphismRestriction , CPP #
module OpenGL where
import Data.IORef
import qualified Allegro . Shape as S
import Control.Concurrent.STM
import System.Mem
import System.Time
import System.IO.Unsafe
import Signal . TSignal
import Control.Concurrent
i... |
2acc648c295c053923fd9e0c3f11c055ddf9629777867f0137e0cd5588d4f719 | day8/re-frame-10x | events.cljc | (ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.events
(:require [day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.utils :refer [first-in-vector]]
[day8.re... | null | https://raw.githubusercontent.com/day8/re-frame-10x/d8dcb17e217449aba2cf64b9f843b0e9f86cfcb6/gen-src/day8/re_frame_10x/inlined_deps/re_frame/v1v1v2/re_frame/events.cljc | clojure | do a whole lot of development time checks
-- handle event --------------------------------------------------------------------------------
remember what event we are currently handling | (ns ^{:mranderson/inlined true} day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.events
(:require [day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.db :refer [app-db]]
[day8.re-frame-10x.inlined-deps.re-frame.v1v1v2.re-frame.utils :refer [first-in-vector]]
[day8.re... |
d0c6f28c8b0e6486b4b120be39f67d1e0b405f478aa73800b4db08362e9ef19f | beam-telemetry/telemetry | telemetry_sup.erl | @private
-module(telemetry_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_one,
intensity => 1,
period =... | null | https://raw.githubusercontent.com/beam-telemetry/telemetry/09c132f1083cb6faa56d05dfdd0c443800bdf5cc/src/telemetry_sup.erl | erlang | @private
-module(telemetry_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_one,
intensity => 1,
period =... | |
2a1b05c4f8f7fd7a849e1849ed2fda1a69b4d256ff3657c24af6ca44dee9de9a | namin/clpsmt-miniKanren | talk.scm | CLP(SMT )
, University of Cambridge , UK
joint work with , UAB , USA
;;
We show how easy it is to hook an SMT ( Satisfiability Modulo Theory ) solver such as CVC4 or Z3 as a backend to miniKanren ,
;; an embedded domain-specific language in Scheme, to create an environment for constraint logic programming.... | null | https://raw.githubusercontent.com/namin/clpsmt-miniKanren/4fa74fb973c95b7913f0e0239852f18a23073ccc/talk.scm | scheme |
an embedded domain-specific language in Scheme, to create an environment for constraint logic programming.
We describe the simple implementation and illustrate the technology through interpreters, synthesis, and symbolic execution.
(load "mk.scm")
(load "z3-driver.scm")
(load "test-check.scm")
constraints
equivale... | CLP(SMT )
, University of Cambridge , UK
joint work with , UAB , USA
We show how easy it is to hook an SMT ( Satisfiability Modulo Theory ) solver such as CVC4 or Z3 as a backend to miniKanren ,
crash course on miniKanren
(define appendo
(lambda (l s ls)
(conde
[(== '() l) (== s ls)]
... |
f912feda3eeaa495b37f145fa7f34058f13846dea65bc755821b0216fa923b53 | GNOME/aisleriot | ten-across.scm | ; AisleRiot - ten-across.scm
;; base on klondike.scm
Copyright ( C ) 1998 , 2003 < >
Copyright ( C ) 1999 < >
;
; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the... | null | https://raw.githubusercontent.com/GNOME/aisleriot/5b04e58ba5f8df8223a3830d2c61325527d52237/games/ten-across.scm | scheme | AisleRiot - ten-across.scm
base on klondike.scm
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR ... | Copyright ( C ) 1998 , 2003 < >
Copyright ( C ) 1999 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(use-modules (aisleriot interface) (aisleri... |
a2234dbc1456598caa53b129d692f4a2e8d9c427561e63c7daa8e45155a25b74 | erlyaws/yaws | status.erl | -module(status).
-export([out/1]).
out(Arg) ->
[{"code", Status}] = yaws_api:parse_query(Arg),
{status, list_to_integer(Status)}.
| null | https://raw.githubusercontent.com/erlyaws/yaws/da198c828e9d95ca2137da7884cddadd73941d13/testsuite/main_SUITE_data/status.erl | erlang | -module(status).
-export([out/1]).
out(Arg) ->
[{"code", Status}] = yaws_api:parse_query(Arg),
{status, list_to_integer(Status)}.
| |
74ac8188a1635974e9232d2b53c86c8e428e4e3cc75d1b8541297ea3be46c135 | erlangonrails/devdb | intervals.erl | 2007 - 2010 fuer Informationstechnik Berlin
2008 onScale solutions GmbH
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 ... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/intervals.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2007 - 2010 fuer Informationstechnik Berlin
2008 onScale solutions GmbH
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
@author < >
i.e. the first and the last element of t... |
d40a2997366447ab6ebcddd12d85a85581d18a34cf031446a0a185ad15e8f192 | raptazure/experiments | Static.hs | module Web.Controller.Static where
import Web.Controller.Prelude
import Web.View.Static.Welcome
instance Controller StaticController where
action WelcomeAction = render WelcomeView
| null | https://raw.githubusercontent.com/raptazure/experiments/c48263980d1ce22ee9407ff8dcf0cf5091b01c70/haskell/ihp-blog/Web/Controller/Static.hs | haskell | module Web.Controller.Static where
import Web.Controller.Prelude
import Web.View.Static.Welcome
instance Controller StaticController where
action WelcomeAction = render WelcomeView
| |
19dc153d8acaf4ae7dbf5d6aae6c9c535a48f525fcfdf7df79d86efb6b42a6bd | y-taka-23/time-machine | Engine.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
module Control.Monad.TimeMachine.Engine (
-- * MonadTime Class
MonadTime(..)
, getTimeZone
, getCurrentTimeZone
, utcToLocalZonedTime
... | null | https://raw.githubusercontent.com/y-taka-23/time-machine/c82f15d51d12b800438aa74401f42d39e0c472fe/src/Control/Monad/TimeMachine/Engine.hs | haskell | * MonadTime Class
* Functions
* Configurations
| A data type to represents the speed of time.
i.e. @TimeScale 1@ is equivalent to the real speed of time.
| A class of monads in which you can obrain the mocked current time
and relevant information.
| Returns the mocked time zone at the given point of time.
| Re... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
module Control.Monad.TimeMachine.Engine (
MonadTime(..)
, getTimeZone
, getCurrentTimeZone
, utcToLocalZonedTime
, getZonedTime
, l... |
7f0bcf090d6edc774688153a60938a601671b2b11d81583b1acb63264f1758a3 | tezos/tezos-mirror | mockup_simulator.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/5e7d7dd20f1c902b5a6ff7b3d892b709835a848f/src/proto_016_PtMumbai/lib_delegate/test/mockup_simulator/mockup_simulator.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 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 " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
96fa1702550001338f60b1e32e57ad49b9fb09862a312f1dde6a957f677a76b6 | namin/inc | tests-1.8-req.scm | (add-tests-with-string-output "deeply nested procedures"
[(letrec ([e (lambda (x) (if (fxzero? x) #t (o (fxsub1 x))))]
[o (lambda (x) (if (fxzero? x) #f (e (fxsub1 x))))])
(e 25)) => "#f\n"]
[(letrec ([countdown (lambda (n)
(if (fxzero? n)
n
... | null | https://raw.githubusercontent.com/namin/inc/3f683935e290848485f8d4d165a4f727f6658d1d/src/tests-1.8-req.scm | scheme | (add-tests-with-string-output "deeply nested procedures"
[(letrec ([e (lambda (x) (if (fxzero? x) #t (o (fxsub1 x))))]
[o (lambda (x) (if (fxzero? x) #f (e (fxsub1 x))))])
(e 25)) => "#f\n"]
[(letrec ([countdown (lambda (n)
(if (fxzero? n)
n
... | |
fa7675cfb2c7376ace23649adcc0e13ad456bd6614126c36f48645efa2e8e89e | coccinelle/coccinelle | stdlib.mli | external raise : exn -> 'a = "%raise"
external raise_notrace : exn -> 'a = "%raise_notrace"
val invalid_arg : string -> 'a
val failwith : string -> 'a
exception Exit
exception Match_failure of (string * int * int)
exception Assert_failure of (string * int * int)
exception Invalid_argument of string
exception Failur... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.14/stdlib.mli | ocaml | external raise : exn -> 'a = "%raise"
external raise_notrace : exn -> 'a = "%raise_notrace"
val invalid_arg : string -> 'a
val failwith : string -> 'a
exception Exit
exception Match_failure of (string * int * int)
exception Assert_failure of (string * int * int)
exception Invalid_argument of string
exception Failur... | |
13b91b2406d246368d80ac08e202741aa6d1a2c1213997e565dc2c69986a6dfc | charlieg/Sparser | exports.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
copyright ( c ) 1999 - 2000 -- all rights reserved
;;;
;;; File: "exports"
;;; Module: "init;Lisp:"
Version : July 2000
initiated 7/4/99 . Elaborated bit by bit through 9/3 . Then started
up again 7/00
(in-package :sparser)
(e... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/init/Lisp/exports.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*-
File: "exports"
Module: "init;Lisp:" | copyright ( c ) 1999 - 2000 -- all rights reserved
Version : July 2000
initiated 7/4/99 . Elaborated bit by bit through 9/3 . Then started
up again 7/00
(in-package :sparser)
(export '(string-append
p
ie
e#
tr
deftrace
trace-msg
... |
0025002ed22985c1b06ea39fab8136109e8ebdbf707e34c546db4892ec2059ed | andrenventer/clojure-javafx | project.clj | (defproject app "0.1.0-SNAPSHOT"
:description "Clojure and JavaFX"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[com.oracle/javafx-runtime "2.2.3"]
[org.clojure/tools.namespace "0.2.11"]]
:aot :all... | null | https://raw.githubusercontent.com/andrenventer/clojure-javafx/9bbeeab4ee72e44247b053b617b05bcfd01b8407/project.clj | clojure | (defproject app "0.1.0-SNAPSHOT"
:description "Clojure and JavaFX"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.7.0"]
[com.oracle/javafx-runtime "2.2.3"]
[org.clojure/tools.namespace "0.2.11"]]
:aot :all... | |
5e158a84cd1863dbb90deaaa5a520f9dc017813132b679116a01e1806cca2e01 | awolven/cl-vulkan | swapchain.lisp | Copyright 2019 , 2020
;;
;; Permission is hereby granted, free of charge, to any person obtaining
;; a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
;; without limitation the rights to use, copy, modify, merge, publish,
d... | null | https://raw.githubusercontent.com/awolven/cl-vulkan/a31cb5949e8f5b48afd5fa847b1ce7bca20b87e1/src/swapchain.lisp | lisp |
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,
the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIE... | Copyright 2019 , 2020
" 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
included in all copies or substantial portions of the Software .
THE ... |
1dd36a0704ee0218e4d1b750bafce5306a2bc88b5a1034890906d47a7f750fca | hiratara/Haskell-Nyumon-Sample | chap02-samples-2-5-io.hs | putW, putX :: IO ()
putW = putStrLn "W"
putX = putStrLn "X"
makePutY, makePutZ :: IO (IO ())
makePutY = return $ putStrLn "Y"
makePutZ = return $ putStrLn "Z"
main :: IO ()
main = do
let w = putW
x = putX
-- xがputXへ束縛されているが、mainに紐付けられていないのでXは表示されない
生成したYを表示するI / OアクションputYをmainへ紐付けていないので、Yは表示されない
... | null | https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap02-samples/chap02-samples-2-5-io.hs | haskell | xがputXへ束縛されているが、mainに紐付けられていないのでXは表示されない
生成したI/OアクションputZをmainへ紐付けると、Zが表示される | putW, putX :: IO ()
putW = putStrLn "W"
putX = putStrLn "X"
makePutY, makePutZ :: IO (IO ())
makePutY = return $ putStrLn "Y"
makePutZ = return $ putStrLn "Z"
main :: IO ()
main = do
let w = putW
x = putX
生成したYを表示するI / OアクションputYをmainへ紐付けていないので、Yは表示されない
putZ <- makePutZ
|
583f8d8d52bd254e0b12f2022414994cb6038cad0c37c6cb9b6b8d35c46d2c73 | motoshira/lib_for_competitive_programming | chokudai-search.lisp | ;;;
BOF
;;;
(defpackage randomized-heap
(:use #:cl)
(:nicknames #:rh)
(:export #:make-randomized-heap
#:empty-p
#:push!
#:pop!
#:peak
#:count))
(in-package #:randomized-heap)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar *OPT*
#+sw... | null | https://raw.githubusercontent.com/motoshira/lib_for_competitive_programming/a27f9018db3607ff63250c7a78650c5be8ddf60c/experimental/chokudai-search.lisp | lisp |
l is root
r is root
各stepの一番いい状態を返す
| BOF
(defpackage randomized-heap
(:use #:cl)
(:nicknames #:rh)
(:export #:make-randomized-heap
#:empty-p
#:push!
#:pop!
#:peak
#:count))
(in-package #:randomized-heap)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar *OPT*
#+swank '(op... |
3cad5bbd61b33c022e93bd12ac096ac1a73e671fbc7868c9b76164cb6ac99f49 | timbertson/passe | unikernel.ml | module Main (CON:Conduit_mirage.S) (Static_kv:Passe_server.Static.Kv_RO) (Fs:Passe_server.Filesystem.FS) (Clock:Mirage_clock.PCLOCK) = struct
module Cohttp = Cohttp_mirage.Server(Conduit_mirage.Flow)
module PasseFS = Passe_server.Filesystem.Make(Fs)(Passe_server.Filesystem_xen.Atomic)
module Cohttp_server = Cohtt... | null | https://raw.githubusercontent.com/timbertson/passe/a0aa00695022657a222ea06a4796da36141aaa1a/src/mirage/unikernel.ml | ocaml | module Main (CON:Conduit_mirage.S) (Static_kv:Passe_server.Static.Kv_RO) (Fs:Passe_server.Filesystem.FS) (Clock:Mirage_clock.PCLOCK) = struct
module Cohttp = Cohttp_mirage.Server(Conduit_mirage.Flow)
module PasseFS = Passe_server.Filesystem.Make(Fs)(Passe_server.Filesystem_xen.Atomic)
module Cohttp_server = Cohtt... | |
671d87518393036aff71da1aa989ff86e31f0c59a9b5215e10ac2e97d53f83a3 | clojure-interop/java-jdk | KeyName.clj | (ns javax.xml.crypto.dsig.keyinfo.KeyName
"A representation of the XML KeyName element as
defined in the
W3C Recommendation for XML-Signature Syntax and Processing.
A KeyName object contains a string value which may be used
by the signer to communicate a key identifier to the recipient. The
XML Schema Defin... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/crypto/dsig/keyinfo/KeyName.clj | clojure | for example:
" | (ns javax.xml.crypto.dsig.keyinfo.KeyName
"A representation of the XML KeyName element as
defined in the
W3C Recommendation for XML-Signature Syntax and Processing.
A KeyName object contains a string value which may be used
by the signer to communicate a key identifier to the recipient. The
XML Schema Defin... |
349c5e1b2b3b982e80c445a8b06677b4cfbe6efec863fda7f54ea85ab16daaa3 | ryanpbrewster/haskell | P040.hs | module Problems.P040
( solve
) where
- An irrational decimal fraction is created by concatenating the positive
- integers :
-
- 0.123456789101112131415161718192021 ...
-
- It can be seen that the 12th digit of the fractional part is 1 .
-
- If dn represents the nth digit of the fractional p... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Problems/P040.hs | haskell | module Problems.P040
( solve
) where
- An irrational decimal fraction is created by concatenating the positive
- integers :
-
- 0.123456789101112131415161718192021 ...
-
- It can be seen that the 12th digit of the fractional part is 1 .
-
- If dn represents the nth digit of the fractional p... | |
a42bfee783684031c2b95de7923ce32193950bc97cabebab0b1500bb4c8f0d35 | toschoo/mom | esc.hs | module Main
where
import Network . Mom . Stompl .
import Data.Attoparsec
import qualified Data.ByteString.Char8 as B
import Data.Word
t1 :: B.ByteString
t1 = B.pack "hello \nworld\\c this is \\\\ a test:"
main :: IO ()
main =
let eiR = parseOnly (escText [58]) t1
in... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/stompl/test/smoke/esc.hs | haskell | module Main
where
import Network . Mom . Stompl .
import Data.Attoparsec
import qualified Data.ByteString.Char8 as B
import Data.Word
t1 :: B.ByteString
t1 = B.pack "hello \nworld\\c this is \\\\ a test:"
main :: IO ()
main =
let eiR = parseOnly (escText [58]) t1
in... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.