_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 |
|---|---|---|---|---|---|---|---|---|
0790a3086781f85165cecb8242509331a20566bd06958439e416412d1f844d9a | macchiato-framework/macchiato-core | cors.cljs | (ns
^{:doc "Ring middleware for Cross-Origin Resource Sharing."
:author "Mihael Konjević"}
macchiato.middleware.cors
(:require [clojure.set :as set]
[cuerdas.core :as str]
[macchiato.util.response :as r :refer [get-header]]))
(defn origin
"Returns the Origin request header."
[r... | null | https://raw.githubusercontent.com/macchiato-framework/macchiato-core/14eac3dbc561927ee61b6127f30ef0b0269b2af6/src/macchiato/middleware/cors.cljs | clojure | (ns
^{:doc "Ring middleware for Cross-Origin Resource Sharing."
:author "Mihael Konjević"}
macchiato.middleware.cors
(:require [clojure.set :as set]
[cuerdas.core :as str]
[macchiato.util.response :as r :refer [get-header]]))
(defn origin
"Returns the Origin request header."
[r... | |
f963d547aeb62dd35a23e2167063d63423f5123cee9d8d69f6602f5e8ebe9e54 | Verites/verigraph | Morphism.hs | # LANGUAGE TypeFamilies #
module Data.Graphs.Morphism (
-- * Types
GraphMorphism(..)
, compose
-- * Construction
, Data.Graphs.Morphism.empty
, buildGraphMorphism
, fromGraphsAndRelations
, fromGraphsAndLists
-- * Transformation
, invertGraphMorphism
, updateCodomain
,... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/Data/Graphs/Morphism.hs | haskell | * Types
* Construction
* Transformation
* Query
| Return the nodes ids of the codomain which are not in the image of the given morphism.
| Return the edges of the codomain which are not in the image of the given morphism.
| Return the edge ids of the codomain which are not in the image of the given morphism.
| ... | # LANGUAGE TypeFamilies #
module Data.Graphs.Morphism (
GraphMorphism(..)
, compose
, Data.Graphs.Morphism.empty
, buildGraphMorphism
, fromGraphsAndRelations
, fromGraphsAndLists
, invertGraphMorphism
, updateCodomain
, updateDomain
, updateNodes
, updateNodeRelation
... |
9efc305f2e36c658c15a67694ce00224dfde90d086dda3dd18849fbe9e1dfcb0 | programaker-project/Programaker-Core | automate_rest_api_templates_root.erl | %%% @doc
%%% REST endpoint to manage knowledge collections.
%%% @end
-module(automate_rest_api_templates_root).
-export([init/2]).
-export([ allowed_methods/2
, options/2
, is_authorized/2
, content_types_provided/2
, content_types_accepted/2
, resource_exists/2
]).
-ex... | null | https://raw.githubusercontent.com/programaker-project/Programaker-Core/ef10fc6d2a228b2096b121170c421f5c29f9f270/backend/apps/automate_rest_api/src/automate_rest_api_templates_root.erl | erlang | @doc
REST endpoint to manage knowledge collections.
@end
CORS
Authentication
Don't do authentication if it's just asking for options
Non matching user id
POST handler
GET handler |
-module(automate_rest_api_templates_root).
-export([init/2]).
-export([ allowed_methods/2
, options/2
, is_authorized/2
, content_types_provided/2
, content_types_accepted/2
, resource_exists/2
]).
-export([ accept_json_create_template/2
, to_json/2
]).
... |
9020c3b4f1cdd1af1fdac0960a57faf76fc7d419a3446f24ba68fc973778d64b | NorfairKing/tickler | ItemUUID.hs | module Tickler.Data.ItemUUID
( ItemUUID,
module Data.UUID.Typed,
)
where
import Data.UUID.Typed
import Tickler.Data.UUID ()
type ItemUUID = UUID Item
data Item
| null | https://raw.githubusercontent.com/NorfairKing/tickler/8f0d984c2f4e57a76eed95cad9ed7615433dc39d/tickler-data/src/Tickler/Data/ItemUUID.hs | haskell | module Tickler.Data.ItemUUID
( ItemUUID,
module Data.UUID.Typed,
)
where
import Data.UUID.Typed
import Tickler.Data.UUID ()
type ItemUUID = UUID Item
data Item
| |
2564c9218402fbdb355ee78f89ce066a5c3355c49e2ee9c12efd4d167b996d20 | avsm/platform | opamSwitchCommand.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/client/opamSwitchCommand.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
open OpamTypes
open OpamStateTypes
open OpamPackage.Set.Op
open OpamStd.Op
module S = OpamFil... |
102f169d042f26f94edc891c10dd598b69d935bab147793e467e6a70cb5c10da | dktr0/estuary | Header.hs | # LANGUAGE RecursiveDo , OverloadedStrings #
module Estuary.Widgets.Header where
import Reflex
import Reflex.Dom hiding (Request,Response)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Map.Strict
import Estuary.Types.Language
import Estuary.Types.Hint
import qualified Estuary.Types.Term as Term... | null | https://raw.githubusercontent.com/dktr0/estuary/c08a4790533c983ba236468e0ae197df50f2109f/client/src/Estuary/Widgets/Header.hs | haskell | # LANGUAGE RecursiveDo , OverloadedStrings #
module Estuary.Widgets.Header where
import Reflex
import Reflex.Dom hiding (Request,Response)
import Data.Text (Text)
import qualified Data.Text as T
import Data.Map.Strict
import Estuary.Types.Language
import Estuary.Types.Hint
import qualified Estuary.Types.Term as Term... | |
108b44e7bb858ade22e87a4c2a5c642024b42e944c15b677103b9d9c36ee513d | 10Pines/pdepreludat | Library.hs | module Library where
import PdePreludat
doble :: Number -> Number
doble numero = numero + numero
| null | https://raw.githubusercontent.com/10Pines/pdepreludat/aa72d7bcd262725d53b920591aa991cecdf36a18/the-template/src/Library.hs | haskell | module Library where
import PdePreludat
doble :: Number -> Number
doble numero = numero + numero
| |
86b407087aa6e344da5d6d5e5500591246df573d41abdd01b4d1db1d478f3c2a | kupl/MicSE | se.ml | (* Se is a symbolic execution module based on Tz.sym_state definition *)
exception SeError of string
open! Core
Set of Tz.sym_state & Set of
module SSet = Core.Set.Make (Tz.SymState_cmp)
module MciSet = Core.Set.Make (Tz.MichCutInfo_cmp)
module MFSet = Core.Set.Make (Tz.MichF_cmp)
type se_result = {
(* symboli... | null | https://raw.githubusercontent.com/kupl/MicSE/3e757ce3dff47e1984c5fdcfda6bec29ec3cc6f4/lib/se.ml | ocaml | Se is a symbolic execution module based on Tz.sym_state definition
symbolic states
caches - accumulates which loop/lambdas passed
caches - count integer to assign sym_state_id (start with 0)
****************************************************************************
********************************************... |
exception SeError of string
open! Core
Set of Tz.sym_state & Set of
module SSet = Core.Set.Make (Tz.SymState_cmp)
module MciSet = Core.Set.Make (Tz.MichCutInfo_cmp)
module MFSet = Core.Set.Make (Tz.MichF_cmp)
type se_result = {
sr_running : SSet.t;
sr_blocked : SSet.t;
sr_queries : SSet.t;
sr_terminated ... |
2b530aecd823b53f3759d141ba94c3c2d2f49df75bff259e3fa8859eb6455b4e | LaurentMazare/btc-ocaml | hash.ml | open Core.Std
let hex_of_char c =
if Char.('0' <= c && c <= '9') then Char.to_int c - Char.to_int '0'
else if Char.('a' <= c && c <= 'f') then 10 + Char.to_int c - Char.to_int 'a'
else failwithf "char %c is not hex" c ()
let char_of_hex i =
if 0 <= i && i < 10 then Char.of_int_exn (Char.to_int '0' + i)
else... | null | https://raw.githubusercontent.com/LaurentMazare/btc-ocaml/0616d7853d807e50dc9ff83c6783b80f71640da2/hash.ml | ocaml | open Core.Std
let hex_of_char c =
if Char.('0' <= c && c <= '9') then Char.to_int c - Char.to_int '0'
else if Char.('a' <= c && c <= 'f') then 10 + Char.to_int c - Char.to_int 'a'
else failwithf "char %c is not hex" c ()
let char_of_hex i =
if 0 <= i && i < 10 then Char.of_int_exn (Char.to_int '0' + i)
else... | |
0273b430baa5feffc16fbe560b2a6e0520c3ec3df411de149cff3543735bedd1 | elaforge/karya | Constants.hs | Copyright 2013
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Perform.Lilypond.Constants where
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Util.Seq as Seq
import qualified Derive.Env as Env
import qua... | null | https://raw.githubusercontent.com/elaforge/karya/89d1651424c35e564138d93424a157ff87457245/Perform/Lilypond/Constants.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
* ly-global instrument
| This is a pseudo-instrument used to mark notes which are actually global
* code fragments
| A free-standing code fragment is merged in with its nearest
| A code fragment that has to... | Copyright 2013
module Perform.Lilypond.Constants where
import qualified Data.Map as Map
import qualified Data.Text as Text
import qualified Util.Seq as Seq
import qualified Derive.Env as Env
import qualified Derive.ScoreT as ScoreT
import qualified Derive.ShowVal as ShowVal
import qualified Derive.Typecheck as Ty... |
ecaad3e13471f5c735ea441cc60e609de447d78d5c4d28864696fa7776bcfb5d | replikativ/tablehike | build.clj | (ns build
(:refer-clojure :exclude [test])
(:require [borkdude.gh-release-artifact :as gh]
[clojure.tools.build.api :as b]
[deps-deploy.deps-deploy :as dd]
[clojure.string :as str])
(:import (clojure.lang ExceptionInfo)))
(def lib 'io.replikativ/tablehike)
(def version (format... | null | https://raw.githubusercontent.com/replikativ/tablehike/cd945e8c120a55056efc120d6bddb44b40c72b70/build.clj | clojure | (ns build
(:refer-clojure :exclude [test])
(:require [borkdude.gh-release-artifact :as gh]
[clojure.tools.build.api :as b]
[deps-deploy.deps-deploy :as dd]
[clojure.string :as str])
(:import (clojure.lang ExceptionInfo)))
(def lib 'io.replikativ/tablehike)
(def version (format... | |
e55bd58f77de5d139aa347055f3021425d4509d11850c8641d0ac9be81310c91 | jacekschae/learn-datomic-course-files | db.clj | (ns cheffy.recipe.db
(:require [datomic.client.api :as d])
(:import (java.util UUID)))
(def recipe-pattern
[:recipe/recipe-id
:recipe/prep-time
:recipe/display-name
:recipe/image-url
:recipe/public?
:recipe/favorite-count
{:recipe/owner
[:account/account-id
:account/display-name]}
{... | null | https://raw.githubusercontent.com/jacekschae/learn-datomic-course-files/941a0b2492bfaebe38564aed6a426b0ef87ccdca/increments/31-ingredients/src/main/cheffy/recipe/db.clj | clojure | public
drafts | (ns cheffy.recipe.db
(:require [datomic.client.api :as d])
(:import (java.util UUID)))
(def recipe-pattern
[:recipe/recipe-id
:recipe/prep-time
:recipe/display-name
:recipe/image-url
:recipe/public?
:recipe/favorite-count
{:recipe/owner
[:account/account-id
:account/display-name]}
{... |
a6d6dfbb0f76263bd7c7963c1271a717d61216201811f79bba8deeea5bcbbca6 | takikawa/racket-ppa | info.rkt | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote (("base" #:version "6.8.0.2") "compatibility-lib" "draw-lib" ("drracket-plugin-lib" #:version "1.1") "errortrace-lib" "html-lib" "images-gui-lib" "images-lib" "net-lib" "pconvert-lib" "plai-lib" "r5rs-lib" "sandbox-lib" "sc... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/share/pkgs/htdp-lib/info.rkt | racket | (module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote (("base" #:version "6.8.0.2") "compatibility-lib" "draw-lib" ("drracket-plugin-lib" #:version "1.1") "errortrace-lib" "html-lib" "images-gui-lib" "images-lib" "net-lib" "pconvert-lib" "plai-lib" "r5rs-lib" "sandbox-lib" "sc... | |
3a8297926aef1e92e2ab8f2190d1226286eb3ac7721e3e67e781d375a6696e92 | arttuka/reagent-material-ui | propane_tank_rounded.cljs | (ns reagent-mui.icons.propane-tank-rounded
"Imports @mui/icons-material/PropaneTankRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def propane-tank-roun... | null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/c7cd0d7c661ab9df5b0aed0213a6653a9a3f28ea/src/icons/reagent_mui/icons/propane_tank_rounded.cljs | clojure | (ns reagent-mui.icons.propane-tank-rounded
"Imports @mui/icons-material/PropaneTankRounded as a Reagent component."
(:require-macros [reagent-mui.util :refer [create-svg-icon e]])
(:require [react :as react]
["@mui/material/SvgIcon" :as SvgIcon]
[reagent-mui.util]))
(def propane-tank-roun... | |
9f4b015cb483fdcc1c049ca9a9b6f7497b73089a4adc519536f7b69bc9a68323 | input-output-hk/ouroboros-network | Serialisation.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
{-# LANGUAGE ScopedTypeVariables #-}
# OPTIONS_GHC -Wno - orphans #
module Ouroboros.Consensus.Byr... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/17889be3e1b6d9b5ee86022b91729837051e6fbb/ouroboros-consensus-byron/src/Ouroboros/Consensus/Byron/Node/Serialisation.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------------------------------------------------------}
----------------... | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# OPTIONS_GHC -Wno - orphans #
module Ouroboros.Consensus.Byron.Node.Serialisation () where
import qualified Codec.CBOR.Decoding as CBOR
i... |
bcb768886ec3c4a7d7b82f809288f52cfda59794c425f28cd220c0a591b47fad | matsen/pplacer | test_json.ml | open Ppatteries
open OUnit
open Test_util
let suite = List.map
(fun fname ->
let name = Filename.basename fname in
name >:: match String.sub name 0 4 with
| "pass" -> fun () ->
let parsed = Json.of_file fname in
let roundtrip = Json.of_string (Json.to_string parsed) in
json_equa... | null | https://raw.githubusercontent.com/matsen/pplacer/f40a363e962cca7131f1f2d372262e0081ff1190/tests/json/test_json.ml | ocaml | open Ppatteries
open OUnit
open Test_util
let suite = List.map
(fun fname ->
let name = Filename.basename fname in
name >:: match String.sub name 0 4 with
| "pass" -> fun () ->
let parsed = Json.of_file fname in
let roundtrip = Json.of_string (Json.to_string parsed) in
json_equa... | |
6543a9e8bc6bde9157941492fd40fff7124c7e515b615e57b31878abec380904 | pikatchu/LinearML | estOptim.ml |
Copyright ( c ) 2011 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
1 . Redistributions of source code must retain the above copyright
notice , this list of conditions and the foll... | null | https://raw.githubusercontent.com/pikatchu/LinearML/76da04134b9eb3a9ca4252e9cb41d412b50a072a/compiler/estOptim.ml | ocaml | let df = InlineBlocks.def df in
let df = Remove.def df in |
Copyright ( c ) 2011 ,
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
1 . Redistributions of source code must retain the above copyright
notice , this list of conditions and the foll... |
c144682f931e955e1816b633331bc5a60c99edf9b18ffb08d588cdfcff3a9364 | mzp/coq-ruby | dischargedhypsmap.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/library/dischargedhypsmap.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
s Registration as global tables and ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : dischargedhypsmap... |
e1ba455b68dea7436ac7eb16ca4ecef4de2108e0903b0bb35c5206617cd0610e | dvanhorn/oaam | LK-instantiations.rkt | #lang racket
(require (rename-in racket/generator [yield real-yield]))
(require "LK.rkt" "data.rkt" "parse.rkt"
"primitives.rkt" "fix.rkt"
;; different components of instantiantiations
"lazy-strict.rkt"
"context.rkt"
"deltas.rkt"
"generators.rkt"
"store-pa... | null | https://raw.githubusercontent.com/dvanhorn/oaam/79bc68ecb79fef45474a948deec1de90d255f307/code/LK-instantiations.rkt | racket | different components of instantiantiations
Concrete semantics
"bl"
"pd"
#; | #lang racket
(require (rename-in racket/generator [yield real-yield]))
(require "LK.rkt" "data.rkt" "parse.rkt"
"primitives.rkt" "fix.rkt"
"lazy-strict.rkt"
"context.rkt"
"deltas.rkt"
"generators.rkt"
"store-passing.rkt"
"imperative.rkt"
"prealloc... |
0680e70e56843c7a6f75296abe0516faa17fb1fbd389975c042795aaf7677925 | mmottl/gpr | cov_se_iso.ml | File : cov_se_iso.ml
for OCaml
Copyright ( C ) 2009-
email :
WWW :
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
ver... | null | https://raw.githubusercontent.com/mmottl/gpr/64c4dce01b1779feff85d36d5902afa3b143bdae/src/cov_se_iso.ml | ocaml | File : cov_se_iso.ml
for OCaml
Copyright ( C ) 2009-
email :
WWW :
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
ver... | |
ac58264db48ecc45fbe87b4add22dede12bb42b45b1b7bfdab750455c58d5608 | oliyh/pedestal-api | helpers_test.clj | (ns pedestal-api.helpers-test
(:require [pedestal-api.core :as api]
[pedestal-api.helpers :refer :all]
[schema.core :as s]
[io.pedestal.interceptor.helpers :as i]
[clojure.test :refer :all]))
(defbefore test-defbefore
{:summary "A test interceptor"
:parameters {:b... | null | https://raw.githubusercontent.com/oliyh/pedestal-api/1a90c29e97c3cccfe59a1f9d114765c104f70c13/test/pedestal_api/helpers_test.clj | clojure | (ns pedestal-api.helpers-test
(:require [pedestal-api.core :as api]
[pedestal-api.helpers :refer :all]
[schema.core :as s]
[io.pedestal.interceptor.helpers :as i]
[clojure.test :refer :all]))
(defbefore test-defbefore
{:summary "A test interceptor"
:parameters {:b... | |
564b8851306ac6a3af9fee3aef0a8a0ebd1de215d5bcf520ae366bfb0d29d377 | clojure-interop/google-cloud-clients | SpeechSettings$Builder.clj | (ns com.google.cloud.speech.v1p1beta1.SpeechSettings$Builder
"Builder for SpeechSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.speech.v1p1beta1 SpeechSettings$Builder]))
(defn get-stub-settings-builder
"returns: `com.google.cloud.speech.v1p1beta1.stub.SpeechStubSettings$... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.speech/src/com/google/cloud/speech/v1p1beta1/SpeechSettings%24Builder.clj | clojure | (ns com.google.cloud.speech.v1p1beta1.SpeechSettings$Builder
"Builder for SpeechSettings."
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.speech.v1p1beta1 SpeechSettings$Builder]))
(defn get-stub-settings-builder
"returns: `com.google.cloud.speech.v1p1beta1.stub.SpeechStubSettings$... | |
7846f3fe9a88de9b6bc891a7a51965ad84024fd8d597256c0350187d646de94b | rd--/hsc3 | expRandN.help.hs | expRandN ; two channel sin tones
sinOsc ar (X.expRandNId 2 'α' 440 880) 0 * 0.1
expRandN ; n node klang synthesis
let n = 240
f = X.expRandNId n 'α' 40 18000
a = X.expRandNId n 'β' 0.1 0.3
p = X.randNId n 'γ' (-1) 1
s = klangSpec_mce f a p
in klang ar 1 0 s * 0.01
expRandN ; mce ...
let f = X.ex... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/expRandN.help.hs | haskell | expRandN ; two channel sin tones
sinOsc ar (X.expRandNId 2 'α' 440 880) 0 * 0.1
expRandN ; n node klang synthesis
let n = 240
f = X.expRandNId n 'α' 40 18000
a = X.expRandNId n 'β' 0.1 0.3
p = X.randNId n 'γ' (-1) 1
s = klangSpec_mce f a p
in klang ar 1 0 s * 0.01
expRandN ; mce ...
let f = X.ex... | |
f93df4f900192163981c8ab0b3c2685fe128828a7474b500363dec31c7aa9e24 | deadcode/Learning-CL--David-Touretzky | 9.1.lisp | (defun say-this ()
(format t "~&There are old pilots,")
(format t "~&and there are bold pilots,")
(format t "~&but there are no old bold pilots."))
(say-this)
| null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%209/9.1.lisp | lisp | (defun say-this ()
(format t "~&There are old pilots,")
(format t "~&and there are bold pilots,")
(format t "~&but there are no old bold pilots."))
(say-this)
| |
ab721a05c79bf617d8ac0eccae1b9facdc029049c295b54c767576d2532fe544 | clojurewerkz/spyglass | transcoders.clj | (ns clojurewerkz.spyglass.transcoders
"Transcoder is an interface for classes that convert between byte arrays
and objects for storage in the cache."
(:import [net.spy.memcached CachedData]
[net.spy.memcached.transcoders
Transcoder IntegerTranscoder LongTranscoder
Serializin... | null | https://raw.githubusercontent.com/clojurewerkz/spyglass/be6cad3f5ea7212eeb2ecb07a28dece7a658b710/src/clojure/clojurewerkz/spyglass/transcoders.clj | clojure | (ns clojurewerkz.spyglass.transcoders
"Transcoder is an interface for classes that convert between byte arrays
and objects for storage in the cache."
(:import [net.spy.memcached CachedData]
[net.spy.memcached.transcoders
Transcoder IntegerTranscoder LongTranscoder
Serializin... | |
f83b77a3ee927d3c14c3516a8b298d7882ba7d9f7e4440417a977c6c1210b68e | BranchTaken/Hemlock | i16.mli | * 16 - bit signed integer .
See { ! module : ConvertIntf } for documentation on conversion functions .
See {!module:ConvertIntf} for documentation on conversion functions. *)
type t
include IntnbIntf.SI with type t := t
val trunc_of_zint: Zint.t -> t
val extend_to_zint: t -> Zint.t
val narrow_of_zint_opt:... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/53da5c0d9cf0c94d58b4391735d917518eec67fa/bootstrap/src/basis/i16.mli | ocaml | * 16 - bit signed integer .
See { ! module : ConvertIntf } for documentation on conversion functions .
See {!module:ConvertIntf} for documentation on conversion functions. *)
type t
include IntnbIntf.SI with type t := t
val trunc_of_zint: Zint.t -> t
val extend_to_zint: t -> Zint.t
val narrow_of_zint_opt:... | |
6bf9389f3f73ced18d90bd5d9fcebb2291e963726d7f7b0b6acc9087c99ea963 | pfdietz/ansi-test | remove-method.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sun May 11 19:53:37 2003
;;;; Contains: Tests of REMOVE-METHOD
(defparameter *remove-meth-gf-01*
(defgeneric remove-meth-gf-01 (x)))
(defparameter *remove-meth-gf-01-method-t*
(defmethod remove-meth-gf-01 ((x t)) x))
(defparameter *remove-meth-gf-02*
(def... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/objects/remove-method.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of REMOVE-METHOD
remove method must not signal an error if the method
does not belong to the generic function
Add, then remove, a method
Remove in the other order
Adding and removing auxiliary methods
Must add tests for nonstandard method combinations | Author :
Created : Sun May 11 19:53:37 2003
(defparameter *remove-meth-gf-01*
(defgeneric remove-meth-gf-01 (x)))
(defparameter *remove-meth-gf-01-method-t*
(defmethod remove-meth-gf-01 ((x t)) x))
(defparameter *remove-meth-gf-02*
(defgeneric remove-meth-gf-02 (x)))
(defparameter *remove-meth-gf... |
fa3f146e940d962cf6a4df467cba865da2a370ca7fc630ba1e6b825ae7bf44db | mattdw/stemmers | soundex.clj | (ns stemmers.test.soundex
(:use clojure.test
stemmers.soundex))
(deftest rupert-robert-rubin
(is (= (stem "robert") "R163"))
(is (= (stem "rupert") "R163"))
(is (= (stem "rubin") "R150")))
(deftest ashcraft-ashcroft
(is (= (stem "ashcraft") (stem "ashcroft") "A261")))
(deftest jumanji-fruittrees
... | null | https://raw.githubusercontent.com/mattdw/stemmers/7a29b412352ebb604058b357ba332a8b53d0565f/test/stemmers/test/soundex.clj | clojure | (ns stemmers.test.soundex
(:use clojure.test
stemmers.soundex))
(deftest rupert-robert-rubin
(is (= (stem "robert") "R163"))
(is (= (stem "rupert") "R163"))
(is (= (stem "rubin") "R150")))
(deftest ashcraft-ashcroft
(is (= (stem "ashcraft") (stem "ashcroft") "A261")))
(deftest jumanji-fruittrees
... | |
1e89a47e6104c7639e6818090e3e50a0e86b59d4ae77db2d9663f36f2d0f1b73 | mv2devnul/taglib | iso-639-2.lisp | -*- Mode : Lisp ; show - trailing - whitespace : t ; Base : 10 ; indent - tabs : nil ; Syntax : ANSI - Common - Lisp ; Package : ISO-639 - 2 ; -*-
Copyright ( c ) 2013 , . All rights reserved .
(in-package #:iso-639-2)
(defparameter *langs*
'(:aar "Afar"
:abk "Abkhazian"
:ace "Achinese"
:ach "Acoli"... | null | https://raw.githubusercontent.com/mv2devnul/taglib/915f669dbb3e14f67e7ed79869e9a4ad2859f86a/iso-639-2.lisp | lisp | show - trailing - whitespace : t ; Base : 10 ; indent - tabs : nil ; Syntax : ANSI - Common - Lisp ; Package : ISO-639 - 2 ; -*- | Copyright ( c ) 2013 , . All rights reserved .
(in-package #:iso-639-2)
(defparameter *langs*
'(:aar "Afar"
:abk "Abkhazian"
:ace "Achinese"
:ach "Acoli"
:ada "Adangme"
:ady "Adyghe"
:afa "Afro-Asiatic languages"
:afh "Afrihili"
:afr "Afrikaans"
:ain "Ainu"
:aka "Akan"
:akk "Akka... |
cf905f7919eb52532374c505a46c74c22fd7566d4f17d9c0865adcab362ba7b4 | WorksHub/client | github.cljc | (ns wh.components.github
(:require
#?(:clj [wh.config :as config])
#?(:cljs [re-frame.core :refer [dispatch]])
#?(:cljs [wh.events])
#?(:cljs [wh.subs :as subs :refer [<sub]])
[wh.common.subs]
[wh.components.icons :refer [icon]]))
(defn app-name []
#?(:clj (config/get-in [:github :app :name... | null | https://raw.githubusercontent.com/WorksHub/client/77e4212a69dad049a9e784143915058acd918982/common/src/wh/components/github.cljc | clojure | (ns wh.components.github
(:require
#?(:clj [wh.config :as config])
#?(:cljs [re-frame.core :refer [dispatch]])
#?(:cljs [wh.events])
#?(:cljs [wh.subs :as subs :refer [<sub]])
[wh.common.subs]
[wh.components.icons :refer [icon]]))
(defn app-name []
#?(:clj (config/get-in [:github :app :name... | |
eb210326aa9c0151b019bc9c980cc2fed62e0b805c00cd5975056b024fbeeaa0 | xedin/gremlin-xpath | util_test.clj | (ns gremlin.contrib.xpath.util-test
(:use [clojure.test]
[gremlin.contrib.xpath.util])
(:import [org.apache.commons.jxpath.ri Parser]
[org.apache.commons.jxpath.ri.compiler Step Constant TreeCompiler]))
(deftest get-axis-test
(let [compiler (TreeCompiler.)
xpath (Parser/parseExpression... | null | https://raw.githubusercontent.com/xedin/gremlin-xpath/983e17617d8f4358c4b369946aa56bb9fe6e2e8c/test/gremlin/contrib/xpath/util_test.clj | clojure | (ns gremlin.contrib.xpath.util-test
(:use [clojure.test]
[gremlin.contrib.xpath.util])
(:import [org.apache.commons.jxpath.ri Parser]
[org.apache.commons.jxpath.ri.compiler Step Constant TreeCompiler]))
(deftest get-axis-test
(let [compiler (TreeCompiler.)
xpath (Parser/parseExpression... | |
b310665089cd35fe26d99ed0089dfa539bbdcbb3feb57f0e866a8cb3b4c12131 | kappelmann/eidi2_repetitorium_tum | SparseVector.ml | type v = (int * int) list
let empty = []
let sb_vektor xs = let rec create i = function
| [] -> []
| x::xs when x<>0 -> (i,x)::create (i+1) xs
| x::xs -> create (i+1) xs
in create 0 xs
let rec set i v = function [] -> if v<>0 then [(i,v)] else empty
| (i',v')::xs -> if i'=i t... | null | https://raw.githubusercontent.com/kappelmann/eidi2_repetitorium_tum/1d16bbc498487a85960e0d83152249eb13944611/2016/sparse_vector/solutions/SparseVector.ml | ocaml | type v = (int * int) list
let empty = []
let sb_vektor xs = let rec create i = function
| [] -> []
| x::xs when x<>0 -> (i,x)::create (i+1) xs
| x::xs -> create (i+1) xs
in create 0 xs
let rec set i v = function [] -> if v<>0 then [(i,v)] else empty
| (i',v')::xs -> if i'=i t... | |
096785689904434efa80944e4278ac3594b99aaf1039a78980fe66e8525aa4a5 | lambdalille/history | path.mli | val target : Yocaml.Filepath.t
val history_target : Yocaml.Filepath.t
val css_repository : Yocaml.Filepath.t
val talks_repository : Yocaml.Filepath.t
val speakers_repository : Yocaml.Filepath.t
val companies_repository : Yocaml.Filepath.t
val places_repository : Yocaml.Filepath.t
val events_repository : Yocaml.Filepath... | null | https://raw.githubusercontent.com/lambdalille/history/6b5dd76b80d095d3a54e8860a7568b115ed747e8/bin/path.mli | ocaml | val target : Yocaml.Filepath.t
val history_target : Yocaml.Filepath.t
val css_repository : Yocaml.Filepath.t
val talks_repository : Yocaml.Filepath.t
val speakers_repository : Yocaml.Filepath.t
val companies_repository : Yocaml.Filepath.t
val places_repository : Yocaml.Filepath.t
val events_repository : Yocaml.Filepath... | |
6837978f2c879b157a460445dba76574844119850c99734ade386b52c0e87855 | replikativ/datahike | tuples_test.cljc | (ns datahike.test.tuples-test
(:require
#?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]]
:clj [clojure.test :as t :refer [is are deftest testing]])
[datahike.api :as d]
[datahike.db :as db])
#?(:clj
(:import [clojure.lang ExceptionInfo])))
(deftest test-schema-declar... | null | https://raw.githubusercontent.com/replikativ/datahike/408cb0f538a837267e44b098df895fa00348fe10/test/datahike/test/tuples_test.cljc | clojure | deletes the 'default' db
change tuple + upsert
changing both tuple components in a single operation | (ns datahike.test.tuples-test
(:require
#?(:cljs [cljs.test :as t :refer-macros [is are deftest testing]]
:clj [clojure.test :as t :refer [is are deftest testing]])
[datahike.api :as d]
[datahike.db :as db])
#?(:clj
(:import [clojure.lang ExceptionInfo])))
(deftest test-schema-declar... |
5cbe44ba43cddee0b1860208be32a86326e16abb005fae918bacc6eff04f9ac5 | HaskellZhangSong/Introduction_to_Haskell_2ed_source | Maybe.hs | # LANGUAGE DeriveFunctor #
import Prelude hiding (Maybe, Just, Nothing)
data Identity a = Identity a
data Maybe a = Just a | Nothing deriving Functor
instance Applicative Maybe where
pure = Just
Just f <*> Just a = Just (f a)
_ <*> _ = Nothing
instance Monad Maybe ... | null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C10/Maybe.hs | haskell | # LANGUAGE DeriveFunctor #
import Prelude hiding (Maybe, Just, Nothing)
data Identity a = Identity a
data Maybe a = Just a | Nothing deriving Functor
instance Applicative Maybe where
pure = Just
Just f <*> Just a = Just (f a)
_ <*> _ = Nothing
instance Monad Maybe ... | |
278c8b1554e573a6721a83cb3c7826fc7ab84ccc9ad0f1f7b50aa65ab396c703 | spawnfest/eep49ers | io_lib_format.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2019 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/src/io_lib_format.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 1996 - 2019 . 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(io_lib_format).
-export([fwrite/2,fwrite/3,fwrite_g/1,indentation/2,scan/2,unscan/1,
build/1, buil... |
d13cd19061ddd4e0ac2f560738cf3b0d71374c626b9486865b05d2c1113f0589 | esb-lwb/lwb | eval.clj | lwb Logic WorkBench -- Linear Temporal Logic : Examples Evaluation of LTL
Copyright ( c ) 2016 , THM . All rights reserved .
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php ) .
; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/esb-lwb/lwb/bba51ada7f7316341733d37b0dc4848c4891ef3a/src/lwb/ltl/examples/eval.clj | clojure | The use and distribution terms for this software are covered by the
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
needed for macroexpand-1 of xor etc !!
needed for instrument
=> true
=> true
=> true
=> true
=> true
=> false
Example from lecture notes
=> t... | lwb Logic WorkBench -- Linear Temporal Logic : Examples Evaluation of LTL
Copyright ( c ) 2016 , THM . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php ) .
(ns lwb.ltl.examples.eval
[lwb.ltl.eval :refer :all]
[clojure.spec.test.alpha :as stest]
[clojure.spec.alph... |
f223c8346b5c989a7309faa1a3b1eda7675d2db8a1fb542f942ad432dc6b7c99 | emina/rosette | infeasible-solver.rkt | #lang rosette
(define-symbolic n integer?)
(define xs (if (= n 0) '(1) '()))
(when (= (add1 n) 1)
(apply add1 xs))
| null | https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/test/trace/code/infeasible-solver.rkt | racket | #lang rosette
(define-symbolic n integer?)
(define xs (if (= n 0) '(1) '()))
(when (= (add1 n) 1)
(apply add1 xs))
| |
7a0bafa41bf6b4053cd572a80f1ceccc065c1ff26f574311c3c2eea1651674dc | bradparker/servant-beam-realworld-example-app | Profile.hs | module RealWorld.Conduit.Users.Profile
( Profile(..)
) where
import Data.Aeson (ToJSON, FromJSON)
import Data.Swagger (ToSchema)
data Profile = Profile
{ id :: Int
, username :: Text
, bio :: Text
, image :: Maybe Text
, following :: Bool
} deriving (Generic)
deriving instance ToJSON Profile
deriving... | null | https://raw.githubusercontent.com/bradparker/servant-beam-realworld-example-app/d4a0d79d9dbc7e5b8987b367ac32f99ac3cc20e7/src/RealWorld/Conduit/Users/Profile.hs | haskell | module RealWorld.Conduit.Users.Profile
( Profile(..)
) where
import Data.Aeson (ToJSON, FromJSON)
import Data.Swagger (ToSchema)
data Profile = Profile
{ id :: Int
, username :: Text
, bio :: Text
, image :: Maybe Text
, following :: Bool
} deriving (Generic)
deriving instance ToJSON Profile
deriving... | |
4b42f5f15786151911e5549f0f62227f5568eb19dd82ead4b4633c3aea6cee46 | jumarko/clojure-experiments | csv.clj | (ns clojure-experiments.csv
"see `clojure-experiments.stats.techml` for more tech.ml.dataset related experiments"
(:require [clojure.data.csv :as csv]
[clojure.java.io :as io]
requires the ` --illegal - access = permit ` workaround on JDK 16 : -goes-fast/clj-memory-meter/issues/8
[clj-memo... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/a87098fe69044ad65813a68cb870d824c2c2d18f/src/clojure_experiments/csv.clj | clojure | See also
- tech.ml.dataset:
Using CSV to quickly visualize data can be very handy
and an easy way how to explore, observe trends and find errors
Parsing into maps: /#parsing-into-maps
First row is the header
Drop if you want string keys instead
Charred - blazing-fast CSV & JSON parsing library with minimal dep... | (ns clojure-experiments.csv
"see `clojure-experiments.stats.techml` for more tech.ml.dataset related experiments"
(:require [clojure.data.csv :as csv]
[clojure.java.io :as io]
requires the ` --illegal - access = permit ` workaround on JDK 16 : -goes-fast/clj-memory-meter/issues/8
[clj-memo... |
54c90ecdcd7d4596ccc0dfde22ebff90828ce72d15e5af5efbd031f7fe4154af | arttuka/reagent-material-ui | box.cljs | (ns reagent-mui.material.box
"Imports @mui/material/Box as a Reagent component.
Original documentation is at -ui/api/box/ ."
(:require [reagent.core :as r]
["@mui/material/Box" :as MuiBox]))
(def box (r/adapt-react-class (.-default MuiBox)))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/box.cljs | clojure | (ns reagent-mui.material.box
"Imports @mui/material/Box as a Reagent component.
Original documentation is at -ui/api/box/ ."
(:require [reagent.core :as r]
["@mui/material/Box" :as MuiBox]))
(def box (r/adapt-react-class (.-default MuiBox)))
| |
075f968659a24c0e963b1ee0da8b5ec2159187667881a237d89be2cddd982f40 | xapi-project/ocaml-qmp | cli.ml |
* Copyright ( C ) 2013 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... | null | https://raw.githubusercontent.com/xapi-project/ocaml-qmp/1036d976dc0ef8ca75507fed195a1c03e4091fe9/cli/cli.ml | ocaml | Help sections common to all commands
Options common to all commands |
* Copyright ( C ) 2013 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in fi... |
792f708a9a8dec4047ccfbcd5698a1f6fe80ed34afd4e08fb46dce22579334c5 | adnelson/nixfromnpm | ToNix.hs | # LANGUAGE CPP #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE ViewPatterns #
module NixFromNpm.Conversion.ToNix where
import qualified Prelude as P
import Data.Fix (Fix(..... | null | https://raw.githubusercontent.com/adnelson/nixfromnpm/4ab773cdead920d2312e864857fabaf5f739a80e/src/NixFromNpm/Conversion/ToNix.hs | haskell | # LANGUAGE OverloadedStrings #
| Make a dynamic key name that is only enclosed in double quotes
(no antiquotes).
| Check if it’s a valid nix symbol
the nix lexer regex for IDs (symbols) is [a-zA-Z\_][a-zA-Z0-9\_\'\-]*
| This contains the same information as the .nix file that corresponds
to the package. More or l... | # LANGUAGE CPP #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE ViewPatterns #
module NixFromNpm.Conversion.ToNix where
import qualified Prelude as P
import Data.Fix (Fix(..))
import qualified Data.HashMap.St... |
1c7a8e5ee3f8ea6bf0f5180e8125861c5c6c4e0e481aa7e9be724e75d7599e2b | borodust/claw | function-index.lisp | (cl:in-package :iffi)
(defstruct function-index
(function-table (make-hash-table :test 'equal))
(argument-table (make-hash-table :test 'equal))
(alias-table (make-hash-table :test 'equal)))
(defvar *function-index* (make-function-index))
(defun find-alias-node (name)
(gethash name (function-index-alias-ta... | null | https://raw.githubusercontent.com/borodust/claw/db10a752a491c8669c3ee90c0533f490d79c731f/src/iffi/function-index.lisp | lisp | (cl:in-package :iffi)
(defstruct function-index
(function-table (make-hash-table :test 'equal))
(argument-table (make-hash-table :test 'equal))
(alias-table (make-hash-table :test 'equal)))
(defvar *function-index* (make-function-index))
(defun find-alias-node (name)
(gethash name (function-index-alias-ta... | |
817ad97f7a16239c7d26395b866cfdc3ea1962fa07471130d05f3c13085b49cb | may-liu/qtalk | subscribe_msg_sup.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_odbc_sup.erl
Author : < >
%%% Purpose : ODBC connections supervisor
Created : 22 Dec 2004 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
%%%
%%% This program is free software; you can redi... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/subscribe_msg_sup.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_odbc_sup.erl
Purpose : ODBC connections supervisor
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be usef... | Author : < >
Created : 22 Dec 2004 by < >
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
d117a979d2403cbe1afc9349080c28a6f49cf800aa37bc7117150f16b81b1348 | roswell/roswell | dist-disable.lisp | (defpackage :roswell.dist.disable
(:use :cl))
(in-package :roswell.dist.disable)
(defun disable (&rest r)
(dolist (elm (rest r))
(let ((dist (ql-dist:find-dist elm)))
(if dist
(ql-dist:disable dist)
(format t "~A not found.~%" elm)))))
| null | https://raw.githubusercontent.com/roswell/roswell/0107dfb54393aff1a776deb79d58f67f642135cb/lisp/dist-disable.lisp | lisp | (defpackage :roswell.dist.disable
(:use :cl))
(in-package :roswell.dist.disable)
(defun disable (&rest r)
(dolist (elm (rest r))
(let ((dist (ql-dist:find-dist elm)))
(if dist
(ql-dist:disable dist)
(format t "~A not found.~%" elm)))))
| |
debf9ab90b88916783aa3a04a8a1a18a50c4a0cb7fc9d3ce8692441633e41105 | Carnap/Carnap | Main.hs | module Main where
import Carnap.GHCJS.Action.ProofCheck
main :: IO ()
main = proofCheckAction
| null | https://raw.githubusercontent.com/Carnap/Carnap/99546e377008247c5a1e8de1e294aac8e22584d7/Carnap-GHCJS/Proof-Check/Main.hs | haskell | module Main where
import Carnap.GHCJS.Action.ProofCheck
main :: IO ()
main = proofCheckAction
| |
526ddeca155bb62c5ace20b3b74b7fddef1f4643a966fd34073cd841ef513546 | UU-ComputerScience/uhc | IntegralInteger1.hs | ----------------------------------------------------------------------------------------
what : Integral class , for Integer
expected : ok
----------------------------------------------------------------------------------------
what : Integral class, for Integer
expected: ok
-----------------... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/IntegralInteger1.hs | haskell | --------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------- -} | what : Integral class , for Integer
expected : ok
what : Integral class, for Integer
expected: ok
module IntegralInteger1 where
main :: IO ()
main
= do putStrLn (show ((5::Integer) `quot` 3))
putStrLn (show ((5::Integer) `rem` 3))
let (q,r) = quotRem (5::Integer) (3)
putS... |
9ca0c0b10031960021ca7db5cdf8f78e1f5e29569d8e9b64bbcbe460606467c2 | jackfirth/lens | list-ref-take-drop.rkt | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[list-ref-lens
(->i ([i exact-nonnegative-integer?])
[lens (i) (lens/c (list*-length-at-least/c (add1 i)) any/c)])]
[take-lens
(->i ([i exact-nonnegative-integer?])
[lens (i) (lens/c (list*-length-at-least/c (add1 i)) an... | null | https://raw.githubusercontent.com/jackfirth/lens/733db7744921409b69ddc78ae5b23ffaa6b91e37/lens-data/lens/private/list/list-ref-take-drop.rkt | racket | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[list-ref-lens
(->i ([i exact-nonnegative-integer?])
[lens (i) (lens/c (list*-length-at-least/c (add1 i)) any/c)])]
[take-lens
(->i ([i exact-nonnegative-integer?])
[lens (i) (lens/c (list*-length-at-least/c (add1 i)) an... | |
43f3b4a031b5d0c3ed596467d5ade3da4c19f1dde1c08e8b307db0ef9eec0594 | pbaille/binaural-beats | dl.cljs | (ns utils.dl)
(defn download [data filename & [format]]
(let [format (or format "application/octet-stream")
a (.createElement js/document "a")]
(aset a "href" (str "data:text/plain;charset=utf-8," (pr-str data)))
(aset a "download" filename)
(.click a)
(.removeChild js/document a)))
| null | https://raw.githubusercontent.com/pbaille/binaural-beats/628a2ed6999bd04647411be26b255fa4d5f13c95/src/utils/dl.cljs | clojure | (ns utils.dl)
(defn download [data filename & [format]]
(let [format (or format "application/octet-stream")
a (.createElement js/document "a")]
(aset a "href" (str "data:text/plain;charset=utf-8," (pr-str data)))
(aset a "download" filename)
(.click a)
(.removeChild js/document a)))
| |
615acff6cbaae248bcad8fe67b022f504b249817853042ae8b51434687cb68c6 | crisptrutski/matchbox | keyword.cljc | (ns matchbox.serialization.keyword
(:require
[matchbox.serialization.plain :as plain]
[matchbox.utils :as utils]
[clojure.walk :as walk]))
(defn hydrate-kw [x]
(if (and (string? x) (= \: (first x))) (keyword (subs x 1)) x))
(defn hydrate-map [x]
(if (map? x) (into (empty x) (map (fn [[k v]] [(keywor... | null | https://raw.githubusercontent.com/crisptrutski/matchbox/5bb9ba96f5df01bce302a8232f6cddd9d64a1d71/src/matchbox/serialization/keyword.cljc | clojure | (ns matchbox.serialization.keyword
(:require
[matchbox.serialization.plain :as plain]
[matchbox.utils :as utils]
[clojure.walk :as walk]))
(defn hydrate-kw [x]
(if (and (string? x) (= \: (first x))) (keyword (subs x 1)) x))
(defn hydrate-map [x]
(if (map? x) (into (empty x) (map (fn [[k v]] [(keywor... | |
5a3d54bb0fd39fa23127118de5655c6c0b5ab3191fdfac2dde3fd55f1ee281e7 | mbutterick/typesetting | check-pdf.rkt | #lang debug racket
(require rackunit (prefix-in zlib: fontland/zlib) fontland/table/cff/cff-top)
(provide (all-defined-out))
(define (xref-offset bs)
(match (regexp-match #px"(?<=startxref\n)\\d+" bs)
[(list val) (read (open-input-bytes val))]
[_ (error 'no-xref)]))
(define-syntax (pat-lex stx)
(syntax-ca... | null | https://raw.githubusercontent.com/mbutterick/typesetting/6f7a8bbc422a64d3a54cbbbd78801a01410f5c92/pitfall/pitfall/check-pdf.rkt | racket | impliedly throw away leading non-delimiter bytes
the complication is that arrays & dicts can contain other arrays & dicts
so we have to scan ahead in an intelligent way.
array
dict, maybe with stream
put hash into order so it's comparable
might have a stream
font subsets have their own interior structure, so ig... | #lang debug racket
(require rackunit (prefix-in zlib: fontland/zlib) fontland/table/cff/cff-top)
(provide (all-defined-out))
(define (xref-offset bs)
(match (regexp-match #px"(?<=startxref\n)\\d+" bs)
[(list val) (read (open-input-bytes val))]
[_ (error 'no-xref)]))
(define-syntax (pat-lex stx)
(syntax-ca... |
95215f1ec5127c164707949ac7af55796a63964e512f5092c370bd007d69f4c9 | intermine/bluegenes | routes.clj | (ns bluegenes.routes
(:require [compojure.core :as compojure :refer [GET POST defroutes context]]
[compojure.route :refer [resources not-found]]
[ring.util.response :as response :refer [response]]
[ring.util.http-response :refer [found see-other]]
[ring.middleware.param... | null | https://raw.githubusercontent.com/intermine/bluegenes/563e886234c16ada159715cb182f33e94d606ed4/src/clj/bluegenes/routes.clj | clojure | twice, messing up session.init!
Define the top level URL routes for the server
serve compiled files, i.e. js, css, from the resources folder
The favicon is chosen from the following order of priority:
Anything within this context is the API web service.
Linking in.
Handles both configured mines and the /query pat... | (ns bluegenes.routes
(:require [compojure.core :as compojure :refer [GET POST defroutes context]]
[compojure.route :refer [resources not-found]]
[ring.util.response :as response :refer [response]]
[ring.util.http-response :refer [found see-other]]
[ring.middleware.param... |
f70824cbb06298dd0d74d357b5475f39780acef5b825e320dfcfcf2b4f7ffee2 | gfngfn/SATySFi | imageHashTable.ml |
open MyUtil
type tag = string
type bbox = float * float * float * float
type key = int
type value_main =
| PDFImage of Pdf.t * Pdfpage.t
| OtherImage of Images.format * Pdf.pdfobject * int * int * abs_path
type value = tag * bbox * value_main
exception CannotLoadPdf of string * abs_path * int
exce... | null | https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/backend/imageHashTable.ml | ocaml | -- default dots per inch --
when no color model is specified; doubtful implementation |
open MyUtil
type tag = string
type bbox = float * float * float * float
type key = int
type value_main =
| PDFImage of Pdf.t * Pdfpage.t
| OtherImage of Images.format * Pdf.pdfobject * int * int * abs_path
type value = tag * bbox * value_main
exception CannotLoadPdf of string * abs_path * int
exce... |
d07738e9312345fe6abeaa28ec7a01cdd7273759b4822e9a36ebfea2109655c4 | ThomasHintz/keep-the-records | ping.scm | (use zmq)
(include "lookup-port.scm")
(define get-ping-address-socket (make-socket 'req))
(connect-socket get-ping-address-socket (string-append "tcp:" lookup-port))
(send-message get-ping-address-socket "ping")
(define socket (make-socket 'rep))
(connect-socket socket (string-append "tcp:" (receive-message* get-pin... | null | https://raw.githubusercontent.com/ThomasHintz/keep-the-records/c20e648e831bed2ced3f2f74bfc590dc06b5f076/services/ping.scm | scheme | (use zmq)
(include "lookup-port.scm")
(define get-ping-address-socket (make-socket 'req))
(connect-socket get-ping-address-socket (string-append "tcp:" lookup-port))
(send-message get-ping-address-socket "ping")
(define socket (make-socket 'rep))
(connect-socket socket (string-append "tcp:" (receive-message* get-pin... | |
72aaf1e5e97c97cd2690f33efccf5f67e63d346a1d88d8c9b709f37bcabb2ca9 | bef/erlswf | ngram.erl | %%
%% @doc functions for n-gram analysis
%%
-module(ngram).
-export([
ngram/2, ngram/3,
ngramfold/2, ngramfold/3,
cut_profile/2,
intersect_profiles/2,
expand_profiles/2,
distance/2, simplified_distance/2, common_distance/2,
save_profile/2,
load_profile/1,
merge_profiles/2, merge_profiles/1,
incr_pl/3
]).
-in... | null | https://raw.githubusercontent.com/bef/erlswf/1397591d012aaa020f9ffc0ecd5436e65814e668/src/ngram.erl | erlang |
@doc functions for n-gram analysis
@doc generate n-gram profile
@spec ngram(integer(), profile(), list()) -> profile()
@doc same as ngram(N, [], L)
@doc increase integer value of property list entry by I
@doc generate n-gram from a list of lists
@doc limit n-gram profile to the Length
the resulting profiles a... | -module(ngram).
-export([
ngram/2, ngram/3,
ngramfold/2, ngramfold/3,
cut_profile/2,
intersect_profiles/2,
expand_profiles/2,
distance/2, simplified_distance/2, common_distance/2,
save_profile/2,
load_profile/1,
merge_profiles/2, merge_profiles/1,
incr_pl/3
]).
-include("ngram.hrl").
From a list L of ele... |
095758ed4428b78a3eca9277b14a021d49cf14234fc8c4f9c63a30ea2859256c | mzp/coq-for-ipad | mkcamlp4.ml | (****************************************************************************)
(* *)
(* Objective Caml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/camlp4/mkcamlp4.ml | ocaml | **************************************************************************
Objective Caml
... | Copyright 2006 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed under
the terms of the GNU Library General Public License , with the special
Authors :
* - Daniel de Rauglaudre : initial shell version
* - : rewriti... |
acaa69c31090238f3b528ffc3b17bcb4f24c514b5c21a42f47ace2a1bb0396f9 | haskell/cabal | Signal.hs | # LANGUAGE CPP #
module Distribution.Client.Signal
( installTerminationHandler
, Terminated(..)
)
where
import qualified Control.Exception as Exception
#ifndef mingw32_HOST_OS
import Control.Concurrent (myThreadId)
import Control.Monad (void)
import qualified System.Posix.Signals as Signals
#endif
-- | Termina... | null | https://raw.githubusercontent.com/haskell/cabal/55e036a2c40586bc0f69aaa7d85aab931a0a5c80/cabal-install/src/Distribution/Client/Signal.hs | haskell | | Terminated is an asynchronous exception, thrown when
is to Ctrl-C.
| Install a signal handler that initiates a controlled shutdown on receiving
called from the main thread.
| # LANGUAGE CPP #
module Distribution.Client.Signal
( installTerminationHandler
, Terminated(..)
)
where
import qualified Control.Exception as Exception
#ifndef mingw32_HOST_OS
import Control.Concurrent (myThreadId)
import Control.Monad (void)
import qualified System.Posix.Signals as Signals
#endif
SIGTERM is... |
568cdf44357322654da4158fc12b0731af1aeb0354f8b3ed76c3169b0f80aa14 | vmchale/kempe | CGen.hs | module Kempe.CGen ( cGen
) where
import Data.Maybe (mapMaybe)
import Kempe.AST
import Kempe.Name
import Language.C.AST
cGen :: Declarations a c (StackType ()) -> [CFunc]
cGen = mapMaybe cDecl
cDecl :: KempeDecl a c (StackType ()) -> Maybe CFunc
cDecl ExtF... | null | https://raw.githubusercontent.com/vmchale/kempe/23d59cb9343902aae33140e2b68ac0e4ab0a60a0/src/Kempe/CGen.hs | haskell | module Kempe.CGen ( cGen
) where
import Data.Maybe (mapMaybe)
import Kempe.AST
import Kempe.Name
import Language.C.AST
cGen :: Declarations a c (StackType ()) -> [CFunc]
cGen = mapMaybe cDecl
cDecl :: KempeDecl a c (StackType ()) -> Maybe CFunc
cDecl ExtF... | |
8acc05150f5a3df9f3ca92c44a16cc4db0f31d622885564f3a3a6fcfb09f04f7 | bugczw/Introduction-to-Functional-Programming-in-OCaml | W6_S2.ml |
REMOVE ELEMENTS FROM DICTIONARIES ( 20/20 points )
The following code is the program explained during the video sequence except that we have modified the interface a little bit . Now , it is possible to remove a key from a dictionary .
Update the code to have it accepted by the type - checker .
THE GIVEN PR... | null | https://raw.githubusercontent.com/bugczw/Introduction-to-Functional-Programming-in-OCaml/13c4d1f92e7479f8eb10ea5d4c43a598b6676d0f/OCaml_MOOC_W6_ALL/Exercise/W6_S2.ml | ocaml |
REMOVE ELEMENTS FROM DICTIONARIES ( 20/20 points )
The following code is the program explained during the video sequence except that we have modified the interface a little bit . Now , it is possible to remove a key from a dictionary .
Update the code to have it accepted by the type - checker .
THE GIVEN PR... | |
05a72fb03dc68e09c2a978a5950f772f6860f081698a310b36136e4c03c252d5 | denisshevchenko/circlehs | Types.hs | |
Module : Network . CircleCI.Common . Types
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : alpha
Common types for work with CircleCI API .
Module : Network.CircleCI.Common.Types
Copyright : (c) Denis Shevchenko, 2016
License : MIT
Maintainer :
Stabilit... | null | https://raw.githubusercontent.com/denisshevchenko/circlehs/0c01693723a234bb46ff8d1e6e114cce91dfa032/src/Network/CircleCI/Common/Types.hs | haskell | import CircleCI.Common.Run
| CircleCI account API token. List of account API tokens can be found at .
| API token as text, for Servant.
| GitHub user name.
| GitHub project name.
| GitHub branch name.
| Number of project's build on CircleCI.
| User email address.
| Monad for response from CircleCI.
| GitHub p... | |
Module : Network . CircleCI.Common . Types
Copyright : ( c ) , 2016
License : MIT
Maintainer :
Stability : alpha
Common types for work with CircleCI API .
Module : Network.CircleCI.Common.Types
Copyright : (c) Denis Shevchenko, 2016
License : MIT
Maintainer :
Stabilit... |
e635c7994a35322e840c9b5929580241c30ac3486fa37f0e83e4bcf1b0737276 | travelping/eradius | eradius_client.erl | %% @doc This module contains a RADIUS client that can be used to send authentication and accounting requests.
A counter is kept for every NAS in order to determine the next request i d and sender port
%% for each outgoing request. The implementation naively assumes that you won't send requests to a
distinct n... | null | https://raw.githubusercontent.com/travelping/eradius/4bf56b94f76ee83349ce0356b82c45ea25bb9f1e/src/eradius_client.erl | erlang | @doc This module contains a RADIUS client that can be used to send authentication and accounting requests.
for each outgoing request. The implementation naively assumes that you won't send requests to a
The client uses OS-assigned ports. The maximum number of open ports can be specified through the
``client_... | A counter is kept for every NAS in order to determine the next request i d and sender port
distinct number of over the lifetime of the VM , which is why the counters are not garbage - collected .
be set too low . If ` ` N '' ports are opened , the maximum number of concurrent requests is ` ` N * 256 '' .
... |
eead653fa3cf48b937691beef6939c039b422f7edee94ec1b716f2768242085e | Minoru/hakyll-convert | OutputFormat.hs | {-# LANGUAGE OverloadedStrings #-}
module Spec.OutputFormat (tests) where
import Data.Default
import Data.Maybe (isJust)
import qualified Data.Text as T
import Hakyll.Convert.Common (DistilledPost (..))
import Hakyll.Convert.OutputFormat
import Spec.SpecHelpers
import Test.Tasty (TestTree, testGroup)
import Test.Tast... | null | https://raw.githubusercontent.com/Minoru/hakyll-convert/9e5006b996586d864c5f3c6f716f3c10aeb51bbb/test/spec/Spec/OutputFormat.hs | haskell | # LANGUAGE OverloadedStrings # |
module Spec.OutputFormat (tests) where
import Data.Default
import Data.Maybe (isJust)
import qualified Data.Text as T
import Hakyll.Convert.Common (DistilledPost (..))
import Hakyll.Convert.OutputFormat
import Spec.SpecHelpers
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit
import Test.Tasty.QuickChec... |
0fcfffd9732086ed213030f9fee4310b3934b936be2f77eeea1c8f63cb904747 | aitorres/firelink | LivenessAnalyser.hs | module FireLink.BackEnd.LivenessAnalyser (
def, use, InterferenceGraph (..), livenessAnalyser,
generateInterferenceGraph', LineLiveVariables(..), ProgramPoint(..), def1, use1
) where
import Control.Monad.State
import Data.List (intercalate)
import Data.Maybe (... | null | https://raw.githubusercontent.com/aitorres/firelink/075d7aad1c053a54e39a27d8db7c3c719d243225/src/FireLink/BackEnd/LivenessAnalyser.hs | haskell | | Operations that consists of an assignment of a value to a lvalue
| TODO: Add pointer operations here when their implementation is ready
| Calculate variable definitions of a basic block, used by data-flow analysis algorithm for liveness analysis
| Mathematically, def[B] = union of def[n] for n in B.indices
| tha... | module FireLink.BackEnd.LivenessAnalyser (
def, use, InterferenceGraph (..), livenessAnalyser,
generateInterferenceGraph', LineLiveVariables(..), ProgramPoint(..), def1, use1
) where
import Control.Monad.State
import Data.List (intercalate)
import Data.Maybe (... |
bf48ca0d5b76f59a96c0b81f63917a57df438a0b9bac50c28b9f2d00ed914ab6 | JeanHuguesdeRaigniac/effects-landscape | AppPolysemy.hs | module AppPolysemy where
import qualified Data.Map as Map
import Internal.Polysemy
import Types
type Eval a =
Sem '[Error String, Reader Env, State Steps, Writer Variables, Trace, Embed IO] a
runEval :: Env -> Steps -> Eval Value -> IO (Either String Value, Steps, Variables)
runEval env steps ev =
(\(variables, ... | null | https://raw.githubusercontent.com/JeanHuguesdeRaigniac/effects-landscape/e44aea11053ac4db85b862fab027d3777d35e232/app/AppPolysemy.hs | haskell | module AppPolysemy where
import qualified Data.Map as Map
import Internal.Polysemy
import Types
type Eval a =
Sem '[Error String, Reader Env, State Steps, Writer Variables, Trace, Embed IO] a
runEval :: Env -> Steps -> Eval Value -> IO (Either String Value, Steps, Variables)
runEval env steps ev =
(\(variables, ... | |
5357d9b3a06e1a25a4bf64477fb761c071dbb243e1f3233d75643cc6d9cc543e | DSiSc/why3 | eliminate_definition.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/transform/eliminate_definition.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
open Ident
open Ty
open Term
open Decl
let add_id undef_ls rem_ls (ls,ld) (abst,defn) =
if Sls.mem ls ... |
d656f267cdd59e067fe8401fec85bcc01d95bed25edfb4abf643024cd2b69946 | mauricioszabo/check | core_test.cljc | (ns check.core-test
(:require [clojure.string :as str]
[clojure.test :refer [deftest testing run-tests] :as t]
[check.core :refer [check] :as check :include-macros true]))
(deftest check-wraps-matcher-combinators
(testing "simple checks"
(check {:foo 12} => {:foo 12}))
(testing "rege... | null | https://raw.githubusercontent.com/mauricioszabo/check/fc4a3a619a8ce63d152f940de12bc96b83a4adfd/test/check/core_test.cljc | clojure | CUSTOM MATCHERS | (ns check.core-test
(:require [clojure.string :as str]
[clojure.test :refer [deftest testing run-tests] :as t]
[check.core :refer [check] :as check :include-macros true]))
(deftest check-wraps-matcher-combinators
(testing "simple checks"
(check {:foo 12} => {:foo 12}))
(testing "rege... |
7726f3a351c7bffc1d37671f1f3e629038f6c1eb6d5257cf21fda1b70878a879 | geneweb/geneweb | gwdLog.ml | let verbosity = ref 7
let debug = ref false
let oc : out_channel option ref = ref None
let log fn =
match !oc with
| Some oc -> fn oc
| None -> ()
type level =
[ `LOG_ALERT
| `LOG_CRIT
| `LOG_DEBUG
| `LOG_EMERG
| `LOG_ERR
| `LOG_INFO
| `LOG_NOTICE
| `LOG_WARNING
]
#ifdef SYSLOG
let syslog (l... | null | https://raw.githubusercontent.com/geneweb/geneweb/a108e39dc5157ef13483d7b3812d5aac2858a1f0/bin/gwd/gwdLog.ml | ocaml | let verbosity = ref 7
let debug = ref false
let oc : out_channel option ref = ref None
let log fn =
match !oc with
| Some oc -> fn oc
| None -> ()
type level =
[ `LOG_ALERT
| `LOG_CRIT
| `LOG_DEBUG
| `LOG_EMERG
| `LOG_ERR
| `LOG_INFO
| `LOG_NOTICE
| `LOG_WARNING
]
#ifdef SYSLOG
let syslog (l... | |
24c6a590af5ef762eba65d9c156cdcbfc03550095799f029de269f379a1eb98d | emqx/hocon | demo_schema5.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2022 EMQ Technologies Co. , Ltd. 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 o... | null | https://raw.githubusercontent.com/emqx/hocon/10fefe7e0ddf3f01d45d2d631562afe614ca357f/sample-schemas/demo_schema5.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2022 EMQ Technologies Co. , Ltd. 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(demo_schema5).
-include_lib("typerefl/include/types.hrl").
-behaviour(hocon_schema).
-e... |
5b794e15f593a01e0e3a4fd0b7776565ef174bd803e0b32a589619162fa0c48b | ros/roslisp | float-bytes.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Software License Agreement (BSD License)
;;
Copyright ( c ) 2008 , Willow Garage , Inc.
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with
;; or without modification, are permitted provided that the
;; following cond... | null | https://raw.githubusercontent.com/ros/roslisp/559355a8d695e34e6dedae071a9af2c065411687/utils/float-bytes.lisp | lisp |
Software License Agreement (BSD License)
All rights reserved.
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... | Copyright ( c ) 2008 , Willow Garage , Inc.
* Neither the name of Willow Garage , Inc. nor the names
CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
COPYRIGHT OWNER OR ANY DIRECT ,
INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN
(in-package roslisp-utils... |
e2c79de89fe350979ad7f0c9ea62eff231fb7311e100ab9f201571375495f8e7 | jaked/ocamljs | printf.ml |
* This file is part of ocamljs , OCaml to Javascript compiler
* Copyright ( C ) 2007 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Softwar... | null | https://raw.githubusercontent.com/jaked/ocamljs/378080ff1c8033bb15ed2bd29bf1443e301d7af8/src/stdlib/patches/3.11.2/printf.ml | ocaml | *********************************************************************
Objective Caml
... |
* This file is part of ocamljs , OCaml to Javascript compiler
* Copyright ( C ) 2007 - 9 Skydeck , Inc
* Copyright ( C ) 2010
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Softwar... |
ea06eaa969b85da6c5a43aba0207efb6845542bcd732c7cd5c8431b3f0994ae4 | camlspotter/ocamloscope.2 | ocamldoc.ml | open Spotlib.Spot
open List
let get_doc (atrs : Typedtree.attributes) : (string * Location.t) list =
let open Location in
let open Parsetree in
let a = function
| {txt="ocaml.doc"}, payload ->
begin match payload with
| PStr [{ pstr_loc= loc
; pstr_desc= Pstr_eval ({pexp_desc=... | null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/ocamldoc.ml | ocaml | (**/*
Remove start and end spaces
split into sentences | open Spotlib.Spot
open List
let get_doc (atrs : Typedtree.attributes) : (string * Location.t) list =
let open Location in
let open Parsetree in
let a = function
| {txt="ocaml.doc"}, payload ->
begin match payload with
| PStr [{ pstr_loc= loc
; pstr_desc= Pstr_eval ({pexp_desc=... |
b2795d161bde245817525a3174e2c88123017a3d4c44bdba60baca42a70c26e7 | Piervit/gufo | gufoModList.ml |
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
is distributed in the hop... | null | https://raw.githubusercontent.com/Piervit/gufo/cb9b4f88d6e887ccfe50ea3bc7214486f2df3078/src/gufoModList.ml | ocaml | the system module for List. |
This file is part of .
is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
( at your option ) any later version .
is distributed in the hop... |
9db425db53e2a2ce592991e9783d36c2d8e2a16a6c9527ef5890d362f41fb297 | bitnomial/prometheus | Scrape.hs | {-# LANGUAGE OverloadedStrings #-}
module System.Metrics.Prometheus.Http.Scrape (
Path,
serveMetrics,
serveMetricsT,
prometheusApp,
) where
import Control.Applicative ((<$>))
import Control.Monad.IO.Class (
MonadIO,
liftIO,
)
import Data.Text (Text)
import Network.HTTP.Types (
hContentTyp... | null | https://raw.githubusercontent.com/bitnomial/prometheus/b7d3160e2a4d971fe03bef6b43fe8bf15a9c9349/src/System/Metrics/Prometheus/Http/Scrape.hs | haskell | # LANGUAGE OverloadedStrings #
| The HTTP web route on which to serve data
For example:
|
module System.Metrics.Prometheus.Http.Scrape (
Path,
serveMetrics,
serveMetricsT,
prometheusApp,
) where
import Control.Applicative ((<$>))
import Control.Monad.IO.Class (
MonadIO,
liftIO,
)
import Data.Text (Text)
import Network.HTTP.Types (
hContentType,
methodGet,
status200,
... |
1c3e578bf73cd1a46afc6b90f4525a13f693448a919fc9b4679fe665f0bcad1d | luminus-framework/luminus-template | formats.clj | (ns <<project-ns>>.middleware.formats
(:require
[luminus-transit.time :as time]
[muuntaja.core :as m]))
(def instance
(m/create
(-> m/default-options
(update-in
[:formats "application/transit+json" :decoder-opts]
(partial merge time/time-deserialization-handlers))
(u... | null | https://raw.githubusercontent.com/luminus-framework/luminus-template/3278aa727cef0a173ed3ca722dfd6afa6b4bbc8f/resources/leiningen/new/luminus/core/src/formats.clj | clojure | (ns <<project-ns>>.middleware.formats
(:require
[luminus-transit.time :as time]
[muuntaja.core :as m]))
(def instance
(m/create
(-> m/default-options
(update-in
[:formats "application/transit+json" :decoder-opts]
(partial merge time/time-deserialization-handlers))
(u... | |
b1c547a929595ce0ac16fa2a7132db63cbadff862127ef169ad4c8e44b190dd3 | pilosus/pip-license-checker | data.clj | Copyright © 2020 - 2023
;;
;; This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which is available at
;; -2.0.
;;
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set fort... | null | https://raw.githubusercontent.com/pilosus/pip-license-checker/dada0db8c57df06ed8919fcbb0c9633c1cba492c/src/pip_license_checker/data.clj | clojure |
This program and the accompanying materials are made available under the
-2.0.
Public License, v. 2.0 are satisfied: GNU General Public License as published by
Log representation
string
nilable String
nilable String
nilable vector of Log
nilable String
nilable String
nil for non - Python
keyword
Requir... | Copyright © 2020 - 2023
terms of the Eclipse Public License 2.0 which is available at
This Source Code may also be made available under the following Secondary
Licenses when the conditions for such availability set forth in the Eclipse
the Free Software Foundation , either version 2 of the License , or ( at... |
8fa9a82607c7ea8e9339e43ebc55c09cd8975ddd8a6c16e26db8df14bb875fd6 | capnproto/capnp-ocaml | methods.ml | [@@@ocaml.warning "-3"]
module CamlBytes = Bytes
module List = Base.List
module Queue = Base.Queue
module Bytes = Base.Bytes
module Int64 = Base.Int64
module IO = Capnp_unix.IO
module Codecs = Capnp.Codecs
let message_of_builder = Capnp.BytesMessage.StructStorage.message_of_builder
(* This is a wrapper for writing t... | null | https://raw.githubusercontent.com/capnproto/capnp-ocaml/dda3d811aa7734110d7af051465011f1f823ffb9/src/benchmark/methods.ml | ocaml | This is a wrapper for writing to a file descriptor and simultaneously
counting the number of bytes written.
(never timeout)
[sync_client] issues a randomized request and waits for the response,
looping up to the specified number of iterations.
[async_client] issues randomized requests in a pipelined mann... | [@@@ocaml.warning "-3"]
module CamlBytes = Bytes
module List = Base.List
module Queue = Base.Queue
module Bytes = Base.Bytes
module Int64 = Base.Int64
module IO = Capnp_unix.IO
module Codecs = Capnp.Codecs
let message_of_builder = Capnp.BytesMessage.StructStorage.message_of_builder
module CountingOutputStream = stru... |
fd07195993a5c8a12625ada0c7a3f15200f71f454e28b3b50f36655c7901dcd0 | floybix/cppnx | svg.cljs | (ns org.nfrac.cppnx.svg
(:require [org.nfrac.cppnx.core :as cppnx]
[goog.dom :as dom]
[reagent.core :as reagent :refer [atom]]
[clojure.string :as str]
[clojure.core.async :as async :refer [<! put!]]))
(defn indexed [xs] (map-indexed vector xs))
(def dragging (atom ni... | null | https://raw.githubusercontent.com/floybix/cppnx/4acde1c249f3a978d6eab1226aeaa5d7c54ddfc2/src/org/nfrac/cppnx/svg.cljs | clojure | prevent scrolling when dragging
edges
drag-in-progress arrow
nodes | (ns org.nfrac.cppnx.svg
(:require [org.nfrac.cppnx.core :as cppnx]
[goog.dom :as dom]
[reagent.core :as reagent :refer [atom]]
[clojure.string :as str]
[clojure.core.async :as async :refer [<! put!]]))
(defn indexed [xs] (map-indexed vector xs))
(def dragging (atom ni... |
05fab4546d39044c9033e26cd094eb505d50e5149cb1f437a4e76202dd410037 | hiratara/Haskell-Nyumon-Sample | ParserTest.hs | {-# LANGUAGE OverloadedStrings #-}
module ParserTest where
import Data.Hjq.Parser
import Test.HUnit
parserTest :: Test
parserTest = TestList
[ jqFilterParserTest
, jqFilterParserSpacesTest
, jqQueryParserTest
, jqQueryParserSpacesTest
]
jqFilterParserTest :: Test
jqFilterParserTest = TestList
[ "jqFilterP... | null | https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap09-samples/test/ParserTest.hs | haskell | # LANGUAGE OverloadedStrings # | module ParserTest where
import Data.Hjq.Parser
import Test.HUnit
parserTest :: Test
parserTest = TestList
[ jqFilterParserTest
, jqFilterParserSpacesTest
, jqQueryParserTest
, jqQueryParserSpacesTest
]
jqFilterParserTest :: Test
jqFilterParserTest = TestList
[ "jqFilterParser test 1" ~:
parseJqFilte... |
44c1635776868d821aec6d0d98c255d1aeff744b61c79632ce2f5301238490a7 | yallop/ocaml-ctypes | functions.ml |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
Foreign function bindings f... | null | https://raw.githubusercontent.com/yallop/ocaml-ctypes/52ff621f47dbc1ee5a90c30af0ae0474549946b4/tests/test-oo_style/stubs/functions.ml | ocaml | We'll build part of the hierarchy in C and part in OCaml.
animal
^ ^
| |
chorse camel
* Create the base class and its method table *
class layout (vtable pointer, no instance variables)
constructor
* Create a sub class and its method table *
constructor |
* Copyright ( c ) 2014 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2014 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
Foreign function bindings f... |
867bbbed1a1ff601127cbaa0a7b6548b11c67ecc0083b4ff057ad17a43b9bce6 | mstewartgallus/hs-callbypushvalue | Cps.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE TypeOperators #
module Cps (Cps, HasThunk (..), HasReturn (..), HasFn (..), HasCall (..), HasLabel (..)) where
import Common
import Global
import HasCode
import HasConstants
import HasData
import HasLet
import HasStack
import HasTerminal
import HasTuple
-- |
--
I do n't ... | null | https://raw.githubusercontent.com/mstewartgallus/hs-callbypushvalue/d8770b7e9e444e1261901f5ee435fcefb0f7ad75/src/Cps.hs | haskell | # LANGUAGE ConstraintKinds #
|
| Decomposition of thunks into cps style | # LANGUAGE TypeOperators #
module Cps (Cps, HasThunk (..), HasReturn (..), HasFn (..), HasCall (..), HasLabel (..)) where
import Common
import Global
import HasCode
import HasConstants
import HasData
import HasLet
import HasStack
import HasTerminal
import HasTuple
I do n't understand this but apparently the CPS tr... |
65fce0ff9835be8e58e72f31f183a9a6a8e49cdbc005965e70ef70897d420d81 | hammerlab/biokepi | gatk.ml | open Biokepi_run_environment
open Common
module Remove = Workflow_utilities.Remove
module Configuration = struct
module Gatk_config () = struct
type t = {
(** The name of the configuration, specific to Biokepi. *)
name: string;
* options .
This filter is applied automatically by all ... | null | https://raw.githubusercontent.com/hammerlab/biokepi/d64eb2c891b41bda3444445cd2adf4e3251725d4/src/bfx_tools/gatk.ml | ocaml | * The name of the configuration, specific to Biokepi.
* Ignore reads with mismatching numbers of bases and base qualities,
instead of failing with an error.
* Ignore reads with no stored bases (i.e. '*' where the sequence should
be), instead of failing with an error
not rendered; needs to be expli... | open Biokepi_run_environment
open Common
module Remove = Workflow_utilities.Remove
module Configuration = struct
module Gatk_config () = struct
type t = {
name: string;
* options .
This filter is applied automatically by all GATK tools in order to protect them
from crashing on r... |
ab742a2f09700bf8e033a2e9e1634c224a5007083d45749c1a66bac5d5e50e1a | graninas/Functional-Design-and-Architecture | Device.hs | module Andromeda.Hardware.Device
(
) where
| null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/Second-Edition-Manning-Publications/BookSamples/CH03/Section3p2/Andromeda/Hardware/Device.hs | haskell | module Andromeda.Hardware.Device
(
) where
| |
ef496c6d9bbdb92a0b5d38fd90ff67691709e7e340de182ba5adcc44126c949a | auser/hermes | nag.erl | %%%-------------------------------------------------------------------
%%% File : nag.erl
Author :
%%% Description :
%%%
Created : Mon Aug 10 00:19:48 PDT 2009
%%%-------------------------------------------------------------------
-module (nag).
-include ("hermes.hrl").
-behaviour(gen_server).
%% API
-e... | null | https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/src/nag/nag.erl | erlang | -------------------------------------------------------------------
File : nag.erl
Description :
-------------------------------------------------------------------
API
gen_server callbacks
delay between lags
====================================================================
API
===========================... | Author :
Created : Mon Aug 10 00:19:48 PDT 2009
-module (nag).
-include ("hermes.hrl").
-behaviour(gen_server).
-export([start_link/0]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-record(state, {
}).
-define(SERVER, ?MODULE).
Function ... |
5beb07535f0e3fdc67cf54d35c8af8d499d58f688f61084e0289986cc7669c70 | evansb/cis194-hw | StackVM.hs | module StackVM (StackVal(..), StackExp(..), Stack, Program, stackVM) where
-- Values that may appear in the stack. Such a value will also be
-- returned by the stackVM program execution function.
data StackVal = IVal Integer | BVal Bool | Void deriving Show
-- The various expressions our VM understands.
data StackExp... | null | https://raw.githubusercontent.com/evansb/cis194-hw/7ee2bc5e45a6c61d021b43e19ded66a0899f9c33/spring_2013/hw5/StackVM.hs | haskell | Values that may appear in the stack. Such a value will also be
returned by the stackVM program execution function.
The various expressions our VM understands.
Execute the given program. Returns either an error message or the
value on top of the stack after execution.
Execute a program against a given stack. | module StackVM (StackVal(..), StackExp(..), Stack, Program, stackVM) where
data StackVal = IVal Integer | BVal Bool | Void deriving Show
data StackExp = PushI Integer
| PushB Bool
| Add
| Mul
| And
| Or
deriving Show
type Stack =... |
3aa51a1e3c2e5f3d9959afa93f6de29b2d8318da5914733c25b36c5404ff6de9 | liqd/aula | Prelude.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAG... | null | https://raw.githubusercontent.com/liqd/aula/f96dbf85cd80d0b445e7d198c9b2866bed9c4e3d/src/Types/Prelude.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE OverloadedStrings #
# LANGUAGE Rank2Types #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators ... | # LANGUAGE DeriveGeneric #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
module Types.Prelude
where
import Control.Lens hiding ((<.>))
import Control.Monad.Trans.Except (ExceptT, runExceptT)
import Data.Char
import Data.Data (Data)
import Data.Function (on)
import... |
c87a4a1eeae34595959e84ab5e93a8079f3f8b245e414a5e46d79c8a35fca44a | hyperfiddle/electric | nav_scratch.clj | (ns dustin.y2022.nav-scratch
(:require [hyperfiddle.rcf :as rcf :refer [tests tap % with]]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[missionary.core :as m]
[clojure.datafy :refer [datafy]]
clojure.core.protocols
clojure.repl))
... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2022/nav_scratch.clj | clojure | datafy
nav just adds metadata | (ns dustin.y2022.nav-scratch
(:require [hyperfiddle.rcf :as rcf :refer [tests tap % with]]
[hyperfiddle.photon :as p]
[hyperfiddle.photon-dom :as dom]
[missionary.core :as m]
[clojure.datafy :refer [datafy]]
clojure.core.protocols
clojure.repl))
... |
b2e78d848291a51daa0329e19aa4e16af53bff5c6fbcef167f5142b6738f332c | alexstoick/pandoc-docx-pagebreak | pandoc-docx-pagebreak.hs | module Main where
import Text.Pandoc.JSON
pagegBreakLandscapeXml :: String
pagegBreakLandscapeXml = "<w:p><w:pPr><w:sectPr> <w:pgSz w:w=\"15840\" w:h=\"12240\" w:orient=\"landscape\" /></w:sectPr></w:pPr></w:p>"
pageBreakXml :: String
pageBreakXml = "<w:p><w:pPr><w:sectPr> <w:pgSz w:w=\"12240\" w:h=\"15840\"/> </w:s... | null | https://raw.githubusercontent.com/alexstoick/pandoc-docx-pagebreak/0387562ccc48571a2ef765a6859870546ad30f77/pandoc-docx-pagebreak.hs | haskell | module Main where
import Text.Pandoc.JSON
pagegBreakLandscapeXml :: String
pagegBreakLandscapeXml = "<w:p><w:pPr><w:sectPr> <w:pgSz w:w=\"15840\" w:h=\"12240\" w:orient=\"landscape\" /></w:sectPr></w:pPr></w:p>"
pageBreakXml :: String
pageBreakXml = "<w:p><w:pPr><w:sectPr> <w:pgSz w:w=\"12240\" w:h=\"15840\"/> </w:s... | |
a1d57d8035ada94bef05e2bf3972a436ec3ab4db5f120d68c612e100d20764b5 | jpmonettas/clograms | subs.cljs | (ns clograms.subs
(:require [re-frame.core :as re-frame]
[datascript.core :as d]
[clograms.db :refer [project-browser-level-idx->key] :as db]
[clograms.db.components :as components-db]
[clograms.re-grams.re-grams :as rg]
[clograms.utils :as utils]
... | null | https://raw.githubusercontent.com/jpmonettas/clograms/8586948b5e7439171f1d63030b7a34127c8a63f6/src/cljs/clograms/subs.cljs | clojure |
Right sidebar ;;
Re-frame features subscriptions
we should add only if it points to some other var | (ns clograms.subs
(:require [re-frame.core :as re-frame]
[datascript.core :as d]
[clograms.db :refer [project-browser-level-idx->key] :as db]
[clograms.db.components :as components-db]
[clograms.re-grams.re-grams :as rg]
[clograms.utils :as utils]
... |
52136fda18eb9d358037c513b74b1b0d2c5995ca5cf8f9bd4db2e0c604405d10 | goncalotomas/FMKe | fmke_gen_driver.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2014 SyncFree Consortium . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain... | null | https://raw.githubusercontent.com/goncalotomas/FMKe/654d3211ef57d841540e58033a397ce0f3dee0f7/src/fmke_gen_driver.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2014 SyncFree Consortium . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(fmke... |
dddf848b969ea55eb62ca335ba6e0945c936ee3ee0fd1e30db95de95de99672b | TheClimateCorporation/lemur | generic-jobdef.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Generic Launcher
;;;
For launching a simple job ( one step ) , where the details are specified
;;; on the command line.
;;;
;;; Example of common usage:
lemur dry - run generic-jobdef.clj --app " prod-348 " --num - instances 3 \
;;; --main-class weatherbill.... | null | https://raw.githubusercontent.com/TheClimateCorporation/lemur/00eb21b6f534ceefe354ab89042826188d156991/examples/generic-jobdef.clj | clojure |
on the command line.
Example of common usage:
--main-class weatherbill.hadoop.query.prod-348 --slave-instance-type m2.xlarge \
--bucket 'com.weatherbill.${env}.banzai'
| Generic Launcher
For launching a simple job ( one step ) , where the details are specified
lemur dry - run generic-jobdef.clj --app " prod-348 " --num - instances 3 \
(catch-args
:main-class "A fully qualified classname."
:app "A representative name the app-- no spaces, as it is used in paths"
:bucket "An ... |
03d0aceb9a1f5ba9b7552532a94a96491836adb222b64aee169ad4f0bbd87e36 | zilch-lang/nstar | Types.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE ViewPatterns #
module Data.Elf.Types
( -- * ELF types
Elf_Half, Elf_Word, Elf_Sword, Elf_Xword, Elf_Sxword, Elf_Addr(..), Elf_Off(..), Elf_UChar, Elf_Secti... | null | https://raw.githubusercontent.com/zilch-lang/nstar/8a9d1d5aa19fe6493c556ae3606c758829683762/lib/elfgen/src/Data/Elf/Types.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
* ELF types
* Internal export
NOTE: we don't use those at all, and it makes no sense.
NOTE: we don't use those at all, and it makes no sense.
NOTE: we don't use those at all, and it makes no sense.
NOTE: we don't use those at all, and it makes no sense. | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE ViewPatterns #
module Data.Elf.Types
Elf_Half, Elf_Word, Elf_Sword, Elf_Xword, Elf_Sxword, Elf_Addr(..), Elf_Off(..), Elf_UChar, Elf_Section, Elf_Rel_Info(..), Elf_Rel_Addend(..)
, ReifySize
) where
import Data... |
8e31410eeefc8c227ae3210df494298ccb4be30971192308be51e0ef6d8556f9 | janestreet/base | test_option_array_allocation.ml | open! Base
open Option_array
open Expect_test_helpers_core
let () =
let t = of_array [| None |] in
assert (
require_no_allocation [%here] (fun () ->
match get t 0 with
| None -> true
| Some _ -> false))
;;
let () =
let t = of_array [| Some 0 |] in
let get_some () =
match get t 0 with... | null | https://raw.githubusercontent.com/janestreet/base/4d2f3f7ed9b8f20cef9d3ad582d986b7c78e0358/test/allocation/bin/test_option_array_allocation.ml | ocaml | [Version_util.x_library_inlining] is the whole reason this is a separate
executable. | open! Base
open Option_array
open Expect_test_helpers_core
let () =
let t = of_array [| None |] in
assert (
require_no_allocation [%here] (fun () ->
match get t 0 with
| None -> true
| Some _ -> false))
;;
let () =
let t = of_array [| Some 0 |] in
let get_some () =
match get t 0 with... |
956f7d104f7057437b3f78b863ad1dd6509cba7ea2038f3ba8b4cec6f366484a | reasonml-old/BetterErrors | prettyPrint_2.ml | type bread =
| Coconut of string
let morning = Coconut
| null | https://raw.githubusercontent.com/reasonml-old/BetterErrors/d439b92bfe377689c38fded5d8aa2b151133f25d/tests/prettyPrint/prettyPrint_2.ml | ocaml | type bread =
| Coconut of string
let morning = Coconut
| |
41af4e90b9791e3f0aa0abb350b51a87445366495dded19d2665f014875d7ead | alexandergunnarson/quantum | trig.cljc | (ns quantum.core.numeric.trig
(:refer-clojure :exclude
[+ * /])
(:require
[quantum.core.error :as err
:refer [TODO] ]
[quantum.core.macros
:refer [#?@(:clj [defnt defnt'])]
:refer-... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/numeric/trig.cljc | clojure | ===== SINE ===== ;
===== COSINE ===== ;
===== TANGENT ===== ;
===== DEGREES + RADIANS ===== ; | (ns quantum.core.numeric.trig
(:refer-clojure :exclude
[+ * /])
(:require
[quantum.core.error :as err
:refer [TODO] ]
[quantum.core.macros
:refer [#?@(:clj [defnt defnt'])]
:refer-... |
c0858a3c9bb4d11a811e1e0f2e904fb5cc501dbe03493abb4f3cff3d9e030aa6 | d-cent/mooncake | mongo.clj | (ns mooncake.test.db.mongo
(:require
[midje.sweet :refer :all]
[monger.operators :as mop]
[mooncake.db.mongo :as mongo]))
(facts "about value-map->mongo-query-map"
(fact "creates query map with the same values if provided map has no nested collections"
(mongo/value-map->mongo-query-ma... | null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/test/mooncake/test/db/mongo.clj | clojure | (ns mooncake.test.db.mongo
(:require
[midje.sweet :refer :all]
[monger.operators :as mop]
[mooncake.db.mongo :as mongo]))
(facts "about value-map->mongo-query-map"
(fact "creates query map with the same values if provided map has no nested collections"
(mongo/value-map->mongo-query-ma... | |
b0142933226d62dfe963463a4246262e616dc9d5349d2af1dc2db5b5562cc98f | sjl/advent | day-16.lisp | (advent:defpackage* :advent/2019/16)
(in-package :advent/2019/16)
(defparameter *pattern* #(0 1 0 -1))
(defun compute-element (input i)
(iterate
(for x :in-vector input)
(generate p :around *pattern*)
(if-first-time (next p)) ; initialize pattern
skip first element in the expanded pattern
(when (z... | null | https://raw.githubusercontent.com/sjl/advent/3eabc384120692444e15c76b64f32d8d69c3305d/src/2019/days/day-16.lisp | lisp | initialize pattern
This is a dumb hack.
input, the result is always just the sum of the tail of the array starting
at that element.
array):
Additionally: by starting at the end of the array we don't need a temporary
array, we can just keep a running sum and not worrying about destroying the
input.
This is... | (advent:defpackage* :advent/2019/16)
(in-package :advent/2019/16)
(defparameter *pattern* #(0 1 0 -1))
(defun compute-element (input i)
(iterate
(for x :in-vector input)
(generate p :around *pattern*)
skip first element in the expanded pattern
(when (zerop c)
(next p))
(summing (* x p) :into... |
8c2f280e078457601754bab995c05926248118c3d3b204126130da57659231b0 | dpiponi/Moodler | Command.hs | |
Module : Command
Description : Interpreter for plugin DSL
Maintainer :
The plugin DSL uses an AST build with a free monad . This module provides
the interpreter .
Module : Command
Description : Interpreter for plugin DSL
Maintainer :
The plugin DSL uses an AST build with a free monad. Th... | null | https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/src/Command.hs | haskell |
XXX Work on error message display!
| Execute plugin commands from a 'String'.
| Execute plugin script from a .hs file
^ Execute script from this directory...
^ ...called by this name (leaving out the .hs)...
^ ...returning full filename of script
use proper dir API XXX
Set command doesn't check
Is this right?... | |
Module : Command
Description : Interpreter for plugin DSL
Maintainer :
The plugin DSL uses an AST build with a free monad . This module provides
the interpreter .
Module : Command
Description : Interpreter for plugin DSL
Maintainer :
The plugin DSL uses an AST build with a free monad. Th... |
6cd1e150671c6592d34d94a5adb2bc2cf1705c2e288d94b85dcf7ae562ef6cbf | gusenov/stepik-functional-programming-hs | Demo.hs |
Ðåàëèçóéòå c , âîçâðàùàþùóþ áåñêîíå÷íûé ñïèñîê ÷èñåë Ôèáîíà÷÷è .
GHCi > take 10 $ fibStream
[ 0,1,1,2,3,5,8,13,21,34 ]
Ðåàëèçóéòå c èñïîëüçîâàíèåì ôóíêöèè zipWith ôóíêöèþ fibStream, âîçâðàùàþùóþ áåñêîíå÷íûé ñïèñîê ÷èñåë Ôèáîíà÷÷è.
GHCi> take 10 $ fibStream
[0,1,1,2,3,5,8,13,21,34]
-}
module Demo where
... | null | https://raw.githubusercontent.com/gusenov/stepik-functional-programming-hs/904164012b9b842a15d5ba3af05cfe589295fa5c/FibStream/Demo.hs | haskell | #Canonical_zipWith_implementation |
Ðåàëèçóéòå c , âîçâðàùàþùóþ áåñêîíå÷íûé ñïèñîê ÷èñåë Ôèáîíà÷÷è .
GHCi > take 10 $ fibStream
[ 0,1,1,2,3,5,8,13,21,34 ]
Ðåàëèçóéòå c èñïîëüçîâàíèåì ôóíêöèè zipWith ôóíêöèþ fibStream, âîçâðàùàþùóþ áåñêîíå÷íûé ñïèñîê ÷èñåë Ôèáîíà÷÷è.
GHCi> take 10 $ fibStream
[0,1,1,2,3,5,8,13,21,34]
-}
module Demo where
... |
6bca0c5df60ab73220730be2dde15c7b42a9a88d8b8a48d5696cefcd1fd4aea0 | nilenso/goose | retry.clj | (ns ^:no-doc goose.brokers.redis.retry
(:require
[goose.brokers.redis.commands :as redis-cmds]
[goose.defaults :as d]
[goose.retry]
[goose.utils :as u]))
(defn- retry-job
[{:keys [redis-conn error-service-config]
:as _opts}
{{:keys [retry-delay-sec-fn-sym error-handler-fn-sym]} :retry-opts... | null | https://raw.githubusercontent.com/nilenso/goose/8a5f2fe1a4fa138fee5b74e00109e840b0b1fad1/src/goose/brokers/redis/retry.clj | clojure | (ns ^:no-doc goose.brokers.redis.retry
(:require
[goose.brokers.redis.commands :as redis-cmds]
[goose.defaults :as d]
[goose.retry]
[goose.utils :as u]))
(defn- retry-job
[{:keys [redis-conn error-service-config]
:as _opts}
{{:keys [retry-delay-sec-fn-sym error-handler-fn-sym]} :retry-opts... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.