_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 |
|---|---|---|---|---|---|---|---|---|
3a45d5ce4f4542bfe764be40b4aeff6e02389855ee84abc9b824038d094fdd3a | nickmi11er/tinkoff-invest-haskell | Helpers.hs | # LANGUAGE TupleSections #
module Invest.Client.Helpers (
runGrpc
, runUnary
, runUnary_
, GrpcIO
, GrpcClient
, (<#>), (#>>), (#>)
, ChanFlow(..)
) where
import Control.Exception (Exception, IOException,
SomeException (Som... | null | https://raw.githubusercontent.com/nickmi11er/tinkoff-invest-haskell/043c9fa096aa50cc9bf6ae75ac84a80c31e1c7ff/sdk/src/Invest/Client/Helpers.hs | haskell | # LANGUAGE TupleSections #
module Invest.Client.Helpers (
runGrpc
, runUnary
, runUnary_
, GrpcIO
, GrpcClient
, (<#>), (#>>), (#>)
, ChanFlow(..)
) where
import Control.Exception (Exception, IOException,
SomeException (Som... | |
ac3c2e8229fc025876261b9c515f7cec260de501e82c582780abd625f33a1a6b | awakesecurity/proto3-suite | Lens.hs | {-# LANGUAGE TemplateHaskell #-}
module Proto3.Suite.DotProto.AST.Lens where
import Control.Lens.TH
import Proto3.Suite.DotProto.AST
makePrisms ''DotProtoDefinition
makePrisms ''DotProtoMessagePart
| null | https://raw.githubusercontent.com/awakesecurity/proto3-suite/489d5a3450411ebb9cf0ce7c0854b1c3f2f9eb69/src/Proto3/Suite/DotProto/AST/Lens.hs | haskell | # LANGUAGE TemplateHaskell # | module Proto3.Suite.DotProto.AST.Lens where
import Control.Lens.TH
import Proto3.Suite.DotProto.AST
makePrisms ''DotProtoDefinition
makePrisms ''DotProtoMessagePart
|
b4000efb4b63a7a9d014ef66a58a8db82eeea3f63162c9e67affa674e8e28779 | vbmithr/ocaml-ledger-wallet | ledgerwallet_ssh_agent.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2017 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2017 Vincent Bernar... | null | https://raw.githubusercontent.com/vbmithr/ocaml-ledger-wallet/9a21b74f3066bca48f7aef1a194ed8fe6496db78/src/ledgerwallet_ssh_agent.ml | ocaml | ---------------------------------------------------------------------------
Copyright ( c ) 2017 . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2017 Vincent Bernar... | |
eb8289503d390f2a376e9a110ebf69df4a4c4502ac881e021e34a5f1a91d6b44 | Yleisradio/relastic | test_helpers.clj | (ns relastic.test-helpers
(:require [clojure.test :refer :all]
[clojurewerkz.elastisch.rest.index :as esi]
[clojurewerkz.elastisch.rest.document :as esd]
[clojurewerkz.elastisch.query :as q]
[clojurewerkz.elastisch.rest :as elastisch]
[clojurewerkz.elastisch... | null | https://raw.githubusercontent.com/Yleisradio/relastic/4d5f65b8c203f873caa270fa78097dd5ca23bd60/test/relastic/test_helpers.clj | clojure | (ns relastic.test-helpers
(:require [clojure.test :refer :all]
[clojurewerkz.elastisch.rest.index :as esi]
[clojurewerkz.elastisch.rest.document :as esd]
[clojurewerkz.elastisch.query :as q]
[clojurewerkz.elastisch.rest :as elastisch]
[clojurewerkz.elastisch... | |
e2c65d0741327840f147baa6ceeb6bf52a4966b31a04aff5c60dd84b0f462a6c | bmeurer/ocaml-experimental | searchpos.mli | (*************************************************************************)
(* *)
(* Objective Caml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/bmeurer/ocaml-experimental/fe5c10cdb0499e43af4b08f35a3248e5c1a8b541/otherlibs/labltk/browser/searchpos.mli | ocaml | ***********************************************************************
Objective Caml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ Id$
open Widget
val top_widgets ... |
c0fd28bef6a128a3a22a3590a282c3b91e4a472683882e22ec0f2e9be946b00c | yzh44yzh/practical_erlang | my_crypt_sup.erl | -module(my_crypt_sup).
-behaviour(supervisor).
-export([start_link/0, init/1]).
-include("otp_types.hrl").
-spec(start_link() -> {ok, pid()}).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-spec(init(gs_args()) -> sup_init_reply()).
init(_Args) ->
SupervisorSpecification =
#... | null | https://raw.githubusercontent.com/yzh44yzh/practical_erlang/c9eec8cf44e152bf50d9bc6d5cb87fee4764f609/14_otp_project/solution/src/my_crypt_sup.erl | erlang | one_for_one | one_for_all | rest_for_one
max restarts
in period of time
permanent | transient | temporary
milliseconds | brutal_kill | infinity
worker | supervisor | -module(my_crypt_sup).
-behaviour(supervisor).
-export([start_link/0, init/1]).
-include("otp_types.hrl").
-spec(start_link() -> {ok, pid()}).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-spec(init(gs_args()) -> sup_init_reply()).
init(_Args) ->
SupervisorSpecification =
... |
7a755ef4d16442061f595f127b138a94a183513884d0402b5bcf20aeb253b5dc | tomhanika/conexp-clj | incomplete_contexts.clj | ;; Copyright ⓒ the conexp-clj developers; all rights reserved.
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bou... | null | https://raw.githubusercontent.com/tomhanika/conexp-clj/9f53c71913fa39b95516c388d9e426bec34e3a77/src/main/clojure/conexp/io/incomplete_contexts.clj | clojure | Copyright ⓒ the conexp-clj developers; all rights reserved.
The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not re... | Eclipse Public License 1.0 ( -1.0.php )
(ns conexp.io.incomplete-contexts
"Implements IO for Incomplete Contexts."
(:require
[conexp.base :refer [defalias illegal-argument unsupported-operation set-of]]
[conexp.fca.incomplete-contexts.incomplete-contexts :refer :all]
[conexp.fca.incomplete-contexts.con... |
78379e718578f79f0d796dc1dd65f6328e8133a9734b73e48ab63692023f9603 | jordanthayer/ocaml-search | explicit_graph.ml | (** The basic structure of the graph *)
type node = {
id : int;
mutable neighbors : (node * float) list;
}
type graph = {
seed : int;
nodes : node array;
}
(**************************************************************************)
let node_to_string n =
(** Converts a node [n] into a string representat... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/synthetic_graph/explicit_graph.ml | ocaml | * The basic structure of the graph
************************************************************************
* Converts a node [n] into a string representation of n
* Converts a graph [g] to a string
*********************** Testing Code **********************************
* builds a fully connected graph of size n |
type node = {
id : int;
mutable neighbors : (node * float) list;
}
type graph = {
seed : int;
nodes : node array;
}
let node_to_string n =
let delim = " " in
let rec neighbor_string cur nbrs =
match nbrs with
[] -> cur
| (hd,_)::tl -> neighbor_string
(cur ^ delim ^ string_of_int hd.id) tl... |
d07f03bd6cfab2eb5b96551ea31c48ef87d2859bde3af468bb376fe19fb70d26 | TomLisankie/Learning-Lisp | aoc-2018-1b.lisp | (defun open-file (file-name)
"Dumps contents of a text file into a list."
(with-open-file (file-stream file-name)
(loop for line = (read-line file-stream nil)
while line
collect line)))
(defun find-first-duplicate (list-from-file)
"Takes a list containing string representations of integers a... | null | https://raw.githubusercontent.com/TomLisankie/Learning-Lisp/27f9843cbb0c325a6531fd1332c6f19bebfe5a4d/code/Dec2018/9/aoc-2018-1b.lisp | lisp | (defun open-file (file-name)
"Dumps contents of a text file into a list."
(with-open-file (file-stream file-name)
(loop for line = (read-line file-stream nil)
while line
collect line)))
(defun find-first-duplicate (list-from-file)
"Takes a list containing string representations of integers a... | |
624b08eb2994d6cfb8b9080a3a1d6ba05463df8a4a197fe7b14f0c4e1a3b3d1f | supki/liblastfm | User.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
-- | Lastfm user API
--
-- This module is intended to be imported qualified:
--
-- @
-- import qualified Lastfm.User as User
-- @
module Lastfm.User
( getArtistTracks, getBannedTracks, getEvents, getFriends
, getInfo, getLovedTracks, getNeig... | null | https://raw.githubusercontent.com/supki/liblastfm/754be163c4ce14c9b4819f1359b5f95a0f91a29d/src/Lastfm/User.hs | haskell | # LANGUAGE OverloadedStrings #
| Lastfm user API
This module is intended to be imported qualified:
@
import qualified Lastfm.User as User
@
| Get a list of tracks by a given artist scrobbled by this user
, including scrobble time. Can be limited to specific timeranges, defaults to all time.
<>
| Returns th... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
module Lastfm.User
( getArtistTracks, getBannedTracks, getEvents, getFriends
, getInfo, getLovedTracks, getNeighbours, getNewReleases
, getPastEvents, getPersonalTags, getPlaylists, getRecentStations
, getRecentTracks, getRecommendedArtists, getRecommendedEvents
, getSh... |
8e0bdf61a3b3a3f22021cbd9601864ba6abc028ab531db3df34850ce7c1b60a6 | johnlawrenceaspden/hobby-code | travellingsalesman.clj | On the Travelling of Salesmen
Four vertices , 1 , 2 , 3 , 4
(def vertexset #{1,2,3,4})
Leads to 6 edges in the complete graph
(def edgeset {[1 2] 2, [1 3] 4, [1 4] 5, [2 3] 2, [2 4] 3, [3 4] 4})
;; Which we can represent as a distance function
(defn make-d [edgeset]
(fn [a b] (or (edgeset [a b]) (edgese... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/travellingsalesman.clj | clojure | Which we can represent as a distance function
Have we got them all?
A tour in such a graph is a permutation of the list of vertices
Which represents a traversal of selected edges in a cycle
And such tours have an associated cost:
In this case it appears that 1 2 3 4 is a minimal cost tour.
Behold, I have solved... | On the Travelling of Salesmen
Four vertices , 1 , 2 , 3 , 4
(def vertexset #{1,2,3,4})
Leads to 6 edges in the complete graph
(def edgeset {[1 2] 2, [1 3] 4, [1 4] 5, [2 3] 2, [2 4] 3, [3 4] 4})
(defn make-d [edgeset]
(fn [a b] (or (edgeset [a b]) (edgeset [b a]))))
(for [a vertexset b (disj vertexset ... |
c5671550f892b916776760705dcc3149f8b8c565c667556b51d7e6264a501f57 | bvaugon/ocapic | thermostat.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/thermostat2/thermostat.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Pic
module Disp = Lcd.Connect (
struct
let bus_size = Lcd.Eight
let e = LATC5
let rs = LATD3
let rw = LATC4
let bus = PORTB
end
)
type button = Number o... |
cc5f1a78b3a8433afff8cc20b3e304d4f93e9d302de450bd34a3dc0e3e10ece6 | binaryage/chromex | cookies.clj | (ns chromex.ext.cookies
"Use the chrome.cookies API to query and modify cookies, and to be notified when they change.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen ... | null | https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/cookies.clj | clojure | may overwrite equivalent cookies if they exist.
-- events -----------------------------------------------------------------------------------------------------------------
docs: /#tapping-events
-- convenience ---------------------------------------------------------------------------------------------------------... | (ns chromex.ext.cookies
"Use the chrome.cookies API to query and modify cookies, and to be notified when they change.
* available since Chrome 36
* "
(:refer-clojure :only [defmacro defn apply declare meta let partial])
(:require [chromex.wrapgen :refer [gen-wrap-helper]]
[chromex.callgen ... |
d3f2c14c04ebd126984a503ff4a1476325e679281647b3acdda5e66768ede43a | avsm/platform | opamDirTrack.ml | (**************************************************************************)
(* *)
(* Copyright 2016 OCamlPro *)
(* *)
(* All righ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/core/opamDirTrack.ml | ocaml | ************************************************************************
Copyright 2016 OCamlPro
All rights reserved. This ... | GNU Lesser General Public License version 2.1 , with the special
open OpamCompat
open OpamStd.Op
open OpamProcess.Job.Op
let log ?level fmt = OpamConsole.log ?level "TRACK" fmt
let slog = OpamConsole.slog
module SM = OpamStd.String.Map
type digest = string
let digest_of_string dg = dg
let string_of_diges... |
27952a9f1c8766a1cf041d88c6a3f9c75843612d6ccc08dd7c27ef7b7d307e32 | dparis/gen-phzr | debug.cljs | (ns phzr.utils.debug
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [key]))
(defn ->Debug
"A collection of methods for displaying debug information about game objects.
If your game is running in WebGL... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/utils/debug.cljs | clojure | (ns phzr.utils.debug
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser])
(:refer-clojure :exclude [key]))
(defn ->Debug
"A collection of methods for displaying debug information about game objects.
If your game is running in WebGL... | |
714f1e15ecfeb7f99324ea0366bb6bbfb57ae8a9d4f72a159c3f10bf511503e4 | techascent/tvm-clj | te.clj | (ns tvm-clj.impl.fns.te
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "te") | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/te.clj | clojure | (ns tvm-clj.impl.fns.te
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "te") | |
d18f3b1e1c5f6d3c07fce4145bad047fdf4524bda8481f91b5054fc4092ecca4 | mirage/mirage-clock | mclock.mli |
* Copyright ( c ) 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 copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTH... | null | https://raw.githubusercontent.com/mirage/mirage-clock/74a02c9df3770bcd9d704c39cc6582b11f80e551/unix/mclock.mli | ocaml |
* Copyright ( c ) 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 copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTH... | |
1cb2416e88f06026edc17ee8eacebb67b9cdde69bc3e20ff79d5f26f792c335e | tweag/ormolu | foreign-export-out.hs | foreign export ccall foo :: Int -> IO Int
-- | 'foreignTomFun' is a very important thing
foreign export ccall "tomography"
foreignTomFun ::
StablePtr Storage {- Storage is bad -} -> TomForegin
foreign export {- We can't use capi here -} ccall "dynamic"
export_nullaryMeth :: (IO HRESULT) -> IO (Ptr ())
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/foreign/foreign-export-out.hs | haskell | | 'foreignTomFun' is a very important thing
Storage is bad
We can't use capi here | foreign export ccall foo :: Int -> IO Int
foreign export ccall "tomography"
foreignTomFun ::
export_nullaryMeth :: (IO HRESULT) -> IO (Ptr ())
|
6cbe03b635981205de8fd677c13eddb0fcf3d1b45d09f95aaf544beb231b8400 | clash-lang/clash-compiler | NewType.hs | # LANGUAGE DataKinds #
Issue # 359 :
module NewType where
import Clash.Prelude
newtype Circuit a b c d = Circuit ((a,b) -> (c, d))
topEntity
:: Clock System
-> Reset System
-> Circuit (Signal System Int) () () (Signal System Int)
topEntity c r = withClockReset c r $ Circuit $ \(i,()) -> ((), reg... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/SynthesisAttributes/NewType.hs | haskell | # LANGUAGE DataKinds #
Issue # 359 :
module NewType where
import Clash.Prelude
newtype Circuit a b c d = Circuit ((a,b) -> (c, d))
topEntity
:: Clock System
-> Reset System
-> Circuit (Signal System Int) () () (Signal System Int)
topEntity c r = withClockReset c r $ Circuit $ \(i,()) -> ((), reg... | |
a227d810457685ae1591bee17df983eae0fc5d55e89c1b38adc4906ffc494674 | talex5/mirage-trace-viewer | mtv_render.ml | Copyright ( C ) 2014 ,
module type CANVAS = sig
type context
type text_extents = {
x_bearing : float;
y_bearing : float;
width : float;
height : float;
x_advance : float;
y_advance : float;
}
val set_line_width : context -> float -> unit
val set_source_rgb : context -> r:float -... | null | https://raw.githubusercontent.com/talex5/mirage-trace-viewer/f3b5abcf013e7601638e1c4f036f35f9c15caeec/lib/mtv_render.ml | ocaml | Find a place to put the label for the next stat line, ideally close to y.
* Draw [msg] in the area (min_x, max_x) and ideally centred at [x].
Desired start for centred text
Doesn't fit. Draw as much as we can.
Show label on left margin if the thread starts off-screen
Note: switching drawing colours is really ... | Copyright ( C ) 2014 ,
module type CANVAS = sig
type context
type text_extents = {
x_bearing : float;
y_bearing : float;
width : float;
height : float;
x_advance : float;
y_advance : float;
}
val set_line_width : context -> float -> unit
val set_source_rgb : context -> r:float -... |
066b4585ceefaabe602cc09c4b28d178793c5fda5e3d1ad5d1b371aeb5835eec | nklein/cl-reactive | apply-t.lisp | ;;;; apply-t.lisp
(in-package #:cl-reactive/tests)
(nst:def-test-group apply-tests ()
(nst:def-test simple-apply-test (:equal 5)
(signal-let ((sig-x 3 :type integer)
(sig-y 4 :type integer))
(flet ((hypotenuse (a b)
(values (round (sqrt (+ (* a a) (* b b)))))))
(wit... | null | https://raw.githubusercontent.com/nklein/cl-reactive/e322391f553989add18e6755e810351085c28197/src/apply-t.lisp | lisp | apply-t.lisp |
(in-package #:cl-reactive/tests)
(nst:def-test-group apply-tests ()
(nst:def-test simple-apply-test (:equal 5)
(signal-let ((sig-x 3 :type integer)
(sig-y 4 :type integer))
(flet ((hypotenuse (a b)
(values (round (sqrt (+ (* a a) (* b b)))))))
(with-signal-values ((... |
fcac4608d54fc8236251cbaa60ac0867e8e19c57f77da9f2912da74704f97698 | nasa/Common-Metadata-Repository | caching.clj | (ns cmr.authz.components.caching
(:require
[clojure.core.cache :as cache]
[clojure.java.io :as io]
[cmr.authz.components.config :as config]
[com.stuartsierra.component :as component]
[taoensso.timbre :as log]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Support /... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/authz/src/cmr/authz/components/caching.clj | clojure |
; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
Caching Component API ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Component Lifecycle Implementation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Component Constructor ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
| (ns cmr.authz.components.caching
(:require
[clojure.core.cache :as cache]
[clojure.java.io :as io]
[cmr.authz.components.config :as config]
[com.stuartsierra.component :as component]
[taoensso.timbre :as log]))
(defn load-cache
[system]
(if-let [sys system]
(if-let [filename (config/cache-dum... |
8e4a8d61de45b5283a0d452efd1e669ec0e140f5c2e7d1ec133788d79467bbc0 | tisnik/clojure-examples | project.clj | ;
( C ) Copyright 2021
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(defproject vector1 "0.1.0-SNAPSHOT"
:des... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/1350d206ec6702248a560a6c9569d2128de2da60/vector1/project.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2021
-v10.html
(defproject vector1 "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[net.mikera/core.matrix "0.34.0"]]
:plug... |
270572aee44263ae320719d18647d76a997908a41aca819a825433bf839c035d | takikawa/tr-pfds | leftist.rkt | #lang typed/racket
(provide (rename-out [heap-map map]
[heap-ormap ormap] [heap-andmap andmap])
fold filter remove Heap
heap merge insert find-min/max delete-min/max sorted-list
build-heap)
(struct: (A) Tree ([rank : Integer]
[elem : A]
... | null | https://raw.githubusercontent.com/takikawa/tr-pfds/a08810bdfc760bb9ed68d08ea222a59135d9a203/pfds/heap/leftist.rkt | racket | An empty heap
Returns the rank of the heap
Checks for empty heap
Inserts an element into the heap
Helper for merge
Returns a sorted list
similar to list filter function
similar to list remove function
similar to list map function. apply is expensive so using case-lambda
in order to saperate the more common c... | #lang typed/racket
(provide (rename-out [heap-map map]
[heap-ormap ormap] [heap-andmap andmap])
fold filter remove Heap
heap merge insert find-min/max delete-min/max sorted-list
build-heap)
(struct: (A) Tree ([rank : Integer]
[elem : A]
... |
b68350f5288e7d4cc8da2587a691847bf8eca5bd8ca9c379069948356eae3637 | spell-music/csound-expression | Layout.hs | -- | The functions from this module specify the geometry
-- of the GUI-elements. They tell where to render the elements.
--
-- Every element is rectangular. To know where to place the element is
-- to know the parameters of the bounding rectangle. All rectangles are
-- relative and automatically aligned.
--
We hav... | null | https://raw.githubusercontent.com/spell-music/csound-expression/29c1611172153347b16d0b6b133e4db61a7218d5/csound-expression/src/Csound/Control/Gui/Layout.hs | haskell | | The functions from this module specify the geometry
of the GUI-elements. They tell where to render the elements.
Every element is rectangular. To know where to place the element is
to know the parameters of the bounding rectangle. All rectangles are
relative and automatically aligned.
groups of the element... | We have two functions for grouping . They construct horizontal and vertical
of the rectangles ( by scaling one side of the rectangle ) . In place of rectangle
module Csound.Control.Gui.Layout (
hor, ver, space, sca, horSca, verSca, grid,
padding, margin, ScaleFactor, resizeGui,
) where
import Csound.Typed.... |
9c8d54e27ebc2ed0a83efe7de17a0be5b18e3f069f631582181180f2202f7fbe | onaio/hatti | chart_test.cljs | (ns hatti.views.chart-test
(:require-macros [cljs.test :refer (is deftest testing)]
[dommy.core :refer [sel sel1]])
(:require [cljs.test :as t]
[cljs.core.async :refer [<! chan put!]]
[dommy.core :as dommy]
[hatti.shared :as shared]
[hatti.views :re... | null | https://raw.githubusercontent.com/onaio/hatti/7dc23c1c60b9fc46e1ff5b023eb6c794ebd04773/test/hatti/views/chart_test.cljs | clojure | CHART COMPONENT HELPERS
COMPONENT TESTS
Rest of the items should be horizontal chart | (ns hatti.views.chart-test
(:require-macros [cljs.test :refer (is deftest testing)]
[dommy.core :refer [sel sel1]])
(:require [cljs.test :as t]
[cljs.core.async :refer [<! chan put!]]
[dommy.core :as dommy]
[hatti.shared :as shared]
[hatti.views :re... |
37495fdabee787c5f5b267a3bdeeb0f2ddf943b46915689e4cc00bafe0fc7971 | na4zagin3/satyrographos | template_docMake_en.ml |
SPDX - License - Identifier : CC0 - 1.0
SPDX-License-Identifier: CC0-1.0
*)
let name = "[experimental]doc-make@en"
let local_satyh_template =
"local.satyh",
{|% This is a file for local function/command definitions
@require: code
@require: math
let-block ctx +frame content =
let pads = (10pt, 10pt, 10pt... | null | https://raw.githubusercontent.com/na4zagin3/satyrographos/9dbccf05138510c977a67c859bbbb48755470c7f/src/template/template_docMake_en.ml | ocaml |
SPDX - License - Identifier : CC0 - 1.0
SPDX-License-Identifier: CC0-1.0
*)
let name = "[experimental]doc-make@en"
let local_satyh_template =
"local.satyh",
{|% This is a file for local function/command definitions
@require: code
@require: math
let-block ctx +frame content =
let pads = (10pt, 10pt, 10pt... | |
f226231447a7c9daeb279a4698ee0f2dfe2b14ce7c1c830bad8e762cdf744e02 | default-kramer/fission-flare | graphics.rkt | #lang racket/gui
(provide frame->pict state->pict cell-size)
(require pict
"util.rkt"
"setup-panel.rkt"
"occupant-picts.rkt"
"../core.rkt")
; Using `scale` or `rotate` sometimes introduces unwanted artifacts.
; So instead, this parameter controls the desired pixel count (height an... | null | https://raw.githubusercontent.com/default-kramer/fission-flare/80d8e0649a6088912da257a59ffd82b361acab98/src/ui/graphics.rkt | racket | Using `scale` or `rotate` sometimes introduces unwanted artifacts.
So instead, this parameter controls the desired pixel count (height and width)
of a single cell:
The viewmodel contains the state and all extra information that we need to draw.
Burst factor is used to scale the size of blanks being bursted.
Fast ... | #lang racket/gui
(provide frame->pict state->pict cell-size)
(require pict
"util.rkt"
"setup-panel.rkt"
"occupant-picts.rkt"
"../core.rkt")
(define cell-size (make-parameter 30))
Commonly abbreviated ` vm ` in this file .
(struct viewmodel (state
Should be a number between 0 ... |
8ae22c76f9ef81d8657fc143a8024c5d01516c175729afd4bfb86758dea91253 | SnootyMonkey/Falkland-CMS | collection_resource.clj | (ns fcms.resources.collection-resource
"Collection resources are either taxonomies or items, and are stored in a particular collection."
(:require [clojure.set :refer (intersection)]
[clojure.string :refer (blank?)]
[clojure.walk :refer (keywordize-keys)]
[com.ashafa.clutch :as c... | null | https://raw.githubusercontent.com/SnootyMonkey/Falkland-CMS/bd653c23dd458609b652dfac3f0f2f11526f00d1/src/fcms/resources/collection_resource.clj | clojure | (ns fcms.resources.collection-resource
"Collection resources are either taxonomies or items, and are stored in a particular collection."
(:require [clojure.set :refer (intersection)]
[clojure.string :refer (blank?)]
[clojure.walk :refer (keywordize-keys)]
[com.ashafa.clutch :as c... | |
8c8436c6160fc5afda58fb3f27c39e2212fd4ed53e335f33296cec91ed8b05a6 | morgenthum/lambda-heights | Main.hs | # LANGUAGE TemplateHaskell #
module Main where
import Data.FileEmbed
import qualified LambdaHeights.Game as Game
import LambdaHeights.Types.Config
import qualified SDL.Font as SDLF
main :: IO ()
main = do
Game.init
config <- Config <$> highSchoolUSASansFont 28 <*> retroGamingFont 11
Game.start config
Game.de... | null | https://raw.githubusercontent.com/morgenthum/lambda-heights/0a86ead23e8c223ba2672fa314666a06eb669fe2/lambda-heights-app/src/Main.hs | haskell | # LANGUAGE TemplateHaskell #
module Main where
import Data.FileEmbed
import qualified LambdaHeights.Game as Game
import LambdaHeights.Types.Config
import qualified SDL.Font as SDLF
main :: IO ()
main = do
Game.init
config <- Config <$> highSchoolUSASansFont 28 <*> retroGamingFont 11
Game.start config
Game.de... | |
a29b008244a11acfd53c490a1bfcb9a27c06afe3e0a97f7d5a5f89fee739fec0 | chlorinejs/chlorine | js.clj | (ns chlorine.js
(:require [clojure.string :as str]
[hiccup.core]
[clojure.walk])
(:use [chlorine.reader]
[slingshot.slingshot]
[pathetic.core :only [normalize url-normalize]]
[chlorine.util
:only [url? resource-path? to-resource unzip assert-args
... | null | https://raw.githubusercontent.com/chlorinejs/chlorine/9983349b47434b366b8096e938cc137f1390ab9e/src/chlorine/js.clj | clojure |
Normal data such as strings, numbers, keywords, symbols, vectors, (quoted)
lists are transformed by associated emitters of their type.
Functions, macros and special forms (including javascript native ones)
their types.
map, set, vector, regexp, symbol and keyword types
Symbols are Chlorine's amazing pieces. We... | (ns chlorine.js
(:require [clojure.string :as str]
[hiccup.core]
[clojure.walk])
(:use [chlorine.reader]
[slingshot.slingshot]
[pathetic.core :only [normalize url-normalize]]
[chlorine.util
:only [url? resource-path? to-resource unzip assert-args
... |
59890e03de48c9987afa7916a81d3fc6961d79a11bbc301fe92c2616de0bcd51 | AdaCore/why3 | pp.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/be1023970d48869285e68f12d32858c3383958e0/src/util/pp.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
i $ I d : pp.ml , v 1.22 2009 - 10 - 19 11:55:33 bobot Exp $ i
open Format
type 'a pp = formatter -> 'a ... |
6f42a2f3f6901f25d91a140a0f29573e4de4b6d083efdab1c31eae82a20f5d99 | smeruelo/mooc-ocaml | w4_5.1_writing_map.ml | type 'a tree =
| Node of 'a tree * 'a * 'a tree
| Leaf of 'a;;
let wrap l =
List.map (fun x -> [x]) l
let rec tree_map f = function
| Node (lt, x, rt) -> Node (tree_map f lt, f x, tree_map f rt)
| Leaf x -> Leaf (f x)
| null | https://raw.githubusercontent.com/smeruelo/mooc-ocaml/8e2efb1632ec9dd381489a08465d5341a6c727c9/week4/w4_5.1_writing_map.ml | ocaml | type 'a tree =
| Node of 'a tree * 'a * 'a tree
| Leaf of 'a;;
let wrap l =
List.map (fun x -> [x]) l
let rec tree_map f = function
| Node (lt, x, rt) -> Node (tree_map f lt, f x, tree_map f rt)
| Leaf x -> Leaf (f x)
| |
733417c381d658be71b64e2db3e12bb28289c86881986ef52764f6068b07b638 | totakke/cavia | test_util.clj | (ns cavia.test-util
(:require [clojure.java.io :as io]))
(defmacro with-out-null
[& body]
`(binding [*out* (io/writer "/dev/null")
*err* (io/writer "/dev/null")]
~@body))
(def temp-dir (.getPath (io/file (System/getProperty "java.io.tmpdir") "cavia-test")))
(defn prepare-cache! []
(.mkdir (... | null | https://raw.githubusercontent.com/totakke/cavia/a72e739b2d78adf01c5ac32a1c487d29b24b482f/test/cavia/test_util.clj | clojure | (ns cavia.test-util
(:require [clojure.java.io :as io]))
(defmacro with-out-null
[& body]
`(binding [*out* (io/writer "/dev/null")
*err* (io/writer "/dev/null")]
~@body))
(def temp-dir (.getPath (io/file (System/getProperty "java.io.tmpdir") "cavia-test")))
(defn prepare-cache! []
(.mkdir (... | |
7d3b4abdcd4a8cb0fff4250e7a2e5934951152d79623d00e846bf9d38e37929f | dparis/gen-phzr | filter_texture.cljs | (ns phzr.pixi.filter-texture
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->FilterTexture
"
Parameters:
* gl (WebGLContext) - the current WebGL drawing context
* width (Number) - the horizontal range of the fi... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/pixi/filter_texture.cljs | clojure | (ns phzr.pixi.filter-texture
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->FilterTexture
"
Parameters:
* gl (WebGLContext) - the current WebGL drawing context
* width (Number) - the horizontal range of the fi... | |
0f9eb78f6b1cc408a495904bd549829dda335a0c84425025a589d7a4285ff82f | khibino/haskell-relational-record | join.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
import Data.Int
import Data.Time
import Database.Relational.Query
import Database.Relational.Query.TH
import Database.Relational.Query.Monad.Trans.Ordering (Orderings)
import Person (Person (Person), person)
import Birthday (Bir... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/doc/slide/PostgreSQL-Unconference-201512/join.hs | haskell | Join product accumulated
Maybe not match
Specify ordering key
Build record phantom type
Specify grouping key
Aggregated results
Only aggregated value is allowed to pass | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
import Data.Int
import Data.Time
import Database.Relational.Query
import Database.Relational.Query.TH
import Database.Relational.Query.Monad.Trans.Ordering (Orderings)
import Person (Person (Person), person)
import Birthday (Bir... |
97824fd62cb48d5622f9f7d8779496a51b232d53878e333fb034ef1caac61e6e | 0install/0install | command.mli | Copyright ( C ) 2018 , the README file for details , or visit .
* See the README file for details, or visit .
*)
(** <command> elements *)
open Support
open Support.Common
* [ build_command sels reqs env ] is the argv for the command to run to execute [ sels ] as requested by [ ] .
In --dry - run... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/zeroinstall/command.mli | ocaml | * <command> elements | Copyright ( C ) 2018 , the README file for details , or visit .
* See the README file for details, or visit .
*)
open Support
open Support.Common
* [ build_command sels reqs env ] is the argv for the command to run to execute [ sels ] as requested by [ ] .
In --dry - run mode , do n't complain if... |
e1da5bfa5ecc6ad5c3e0567f708a351672ee1f1fc3fe0f0b2095c063ce79b9ad | donaldsonjw/bigloo | idea.scm | (module __crypto-idea
(import __crypto-block-ciphers
__crypto-util))
(define *block-size* 8)
(define (key->decrypt-param key)
(inverse-keys (key-expansion key)))
(register-cipher! 'idea
(instantiate::Block-Cipher
(name "IDEA (International Data Encryption Algorithm)")
(block-size *block-s... | null | https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/api/crypto/src/Llib/idea.scm | scheme | note: the keys for each round start at "1" (to be consistent with the
description of Wikipedia (as of 22/07/2009)
last 6 subkeys are different.
there are definitely better faster ways to do this, but this is the easiest
way (if we want to stay portable).
red: idea*
green: idea+
numbers represent the depth in pi... | (module __crypto-idea
(import __crypto-block-ciphers
__crypto-util))
(define *block-size* 8)
(define (key->decrypt-param key)
(inverse-keys (key-expansion key)))
(register-cipher! 'idea
(instantiate::Block-Cipher
(name "IDEA (International Data Encryption Algorithm)")
(block-size *block-s... |
5fa7604de14efd9769e3a16aa5c61d9289da280106349b6b534b8db2a76b44ee | kit-ty-kate/opam-grep | grep.mli | SPDX - License - Identifier : MIT
exception OpamGrepError of string
val search :
repos:string option ->
depends_on:string option ->
regexp:string ->
unit
| null | https://raw.githubusercontent.com/kit-ty-kate/opam-grep/5fb5fa565c7ed209b9136cac6bb2fbcf7104203b/src/grep.mli | ocaml | SPDX - License - Identifier : MIT
exception OpamGrepError of string
val search :
repos:string option ->
depends_on:string option ->
regexp:string ->
unit
| |
5b6ccb905f8372f311e4188c480ef847409cca57929ed87ac440c8c2dd44284f | GlideAngle/flare-timing | Error.hs | module Serve.Error
( errTaskPoints
, errAltPoints
, errTaskBounds
, errTaskStep
, errPilotTrackNotFound
, errPilotNotFound
, errTaskLengths
) where
import Text.Printf (printf)
import qualified Data.ByteString.Lazy.Char8 as LBS (pack)
import Servant (ServantErr, errBody, err400)
import ... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/app-serve/src/Serve/Error.hs | haskell | module Serve.Error
( errTaskPoints
, errAltPoints
, errTaskBounds
, errTaskStep
, errPilotTrackNotFound
, errPilotNotFound
, errTaskLengths
) where
import Text.Printf (printf)
import qualified Data.ByteString.Lazy.Char8 as LBS (pack)
import Servant (ServantErr, errBody, err400)
import ... | |
229657e2292ef01b03e43a0c84bf23658e64d242e82a6050cef10cd3265344d0 | ocaml/dune | sub_dirs.mli | open Import
module Status : sig
type t =
| Data_only
| Normal
| Vendored
val to_dyn : t -> Dyn.t
module Or_ignored : sig
type nonrec t =
| Ignored
| Status of t
end
module Map : sig
type status := t
type 'a t =
{ data_only : 'a
; vendored : 'a
; norma... | null | https://raw.githubusercontent.com/ocaml/dune/a790dd36ae51ab13676e58cfff60b08a15508d93/src/dune_engine/sub_dirs.mli | ocaml | open Import
module Status : sig
type t =
| Data_only
| Normal
| Vendored
val to_dyn : t -> Dyn.t
module Or_ignored : sig
type nonrec t =
| Ignored
| Status of t
end
module Map : sig
type status := t
type 'a t =
{ data_only : 'a
; vendored : 'a
; norma... | |
7563b803cff070626b96cf8efe2d61ba56b661471070b37f686f4be946de4e89 | aws-beam/aws-erlang | aws_redshift.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Amazon Redshift
%%
%% Overview
%%
This is an interface reference for Amazon Redshift .
%%
It contains documentation for one of the programming or command line
interfaces you can use to manage Amazon Redshift clusters ... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_redshift.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
Overview
require techniques, such as polling or asynchronous callback handlers, to
determine when a command has been applied. In this reference, the
parameter descriptions indicate whether a change is applied immediately,
on the next instance reboot, or during the nex... | See -beam/aws-codegen for more details .
@doc Amazon Redshift
This is an interface reference for Amazon Redshift .
It contains documentation for one of the programming or command line
interfaces you can use to manage Amazon Redshift clusters . Note that
Amazon Redshift is asynchronous , which means that so... |
b8df20073f9949f3897cb34a94091a53d508a2fc22e8073685551088ed578182 | jpmonettas/hansel | dev.cljs | (ns dev
(:require [hansel.instrument.runtime]))
(defn print-form-init [data]
(println "[form-init] data:" data))
(defn print-fn-call [data]
(println "[fn-call] data:" data))
(defn print-fn-return [{:keys [return] :as data}]
(println "[fn-return] data:" data)
return) ;; must return return!
(defn print-expr... | null | https://raw.githubusercontent.com/jpmonettas/hansel/344bf5021f932a6260424958ce2ebb538ce4b323/dev-src/dev.cljs | clojure | must return return!
must return result! | (ns dev
(:require [hansel.instrument.runtime]))
(defn print-form-init [data]
(println "[form-init] data:" data))
(defn print-fn-call [data]
(println "[fn-call] data:" data))
(defn print-fn-return [{:keys [return] :as data}]
(println "[fn-return] data:" data)
(defn print-expr-exec [{:keys [result] :as data}]... |
7127ca9a2b53cc78286d8448dcbc8d3f0486117368d83e2c79752c49cc1c27bd | shaunlebron/gh4st | texts.cljs | (ns gh4st.texts)
(def victory-text
[:p.victory-text
"You got him!" [:br]
"Press " [:kbd.green "SHIFT"] " + " [:kbd.green "→"] " for next level." [:br]
"Or press Z or Y to undo/redo for study."])
(def defeat-text
[:p.defeat-text
"Bah! He got the fruit!" [:br]
[:span.focus "Press " [:kbd "Z"] " or "... | null | https://raw.githubusercontent.com/shaunlebron/gh4st/e329f42f0d19ddeebcf85ca0e1efa03d9af22a56/src/gh4st/texts.cljs | clojure | {:title "Decisions, decisions"}
{:title "Blinky needs help"}
{:title "Pinky can help"}
{:title "Pinky is different"}
{:title "Work together"} | (ns gh4st.texts)
(def victory-text
[:p.victory-text
"You got him!" [:br]
"Press " [:kbd.green "SHIFT"] " + " [:kbd.green "→"] " for next level." [:br]
"Or press Z or Y to undo/redo for study."])
(def defeat-text
[:p.defeat-text
"Bah! He got the fruit!" [:br]
[:span.focus "Press " [:kbd "Z"] " or "... |
a31f6123d85e4ad2f0ddab9fd852043ad95367cb236622ae3761a09411e392bb | triffon/fp-2019-20 | 02--my-exp.rkt | #lang racket
(require rackunit rackunit/text-ui)
(require "01--sum.rkt")
(define (fact n)
(if (= n 0)
1
(* n (fact (- n 1)))))
(define (1+ n) (+ 1 n))
# # # Задача 2
Напишете функция ` ( my - exp m x ) ` ,
; която изчислява `m`-тата частична сума на функцията `e^x` в точката `x`.
(define (my-exp ... | null | https://raw.githubusercontent.com/triffon/fp-2019-20/7efb13ff4de3ea13baa2c5c59eb57341fac15641/exercises/computer-science-2/03--higher-order-functions--accumulate/solutions/02--my-exp.rkt | racket | която изчислява `m`-тата частична сума на функцията `e^x` в точката `x`. | #lang racket
(require rackunit rackunit/text-ui)
(require "01--sum.rkt")
(define (fact n)
(if (= n 0)
1
(* n (fact (- n 1)))))
(define (1+ n) (+ 1 n))
# # # Задача 2
Напишете функция ` ( my - exp m x ) ` ,
(define (my-exp m x)
(if (< m 0)
0
(+ (/ (expt x m) (fact m))
(my-ex... |
89c9e507e0e921d18ff1ab9f406896af5212c118febe8e34861abfe644ece176 | erlang/otp | timer.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2022 . 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 applicab... | null | https://raw.githubusercontent.com/erlang/otp/fcb6abc96710b6bde88a6320ad44a2fd33c23d47/lib/stdlib/src/timer.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 lan... | Copyright Ericsson AB 1996 - 2022 . 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(timer).
-export([apply_after/4,
send_after/3, send_after/2,
exit_after/3, exit_after/2, ki... |
0e0a236a52afe6167ae891c48429bcb9093c6cfc5834badbdbaeb4a50ca46a06 | zshipko/yurt | yurt.mli | (** [Route]s are used to build URLs with types variables *)
module Route : sig
type route =
[ `String of string
| `Int of string
| `Float of string
| `Path of string
| `Match of string * string
| `Route of route list ]
exception Invalid_route_type
(** [Invalid_route_type] is raised when a... | null | https://raw.githubusercontent.com/zshipko/yurt/b0baac0bc55740a361ae94181d5c0bb313e96f88/src/yurt.mli | ocaml | * [Route]s are used to build URLs with types variables
* [Invalid_route_type] is raised when a value of the wrong type is requested
* Param map
* Convert a route to string
* Convert a route to regular expressions
* Create a [Route] from the given string
* Get parameters from a route
* Get a string parameter
* G... | module Route : sig
type route =
[ `String of string
| `Int of string
| `Float of string
| `Path of string
| `Match of string * string
| `Route of route list ]
exception Invalid_route_type
type params = (string, route) Hashtbl.t
val to_string : route -> string
val to_regexp : route ... |
c59683c04e44358cf55e070730e1b5013b1ce5cb0950c64577d753458af3dddc | qitab/qmynd | qtest.lisp | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Free Software published under an MIT - like license . See LICENSE ; ; ;
;;; ;;;
Copyright ( c ) 2012 G... | null | https://raw.githubusercontent.com/qitab/qmynd/7e56daf73f0ed5f49a931c01af75fb874bcf3445/tests/qtest.lisp | lisp |
;;;
; ;
;;;
; ;
;;;
; ;
;;;
QRes-style body
The m... |
(in-package :qmynd-test)
Ultra light - weight test framework
(defmacro define-test (test-name () &body body)
`(defun ,test-name ()
(handler-case
(progn ,@body)
(error (e)
(warn "An error was signalled executing ~S:~% ~A"
',test-name e)))))
(defmacro define-test-suit... |
296605298a289cb082eda6c39d085bcb3efdcb77c11b7248514a41ebba8cb480 | cornell-pl/forest | PWS.hs | # LANGUAGE TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables #
module Examples.PWS where
import Language.Pads.Padsc
import Language.Forest.Forestc hiding (sources)
import System.IO.Unsafe (unsafePerformIO)
import Language.Pads.Ge... | null | https://raw.githubusercontent.com/cornell-pl/forest/3772c1f44cdee0b705e927a14b54d84e60e224e6/src/Examples/PWS.hs | haskell | Configuration file for learning demo web site; contains paths to various web site components.
Name of machine hosting web site
URL prefix for static content
URL prefix for cgi content
Path to directory of scripts in live web site
Path to directory for demo user data
Path to directory containing pads system
Pat... | # LANGUAGE TypeSynonymInstances , TemplateHaskell , QuasiQuotes , MultiParamTypeClasses , FlexibleInstances , DeriveDataTypeable , ScopedTypeVariables #
module Examples.PWS where
import Language.Pads.Padsc
import Language.Forest.Forestc hiding (sources)
import System.IO.Unsafe (unsafePerformIO)
import Language.Pads.Ge... |
2ef71172e311247930d8a59b9fae94014225121bbf57b010621acab9eb08d1a7 | jimcrayne/jhc | read066.hs |
{-# OPTIONS_NO_SUCH_PRAGMA --no-such-flag #-}
-- We should parse the above as an unrecognised pragma, not as an OPTIONS
pragma containing " _ NO_SUCH_PRAGMA -wibble " . Trac # 2847 .
module Test where
| null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/0_parse/2_pass/ghc/read066.hs | haskell | # OPTIONS_NO_SUCH_PRAGMA --no-such-flag #
We should parse the above as an unrecognised pragma, not as an OPTIONS |
pragma containing " _ NO_SUCH_PRAGMA -wibble " . Trac # 2847 .
module Test where
|
26924410659c90b124cd66b32788f74ee744650dd21aab6353b37189b3662eb9 | haskell-opengl/OpenGLRaw | ShaderBufferLoad.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.NV.ShaderBufferLoad
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
----------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/NV/ShaderBufferLoad.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.NV.ShaderBufferLoad
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functio... | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.NV.ShaderBufferLoad (
glGetNVShaderBufferLoad,
gl_NV_shader_buffer_load,
pattern GL_BUFFER_GPU_ADDRESS_NV,
pattern GL_GPU_ADDRESS_NV,
pattern GL_MAX_SHADER_BUFFER_ADDRESS_NV,
glGetBufferParameterui64vN... |
13dd08e9c70cd50694932f6b599abc5a773e14287a8b70d1f39425a483777ca3 | Smoltbob/Caml-Est-Belle | if_int.ml |
let a = 0 in
let b = 1 in
let c = 2 in
if a < 1 then
print_int 2
else ()
| null | https://raw.githubusercontent.com/Smoltbob/Caml-Est-Belle/3d6f53d4e8e01bbae57a0a402b7c0f02f4ed767c/tests/gen-code/valid/if_int.ml | ocaml |
let a = 0 in
let b = 1 in
let c = 2 in
if a < 1 then
print_int 2
else ()
| |
0905be58ed25d0fa2f19ac51390e3aaa7e35fb8474c574b995c6d4c7f2a69d19 | Dasudian/DSDIN | dsdtx_utils.erl | %%%=============================================================================
2018 , Dasudian Technologies
%%% @doc
Common utility functions for DSD transactions
%%% @end
%%%=============================================================================
-module(dsdtx_utils).
%% API
-export([check_account/3,
... | null | https://raw.githubusercontent.com/Dasudian/DSDIN/b27a437d8deecae68613604fffcbb9804a6f1729/apps/dsdtx/src/dsdtx_utils.erl | erlang | =============================================================================
@doc
@end
=============================================================================
API
===================================================================
API
===================================================================
Check... | 2018 , Dasudian Technologies
Common utility functions for DSD transactions
-module(dsdtx_utils).
-export([check_account/3,
check_account/4,
check_nonce/2,
check_ttl/2]).
and that the is ok .
-spec check_account(Account :: dsdc_keys:pubkey(),
Trees :: dsdc_t... |
d558aa26450607a0b6959ae008e06ce635845d06e51856bd23afc748105f3990 | unisonweb/unison | SyncEphemeral.hs | module Unison.Codebase.SqliteCodebase.SyncEphemeral where
import U.Codebase.HashTags (CausalHash)
import U.Codebase.Sqlite.DbId (SchemaVersion)
import qualified U.Codebase.Sqlite.Sync22 as Sync22
import Unison.Hash (Hash)
import Unison.Prelude
data Dependencies = Dependencies
{ definitions :: Set Hash,
branches... | null | https://raw.githubusercontent.com/unisonweb/unison/3bfb412a4d7c22654712105b9c3d16193830901f/parser-typechecker/src/Unison/Codebase/SqliteCodebase/SyncEphemeral.hs | haskell | module Unison.Codebase.SqliteCodebase.SyncEphemeral where
import U.Codebase.HashTags (CausalHash)
import U.Codebase.Sqlite.DbId (SchemaVersion)
import qualified U.Codebase.Sqlite.Sync22 as Sync22
import Unison.Hash (Hash)
import Unison.Prelude
data Dependencies = Dependencies
{ definitions :: Set Hash,
branches... | |
d910450ffc70c1b7aab9d0fb1339a5706d1bc62700f11b74e7ff45ede538ee58 | lehins/massiv | Unsafe.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
-- |
-- Module : Data.Massiv.Array.Stencil.Unsafe
Copyright : ( c ) 2018 - 2022
-- License : BSD3
Maintainer : < >
-- Stability : experimen... | null | https://raw.githubusercontent.com/lehins/massiv/67a920d4403f210d0bfdad1acc4bec208d80a588/massiv/src/Data/Massiv/Array/Stencil/Unsafe.hs | haskell | # LANGUAGE BangPatterns #
|
Module : Data.Massiv.Array.Stencil.Unsafe
License : BSD3
Stability : experimental
Portability : non-portable
* Stencil
| Similar to `Data.Massiv.Array.Stencil.makeStencil`, but there are no guarantees that the
stencil will not read out of bounds memory. This stencil is als... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
Copyright : ( c ) 2018 - 2022
Maintainer : < >
module Data.Massiv.Array.Stencil.Unsafe (
makeUnsafeStencil,
makeUnsafeConvolutionStencil,
makeUnsafeCorrelationStencil,
unsa... |
a32af1e3b8865d9713c149a1ad2cb2ef77bb4a931563d07cd5cbb83fe67723a4 | BinaryAnalysisPlatform/bap | bap_primus_lisp.mli | open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
open Bap_primus_types
open Bap_core_theory
type program
type context
type message
module Load : sig
type error
val program : ?paths:string list -> Project.t -> string list -> (program,error) result
val pp_program : formatter -> program -> unit
val pp_... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/ce62b09cf059cc79fc92ac3022bd2830659fb236/lib/bap_primus/bap_primus_lisp.mli | ocaml | deprecated | open Core_kernel[@@warning "-D"]
open Bap.Std
open Format
open Bap_primus_types
open Bap_core_theory
type program
type context
type message
module Load : sig
type error
val program : ?paths:string list -> Project.t -> string list -> (program,error) result
val pp_program : formatter -> program -> unit
val pp_... |
4fbd07a06cd7d6d1048d2797f032b62d07f90b60a95f1c8c014fe21dba4caf2e | 223kazuki/clj-graphql-server | streamer.clj | (ns graphql-server.handler.streamer
(:require [integrant.core :as ig]
[clojure.core.async :refer [pub sub chan go-loop go >! <!
timeout close! >!! <!! unsub]]
[graphql-server.boundary.db :as db]))
(defmethod ig/init-key ::stream-torikumis [_ {:keys [db ... | null | https://raw.githubusercontent.com/223kazuki/clj-graphql-server/0994d2bb98cd483dcb1c02a8175766e4fd35c861/src/graphql_server/handler/streamer.clj | clojure | (ns graphql-server.handler.streamer
(:require [integrant.core :as ig]
[clojure.core.async :refer [pub sub chan go-loop go >! <!
timeout close! >!! <!! unsub]]
[graphql-server.boundary.db :as db]))
(defmethod ig/init-key ::stream-torikumis [_ {:keys [db ... | |
f394d2d3caf28459dedc9a3e0bf71a2620f22d577126a81c05564810c6d9046e | bmeurer/ocamljit2 | typedecl.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
and , projet Crist... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/typing/typedecl.ml | ocaml | *********************************************************************
Objective Caml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
open Misc
open Asttypes
open Parsetree
open... |
b69d6a09f7348831d1af1f838a435636ef66cf3232367119e598fe48eae3398f | tomjridge/tjr_kv | pvt_pcache_with_blocks_limit.ml | * This is a pcache wrapper which automatically detaches after
a certain number of blocks ; used by pcache_thread
a certain number of blocks; used by pcache_thread *)
$ ( CONFIG("pvt_pcache_with_blocks_limit.ml : dont_log " ) )
let dont_log = true
* fidi = find insert delete insertmany
type ('k,'v,'t) map_fi... | null | https://raw.githubusercontent.com/tomjridge/tjr_kv/68b3d2fa0c7a144765a3720d78cffb96d5478b32/src/pvt_pcache_with_blocks_limit.ml | ocaml | let open Mref_plus in
FIXME we should do something smarter here | * This is a pcache wrapper which automatically detaches after
a certain number of blocks ; used by pcache_thread
a certain number of blocks; used by pcache_thread *)
$ ( CONFIG("pvt_pcache_with_blocks_limit.ml : dont_log " ) )
let dont_log = true
* fidi = find insert delete insertmany
type ('k,'v,'t) map_fi... |
e56990166c7d516cbdb4dc288846288099945723f0023ca84949b06b491dc2e7 | qitab/cl-protobufs | symbol-test.lisp | Copyright 2020 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
(defpackage #:cl-protobufs.test.symbol
(:use #:cl
#:clunit)
(:local-nicknames (#:test-pb #:cl-protobufs.test-proto)
(#:proto #:cl-protobu... | null | https://raw.githubusercontent.com/qitab/cl-protobufs/ebb85f19a7613f9973e96912a900b60cb7e9adb6/tests/symbol-test.lisp | lisp |
license that can be found in the LICENSE file or at
.
For a variety of symbols we verify that we can serialize them and deserialize them both in
text and wire formats.
Can't use proto-equal to test this because the new proto will be different
because (eq #:foo #:foo) is false. | Copyright 2020 Google LLC
Use of this source code is governed by an MIT - style
(defpackage #:cl-protobufs.test.symbol
(:use #:cl
#:clunit)
(:local-nicknames (#:test-pb #:cl-protobufs.test-proto)
(#:proto #:cl-protobufs))
(:export :run))
(in-package :cl-protobufs.test.symbol)
(d... |
fe94c2a0457ee98679e742d170faa05d8b3f70f244a530ac74a118a9b48dcac5 | jubnzv/iec-checker | use_define.mli | Detect common errors in ' use ' occurrences of the local variables in POUs .
open IECCheckerCore
module S = Syntax
val run : S.iec_library_element list -> Warn.t list
| null | https://raw.githubusercontent.com/jubnzv/iec-checker/666cd8a28cb1211465a900862df84d70460c2742/src/analysis/use_define.mli | ocaml | Detect common errors in ' use ' occurrences of the local variables in POUs .
open IECCheckerCore
module S = Syntax
val run : S.iec_library_element list -> Warn.t list
| |
007a8dadb1332b7dad20773eed9cf1d1730d5c5f13eb121a1d0fee7be39d95bf | dpom/clj-duckling | convert-rules.clj | #!/usr/bin/env inlein
;; syntax: convert-rules dirpath
'{:dependencies [[org.clojure/clojure "1.9.0-RC1"]
[cljfmt "0.5.7"]]}
(require '[clojure.java.io :as io])
(require '[clojure.string :as str])
(require '[clojure.pprint :as pp])
(require '[cljfmt.core :refer [reformat-string]])
(defn build-ru... | null | https://raw.githubusercontent.com/dpom/clj-duckling/8728f9a99b4b002e9ce2ea62b3a82a61b0cdac06/bin/convert-rules.clj | clojure | syntax: convert-rules dirpath
(printf "item: %s\n" item) | #!/usr/bin/env inlein
'{:dependencies [[org.clojure/clojure "1.9.0-RC1"]
[cljfmt "0.5.7"]]}
(require '[clojure.java.io :as io])
(require '[clojure.string :as str])
(require '[clojure.pprint :as pp])
(require '[cljfmt.core :refer [reformat-string]])
(defn build-rule [[name pattern production]]
{... |
75493721dc4378027613ebd798b84254312f10725f9b0d4605ecdbdc753c4642 | cubicle-model-checker/cubicle | term.mli | (**************************************************************************)
(* *)
Cubicle
(* *)
... | null | https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/smt/term.mli | ocaml | ************************************************************************
... | Cubicle
Copyright ( C ) 2011 - 2014
and
Universite Paris - Sud 11
This file is distributed under the terms ... |
56194de6c8e8e0a7f1d84b22eccc8e18ca6c4799f513bed7d17d74f8f7b0cd48 | ernius/plutus-cardano-samples | Signed.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# L... | null | https://raw.githubusercontent.com/ernius/plutus-cardano-samples/3b5476e45725578622889114e1b36d9a6cf56535/src/Policies/Signed.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
# INLINABLE mkPolicy #
equivalent curSymbol pkh = scriptCurrencySymbol (policy pkh)
mkKnownCurrencies [] | # LANGUAGE DeriveGeneric #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Policies.Signed where
import Control.Monad hiding (fmap)
import Data.Aeson ... |
3845abeedb7fa4bfa9d85d20dca7c1bd789ddcd548b26fd31c9e3aa100485bda | arthur-adjedj/proof_assistant | ext_props.ml | open Proof_build.Formule
open Stored_props
open Proof_build.Sequent
exception Incomplete_or_wrong_proof
exception Already_exists
exception Wrong_sequent of ((sequent list) * string)
ajoute une propriété str : f à a liste
let add str f =
load_stored_props false;
if Hashtbl.mem props str then (
print_endline "... | null | https://raw.githubusercontent.com/arthur-adjedj/proof_assistant/a47ae2e1012e77ed810de0f8c99a957571ad5c27/pr_assistant/proof_store/ext_props.ml | ocaml | O(n(name)) | open Proof_build.Formule
open Stored_props
open Proof_build.Sequent
exception Incomplete_or_wrong_proof
exception Already_exists
exception Wrong_sequent of ((sequent list) * string)
ajoute une propriété str : f à a liste
let add str f =
load_stored_props false;
if Hashtbl.mem props str then (
print_endline "... |
717e03bfadcd868ff4a7228b8238b2b0879c438d455d8946df6be792ad4015a9 | Plisp/vico | graphemes.lisp | (defpackage :vico-core.graphemes
(:use :cl)
(:export #:make-grapheme-searcher
#:next-grapheme
#:list-graphemes))
(in-package :vico-core.graphemes)
;;; graphemes - portable version of the grapheme breaking algorithm in sb-unicode
(defun %binary-search (value seq key)
(declare (simple-vector... | null | https://raw.githubusercontent.com/Plisp/vico/40606aea583ef9db98941ee337feb47f10c9696c/src/core/graphemes.lisp | lisp | graphemes - portable version of the grapheme breaking algorithm in sb-unicode
bounds check before accessing
(defun map-grapheme-boundaries (function string)
(do ((length (length string))
(c1 nil)
(c2 (and (> (length string) 0) (grapheme-break-class (char string 0)))))
((>= end length)
... | (defpackage :vico-core.graphemes
(:use :cl)
(:export #:make-grapheme-searcher
#:next-grapheme
#:list-graphemes))
(in-package :vico-core.graphemes)
(defun %binary-search (value seq key)
(declare (simple-vector seq))
(declare (function key))
(labels ((recurse (start end)
(wh... |
9d855d0191f23797f9ad209d65b692bb43c505bf777a65f5a0ba1204649bc953 | andrenth/ocaml-swagger | param.ml | open Util
let sprintf = Printf.sprintf
type t = Swagger_t.parameter
let rec item_kind_to_ptyp (items : Swagger_t.items option) kind =
let open Ppxlib in
match kind with
| `String -> [%type: string]
| `Number -> [%type: float]
| `Integer -> [%type: int]
| `Boolean -> [%type: bool]
| `Array -> (
ma... | null | https://raw.githubusercontent.com/andrenth/ocaml-swagger/60486bee7220a868b7e0b4507adb1edad44b98cd/lib/param.ml | ocaml | open Util
let sprintf = Printf.sprintf
type t = Swagger_t.parameter
let rec item_kind_to_ptyp (items : Swagger_t.items option) kind =
let open Ppxlib in
match kind with
| `String -> [%type: string]
| `Number -> [%type: float]
| `Integer -> [%type: int]
| `Boolean -> [%type: bool]
| `Array -> (
ma... | |
a3061ffbb102e1c802ee671af9a76f8167d04e896ab16e3b2a348ddc084ec37a | cedlemo/OCaml-GI-ctypes-bindings-generator | Mount_operation.mli | open Ctypes
type t
val t_typ : t typ
val create :
unit -> t ptr
val get_anonymous :
t -> bool
val get_choice :
t -> int32
val get_domain :
t -> string option
val get_password :
t -> string option
val get_password_save :
t -> Password_save.t
val get_username :
t -> string option
val reply :
t -> Mount_... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gio/Mount_operation.mli | ocaml | open Ctypes
type t
val t_typ : t typ
val create :
unit -> t ptr
val get_anonymous :
t -> bool
val get_choice :
t -> int32
val get_domain :
t -> string option
val get_password :
t -> string option
val get_password_save :
t -> Password_save.t
val get_username :
t -> string option
val reply :
t -> Mount_... | |
0762b0330c02645edbdff351e28ff4da253147d4558a06467f6ed0fde65429f1 | mzp/coq-ruby | rules.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/contrib/firstorder/rules.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
********************************************************************** | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : rules.mli 6141 20... |
22c6e096f066b70ceacf135696eb2337ea1a259a59e8eba6d186bd0214e3ea2f | glguy/advent2021 | Day14.hs | # Language ImportQualifiedPost , QuasiQuotes #
|
Module : Main
Description : Day 14 solution
Copyright : ( c ) , 2021
License : ISC
Maintainer :
< >
Build a huge polymer chain and compute how many of
each element it contains .
This problem requires memoization as the size of the... | null | https://raw.githubusercontent.com/glguy/advent2021/0e007d07babce240047a9dabaf612cd3ebd42974/execs/Day14.hs | haskell | | >>> :main
| Generate a replacement rule map from a list of input productions
>>> tableToRule [('L','R','M')] -- LR -> M
fromList [(('L','R'),fromList [(('L','M'),1),(('M','R'),1)])]
| Apply a replacement rule to a map of counts.
>>> :set -XOverloadedLists
>>> applyRule [('a', [('b',1),('c',2)]),('z',[('y',1)... | # Language ImportQualifiedPost , QuasiQuotes #
|
Module : Main
Description : Day 14 solution
Copyright : ( c ) , 2021
License : ISC
Maintainer :
< >
Build a huge polymer chain and compute how many of
each element it contains .
This problem requires memoization as the size of the... |
1959391b04197f932a7c472a02e97051f2f4d1d2c11dc282dae531954d9c441a | okuoku/nausicaa | programs.sps | Copyright ( c ) 2008
;;;
;;;This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as
published by the Free Software Foundation ; either version 2 of the
;;;License, or (at your option) any later version.
;;;
;;;This library... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/r6rs/run/programs.sps | scheme |
This library is free software; you can redistribute it and/or modify
either version 2 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR ... | Copyright ( c ) 2008
it under the terms of the GNU Library General Public License as
Library General Public License for more details .
You should have received a copy of the GNU Library General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA
02110 - 1301 U... |
a8ac97c8a0171d3ada0225d9e356add93450605dd0615a99a426881d6610ecc3 | facebook/flow | socket.mli |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/hack_forked/socket/socket.mli | ocaml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | |
d0ffe18f7646e6a62e587b6e4200ab64b52b3874ee894b872ac81b74096c6148 | digitallyinduced/ihp | View.hs | module IHP.LoginSupport.Helper.View
( currentUser
, currentUserId
, currentUserOrNothing
, currentAdmin
, currentAdminOrNothing
)
where
import IHP.Prelude
import IHP.Controller.Context
import IHP.LoginSupport.Helper.Controller (CurrentUserRecord, CurrentAdminRecord)
currentUser :: (?context :: ControllerContext, user... | null | https://raw.githubusercontent.com/digitallyinduced/ihp/9c33451a0c36bf61cde659adaddcfad003bfed46/IHP/LoginSupport/Helper/View.hs | haskell | module IHP.LoginSupport.Helper.View
( currentUser
, currentUserId
, currentUserOrNothing
, currentAdmin
, currentAdminOrNothing
)
where
import IHP.Prelude
import IHP.Controller.Context
import IHP.LoginSupport.Helper.Controller (CurrentUserRecord, CurrentAdminRecord)
currentUser :: (?context :: ControllerContext, user... | |
c44a07c0015afbd29925ea95e818090d377f7b1f4a70e50ce75b4d0cd1b9b8c8 | erlang/otp | smoke_test_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2011 - 2022 . 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 applicab... | null | https://raw.githubusercontent.com/erlang/otp/f02ae58612b257d187ad030d72b9e8b67ce471ef/erts/emulator/test/smoke_test_SUITE.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 lan... | Copyright Ericsson AB 2011 - 2022 . 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(smoke_test_SUITE).
-include_lib("common_test/include/ct.hrl").
-export([all/0, suite/0,
init_per_testc... |
0530005917d727f244de4ed20a5d916a83bd8189f289a424b5db0f78a111f3c9 | chenyukang/eopl | store.scm | (define instrument-newref (make-parameter #f))
;;;;;;;;;;;;;;;; references and the store ;;;;;;;;;;;;;;;;
;;; world's dumbest model of the store: the store is a list and a
;;; reference is number which denotes a position in the list.
;; the-store: a Scheme variable containing the current state of the
... | null | https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch9/base/typed-oo/store.scm | scheme | references and the store ;;;;;;;;;;;;;;;;
world's dumbest model of the store: the store is a list and a
reference is number which denotes a position in the list.
the-store: a Scheme variable containing the current state of the
store. Initially set to a dummy variable.
empty-store : () -> Sto
initialize-s... | (define instrument-newref (make-parameter #f))
(define the-store 'uninitialized)
Page : 111
(define empty-store
(lambda () '()))
(define initialize-store!
(lambda ()
(set! the-store (empty-store))))
Page : 111
(define get-store
(lambda () the-store))
Page : 111
(define refer... |
856b69b83dc2819e79c4482c54948eedfbd1908ea326088a1e5c0b6b3ce58fc7 | roosta/herb | keyframes_use.cljs | (ns site.snippets.keyframes-use
(:require
[garden.units :refer [px]]
[herb.core :refer [<class defkeyframes]]))
(defkeyframes pulse-animation
[:from {:opacity 1}]
[:to {:opacity 0}])
;; In garden, if you use a single vector [arg1 arg1] you get a comma separated
string , if you add a second vector is get... | null | https://raw.githubusercontent.com/roosta/herb/64afb133a7bf51d7171a3c5260584c09dbe4e504/site/src/site/snippets/keyframes_use.cljs | clojure | In garden, if you use a single vector [arg1 arg1] you get a comma separated | (ns site.snippets.keyframes-use
(:require
[garden.units :refer [px]]
[herb.core :refer [<class defkeyframes]]))
(defkeyframes pulse-animation
[:from {:opacity 1}]
[:to {:opacity 0}])
string , if you add a second vector is gets space separated
(defn style
[]
{:animation [[pulse-animation "2s" :infini... |
8830d2d76193dc8971d512faf9b297db3521bc6f0078ba505b12564d05cb3b1a | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.ui.views
(:require
[re-frame.core :as re-frame]
[reagent.core :as r]
[webchange.ui.pages.index :refer [pages]]
[webchange.ui.pages.dashboard.views :as dashboard]
[webchange.ui.routes :as routes]
[webchange.ui.state :as state]))
(defn index
[]
(r/create-class
{:display-na... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/ui/views.cljs | clojure | (ns webchange.ui.views
(:require
[re-frame.core :as re-frame]
[reagent.core :as r]
[webchange.ui.pages.index :refer [pages]]
[webchange.ui.pages.dashboard.views :as dashboard]
[webchange.ui.routes :as routes]
[webchange.ui.state :as state]))
(defn index
[]
(r/create-class
{:display-na... | |
caa502e1fc8c8e17ec66fc4772cb1c647c6255a0f474cfa2f4d077d98f6f138a | tsloughter/kuberl | kuberl_v1beta1_custom_resource_conversion.erl | -module(kuberl_v1beta1_custom_resource_conversion).
-export([encode/1]).
-export_type([kuberl_v1beta1_custom_resource_conversion/0]).
-type kuberl_v1beta1_custom_resource_conversion() ::
#{ 'conversionReviewVersions' => list(),
'strategy' := binary(),
'webhookClientConfig' => kuberl_apiextensions_v... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_custom_resource_conversion.erl | erlang | -module(kuberl_v1beta1_custom_resource_conversion).
-export([encode/1]).
-export_type([kuberl_v1beta1_custom_resource_conversion/0]).
-type kuberl_v1beta1_custom_resource_conversion() ::
#{ 'conversionReviewVersions' => list(),
'strategy' := binary(),
'webhookClientConfig' => kuberl_apiextensions_v... | |
84d8ccfe79bade892527c5072b61c1d1c29f1e8859a961de304320939914701b | brendanhay/amazonka | Internal.hs | -- |
-- Module : Test.Amazonka.WAFV2.Internal
Copyright : ( c ) 2013 - 2023
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-generated
Portability : non - portable ( GHC extensions )
module Test.Amazonka.WAFV2.Internal where
| null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-wafv2/test/Test/Amazonka/WAFV2/Internal.hs | haskell | |
Module : Test.Amazonka.WAFV2.Internal
Stability : auto-generated | Copyright : ( c ) 2013 - 2023
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Test.Amazonka.WAFV2.Internal where
|
35f2968e51d5fa159879d00896d16f6ed3ae78c82410c57199a9bf1528df081d | m2ym/cl-syntax | clsql.lisp | (in-package :cl-user)
(syntax:define-package-syntax :clsql
(:merge :standard)
(:macro-char #\[ #'clsql-sys::sql-reader-open)
(:macro-char #\] (cl:get-macro-character #\))))
| null | https://raw.githubusercontent.com/m2ym/cl-syntax/03f0c329bbd55b8622c37161e6278366525e2ccc/contrib/clsql.lisp | lisp | (in-package :cl-user)
(syntax:define-package-syntax :clsql
(:merge :standard)
(:macro-char #\[ #'clsql-sys::sql-reader-open)
(:macro-char #\] (cl:get-macro-character #\))))
| |
928c9373846e5b046674ff4f8ffbb884887df02806e2f943e9250940f4523156 | griffinbank/titan | migrate.clj | (ns titan.commands.db.migrate
(:gen-class)
(:require [titan.db.migrations :refer [migrate]]))
(defn -main
[]
(migrate))
| null | https://raw.githubusercontent.com/griffinbank/titan/990a7ab083ad1e6680f8f088ce43a095194b376a/titan/src/clj/titan/commands/db/migrate.clj | clojure | (ns titan.commands.db.migrate
(:gen-class)
(:require [titan.db.migrations :refer [migrate]]))
(defn -main
[]
(migrate))
| |
8864c3de0bed80d7f0d72db5b47de8da8c5b03be240c6414555694c964744614 | kmi/irs | publish-ontolingua-ontology.lisp | (in-package web-onto)
(defvar *root-published-ontolingua-ontology-directory*
"ocml:ontolingua-web;")
(defvar *published-ontolingua-ontology-root-url*
(concatenate 'string
web-onto::*default-host*
"/ontolingua/"))
(defvar *plain-default-ontolingua-sub-directory*
"ontolingua")
(d... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/src/webonto/publish-ontolingua-ontology.lisp | lisp | (in-package web-onto)
(defvar *root-published-ontolingua-ontology-directory*
"ocml:ontolingua-web;")
(defvar *published-ontolingua-ontology-root-url*
(concatenate 'string
web-onto::*default-host*
"/ontolingua/"))
(defvar *plain-default-ontolingua-sub-directory*
"ontolingua")
(d... | |
92176ce1d984baadb0d973cdbf8b382ce0a5e098c60d126bfbc0a2b2a88b79b4 | elbrujohalcon/wxhnotepad | Step5.hs | -- | Like Step4 but with Find / Replace support
module Step5 (step5) where
import Graphics.UI.WX
import Graphics.UI.WXCore hiding (wxID_CUT, wxID_COPY, wxID_PASTE,
wxID_FIND, wxID_FORWARD, wxID_REPLACE, wxID_BACKWARD)
import Data.Bits
import Data.Char (toLower)
import Data.List
| /... | null | https://raw.githubusercontent.com/elbrujohalcon/wxhnotepad/76c1f619d39d36e83ee808b5209f37eda45e0694/src/Step5.hs | haskell | | Like Step4 but with Find / Replace support
^ Needed to hold the what the user is looking for
don't even exist
We create a FindReplaceData that will hold the information about the
last search
We create a menu for the window with the same items from previous steps
and a couple of new items in the edit menu
... | module Step5 (step5) where
import Graphics.UI.WX
import Graphics.UI.WXCore hiding (wxID_CUT, wxID_COPY, wxID_PASTE,
wxID_FIND, wxID_FORWARD, wxID_REPLACE, wxID_BACKWARD)
import Data.Bits
import Data.Char (toLower)
import Data.List
| /FRFlags/ represents what the user choose in the ... |
d17149726de928c51ef6a39c7e68106db6824f8b186053f15072414adac2a899 | janestreet/core | date_intf.ml | module type Date = sig
type t = Date0.t
* @inline
val of_time : Time_float.t -> zone:Time_float.Zone.t -> t
val today : zone:Time_float.Zone.t -> t
*
val format : [ `Use_Date_unix ] [@@deprecated "[since 2021-03] Use [Date_unix]"]
val of_tm : [ `Use_Date_unix ] [@@deprecated "[since 2021-03] Use [Date_un... | null | https://raw.githubusercontent.com/janestreet/core/8c81161d689ea21df9acfff1f267c41db0835f77/core/src/date_intf.ml | ocaml | module type Date = sig
type t = Date0.t
* @inline
val of_time : Time_float.t -> zone:Time_float.Zone.t -> t
val today : zone:Time_float.Zone.t -> t
*
val format : [ `Use_Date_unix ] [@@deprecated "[since 2021-03] Use [Date_unix]"]
val of_tm : [ `Use_Date_unix ] [@@deprecated "[since 2021-03] Use [Date_un... | |
e8fff83cd9b149b809d3f03dbc5fa742ab6c958a31348a71dd2076b99828d575 | aiya000/haskell-examples | WeekDays.hs | data Days = Sun | Mon | Tue | Wed | Thu | Fri | Sut
deriving (Show, Enum)
days = [Sun .. Sut]
easyCal :: Int -> IO ()
easyCal 32 = return ()
easyCal x = do
putStr $ show x
putStr " | "
putStrLn $ show $ days !! (x `mod` 7)
easyCal $ x + 1
main = easyCal 1
| null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Room/0_Books/GreatH_Book/Fundament/room/WeekDays.hs | haskell | data Days = Sun | Mon | Tue | Wed | Thu | Fri | Sut
deriving (Show, Enum)
days = [Sun .. Sut]
easyCal :: Int -> IO ()
easyCal 32 = return ()
easyCal x = do
putStr $ show x
putStr " | "
putStrLn $ show $ days !! (x `mod` 7)
easyCal $ x + 1
main = easyCal 1
| |
653678b5b2b47bc758fcc8120e7ffe28b0bbd377a8b13cab89f20e91a4b06e46 | travelping/ergw | ergw_socket_reg.erl | Copyright 2015 - 2020 Travelping GmbH < >
%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(ergw_socket... | null | https://raw.githubusercontent.com/travelping/ergw/1b6cc3ee89eea4cf9df1d7de612744f0a850dfd9/apps/ergw_core/src/ergw_socket_reg.erl | erlang | This program is free software; you can redistribute it and/or
API
regine_server callbacks
--------------------------------------------------------------------
Include files
--------------------------------------------------------------------
===================================================================
API... | Copyright 2015 - 2020 Travelping GmbH < >
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation ; either version
2 of the License , or ( at your option ) any later version .
-module(ergw_socket_reg).
-behaviour(regine_server).
-export([start_link/0]).
-exp... |
c7369034e49afca82331777a8fa600179b9e8632ec3cb5417bb67af7406e3ad8 | motemen/jusk | JSType.hs | {-
JSType.hs
型変換
-}
module JSType where
import Prelude hiding (toInteger)
import DataTypes
import Parser (numericLiteral)
import ParserUtil (runLex)
import Internal
import Eval
toPrimitive :: Value -> String -> Evaluate Value
toPrimitive Undefined _ =
return Undefined
toPrimitive Null _ =
return Nul... | null | https://raw.githubusercontent.com/motemen/jusk/4975915b8550aa09c452fb89dcad7bfcb1037c39/src/JSType.hs | haskell |
JSType.hs
型変換
|
module JSType where
import Prelude hiding (toInteger)
import DataTypes
import Parser (numericLiteral)
import ParserUtil (runLex)
import Internal
import Eval
toPrimitive :: Value -> String -> Evaluate Value
toPrimitive Undefined _ =
return Undefined
toPrimitive Null _ =
return Null
toPrimitive bool@(Boolean... |
265503979a9bac168ef470a745156130f34fda8a7df963be017d4a32562df63e | lokedhs/maxima-client | package.lisp | (defpackage :infoparser
(:use :cl :maxima-client.common)
(:export #:parse-file
#:resolve-example-code
#:generate-doc-directory))
| null | https://raw.githubusercontent.com/lokedhs/maxima-client/f33161bf345a9831475e6ac66004dda2f80a9e72/infoparser/package.lisp | lisp | (defpackage :infoparser
(:use :cl :maxima-client.common)
(:export #:parse-file
#:resolve-example-code
#:generate-doc-directory))
| |
87e3b5e63f9cafb8fb6f7aa0beca5b6bfed4ccb0ae692938685080a5736d3e12 | e-bigmoon/haskell-blog | Quiz5.hs | #!/usr/bin/env stack
-- stack script --resolver lts-11.0
import Conduit
sink :: Monad m => ConduitM Int o m (String, Int)
sink = do
x <- takeC 5 .| mapC show .| foldC
y <- sumC
return (x, y)
main :: IO ()
main = do
let res = runConduitPure $ yieldMany [1..10] .| sink
print res
| null | https://raw.githubusercontent.com/e-bigmoon/haskell-blog/5c9e7c25f31ea6856c5d333e8e991dbceab21c56/quiz/Quiz5.hs | haskell | stack script --resolver lts-11.0 | #!/usr/bin/env stack
import Conduit
sink :: Monad m => ConduitM Int o m (String, Int)
sink = do
x <- takeC 5 .| mapC show .| foldC
y <- sumC
return (x, y)
main :: IO ()
main = do
let res = runConduitPure $ yieldMany [1..10] .| sink
print res
|
9199924115d436cc0abc4522200a434991bcd6ee4a0deb9b73b8e8db3f7ae6fb | imrehg/ypsilon | records.scm | #!core
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (core records)
(export make-record-type-descriptor
record-type-descriptor?
make-record-constructor-descriptor
record-constru... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/stdlib/core/records.scm | scheme | [end] | #!core
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (core records)
(export make-record-type-descriptor
record-type-descriptor?
make-record-constructor-descriptor
record-constru... |
89f36ebf4305422e8a471088998aa56ab229f6f20b5e344bfb0b3fcfd4d560af | isovector/reviews | Main.hs | # LANGUAGE TypeApplications #
module Main where
import BialgebraSorting.Scratch
import Criterion.Main
import Test.QuickCheck
import Data.Traversable (for)
import Data.List (sort)
import BialgebraSorting (quickSort, treeSort, quickTree, treeQuick)
main :: IO ()
main = do
(defaultMain =<<) $
for [100000, 200000,... | null | https://raw.githubusercontent.com/isovector/reviews/d4dfc42aa2b993a6b0d536a6d96bef4e86f30f65/app/Main.hs | haskell | # LANGUAGE TypeApplications #
module Main where
import BialgebraSorting.Scratch
import Criterion.Main
import Test.QuickCheck
import Data.Traversable (for)
import Data.List (sort)
import BialgebraSorting (quickSort, treeSort, quickTree, treeQuick)
main :: IO ()
main = do
(defaultMain =<<) $
for [100000, 200000,... | |
20474af4b473f48d2a0bcea839cc8fa13d06c894946d98b38657d359722b6ad8 | originrose/cortex | project.clj | (defproject docker "0.9.23-SNAPSHOT"
:description "A simple example of how to run a cortex application in a docker container."
:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
[thinktopic/cortex "0.9.22"]
[org.bytedeco.javacpp-presets/cuda "8.0-1.2"]]
:main docker-example.co... | null | https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/examples/docker-example/project.clj | clojure | (defproject docker "0.9.23-SNAPSHOT"
:description "A simple example of how to run a cortex application in a docker container."
:dependencies [[org.clojure/clojure "1.9.0-alpha17"]
[thinktopic/cortex "0.9.22"]
[org.bytedeco.javacpp-presets/cuda "8.0-1.2"]]
:main docker-example.co... | |
e76a2d103bfbacf16357cb6f1c06aaeaf4cc3090ee9cb44c749f9523b7beea51 | webyrd/n-grams-for-synthesis | variant-dynamic-ordering.scm | (define *output-table-file-name* "tmp/variant-dynamic-ordering-table.scm")
(define allow-incomplete-search? #f)
(define lookup-optimization? #f)
(load "mk-vicare.scm")
(load "mk.scm")
(load "test-check.scm")
(load "interp-core.scm")
(load "construct-ordering.scm")
(load "interp-simplified-dynamic.scm")
(load "simpli... | null | https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/variant-dynamic-ordering.scm | scheme | (define *output-table-file-name* "tmp/variant-dynamic-ordering-table.scm")
(define allow-incomplete-search? #f)
(define lookup-optimization? #f)
(load "mk-vicare.scm")
(load "mk.scm")
(load "test-check.scm")
(load "interp-core.scm")
(load "construct-ordering.scm")
(load "interp-simplified-dynamic.scm")
(load "simpli... | |
80627359b9581cb68ea20931e944e09dbfd55a6370a59d6076aef539621ad89a | hkuplg/fcore | TestInh.hs | # OPTIONS -XTypeOperators -XMultiParamTypeClasses #
module TestInh where
-- class (:<) r1 r2 where
-- to :: r1 -> r2
-- override :: r1 -> (r2 -> r2) -> r1
newtype R1 = R1 {fun1 :: Int -> Int}
data R2 = R2 {toR1 :: R1, fun2 :: Int -> Int}
t1 this = R1 (\n -> if (n==0) then 1 else fun1 this (n-1))
t2 this = R2... | null | https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/frontend/TestInh.hs | haskell | class (:<) r1 r2 where
to :: r1 -> r2
override :: r1 -> (r2 -> r2) -> r1 | # OPTIONS -XTypeOperators -XMultiParamTypeClasses #
module TestInh where
newtype R1 = R1 {fun1 :: Int -> Int}
data R2 = R2 {toR1 :: R1, fun2 :: Int -> Int}
t1 this = R1 (\n -> if (n==0) then 1 else fun1 this (n-1))
t2 this = R2 (toR1 this) (\n -> if (n==1) then fun1 (toR1 this) n else fun2 this (n-1))
new f = l... |
55fd2e56d56918d7f1e3219a695bd5fa9eca4a4c12b850d266108b0702dc46b2 | maranget/hevea | latexscan.mli | (***********************************************************************)
(* *)
(* HEVEA *)
(* *)
, projet PARA , INR... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/latexscan.mli | ocaml | *********************************************************************
HEVEA
... | , projet PARA , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Lexstate
module type S =
sig
val no_prelude : unit -> unit
val translate_put_unicode : char -> (u... |
48355d90a75792dcf47f31c9874ecb282b7fdc6b9d8809f75dd3ae76f7d17b37 | ccqpein/Github-API-CL | api-doc.lisp | github api documents
(defpackage #:github-api-doc
(:use #:CL)
(:export #:api-doc
#:http-method
#:read-api-json
#:make-api-doc-from-json
#:make-call-parameters
#:make-call-url)
)
(in-package #:github-api-doc)
(defparameter *api-root-url* "")
(defparameter ... | null | https://raw.githubusercontent.com/ccqpein/Github-API-CL/c7331931d437fdda037d41dcf15e3f664f1a0bfb/api-doc.lisp | lisp | (:slot-name...)
((para, type)...)
update method
split api url
make slot finder funtion
make string to keyword
ss should be integar or string
it might be "true", "false", or ""
integer can be integer from keyword, or string from (read-line)
return "" instead of 0 is fine. It will be cleaned anyway.
if from ke... | github api documents
(defpackage #:github-api-doc
(:use #:CL)
(:export #:api-doc
#:http-method
#:read-api-json
#:make-api-doc-from-json
#:make-call-parameters
#:make-call-url)
)
(in-package #:github-api-doc)
(defparameter *api-root-url* "")
(defparameter ... |
99bdd64fd346cdee7db9a8d72462b500d57d3b1b3c0b782905e4e94ee1f17e0a | benoitc/erlang-metrics | metrics_sup.erl |
Created by benoitc on 26/06/16 .
-module(metrics_sup).
-author("Benoit Chesneau").
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
-define(SERVER, ?MODULE).
%%%===================================================================
%%% API functions
%%%===========... | null | https://raw.githubusercontent.com/benoitc/erlang-metrics/3ea572b5b6ca4a3e5dfc12009058f8771baf5789/src/metrics_sup.erl | erlang | API
Supervisor callbacks
===================================================================
API functions
===================================================================
===================================================================
Supervisor callbacks
====================================================... |
Created by benoitc on 26/06/16 .
-module(metrics_sup).
-author("Benoit Chesneau").
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
-spec start_link() -> {ok, pid()} | {error, term()}.
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
-spec ... |
91ebced88b59076091b44c600088ae464beba5e2ef371b9efba44f2f4ed7cfc6 | HealthSamurai/ql | core_test.clj | (ns ql.core-test
(:require [ql.core :as sut]
[clojure.test :refer :all]
[matcho.core :as matcho]
[ql.core :as ql]))
(deftest test-ql
(testing "select"
(matcho/match
(sut/sql {:ql/type :ql/projection
:alias :column
:constant "string"
... | null | https://raw.githubusercontent.com/HealthSamurai/ql/145241ee7484a9e8a6c106c271505f2e3f0788ee/test/ql/core_test.clj | clojure | (ns ql.core-test
(:require [ql.core :as sut]
[clojure.test :refer :all]
[matcho.core :as matcho]
[ql.core :as ql]))
(deftest test-ql
(testing "select"
(matcho/match
(sut/sql {:ql/type :ql/projection
:alias :column
:constant "string"
... | |
91a02eef2d81d66d5b8afdfcc035476771cb0ace4ad90cf4e2f2ac5f3437ce5f | achirkin/qua-view | UserAction.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# OPTIONS_GHC -fno - warn - orphans #
module Program.UserAction
( QEventTag (..)
, ScId (..)
) where
import Commons.NoReflex
import Model.Scenario.Properties (PropName)
import Model.Scenario.Object... | null | https://raw.githubusercontent.com/achirkin/qua-view/62626ead828889a1c7ef1fdba4d84324eb5420b3/src/Program/UserAction.hs | haskell | # LANGUAGE GADTs #
| Represents a scenario id.
| Event types fired by user actions
| User wants to save scenario with this name.
| User selects a scenario in the scenario list.
| User wants to clear all geometry.
| User wants to reset camera to its default position.
| User selected a property so that we can colo... | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Program.UserAction
( QEventTag (..)
, ScId (..)
) where
import Commons.NoReflex
import Model.Scenario.Properties (PropName)
import Model.Scenario.Object (ObjectId)
TODO :... |
104ad04e50c529ad13c0f9243d43dfe18f850299156c7092f284447fff8800c5 | mstksg/functor-combinators | Step.hs | {-# LANGUAGE EmptyDataDeriving #-}
-- |
-- Module : Control.Applicative.Step
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- This module provides functor combinators that are the fixed points of
-- applications of ':+:' and... | null | https://raw.githubusercontent.com/mstksg/functor-combinators/e8158b6055be08f37525414068884a9d94b3bcf9/src/Control/Applicative/Step.hs | haskell | # LANGUAGE EmptyDataDeriving #
|
Module : Control.Applicative.Step
License : BSD3
Stability : experimental
Portability : non-portable
This module provides functor combinators that are the fixed points of
applications of ':+:' and 'Data.Functor.These.These1'. They are useful
for their 'Data.HFuncto... |
Copyright : ( c ) 2019
Maintainer :
module Control.Applicative.Step (
Step(..)
, Steps(..)
, Flagged(..)
, stepUp
, stepDown
, stepping
, stepsUp
, stepsDown
, steppings
, absurd1
, Void2
, absurd2
, Void3
, absurd3
) where
import Control.Natural
import ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.