_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 |
|---|---|---|---|---|---|---|---|---|
14e75a8396b4cdc42fc82c3d92d5b7e69eb4f1e5381f27d2ce18a346421dc401 | oscaro/clj-gcloud-common | dsl_test.clj | (ns clj-gcloud.dsl-test
(:require
[clj-gcloud.dsl :as sut]
[clojure.test :refer [deftest is]]))
(deftest kw->field-name-test
(is (= "tableId" (sut/kw->field-name :table-id))))
(deftest kw->enum-str-test
(is (= "CREATE_IF_NEEDED" (sut/kw->enum-str :create-if-needed))))
(deftest dsl->google-json-map-test
... | null | https://raw.githubusercontent.com/oscaro/clj-gcloud-common/fe1709759e2633cc968652b4c27d78bf6ef0243b/test/clj_gcloud/dsl_test.clj | clojure | (ns clj-gcloud.dsl-test
(:require
[clj-gcloud.dsl :as sut]
[clojure.test :refer [deftest is]]))
(deftest kw->field-name-test
(is (= "tableId" (sut/kw->field-name :table-id))))
(deftest kw->enum-str-test
(is (= "CREATE_IF_NEEDED" (sut/kw->enum-str :create-if-needed))))
(deftest dsl->google-json-map-test
... | |
1b75cbf33cc80dea999a0cf0cca38959df79af0e2bb897d36e0fdb51d21458c5 | dyzsr/ocaml-selectml | nativeint.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/stdlib/nativeint.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Processor - native integers .
This module provides operations on the type [ nativeint ] of
s... |
cb2d30f9a76eb29506b47fed49d7c3d262b5b924b9f87b2d98ae9b380982fa6f | lojic/LearningRacket | day20.rkt | #lang racket
(require "../advent.rkt")
(require "../circular-queue.rkt")
(define in (file->list "./day20.txt"))
(define (solve n in)
(let* ([ q (list->queue in) ]
[ len (length in) ]
[ digits (get-references q) ])
(for ([ _ (in-range n) ])
(for ([ digit (in-list digits) ... | null | https://raw.githubusercontent.com/lojic/LearningRacket/d96e6e832dc2e9002fe6849501a72a575594a7c0/advent-of-code-2022/day20/day20.rkt | racket | #lang racket
(require "../advent.rkt")
(require "../circular-queue.rkt")
(define in (file->list "./day20.txt"))
(define (solve n in)
(let* ([ q (list->queue in) ]
[ len (length in) ]
[ digits (get-references q) ])
(for ([ _ (in-range n) ])
(for ([ digit (in-list digits) ... | |
907d13b66e54fcda1cd83146917bbd4535e6ca4754681ac96958e5dd6ef550f6 | skeuchel/needle | Core.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
module KnotCore.DeBruijn.Core where
import KnotCore.Syntax
import Control.Applicative
import Data.Maybe
im... | null | https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotCore/DeBruijn/Core.hs | haskell | # LANGUAGE GADTs #
_ _
| \| |__ _ _ __ ___ ___
|_|\_\__,_|_|_|_\___/__/
Representation of heterogeneous variable lists. This is a list
representing a list of variables from all namespaces in the
specifications. Unfortunately this is not modular for now.
Representation of a cutoff variable. Cutoffs always belo... | # LANGUAGE ExistentialQuantification #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
module KnotCore.DeBruijn.Core where
import KnotCore.Syntax
import Control.Applicative
import Data.Maybe
import Data.Traversable (... |
674e0874baaad52e68808cdd4eee3a50f1ae3a29ced5a73376d7a8a098e669bc | cryptomeme/nario | Player.hs | -- Player (nario)
module Player (
Player(..),
PlayerType(..),
newPlayer,
updatePlayer,
renderPlayer,
playerGetCoin,
addScore,
getScrollPos,
getPlayerX,
getPlayerY,
getPlayerVY,
getPlayerHitRect,
getPlayerCoin,
getPlayerScore,
getPlayerType,
setPlayerType,
setPlayerDamage,
stampPlayer
) where
import ... | null | https://raw.githubusercontent.com/cryptomeme/nario/5f1ef10a1530763e1d2f51d280266ba48dae0c26/Player.hs | haskell | Player (nario)
Aを長押ししたときの重力
Type of player
Structure
Move horizontal
Check wall for moving horizontal direction
Adjust horizontal scroll position
Check for stand on a floor
Check upper wall
Do jump?
Do shot?
Update
In normal state
In dead state
Get scroll position
Get x position
Get Y position
Get y v... |
module Player (
Player(..),
PlayerType(..),
newPlayer,
updatePlayer,
renderPlayer,
playerGetCoin,
addScore,
getScrollPos,
getPlayerX,
getPlayerY,
getPlayerVY,
getPlayerHitRect,
getPlayerCoin,
getPlayerScore,
getPlayerType,
setPlayerType,
setPlayerDamage,
stampPlayer
) where
import Multimedia . SDL (... |
1828737abae34a2c407f0fecb8e0a4870d40a8d6b6eb289885a58afcde68923a | realworldocaml/book | rule_cache.ml | open Import
(* A type isomorphic to [Result], but without the negative connotations
associated with the word "error". *)
module Result = struct
type ('hit, 'miss) t =
| Hit of 'hit
| Miss of 'miss
end
module Workspace_local = struct
(* Stores information for deciding if a rule needs to be re-executed. ... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/dune_/src/dune_engine/rule_cache.ml | ocaml | A type isomorphic to [Result], but without the negative connotations
associated with the word "error".
Stores information for deciding if a rule needs to be re-executed.
This mutable table is safe: it's only used by [execute_rule_impl] to
decide whether to rebuild a rule or not; [execute_rule_impl] e... | open Import
module Result = struct
type ('hit, 'miss) t =
| Hit of 'hit
| Miss of 'miss
end
module Workspace_local = struct
module Database = struct
module Entry = struct
type t =
{ rule_digest : Digest.t
; dynamic_deps_stages : (Action_exec.Dynamic_dep.Set.t * Digest.t) list
... |
aaa8adafb687026b520e238651be7c3edb714a339a408c054398d5422e5f8529 | danieljharvey/mimsa | Scheme.hs | # LANGUAGE DerivingStrategies #
{-# LANGUAGE OverloadedStrings #-}
module Language.Mimsa.Types.Typechecker.Scheme where
import qualified Data.Text as T
import Language.Mimsa.Core
data Scheme = Scheme [TypeIdentifier] MonoType
deriving stock (Eq, Ord, Show)
instance Printer Scheme where
prettyPrint (Scheme vars ... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/src/Language/Mimsa/Types/Typechecker/Scheme.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DerivingStrategies #
module Language.Mimsa.Types.Typechecker.Scheme where
import qualified Data.Text as T
import Language.Mimsa.Core
data Scheme = Scheme [TypeIdentifier] MonoType
deriving stock (Eq, Ord, Show)
instance Printer Scheme where
prettyPrint (Scheme vars mt) = varText <> prettyPrint mt
... |
0ee7db544dd405a630e705576284f8a578bc7a89f29907abe9cbaa5380406c5e | TokTok/hs-toxcore | DhtPacketSpec.hs | # LANGUAGE StrictData #
# LANGUAGE Trustworthy #
module Network.Tox.DHT.DhtPacketSpec where
import Test.Hspec
import Test.QuickCheck
import Data.Binary (Binary)
import qualified Data.Binary as Binary (get, put)
import qualified Data.Binary.Get ... | null | https://raw.githubusercontent.com/TokTok/hs-toxcore/3ceab5974c36c4c5dbf7518ba733ec2b6084ce5d/test/Network/Tox/DHT/DhtPacketSpec.hs | haskell | # LANGUAGE StrictData #
# LANGUAGE Trustworthy #
module Network.Tox.DHT.DhtPacketSpec where
import Test.Hspec
import Test.QuickCheck
import Data.Binary (Binary)
import qualified Data.Binary as Binary (get, put)
import qualified Data.Binary.Get ... | |
666f9152be0834bb6779f210192b798e51abf14a5d4733269510b780e83e8851 | jawline/c8hardcaml | c8_bin.ml | open Core
let () = print_s [%message "currently empty"]
| null | https://raw.githubusercontent.com/jawline/c8hardcaml/0b9c315beac69353d7fcb5e9efed275948bccd6a/bin/c8_bin.ml | ocaml | open Core
let () = print_s [%message "currently empty"]
| |
3f590bb7aee64588c8963f42ce216c250b63b31a1f1df6c44d0ac2f1268245c7 | chrisroman/coc | ast.ml | open Core
open Common
type id = string [@@deriving sexp]
type typed =
| Untyped
| Typed
type term_t =
| Id of id
| Lambda of (id * term_t * term_t)
| App of (term_t * term_t)
| Product of (id * term_t * term_t)
| Star
[@@deriving sexp]
type program =
| Let of (typed * id * term_t * program)
| Term ... | null | https://raw.githubusercontent.com/chrisroman/coc/95e8c344c0694b4293aad04098c046652bf42652/ast.ml | ocaml | If term = [x1:M1]...[xn:Mn]* then we split off just the last element, i.e.
* components, i.e. return [x1:M1]...[xn-1:Mn-1]* and (xn, Mn)
* If term = [x:M]* then just return * and (x, M)
* For consistent naming, we'll say we return a tuple of the "body" and "foot"
* of the list
If term = [x1:M1]...[xn:Mn]* then r... | open Core
open Common
type id = string [@@deriving sexp]
type typed =
| Untyped
| Typed
type term_t =
| Id of id
| Lambda of (id * term_t * term_t)
| App of (term_t * term_t)
| Product of (id * term_t * term_t)
| Star
[@@deriving sexp]
type program =
| Let of (typed * id * term_t * program)
| Term ... |
5d285b379a6334aa5d813879ff55ceab2d4d28e7a93aa036165d0303c4096c2a | ypyf/fscm | stack.scm | (define stack '())
(define push!
(lambda (x)
(set! stack (cons x stack))))
(define pop!
(lambda ()
(let ((temp (car stack)))
(set! stack (cdr stack))
temp)))
(push! 9)
(push! 8)
(push! 7) | null | https://raw.githubusercontent.com/ypyf/fscm/4e6a31665051d51bbcfc823ac8d85dcc3491a6ef/test/stack.scm | scheme | (define stack '())
(define push!
(lambda (x)
(set! stack (cons x stack))))
(define pop!
(lambda ()
(let ((temp (car stack)))
(set! stack (cdr stack))
temp)))
(push! 9)
(push! 8)
(push! 7) | |
53eccce642a026264d10e95c3f88ece6a2f06d16714eabde175aa8203936b6c4 | typelead/intellij-eta | FileViewProvider.hs | module FFI.Com.IntelliJ.Psi.FileViewProvider where
import P
data {-# CLASS "com.intellij.psi.FileViewProvider" #-}
FileViewProvider = FileViewProvider (Object# FileViewProvider)
deriving Class
| null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Com/IntelliJ/Psi/FileViewProvider.hs | haskell | # CLASS "com.intellij.psi.FileViewProvider" # | module FFI.Com.IntelliJ.Psi.FileViewProvider where
import P
FileViewProvider = FileViewProvider (Object# FileViewProvider)
deriving Class
|
e62f6fa7cb44f226c1f2985ee6324397122670f37f6a49b5c22922022383254b | smart-chain-fr/tokenomia | LocalRepository.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TupleSections #
# LANGUAGE NumericUnderscores #
# LANGUAGE NamedFieldPuns #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGU... | null | https://raw.githubusercontent.com/smart-chain-fr/tokenomia/dfb46829f0a88c559eddb3181e5320ed1a33601e/src/Tokenomia/ICO/LocalRepository.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE TupleSections #
# LANGUAGE NumericUnderscores #
# LANGUAGE NamedFieldPuns #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE DerivingStrategies #
# LANGUAGE... |
9fd064a006b5a805655816659f50126f1c9620ce34a6d936239a210d731c5ae5 | wangweihao/ProgrammingErlangAnswer | 2.erl | 在 Erlang shell 里输入一些命令。不要忘了以句号和空白结束命令
1 > X = 999 .
2 > X * 2 .
3 > io : format("hello world ~n " )
| null | https://raw.githubusercontent.com/wangweihao/ProgrammingErlangAnswer/b145b5e6a19cb866ce5d2ceeac116d751f6e2b3d/2/2/2.erl | erlang | 在 Erlang shell 里输入一些命令。不要忘了以句号和空白结束命令
1 > X = 999 .
2 > X * 2 .
3 > io : format("hello world ~n " )
| |
afcde40bcc514ae8db5b456ae274b617ac1471871e62a6b63ef897a9d3176473 | bobzhang/fan | gdefs.ml |
(* the [location] and the parsed value *)
type 'a cont_parse = Locf.t -> Gaction.t -> 'a Tokenf.parse
type entry = {
name : string;
mutable start : int -> Gaction.t Tokenf.parse ;
mutable continue : int -> Gaction.t cont_parse ;
mutable levels : level list ; (* sorted list *)
... | null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/treeparser/gdefs.ml | ocaml | the [location] and the parsed value
sorted list
level is the runtime which is not used by the compiler
the raw productions stored in the level
internal struccture
* anno_action list
*
[olevel] is the [processed output] from the Fgram DDSL, the runtime representation
is [level], there is a function [Gi... |
type 'a cont_parse = Locf.t -> Gaction.t -> 'a Tokenf.parse
type entry = {
name : string;
mutable start : int -> Gaction.t Tokenf.parse ;
mutable continue : int -> Gaction.t cont_parse ;
mutable freezed : bool;}
and level = {
level : int;
lassoc : bool ;
lsuffix : tr... |
e8a6a79495edd371bea154eb9c95cb2fd836f50f5092fa6ec3bab2ff7566c5d8 | cirfi/sicp-my-solutions | 1.15.scm | ;;; a. 5
;;; b. space: O(log(n))
;;; time: O(log(n))
| null | https://raw.githubusercontent.com/cirfi/sicp-my-solutions/4b6cc17391aa2c8c033b42b076a663b23aa022de/ch1/1.15.scm | scheme | a. 5
b. space: O(log(n))
time: O(log(n)) | |
712e38ffc2afc9f11ec976f951e1339843c41a334e82da1475e5f3598ba20d3b | tsloughter/kuberl | kuberl_v1_persistent_volume_claim.erl | -module(kuberl_v1_persistent_volume_claim).
-export([encode/1]).
-export_type([kuberl_v1_persistent_volume_claim/0]).
-type kuberl_v1_persistent_volume_claim() ::
#{ 'apiVersion' => binary(),
'kind' => binary(),
'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(),
'spec' => kuberl_v1... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_persistent_volume_claim.erl | erlang | -module(kuberl_v1_persistent_volume_claim).
-export([encode/1]).
-export_type([kuberl_v1_persistent_volume_claim/0]).
-type kuberl_v1_persistent_volume_claim() ::
#{ 'apiVersion' => binary(),
'kind' => binary(),
'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(),
'spec' => kuberl_v1... | |
0af2d8944bc84f4bd4f627ec707e951334318d850e709d29f1d613a0bad702bd | dmbarbour/awelon | Env.hs |
-- | environment variables, paths and directories
module AO.Env
( getAO_TEMP
, getAO_PATH
, getRscDir
, getJitDir
) where
import Control.Applicative
import Data.Either
import qualified Data.Text as T
import qualified Filesystem as FS
import qualified Filesystem.Path.CurrentOS as FS
import qualifie... | null | https://raw.githubusercontent.com/dmbarbour/awelon/af9124654dd9462cc4887dccf67b3e33302c7351/hsrc/AO/Env.hs | haskell | | environment variables, paths and directories
(idempotent) obtain (and create) the AO_TEMP directory
storage directory. This will serve as the primary location for
resources until we upgrade to a proper database.
| (idempotent) obtain or create the JIT directory
| obtain valid filesystem paths from AO_PATH envi... |
module AO.Env
( getAO_TEMP
, getAO_PATH
, getRscDir
, getJitDir
) where
import Control.Applicative
import Data.Either
import qualified Data.Text as T
import qualified Filesystem as FS
import qualified Filesystem.Path.CurrentOS as FS
import qualified System.Environment as Env
import qualified Syste... |
0efcb2071a0a0ba964fa0f5d2075d17397b18ebe23c3709292134e24248873e0 | synduce/Synduce | count_negations.ml | * @synduce --no - lifting -n 10 -NB
When using args in comments , they must be separated by at least one line from the declarations .
type arithop = APlus | AMinus | AGt
type boolop = BNot | BAnd | BOr | BEq
type term =
| TArithBin of arithop * term * term
| TBoolBin of boolop * term * term
| TArithUn of ar... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/constraints/program/count_negations.ml | ocaml | The constraint on well formedness does nothing in this example. | * @synduce --no - lifting -n 10 -NB
When using args in comments , they must be separated by at least one line from the declarations .
type arithop = APlus | AMinus | AGt
type boolop = BNot | BAnd | BOr | BEq
type term =
| TArithBin of arithop * term * term
| TBoolBin of boolop * term * term
| TArithUn of ar... |
ea4eaed2907820cc588294e8756b222132bcd53a8e83f69998b303edb815e08e | krtx/ws-ocaml | bytes_ext.mli | (** Bytes functions. *)
val encode_int : int -> bytes -> int -> int -> unit
(** [encode_int x dst start len] encodes integer [x] into [dst] from [start]
with [len] characters in big endian. *)
val bytes_of_int : int -> int -> bytes
(** [bytes_of_int x n] newly allocate a byte sequence of [n] characters where
... | null | https://raw.githubusercontent.com/krtx/ws-ocaml/f3710f1ef36d73440c10d96785c13e08bc638545/lib/bytes_ext.mli | ocaml | * Bytes functions.
* [encode_int x dst start len] encodes integer [x] into [dst] from [start]
with [len] characters in big endian.
* [bytes_of_int x n] newly allocate a byte sequence of [n] characters where
[x] is encoded in big endian.
* [decode_int src start len] decodes [len] characters of [src] starting ... |
val encode_int : int -> bytes -> int -> int -> unit
val bytes_of_int : int -> int -> bytes
val decode_int : bytes -> int -> int -> int
val int_of_bytes : bytes -> int
|
16e2b5b9a1b18a71c7660fb41972706e4b44874fe8ee054c691c23f3640cca17 | melange-re/melange | camlinternalAtomic.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/stdlib-412/camlinternalAtomic.mli | ocaml | ************************************************************************
OCaml
... | , University of Cambridge
, projet Gallinette , INRIA
Copyright 2020 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
The documentation is in atomic.mli . CamlinternalAto... |
ee0dc392ebed2fe91c7ee5f80ed6f3b0c69e53e290b91b297ebf9c8aed7dfa23 | nuprl/gradual-typing-performance | sugar-list.rkt | #lang racket/base
(provide
slice-at
break-at
slicef-after
shifts
)
;; -----------------------------------------------------------------------------
(require
(only-in racket/list split-at empty empty? first take-right make-list drop-right take drop)
)
;; =====================================================... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/tools/summarize/test/mini-quadMB/untyped/sugar-list.rkt | racket | -----------------------------------------------------------------------------
=============================================================================
with polymorphic function, use cased typing to simulate optional position arguments
coerce bps to list
easier to do back to front, because then the list index... | #lang racket/base
(provide
slice-at
break-at
slicef-after
shifts
)
(require
(only-in racket/list split-at empty empty? first take-right make-list drop-right take drop)
)
(define slice-at
(case-lambda
[(xs len)
(slice-at xs len #f)]
[(xs len force?)
(define-values (last-list list-of-lis... |
076c6eadd46a3be99d870b05a6a5a549f332c0c8c4791f22be4bf0eef0c905d1 | tsoding/HyperNerd | Migration.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module Sqlite.Migration
( migrateDatabase
, Migration(..)
) where
import Data.Foldable
import Data.Function
import Data.List
import Data.String
import qualified Data.Text as T
import Database.SQLite.Simple
import Text.RawString.QQ
newtype Migration = ... | null | https://raw.githubusercontent.com/tsoding/HyperNerd/5322580483c5c05179bc455a6f94566d398bccdf/src/Sqlite/Migration.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
module Sqlite.Migration
( migrateDatabase
, Migration(..)
) where
import Data.Foldable
import Data.Function
import Data.List
import Data.String
import qualified Data.Text as T
import Database.SQLite.Simple
import Text.RawString.QQ
newtype Migration = Migration
{ migrationQuery :: Que... |
9ffe8610119063b850d4d3e7789932e05baac4e0c13621bf243fcbc50f9e5933 | timbod7/haskell-chart | Vectors.hs | -----------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.Chart.Plot.Vectors
Copyright : ( c ) < > 2014
-- License : BSD-style (see chart/COPYRIGHT)
--
-- Vector plots
--
# LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
module Graphics.Rendering... | null | https://raw.githubusercontent.com/timbod7/haskell-chart/8c5a823652ea1b4ec2adbced4a92a8161065ead6/chart/Graphics/Rendering/Chart/Plot/Vectors.hs | haskell | ---------------------------------------------------------------------------
|
Module : Graphics.Rendering.Chart.Plot.Vectors
License : BSD-style (see chart/COPYRIGHT)
Vector plots
between them (so that the vectors never overlap on the graph).
Set to 0 to disable any scaling.
| Provide a square-t... | Copyright : ( c ) < > 2014
# LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
module Graphics.Rendering.Chart.Plot.Vectors(
PlotVectors(..),
VectorStyle(..),
plotVectorField,
plot_vectors_mapf,
plot_vectors_grid,
plot_vectors_title,
plot_vectors_style,
plot_vectors_scale,
plot_... |
270fe6d75470f2e954722357768878ee85d66dd6e7686b56fa2cb094622f345e | mirage/capnp-rpc | db.ml | open Lwt.Infix
open Capnp_rpc_lwt
open Capnp_rpc_net
module File_store = Capnp_rpc_unix.File_store
module Store = Store.Make(Capnp.BytesMessage)
type loader = [`Logger_beacebd78653e9af] Sturdy_ref.t -> label:string -> Restorer.resolution
type t = {
store : Store.Reader.SavedService.struct_t File_store.t;
loader ... | null | https://raw.githubusercontent.com/mirage/capnp-rpc/8a0b6dce373dc2e2d547d85e542962862773f74b/examples/sturdy-refs-4/db.ml | ocaml | open Lwt.Infix
open Capnp_rpc_lwt
open Capnp_rpc_net
module File_store = Capnp_rpc_unix.File_store
module Store = Store.Make(Capnp.BytesMessage)
type loader = [`Logger_beacebd78653e9af] Sturdy_ref.t -> label:string -> Restorer.resolution
type t = {
store : Store.Reader.SavedService.struct_t File_store.t;
loader ... | |
fff1131e7e68172af89c058f232756cc87399198ab1c395fbc0162588f804227 | mhwombat/grid | OctagonalInternal.hs | ------------------------------------------------------------------------
-- |
-- Module : Math.Geometry.OctGridInternal
Copyright : ( c ) 2012 - 2022
-- License : BSD-style
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
A module containing private @OctGrid@ intern... | null | https://raw.githubusercontent.com/mhwombat/grid/b8c4a928733494f4a410127d6ae007857de921f9/src/Math/Geometry/Grid/OctagonalInternal.hs | haskell | ----------------------------------------------------------------------
|
Module : Math.Geometry.OctGridInternal
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
without notice.
----------------------------------------------------------------------
# LANGUAGE De... | Copyright : ( c ) 2012 - 2022
A module containing private @OctGrid@ internals . Most developers
should use @OctGrid@ instead . This module is subject to change
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
module Math.Geometry.Grid.OctagonalInternal where
import Prelude ... |
097c807c34487ea8f0ded6028a45554a39a8a134b3f37429ec9ab6f6f048d068 | IvanIvanov/fp2013 | accumulate-tests.scm | ;;; This file contains unit tests for the problem listed in the name
;;; of this file.
;;;
;;; To run the tests specify the relative or absolute path to the
;;; ".scm" file with the proposed solution in the (load ...) command
;;; below. Then you can either open the tests and run them in Racket
( with R5RS set as the ... | null | https://raw.githubusercontent.com/IvanIvanov/fp2013/2ac1bb1102cb65e0ecbfa8d2fb3ca69953ae4ecf/lab1/homework4/accumulate-tests.scm | scheme | This file contains unit tests for the problem listed in the name
of this file.
To run the tests specify the relative or absolute path to the
".scm" file with the proposed solution in the (load ...) command
below. Then you can either open the tests and run them in Racket
directly from the command line:
plt-r5... | ( with R5RS set as the language ) , or you can run the following
assuming 's bin directory is included in the PATH environment
(load "accumulate.scm")
(define (__make-counter x)
(lambda ()
(set! x (+ x 1))
x))
(define __test-counter (__make-counter 0))
(define (__test-passed)
(display (string-appe... |
ebf86df791110dc80fee7907f2795bdcbf34e78a17cdbc0448b13d95b87108a6 | wangsix/VMO_repeated_themes_discovery | converter.lisp |
;(in-package :common-lisp-user)
(load
(merge-pathnames
(make-pathname
:directory '(:relative "File conversion")
:name "csv-files"
:type "lisp")
*lisp-code-root*))
(load
(merge-pathnames
(make-pathname
:directory '(:relative "File conversion")
:name "humdrum-by-col"
:type "lisp")
*lisp-code... | null | https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Aug2013/groundTruth/mozartK282Mvt2/polyphonic/repeatedPatterns/schoenberg/E/script/converter.lisp | lisp | (in-package :common-lisp-user) |
(load
(merge-pathnames
(make-pathname
:directory '(:relative "File conversion")
:name "csv-files"
:type "lisp")
*lisp-code-root*))
(load
(merge-pathnames
(make-pathname
:directory '(:relative "File conversion")
:name "humdrum-by-col"
:type "lisp")
*lisp-code-root*))
(load
(merge-pathnames... |
50443b2ca76cbaf08272ef6cffc4a832ece6998f63f4c921d9e95136ccb51dbb | clash-lang/clash-compiler | SatWrap.hs | module SatWrap where
import Clash.Prelude
topEntity:: (SFixed 2 6) -> (SFixed 2 6) -> (SFixed 2 6)
topEntity = satAdd SatWrap
| null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Fixed/SatWrap.hs | haskell | module SatWrap where
import Clash.Prelude
topEntity:: (SFixed 2 6) -> (SFixed 2 6) -> (SFixed 2 6)
topEntity = satAdd SatWrap
| |
66a51e2e3db01b7c9acc711f5b7739872d6b861d226e4717cf06b6fd401fab3b | CryptoKami/cryptokami-core | SlottingSpec.hs | -- | Specification of Pos.Core.Slotting.
module Test.Pos.Core.SlottingSpec
( spec
) where
import Universum
import Test.Hspec (Expectation, Spec, anyErrorCall, describe)
import Test.Hspec.QuickCheck (prop)
import Test.QuickCheck (NonNegative (..), Positive (..), P... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/lib/test/Test/Pos/Core/SlottingSpec.hs | haskell | | Specification of Pos.Core.Slotting.
this is not possible with the current implementation of the type. |
module Test.Pos.Core.SlottingSpec
( spec
) where
import Universum
import Test.Hspec (Expectation, Spec, anyErrorCall, describe)
import Test.Hspec.QuickCheck (prop)
import Test.QuickCheck (NonNegative (..), Positive (..), Property, (===), (==>))
import ... |
8d79d8d493e7c646c66012dabb84567bf14f39b2579751deaba9fd9bafd2a1a7 | MLstate/opalang | time.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/time.ml | ocaml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | |
39cfb3697fa9fe3182dbb8b66fde15a69085cd433ca359a0c41432f3f4da7d28 | erlang/sourcer | erlang_ls.erl | -module(erlang_ls).
-export([main/1]).
-define(DEFAULT_TRANSPORT, tcp).
-define(DEFAULT_PORT, 9000).
main(Args) ->
case getopt:parse(cli_options(), Args) of
{ok, {Opts, Other}} ->
OptsMap = maps:from_list(proplists:unfold(Opts)),
run(OptsMap, Other);
_Err ->
io... | null | https://raw.githubusercontent.com/erlang/sourcer/27ea9c63998b9e694eb7b654dd05b831b989e69e/apps/erlang_ls/src/erlang_ls.erl | erlang | -module(erlang_ls).
-export([main/1]).
-define(DEFAULT_TRANSPORT, tcp).
-define(DEFAULT_PORT, 9000).
main(Args) ->
case getopt:parse(cli_options(), Args) of
{ok, {Opts, Other}} ->
OptsMap = maps:from_list(proplists:unfold(Opts)),
run(OptsMap, Other);
_Err ->
io... | |
61c95805eda31473b2944379663b7536ebb8cd8672ed99fdffa80cd2b676d31c | victornicolet/parsynt | STerm.ml | open Base
open Lang.Typ
open Lang.Term
open Lang.TermUtils
open Lang.AcTerm
open Lang.ResourceModel
open Lang.Normalize
open Lang.Unfold
open SolverForms
open Utils
module Smt = SmtLib
let simplify_conditionals (solver : online_solver) (ct : term) : term =
spush solver;
let t' =
Transform.transform
(fun ... | null | https://raw.githubusercontent.com/victornicolet/parsynt/d3f530923c0c75537b92c2930eb882921f38268c/src/solve/STerm.ml | ocaml | ======================================== MCNF helpers =========================
*
Rebuild an expression from a multi-way conditional normal form.
Requires calls to solver to infer the conditions.
Rebuild an expression tree from the mcnf. To do so, use a solver.
Remove unreachable branches
Simplify remaini... | open Base
open Lang.Typ
open Lang.Term
open Lang.TermUtils
open Lang.AcTerm
open Lang.ResourceModel
open Lang.Normalize
open Lang.Unfold
open SolverForms
open Utils
module Smt = SmtLib
let simplify_conditionals (solver : online_solver) (ct : term) : term =
spush solver;
let t' =
Transform.transform
(fun ... |
aff02a625f126afc59385a4a2f5a6a0a8cb02582cce0ec4141e3746a30dcf732 | nasa/Common-Metadata-Repository | json_schema.clj | (ns cmr.schema-validation.test.json-schema
"Tests to verify JSON schema validation."
(:require
[cheshire.core :as json]
[clojure.string :as string]
[clojure.test :refer :all]
[cmr.schema-validation.json-schema :as json-schema])
(:import
(org.everit.json.schema SchemaException)))
(def sample-json-s... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/78e9ab2403d35fc1b8480c00463695b79f0ff7e0/schema-validation-lib/test/cmr/schema_validation/test/json_schema.clj | clojure | This is handy for trying out different capabilities of JSON schema. | (ns cmr.schema-validation.test.json-schema
"Tests to verify JSON schema validation."
(:require
[cheshire.core :as json]
[clojure.string :as string]
[clojure.test :refer :all]
[cmr.schema-validation.json-schema :as json-schema])
(:import
(org.everit.json.schema SchemaException)))
(def sample-json-s... |
e9aa6a5b4dbd3e478268f85f7017473b74d55dfa46e27d913eb8e3ba635500c7 | kadena-io/chainweaver | SigBuilder.hs | # LANGUAGE RecursiveDo #
# LANGUAGE TupleSections #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Frontend.UI.Dialogs.SigBuilder where
#if !defined(ghcjs_HOST_OS)
import qualified Codec.QRCode as QR
import qualified Cod... | null | https://raw.githubusercontent.com/kadena-io/chainweaver/def9a10a97f51e8a8e749d0026b6c5f8bac2a0cd/frontend/src/Frontend/UI/Dialogs/SigBuilder.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------------
-----------------------------... | # LANGUAGE RecursiveDo #
# LANGUAGE TupleSections #
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
module Frontend.UI.Dialogs.SigBuilder where
#if !defined(ghcjs_HOST_OS)
import qualified Codec.QRCode as QR
import qualified Codec.QRCode.JuicyPixels as QR
#endif
import Control.Error hi... |
4c688fdfa7ef6d18f5c973aed8f6a2b9da3e7353ba98c6ff2601ccb1af692517 | OCamlPro/opam-manager | managerWrapper.mli | (**************************************************************************)
(* *)
Copyright 2014 - 2015 ,
(* *)
(* All rights reserved.This file is distributed under ... | null | https://raw.githubusercontent.com/OCamlPro/opam-manager/2b5b9cc834c0595c6bf00b07f47f25ab71f21acc/src/core/managerWrapper.mli | ocaml | ************************************************************************
All rights reserved.This file is distributed under the terms of the
exception. ... | Copyright 2014 - 2015 ,
GNU Lesser General Public License version 3.0 with linking
OPAM is distributed in the hope that it will be useful , but WITHOUT
or FITNESS FOR A PARTICULAR PURPOSE.See the GNU General Public
open ManagerTypes
val create: OpamFilename.Base.t -> unit
va... |
e40108d4c32355164b9484b73345c83b11097920a3f01e3ec8d337927fe2f6d4 | avsm/platform | opam_admin_top.ml | (**************************************************************************)
(* *)
Copyright 2014 OCamlPro
(* *)
(* All rights ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/tools/opam_admin_top.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2014 OCamlPro
GNU Lesser General Public License version 2.1 , with the special
open OpamFilename.Op
open OpamStd.Op
open OpamTypes
let identity _ x = x
let true_ _ = true
let repo = OpamRepositoryBackend.local (OpamFilename.cwd ())
let packages = ... |
887ed405461f39fa77b4bba2bd29d74fe37fe9b2ed5d73453aef3305abd63690 | alexandergunnarson/quantum | primitive.cljc | (ns quantum.core.data.primitive
(:require
[quantum.core.macros :refer [defnt]]))
(defnt ->min-magnitude
#?(:clj ([^byte x] (byte 0)))
#?(:clj ([^char x] (char 0)))
#?(:clj ([^short x] (short 0)))
#?(:clj ([^int x] (int 0)))
#?(:clj ([^long x] (... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/src/quantum/core/data/primitive.cljc | clojure | (ns quantum.core.data.primitive
(:require
[quantum.core.macros :refer [defnt]]))
(defnt ->min-magnitude
#?(:clj ([^byte x] (byte 0)))
#?(:clj ([^char x] (char 0)))
#?(:clj ([^short x] (short 0)))
#?(:clj ([^int x] (int 0)))
#?(:clj ([^long x] (... | |
70bcb5503ca8e5e0a7841f46d690b722f79840d69d5b659cd33269abb7fcbfee | dtgoitia/civil-autolisp | SortAlphanumeric.lsp | (defun DT:SortAlphanumeric ( l / onlyStrings chunkedList )
; Sort considering numbers and letters
(if (DT:Arg 'DT:SortAlphanumeric '((l 'list)))
(progn
(setq onlyStrings T)
(foreach element l (if (/= 'str (type element)) (setq onlyStrings nil)))
(if onlyStrings
(progn
ALPHANUMERIC SO... | null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/Dump%20folder/SortAlphanumeric.lsp | lisp | Sort considering numbers and letters
Split strings in only number and only letter chunks
Sort split strings
Join chunks in sortedchunkedList
END progn
END if
END progn
END if
v0.0 - 2017.06.02 - First issue
Split passed list of strings in chunks of only letters and only numbers, and return it
END foreach
END prog... | (defun DT:SortAlphanumeric ( l / onlyStrings chunkedList )
(if (DT:Arg 'DT:SortAlphanumeric '((l 'list)))
(progn
(setq onlyStrings T)
(foreach element l (if (/= 'str (type element)) (setq onlyStrings nil)))
(if onlyStrings
(progn
ALPHANUMERIC SORT ALGORITHM :
(setq chunkedLis... |
4b292d455bfe271799f6b5564dc40dfc89b772b14b3c7e8cf2299e96cc6d4ca1 | ceramic/ceramic | integration.lisp | (in-package :cl-user)
(defpackage ceramic-test.integration
(:use :cl :fiveam)
(:export :integration))
(in-package :ceramic-test.integration)
(def-suite integration
:description "Integration tests.")
(in-suite integration)
(defvar *extraction-directory*
(asdf:system-relative-pathname :ceramic-test-app
... | null | https://raw.githubusercontent.com/ceramic/ceramic/5d81e2bd954440a6adebde31fac9c730a698c74b/t/integration.lisp | lisp | (in-package :cl-user)
(defpackage ceramic-test.integration
(:use :cl :fiveam)
(:export :integration))
(in-package :ceramic-test.integration)
(def-suite integration
:description "Integration tests.")
(in-suite integration)
(defvar *extraction-directory*
(asdf:system-relative-pathname :ceramic-test-app
... | |
b4718839d1a7beea107eb3594bb2271c48038bb18ab3c0255fe0656d06ebc4dc | scrive/hpqtypes | Compat.hs | # LANGUAGE CPP #
# LANGUAGE DerivingStrategies #
module Test.Aeson.Compat
( fromList
, Value0
, mkValue0
) where
import Data.Aeson
import Data.Text (Text)
#if MIN_VERSION_aeson(2,0,0)
import Data.Bifunctor (first)
import qualified Data.Aeson.Key as K
import qualified Data.Aeson.KeyMap as KM
import Database.... | null | https://raw.githubusercontent.com/scrive/hpqtypes/69d87f0dd86cc168a1c927b6769f4d9b3fe3707d/test/Test/Aeson/Compat.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DerivingStrategies #
module Test.Aeson.Compat
( fromList
, Value0
, mkValue0
) where
import Data.Aeson
import Data.Text (Text)
#if MIN_VERSION_aeson(2,0,0)
import Data.Bifunctor (first)
import qualified Data.Aeson.Key as K
import qualified Data.Aeson.KeyMap as KM
import Database.... | |
128d7433e0eb82995172a2c824bfefed95acecde955d9a98cf0b5b3828712f0d | siclait/6.824-cljlabs-2020 | worker.clj | (ns map-reduce.impl.worker
"Write your code here."
(:require [go.fnv :as fnv]
[go.rpc :as rpc]))
(def output-directory "mr-tmp")
(def port 3000)
(defn ihash
"Use ihash(key) % `n-reduce` to choose the reduce
task number for each key/value pair emitted by map."
[s]
(bit-and (fnv/fnv1a32 s) 0x7ff... | null | https://raw.githubusercontent.com/siclait/6.824-cljlabs-2020/0c7ad7ae07d7617b1eb7240080c65f1937ca8a2d/map-reduce/src/map_reduce/impl/worker.clj | clojure | Your worker implementation here. | (ns map-reduce.impl.worker
"Write your code here."
(:require [go.fnv :as fnv]
[go.rpc :as rpc]))
(def output-directory "mr-tmp")
(def port 3000)
(defn ihash
"Use ihash(key) % `n-reduce` to choose the reduce
task number for each key/value pair emitted by map."
[s]
(bit-and (fnv/fnv1a32 s) 0x7ff... |
ce11184a1b0bac465e6641728d074129d3d519c0ef37e77e903f62f51489e5ca | nasa/Common-Metadata-Repository | granule.clj | (ns ^:system cmr.metadata.proxy.tests.system.concepts.granule
"Note: this namespace is exclusively for system tests."
(:require
[clojure.test :refer :all]
[cmr.metadata.proxy.concepts.granule :as granule]
[cmr.metadata.proxy.testing.config :as test-system]
[ring.util.codec :as codec]))
(use-fixture... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/metadata-proxy/test/cmr/metadata/proxy/tests/system/concepts/granule.clj | clojure | (ns ^:system cmr.metadata.proxy.tests.system.concepts.granule
"Note: this namespace is exclusively for system tests."
(:require
[clojure.test :refer :all]
[cmr.metadata.proxy.concepts.granule :as granule]
[cmr.metadata.proxy.testing.config :as test-system]
[ring.util.codec :as codec]))
(use-fixture... | |
04be4824e8e5ff5009058d3fc358bc600c64825365b7e7fe46a70bb49e5db0b1 | wavewave/hoodle | ForeignJS.hs | # LANGUAGE JavaScriptFFI #
module Hoodle.Web.ForeignJS where
import qualified Data.JSString as JSS
import GHCJS.Foreign.Callback (Callback)
import GHCJS.Marshal (FromJSVal (fromJSValUncheckedListOf), ToJSVal (toJSValListOf))
import GHCJS.Types (JSString, JSVal)
foreign import javascript unsafe "console.log($1)"
js... | null | https://raw.githubusercontent.com/wavewave/hoodle/1acd7a713697b6146bda13a38591cf868cea6685/web/client/Hoodle/Web/ForeignJS.hs | haskell | # LANGUAGE JavaScriptFFI #
module Hoodle.Web.ForeignJS where
import qualified Data.JSString as JSS
import GHCJS.Foreign.Callback (Callback)
import GHCJS.Marshal (FromJSVal (fromJSValUncheckedListOf), ToJSVal (toJSValListOf))
import GHCJS.Types (JSString, JSVal)
foreign import javascript unsafe "console.log($1)"
js... | |
cfbcc7880bb3486b6e73f4cb3d0882c6117add2fc5b4ec38b88e10eebc0fee9c | pfdietz/ansi-test | with-hash-table-iterator.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Fri Nov 28 20:08:43 2003
;;;; Contains: Tests of WITH-HASH-TABLE-ITERATOR
(deftest with-hash-table-iterator.1
(with-hash-table-iterator (x (make-hash-table)))
nil)
(deftest with-hash-table-iterator.2
(with-hash-table-iterator (x (make-hash-table)) (values)... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/hash-tables/with-hash-table-iterator.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of WITH-HASH-TABLE-ITERATOR
Free declaration scope | Author :
Created : Fri Nov 28 20:08:43 2003
(deftest with-hash-table-iterator.1
(with-hash-table-iterator (x (make-hash-table)))
nil)
(deftest with-hash-table-iterator.2
(with-hash-table-iterator (x (make-hash-table)) (values)))
(deftest with-hash-table-iterator.3
(with-hash-table-iterator (x (m... |
8b11ff3f7fc6bca2fb670b86426873e1ae173e904efce5c30a544e7c78c802a7 | mcorbin/tour-of-clojure | atom.clj | ;; defines an atom
(def my-atom (atom []))
;; redefs the atom to get its value
(println @my-atom "\n")
;; updates the atom value
(swap! my-atom conj 10)
(println @my-atom "\n")
;; a function can be passed to swap!
(swap! my-atom (fn [old-state]
(conj old-state 20)))
(println @my-atom "\n")
;; swa... | null | https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/resources/public/pages/code/atom.clj | clojure | defines an atom
redefs the atom to get its value
updates the atom value
a function can be passed to swap!
swap! returns the new value of the atom
reset! sets the atom value to something | (def my-atom (atom []))
(println @my-atom "\n")
(swap! my-atom conj 10)
(println @my-atom "\n")
(swap! my-atom (fn [old-state]
(conj old-state 20)))
(println @my-atom "\n")
(println (swap! my-atom conj 30) "\n")
(println (reset! my-atom [100]))
|
9ad14900be65018917abaf84909642799054c3b6e32da7db09aef5a5f89ba3f3 | 3b/learnopengl | coordinate-systems.lisp | ;;;; shader code
(defpackage coordinate-systems/shaders
(:use #:3bgl-glsl/cl)
;; shadow POSITION so we don't conflict with the default definition
of CL : POSITION as ( input position : vec4 : location 0 )
(:shadow position))
(in-package coordinate-systems/shaders)
(input position :vec3 :location 0)
(input colo... | null | https://raw.githubusercontent.com/3b/learnopengl/30f910895ef336ac5ff0b4cc676af506413bb953/factored/coordinate-systems.lisp | lisp | shader code
shadow POSITION so we don't conflict with the default definition
back to normal lisp code
create the transformation
sb-cga doesn't include a perspective matrix, so we will get
get matrix's uniform location and set matrix | (defpackage coordinate-systems/shaders
(:use #:3bgl-glsl/cl)
of CL : POSITION as ( input position : vec4 : location 0 )
(:shadow position))
(in-package coordinate-systems/shaders)
(input position :vec3 :location 0)
(input color :vec3 :location 1 :stage :vertex)
(input tex-coord :vec2 :location 2)
(output our-col... |
119b14a682cff3be7ccb0b555e9a5d54de44773cfbb567923c5f65f742467617 | lasp-lang/lasp | state_orset_ext.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the ... | null | https://raw.githubusercontent.com/lasp-lang/lasp/1701c8af77e193738dfc4ef4a5a703d205da41a1/src/state_orset_ext.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(state_orset_ext).
-au... |
ab5c50e53b98126b5c9dd164ee462e4b84babbbff37c16d3d8d7ba2b3825b784 | seckcoder/course-compiler | s0_20.rkt | (let ([a 42])
(let ([b a])
b)) | null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s0_20.rkt | racket | (let ([a 42])
(let ([b a])
b)) | |
456f74cc440357807884c772c82c42bbfa83de2dd47ca03338802c2410259b8c | scicloj/scicloj-data-science-handbook | 04_visualization_with_hanami.clj | (ns scicloj.04-visualization-with-hanami
(:require [notespace.api :as notespace]
[notespace.kinds :as kind]))
Notespace
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Listen for changes in the namespace and update notespace automatically
;; Hidden kinds should not show in the notespace page
^kind/hidden... | null | https://raw.githubusercontent.com/scicloj/scicloj-data-science-handbook/7c0488199ec0a63a9d5e785780c2bbfd102c5978/src/scicloj/04_visualization_with_hanami.clj | clojure |
Listen for changes in the namespace and update notespace automatically
Hidden kinds should not show in the notespace page
Manually start an empty notespace
Renders the notes and listens to file changes
Clear an existing notespace browser
Evaluating a whole notespace
todo
todo
todo
todo
"]
"]
"]
# all HTML ... | (ns scicloj.04-visualization-with-hanami
(:require [notespace.api :as notespace]
[notespace.kinds :as kind]))
Notespace
^kind/hidden
(comment
(notespace/init-with-browser)
(notespace/listen)
(notespace/init)
(notespace/eval-this-notespace))
Chapter 04 - Visualization with Hanami
["# Visuali... |
67cce2a6066bbbf922724c6db7e5e53f92c9e97db6559e1631fb0609ca9ceb89 | vyorkin/tiger | semant.ml | open Core_kernel
open Err
module T = Type
module L = Location
module U = Unique
module S = Symbol
module ST = Symbol_table
type expr_ty =
{ expr : Translate.t;
ty : T.t;
}
let ret ty =
Trace.Semant.ret_ty ty;
{ expr = (); ty }
let ret_int = ret T.Int
let ret_string = ret T.String
let ret_nil = ret T.Nil... | null | https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter5/lib/semant.ml | ocaml | Push the current [expr] to the [path] stack
in our grammar unit is empty seq
Check if all the arguments are supplied
In our language binary operators work only with
integer operands, except for (=) and (<>)
Type of a sequence is a type of its last expression,
but we need to check all previous express... | open Core_kernel
open Err
module T = Type
module L = Location
module U = Unique
module S = Symbol
module ST = Symbol_table
type expr_ty =
{ expr : Translate.t;
ty : T.t;
}
let ret ty =
Trace.Semant.ret_ty ty;
{ expr = (); ty }
let ret_int = ret T.Int
let ret_string = ret T.String
let ret_nil = ret T.Nil... |
1322d63556f4dc6f31e6bb4da10044e63a1176b184b88f083926c0ca32fa232b | tlringer/plugin-tutorial | termutils.ml |
* Utilities for dealing with Coq terms , to abstract away some pain for students
* Utilities for dealing with Coq terms, to abstract away some pain for students
*)
open Evd
(* --- State monad --- *)
* All terms in Coq have to carry around evar_maps ( found in the Evd module ) ,
* which store a bunch of... | null | https://raw.githubusercontent.com/tlringer/plugin-tutorial/e17b9e495782903b3f056e1816e305fdc8283665/src/termutils.ml | ocaml | --- State monad ---
Like map_state, but over arrays
--- Environments and definitions ---
* This gets the global environment and the corresponding state:
Push a local binding to an environment
--- Equality ---
* This checks if there is any set of internal constraints in the state
* such that trm1 and tr... |
* Utilities for dealing with Coq terms , to abstract away some pain for students
* Utilities for dealing with Coq terms, to abstract away some pain for students
*)
open Evd
* All terms in Coq have to carry around evar_maps ( found in the Evd module ) ,
* which store a bunch of constraints about terms t... |
90e9203acc902c742ae618b9c5a7b41e4f83aaa20a516f2b5c3f42e957289cef | sudo-rushil/lambda | Combinator.hs | module Combinator
( module Combinator.Convert
, module Combinator.Reduce
, module Combinator.Syntax
, module Combinator.Transform
) where
import Combinator.Convert
import Combinator.Reduce
import Combinator.Syntax
import Combinator.Transform
| null | https://raw.githubusercontent.com/sudo-rushil/lambda/70474f5053540a693be2f317062074417a687ff7/src/Combinator.hs | haskell | module Combinator
( module Combinator.Convert
, module Combinator.Reduce
, module Combinator.Syntax
, module Combinator.Transform
) where
import Combinator.Convert
import Combinator.Reduce
import Combinator.Syntax
import Combinator.Transform
| |
e8139e2ab1927dcc382dc07bf338f60f43a0d273f360f27ef53ff709ad248602 | SumitPadhiyar/confuzz | lwt_unix_jobs.ml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
module type Job = sig
type 'a t
end
module Make(Job : Job) = struct
external access_job : string -> Unix.access_permission list -> unit Job.t = "lwt_unix_access_job"
external c... | null | https://raw.githubusercontent.com/SumitPadhiyar/confuzz/7d6b2af51d7135025f9ed1e013a9ae0940f3663e/src/unix/unix_c/lwt_unix_jobs.ml | ocaml | This file is part of Lwt , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
module type Job = sig
type 'a t
end
module Make(Job : Job) = struct
external access_job : string -> Unix.access_permission list -> unit Job.t = "lwt_unix_access_job"
external c... | |
1cff722e22f55c2738bf2f5521bca81d0b9c6dc52f6dcde4bd248cd41b8c306d | ghollisjr/cl-ana | logres-test.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 - 2015
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the ... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/makeres/logres-test.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public Lice... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 - 2015
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
dd415a2a25ec710cbb1a50db4a754251c2250fcef626678c817edfade9c49240 | graninas/The-Amoeba-World | TypeFamilyTest3.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE RankNTypes #-}
module Main where
type Caption = String
type Name = String
type PlayerName = String
data PropertyToken a where
IntProperty :: ... | null | https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/Test/Experiments/TypeFamilies/TypeFamilyTest3.hs | haskell | # LANGUAGE TypeSynonymInstances #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
putStrLn $ printProperty res1 | # LANGUAGE FlexibleInstances #
# LANGUAGE TypeFamilies #
# LANGUAGE ExistentialQuantification #
module Main where
type Caption = String
type Name = String
type PlayerName = String
data PropertyToken a where
IntProperty :: Name -> Int -> PropertyToken Int
IntResource :: Name -> (Int, Int) -> PropertyToken ... |
611373bd02930b31dfff810f3df5b8d7070a004244402a483ea9c16dc29d099d | duncanatt/detecter | cowboy_router.erl | Copyright ( c ) 2011 - 2017 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/duncanatt/detecter/95b6a758ce6c60f3b7377c07607f24d126cbdacf/experiments/coordination_2022/src/cowboy/cowboy_router.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2017 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
a 400 or a 404 reply .
-module(cowboy_router).
-beh... |
5f2f2703f5700eabae88c31d2797dcb716d1c946d1e4d46a0c52e757cec40ab4 | thattommyhall/offline-4clojure | p58.clj | ;; Function Composition - Medium
;; Write a function which allows you to create function compositions. The parameter list should take a variable number of functions, and create a function applies them from right-to-left.
;; tags - higher-order-functions:core-functions
;; restricted - comp
(ns offline-4clojure.p58
(:... | null | https://raw.githubusercontent.com/thattommyhall/offline-4clojure/73e32fc6687816aea3c514767cef3916176589ab/src/offline_4clojure/p58.clj | clojure | Function Composition - Medium
Write a function which allows you to create function compositions. The parameter list should take a variable number of functions, and create a function applies them from right-to-left.
tags - higher-order-functions:core-functions
restricted - comp
your solution here | (ns offline-4clojure.p58
(:use clojure.test))
(def __
)
(defn -main []
(are [soln] soln
(= [3 2 1] ((__ rest reverse) [1 2 3 4]))
(= 5 ((__ (partial + 3) second) [1 2 3 4]))
(= true ((__ zero? #(mod % 8) +) 3 5 7 9))
(= "HELLO" ((__ #(.toUpperCase %) #(apply str %) take) 5 "hello world"))
))
|
43d8e5d61dd475d238592ca0dcd3578ebc39f7c8841e8b1589042ba7dc53fd3d | input-output-hk/ouroboros-network | Server.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE UndecidableInstances #
module Ouroboros.Consensus.MiniProtocol.LocalTxSubmission.Server (
localTxSubmissionServer
-- * Trace events
, TraceLocalTxSubmissionServerEvent (..)
) where
imp... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/ebb34fa4d1ba1357e3b803a49f750d2ae3df19e5/ouroboros-consensus/src/Ouroboros/Consensus/MiniProtocol/LocalTxSubmission/Server.hs | haskell | # LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
* Trace events
The output list of addTxs has the same length as the input list.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
--------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
module Ouroboros.Consensus.MiniProtocol.LocalTxSubmission.Server (
localTxSubmissionServer
, TraceLocalTxSubmissionServerEvent (..)
) where
import Control.Tracer
import Ouroboros.Network.Protocol.LocalTxSubmission.Server... |
9574f732e1a9d254534a1a8efa45fc6eac3b9e2c6cbd1380a4a2e3885c7cf638 | ghuysmans/ocaml-fet | teachers.ml | type t = Teacher.t
let header = ["Teacher"]
let of_list = function
| [t] -> Teacher.of_string t
| _ -> failwith "Teachers.of_list"
let to_list t =
[No_plus.to_string t]
| null | https://raw.githubusercontent.com/ghuysmans/ocaml-fet/e1f2ce9e500e16e6d181baf9e440ede21d740ef7/lib/teachers.ml | ocaml | type t = Teacher.t
let header = ["Teacher"]
let of_list = function
| [t] -> Teacher.of_string t
| _ -> failwith "Teachers.of_list"
let to_list t =
[No_plus.to_string t]
| |
0c72830ba32ed5f942a9d9d9aabe5a660a8c0baf8c93de6170b859aa77fe047d | YoshikuniJujo/test_haskell | Middle.hs | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.CommandPool.Middle (
-- * Type
C,
-- * Create and Destroy
create, destroy, CreateInfo(..) ) where
import Gpu.Vulkan.CommandPool.Middle.Internal
| null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/6ea44c1048805a62979669c185ab32ba9f4d2e02/themes/gui/vulkan/try-vulkan-middle/src/Gpu/Vulkan/CommandPool/Middle.hs | haskell | * Type
* Create and Destroy | # OPTIONS_GHC -Wall -fno - warn - tabs #
module Gpu.Vulkan.CommandPool.Middle (
C,
create, destroy, CreateInfo(..) ) where
import Gpu.Vulkan.CommandPool.Middle.Internal
|
b532c9f34301358e714553cefe1ae4e9a03c5c8b9608337e0de61a3b96c15e00 | andrewthad/packed | Set.hs | {-# LANGUAGE BangPatterns #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
{-# OPTIONS_GHC
-Weverything
-fno-warn-unsafe
-fno-warn-implicit-prelude
-fno-warn-missing-import-lists
#-}
module Packed.Bytes.Set
( ByteSet(..)
, member
, fromList
, invert
) where
import Data.Primitive (ByteAr... | null | https://raw.githubusercontent.com/andrewthad/packed/72437b5f99fbe745897a0a27cae72565c9727781/src/Packed/Bytes/Set.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE RankNTypes #
# OPTIONS_GHC
-Weverything
-fno-warn-unsafe
-fno-warn-implicit-prelude
-fno-warn-missing-import-lists
#
# UNPACK #
The machine word size must divide into the length evenly, but this is
unchecked.
len
x
y
z
this is only used internally | # LANGUAGE ScopedTypeVariables #
module Packed.Bytes.Set
( ByteSet(..)
, member
, fromList
, invert
) where
import Data.Primitive (ByteArray)
import Data.Semigroup (Semigroup)
import Control.Monad.ST (ST,runST)
import Data.Word (Word8)
import Data.Bits ((.|.),complement)
import Control.Monad (forM_)
import... |
a2fc7e36f0e781fee78e8b01cf33d6e456f620d9cbd73a582a9bf91134e449a2 | stanfordhaskell/cs43 | Main.hs | module Main where
import Control.DeepSeq
import Control.Parallel.Strategies hiding (parPair, evalList, rdeepseq)
main :: IO ()
main = do
putStrLn "hello world"
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
-------------------------------------------
-- Lazy Evaluation
-----------------------------------------... | null | https://raw.githubusercontent.com/stanfordhaskell/cs43/8353da9e27336a7fe23488c3536e0dab4aaabfff/lecture-code/week9/src/Main.hs | haskell | -----------------------------------------
Lazy Evaluation
-----------------------------------------
Non-strict vs Lazy evaluation
ghci> let z = (x, x)
ghci> let z = (x, x + 1)
-----------------------------------------
-----------------------------------------
-----------------------------------------
NFData
------... | module Main where
import Control.DeepSeq
import Control.Parallel.Strategies hiding (parPair, evalList, rdeepseq)
main :: IO ()
main = do
putStrLn "hello world"
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
ghci > let x = 3 : : Int
ghci > let x = 1 + 2 : : Int
ghci > let xs = map ( + 1 ) [ 1 .. 10 ] : ... |
39dfd5184b2e1a37a5ba427df568c77129b8331d88b46b93dd2c819ff717c54e | nikodemus/SBCL | macros.lisp | lots of basic macros for the target SBCL
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domai... | null | https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/src/code/macros.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
closures are compiled. RESTART-CASE has forms with closures that
the compiler causes to be generated at the top of any function
to do a signi... | lots of basic macros for the target SBCL
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
ASSERT and CHECK - TYPE
ASSERT is written this way ,... |
535348cb92620bcddcaee17ca5a8010bb72b36bb0f37b869988676a7bae4faea | hexlet-basics/exercises-clojure | index.clj | (ns index)
;BEGIN
(defn sum [v]
(reduce + v))
;END
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/ede14102d01f9ef736e0af811cd92f5b22a83bc2/modules/35-vectors/20-vectors-choose/index.clj | clojure | BEGIN
END | (ns index)
(defn sum [v]
(reduce + v))
|
ac3a79ff0e4cd054a9f771234ae972aa28e54d55a1fb25efd0175f298b84af24 | charlesetc/Orb | utop.ml | open Orb;;
| null | https://raw.githubusercontent.com/charlesetc/Orb/d59a6b0513a629146a45d09a9a0c4be5d3615651/ppx/classic/utop.ml | ocaml | open Orb;;
| |
b155edeb73afcb07109b282a30ee80894c32fbb167e1bf98e3cbbf08289b2d81 | wardle/hermes | verhoeff_test.clj | (ns com.eldrix.hermes.verhoeff-test
(:require [clojure.test :refer [deftest is run-tests]]
[com.eldrix.hermes.verhoeff :refer [append calculate valid?]]))
(deftest valid-verhoeffs
(is (= 3 (calculate 236)))
(is (valid? 2363))
(is (= 3 (calculate "236")))
(is (valid? "2363"))
(is (= 6 (calculate... | null | https://raw.githubusercontent.com/wardle/hermes/948a116613b2fa2eb8b628c49e47479f216beac6/test/com/eldrix/hermes/verhoeff_test.clj | clojure | (ns com.eldrix.hermes.verhoeff-test
(:require [clojure.test :refer [deftest is run-tests]]
[com.eldrix.hermes.verhoeff :refer [append calculate valid?]]))
(deftest valid-verhoeffs
(is (= 3 (calculate 236)))
(is (valid? 2363))
(is (= 3 (calculate "236")))
(is (valid? "2363"))
(is (= 6 (calculate... | |
2c58f3511a44de63cd9e791984ebfcfa1db87507b8838266e92eabe5effd8cdf | lemmaandrew/CodingBatHaskell | sum2.hs | From
Given an array of ints , return the sum of the first 2 elements in the array . If the
array length is less than 2 , just sum up the elements that exist , returning 0 if the array
is length 0 .
Given an array of ints, return the sum of the first 2 elements in the array. If the
array length is less than ... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Array-1/sum2.hs | haskell | From
Given an array of ints , return the sum of the first 2 elements in the array . If the
array length is less than 2 , just sum up the elements that exist , returning 0 if the array
is length 0 .
Given an array of ints, return the sum of the first 2 elements in the array. If the
array length is less than ... | |
ed9e70c761a31759935dd5e95376e104003e2f06bcf9b11d3694b5ea07e706d0 | alekras/erl.mqtt.server | mqtt_rest_utils.erl | %%
Copyright ( C ) 2015 - 2022 by ( )
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
... | null | https://raw.githubusercontent.com/alekras/erl.mqtt.server/d05919cfc7bfdb7a252eb97a58da67f6a3c48138/apps/mqtt_rest/src/mqtt_rest_utils.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright ( C ) 2015 - 2022 by ( )
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mqtt_rest_utils).
-export([to_binary/1]).
-export([to_list/1]).
-export([to_float/1]).
-export([to_int/1]).
-export([to_lower/1]... |
58a22ca3066b6e3f0035000a9aa19986ecac8ce4e247f096c9ca80309db8a342 | alex-gutev/generic-cl | package.lisp | package.lisp
;;;;
Copyright 2018
;;;;
;;;; Permission is hereby granted, free of charge, to any person
;;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;;; restriction, including without limitation the rights to use,
;;;; copy, mod... | null | https://raw.githubusercontent.com/alex-gutev/generic-cl/e337b8d2198791994f4377a522bf0200d2285548/src/set/package.lisp | lisp |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condi... | package.lisp
Copyright 2018
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(uiop:define-package :ge... |
c3d4de22b1bd8b48d7116bbe6bfddcbee9c052e6f1a1220678445454358b6435 | ocaml-flambda/ocaml-jst | coloring.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/asmcomp/coloring.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
Register allocation by coloring of the interference graph
module Int = Misc.Stdlib.Int
module Ordered... |
a72cfc36a48c7765b0c7101701d4ebbaa5172a1687767f71a828b40c5128d7c9 | lambdaclass/holiday_pinger | channel_test_SUITE.erl | -module(channel_test_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
all() ->
[test_channel].
init_per_suite(Config) ->
{ok, _Apps} = application:ensure_all_started(holiday_ping),
#{email := Email, token := Token} = test_utils:create_user_with_token(),
[{user, Email}, {token, Toke... | null | https://raw.githubusercontent.com/lambdaclass/holiday_pinger/a8a6d1e28de57cf24d6205d275981a718305b351/test/channel_test_SUITE.erl | erlang | -module(channel_test_SUITE).
-include_lib("common_test/include/ct.hrl").
-compile(export_all).
all() ->
[test_channel].
init_per_suite(Config) ->
{ok, _Apps} = application:ensure_all_started(holiday_ping),
#{email := Email, token := Token} = test_utils:create_user_with_token(),
[{user, Email}, {token, Toke... | |
8a594c283b9a4d5e9d5e4dfba6da785a611115b5a889f2d644768fd6934778d5 | jfacorro/clojure-lab | trie.clj | (ns lab.core.trie
(:refer-clojure :exclude [contains?]))
(defn contains?
"Returns true if the value x exists in the specified trie."
[trie x]
(:terminal (get-in trie x) false))
(defn prefix-matches
"Returns a list of matches with the prefix specified in the trie specified."
[trie prefix]
(map :val (filt... | null | https://raw.githubusercontent.com/jfacorro/clojure-lab/f0b5a4b78172984fc876f063f66e5e1592178da9/src/clj/lab/core/trie.clj | clojure | (ns lab.core.trie
(:refer-clojure :exclude [contains?]))
(defn contains?
"Returns true if the value x exists in the specified trie."
[trie x]
(:terminal (get-in trie x) false))
(defn prefix-matches
"Returns a list of matches with the prefix specified in the trie specified."
[trie prefix]
(map :val (filt... | |
575d08c659416133ea1f84436e36af91c86d289ab281df18f73f275523630c15 | mattjbray/ocaml-decoders | decode.mli | include Decoders.Decode.S with type value = Bencode.t
val int64 : int64 decoder
| null | https://raw.githubusercontent.com/mattjbray/ocaml-decoders/da05e541c1c587151ee3ccadf929e86b287215bb/src-bencode/decode.mli | ocaml | include Decoders.Decode.S with type value = Bencode.t
val int64 : int64 decoder
| |
5c9b93f48dddf546fd256183237bdd3fb6d16cc352f086707eb8a9b09e29b57c | thi-ng/demos | texture.cljs | (ns ex04.texture
(:require
[thi.ng.geom.gl.buffers :as buf]
[thi.ng.color.core :as col]
[thi.ng.color.gradients :as grad]))
(defn gradient-texture
[gl w h opts]
(let [canv (.createElement js/document "canvas")
ctx (.getContext canv "2d")
cols (reverse (grad/cosine-gradient h (:rainbow1 ... | null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-8/day2/ex04/src/ex04/texture.cljs | clojure | (ns ex04.texture
(:require
[thi.ng.geom.gl.buffers :as buf]
[thi.ng.color.core :as col]
[thi.ng.color.gradients :as grad]))
(defn gradient-texture
[gl w h opts]
(let [canv (.createElement js/document "canvas")
ctx (.getContext canv "2d")
cols (reverse (grad/cosine-gradient h (:rainbow1 ... | |
0acc2bea5a205849dc4f55738132f69de831ca15555d0ccaf6dc3f6dea545355 | pirapira/bamboo | wrapCryptokit.ml | module Hash = Cryptokit.Hash
let string_keccak str : string =
let sha3_256 = Hash.keccak 256 in
let () = sha3_256#add_string str in
let ret = sha3_256#result in
let tr = Cryptokit.Hexa.encode () in
let () = tr#put_string ret in
let () = tr#finish in
let ret = tr#get_string in
need to c... | null | https://raw.githubusercontent.com/pirapira/bamboo/1cca98e0b6d2579fe32885e66aafd0f5e25d9eb5/src/cross-platform-for-ocamlbuild/wrapCryptokit.ml | ocaml | module Hash = Cryptokit.Hash
let string_keccak str : string =
let sha3_256 = Hash.keccak 256 in
let () = sha3_256#add_string str in
let ret = sha3_256#result in
let tr = Cryptokit.Hexa.encode () in
let () = tr#put_string ret in
let () = tr#finish in
let ret = tr#get_string in
need to c... | |
67c7c7590bc636c4e2823418c468bd11d8313d6a41e5b26e1b34087d8d6268cf | binghe/closette | utils.lisp | ;;;
Utilities
;;;
(in-package #:closette)
;;; push-on-end is like push except it uses the other end:
(defmacro push-on-end (value location)
`(setf ,location (nconc ,location (list ,value))))
( setf getf * ) is like ( setf getf ) except that it always changes the list ,
;;; which must be non-nil.
... | null | https://raw.githubusercontent.com/binghe/closette/20ed5c8b0ef459394198e25081f39321e9df643b/utils.lisp | lisp |
push-on-end is like push except it uses the other end:
which must be non-nil.
mapappend is like mapcar except that the results are appended together:
mapplist is mapcar for property lists: | Utilities
(in-package #:closette)
(defmacro push-on-end (value location)
`(setf ,location (nconc ,location (list ,value))))
( setf getf * ) is like ( setf getf ) except that it always changes the list ,
(defun (setf getf*) (new-value plist key)
(block body
(do ((x plist (cddr x)))
((null x))
... |
ec7e907ba04d0faab1331915364bdcfdccdc2e2ad4cd92c964d8ca0bffb146a6 | janestreet/incr_dom | entry_id.mli | open! Core
open! Import
type t
val create : int -> t
include Identifiable with type t := t
val id_string : t -> string
| null | https://raw.githubusercontent.com/janestreet/incr_dom/56c04e44d6a8f1cc9b2b841495ec448de4bf61a1/example/entry_table/entry_id.mli | ocaml | open! Core
open! Import
type t
val create : int -> t
include Identifiable with type t := t
val id_string : t -> string
| |
07a7a72f14e60beeb4d4930319a038456b66933515f28213938088bdcea67f85 | ruhler/smten | Yices2.hs |
# LANGUAGE DataKinds #
# LANGUAGE NoImplicitPrelude #
module Smten.Tests.Yices2 (main) where
import Smten.Prelude
import qualified Smten.Tests.SMT.Core as Core
import qualified Smten.Tests.SMT.Datatype as Datatype
import qualified Smten.Tests.SMT.Error as Error
import qualified Smten.Tests.SMT.Integer as Integer
impo... | null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/Smten/Tests/Yices2.hs | haskell |
# LANGUAGE DataKinds #
# LANGUAGE NoImplicitPrelude #
module Smten.Tests.Yices2 (main) where
import Smten.Prelude
import qualified Smten.Tests.SMT.Core as Core
import qualified Smten.Tests.SMT.Datatype as Datatype
import qualified Smten.Tests.SMT.Error as Error
import qualified Smten.Tests.SMT.Integer as Integer
impo... | |
af43636cb55aeeadc0672551d9dd8e418287d9283b345b750611e32dc1e1be5d | tommaisey/aeon | ring4.help.scm | ;; (ring4 a b)
;; Ring modulation variant. Return the value of ((a*a *b) -
;; (a*b*b)). This is more efficient than using separate unit
;; generators for the multiplies.
See also , ring1 , , .
(audition
(out 0 (mul (ring4 (f-sin-osc ar 800 0)
(f-sin-osc ar (x-line kr 200 500 5 do-nothing) 0))
0.12... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/binary-ops/ring4.help.scm | scheme | (ring4 a b)
Ring modulation variant. Return the value of ((a*a *b) -
(a*b*b)). This is more efficient than using separate unit
generators for the multiplies. |
See also , ring1 , , .
(audition
(out 0 (mul (ring4 (f-sin-osc ar 800 0)
(f-sin-osc ar (x-line kr 200 500 5 do-nothing) 0))
0.125)))
(let ((a (f-sin-osc ar 800 0))
(b (f-sin-osc ar (x-line kr 200 500 5 do-nothing) 0)))
(audition
(out 0 (mul (sub (mul3 a a b) (mul3 a b b))
0.125... |
516c7f49ecf53423c59886fa9dc72cf993b21bb4cd08cb1135b163f534f16be7 | seanomlor/programming-in-haskell | zip.hs | zip' :: [a] -> [b] -> [(a, b)]
zip' [] _ = []
zip' _ [] = []
zip' (x:xs) (y:ys) = (x, y) : zip' xs ys
| null | https://raw.githubusercontent.com/seanomlor/programming-in-haskell/e05142e6709eeba2e95cf86f376a32c9e629df88/06-recursive-functions/zip.hs | haskell | zip' :: [a] -> [b] -> [(a, b)]
zip' [] _ = []
zip' _ [] = []
zip' (x:xs) (y:ys) = (x, y) : zip' xs ys
| |
692aab1aef3f0ba089df6ff6be048fa6e44392c6423f54b7c38b1a7804b98d6c | Simre1/haskell-game | Manual.hs | import Graphics.GPipe
import qualified Graphics.GPipe.Context.GLFW as GLFW
import qualified Test.Common as C
import qualified Test.Control as A
main :: IO ()
main = do
putStrLn "== Manual event processing"
putStrLn $ "\tRender a scene to a window without automatic event processing."
runContextT handleConfi... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/GPipe-GLFW/Smoketests/src/Manual.hs | haskell | Config which disables automatic event processing | import Graphics.GPipe
import qualified Graphics.GPipe.Context.GLFW as GLFW
import qualified Test.Common as C
import qualified Test.Control as A
main :: IO ()
main = do
putStrLn "== Manual event processing"
putStrLn $ "\tRender a scene to a window without automatic event processing."
runContextT handleConfi... |
d3236f01bfcadff745c72cc03d1d2136522fc5721d91fcb32e563996f2fca3a5 | jaredly/reason-language-server | btype.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
and ,... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/btype.ml | ocaml | ************************************************************************
OCaml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Misc
open Asttypes
open Types
module TypeSet = Set.Make(TypeOps)
module TypeMap = Map.Make (TypeOps)
module Typ... |
e470d1a41cf9708b87a621c294a54ace87284960ddbcf1aa1d327ccd6a16cea7 | frenetic-lang/netkat-automata | TermSize.ml | open Core.Std
open Async.Std
module Ast = Frenetic_Decide_Ast
module Deriv = Frenetic_Decide_Deriv
module DerivTerm = Deriv.BDDDeriv
module Measurement = Frenetic_Decide_Measurement
module Util = Frenetic_Decide_Util
(* [base f] returns the basename of [f] without any file extensions. *)
let base (filename: string) :... | null | https://raw.githubusercontent.com/frenetic-lang/netkat-automata/a4c3809e40e7c2ce500182043a74131ac9c19579/src/TermSize.ml | ocaml | [base f] returns the basename of [f] without any file extensions. | open Core.Std
open Async.Std
module Ast = Frenetic_Decide_Ast
module Deriv = Frenetic_Decide_Deriv
module DerivTerm = Deriv.BDDDeriv
module Measurement = Frenetic_Decide_Measurement
module Util = Frenetic_Decide_Util
let base (filename: string) : string =
Filename.basename filename
|> Filename.split_extension
|... |
f8e9259008f01cb0a970767cd371ada3a0514c8ff72646be3898009abae7abb2 | VincentToups/racket-lib | rmatch-let.rkt | #lang racket
(require racket/match
(for-syntax syntax/parse)
(for-syntax racket/match)
syntax/parse)
(define-syntax (rmatch-let stx)
(define (positive-integer? n)
(and (number? n)
(> n 0)))
(define (gen-ids seed n)
(let loop ((ids '())
(n n))
(match... | null | https://raw.githubusercontent.com/VincentToups/racket-lib/d8aed0959fd148615b000ceecd7b8a6128cfcfa8/utilities/rmatch-let.rkt | racket | #lang racket
(require racket/match
(for-syntax syntax/parse)
(for-syntax racket/match)
syntax/parse)
(define-syntax (rmatch-let stx)
(define (positive-integer? n)
(and (number? n)
(> n 0)))
(define (gen-ids seed n)
(let loop ((ids '())
(n n))
(match... | |
0ec4df40027bfad6e304cf171e15f0f87303333f89a87a6b7649f8fb1050e29f | antoniogarrote/egearmand-server | jobs_queue_server.erl | -module(jobs_queue_server) .
%% @doc
%% Module with functions handling the queues with job requests
%% for different priority levels.
-author("Antonio Garrote Hernandez") .
-behaviour(gen_server) .
-include_lib("states.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([start_link/0, submit_job/5, lookup_job/... | null | https://raw.githubusercontent.com/antoniogarrote/egearmand-server/45296fb40e3ddb77f71225121188545a371d2237/src/jobs_queue_server.erl | erlang | @doc
Module with functions handling the queues with job requests
for different priority levels.
Public API
@doc
client connection established from ClientSocket.
@doc
client connection established from ClientSocket.
@doc
@doc
inserting the provided Option.
@doc
Searches for some job associated to the functi... | -module(jobs_queue_server) .
-author("Antonio Garrote Hernandez") .
-behaviour(gen_server) .
-include_lib("states.hrl").
-include_lib("eunit/include/eunit.hrl").
-export([start_link/0, submit_job/5, lookup_job/1, reeschedule_job/1, check_option_for_job/2]).
-export([init/1, handle_call/3, handle_cast/2, handle_inf... |
e15e6a8488307b289692da12f89d1b40af0616278d5ea7e98360bfc10de51682 | ocamllabs/ocaml-modular-implicits | listLabels.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, Kyot... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/stdlib/listLabels.ml | ocaml | *********************************************************************
OCaml
... | , Kyoto University RIMS
Copyright 2001 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
include List
|
f17faa7f7a87f2855f68318b794c983cd9906446105bd40e1835d5a4275fc2ed | kovasb/gamma-driver | program.cljs | (ns gamma.webgl.model.program
(:require [gamma.webgl.model.core :as m]
[gamma.webgl.shader :as shader]
[gamma.webgl.model.attributes :as attributes]
[gamma.webgl.model.uniforms :as uniforms]))
(defrecord Program [root parts]
m/IModel
(resolve [this val]
(@parts val))
(c... | null | https://raw.githubusercontent.com/kovasb/gamma-driver/abe0e1dd01365404342f4e8e04263e48c4648b6e/src/gamma/webgl/model/program.cljs | clojure | (ns gamma.webgl.model.program
(:require [gamma.webgl.model.core :as m]
[gamma.webgl.shader :as shader]
[gamma.webgl.model.attributes :as attributes]
[gamma.webgl.model.uniforms :as uniforms]))
(defrecord Program [root parts]
m/IModel
(resolve [this val]
(@parts val))
(c... | |
60483311a86744ac12e55f4810410bbc8928997467bdea9b1129012a6940747e | racehub/om-bootstrap | components.cljs | (ns om-bootstrap.docs.components
"All components for the om-bootstrap documentation project."
(:require [om.core :as om :include-macros true]
[om-bootstrap.docs.example :refer [->example TODO]]
[om-bootstrap.docs.shared :refer [page-header]]
[om-bootstrap.button :as b]
... | null | https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/docs/src/cljs/om_bootstrap/docs/components.cljs | clojure | ## Helpers
## Panel
## Popovers
## Pagination
## Alerts
## Labels
## Badges
## Well
## Tables
## Final Page Loading | (ns om-bootstrap.docs.components
"All components for the om-bootstrap documentation project."
(:require [om.core :as om :include-macros true]
[om-bootstrap.docs.example :refer [->example TODO]]
[om-bootstrap.docs.shared :refer [page-header]]
[om-bootstrap.button :as b]
... |
2c46e4816740174727c48f835d9d78868726a0e6cf438e50ef7b2ccae49653a6 | the2pizza/authorizer | time_test.clj | (ns authorizer.time-test
(:require [clojure.test :refer :all]
[authorizer.account :as account]
[authorizer.time :refer :all])
(:import (java.time LocalDateTime)))
(def test-transaction-record {:transaction {:merchant "KFC" :amount 20, :time "2019-02-13T12:02:07.000Z"}})
(def test-account-r... | null | https://raw.githubusercontent.com/the2pizza/authorizer/024f9760621a9187337b5ef326d9b51795a4bdee/test/authorizer/time_test.clj | clojure | (ns authorizer.time-test
(:require [clojure.test :refer :all]
[authorizer.account :as account]
[authorizer.time :refer :all])
(:import (java.time LocalDateTime)))
(def test-transaction-record {:transaction {:merchant "KFC" :amount 20, :time "2019-02-13T12:02:07.000Z"}})
(def test-account-r... | |
c552fc55b78ad7922a8b574e7ba42797ea315ef379ea691f89bc869464de045a | DavidAlphaFox/RabbitMQ | rest_simple_resource.erl | -module(rest_simple_resource).
-export([init/3, content_types_provided/2, get_text_plain/2]).
init(_Transport, _Req, _Opts) ->
{upgrade, protocol, cowboy_http_rest}.
content_types_provided(Req, State) ->
{[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}.
get_text_plain(Req, State) ->
{<<"This is RES... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/cowboy-wrapper/cowboy-git/test/rest_simple_resource.erl | erlang | -module(rest_simple_resource).
-export([init/3, content_types_provided/2, get_text_plain/2]).
init(_Transport, _Req, _Opts) ->
{upgrade, protocol, cowboy_http_rest}.
content_types_provided(Req, State) ->
{[{{<<"text">>, <<"plain">>, []}, get_text_plain}], Req, State}.
get_text_plain(Req, State) ->
{<<"This is RES... | |
b13160b43a0dcb161071e451d4dba318aab2170156a050b20b226d9b3363aef4 | tyage/tiny-c | Type.hs | module Type where
import Control.Monad.Writer
import Control.Monad.State
data Program = ExDeclList [ExternalDeclaration]
data ExternalDeclaration = Decl Declaration
| FuncDef FunctionDefinition
data Declaration = Declaration DeclaratorList
| EmptyDeclaration
data Declarato... | null | https://raw.githubusercontent.com/tyage/tiny-c/92aed366ad4e610b3daf15c9fccf4d5b6f3ba6ad/task8/Type.hs | haskell | Asm | module Type where
import Control.Monad.Writer
import Control.Monad.State
data Program = ExDeclList [ExternalDeclaration]
data ExternalDeclaration = Decl Declaration
| FuncDef FunctionDefinition
data Declaration = Declaration DeclaratorList
| EmptyDeclaration
data Declarato... |
d817af6760a8c31cf74736b69182fc4b02afd919e2dd5d8287d42cd39261949f | cmsc430/www | test-runner.rkt | #lang racket
(provide test-runner test-runner-io)
(require rackunit)
(define (test-runner run)
;; Abscond examples
(check-equal? (run 7) 7)
(check-equal? (run -8) -8)
examples
(check-equal? (run '(add1 (add1 7))) 9)
(check-equal? (run '(add1 (sub1 7))) 7)
;; Con examples
(check-equal? (run '(if (zer... | null | https://raw.githubusercontent.com/cmsc430/www/be56bd3dfa05387a0b6250e3ee031f8dbd7d28bc/langs/hoax/test/test-runner.rkt | racket | Abscond examples
Con examples
Fraud examples
Hoax examples
Evildoer examples
Fraud examples | #lang racket
(provide test-runner test-runner-io)
(require rackunit)
(define (test-runner run)
(check-equal? (run 7) 7)
(check-equal? (run -8) -8)
examples
(check-equal? (run '(add1 (add1 7))) 9)
(check-equal? (run '(add1 (sub1 7))) 7)
(check-equal? (run '(if (zero? 0) 1 2)) 1)
(check-equal? (run '(if... |
217317c8a2c85ed6bd434f5986014fa8709b25e3737ff3325627ed028753daa4 | wavewave/hoodle | Default.hs | # LANGUAGE CPP #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE MultiWayIf #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Hoodle.Coroutine.Default where
import Control.Concurrent
( forkIO,
forkOn,
newEmptyMVar,
putMVar,
)
import qualified Control.Exception ... | null | https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/core/src/Hoodle/Coroutine/Default.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
-------
|
| maxundo
| initialization according to the setting
additional initialization goes here
|
main loop
|
|
ad hoc
|
|
for the time being, I replace any background to solid background
for debugging | # LANGUAGE CPP #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Hoodle.Coroutine.Default where
import Control.Concurrent
( forkIO,
forkOn,
newEmptyMVar,
putMVar,
)
import qualified Control.Exception as E
import Control.Lens (at, over, set, view, (.~), (?~), (^.), _2)
import Control.Mo... |
556e8e24e4ba408f0a9ce185f0ad753b0c70a25dbbee5614bea895e6598ca610 | VisionsGlobalEmpowerment/webchange | icon_align_left.cljs | (ns webchange.ui.components.icon.system.icon-align-left)
(def data
[:svg {:xmlns ""
:width "26" :height "24" :viewBox "0 0 26 24"
:class-name "stroke-colored"
:fill "none" :stroke "#3453A1" :stroke-width "2" :stroke-miterlimit "10"}
[:path {:d "M4.21875 6.375H21.3299"}]
... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/07ab8bb00cf8fee60cbcf1ac1519e3409a7b681e/src/cljs/webchange/ui/components/icon/system/icon_align_left.cljs | clojure | (ns webchange.ui.components.icon.system.icon-align-left)
(def data
[:svg {:xmlns ""
:width "26" :height "24" :viewBox "0 0 26 24"
:class-name "stroke-colored"
:fill "none" :stroke "#3453A1" :stroke-width "2" :stroke-miterlimit "10"}
[:path {:d "M4.21875 6.375H21.3299"}]
... | |
d6e194e8a3037bf2482d527628b6c7a70ddd420c34dbfe39b11b9ce54ab4001e | goldfirere/singletons | T226.hs | module T226 where
import Data.Singletons.TH
$(singletons [d| class a ~> b |])
| null | https://raw.githubusercontent.com/goldfirere/singletons/70d622645b960d60411ab8f31d16ffb91e69379e/singletons-base/tests/compile-and-dump/Singletons/T226.hs | haskell | module T226 where
import Data.Singletons.TH
$(singletons [d| class a ~> b |])
| |
3b086f36ad696ce3a1c1f24156930ed63c4f3a5a6f694b14a4a526a00a734981 | CSCfi/rems | config.cljs | (ns rems.config
(:require [re-frame.core :as rf]
[rems.common.util :refer [index-by]]
[rems.flash-message :as flash-message]
[rems.util :refer [fetch]]))
;; config
(rf/reg-event-db
::loaded-config
(fn [db [_ config]]
(assoc db
:config config
:default-lang... | null | https://raw.githubusercontent.com/CSCfi/rems/567ce80d7b136d43570083380933d2907baba769/src/cljs/rems/config.cljs | clojure | config
organizations | (ns rems.config
(:require [re-frame.core :as rf]
[rems.common.util :refer [index-by]]
[rems.flash-message :as flash-message]
[rems.util :refer [fetch]]))
(rf/reg-event-db
::loaded-config
(fn [db [_ config]]
(assoc db
:config config
:default-language (get ... |
cf921f84b21fe1d1a7e6fac04d2eb12c47a7820c3498d0fa78ca3583261296d9 | foreverbell/project-euler-solutions | 78.hs | import Data.Array.IArray
modulo = 1000000 :: Int
ways :: Array Int Int
ways = listArray (0, 100000) [ dp n | n <- [0 .. 100000] ] where
dp 0 = 1
dp n = helper 1 1 where
helper j r = if val1 >= 0
then (acc + (helper (j + 1) (-r))) `mod` modulo
else 0 where
val1 =... | null | https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/78.hs | haskell | import Data.Array.IArray
modulo = 1000000 :: Int
ways :: Array Int Int
ways = listArray (0, 100000) [ dp n | n <- [0 .. 100000] ] where
dp 0 = 1
dp n = helper 1 1 where
helper j r = if val1 >= 0
then (acc + (helper (j + 1) (-r))) `mod` modulo
else 0 where
val1 =... | |
bf9d9d4dc498e7c4bd9a0677dea826e866867aa44d73c47e168871d8e68864c8 | cyverse-archive/DiscoveryEnvironmentBackend | element.clj | (ns metadactyl.routes.domain.app.element
(:use [common-swagger-api.schema :only [describe]]
[schema.core :only [defschema optional-key]])
(:import [java.util UUID]))
(defschema DataSource
{:id (describe UUID "A UUID that is used to identify the Data Source")
:name (describe String "The... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/routes/domain/app/element.clj | clojure | (ns metadactyl.routes.domain.app.element
(:use [common-swagger-api.schema :only [describe]]
[schema.core :only [defschema optional-key]])
(:import [java.util UUID]))
(defschema DataSource
{:id (describe UUID "A UUID that is used to identify the Data Source")
:name (describe String "The... | |
eb6516b6ec8731781b614ad963e633f510e9df96fc95e92d08627c13cd29559b | silkapp/rest | Gen.hs | module Rest.Gen
( generate
) where
import Data.Char
import Data.Foldable
import Data.Label
import Data.Maybe
import System.Directory
import System.Exit
import System.Process
import qualified Language.Haskell.Exts.Syntax as H
import Rest.Api (Api, Some1 (..), withVersion)
import Rest.Gen.Config
import Rest.Gen.Do... | null | https://raw.githubusercontent.com/silkapp/rest/f0462fc36709407f236f57064d8e37c77bdf8a79/rest-gen/src/Rest/Gen.hs | haskell | module Rest.Gen
( generate
) where
import Data.Char
import Data.Foldable
import Data.Label
import Data.Maybe
import System.Directory
import System.Exit
import System.Process
import qualified Language.Haskell.Exts.Syntax as H
import Rest.Api (Api, Some1 (..), withVersion)
import Rest.Gen.Config
import Rest.Gen.Do... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.