_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 |
|---|---|---|---|---|---|---|---|---|
500a1622011011250f22749ddf2eaeff013affa1da4a88c3dae98792b35e9d8c | the-concurrent-schemer/scm | scml_base_list.erl | %%% The MIT License
%%%
Copyright ( C ) 2013 - 2014 by < >
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
%%% to u... | null | https://raw.githubusercontent.com/the-concurrent-schemer/scm/1726ec2e94e766893d80c286f816599defb6a524/src/scml_base_list.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above... | Copyright ( C ) 2013 - 2014 by < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E... |
2ff308837a26e01a05d80afd367daa1922f3481535f70112cc926140e5625c66 | pichi/epexercises | e33.erl | -module(e33).
-export([prints/1, prints_even/1]).
prints(N) -> prints(N, 1).
prints(N, M) when M =< N ->
io:format("Number:~p~n", [M]), prints(N, M + 1);
prints(_, _) -> ok.
prints_even(N) -> prints_even(N, 1).
prints_even(N, M) when M =< N, M rem 2 =:= 0 ->
io:format("Number:~p~n", [M]), prints_even(N, M ... | null | https://raw.githubusercontent.com/pichi/epexercises/d6383ad334bd6cf684b16225bffd33d6c3d2746f/Exercise3-3/e33.erl | erlang | -module(e33).
-export([prints/1, prints_even/1]).
prints(N) -> prints(N, 1).
prints(N, M) when M =< N ->
io:format("Number:~p~n", [M]), prints(N, M + 1);
prints(_, _) -> ok.
prints_even(N) -> prints_even(N, 1).
prints_even(N, M) when M =< N, M rem 2 =:= 0 ->
io:format("Number:~p~n", [M]), prints_even(N, M ... | |
e587bfa915227284bc55f70ff2844d4caa6932b11a37f49af7ab73bc00ac1ac7 | eugeneia/athens | js-dom-symbol-exports.lisp | (in-package #:parenscript)
(in-readtable :parenscript)
These are convenience packages that export JS and browser DOM
symbols . If you : use the packages in a package FOO and then
obfuscate FOO , it will prevent the JS symbols from getting
;; mangled.
For most web development tasks , you want to import PS - JS... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/Parenscript-2.6/src/js-dom-symbol-exports.lisp | lisp | mangled.
methods
document interface
attributes
methods
node interface
attributes
methods
nodelist interface
methods
attributes
namednodemap
methods
attributes
attributes
methods
attr
attributes
element
attributes
methods
text
methods
Level 1 extended interfaces (XML)
attributes
notation
attri... | (in-package #:parenscript)
(in-readtable :parenscript)
These are convenience packages that export JS and browser DOM
symbols . If you : use the packages in a package FOO and then
obfuscate FOO , it will prevent the JS symbols from getting
For most web development tasks , you want to import PS - JS - SYMBOLS ,... |
e838ecd4609b752f9cb5a5d696e66ae26e3bc8ab89b8744fa27de9d59373f9cf | copton/ocram | Ana1.hs | module Ana1 (
analize1
)where
import Context
import Ana1Types
analize1 :: Context -> Result1
analize1 ctx = Result1 $ (ctxSetup ctx) + 1
| null | https://raw.githubusercontent.com/copton/ocram/c7166eab0187868a52a61017c6d3687e5a1a6162/try/cyclic_modules/Ana1.hs | haskell | module Ana1 (
analize1
)where
import Context
import Ana1Types
analize1 :: Context -> Result1
analize1 ctx = Result1 $ (ctxSetup ctx) + 1
| |
f43d6d94dc180ebee5fb7d447c8f044afcb378d039ca7c1a9d367a7594d2cf30 | mirage/ocaml-conduit | resolver_mirage.mli |
* Copyright ( c ) 2014 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... | null | https://raw.githubusercontent.com/mirage/ocaml-conduit/eec7b0b9842331c417fabf5a6a4a48aad93868e1/src/conduit-mirage/resolver_mirage.mli | ocaml | * Functorial interface for resolving URIs to endpoints.
* [static hosts] constructs a resolver that looks up any resolution requests
from the static [hosts] hashtable instead of using the system resolver.
* Provides a DNS-enabled {!Resolver_lwt} given a network stack. |
* Copyright ( c ) 2014 Anil Madhavapeddy < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS... |
51a33baee46c453793a2d36d73a5ccc3e80414ed19f3bcff86b6263c35567f5d | sergv/emacs-module | Module.hs | ----------------------------------------------------------------------------
-- |
Module : Emacs . Module
Copyright : ( c ) 2018
-- License : Apache-2.0 (see LICENSE)
-- Maintainer :
--
This module is the entry point for writing Emacs extensions in
-- Haskell.
--
This package , though pro... | null | https://raw.githubusercontent.com/sergv/emacs-module/bca0ee4271dccf4c4fe13b38ae5edec2009b8ded/src/Emacs/Module.hs | haskell | --------------------------------------------------------------------------
|
License : Apache-2.0 (see LICENSE)
Maintainer :
Haskell.
C interface, still presumes some familiarity with said interface.
<-modules.html>.
= Minimalistic example
With help of this package, it may be defined as
@
{-# L... | Module : Emacs . Module
Copyright : ( c ) 2018
This module is the entry point for writing Emacs extensions in
This package , though provides a lot of wrapping around Emacs 's bare
Thus , when developnig Emacs modules it 's recommended to keep a
reference of the C interface around . One such r... |
cc8df013e233bead66dacb92a8c0c83257d932614b8519059e5b6b693f00056f | opencog/test-datasets | friends-incoming-set.scm | > [0mEntering scheme shell ; use ^D or a single . on a line by itself to exit .
[0;34mguile[1;34m> [0m((EvaluationLink
(ListLink (stv -nan -nan)
(EvaluationLink (stv -nan -nan)
(PredicateNode "friends")
(ListLink
(ConceptNode "Frank" (stv -nan 1))
(ConceptNode "B... | null | https://raw.githubusercontent.com/opencog/test-datasets/62677dbe59de4d59a9eb308e59ac602dff452872/pln/tuffy/smokes/tests/03-08-14/friends-incoming-set.scm | scheme | use ^D or a single . on a line by itself to exit .
34mguile[1;34m> [0m((EvaluationLink
34mguile[1;34m> [0m | (ListLink (stv -nan -nan)
(EvaluationLink (stv -nan -nan)
(PredicateNode "friends")
(ListLink
(ConceptNode "Frank" (stv -nan 1))
(ConceptNode "Bob" (stv -nan 1))
)
)
(EvaluationLink (stv -nan -nan)
(PredicateNode "friends")
(ListL... |
6f66556c14ff5904edfe08e2389e01dec2e2fd032b080173b2b1db055ca58b7c | informatimago/lisp | minlisp.lisp | ;;;;****************************************************************************
FILE : minlisp.lisp
;;;;LANGUAGE: Common-Lisp
;;;;SYSTEM: Common-Lisp
USER - INTERFACE :
;;;;DESCRIPTION
;;;;
Implements a minimum LISP inspired from AIM-8 LISP , in Common - Lisp .
;;;; U... | null | https://raw.githubusercontent.com/informatimago/lisp/571af24c06ba466e01b4c9483f8bb7690bc46d03/small-cl-pgms/minlisp.lisp | lisp | ****************************************************************************
LANGUAGE: Common-Lisp
SYSTEM: Common-Lisp
DESCRIPTION
Usage: (load "minlisp.lisp")
(minlisp:repl)
Then at the minlisp prompt, you have LISP, plus:
(DEFINE name sexp) corresponding to =
... | FILE : minlisp.lisp
USER - INTERFACE :
Implements a minimum LISP inspired from AIM-8 LISP , in Common - Lisp .
AIM-8 -- 4 MARCH 1959 -- J. MCCARTHY
With an addendum dated 23 MARCH 1959
< PJB > < >
MODIFICATIONS
2013 - 08 - 11 < PJB > Created MINLISP out of AIM-8 LISP... |
d635fb97b8c95e04db3ab89ad1781e76beef38f2a9fe801617ecffc89543e952 | JPMoresmau/scion-class-browser | DbTypes.hs | # LANGUAGE GeneralizedNewtypeDeriving , QuasiQuotes , TemplateHaskell , TypeFamilies , OverloadedStrings , GADTs , FlexibleContexts , EmptyDataDecls , FlexibleInstances , MultiParamTypeClasses #
module Scion.PersistentBrowser.DbTypes where
import Scion.PersistentBrowser.Types
import Database.Persist.Sqlite
imp... | null | https://raw.githubusercontent.com/JPMoresmau/scion-class-browser/572cc2c1177bdaa9558653cc1d941508cd4c7e5b/src/Scion/PersistentBrowser/DbTypes.hs | haskell | ,runStderrLoggingT
| wrapper around logging methods, so we can enable logging when we debug
runStderrLoggingT
it will have some of these
|Information needed to search a package.
name, version
|Complete information for a declaration.
| # LANGUAGE GeneralizedNewtypeDeriving , QuasiQuotes , TemplateHaskell , TypeFamilies , OverloadedStrings , GADTs , FlexibleContexts , EmptyDataDecls , FlexibleInstances , MultiParamTypeClasses #
module Scion.PersistentBrowser.DbTypes where
import Scion.PersistentBrowser.Types
import Database.Persist.Sqlite
imp... |
910b189ffef14eeef70b95575672161e5742db5f29aae3eb89aac46f86f6cf02 | metasoarous/clojure-datascience | session.clj | (ns clojure-datascience.session
(:require [cronj.core :refer [cronj]]))
(defonce mem (atom {}))
(defn- current-time []
(quot (System/currentTimeMillis) 1000))
(defn- expired? [[id session]]
(pos? (- (:ring.middleware.session-timeout/idle-timeout session) (current-time))))
(defn clear-expired-sessions []
(cl... | null | https://raw.githubusercontent.com/metasoarous/clojure-datascience/17e05d519ec76d88799fab1a06a5d23d16e3b926/src/clojure_datascience/session.clj | clojure | (ns clojure-datascience.session
(:require [cronj.core :refer [cronj]]))
(defonce mem (atom {}))
(defn- current-time []
(quot (System/currentTimeMillis) 1000))
(defn- expired? [[id session]]
(pos? (- (:ring.middleware.session-timeout/idle-timeout session) (current-time))))
(defn clear-expired-sessions []
(cl... | |
94cc000fa7ea51e814fec7d82912133246ea2484249ee60daf465f9363ad3dcc | fluentpython/lispy | Init.scm | $ I d : Init.scm , v 1.8 1994/09/02 15:02:35 queinnec Exp $
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest vers... | null | https://raw.githubusercontent.com/fluentpython/lispy/6b995c398e2d100fc3fc292e34ba1a00c0ae9b5a/references/LiSP-2ndEdition-2006Dec11/scm/Init.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
interpreter) in order to run... | $ I d : Init.scm , v 1.8 1994/09/02 15:02:35 queinnec Exp $
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
This file is used to customize scm ( Scheme
preloads Meroo... |
3c15afb40a9123aadb5208341c67f4b7c20a03941bb9626f84b4a167683edc03 | mirage/mirage-http | mirage_http_io.ml |
* Copyright ( c ) 2012 - 2015 Anil Madhavapeddy < >
* Copyright ( c ) 2013 - 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all c... | null | https://raw.githubusercontent.com/mirage/mirage-http/5f39592a87eb833b4b795f02f0895d5363864053/src/mirage_http_io.ml | ocaml | * ['a t] represents a blocking monad state
* [a >>= b] will pass the result of [a] to the
[b] function. This is a monadic [bind].
* [return a] will construct a constant IO value.
* [ic] represents an input channel
* [oc] represents an output channel
* [conn] represents the underlying network flow
* [write ... |
* Copyright ( c ) 2012 - 2015 Anil Madhavapeddy < >
* Copyright ( c ) 2013 - 2015 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all c... |
52b7a9c3d1aead38eaca85168d7c5fb7a4ed988c5f3552a63283b7bd7d093b96 | plum-umd/c-strider | llvmssa.ml | Copyright ( c ) 2008 Intel Corporation
* All rights reserved .
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* Redistributions of source code must retain the above copyright
* notice , th... | null | https://raw.githubusercontent.com/plum-umd/c-strider/3d3a3743bc28456eb6d50e01805ce484ab3c04e6/tools/cil-1.3.7/src/ext/llvmssa.ml | ocaml | map from (b:string, v:string) -> llvmLocal
giving the ssa variable to use for 'v' at entry to block labeled 'b'
create a new unique LLVM local for local variable 'vi'
Rename variables 'vl' in block 'b': pick new variables for 'b' at
entry to 'b' (except if 'b' is the function entry point), and
ren... | Copyright ( c ) 2008 Intel Corporation
* All rights reserved .
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* Redistributions of source code must retain the above copyright
* notice , th... |
552975b0df652affc186f0eb1cf5048cbfabd1081c33313c624830425a40ec7b | anoma/juvix | FreeVarsInfo.hs | module Juvix.Compiler.Core.Info.FreeVarsInfo where
import Data.HashMap.Strict qualified as HashMap
import Juvix.Compiler.Core.Extra
import Juvix.Compiler.Core.Info qualified as Info
import Juvix.Compiler.Core.Language
newtype FreeVarsInfo = FreeVarsInfo
{ -- map free variables to the number of their occurrences
... | null | https://raw.githubusercontent.com/anoma/juvix/59e67124520224fb68f4065753b53bc3b573be1e/src/Juvix/Compiler/Core/Info/FreeVarsInfo.hs | haskell | map free variables to the number of their occurrences | module Juvix.Compiler.Core.Info.FreeVarsInfo where
import Data.HashMap.Strict qualified as HashMap
import Juvix.Compiler.Core.Extra
import Juvix.Compiler.Core.Info qualified as Info
import Juvix.Compiler.Core.Language
newtype FreeVarsInfo = FreeVarsInfo
_infoFreeVars :: HashMap Index Int
}
instance IsInfo Free... |
0b49cd3c2c951b5311614d761f4c01512ca26b063ce9b72a84794a42e29ffa7f | haskell-game/sdl2 | Video.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
module SDL.Video
( module SDL.Video.OpenGL
, module SDL.Video.Renderer
-- * Window Management
, Window
, createWindow
, defaultWindow
, WindowC... | null | https://raw.githubusercontent.com/haskell-game/sdl2/40e89b20a6147a17189d085a72c66d765c3df6ea/src/SDL/Video.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
* Window Management
* Window Actions
* Window Attributes
* Renderer Management
* Clipboard Handling
* Display
* Screen Savers
| Screen savers should be disabled when the sudden enablement of the
monitor's power saving features would be inconvenient... | # LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
module SDL.Video
( module SDL.Video.OpenGL
, module SDL.Video.Renderer
, Window
, createWindow
, defaultWindow
, WindowConfig(..)
, WindowGraphicsContext(..)
, WindowMode(..)
, WindowPosition(..)
, destroyWin... |
8a904a5088f2c3d590869bd0a0258992da130be07caf6839262e0553696c2676 | acl2/acl2 | eval-functions-lemmas@useless-runes.lsp | (RP::RP-EVL-OF-EX-FROM-RP
(227 227 (:REWRITE DEFAULT-CDR))
(135 135 (:REWRITE DEFAULT-CAR))
(61 38 (:REWRITE RP::RP-EVL-OF-VARIABLE))
(40 40 (:REWRITE RP::RP-EVL-OF-ZP-CALL))
(40 40 (:REWRITE RP::RP-EVL-OF-UNARY-/-CALL))
(40 40 (:REWRITE RP::RP-EVL-OF-UNARY---CALL))
(40 40 (:REWRITE RP::RP-EVL-OF-TYPESPEC-CHECK-... | null | https://raw.githubusercontent.com/acl2/acl2/f64742cc6d41c35f9d3f94e154cd5fd409105d34/books/projects/rp-rewriter/proofs/.sys/eval-functions-lemmas%40useless-runes.lsp | lisp | (RP::RP-EVL-OF-EX-FROM-RP
(227 227 (:REWRITE DEFAULT-CDR))
(135 135 (:REWRITE DEFAULT-CAR))
(61 38 (:REWRITE RP::RP-EVL-OF-VARIABLE))
(40 40 (:REWRITE RP::RP-EVL-OF-ZP-CALL))
(40 40 (:REWRITE RP::RP-EVL-OF-UNARY-/-CALL))
(40 40 (:REWRITE RP::RP-EVL-OF-UNARY---CALL))
(40 40 (:REWRITE RP::RP-EVL-OF-TYPESPEC-CHECK-... | |
11ecae671ea0077c84d1a65ab42642bef26146918b4d4325fec0efda5b17f206 | braidchat/braid | subscribe_button.cljs | (ns braid.core.client.ui.views.subscribe-button
(:require
[re-frame.core :refer [dispatch subscribe]]))
(defn subscribe-button-view
[tag-id]
(let [user-subscribed-to-tag? (subscribe [:user-subscribed-to-tag? tag-id])]
(if @user-subscribed-to-tag?
[:a.button {:on-click
(fn [_]
... | null | https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/core/client/ui/views/subscribe_button.cljs | clojure | (ns braid.core.client.ui.views.subscribe-button
(:require
[re-frame.core :refer [dispatch subscribe]]))
(defn subscribe-button-view
[tag-id]
(let [user-subscribed-to-tag? (subscribe [:user-subscribed-to-tag? tag-id])]
(if @user-subscribed-to-tag?
[:a.button {:on-click
(fn [_]
... | |
0072c0ac1f8f7e65c2528c06ddaa0849df2f17517a54290096a4f62767e0509a | irastypain/sicp-on-language-racket | exercise_2_49.rkt | #lang racket
(require racket/gui/base
"../lib/vectors.rkt"
"../lib/segments.rkt"
(only-in "../lib/graphics.rkt"
make-frame
frame-coord-map
polyline
polygon))
(define width 512)
(define height 512)
(define target (make-... | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/src/chapter02/exercise_2_49.rkt | racket | Процедура отрисовки границ рамки
между собой середины сторон рамки
Реализация рисовалки 'wave'
(outline-painter frame)
(x-painter frame)
(rhombus-painter frame) | #lang racket
(require racket/gui/base
"../lib/vectors.rkt"
"../lib/segments.rkt"
(only-in "../lib/graphics.rkt"
make-frame
frame-coord-map
polyline
polygon))
(define width 512)
(define height 512)
(define target (make-... |
af4d6af9e696b494769b0287c6dc743e562bbaad19157b4b704c0f4744a14507 | maravillas/lein-multi | project.clj | ;; This project and the files contained in its folders are support for the
;; tests in /test. Do not modify these files without also modifying the tests.
(defproject lein-multi-test "0.1.0"
:dependencies [[org.clojure/clojure "1.2.0-RC1"]]) | null | https://raw.githubusercontent.com/maravillas/lein-multi/2605c0cc282e91fed41920fc17dab1ec5b1c419b/test-project/project.clj | clojure | This project and the files contained in its folders are support for the
tests in /test. Do not modify these files without also modifying the tests. |
(defproject lein-multi-test "0.1.0"
:dependencies [[org.clojure/clojure "1.2.0-RC1"]]) |
b689902ce03c3394e0754110f140b2608641d30792540749896ba915d833451d | gerritjvv/kafka-fast | failure_tests.clj | (ns
^{:doc "test the failure scenario where we are sending data to a cluster of 3
one node falls off and we consume at the other end.
The end result must be that no messages are lost"}
kafka-clj.failure-tests
(:require [kafka-clj.test-utils :as test-utils]
[kafka-clj.client :as cli... | null | https://raw.githubusercontent.com/gerritjvv/kafka-fast/fd149d8744c8100b2a8f4d09f1a251812e7baf6a/kafka-clj/test/kafka_clj/failure_tests.clj | clojure | (prn ">>>>> msg " msg)
wait for sending to cease | (ns
^{:doc "test the failure scenario where we are sending data to a cluster of 3
one node falls off and we consume at the other end.
The end result must be that no messages are lost"}
kafka-clj.failure-tests
(:require [kafka-clj.test-utils :as test-utils]
[kafka-clj.client :as cli... |
8a98ea9a5c5153d6bbaaeffed68df4f20d2bf59caa7ad122365557415320e45d | binsec/haunted | loader_dump.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/loader/loader_dump.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
914ec7b45a249afbaf59cbbeaa6aeec7a727cfc16e5c6252de89f24af3a9fccd | mindreframer/clojure-stuff | netty.clj | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by... | null | https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/ztellman/aleph/src/aleph/http/netty.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns aleph.http.netty
(:use
[aleph.http.core]
[aleph netty formats]
[aleph.netty.core :only (local-options)]
[lamina core api connections trace executor])
(:require
[aleph.http.websocket :as ws]
[aleph.http.client-middleware :as middleware]
[... |
ba1bd901eb0c640d07c32fffcbf6c3ebda7d880034050dc32ffae89528e53647 | michaelklishin/urly | third_party_test.clj | (ns clojurewerkz.urly.test.third_party-test
(:refer-clojure :exclude [resolve])
(:use [clojurewerkz.urly.core]
[clojure.test])
(:import [java.net URI URL]
[clojurewerkz.urly UrlLike]))
;;
Test suite compiled from multiple 3rd - party test suites ,
RFC examples , et cetera . MK .
;;
(deft... | null | https://raw.githubusercontent.com/michaelklishin/urly/1cc18c3e0441ea033cd23edb4fab8a87f3a26685/test/clojurewerkz/urly/test/third_party_test.clj | clojure | (ns clojurewerkz.urly.test.third_party-test
(:refer-clojure :exclude [resolve])
(:use [clojurewerkz.urly.core]
[clojure.test])
(:import [java.net URI URL]
[clojurewerkz.urly UrlLike]))
Test suite compiled from multiple 3rd - party test suites ,
RFC examples , et cetera . MK .
(deftest te... | |
fb4ffbc6d2da6955119b94b579aa68e54212a04c1ce783e304132d29c5c37bd9 | jjmrocha/kill-bill | examples_sup.erl | -module(examples_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Procs = [],
{ok, {{one_for_one, 10, 10}, Procs}}. | null | https://raw.githubusercontent.com/jjmrocha/kill-bill/1ba409c39524f2b47ff1338214bc9b4de3f2659e/examples/src/examples_sup.erl | erlang | -module(examples_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
Procs = [],
{ok, {{one_for_one, 10, 10}, Procs}}. | |
901910cb26c053dc79ced9e9fd2ef40d0549e8abc7097a75f2925b0680e1ac53 | pjotrp/guix | yubico.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/pjotrp/guix/96250294012c2f1520b67f12ea80bfd6b98075a2/gnu/packages/yubico.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu packages yubico)
#:use-module (gnu packages)
#:use-module (guix licenses)
#:use-module (... |
abdec0fcbc3067412a2f12c44e4be6745b0ee3d437adb565b0fa054d4d626c96 | tonyday567/mealy | Quantiles.hs | # LANGUAGE DataKinds #
# LANGUAGE RebindableSyntax #
{-# LANGUAGE StrictData #-}
-- | Mealy quantile statistics.
module Data.Mealy.Quantiles
( median,
quantiles,
digitize,
)
where
import Control.Monad.ST
import Data.Mealy
import Data.Ord
import Data.TDigest hiding (median)
import Data.TDigest.Internal
imp... | null | https://raw.githubusercontent.com/tonyday567/mealy/dc25512cec3ed31cb3f96c81136fcac24f8e832c/src/Data/Mealy/Quantiles.hs | haskell | # LANGUAGE StrictData #
| Mealy quantile statistics.
| Mealy quantiles based on the tdigest library
| Mealy median using 'tdigest'
The tdigest algorithm works best at extremes and can be unreliable in the centre.
Centroids are shuffled based on space
sort by cumulative weight
| A mealy that computes the running... | # LANGUAGE DataKinds #
# LANGUAGE RebindableSyntax #
module Data.Mealy.Quantiles
( median,
quantiles,
digitize,
)
where
import Control.Monad.ST
import Data.Mealy
import Data.Ord
import Data.TDigest hiding (median)
import Data.TDigest.Internal
import Data.TDigest.Tree.Internal (TDigest (..), absMaxSize, em... |
b604aea0fe0e07dcd38a041528200a43b2679e26624d9fe164be432694c7f0a6 | haskell-servant/servant-swagger | Internal.hs | {-# LANGUAGE CPP #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTyp... | null | https://raw.githubusercontent.com/haskell-servant/servant-swagger/bb0a84faa073fa9530f60337610d7da3d5b9393c/src/Servant/Swagger/Internal.hs | haskell | # LANGUAGE CPP #
# LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
# LANGUAGE PolyKinds #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
| Generate a Swagger specification for a servant API.
To generate Swagger speci... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TypeOperators #
#if __GLASGOW_HASKELL__ >= 806
# LANGUAGE UndecidableInstances #
#endif
module Servant.Swagger.Internal where
import Prelude ()
import Prelude.Compat
import Control.Applicative ((<|>))... |
e9c8387e7ab77c48ffd77260834712be5e24899995cfee658b0f84f175b1e4ba | clojure/tools.build | zip.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojure/tools.build/0563a69670437fb236df9c08d3cb74e1e378aefb/src/main/clojure/clojure/tools/build/tasks/zip.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.tools.build.tasks.zip
(:require
[clojure.tools.build.api :as api]
[clojure.tools.build.util.file :as file]
[clojure.tools.build.util.zip :as zip])
(:import
[java.io FileOutputStream]
[java.util.zip ZipOutputStream]))
(set! *warn-on-refl... |
c71a9d03b393a1977c1831803835d945a8473c48a17c4471363f09af984a31af | parsonsmatt/ghc-cache-buster | Web.hs | # language TemplateHaskell #
module GCB.Web where
import ( )
import GCB.Types.Bar
import GCB.Types.QuuzDep
import GCB.App
web :: IO ()
web = do
putStrLn "starting webserver"
let f = mkBar 3
app
pure []
| null | https://raw.githubusercontent.com/parsonsmatt/ghc-cache-buster/1ee284c4ce1be7818ccec2eea7c12b638c477723/src/GCB/Web.hs | haskell | # language TemplateHaskell #
module GCB.Web where
import ( )
import GCB.Types.Bar
import GCB.Types.QuuzDep
import GCB.App
web :: IO ()
web = do
putStrLn "starting webserver"
let f = mkBar 3
app
pure []
| |
098768f2ffc7cd4eae820a1bd981a5753e9d5b617c909fc873a2a14067ecae30 | Frama-C/Frama-C-snapshot | standard.ml | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/variadic/standard.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
56af110af7513dc48ff5acddd36ae0b1a19c33e24ad67a64b7a1151ecf870bae | agda/agda2hs | Utils.hs | module Agda2Hs.Compile.Utils where
import Control.Arrow ( Arrow((***)) )
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.Writer ( tell )
import Control.Monad.State ( put, modify )
import Data.Maybe ( isJust )
import qualified Data.Map as M
import qualified Language.Haskell.Exts as Hs
im... | null | https://raw.githubusercontent.com/agda/agda2hs/a248c10876ad7832da3c908535a1ddeff84d210e/src/Agda2Hs/Compile/Utils.hs | haskell | When going under a binder we need to update the scope as well as the context in order to get
Determine whether an argument should be kept or dropped.
We drop all arguments that have quantity 0 (= run-time erased).
We also drop hidden non-erased arguments (which should all be of
type Level or Set l).
Determine whe... | module Agda2Hs.Compile.Utils where
import Control.Arrow ( Arrow((***)) )
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.Writer ( tell )
import Control.Monad.State ( put, modify )
import Data.Maybe ( isJust )
import qualified Data.Map as M
import qualified Language.Haskell.Exts as Hs
im... |
8ea8d6d6ac952538db3567b8bca7f193d87ee8e3e35e73d8637f4d0a4f402ca0 | jdreaver/eventful | DynamoJSONSpec.hs | # OPTIONS_GHC -fno - warn - orphans #
module Eventful.Store.DynamoDB.DynamoJSONSpec (spec) where
import Data.Aeson
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Instances ()
import Eventful.Store.DynamoDB.DynamoJSON
spec :: Spec
spec = do
describe "Value <-> AttributeValue conversion" $ do
i... | null | https://raw.githubusercontent.com/jdreaver/eventful/3f0c604e5bb2dcf5bacf0a2e01edf6a5e9c5e22e/eventful-dynamodb/tests/Eventful/Store/DynamoDB/DynamoJSONSpec.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Eventful.Store.DynamoDB.DynamoJSONSpec (spec) where
import Data.Aeson
import Test.Hspec
import Test.QuickCheck
import Test.QuickCheck.Instances ()
import Eventful.Store.DynamoDB.DynamoJSON
spec :: Spec
spec = do
describe "Value <-> AttributeValue conversion" $ do
i... | |
6f8e8c2a0cef670004c453d8225671a14db37ccc85145823dc6eb784be22b4df | atolab/zenoh | test_zenoh_common.ml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | null | https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/test/test_zenoh_common.ml | ocaml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | |
be705534965d8708ab638fde1b0d038e3a51d475e9514f307ac0ef9d7f188337 | chunsj/TH | pp-sms.lisp | (defpackage :pp-sms
(:use #:common-lisp
#:mu
#:th
#:th.pp))
(in-package :pp-sms)
(defparameter *sms* (->> (slurp "./data/sms.txt")
(mapcar #'parse-float)
(mapcar #'round)
(tensor)))
(defparameter *mean* ($mean *sms*)... | null | https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/pp/pp-sms.lisp | lisp | (defpackage :pp-sms
(:use #:common-lisp
#:mu
#:th
#:th.pp))
(in-package :pp-sms)
(defparameter *sms* (->> (slurp "./data/sms.txt")
(mapcar #'parse-float)
(mapcar #'round)
(tensor)))
(defparameter *mean* ($mean *sms*)... | |
81d7068e2d83dc6bfd1e23c0a98c875dd9cf93772155c1f97db62da04c4e0992 | disteph/cdsat | TS.ml | open Top.Variables
type t = MakesSense.t
let bV _ fv = MakesSense.fv fv
let bC _ _ l =
List.fold MakesSense.combine l MakesSense.init
let bB _ (_,_,_) =
MakesSense.init
| null | https://raw.githubusercontent.com/disteph/cdsat/1b569f3eae59802148f4274186746a9ed3e667ed/src/kernel/kernel.mld/termstructures.mld/varcheck.mld/TS.ml | ocaml | open Top.Variables
type t = MakesSense.t
let bV _ fv = MakesSense.fv fv
let bC _ _ l =
List.fold MakesSense.combine l MakesSense.init
let bB _ (_,_,_) =
MakesSense.init
| |
1a429d6acea0eee18b78529e2c555035034a1e9967fcf1f08bc006def350eeee | FlogFr/FlashCard | Message.hs | module Data.Message where
import Protolude
data Message = Message {
description :: Text
} deriving (Eq, Show)
| null | https://raw.githubusercontent.com/FlogFr/FlashCard/17029f9b84f23c43f67702b77bd7418cdf0a9d28/src/Data/Message.hs | haskell | module Data.Message where
import Protolude
data Message = Message {
description :: Text
} deriving (Eq, Show)
| |
57693adbbd71f301cac8b7923343e0991b0a06862f535829d0076bbe505d0ab9 | footprintanalytics/footprint-web | transform.clj | (ns metabase.api.transform
(:require [compojure.core :refer [GET]]
[medley.core :as m]
[metabase.api.common :as api]
[metabase.models.permissions :as perms]
[metabase.transforms.core :as tf]
[metabase.transforms.specs :as tf.specs]))
(api/defendpoint GET "/... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/api/transform.clj | clojure | (ns metabase.api.transform
(:require [compojure.core :refer [GET]]
[medley.core :as m]
[metabase.api.common :as api]
[metabase.models.permissions :as perms]
[metabase.transforms.core :as tf]
[metabase.transforms.specs :as tf.specs]))
(api/defendpoint GET "/... | |
82da3c400e1c4bbaa9b3ae132fb19d543a92b070d68d0f53f7aa95c8366e8336 | Apress/practical-webdev-haskell | Auth.hs | module Adapter.Redis.Auth where
import ClassyPrelude
import qualified Domain.Auth as D
import Text.StringRandom
import Data.Has
import qualified Database.Redis as R
type State = R.Connection
type Redis r m = (Has State r, MonadReader r m, MonadIO m)
-- | Create state from redis url string.
-- format: redis:pass@h... | null | https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/09/src/Adapter/Redis/Auth.hs | haskell | | Create state from redis url string.
format: redis:pass@host:port/db | module Adapter.Redis.Auth where
import ClassyPrelude
import qualified Domain.Auth as D
import Text.StringRandom
import Data.Has
import qualified Database.Redis as R
type State = R.Connection
type Redis r m = (Has State r, MonadReader r m, MonadIO m)
sample : redis :
withState :: String -> (State -> IO a) -> IO... |
5d1aefca84c12403053104d9cebd7505b5bd0ae5487de2ef910b5b6f6196724f | OnRoadZy/artascope | model-simple.rkt |
;万花筒模型
(module model-simple racket
(provide draw-artascope
set-f-center
af0-v ap0-v
rf-v rw-v rp-v
step-aw-v
start-af-v end-af-v)
定义全局参数 :
(define f-center (cons 300 300))
(define af0 30)
(define ap0 20)
(define rf 300)
(define rw 210)
(define rp ... | null | https://raw.githubusercontent.com/OnRoadZy/artascope/58f87cf5b8b98d675cb88b6d9cf56139e816e5eb/model-simple.rkt | racket | 万花筒模型
设置/取得绘图全局参数:
取得绘图点的X、Y坐标:
计算滚轮圆心X、Y坐标:
计算af、dlt-af、ap值:
组合坐标值为点值:
绘制万花筒:
函数参数为函数,该函数参数取得画布的尺寸。 |
(module model-simple racket
(provide draw-artascope
set-f-center
af0-v ap0-v
rf-v rw-v rp-v
step-aw-v
start-af-v end-af-v)
定义全局参数 :
(define f-center (cons 300 300))
(define af0 30)
(define ap0 20)
(define rf 300)
(define rw 210)
(define rp 100)
... |
8bc98bb4adb1391b633248ae81991b19dff3199a5e198c190db680d5dbfdbab3 | josefs/Gradualizer | gradualizer_tests.erl | -module(gradualizer_tests).
-include_lib("eunit/include/eunit.hrl").
-define(passing, "test/should_pass/any.erl").
-define(failing, "test/should_fail/arg.erl").
global_test_() ->
{setup,
fun setup_app/0,
fun cleanup_app/1,
[{generator, fun type_check_erl_file/0},
{generator, fun type_check_e... | null | https://raw.githubusercontent.com/josefs/Gradualizer/1498d1792155010950c86dc3e92ccb111b706e80/test/gradualizer_tests.erl | erlang | Drop the file attribute to check that type_check_forms works without it | -module(gradualizer_tests).
-include_lib("eunit/include/eunit.hrl").
-define(passing, "test/should_pass/any.erl").
-define(failing, "test/should_fail/arg.erl").
global_test_() ->
{setup,
fun setup_app/0,
fun cleanup_app/1,
[{generator, fun type_check_erl_file/0},
{generator, fun type_check_e... |
2a60c98a4ff730aac507b2da6d2e1f807728eec24cecc7c705b26d7195233f41 | kupl/FixML | sub41.ml | type metro = STATION of name
| AREA of name * metro
| CONNECT of metro * metro
and name = string
let rec matchid ((x:string),(l:string list)) :bool =
match l with
[]-> false
|hd::tl-> if (hd=x) then true else matchid(x,tl)
let rec ckMetro ((m:metro),(idl:string list)) :bool =
match m wi... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/wellformedness/wellformedness1/submissions/sub41.ml | ocaml | type metro = STATION of name
| AREA of name * metro
| CONNECT of metro * metro
and name = string
let rec matchid ((x:string),(l:string list)) :bool =
match l with
[]-> false
|hd::tl-> if (hd=x) then true else matchid(x,tl)
let rec ckMetro ((m:metro),(idl:string list)) :bool =
match m wi... | |
95744f61c0b0afdf5119f8ddb8bf59eee95b08326bde2451f81b726f16900cda | pallet/stevedore | common_test.clj | (ns pallet.stevedore.common-test
(:require
[clojure.test :refer :all]
[pallet.stevedore :refer [checked-commands with-script-language]]
[pallet.stevedore.common :refer :all]))
(deftest chain-with-test
(is (= "a" (chain-with "&&" ["a"])) "no indent")
(is (= "# abc.clj:123\na" (chain-with "&&" ["# abc.clj... | null | https://raw.githubusercontent.com/pallet/stevedore/735530a4d21a119d6bc29e6982eaa9c4840b1d54/test/pallet/stevedore/common_test.clj | clojure | (ns pallet.stevedore.common-test
(:require
[clojure.test :refer :all]
[pallet.stevedore :refer [checked-commands with-script-language]]
[pallet.stevedore.common :refer :all]))
(deftest chain-with-test
(is (= "a" (chain-with "&&" ["a"])) "no indent")
(is (= "# abc.clj:123\na" (chain-with "&&" ["# abc.clj... | |
d266fdcfcfd966d42056bfcc6c80cc5e2429bc8e7106330908e6eabba3f84901 | nuprl/gradual-typing-performance | structs-node-find-child.rkt | #lang typed/racket/base
(provide node-find-child)
;; -----------------------------------------------------------------------------
(require "data-node-adapted.rkt"
"data-label-adapted.rkt"
benchmark-util)
(require/typed/check "label-label-ref.rkt"
[label-ref (-> label Integer (U Char Symbol))])
(... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/suffixtree/typed/structs-node-find-child.rkt | racket | -----------------------------------------------------------------------------
=============================================================================
node-find-child: node label-element -> (union node #f)
| #lang typed/racket/base
(provide node-find-child)
(require "data-node-adapted.rkt"
"data-label-adapted.rkt"
benchmark-util)
(require/typed/check "label-label-ref.rkt"
[label-ref (-> label Integer (U Char Symbol))])
(require/typed/check "label-label-element-equal.rkt"
[label-element-equal? (-> A... |
d80c45d632b0fbc4397edc3157a50177e45daf8ec6b31cfc7a1b7bf8de0df448 | htmfilho/minimily | date.clj | (ns minimily.utils.date
(:require [clj-time.format :as timef]
[clj-time.coerce :as timec])
(:import (java.text SimpleDateFormat)
(java.util Date)))
(defn today []
(new Date))
(defn now []
(timec/to-sql-date (new Date)))
(defn to-string [date format]
(if (nil? date)
""
(.forma... | null | https://raw.githubusercontent.com/htmfilho/minimily/fc0fa176cc3fb83fd326cc5b3b8c31fa09169fc9/src/minimily/utils/date.clj | clojure | (ns minimily.utils.date
(:require [clj-time.format :as timef]
[clj-time.coerce :as timec])
(:import (java.text SimpleDateFormat)
(java.util Date)))
(defn today []
(new Date))
(defn now []
(timec/to-sql-date (new Date)))
(defn to-string [date format]
(if (nil? date)
""
(.forma... | |
cfdd577a242e7e546101112fc80689ffe60f72e33bb8de8278d874cda10b2073 | azimut/shiny | 2.lisp | (in-package :shiny)
;; Trying the ideas on the song
;;
;;
(freverb-toggle 1)
(freverb :roomsize .6d0 :damp .1d0 :level .9d0 :width 10d0)
sine 80 - 8
(fp 2 101 0)
(let ((o (new palindrome :of '(.75 .6 .5 .45) :elide t)))
(defun f (time)
(let ((offset (next o))
(mychord (make-chord 55 70 4 *phryg... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/inlovewithaghost/2.lisp | lisp | Trying the ideas on the song
(pa time (mapcar (lambda (x) (+ 12 x)) (if (odds .6)
(reverse (cadr mychord))
(cadr mychord)))
.5 60 3 .5)
normal
eerie
? | (in-package :shiny)
(freverb-toggle 1)
(freverb :roomsize .6d0 :damp .1d0 :level .9d0 :width 10d0)
sine 80 - 8
(fp 2 101 0)
(let ((o (new palindrome :of '(.75 .6 .5 .45) :elide t)))
(defun f (time)
(let ((offset (next o))
(mychord (make-chord 55 70 4 *phrygian*)))
(pa time mychord offset '... |
7669f4c8cda464e18d461b4e9524830047e5c2b5607f087d98fc1f9bfd4c8ec7 | egobrain/tq_transform | tq_record_transform.erl | %%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTIN... | null | https://raw.githubusercontent.com/egobrain/tq_transform/6729f12b1a2fa5ece41ebb15b716c7f8b9360a33/src/tq_record_transform.erl | erlang |
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
API.
Model.
Rules. | THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(tq_record_transform).
-behavior(tq_transform_plugin).
-include_lib("tq_transform/i... |
526ffd54f6283d487281144cc7c85cb9ea93b7258816ed0512b84d189732e108 | tokenmill/common-crawl-utils | reader_test.clj | (ns common-crawl-utils.reader-test
(:require [clojure.test :refer :all]
[common-crawl-utils.reader :as reader]))
(deftest ^:integration reader-test
(testing "Warc reading"
(is (some some? (reader/read-warc))))
(testing "Coordinate reading"
(is (some some? (reader/read-coordinates)))))
| null | https://raw.githubusercontent.com/tokenmill/common-crawl-utils/2c0b500948dcba8f2255aac98fac17c4e09bb21d/test/common_crawl_utils/reader_test.clj | clojure | (ns common-crawl-utils.reader-test
(:require [clojure.test :refer :all]
[common-crawl-utils.reader :as reader]))
(deftest ^:integration reader-test
(testing "Warc reading"
(is (some some? (reader/read-warc))))
(testing "Coordinate reading"
(is (some some? (reader/read-coordinates)))))
| |
8193844211c9d94c26fee25379021ac8bbd4cdc71b6c63870421e5ce2a5c178b | spawnfest/eep49ers | ex_splitterWindow.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2009 - 2016 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applic... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/examples/demo/ex_splitterWindow.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific l... | Copyright Ericsson AB 2009 - 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ex_splitterWindow).
-behaviour(wx_object).
-export([start/1]).
-export([init/1, terminate/2, code_change... |
9601a7bb5a99ca16c3b8986a082800e76a9dc9730d966619f1034bded02f9bdf | solita/mnt-teet | admin_view.cljs | (ns teet.admin.admin-view
"Admin user interface"
(:require [teet.admin.admin-controller :as admin-controller]
[teet.ui.material-ui :refer [Table TableHead TableBody TableRow TableCell Paper Collapse]]
[teet.ui.text-field :refer [TextField]]
[teet.ui.buttons :as buttons]
... | null | https://raw.githubusercontent.com/solita/mnt-teet/8a90096e215b32b169a98a5f141d66d62014ec3b/app/frontend/src/cljs/teet/admin/admin_view.cljs | clojure | with the main entity, but we don't want to see the whole item as the link. | (ns teet.admin.admin-view
"Admin user interface"
(:require [teet.admin.admin-controller :as admin-controller]
[teet.ui.material-ui :refer [Table TableHead TableBody TableRow TableCell Paper Collapse]]
[teet.ui.text-field :refer [TextField]]
[teet.ui.buttons :as buttons]
... |
178f04b772c53184df0b49f0c0334492e3f3640c4053e4a09b02773f28cdd872 | marick/fp-oo | building-data-2b.clj | ;;; Exercise 2 (another version)
;; Rather than have `fassoc-base` be `def`ed itself, I'll define it in
;; a let. There's no need for it to be globally visible. It's also
interesting to note that the ` let ` can surround a ` def ` . ( In Ruby ,
;; a method definition can't see bindings established outside it, but
;;... | null | https://raw.githubusercontent.com/marick/fp-oo/434937826d794d6fe02b3e9a62cf5b4fbc314412/old-code/solutions/building-data-2b.clj | clojure | Exercise 2 (another version)
Rather than have `fassoc-base` be `def`ed itself, I'll define it in
a let. There's no need for it to be globally visible. It's also
a method definition can't see bindings established outside it, but
the lesser-used `define-method` can.) |
interesting to note that the ` let ` can surround a ` def ` . ( In Ruby ,
(let [fassoc-base
(fn [fap new-key value]
(fn [lookup-key]
(if (= lookup-key new-key)
value
(fap lookup-key))))]
(def fassoc
(fn [fap & key-values]
(let [pairs (partition 2 ke... |
1a67d982e10d97b17cc18c002808c706f392d8159aec4664aa50bf0d182a8e30 | camlspotter/ocamloscope.2 | datalink.ml | open Spotlib.Spot
open Utils
open List
open Data
module Siglink = struct
open Outcometree
let attach_type_ids fsigx =
let with_types = ref 0 in
let tyid = ref (-1) in
let tbl = Hashtbl.create 1023 in
let rev_fs_t = fold_left (fun rev_st (_,(r,_,_) as i) ->
match Sig.the_type r with
|... | null | https://raw.githubusercontent.com/camlspotter/ocamloscope.2/49b5977a283cdd373021d41cb3620222351a2efe/datalink.ml | ocaml | XXX I guess... | open Spotlib.Spot
open Utils
open List
open Data
module Siglink = struct
open Outcometree
let attach_type_ids fsigx =
let with_types = ref 0 in
let tyid = ref (-1) in
let tbl = Hashtbl.create 1023 in
let rev_fs_t = fold_left (fun rev_st (_,(r,_,_) as i) ->
match Sig.the_type r with
|... |
360f64be22d255ce85f77e877925757a19f5ee4ef1d931631eea5aed4ba2cf51 | darioteixeira/rip | rip_server.ml | (********************************************************************************)
Rip_server.ml
Copyright ( c ) 2016 < >
Copyright (c) 2016 Dario Teixeira <>
*)
(********************************************************************************)
open Result
open Lwt
open Rip
(***********************... | null | https://raw.githubusercontent.com/darioteixeira/rip/b915d0ade721c1e89dfeae36fbc847948aa03286/tests/rip_server.ml | ocaml | ******************************************************************************
******************************************************************************
******************************************************************************
******************************************************************************
****... | Rip_server.ml
Copyright ( c ) 2016 < >
Copyright (c) 2016 Dario Teixeira <>
*)
open Result
open Lwt
open Rip
* { 1 Private functions and values }
* { 2 Miscelaneous values }
let users = Resource.make ... |
b56ece8e3456b621c8e8387921b695721b2f23cb940d65c4bff71b2d454d4b1c | input-output-hk/cardano-ledger | Tx.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedSt... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/shelley/impl/src/Cardano/Ledger/Shelley/Tx.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
* Transaction
* Re-exports
========================================================
| `TxBody` setter and getter for `ShelleyTx`. The setter does update
memoized binary representation.
memoized binary representation.
| `TxAuxData` setter a... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTy... |
1b96488a001e3af97ca10e7511d829d11044cc63a115e98bb96f0653045ed87e | gsakkas/rite | 0072.ml | IteG (BopG EmptyG EmptyG) (LamG EmptyPatG EmptyG) (LamG EmptyPatG EmptyG)
if f b = b
then (fun b'' ->
(f b , false))
else (fun b'' -> (f b , true))
| null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/clusters/0072.ml | ocaml | IteG (BopG EmptyG EmptyG) (LamG EmptyPatG EmptyG) (LamG EmptyPatG EmptyG)
if f b = b
then (fun b'' ->
(f b , false))
else (fun b'' -> (f b , true))
| |
235ce1268f4636dab796ad2ea6a3aef5d81b1d9b982d05a067b41ee3cc4f6024 | JoelSanchez/ventas | datepicker.cljs | (ns ventas.components.datepicker
(:require
[react-date-range]
[re-frame.core :as rf]
[reagent.ratom :refer [atom]]
[ventas.components.base :as base]
[ventas.utils :as utils]
[reagent.core :as reagent]))
(def state-key ::state)
(rf/reg-event-fx
::set-value
(fn [_ [_ id on-change-fx {:strs [startD... | null | https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/cljs/ventas/components/datepicker.cljs | clojure | (ns ventas.components.datepicker
(:require
[react-date-range]
[re-frame.core :as rf]
[reagent.ratom :refer [atom]]
[ventas.components.base :as base]
[ventas.utils :as utils]
[reagent.core :as reagent]))
(def state-key ::state)
(rf/reg-event-fx
::set-value
(fn [_ [_ id on-change-fx {:strs [startD... | |
3aac18d3f12a6bcd99f073cb3305264383a7f187896e39b4cb3c9389d648ad5c | nboldi/c-parser-in-haskell | AST.hs | # LANGUAGE DeriveDataTypeable , DeriveFunctor , DeriveGeneric , FlexibleContexts #
-- | Abstract Syntax Tree of a C program.
-- C language elements are highly recursive, so this module could only be broken up
-- with a lot of effort and increasing complexity with type arguments.
module MiniC.AST where
import GH... | null | https://raw.githubusercontent.com/nboldi/c-parser-in-haskell/1a92132e7d1b984cf93ec89d6836cc804257b57d/MiniC/AST.hs | haskell | | Abstract Syntax Tree of a C program.
C language elements are highly recursive, so this module could only be broken up
with a lot of effort and increasing complexity with type arguments.
| C storage class specifier
^ automatic scope for variables
^ suggest storing a variable on register
^ function / varia... | # LANGUAGE DeriveDataTypeable , DeriveFunctor , DeriveGeneric , FlexibleContexts #
module MiniC.AST where
import GHC.Generics
import Data.Data
import Data.Typeable
import SourceCode.ASTElems
data TranslationUnit a
= TranslationUnit { _tuDecls :: ASTList Declaration a
, _tuInfo :: a
... |
29ffc869145f70f8d645a7625e080dd9cbbf0073cbd16f991e4541aa9302bb6e | vyzo/gerbil | pregexp-test.scm | exec -f pregexp.scm -f $ 0
last substantial change 2005 - 04 - 24
last change 2008 - 04 - 12
(load (if 'nil "tester.scm" "tester.lisp"))
;keeping the document honest
(test
(pregexp "c.r")
(:sub (:or (:seq #\c :any #\r)))
(pregexp-match-positions "brain" "bird")
#f
(pregexp-match-positions "needle" "h... | null | https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/std/pregexp/pregexp-test.scm | scheme | keeping the document honest
\\ ; ignore
\\ ; me
completely
\\ ; ignore
\\ ; me
completely
nothing before
then the subpattern of
a dot followed by
which is
with nothing following
ensure there's a non-0 digit
not just zeros and dots
dot is not metachar inside []
misc
matches t
matches h
matches e
; ;... | exec -f pregexp.scm -f $ 0
last substantial change 2005 - 04 - 24
last change 2008 - 04 - 12
(load (if 'nil "tester.scm" "tester.lisp"))
(test
(pregexp "c.r")
(:sub (:or (:seq #\c :any #\r)))
(pregexp-match-positions "brain" "bird")
#f
(pregexp-match-positions "needle" "hay needle stack")
((4 . 10)... |
c66883f955b757e0372df210c8f9474ab0c057faddfbdec33973255f95de1644 | processone/stun | stun_test.erl | %%%-------------------------------------------------------------------
%%% File : stun_test.erl
Author : < >
%%% Description : STUN test suite
Created : 7 Aug 2009 by < >
%%%
%%%
Copyright ( C ) 2002 - 2023 ProcessOne , SARL . All Rights Reserved .
%%%
Licensed under the Apache License , Version 2.... | null | https://raw.githubusercontent.com/processone/stun/5e41e347d97da0f68182a0870af806354996ab99/src/stun_test.erl | erlang | -------------------------------------------------------------------
File : stun_test.erl
Description : STUN test suite
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITH... | Author : < >
Created : 7 Aug 2009 by < >
Copyright ( C ) 2002 - 2023 ProcessOne , SARL . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(stun_test).
-export([bind_udp/2, bind_tc... |
50e1dc29967044eec7f52bdc7f46027be754ceaae842f8a865ff0cf90bb6e8d0 | jcrossley3/lein-modules | project.clj | (def version "0.1.0-SNAPSHOT")
(defproject lambda-clj version
:description ""
:packaging "pom"
:middleware [lein-modules.plugin/middleware]
:profiles {:immutant {:dependencies [[org.immutant/immutant _]]}
:dev [:immutant {:dependencies [[midje/midje _]]}]}
:dependencies [[cheshire _]]
:modules... | null | https://raw.githubusercontent.com/jcrossley3/lein-modules/8282ca9b214cd34ca0d222be670478982e1d55b5/test-resources/lambda/project.clj | clojure | (def version "0.1.0-SNAPSHOT")
(defproject lambda-clj version
:description ""
:packaging "pom"
:middleware [lein-modules.plugin/middleware]
:profiles {:immutant {:dependencies [[org.immutant/immutant _]]}
:dev [:immutant {:dependencies [[midje/midje _]]}]}
:dependencies [[cheshire _]]
:modules... | |
2ff32d488a50d5ec40126945bba6c72b8acdf7451466b285365b97566e2aa9f6 | serefayar/ayatori | response.clj | (ns ayatori.rest-api.response
(:require
[exoscale.ex :as ex]
[ring.util.response :as resp]))
(defmulti error
(fn [ex]
(-> ex
(ex-data)
::ex/type
((comp keyword name)))))
(defmethod error :default [ex]
(-> ex
(ex-message)
(resp/bad-request)
(resp/content-type "... | null | https://raw.githubusercontent.com/serefayar/ayatori/dbe171681e7f3fe574e3026577b94ca18d4beaff/bases/rest_api/src/ayatori/rest_api/response.clj | clojure | (ns ayatori.rest-api.response
(:require
[exoscale.ex :as ex]
[ring.util.response :as resp]))
(defmulti error
(fn [ex]
(-> ex
(ex-data)
::ex/type
((comp keyword name)))))
(defmethod error :default [ex]
(-> ex
(ex-message)
(resp/bad-request)
(resp/content-type "... | |
1692048367e9742b9b7cd187f72c7fadcd3850cf688411d9935f05c2b1858f9e | jacobobryant/platypub | items.clj | (ns com.platypub.feat.items
(:require [cheshire.core :as cheshire]
[com.biffweb :as biff :refer [q]]
[com.platypub.mailgun :as mailgun]
[com.platypub.middleware :as mid]
[com.platypub.netlify :as netlify]
[com.platypub.ui :as ui]
[com.platypub.ut... | null | https://raw.githubusercontent.com/jacobobryant/platypub/71799b1b8f4e8fd1f93d7ce94b6ca952aa9709fa/src/com/platypub/feat/items.clj | clojure | Helps email clients render links correctly. | (ns com.platypub.feat.items
(:require [cheshire.core :as cheshire]
[com.biffweb :as biff :refer [q]]
[com.platypub.mailgun :as mailgun]
[com.platypub.middleware :as mid]
[com.platypub.netlify :as netlify]
[com.platypub.ui :as ui]
[com.platypub.ut... |
fa8e9d9f3ccd2fb55bf95bad65cc5cdead50051b872d67a81735f0af3b29a673 | eait-itig/rdpproxy | duo.erl | %%
%% rdpproxy
%% remote desktop proxy
%%
Copyright 2020 < >
The University of Queensland
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% are met:
1 . Redistributions of source code must re... | null | https://raw.githubusercontent.com/eait-itig/rdpproxy/67cd36f22216f7d4f6c9cf259cf55cab38fc6bfb/src/duo.erl | erlang |
rdpproxy
remote desktop proxy
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the followi... | Copyright 2020 < >
The University of Queensland
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENT... |
d4d59134645c5f110ea9f23ddaffb3310ad44231f7f90105c3e06b9a5fe98a0e | ghadishayban/squee | project.clj | (defproject com.ghadishayban/squee "0.0.1"
:description "A fresh JDBC library"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]]
:profiles {:dev {:plugins [[codox "0.8.12"]]
:codox {:include [squee.jdbc squee.datasou... | null | https://raw.githubusercontent.com/ghadishayban/squee/cf51ca427b2967bdd87527766ed342c2642fcd1a/project.clj | clojure | (defproject com.ghadishayban/squee "0.0.1"
:description "A fresh JDBC library"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]]
:profiles {:dev {:plugins [[codox "0.8.12"]]
:codox {:include [squee.jdbc squee.datasou... | |
0bf226d9ff92d9b2f81f364f7bfafe76f1b7bd8a7b8205b0bbe2130be3e0d1d9 | andrewMacmurray/haskell-book-solutions | Monoid.hs | module Ch15.Monoid where
import Test.QuickCheck
import Test.Hspec
import Ch15.Semigroup
import Ch15.MonoidLaws
import Data.Semigroup
instance Monoid Trivial where
mempty = Trivial
mappend = (<>)
instance (Monoid a, Semigroup a) => Monoid (Identity a) where
mempty = Identity mempty
mappend = (<>)
instance ... | null | https://raw.githubusercontent.com/andrewMacmurray/haskell-book-solutions/f4fd386187c03828d1736d9a43642ab4f0ec6462/src/ch15/Monoid.hs | haskell | module Ch15.Monoid where
import Test.QuickCheck
import Test.Hspec
import Ch15.Semigroup
import Ch15.MonoidLaws
import Data.Semigroup
instance Monoid Trivial where
mempty = Trivial
mappend = (<>)
instance (Monoid a, Semigroup a) => Monoid (Identity a) where
mempty = Identity mempty
mappend = (<>)
instance ... | |
1ac64cd7e553c52273ccc8edbdce48ed27d3e2ade531e6cc444e61fe1e1da09c | hopv/MoCHi | checkHCCSSolver.ml | open Util
open Combinator
let solve solver hcs =
let sol = solver hcs in
Logger.debug_assert
(fun () ->
if HCCS.is_solution hcs sol then true
else begin
Logger.printf "solution:@, %a@," PredSubst.pr sol;
false
end);
sol
let solve solver = Logger.log_block2 "CheckHCCSSo... | null | https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/checkHCCSSolver.ml | ocaml | open Util
open Combinator
let solve solver hcs =
let sol = solver hcs in
Logger.debug_assert
(fun () ->
if HCCS.is_solution hcs sol then true
else begin
Logger.printf "solution:@, %a@," PredSubst.pr sol;
false
end);
sol
let solve solver = Logger.log_block2 "CheckHCCSSo... | |
8b4424e9238267e971c7aa111823f95b73295d92e33c606c63dd3765c053a758 | ksaveljev/yampa-2048 | Game.hs | {-# LANGUAGE Arrows #-}
module Game (wholeGame) where
import System.Random (StdGen)
import FRP.Yampa
import Types
import GameModel
import GameLogic
-- | Run the game that still has moves ('gameAlive'), until ('switch')
-- there are no more moves ('outOfMoves'), in which case the game is over
-- and needs to be rest... | null | https://raw.githubusercontent.com/ksaveljev/yampa-2048/c436e59cd6de3ef024f4f8cf9ddfdef9facd5529/src/Game.hs | haskell | # LANGUAGE Arrows #
| Run the game that still has moves ('gameAlive'), until ('switch')
there are no more moves ('outOfMoves'), in which case the game is over
and needs to be restarted ('restartGame')
| Detect when there are no more possible moves on the given board
| When the game is lost we want to show the Game... |
module Game (wholeGame) where
import System.Random (StdGen)
import FRP.Yampa
import Types
import GameModel
import GameLogic
wholeGame :: StdGen -> SF GameInput GameState
wholeGame g = switch
(gameAlive g >>> (identity &&& outOfMoves))
(restartGame g)
outOfMoves :: SF GameState (Event GameState)
outOfMoves = pr... |
6fefe32a7111f970b190412e4c2aa055710cf4061eb5880e392508ffb7add54a | barrel-db/barrel | barrel_app.erl | Copyright 2016 ,
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
%% use this file except in compliance with the License. You may obtain a copy of
%% the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
distributed under the Li... | null | https://raw.githubusercontent.com/barrel-db/barrel/1695ca4cfe821808526f9ecb2e019bc1b8eff48e/src/barrel_app.erl | erlang |
use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitation... | Copyright 2016 ,
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(barrel_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
barrel_sup:start_link(... |
67fffab68ec16f23658d0a09ae4d5126d6828f0d41e2f477f009d3a8cebfb59e | typelead/etlas | PreModuleShape.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
module Distribution.Backpack.PreModuleShape (
PreModuleShape(..),
toPreModuleShape,
renamePreModuleShape,
mixLinkPreModuleShape,
) where
import Prelude ()
import Distribution.Compat.Prelude
import Data.Set (Set)
import qualified Data.Set ... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas-cabal/Distribution/Backpack/PreModuleShape.hs | haskell | # LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
module Distribution.Backpack.PreModuleShape (
PreModuleShape(..),
toPreModuleShape,
renamePreModuleShape,
mixLinkPreModuleShape,
) where
import Prelude ()
import Distribution.Compat.Prelude
import Data.Set (Set)
import qualified Data.Set as Set
import qualified Data.Map as ... |
277fb118b5ca19d3d398f74f4882abfcd07385daf9cb6897e9842b5c02405d56 | onyx-platform/onyx | killed_job_test.clj | (ns onyx.log.killed-job-test
(:require [onyx.extensions :as extensions]
[onyx.log.entry :refer [create-log-entry]]
[onyx.log.replica :as replica]
[onyx.log.generators :refer [one-group]]
[onyx.system]
[schema.test]
[onyx.peer.log-version]
... | null | https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/log/killed_job_test.clj | clojure | (ns onyx.log.killed-job-test
(:require [onyx.extensions :as extensions]
[onyx.log.entry :refer [create-log-entry]]
[onyx.log.replica :as replica]
[onyx.log.generators :refer [one-group]]
[onyx.system]
[schema.test]
[onyx.peer.log-version]
... | |
14e92bf4a37470cdfbedf7e46e9ff45f3aad13bbce857db6a5d893421b176e29 | overtone/overtone | core.clj | (ns
^{:doc "Higher level instrument and studio abstractions."
:author "Jeff Rose & Sam Aaron"}
overtone.studio.core
(:use [overtone.sc defaults server])
(:require [overtone.config.log :as log]))
(defonce studio* (atom {:synth-group nil
:instruments {}
... | null | https://raw.githubusercontent.com/overtone/overtone/02f8cdd2817bf810ff390b6f91d3e84d61afcc85/src/overtone/studio/core.clj | clojure | (ns
^{:doc "Higher level instrument and studio abstractions."
:author "Jeff Rose & Sam Aaron"}
overtone.studio.core
(:use [overtone.sc defaults server])
(:require [overtone.config.log :as log]))
(defonce studio* (atom {:synth-group nil
:instruments {}
... | |
823d60929624f5f52efef55ac2dccc7a1d1433e5f988a3e8d913f371d826d60d | theodormoroianu/SecondYearCourses | HaskellChurchMonad_20210415161427.hs | module HaskellChurchMonad where
A boolean is any way to choose between two alternatives
newtype CBool t = CBool {cIf :: t -> t -> t}
toBool :: CBool Bool -> Bool
toBool b = cIf b True False
The boolean constant true always chooses the first alternative
cTrue :: CBool t
cTrue = CBool $ \t f -> t
The boolean consta... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurchMonad_20210415161427.hs | haskell | The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply it on them.
A natural nu... | module HaskellChurchMonad where
A boolean is any way to choose between two alternatives
newtype CBool t = CBool {cIf :: t -> t -> t}
toBool :: CBool Bool -> Bool
toBool b = cIf b True False
The boolean constant true always chooses the first alternative
cTrue :: CBool t
cTrue = CBool $ \t f -> t
The boolean consta... |
523e4b1620655519749a05d5efb96ea2226ac4b505315adcefefadcca72bbbf1 | MaskRay/OJHaskell | qc.hs | # LANGUAGE BangPatterns , NoMonomorphismRestriction #
import Control.Applicative
import Control.Monad
import Data.Array
import Data.Int
bsearch :: [(Int,Int64)] -> [(Int,Int)] -> Int64 -> Int64
bsearch !wvs !is !std = go 0 (maximum (map fst wvs)+1)
where
!n = length wvs
go !lo !hi
| lo == hi-1 = min ... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/NOIP/2011/qc.hs | haskell | # LANGUAGE BangPatterns , NoMonomorphismRestriction #
import Control.Applicative
import Control.Monad
import Data.Array
import Data.Int
bsearch :: [(Int,Int64)] -> [(Int,Int)] -> Int64 -> Int64
bsearch !wvs !is !std = go 0 (maximum (map fst wvs)+1)
where
!n = length wvs
go !lo !hi
| lo == hi-1 = min ... | |
e6ffe7d6b1d7bd219fc840d481d58c3b34f3aff73e8954e62c5bedd086702c94 | herd/herdtools7 | names.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/names.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2011 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
ec32947d18f14cf23bc75fe966a3f0fd4ee4ae77b3cecb3a62bfdf24fcd59533 | bhagany/nchart | project.clj | (defproject nchart "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src/clj" "src/cljs"]
:dependencies [[com.cemerick/piggieback "0.1.3"]
[compojure "1.1.9"]
[enlive "1.1.... | null | https://raw.githubusercontent.com/bhagany/nchart/63047e06a388f0f14c4eddfa01b5da22d00cdba8/project.clj | clojure | (defproject nchart "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src/clj" "src/cljs"]
:dependencies [[com.cemerick/piggieback "0.1.3"]
[compojure "1.1.9"]
[enlive "1.1.... | |
98efd52f68d8715d9e9cc6758917e06e9b19a00a3b6d22300c8771d823d91ff1 | ruhler/smten | Reader.hs |
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoImplicitPrelude #
module Smten.Control.Monad.Reader (
module Smten.Control.Monad.Reader.Class,
Reader(..),
mapReader,
withReader,
ReaderT(..),
mapReaderT,
withReaderT,
modul... | null | https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-lib/Smten/Control/Monad/Reader.hs | haskell |
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoImplicitPrelude #
module Smten.Control.Monad.Reader (
module Smten.Control.Monad.Reader.Class,
Reader(..),
mapReader,
withReader,
ReaderT(..),
mapReaderT,
withReaderT,
modul... | |
49b7b0424751fe5d734aa905d8f698ac5cb953297d7114d801811477854b37e8 | gedge-platform/gedge-platform | rabbit_authn_backend.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_authn_backend).
-include("rabbit.... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit_common/src/rabbit_authn_backend.erl | erlang |
Check a user can log in, given a username and a proplist of
authentication information (e.g. [{password, Password}]). If your
backend is not to be used for authentication, this should always
refuse access.
Possible responses:
{ok, User}
Authentication succeeded, and here's the user record.
{error, Error}... | 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 ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_authn_backend).
-include("rabbit.hrl").... |
1ce96dc90d3657d6cf9a84512a087a1aefe108f302818e7b8398936914f79dce | sile/ppg | ppg_contact_service.erl | Copyright ( c ) 2016 , < >
%%
This software is released under the MIT License .
%% See the LICENSE file in the project root for full license information.
%%
@doc Peer Contact Service
@private
-module(ppg_contact_service).
%%------------------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/sile/ppg/2bf2a6ddb0b21f4661eeb22b04cf5e1ad44f7af9/src/ppg_contact_service.erl | erlang |
See the LICENSE file in the project root for full license information.
----------------------------------------------------------------------------------------------------------------------
Exported API
-----------------------------------------------------------------------------------------------------------------... | Copyright ( c ) 2016 , < >
This software is released under the MIT License .
@doc Peer Contact Service
@private
-module(ppg_contact_service).
-export([new/1]).
-export([get_peer/1]).
-export([find_peer/1]).
-export_type([service/0]).
Macros & Records & Types
-define(STATE, ?MODULE).
-record(?STATE,
... |
78b23620f19f0095ab70f2a468f61e93edda200f51937631bc3ded8a0c9b0fdb | mzp/coq-for-ipad | depend.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/tools/depend.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : depend.ml 10263 2010 - 04 - 1... |
d31a626077767111a056d64c2c37630d6e46bec67b36a64d3cac13bce80611d2 | rpav/spell-and-dagger | image.lisp | ;;; Modified from the example in cl-gamekernel
(in-package :game)
(defclass image ()
(anchor quad trs))
(defmethod initialize-instance ((s image) &key key (tex 0) anchor size pos)
(with-slots (quad trs scale) s
(setf quad (cmd-quad tex :key key))
(setf trs (cmd-tf-trs :out (quad-tfm quad)
... | null | https://raw.githubusercontent.com/rpav/spell-and-dagger/0424416ff14a6758d27cc0f84c21bf85df024a7b/src/image.lisp | lisp | Modified from the example in cl-gamekernel |
(in-package :game)
(defclass image ()
(anchor quad trs))
(defmethod initialize-instance ((s image) &key key (tex 0) anchor size pos)
(with-slots (quad trs scale) s
(setf quad (cmd-quad tex :key key))
(setf trs (cmd-tf-trs :out (quad-tfm quad)
:translate pos
... |
4fe5d59113c29a4af5adc44e64e292432a96063b15b8cf240b8466cfbeb90abe | faylang/fay | Records.hs | module Compile.Records where
data R = R Int Int | S { x :: Int, y :: Int }
data T = Int :+ Int
| null | https://raw.githubusercontent.com/faylang/fay/8455d975f9f0db2ecc922410e43e484fbd134699/tests/Compile/Records.hs | haskell | module Compile.Records where
data R = R Int Int | S { x :: Int, y :: Int }
data T = Int :+ Int
| |
6fdb534387866b4c6056dd6a80ea3110354c50a86a447aae39a9c9fde7aac8cb | ghcjs/ghcjs-base | ST.hs | # LANGUAGE MagicHash , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
module JavaScript.TypedArray.ST
( {- STTypedArray(..)
, -} STInt8Array, STInt16Array, STInt32Array
, STUint8Array, STUint16Array, STUint32Array
, STFloat32Array, STFloat64Array
, STUint8ClampedArray
, leng... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/JavaScript/TypedArray/ST.hs | haskell | STTypedArray(..)
,
---------------------------------------------------------------------------
# INLINE setIndexI #
---------------------------------------------------------------------------
ST ( I.js_length x )
ST (I.js_length x)
# INLINE length #
# INLINE set # | # LANGUAGE MagicHash , MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
module JavaScript.TypedArray.ST
, STUint8Array, STUint16Array, STUint32Array
, STFloat32Array, STFloat64Array
, STUint8ClampedArray
, length
, byteLength
, byteOffset
, buffer
, subarray
) wher... |
b557322661bd98db0e7ee234fd50707e110e23bb216092ac3320badf44266beb | avsm/mirage-duniverse | ppx_enumerate.ml | open Base
open Ppxlib
open Ast_builder.Default
module List = struct
include List
All functions copied from core_list.ml ( except for [ invalid_argf ] , which is copied
from core_printf.ml .
from core_printf.ml. *)
let invalid_argf fmt = Printf.ksprintf (fun s () -> invalid_arg s) fmt
let init n ~... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/ppx_enumerate/src/ppx_enumerate.ml | ocaml | Utility functions
constrain body rather than pattern | open Base
open Ppxlib
open Ast_builder.Default
module List = struct
include List
All functions copied from core_list.ml ( except for [ invalid_argf ] , which is copied
from core_printf.ml .
from core_printf.ml. *)
let invalid_argf fmt = Printf.ksprintf (fun s () -> invalid_arg s) fmt
let init n ~... |
acde96e8077e2a1c210a6b96bda6dfae5a2481d264ab8c68e56fb94f1b574adb | WormBase/wormbase_rest | construct.clj | (ns rest-api.classes.construct
(:require
[rest-api.classes.construct.widgets.overview :as overview]
[rest-api.classes.construct.widgets.transgene :as transgene]
[rest-api.classes.construct.widgets.expression :as expression]
[rest-api.classes.construct.widgets.isolation :as isolation]
[rest-api.cla... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/construct.clj | clojure | construction details widget | (ns rest-api.classes.construct
(:require
[rest-api.classes.construct.widgets.overview :as overview]
[rest-api.classes.construct.widgets.transgene :as transgene]
[rest-api.classes.construct.widgets.expression :as expression]
[rest-api.classes.construct.widgets.isolation :as isolation]
[rest-api.cla... |
bbfa932556eae6a7c866b9d660a86e0e20ecb04da69f474e5fc2b913c826cf1f | jadeallenx/darcy | darcy_request.erl | -module(darcy_request).
-export([sign_request/5]).
-include_lib("hackney/include/hackney_lib.hrl").
%%====================================================================
%% API
%%====================================================================
Generate headers with an AWS signature version 4 for the specifie... | null | https://raw.githubusercontent.com/jadeallenx/darcy/ab9640850fdde631e6911026c3e929478b90d580/src/darcy_request.erl | erlang | ====================================================================
API
====================================================================
request.
request.
request using the specified time when generating signatures.
====================================================================
==========================... | -module(darcy_request).
-export([sign_request/5]).
-include_lib("hackney/include/hackney_lib.hrl").
Generate headers with an AWS signature version 4 for the specified
sign_request(Client, Method, URL, Headers, Body) ->
AccessKeyID = maps:get(access_key_id, Client),
SecretAccessKey = maps:get(secret_access... |
aeb4b5cbfc260ebae053d1b4e3cb2567df881fd9c1b132451c887553c68155ba | hipsleek/hipsleek | pointers.ml | #include "xdebug.cppo"
open VarGen
Translate an input program with pointer into an intermediate
input program without
@param prog current program declaration
@return new program declaration
STEP 1 ( trans_exp_ptr ): eliminate pointer type ( e.g. int * )
- translate pointers into objects : in... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/pointers.ml | ocaml | Addressable variables
List of proc that has been translated
Auxiliary procs due to translation
[int x;
...&x...
inc(x);]
==TRANSLATE==>
[int_ptr x;
...x...
inc(x.val) ==> NOT CORRECT
delete(x);]
WE SHOULD HAVE
[int_ptr x;
...x...
****aux_inc()****
int v = x.val;
inc(v);
x.val =v;
... | #include "xdebug.cppo"
open VarGen
Translate an input program with pointer into an intermediate
input program without
@param prog current program declaration
@return new program declaration
STEP 1 ( trans_exp_ptr ): eliminate pointer type ( e.g. int * )
- translate pointers into objects : in... |
fc0fd0120daad001027cf86e823d67a0858af88b4948e8345737658cab2b39ae | kach/recreational-rosette | mozart.rkt | #lang rosette
(require racket/string)
(current-bitwidth 10)
(define (chord s a t b [d "4"])
(vector s a t b d))
(define (chord-s c)
(vector-ref c 0))
(define (chord-a c)
(vector-ref c 1))
(define (chord-t c)
(vector-ref c 2))
(define (chord-b c)
(vector-ref c 3))
(define (chord-d c)
(vector-ref c 4))... | null | https://raw.githubusercontent.com/kach/recreational-rosette/797a8c462e8cdc820bd257428b195193f8bad995/music/mozart.rkt | racket | Vocal ranges, hopefully I translated them to MIDI properly...
We assume we're in C major because there already exists software to transpose
from C major to any other major key.
bass can leap freely
Avoid what my teacher calls "gladiator music".
Feel free to relax these constraints if the result is unsat!
(make-s... | #lang rosette
(require racket/string)
(current-bitwidth 10)
(define (chord s a t b [d "4"])
(vector s a t b d))
(define (chord-s c)
(vector-ref c 0))
(define (chord-a c)
(vector-ref c 1))
(define (chord-t c)
(vector-ref c 2))
(define (chord-b c)
(vector-ref c 3))
(define (chord-d c)
(vector-ref c 4))... |
11755c4bae77daef93d3311565898fc7211c6d9eb3b11fc538d65776ad8ee0d3 | JeffreyBenjaminBrown/hode | TPModify.hs | {-# LANGUAGE ScopedTypeVariables
, TupleSections #-}
# OPTIONS_GHC -fno - warn - type - defaults #
module Hode.Test.PTree.TPModify where
import qualified Test.HUnit as T
import Test.HUnit hiding (Test, test)
import Control.Lens
import qualified Data.List.PointedList as P
import ... | null | https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/hode-test/Hode/Test/PTree/TPModify.hs | haskell | # LANGUAGE ScopedTypeVariables
, TupleSections #
leaf, no focus
pitfall: reversed
Tree, no focus
Tree, focus at top
focused
focused
In these names, u=up, d=down, and otherwise n=next is implicit
In these names, u=up, d=down, and otherwise n=next is implicit | # OPTIONS_GHC -fno - warn - type - defaults #
module Hode.Test.PTree.TPModify where
import qualified Test.HUnit as T
import Test.HUnit hiding (Test, test)
import Control.Lens
import qualified Data.List.PointedList as P
import Data.Maybe
import Hode.PTree.Initial
import Ho... |
d91e560a14705f53d30f6718b4782d25e24e576f8d73b027076629b39cfef69d | OCamlPro/drom | gsl_functions.ml | include Gsl_functions_functor.Apply (Gsl_functions_stubs)
| null | https://raw.githubusercontent.com/OCamlPro/drom/dbbb5f9225df65c589e6f307ac28be4c408b9cae/src/drom_lib/share/drom/skeletons/packages/ctypes_lib_stubs/bindings/gsl_functions.ml | ocaml | include Gsl_functions_functor.Apply (Gsl_functions_stubs)
| |
ac4fa65ec4915783a128f9a6e327fe9af5a4d6d3f34106e9a15349ade121c8d0 | geneweb/geneweb | consangAll.mli | Copyright ( c ) 2006 - 2007 INRIA
open Gwdb
val compute : ?verbosity:int -> base -> bool -> bool
* [ compute base from_scratch ]
[ ? verbosity ] may be 0 , 1 or 2 ( default is 2 )
Compute consanguinity for each person in the base . If [ from_scratch ] is set then recompute
consanguinity for entire... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/core/consangAll.mli | ocaml | Copyright ( c ) 2006 - 2007 INRIA
open Gwdb
val compute : ?verbosity:int -> base -> bool -> bool
* [ compute base from_scratch ]
[ ? verbosity ] may be 0 , 1 or 2 ( default is 2 )
Compute consanguinity for each person in the base . If [ from_scratch ] is set then recompute
consanguinity for entire... | |
0f757d106ecb5a82062d5b7203bc2bf43b307aeb28ebd767b0b914255baeff9c | kevinlynx/dhtcrawler | db_store.erl | %%
%% db_store.erl
%% 06.15.2013
%%
-module(db_store).
-export([init/2,
insert/5,
build_substr_index/1,
search_from_index/2,
search/2]).
-compile(export_all).
-define(DBNAME, "torrents").
-define(SEARCH_DESIGN, "searchname").
-define(SEARCH_DOCID, list_to_binary("_design/"++?SEARCH_DESIGN)).... | null | https://raw.githubusercontent.com/kevinlynx/dhtcrawler/b8a486dbebb57f9672a773a6901d59ddae97a278/src/db_store.erl | erlang |
db_store.erl
06.15.2013
NOTE: not implemented
{multi,Hash, {"this movie update name",
Files: [{Name, Length}, {Name, Length}] or [] |
-module(db_store).
-export([init/2,
insert/5,
build_substr_index/1,
search_from_index/2,
search/2]).
-compile(export_all).
-define(DBNAME, "torrents").
-define(SEARCH_DESIGN, "searchname").
-define(SEARCH_DOCID, list_to_binary("_design/"++?SEARCH_DESIGN)).
-define(SEARCH_VIEW, "search").
-d... |
71f580e27f590ab01230468b5885f4e296b7afbed107db766c42cc4b84d1a147 | dparis/gen-phzr | gamepad.cljs | (ns phzr.gamepad
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->Gamepad
"The Gamepad class handles gamepad input and dispatches gamepad events.
Remember to call `gamepad.start()`.
HTML5 GAMEPAD API SUPPORT IS AT AN... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/gamepad.cljs | clojure | (ns phzr.gamepad
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->Gamepad
"The Gamepad class handles gamepad input and dispatches gamepad events.
Remember to call `gamepad.start()`.
HTML5 GAMEPAD API SUPPORT IS AT AN... | |
1a5c6180145c01a4adff71c0c9b2acd507d4d7f58e5719a7417ca21faaaffa7b | rems-project/cerberus | pgraph.mli | type vertex_id = int
type edge_id = int
type ('v, 'e) graph
val empty: ('v, 'e) graph
val is_empty: ('v, 'e) graph -> bool
val add_vertex: 'v -> ('v, 'e) graph -> vertex_id * ('v, 'e) graph
(* it throws an exception if vertices are not in the graph *)
val add_edge: vertex_id -> vertex_id -> 'e -> ('v, 'e) graph -> e... | null | https://raw.githubusercontent.com/rems-project/cerberus/124c93f10cb4c235f6396adec82ebf9563daeb7e/backend/absint/src/pgraph.mli | ocaml | it throws an exception if vertices are not in the graph
returns none if graph contains a cycle
strongly connected components
weak topological ordering | type vertex_id = int
type edge_id = int
type ('v, 'e) graph
val empty: ('v, 'e) graph
val is_empty: ('v, 'e) graph -> bool
val add_vertex: 'v -> ('v, 'e) graph -> vertex_id * ('v, 'e) graph
val add_edge: vertex_id -> vertex_id -> 'e -> ('v, 'e) graph -> edge_id * ('v, 'e) graph
val update_vertex: vertex_id -> ('v -... |
5d52ff00189e6eec4d0069274e22eca0e55ce008a65e7543f5fa62ca33995c5c | aeternity/aeternity | aens_revoke_tx.erl | %%%=============================================================================
( C ) 2018 , Aeternity Anstalt
%%% @doc
%%% Module defining the Naming System revoke transaction
%%% @end
%%%=============================================================================
-module(aens_revoke_tx).
-behavior(aetx).
%%... | null | https://raw.githubusercontent.com/aeternity/aeternity/f92daa4bf386f84cbfde7d1b91ea8082b7af0b16/apps/aens/src/aens_revoke_tx.erl | erlang | =============================================================================
@doc
Module defining the Naming System revoke transaction
@end
=============================================================================
Behavior API
===================================================================
Types
======... | ( C ) 2018 , Aeternity Anstalt
-module(aens_revoke_tx).
-behavior(aetx).
-export([new/1,
type/0,
fee/1,
gas/1,
ttl/1,
nonce/1,
origin/1,
check/3,
process/3,
signers/2,
version/1,
serialization_template/1,
se... |
9a582c99c485709175b2afea877b07ea803585fd5ba5d011fb49ea9fac2c79a7 | mbutterick/aoc-racket | input.rkt | #lang reader "lang.rkt"
3017957 | null | https://raw.githubusercontent.com/mbutterick/aoc-racket/2c6cb2f3ad876a91a82f33ce12844f7758b969d6/2016/day19/input.rkt | racket | #lang reader "lang.rkt"
3017957 | |
1593f184bdcb2654a2a956c98a136b25ada49064721608da8832dd552020d627 | ogaml/ogaml | mouse.ml | open OgamlCore
let position () =
LL.Mouse.position ()
let relative_position win =
LL.Mouse.relative_position (Window.internal win)
let set_position a =
LL.Mouse.set_position a
let set_relative_position win a =
LL.Mouse.set_relative_position (Window.internal win) a
let is_pressed b =
LL.Mouse.is_pres... | null | https://raw.githubusercontent.com/ogaml/ogaml/5e74597521abf7ba2833a9247e55780eabfbab78/src/graphics/window/mouse.ml | ocaml | open OgamlCore
let position () =
LL.Mouse.position ()
let relative_position win =
LL.Mouse.relative_position (Window.internal win)
let set_position a =
LL.Mouse.set_position a
let set_relative_position win a =
LL.Mouse.set_relative_position (Window.internal win) a
let is_pressed b =
LL.Mouse.is_pres... | |
52c57050629373f057feba9e586c41c4cf8e803d9bf0aafb0286878ea3fd2b63 | janestreet/async | test_low_latency_transport_read_one_message_bin_prot_without_buffering.ml | open! Core
open! Async
open! Import
let max_message_size = 1024 * 1024
type t =
{ reader : Rpc.Low_latency_transport.Reader.With_internal_reader.t
; writer : Rpc.Low_latency_transport.Writer.t
; async_reader : Reader.t
}
let setup () =
let%bind `Reader read_fd, `Writer write_fd =
Unix.pipe (Info.of_str... | null | https://raw.githubusercontent.com/janestreet/async/56d8d18f61e010fbb975ce3c6df2ab4cc86f6543/async_rpc/test/test_low_latency_transport_read_one_message_bin_prot_without_buffering.ml | ocaml | open! Core
open! Async
open! Import
let max_message_size = 1024 * 1024
type t =
{ reader : Rpc.Low_latency_transport.Reader.With_internal_reader.t
; writer : Rpc.Low_latency_transport.Writer.t
; async_reader : Reader.t
}
let setup () =
let%bind `Reader read_fd, `Writer write_fd =
Unix.pipe (Info.of_str... | |
363cf48e0a1f87dcb219df33890aa988986494b0de1e938d18329fbf4967dda1 | coq-community/aac-tactics | helper.mli | (***************************************************************************)
(* This is part of aac_tactics, it is distributed under the terms of the *)
(* GNU Lesser General Public License version 3 *)
(* (see file LICENSE for more details) *)
(* ... | null | https://raw.githubusercontent.com/coq-community/aac-tactics/7d2830b3e86415ae3d786bdf06b445bb823bf034/src/helper.mli | ocaml | *************************************************************************
This is part of aac_tactics, it is distributed under the terms of the
GNU Lesser General Public License version 3
(see file LICENSE for more details)
... | Copyright 2009 - 2010 : , .
module type CONTROL =
sig
val debug : bool
val time : bool
val printing : bool
end
module Debug :
functor (X : CONTROL) ->
sig
val debug : string -> unit
val debug_exception : string -> exn -> unit
val time :
('a -> 'b) -> '... |
6b636fb2d96432411042eb762c96b8760e30d4a7b856dcaa268267273c841216 | b0-system/b0caml | pkg.ml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let () =
Pkg.describe "b0caml" @@ fun c ->
Ok [ Pkg.mllib "src/b0caml.mllib";
Pkg.bin "src/b0caml_main" ~dst:"b0caml";
Pkg.doc "doc/index.mld" ~dst:"odoc-pages/index.mld";
Pkg.doc "doc/manual.mld" ~dst:"odoc-pages/manual.mld";
... | null | https://raw.githubusercontent.com/b0-system/b0caml/38d212b61a8080fd8177ab8604c00ec4f5fa599e/pkg/pkg.ml | ocaml | #!/usr/bin/env ocaml
#use "topfind"
#require "topkg"
open Topkg
let () =
Pkg.describe "b0caml" @@ fun c ->
Ok [ Pkg.mllib "src/b0caml.mllib";
Pkg.bin "src/b0caml_main" ~dst:"b0caml";
Pkg.doc "doc/index.mld" ~dst:"odoc-pages/index.mld";
Pkg.doc "doc/manual.mld" ~dst:"odoc-pages/manual.mld";
... | |
d0c71762f60e4f5493a1221634d5f2b1de6b271b4dd47d0d6de4fb3659ce8760 | xvw/preface | joker.ml | module To_bifunctor (F : Preface_specs.Functor.CORE) =
Bifunctor.Via_bimap (struct
type ('a, 'b) t = 'b F.t
let bimap _ f x = F.map f x
end)
module To_profunctor (F : Preface_specs.Functor.CORE) =
Profunctor.Via_dimap (struct
type ('a, 'b) t = 'b F.t
let dimap _ f x = F.map f x
end)
| null | https://raw.githubusercontent.com/xvw/preface/8b0154ba20cf46fbd58eb7df707b874504070938/lib/preface_make/joker.ml | ocaml | module To_bifunctor (F : Preface_specs.Functor.CORE) =
Bifunctor.Via_bimap (struct
type ('a, 'b) t = 'b F.t
let bimap _ f x = F.map f x
end)
module To_profunctor (F : Preface_specs.Functor.CORE) =
Profunctor.Via_dimap (struct
type ('a, 'b) t = 'b F.t
let dimap _ f x = F.map f x
end)
| |
e647acdd8807abb97ccb7b7a69f1a0d196b2bcb830fc214d9499c1131b71c38d | jeromesimeon/Galax | factorize_tpnf.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/factorization/factorize_tpnf.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : factorize_tpnf.ml , v 1.16 2007/02/01 22:08:46 simeon Exp $
Module : Factorize_tpnf
Description :
This module is a factorization plugin for the TPNF approach
for normalizing XQuery Core expressions .
--
D... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.