_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 |
|---|---|---|---|---|---|---|---|---|
4ddcb242cdf93a81ecd49d9816a3197641db79f56b71c7dc490c01ea1fac45ad | funcool/tools | logging.cljc | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
Copyright ( c )
(ns funcool.tools.logging
#?(:cljs (:require-macros [funcool.tools.logging]))
(:require
#?(:clj [clojure.edn :as... | null | https://raw.githubusercontent.com/funcool/tools/6d84f6db142994de90746da0d3a0df7947e45f03/src/funcool/tools/logging.cljc | clojure | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c )
(ns funcool.tools.logging
#?(:cljs (:require-macros [funcool.tools.logging]))
(:require
#?(:clj [clojure.edn :as ed... | |
d66f5dae2b833117e1d1773fb33840e74b5d37d0a8010a36937cddb6d3b8f67f | haskell/lsp | Test.hs | {-# LANGUAGE TypeInType #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
import DummyServer
import Test.Hspec
import Data.Aeson
import Data.Default
i... | null | https://raw.githubusercontent.com/haskell/lsp/e11b7c09658610f6d815d04db08a64e7cf6b4467/lsp-test/test/Test.hs | haskell | # LANGUAGE TypeInType #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass #
won't receive a request - will timeout
incoming logging requests shouldn't increase the
timeout
wait just a bit longer than 5 seconds so we have time
to open the document
shouldn't timeout
longer than the origin... | # LANGUAGE DuplicateRecordFields #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DeriveGeneric #
import DummyServer
import Test.Hspec
import Data.Aeson
import Data.Default
import qualified Data.HashMap.Strict as HM
import Data.Either
import Data.Maybe
import qualified Da... |
87c3cab100e7dbb0b6bbc042e0a1bd34b8b97a678ed6abafb04efc687aa066ba | raml-org/api-modeling-framework | openapi.cljc | (ns api-modeling-framework.parser.domain.openapi
(:require [clojure.string :as string]
[api-modeling-framework.model.syntax :as syntax]
[api-modeling-framework.model.document :as document]
[api-modeling-framework.model.domain :as domain]
[api-modeling-framework.parser.d... | null | https://raw.githubusercontent.com/raml-org/api-modeling-framework/34bb3b6c3e3f91b775e27f8e389e04eb2c36beb7/src/api_modeling_framework/parser/domain/openapi.cljc | clojure | Basic inference, we should add support for all kind of schema
Open API equivalent to annotations are schema extensions
They can be used without declaration
When looking for annotations/extensions in OpenAPI we need
to generate the schema for the annotation at the same time
that the annotation itself
only nodes c... | (ns api-modeling-framework.parser.domain.openapi
(:require [clojure.string :as string]
[api-modeling-framework.model.syntax :as syntax]
[api-modeling-framework.model.document :as document]
[api-modeling-framework.model.domain :as domain]
[api-modeling-framework.parser.d... |
801e49f0031f3fad0e715209456bfd968aef92e7be3ee69005f7814d8d3588ac | kawu/dawg | Graph.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE DoAndIfThenElse #-}
-- | Internal representation of the "Data.DAWG" automaton. Names in this
-- module correspond to a graphical representation of automaton: nodes refer
-- to states and edges refer to transitions.
module Data.DAWG.Graph
( Graph (..)
, empty
, size
, nodes
,... | null | https://raw.githubusercontent.com/kawu/dawg/1bb3d139aece1610eab255949951e21cb07648ff/src/Data/DAWG/Graph.hs | haskell | # LANGUAGE DoAndIfThenElse #
| Internal representation of the "Data.DAWG" automaton. Names in this
module correspond to a graphical representation of automaton: nodes refer
to states and edges refer to transitions.
| A set of nodes. To every node a unique identifier is assigned.
Invariants:
* freeIDs \\inte... | # LANGUAGE RecordWildCards #
module Data.DAWG.Graph
( Graph (..)
, empty
, size
, nodes
, nodeBy
, insert
, delete
) where
import Control.Applicative ((<$>), (<*>))
import Data.Binary (Binary, put, get)
import qualified Data.IntSet as S
import qualified Data.IntMap as M
import Data.DAWG.HashMap (Hash)
import qualif... |
b0921387fccf3d23db4eea07b5febf600997325c27680f2af97b42ae95a39743 | mirage/mirage-net-unix | test.ml |
* Copyright ( C ) 2013 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED "... | null | https://raw.githubusercontent.com/mirage/mirage-net-unix/54f05b59f3e366cc8727bd74fd782204996731fd/test/test.ml | ocaml |
* Copyright ( C ) 2013 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED "... | |
0bc6bea45fde0609445e55b69afdf13a311d7815091052b56e55f192ea5cb750 | byorgey/diagrams-play | Cabbages.hs | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
info = [ ((2 , 5 ), "shoes" )
, ((1 , 6 ), "ships" )
, ((1.5 , 4 ), "sealing wax")
, ((1 , 4.5), "cabbages" )
, ((1.3 , 7 ), "kings" )
]
bars = map mkBar ... | null | https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/Cabbages.hs | haskell | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Prelude
import Diagrams.Backend.Cairo.CmdLine
info = [ ((2 , 5 ), "shoes" )
, ((1 , 6 ), "ships" )
, ((1.5 , 4 ), "sealing wax")
, ((1 , 4.5), "cabbages" )
, ((1.3 , 7 ), "kings" )
]
bars = map mkBar ... | |
4c3320b8f3448054681ae9bc2068e871f5754c890be4b6f3708d7eff2d332e0a | evertedsphere/sound-and-complete | Eval.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoImplicitPrelude #
module Eval where
import qualified Data.Map as Map
import Data.Map (Map)
import Overture
import Types
import Pretty
import Infer
newtype EvCtx = EvCtx { unEvCtx :: Map Var Expr }
initEvCtx :: EvCtx
initEvCtx = EvCtx Map.empt... | null | https://raw.githubusercontent.com/evertedsphere/sound-and-complete/28e9216169d9f6b6d41c3a3408fd71a68775e5d1/src/Eval.hs | haskell | # LANGUAGE OverloadedStrings #
| EpRec Var Expr
| EpCase Expr Alts | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
module Eval where
import qualified Data.Map as Map
import Data.Map (Map)
import Overture
import Types
import Pretty
import Infer
newtype EvCtx = EvCtx { unEvCtx :: Map Var Expr }
initEvCtx :: EvCtx
initEvCtx = EvCtx Map.empty
isValue :: Expr -> Bool
isValue ... |
3f8506aeeed84838a45f1911eb46d0d4663fc0a547954b4060353f85148d157d | FranklinChen/learn-you-some-erlang | pq_events_handler.erl | %% A fake event handler used for tests
-module(pq_events_handler).
-behaviour(gen_event).
-export([init/1, handle_event/2, handle_call/2, handle_info/2,
terminate/2, code_change/3]).
init(Parent) -> {ok, Parent}.
handle_event(E, Pid) ->
Pid ! E,
{ok, Pid}.
handle_call(Req, Pid) ->
Pid ! Req,
... | null | https://raw.githubusercontent.com/FranklinChen/learn-you-some-erlang/878c8bc2011a12862fe72dd7fdc6c921348c79d6/processquest/apps/processquest-1.1.0/test/pq_events_handler.erl | erlang | A fake event handler used for tests | -module(pq_events_handler).
-behaviour(gen_event).
-export([init/1, handle_event/2, handle_call/2, handle_info/2,
terminate/2, code_change/3]).
init(Parent) -> {ok, Parent}.
handle_event(E, Pid) ->
Pid ! E,
{ok, Pid}.
handle_call(Req, Pid) ->
Pid ! Req,
{ok, ok, Pid}.
handle_info(E, Pid) ->... |
01b1ca8b1e4e8e61725452002f31886ab64cddbcde70c2c718a556ccd4bae5bd | kupl/FixML | sub71.ml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (exp, var) ->
match exp with
|Const a->Const 0
|Var str -> if str = var then Const 1 else Var str
|Power(str,a) -> if str = var then Times[Con... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/submissions/sub71.ml | ocaml |
type aexp =
| Const of int
| Var of string
| Power of string * int
| Times of aexp list
| Sum of aexp list
let rec diff : aexp * string -> aexp
= fun (exp, var) ->
match exp with
|Const a->Const 0
|Var str -> if str = var then Const 1 else Var str
|Power(str,a) -> if str = var then Times[Con... | |
076449741163c7efe042e2620b4e79e4b03e6dfb179f16ce26d4c9bbe981c771 | Vetd-Inc/vetd-app | fx.cljs | (ns vetd-app.groups.fx
(:require [vetd-app.util :as util]
[re-frame.core :as rf]))
(rf/reg-event-fx
:g/accept-invite
(fn [{:keys [db]} [_ link-key]]
{:ws-send {:payload {:cmd :do-link-action
:return {:handler :g/accept-invite.return}
:link-key link-key... | null | https://raw.githubusercontent.com/Vetd-Inc/vetd-app/9b33b1443b9d84d39305a63fc58119f8e014cf11/src/cljs/app/vetd_app/groups/fx.cljs | clojure | (ns vetd-app.groups.fx
(:require [vetd-app.util :as util]
[re-frame.core :as rf]))
(rf/reg-event-fx
:g/accept-invite
(fn [{:keys [db]} [_ link-key]]
{:ws-send {:payload {:cmd :do-link-action
:return {:handler :g/accept-invite.return}
:link-key link-key... | |
7d01bddc92975687b625efbb5dd6d766b0e744f8d8ec91f81a281aa68f68fe97 | EveryTian/Haskell-Codewars | weight-for-weight.hs | -- -for-weight
module Codewars.G964.WeightSort where
import Data.Char
orderWeight :: String -> String
orderWeight str = foldl1 (\ x y -> x ++ ' ':y) $ qsort $ words str
where qsort [] = []
qsort (x:xs) = qsort [i | i <- xs, i `lessWeight` x] ++ [x] ++ qsort [i | i <- xs, not (i `lessWeight` x)]
... | null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/5kyu/weight-for-weight.hs | haskell | -for-weight |
module Codewars.G964.WeightSort where
import Data.Char
orderWeight :: String -> String
orderWeight str = foldl1 (\ x y -> x ++ ' ':y) $ qsort $ words str
where qsort [] = []
qsort (x:xs) = qsort [i | i <- xs, i `lessWeight` x] ++ [x] ++ qsort [i | i <- xs, not (i `lessWeight` x)]
weight = sum... |
011f1b66b0ec4a88b3844bf54992c1e9ac759ed29ef9c68da140e8a07024dd4c | mzp/coq-ide-for-ios | typing.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/pretyping/typing.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
This module provides the typing... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : typing.mli 13323 20... |
5e72b67d9556f1f6c6d190bc2c4be188409ce43b8fe043d099d010830e3547bf | krestenkrab/triq | triq_dom.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%%
This file is part of Triq - Trifork QuickCheck
%%
Copyright ( c ) 2010 - 2013 by
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% ... | null | https://raw.githubusercontent.com/krestenkrab/triq/c7306b8eaea133d52140cb828817efb5e50a3d52/src/triq_dom.erl | erlang | ex: ts=4 sw=4 et
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
This file is part of Triq - Trifork QuickCheck
Copyright ( c ) 2010 - 2013 by
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(triq_dom).
-include... |
0fa60415d6b844cda57f210611029d6f4571b0404a9326b47a60844380323fa9 | ocastalabs/CouchDB-Facebook-Authentication | couch_httpd_auth.erl | -module(couch_httpd_auth).
-compile(export_all).
cookie_auth_header(_Req, []) ->
<<"AuthSession=SomeTokenHere">>.
| null | https://raw.githubusercontent.com/ocastalabs/CouchDB-Facebook-Authentication/b20ce4ce17796c3d7ce07e224eb3ae16a71c5e6f/mocks/couch_httpd_auth.erl | erlang | -module(couch_httpd_auth).
-compile(export_all).
cookie_auth_header(_Req, []) ->
<<"AuthSession=SomeTokenHere">>.
| |
9370a2f49355717e773025570ab160e4a4fcd703fe0c3d57f98a26c73d1c415c | LPCIC/matita | threadSafe.mli |
* Copyright ( C ) 2003 - 2004 :
* < >
* for the HELM Team /
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* HELM is free software ; you can redistrib... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/thread/threadSafe.mli | ocaml | * execute 'action' in mutual exclusion between all other threads
* execute 'action' acting as a 'reader' i.e.: multiple readers can act
at the same time but no writer can act until no readers are acting
* execute 'action' acting as a 'writer' i.e.: when a writer is acting,
no readers or writer can act, be... |
* Copyright ( C ) 2003 - 2004 :
* < >
* for the HELM Team /
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* HELM is free software ; you can redistrib... |
6ff4eac03a51af204df9e68d3d72477d30376583e4ab4c26744df92ae4746bb9 | lesguillemets/sicp-haskell | 2.69.hs | -- see Huffman.hs
| null | https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap02/sect3/2.69.hs | haskell | see Huffman.hs | |
79c3bff7960da54929d77e140d44b90848307ce3727a360e1072552c13e0ce11 | 200ok-ch/easy | plain.cljs | (ns easy.plain
"A plain event is the most generic kind of booking.
A *plain* example:
```
- type: plain
date: 2018-12-31
source: Aufwand:6799-Durchlaufkonto-Spesen
target: Aufwand:6000-Raumaufwand
amount: 49.95
description: Spesen-Sammelbuchung Miete
```"
(:require [cljs.spec.alpha :as ... | null | https://raw.githubusercontent.com/200ok-ch/easy/398b77e6dee3a02aa9fb78f7421b8f5c45ee2f23/src/easy/plain.cljs | clojure | spec
defaults
transformers | (ns easy.plain
"A plain event is the most generic kind of booking.
A *plain* example:
```
- type: plain
date: 2018-12-31
source: Aufwand:6799-Durchlaufkonto-Spesen
target: Aufwand:6000-Raumaufwand
amount: 49.95
description: Spesen-Sammelbuchung Miete
```"
(:require [cljs.spec.alpha :as ... |
f022dd4471d949e74704d1e0239af1c7b8bb6c073e32a65784c03406a0ad4eb5 | AbstractMachinesLab/caramel | map_intf.ml | module type Key = sig
include Comparator.S
val to_dyn : t -> Dyn.t
end
module type S = sig
type key
and +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val set : 'a t -> key -> 'a -> 'a t
val add : 'a t -> key -> 'a -> ('a t, 'a) Result.t
val add_exn : 'a t ... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/map_intf.ml | ocaml | * [superpose a b] is [b] augmented with bindings of [a] that are not in [b].
* [is_subset t ~of_ ~f] is [true] iff all keys in [t] are in [of_] and [f]
is [true] for all keys that are in both. | module type Key = sig
include Comparator.S
val to_dyn : t -> Dyn.t
end
module type S = sig
type key
and +'a t
val empty : 'a t
val is_empty : 'a t -> bool
val mem : 'a t -> key -> bool
val set : 'a t -> key -> 'a -> 'a t
val add : 'a t -> key -> 'a -> ('a t, 'a) Result.t
val add_exn : 'a t ... |
9e2604f3fae2d5737a4f981a555c3f8cce709efbf954c62cdca03c984f729ce0 | soren-n/bidi-higher-rank-poly | Poly.ml | open Util
open Back
open Syntax
open Mono
open Simple
Poly
let rec _gen_poly n ctx ps vs =
let open QCheck.Gen in
let _gen_poly_var_fresh _st =
let exist = ref None in
vs := exist :: !vs;
poly_var exist
in
let _gen_poly_var =
let _vs = !vs in
let m = List.length _vs in
if m <= 0 then ... | null | https://raw.githubusercontent.com/soren-n/bidi-higher-rank-poly/c0957759657b30a52235560d1d5f40e9bd2569b3/shared/lib/Poly.ml | ocaml | open Util
open Back
open Syntax
open Mono
open Simple
Poly
let rec _gen_poly n ctx ps vs =
let open QCheck.Gen in
let _gen_poly_var_fresh _st =
let exist = ref None in
vs := exist :: !vs;
poly_var exist
in
let _gen_poly_var =
let _vs = !vs in
let m = List.length _vs in
if m <= 0 then ... | |
b1c8d35ffeef571da8505f7a6cfe40bca0df59a3b9ae6963cf97d825e412ca11 | bmeurer/ocaml-arm | includecore.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/typing/includecore.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Misc
open Asttypes
open ... |
7cb031e85a4188c6cd33c1d6ec529bd5586891697c764520ac18d09b6bc932ab | deadpendency/deadpendency | FetchRegistryRepoInfoC.hs | {-# LANGUAGE BangPatterns #-}
module DF.Effect.FetchRegistryRepoInfo.Carrier.FetchRegistryRepoInfoC
( FetchRegistryRepoInfoIOC (..),
)
where
import Common.Effect.AppEventEmit.AppEventEmit
import Common.Effect.AppEventEmit.Model.AppEventAdditional
import Common.Effect.AppEventEmit.Model.AppEventMessage
import Comm... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/dependency-fetcher/src/DF/Effect/FetchRegistryRepoInfo/Carrier/FetchRegistryRepoInfoC.hs | haskell | # LANGUAGE BangPatterns # |
module DF.Effect.FetchRegistryRepoInfo.Carrier.FetchRegistryRepoInfoC
( FetchRegistryRepoInfoIOC (..),
)
where
import Common.Effect.AppEventEmit.AppEventEmit
import Common.Effect.AppEventEmit.Model.AppEventAdditional
import Common.Effect.AppEventEmit.Model.AppEventMessage
import Common.Effect.CacheExternal.CacheE... |
f8cf57f5a8872b91530581bccd984d49c2083b9cb0d661785af7849e19e678a2 | blarney-lang/blarney | Interconnect.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE BlockArguments #
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE TypeApplications #
# LANGUAGE RebindableSyntax #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE... | null | https://raw.githubusercontent.com/blarney-lang/blarney/a63e727d18c771bce00cfa6562fe9dbc1b7694c1/Haskell/Blarney/Interconnect.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE Rank2Types #
# LANGUAGE DeriveGeneric #
# LANGUAGE DeriveAnyClass #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE OverloadedRecordDot #
Blarney imports
Stream mergers and switches
===========================
| Unbuffered sequential left... | # LANGUAGE BlockArguments #
# LANGUAGE TypeApplications #
# LANGUAGE RebindableSyntax #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
|
Module : . Interconnect
Description : Interconnect library
Copyright : ( c ) ,... |
87d6f0242b1b7a6d3cce8941e138659ebd680acd5f95eb9bb517089ac47a8082 | show-matz/CL-STL | cl-stl-array.lisp | (in-package :cl-stl)
;;--------------------------------------------------------------------
;;
;; class difinition
;;
;;--------------------------------------------------------------------
#-cl-stl-0x98
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass stl:array (randomaccess_container)
((buffer :typ... | null | https://raw.githubusercontent.com/show-matz/CL-STL/c6ffeac2815fa933121bc4c8b331d9c3516dff88/src/cl-stl-array.lisp | lisp | --------------------------------------------------------------------
class difinition
--------------------------------------------------------------------
--------------------------------------------------------------------
internal utilities
--------------------------------------------------------------------
--... | (in-package :cl-stl)
#-cl-stl-0x98
(eval-when (:compile-toplevel :load-toplevel :execute)
(defclass stl:array (randomaccess_container)
((buffer :type :simple-vector
:initform nil
:initarg :buffer
:accessor __inner-array))))
#-cl-stl-0x98
(defclass array_const_iterator (const-vector-pointer randoma... |
85bc39e27789bb9d366eb8307b746535ad313b97967d69d5fc5456b58d12ac56 | ocaml/dune | set.ml | module type S = Set_intf.S
module Make (Key : Map_intf.Key) (M : Map_intf.S with type key = Key.t) = struct
include Stdlib.MoreLabels.Set.Make (struct
type t = Key.t
let compare x y = Ordering.to_int (Key.compare x y)
end)
type 'a map = 'a M.t
let to_list = elements
let to_list_map t ~f =
(* ... | null | https://raw.githubusercontent.com/ocaml/dune/5fdaa96753ceb5eb9e00064ae38a22cc61c4d405/otherlibs/stdune/src/set.ml | ocaml | optimize if we get a right fold
We don't [fold_left] & [add] over [xs] because [of_list] has a
specialized implementation
optimize if we get a right fold | module type S = Set_intf.S
module Make (Key : Map_intf.Key) (M : Map_intf.S with type key = Key.t) = struct
include Stdlib.MoreLabels.Set.Make (struct
type t = Key.t
let compare x y = Ordering.to_int (Key.compare x y)
end)
type 'a map = 'a M.t
let to_list = elements
let to_list_map t ~f =
fol... |
ff2d9627bd6549c7ae46e0e70f5de2189c9a7646b76dba585c3a34e34224f2fa | runeksvendsen/bitcoin-payment-channel | Signature.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Bitcoin.Signature
( -- * Interfaces to fill out
SpendCondition(..)
, TransformSigData(..)
, HasSigner(..)
* Provided functions : sign , verify tx
, signTx
, signChangeTx
, verifyTx
, ChangeOut
, extDetPubKey
-- * Runners
, runSimple
, runExtDet
, runDummy
, SignM
, ... | null | https://raw.githubusercontent.com/runeksvendsen/bitcoin-payment-channel/3d2ee56c027571d1a86092c317640e5eae7adde3/src/Bitcoin/Signature.hs | haskell | * Interfaces to fill out
* Runners
* Re-exports
, module Bitcoin.Conversion
| Identifies a signer whose signature produces newSigData
| Defines which ' HS.SigHash ' flag to use when signing an input from ' oldSigData '
class HasSignFlag oldSigData where
| Defines how to transform old signature data type into a ne... | # LANGUAGE GeneralizedNewtypeDeriving #
module Bitcoin.Signature
SpendCondition(..)
, TransformSigData(..)
, HasSigner(..)
* Provided functions : sign , verify tx
, signTx
, signChangeTx
, verifyTx
, ChangeOut
, extDetPubKey
, runSimple
, runExtDet
, runDummy
, SignM
, SignSimpleM
, SignDerivM
, SignDummyM
, HasSi... |
7a1b81d0a81777ae58309dc50bed21e3493448fb1f663d741c9f7413c47d1f16 | agentultra/adventure-engine | Spec.hs | {-# LANGUAGE OverloadedStrings #-}
import Test.Hspec
import Data.Text (Text)
import Control.Monad.Except
import Control.Monad.State.Strict
import Control.Monad.Writer.Strict
import Adventure.Engine
import Adventure.Engine.Database
import Adventure.Engine.Rewards
main :: IO ()
main = hspec $ do
describe "saveGameS... | null | https://raw.githubusercontent.com/agentultra/adventure-engine/08c34d0a0ce6793f05b87d1464ae01993104c0b3/test/Spec.hs | haskell | # LANGUAGE OverloadedStrings # |
import Test.Hspec
import Data.Text (Text)
import Control.Monad.Except
import Control.Monad.State.Strict
import Control.Monad.Writer.Strict
import Adventure.Engine
import Adventure.Engine.Database
import Adventure.Engine.Rewards
main :: IO ()
main = hspec $ do
describe "saveGameState" $
context "given the defa... |
c6c48d6f2f5bdc2c7bb784106d19f4c3c68410dc575702da68234c468579f1be | facebook/duckling | Corpus.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.AmountOfMoney.TR.Corpus
( corpus
) where
import Data... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/AmountOfMoney/TR/Corpus.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.AmountOfMoney.TR.Corpus
( corpus
) where
import Data.String (fromString)
import Prelude
import Duckling.AmountOfMoney.Types
import Duckling.Testing.Types
import Duckling.Locale
import Duckling.Resolve
corpus :: Corpus
corpus = (testContext {loc... |
6c77855ac204bc978dfc7ebf1d31bec6fdae1fd312fcc8ce5a59bbd7be1e012e | 2600hz-archive/whistle | localtime_dst.erl | Copyright ( C ) 07/01/2010 Dmitry ( )
%%
%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
%%
%% This program i... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/erlang-localtime-1.0/src/localtime_dst.erl | erlang |
This program is free software; you can redistribute it and/or
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
along with this... | Copyright ( C ) 07/01/2010 Dmitry ( )
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version 2
of the License , or ( at your option ) any later version .
You should have received a copy of the GNU General Public License
Foundation , Inc. ... |
f5fae3b40db4215be307c7d89b755e11c2fc47c97792bad14a942e52409c4a68 | josefs/Gradualizer | exhaustive_user_type.erl | -module(exhaustive_user_type).
-export([simple/1,
recursive/1,
mutually_recursive/1,
generic/1,
local_opaque/1,
generic_with_local_opaque/1,
record_variants/1]).
-export_type([t/0,
recursive_t/0,
opaque_t/0,
record_sum_t/0... | null | https://raw.githubusercontent.com/josefs/Gradualizer/e226803c023bf9ceb94dfb517068208af37b9d7f/test/should_fail/exhaustive_user_type.erl | erlang | See test/known_problems/should_fail/exhaustive_map_variants.erl
-spec map_variants(map_sum_t()) -> ok.
map_variants(T) ->
case T of
#{field_one := _} -> ok
end. | -module(exhaustive_user_type).
-export([simple/1,
recursive/1,
mutually_recursive/1,
generic/1,
local_opaque/1,
generic_with_local_opaque/1,
record_variants/1]).
-export_type([t/0,
recursive_t/0,
opaque_t/0,
record_sum_t/0... |
2843be9cd9663ff4a75209a3f92e89a5b524a148ef046ba3468710418cdfd506 | finnishtransportagency/harja | yllapitokohteet.cljs | (ns harja.views.urakka.yllapitokohteet
"Ylläpitokohteet"
(:require [reagent.core :refer [atom] :as r]
[harja.ui.debug :as debug]
[harja.ui.grid :as grid]
[harja.ui.ikonit :as ikonit]
[harja.ui.kentat :as kentat]
[harja.ui.komponentti :as komp]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/106d01d605ce5fd6d16217843e9d5e91c89436c4/src/cljs/harja/views/urakka/yllapitokohteet.cljs | clojure | Ylläpitokohteiden sarakkeiden leveydet | (ns harja.views.urakka.yllapitokohteet
"Ylläpitokohteet"
(:require [reagent.core :refer [atom] :as r]
[harja.ui.debug :as debug]
[harja.ui.grid :as grid]
[harja.ui.ikonit :as ikonit]
[harja.ui.kentat :as kentat]
[harja.ui.komponentti :as komp]
... |
0bbb5114407969770d2842d2fd5a4e05ef566501cd528fe5949e1c98c2f1e67b | returntocorp/ocaml-tree-sitter-core | Punct.mli | (*
Names for graphical ascii symbols commonly used in programming language,
aka punctuations.
*)
(* Replace ascii punctuation with uppercase names so as to obtain a string
with only alphanumeric characters (including underscore '_').
*)
val to_alphanum : string -> string
| null | https://raw.githubusercontent.com/returntocorp/ocaml-tree-sitter-core/28f750bb894ea4c0a7f6b911e568ab9d731cc0b5/src/gen/lib/Punct.mli | ocaml |
Names for graphical ascii symbols commonly used in programming language,
aka punctuations.
Replace ascii punctuation with uppercase names so as to obtain a string
with only alphanumeric characters (including underscore '_').
|
val to_alphanum : string -> string
|
ff03462f384cc9df0892076983662286b47b6ef1c3899a9c493e1723075cea96 | bombaywalla/hix | specs.cljs | (ns syntereen.hix.specs
(:require [cljs.spec.alpha :as s]
[cljs.spec.gen.alpha :as gen]
)
)
(def non-empty-alphanum-string-gen
"Generator for non-empty alphanumeric strings."
(gen/such-that #(not= "" %)
(gen/string-alphanumeric)))
;; TODO: Can do better.
(def email-gen... | null | https://raw.githubusercontent.com/bombaywalla/hix/b88d3c1a4d07249cfe2f1b931bc741f8d2f9b56c/src/syntereen/hix/specs.cljs | clojure | TODO: Can do better. | (ns syntereen.hix.specs
(:require [cljs.spec.alpha :as s]
[cljs.spec.gen.alpha :as gen]
)
)
(def non-empty-alphanum-string-gen
"Generator for non-empty alphanumeric strings."
(gen/such-that #(not= "" %)
(gen/string-alphanumeric)))
(def email-gen
"Generator for email ... |
aa07635b8ffa8ff729e971264a118c8d8baea002fcc04e3dfd02534b92936c4c | amosr/folderol | HandFilterMax.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE TemplateHaskell #
# LANGUAGE PatternGuards #
module Bench.Quickhull.HandFilterMax where
import Bench.Quickhull.Skeleton
import qualified Data.Vector.Unboxed as Unbox
import qualified Data.Vector.Unboxed.Mutable as MUnbox
import Control.Monad.ST
# INLINE filterMax #
filterMax... | null | https://raw.githubusercontent.com/amosr/folderol/9b8c0cd30cfb798dadaa404cc66404765b1fc4fe/bench/Bench/Quickhull/HandFilterMax.hs | haskell | # LANGUAGE BangPatterns # | # LANGUAGE TemplateHaskell #
# LANGUAGE PatternGuards #
module Bench.Quickhull.HandFilterMax where
import Bench.Quickhull.Skeleton
import qualified Data.Vector.Unboxed as Unbox
import qualified Data.Vector.Unboxed.Mutable as MUnbox
import Control.Monad.ST
# INLINE filterMax #
filterMax :: Line -> Unbox.Vector Point... |
8da7dee37ca465d90ede101c8a3ca2c517ee1ef02b3fe67dc13129897007d516 | rcherrueau/APE | let_6.rkt | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Writing Hygienic Macros in Scheme with Syntax - case
Technical Report # 356
;;
page 11
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#lang racket
(require "print-test.rkt")
; Checks let form ... | null | https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/hygienic_macros/let_6.rkt | racket |
Checks let form not containing duplicate bound identifier using
`check-duplicate-identifier'
x raises a syntax error with message "duplicate
identifier found". | Writing Hygienic Macros in Scheme with Syntax - case
Technical Report # 356
page 11
#lang racket
(require "print-test.rkt")
(define-syntax (let_6 x)
(define (unique-ids? lst)
(not (check-duplicate-identifier (syntax->list lst))))
(define (all-ids? lst)
(define (id? an-id previous-id-res)
... |
e6460ece43d7e690c35ec5b54770ccf8ac7760978ca97dcef542d32d0f4977cb | samply/blaze | macros.clj | (ns blaze.db.impl.macros
(:import
[clojure.lang Counted IReduceInit Seqable Sequential]))
(defn inc-rf [sum _] (inc ^long sum))
(defmacro with-open-coll
"Like `clojure.core/with-open` but opens and closes the resources on every
reduce call to `coll`."
[bindings coll]
`(reify
Sequential
IRedu... | null | https://raw.githubusercontent.com/samply/blaze/6ef8eff7687513554131819d080fed9aaf531a34/modules/db/src/blaze/db/impl/macros.clj | clojure | (ns blaze.db.impl.macros
(:import
[clojure.lang Counted IReduceInit Seqable Sequential]))
(defn inc-rf [sum _] (inc ^long sum))
(defmacro with-open-coll
"Like `clojure.core/with-open` but opens and closes the resources on every
reduce call to `coll`."
[bindings coll]
`(reify
Sequential
IRedu... | |
3d18ebaadc9be16a24af5ea326a9a2b35763b6c8f366aaf6163c132772faefe9 | vrnithinkumar/ETC | rt.erl | -module(rt).
-export([defaultEnv/0,defaultClasses/0]).
-spec defaultClasses() -> [hm:predicate()].
defaultClasses() -> [
{class,"Num",hm:bt(integer,0)},
{class,"Num",hm:bt(float,0)},
{class,"Padd",hm:bt(pid,0)},
{class,"Padd",hm:bt(atom,0)},
{class,"Padd",hm:tcon("tuple",[hm:bt(atom,0),hm:bt(atom,0... | null | https://raw.githubusercontent.com/vrnithinkumar/ETC/ef65be40f071356e9590cfe50687e43ee70331b1/src/rt.erl | erlang | {{is_record,2}, hm:funt([hm:bt(port,0)],hm:bt(boolean,0),0)},
{{is_record,3}, hm:funt([hm:bt(port,0)],hm:bt(boolean,0),0)}, | -module(rt).
-export([defaultEnv/0,defaultClasses/0]).
-spec defaultClasses() -> [hm:predicate()].
defaultClasses() -> [
{class,"Num",hm:bt(integer,0)},
{class,"Num",hm:bt(float,0)},
{class,"Padd",hm:bt(pid,0)},
{class,"Padd",hm:bt(atom,0)},
{class,"Padd",hm:tcon("tuple",[hm:bt(atom,0),hm:bt(atom,0... |
dcab315554c98bbcb93312c4e85d41811c462ae95842ef64bdc32651c95016cb | haskell-foundation/foundation | ChaChaDRG.hs | module Foundation.Random.ChaChaDRG
( State(..)
, keySize
) where
import Foundation.Class.Storable (peek)
import Basement.Imports
import Basement.Types.OffsetSize
import Basement.Monad
import Foundation.Random.Class
import Foundation.Random.DRG
imp... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/58568e9f5368170d272000ecf16ef64fb91d0732/foundation/Foundation/Random/ChaChaDRG.hs | haskell |
key.
return 0 on success, !0 for failure
new key
destination
current key
number of bytes to generate
new key
destination
current key
new key
destination
current key
new key
destination
current key | module Foundation.Random.ChaChaDRG
( State(..)
, keySize
) where
import Foundation.Class.Storable (peek)
import Basement.Imports
import Basement.Types.OffsetSize
import Basement.Monad
import Foundation.Random.Class
import Foundation.Random.DRG
imp... |
4075a8c9ac5cd8e689ab7dc904842fef87969abe6ee2747d1c34d3fe7bb12081 | Lupino/haskell-periodic | ClientCommand.hs | {-# LANGUAGE OverloadedStrings #-}
module Periodic.Types.ClientCommand
( ClientCommand (..)
) where
import Data.Binary
import Data.Binary.Get (getWord32be)
import Data.Binary.Put (putWord32be)
import Periodic.Types.Internal
import Periodic.Types.Job... | null | https://raw.githubusercontent.com/Lupino/haskell-periodic/c04517bb9195b39c8ddc8839d367f9adf219c6bc/periodic-common/src/Periodic/Types/ClientCommand.hs | haskell | # LANGUAGE OverloadedStrings # | module Periodic.Types.ClientCommand
( ClientCommand (..)
) where
import Data.Binary
import Data.Binary.Get (getWord32be)
import Data.Binary.Put (putWord32be)
import Periodic.Types.Internal
import Periodic.Types.Job (FuncName, Job, JobName)
dat... |
357fe8bf2e90876f977965647ee21395db2429e293811ae08b3eca4747f18041 | xvw/preface | divisible.ml | open Preface_core.Fun
module Core_via_divide_and_conquer
(Req : Preface_specs.Divisible.WITH_DIVIDE_AND_CONQUER) =
struct
include Req
let contramap f x = (divide ((fun x -> ((), x)) % f) conquer) x
end
module Core_via_contramap_and_divide_and_conquer
(Req : Preface_specs.Divisible.WITH_CONTRAMAP_AND_DIVI... | null | https://raw.githubusercontent.com/xvw/preface/fd375c2cb3ea41bdf273cdc8cff166556a576a54/lib/preface_make/divisible.ml | ocaml | open Preface_core.Fun
module Core_via_divide_and_conquer
(Req : Preface_specs.Divisible.WITH_DIVIDE_AND_CONQUER) =
struct
include Req
let contramap f x = (divide ((fun x -> ((), x)) % f) conquer) x
end
module Core_via_contramap_and_divide_and_conquer
(Req : Preface_specs.Divisible.WITH_CONTRAMAP_AND_DIVI... | |
39a3514bcec5bdc3458706561986c408676e93270cdac116b31dfdc486caed93 | cirodrig/triolet | SrcLocation.hs | # LANGUAGE CPP , DeriveDataTypeable #
-----------------------------------------------------------------------------
-- |
-- Module : Language.Python.Common.SrcLocation
Copyright : ( c ) 2009
-- License : BSD-style
Maintainer :
-- Stability : experimental
Portability : ghc
--
Source location ... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/Language/Python/Common/SrcLocation.hs | haskell | ---------------------------------------------------------------------------
|
Module : Language.Python.Common.SrcLocation
License : BSD-style
Stability : experimental
provides single-point locations and spans, and conversions between them.
--------------------------------------------------------------... | # LANGUAGE CPP , DeriveDataTypeable #
Copyright : ( c ) 2009
Maintainer :
Portability : ghc
Source location information for the Python lexer and parser . This module
module Language.Python.Common.SrcLocation (
SrcLocation (..),
SrcSpan (..),
Span (..),
spanning,
mkSrcSpan,
combineSrcSpans,
... |
4fcae258f16973d8822224e8c832b4c769a19e6413f449e83ca8464a9511fede | sbcl/sbcl | package-locks.impure.lisp | ;;;; package lock tests with side effects
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This software is in ... | null | https://raw.githubusercontent.com/sbcl/sbcl/bdfad7689352773702a701247f55f84ae15bca89/tests/package-locks.impure.lisp | lisp | package lock tests with side effects
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
packages are not locked for devs
Our little labrats a... |
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
#+(and sb-devel (not sb-devel-lock-packages))
(load "compiler-test-util.lisp")
(defpackage :test-used)
(defpackage :test-unused)
(defpackage :test-nicknamed)
(de... |
4318a8567f7dc3284b3944cd813049ee9b4bc0f78ea693b355c90025bb0cbdad | LeiWangHoward/Common-Lisp-Playground | camel-hyper.lisp | (defun camelize (string &optional capitalize)
(let ((i 0))
(when (< i (length string))
(when (eql (char string i) #\-)
(incf i)
(setf (char string i) (char-upcase (char string i))))
(incf i))
(unless (null capitalize)
(setf (char string 0) (char-upcase (char string 0)))))
(... | null | https://raw.githubusercontent.com/LeiWangHoward/Common-Lisp-Playground/4130232954f1bbf8aa003d856ccb2ab382da0534/Semantic/camel-hyper.lisp | lisp |
(string-upcase "Cool")
"COOL"
(string-downcase "COOL")
"cool"
(string-downcase "Cool")
"cool"
(string-capitalize "cool")
"Cool"
| (defun camelize (string &optional capitalize)
(let ((i 0))
(when (< i (length string))
(when (eql (char string i) #\-)
(incf i)
(setf (char string i) (char-upcase (char string i))))
(incf i))
(unless (null capitalize)
(setf (char string 0) (char-upcase (char string 0)))))
(... |
9208098b6119911bd2bf19e3baedae3bbf9ca731bcae6d41f125486d09ea5c54 | plundering/plunder-reference | ReadT.hs | # OPTIONS_GHC -Wall #
# OPTIONS_GHC -Werror #
module Rex.ReadT
( Result(..)
, ResultT(..)
, resultEither
, commit
, ReadT(..)
, Reading
, doRead
, matchLeaf, leaf, matchName, matchCord, matchPage
, matchLeafCont, matchNameCord, matchNameText
, formMatch, formMatchNoCont, formMat... | null | https://raw.githubusercontent.com/plundering/plunder-reference/4cac3717ed5baf7b0b5fd41837a504f6fd33eab2/lib/Rex/ReadT.hs | haskell | Result ----------------------------------------------------------------------
Reading ---------------------------------------------------------------------
instance Monoid (ReadT z m a) where
-----------------------------------------------------------
Expressions Without Heir ---------------------------------------... | # OPTIONS_GHC -Wall #
# OPTIONS_GHC -Werror #
module Rex.ReadT
( Result(..)
, ResultT(..)
, resultEither
, commit
, ReadT(..)
, Reading
, doRead
, matchLeaf, leaf, matchName, matchCord, matchPage
, matchLeafCont, matchNameCord, matchNameText
, formMatch, formMatchNoCont, formMat... |
bea11e1816f8675140dadca2f46d195571c26ef3a182cfddbc21e8391633683d | phillord/tawny-owl | arabic.clj | (ns
^{:doc "Arabic translation of Tawny OWL. Currently in process"
:author "Aisha Blfgeh"}
tawny.arabic
(:require
[tawny.owl :as o]
[tawny.polyglot :as p]))
(def قائمة-المصطلحات-المعربة
{
:ontology :أنتولوجيا
;; ontology handler معالجات الأنتولوجيا
:noname :بدون-اسم
:iri-gen :آي-آر... | null | https://raw.githubusercontent.com/phillord/tawny-owl/331e14b838a42adebbd325f80f60830fa0915d76/src/tawny/arabic.clj | clojure | ontology handler معالجات الأنتولوجيا
same as :super
class الصنف
individual المثال | (ns
^{:doc "Arabic translation of Tawny OWL. Currently in process"
:author "Aisha Blfgeh"}
tawny.arabic
(:require
[tawny.owl :as o]
[tawny.polyglot :as p]))
(def قائمة-المصطلحات-المعربة
{
:ontology :أنتولوجيا
:noname :بدون-اسم
:iri-gen :آي-آر-آي
:prefix :بادئة
:seealso :انظر-أيض... |
d6b00b750a8ef83f5fa9e8a986d71d8260a204cd0896ef3198aad15ad00a109c | bmeurer/ocamljit2 | compact.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/lex/compact.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Lexgen
let code = Table... |
0043fe9bcaabcdc9c2076ed8812a1677c622da0afa6f551e551f3fe4203de4b3 | alanz/ghc-exactprint | RmDecl4.hs | module RmDecl4 where
Remove first declaration from a where clause , last should still be indented
ff y = y + zz + xx
where
zz = 1
xx = 2
EOF
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/transform/RmDecl4.hs | haskell | module RmDecl4 where
Remove first declaration from a where clause , last should still be indented
ff y = y + zz + xx
where
zz = 1
xx = 2
EOF
| |
01c23d30ac5ceb6446d9a43a4da63ed659fb624ff401c60165dbfe9a6254ee83 | vincenthz/hs-gauge | Types.hs | -- |
-- Module : Statistics.Matrix.Types
Copyright : 2014
-- License : BSD3
--
-- Basic matrix operations.
--
There is n't a widely used matrix package for yet , so
-- we implement the necessary minimum here.
module Statistics.Matrix.Types
( Vector
, MVector
, Matrix(..)
, MMatrix(..)
)... | null | https://raw.githubusercontent.com/vincenthz/hs-gauge/303a6b611804c85b9a6bc1cea5de4e6ce3429d24/statistics/Statistics/Matrix/Types.hs | haskell | |
Module : Statistics.Matrix.Types
License : BSD3
Basic matrix operations.
we implement the necessary minimum here.
# UNPACK #
^ Rows of matrix.
# UNPACK #
^ Columns of matrix.
# UNPACK #
^ In order to avoid overflows during matrix multiplication, a
large exponent is stored separately.
^ Matrix data.
#... | Copyright : 2014
There is n't a widely used matrix package for yet , so
module Statistics.Matrix.Types
( Vector
, MVector
, Matrix(..)
, MMatrix(..)
) where
import Data.Char (isSpace)
import Numeric (showFFloat)
import qualified Data.Vector.Unboxed as U
import qualified Data.Vector.Unboxed.... |
08401ace8e69fa4cf6481ac9fdbd3ed27fe74803e1a127099988cb44b5e02896 | diku-dk/futhark | Passes.hs | -- | Optimisation pipelines.
module Futhark.Passes
( standardPipeline,
sequentialPipeline,
kernelsPipeline,
sequentialCpuPipeline,
gpuPipeline,
mcPipeline,
multicorePipeline,
)
where
import Control.Category ((>>>))
import Futhark.IR.GPU (GPU)
import Futhark.IR.GPUMem (GPUMem)
import Futhark... | null | https://raw.githubusercontent.com/diku-dk/futhark/c1cb5be121b4f367cb26a828b703f82ef653f4e2/src/Futhark/Passes.hs | haskell | | Optimisation pipelines.
| A pipeline used by all current compilers. Performs inlining,
fusion, and various forms of cleanup. This pipeline will be
followed by another one that deals with parallelism and memory.
| This is the pipeline that applies the AD transformation and
subsequent interesting optimisations.... | module Futhark.Passes
( standardPipeline,
sequentialPipeline,
kernelsPipeline,
sequentialCpuPipeline,
gpuPipeline,
mcPipeline,
multicorePipeline,
)
where
import Control.Category ((>>>))
import Futhark.IR.GPU (GPU)
import Futhark.IR.GPUMem (GPUMem)
import Futhark.IR.MC (MC)
import Futhark.IR... |
690d8fce8ede6ca820511370c47bcfb13ed179ece5fd50b4314fb004af461569 | kowainik/tomland | Tuple.hs | |
Module : Toml . Codec . Combinator . Tuple
Copyright : ( c ) 2018 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
TOML - specific combinators for converting be... | null | https://raw.githubusercontent.com/kowainik/tomland/561aefdbcf177498c06e6c6fcee2b3fe299b3af6/src/Toml/Codec/Combinator/Tuple.hs | haskell | -----------------------------+---------------+------------------------+
-----------------------------+---------------+------------------------+
-----------------------------+---------------+------------------------+
-----------------------------+---------------+------------------------+
----------------------------... | |
Module : Toml . Codec . Combinator . Tuple
Copyright : ( c ) 2018 - 2022 Kowainik
SPDX - License - Identifier : MPL-2.0
Maintainer : < >
Stability : Stable
Portability : Portable
TOML - specific combinators for converting be... |
ac5c4e1614e52c281ebf3f62d38f5a6d34ee3d3c7ce4f2e4843c8dc1068fe568 | scalaris-team/scalaris | api_json_autoscale.erl | 2013 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distribut... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/json/api_json_autoscale.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2013 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(api_json_autoscale).
-author('').
-vsn('$Id$').
-export([handler/2]).
-include("scalaris.hrl").
-include("client_types.hrl").
@d... |
d630f90f2a388163d13dbbbb204383715f8bed878be576fe07b54efd39a5c31d | gyanaggarwal/erlang_crdt | ec_storage_data_operation.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright ( c ) 2016 . 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
%% a copy of the License at
%%... | null | https://raw.githubusercontent.com/gyanaggarwal/erlang_crdt/e3f025027a177dfde08214dd2e57e10da52f340a/src/ec_storage_data_operation.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 permissions and limitations
under the License.
| Copyright ( c ) 2016 . 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(ec_storage_data_opera... |
2ba5c8dd12fb64c9107b4ae16bdc56f0406dad31c0c4e594d1861f98e8532e9f | alavrik/piqi | piqi_http.ml |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2015 , 2017 , 2018
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable... | null | https://raw.githubusercontent.com/alavrik/piqi/bcea4d44997966198dc295df0609591fa787b1d2/src/piqi_http.ml | ocaml |
* definitions from HTTP/1.1 standard
space
horisontal tab
NOTE, XXX: this regexp doesn't include quoted-string case, only "*TEXT"
* Parsing HTTP response
skip ws char
chop crlf at the end of the string (-2)
skip ':' character in front of the value
skip whitespace in front of the value
reading inp... |
Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014 , 2015 , 2017 , 2018
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable... |
b4bbe13eed4f7a4f910eeccc7bd1bf1aecdcef666c39bf389fa9caf92062fb31 | haskell-tools/haskell-tools | PatternAndDo.hs | # LANGUAGE RecordWildCards #
module Expr.PatternAndDo where
import Control.Monad
import Control.Monad.Identity
data A = A { x :: Int }
a = forM_ [] $ \A {..} -> do
Identity "Hello"
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/Expr/PatternAndDo.hs | haskell | # LANGUAGE RecordWildCards #
module Expr.PatternAndDo where
import Control.Monad
import Control.Monad.Identity
data A = A { x :: Int }
a = forM_ [] $ \A {..} -> do
Identity "Hello"
| |
b41a7dfbe52c08b1500f7b2388b02817a33e7ffe70859e25a620e51c90be35f5 | tomas-abrahamsson/gpb | gpb_parse.erl | Copyright ( C ) 2019
%%%
Author : < >
%%%
%%% This library is free software; you can redistribute it and/or
%%% modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
%... | null | https://raw.githubusercontent.com/tomas-abrahamsson/gpb/22910f4f8d8a78190098e5432188123936893e2f/src/gpb_parse.erl | erlang |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN... | Copyright ( C ) 2019
Author : < >
License as published by the Free Software Foundation ; either
version 2.1 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston ,
MA ... |
426be2f801e08bd7a756fddb68a717a8faf074607168c1c9deba1403a7f2f469 | monadplus/twitch-game | Parser.hs | module Twitch.Internal.Parser (
parseMessage
, Message (..)
) where
----------------------------------
import Data.ByteString.Char8 (pack)
import Data.Map (fromList)
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8)
import ... | null | https://raw.githubusercontent.com/monadplus/twitch-game/39c73aa76003e778e32e88f1b2b9add68f90799f/src/Twitch/Internal/Parser.hs | haskell | --------------------------------
My modules
--------------------------------
didn't find a better way...
kind of ugly here too
still not great
only this mode for now | module Twitch.Internal.Parser (
parseMessage
, Message (..)
) where
import Data.ByteString.Char8 (pack)
import Data.Map (fromList)
import Data.Text (Text)
import Data.Text.Encoding (decodeUtf8)
import Text.Parsec
import Te... |
747c950bc0d1989b00a1c2555681518b778ecb8f568c6858b6c889c8a7126d06 | purcell/adventofcode2016 | Day25.hs | module Main where
import AdventOfCode
import Control.Monad.State
import Data.Maybe (fromMaybe)
import Data.Map (Map)
import Data.Foldable (toList)
import Data.List (find)
import qualified Data.Map as M
import Data.Sequence (Seq)
import qualified Data.Sequence as Sq
newtype Reg =
Reg Char
deriving (Eq, Show)
data... | null | https://raw.githubusercontent.com/purcell/adventofcode2016/081f30de4ea6b939e6c3736d83836f4dd72ab9a2/src/Day25.hs | haskell | module Main where
import AdventOfCode
import Control.Monad.State
import Data.Maybe (fromMaybe)
import Data.Map (Map)
import Data.Foldable (toList)
import Data.List (find)
import qualified Data.Map as M
import Data.Sequence (Seq)
import qualified Data.Sequence as Sq
newtype Reg =
Reg Char
deriving (Eq, Show)
data... | |
31b9517cfd12a579e1906b1f3cad93004c1b9f25916a13144e0cec7a714cafa5 | orbitz/kaiju | kaiju_kv_transport.mli | open Async.Std
type t
module Callbacks : sig
module Init_args : sig
type t = { log : Zolog_std_event.t Zolog.t
; config : Konfig.t
; base_key : string list
; backend : Kaiju_kv_backend.t
}
end
type start = Init_args.t -> (unit, unit) Deferred.Resu... | null | https://raw.githubusercontent.com/orbitz/kaiju/9da6a07770cdfddde7d33b12f636df2615c36676/lib/kaiju_kv/kaiju_kv_transport.mli | ocaml | open Async.Std
type t
module Callbacks : sig
module Init_args : sig
type t = { log : Zolog_std_event.t Zolog.t
; config : Konfig.t
; base_key : string list
; backend : Kaiju_kv_backend.t
}
end
type start = Init_args.t -> (unit, unit) Deferred.Resu... | |
5c3629ec5022ac11bdce70c72b905c3529a28da24a4b294e03915fe3391e0de4 | ryanpbrewster/haskell | P132.hs | module Problems.P132
( solve
) where
import Util.Math (powerMod)
-- 132.hs
- A number consisting entirely of ones is called a repunit . We shall define
- R(k ) to be a repunit of length k.
-
- For example , R(10 ) = 1111111111 = 11×41×271×9091 , and the sum of these prime
- factors is 9414 .
-
... | null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/src/Problems/P132.hs | haskell | 132.hs | module Problems.P132
( solve
) where
import Util.Math (powerMod)
- A number consisting entirely of ones is called a repunit . We shall define
- R(k ) to be a repunit of length k.
-
- For example , R(10 ) = 1111111111 = 11×41×271×9091 , and the sum of these prime
- factors is 9414 .
-
- Find t... |
8f6b122ac1d4e18247045e765d9524ddaf5bb5179ee6804ea674b916168faa23 | thomaseding/hearthshroud | HeroPowerColumn.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
module Hearth.Client.Console.Render.HeroPowerColumn (
heroPowerColumn
) where
--------------------------------------------------------------------------------
import... | null | https://raw.githubusercontent.com/thomaseding/hearthshroud/b21e2f69f394c94a106a3b57b95aa1a76b8d4003/src/Hearth/Client/Console/Render/HeroPowerColumn.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
module Hearth.Client.Console.Render.HeroPowerColumn (
heroPowerColumn
) where
import Control.Lens
import Hearth.Client.Console.SGRString
import Hearth.Engine
import Hearth.Model.Authoring
import Hearth.Model.Runtime
import System.Con... |
52abc12db869610659a3250de4be95dd1abecd1ca87ba1208acec3bb9f110671 | CodeJugalbandi/FunctionalProgramming | 3_Mutability.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-advanced-reader.ss" "lang")((modname 3_Mutability) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-deci... | null | https://raw.githubusercontent.com/CodeJugalbandi/FunctionalProgramming/2a6bf7f26852077a3e9bc71d508f4c320cd91fc9/melodies/referentialTransparency/3_Mutability.rkt | racket | about the language level of this file in a form that our tools can easily process.
I define a structure for calculator
Selector
Predicate
Mutator | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-advanced-reader.ss" "lang")((modname 3_Mutability) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #t #t none #f ())))
(define-struct calculator (memory))
Constructor
(define C (... |
106b52464a141a3201c6144586720e62075d20b33aacd18e8053309084972f67 | psilord/option-9 | turrets.lisp | (in-package #:option-9)
#+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3)))
(defmethod turret ((ship ship) port-name)
(gethash port-name (turrets ship)))
(defmethod (setf turret) (turret-instance (ship ship) port-name)
(setf (gethash port-name (turrets ship)) turret-instance))
| null | https://raw.githubusercontent.com/psilord/option-9/44d96cbc5543ee2acbdcf45d300207ef175462bc/turrets.lisp | lisp | (in-package #:option-9)
#+option-9-debug (declaim (optimize (safety 3) (space 0) (speed 0) (debug 3)))
(defmethod turret ((ship ship) port-name)
(gethash port-name (turrets ship)))
(defmethod (setf turret) (turret-instance (ship ship) port-name)
(setf (gethash port-name (turrets ship)) turret-instance))
| |
a7241b6e0ed921cdbd048b4e7cf8d7e3cf76795b906a9a17bd15e3707d546049 | Eonblast/Scalaxis | trigger_beh.erl | 2009 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
di... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/trigger_beh.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2009 - 2011 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(trigger_beh).
-author('').
-vsn('$Id$').
-export([behaviour_info/1]).
-spec behaviour_info(atom()) -> [{at... |
2a7bb6a0f038d057dd37921d86dcb33bce8a85e33b4eb54d639d6a3db232f52f | atolab/apero-core | uuid.ml | module Uuid = struct
type t = { uuid:Uuidm.t; alias:string option }
let state = Random.State.make_self_init ()
let make () = { uuid=Uuidm.v4_gen state (); alias=None}
Note : ns_apero namespace is inspired by those specified in #appendix-C
let ns_apero = Uuidm.of_string "6ba7b842-9dad-11d1-80b4-00c04fd430c8... | null | https://raw.githubusercontent.com/atolab/apero-core/6e8b9bb8383de641396463fb4e5685b7f135755c/lib/uuid.ml | ocaml | module Uuid = struct
type t = { uuid:Uuidm.t; alias:string option }
let state = Random.State.make_self_init ()
let make () = { uuid=Uuidm.v4_gen state (); alias=None}
Note : ns_apero namespace is inspired by those specified in #appendix-C
let ns_apero = Uuidm.of_string "6ba7b842-9dad-11d1-80b4-00c04fd430c8... | |
07fd22089db85586f36c1afe6055173008119342f38d190d33989dbc928e8e9b | jordanthayer/ocaml-search | rtpg_c.ml | (*
relaxed (temporal) planning graph. Do not use action duration when
propagate right now. Estimate the number of actions (cost) needed to
achieve each fact using sum propagation
*)
open Ground
type t = {
acost : int array;
fcost : int array;
to_check : ground_atom -> ground_action list;
achievers : g... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/online/rtpg_c.ml | ocaml |
relaxed (temporal) planning graph. Do not use action duration when
propagate right now. Estimate the number of actions (cost) needed to
achieve each fact using sum propagation
unsupported (pre)conditions
**** debug functions ****
* debug: print the state that needs heuristic evaluation
**** **
********* sum... |
open Ground
type t = {
acost : int array;
fcost : int array;
to_check : ground_atom -> ground_action list;
achievers : ground_atom -> ground_action list;
usc : int array;
}
let print_state current in_progress =
Wrutils.pe " Current: (";
List.iter (fun f -> Wrutils.pe " %s " (atom_str f)) current;
... |
86e8e376f1a921d8af2e0c5f2ba444e365e05c25c6d33f090f71eaf41cd67502 | maximedenes/native-coq | mltop.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/toplevel/mltop.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Sets and initializes a toplevel (i... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* If there is a toplevel unde... |
fff9c6823c4653cd49691e5081c8d888efd33697856c6cbddbe9c201d4268a33 | qitab/cl-protobufs | wire-format.lisp | Copyright 2012 - 2020 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
(in-package #:cl-protobufs.implementation)
(eval-when (:compile-toplevel :load-toplevel :execute)
;; Warning: see comment at the top of utilities.lisp about t... | null | https://raw.githubusercontent.com/qitab/cl-protobufs/6706b9bda6269b5317172f4d312fb98819629c78/wire-format.lisp | lisp |
license that can be found in the LICENSE file or at
.
Warning: see comment at the top of utilities.lisp about these settings.
supposedly deprecated, but no such luck
supposedly deprecated
eval-when
A few of our homegrown types
A few of our homegrown types
A few of our homegrown types
FIXME: should bury the zig... | Copyright 2012 - 2020 Google LLC
Use of this source code is governed by an MIT - style
(in-package #:cl-protobufs.implementation)
(eval-when (:compile-toplevel :load-toplevel :execute)
NOLINT
(defconstant $wire-type-varint 0)
(defconstant $wire-type-64bit 1)
(defconstant $wire-type-string 2)
(defcons... |
0a89f7a109534cd771b7cab351c1540ef0dbebe76c83c583f96b0fdcc4d4ac26 | mmottl/aifad | algdt_utils.mli |
AIFAD - Automated Induction of Functions over
Author :
email :
WWW :
Copyright ( C ) 2002 Austrian Research Institute for Artificial Intelligence
Copyright ( C ) 2003-
This library is free software ; you can redistribute it and/or
modify it under the terms of t... | null | https://raw.githubusercontent.com/mmottl/aifad/b06786f5cd60992548405078a903ee3d962ea969/src/algdt_utils.mli | ocaml | * Utility functions and definitions
* [init_tp] is the initial type from which values are derived in a
(co-)domain.
* [init_prod_el] is the initial product element from which values are
derived in a (co-)domain.
* [dummy_init_tps] is a dummy value for initial types.
* [dummy_fdsum] is a dummy data value in ... |
AIFAD - Automated Induction of Functions over
Author :
email :
WWW :
Copyright ( C ) 2002 Austrian Research Institute for Artificial Intelligence
Copyright ( C ) 2003-
This library is free software ; you can redistribute it and/or
modify it under the terms of t... |
bf56fa6fd5d9b739a44183e8f2e102aa20c628ac22d42d4b5775c2e8df0bb820 | deadpendency/deadpendency | Spec.hs | # OPTIONS_GHC -F - discover -optF --module - name = Spec -fno - warn - missing - import - lists -fno - warn - missing - export - lists #
| null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/script-runner/test/Spec.hs | haskell | module - name = Spec -fno - warn - missing - import - lists -fno - warn - missing - export - lists # | |
342b2a670f3e0990269af9c33d50b461e1ac4ce8727fa5a17b7166f346a72268 | poroh/ersip | ersip_id.erl | %%
Copyright ( c ) 2018 Dmitry Poroh
%% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%%
%% ID generation functions
%%
%% Idea of these functions is to generate header-capable strings from
%% some entropy (random or not random binary).
%%
-module(ersip_id).
-export([... | null | https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/src/message/ersip_id.erl | erlang |
All rights reserved.
ID generation functions
Idea of these functions is to generate header-capable strings from
some entropy (random or not random binary).
===================================================================
Types
===================================================================
=============... | Copyright ( c ) 2018 Dmitry Poroh
Distributed under the terms of the MIT License . See the LICENSE file .
-module(ersip_id).
-export([token/1,
word/1,
alphanum/1]).
-record(char_table, {size :: pos_integer(),
tfun :: fun((Byte :: non_neg_integer()) -> char())
... |
4a27cbc87d9f9d2bc1c8c6801e4dd761459a6f9d1117848f5af2d907c1fc2146 | jgm/markdown-peg | Markdown.hs | {-# OPTIONS_GHC -fglasgow-exts #-}
Markdown.hs - Haskell implementation of markdown using PEG grammar .
( c ) 2008
Released under the GPL
(c) 2008 John MacFarlane
Released under the GPL
-}
import Text.Parsers.Frisby
import Text.Parsers.Frisby.Char
import Text.Pandoc.XML
import Data.Char (toUpper... | null | https://raw.githubusercontent.com/jgm/markdown-peg/dd79c1b3bc794e3f795f4c06224e24d5d053500d/Markdown.hs | haskell | # OPTIONS_GHC -fglasgow-exts #
| A link target: a URL and title, or a reference, or nothing.
^ (URL, title)
^ the string contains spaces before the reference: e.g. " " in "[label] [ref]"
^ this is used for shortcut references: "[label]"
| An inline (span-level) element.
^ an entity reference without the '&' and... |
Markdown.hs - Haskell implementation of markdown using PEG grammar .
( c ) 2008
Released under the GPL
(c) 2008 John MacFarlane
Released under the GPL
-}
import Text.Parsers.Frisby
import Text.Parsers.Frisby.Char
import Text.Pandoc.XML
import Data.Char (toUpper)
import Text.PrettyPrint.HughesPJ ... |
06842d5a9ec113a42a43311a30ddb44a1fbac5f5d08bbddba8eea57d24583244 | ryanpbrewster/haskell | P130Test.hs | module Problems.P130Test
( case_130_main
) where
import Problems.P130
import Test.Tasty.Discover (Assertion, (@?=))
case_130_main :: Assertion
case_130_main = solve @?= "233168"
| null | https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/project-euler/tests/Problems/P130Test.hs | haskell | module Problems.P130Test
( case_130_main
) where
import Problems.P130
import Test.Tasty.Discover (Assertion, (@?=))
case_130_main :: Assertion
case_130_main = solve @?= "233168"
| |
8d547b7705d2efbe24644d49fe5d6b46c43dd1f190ff36a0b077c686b78b2d3b | Frama-C/Frama-C-snapshot | TacCompound.mli | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/TacCompound.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
deefb4f89663b2851132154d49b7bc5b73a8688e307e1b44d02c0af0f497a8a2 | np/ling | Print.hs | # LANGUAGE LambdaCase #
# LANGUAGE FlexibleInstances #
{-# OPTIONS -fno-warn-orphans #-}
-- See Ling.Print.Class about how this module has been changed
module Ling.Print (module Ling.Print.Class) where
import qualified Ling.Abs
import qualified Ling.Norm as N
import Ling.Prelude
import Ling.Print.C... | null | https://raw.githubusercontent.com/np/ling/5a49fb5fdaef04b56e26c3ff1cd613e2800b4c23/Ling/Print.hs | haskell | # OPTIONS -fno-warn-orphans #
See Ling.Print.Class about how this module has been changed
the global scope is not displayed
prtList i = prtList i . map (view N._Sessions)
prtList i = prtList i . map reifyAct
prtList i = prtList i . map reifyDec
prtList i = prtList i . map reifyProgram
prtList i = prtList i ... | # LANGUAGE LambdaCase #
# LANGUAGE FlexibleInstances #
module Ling.Print (module Ling.Print.Class) where
import qualified Ling.Abs
import qualified Ling.Norm as N
import Ling.Prelude
import Ling.Print.Class
import Ling.Reify
import Ling.Scoped
instance Print Ling.Abs.NewName w... |
f2ad750533e12ffe77a0dc7744cf3d7e6548d7a7dcde2152470dccc393ea29bf | janestreet/rpc_parallel | product_worker.ml | open Core
open Async
module T = struct
type 'worker functions = { product : ('worker, int, int) Rpc_parallel.Function.t }
module Worker_state = struct
type init_arg = unit [@@deriving bin_io]
type t = unit
end
module Connection_state = struct
type init_arg = unit [@@deriving bin_io]
type t = ... | null | https://raw.githubusercontent.com/janestreet/rpc_parallel/28bffcaa8a9fb73c321a616e724cf88efd38870f/expect_test/product_worker.ml | ocaml | open Core
open Async
module T = struct
type 'worker functions = { product : ('worker, int, int) Rpc_parallel.Function.t }
module Worker_state = struct
type init_arg = unit [@@deriving bin_io]
type t = unit
end
module Connection_state = struct
type init_arg = unit [@@deriving bin_io]
type t = ... | |
fa712af284e96cd7e77b467253c727955c812d373a0de2ad702bdb8117e99683 | tommaisey/aeon | sample-dur.help.scm | ;; sample-dur
Duration of one sample . Equivalent to 1 / sample - rate .
Compare a sine tone derived from sample rate with a 440Hz tone .
(let ((freq (mce2 (mul (recip sample-dur) 0.01) 440)))
(audition (out 0 (mul (sin-osc ar freq 0) 0.1))))
| null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/information/sample-dur.help.scm | scheme | sample-dur |
Duration of one sample . Equivalent to 1 / sample - rate .
Compare a sine tone derived from sample rate with a 440Hz tone .
(let ((freq (mce2 (mul (recip sample-dur) 0.01) 440)))
(audition (out 0 (mul (sin-osc ar freq 0) 0.1))))
|
33cade9f1130b2eda9f85599d821e269669630d206fe3a958b00cfe2bace88a3 | fakedata-haskell/fakedata | Shakespeare.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Faker.Quote.Shakespeare where
import Data.Text
import Faker
import Faker.Internal
import Faker.Provider.Shakespeare
import Faker.TH
$(generateFakeField "shakespeare" "hamlet")
$(generateFakeField "shakespeare" "as_you_like_it")
$(generateFakeFi... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/Quote/Shakespeare.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Quote.Shakespeare where
import Data.Text
import Faker
import Faker.Internal
import Faker.Provider.Shakespeare
import Faker.TH
$(generateFakeField "shakespeare" "hamlet")
$(generateFakeField "shakespeare" "as_you_like_it")
$(generateFakeField "shakespeare" "king_richard_iii... |
69c3c86b262b96384507be65fd2f2a082dc167db92554e220826a27f8207b517 | openworkload/swm-core | wm_ctl.erl | -module(wm_ctl).
-export([grid/2, cluster/2, partition/2, node/2, user/2, queue/2, scheduler/2, image/2, overview/2, global/2,
remote/2]).
%% ============================================================================
%% API functions
%% ======================================================================... | null | https://raw.githubusercontent.com/openworkload/swm-core/478bd5e124641e8014f7c25e6e279f43783bd481/src/ctl/wm_ctl.erl | erlang | ============================================================================
API functions
============================================================================
============================================================================
Implementation functions
============================================... | -module(wm_ctl).
-export([grid/2, cluster/2, partition/2, node/2, user/2, queue/2, scheduler/2, image/2, overview/2, global/2,
remote/2]).
overview(grid, ConnArgs) ->
Format = "%10A %10I %10D %10O %10B",
wm_ctl_cli:overview({header, grid}, Format, ""),
case rpc_get(cluster, ConnArgs) of
... |
a716a9272154185d7701bbcc58d90826b7b59957e1d34a829036b34ce9b1c630 | spechub/Hets | HatParser.hs | |
Module : ./Haskell / HatParser.hs
Description : calling programatica 's parser
Copyright : ( c ) , Uni Bremen 2002 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non - portable(multiple parameter class , functi... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Haskell/HatParser.hs | haskell | |
Module : ./Haskell / HatParser.hs
Description : calling programatica 's parser
Copyright : ( c ) , Uni Bremen 2002 - 2005
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : non - portable(multiple parameter class , functi... | |
00cf2714a918c35eeb0c37e218252e2395a2fc2c7ee2e63a90f799fa55c54c20 | code-iai/ros_emacs_utils | swank-listener-hooks.lisp | ;;; swank-listener-hooks.lisp --- listener with special hooks
;;
Author : < >
;; Provides *slime-repl-eval-hooks* special variable which
;; can be used for easy interception of SLIME REPL form evaluation
;; for purposes such as integration with application event loop.
(in-package :swank)
(eval-when (:compile-... | null | https://raw.githubusercontent.com/code-iai/ros_emacs_utils/67aafa699ff0d8c6476ec577a8587bac3d498028/slime_wrapper/slime/contrib/swank-listener-hooks.lisp | lisp | swank-listener-hooks.lisp --- listener with special hooks
Provides *slime-repl-eval-hooks* special variable which
can be used for easy interception of SLIME REPL form evaluation
for purposes such as integration with application event loop. | Author : < >
(in-package :swank)
(eval-when (:compile-toplevel :load-toplevel :execute)
(swank-require :swank-repl))
(defvar *slime-repl-advance-history* nil
"In the dynamic scope of a single form typed at the repl, is set to nil to
prevent the repl from advancing the history - * ** *** etc.")
(defva... |
00be37dad9461a0a553317711475c1d3b3b6fa99f1eed80b22fe1eedbc243b12 | greghendershott/blog | post.rkt | #lang racket/base
Copyright 2019 by .
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
dis... | null | https://raw.githubusercontent.com/greghendershott/blog/f487bda88e4cccad3585623a7e772ffc34f5d73e/rkt/post.rkt | racket |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permis... | #lang racket/base
Copyright 2019 by .
distributed under the License is distributed on an " AS IS " BASIS ,
(provide (struct-out post))
(struct post
string ? - 8601 datetime format
( listof string ? )
( listof xexpr / c ) - the post summary
( listof xexpr / c ) - the post full contents
) #:prefab)
|
92719be7910cb7ac9e5471b1a7816e52f4fd339dbd29470a0dbfe0fe2dff71b5 | ocsigen/lwt_ssl | lwt_ssl.ml | OCaml promise library
*
* Copyright ( C ) 2005 - 2008
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 , with ... | null | https://raw.githubusercontent.com/ocsigen/lwt_ssl/d9ea0ab93da68f0d13ed710cc16f80983923f9ba/src/lwt_ssl.ml | ocaml | See .
** | OCaml promise library
*
* Copyright ( C ) 2005 - 2008
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 , with ... |
702f6191919288ad69f5d6b887bbb901da81d27f2f34c1dfd525ee9f495bf2eb | rmculpepper/crypto | kdf.rkt | Copyright 2014 - 2018
;;
;; This library is free software: you can redistribute it and/or modify
;; it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;; (at your option) any later version.
;;
;; This library is distrib... | null | https://raw.githubusercontent.com/rmculpepper/crypto/fec745e8af7e3f4d5eaf83407dde2817de4c2eb0/crypto-lib/private/nettle/kdf.rkt | racket |
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
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCH... | Copyright 2014 - 2018
by the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
#lang racket/base
(require racket/class
"../common/common.rkt"
"../commo... |
7d443003ac4e8ca05548f5c8f316378a8174ef3e8006d750ec8c0d260173400d | Metaxal/MrEd-Designer | code-generation.rkt | #lang racket
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
;; # ============================================================================== #
;; # code-generation.rkt ... | null | https://raw.githubusercontent.com/Metaxal/MrEd-Designer/220833b738a1d46fbe309ea124ef61b825e42e68/mred-designer/code-generation.rkt | racket | # ============================================================================== #
# code-generation.rkt #
# -Designer #
# ============================================================================== #
# ... | #lang racket
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Copyright ( C ) , 2010 #
# modify it under the terms of the GNU General Public License ... |
c07ca924602c594287c0d2af64fa37d5c576a5c595ed991ec9375db4e308cce0 | haskus/packages | MultiState.hs | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE ScopedTypeVariables #
-- | State monad with multiple states (extensible)
--
-- Similar to the multistate package, with the following di... | null | https://raw.githubusercontent.com/haskus/packages/7f013d16d984923668447a628598b7335408afd4/haskus-utils/src/lib/Haskus/Utils/MultiState.hs | haskell | | State monad with multiple states (extensible)
Similar to the multistate package, with the following differences (as of
0.7.0.0):
| Multi-state monad transformer
| Multi-state
| Run MState
| Evaluate MState
| Execute MState
| Set a value in the state
| Get a value in the state
| Try to get a value in the ... | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE ScopedTypeVariables #
* do n't pollute Data . HList . HList
* use instead of a HList , for fast indexing
module Haskus.Utils... |
0fac66719b7b78256880146b50accfbae3715807c49e3a93a599721b1c1166c3 | mirage/capnp-rpc | message_types.ml | (** This module defines the information in the messages that goes over the wire.
These messages are turned into actual byte streams elsewhere. *)
module EmbargoId = Id.Make ( )
module type TABLE_TYPES = sig
(** For the unit tests it is convenient to pass in the types of table indexes.
This allows the test... | null | https://raw.githubusercontent.com/mirage/capnp-rpc/f04fa96a583994b71731bc1288833f8304c9ce81/capnp-rpc/message_types.ml | ocaml | * This module defines the information in the messages that goes over the wire.
These messages are turned into actual byte streams elsewhere.
* For the unit tests it is convenient to pass in the types of table indexes.
This allows the tests to make both ends of a connection, with the types
matched up.
... |
module EmbargoId = Id.Make ( )
module type TABLE_TYPES = sig
module QuestionId : Id.S
module AnswerId : Id.S
module ImportId : Id.S
module ExportId : Id.S
end
module Flip (T : TABLE_TYPES) = struct
module QuestionId = T.AnswerId
module AnswerId = T.QuestionId
module ImportId = T.ExportId
module Exp... |
182bb72ff2aeb556f922b6c6ca382d3e9ee1624e2eb5b2a7ad32623281b44c59 | avsm/ocaml-yaml | yaml_bindings.ml | Copyright ( c ) 2017 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... | null | https://raw.githubusercontent.com/avsm/ocaml-yaml/3f883dee5986a7f27db5b026bab265f844789d5e/ffi/bindings/yaml_bindings.ml | ocaml | TODO bind break_t
let emitter_set_break =
foreign "yaml_emitter_set_break" C.(ptr T.Emitter.t @-> T.break_t @-> returning void)
| Copyright ( c ) 2017 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS... |
7302774efe5891d8538c8eb8fde47519d00504e40f7d7e261bbd78f67bf1a392 | conscell/hugs-android | Stable.hs | module Hugs.Stable where
data StableName a -- abstract
primitive makeStableName :: a -> IO (StableName a)
primitive deRefStableName :: StableName a -> a
primitive hashStableName :: StableName a -> Int
primitive eqStableName :: StableName a -> StableName a -> Bool
instance Eq (StableName a) where
(==) = ... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/hugsbase/Hugs/Stable.hs | haskell | abstract | module Hugs.Stable where
primitive makeStableName :: a -> IO (StableName a)
primitive deRefStableName :: StableName a -> a
primitive hashStableName :: StableName a -> Int
primitive eqStableName :: StableName a -> StableName a -> Bool
instance Eq (StableName a) where
(==) = eqStableName
|
8a42ae33107ca4ce08ecb5b6870982996cf34e67ce23916a049377a0dfbcb237 | rd--/hsc3 | spectralEntropy.help.hs | spectralEntropy ; note and numBands must be equal
let sig = soundIn 0
chn = fft' (localBufId 'α' 1 2048) sig
entropy = X.spectralEntropy 1 kr chn 2048 1
in pan2 (blip ar 100 (sqrt entropy * 10)) 0 0.1
-- spectralEntropy
let sig = soundIn 0
amp = amplitude kr sig 0.01 0.01
chn = fft' (localBufId 'α' ... | null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/spectralEntropy.help.hs | haskell | spectralEntropy | spectralEntropy ; note and numBands must be equal
let sig = soundIn 0
chn = fft' (localBufId 'α' 1 2048) sig
entropy = X.spectralEntropy 1 kr chn 2048 1
in pan2 (blip ar 100 (sqrt entropy * 10)) 0 0.1
let sig = soundIn 0
amp = amplitude kr sig 0.01 0.01
chn = fft' (localBufId 'α' 1 1024) sig
ent... |
fce85bcf4bc2c0e9c746697d511d529e83dc4b3ca23b232a8b0bf6637971937f | kappelmann/engaging-large-scale-functional-programming | Exercise04.hs | module Exercise04 where
rudolph :: String -> (Int, Int)
rudolph s = elf (0,1) s 0 0
coins RLR = 1 ( +1 - 1 + 1 )
elf :: (Int,Int) -> String -> Int -> Int -> (Int,Int)
elf best@(lenB,countB) [] len coins = if len == lenB && len /= 0 && coins == 0 then (lenB,countB+1) else best
elf best ('L':s) 0 _ = elf best s 0 0... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/04/uploads/antitaktik/Exercise04.hs | haskell | new best
another best | module Exercise04 where
rudolph :: String -> (Int, Int)
rudolph s = elf (0,1) s 0 0
coins RLR = 1 ( +1 - 1 + 1 )
elf :: (Int,Int) -> String -> Int -> Int -> (Int,Int)
elf best@(lenB,countB) [] len coins = if len == lenB && len /= 0 && coins == 0 then (lenB,countB+1) else best
elf best ('L':s) 0 _ = elf best s 0 0... |
ae04938f4ea5a843152a71943291d0d3e1f22307de4102bb5654f9f7c23eb7f9 | heidihoward/ocaml-dns-examples | unikernel.ml | open Lwt
open V1_LWT
let domain = "google.com"
let server = Ipaddr.V4.make 8 8 8 8
module Client (C:CONSOLE) (S:STACKV4) = struct
module U = S.UDPV4
module DNS = Dns_resolver_mirage.Make(OS.Time)(S)
let start c s =
let t = DNS.create s in
OS.Time.sleep 2.0
>>= fun () ->
C.log_s c ("Resolving ... | null | https://raw.githubusercontent.com/heidihoward/ocaml-dns-examples/0d49f892079071d6cb3221e90a8c321984745e69/gethostbyname/unikernel.ml | ocaml | open Lwt
open V1_LWT
let domain = "google.com"
let server = Ipaddr.V4.make 8 8 8 8
module Client (C:CONSOLE) (S:STACKV4) = struct
module U = S.UDPV4
module DNS = Dns_resolver_mirage.Make(OS.Time)(S)
let start c s =
let t = DNS.create s in
OS.Time.sleep 2.0
>>= fun () ->
C.log_s c ("Resolving ... | |
ebe19a04c5892ff578f1e31e40885757115f9666de5998e2f2d7f360b81c6c9e | binsec/haunted | colors.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/utils/colors.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
1fc4976bb18d6e4e4976f3e87799285f419f77d02d7d849ed6c0649e14ff57ac | lojic/RacketChess | evaluation.rkt | #lang racket
(require "./board.rkt"
"./global.rkt"
"./piece.rkt")
(provide evaluate)
;; Compute a list of all square indices
(define square-indices (for*/list ([ rank (in-range 8) ]
[ file (in-range 8) ])
(file-rank->idx file rank)))
Sw... | null | https://raw.githubusercontent.com/lojic/RacketChess/115ca7fecca9eaf31f9b2f4ef59935372c9920c8/src/evaluation.rkt | racket | Compute a list of all square indices
Queen takes pawn, bishop takes pawn: r4rk1/ppp2ppp/2n5/3Bp3/8/2P4q/P1PPKP2/R1BQ4 b - - 0 1
Queen back to e4: r4rk1/ppp2ppp/2n5/3pp3/4q3/1BP4P/P1PP1P2/R1BQ1K2 b - - 0 1
NOTE: all of these tests will need to change when I code a "real" evaluation function
Rook
King
Rook
King... | #lang racket
(require "./board.rkt"
"./global.rkt"
"./piece.rkt")
(provide evaluate)
(define square-indices (for*/list ([ rank (in-range 8) ]
[ file (in-range 8) ])
(file-rank->idx file rank)))
Switched to , so return the score relativ... |
5366e347e3666073390f64b43216159ef6011ef3c45d12c10968db5c78ad353f | avsm/mirage-duniverse | tcptimer.ml |
* Copyright ( c ) 2012 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/tcpip/src/tcp/tcptimer.ml | ocaml |
* Copyright ( c ) 2012 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
cfe6a040d8a190fc57b6ea0922b5a1fbf96b9224842a9c1654b52c626562539f | tweag/asterius | cgrun038.hs |
From : < mirani >
Date : Sat , 26 Aug 95 21:14:47 -0400
Subject : GHC bug
GHC ca n't parse the following program when there is no newline at the
end of the last line :
From: Rajiv Mirani <mirani>
Date: Sat, 26 Aug 95 21:14:47 -0400
Subject: GHC bug
GHC can't parse the following program when there is no ... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/codeGen/cgrun038.hs | haskell | random comment |
From : < mirani >
Date : Sat , 26 Aug 95 21:14:47 -0400
Subject : GHC bug
GHC ca n't parse the following program when there is no newline at the
end of the last line :
From: Rajiv Mirani <mirani>
Date: Sat, 26 Aug 95 21:14:47 -0400
Subject: GHC bug
GHC can't parse the following program when there is no ... |
9fa9db37c28416d41ab198c9b19b5f4e9ae5c94845cba86d1e8a7358b4e3b002 | 6502/JSLisp | guitest.lisp | (import * from gui)
(import * from layout)
(import * from graphics)
(defun main ()
(let** ((w (window 0 0 680 470 title: "Test window" close: false))
(title (add-widget w (select "mr/ms" '("Mr." "Ms."))))
(first-name (add-widget w (input "first name")))
(last-name (add-widget w (input "... | null | https://raw.githubusercontent.com/6502/JSLisp/9a4aa1a9116f0cfc598ec9f3f30b59d99810a728/examples/guitest.lisp | lisp | (import * from gui)
(import * from layout)
(import * from graphics)
(defun main ()
(let** ((w (window 0 0 680 470 title: "Test window" close: false))
(title (add-widget w (select "mr/ms" '("Mr." "Ms."))))
(first-name (add-widget w (input "first name")))
(last-name (add-widget w (input "... | |
8ca318295df2b63637c3090e108b7be7afbe2f7c00d41ea23b821240380ccf07 | realworldocaml/examples | counter.mli | open Core.Std
(** A collection of string frequency counts *)
type t
(** The empty set of frequency counts *)
val empty : t
(** Bump the frequency count for the given string. *)
val touch : t -> string -> t
Converts the set of frequency counts to an association list . Every strings
in the list will show up... | null | https://raw.githubusercontent.com/realworldocaml/examples/32ea926861a0b728813a29b0e4cf20dd15eb486e/code/files-modules-and-programs-freq-with-sig-abstract-fixed/counter.mli | ocaml | * A collection of string frequency counts
* The empty set of frequency counts
* Bump the frequency count for the given string. | open Core.Std
type t
val empty : t
val touch : t -> string -> t
Converts the set of frequency counts to an association list . Every strings
in the list will show up at most once , and the integers will be at least
1 .
in the list will show up at most once, and the integers will be at least
1. *)... |
0f21ae4ed51a14ecc2727d000206438c415ac2082505780d11330793ba0d1532 | DanielG/ghc-mod | CustomPackageDbSpec.hs | module CustomPackageDbSpec where
import GhcMod.CabalHelper
import GhcMod.CustomPackageDb
import GhcMod.Error
import System.Process
import Test.Hspec
import Prelude
import Dir
import TestUtils
spec :: Spec
spec = do
describe "getCustomPkgDbStack" $ do
it "works" $ do
let tdir = "test/data/cust... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/CustomPackageDbSpec.hs | haskell | module CustomPackageDbSpec where
import GhcMod.CabalHelper
import GhcMod.CustomPackageDb
import GhcMod.Error
import System.Process
import Test.Hspec
import Prelude
import Dir
import TestUtils
spec :: Spec
spec = do
describe "getCustomPkgDbStack" $ do
it "works" $ do
let tdir = "test/data/cust... | |
16a81d80248b5159fe622cc50aa1a0c2091b77bceb777dc9b786f20bfd072656 | rbkmoney/hellgate | hg_client_invoicing.erl | -module(hg_client_invoicing).
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
-export([start/1]).
-export([start/2]).
-export([start_link/1]).
-export([stop/1]).
-export([create/2]).
-export([create_with_tpl/2]).
-export([get/2]).
-export([get/3]).
-export([fulfill/3]).
-export([rescind/3]).
-expo... | null | https://raw.githubusercontent.com/rbkmoney/hellgate/9c5c65bf04e25ad1cfe3abe5a4bc6de72287afb0/apps/hg_client/src/hg_client_invoicing.erl | erlang |
FIXME: infinity sounds dangerous
| -module(hg_client_invoicing).
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
-export([start/1]).
-export([start/2]).
-export([start_link/1]).
-export([stop/1]).
-export([create/2]).
-export([create_with_tpl/2]).
-export([get/2]).
-export([get/3]).
-export([fulfill/3]).
-export([rescind/3]).
-expo... |
1075f379b415ed2ea1b9cf981b1552c55479cc0318ecca7454cfe467f648e258 | chunsj/TH | bn.lisp | (defpackage :bn
(:use #:common-lisp
#:mu
#:th
#:th.layers
#:th.db.mnist
#:th.db.fashion))
(in-package :bn)
use one of following
(defparameter *mnist* (read-mnist-data))
(defparameter *mnist* (read-fashion-data))
(defparameter *data-size* 1000)
(defparameter *x-train* ($in... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/simple/bn.lisp | lisp | (defpackage :bn
(:use #:common-lisp
#:mu
#:th
#:th.layers
#:th.db.mnist
#:th.db.fashion))
(in-package :bn)
use one of following
(defparameter *mnist* (read-mnist-data))
(defparameter *mnist* (read-fashion-data))
(defparameter *data-size* 1000)
(defparameter *x-train* ($in... | |
905a1f56ad4b1a8308842918680372e5c401918d6f7abc59e5196997fff95571 | facebookarchive/pfff | parse_minic.ml |
*
* Copyright ( C ) 2014 Facebook
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License ( GPL )
* version 2 as published by the Free Software Foundation .
*
* This program is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/mini/parse_minic.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
* Just a small wrapper around the C parser (itself a wrapper over the C++
* parser).
********************************************************************... |
*
* Copyright ( C ) 2014 Facebook
*
* This program is free software ; you can redistribute it and/or
* modify it under the terms of the GNU General Public License ( GPL )
* version 2 as published by the Free Software Foundation .
*
* This program is distributed in the hope that it will be us... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.