_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 |
|---|---|---|---|---|---|---|---|---|
6f8f8745fed9b8bb04b53fac5b3e8c5addfee3eb1ef92f4e82095d44297bd1b4 | blindglobe/clocc | lcl.lisp | ;;; -*- Mode: CLtL -*-
(in-package "MK4")
(shadow '(lcl:run-program))
(defun run-program (program &rest arguments)
(lcl:run-program program :arguments arguments))
(defmethod load-object-file ((loadable-object-pathname pathname)
&key
(print *load-print*)
(verbose *load-verbose*)
(l... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/defsystem-4/src/impl-dependent/lcl.lisp | lisp | -*- Mode: CLtL -*-
end of file -- lcl.lisp -- |
(in-package "MK4")
(shadow '(lcl:run-program))
(defun run-program (program &rest arguments)
(lcl:run-program program :arguments arguments))
(defmethod load-object-file ((loadable-object-pathname pathname)
&key
(print *load-print*)
(verbose *load-verbose*)
(libraries '("c"))
... |
32c412da8faf4aaa58849cac906121401ec2447453a4870d13914440aede4ba2 | onyx-platform/onyx | idempotent_job_test.clj | (ns onyx.peer.idempotent-job-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is testing]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.test-helper :refer [load-config with-test-env add-test-env-peers!]]
... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/peer/idempotent_job_test.clj | clojure | (ns onyx.peer.idempotent-job-test
(:require [clojure.core.async :refer [chan >!! <!! close! sliding-buffer]]
[clojure.test :refer [deftest is testing]]
[onyx.plugin.core-async :refer [take-segments!]]
[onyx.test-helper :refer [load-config with-test-env add-test-env-peers!]]
... | |
2b126eba145d04888ddc9c97ffb9a990e2276f352c6de732fab58b3930749e88 | cmars/sks-keyserver | pSet.ml | (***********************************************************************)
(* pSet.ml - Sets over ordered types *)
(* *)
Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2... | null | https://raw.githubusercontent.com/cmars/sks-keyserver/d848c4852cb15585525772b6378670f8724a8f39/pSet.ml | ocaml | *********************************************************************
pSet.ml - Sets over ordered types
redistribute it and/or modify it under ... | Copyright ( C ) 2002 , 2003 , 2004 , 2005 , 2006 , 2007 , 2008 , 2009 , 2010 ,
2011 , 2012 , 2013 and Contributors
This file is part of SKS . SKS is free software ; you can
Public License as published by the Free Software Foundation ; either
version 2 of the License , or... |
c60187260b3904869f4a1bfc588113dfcbcb0894ef25f61eade2a9dfb7cc5899 | erlang/rebar3 | rebar_prv_help.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_prv_help).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-define(PROVIDER, help).
-define(DEPS, []).
%% =====================================================... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/rebar_prv_help.erl | erlang | ex: ts=4 sw=4 et
===================================================================
Public API
===================================================================
default namespace
print help/usage string
| -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(rebar_prv_help).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-define(PROVIDER, help).
-define(DEPS, []).
-spec init(rebar_state:t()) -> {ok, rebar_state:t()}.
init(State) ->
St... |
d0b69cd2e2e2070619a5a856db9320b22c7a1059b98c13175739f8f46a54d8fe | braveclojure/training | core.clj | (ns hn.core
(:import [org.openqa.selenium By WebDriver WebElement]
[org.openqa.selenium.firefox FirefoxDriver])
(:gen-class))
(defn scrape
[]
(let [driver (doto (FirefoxDriver.)
(.get ""))]
(let [titles (->> (.findElements driver (By/cssSelector ".title a:nth-child(2)"))
... | null | https://raw.githubusercontent.com/braveclojure/training/5b7fb9059c17b2166c2e66850094f424319e55eb/projects/hn/src/hn/core.clj | clojure | closes the browser | (ns hn.core
(:import [org.openqa.selenium By WebDriver WebElement]
[org.openqa.selenium.firefox FirefoxDriver])
(:gen-class))
(defn scrape
[]
(let [driver (doto (FirefoxDriver.)
(.get ""))]
(let [titles (->> (.findElements driver (By/cssSelector ".title a:nth-child(2)"))
... |
e5d7285bd4aa463c8bcf33223687822e70b44cb26ede5a75ce80291fa1f9f3f2 | tnelson/Forge | var-vs-non-var-rels.rkt | #lang forge
option run_sterling off
option verbose 0
option problem_type temporal
sig nonVarSigNoRels {}
var sig VarSigNoRels {}
sig nonVarSigNonVarRels {
nonVarToNonVar : set nonVarSigNoRels,
nonVarToVar : set VarSigNoRels
}
var sig VarSigNonVarRels {
varToNonVar : set nonVarSigNonVarRels,
varToVar... | null | https://raw.githubusercontent.com/tnelson/Forge/a7187ef110f46493c1d45011035b05646b9ccd22/forge/tests/forge/electrum/var-vs-non-var-rels.rkt | racket | #lang forge
option run_sterling off
option verbose 0
option problem_type temporal
sig nonVarSigNoRels {}
var sig VarSigNoRels {}
sig nonVarSigNonVarRels {
nonVarToNonVar : set nonVarSigNoRels,
nonVarToVar : set VarSigNoRels
}
var sig VarSigNonVarRels {
varToNonVar : set nonVarSigNonVarRels,
varToVar... | |
a5c2d072fb4b8f04294ad170b12067defddaed3da087a516bfb3964811b65f1a | dsferruzza/prismic-backup | Storage.hs | module Storage where
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as BIO (writeFile)
import qualified Data.List as L (stripPrefix)
import qualified Data.Maybe as M (fromMaybe)
import Data.Text (Text)
import qualified Data.Text.IO as IO (writeFile)
import Data.Vector (Vector)
import qu... | null | https://raw.githubusercontent.com/dsferruzza/prismic-backup/ec90f5922dbf502d9142670a341e7cf590536b2b/src/Storage.hs | haskell | module Storage where
import Data.ByteString.Lazy (ByteString)
import qualified Data.ByteString.Lazy as BIO (writeFile)
import qualified Data.List as L (stripPrefix)
import qualified Data.Maybe as M (fromMaybe)
import Data.Text (Text)
import qualified Data.Text.IO as IO (writeFile)
import Data.Vector (Vector)
import qu... | |
163d9dc8c45e46f73a6a4f230cd69893805c48da0e3f314bfe235bf2178931ba | EasyCrypt/easycrypt | ecGState.mli | (* -------------------------------------------------------------------- *)
(* Global / mutable EasyCrypt state that can be attached to an
* environment - and shared by all the decendant of such an
* environment. This state can be used to register notification
* functions or global flags (e.g. profiling / tracing) *... | null | https://raw.githubusercontent.com/EasyCrypt/easycrypt/f87695472e70c313ef2966e20979b1afcc2e543e/src/ecGState.mli | ocaml | --------------------------------------------------------------------
Global / mutable EasyCrypt state that can be attached to an
* environment - and shared by all the decendant of such an
* environment. This state can be used to register notification
* functions or global flags (e.g. profiling / tracing)
------... |
type gstate
val create : unit -> gstate
val copy : gstate -> gstate
val from_flags : (string * bool) list -> gstate
type value = [ `Int of int ]
val asint : default:int -> value option -> int
val getvalue : string -> gstate -> value option
val setvalue : string -> value -> gstate -> unit
val getflag : ?default... |
1c5a66e1959150aa1b526b5c0b24d9900754579b7207ba0e357477760da7ba54 | modular-macros/ocaml-macros | odoc_types.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/ocamldoc/odoc_types.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type ref_kind =
RK_module
| RK_module_type
| RK_class
| RK_class_type
| RK_value
| RK_type
... |
e281d93f89a50317d6f362e059a49db8da0cb295f983e01a9739a13cbd09c91a | facebook/flow | serverStatus.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/52e59c7a9dea8556e7caf0be2b2c5c2e310b5b65/src/monitor/status/serverStatus.ml | ocaml | This module tries to model the Flow server's status as a state machine. The current status is
* the state, and it gets updated by events. This status can then be streamed to Flow clients and
* rendered.
* The server is free
* The server is starting to initialize
* Fetching the saved state is taking a long time
... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
8b5dfa6b1f9446f3866c7725930377e4f380ca1cece578e5075ddc9f7af9faa9 | databrary/databrary | Index.hs | {-# LANGUAGE OverloadedStrings, RecordWildCards,
ScopedTypeVariables #-}module Solr.Index
( updateIndex
) where
import Control.Exception.Lifted (handle)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (ReaderT(..), ask)
import Control.Monad.Trans.Class (lift)
import qualified Data.Aeson as JSO... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Solr/Index.hs | haskell | # LANGUAGE OverloadedStrings, RecordWildCards,
ScopedTypeVariables #
this could be more efficient, but there usually aren't many: | ( updateIndex
) where
import Control.Exception.Lifted (handle)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Reader (ReaderT(..), ask)
import Control.Monad.Trans.Class (lift)
import qualified Data.Aeson as JSON
import qualified Data.Aeson.Encoding as JSON
import qualified Data.ByteString as BS
import... |
cafed7a74c396a2e74255ff0ab965ee8c49a9ccffa511d6a4fb854145b8f2d87 | pedestal/pedestal | request_handling_test.clj | Copyright 2013 Relevance , Inc.
Copyright 2014 - 2022 Cognitect , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; which can be found in the file epl-v10.html at the root of this distribution.
;
; By using this software in any fashion, you are agreeing ... | null | https://raw.githubusercontent.com/pedestal/pedestal/53bfe70143a22cdfd2f0d183023334a199c9e9a2/tests/test/io/pedestal/http/request_handling_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 2013 Relevance , Inc.
Copyright 2014 - 2022 Cognitect , Inc.
Eclipse Public License 1.0 ( )
(ns ^{:doc "Integration tests of request handling."}
io.pedestal.http.request-handling-test
(:require [io.pedestal.http.route :as route]
[io.pedestal.http.impl.servlet-interceptor :as servlet-i... |
174c25b0151f905f471d29cece6e4e7a13fb4b39b96d72e7a2fda12179d6ef18 | larrytheliquid/Lemmachine | FFI.hs | module Lemmachine.FFI where
import qualified Hack
import qualified Hack.Handler.Happstack as Handler
import Data.ByteString.Lazy.Char8 (pack)
type Version = String
type IP = String
type LocalPath = String
type Path = String
type RawPath = String
type PathToken = String
type PathTokens = [PathToken]
data RequestHeader ... | null | https://raw.githubusercontent.com/larrytheliquid/Lemmachine/8ef786b40e4a9ab274c6103dc697dcb658cf3db3/src/Lemmachine/FFI.hs | haskell | module Lemmachine.FFI where
import qualified Hack
import qualified Hack.Handler.Happstack as Handler
import Data.ByteString.Lazy.Char8 (pack)
type Version = String
type IP = String
type LocalPath = String
type Path = String
type RawPath = String
type PathToken = String
type PathTokens = [PathToken]
data RequestHeader ... | |
2d910d3b1168e1de9d10a0bb2e81c0a0db2001d63eda7cedad2b08c70f70b6b3 | antono/guix-debian | gperf.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 t... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/gnu/packages/gperf.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages gperf)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-m... |
2238cd596ce58e875be3a23a7158e292a607183e46c5301e74cdcc31db80ed70 | jwiegley/notes | IsoMu.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE DeriveFunctor #
{-# LANGUAGE RankNTypes #-}
module IsoMu where
import Data.Functor.Compose
data Of a b = Of a b deriving Functor
newtype Mu f = Mu { runMu :: forall r. (f r -> r) -> r}
cataMu :: Functor f => (f a -> a) -> Mu f -> a
cataMu = flip runMu
(??) = flip
foo :: Int -> [... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/IsoMu.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE DeriveFunctor #
module IsoMu where
import Data.Functor.Compose
data Of a b = Of a b deriving Functor
newtype Mu f = Mu { runMu :: forall r. (f r -> r) -> r}
cataMu :: Functor f => (f a -> a) -> Mu f -> a
cataMu = flip runMu
(??) = flip
foo :: Int -> [Int] -> Int
foo z xs = foldr ?? z ?? xs $ \x rest -... |
9f6cfbf3f8ecdb35a4b34c6d2dced76131c6bddc133704132805ded24a7acb54 | district0x/cljs-web3 | eth.cljs | (ns cljs-web3.eth
"Contains the ethereum blockchain related methods."
(:refer-clojure :exclude [filter])
(:require [cljs-web3.utils :as u :refer [js-apply camel-case]]))
(defn eth
"Gets eth object from web3-instance.
Parameter:
web3 - web3 instance"
[web3]
(aget web3 "eth"))
(defn get-compile
"Ge... | null | https://raw.githubusercontent.com/district0x/cljs-web3/14ba12e37dd944c90f4741d92c8c94394b9a3dba/src/cljs_web3/eth.cljs | clojure | and contract deployed. | (ns cljs-web3.eth
"Contains the ethereum blockchain related methods."
(:refer-clojure :exclude [filter])
(:require [cljs-web3.utils :as u :refer [js-apply camel-case]]))
(defn eth
"Gets eth object from web3-instance.
Parameter:
web3 - web3 instance"
[web3]
(aget web3 "eth"))
(defn get-compile
"Ge... |
be6ecbabbc6933a8e80b6acf86ab123f01f485713bc0cf218e0fc1b8dc5e20b1 | facebook/pyre-check | searchPathTest.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/f51ce84f0a86a072b97ff98ab7b2ac7c5d21c505/source/test/searchPathTest.ml | ocaml | Create root/subdirectory.
Non-normalized creation succeeds all the time.
Normalized creation depends on filesystem state. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
8fc0a2329d527e389e26952a4ea1e4fb97a5ab26a96f00b64daf02daba853610 | gafiatulin/codewars | HighAndLow.hs | -- Highest and Lowest
--
module Kata (highAndLow) where
highAndLow :: String -> String
highAndLow s = let ns = map (\ss -> read ss :: Int) . words $ s in unwords . map show $ [maximum ns, minimum ns]
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/HighAndLow.hs | haskell | Highest and Lowest
|
module Kata (highAndLow) where
highAndLow :: String -> String
highAndLow s = let ns = map (\ss -> read ss :: Int) . words $ s in unwords . map show $ [maximum ns, minimum ns]
|
a3c51a08e1cf3a79e3364d6f51526f8a3381291b83433511b9bec881335a79c4 | michaelschade/hs-stripe | Connect.hs | {-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE OverloadedStrings #-}
module Web.Stripe.Connect
( authURL
, getAccessToken
, createCustomerToken
, SecretKey (..)
, StripeConnectTokens (..)
, Scope (..)
, Landing (..)
, AuthCode
, AccessToken
, PublishableKey
, RefreshToke... | null | https://raw.githubusercontent.com/michaelschade/hs-stripe/64b58415ccc567b00171b34470e93400cb9e79fd/src/Web/Stripe/Connect.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
URIs ------------------------------------------------------------------------
HTTP ------------------------------------------------------------------------
Stripe API ---------------------------------------------------------------------
Instances -----... |
module Web.Stripe.Connect
( authURL
, getAccessToken
, createCustomerToken
, SecretKey (..)
, StripeConnectTokens (..)
, Scope (..)
, Landing (..)
, AuthCode
, AccessToken
, PublishableKey
, RefreshToken
, UserId
, ClientId
, URL
) where
import C... |
1eb86cac1009b6d2d5b47300970c952a71e8fc55328728440f598c67fa303397 | hyperfiddle/electric | hfql_sub_editor4.cljc | (ns dustin.y2022.hfql.hfql-sub-editor4
(:require [clojure.spec.alpha :as s]
[hyperfiddle.api :as hf]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui2 :as ui])
#?(:cljs (:require-macros dustin.y2022.hfql.hfql-sub-editor4)))
#?(:clj ... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/hfql/hfql_sub_editor4.cljc | clojure | all commands branch, for inline edits like pay rate editor, use ::hf/inline true with a single command
sugar
collision with orders , no problem IRL
Q: Can you overload gray input if the value comes from the query context? [shirtsize gender case] NO
hypothesis: all orange values are readonly, all gray values are ed... | (ns dustin.y2022.hfql.hfql-sub-editor4
(:require [clojure.spec.alpha :as s]
[hyperfiddle.api :as hf]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.photon-ui2 :as ui])
#?(:cljs (:require-macros dustin.y2022.hfql.hfql-sub-editor4)))
#?(:clj ... |
1a3f8bcec737585130830614549b79315605c0f55edb75b5f8bd753d38ba9773 | nikita-volkov/rebase | Dual.hs | module Rebase.Data.Semigroupoid.Dual
(
module Data.Semigroupoid.Dual
)
where
import Data.Semigroupoid.Dual
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Semigroupoid/Dual.hs | haskell | module Rebase.Data.Semigroupoid.Dual
(
module Data.Semigroupoid.Dual
)
where
import Data.Semigroupoid.Dual
| |
e6520d9900f7298c748f739091819c1e07cb958a7c9e9abf9477057914c0f7b8 | fulcrologic/fulcro-native | bare.cljc | (ns com.fulcrologic.fulcro-native.bare
"A Base Fulcro wrapper for building apps that work on Bare React Native apps that use Expo APIs.
This is a separate ns because it needs to not require any of the managed workflow code.
Usage:
When you create your Fulcro app, set the root render function to the one in th... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-native/c42280f98ded16343e7fa23f07084b00e26e6a5f/src/main/com/fulcrologic/fulcro_native/bare.cljc | clojure | (ns com.fulcrologic.fulcro-native.bare
"A Base Fulcro wrapper for building apps that work on Bare React Native apps that use Expo APIs.
This is a separate ns because it needs to not require any of the managed workflow code.
Usage:
When you create your Fulcro app, set the root render function to the one in th... | |
b929f2a95da8aba297d07e1e4f767b8f3346fc0ed11dafc22204a3422749e127 | pflanze/chj-schemelib | gambit-uri.scm | Originally from : File : " http.scm " , Time - stamp : < 2005 - 05 - 11 16:40:58 feeley >
Copyright ( C ) 2005 by , All Rights Reserved .
Copyright 2005 , 2018 < >
(require easy
(srfi-1 fold-right)
if-let
(cj-url-encode url-encode)
test)
(export (class uri)
parse-uri
parse-uri-qu... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/gambit-uri.scm | scheme | URI parsing.
also gets to contain authentication and port info if present!
possibly inside the "scheme" part
the ":" is in the "path" part
inside the "authority" part
inside the "path" part
inside the "query" part
inside the "fragment" part
(begin (set-car! l "?") l)
only almost unmeasurably slower
todo:
> (... | Originally from : File : " http.scm " , Time - stamp : < 2005 - 05 - 11 16:40:58 feeley >
Copyright ( C ) 2005 by , All Rights Reserved .
Copyright 2005 , 2018 < >
(require easy
(srfi-1 fold-right)
if-let
(cj-url-encode url-encode)
test)
(export (class uri)
parse-uri
parse-uri-qu... |
0ea193d4b1a21d43c480aeb40f3170af40dbd7cc0390b988b6a81eea11d2cb3b | rufus-lang/rufus | rufus_erlang_list_test.erl | -module(rufus_erlang_list_test).
-include_lib("eunit/include/eunit.hrl").
forms_for_function_returning_an_empty_list_lit_form_test() ->
RufusText =
"\n"
" module example\n"
" func Empty() list[int] { list[int]{} }\n"
" ",
{ok, Tokens} = rufus_tokenize:string(RufusText)... | null | https://raw.githubusercontent.com/rufus-lang/rufus/fb3ec8f67c06e8d656c6aa6c4297461559ee168f/rf/test/rufus_erlang_list_test.erl | erlang | -module(rufus_erlang_list_test).
-include_lib("eunit/include/eunit.hrl").
forms_for_function_returning_an_empty_list_lit_form_test() ->
RufusText =
"\n"
" module example\n"
" func Empty() list[int] { list[int]{} }\n"
" ",
{ok, Tokens} = rufus_tokenize:string(RufusText)... | |
657727772804061388d0d5d9f06c047580ca7b9367734e98205b665370f0074d | ekg/guix-genomics | freebayes.scm | (define-module (freebayes)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages base)
#:use-module (gnu packages gcc)
#:use-module (gnu packages cmake)
#:use-module (gnu packages p... | null | https://raw.githubusercontent.com/ekg/guix-genomics/bd5f8dedcf49e0bc97dce8a51a4044c1dd418f46/freebayes.scm | scheme | This stashes our build version in the executable | (define-module (freebayes)
#:use-module (guix packages)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages base)
#:use-module (gnu packages gcc)
#:use-module (gnu packages cmake)
#:use-module (gnu packages p... |
fe4ebc08eb5bd201b58caf4d37182e7a19f8e3698c7975d8a896eccb247fe174 | input-output-hk/cardano-sl | Download.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
-- | Logic related to downloading update.
module Pos.Network.Update.Download
( installerHash
, downloadUpdate
) where
import Universum
import Control.Exception.Safe (handleAny)
import Control.Lens (views... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/src/Pos/Network/Update/Download.hs | haskell | # LANGUAGE RankNTypes #
| Logic related to downloading update.
function, which is a bit strange, but it's done for historical
reasons.
downloaded update.
If we have already downloaded an update successfully, this function won't
download new updates.
The caller must ensure that:
It must be enforced by the... | # LANGUAGE RecordWildCards #
module Pos.Network.Update.Download
( installerHash
, downloadUpdate
) where
import Universum
import Control.Exception.Safe (handleAny)
import Control.Lens (views)
import Control.Monad.Except (ExceptT (..), throwError)
import q... |
ceeb636328fd378dfc3705e428efa807e73a9dab83784f6c4e0042d932407821 | awslabs/s2n-bignum | bignum_mod_p384.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_mod_p384.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "x86/p384/bignum_mod_p384.o";;
***
PUSH (% rbx)
PUSH (% r12)
PUSH (% r13)
PUSH (% r14)
SUB (% r8) (% rax)
AND (% rax) (% r14)
A... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Reduction modulo p_384 , the field characteristic for NIST curve P... |
0f6808bd41c6df89a73d83e8d365cfbc1cbb05a2b7ba49d46a130bedc12350a7 | Deducteam/CoqInE | modules.ml | (** Translation of Coq modules *)
open Declarations
open Debug
open Info
let fail_on_issue = ref true
let enable_failproofmode () = message "Failproof mode enabled." ; fail_on_issue := false
let disable_failproofmode () = message "Failproof mode disabled."; fail_on_issue := true
let symb_filter = ref []
let filter... | null | https://raw.githubusercontent.com/Deducteam/CoqInE/c38cca7fa27ee56c3ab2e8712d904b1620f8546d/src/modules.ml | ocaml | * Translation of Coq modules
Constant definitions have a type and a body.
- The type can be non-polymorphic (normal type) or
a polymorphic arity (universe polymorphism).
- The body can be empty (an axiom), a normal definition, or
an opaque definition (a theorem).
There should be no section hypothese... |
open Declarations
open Debug
open Info
let fail_on_issue = ref true
let enable_failproofmode () = message "Failproof mode enabled." ; fail_on_issue := false
let disable_failproofmode () = message "Failproof mode disabled."; fail_on_issue := true
let symb_filter = ref []
let filter_out symb = symb_filter := symb ::... |
aa340ce14aa87da44ccd3bceab2b4c106636afabbed4d13aaeee72b3263849aa | Clozure/ccl-tests | atan.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Feb 11 06:01:55 2004
Contains : Tests of ATAN
(in-package :cl-test)
(deftest atan.1
(let ((result (atan 0)))
(or (eqlt result 0)
(eqlt result 0.0)))
t)
(deftest atan.2
(loop for type in '(short-float single-float double-float long-float)
for ze... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/atan.lsp | lisp | -*- Mode: Lisp -*-
More accuracy tests here
Error tests | Author :
Created : We d Feb 11 06:01:55 2004
Contains : Tests of ATAN
(in-package :cl-test)
(deftest atan.1
(let ((result (atan 0)))
(or (eqlt result 0)
(eqlt result 0.0)))
t)
(deftest atan.2
(loop for type in '(short-float single-float double-float long-float)
for zero = (coerce 0 type)
un... |
6cafe9df415cbaa2cd7d13b86404c0b3e3b278a4b11133b31486dc12be50d5f1 | trskop/command-wrapper | Params.hs | -- |
-- Module: $Header$
Description : Subcommand parameters as defined by Subcommand Protocol .
Copyright : ( c ) 2018 - 2020
License : BSD3
--
-- Maintainer:
-- Stability: experimental
Portability : GHC specific language extensions .
--
Subcommand parameters as defined by Subcommand Proto... | null | https://raw.githubusercontent.com/trskop/command-wrapper/4f2e2e1f63a3296ccfad9f216d75a708969890ed/command-wrapper-core/src/CommandWrapper/Core/Environment/Params.hs | haskell | |
Module: $Header$
Maintainer:
Stability: experimental
* Environment Builder
page for more details.
For example, default installation path of Command Wrapper for user
@
'exePath' = \"\/home\/neo\/.local\/lib\/command-wrapper\/command-wrapper\"
@
This value is passed via @COMMAND_WRAPPER_EXE@ e... | Description : Subcommand parameters as defined by Subcommand Protocol .
Copyright : ( c ) 2018 - 2020
License : BSD3
Portability : GHC specific language extensions .
Subcommand parameters as defined by Subcommand Protocol . See
@command - wrapper - subcommand - protocol(7)@ manual page for its d... |
4287bed64e2155ab2fb6cb0bc2cf328053e44146fc8257026a20237b617581be | Smoltbob/Caml-Est-Belle | doublearray.ml | let dummy = Array.create 0 0. in
let rec make m n =
let mat = Array.create m dummy in
let rec init i =
if i < 0 then () else
(mat.(i) <- Array.create n 0.;
init (i - 1)) in
init (m - 1);
mat in
let a = make 2 3 in
a.(0).(0) <- 1.;
() | null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/typechecking/valid/doublearray.ml | ocaml | let dummy = Array.create 0 0. in
let rec make m n =
let mat = Array.create m dummy in
let rec init i =
if i < 0 then () else
(mat.(i) <- Array.create n 0.;
init (i - 1)) in
init (m - 1);
mat in
let a = make 2 3 in
a.(0).(0) <- 1.;
() | |
dc17ddd8eb0f44c0d85854e7153e97ce3bdfe9ce364ee135ec804ae2fea9e5d8 | extend/elevators | stoplist.erl | %%% File : stoplist.erl
Author : >
%%% Purpose : Contains functions to manipulate stop lists.
Created : 5 Aug 1999 by >
-module(stoplist).
-author('').
-vsn("1.0").
-export([add/3, time_to/3]).
%%----------------------------------------------------------------------
add(Floor , Las... | null | https://raw.githubusercontent.com/extend/elevators/02276cc05da80017eea1691281fc062af62fa64a/src/stoplist.erl | erlang | File : stoplist.erl
Purpose : Contains functions to manipulate stop lists.
----------------------------------------------------------------------
----------------------------------------------------------------------
----------------------------------------------------------------------
The actual value nee... | Author : >
Created : 5 Aug 1999 by >
-module(stoplist).
-author('').
-vsn("1.0").
-export([add/3, time_to/3]).
add(Floor , LastFloor , StopList )
Adds a stop at Floor to StopList , given that the last floor passed was
LastFloor .
add(Floor, _LastFloor, []) ->
[Floor];
a... |
f569d7cc0947da409f26dfb2c2dad816541956b696aac5d42caaafe393591e27 | KavrakiLab/tmkit | plan-automaton.lisp | (in-package :tmsmt)
(defstruct concrete-state
(bits (make-array 0 :element-type 'bit))
exp)
(defun concrete-state-compare (a b)
(let* ((a-bits (concrete-state-bits a))
(b-bits (concrete-state-bits b))
(n-a (length a-bits))
(n-b (length b-bits)))
(assert (= n-a n-b))
(bit-vect... | null | https://raw.githubusercontent.com/KavrakiLab/tmkit/4fb6fc0fa02c5b242dfcbe0013d3c1178e9d9224/lisp/plan-automaton.lisp | lisp | TODO: this could be better
recursively solve from effect state back to automaton
the uncontrollable precondition state.
find the successor concrete state
collect list of concrete states in the plan
add concrete states and edges to the plan automaton
TODO: recursively fix the plan
TODO: collect accept stat... | (in-package :tmsmt)
(defstruct concrete-state
(bits (make-array 0 :element-type 'bit))
exp)
(defun concrete-state-compare (a b)
(let* ((a-bits (concrete-state-bits a))
(b-bits (concrete-state-bits b))
(n-a (length a-bits))
(n-b (length b-bits)))
(assert (= n-a n-b))
(bit-vect... |
028ecdb21461623337d79de09f2fc66009479bc6486516256b2608c4f1290d6b | spawnfest/eep49ers | dummy1_h.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/test/dummy1_h.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 1996 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(dummy1_h).
-export([init/1, handle_event/2, handle_call/2, handle_info/2,
terminate/2, format_status/2]).... |
6d890d9c5c0c5a9351793c60ab92e3c4cefcf416768b9da7b0ad129921089ea7 | nytimes/querqy-clj | elasticsearch.clj | (ns com.nytimes.querqy.elasticsearch
"Convert a `querqy.model.ExpandedQuery` into an Elasticsearch query.
You may control the query generation with the following keys in the opts map.
See the Elasticsearch documentation for their meaning.
The returned query will always be a function score query whose `:qu... | null | https://raw.githubusercontent.com/nytimes/querqy-clj/8389820f2acf5c16b39c8b444f8f6679beac5f1b/src/com/nytimes/querqy/elasticsearch.clj | clojure | 0 clauses match nothing
build dis_max query
0 clauses matches nothing
build a bool query
normalize the term weights
Create a function_score wight query
down boost are converted to negative numbers here
----------------------------------------------------------------------
-------------------------------------... | (ns com.nytimes.querqy.elasticsearch
"Convert a `querqy.model.ExpandedQuery` into an Elasticsearch query.
You may control the query generation with the following keys in the opts map.
See the Elasticsearch documentation for their meaning.
The returned query will always be a function score query whose `:qu... |
209fef09b31b2e5c4aa99870f337eb1df5fe0e42b47f4cd7b88d1c23fd7b58e5 | ngorogiannis/cyclist | utilsigs.ml | (** Signatures for containers and essential types. *)
module type BasicType = sig
include Set.OrderedType
val equal : t -> t -> bool
(** Standard equality predicate. *)
val hash : t -> int
(** Standard hash function. *)
val to_string : t -> string
(** Convert to string. *)
val pp : Format.formatter... | null | https://raw.githubusercontent.com/ngorogiannis/cyclist/c93a168d586b308ab2a2c730cd1b2375ab263167/src/lib/utilsigs.ml | ocaml | * Signatures for containers and essential types.
* Standard equality predicate.
* Standard hash function.
* Convert to string.
* Pretty printer.
* Most types for use in containers, maps and other stuff must provide the
above essential methods.
* Convert to a list of unique, sorted elements.
* [map_to add emp... |
module type BasicType = sig
include Set.OrderedType
val equal : t -> t -> bool
val hash : t -> int
val to_string : t -> string
val pp : Format.formatter -> t -> unit
end
module type OrderedContainer = sig
include BasicType
include Set.S with type t := t
val to_list : t -> elt list
val map_to ... |
c236be4b89439517029148ef833d405e1cc1bfe8c171afbd13a411522070f5b6 | VisionsGlobalEmpowerment/webchange | crop_image.cljs | (ns webchange.utils.crop-image)
(defn- load-image
[image-blob callback]
(let [src (.createObjectURL js/URL image-blob)]
(doto (js/Image.)
(aset "src" src)
(.addEventListener "load" callback))))
(defn- create-canvas
[width height]
(let [canvas (doto (.createElement js/document "canvas")
... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/0df52dd08d54f14d4ec5d2717f48031849a7ee16/src/cljs/webchange/utils/crop_image.cljs | clojure | (ns webchange.utils.crop-image)
(defn- load-image
[image-blob callback]
(let [src (.createObjectURL js/URL image-blob)]
(doto (js/Image.)
(aset "src" src)
(.addEventListener "load" callback))))
(defn- create-canvas
[width height]
(let [canvas (doto (.createElement js/document "canvas")
... | |
c5a6d10cbd089638825c0ba5bc92980fcb63ae07d42c409ab262c0e720a3741e | maximedenes/native-coq | declarations.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/kernel/declarations.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This module defines the types of gl... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This file is a late renamin... |
67004789196100bd613fba13161f89be2b9008be0d2476c33c51d99495f1499b | vyorkin/tiger | temp.ml | open Core_kernel
module S = Symbol
We use the word " temporary " to mean a value that
is temporarily held in a register and the word
" label " to mean some machine - language location whose
exact address is yet to be determined , just like a
label in assembly language .
This module manages... | null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter6/lib/temp.ml | ocaml | open Core_kernel
module S = Symbol
We use the word " temporary " to mean a value that
is temporarily held in a register and the word
" label " to mean some machine - language location whose
exact address is yet to be determined , just like a
label in assembly language .
This module manages... | |
7d7753197f8e0e6aac72b2ba71e98a8edb07f689e376c17a1ae1dc2e0e3bdd4e | wireapp/wire-server | Migrations.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/services/brig/src/Brig/Index/Migrations.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Brig.Index.Migrations
(... |
f5461c3caeaf6d6646b4a2bd7c352b4db5090a32221cacf91a547a64fec053c0 | fyquah/hardcaml_zprize | test_mixed_add.ml | open Core
open Hardcaml
include struct
open Twisted_edwards_lib
module Mixed_add = Mixed_add
module Mixed_add_precompute = Mixed_add_precompute
module Config = Config
module Num_bits = Num_bits
module Xyt = Xyt
module Xyzt = Xyzt
end
module Model = Twisted_edwards_model_lib
module Utils = Field_ops_test... | null | https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/libs/twisted_edwards/test/test_mixed_add.ml | ocaml | convert back out of the internal fpga representation
convert p1 to internal fpga representation and p2 to host precompute representation | open Core
open Hardcaml
include struct
open Twisted_edwards_lib
module Mixed_add = Mixed_add
module Mixed_add_precompute = Mixed_add_precompute
module Config = Config
module Num_bits = Num_bits
module Xyt = Xyt
module Xyzt = Xyzt
end
module Model = Twisted_edwards_model_lib
module Utils = Field_ops_test... |
93888803d28fbdfcd7f190c66b8a34965182ef92b16a4d0d2aca15cc3c9de407 | theodormoroianu/SecondYearCourses | lab4_sol.hs | import Test.QuickCheck
import Numeric.Natural
import Data.List (genericIndex)
--7:41
produsRec :: [Integer] -> Integer
produsRec [] = 1
produsRec (x:xs) = x* produsRec xs
produsFold :: [Integer] -> Integer
produsFold = foldr (*) 1
prop_produs :: [Integer] -> Bool
prop_produs x = produsRec x == produsFold x
andR... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/lab4/lab4_sol.hs | haskell | 7:41 | import Test.QuickCheck
import Numeric.Natural
import Data.List (genericIndex)
produsRec :: [Integer] -> Integer
produsRec [] = 1
produsRec (x:xs) = x* produsRec xs
produsFold :: [Integer] -> Integer
produsFold = foldr (*) 1
prop_produs :: [Integer] -> Bool
prop_produs x = produsRec x == produsFold x
andRec :: [... |
7e8b53c1bfd67ae33257c98cd50ea0dc8c0346dc581622ac2de4f3f904ba1222 | RyanGlScott/text-show-instances | Win32.hs | # LANGUAGE CPP #
#if defined(mingw32_HOST_OS)
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
#endif
|
Module : TextShow . System . Win32
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer : ... | null | https://raw.githubusercontent.com/RyanGlScott/text-show-instances/b08f4b46466cdc3c3f3c979b7a0abf5590fa2916/src/TextShow/System/Win32.hs | haskell | # LANGUAGE OverloadedStrings #
| Only available with @Win32-2.5.0.0@ or later.
/Since: 3.6/
| Only available with @Win32-2.5.0.0@ or later.
/Since: 3.6/
| Only available with @Win32-2.5.0.0@ or later.
/Since: 3.6/
| Only available with @Win32-2.5.0.0@ or later.
/Since: 3.6/
| Only available with @Win32-2.5... | # LANGUAGE CPP #
#if defined(mingw32_HOST_OS)
# LANGUAGE TemplateHaskell #
# OPTIONS_GHC -Wno - orphans #
#endif
|
Module : TextShow . System . Win32
Copyright : ( C ) 2014 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Stability : Provisional
P... |
46de5a5dff6349c0be4ecff54c94197752e5528429eb70ef354d4e398c14fb57 | EveryTian/Haskell-Codewars | Anagram.hs | module Anagram (anagramsFor) where
import Data.List (sort)
import Data.Char (toLower)
anagramsFor :: String -> [String] -> [String]
anagramsFor xs xss = [i | i <- xss,
x <- pure $ map toLower i,
s <- pure $ map toLower xs,
sort s == sort x && s /= x]
| null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/exercism/anagram/src/Anagram.hs | haskell | module Anagram (anagramsFor) where
import Data.List (sort)
import Data.Char (toLower)
anagramsFor :: String -> [String] -> [String]
anagramsFor xs xss = [i | i <- xss,
x <- pure $ map toLower i,
s <- pure $ map toLower xs,
sort s == sort x && s /= x]
| |
ba857e6b7eb46c08195c0a006be48c40332b6e18bfb1c55641c9191a633beade | cstar/erldis | erldis_multiple.erl | -module(erldis_multiple).
-export([test/0, get_key/1, server/2]).
test() ->
{ok, Conn} = erldis:connect("localhost", 6379),
erldis:zadd(Conn, "erldis_fail", 4.0, "thing1"),
erldis:zadd(Conn, "erldis_fail", 4.0, "thing2"),
erldis:zadd(Conn, "erldis_fail", 3.5, "thing3"),
erldis:zadd(Conn, "erldis_fail", 2.0, ... | null | https://raw.githubusercontent.com/cstar/erldis/375260795e6a3de2600e297658f364deedbe6f1b/test/erldis_multiple.erl | erlang | done; | -module(erldis_multiple).
-export([test/0, get_key/1, server/2]).
test() ->
{ok, Conn} = erldis:connect("localhost", 6379),
erldis:zadd(Conn, "erldis_fail", 4.0, "thing1"),
erldis:zadd(Conn, "erldis_fail", 4.0, "thing2"),
erldis:zadd(Conn, "erldis_fail", 3.5, "thing3"),
erldis:zadd(Conn, "erldis_fail", 2.0, ... |
8d494ec801e475c053cbd05f35e7b572f49f6d648604c51bffcd1e244d408282 | AshleyYakeley/Truth | MIME.hs | {-# OPTIONS -fno-warn-orphans #-}
module Pinafore.Language.Library.MIME
( mimeLibSection
) where
import Pinafore.Base
import Pinafore.Language.Convert.HasType
import Pinafore.Language.Library.Convert ()
import Pinafore.Language.Library.Defs
import Pinafore.Language.Library.Optics ()
import Pinafore.Language.T... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/58f4393f3bf5307afa1bd5ddcbd12d3480a2447b/Pinafore/pinafore-language/lib/Pinafore/Language/Library/MIME.hs | haskell | # OPTIONS -fno-warn-orphans #
MIME |
module Pinafore.Language.Library.MIME
( mimeLibSection
) where
import Pinafore.Base
import Pinafore.Language.Convert.HasType
import Pinafore.Language.Library.Convert ()
import Pinafore.Language.Library.Defs
import Pinafore.Language.Library.Optics ()
import Pinafore.Language.Type
import Pinafore.Language.Value... |
865449f35d191ff711610964a93cccd224c62d66a05222a34ec8559e61743c9b | srdqty/talc-3.0 | talverify.mli | (**********************************************************************)
( c ) , , ,
June 1998 , all rights reserved .
(**********************************************************************)
(* talverify.mli
* TAL Verifier
*
* Checks operands, in... | null | https://raw.githubusercontent.com/srdqty/talc-3.0/df83dd5ff0e2b189b13280ddae233d8277199350/talx86/talverify.mli | ocaml | ********************************************************************
********************************************************************
talverify.mli
* TAL Verifier
*
* Checks operands, instructions, interfaces, and implementations for well
* formedness.
Instructions & Code Blocks
Cyclone
End Cyclone
Cy... | ( c ) , , ,
June 1998 , all rights reserved .
open Utilities;;
open Identifier;;
open Tal;;
open Talctxt;;
Coercions
val coercion_con : ctxt -> coercion -> con -> (con -> con) -> con
val coerce_con : (ctxt -> 'a -> con) -> ctxt -> 'a * coercion l... |
385c8f5492e8b833122c8ebb3a16ee8eefce444ea0ea8c4b239152388a4f152a | sunshineclt/Racket-Helper | homework9-1-r5rs版本.rkt | #lang racket
(require (except-in r5rs eval))
;eval
(define (eval exp env)
(cond ((self-evaluating? exp) exp);自求值表达式
((variable? exp) (lookup-variable-value exp env))
((definition? exp) (eval-definition exp env));特殊形式define
((if? exp) (eval-if exp env))
((lambda? exp)
(make... | null | https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%99%88%E4%B9%90%E5%A4%A9/Week9/homework9-1-r5rs%E7%89%88%E6%9C%AC.rkt | racket | eval
自求值表达式
特殊形式define
生成过程对象
simple
number?是scheme基本过程
string?是scheme基本过程
symbol?是scheme基本过程
set
define
exp形如(define ....)
针对第一种形式
针对第一种形式
formal parameters
body
lambda
构造一个lambda表达式
if
begin
把表达式列表变成一个表达式
cond
, 如 ( ( > x 3 ) ( + x 3 ) ( * x 3 ) )
no else clause
application
eval-many
procedure
frame
environment
... | #lang racket
(require (except-in r5rs eval))
(define (eval exp env)
((variable? exp) (lookup-variable-value exp env))
((if? exp) (eval-if exp env))
((lambda? exp)
(make-procedure (lambda-parameters exp)
((begin? exp)
(eval-sequence (begin-actions exp) env))
cond转换为i... |
9157131e6cd94bef2328855e591b5817f097126d42e60dbcfe32cfbeab4f10b8 | LighghtEeloo/magic-in-ten-mins-ml | Utils.ml | let width = 50
let start = 20
let test_begin name =
let sep = '>' in
Printf.printf "%s [%s] %s\n"
(String.make start sep)
(name)
(String.make (width - start - 4 - (String.length name)) sep)
let test_end () =
Printf.printf "%s\n" (String.make width '<')
module type Test_S = sig
val name : string
val a... | null | https://raw.githubusercontent.com/LighghtEeloo/magic-in-ten-mins-ml/32b54563dde4268073c4b23517a18589281b40bc/Utils/Utils.ml | ocaml | let width = 50
let start = 20
let test_begin name =
let sep = '>' in
Printf.printf "%s [%s] %s\n"
(String.make start sep)
(name)
(String.make (width - start - 4 - (String.length name)) sep)
let test_end () =
Printf.printf "%s\n" (String.make width '<')
module type Test_S = sig
val name : string
val a... | |
83d0c452afd18b0ce203fe9a71be808bbdd988353545842a41b572c2190322c7 | NorfairKing/smos | OptParse.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Smos.Web.Server.OptParse
( module Smos.Web.Server.OptParse,
module Smos.Web.Server.OptParse.Types,
)
where
import Autodocodec.Yaml
import Control.Arrow (left)
import Control.Monad.Logger
import Data.Maybe
import qualified Data.Text as T
im... | null | https://raw.githubusercontent.com/NorfairKing/smos/82707699b446bc431f5233e5dc18c7ec3dd679fd/smos-web-server/src/Smos/Web/Server/OptParse.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module Smos.Web.Server.OptParse
( module Smos.Web.Server.OptParse,
module Smos.Web.Server.OptParse.Types,
)
where
import Autodocodec.Yaml
import Control.Arrow (left)
import Control.Monad.Logger
import Data.Maybe
import qualified Data.Text as T
import Data.Version
import qualified ... |
f778156961ee9e8d74f82f04d7d7a61baa1e94a54f7e823722ad80e3ed5188b8 | alexandergunnarson/quantum | convert.cljc | (ns quantum.test.measure.convert
(:require [quantum.measure.convert :as ns]))
#?(:clj
(defmacro test:convert [n from to])) | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/measure/convert.cljc | clojure | (ns quantum.test.measure.convert
(:require [quantum.measure.convert :as ns]))
#?(:clj
(defmacro test:convert [n from to])) | |
3f4aa9306fae147039ee2b0dda1f7c5f5edd7cc3dadfa3c108016cb66898face | Plutonomicon/plutarch-plutus | Interval.hs | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Plutarch.Api.V1.Interval (
PInterval (PInterval),
PLowerBound (PLowerBound),
PUpperBound (PUpperBound),
PExtended (PFinite, PPosInf, PNegInf),
type PClosure,
) where
import Plutarch.DataRepr (
DerivePConstantViaData (DerivePConstantVi... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/9b83892057f2aaaed76e3af6193ad1ae242244cc/Plutarch/Api/V1/Interval.hs | haskell | # LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Plutarch.Api.V1.Interval (
PInterval (PInterval),
PLowerBound (PLowerBound),
PUpperBound (PUpperBound),
PExtended (PFinite, PPosInf, PNegInf),
type PClosure,
) where
import Plutarch.DataRepr (
DerivePConstantViaData (DerivePConstantVi... | |
0312445ca4708009ff5bd3a0c8615523053629534a722727d756767aa0767f26 | froggey/Mezzano | popup-io-stream.lisp | ;;;; A console stream for GUI applications
(defpackage :mezzano.gui.popup-io-stream
(:use :cl :mezzano.gui.font)
(:local-nicknames (:sys.int :mezzano.internals))
(:export #:popup-io-stream
#:lazy-popup-io-stream))
(in-package :mezzano.gui.popup-io-stream)
(defclass popup-io-stream (mezzano.line-edit... | null | https://raw.githubusercontent.com/froggey/Mezzano/e9c4e426ae9732daa45cd7fd0f812a627b79dea6/gui/popup-io-stream.lisp | lisp | A console stream for GUI applications
Transient window stuff.
The read-char typeahead buffer.
Frame and display.
Protecting stuff.
Do this early so the initial text-widget damage even won't open the window.
Use a supervisor FIFO for this because I'm too lazy to implement a normal FIFO.
should filter out strange... |
(defpackage :mezzano.gui.popup-io-stream
(:use :cl :mezzano.gui.font)
(:local-nicknames (:sys.int :mezzano.internals))
(:export #:popup-io-stream
#:lazy-popup-io-stream))
(in-package :mezzano.gui.popup-io-stream)
(defclass popup-io-stream (mezzano.line-editor:line-edit-mixin
... |
e29da612a5f91ed0630604a6964b45a1f92e8d0d170268e1ae36e1d3e9665fb4 | exercism/racket | all-your-base-test.rkt | #lang racket
(require "all-your-base.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define suite
(test-suite
"all-your-base tests"
(test-equal? "single-bit-one-to-decimal"
'( 1 )
(rebase '( 1 ) 2 10))
(test-equal? "binary-to-single-decimal"
... | null | https://raw.githubusercontent.com/exercism/racket/4110268ed331b1b4dac8888550f05d0dacb1865b/exercises/practice/all-your-base/all-your-base-test.rkt | racket | #lang racket
(require "all-your-base.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define suite
(test-suite
"all-your-base tests"
(test-equal? "single-bit-one-to-decimal"
'( 1 )
(rebase '( 1 ) 2 10))
(test-equal? "binary-to-single-decimal"
... | |
1893735435409f4b9e9cdb3747c6299cdd8a2593e15bda8605ba79895633fa00 | qfpl/reflex-workshop | WidgetHold.hs | |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... | null | https://raw.githubusercontent.com/qfpl/reflex-workshop/244ef13fb4b2e884f455eccc50072e98d1668c9e/src/Solutions/DOM/Switching/WidgetHold.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE GADTs #
dweMode <- holdDyn wReset ewMode
eeScore <- dyn dweMode
eScore <- switchHold never eeScore
| |
Copyright : ( c ) 2018 , Commonwealth Scientific and Industrial Research Organisation
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) 2018, Commonwealth Scientific and Industrial Research Organisation
License : BSD3
Maintainer :
Stability : experi... |
82d13d179a48cd33622fc987b545cff9c2caf25236f830c848387fb9a4d8eecc | SquircleSpace/shcl | lisp-interpolation.lisp | Copyright 2018
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
distributed under the Li... | null | https://raw.githubusercontent.com/SquircleSpace/shcl/cc8d3c841b8b64b6715bf8f238fb19cd6093a793/test/lisp-interpolation.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2018
distributed under the License is distributed on an " AS IS " BASIS ,
(defpackage :shcl/test/lisp-interpolation
(:use :common-lisp :prove :shcl/core/utility :shcl/core/lisp-interpolation
:shcl/core/exit-info :shcl/core/command :shcl/test/foundation)
(:import-from :shcl/core/shell-enviro... |
7c7115b05a142418ff6e83a765089b2c9fba6996a57bbbdc714a376ebb0168e5 | mbj/stratosphere | S3ConfigurationProperty.hs | module Stratosphere.Timestream.ScheduledQuery.S3ConfigurationProperty (
S3ConfigurationProperty(..), mkS3ConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/timestream/gen/Stratosphere/Timestream/ScheduledQuery/S3ConfigurationProperty.hs | haskell | module Stratosphere.Timestream.ScheduledQuery.S3ConfigurationProperty (
S3ConfigurationProperty(..), mkS3ConfigurationProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere.... | |
687e8db3a597bce436484c3796700c8ae1ca7a8e8d1e50bb305b9fd658529608 | ublubu/shapes | Grid.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE MagicHash #-}
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
{-# LANGUA... | null | https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes/src/Physics/Broadphase/Grid.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE MagicHash #
# LANGUAGE RankNTypes #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
| Flatten a pair of axial indices to a single grid index.
| Flatte... | # LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
module Physics.Broadphase.Grid where
import GHC.Generics (Generic)
import GHC.Types (Double (D#))
import Control.Mo... |
f0cb685dbeae87f11816f4fb4b94924c9d6012f26e270b54ae3298cb9653bec2 | OCamlPro/liquidity | liquidClean.ml | (****************************************************************************)
(* Liquidity *)
(* *)
Copyright ( C ) 2017 - 2020 OCamlPro SAS
(* ... | null | https://raw.githubusercontent.com/OCamlPro/liquidity/3578de34cf751f54b9e4c001a95625d2041b2962/tools/liquidity/liquidClean.ml | ocaml | **************************************************************************
Liquidity
... | Copyright ( C ) 2017 - 2020 OCamlPro SAS
it under the terms of the GNU General Public License as published by
... |
869c3c0dc0b6787545235ef595326781da416270d2d4bd5dd4e5c9cc1feffbc1 | input-output-hk/project-icarus-importer | Leaders.hs | | Leaders part of LRC DB .
module Pos.Lrc.DB.Leaders
(
-- * Getters
getLeadersForEpoch
, getLeader
-- * Operations
, putLeadersForEpoch
-- * Initialization
, prepareLrcLeaders
-- * Helpers
, hasLeaders
) where
import Unive... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/block/src/Pos/Lrc/DB/Leaders.hs | haskell | * Getters
* Operations
* Initialization
* Helpers
--------------------------------------------------------------------------
Getters
--------------------------------------------------------------------------
--------------------------------------------------------------------------
--------------------------------... | | Leaders part of LRC DB .
module Pos.Lrc.DB.Leaders
(
getLeadersForEpoch
, getLeader
, putLeadersForEpoch
, prepareLrcLeaders
, hasLeaders
) where
import Universum
import Pos.Binary.Class (serialize')
import Pos.Binary.Core ()
imp... |
df1681077e85d2e1936c870ae1804a11d0fe19ea2b6b1a64f2c48b5b440d0bde | cfelde/ebbs-social-frontend | event_handlers.cljs | (ns ebbs-social-frontend.admin.event-handlers
(:require [day8.re-frame.http-fx]
[ajax.core :as ajax]
[re-frame.core :as rf]
[promesa.core :as p :include-macros true]
[ebbs-social-frontend.misc.utils :as u]
[clojure.string :as str]))
-- Domino 2 - Event Ha... | null | https://raw.githubusercontent.com/cfelde/ebbs-social-frontend/ad47de958f3e60bbafe0867f3e192981d3acf3d6/src/ebbs_social_frontend/admin/event_handlers.cljs | clojure | (ns ebbs-social-frontend.admin.event-handlers
(:require [day8.re-frame.http-fx]
[ajax.core :as ajax]
[re-frame.core :as rf]
[promesa.core :as p :include-macros true]
[ebbs-social-frontend.misc.utils :as u]
[clojure.string :as str]))
-- Domino 2 - Event Ha... | |
96cf39a2dd89db0d4e7b1b042b2b66f727481519d6ee15ef696e975bdeaea7f7 | dcos/dcos-net | dcos_dns_config_loader_server.erl | %%%-------------------------------------------------------------------
@author sdhillon
( C ) 2016 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 15 . Mar 2016 1:37 PM
%%%-------------------------------------------------------------------
-module(dcos_dns_config_loader_server).
-author("sdhillon").
-behaviour(ge... | null | https://raw.githubusercontent.com/dcos/dcos-net/7bd01ac237ff4b9a12a020ed443e71c45f7063f4/apps/dcos_dns/src/dcos_dns_config_loader_server.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
gen_server callbacks
API
===================================================================
API
===================================================================
@d... | @author sdhillon
( C ) 2016 , < COMPANY >
Created : 15 . Mar 2016 1:37 PM
-module(dcos_dns_config_loader_server).
-author("sdhillon").
-behaviour(gen_server).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-export([start_link/0, start_link/1]).
... |
84aefe4a755976d22759fce8007dbaad22ae0a89daafdf0324324a4f568c8421 | pfdietz/ansi-test | subtypep-member.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Feb 15 11:58:06 2003
;;;; Contains: Tests for subtype relationships on member types
(in-package :cl-test)
SUBTYPEP on MEMBER types
(deftest subtypep.member.1
(check-all-subtypep '(member a b c) '(member a b c d))
nil)
(deftest subtypep.member.2
(ch... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/types-and-classes/subtypep-member.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests for subtype relationships on member types | Author :
Created : Sat Feb 15 11:58:06 2003
(in-package :cl-test)
SUBTYPEP on MEMBER types
(deftest subtypep.member.1
(check-all-subtypep '(member a b c) '(member a b c d))
nil)
(deftest subtypep.member.2
(check-all-not-subtypep '(member a b c) '(member a b))
nil)
(deftest subtypep.member.3
... |
8a355b2eb154df4ecc2bf33076034079060536db1a23e29ffef38e213f36c19d | mixphix/toolbox | Toolbox.hs | -- |
Module : Data . List . NonEmpty . Toolbox
Copyright : ( c ) 2021
-- License : BSD3 (see the file LICENSE)
-- Maintainer :
--
Utility functions on top of ' Data . List . NonEmpty ' .
--
This module re - exports the above module , so modules need only import ' Data . List . NonEmpty . To... | null | https://raw.githubusercontent.com/mixphix/toolbox/38d66b1135e34dd19708f51a6192d880086a004b/src/Data/List/NonEmpty/Toolbox.hs | haskell | |
License : BSD3 (see the file LICENSE)
Maintainer :
* Quasi-constructors
* Using regular lists
* 'Foldable' specializations
* List functions
* Re-exports
| Append an element to a list.
> withNonEmpty [] maximum1 == Nothing
| Module : Data . List . NonEmpty . Toolbox
Copyright : ( c ) 2021
Utility functions on top of ' Data . List . NonEmpty ' .
This module re - exports the above module , so modules need only import ' Data . List . NonEmpty . Toolbox ' .
module Data.List.NonEmpty.Toolbox
(|:),
(|>),
(<||),
... |
5030182e25503df0d7910cbdf4d6d403fb274beb4cb20d3b3861d74c751a247b | zkat/sheeple | builtins.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
;;;; This file is part of Sheeple
;;;; builtins.lisp
;;;;
;;;; Boxing of built-in lisp types
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :sheeple)
(defin... | null | https://raw.githubusercontent.com/zkat/sheeple/5393c74737ccf22c3fd5f390076b75c38453cb04/src/builtins.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
This file is part of Sheeple
builtins.lisp
Boxing of built-in lisp types
This thing is a bit problematic. We don't necessarily want to keep references around to
objects that have been autoboxed, right? I'm tempted to say that the ideal h... |
(in-package :sheeple)
(define-unbound-variables
=boxed-object= =symbol= =sequence= =array= =number= =character= =function=
=hash-table= =package= =pathname= =readtable= =stream= =list= =null= =cons=
=vector= =bit-vector= =string= =complex= =integer= =float= =boolean=)
(defun box-type-of (x)
"Maps the ... |
7552b871ecbc22e87c4f843bc7718b895a57a8a0694ea2c8ecead42cc7f992a1 | privet-kitty/cl-competitive | hld.lisp | (defpackage :cp/hld
(:use :cl)
(:export #:hld #:make-hld #:hld-p
#:two-vertices-disconnected-error
#:%hld-preords #:%hld-parents #:%hld-heads #:%hld-graph #:%hld-sizes
#:hld-map-path #:hld-map-path-edge #:hld-get-lca)
(:documentation "Provides heavy-light decomposition."))
(in-pac... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/593c1927a2491e2de5942fbffdb4bab0f3fef2f6/module/hld.lisp | lisp | numbering of vertices in pre-order
heads of heavy paths
move the largest subtrees to the heads of adjacency lists
numbers all vertices in pre-order | (defpackage :cp/hld
(:use :cl)
(:export #:hld #:make-hld #:hld-p
#:two-vertices-disconnected-error
#:%hld-preords #:%hld-parents #:%hld-heads #:%hld-graph #:%hld-sizes
#:hld-map-path #:hld-map-path-edge #:hld-get-lca)
(:documentation "Provides heavy-light decomposition."))
(in-pac... |
d74912ed942bceb260e7920ca290502cc7a3084a4f4ba314966f3532aa866f55 | esmolanka/sexp-grammar | Encode.hs | {-# LANGUAGE CPP #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
module Language.Sexp.Encode (encode) where
import Data.Functor.Foldable (cata)
import Data.List ... | null | https://raw.githubusercontent.com/esmolanka/sexp-grammar/284ba2a41b752d2f7803067d302b8c28cfbd200f/sexp-grammar/src/Language/Sexp/Encode.hs | haskell | # LANGUAGE CPP #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeSynonymInstances # | # LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
module Language.Sexp.Encode (encode) where
import Data.Functor.Foldable (cata)
import Data.List (intersperse)
import Data.Scientific
import qualified Data.Text.Encoding as T (encodeUtf8)
import qualified Data.Text.Lazy as TL
import qualified Data.T... |
6ac8d3ce914b5ea46ab6e9120e00423673643e9831678eae65debc8c7ba80549 | jbrot/jstris-ai | Online.hs | {-# LANGUAGE OverloadedStrings #-}
module Online where
import Control.Monad.IO.Class
import Control.Monad.Trans.Random.Strict
import Control.Monad.Trans
import Control.Monad.Trans.State.Strict
import Data.Text (Text)
import qualified Data.Vector as V
import qualified Data.Vector.Sized as VS
import Data.Map.Strict (Ma... | null | https://raw.githubusercontent.com/jbrot/jstris-ai/38e8120ed7b5d371ec381d6571df12976eb79bc1/app/Online.hs | haskell | # LANGUAGE OverloadedStrings #
Given a frame index, waits for a higher frame index and then retrieves the associated frame.
This function injects some code into the render loop which lets us keep track
of frames. It also puts the Game instance in a global variable so we can directly
read the state. |
module Online where
import Control.Monad.IO.Class
import Control.Monad.Trans.Random.Strict
import Control.Monad.Trans
import Control.Monad.Trans.State.Strict
import Data.Text (Text)
import qualified Data.Vector as V
import qualified Data.Vector.Sized as VS
import Data.Map.Strict (Map)
import qualified Data.Map.Strict... |
6721bbd6c22141b54ff54d8d65ab2788771feb9fb9ed8c6080d89573a78bb053 | adinapoli/clj3D | viewer.clj | (ns clj3D.viewer
(:refer-clojure :rename {+ core-+})
(:use
[clj3D.math :only [pull]])
(:require
[incanter.core :as ictr-core])
(:import
[clj3D ObjectViewer]
[java.awt Dimension Toolkit]
[com.jme3.system AppSettings]
[com.jme3.scene Node Spatial Geometry]))
Copyright ( c ) 2011 ,
... | null | https://raw.githubusercontent.com/adinapoli/clj3D/1175bcaddc1d59fe37c6876dc8cc178417211e38/src/clj3D/viewer.clj | clojure | 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 IMPLIED, INC... | (ns clj3D.viewer
(:refer-clojure :rename {+ core-+})
(:use
[clj3D.math :only [pull]])
(:require
[incanter.core :as ictr-core])
(:import
[clj3D ObjectViewer]
[java.awt Dimension Toolkit]
[com.jme3.system AppSettings]
[com.jme3.scene Node Spatial Geometry]))
Copyright ( c ) 2011 ,
... |
9d3ef760049a82ac496415a917e963197b792e646936966b5af5ba92dd50b3f0 | Opetushallitus/ataru | info_element_schema.cljc | (ns ataru.schema.info-element-schema
(:require [ataru.schema.element-metadata-schema :as element-metadata-schema]
[ataru.schema.localized-schema :as localized-schema]
[ataru.schema.params-schema :as params-schema]
[schema.core :as s]))
(s/defschema InfoElement {:fieldClass ... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljc/ataru/schema/info_element_schema.cljc | clojure | (ns ataru.schema.info-element-schema
(:require [ataru.schema.element-metadata-schema :as element-metadata-schema]
[ataru.schema.localized-schema :as localized-schema]
[ataru.schema.params-schema :as params-schema]
[schema.core :as s]))
(s/defschema InfoElement {:fieldClass ... | |
3ec0dd22fc19b95bc23d0bcd02d47a07d2af7a4e304f7855130c16d9ea2a8b5a | NoahTheDuke/netrunner-data | core.clj | (ns nr-data.core
(:require
[nr-data.combine :refer [combine-for-jnet]]
[nr-data.json :refer [convert-to-json]]))
(defn run-everything []
(combine-for-jnet)
(convert-to-json))
(comment
(run-everything)
)
| null | https://raw.githubusercontent.com/NoahTheDuke/netrunner-data/2cd47fc5380f37f05b09795f16b36d4a9a6b85eb/src/nr_data/core.clj | clojure | (ns nr-data.core
(:require
[nr-data.combine :refer [combine-for-jnet]]
[nr-data.json :refer [convert-to-json]]))
(defn run-everything []
(combine-for-jnet)
(convert-to-json))
(comment
(run-everything)
)
| |
764aba3c300e33488b86d8933dc7c98e6297122678cb2457143ebe53d140a6c0 | wireless-net/erlang-nommu | wxDirDialog.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/wx/src/gen/wxDirDialog.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 2008 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(wxDirDialog).
-include("wxe.hrl")... |
c46f3162cc5e80fb21702c870a687e62481abb9282d7421fb90c04ff464115c1 | LesBoloss-es/xoshiro | init64.ml | * { 1 Init64 }
This module contains one unique functor which , provided a type [ state ] and a
few functions to initialise and manipulate it , returns a module similar to
that of { ! . Random . State } , containing all the functions that initialise
and manipulate the state .
In particular , ... | null | https://raw.githubusercontent.com/LesBoloss-es/xoshiro/a56bf03a84610aff2da3aebd5f028930b4249f38/make-random/src/init64.ml | ocaml | * { 1 Init64 }
This module contains one unique functor which , provided a type [ state ] and a
few functions to initialise and manipulate it , returns a module similar to
that of { ! . Random . State } , containing all the functions that initialise
and manipulate the state .
In particular , ... | |
f3aa6fa269619cd29b56106ef7a1f2e80652f67328aa895ebf9a174f26994bb9 | Aiden01/opal | Parser.hs | module Opal.Parsing.Parser
( program
)
where
import Opal.Parsing.AST
import Opal.Parsing.Lexer
import Opal.Parsing.Types
import Control.Applicative ( (<|>) )
import Text.Megaparsec ( parse
, ... | null | https://raw.githubusercontent.com/Aiden01/opal/5c0e2aa4853923accc701ce15f474f01518565ff/src/Opal/Parsing/Parser.hs | haskell | operators
unary operators
statements | module Opal.Parsing.Parser
( program
)
where
import Opal.Parsing.AST
import Opal.Parsing.Lexer
import Opal.Parsing.Types
import Control.Applicative ( (<|>) )
import Text.Megaparsec ( parse
, ... |
8417b7dd87fb5f7d228835e2e336a40d1d55e2052de55666f3faabd149531f95 | quil-lang/qvm | distributed-qvm-tests.lisp | ;;;; tests/distributed-qvm-tests.lisp
;;;;
Author :
(in-package #:dqvm2-tests)
(deftest test-distributed-qvm-addresses ()
(let* ((num-qubits 8)
(number-of-processes 4)
(rank 1)
(qvm (make-distributed-qvm :rank rank
:number-of-processes number-of-... | null | https://raw.githubusercontent.com/quil-lang/qvm/de95ead6e7df70a1f8e0212455a802bd0cef201c/dqvm/tests/distributed-qvm-tests.lisp | lisp | tests/distributed-qvm-tests.lisp
Make sure the outcome from the previous step is the same as applying the permutations. | Author :
(in-package #:dqvm2-tests)
(deftest test-distributed-qvm-addresses ()
(let* ((num-qubits 8)
(number-of-processes 4)
(rank 1)
(qvm (make-distributed-qvm :rank rank
:number-of-processes number-of-processes
... |
d83a74b0b653dc9b59914b9244be52278538a4cd88716c77064d72466a5f5fbe | mkoppmann/eselsohr | Config.hs | module Config
( Config (..)
, loadConfig
) where
import Colog (Severity (Error))
import Configuration.Dotenv
( configPath
, defaultConfig
, loadFile
, onMissingFile
)
import Control.Monad.Catch (MonadCatch)
import Data.Text (toTitle)
import Network.Wai.Handler.Warp (Port)
import System.... | null | https://raw.githubusercontent.com/mkoppmann/eselsohr/082da85348d30e092d001e76ffe045468bdddb9f/src/Config.hs | haskell | ^ File path to the data folder, where all collection are getting stored.
Defaults to: 'XdgData'
^ Severity level for the logger component.
Defaults to: 'Error'
^ Port number on which the web server will listen.
Defaults to: @6979@
^ Base URL to generate HTML links.
Defaults to @@
^ Address where the web server... | module Config
( Config (..)
, loadConfig
) where
import Colog (Severity (Error))
import Configuration.Dotenv
( configPath
, defaultConfig
, loadFile
, onMissingFile
)
import Control.Monad.Catch (MonadCatch)
import Data.Text (toTitle)
import Network.Wai.Handler.Warp (Port)
import System.... |
8b64a5bd8a62ad24ab42fb43c7602a7bbe3909411a8e1d2fbc72465cee813242 | kupl/FixML | sub52.ml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (aexp, var) ->
match aexp with
|Const cst1 -> Const 0
|Var var1 -> if var1 = var then Const 1 else Const 0
|Power(str,... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub52.ml | ocaml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (aexp, var) ->
match aexp with
|Const cst1 -> Const 0
|Var var1 -> if var1 = var then Const 1 else Const 0
|Power(str,... | |
f110e2c938539785b15b4757fbeb3fea23a27b04a50b119c79e9661b72d8c7d0 | migamake/homplexity | Utilities.hs | module Language.Haskell.Homplexity.Utilities(
sumOf
, maxOf
, declHeadName
) where
import Language.Haskell.Exts.Syntax (DeclHead(..), Name)
-- | Maximum of the results of mapping the function over the list.
maxOf :: (a -> Int) -> [a] -> Int
maxOf f = maximum . (0:). map f
-- | Sum the results of mapping th... | null | https://raw.githubusercontent.com/migamake/homplexity/ddc2af9f988f1dbcc266c2f804fe6c599180be09/lib/Language/Haskell/Homplexity/Utilities.hs | haskell | | Maximum of the results of mapping the function over the list.
| Sum the results of mapping the function over the list.
| Get the name of a declaration. | module Language.Haskell.Homplexity.Utilities(
sumOf
, maxOf
, declHeadName
) where
import Language.Haskell.Exts.Syntax (DeclHead(..), Name)
maxOf :: (a -> Int) -> [a] -> Int
maxOf f = maximum . (0:). map f
sumOf :: (a -> Int) -> [a] -> Int
sumOf f = sum . map f
declHeadName :: DeclHead l -> Name l
declHea... |
52bc651dc503882da16f85d8a17b4e58087fc4e19ebf4f54d93fdb1b5094c400 | namenu/advent-of-code | day07_test.clj | (ns aoc.year2018.day07-test
(:require [clojure.test :refer [deftest testing is]]
[aoc.year2018.day07 :refer [part1 part2]]
[aoc.year2018.day07-2 :refer [part1 part2] :rename {part1 part1-2 part2 part2-2}]
[aoc.util :refer [input-lines]]))
(deftest test-day7
(let [sample-input ["... | null | https://raw.githubusercontent.com/namenu/advent-of-code/83f8cf05931f814dab76696bf46fec1bb1276fac/2018/clojure/test/aoc/year2018/day07_test.clj | clojure | (ns aoc.year2018.day07-test
(:require [clojure.test :refer [deftest testing is]]
[aoc.year2018.day07 :refer [part1 part2]]
[aoc.year2018.day07-2 :refer [part1 part2] :rename {part1 part1-2 part2 part2-2}]
[aoc.util :refer [input-lines]]))
(deftest test-day7
(let [sample-input ["... | |
8c425cedf3468d4790f256954bf3a4b78952602fd0015fc2b7a5bc0237321392 | Functional-AutoDiff/STALINGRAD | probabilistic-prolog-F-mitscheme.scm | (define (make-constant symbol) (list 0 symbol))
(define (constant? thing) (d= (first thing) 0))
(define (make-variable symbol) (list 1 symbol))
(define (variable? thing) (d= (first thing) 1))
(define (variable-symbol thing) (second thing))
(define (make-compound-term functor terms) (list 2 functor terms))
(define... | null | https://raw.githubusercontent.com/Functional-AutoDiff/STALINGRAD/8a782171872d5caf414ef9f8b9b0efebaace3b51/examples/examples2009a/probabilistic-prolog-F-mitscheme.scm | scheme | (define (make-constant symbol) (list 0 symbol))
(define (constant? thing) (d= (first thing) 0))
(define (make-variable symbol) (list 1 symbol))
(define (variable? thing) (d= (first thing) 1))
(define (variable-symbol thing) (second thing))
(define (make-compound-term functor terms) (list 2 functor terms))
(define... | |
c15991a48910f2b72c0ec98b178cd5049835e28c53ba8684444270a33718a49f | err0r500/realworld-app-simple-haskell | Health.hs | module Http.Specs.Health where
import qualified Http.Lib as Lib
import RIO
import Test.Hspec
import Test.Hspec.Wai
spec :: Lib.StartRouter -> Spec
spec start =
describe "health check" $
with (start undefined) $
it "responds with 200 without body" $
get "/"
`shouldRespondWith` "" {matchSt... | null | https://raw.githubusercontent.com/err0r500/realworld-app-simple-haskell/20ec982256ec890f0c77b572eccef987cd3799bf/test/Http/Specs/Health.hs | haskell | module Http.Specs.Health where
import qualified Http.Lib as Lib
import RIO
import Test.Hspec
import Test.Hspec.Wai
spec :: Lib.StartRouter -> Spec
spec start =
describe "health check" $
with (start undefined) $
it "responds with 200 without body" $
get "/"
`shouldRespondWith` "" {matchSt... | |
598bee1664c4b1d2071536989615ae640cd2bb2fbce509cf026225e2374c1a86 | machine-intelligence/Botworld | Display.hs | module Botworld.Display where
import Botworld hiding (Cell)
import Botworld.TextBlock
import Control.Applicative
import Control.Monad (join)
import Data.List (sortBy)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Ord (comparing)
import qualified Data.Set as Set
import Text.Printf (printf)
colorCha... | null | https://raw.githubusercontent.com/machine-intelligence/Botworld/f789cba55c49092fd0d0d24f0faad52a029e6eed/Botworld/Display.hs | haskell | module Botworld.Display where
import Botworld hiding (Cell)
import Botworld.TextBlock
import Control.Applicative
import Control.Monad (join)
import Data.List (sortBy)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Ord (comparing)
import qualified Data.Set as Set
import Text.Printf (printf)
colorCha... | |
13eb23d4f5cd120803c2d628158e9c0999fb06abf2ebefa25d40896bc9682d0c | dongcarl/guix | kde-multimedia.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2017 , 2019 < >
Copyright © 2020
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
th... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/gnu/packages/kde-multimedia.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2017 , 2019 < >
Copyright © 2020
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages kde-multimedia)
#:use-modu... |
9926b5685e53588d23125258a3b9bb21528e2d1338fd310e91aec1ae2c3f3ce1 | facebook/pyre-check | lwtSubprocess.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/pyre-check/8e719a317120478e869becfc8064a4c7c9993244/source/lwtSubprocess.mli | ocaml | * Convenient wrappers around `Lwt_process`. |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
e5dbe0c71766df418f3c9372a98266c514230c2dc17f97dba8c1bdcccc8d9611 | michaelklishin/langohr | basic_test.clj | Copyright ( c ) 2011 - 2020 , , and the ClojureWerkz Team
;;
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing... | null | https://raw.githubusercontent.com/michaelklishin/langohr/0c63ac3c6bc97d73e290ed366e9e97e07d39dedb/test/langohr/test/basic_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.
b... | Copyright ( c ) 2011 - 2020 , , and the ClojureWerkz Team
Eclipse Public License 1.0 ( -1.0.php )
(ns langohr.test.basic-test
(:refer-clojure :exclude [get declare])
(:require [langohr.core :as lhc]
[langohr.consumers :as lhcons]
[langohr.queue :as lhq]
[langoh... |
e7826f4f626699f0b4f040e98902f1b7b8759288e6460e9fdff56dffab130a3c | awslabs/s2n-bignum | bignum_mul_p256k1.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_mul_p256k1.ml | ocaml | =========================================================================
Multiplication modulo p_256k1, the field characteristic for secp256k1.
=========================================================================
*** print_literal_from_elf "x86/secp256k1/bignum_mul_p256k1.o";;
***
PUSH (% rbx)
PUSH (... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
let bignum_mul_p256k1_mc = define_assert_from_elf "bignum_mul_p256... |
b01a1d4dc81af81bec0d9e4c94e3c10d83710d48991cb9fb37ba59f700295f4a | SanderSpies/ocaml-gist | stat_cache.ml | type file_id = Unix.stats option
* An instance of file_id represents the identity of a file contents .
Use this to quickly detect if a file has changed .
( Detection is done by checking some fields from stat syscall ,
it an be tricked but should behave well in regular cases .
FIXME : precision o... | null | https://raw.githubusercontent.com/SanderSpies/ocaml-gist/7dc229aebdf51310e8c7dae12df0cb55b5de5a32/ocaml_webworker/merlin_lite/src/utils/stat_cache.ml | ocaml | type file_id = Unix.stats option
* An instance of file_id represents the identity of a file contents .
Use this to quickly detect if a file has changed .
( Detection is done by checking some fields from stat syscall ,
it an be tricked but should behave well in regular cases .
FIXME : precision o... | |
47939fb3b50034a4309b2998dac7edae8e7fdbe69553102e5b5a42cefc3cab4f | kazu-yamamoto/witty | Prefork.hs | module Prefork where
import Control.Exception as E (SomeException, catch)
import Control.Monad (replicateM, void)
import Network (Socket)
import System.Exit (ExitCode(..))
import System.Posix.Process (forkProcess, exitImmediately)
import System.Posix.Signals (Signal, Handler(Catch,Ignore), sigTERM, sigINT, sigCHLD, in... | null | https://raw.githubusercontent.com/kazu-yamamoto/witty/7914449e3c7db8a999e26a3d2ae71eb6549ac382/src/Prefork.hs | haskell | module Prefork where
import Control.Exception as E (SomeException, catch)
import Control.Monad (replicateM, void)
import Network (Socket)
import System.Exit (ExitCode(..))
import System.Posix.Process (forkProcess, exitImmediately)
import System.Posix.Signals (Signal, Handler(Catch,Ignore), sigTERM, sigINT, sigCHLD, in... | |
9e18e6f91960dee3f67499c3b5d12a18d696fbdb70f7181dbfe2a23784e98e01 | edicl/flexi-streams | in-memory.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : FLEXI - STREAMS ; Base : 10 -*-
$ Header : /usr / local / cvsrep / flexi - streams / in - memory.lisp , v 1.31 2008/05/19 07:57:07 edi Exp $
Copyright ( c ) 2005 - 2008 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, w... | null | https://raw.githubusercontent.com/edicl/flexi-streams/911a3e253fee8daa65ce24081a10f0288f435ac0/in-memory.lisp | lisp | Syntax : COMMON - LISP ; Package : FLEXI - STREAMS ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions a... | $ Header : /usr / local / cvsrep / flexi - streams / in - memory.lisp , v 1.31 2008/05/19 07:57:07 edi Exp $
Copyright ( c ) 2005 - 2008 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
... |
a3ecc8077bb8f62fae7d977d8afd52205d0a533edcf4a3a35a209932ae70ed21 | qitab/cl-protobufs | deserialize-test.lisp | Copyright 2012 - 2020 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
(defpackage #:cl-protobufs.test.deserialize
(:use #:cl
#:clunit)
(:local-nicknames (#:pb #:cl-protobufs.alias-test)
(#:proto #:cl-... | null | https://raw.githubusercontent.com/qitab/cl-protobufs/bf5447065714a9f5b1b6ce6d0512fd99b4105e76/tests/deserialize-test.lisp | lisp |
license that can be found in the LICENSE file or at
.
make a new msg using msg's proto serialization bytes
modify msg-clone
re-serialize msg-clone; it should still remember the bytes we gave it
sanity check: the bytes should not be equal if we actually serialize a message with
different content | Copyright 2012 - 2020 Google LLC
Use of this source code is governed by an MIT - style
(defpackage #:cl-protobufs.test.deserialize
(:use #:cl
#:clunit)
(:local-nicknames (#:pb #:cl-protobufs.alias-test)
(#:proto #:cl-protobufs))
(:export :run))
(in-package #:cl-protobufs.test.des... |
d34ad7bd696eb87fca5c1dc7be2f4c92bf29f7684b7d713be071bce3d4d4bbd8 | billstclair/trubanc-lisp | encode.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : FLEXI - STREAMS ; Base : 10 -*-
$ Header : /usr / local / cvsrep / flexi - streams / encode.lisp , v 1.26 2008/05/26 10:55:08 edi Exp $
Copyright ( c ) 2005 - 2008 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with o... | null | https://raw.githubusercontent.com/billstclair/trubanc-lisp/5436d2eca5b1ed10bc47eec7080f6cb90f98ca65/systems/flexi-streams-1.0.7/encode.lisp | lisp | Syntax : COMMON - LISP ; Package : FLEXI - STREAMS ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions a... | $ Header : /usr / local / cvsrep / flexi - streams / encode.lisp , v 1.26 2008/05/26 10:55:08 edi Exp $
Copyright ( c ) 2005 - 2008 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-p... |
729630b343169ba226b338aa66c282d719cfb9232b304b1e4a95e934548d27c8 | manuel-serrano/bigloo | shape.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / comptime / Tools / shape.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/comptime/Tools/shape.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* In order to print human readable messages, we designed this */
* tool. ... | * serrano / prgm / project / bigloo / comptime / Tools / shape.scm * /
* Author : * /
* Creation : Tue Dec 27 17:02:04 1994 * /
* Last change : Thu Jun 1 19:01:11 2017 ( serrano ) * /
* Cop... |
ddc3341b4a2cc1171bd9b4a476675cfc6c604a9704bce76f81116185e0207beb | reborg/clojure-essential-reference | 4.clj | < 1 >
[ 0 19 ] | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/OperationsonNumbers/maxandmin/4.clj | clojure | < 1 >
[ 0 19 ] | |
06e489731944d6eb4b6db15347646134f3b4d23c25ff2b32d872317709b6f227 | draperlaboratory/cbat_tools | bildb_help.ml | (** Implements {!Help}. *)
open Core
open Bap_primus.Std
module Ui = Bildb_ui
module Make (Machine : Primus.Machine.S) = struct
module Event = Ui.Event (Machine)
type event = Event.t
(** Generates a screen that displays the help menu. *)
let menu ?prompt:(prompt=None) ?handler:(handler=None) () : event Mac... | null | https://raw.githubusercontent.com/draperlaboratory/cbat_tools/78c665c96b343991cb44bebb8658df6750fb59bd/bildb/lib/screens/bildb_help.ml | ocaml | * Implements {!Help}.
* Generates a screen that displays the help menu. |
open Core
open Bap_primus.Std
module Ui = Bildb_ui
module Make (Machine : Primus.Machine.S) = struct
module Event = Ui.Event (Machine)
type event = Event.t
let menu ?prompt:(prompt=None) ?handler:(handler=None) () : event Machine.t =
let data = [
"At the prompt, type any of the following commands."... |
2487364a12539d63ee7b5543337733e2f44aa578b88945112a4c41eacef21b80 | sealchain-project/sealchain | Read.hs | -- | Functions on checkpoints
module Cardano.Wallet.Kernel.DB.Spec.Read (
-- * Pure functions on checkpoints
cpAvailableUtxo
, cpAvailableBalance
, cpCheckAvailable
, cpChange
, cpTotalBalance
, cpTxSlotId
, cpTxIsPending
) where
import Universum
import qualified Data.Map.Strict as Map... | null | https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/wallet/src/Cardano/Wallet/Kernel/DB/Spec/Read.hs | haskell | | Functions on checkpoints
* Pure functions on checkpoints
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------}
The available UtxO is t... | module Cardano.Wallet.Kernel.DB.Spec.Read (
cpAvailableUtxo
, cpAvailableBalance
, cpCheckAvailable
, cpChange
, cpTotalBalance
, cpTxSlotId
, cpTxIsPending
) where
import Universum
import qualified Data.Map.Strict as Map
import qualified Data.Set as Set
import qualified Pos.Chain.Txp as ... |
5152f9d5426eeb60da2aef821f7681d58fb19b2b213188d39197fa95e2304dc6 | sebsheep/elm2node | JavaScript.hs | {-# LANGUAGE OverloadedStrings #-}
module Generate.JavaScript
( generate
, generateForRepl
, generateForReplEndpoint
, generateForNodeJs
, ExportedValues
)
where
import Prelude hiding (cycle, print)
import qualified Data.ByteString.Builder as B
import Data.Monoid ((<>))
import qualified Data.List as Lis... | null | https://raw.githubusercontent.com/sebsheep/elm2node/602a64f48e39edcdfa6d99793cc2827b677d650d/compiler/src/Generate/JavaScript.hs | haskell | # LANGUAGE OverloadedStrings #
GENERATE
GENERATE FOR REPL
GENERATE FOR REPL ENDPOINT
ADD DEPENDENCIES
GENERATE CYCLES
GENERATE KERNEL
GENERATE ENUM
GENERATE BOX
GENERATE PORTS
GENERATE MANAGER
MAIN EXPORTS
BUILD TRIES | module Generate.JavaScript
( generate
, generateForRepl
, generateForReplEndpoint
, generateForNodeJs
, ExportedValues
)
where
import Prelude hiding (cycle, print)
import qualified Data.ByteString.Builder as B
import Data.Monoid ((<>))
import qualified Data.List as List
import Data.Map ((!))
import qual... |
af16fe57ad789691c1ac36b128e3b824fc39bf999b5db23488c1f8c58489a9c4 | antono/guix-debian | demo-os.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 Lice... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/build-aux/hydra/demo-os.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(use-modules (gnu)
(gnu packages xorg)
(gnu packages avahi)
(gnu package... |
e4e957ba55a733e673dff4edbcb2747c49ffccec0864ccfc8ac6e8a155b9aa97 | dvanhorn/oaam | mk-graph.rkt | #lang racket
(require "kcfa-instantiations.rkt" "run-benchmark.rkt" "graph.rkt" (only-in "data.rkt" cons-limit))
(require racket/stxparam)
(define benchmark (make-parameter "../benchmarks/introspective.sch"))
(define (prefix)
(let-values ([(base filename dir?) (split-path (string->path (benchmark)))])
filename))... | null | https://raw.githubusercontent.com/dvanhorn/oaam/79bc68ecb79fef45474a948deec1de90d255f307/code/mk-graph.rkt | racket | #lang racket
(require "kcfa-instantiations.rkt" "run-benchmark.rkt" "graph.rkt" (only-in "data.rkt" cons-limit))
(require racket/stxparam)
(define benchmark (make-parameter "../benchmarks/introspective.sch"))
(define (prefix)
(let-values ([(base filename dir?) (split-path (string->path (benchmark)))])
filename))... | |
ba36215a55d587a2eafbe96a1b2299bb5f68ddb008227b6f767d8544f019e40f | OCamlPro/typerex-lint | plugin_parsetree.phys_comp_allocated_lit.1.ml | "String1" == "String2"
| null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-doc/examples/plugin_parsetree.phys_comp_allocated_lit.1.ml | ocaml | "String1" == "String2"
| |
f9b734f9b974d7539910eaf8412054f8451f5ff73002342eb47bd5689ad4ff21 | pjotrp/guix | cran.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU 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 ; ei... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/guix/import/cran.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix import cran)
#:use-module (ice-9 match)
#:use-module (ice-9 reg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.