_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 |
|---|---|---|---|---|---|---|---|---|
1ab4794add430ac93dc126befb7c431cde2de3f9817e9b1014fc87e63ad645a7 | modular-macros/ocaml-macros | t240-c_call5.ml | open Lib;;
let s = "abcdefgh" in
String.unsafe_blit s 3 s 0 3;
if s.[0] <> 'd' then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 " abcdefgh "
11 PUSHCONST3
12 PUSHCONST0
13 PUSHACC2
14 PUSHCONST3
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocaml/t240-c_call5.ml | ocaml | open Lib;;
let s = "abcdefgh" in
String.unsafe_blit s 3 s 0 3;
if s.[0] <> 'd' then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 " abcdefgh "
11 PUSHCONST3
12 PUSHCONST0
13 PUSHACC2
14 PUSHCONST3
... | |
89b12b37da57228c58b54fe71fedfd158310e3c58ee79bd0ccda27b97732aaba | gonzojive/elephant | make-ref.lisp | (require 'asdf)
#+sbcl
(require :sb-posix)
;;(asdf:operate 'asdf:load-op 'elephant :force t)
(asdf:operate 'asdf:load-op 'elephant)
(in-package :elephant)
(load (merge-pathnames
#p"src/elephant/query"
(asdf:component-pathname (asdf:find-system 'elephant))))
(defparameter include-dir-path
(namestri... | null | https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/doc/make-ref.lisp | lisp | (asdf:operate 'asdf:load-op 'elephant :force t)
(sb-texinfo:generate-includes #p"/Users/eslick/Work/fsrc/elephant-cvs/doc/includes/" | (require 'asdf)
#+sbcl
(require :sb-posix)
(asdf:operate 'asdf:load-op 'elephant)
(in-package :elephant)
(load (merge-pathnames
#p"src/elephant/query"
(asdf:component-pathname (asdf:find-system 'elephant))))
(defparameter include-dir-path
(namestring
(merge-pathnames
#p"doc/includes/"
... |
b59ce3a494c414fb7558fd38b276dcfa9742538846cd57bf5ccdc7b6c15d282e | leo-project/leo_gateway | leo_nfs_state_ets.erl | %%======================================================================
%%
Leo Gateway
%%
Copyright ( c ) 2012 - 2015 Rakuten , Inc.
%%
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... | null | https://raw.githubusercontent.com/leo-project/leo_gateway/7bac8912b762688f0ef237b31fee17e30e3888a3/src/leo_nfs_state_ets.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 permis... | Leo Gateway
Copyright ( c ) 2012 - 2015 Rakuten , Inc.
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(leo_nfs_state_... |
5a352d694fdadc13308c1a46f939eb7d6b24b9aea64353b4d80159c312bb8e40 | dextroamphetamine/nuko | Query.hs | module Control.Monad.Query (
MonadQuery(..),
) where
import Relude
class (Monad m) => MonadQuery q m | m -> q where
query :: q a -> m a
instance MonadQuery q m => MonadQuery q (StateT s m) where
query t = lift (query t)
instance MonadQuery q m => MonadQuery q (ReaderT s m) where
query t = lift (query t)
in... | null | https://raw.githubusercontent.com/dextroamphetamine/nuko/1b6f960eeeebbfcbfb5700279c39758f82e7df28/src/Control/Monad/Query.hs | haskell | module Control.Monad.Query (
MonadQuery(..),
) where
import Relude
class (Monad m) => MonadQuery q m | m -> q where
query :: q a -> m a
instance MonadQuery q m => MonadQuery q (StateT s m) where
query t = lift (query t)
instance MonadQuery q m => MonadQuery q (ReaderT s m) where
query t = lift (query t)
in... | |
c0dffcf6c124beaea5e9bd3439bcec86a85d48a3e1bf707bfe4e957823da28cf | wdebeaum/step | unsafe.lisp | ;;;;
;;;; W::unsafe
;;;;
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::unsafe
(wordfeats (W::morph (:FORMS (-LY))))
(SENSES
((meta-data :origin calo :entry-date 20031223 :change-date 20090731 :wn ("unsafe%3:00:00" "unsafe%3:00:02") :comments nil)
(LF-PARENT ONT::DANGEROUS)
(tem... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/unsafe.lisp | lisp |
W::unsafe
|
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL
:words (
(W::unsafe
(wordfeats (W::morph (:FORMS (-LY))))
(SENSES
((meta-data :origin calo :entry-date 20031223 :change-date 20090731 :wn ("unsafe%3:00:00" "unsafe%3:00:02") :comments nil)
(LF-PARENT ONT::DANGEROUS)
(templ less-adj-templ)
)... |
15cfaa4b8ebcb169c94f43720d9bcd5b2ca90c3cc981b535037f89390abba08c | ghc/testsuite | TcRun025_B.hs | # LANGUAGE ImplicitParams , TypeSynonymInstances , FlexibleInstances #
-- Similar to tc024, but cross module
module TcRun025_B where
import Data.List( sort )
-- This class has no tyvars in its class op context
-- One uses a newtype, the other a data type
class C1 a where
fc1 :: (?p :: String) => a;
class ... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_run/TcRun025_B.hs | haskell | Similar to tc024, but cross module
This class has no tyvars in its class op context
One uses a newtype, the other a data type
This class constrains no new type variables in
its class op context | # LANGUAGE ImplicitParams , TypeSynonymInstances , FlexibleInstances #
module TcRun025_B where
import Data.List( sort )
class C1 a where
fc1 :: (?p :: String) => a;
class C2 a where
fc2 :: (?p :: String) => a;
opc :: a
instance C1 String where
fc1 = ?p;
instance C2 String where
fc2 = ... |
c7905986c207c24d4a5e0f115198d94817c7416e09469dae4637444b46de634f | Verites/verigraph | DiagramAlgorithms.hs | |
Module : DiagramAlgorithms
Description : Implements diagram - based algorithms
This diagram shows objects and morphisms names used in the algorithms below :
@
N1 N2
^ ^
r1 l1 │ n1 n2 │ l2 r2
R1 ◀ ─ ─ ─ ─ ─ K1 ─ ─ ... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/Abstract/Rewriting/DPO/DiagramAlgorithms.hs | haskell | something that is used by @p2@.
gets only the morphism D1 to G
gets only the morphism D1 to G
Runs the DPO rewriting on p1 with m1 and
returns h21 and h21_e1 morphism as diagram above
h21 is unique if it exists
produces something that disables @p2@.
where m2 = h21 . d1
| Verifies delete-use, if false verifies p... | |
Module : DiagramAlgorithms
Description : Implements diagram - based algorithms
This diagram shows objects and morphisms names used in the algorithms below :
@
N1 N2
^ ^
r1 l1 │ n1 n2 │ l2 r2
R1 ◀ ─ ─ ─ ─ ─ K1 ─ ─ ... |
e39ba47b0e9b8143a2d1846026ace2aaeecde6be36a57a6e7742f44b9aab4779 | silky/quipper | QEC.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
import Quipper
-- import other stuff
import Con... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/tests/QEC.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
======================================================================
import other stuff
======================================================================
ALGORITHM SPECIFIC CODE
Meas===x==o==|
--... | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
import Quipper
import Control.Monad (zipWithM_)
the test circuit from and 's email . It looks like
this :
In 's notation :
H(a )
c = meas(a )
if c then
X(b )
else Y(b )
In circuit notation :
... |
5cd50baa42c5355884cc097eec972f11c7d4e5a3c6e27fda95574ac052f14913 | janestreet/bonsai | expert.ml | open! Core
open! Import
module Constants = Constants
module Theme = Theme
include Underlying_intf
type t = (module S)
let make_theme (m : t) : Theme.t =
(module struct
include (val m)
let singleton = new c
end)
;;
let override_theme ((module M) : Theme.t) ~(f : t -> t) : Theme.t =
(module struct
i... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web_ui/view/src/expert.ml | ocaml | tables
misc forms
form_constructors
forms
cards | open! Core
open! Import
module Constants = Constants
module Theme = Theme
include Underlying_intf
type t = (module S)
let make_theme (m : t) : Theme.t =
(module struct
include (val m)
let singleton = new c
end)
;;
let override_theme ((module M) : Theme.t) ~(f : t -> t) : Theme.t =
(module struct
i... |
d1b83dc3f5f1c21a9776c0c2dd00f5b90758aa6ae4180f55c34760878dd91f2b | cndreisbach/clojure-web-dev-workshop | project.clj | (defproject tutorial-client "0.0.1-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-1586"]
[domina "1.0.1"]
[ch.qos.logback/logback-classic "1.0.7" :exclusions [org.slf4j/slf4j-api]]
... | null | https://raw.githubusercontent.com/cndreisbach/clojure-web-dev-workshop/95d9fdf94b39f8a1e408b8bf75a81b92899ee7d9/code/08-pedestal-client/project.clj | clojure | (defproject tutorial-client "0.0.1-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/clojurescript "0.0-1586"]
[domina "1.0.1"]
[ch.qos.logback/logback-classic "1.0.7" :exclusions [org.slf4j/slf4j-api]]
... | |
b9de74509ed452678e358eae706ffef0059a032ad9e5c80dbf55d5e235700af1 | karlhof26/gimp-scheme | wade-powertone.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
Powertone script for GIMP 2.4
; Created by Art Wade
;
; Tags: color, photo, artistic, tone
;
; Author statement:
;
; This script is based on a tutorial presented by gimptalk.com member,
lylejk ( -Very-Simple-Technique-26500-1.html ) .... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/bd8c74d19772675781f89b3e007d14092653b27a/wade-powertone.scm | scheme |
The GIMP -- an image manipulation program
Created by Art Wade
Tags: color, photo, artistic, tone
Author statement:
This script is based on a tutorial presented by gimptalk.com member,
choice of color. Gives a very dramatic effect and, depending on the image, somewhat
-------------------------------------... | Copyright ( C ) 1995 and
Powertone script for GIMP 2.4
lylejk ( -Very-Simple-Technique-26500-1.html ) .
It takes an existing image 's active layer and makes two copies : setting the Middle copy
to Saturation and the Top copy to Value . The Original Layer is then filled with your
resembles an Infrar... |
e21c492161a827a03860b2933c887bb38b77a7f42415315d6243d37ec5602277 | amuletml/amulet | SymbolList.hs | # LANGUAGE DuplicateRecordFields , OverloadedStrings #
module Test.Lsp.SymbolList (symbolListTests) where
import Data.Text ()
import Test.Tasty.Lsp
import Test.Tasty
symbolListTests :: TestTree
symbolListTests = testGroup "Symbol list"
[ lspSession "Is provided" $ do
ident <- openDoc "main.ml" "amulet"
... | null | https://raw.githubusercontent.com/amuletml/amulet/f5c3f5f073b85e2a6ab105dcd296332882d0d348/tests/driver/Test/Lsp/SymbolList.hs | haskell | # LANGUAGE DuplicateRecordFields , OverloadedStrings #
module Test.Lsp.SymbolList (symbolListTests) where
import Data.Text ()
import Test.Tasty.Lsp
import Test.Tasty
symbolListTests :: TestTree
symbolListTests = testGroup "Symbol list"
[ lspSession "Is provided" $ do
ident <- openDoc "main.ml" "amulet"
... | |
7775b0446d3544ba8360206ae952dfffb1a34385baeb417fd8455dec3da9e286 | LCBH/UKano | movenew.mli | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/LCBH/UKano/13c046ddaca48b45d3652c3ea08e21599e051527/proverif2.01/src/movenew.mli | ocaml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | |
1aa8fc6a8298a7104d009771fe198a68abe2338a88a6aba2f1f78ff61a9e1a3d | Enecuum/Node | Language.hs | module Enecuum.Samples.Blockchain.Language
( module X
) where
import Enecuum.Samples.Blockchain.Language.Ledger as X
import Enecuum.Samples.Blockchain.Language.Pending as X
import Enecuum.Samples.Blockchain.Language.Graph as X
import Enecuum.Samples.Blockchain.Language.Verification as X | null | https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Samples/Blockchain/Language.hs | haskell | module Enecuum.Samples.Blockchain.Language
( module X
) where
import Enecuum.Samples.Blockchain.Language.Ledger as X
import Enecuum.Samples.Blockchain.Language.Pending as X
import Enecuum.Samples.Blockchain.Language.Graph as X
import Enecuum.Samples.Blockchain.Language.Verification as X | |
995497893d96d4e2155dd974858176624d817f71cf70db5b7072267f40e32f2e | endobson/racket-llvm | memory-buffers.rkt | #lang racket
(require
"define.rkt"
"ctypes.rkt")
(require ffi/unsafe)
(provide (all-defined-out))
;/*===-- Memory buffers ----------------------------------------------------===*/
;
(define-llvm-unsafe LLVMCreateMemoryBufferWithContentsOfFile
(_fun (path) ::
(path : _string)
(buffer : (_p... | null | https://raw.githubusercontent.com/endobson/racket-llvm/3eb557b0fe4bddfdfce8e8f4659d218535daa061/private/ffi/memory-buffers.rkt | racket | /*===-- Memory buffers ----------------------------------------------------===*/
| #lang racket
(require
"define.rkt"
"ctypes.rkt")
(require ffi/unsafe)
(provide (all-defined-out))
(define-llvm-unsafe LLVMCreateMemoryBufferWithContentsOfFile
(_fun (path) ::
(path : _string)
(buffer : (_ptr o LLVMMemoryBufferRef))
(message : (_ptr io LLVMMessage) = #f)
... |
b5b21299490f5a63d69184d972a08ed51e6e42e43e7eded4dfb4e1e06efbb8cb | kumarshantanu/ring-sse-middleware | immutant.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the ... | null | https://raw.githubusercontent.com/kumarshantanu/ring-sse-middleware/67dae006cfda2fa2fef93eea92557aeffff0b6a7/src/ring_sse_middleware/adapter/immutant.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this ... | Copyright ( c ) . All rights reserved .
(ns ring-sse-middleware.adapter.immutant
(:require
[ring-sse-middleware.core :as c]
[immutant.web.async :as async]))
(defn generate-stream
"Given a Ring request map, a body generator `(fn []) -> string-body` and options, emit a response stream by
rep... |
d085642374e139740ff2dbd4101a7fdb8cac2a3e3614eee735d825515490cf15 | bolt12/laop | Internal.hs | # LANGUAGE DerivingVia #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeApplications #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
{-# LANGUAGE RankNTypes #-}
module LAoP.Dist.Internal
... | null | https://raw.githubusercontent.com/bolt12/laop/54968c9e92e9243a731320758da7d59b98e903da/src/LAoP/Dist/Internal.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
| Type synonym for probability value
| Type synonym for column vector matrices. This represents a probability
distribution.
| Constraint type synonyms to keep the type signatures less convoluted
| Functor instance
| Applicative/Monoidal insta... | # LANGUAGE DerivingVia #
# LANGUAGE AllowAmbiguousTypes #
# LANGUAGE TypeApplications #
# LANGUAGE KindSignatures #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
module LAoP.Dist.Internal
(
Dist(..),
Prob,
Countable,
CountableN,
C... |
d18ddf709ac27431d51b870f024c271dfbdb29f0fa148a4039284e10d530b9b6 | Cantido/clj-bittorrent | io.clj | (ns clj-bittorrent.pieces.io
(:require [clj-mmap.core :as mmap]))
(defn write-pieces
"Write all data possessed by the client for torrent m to the filename at f."
[m ps f]
(let [piece-length (:piece-length m)
piece-count (count (:pieces m))
file-size (* piece-count piece-length)]
(with-open ... | null | https://raw.githubusercontent.com/Cantido/clj-bittorrent/5fea93e318f9d07e4bbee6aced12e10ae0f46f2a/src/clj_bittorrent/pieces/io.clj | clojure | (ns clj-bittorrent.pieces.io
(:require [clj-mmap.core :as mmap]))
(defn write-pieces
"Write all data possessed by the client for torrent m to the filename at f."
[m ps f]
(let [piece-length (:piece-length m)
piece-count (count (:pieces m))
file-size (* piece-count piece-length)]
(with-open ... | |
6b95f52103317afb99962275396f7048ce77031f8aefcb8a95ba22a30c68289f | GaloisInc/mistral | Translate.hs | module Mistral.TypeCheck.Translate (
ParamMap
, mkParamMap
, translateSchema
, translateType ) where
import qualified Mistral.Parser.AST as P
import Mistral.TypeCheck.AST
import Mistral.TypeCheck.Monad
import Mistral.Utils.Panic ( panic )
import Mistral.Utils.PP
import... | null | https://raw.githubusercontent.com/GaloisInc/mistral/3464ab332d73c608e64512e822fe2b8a619ec8f3/src/Mistral/TypeCheck/Translate.hs | haskell | Type Conversion -------------------------------------------------------------
| This should form the basis for kind checking, once we decide to go that
route.
try to resolve synonyms with parameters
try to resolve synonyms with no parameters | module Mistral.TypeCheck.Translate (
ParamMap
, mkParamMap
, translateSchema
, translateType ) where
import qualified Mistral.Parser.AST as P
import Mistral.TypeCheck.AST
import Mistral.TypeCheck.Monad
import Mistral.Utils.Panic ( panic )
import Mistral.Utils.PP
import... |
52a5fdc90fd23acf2f4f2b4f909841988b76547f1c7daf9ccf291e487e37def2 | haskell/cabal | String.hs | module Distribution.Utils.String
( -- * Encode to/from UTF8
decodeStringUtf8
, encodeStringUtf8
, trim
) where
import Data.Word
import Data.Bits
import Data.Char (chr,ord)
import Data.List (dropWhileEnd)
import GHC.Unicode (isSpace)
-- | Decode 'String' from UTF8-encoded octets.
--
Invalid dat... | null | https://raw.githubusercontent.com/haskell/cabal/0abbe37187f708e0a5daac8d388167f72ca0db7e/Cabal-syntax/src/Distribution/Utils/String.hs | haskell | * Encode to/from UTF8
| Decode 'String' from UTF8-encoded octets.
See also 'encodeStringUtf8'
| Encode 'String' to a list of UTF8-encoded octets
Code-points in the @U+D800@-@U+DFFF@ range will be encoded
See also 'decodeUtf8' | module Distribution.Utils.String
decodeStringUtf8
, encodeStringUtf8
, trim
) where
import Data.Word
import Data.Bits
import Data.Char (chr,ord)
import Data.List (dropWhileEnd)
import GHC.Unicode (isSpace)
Invalid data in the UTF8 stream ( this includes code - points @U+D800@
through @U+DFFF@ ) ... |
549f5fa7610ec00d289bfb97aa1435d06efaef60c1e9bc1ae17e2fbc8296d059 | hunt-framework/hunt | Util.hs | # OPTIONS #
-- ------------------------------------------------------------
module Holumbus.Crawler.Util
where
import Control.Applicative ( liftA2 )
import Data.List
import qualified Text.Regex.XMLSchema.Generic as RE
-- ------------------------------------------------------------
-- | create t... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-crawler/src/Holumbus/Crawler/Util.hs | haskell | ------------------------------------------------------------
------------------------------------------------------------
| create temp file name
------------------------------------------------------------
| Simple predicate genertor for filtering of URIs
the predicate holds. This can be used for constructing si... | # OPTIONS #
module Holumbus.Crawler.Util
where
import Control.Applicative ( liftA2 )
import Data.List
import qualified Text.Regex.XMLSchema.Generic as RE
mkTmpFile :: Int -> String -> Int -> String
mkTmpFile n s i = (s ++) . reverse . take n . (++ replicat... |
a59fa98cf14109fb07d1bfc691d9893d87535501ef22a779e7b2277564e28877 | LaurentMazare/ocaml-minipy | bc_eval.ml | open Base
open Import
let to_int v = Bc_value.to_int v |> Z.to_int
let range_fn _eval_fn args kwargs =
check_empty_kwargs kwargs ~name:"range";
let start, stop, stride =
match args with
| [ v ] -> 0, to_int v, 1
| [ v1; v2 ] -> to_int v1, to_int v2, 1
| [ v1; v2; s ] -> to_int v1, to_int v2, to_in... | null | https://raw.githubusercontent.com/LaurentMazare/ocaml-minipy/e83d4bfad55819a27195109d401437faa0f65f69/src/bc_eval.ml | ocaml | open Base
open Import
let to_int v = Bc_value.to_int v |> Z.to_int
let range_fn _eval_fn args kwargs =
check_empty_kwargs kwargs ~name:"range";
let start, stop, stride =
match args with
| [ v ] -> 0, to_int v, 1
| [ v1; v2 ] -> to_int v1, to_int v2, 1
| [ v1; v2; s ] -> to_int v1, to_int v2, to_in... | |
d18259a20306c9c6e357daae665b5d39349cc222c8bf064aac831953146ca27d | felipeZ/Haskell-abinitio | Project.hs |
|
Module : Science . QuantumChemistry . HsFock . Project where
Description : Data types for the project
Copyright : tape
@2012,2013 core SCF machinery
Module: Science.QuantumChemistry.HsFock.Project where
Description: Data types for the project
Copyright: @2012,2013 Angel Alv... | null | https://raw.githubusercontent.com/felipeZ/Haskell-abinitio/c019bc37c8de78affddf97eb858c1ef18af76d83/Science/QuantumChemistry/HsFock/Project.hs | haskell | "water"
"sto-3G" |
|
Module : Science . QuantumChemistry . HsFock . Project where
Description : Data types for the project
Copyright : tape
@2012,2013 core SCF machinery
Module: Science.QuantumChemistry.HsFock.Project where
Description: Data types for the project
Copyright: @2012,2013 Angel Alv... |
62f79e7e91d1724184391ef2125cffebb3031e3ce8467f79311e75d5cc176d2d | tonsky/advent-of-code | main.clj | (ns advent-of-code.year2018.main)
(defn solve-day [day]
(let [ns (symbol (str "advent-of-code.year2018.day" day))]
(require ns)
(println "Day" day)
(print "├ part 1: ")
(flush)
(println ((ns-resolve ns 'part1)))
(print "└ part 2: ")
(flush)
(println ((ns-resolve ns 'part2)))
(prin... | null | https://raw.githubusercontent.com/tonsky/advent-of-code/455eb0e1410f1bcfa9f8a2e3e9ded8e84e226089/src/advent_of_code/year2018/main.clj | clojure | (ns advent-of-code.year2018.main)
(defn solve-day [day]
(let [ns (symbol (str "advent-of-code.year2018.day" day))]
(require ns)
(println "Day" day)
(print "├ part 1: ")
(flush)
(println ((ns-resolve ns 'part1)))
(print "└ part 2: ")
(flush)
(println ((ns-resolve ns 'part2)))
(prin... | |
de701e3d7952fb5077e856e6531f3d55c6c51ef6b7ed390ec8f5121f414e146c | fjvallarino/monomer | WidgetTypes.hs | |
Module : . Core . WidgetTypes
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Basic types and definitions for Widgets .
Module : Monomer.Core.WidgetTypes
Copyright : (c) 2018 Fran... | null | https://raw.githubusercontent.com/fjvallarino/monomer/5b90aebae9f8d1d6c11265750823c016fdd3d785/src/Monomer/Core/WidgetTypes.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
# LANGUAGE Strict #
| Type constraints for a valid model
| Type constraints for a valid event
| Direction of focus movement.
^ Focus moving forward (usually left to right, top to bottom).
^ Focus moving backward (usually right to left, top to bottom).
| 'Widget... | |
Module : . Core . WidgetTypes
Copyright : ( c ) 2018
License : BSD-3 - Clause ( see the LICENSE file )
Maintainer :
Stability : experimental
Portability : non - portable
Basic types and definitions for Widgets .
Module : Monomer.Core.WidgetTypes
Copyright : (c) 2018 Fran... |
604a598c195a1745ba70b048b918e8f8035f256951dfc36e8fc030e38d5096bf | emotiq/emotiq | logging.lisp | (in-package :gossip)
(defvar *log* nil "Log of gossip actions.")
(defvar *logging-actor* 'ac:do-nothing "Actor which serves as gatekeeper to *log* to ensure absolute serialization of log messages and no resource contention for *log*.")
(defvar *archived-logs* (make-array 10 :adjustable t :fill-pointer 0) "Previous his... | null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/gossip/logging.lisp | lisp | Ex: Don't log any messages that contain "WAIT" or "ACCEPT"
Ex: Include only :FINALREPLY messages
Ex: Don't include SIR messages
TODO: This doesn't call save-log. It probably should once saving is thoroughly debugged.
should only be called from *logging-actor*."
Don't use actor-send here. If we get an error while ... | (in-package :gossip)
(defvar *log* nil "Log of gossip actions.")
(defvar *logging-actor* 'ac:do-nothing "Actor which serves as gatekeeper to *log* to ensure absolute serialization of log messages and no resource contention for *log*.")
(defvar *archived-logs* (make-array 10 :adjustable t :fill-pointer 0) "Previous his... |
f10a1add2d09c5f49845448327e1d52a144a5db703879fa5124972ee33981acb | KavehYousefi/Esoteric-programming-languages | main.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; This program implements an interpreter for the esoteric programming
language " Asig " , invented by the Esolang user " " on March 30 ,
2014 .
;;
;; Concept
;; =======
;; The Asig programming language accomplishes its kenspeckle nature... | null | https://raw.githubusercontent.com/KavehYousefi/Esoteric-programming-languages/52b62ac64cd5c39c9c1e1dd8d416eb367b9ea0cb/Asig/Asig_001/main.lisp | lisp |
This program implements an interpreter for the esoteric programming
Concept
=======
The Asig programming language accomplishes its kenspeckle nature by
same relating to its choice of symbols for the command designations;
the functional other manifesting in the exclusivity of variables for
the arithmetic, st... | language " Asig " , invented by the Esolang user " " on March 30 ,
2014 .
by two aspects of its haecceity , the syntactical component of the
for the commands ' diorisms , operating in a paravaunt manner upon
Two kinds of variables are accommodated introduction into utility :
numbers and strings . A twofold... |
43d403f0fd06ccc1f521ef3c60c122a2e3f611fc435177f317878b79141649f2 | antono/guix-debian | packages.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/guix/packages.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix packages)
#:use-module (guix utils)
#:use-module (guix records)
#:use-mod... |
30c56dc91648971bb708c3b15b0420c2f8c4e545efb2a0a91f548f8ee5cdc7dc | biokoda/actordb_core | actordb_config.erl | 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 /.
-module(actordb_config).
-include_lib("actordb_core/include/actordb.hrl").
-export([exec/1, exec/2, exec_schema/1, exec_schema/2]).
-export([lt... | null | https://raw.githubusercontent.com/biokoda/actordb_core/8dcd08a0897055af89c3ce20d99ed5e64d0c33eb/src/actordb_config.erl | erlang | Replacement for actordb_cmd
Query/change actordb config.
actordb_config:exec("insert into groups values ('grp1','cluster');insert into nodes values ('testnd','grp1');CREATE USER 'monty' IDENTIFIED BY 'some_pass';").
Schema:
actordb_sqlparse cares about actor statements and leaves sql statements intact.
[{_,_}|_] =... | 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 /.
-module(actordb_config).
-include_lib("actordb_core/include/actordb.hrl").
-export([exec/1, exec/2, exec_schema/1, exec_schema/2]).
-export([lt... |
aeb2f79bcb78c0b823155687b5be5f96d235410d4f1180d969d8907a9c78dbe9 | anmonteiro/ocaml-h2 | config.ml | open Mirage
Network configuration
let stack = generic_stackv4 default_network
(* Dependencies *)
let server =
let packages =
[ package ~pin:"file://../../" "h2-lwt"
; package ~pin:"file://../../" "h2-mirage"
]
in
foreign "Unikernel.Make" ~packages (console @-> pclock @-> http2 @-> job)
let app ... | null | https://raw.githubusercontent.com/anmonteiro/ocaml-h2/66d92f1694b488ea638aa5073c796e164d5fbd9e/examples/mirage/config.ml | ocaml | Dependencies | open Mirage
Network configuration
let stack = generic_stackv4 default_network
let server =
let packages =
[ package ~pin:"file://../../" "h2-lwt"
; package ~pin:"file://../../" "h2-mirage"
]
in
foreign "Unikernel.Make" ~packages (console @-> pclock @-> http2 @-> job)
let app = http2_server @@ c... |
da5977d96f30fab42d24803b862d5827abf746ea6c928aa5935c846c5e943647 | glondu/belenios | ed25519_libsodium.ml | (**************************************************************************)
(* BELENIOS *)
(* *)
Copyright © 2021 - 2023
(* ... | null | https://raw.githubusercontent.com/glondu/belenios/69fad8eb6e5fa0492d921f1639c3118b836b8846/src/lib/core/ed25519_libsodium.ml | ocaml | ************************************************************************
BELENIOS
This program is free softw... | Copyright © 2021 - 2023
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation , either version 3 of the
exemption that compiling , linking , and/or using OpenSSL is allowed .
You should have rece... |
3dbc9a1dbd030ee85691c1332f21672f623447463f0c42c8b0ce187776f99f2a | ocaml/ocaml-lsp | main.ml | let y = Lib.x
| null | https://raw.githubusercontent.com/ocaml/ocaml-lsp/0b1390b78c0e4f72deb76f04b8a0e83fa2f03b6c/ocaml-lsp-server/test/e2e/__tests__/declaration_files/main.ml | ocaml | let y = Lib.x
| |
ac93156084df57947fb3f0c2f11028e5075c25d8c65a6ad3110c9c9e99b6434c | ocaml/dune | hashtbl.mli | module type S = Hashtbl_intf.S
module Make (Key : sig
include Hashable.S
val to_dyn : t -> Dyn.t
end) : S with type key = Key.t
| null | https://raw.githubusercontent.com/ocaml/dune/714626f4d408e5c71c24ba91d0d520588702ec52/otherlibs/stdune/src/hashtbl.mli | ocaml | module type S = Hashtbl_intf.S
module Make (Key : sig
include Hashable.S
val to_dyn : t -> Dyn.t
end) : S with type key = Key.t
| |
c924463b11d47134d8818275362d972a4f01a3e80b48845f5af9fc17ce1ea37c | valderman/selda | Type.hs | module Database.Selda.Table.Type where
import Database.Selda.SqlType (SqlTypeRep)
import Database.Selda.SQL (SQL)
import Database.Selda.Types ( TableName, ColName )
import Database.Selda.Exp ( UntypedCol )
| A database table , based on some data type .
-- Any single constructor type can form the basis of a table,... | null | https://raw.githubusercontent.com/valderman/selda/c270f354caaa733d10b79d5c0ba05f98f56fa4b6/selda/src/Database/Selda/Table/Type.hs | haskell | Any single constructor type can form the basis of a table, as long as
it derives @Generic@ and all of its fields are instances of @SqlType@.
| Name of the table. NOT guaranteed to be a valid SQL name.
| All table columns.
no duplicates.
| Does the given table have an auto-incrementing primary key?
| Attrib... | module Database.Selda.Table.Type where
import Database.Selda.SqlType (SqlTypeRep)
import Database.Selda.SQL (SQL)
import Database.Selda.Types ( TableName, ColName )
import Database.Selda.Exp ( UntypedCol )
| A database table , based on some data type .
data Table a = Table
tableName :: TableName
Invariant ... |
6f846059e851f5411c42ac596aedddcb8feca2464729d8edb1372396adf745d1 | status-im/status-lib-archived | project.clj | (defproject status-im/protocol "0.2.2"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.5.3"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]
[org.clojure... | null | https://raw.githubusercontent.com/status-im/status-lib-archived/0b07f54a6b8dc17490a74797fa04dae75e5668ca/project.clj | clojure | This next build is an compressed minified build for
production. You can build this with: | (defproject status-im/protocol "0.2.2"
:description "FIXME: write this!"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.5.3"
:dependencies [[org.clojure/clojure "1.7.0"]
[org.clojure/clojurescript "1.7.170"]
[org.clojure... |
5c2ecb0857e23862b9088678e1e1219e40a8b561999b8c566b8146c2e55ad15f | TheBestTvarynka/Lisp-SQL-Parser | 2-task.lisp | = = = = set value ( ) in list ( lst ) with index ( i ) = = = =
(defun setVal(i val lst)(cond ((= i 0) (cons val (cdr lst)))
(t (cons (car lst) (setVal (- i 1) val (cdr lst))))
))
= = = = my swap function : swap two elements ( i and j ) in the list and return new list = = = =
(defun swap(lst i j)(setV... | null | https://raw.githubusercontent.com/TheBestTvarynka/Lisp-SQL-Parser/d8f1283fc00e394d76e4ac28e434c99d1bee72aa/simple-exercises/2-lab/2-task.lisp | lisp | ==== sift the element through the heap
==== make a heap from input list ====
==== sort list in with input heap ====
==== sort function
==== generate ouw sequence ====
==== test heapSort | = = = = set value ( ) in list ( lst ) with index ( i ) = = = =
(defun setVal(i val lst)(cond ((= i 0) (cons val (cdr lst)))
(t (cons (car lst) (setVal (- i 1) val (cdr lst))))
))
= = = = my swap function : swap two elements ( i and j ) in the list and return new list = = = =
(defun swap(lst i j)(setV... |
972d14b4ee6259be9763f5bd0e4630707f8585b38570cc1e674ed668884ef88f | spawnfest/eep49ers | basic.erl | %% ---------------------------------------------------------------------
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 w... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/syntax_tools/examples/merl/basic.erl | erlang | ---------------------------------------------------------------------
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.... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
2012
@doc Trivial Basic interpreter in Erlang
-module(basic).
-export([run/2]).
-include_lib("eunit/include/eunit.hrl").
-define(INTERPRETED,... |
6692c91314cdc522453ea6350d64d8e5364c5f5e3c0d1121c971489d60ca7b24 | gabebw/croniker | Profile.hs | module Form.Profile
( profileForm
) where
import Import
import qualified Data.Text as T
import qualified Croniker.MonikerFieldChecks as MonikerFieldChecks (runAllChecks)
import Model.FormProfile (FormProfile(..))
profileForm :: Day -> [Day] -> Day -> Form FormProfile
profileForm nextFreeDay takenDays tomorro... | null | https://raw.githubusercontent.com/gabebw/croniker/89f081738c229a3302af3b0123fea208bccbda11/Form/Profile.hs | haskell | module Form.Profile
( profileForm
) where
import Import
import qualified Data.Text as T
import qualified Croniker.MonikerFieldChecks as MonikerFieldChecks (runAllChecks)
import Model.FormProfile (FormProfile(..))
profileForm :: Day -> [Day] -> Day -> Form FormProfile
profileForm nextFreeDay takenDays tomorro... | |
d9ed7c6fe1724e6713564d78b1f63e203354ee760a10dc8647f1cd263b798373 | lancelet/wgpu-hs | Color.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
-- |
-- Module : WGPU.Internal.Color
-- Description : Color.
module WGPU.Internal.Color
( -- * Types
Color (..),
-- * Functions
transparentBlack,
)
where
import Foreign.C (CDouble (CDouble))
import WGPU.Internal.Memory (ToRaw, raw)
... | null | https://raw.githubusercontent.com/lancelet/wgpu-hs/42d7931cdd793970bf4844906b382d908bbb196f/wgpu-hs/src-internal/WGPU/Internal/Color.hs | haskell | |
Module : WGPU.Internal.Color
Description : Color.
* Types
* Functions
-----------------------------------------------------------------------------
| RGBA double-precision color.
# UNPACK #
# UNPACK #
# UNPACK #
# UNPACK # | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
module WGPU.Internal.Color
Color (..),
transparentBlack,
)
where
import Foreign.C (CDouble (CDouble))
import WGPU.Internal.Memory (ToRaw, raw)
import WGPU.Raw.Generated.Struct.WGPUColor (WGPUColor)
import qualified WGPU.Raw.Generated.Struct.WG... |
456aafd75741d92d6197c5c0ce3d425eb77c48d8323bd140d90b679dba2af930 | jeromesimeon/Galax | serialization.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/serialization/serialization.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : serialization.ml , v 1.30 2008/03/12 22:30:58 simeon Exp $
open Format
open Error
open Namespace_names
open Namespace_symbols
open Datatypes
open Streaming_types
open Serialization_context
let serialize_markup_string serial_c... |
7b6a0cc97ee6a15058620cde22d30a8d4b218feebf8a9a06f214fd88be0d68b1 | DavidAlphaFox/RabbitMQ | rabbit_mirror_queue_mode_nodes.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License at
%% /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/rabbit_mirror_queue_mode_nodes.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific language governing rights and limitations
under the License.
If the current ... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2010 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
354a4d60b8ce71ad094d67356859bfb1d4db86a0bcae347c1249db1abfcafe38 | piotr-yuxuan/dove | project.clj | (defproject com.github.piotr-yuxun/dove (-> "./resources/dove.version" slurp .trim)
:description "Infer specs from SpecificRecord Java classes of any Avro named type (record, fixed, or enum)"
:url "-yuxuan/dove"
:license {:name "GNU GPL v3+"
:url "-3.0.en.html"
:distribution :repo}
:pom-... | null | https://raw.githubusercontent.com/piotr-yuxuan/dove/7ce525d8667854a75ffa7617cf23e77a36e4942b/project.clj | clojure | (defproject com.github.piotr-yuxun/dove (-> "./resources/dove.version" slurp .trim)
:description "Infer specs from SpecificRecord Java classes of any Avro named type (record, fixed, or enum)"
:url "-yuxuan/dove"
:license {:name "GNU GPL v3+"
:url "-3.0.en.html"
:distribution :repo}
:pom-... | |
b54717452f83af3a7334f2cde4e112161ea2c9088e69a323622e0572ac5b12d6 | dparis/gen-phzr | strip.cljs | (ns phzr.impl.accessors.pixi.strip)
(def strip-get-properties
{:alpha "alpha"
:blend-mode "blendMode"
:cache-as-bitmap "cacheAsBitmap"
:canvas-padding "canvasPadding"
:children "children"
:dirty "dirty"
:filter-area "filterArea"
:filters "filters"
:height "height"
:hit-area "hitArea"
:m... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/pixi/strip.cljs | clojure | (ns phzr.impl.accessors.pixi.strip)
(def strip-get-properties
{:alpha "alpha"
:blend-mode "blendMode"
:cache-as-bitmap "cacheAsBitmap"
:canvas-padding "canvasPadding"
:children "children"
:dirty "dirty"
:filter-area "filterArea"
:filters "filters"
:height "height"
:hit-area "hitArea"
:m... | |
38e0a117154f76d70c5e3864972222a648cb99bfa00bc03487d47a6155686993 | jixiuf/helloerlang | bin.erl | -module(bin).
-export([i32/1]).
-export([test/0]).
%% bin-->int32,int32->bin
%% bsl binary switch left
%% bsr binary switch right
%% band binary and
i32(B) when is_binary(B) ->
i32(binary_to_list(B, 1, 4));
i32([X1, X2, X3, X4]) ->
(X1 bsl 24) bor (X2 bsl 16) bor (X3 bsl 8) bor X4;
i32(Int) when is_integer(I... | null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/io/bin.erl | erlang | bin-->int32,int32->bin
bsl binary switch left
bsr binary switch right
band binary and
emacs int-2-binary/interactive
bin-->int32 | -module(bin).
-export([i32/1]).
-export([test/0]).
i32(B) when is_binary(B) ->
i32(binary_to_list(B, 1, 4));
i32([X1, X2, X3, X4]) ->
(X1 bsl 24) bor (X2 bsl 16) bor (X3 bsl 8) bor X4;
i32(Int) when is_integer(Int) ->
255 11111111
(Int bsr 16) band 255,
(Int bsr 8) band 255,
Int band 255].
... |
e1282f62b325c957f87c9d37d1700fb633602d45da479ea04ffe886b5e6242d1 | c4-project/c4f | filter.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fuzz_run/src/filter.ml | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
0babcc834625082905a62a55e06021e33c542d1f4ed4e5d4c762087e2641f214 | CompSciCabal/SMRTYPRTY | hzafar-1.2.rkt | #lang racket
(require rackunit
rackunit/log)
1.9
; (+ 4 5)
= > ( inc ( + ( dec 4 ) 5 ) )
; => (inc (+ 3 5))
= > ( inc ( inc ( + ( dec 3 ) 5 ) ) )
; => (inc (inc (+ 2 5)))
= > ( inc ( inc ( inc ( + ( dec 2 ) 5 ) ) ) )
; => (inc (inc (inc (+ 1 5))))
= > ( inc ( inc ( inc ( inc ( + ( dec 1 ) 5 ) ) ) )... | null | https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/sicp/v4/1.2/hzafar-1.2.rkt | racket | (+ 4 5)
=> (inc (+ 3 5))
=> (inc (inc (+ 2 5)))
=> (inc (inc (inc (+ 1 5))))
=> (inc (inc (inc (inc (+ 0 5)))))
=> (inc (inc (inc (inc 5))))
=> (inc (inc (inc 6)))
=> (inc (inc 7))
=> (inc 8)
This process is recursive.
(+ 4 5)
=> (+ 2 7)
=> (+ 1 8)
=> (+ 0 9)
This process is iterative.
(define (f n) (A ... | #lang racket
(require rackunit
rackunit/log)
1.9
= > ( inc ( + ( dec 4 ) 5 ) )
= > ( inc ( inc ( + ( dec 3 ) 5 ) ) )
= > ( inc ( inc ( inc ( + ( dec 2 ) 5 ) ) ) )
= > ( inc ( inc ( inc ( inc ( + ( dec 1 ) 5 ) ) ) ) )
= > 9
( + ( dec 4 ) ( inc 5 ) )
= > ( + 3 6 )
= > ( + ( dec 3 ) ( inc 6 )... |
448e7b5370acac60dc68c0442b259d7271556d1de62eae3e7ab1f1f87388354b | themattchan/advent-of-code | day7.hs | #! /usr/bin/env runhaskell -i../../
# LANGUAGE TypeApplications #
import qualified Data.Array as A
import qualified Data.Graph as G
import qualified Data.Map as M
import qualified Data.Set as S
import Utils
import Debug.Trace
type MyGraph = M.Map String (S.Set String)
buildGraph :: [String] -> (MyGraph, MyGraph)
buil... | null | https://raw.githubusercontent.com/themattchan/advent-of-code/0b08a4fbadf7e713d40044523af3debb7d0cb6b9/2018/day7/day7.hs | haskell | returns (still pending, avail)
traceShowId $
trace (" retS = "<> show retS) $ | #! /usr/bin/env runhaskell -i../../
# LANGUAGE TypeApplications #
import qualified Data.Array as A
import qualified Data.Graph as G
import qualified Data.Map as M
import qualified Data.Set as S
import Utils
import Debug.Trace
type MyGraph = M.Map String (S.Set String)
buildGraph :: [String] -> (MyGraph, MyGraph)
buil... |
288f449299479da6b3c28dce7038bfbc5d7921dd1215bc34f8c0198976e38a84 | ocamllabs/ocaml-modular-implicits | scanf.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/stdlib/scanf.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
open CamlinternalFormatBasics
open Cam... |
4d98a27672f83e8047cab4195eb99ac3e398a3a69cb514671a06314f1ca56a0d | mistupv/cauder-core | et_viewer.erl | %IMPORTANT
THIS FILE IS MODIFIED FROM et_viewer.erl OF OTP STANDARD LIBRARY FOR PARTIAL - ORDER GRAPHIC CHART
%%UNDER COPYRIGHT OF ERICSSON AB:
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2000 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%... | null | https://raw.githubusercontent.com/mistupv/cauder-core/b676fccd1bbd629eb63f3cb5259f7a9a8c6da899/src/et_viewer.erl | erlang | IMPORTANT
UNDER COPYRIGHT OF ERICSSON AB:
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KI... | THIS FILE IS MODIFIED FROM et_viewer.erl OF OTP STANDARD LIBRARY FOR PARTIAL - ORDER GRAPHIC CHART
Copyright Ericsson AB 2000 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
... |
f274302236760b465f3faf6d45c1c444d2831b45cb8044f2bfa99b605332d5fa | elaforge/karya | KendangPasang.hs | Copyright 2020
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
{-# LANGUAGE RecordWildCards, DeriveFunctor #-}
module Solkattu.Instrument.KendangPasang where
import qualified Derive.Expr as Expr
import qualified Derive.Symbols as Symbols
import quali... | null | https://raw.githubusercontent.com/elaforge/karya/07bdeac32293a18f9ce982fab18d2802ea26b962/Solkattu/Instrument/KendangPasang.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
# LANGUAGE RecordWildCards, DeriveFunctor #
* strokes
ka pak
kam pang
kum pung
de tut
* Patterns | Copyright 2020
module Solkattu.Instrument.KendangPasang where
import qualified Derive.Expr as Expr
import qualified Derive.Symbols as Symbols
import qualified Solkattu.Instrument.KendangTunggal as T
import qualified Solkattu.Realize as Realize
import qualified Solkattu.S as S
import qualified Solkattu.Solkattu as ... |
a7e66fe8f22657ef000e36ee7695972320eb138be2373897506acccf84cc370f | erlang-ls/erlang_ls | els_distribution_sup.erl | %%==============================================================================
%% Distribution Supervisor
It supervises the communication via Erlang distribution between the
%% Language Server Node and the Runtime Node.
%%==============================================================================
-module(els_dis... | null | https://raw.githubusercontent.com/erlang-ls/erlang_ls/2dfb48aca3879e5b44f6fd676f8349525262779f/apps/els_core/src/els_distribution_sup.erl | erlang | ==============================================================================
Distribution Supervisor
Language Server Node and the Runtime Node.
==============================================================================
==============================================================================
Behaviours
==... | It supervises the communication via Erlang distribution between the
-module(els_distribution_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
-spec start_link() -> {ok, pid()}.
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
-spec ini... |
a7f0b6c8f40e4f25346d7c6e3e0c0431f26997ef24aef5ecab79b906aaf15dbc | mokus0/misfortune | Fortune.hs | module Data.Fortune
( module Data.Fortune.FortuneFile
, module Data.Fortune.Index
, S.FortuneStats
, numFortunes
, minChars
, maxLines
, minLines
, maxChars
, listFortuneFiles
, listFortuneFilesIn
, findFortuneFile
, findFortuneFileIn
, ... | null | https://raw.githubusercontent.com/mokus0/misfortune/8d92614246c8e59137aba8250720aed97b6abbf8/src/Data/Fortune.hs | haskell | |The number of fortune strings in the index
|The smallest number of characters in any string in the index
|The greatest number of characters in any string in the index
|The smallest number of lines in any string in the index
|The greatest number of lines in any string in the index
list the full paths of all visib... | module Data.Fortune
( module Data.Fortune.FortuneFile
, module Data.Fortune.Index
, S.FortuneStats
, numFortunes
, minChars
, maxLines
, minLines
, maxChars
, listFortuneFiles
, listFortuneFilesIn
, findFortuneFile
, findFortuneFileIn
, ... |
01215ab71d02b6f51ae53f0510ea6f89d4cfe9f909f0561f8c6ca1ba3f357622 | reach-sh/reach-lang | DL.hs | # OPTIONS_GHC -Wno - missing - export - lists #
module Reach.AST.DL where
import qualified Data.Map.Strict as M
import qualified Data.Sequence as Seq
import qualified Data.Set as S
import GHC.Generics
import Reach.AST.Base
import Reach.AST.DLBase
import Reach.Connector
import Reach.Counter
import Reach.Pretty
import ... | null | https://raw.githubusercontent.com/reach-sh/reach-lang/f79282c49705c66fc10489045d502d17621d60c5/hs/src/Reach/AST/DL.hs | haskell | # OPTIONS_GHC -Wno - missing - export - lists #
module Reach.AST.DL where
import qualified Data.Map.Strict as M
import qualified Data.Sequence as Seq
import qualified Data.Set as S
import GHC.Generics
import Reach.AST.Base
import Reach.AST.DLBase
import Reach.Connector
import Reach.Counter
import Reach.Pretty
import ... | |
0cfe4b82598cb831e788a257e351d275e9f7c6401391d9aa96cef8bde133d3bc | metosin/reitit | project.clj | (defproject ring-example "0.1.0-SNAPSHOT"
:description "Reitit Ring App with Swagger"
:dependencies [[org.clojure/clojure "1.10.0"]
[ring/ring-jetty-adapter "1.7.1"]
[metosin/reitit "0.6.0"]]
:repl-options {:init-ns example.server}
:profiles {:dev {:dependencies [[ring/ring-moc... | null | https://raw.githubusercontent.com/metosin/reitit/47f1ee0c8407cdc6a6dbf7bf58b6eb682531a3f7/examples/ring-spec-swagger/project.clj | clojure | (defproject ring-example "0.1.0-SNAPSHOT"
:description "Reitit Ring App with Swagger"
:dependencies [[org.clojure/clojure "1.10.0"]
[ring/ring-jetty-adapter "1.7.1"]
[metosin/reitit "0.6.0"]]
:repl-options {:init-ns example.server}
:profiles {:dev {:dependencies [[ring/ring-moc... | |
069f52c4c2b644f04cc28bf35e0583a14077c56b6e8b0eae10eb59f0f7f53aea | malcolmsparks/plugboard | conneg.clj | This has been copied from the Clojure library .
;;; TODO@online: Need to check license and add proper attribution.
;;;
;;; TODO: sort by level for text/html. Maybe also sort by charset.
;;; Finally, compare by precedence rules:
;;; 1) text/html;level=1
;;; 2) text/html
;;; 3) text/*
;;; 4) */*
;;;
(ns p... | null | https://raw.githubusercontent.com/malcolmsparks/plugboard/c1e78afc5dde60b08b48020c6f3ef800f05d1ada/src/main/clojure/plugboard/core/conneg.clj | clojure | TODO@online: Need to check license and add proper attribution.
TODO: sort by level for text/html. Maybe also sort by charset.
Finally, compare by precedence rules:
1) text/html;level=1
2) text/html
3) text/*
4) */*
Otherwise, maybe one has a star.
Set of strings or pairs. true/nil/:all for any. | This has been copied from the Clojure library .
(ns plugboard.core.conneg
(:require [clojure.string :as string]))
(def accept-fragment-re
: { } ] + ) $ " )
(def accept-fragment-param-re
: { } ] + |\"[^\"]*\")$ " )
(defn- clamp [minimum maximum val]
(min maximum
(max minimum val)))
(defn... |
56aac756bbc1fe8f54894dfc0f9c180d169aa57c723943ecbead7822db8f1705 | realworldocaml/book | main.ml | Util.log _STRING_
| null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/test/blackbox-tests/test-cases/describe-pp.t/src/main.ml | ocaml | Util.log _STRING_
| |
3ed31ba7baa0192a88443c799f943eb2a47efb622cc6aa49f6e3de6d31a47915 | wargrey/w3s | sugar.rkt | #lang typed/racket/base
(provide (all-defined-out))
(require "digitama/syntax/misc.rkt")
(require "syntax.rkt")
(require "font.rkt")
(require "color.rkt")
(require "image.rkt")
(require (for-syntax racket/base))
(require (for-syntax racket/syntax))
(require (for-syntax syntax/parse))
(define-type Font+Color (Pairof... | null | https://raw.githubusercontent.com/wargrey/w3s/27e640afad6d85d1c870bebdd9eeeec6ce883787/css/sugar.rkt | racket | #lang typed/racket/base
(provide (all-defined-out))
(require "digitama/syntax/misc.rkt")
(require "syntax.rkt")
(require "font.rkt")
(require "color.rkt")
(require "image.rkt")
(require (for-syntax racket/base))
(require (for-syntax racket/syntax))
(require (for-syntax syntax/parse))
(define-type Font+Color (Pairof... | |
963bbf17d23dc854aba2cf4f9016eef20b47556f27e8f6edd78fb38fbc93bbde | omariosouto/learnin-public-clojure | dev.cljs | (ns ^:figwheel-no-load pokebank-ui.dev
(:require
[pokebank-ui.core :as core]
[devtools.core :as devtools]))
(extend-protocol IPrintWithWriter
js/Symbol
(-pr-writer [sym writer _]
(-write writer (str "\"" (.toString sym) "\""))))
(devtools/install!)
(enable-console-print!)
(core/init!)
| null | https://raw.githubusercontent.com/omariosouto/learnin-public-clojure/bb66040ef397d4d6e8275330acdd553bbf850a39/projects/pokebank-ui/env/dev/cljs/pokebank_ui/dev.cljs | clojure | (ns ^:figwheel-no-load pokebank-ui.dev
(:require
[pokebank-ui.core :as core]
[devtools.core :as devtools]))
(extend-protocol IPrintWithWriter
js/Symbol
(-pr-writer [sym writer _]
(-write writer (str "\"" (.toString sym) "\""))))
(devtools/install!)
(enable-console-print!)
(core/init!)
| |
f228623a66a6ff67ea379aaf9d7b3c364e3287440608160607fb567d0496d7bf | lpeterse/haskell-ssh | Server.hs | module Network.SSH.Server (
-- * Server
runServer
, ServerConfig (..)
-- * Network layer
, SocketConfig (..)
-- * Authentication Layer
, UserAuthConfig (..)
-- * Connection Layer
, ConnectionConfig (..)
-- ** Session
, SessionHandler (..)
-- ** Direct TCP/IP
, Direc... | null | https://raw.githubusercontent.com/lpeterse/haskell-ssh/d1a614b6bf30c4932ee5a66efcae6e71680b4819/src/hssh/Network/SSH/Server.hs | haskell | * Server
* Network layer
* Authentication Layer
* Connection Layer
** Session
** Direct TCP/IP
** Forwarded TCP/IP | module Network.SSH.Server (
runServer
, ServerConfig (..)
, SocketConfig (..)
, UserAuthConfig (..)
, ConnectionConfig (..)
, SessionHandler (..)
, DirectTcpIpHandler (..)
, Switchboard
, StreamHandler (..)
, newSwitchboard
, getForwardings
, connect
) where
import... |
62ce44d50e03c7c004bbbe87f1e8924988651764a0cad2cbf987dc600c078c7e | input-output-hk/cardano-ledger | Translation.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUA... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/1c2f8aab38d7e22166209aba232e39b6aa5a55b2/eras/conway/impl/src/Cardano/Ledger/Conway/Translation.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
------------------------------------------------------------------------------
The instances below are needed by the consensus layer. Do not remove any of
them without coordinating with consensus.
Please add auxiliary instances and other declarations... | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Cardano.... |
d6ba520b7016b5182956469b827d7d782206c54addf13d217e2c4d085b32abee | haskell/haskell-language-server | GoldenArbitrarySingleConstructor.expected.hs | data Gen a
data Obj = Obj Int Bool Char String
arbitrary :: Gen Obj
arbitrary
= (((Obj <$> arbitrary) <*> arbitrary) <*> arbitrary) <*> arbitrary | null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/GoldenArbitrarySingleConstructor.expected.hs | haskell | data Gen a
data Obj = Obj Int Bool Char String
arbitrary :: Gen Obj
arbitrary
= (((Obj <$> arbitrary) <*> arbitrary) <*> arbitrary) <*> arbitrary | |
87645e412daad4be61947955674910bdec0e1173cd66f713006e16382032f145 | nnichols/nature | spec.cljc | (ns nature.spec
"Common specs/api checks for core nature functions"
(:require [clojure.spec.alpha :as s]))
(defn not-empty?
"A predicate version of not-empty, because it's a sensible feature"
[coll]
(boolean (seq coll)))
(s/def ::genetic-sequence
(s/and coll?
not-empty?))
(s/def ::guid string?)
... | null | https://raw.githubusercontent.com/nnichols/nature/6cc1e9f0627b330245602773313b8c60630d3330/src/nature/spec.cljc | clojure | (ns nature.spec
"Common specs/api checks for core nature functions"
(:require [clojure.spec.alpha :as s]))
(defn not-empty?
"A predicate version of not-empty, because it's a sensible feature"
[coll]
(boolean (seq coll)))
(s/def ::genetic-sequence
(s/and coll?
not-empty?))
(s/def ::guid string?)
... | |
07603941bf7651906e9a7c72c47dfecebefc43ef0da0ff93153e16b93f88c3c4 | chanshunli/wechat-clj | util.cljs | (ns mini-program-cljs.util
(:require-macros [mini-program-cljs.macro
:refer [call-promise-1 defn-js c-log]])
(:require
[mini-program-cljs.js-wx :refer [js-wx] :as jswx]
[clojure.string :as str]))
(defn jsx->clj
[x]
(into {} (for [k (.keys js/Object x)] [(keyword k) (aget x k)])))
(co... | null | https://raw.githubusercontent.com/chanshunli/wechat-clj/145a99825669b743a09a8565fa1301d90480c91b/mini-program-cljs/src/main/mini_program_cljs/util.cljs | clojure | (if (= (str "/" (get-current-route)) url)
(js/console.log "在当前页面,不需要跳转")
(js-wx "navigateTo"
#js {:url url}))
不知为何无效
ok test
js-wx方法测试很不错!
=> 能打印出来扫出来的码 | (ns mini-program-cljs.util
(:require-macros [mini-program-cljs.macro
:refer [call-promise-1 defn-js c-log]])
(:require
[mini-program-cljs.js-wx :refer [js-wx] :as jswx]
[clojure.string :as str]))
(defn jsx->clj
[x]
(into {} (for [k (.keys js/Object x)] [(keyword k) (aget x k)])))
(co... |
375cd158782300ec2eedac988aebfa58249575a16376a85e223ea595ea2f5e8a | mekispeter/haskell2019spring | zalan.hw2.hs | --Cool! :) It'd be nice to see functions of your own, as well. MP
ld :: Int -> Int
ld n = auxLd n 2
where
auxLd :: Int -> Int -> Int
auxLd n k
| rem n k == 0 = k
| otherwise = auxLd n (k+1)
isprime :: Int -> Bool
isprime 1 = False
isprime n = ld n == n
nextprime :: Int -> Int
nextprime n
|... | null | https://raw.githubusercontent.com/mekispeter/haskell2019spring/18fa81092cdc7a15c8ef92a2eff8274dfe79d00d/homeworks/zalan/zalan.hw2.hs | haskell | Cool! :) It'd be nice to see functions of your own, as well. MP
also defining with the syntactic way:
some auxiliary function for defining binary pred, succ, add, mult
- |
ld :: Int -> Int
ld n = auxLd n 2
where
auxLd :: Int -> Int -> Int
auxLd n k
| rem n k == 0 = k
| otherwise = auxLd n (k+1)
isprime :: Int -> Bool
isprime 1 = False
isprime n = ld n == n
nextprime :: Int -> Int
nextprime n
| isprime (n + 1) = n + 1
| otherwise = nextprime (n + 1)
... |
7d4080454b3a49795336f739d1ba607bc1b4a1e225275d7e278e0137d4387ea4 | Eduap-com/WordMat | dheqr.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/odepack/src/dheqr.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp snapshot-2013-11 (20E Unicode)
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format single-float)) | ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ "
" f2cl6.l , v 1d5cbacbb9... |
5aea97b03460183a52274f6b37d9c9e4a69708c7d81e9a85abc8ad845f20733f | verystable/warframe-autobuilder | HeatModMultiplier.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
-- |
Module : ComprehensiveWeapon . ModMultiplierFunctions . HeatModMultiplier
-- Maintainer : verystable <>
-- Stability : stable
--
-- This module contains 'heatModMultiplier' that returns heat damage'... | null | https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/ComprehensiveWeapon/ModMultiplierFunctions/HeatModMultiplier.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
|
Maintainer : verystable <>
Stability : stable
This module contains 'heatModMultiplier' that returns heat damage's mod multiplier
on a generic weapon build.
| Finds the electricity multiplier of a rifle build
| Finds the electricity multiplier ... | # LANGUAGE NoImplicitPrelude #
Module : ComprehensiveWeapon . ModMultiplierFunctions . HeatModMultiplier
module ComprehensiveWeapon.ModMultiplierFunctions.HeatModMultiplier where
import ClassyPrelude
import Types.GeneralTypes
heatModMultiplierRifles :: Mods -> Maybe Float
heatModMultip... |
047854d41800975a232c95d6c245e7f37904f536bb487b27264e10a2368ef785 | okuoku/nausicaa | make-macro.sps | ;;;
Part of : / Scheme
;;;Contents: just a proof for a make macro object systems
Date : Sun Jul 5 , 2009
;;;
;;;Abstract
;;;
;;;
;;;
Copyright ( c ) 2009 < >
;;;
;;;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 ... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/src/proof/make-macro.sps | scheme |
Contents: just a proof for a make macro object systems
Abstract
This program is free software: you can redistribute it
and/or modify it under the terms of the GNU General Public
version.
This program is distributed in the hope that it will be
useful, but WITHOUT ANY WARRANTY; without even the impl... | Part of : / Scheme
Date : Sun Jul 5 , 2009
Copyright ( c ) 2009 < >
License as published by the Free Software Foundation , either
version 3 of the License , or ( at your option ) any later
(import (rnrs))
(define (%make-instance class-name class . slots)
(write (list class-name class slots))
(newl... |
a4039485ae49845f97b2f2b78e92e5c36634789a28fbf5580a68318df961875e | roswell/roswell | update-quicklisp.lisp | (roswell:include "util")
(defpackage :roswell.update.quicklisp
(:use :cl :roswell.util))
(in-package :roswell.update.quicklisp)
(defun quicklisp (&rest r)
(ql:update-client :prompt nil)
(cond
((or (second r)
(and (first r)
(zerop (count-if-not
(lambda (x) (or (dig... | null | https://raw.githubusercontent.com/roswell/roswell/0107dfb54393aff1a776deb79d58f67f642135cb/lisp/update-quicklisp.lisp | lisp | (roswell:include "util")
(defpackage :roswell.update.quicklisp
(:use :cl :roswell.util))
(in-package :roswell.update.quicklisp)
(defun quicklisp (&rest r)
(ql:update-client :prompt nil)
(cond
((or (second r)
(and (first r)
(zerop (count-if-not
(lambda (x) (or (dig... | |
083f352c946478f8017eabb0efeb812e5efa6854ab813c433e290c327da84029 | maximedenes/native-coq | decl_interp.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/plugins/decl_mode/decl_interp.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
INTERN
INTERP | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Errors
open Util
open Na... |
c9502c852f71a742d879600a6f22e7171eed9a7b538f3c6e9312a66317966368 | babashka/babashka | core_check.clj | (ns msgpack.core-check
(:require [msgpack.core :as msg]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]))
NaN is never equal to itself
(defn- not-nan [x]
(not (Double/isNaN x)))
(defn- pack-an... | null | https://raw.githubusercontent.com/babashka/babashka/df912799674dd7c61535c18ad22fb2ef57fc27bd/test-resources/lib_tests/msgpack/core_check.clj | clojure | (ns msgpack.core-check
(:require [msgpack.core :as msg]
[clojure.test.check.clojure-test :refer [defspec]]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]))
NaN is never equal to itself
(defn- not-nan [x]
(not (Double/isNaN x)))
(defn- pack-an... | |
030dfc2d157f41a70520dbb0679ff722f72320bc4479a828b5be8d3c56b1f212 | ekarayel/sync-mht | CommTypes.hs | module Sync.MerkleTree.CommTypes where
import Control.Monad.Trans
import Data.ByteString (ByteString)
import Data.Bytes.Serial
import Data.Set (Set)
import qualified Data.Text as T
import Data.Time.Clock
import GHC.Generics
import Sync.MerkleTree.Trie
import Sync.MerkleTree.Types
import Sync.MerkleTree.Util.Progress
... | null | https://raw.githubusercontent.com/ekarayel/sync-mht/57d724781fad9eed4e57b4e4f8416633605bdb4b/src/Sync/MerkleTree/CommTypes.hs | haskell | | Configuration shared by both the client and server. | module Sync.MerkleTree.CommTypes where
import Control.Monad.Trans
import Data.ByteString (ByteString)
import Data.Bytes.Serial
import Data.Set (Set)
import qualified Data.Text as T
import Data.Time.Clock
import GHC.Generics
import Sync.MerkleTree.Trie
import Sync.MerkleTree.Types
import Sync.MerkleTree.Util.Progress
... |
17f1a411ff99a76f213d5f3799f27b95084603a86d9ea58b869046117a30fa8f | hyperfiddle/electric | hfql13.clj | (ns dustin.hfql13
"macro wrapper for syntax"
(:refer-clojure :exclude [eval])
(:require
[dustin.fiddle :refer :all]
[dustin.hf-nav :refer :all]
[dustin.monad-scope :refer [runScope pure bind fmap]]
[meander.epsilon :as m :refer [match rewrite]]
[minitest :refer [tests]]))
(defn hf-edge->sym ... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2020/hfql/hfql13.clj | clojure | name?
recursive bind
why do we see the ident in scope here
Tests use hf-pull! runner to test what matters, the result, as I de-bug the scope monad
ClassCastException
query
scope
result
:db/id is a self reference so this actually is coherent | (ns dustin.hfql13
"macro wrapper for syntax"
(:refer-clojure :exclude [eval])
(:require
[dustin.fiddle :refer :all]
[dustin.hf-nav :refer :all]
[dustin.monad-scope :refer [runScope pure bind fmap]]
[meander.epsilon :as m :refer [match rewrite]]
[minitest :refer [tests]]))
(defn hf-edge->sym ... |
60237c05fc9b37ef10073ddc1acba013a276047f0beae3155ce7e86b1fd9e841 | pietervdvn/ALGT | RuleParser.hs | module TypeSystem.Parser.RuleParser where
import Utils.Utils
import TypeSystem.Parser.ParsingUtils
import qualified TypeSystem.Parser.ExpressionParser as EP
import TypeSystem.Parser.ExpressionParser (MEParseTree, typeAs)
import Control.Monad
import TypeSystem.TypeSystemData hiding (relTypes)
import Text.Parsec
im... | null | https://raw.githubusercontent.com/pietervdvn/ALGT/43a2811931be6daf1362f37cb16f99375ca4999e/src/TypeSystem/Parser/RuleParser.hs | haskell | expressions in rules can also use unicode and other weird stuff as identifier
possible relation symbols | module TypeSystem.Parser.RuleParser where
import Utils.Utils
import TypeSystem.Parser.ParsingUtils
import qualified TypeSystem.Parser.ExpressionParser as EP
import TypeSystem.Parser.ExpressionParser (MEParseTree, typeAs)
import Control.Monad
import TypeSystem.TypeSystemData hiding (relTypes)
import Text.Parsec
im... |
ace4bb96dfe708dfa65d48f61da85bd23a9f64ecd787f391ca02fdfe44585f39 | aistrate/Okasaki | LazyPairingHeap.hs | -- Source code from
-- Purely Functional Data Structures
Cambridge University Press , 1998
--
Copyright ( c ) 1998 Cambridge University Press
module LazyPairingHeap (module Heap, PairingHeap) where
import Heap
data PairingHeap a = E | T a (PairingHeap a) (PairingHeap a)
link (T x E m) a = T x a m... | null | https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/Original/LazyPairingHeap.hs | haskell | Source code from
Purely Functional Data Structures
|
Cambridge University Press , 1998
Copyright ( c ) 1998 Cambridge University Press
module LazyPairingHeap (module Heap, PairingHeap) where
import Heap
data PairingHeap a = E | T a (PairingHeap a) (PairingHeap a)
link (T x E m) a = T x a m
link (T x b m) a = T x E (merge (merge a b) m)
instance ... |
cdce09263bb66d1e4109fa034b2101daa2e10ee87339b279dfb04b3c5582f7dd | emqx/emqx | emqx_htb_limiter.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/src/emqx_limiter/src/emqx_htb_limiter.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_htb_limiter).
-export([
make_token_bucket_limiter/2,
make_ref_limiter/2,
... |
689602674e0f96a6ae19c336afbd2c644dbfe3e5ca99c84f97413e78462a68fa | rodentrabies/bp | random.lisp | (uiop:define-package :bp/crypto/random (:use :cl)
(:export
#:random-bytes))
(in-package :bp/crypto/random)
(defun random-bytes (size)
(let ((buffer (make-array size :element-type '(unsigned-byte 8))))
(with-open-file (urandom "/dev/urandom" :element-type '(unsigned-byte 8))
(read-sequence buffer uran... | null | https://raw.githubusercontent.com/rodentrabies/bp/d7cedb461ea7c7da30f7f65e17a87935965186d5/crypto/random.lisp | lisp | (uiop:define-package :bp/crypto/random (:use :cl)
(:export
#:random-bytes))
(in-package :bp/crypto/random)
(defun random-bytes (size)
(let ((buffer (make-array size :element-type '(unsigned-byte 8))))
(with-open-file (urandom "/dev/urandom" :element-type '(unsigned-byte 8))
(read-sequence buffer uran... | |
d6258f04206ea059b50c1c25938b1f78f7979fe1e29ae11b63e5dd20b6051eb3 | TyOverby/mono | vdom_input_widgets.ml | open Core
open Virtual_dom.Vdom
include Vdom_input_widgets_intf
module Decimal = struct
type t = float
let invariant t =
if not (Float.is_finite t)
then failwithf "Cannot represent non-finite float as decimal: %f" t ()
;;
let of_string s =
let t = Float.of_string s in
invariant t;
t
;;
... | null | https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/janestreet-virtual_dom/input_widgets/src/vdom_input_widgets.ml | ocaml | This event handler normalizes the value on the input element on the [change] event.
For a text entry, this means when the user presses enter, and when the user blurs
the element. Why don't we simply [to_string] the value in the model? Because for
some input elements, you can have a change event th... | open Core
open Virtual_dom.Vdom
include Vdom_input_widgets_intf
module Decimal = struct
type t = float
let invariant t =
if not (Float.is_finite t)
then failwithf "Cannot represent non-finite float as decimal: %f" t ()
;;
let of_string s =
let t = Float.of_string s in
invariant t;
t
;;
... |
92a1faac6abca33a2890f62e462e3fc30ab5f892e08979dfd2eafc039ace441c | david-christiansen/dan-scheme | info.rkt | #lang info
(define collection "dan-scheme")
(define version "0.1")
(define deps '("base" "rackunit-lib"))
(define build-deps '("scribble-lib" "racket-doc"))
(define scribblings '(("scribblings/dan-scheme.scrbl" ())))
(define pkg-desc "A very little language for situations where simplicity is desired over convenience")
| null | https://raw.githubusercontent.com/david-christiansen/dan-scheme/289e8cb903a24b2e1939a8556c164589a0e293e5/info.rkt | racket | #lang info
(define collection "dan-scheme")
(define version "0.1")
(define deps '("base" "rackunit-lib"))
(define build-deps '("scribble-lib" "racket-doc"))
(define scribblings '(("scribblings/dan-scheme.scrbl" ())))
(define pkg-desc "A very little language for situations where simplicity is desired over convenience")
| |
a4e473a982501ab67fa91475d0602bdfdaeb894791f97167c35169b9ab9cc029 | vyorkin/tiger | test.ml | open Core
open Alcotest
open Ch6
let run_file fn ch =
let lexbuf = Lexbuf.mk fn ch in
try
let expr = Parser.main Lexer.read lexbuf in
Escape.traverse_prog expr;
Semant.trans_prog expr;
pass
with
| Lexer.LexingError msg ->
fail @@ Lexbuf.pos lexbuf ^ " : " ^ msg
| Parser.Error ->
fail... | null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter6/test/test.ml | ocaml | open Core
open Alcotest
open Ch6
let run_file fn ch =
let lexbuf = Lexbuf.mk fn ch in
try
let expr = Parser.main Lexer.read lexbuf in
Escape.traverse_prog expr;
Semant.trans_prog expr;
pass
with
| Lexer.LexingError msg ->
fail @@ Lexbuf.pos lexbuf ^ " : " ^ msg
| Parser.Error ->
fail... | |
49bfced72146ed347b6b01392a948b095b99f29f1e2af2643ab53bb41ae527a2 | elastic/apm-agent-ocaml | reporter.ml | type t = {
mutable metadata_logged : bool;
metadata : Elastic_apm.Metadata.t;
src : Logs.src;
log : (module Logs.LOG);
}
let pp_request ppf request =
let json = Elastic_apm.Request.yojson_of_t request in
Format.fprintf ppf "%s" (Yojson.Safe.to_string json)
;;
let push t (request : Elastic_apm.Request.t) =... | null | https://raw.githubusercontent.com/elastic/apm-agent-ocaml/6eb74081abedc949cfe0fa548ca4396e76540f63/logs_reporter/reporter.ml | ocaml | type t = {
mutable metadata_logged : bool;
metadata : Elastic_apm.Metadata.t;
src : Logs.src;
log : (module Logs.LOG);
}
let pp_request ppf request =
let json = Elastic_apm.Request.yojson_of_t request in
Format.fprintf ppf "%s" (Yojson.Safe.to_string json)
;;
let push t (request : Elastic_apm.Request.t) =... | |
e4a22296f9f5fbbe98654ff0dc76866669ccf3b0c4e8c8e427641089c243700d | onyx-platform/onyx | balanced_grouping_generative_test.clj | (ns onyx.scheduler.balanced-grouping-generative-test
(:require [onyx.log.generators :as log-gen]
[onyx.extensions :as extensions]
[onyx.system]
[onyx.api :as api]
[onyx.static.planning :as planning]
[onyx.test-helper :refer [job-allocation-counts]]
... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/scheduler/balanced_grouping_generative_test.clj | clojure | (ns onyx.scheduler.balanced-grouping-generative-test
(:require [onyx.log.generators :as log-gen]
[onyx.extensions :as extensions]
[onyx.system]
[onyx.api :as api]
[onyx.static.planning :as planning]
[onyx.test-helper :refer [job-allocation-counts]]
... | |
a2170e13ebeb6947a0c8a8ff4e1ff990bda1386627028266a9cef7600b4d3b35 | nikita-volkov/domain | TypeString.hs | module Domain.Models.TypeString
where
import Domain.Prelude
type CommaSeq =
[AppSeq]
type AppSeq =
NonEmpty Unit
data Unit =
InSquareBracketsUnit AppSeq |
InParensUnit CommaSeq |
RefUnit (NonEmpty Text)
deriving (Show)
| null | https://raw.githubusercontent.com/nikita-volkov/domain/1f140a8981cc604c52ebd02f9f8f773345e766b8/library/Domain/Models/TypeString.hs | haskell | module Domain.Models.TypeString
where
import Domain.Prelude
type CommaSeq =
[AppSeq]
type AppSeq =
NonEmpty Unit
data Unit =
InSquareBracketsUnit AppSeq |
InParensUnit CommaSeq |
RefUnit (NonEmpty Text)
deriving (Show)
| |
f952af157cf6b71c701f1dc78c523d99c189ecd5e077355e256512e8f8d757ae | albertoruiz/easyVision | Geometry.hs | # LANGUAGE FlexibleInstances , FlexibleContexts #
# LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE UndecidableInstances #
# LANGUAGE CPP #
---------------------------------------------------------... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/base/src/Util/Geometry.hs | haskell | # LANGUAGE TypeSynonymInstances #
---------------------------------------------------------------------------
---------------------------------------------------------------------------
* Basic Types
* Transformations
* Geometric constructions
* Conversion
* Derived types
------------------------------------------... | # LANGUAGE FlexibleInstances , FlexibleContexts #
# LANGUAGE TypeOperators #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE FunctionalDependencies #
# LANGUAGE UndecidableInstances #
# LANGUAGE CPP #
|
Module : Util . Geometry
Copyright : ( c ) 2006 - 12
License : ... |
66f34dcb00f841516d03228d47bdac19b8749a3221b0c211feefebc32ee15bdd | onedata/op-worker | datastore_remote_driver.erl | %%%-------------------------------------------------------------------
@author
( C ) 2017 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module implements remote_driv... | null | https://raw.githubusercontent.com/onedata/op-worker/b0e4045090b180f28c79d40b9b334d7411ec3ca5/src/modules/datastore/datastore_remote_driver.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module implements remote_driver behaviour and enables fetching
documents stored on remote providers.
@end
----------------------------------------------------------... | @author
( C ) 2017 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(datastore_remote_driver).
-author("Krzysztof Trzepla").
-behavior(remote_driver).
-include("proto/oneclient/fuse_messages.hrl").
-include("proto/oneclient/server_messages.hrl").
-include("p... |
649d5f981bc1e88c07eeb214157230c4cf475c0b104f486c51f8b4cd41e1e6a5 | ChrisTitusTech/gimphelp | 210_photo_BlueSkyClouds.scm | 210_photo_BlueSkyClouds.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
;==================================================
;
; Installation:
; This script should be placed in the user or system-wide script folder.
;
; Windows 7/10
C:\Program Files\GIMP 2\share\gimp\2.0\s... | null | https://raw.githubusercontent.com/ChrisTitusTech/gimphelp/fdbc7e3671ce6bd74cefd83ecf7216e5ee0f1542/gimp_scripts-2.10/210_photo_BlueSkyClouds.scm | scheme | ==================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 7/10
or
Linux
/home/yourname/.config/GIMP/2.10/scripts
or
Linux system-wide
/usr/share/gimp/2.0/scripts
====================================... | 210_photo_BlueSkyClouds.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts
it under the terms of the GNU General Public License as published by
the Free Software... |
895097d94f61f73bb78e505424c9e61ed11f35e584f441589a95a15ad288ae47 | setzer22/jena-clj | project.clj | (defproject jena-clj "0.1.0"
:description "An idiomatic Clojure wrapper to the Jena API"
:url "-clj"
:repositories {"mvnrepository" {:url "/"}
"jenarepo" {:url "/"}}
:license {:name "GNU General Public License v3.0"
:url "-3.0.en.html"}
:dependencies [[org.clojure/clojure "1.8.0"... | null | https://raw.githubusercontent.com/setzer22/jena-clj/3720efbe77dccd53a5a90c4cd5707398a7e6abba/project.clj | clojure | (defproject jena-clj "0.1.0"
:description "An idiomatic Clojure wrapper to the Jena API"
:url "-clj"
:repositories {"mvnrepository" {:url "/"}
"jenarepo" {:url "/"}}
:license {:name "GNU General Public License v3.0"
:url "-3.0.en.html"}
:dependencies [[org.clojure/clojure "1.8.0"... | |
c23804d02d0a2493c92616caa2298c7594ea2ac235aa45110a524a9fc0597b7e | clojurewerkz/support | string.clj | (ns clojurewerkz.support.string
(:require [clojure.string :as s])
(:import java.nio.ByteBuffer))
;;
;; Implementation
;;
(def ^{:const true} camel-case-splitter "(?<=[A-Z])(?=[A-Z][a-z])|(?<=[^A-Z])(?=[A-Z])")
;;
;; API
;;
(defn ^String truncate
([^String s ^long length]
(if (> length (count s))
... | null | https://raw.githubusercontent.com/clojurewerkz/support/33d28084829f6ccb6aed870a357fa6b53c57d2cc/src/clojure/clojurewerkz/support/string.clj | clojure |
Implementation
API
| (ns clojurewerkz.support.string
(:require [clojure.string :as s])
(:import java.nio.ByteBuffer))
(def ^{:const true} camel-case-splitter "(?<=[A-Z])(?=[A-Z][a-z])|(?<=[^A-Z])(?=[A-Z])")
(defn ^String truncate
([^String s ^long length]
(if (> length (count s))
s
(.substring s 0 length)))
... |
12493e84f15d85402fbd8c89a62ea43426229861c4c5f9c8a23614a84c8be73d | racket/honu | language.rkt | #lang racket/base
;; This module provides some functions used for metadata about the language
(provide honu-info)
(define (honu-info key default default-filter)
( printf " get info for ~a\n " key )
(case key
[(color-lexer) (dynamic-require 'honu/core/read
'color-lexer)]
... | null | https://raw.githubusercontent.com/racket/honu/b36b9aeda8be22bf7fda177e831f42ac1a1de79b/honu/core/language.rkt | racket | This module provides some functions used for metadata about the language | #lang racket/base
(provide honu-info)
(define (honu-info key default default-filter)
( printf " get info for ~a\n " key )
(case key
[(color-lexer) (dynamic-require 'honu/core/read
'color-lexer)]
[else
(default-filter key default)]))
(provide honu-language-info)
(... |
76e54e5d26536ee6d5eed18716791818f343f33bcf5d83abe598c9368e0f2f14 | lemmaandrew/CodingBatHaskell | theEnd.hs | From
Given a string , return a string length 1 from its front , unless front is false , in
which case return a string length 1 from its back . The string will be non - empty .
Given a string, return a string length 1 from its front, unless front is false, in
which case return a string length 1 from its back. ... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-1/theEnd.hs | haskell | From
Given a string , return a string length 1 from its front , unless front is false , in
which case return a string length 1 from its back . The string will be non - empty .
Given a string, return a string length 1 from its front, unless front is false, in
which case return a string length 1 from its back. ... | |
9982c52b886e0e4ad1b9b913fe98076f52b729495c39e9c0089054c9c0133a1d | PacktPublishing/Data-Analysis-with-IBM-SPSS-Statistics | PCAexamplecode.sps | * Encoding: UTF-8.
GET
FILE='C:\Users\tbabinec\Documents\KSBSPSSBOOK_DATA\chapterPCAandFA\CrimeStatebyState.sav'.
DATASET NAME DataSet1 WINDOW=FRONT.
DATASET ACTIVATE DataSet1.
*.
*Chapter 14 Figure 1. Syntax not shown in the chapter.
DESCRIPTIVES VARIABLES=MurderandManslaughterRate RevisedRapeRate RobberyRate Agg... | null | https://raw.githubusercontent.com/PacktPublishing/Data-Analysis-with-IBM-SPSS-Statistics/1edd4c1dce8dc0a3ebce093bbac37c94ebbb63e9/Chapter14/PCAexamplecode.sps | scheme | * Encoding: UTF-8.
GET
FILE='C:\Users\tbabinec\Documents\KSBSPSSBOOK_DATA\chapterPCAandFA\CrimeStatebyState.sav'.
DATASET NAME DataSet1 WINDOW=FRONT.
DATASET ACTIVATE DataSet1.
*.
*Chapter 14 Figure 1. Syntax not shown in the chapter.
DESCRIPTIVES VARIABLES=MurderandManslaughterRate RevisedRapeRate RobberyRate Agg... | |
192e35beb83c2bdfe149001711fa15c887addcb865a3963f840b77f2c2af4aea | wdebeaum/step | sponsor.lisp | ;;;;
;;;; W::sponsor
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
; )
(W::sponsor
(SENSES
((LF-PARENT ONT::benefactor) ;professional)
(EXAMPLE "confirm the sponsor name")
(meta-data :origin plot :entry-date 20080812 :change-date nil :comments nil)
)
)
)
))
(define-w... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/sponsor.lisp | lisp |
W::sponsor
)
professional) |
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::sponsor
(SENSES
(EXAMPLE "confirm the sponsor name")
(meta-data :origin plot :entry-date 20080812 :change-date nil :comments nil)
)
)
)
))
(define-words :pos W::v :TEMPL AGENT-AFFECTED-XP-NP-TEMPL
:words (
(W::sponsor
(SEN... |
b1c47c3e1e7de1dc7071a5eab0473973ad729cad66074e01ad931f8a1256b185 | roblaing/erlang-webapp-howto | ping.erl | -module(ping).
-export([client/0, ping/3]).
client() ->
{ok, Pid} = gun:open("localhost", 3031),
{ok, _} = gun:await_up(Pid),
StreamRef = gun:ws_upgrade(Pid, "/pong"),
{upgrade, [<<"websocket">>], _} = gun:await(Pid, StreamRef),
ping(3, Pid, StreamRef),
gun:shutdown(Pid).
ping(0, _, _) ->
io:format("Pin... | null | https://raw.githubusercontent.com/roblaing/erlang-webapp-howto/e1731dfc4e2cfdfee88e982d67155b83acd5cc04/unit7/apps/unit7/src/ping.erl | erlang | -module(ping).
-export([client/0, ping/3]).
client() ->
{ok, Pid} = gun:open("localhost", 3031),
{ok, _} = gun:await_up(Pid),
StreamRef = gun:ws_upgrade(Pid, "/pong"),
{upgrade, [<<"websocket">>], _} = gun:await(Pid, StreamRef),
ping(3, Pid, StreamRef),
gun:shutdown(Pid).
ping(0, _, _) ->
io:format("Pin... | |
47756549ab10a1aed576c9820b64cdb6e2906a21ea5e10845c885b1fb532976b | jamhed/fswitch | call_sup.erl | -module(call_sup).
-include_lib("fswitch/include/fswitch.hrl").
-behaviour(gen_server).
accept and distribute to erlang processes fs calls , either inbound or outbound
-export([
start_link/1, start_link/0, uuid/0, originate/4, originate/3, originate/2, wait_call/0,
set/3, vars/1, variables/1, get/1, on_hangup/1, ... | null | https://raw.githubusercontent.com/jamhed/fswitch/6403296a092581410fefd8de45641dc811233f25/src/call_sup.erl | erlang | -module(call_sup).
-include_lib("fswitch/include/fswitch.hrl").
-behaviour(gen_server).
accept and distribute to erlang processes fs calls , either inbound or outbound
-export([
start_link/1, start_link/0, uuid/0, originate/4, originate/3, originate/2, wait_call/0,
set/3, vars/1, variables/1, get/1, on_hangup/1, ... | |
389872e2a3f6c4981f960f89a6346fdb95309a7eef41d3c3949741a396680321 | borodust/alien-works | quat.lisp | (cl:in-package :alien-works.math)
(defun quat (quat idx)
(cffi:mem-ref (%glm:glm+operator[] '(:pointer %glm:glm+quat) quat :int idx) :float))
(defun (setf quat) (value quat idx)
(let ((ptr (%glm:glm+operator[] '(:pointer %glm:glm+quat) quat :int idx)))
(setf (cffi:mem-ref ptr :float) (float value 0f0))))
... | null | https://raw.githubusercontent.com/borodust/alien-works/c893d3dce370d26b417c5e801291156ea35f4196/src/math/quat.lisp | lisp | (cl:in-package :alien-works.math)
(defun quat (quat idx)
(cffi:mem-ref (%glm:glm+operator[] '(:pointer %glm:glm+quat) quat :int idx) :float))
(defun (setf quat) (value quat idx)
(let ((ptr (%glm:glm+operator[] '(:pointer %glm:glm+quat) quat :int idx)))
(setf (cffi:mem-ref ptr :float) (float value 0f0))))
... | |
7c432b51db5f0fc1f5c3e2505ac81b0009724e6119852d6646737686bf14ce24 | donaldsonjw/bigloo | port.scm | ;*---------------------------------------------------------------------*/
* serrano / prgm / project / bigloo / recette / port.scm * /
;* */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/recette/port.scm | scheme | *---------------------------------------------------------------------*/
* */
* */
* On teste les operations simples sur les ports */
*---------------------------... | * serrano / prgm / project / bigloo / recette / port.scm * /
* Author : * /
* Creation : Sun May 24 10:56:01 1992 * /
* Last change : Sat Sep 6 07:14:53 2014 ( serrano ) * /
(module in... |
e2c7d1ab55de401536b5c32da484acf40f6637d359ec39a6a99ff88924518377 | achirkin/vulkan | VK_KHR_external_memory_capabilities.hs | # OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
{-# LANGUAGE CPP #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
{-# LANGUAGE MagicH... | null | https://raw.githubusercontent.com/achirkin/vulkan/b2e0568c71b5135010f4bba939cd8dcf7a05c361/vulkan-api/src-gen/Graphics/Vulkan/Ext/VK_KHR_external_memory_capabilities.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE MagicHash #
# LANGUAGE PatternSynonyms #
# LANGUAGE Strict #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
|
supported: @vulkan@
contact: @James Jones @cuba... | # OPTIONS_GHC -fno - warn - missing - pattern - synonym - signatures #
# OPTIONS_GHC -fno - warn - orphans #
# OPTIONS_HADDOCK not - home #
# LANGUAGE FlexibleInstances #
# LANGUAGE ForeignFunctionInterface #
module Graphics.Vulkan.Ext.VK_KHR_external_memory_capabilities
* Vulkan extension : @VK_KHR_external_... |
110001f301af05992fa7588eceba3fa86d25dc254ed60cc680eea6b45d544774 | finnishtransportagency/harja | info.cljs | (ns harja.views.info
"Infonäkymä mihin siirretty koulutusvideot julkiselta sisäiseen palvelimeen.
Videot haetaan tietokannasta rajapintaa käyttäen"
(:require [tuck.core :refer [tuck]]
[harja.ui.komponentti :as komp]
[harja.ui.ikonit :as ikonit]
[harja.pvm :as pvm]
... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/cdd0f1cfdf0c66de83a0f1a7f23d9b4701691ebe/src/cljs/harja/views/info.cljs | clojure | Päivämäärä | (ns harja.views.info
"Infonäkymä mihin siirretty koulutusvideot julkiselta sisäiseen palvelimeen.
Videot haetaan tietokannasta rajapintaa käyttäen"
(:require [tuck.core :refer [tuck]]
[harja.ui.komponentti :as komp]
[harja.ui.ikonit :as ikonit]
[harja.pvm :as pvm]
... |
9d4b33a1d6e2b59f1c6439a93d338b417aa12dafe32616a27468eb6bc00f08f6 | unclebob/mastermindclj | auto_play_test.clj | (ns mastermind.auto-play-test
(:require [midje.sweet :refer :all]
[mastermind.auto-play :refer :all]
[mastermind.code-breaker :as cb]
[mastermind.code-maker :as cm]))
(facts
"about auto-play"
(fact
"Spy. If the initial guess is correct, return 1"
(auto-play) => 1
... | null | https://raw.githubusercontent.com/unclebob/mastermindclj/278c56fa9219f1270135067505ce1cff1737bfc9/test/mastermind/auto_play_test.clj | clojure | (ns mastermind.auto-play-test
(:require [midje.sweet :refer :all]
[mastermind.auto-play :refer :all]
[mastermind.code-breaker :as cb]
[mastermind.code-maker :as cm]))
(facts
"about auto-play"
(fact
"Spy. If the initial guess is correct, return 1"
(auto-play) => 1
... | |
fa1b32551736ead96410e6a3eaeba9c17e10d899a1e023767d0a26c25a535923 | racket/racket7 | docprovide.rkt | #lang racket/base
(require (for-syntax racket/base
"private/doctable.rkt"))
(define-syntaxes (provide-and-document provide-and-document/wrap)
(let ()
(define (add-prefix prefix rows)
(map (lambda (row)
(cons (car row)
(map
(lambda (x)... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/syntax/docprovide.rkt | racket | Helper:
Execute syntax part at top-level:
Extract documentation via top-level:
check form:
Collapse rows for a section name:
Extract procs and eliminate duplicates
Source prefixed:
Local renamed: | #lang racket/base
(require (for-syntax racket/base
"private/doctable.rkt"))
(define-syntaxes (provide-and-document provide-and-document/wrap)
(let ()
(define (add-prefix prefix rows)
(map (lambda (row)
(cons (car row)
(map
(lambda (x)... |
6b174b591a6d907c45439e4acfbd4a47f2f7d8deea43a679182eb9422fb2db39 | magehash/magehash | middleware.clj | (ns middleware
(:require [coast :refer [q pull unauthorized]]
[error.not-found]))
(defn wrap-admin [handler]
(fn [{{:keys [member/email]} :session :as request}]
(let [member (pull '[member/id member/email member/admin]
[:member/email email])]
(if (true? (:member/admin m... | null | https://raw.githubusercontent.com/magehash/magehash/9545d65a10a570536f8c6d9ebbafc4982e07cedc/src/middleware.clj | clojure | (ns middleware
(:require [coast :refer [q pull unauthorized]]
[error.not-found]))
(defn wrap-admin [handler]
(fn [{{:keys [member/email]} :session :as request}]
(let [member (pull '[member/id member/email member/admin]
[:member/email email])]
(if (true? (:member/admin m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.