_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 |
|---|---|---|---|---|---|---|---|---|
6dffb500465d30fed8282f2b51946edb7942622623a841b3c7dbb985d6792cf9 | eeng/shevek | manager_test.clj | (ns shevek.schema.manager-test
(:require [clojure.test :refer [use-fixtures deftest is testing]]
[shevek.test-helper :refer [wrap-unit-tests it]]
[shevek.asserts :refer [submaps?]]
[shevek.makers :refer [make!]]
[shevek.schemas.cube :refer [Cube]]
[shevek.sc... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/test/clj/shevek/schema/manager_test.clj | clojure | (ns shevek.schema.manager-test
(:require [clojure.test :refer [use-fixtures deftest is testing]]
[shevek.test-helper :refer [wrap-unit-tests it]]
[shevek.asserts :refer [submaps?]]
[shevek.makers :refer [make!]]
[shevek.schemas.cube :refer [Cube]]
[shevek.sc... | |
194f8cfa3d12b8c26794e5dc1d6abf67983d89a0c7fe4fdde47dcfb259a48fec | threatgrid/ctia | purge_es_stores.clj | (ns ctia.task.purge-es-stores
(:require [clojure.tools.logging :as log]
[ctia
[init :refer [start-ctia!*]]
[properties :as p]]
[schema.core :as s]
[ctia.store-service :as store-svc]
[ctia.stores.es.store :refer [delete-state-indexes]]
... | null | https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/test/ctia/task/purge_es_stores.clj | clojure | (ns ctia.task.purge-es-stores
(:require [clojure.tools.logging :as log]
[ctia
[init :refer [start-ctia!*]]
[properties :as p]]
[schema.core :as s]
[ctia.store-service :as store-svc]
[ctia.stores.es.store :refer [delete-state-indexes]]
... | |
7d6e11a707759127ea6ea4ec094137eee295222c62c191b90542c5d6e3f5f6bb | levand/prolin | polynomial.clj | (ns prolin.polynomial
(:require [prolin.protocols :as p]))
(defn multiply
"Multiply a LinearPolynomial by a constant"
[polynomial n]
(let [c (* n (p/constant polynomial))
old-vs (p/variables polynomial)
vs (zipmap (keys old-vs) (map #(* n %) (vals old-vs)))]
(reify p/LinearPolynomial
... | null | https://raw.githubusercontent.com/levand/prolin/1483d6503095e85f66e577262abfb1c90571cfd2/src/prolin/polynomial.clj | clojure | (ns prolin.polynomial
(:require [prolin.protocols :as p]))
(defn multiply
"Multiply a LinearPolynomial by a constant"
[polynomial n]
(let [c (* n (p/constant polynomial))
old-vs (p/variables polynomial)
vs (zipmap (keys old-vs) (map #(* n %) (vals old-vs)))]
(reify p/LinearPolynomial
... | |
3ae036f18201de70ed6a5d19971c17d115753a13d774d84bb20a2cd5a515a95b | arcadia-unity/ArcadiaGodot | 2D.clj | (ns arcadia.2D
(:import
[Godot Node GD Node2D Vector2 KinematicBody2D]))
(defn ^Vector2 position [^Node2D node]
(.Position node))
(defn ^Vector2 position! [^Node2D node ^Vector2 v]
(.SetPosition node v))
(defn ^Vector2 scale [^Node2D o]
(.Scale o))
(defn ^Vector2 scale! [^Node2D o ^Vector2 v]
(set! ... | null | https://raw.githubusercontent.com/arcadia-unity/ArcadiaGodot/d9881c8132c46f21efde4eb4eb9a534d808cdb20/Source/arcadia/2D.clj | clojure | (ns arcadia.2D
(:import
[Godot Node GD Node2D Vector2 KinematicBody2D]))
(defn ^Vector2 position [^Node2D node]
(.Position node))
(defn ^Vector2 position! [^Node2D node ^Vector2 v]
(.SetPosition node v))
(defn ^Vector2 scale [^Node2D o]
(.Scale o))
(defn ^Vector2 scale! [^Node2D o ^Vector2 v]
(set! ... | |
5b8d924779259960d00c4d71131a140e6bf71034431887dc2c1bbecd30610ad2 | program-repair-project/bug-localizer | scenario.ml | type t = {
work_dir : string;
compile_script : string;
test_script : string;
coverage_data : string;
}
let file_instrument filename preamble =
let read_whole_file filename =
let ch = open_in filename in
let s = really_input_string ch (in_channel_length ch) in
close_in ch;
s
in
let c_code ... | null | https://raw.githubusercontent.com/program-repair-project/bug-localizer/432d7181f506eb9018b6860474fd0b74ae5f81bd/src/scenario.ml | ocaml | type t = {
work_dir : string;
compile_script : string;
test_script : string;
coverage_data : string;
}
let file_instrument filename preamble =
let read_whole_file filename =
let ch = open_in filename in
let s = really_input_string ch (in_channel_length ch) in
close_in ch;
s
in
let c_code ... | |
59b59c2ec6807643aa965ac190774f2f4bdc3d270d033c93a89891f6b72b46e3 | hslua/hslua | HsLua.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Test . Tasty . HsLua
Copyright : © 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : beta
Portability : non - portable ( depends on GHC )
Utilities for testing of HsLua operations .
Module : Test.Tasty.HsLua
Copyright : © ... | null | https://raw.githubusercontent.com/hslua/hslua/178c225f3da193f09fc27877a5a30e66eef069fb/hslua-core/test/Test/Tasty/HsLua.hs | haskell | # LANGUAGE OverloadedStrings #
| Takes a Lua expression as a 'ByteString', evaluates it and pushes
the result to the stack.
will return " 12 "
> run $ do
> tointeger top
'Assertion' which checks that the operation produces the given value.
error message.
| Checks whether the return value of an operation hold... | |
Module : Test . Tasty . HsLua
Copyright : © 2017 - 2023 : MIT
Maintainer : < tarleb+ >
Stability : beta
Portability : non - portable ( depends on GHC )
Utilities for testing of HsLua operations .
Module : Test.Tasty.HsLua
Copyright : © 2017-2023 Albert Krewinkel
License ... |
84da166e4c882b907235a08b81ed9cf9c6d957922b500abe3b16a2e954de0fa1 | source-c/zlib-tiny | project.clj | (defproject net.tbt-post/zlib-tiny "0.5.0"
:description "Tiny Clojure ZLib helper"
:url "-c/zlib-tiny"
:license {:name "Apache License v2.0"
:url "-2.0"}
:dependencies [[commons-io "2.11.0"]])
| null | https://raw.githubusercontent.com/source-c/zlib-tiny/c8862826be34563f507d426400c76e833dddc418/project.clj | clojure | (defproject net.tbt-post/zlib-tiny "0.5.0"
:description "Tiny Clojure ZLib helper"
:url "-c/zlib-tiny"
:license {:name "Apache License v2.0"
:url "-2.0"}
:dependencies [[commons-io "2.11.0"]])
| |
5de06e8324324858ba44111c603dc6bc89fa40be93d0aed748fa2ed3010de5a6 | nuvla/ui | spec.cljs | (ns sixsq.nuvla.ui.apps-store.spec
(:require [clojure.spec.alpha :as s]
[sixsq.nuvla.ui.plugins.full-text-search :as full-text-search-plugin]
[sixsq.nuvla.ui.plugins.nav-tab :as tab-plugin]
[sixsq.nuvla.ui.plugins.pagination :as pagination-plugin]))
(s/def ::modules any?)
(s/def :... | null | https://raw.githubusercontent.com/nuvla/ui/c14e09c9fab322ff19a1da62dc4eb76846decef7/code/src/cljs/sixsq/nuvla/ui/apps_store/spec.cljs | clojure | (ns sixsq.nuvla.ui.apps-store.spec
(:require [clojure.spec.alpha :as s]
[sixsq.nuvla.ui.plugins.full-text-search :as full-text-search-plugin]
[sixsq.nuvla.ui.plugins.nav-tab :as tab-plugin]
[sixsq.nuvla.ui.plugins.pagination :as pagination-plugin]))
(s/def ::modules any?)
(s/def :... | |
da67527ebfbb21c249cf5e7dc95bb95715f64aebfac3810c6272fd6769866602 | jtdaugherty/vty | Color.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE ScopedTypeVariables #
module Graphics.Vty.Attributes.Color
( Color(..)
, ColorMode(..)
-- * Detecting Terminal Color Support
, detectColorMode
-- ** Fixed Colors
| Standard 8 - color ANSI terminal color code... | null | https://raw.githubusercontent.com/jtdaugherty/vty/479d94c099b730c7a813ba2a4492b01ffcf7f09d/src/Graphics/Vty/Attributes/Color.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE MultiWayIf #
* Detecting Terminal Color Support
** Fixed Colors
Note that these map to colors in the terminal's custom palette. For
instance, `white` maps to whatever the terminal color theme uses for
white.
Use these functions if you want to make apps that fit the termina... | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
module Graphics.Vty.Attributes.Color
( Color(..)
, ColorMode(..)
, detectColorMode
| Standard 8 - color ANSI terminal color codes .
If you want access to more / stronger colors use ` rgbColor `
, black
, red
, green
, yellow
, blue
, m... |
daa37df7269fe0e740a432eb4a2a5de7a7f9f1b25b0b013ba003509e14927c53 | yminer/libml | expertSystem.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... | null | https://raw.githubusercontent.com/yminer/libml/1475dd87c2c16983366fab62124e8bbfbbf2161b/src/expert-systems/common/expertSystem.ml | ocaml | *
An expression is what can be found on the left and right parts of a rule.
a variable name
an integer
arithmetic operators
logical operators
comparison operators
*
A rule is a => b where a and b are expressions.
*
Contains the rules of the expert system.
*
Adds a rule to knowledge base
@... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
[ LibML - Machine Learning Library ]
Copyright ( C ) 2002 - 2003 LAGACHERIE
This program is free software ; you can redistribute it and/or
modify it under the te... |
164ddbb3cecdd86a9433d2398d9af2e5e0d747b3422a38276ed7ed74997ef31e | mylesmegyesi/metis | validators.clj | (ns metis.validators
(:require [metis.util :refer :all])
(:import [org.apache.commons.validator.routines EmailValidator UrlValidator]))
(defn with [map _ {validator :validator}]
(if validator
(when-not (validator map)
"is invalid")
(throw (Exception. "Validator not given."))))
(defn contains [map ... | null | https://raw.githubusercontent.com/mylesmegyesi/metis/44127ac75fb6ce6235a516bf6a6f8a9222e5dd67/src/metis/validators.clj | clojure | (ns metis.validators
(:require [metis.util :refer :all])
(:import [org.apache.commons.validator.routines EmailValidator UrlValidator]))
(defn with [map _ {validator :validator}]
(if validator
(when-not (validator map)
"is invalid")
(throw (Exception. "Validator not given."))))
(defn contains [map ... | |
23c98214385e9407e15a96b0886dcfbd915aa4c5af90d47a7b1978a41b737333 | ralsei/sawzall | filtering-join.rkt | #lang racket/base
(require data-frame
fancy-app
racket/contract/base
"generic-join.rkt"
"grouped-df.rkt"
"grouping.rkt")
(provide (contract-out [semi-join (-> (or/c data-frame? grouped-data-frame?)
(or/c data-frame? grouped-data-frame?)
... | null | https://raw.githubusercontent.com/ralsei/sawzall/bff8a299f23a89c3c0dab134827baba432182ba4/sawzall-lib/filtering-join.rkt | racket | #lang racket/base
(require data-frame
fancy-app
racket/contract/base
"generic-join.rkt"
"grouped-df.rkt"
"grouping.rkt")
(provide (contract-out [semi-join (-> (or/c data-frame? grouped-data-frame?)
(or/c data-frame? grouped-data-frame?)
... | |
4c636b44bf66f337d8b1eab0d261e3276af1274108702451a78e8021afd272de | patzy/glaw | text.lisp | (in-package #:glaw-examples)
(defstruct text
(font1 nil)
(font2 nil)
(font3 nil)
(view nil))
(defmethod init-example ((it text))
(glaw:load-asset "dejavu-sans.fnt" :font)
(glaw:load-asset "liberation-serif-italic.fnt" :font)
(setf (text-font1 it) (glaw:use-resource "default-font"))
(setf (text-font2 i... | null | https://raw.githubusercontent.com/patzy/glaw/e678fc0c107ce4b1e3ff9921a6de7e32fd39bc37/examples/text.lisp | lisp | (in-package #:glaw-examples)
(defstruct text
(font1 nil)
(font2 nil)
(font3 nil)
(view nil))
(defmethod init-example ((it text))
(glaw:load-asset "dejavu-sans.fnt" :font)
(glaw:load-asset "liberation-serif-italic.fnt" :font)
(setf (text-font1 it) (glaw:use-resource "default-font"))
(setf (text-font2 i... | |
b04cc52100315fdb247ea7b3dc1dd01ec209ae2206fadf128444d029d0859fa1 | kvakvs/E4VM | uasm_huffman.erl | @doc Given a list of integers ( the program ) figure out Huffman encoding
%%% for this program and the decoding tree.
%%% Opcodes in the code then can be encoded using opcode frequency tree
%%% (either dynamically calculated by uasm_stats or hardcoded).
%%% @end
-module(uasm_huffman).
-export([
decode/2,
encode... | null | https://raw.githubusercontent.com/kvakvs/E4VM/2eac924efad972cfd488f1ad75e2f055cd18bd14/Compiler.old/apps/uasm/src/uasm_huffman.erl | erlang | for this program and the decoding tree.
Opcodes in the code then can be encoded using opcode frequency tree
(either dynamically calculated by uasm_stats or hardcoded).
@end
@doc Given the module (for labels) and list of compiled funs with operators
{Opcode, Arg} produce frequency tree and encode each fun separate... | @doc Given a list of integers ( the program ) figure out Huffman encoding
-module(uasm_huffman).
-export([
decode/2,
encode/1,
encode_funs/1,
encode_labels/1,
encode_tree/2,
merge_bits_into_binary/1
]).
@doc Given tree ( a dict ) , encode it as a chain of bit 0/1 prefixed
node values of fixed len... |
c35b9e55f47df220146265c8de035f828c298f7576c589d61d156e335bd09364 | jspahrsummers/ScrumBut | Foundation.hs | module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Data.Maybe (fromJust)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Auth.OAuth2.Github (oauth2GithubScoped)
import Yesod.Default.Util (addStaticCo... | null | https://raw.githubusercontent.com/jspahrsummers/ScrumBut/4e2a8dce520b713c4c618c085123075b5b7bed4d/Foundation.hs | haskell | | The foundation datatype for your application. This can be a good place to
keep settings and values requiring initialization before your application
starts running, such as database connections. Every handler will have
access to the data present here.
^ Settings for static file serving.
^ Database connection poo... | module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Data.Maybe (fromJust)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Auth.OAuth2.Github (oauth2GithubScoped)
import Yesod.Default.Util (addStaticCo... |
a5db771c7335468885ca908a3ae17b8736f2a295113ff0afea4bfec3a9740c4f | bburdette/chordster | DeleteChord.hs | module Handler.DeleteChord where
import Import
getDeleteChordR :: SongId -> SongChordId -> Handler Html
getDeleteChordR sid scid = do
runDB $ deleteWhere [SongChordId ==. scid]
renumberChords sid
redirect $ SongR sid
renumberChords :: SongId -> Handler ()
renumberChords sid = do
chordz <- runDB $ selectLis... | null | https://raw.githubusercontent.com/bburdette/chordster/70d235f1ca379e5ecd4a8f39dc1e734e2d50978b/Handler/DeleteChord.hs | haskell | module Handler.DeleteChord where
import Import
getDeleteChordR :: SongId -> SongChordId -> Handler Html
getDeleteChordR sid scid = do
runDB $ deleteWhere [SongChordId ==. scid]
renumberChords sid
redirect $ SongR sid
renumberChords :: SongId -> Handler ()
renumberChords sid = do
chordz <- runDB $ selectLis... | |
85230bc9356d786beedc24bfe3ad2eef6f467e6020160f7f45de1960648d57a5 | habit-lang/alb | ParensParsec.hs | {-# LANGUAGE NoMonomorphismRestriction, FlexibleContexts #-}
module ParensParsec where
import Control.Applicative
import Text.Parsec
import Text.Parsec.Indentation
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (testCase, assertEqual, assertFailure, Assertion)
data A
= Par A --... | null | https://raw.githubusercontent.com/habit-lang/alb/5144e3a4c47ee62e4719644325d59e4adf193da1/libraries/indentation-parsec/tests/ParensParsec.hs | haskell | # LANGUAGE NoMonomorphismRestriction, FlexibleContexts #
'(' A ')'
'[' A ']'
A A
epsilon
conveniences for tests | module ParensParsec where
import Control.Applicative
import Text.Parsec
import Text.Parsec.Indentation
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit (testCase, assertEqual, assertFailure, Assertion)
data A
deriving (Show, Eq)
a :: (Monad m, Stream s m (Char, Indentation)) => Pa... |
51eb2550f7e94298be83065dab17b98ac665229888ece549539162b90525a73b | Ailrun/core-lang-haskell | Parser.hs | # LANGUAGE CPP #
module Language.Parser
( clex
, syntax
, parse
)
where
import Data.Char
import Language.Types
import Util
#if __CLH_EXERCISE_1__ < 11
clex :: String -> [Token]
#endif
syntax :: [Token] -> CoreProgram
parse :: String -> CoreProgram
#if __CLH_EXERCISE_1__ < 11
parse = syntax . clex
type Token... | null | https://raw.githubusercontent.com/Ailrun/core-lang-haskell/f6f700ad08fe31bd765381b7e18b747ff2f07c44/src/Language/Parser.hs | haskell | |
|
This one shows bad performance
since it always produces empty result even when | # LANGUAGE CPP #
module Language.Parser
( clex
, syntax
, parse
)
where
import Data.Char
import Language.Types
import Util
#if __CLH_EXERCISE_1__ < 11
clex :: String -> [Token]
#endif
syntax :: [Token] -> CoreProgram
parse :: String -> CoreProgram
#if __CLH_EXERCISE_1__ < 11
parse = syntax . clex
type Token... |
4d47707217fcbb3a868f3cb93b0aa21854fbe2f475fbf1ae4877dfd31dcd6b6d | ztellman/penumbra | triangle3.clj | (ns example.wiki.triangle3
(:use [penumbra.opengl])
(:require [penumbra.app :as app]))
(defn init [state]
(app/vsync! true)
state)
(defn reshape [[x y width height] state]
(frustum-view 60.0 (/ (double width) height) 1.0 100.0)
(load-identity)
state)
(defn mouse-drag [[dx dy] [x y] button state]
(ass... | null | https://raw.githubusercontent.com/ztellman/penumbra/db43d01c280305beab26d1004ae78b1777ab3fc7/test/example/wiki/triangle3.clj | clojure | (ns example.wiki.triangle3
(:use [penumbra.opengl])
(:require [penumbra.app :as app]))
(defn init [state]
(app/vsync! true)
state)
(defn reshape [[x y width height] state]
(frustum-view 60.0 (/ (double width) height) 1.0 100.0)
(load-identity)
state)
(defn mouse-drag [[dx dy] [x y] button state]
(ass... | |
105d1cd5ed164ab4f2e3c283cebd2560196d2350e1e152391fcea6fc1480cf20 | erlyaws/yaws | yaws_appmod_dav.erl | %%%-------------------------------------------------------------------
%%% File : yaws_appmod_dav.erl
Created : 11 Nov 2012
Purpose : WebDav module , RFC4918 class 1 , 2 , 3 compliant
%%%
%%% To use, add the following configuration:
%%%
%%% <server>
%%% ...
%%% ... | null | https://raw.githubusercontent.com/erlyaws/yaws/486e32ee73972de5f11e13da5501901c7f768944/src/yaws_appmod_dav.erl | erlang | -------------------------------------------------------------------
File : yaws_appmod_dav.erl
To use, add the following configuration:
<server>
...
dav = true
</server>
This configuration is short for:
runm... | Created : 11 Nov 2012
Purpose : WebDav module , RFC4918 class 1 , 2 , 3 compliant
Todo : 1 ) Add header handling ( most of the time not used by DAV
-module(yaws_appmod_dav).
for appmod :
-export([out/1]).
-export([export/1]).
-ifdef(debug).
-define(DEBUG(X), io:format(X)).
-define(DEBUG(X,Y), io:format... |
58942425f1738691de4f355bcdb9025817c1eea5add1500311403eec36a9dec0 | nubank/vessel | misc.clj | (ns vessel.misc
(:require [clojure.data.json :as json]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.string :as string])
(:import java.io.File
[java.nio.file Files LinkOption Path Paths]
java.security.MessageDigest
java.text.DecimalForma... | null | https://raw.githubusercontent.com/nubank/vessel/40036928d20cfd07b31b99bb2389d5421c49d26d/src/vessel/misc.clj | clojure | I/O functions. | (ns vessel.misc
(:require [clojure.data.json :as json]
[clojure.edn :as edn]
[clojure.java.io :as io]
[clojure.string :as string])
(:import java.io.File
[java.nio.file Files LinkOption Path Paths]
java.security.MessageDigest
java.text.DecimalForma... |
f0c96fe93745519a19015f51cc4bbff3cfeb108e503c1e5998993d3e2fd658a9 | rjnw/sham | debug.rkt | #lang racket
(require racket/trace
(for-syntax syntax/parse))
(require "utils.rkt"
"ctxt.rkt"
"../debug.rkt"
"../ast.rkt")
(provide (all-defined-out)
(all-from-out "../debug.rkt")
(all-from-out racket/trace))
;; (define debug? (make-parameter #t))
;; (define-synta... | null | https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-examples/sham/cryptol/compiler/debug.rkt | racket | (define debug? (make-parameter #t))
(define-syntax (debug stx)
[(_ es ...)
#`(when (debug?) es ...)]))
(define (debug-print v) (debug (printf "debug: ") (pretty-print v) (newline)) v)
(define-syntax (TODO stx)
[(_ s:string args:expr ...)
#`(error 'sham/cry/todo s args ...)]
[else #`(error... | #lang racket
(require racket/trace
(for-syntax syntax/parse))
(require "utils.rkt"
"ctxt.rkt"
"../debug.rkt"
"../ast.rkt")
(provide (all-defined-out)
(all-from-out "../debug.rkt")
(all-from-out racket/trace))
( syntax - case stx ( )
( syntax - parse stx
... |
2c8cdcbe31f97112b78dabbd30411b0539d4dcd602f33e41be232a091fca34b0 | nt591/monkey-ocaml | token.ml | module Token = struct
include Fmt
type token_type =
| ILLEGAL
| EOF
(* Identifiers and literals *)
| IDENT of string
| INT of string
Operators
| ASSIGN
| PLUS
| MINUS
| BANG
| ASTERISK
| SLASH
| LT
| GT
(* -- Delimiters *)
| COMMA
| SEMICOLON
| ... | null | https://raw.githubusercontent.com/nt591/monkey-ocaml/46882b03ca7d911b5a12b0e47738778fde5ee7fc/src/token.ml | ocaml | Identifiers and literals
-- Delimiters
-- Keywords | module Token = struct
include Fmt
type token_type =
| ILLEGAL
| EOF
| IDENT of string
| INT of string
Operators
| ASSIGN
| PLUS
| MINUS
| BANG
| ASTERISK
| SLASH
| LT
| GT
| COMMA
| SEMICOLON
| LPAREN
| RPAREN
| LBRACE
| RBRACE
| FUNCTIO... |
a30f708e0d4d2205bcf78efc43ad9ce34868e4a6a57b44fc15b55365711dd5ef | aiya000/haskell-examples | Helper.hs | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Helper
( type (-<|)
, (-<|)
) where
type family (-<|) a b where
x -<| _ = x
(-<|) :: a -> b -> a
(-<|) = const
| null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Language/Haskell/Extension/ExplicitNamespaces/Helper.hs | haskell | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Helper
( type (-<|)
, (-<|)
) where
type family (-<|) a b where
x -<| _ = x
(-<|) :: a -> b -> a
(-<|) = const
| |
952479b8a5581a28523f2a3b1b8c0b8395113fe4682aed6aa36e393e2af21124 | jgoerzen/hpodder | Update.hs | hpodder component
Copyright ( C ) 2006 - 2007 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
This ... | null | https://raw.githubusercontent.com/jgoerzen/hpodder/bd08d07cc29893177efe8ef0e8be368657d56bbf/Commands/Update.hs | haskell | removeFile ((\(_, _, fp, _) -> fp) dltok)
some problem with the feed
Ctrl-C is not a tackable error
i $ " Podcast Title: " ++ (castname newpc)
i $ printf " %d new episodes" count | hpodder component
Copyright ( C ) 2006 - 2007 < >
This program is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
( at your option ) any later version .
This ... |
b97930b0b1bc15d7643e1dffa5c449888e9ee66a010a627d2dd1166cd27db1d4 | penpot/penpot | spec.cljc | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
;;
;; Copyright (c) KALEIDOS INC
(ns app.common.spec
"Data validation & assertion helpers."
(:refer-clojure :exclude [assert bytes?])
#?(... | null | https://raw.githubusercontent.com/penpot/penpot/c3ce0eb7945b5412f72a50e55312a7341387ba51/common/src/app/common/spec.cljc | clojure |
Copyright (c) KALEIDOS INC
NOTE: don't remove this, causes exception on advanced build
modules splitting.
--- Constants
DEFAULT SPECS
--- SPEC: uuid
--- SPEC: boolean
--- SPEC: number
--- SPEC: integer
--- SPEC: keyword
--- SPEC: email
-- SPEC: uri
--- SPEC: color string
--- SPEC: set/vector of Keyword... | 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 /.
(ns app.common.spec
"Data validation & assertion helpers."
(:refer-clojure :exclude [assert bytes?])
#?(:cljs (:require-macros [app.commo... |
2c854c60168562f63abf720c6a5319b4af7f6677cc656e56a2a6e5dfc897598e | dherman/c.rkt | parser.rkt | #lang racket/base
(require (for-syntax racket/base))
(require parser-tools/lex
parser-tools/yacc
racket/match
racket/list
syntax/readerr
(except-in "../ast.rkt" declarator-context? type-context?)
"lexer.rkt"
"syntactic-context.rkt")
(provide parse-program... | null | https://raw.githubusercontent.com/dherman/c.rkt/00b344eaa61276dfb9b06a8b2d558307d149023d/private/parser.rkt | racket | XXX: forbid typedefs in illegal contexts (to prevent strange environment entries)
Note: all the valid sequences in the spec are in reverse alphabetical order.
XXX: what else could these params be?
TODO: are there cases where this is ok? can it even come up?
XXX: put the inline somewhere
==========================... | #lang racket/base
(require (for-syntax racket/base))
(require parser-tools/lex
parser-tools/yacc
racket/match
racket/list
syntax/readerr
(except-in "../ast.rkt" declarator-context? type-context?)
"lexer.rkt"
"syntactic-context.rkt")
(provide parse-program... |
2bcbfdfe56194799567398017bc7c5340a8aa0a6429c481020896603ba749ebe | kahaani/TINY-in-Haskell | Parse.hs | module Parse (
Stmt(..),
Exp(..),
parse
) where
import Scan (Token(..))
data Stmt =
If2K Exp [Stmt]
| If3K Exp [Stmt] [Stmt]
| RepeatK [Stmt] Exp
Assign Token / IDK
ReadK Token / IDK
| WriteK Exp
deriving (Show)
data Exp =
OpK Token Exp Exp
| ConstK Int --ConstK Token
deriving (Show)
parse :: [T... | null | https://raw.githubusercontent.com/kahaani/TINY-in-Haskell/9149c71faa09d33a18b00a08180cefeb6359de77/v1/Parse.hs | haskell | ConstK Token | module Parse (
Stmt(..),
Exp(..),
parse
) where
import Scan (Token(..))
data Stmt =
If2K Exp [Stmt]
| If3K Exp [Stmt] [Stmt]
| RepeatK [Stmt] Exp
Assign Token / IDK
ReadK Token / IDK
| WriteK Exp
deriving (Show)
data Exp =
OpK Token Exp Exp
deriving (Show)
parse :: [Token] -> [Stmt]
parse text = l... |
6ceb58fa312adb261eb02face95aad648537184c10ccd74feccc0c3322793f6b | bpoweski/consul-clojure | watch.clj | (ns consul.watch
(:require [consul.core :as consul]
[clojure.core.async :as async]))
(def watch-fns
{:key consul/kv-get
:keyprefix consul/kv-recurse
:service consul/service-health})
(defn poll! [conn [kw x] params]
(let [f (get watch-fns kw)]
(f conn x params)))
(defn poll
"C... | null | https://raw.githubusercontent.com/bpoweski/consul-clojure/11627a538eabf3c2e8a9b0e3caf6d1944291ffd6/src/consul/watch.clj | clojure | don't rely on the old index if we experience a consul failure
We don't need the initial value.
Release out here | (ns consul.watch
(:require [consul.core :as consul]
[clojure.core.async :as async]))
(def watch-fns
{:key consul/kv-get
:keyprefix consul/kv-recurse
:service consul/service-health})
(defn poll! [conn [kw x] params]
(let [f (get watch-fns kw)]
(f conn x params)))
(defn poll
"C... |
5bd63af502d4f21d586bf3f0a6e6af3fa07d490047298f3ce640e91a10a4006b | jepsen-io/knossos | wgl_test.clj | (ns knossos.wgl-test
(:require [clojure.test :refer :all]
[knossos.wgl :refer :all]
[knossos.op :as op]
[knossos.model :refer [register cas-register inconsistent]]
[knossos.core-test :as ct]
[clojure.pprint :refer [pprint]]))
(deftest ^:perf timeout-test
... | null | https://raw.githubusercontent.com/jepsen-io/knossos/1cb706f979c1712add47f0519d9e1dcb85635635/test/knossos/wgl_test.clj | clojure | In this particular history, we know the value is 0, then we have
appears out of nowhere.
appears out of nowhere. | (ns knossos.wgl-test
(:require [clojure.test :refer :all]
[knossos.wgl :refer :all]
[knossos.op :as op]
[knossos.model :refer [register cas-register inconsistent]]
[knossos.core-test :as ct]
[clojure.pprint :refer [pprint]]))
(deftest ^:perf timeout-test
... |
f4d9e4403bf34cdcecd8602d8121bef6f35bb6fa3286bd94f0f7a1c485e500e7 | tezos-commons/baseDAO | Tree.hs | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
# OPTIONS_GHC -F -pgmF tasty - discover -optF --tree - display --generated - module -optF Tree #
| null | https://raw.githubusercontent.com/tezos-commons/baseDAO/934ed5f5cb2b5adb585765edd8301d0e2084f676/haskell/test/Tree.hs | haskell | tree - display --generated - module -optF Tree # | SPDX - FileCopyrightText : 2021 Tezos Commons
SPDX - License - Identifier : LicenseRef - MIT - TC
|
095877f8038e1e58d90b11359b198fc45fcdf99fd3bc7d2b68c70b423a1a78fd | hercules-ci/hercules-ci-agent | DummyApi.hs | # LANGUAGE DataKinds #
# OPTIONS_GHC -fno - warn - missing - fields #
module DummyApi
( dummyBuildEndpoints,
dummyEvalEndpoints,
dummyTasksEndpoints,
dummyLifeCycleEndpoints,
)
where
import Hercules.API.Agent.Build
import Hercules.API.Agent.Evaluate
import Hercules.API.Agent.LifeCycle
import Hercules.... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/216a1d178d57471b05f60bf3e21ce46d3fdc5f94/tests/agent-test/src/DummyApi.hs | haskell | Provide uninitialised API records without warnings | # LANGUAGE DataKinds #
# OPTIONS_GHC -fno - warn - missing - fields #
module DummyApi
( dummyBuildEndpoints,
dummyEvalEndpoints,
dummyTasksEndpoints,
dummyLifeCycleEndpoints,
)
where
import Hercules.API.Agent.Build
import Hercules.API.Agent.Evaluate
import Hercules.API.Agent.LifeCycle
import Hercules.... |
2b1d845547902b7a877fa5a880449518675201ce80d1055337703e60ccacf0f7 | wireless-net/erlang-nommu | gen.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2014 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/src/gen.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 1996 - 2014 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(gen).
-compile({inline,[get_node/1]... |
2d402cf1025422beaa4e3322a01f7fbf28229db6e535456c62b4918acf00e80c | Hara-Laboratory/subleq-toolchain | Subneg.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , UndecidableInstances #
module Language.Subleq.Model.InstructionSet.Subneg (step, initialMachine) where
import Language.Subleq.Model.Prim
import qualified Language.Subleq.Model.Memory as Mem
step :: (Memory a a m, Num a, Ord a) => Machine a w m Bool
step = do
... | null | https://raw.githubusercontent.com/Hara-Laboratory/subleq-toolchain/c79ab101c2c50f2975d6087b9727bf024df05195/Language/Subleq/Model/InstructionSet/Subneg.hs | haskell | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , UndecidableInstances #
module Language.Subleq.Model.InstructionSet.Subneg (step, initialMachine) where
import Language.Subleq.Model.Prim
import qualified Language.Subleq.Model.Memory as Mem
step :: (Memory a a m, Num a, Ord a) => Machine a w m Bool
step = do
... | |
b1e7dab3c03055f24428045369c969795fca150785a5b014816106d474b70bcc | NorfairKing/easyspec | Lists.hs | # LANGUAGE NoImplicitPrelude #
module Lists where
import Prelude ((++), head, init, last, map, reverse, tail)
cons :: a -> [a] -> [a]
cons a as = a : as
| null | https://raw.githubusercontent.com/NorfairKing/easyspec/b038b45a375cc0bed2b00c255b508bc06419c986/examples/toy/Lists.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Lists where
import Prelude ((++), head, init, last, map, reverse, tail)
cons :: a -> [a] -> [a]
cons a as = a : as
| |
518cbe24a3337ede836f57ef62b30a1cc4587ec6f09c5ff61976a2b48dbf15cb | magnars/optimus | add_last_modified_headers_test.clj | (ns optimus.optimizations.add-last-modified-headers-test
(:require [optimus.optimizations.add-last-modified-headers :refer :all]
[midje.sweet :refer :all]))
(fact
"Last-Modified headers help the browsers determine if the files are
the same. If the Last-Modified date is sufficiently far enough in
the... | null | https://raw.githubusercontent.com/magnars/optimus/ac5df602726d255312dfd48cf7ae2e00d99069bd/test/optimus/optimizations/add_last_modified_headers_test.clj | clojure | (ns optimus.optimizations.add-last-modified-headers-test
(:require [optimus.optimizations.add-last-modified-headers :refer :all]
[midje.sweet :refer :all]))
(fact
"Last-Modified headers help the browsers determine if the files are
the same. If the Last-Modified date is sufficiently far enough in
the... | |
cfe7f25ab361d32bc631ef2aed37502a0c7ebbc4fddc21b91737515119cfafa1 | dwincort/AdaptiveFuzz | math.ml | (* TODO: We may need to do our own math in order to avoid floating
point related attacks *)
(* Laplace function *)
let noNoise = ref false
(* The generating function for the laplace dist with parameter mu and
b is X = mu - b sign(U) ln(1-2|U|) where -1/2<=U<1/2
*)
let lap sigma = if !noNoise then 0.0 else
le... | null | https://raw.githubusercontent.com/dwincort/AdaptiveFuzz/ec937e1ea028e17216928dbdd029a5b9b04a0533/src/math.ml | ocaml | TODO: We may need to do our own math in order to avoid floating
point related attacks
Laplace function
The generating function for the laplace dist with parameter mu and
b is X = mu - b sign(U) ln(1-2|U|) where -1/2<=U<1/2
|
let noNoise = ref false
let lap sigma = if !noNoise then 0.0 else
let u = (Random.float 1.0) -. 0.5 in
sigma *. (copysign 1.0 u) *. log(1.0 -. 2.0 *. abs_float u)
A random float between 0.0 and the given positive bound
or 0 if noNoise is set .
or 0 if noNoise is set. *)
let randFloat (bound : float) :... |
8809755a0614e4837c657110e8f8101edc4650ae97ca92dcfe2256b9387a461a | MailOnline/throttle | project.clj | (defproject throttle "0.2.0"
:description "A request throttler library for Clojure."
:dependencies [[org.clojure/clojure "1.8.0"]
[http-kit "2.1.19"]
[org.clojure/core.async "0.2.374"]
;; logging stuff
[org.clojure/tools.logging "0.2.6"]
... | null | https://raw.githubusercontent.com/MailOnline/throttle/83f782095cf21d86528e11115a95da4bbeb59378/project.clj | clojure | logging stuff | (defproject throttle "0.2.0"
:description "A request throttler library for Clojure."
:dependencies [[org.clojure/clojure "1.8.0"]
[http-kit "2.1.19"]
[org.clojure/core.async "0.2.374"]
[org.clojure/tools.logging "0.2.6"]
[ch.qos.logback/logback-cl... |
ffe0be37415f536ff942911ae2efa250229588487d78c97d62b21160ba7d2cfd | binaryage/chromex | file_browser_handler.clj | (ns chromex.ext.file-browser-handler
"Use the chrome.fileBrowserHandler API to extend the Chrome OS file browser. For example, you can use this API to enable
users to upload files to your website.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/file_browser_handler.clj | clojure | -- events -----------------------------------------------------------------------------------------------------------------
docs: /#tapping-events
-- convenience ------------------------------------------------------------------------------------------------------------
--------------------------------------------... | (ns chromex.ext.file-browser-handler
"Use the chrome.fileBrowserHandler API to extend the Chrome OS file browser. For example, you can use this API to enable
users to upload files to your website.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
... |
96d84cbde323a581b3066f90c3178d5c0a0b5806849f2af7347460563bf740f7 | zed-throben/erlangeos | eos@etsobj.erl | -module(eos@etsobj).
-compile(export_all).
-include("eos.hrl").
new(Options,Params)->
Obj = new(),
lists:foreach(
fun({Key,Value})->
set_slot(Obj,Key,Value) end,
Params),
Obj.
ets_pid(?eos(eos@etsobj,PID))->
PID.
new()->
PID = ets:new(undefined,[set,public]),
?eos(... | null | https://raw.githubusercontent.com/zed-throben/erlangeos/44e50e442f5d396c69ae90db530b0b60b01d692a/src/eos%40etsobj.erl | erlang | -module(eos@etsobj).
-compile(export_all).
-include("eos.hrl").
new(Options,Params)->
Obj = new(),
lists:foreach(
fun({Key,Value})->
set_slot(Obj,Key,Value) end,
Params),
Obj.
ets_pid(?eos(eos@etsobj,PID))->
PID.
new()->
PID = ets:new(undefined,[set,public]),
?eos(... | |
05246379e34f74b83ff99f2ac5dd8469665ea7add5ada0761bf58cdf5281c680 | dwayne/eopl3 | parser.test.rkt | #lang racket
(require "./parser.rkt")
(require rackunit)
(check-equal?
(parse "1")
(a-program (const-exp 1)))
(check-equal?
(parse "x")
(a-program (var-exp 'x)))
(check-equal?
(parse "-(5, y)")
(a-program (diff-exp (const-exp 5) (var-exp 'y))))
(check-equal?
(parse "zero?(z)")
(a-program (zero?-exp (var-e... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/CALL-BY-NEED-4.42/parser.test.rkt | racket | #lang racket
(require "./parser.rkt")
(require rackunit)
(check-equal?
(parse "1")
(a-program (const-exp 1)))
(check-equal?
(parse "x")
(a-program (var-exp 'x)))
(check-equal?
(parse "-(5, y)")
(a-program (diff-exp (const-exp 5) (var-exp 'y))))
(check-equal?
(parse "zero?(z)")
(a-program (zero?-exp (var-e... | |
180f74a7f1523d06983e8dec081446bbc84284e2c5d3fda70597d1adb8d93d87 | haskell/cabal | Newtypes.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
| This module provides @newtype@ wrappers to be used with " Distribution . " .
modul... | null | https://raw.githubusercontent.com/haskell/cabal/3b7a2d438a4806562dfee800130c27797eb061b1/Cabal-syntax/src/Distribution/FieldGrammar/Newtypes.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
* List
** Modifiers
** Type
** Set
* Version & License
* Identifiers
| Vertical list with commas. Displayed with 'vcat'
| Paragraph fill list with commas. Displayed wit... | # LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
| This module provides @newtype@ wrappers to be used with " Distribution . " .
module Distribution.FieldGrammar.Newtypes (
alaList,
alaList',
CommaVCat (..),
CommaFSep (..),
VCat (..),
FSep (..),
NoCommaFSep (..),
... |
27e867b41d2e3e55823260dcef368d7bfb8582412f65968fc514999237f42d4c | oshyshko/adventofcode | D15.hs | module Y21.D15 where
import qualified Data.Vector.Generic as VG
import Geom.XY
import Imports
import qualified Pathfinder
import qualified Vec2 as V
import Vec2 (Vec2 (..))
type Risk = Word8
type Score = Word16
11637
13813
21365
parse :: String ->... | null | https://raw.githubusercontent.com/oshyshko/adventofcode/95b6bb4d514cf02680ba1a62de5a5dca2bf9e92d/src/Y21/D15.hs | haskell | keep traversable ones only
risk
add tile value
wrap around | module Y21.D15 where
import qualified Data.Vector.Generic as VG
import Geom.XY
import Imports
import qualified Pathfinder
import qualified Vec2 as V
import Vec2 (Vec2 (..))
type Risk = Word8
type Score = Word16
11637
13813
21365
parse :: String ->... |
3863195b97c79e106ae8663a4b00cae5859605c89460d6e602c5fe2bb7947b14 | Simre1/haskell-game | Fixpoint.hs | # OPTIONS_HADDOCK not - home #
module Polysemy.Internal.Fixpoint where
------------------------------------------------------------------------------
-- | An effect for providing 'Control.Monad.Fix.mfix'.
newtype Fixpoint m a where
Fixpoint :: (a -> m a) -> Fixpoint m a
-------------------------------------------... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/polysemy/src/Polysemy/Internal/Fixpoint.hs | haskell | ----------------------------------------------------------------------------
| An effect for providing 'Control.Monad.Fix.mfix'.
----------------------------------------------------------------------------
when the result of a failed computation
is recursively used and somehow visible. You may use this for your own | # OPTIONS_HADDOCK not - home #
module Polysemy.Internal.Fixpoint where
newtype Fixpoint m a where
Fixpoint :: (a -> m a) -> Fixpoint m a
| The error used in ' Polysemy . Fixpoint.fixpointToFinal ' ,
' Polysemy . Fixpoint.runFixpoint ' and ' Polysemy . Fixpoint.runFixpointM '
' Fixpoint ' interpreters . The ... |
0edc9360f90229c1e2126226fb9e7a9630025154bd40c4a65b34e20029c6456f | estatico/generic-override | Internal.hs | -- | This is the internal generic-override API and should be considered
-- unstable and subject to change. In general, you should prefer to use the
-- public, stable API provided by "Data.Override".
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
... | null | https://raw.githubusercontent.com/estatico/generic-override/06741afce60b5e3cf186a43cfc1b51f02828e7b7/generic-override/src/Data/Override/Internal.hs | haskell | | This is the internal generic-override API and should be considered
unstable and subject to change. In general, you should prefer to use the
public, stable API provided by "Data.Override".
# LANGUAGE ConstraintKinds #
# LANGUAGE RankNTypes #
| The feature of this library. For use with DerivingVia.
Apply it to a t... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE KindSignatures #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE QuantifiedConstraints #
... |
eea9c04344b70da1f4e3c5b5f3d5e2b6c084c594a8c38e26fd8740032a93f8f2 | hellonico/origami | channels_test.clj | (ns origami.channels-test
(:require
[opencv4.utils :as u]
[clojure.pprint]
[opencv4.colors.rgb :as rgb]
[clojure.test :refer :all]
[opencv4.core :as cv]))
(deftest multiply
(let [m (cv/new-mat 2 2 cv/CV_8UC3 (cv/new-scalar 10 20 30))]
(cv/multiply! m (u/matrix-to-mat-of-double [[1.0 0.0 0.0]]... | null | https://raw.githubusercontent.com/hellonico/origami/3f5d73e28b25fb43969777cff7ed41878d01168d/test/origami/channels_test.clj | clojure | (ns origami.channels-test
(:require
[opencv4.utils :as u]
[clojure.pprint]
[opencv4.colors.rgb :as rgb]
[clojure.test :refer :all]
[opencv4.core :as cv]))
(deftest multiply
(let [m (cv/new-mat 2 2 cv/CV_8UC3 (cv/new-scalar 10 20 30))]
(cv/multiply! m (u/matrix-to-mat-of-double [[1.0 0.0 0.0]]... | |
658cec0b99df166c13e7e98953364268ac872426286326d7d98d6081c431d0a8 | tsloughter/kuberl | kuberl_v1_handler.erl | -module(kuberl_v1_handler).
-export([encode/1]).
-export_type([kuberl_v1_handler/0]).
-type kuberl_v1_handler() ::
#{ 'exec' => kuberl_v1_exec_action:kuberl_v1_exec_action(),
'httpGet' => kuberl_v1_http_get_action:kuberl_v1_http_get_action(),
'tcpSocket' => kuberl_v1_tcp_socket_action:kuberl_v1_tcp... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_handler.erl | erlang | -module(kuberl_v1_handler).
-export([encode/1]).
-export_type([kuberl_v1_handler/0]).
-type kuberl_v1_handler() ::
#{ 'exec' => kuberl_v1_exec_action:kuberl_v1_exec_action(),
'httpGet' => kuberl_v1_http_get_action:kuberl_v1_http_get_action(),
'tcpSocket' => kuberl_v1_tcp_socket_action:kuberl_v1_tcp... | |
f6d89995198f540294b833ccf2d9e648d926816c975e1418b271b1b71334247e | bobzhang/fan | ns.ml | let lang = `Absolute ["Fan"; "Lang"]
let macro = `Absolute ["Fan"; "Lang"; "Macro"]
let inject = `Absolute ["Fan"; "Inject"]
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/tests/asts/small/ns.ml | ocaml | let lang = `Absolute ["Fan"; "Lang"]
let macro = `Absolute ["Fan"; "Lang"; "Macro"]
let inject = `Absolute ["Fan"; "Inject"]
| |
2c3105c801a81b9d953db9137c2b528ef4bd368681a2ffa09d8ca434795d67c6 | may-liu/qtalk | ejabberd_socket.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_socket.erl
Author : < >
Purpose : Socket with zlib and TLS support library
Created : 23 Aug 2006 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
%%%
%%% This program is free software; you... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/ejabberd_socket.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_socket.erl
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without ev... | Author : < >
Purpose : Socket with zlib and TLS support library
Created : 23 Aug 2006 by < >
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have recei... |
ede8a027a0d71a2c113358abadb6107a249574c9768abc7a85af736ead517ee7 | dropbox/datagraph | DropboxDataSource.hs | # LANGUAGE StandaloneDeriving , GADTs , TypeFamilies , MultiParamTypeClasses , GeneralizedNewtypeDeriving , OverloadedStrings #
# OPTIONS_GHC -fno - warn - orphans #
module DropboxDataSource where
import Data.Text (Text)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Data.Hashable
import qualifi... | null | https://raw.githubusercontent.com/dropbox/datagraph/429957ebdbf1ef3553dabb2a8f7b16056ef4ac41/src/DropboxDataSource.hs | haskell | 'b0' is untouchable: | # LANGUAGE StandaloneDeriving , GADTs , TypeFamilies , MultiParamTypeClasses , GeneralizedNewtypeDeriving , OverloadedStrings #
# OPTIONS_GHC -fno - warn - orphans #
module DropboxDataSource where
import Data.Text (Text)
import Data.String (IsString)
import Data.Typeable (Typeable)
import Data.Hashable
import qualifi... |
effc425bbd1f6f6c8574c088fdacbc380f0e0c85beec539034460124868865f5 | code-iai/ros_emacs_utils | ecl.lisp | ;;;; -*- indent-tabs-mode: nil -*-
;;;
swank-ecl.lisp --- SLIME backend for ECL .
;;;
;;; This code has been placed in the Public Domain. All warranties
;;; are disclaimed.
;;;
Administrivia
(defpackage swank/ecl
(:use cl swank/backend))
(in-package swank/ecl)
(eval-when (:compile-toplevel :load-toplevel :ex... | null | https://raw.githubusercontent.com/code-iai/ros_emacs_utils/ab5cea686d582020c75881583beca7402fa9e7b8/slime_wrapper/slime/swank/ecl.lisp | lisp | -*- indent-tabs-mode: nil -*-
This code has been placed in the Public Domain. All warranties
are disclaimed.
Hard dependencies.
Soft dependencies.
UTF8
Convert the string STRING to a (simple-array (unsigned-byte 8)).
string-to-utf8 (string)
utf8-to-string (octets)
TCP Server
add-sigio-handler (s... | swank-ecl.lisp --- SLIME backend for ECL .
Administrivia
(defpackage swank/ecl
(:use cl swank/backend))
(in-package swank/ecl)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun ecl-version ()
(let ((version (find-symbol "+ECL-VERSION-NUMBER+" :EXT)))
(if version
(symbol-value... |
e9ff82b95970457d2ae7d78663775ec3aa8f1b471f7818c8a448eb3b1b162d5d | armstnp/advent-of-code-2019 | day23.clj | Set NS before starting : C - c M - n n
(ns advent-of-code-2019.day23
(:require [advent-of-code-2019.core :as core]
[advent-of-code-2019.left-shark :as ls]
[clojure.string :as str]
[clojure.math.combinatorics :as combo]
[is-prime.core :refer [is-prime]]))
(: import ... | null | https://raw.githubusercontent.com/armstnp/advent-of-code-2019/68e21174394d8b0e14433f9f249e995c10ac6d67/src/advent_of_code_2019/day23.clj | clojure | Fill in parse components here | Set NS before starting : C - c M - n n
(ns advent-of-code-2019.day23
(:require [advent-of-code-2019.core :as core]
[advent-of-code-2019.left-shark :as ls]
[clojure.string :as str]
[clojure.math.combinatorics :as combo]
[is-prime.core :refer [is-prime]]))
(: import ... |
545c54fdce8cbafbbe24afdbebbce13b288fa87b489d1dffc334136617b3cc1c | triffon/fp-2019-20 | 13--combinations.rkt | #lang racket
(require rackunit rackunit/text-ui)
(require "06--accumulate.rkt")
(define (1+ n) (+ 1 n))
(define (fact n)
(accumulate * 1 1 n (lambda (x) x) 1+))
# # # Задача 13
Напишете функция , комбинации на ` n ` елемента , .
(define (n-choose-k n k)
(/ (fact n) (fact k) (fact (- n k))))
(run-tes... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/03--higher-order-functions--accumulate/solutions/13--combinations.rkt | racket | #lang racket
(require rackunit rackunit/text-ui)
(require "06--accumulate.rkt")
(define (1+ n) (+ 1 n))
(define (fact n)
(accumulate * 1 1 n (lambda (x) x) 1+))
# # # Задача 13
Напишете функция , комбинации на ` n ` елемента , .
(define (n-choose-k n k)
(/ (fact n) (fact k) (fact (- n k))))
(run-tes... | |
5cd60bd441b63790a486451b0f05317f1abe6f115d2836dce6f56a201b64716c | Happstack/happstack-foundation | Main.hs | # LANGUAGE DeriveDataTypeable , FlexibleContexts , FlexibleInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , OverloadedStrings , RecordWildCards , TemplateHaskell , TypeFamilies , TypeSynonymInstances , OverloadedStrings #
{-# OPTIONS_GHC -F -pgmFhsx2hs #-}
module Main where
import Happstack.Foundation
... | null | https://raw.githubusercontent.com/Happstack/happstack-foundation/531fa8d79c6b2703459ba1c6456b2f968f594a6e/examples/ControlV/Main.hs | haskell | # OPTIONS_GHC -F -pgmFhsx2hs #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
| an id which uniquely identifies a paste
id yet. Though.. I am not thrilled about 0 having special meaning
that is not enforced by... | # LANGUAGE DeriveDataTypeable , FlexibleContexts , FlexibleInstances , GeneralizedNewtypeDeriving , MultiParamTypeClasses , OverloadedStrings , RecordWildCards , TemplateHaskell , TypeFamilies , TypeSynonymInstances , OverloadedStrings #
module Main where
import Happstack.Foundation
import Control.Exception (bracket)
... |
baf2e784d9c43844969cc1daa6a677bcc1b98d0e9db2fd589e7e640a00df673c | FlowerWrong/mblog | broadcast.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/broadcast.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
-net.cs.umass.edu/cs653-1997/notes/ch3/ch3-1.html
-fa... | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
Broadcast messages can place a high load on a network since they
Broadcasting is usually used for either of two reasons : to find
s = socke... |
75dfb9e6ffe90b02f86f4f6ec95df5962029558db628f18a2fa66f4f9f423c3a | babashka/babashka | strikethrough_test.clj | (ns clarktown.parsers.strikethrough-test
(:require
[clojure.test :refer [deftest testing is]]
[clarktown.parsers.strikethrough :as strikethrough]))
(deftest strikethrough-test
(testing "Creating strikethrough text"
(is (= (strikethrough/render "~~This is strikethrough text.~~" nil)
"<del>Th... | null | https://raw.githubusercontent.com/babashka/babashka/1113037b51733466faceda72d98dab5c1513a6e1/test-resources/lib_tests/clarktown/parsers/strikethrough_test.clj | clojure | (ns clarktown.parsers.strikethrough-test
(:require
[clojure.test :refer [deftest testing is]]
[clarktown.parsers.strikethrough :as strikethrough]))
(deftest strikethrough-test
(testing "Creating strikethrough text"
(is (= (strikethrough/render "~~This is strikethrough text.~~" nil)
"<del>Th... | |
174084d48300bf582d1609c7b1d2786026c7a908157484ae5a3904657ac8f56b | abailly/xxi-century-typed | Substitution.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE ExplicitForAll #-}
module Main where
import Control.Monad(forM, forM_)
import Control.Monad.ST
import Data.Array.ST
import Data.Array as A
import Data.List(sort, nub)
import Control.Arrow((>>>))
import Crt
-- what's the number of iterations f... | null | https://raw.githubusercontent.com/abailly/xxi-century-typed/41faf299f8841b6e6f6048a33bd236fff3e3d28f/haskell/Substitution.hs | haskell | # LANGUAGE ExplicitForAll #
what's the number of iterations for given pair of numbers?
What's the length of cycle for given number ? | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleContexts #
module Main where
import Control.Monad(forM, forM_)
import Control.Monad.ST
import Data.Array.ST
import Data.Array as A
import Data.List(sort, nub)
import Control.Arrow((>>>))
import Crt
distance :: Array Int Int -> Int -> Int -> Int
distance table i k = ... |
febb5ba9462e4e0f1749a449523a5f635b728e854f722ba33d165fa2a2b2dab4 | Eduap-com/WordMat | tangns.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/hompack/lisp/tangns.lisp | lisp | Compiled by f2cl version:
Using Lisp CMU Common Lisp snapshot-2020-04 (21D 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 double-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... |
9f5b2568982e46412738b131d066d618cc5504e035dbcd37e50fc69a8ee331eb | QuentinDuval/triboard | common.cljc | (ns triboard.common)
(defn shared-fn
"A function that is shared between clj and cljs"
[]
(println "cljc!"))
| null | https://raw.githubusercontent.com/QuentinDuval/triboard/2641d4c033fa0c64a02ef4564005b616d81b1a13/src/cljc/triboard/common.cljc | clojure | (ns triboard.common)
(defn shared-fn
"A function that is shared between clj and cljs"
[]
(println "cljc!"))
| |
e8f37d71ec1401f40f352324e8ceaf3dc4b63b6d67a194e8a534569b30c70648 | maximk/zergling | zergling_sup.erl |
-module(zergling_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% =========================================================... | null | https://raw.githubusercontent.com/maximk/zergling/0e45a9bd401543f187f2a33ef764576ade3686ac/src/zergling_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... |
-module(zergling_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
{ok, { {one_for_one, 5, 10}, []} }.
|
e4da92ea95a353bc4d9ce3001ae2b4cf718942e2c4ef09dd7aa359b2a67a409a | huangjs/cl | dqc25s.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l ,... | null | https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/numerical/slatec/dqc25s.lisp | lisp | Compiled by f2cl version:
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 double-float)) | ( " f2cl1.l , v 1.215 2009/04/07 22:05:21 rtoy Exp $ "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.200 2009/01/19 02:38:17 rtoy Exp $ "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rt... |
9834e1c3aa046b04c6321e024a2d2fb18d3b0dc4a9f7252ab68d1979e10158c2 | KingoftheHomeless/in-other-words | Exceptional.hs | # LANGUAGE DerivingVia #
module Control.Effect.Exceptional
( -- * Effects
Exceptional
, SafeError
-- * Actions
, catching
, trying
, throwing
, catchSafe
, trySafe
-- * Interpretations
, runExceptional
, runExceptionalJust
, safeErrorToError
, runSafeError
, safeErrorToIO
,... | null | https://raw.githubusercontent.com/KingoftheHomeless/in-other-words/9c864c81beb4fdf71d363b6962db5c90275c57ef/src/Control/Effect/Exceptional.hs | haskell | * Effects
* Actions
* Interpretations
* Simple variants of interpretations
* Threading constraints
* MonadCatch
* Carriers
For coercion purposes
| Gain access to @eff@ and @'Catch' exc@ within a region,
but only if you're ready to handle any unhandled exception @e :: exc@
that may arise from the use of @eff@... | # LANGUAGE DerivingVia #
module Control.Effect.Exceptional
Exceptional
, SafeError
, catching
, trying
, throwing
, catchSafe
, trySafe
, runExceptional
, runExceptionalJust
, safeErrorToError
, runSafeError
, safeErrorToIO
, safeErrorToErrorIO
, runExceptionalJustSimple
, safe... |
7ea00f760f9061367da87841baa67245d044ce4d129f3b7b8933ac2fd8927b1e | jordwalke/rehp | ocaml_version.mli | Js_of_ocaml compiler
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any l... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/compiler/lib/ocaml_version.mli | ocaml | OCaml 4.02
OCaml 4.03
OCaml 4.06
OCaml 4.07
OCaml 4.08
OCaml 4.09 | Js_of_ocaml compiler
* /
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your option ) any l... |
c5cdf5385433675015a7c6885137a64e1dd0568e9ba4d7f910e3276f24f8178a | caisah/sicp-exercises-and-examples | ex_1.39.scm | A continued fraction representation of the tangent function was published in 1770
by the German mathematician :
tan x = x / ( 1 - x^2 / ( 3 - x^2 / ( 5 - ... ) ) )
;; where x is in radians. Define a procedure (tan-cf x k) that computes an approximation
to the tangent function based on Lambert 's formula . K s... | null | https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/1.3.3-procedures_as_general_methods/ex_1.39.scm | scheme | where x is in radians. Define a procedure (tan-cf x k) that computes an approximation | A continued fraction representation of the tangent function was published in 1770
by the German mathematician :
tan x = x / ( 1 - x^2 / ( 3 - x^2 / ( 5 - ... ) ) )
to the tangent function based on Lambert 's formula . K specifies the number of terms to
compute , as in Ex . 1.37 .
(define (tan-cf x k)
(de... |
f2b8dae83dbe8be6a3a6589562cacae25a2a2b063def026c21f6a6c37bea63c1 | mistupv/cauder | cauder_wx_actions.erl | -module(cauder_wx_actions).
%% API
-export([create/1, update/2, update_process/2]).
-export([selected_pid/0]).
-include("cauder_system.hrl").
-include("cauder_message.hrl").
-include("cauder_process.hrl").
-include("cauder_wx.hrl").
-include_lib("wx/include/wx.hrl").
-define(INPUT_SIZE, {size, {100, -1}}).
-define(B... | null | https://raw.githubusercontent.com/mistupv/cauder/c9bfb72a4aed70979e53f4b3ca4a085a19b6c195/src/cauder_wx_actions.erl | erlang | API
=============================================================================
API
=============================================================================
------------------------------------------------------------------------------
@doc Creates the <i>actions</i> panel and populates it.
Process
-----
N... | -module(cauder_wx_actions).
-export([create/1, update/2, update_process/2]).
-export([selected_pid/0]).
-include("cauder_system.hrl").
-include("cauder_message.hrl").
-include("cauder_process.hrl").
-include("cauder_wx.hrl").
-include_lib("wx/include/wx.hrl").
-define(INPUT_SIZE, {size, {100, -1}}).
-define(BUTTON_S... |
637e4949056b980f35e3c5e46e7d009551a4a1000ce57a375b52b2c49cfbf9aa | may-liu/qtalk | ejabberd_auth.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_auth.erl
Author : < >
%%% Purpose : Authentification
Created : 23 Nov 2002 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
%%%
%%% This program is free software; you can redistribute it and... | null | https://raw.githubusercontent.com/may-liu/qtalk/f5431e5a7123975e9656e7ab239e674ce33713cd/qtalk_opensource/src/ejabberd_auth.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_auth.erl
Purpose : Authentification
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOU... | Author : < >
Created : 23 Nov 2002 by < >
ejabberd , Copyright ( C ) 2002 - 2014 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
... |
2f4556df32dee27f4c9a68ff5509b3b3dc0ddfd4bca02201b9849408d537e25a | fisxoj/json-schema | json-schema.lisp | (defpackage json-schema
(:use :cl :alexandria)
(:local-nicknames (:reference :json-schema.reference)
(:validators :json-schema.validators))
(:shadowing-import-from :json-schema.utils
:schema-version)
(:import-from #:json-schema.reference
#:make-conte... | null | https://raw.githubusercontent.com/fisxoj/json-schema/ede034a25f72ba50d22e139bafe154cf877d8a6f/src/json-schema.lisp | lisp | (defpackage json-schema
(:use :cl :alexandria)
(:local-nicknames (:reference :json-schema.reference)
(:validators :json-schema.validators))
(:shadowing-import-from :json-schema.utils
:schema-version)
(:import-from #:json-schema.reference
#:make-conte... | |
a1c74fa826001dec56814444ea132ffc0e3cd9066abdc7c6bd99708f30aafdf3 | 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-Oct2013/groundTruth/mozartK282Mvt2/monophonic/repeatedPatterns/sectionalRepetitions/G/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... |
236bacd6f1190684d533fffd37247382b58110ff4d41b7664c2eb5c1e2dbc7cd | michalkonecny/aern2 | Limit.hs | # LANGUAGE CPP #
-- #define DEBUG
# OPTIONS_GHC -Wno - orphans #
|
Module : AERN2.MP.Ball . Limit
Description : limits of MPBall sequences
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Limits of MPBall sequences .
... | null | https://raw.githubusercontent.com/michalkonecny/aern2/7ab41113ca8f73dca70d887d190ddab3b43ef084/aern2-mp/src/AERN2/MP/Ball/Limit.hs | haskell | #define DEBUG
where
q > 0 = > 0 < q ) < = q
limit ffs xPre =
tryAccuracies accuracies
where
acX = getFiniteAccuracy x
where
aux a
| otherwise = [bits a]
where
increasePrec z = setPrecision (inc $ getPrecision xPre) z
inc p =
prec $ (integer ... | # LANGUAGE CPP #
# OPTIONS_GHC -Wno - orphans #
|
Module : AERN2.MP.Ball . Limit
Description : limits of MPBall sequences
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Limits of MPBall sequences .
Module : ... |
6fe3d631b65ea95e78fbdbb829135f5fa0bf418b827a42c29199b90d76be4222 | input-output-hk/marlowe-cardano | Merkle.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
License : Apache 2.0
--
-- Stability : Experimental
Portability : Portable
--
| contracts .
--
-----------------------------------------------------------------------------
# LANGUAGE Flexib... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/326220e75a0a74bcb83d40b1493bf0e4c6d6a31d/marlowe-cli/src/Language/Marlowe/CLI/Merkle.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
---------------------------------------------------------------------------
* Merkleization
* Demerkleization
* Inputs
^ Action to perform the merkleization.
^ The contract.
| Merk... | License : Apache 2.0
Portability : Portable
| contracts .
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
module Language.Marlowe.CLI.Merkle
deepMerkleize
, merkleize
, merkleizeMarlowe
, shallowMerkleize
, deepDemerkleize
, demerkleize
, shallowDemerkleize
, merkleizeI... |
c6b7543361721046d4f1fdaa9134dc2ff72a864e4a8853b58c278d73f576dc8d | MyDataFlow/ttalk-server | legacy_stream_helper.erl | -module(legacy_stream_helper).
-export([stream_start/1]).
-export([stream_start_pre_xmpp_1_0/1]).
-export([start_stream_pre_xmpp_1_0/3]).
-export([failed_legacy_auth/3]).
-export([legacy_auth_digest/3]).
-export([legacy_auth_plain/3]).
-include_lib("escalus/include/escalus_xmlns.hrl").
-include_lib("escalus/include/e... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/test/ejabberd_tests/tests/legacy_stream_helper.erl | erlang | to parse the snippet properly. In standard XMPP <stream:stream> is just opening of an XML
element, NOT A SELF CLOSING element.
This is the success case - we want to assert the error case.
And the error case is achived by sending req without resource
compute digest | -module(legacy_stream_helper).
-export([stream_start/1]).
-export([stream_start_pre_xmpp_1_0/1]).
-export([start_stream_pre_xmpp_1_0/3]).
-export([failed_legacy_auth/3]).
-export([legacy_auth_digest/3]).
-export([legacy_auth_plain/3]).
-include_lib("escalus/include/escalus_xmlns.hrl").
-include_lib("escalus/include/e... |
19453cd3e7e065bfda3f7bcf713f7710589b67c0817aed8827db3a0b65c4be12 | TheBestTvarynka/Lisp-SQL-Parser | objects.lisp | Copyright ( c ) 2006 - 2008 Henrik Hjelte
;;;; All rights reserved.
;;;; See the file LICENSE for terms of use and distribution.
(in-package :json)
(defvar *class-registry* nil
"A list of anonymous fluid classes, one member for every distinct
combination of direct superclasses.")
(defmacro with-local-class-regis... | null | https://raw.githubusercontent.com/TheBestTvarynka/Lisp-SQL-Parser/d8f1283fc00e394d76e4ac28e434c99d1bee72aa/src/cl-json/src/objects.lisp | lisp | All rights reserved.
See the file LICENSE for terms of use and distribution.
KERNEL::FIND-CLASS) on dynamically created fluid classes
and the name of the Lisp package into which the names | Copyright ( c ) 2006 - 2008 Henrik Hjelte
(in-package :json)
(defvar *class-registry* nil
"A list of anonymous fluid classes, one member for every distinct
combination of direct superclasses.")
(defmacro with-local-class-registry ((&key inherit) &body body)
"Run BODY in a dynamic environment where *CLASS-REGIS... |
4a335b6bd05807099cb883ad5437cb65da4801a23da67b832a5127d6ec3d228b | serokell/edna | Util.hs | SPDX - FileCopyrightText : 2021 >
--
SPDX - License - Identifier : AGPL-3.0 - or - later
| Utility module to write functions that deal with DB .
module Edna.DB.Util
( groupAndPaginate
, sortingSpecWithId
) where
import Universum
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet... | null | https://raw.githubusercontent.com/serokell/edna/5985c1c8aa5a5c50d7d4468aa3bb4d614525834f/backend/src/Edna/DB/Util.hs | haskell |
| This function is helpful for queries where we use left join and get
We call it @boka@. Each @boka@ has a list of grandchildren, we call them
@joka@. There can be multiple items with the same @boka@ values. @boka@
has a primary key that we use for identification.
| Add implicit sorting order by descending ID. I... | SPDX - FileCopyrightText : 2021 >
SPDX - License - Identifier : AGPL-3.0 - or - later
| Utility module to write functions that deal with DB .
module Edna.DB.Util
( groupAndPaginate
, sortingSpecWithId
) where
import Universum
import qualified Data.HashMap.Strict as HM
import qualified Data.HashSet as... |
c6b800a5c739cd034c46bdeb137384eaae9b53799e3ad65409301e8f626c4a7d | k0ral/hbro | Prelude.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
# LANGUAGE UndecidableInstances #
| Replacement for the traditional @Prelude@ module . This module does n't import any other Hbro .... | null | https://raw.githubusercontent.com/k0ral/hbro/8926b53960eb7136c4dec94eb31f2426fa34c726/library/Hbro/Prelude.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
* Generic aliases/shortcuts
* Lens util
{{{ Imports
}}}
| Like 'Show', for 'Text'
{{{ Generic aliases/shortcuts
| Generic 'Show.show'
| Alias for @return ()@
}}}
{{{ Lens uti... | # LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
| Replacement for the traditional @Prelude@ module . This module does n't import any other Hbro . * module , so it can be safely imported from anywhere in the project .
module Hbro.Prelude
( module X
*
, Describable(..)
, BaseIO
,... |
cd128dfecfdcc3ae10419044a1e7324b59c7e7088942f5ae454ff5eff212bf84 | marijnh/cl-tk | ffi.lisp | (in-package :cl-tk)
(eval-when (compile eval load)
(defconstant +tcl-ok+ 0)
(defconstant +tcl-error+ 1)
(defconstant +tcl-dont-wait+ 2))
(defclass ffi-tk (tk)
((interp :reader @interp)
(alive :initform t :accessor @alive)))
(defmethod initialize-instance :after ((tk ffi-tk) &key &allow-other-keys)
(hand... | null | https://raw.githubusercontent.com/marijnh/cl-tk/c9e25704c33b31effddb5ea9192bd562a12ba748/ffi.lisp | lisp | (in-package :cl-tk)
(eval-when (compile eval load)
(defconstant +tcl-ok+ 0)
(defconstant +tcl-error+ 1)
(defconstant +tcl-dont-wait+ 2))
(defclass ffi-tk (tk)
((interp :reader @interp)
(alive :initform t :accessor @alive)))
(defmethod initialize-instance :after ((tk ffi-tk) &key &allow-other-keys)
(hand... | |
5cce50cc0a74bcdbc72718ea1b9341677d88ad94fd3d9cca9aeff0f52e56fcbb | DavidAlphaFox/egame | shared_types.erl | %%
Autogenerated by Thrift Compiler ( 0.11.0 )
%%
%% DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
%%
-module(shared_types).
-include("shared_types.hrl").
-export([struct_info/1, struct_info_ext/1, enum_info/1, enum_names/0, struct_names/0, exception_names/0]).
struct_info('SharedStruct') ->
... | null | https://raw.githubusercontent.com/DavidAlphaFox/egame/b00293964f309eb4f7458d9610a5ec8dd18ea062/src/gen-erl/shared_types.erl | erlang |
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
| Autogenerated by Thrift Compiler ( 0.11.0 )
-module(shared_types).
-include("shared_types.hrl").
-export([struct_info/1, struct_info_ext/1, enum_info/1, enum_names/0, struct_names/0, exception_names/0]).
struct_info('SharedStruct') ->
{struct, [{1, i32},
{2, string}]}
;
struct_info(_) -> erlang:error... |
e9ba6f77d3284a528f3839b4f3ac77a200721868a6cb641ecca22a46d388ac44 | TorXakis/TorXakis | CompilerSpec.hs |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE FlexibleContexts #
{-# LANGUA... | null | https://raw.githubusercontent.com/TorXakis/TorXakis/038463824b3d358df6b6b3ff08732335b7dbdb53/sys/txs-compiler/test/TorXakis/CompilerSpec.hs | haskell | # LANGUAGE QuasiQuotes #
------------------------------------------------------------------------------
|
Stability : experimental
Portability : portable
Tests for the 'TorXakis' compiler.
------------------------------------------------------------------------------
Failure test cases
@x@ appears in ... |
TorXakis - Model Based Testing
Copyright ( c ) 2015 - 2017 TNO and Radboud University
See LICENSE at root directory of this repository .
TorXakis - Model Based Testing
Copyright (c) 2015-2017 TNO and Radboud University
See LICENSE at root directory of this repository.
-}
# LANGUAGE FlexibleContexts #
Module ... |
038504c0f697784312c32b9e33ad2346a5adecbc5328c2fe8bfebeaf014ecc38 | racket/compatibility | mime-sig.rkt | #lang racket/signature
;; -- exceptions raised --
(struct mime-error () #:omit-constructor)
(struct unexpected-termination (msg) #:omit-constructor)
(struct missing-multipart-boundary-parameter () #:omit-constructor)
(struct malformed-multipart-entity (msg) #:omit-constructor)
(struct empty-mechanism () #:omit-constru... | null | https://raw.githubusercontent.com/racket/compatibility/492030dac6f095045ce8a13dca75204dd5f34e32/compatibility-lib/net/mime-sig.rkt | racket | -- exceptions raised --
-- basic mime structures --
-- mime methods -- | #lang racket/signature
(struct mime-error () #:omit-constructor)
(struct unexpected-termination (msg) #:omit-constructor)
(struct missing-multipart-boundary-parameter () #:omit-constructor)
(struct malformed-multipart-entity (msg) #:omit-constructor)
(struct empty-mechanism () #:omit-constructor)
(struct empty-type ()... |
df0093037d774d5f1eca7335edeccaa5eb0b2ca2c7150322a9771a419ea61e0e | skeuchel/needle | Shift.hs |
module KnotCore.Elaboration.Shift where
import Control.Applicative
import Coq.Syntax
import KnotCore.Syntax
import KnotCore.Elaboration.Monad
import KnotCore.Elaboration.Shift.Cutoff
import KnotCore.Elaboration.Shift.ShiftIndex
import KnotCore.Elaboration.Shift.ShiftTerm
eShift :: Elab m => TermSpec -> m Sentences... | null | https://raw.githubusercontent.com/skeuchel/needle/25f46005d37571c1585805487a47950dcd588269/src/KnotCore/Elaboration/Shift.hs | haskell |
module KnotCore.Elaboration.Shift where
import Control.Applicative
import Coq.Syntax
import KnotCore.Syntax
import KnotCore.Elaboration.Monad
import KnotCore.Elaboration.Shift.Cutoff
import KnotCore.Elaboration.Shift.ShiftIndex
import KnotCore.Elaboration.Shift.ShiftTerm
eShift :: Elab m => TermSpec -> m Sentences... | |
c07ed67080ed4490469330a6076fdd4bfb62b687de9f97b1ff145534765d7119 | philnguyen/soft-contract | bijection.rkt | #lang typed/racket/base
(provide (all-defined-out))
(require racket/match)
(struct (X Y) Bij ([fw : (Immutable-HashTable X Y)] [bw : (Immutable-HashTable Y X)]) #:transparent)
(define Bij-empty ((inst Bij Nothing Nothing) (hash) (hash)))
(: Bij-ext (∀ (X Y) (Bij X Y) X Y → (Option (Bij X Y))))
(define (Bij-ext m x... | null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/utils/bijection.rkt | racket | #lang typed/racket/base
(provide (all-defined-out))
(require racket/match)
(struct (X Y) Bij ([fw : (Immutable-HashTable X Y)] [bw : (Immutable-HashTable Y X)]) #:transparent)
(define Bij-empty ((inst Bij Nothing Nothing) (hash) (hash)))
(: Bij-ext (∀ (X Y) (Bij X Y) X Y → (Option (Bij X Y))))
(define (Bij-ext m x... | |
85a876a2414579e2234a937697ff168b5bc10f0bb2c25084770110af71158c4c | xapi-project/xcp-rrdd | rrdd_server.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xcp-rrdd/f810004ae88d308043b73365a959562302b1d4b5/bin/rrdd/rrdd_server.ml | ocaml | The framework requires type 'context' to be defined.
* [archive_rrd] is used exclusively to send rrds to the pool master when
suspending/halting vms
DEPRECATED
Add in "dbsync = true" to the query to make sure the master doesn't try
to redirect here!
DEPRECATED
Static values.
The function that tel... |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
53858432c731ef5809914bf639df295468a1d822e4b13b172627fa389f6498e3 | gonzojive/hunchentoot | packages.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
$ Header : /usr / local / cvsrep / hunchentoot / test / packages.lisp , v 1.5 2008/02/13 16:02:22 edi Exp $
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or wi... | null | https://raw.githubusercontent.com/gonzojive/hunchentoot/36e3a81655be0eeb8084efd853dd3ac3e5afc91b/test/packages.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the... | $ Header : /usr / local / cvsrep / hunchentoot / test / packages.lisp , v 1.5 2008/02/13 16:02:22 edi Exp $
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in... |
74835568f1adc087e6642845fd657173faab0a739c11744aecd33119b50853c3 | janestreet/bonsai | table_header.mli | open! Core
open! Bonsai_web
open! Bonsai.Let_syntax
open! Js_of_ocaml
open! Incr_map_collate
val component
: Header_tree.t Value.t
-> column_widths:Column_size.t Int.Map.t Value.t
-> set_column_width:(index:int -> [ `Px_float of float ] -> unit Vdom.Effect.t) Value.t
-> set_header_client_rect:
(int Bon... | null | https://raw.githubusercontent.com/janestreet/bonsai/34430405574a4de68835f1010c22f9ac18dfffb6/web_ui/partial_render_table/src/table_header.mli | ocaml | open! Core
open! Bonsai_web
open! Bonsai.Let_syntax
open! Js_of_ocaml
open! Incr_map_collate
val component
: Header_tree.t Value.t
-> column_widths:Column_size.t Int.Map.t Value.t
-> set_column_width:(index:int -> [ `Px_float of float ] -> unit Vdom.Effect.t) Value.t
-> set_header_client_rect:
(int Bon... | |
08a5ff8cae2613668b9c6a1e7dc898b768a40ac82a0d4faf81511070c10b3efa | semilin/layoup | Capewell-Dvorak.lisp |
(MAKE-LAYOUT :NAME "Capewell-Dvorak" :MATRIX
(APPLY #'KEY-MATRIX '("',.pyqfgrk" "oaeiudhtns" "zxcvjlmwb;"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/Capewell-Dvorak.lisp | lisp |
(MAKE-LAYOUT :NAME "Capewell-Dvorak" :MATRIX
(APPLY #'KEY-MATRIX '("',.pyqfgrk" "oaeiudhtns" "zxcvjlmwb;"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
53f69e80310da93e9841dbc4612eee05e187462cd654a75e36553f212148d15b | tisnik/clojure-examples | project.clj | ;
( C ) Copyright 2021
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(defproject seesaw14 "0.1.0-SNAPSHOT"
:de... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/cf9b3484a332ebd93bc585f051802c333ebde3df/seesaw14/project.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2021
-v10.html
(defproject seesaw14 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[seesaw "1.4.5"]]
:plugins [[lein-codox... |
e3d89d63714f10897a968df2cd7f0c6a063c00fae185598414f84a7f3f73d39a | rhaberkorn/ermacs | edit_genserv.erl | %% This is a library for writing servers. The idea is to have a less
abstract gen_server , in which the protocols are exposed and the
%% servers still use 'receive' to get requests with pattern matching.
-module(edit_genserv).
-export([start_link/4, call/2, call/3, reply/2, cast/2]).
%% Start a named process, if i... | null | https://raw.githubusercontent.com/rhaberkorn/ermacs/35c8f9b83ae85e25c646882be6ea6d340a88b05b/src/edit_genserv.erl | erlang | This is a library for writing servers. The idea is to have a less
servers still use 'receive' to get requests with pattern matching.
Start a named process, if it's not already running.
Protocol for calls (from 'gen'):
<- {Ref, Reply}
Synchronous call.
Protocol for casts:
-> {cast, Req} | abstract gen_server , in which the protocols are exposed and the
-module(edit_genserv).
-export([start_link/4, call/2, call/3, reply/2, cast/2]).
Returns : { ok , Pid } | { error , Reason }
start_link(Name, M, F, A) ->
case whereis(Name) of
Pid when is_pid(Pid) ->
{error, {already_started, Pid}};
unde... |
2ed9c8627dc0e0b75b2bbff3cd53ed11b3b20b4190c6b7e68c3f13c61118358a | bobzhang/fan | main.mli |
(** Main module *)
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/unitest/main/main.mli | ocaml | * Main module | |
85fe5ccb8c65e8a0430209a5fde29a3554db4a7af477954775c15edbe3fcb57f | CGenie/ray-tracer | tracing_types.mli | (* tracing_types.mli *)
(** Basic types for the ray tracer. *)
open Gg
type phong_t = {
ambient: float;
diffuse: float;
specular: float;
shininess: float
}
* Describes the material properites of an object .
type ray = {
origin: p3;
direction: v3
}
(** Describes single ray shot from camera's eye. *)
typ... | null | https://raw.githubusercontent.com/CGenie/ray-tracer/37a7918c38497fe5d9b52ba0795f209c1c06fa9b/02-tracing/lib/tracing_types.mli | ocaml | tracing_types.mli
* Basic types for the ray tracer.
* Describes single ray shot from camera's eye.
For performance reasons, so that I don't have to invert it all the time
* Basic shapes that we know how to render.
[Ball{origin; radius}] A ball of origin [origin] and radius [radius].
[Affine{m; inv_m; sh... |
open Gg
type phong_t = {
ambient: float;
diffuse: float;
specular: float;
shininess: float
}
* Describes the material properites of an object .
type ray = {
origin: p3;
direction: v3
}
type shape = Ball of {
origin: p3;
radius: float
} | Affine of {
m: m4;
shape: shape
}
type lighting = Point... |
a138a94b5be82ef0e3dc359cb998f8622631e792e60aed4dcbc69873f4d7bf10 | syallop/DHT | SimpleNode.hs | |
Stability : experimental
Run a DHT computation using " DHT.SimpleNode . Logger " , " DHT.SimpleNode . Messaging " , " DHT.SimpleNode . "
and " DHT.SimpleNode . " for stdout logging , simple UDP messaging a wrapped " DHT.Routing " routing table
and an in - memory hashmap value store .
Stability : experime... | null | https://raw.githubusercontent.com/syallop/DHT/a376cf5a423f50212cfd856dcf733eb5177fc00c/Examples/DHT-SimpleNode/DHT/SimpleNode.hs | haskell | | Start a new node with some configuration.
- Will handle incoming messages for the duration of the given program.
Continuing communication after we reach the end of our own DHT computation must be programmed explicitly. | |
Stability : experimental
Run a DHT computation using " DHT.SimpleNode . Logger " , " DHT.SimpleNode . Messaging " , " DHT.SimpleNode . "
and " DHT.SimpleNode . " for stdout logging , simple UDP messaging a wrapped " DHT.Routing " routing table
and an in - memory hashmap value store .
Stability : experime... |
99c9b834570b507ebfc032e844e5e24c88b9abc01c6ea2e2c9123a3beb2acf92 | modular-macros/ocaml-macros | t172-pushenvacc4.ml | open Lib;;
let x = 5 in
let y = 4 in
let z = 3 in
let a = 2 in
let f _ = a + z + y + x in
if f 0 <> 14 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 21
11 ENVACC1
12 PUSHENVACC2
13 PUSHENVACC3
... | null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/tool-ocaml/t172-pushenvacc4.ml | ocaml | open Lib;;
let x = 5 in
let y = 4 in
let z = 3 in
let a = 2 in
let f _ = a + z + y + x in
if f 0 <> 14 then raise Not_found
;;
*
0 CONSTINT 42
2 PUSHACC0
3 MAKEBLOCK1 0
5 POP 1
7
9 BRANCH 21
11 ENVACC1
12 PUSHENVACC2
13 PUSHENVACC3
... | |
18e38a7c76c3ef2f31a468a973b63f6a0b5fe589ca9d038a7b6be92c1be507c8 | boxp/sorcerer | message.clj | (ns sorcerer.domain.entity.message
(:require [clojure.spec.alpha :as s]))
(s/def :field/title string?)
(s/def :field/value string?)
(s/def :field/short? boolean?)
(s/def ::field
(s/keys :req-un [:field/title :field/value :field/short?]))
(s/def :attachment/text string?)
(s/def :attachment/color string?)
(s/def :a... | null | https://raw.githubusercontent.com/boxp/sorcerer/38fa7706439c35613cba7e04d715f5340e8a404c/src/sorcerer/domain/entity/message.clj | clojure | (ns sorcerer.domain.entity.message
(:require [clojure.spec.alpha :as s]))
(s/def :field/title string?)
(s/def :field/value string?)
(s/def :field/short? boolean?)
(s/def ::field
(s/keys :req-un [:field/title :field/value :field/short?]))
(s/def :attachment/text string?)
(s/def :attachment/color string?)
(s/def :a... | |
31b05610e8db17033b091f1a19f55d86e059ccab938052bf8d24425aa5d4d90c | alex314159/ib-re-actor-976-plus | getting-fundamentals.clj | (ns ib-re-actor-976-plus.examples.getting-fundamentals
(:use [ib-re-actor-976-plus.connection]
[ib-re-actor-976-plus.contracts]
[clj-time.core :only [date-time minus]]))
(def fundamental-data-complete? (atom false))
(defmulti fundamental-data-handler :type)
(defmethod fundamental-data-handler :error ... | null | https://raw.githubusercontent.com/alex314159/ib-re-actor-976-plus/96dad45d7dd8cef39330b75118a5d409dc96cc76/old_examples/getting-fundamentals.clj | clojure | (ns ib-re-actor-976-plus.examples.getting-fundamentals
(:use [ib-re-actor-976-plus.connection]
[ib-re-actor-976-plus.contracts]
[clj-time.core :only [date-time minus]]))
(def fundamental-data-complete? (atom false))
(defmulti fundamental-data-handler :type)
(defmethod fundamental-data-handler :error ... | |
68019419d6f97c2106932a8f2b61fd3776a220cd9bce1144e56cc19c96850e9a | webnf/dwn | json.clj | (ns webnf.dwn.deps.aether.json
(:require [clojure.edn :as edn]
[clojure.java.io :as io]))
(defn map-emitter [indent value-emitter]
(fn [m]
(concat
[indent "{"]
(apply concat
(interpose
[indent ","]
(map (fn [[k v]]
(list* "\"" k "\... | null | https://raw.githubusercontent.com/webnf/dwn/31ae2b016d2e2978a4f08c0201572225dc72eb53/src/deps.aether/src/webnf/dwn/deps/aether/json.clj | clojure | (ns webnf.dwn.deps.aether.json
(:require [clojure.edn :as edn]
[clojure.java.io :as io]))
(defn map-emitter [indent value-emitter]
(fn [m]
(concat
[indent "{"]
(apply concat
(interpose
[indent ","]
(map (fn [[k v]]
(list* "\"" k "\... | |
6a249b1b4ee46e003b2e58885e642f89b3fdb2a2e24e8a2879f7342b6a2196f3 | crystodev/cato | Transaction.hs | # LANGUAGE DuplicateRecordFields #
module Transaction ( buildBurnTransaction, buildMintTransaction, buildSendTransaction, calculateBurnFees, calculateMintFees, calculateSendFees, createAddress, getTransactionFile,
FileType(Draft, OkFee, Sign), getUtxoFromWallet, getTokenIdFromName,
signBurnTransaction, signMintTran... | null | https://raw.githubusercontent.com/crystodev/cato/ae93afe078ffb6d942a5725db07d27d3d896b8a5/src/Transaction.hs | haskell | utilities ----------------
get token in token list from toke name
extract token list from list of (token, value)
compute total amount for token id
check if total amount for token
join key value in string
build transaction
build transfer transaction for token
print mintAssets
check burnTransaction
build burn ... | # LANGUAGE DuplicateRecordFields #
module Transaction ( buildBurnTransaction, buildMintTransaction, buildSendTransaction, calculateBurnFees, calculateMintFees, calculateSendFees, createAddress, getTransactionFile,
FileType(Draft, OkFee, Sign), getUtxoFromWallet, getTokenIdFromName,
signBurnTransaction, signMintTran... |
e0d78d58bd072c24daac223949ef342e2655ef8973218388e2f5291952217048 | bsansouci/bsb-native | dynlink.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/otherlibs/dynlink/dynlink.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
val is_native: bool
* { 6 Dynamic loa... |
6850591eacaa0e309ccf20e673e3e2cc07e4f0ed91d07a76b16460d655ead291 | joshrotenberg/clj-wordnik | wordlist.clj | (ns wordnik.api.wordlist
(:use wordnik.core))
;; Functions for accessing the "wordList" calls.
The first argument is always the wordlist ID .
;;
( fetch " mywordlist " )
;;
;; (delete "mysuckywordlist")
;;
( words " anotherwordlist " : limit 4 : sort - order " desc " )
;;
;; See #!/wordlist for more informatio... | null | https://raw.githubusercontent.com/joshrotenberg/clj-wordnik/a24a17f040cb29942080913585fc1b2b43681f41/src/wordnik/api/wordlist.clj | clojure | Functions for accessing the "wordList" calls.
(delete "mysuckywordlist")
See #!/wordlist for more information
and supported arguments.
update - Update an existing wordlist
delete - Delete a wordlist
fetch - Fetch a wordlist
add-words - Add words to a wordlist
words - Fetch a wordlist's words
delete-words... | (ns wordnik.api.wordlist
(:use wordnik.core))
The first argument is always the wordlist ID .
( fetch " mywordlist " )
( words " anotherwordlist " : limit 4 : sort - order " desc " )
(defmacro def-wordnik-wordlist-method
[name request-method action & rest]
(let [resource (str "wordList.json/" action)]
`... |
ef36de035688a0a34f5c665592b8428fc4857f1fba09845fb3244a4c2ee61510 | samrocketman/home | lasm-gm-ultra-vivid-solarize.scm | ;
; The GIMP -- an image manipulation program
Copyright ( C ) 1995 and
;
LASM ultra vivid solarize script for GIMP 2.4
Original author : < >
;;;
;;;
;;;
;
; Tags: color
;
; Author statement:
;
Welcome to the Grandmother 's Solarize
Lasm 's famous fancy solarize script
Dedication - to my mother... | null | https://raw.githubusercontent.com/samrocketman/home/63a8668a71dc594ea9ed76ec56bf8ca43b2a86ca/dotfiles/.gimp/scripts/lasm-gm-ultra-vivid-solarize.scm | scheme |
The GIMP -- an image manipulation program
Tags: color
Author statement:
--------------------------------------------------------------------
--------------------------------------------------------------------
- Changelog -
- Initial release
------------------------------------------------... | Copyright ( C ) 1995 and
LASM ultra vivid solarize script for GIMP 2.4
Original author : < >
Welcome to the Grandmother 's Solarize
Lasm 's famous fancy solarize script
Dedication - to my mother ( 1917 - 2002 ) in loving memory
Distributed by Gimp FX Foundry project
version 1.0 by 2005/12/01 ... |
71c836cb34019d06fd464028e96f0a923d92b3e77162821758e5ef433cdd9a8a | DavidAlphaFox/RabbitMQ | rabbit_mqtt_collector.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/plugins-src/rabbitmq-mqtt/src/rabbit_mqtt_collector.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.
----------------... | 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 ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
48dc1e4931221d86140a9167d31b705b9c79a379addb732c6712ff7a42abeee9 | broadinstitute/wfl | copyfile_test.clj | (ns wfl.integration.modules.copyfile-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[clojure.string :as str]
[wfl.integration.modules.shared :as shared]
[wfl.jdbc :as jdbc]
[wfl.module.all ... | null | https://raw.githubusercontent.com/broadinstitute/wfl/ca30908a6b62aa3ea8e5e15c3b410263d0173ee9/api/test/wfl/integration/modules/copyfile_test.clj | clojure | (ns wfl.integration.modules.copyfile-test
(:require [clojure.test :refer [deftest is use-fixtures]]
[clojure.string :as str]
[wfl.integration.modules.shared :as shared]
[wfl.jdbc :as jdbc]
[wfl.module.all ... | |
cf4f8c7357bfe22a6869d3504280c180dc2b8446b4ebe17300f7b79df7596d51 | marcoheisig/adventofcode | day-16.lisp | (defpackage :adventofcode-2019-day-16
(:use :cl))
(in-package :adventofcode-2019-day-16)
(defun make-circular (list)
(let ((copy (copy-list list)))
(setf (cdr (last copy)) copy)))
(defun compute-digit (position pattern numbers)
(let ((circular-pattern (make-circular pattern))
(sum 0))
(flet ((n... | null | https://raw.githubusercontent.com/marcoheisig/adventofcode/e96a0da17cd79f424af984ed2648b49ffdacb893/2019/day-16/day-16.lisp | lisp | Destructively update all the points after a certain lower-bound with the
values of the next iteration. | (defpackage :adventofcode-2019-day-16
(:use :cl))
(in-package :adventofcode-2019-day-16)
(defun make-circular (list)
(let ((copy (copy-list list)))
(setf (cdr (last copy)) copy)))
(defun compute-digit (position pattern numbers)
(let ((circular-pattern (make-circular pattern))
(sum 0))
(flet ((n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.