_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 |
|---|---|---|---|---|---|---|---|---|
85d2a9b33921ba7580ec83a5839615d8471a4e6447392c19797b729785ee1e20 | windock/erlyvideo | misultin_gen_server.erl | % ==========================================================================================================
MISULTIN - Example : Running Misultin from a gen_server .
%
% >-|-|-(°>
%
Copyright ( C ) 2009 , < >
% All rights reserved.
%
% BSD License
%
% Redistribution and use in source and binary forms, with or... | null | https://raw.githubusercontent.com/windock/erlyvideo/80fdc4175de86f0ab5fb6db20a5b3c2fd4d5a075/deps/misultin/examples/misultin_gen_server.erl | erlang | ==========================================================================================================
>-|-|-(°>
All rights reserved.
BSD License
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
* Redistribu... | MISULTIN - Example : Running Misultin from a gen_server .
Copyright ( C ) 2009 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR FOR
ANY DIRECT , INDIRECT , INCIDENTAL , SP... |
d7767a547b466650ca120f7312d29e8ee3d1c56bb6a3333a237d758dc7030884 | rumblesan/improviz | LoadShaders.hs | --------------------------------------------------------------------------------
-- |
Module : LoadShaders
Copyright : ( c ) 2013
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
Utilities for shader handling , adapted from which is ( c ) T... | null | https://raw.githubusercontent.com/rumblesan/improviz/23e16ae7b2d55d2204417ec60c7cb6673a93df7d/src/Gfx/LoadShaders.hs | haskell | ------------------------------------------------------------------------------
|
License : BSD3
Stability : stable
Portability : portable
Red Book Authors.
------------------------------------------------------------------------------
--------------------------------------------------------------------... | Module : LoadShaders
Copyright : ( c ) 2013
Maintainer : < >
Utilities for shader handling , adapted from which is ( c ) The
module Gfx.LoadShaders
( ShaderSource(..)
, ShaderInfo(..)
, loadShaders
) where
import Control.Exception
import Control.Monad
import q... |
12a87345d83537817a5ca0bec363c7131e5d3fba95427c460c3a39ed811c8f0b | clojure-emacs/clj-suitable | nrepl.clj | (ns suitable.nrepl
(:require cider.nrepl
cider.piggieback
[clojure.pprint :refer [cl-format pprint]]
nrepl.core
nrepl.server
[suitable.middleware :refer [wrap-complete]]))
;; -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
;; a la
1 . start nrep... | null | https://raw.githubusercontent.com/clojure-emacs/clj-suitable/223f890ce6af23e764276c5d26303564a8cafd86/src/dev/suitable/nrepl.clj | clojure | -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
a la
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
handler (nrepl.server/default-handler #'cider.piggieback/wrap-cljs-repl) | (ns suitable.nrepl
(:require cider.nrepl
cider.piggieback
[clojure.pprint :refer [cl-format pprint]]
nrepl.core
nrepl.server
[suitable.middleware :refer [wrap-complete]]))
1 . start nrepl server with piggieback
2 . get session
3 . send cljs start for... |
ba3adc729b5c1de730181f17366447a99b69498e5d3aa71ad6e2afedea171758 | dimitri/pgloader | mssql.lisp | ;;;
;;; Tools to handle the MS SQL Database
;;;
(in-package :pgloader.source.mssql)
(defmethod map-rows ((mssql copy-mssql) &key process-row-fn)
"Extract Mssql data and call PROCESS-ROW-FN function with a single
argument (a list of column values) for each row."
(with-connection (*mssql-db* (source-db mssql))
... | null | https://raw.githubusercontent.com/dimitri/pgloader/3047c9afe141763e9e7ec05b7f2a6aa97cf06801/src/sources/mssql/mssql.lisp | lisp |
Tools to handle the MS SQL Database
SQL, when given definitions rather than existing view names.
fetch view (and their columns) metadata, covering comments too
return how many objects we're going to deal with in total
for stats collection
be sure to return the catalog itself |
(in-package :pgloader.source.mssql)
(defmethod map-rows ((mssql copy-mssql) &key process-row-fn)
"Extract Mssql data and call PROCESS-ROW-FN function with a single
argument (a list of column values) for each row."
(with-connection (*mssql-db* (source-db mssql))
(let* ((sql (format nil "SELECT ~{~a~^, ~} F... |
1477ade4352e12693e386ff0895e990b871e84097a04e670644cda1202450a00 | PaulBatchelor/codex | pdosc.scm | ;; Generated from pdosc.org, from the frags collection
(define (pdosc freq amt ft)
(trd
(pdhalf
(phasor (freq) (param 0))
(amt))
ft))
| null | https://raw.githubusercontent.com/PaulBatchelor/codex/e6f6c9613c90b319f07863197498681d723debc2/frags/pdosc.scm | scheme | Generated from pdosc.org, from the frags collection | (define (pdosc freq amt ft)
(trd
(pdhalf
(phasor (freq) (param 0))
(amt))
ft))
|
1012448a485596885216d5afca8d6a494abca1eb951076fa9347571140ae1fc7 | cwtsteven/TSD | alt_sum.ml | open Tsd
let state_machine init trans input =
let init = lift init and trans = lift trans in
let state = cell [%dfg init] in
state <~ [%dfg trans state input];
state
let alt = state_machine 1 (fun s _ -> 1 - s) (lift 0)
let sum inp = state_machine 0 (fun s i -> i + s) inp
let alt_sum = sum alt
let _ = ... | null | https://raw.githubusercontent.com/cwtsteven/TSD/32bd2cbca6d445ff6b0caecdbb2775de61fdfc6d/benchmarks/alt_sum/alt_sum.ml | ocaml | open Tsd
let state_machine init trans input =
let init = lift init and trans = lift trans in
let state = cell [%dfg init] in
state <~ [%dfg trans state input];
state
let alt = state_machine 1 (fun s _ -> 1 - s) (lift 0)
let sum inp = state_machine 0 (fun s i -> i + s) inp
let alt_sum = sum alt
let _ = ... | |
0e1f7923c43be27b335f68cb692fa37cfd2e704a20c0017d50d05d5e10ff1456 | nathanmarz/cascalog | testing.clj | (ns cascalog.logic.testing
(:require [clojure.test :refer :all]
[cascalog.api :refer :all]
[jackknife.seq :refer (collectify multi-set)]
[cascalog.logic.platform :as platform]))
(defn doublify
"Takes a sequence of tuples and converts all numbers to doubles.
For example:
(... | null | https://raw.githubusercontent.com/nathanmarz/cascalog/deaad977aa98985f68f3d1cc3e081d345184c0c8/cascalog-core/src/clj/cascalog/logic/testing.clj | clojure | (ns cascalog.logic.testing
(:require [clojure.test :refer :all]
[cascalog.api :refer :all]
[jackknife.seq :refer (collectify multi-set)]
[cascalog.logic.platform :as platform]))
(defn doublify
"Takes a sequence of tuples and converts all numbers to doubles.
For example:
(... | |
5569f1f7d49860e7de90e85157dd4358065e2fa4129200c4e78b485bbc600968 | CloudI/CloudI | epgsql_cmd_batch.erl | %% @doc Execute multiple extended queries in a single network round-trip
%%
There are 2 kinds of interface :
%% <ol>
%% <li>To execute multiple queries, each with it's own `statement()'</li>
%% <li>To execute multiple queries, but by binding different parameters to the
%% same `statement()'</li>
%% </ol>
%% ```
%%... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_epgsql/src/epgsql_cmd_batch.erl | erlang | @doc Execute multiple extended queries in a single network round-trip
<ol>
<li>To execute multiple queries, each with it's own `statement()'</li>
<li>To execute multiple queries, but by binding different parameters to the
same `statement()'</li>
</ol>
```
> {Bind
> Execute
< CommandComplete}*
> Sync
<... | There are 2 kinds of interface :
< BindComplete
< DataRow *
-module(epgsql_cmd_batch).
-behaviour(epgsql_command).
-export([init/1, execute/2, handle_message/4]).
-export_type([arguments/0, response/0]).
-include("epgsql.hrl").
-include("epgsql_protocol.hrl").
-record(batch,
{batch :: [ [epgsql:bin... |
6205511b3bf356d05f6f262a2cdf7c957e478b4c5074819f1d36cb3a190da62c | chaoxu/fancy-walks | A.hs | {-# OPTIONS_GHC -O2 #-}
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteStri... | null | https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/code.google.com/codejam/Google%20Code%20Jam%202008/Round%202/A.hs | haskell | # OPTIONS_GHC -O2 # |
import Data.List
import Data.Maybe
import Data.Char
import Data.Array.IArray
import Data.Array.Unboxed (UArray)
import Data.Int
import Data.Ratio
import Data.Bits
import Data.Function
import Data.Ord
import Control.Monad.State
import Control.Monad
import Control.Applicative
import Data.ByteString.Char8 (ByteString)
im... |
00be6314a7e957692e029ed260701159a9adb190e55ca974433a86a845607640 | BioHaskell/hPDB | PDBEventPrinter.hs | # LANGUAGE OverloadedStrings , PatternGuards , CPP #
-- | Low-level output routines: printing any 'PDBEvent'.
module Bio.PDB.EventParser.PDBEventPrinter(print, isPrintable)
where
import qualified Prelude(String)
import Prelude((++), Bool(True, False), (.), ($), Int, (+), (>), (<), show, Double)
import Text.Printf(hPr... | null | https://raw.githubusercontent.com/BioHaskell/hPDB/5be747e2f2c57370b498f4c11f9f1887fdab0418/Bio/PDB/EventParser/PDBEventPrinter.hs | haskell | | Low-level output routines: printing any 'PDBEvent'.
| Prints a PDBEvent to a filehandle.
la justifies anything else (floating point or integer number) to the left
align coordinate float
align property float
TODO: split when longer than X residues
print errors:
print special case for missing...
| For indicati... | # LANGUAGE OverloadedStrings , PatternGuards , CPP #
module Bio.PDB.EventParser.PDBEventPrinter(print, isPrintable)
where
import qualified Prelude(String)
import Prelude((++), Bool(True, False), (.), ($), Int, (+), (>), (<), show, Double)
import Text.Printf(hPrintf)
import System.IO(Handle, IO, stderr)
import qualifi... |
bffaa283aa7ef1b27f472318d2adb8a9b2b9d07218cfdf99a56f8c721e672036 | chetmurthy/ensemble | appl_multi.ml | (**************************************************************)
APPL_MULTI.ML : Multiplexion of interfaces
Author : Ohad Rodeh 11/97
(**************************************************************)
open Trans
open Hsys
open Util
open View
open Appl_intf
open New
open Arge
(**********************************... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/appl/appl_multi.ml | ocaml | ************************************************************
************************************************************
************************************************************
************************************************************
View change.
********************************************************... | APPL_MULTI.ML : Multiplexion of interfaces
Author : Ohad Rodeh 11/97
open Trans
open Hsys
open Util
open View
open Appl_intf
open New
open Arge
let name = Trace.file "APPL_MULTI"
let failwith s = Trace.make_failwith name s
type header = Appl_intf.appl_multi_header
let f iv =
let log = Trace.log name
an... |
9df3f414903c35779292a6e1954ea2585992a1dd98c9b5992396538aa549405f | nklein/clifford | add.lisp | (in-package #:clifford)
(defun %nullary-addition (info)
`(defmethod nullary-+ ((x ,(name info)))
,(scalar-zero info)))
(defun %unary-addition (info)
`(defmethod unary-+ ((x ,(name info)))
x))
(defun %binary-addition (info)
`(defmethod binary-+ ((x ,(name info)) (y ,(name info)))
(,(constructor i... | null | https://raw.githubusercontent.com/nklein/clifford/2ba9b9a8f68eb88c2821341dfac2f2a61c2f84ce/src/add.lisp | lisp | (in-package #:clifford)
(defun %nullary-addition (info)
`(defmethod nullary-+ ((x ,(name info)))
,(scalar-zero info)))
(defun %unary-addition (info)
`(defmethod unary-+ ((x ,(name info)))
x))
(defun %binary-addition (info)
`(defmethod binary-+ ((x ,(name info)) (y ,(name info)))
(,(constructor i... | |
1f5464c338bcf50b0ebba0d937b6b0b55ba04565aba166bf080c0b66ed9a1519 | logseq/logseq | db.cljs | (ns frontend.db
"Main entry ns for db related fns"
(:require [clojure.core.async :as async]
[datascript.core :as d]
[logseq.db.schema :as db-schema]
[frontend.db.conn :as conn]
[logseq.db.default :as default-db]
[frontend.db.model]
[frontend.db... | null | https://raw.githubusercontent.com/logseq/logseq/6a5b0c819975a36aa91b84f73dec32d2ed483503/src/main/frontend/db.cljs | clojure | TODO: remove later
backward compatibility
persisting DBs between page reloads
It's ok to not persist here since new changes
will be notified when restarting the app.
(state/set-db-persisted! repo true)
only save when user's idle
skip initial txs
sync with other windows if needed | (ns frontend.db
"Main entry ns for db related fns"
(:require [clojure.core.async :as async]
[datascript.core :as d]
[logseq.db.schema :as db-schema]
[frontend.db.conn :as conn]
[logseq.db.default :as default-db]
[frontend.db.model]
[frontend.db... |
a380a51357bfdca83b5797eab08d40a76dc24dc0ea802c0da065a6e979be34b8 | WormBase/wormbase_rest | associations.clj | (ns rest-api.classes.expression-cluster.widgets.associations
(:require
[rest-api.formatters.object :as obj :refer [pack-obj]]
[rest-api.classes.generic-fields :as generic]))
(defn life-stages [ec]
{:data (when-let [lss (:expression-cluster/life-stage ec)]
(for [ls lss]
{:life_stages... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/expression_cluster/widgets/associations.clj | clojure | non in the database | (ns rest-api.classes.expression-cluster.widgets.associations
(:require
[rest-api.formatters.object :as obj :refer [pack-obj]]
[rest-api.classes.generic-fields :as generic]))
(defn life-stages [ec]
{:data (when-let [lss (:expression-cluster/life-stage ec)]
(for [ls lss]
{:life_stages... |
bc815c5591aaa36ef93377877d48bd7f5baddd17a56b599a44ec20b358f6c2be | LightTable/LightTable | tabs.cljs | (ns lt.objs.tabs
"Manage tabsets and tabs"
(:require [lt.object :refer [object* behavior*] :as object]
[lt.objs.editor :as editor]
[lt.objs.canvas :as canvas]
[lt.objs.command :as cmd]
[lt.objs.animations :as anim]
[lt.objs.context :as ctx]
[lt... | null | https://raw.githubusercontent.com/LightTable/LightTable/57f861ae5b33d21ef8c7d064dd026a2b1a98fa87/src/lt/objs/tabs.cljs | clojure | Disable middle-click pasting in linux
Remove old tabs
*********************************************************
Behaviors
*********************************************************
*********************************************************
Commands
********************************************************* | (ns lt.objs.tabs
"Manage tabsets and tabs"
(:require [lt.object :refer [object* behavior*] :as object]
[lt.objs.editor :as editor]
[lt.objs.canvas :as canvas]
[lt.objs.command :as cmd]
[lt.objs.animations :as anim]
[lt.objs.context :as ctx]
[lt... |
1355e55c50f0b1d799872f8b5246f86a06014b63c5225013683c42e61308459f | incoherentsoftware/defect-process | AttackDescriptions.hs | module Enemy.All.Flying.AttackDescriptions
( EnemyAttackDescriptions(..)
, mkEnemyAttackDescs
) where
import Control.Monad.IO.Class (MonadIO)
import Attack
import FileCache
import Window.Graphics
data EnemyAttackDescriptions = EnemyAttackDescriptions
{ _shoot :: AttackDescription
, _fireball :... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Enemy/All/Flying/AttackDescriptions.hs | haskell | module Enemy.All.Flying.AttackDescriptions
( EnemyAttackDescriptions(..)
, mkEnemyAttackDescs
) where
import Control.Monad.IO.Class (MonadIO)
import Attack
import FileCache
import Window.Graphics
data EnemyAttackDescriptions = EnemyAttackDescriptions
{ _shoot :: AttackDescription
, _fireball :... | |
19525123310d6f6b18497fe6903501ccf65a36274e3c23b18653a80e5b80e0ac | kaoskorobase/mescaline | Clock.hs | module Mescaline.Clock (
Tempo
, fromBps
, Time(..)
, Clock
, mkClock
, tempo
, elapsed
, logical
, beatsToSeconds
, secondsToBeats
, setTempo
, setElapsed
, setLogical
) where
import Mescaline.Time (Beats, Seconds)
data Tempo = Tempo {
beatsPerSecond :: Double
, secondsPerBeat :: Do... | null | https://raw.githubusercontent.com/kaoskorobase/mescaline/13554fc4826d0c977d0010c0b4fb74ba12ced6b9/lib/mescaline-patterns/src/Mescaline/Clock.hs | haskell | module Mescaline.Clock (
Tempo
, fromBps
, Time(..)
, Clock
, mkClock
, tempo
, elapsed
, logical
, beatsToSeconds
, secondsToBeats
, setTempo
, setElapsed
, setLogical
) where
import Mescaline.Time (Beats, Seconds)
data Tempo = Tempo {
beatsPerSecond :: Double
, secondsPerBeat :: Do... | |
8666ef8bb586b7cfc20e6cada6cc084f5916c99626fa38d1cd82697eb9511851 | input-output-hk/project-icarus-importer | Simple.hs | # LANGUAGE TypeFamilies #
-- | Simple implementation of slotting.
module Pos.Slotting.Impl.Simple
( SimpleSlottingStateVar
, mkSimpleSlottingStateVar
, SimpleSlottingMode
, MonadSimpleSlotting
, getCurrentSlotSimple
, getCurrentSlotSimple'
, getCurrentSlotBlockingSimp... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/infra/Pos/Slotting/Impl/Simple.hs | haskell | | Simple implementation of slotting.
--------------------------------------------------------------------------
Mode
--------------------------------------------------------------------------
--------------------------------------------------------------------------
---------------------------------------------------... | # LANGUAGE TypeFamilies #
module Pos.Slotting.Impl.Simple
( SimpleSlottingStateVar
, mkSimpleSlottingStateVar
, SimpleSlottingMode
, MonadSimpleSlotting
, getCurrentSlotSimple
, getCurrentSlotSimple'
, getCurrentSlotBlockingSimple
, getCurrentSlotBlockingSimple... |
b0882542afadd2c6030f04a219fe0294448ec61dc1f08aad0e926b260faff178 | inconvergent/weir | plot-paths.lisp | (in-package #:weir-tests)
(defun %main-plot-paths ()
(rnd:set-rnd-state 76)
(let* ((size 1000d0)
(mid (vec:rep (* 0.5d0 size)))
(psvg (draw-svg:make* :height size :width size))
(wer (weir:make)))
(weir:add-path! wer (bzspl:adaptive-pos
(bzspl:make (rnd:n... | null | https://raw.githubusercontent.com/inconvergent/weir/3c364e3a0e15526f0d6985f08a57b312b5c35f7d/test/plot-paths.lisp | lisp | (in-package #:weir-tests)
(defun %main-plot-paths ()
(rnd:set-rnd-state 76)
(let* ((size 1000d0)
(mid (vec:rep (* 0.5d0 size)))
(psvg (draw-svg:make* :height size :width size))
(wer (weir:make)))
(weir:add-path! wer (bzspl:adaptive-pos
(bzspl:make (rnd:n... | |
8bc29261825dbaac036e149bd140dc9430d5886cc84bf40c4d814c53d2e86482 | weyrick/roadsend-php | php-gtk-signals.scm | ;; ***** BEGIN LICENSE BLOCK *****
Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
;;
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
as published by the Free Software Foundation ; either version 2.... | null | https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/ext/gtk2/php-gtk-signals.scm | scheme | ***** BEGIN LICENSE BLOCK *****
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
either version 2.1
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | Roadsend PHP Compiler Runtime Libraries
Copyright ( C ) 2007 Roadsend , Inc.
of the License , or ( at your option ) any later version .
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
Foundation , Inc. , 51 Franklin Street , Fifth... |
438ed09185b0f3f51b7df64b8c8542c0d6665eba8a32bf472defa435916bb4ee | hellonico/origami-dnn | cam.clj | (ns origami-dnn.demo.ssdnet.cam
(:require [origami-dnn.net.mobilenet :refer [find-objects]]
[opencv4.dnn :as dnn]
[opencv4.dnn.core :as origami-dnn]
[origami-dnn.draw :as d]
[opencv4.utils :refer [resize-by simple-cam-window]]))
(defn -main [& args]
(let [ [net opts ... | null | https://raw.githubusercontent.com/hellonico/origami-dnn/f55a32d0d3d528fcf57aaac10cfb20c7998b380c/src/origami_dnn/demo/ssdnet/cam.clj | clojure | (-main)
(def spec "networks.caffe:mobilenet:1.0.0") | (ns origami-dnn.demo.ssdnet.cam
(:require [origami-dnn.net.mobilenet :refer [find-objects]]
[opencv4.dnn :as dnn]
[opencv4.dnn.core :as origami-dnn]
[origami-dnn.draw :as d]
[opencv4.utils :refer [resize-by simple-cam-window]]))
(defn -main [& args]
(let [ [net opts ... |
4b74fddacdd57f2011698996728e5342dfec1112f317fed9ed16a3391a349b28 | reflex-frp/reflex-native | Types.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE Undecid... | null | https://raw.githubusercontent.com/reflex-frp/reflex-native/5fb6a07845e4f7c51f97e9c8ce1a48009f341246/reflex-native-test/src/Reflex/Native/Test/Types.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
* Unique identities
* Test views
** Test views as diagnostic text
** Traversing a test view hierarchy
* Test execution environment and evaluation monad
|A unique identity for a test view, holder, marker, or similar thing qualified by what it's an identity for... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
|Types used throughout " Reflex . Native . Te... |
ecc9846fa6c91bf31943870792c3e3bcc282e8b752af4ddde77ca226c0a95662 | ygmpkk/house | VertexSpec.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.VertexSpec
Copyright : ( c ) 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : porta... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/VertexSpec.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.VertexSpec
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
------------------------------------------... | Copyright : ( c ) 2003
This module corresponds to section 2.7 ( Vertex Specification ) of the
OpenGL 1.4 specs .
module Graphics.Rendering.OpenGL.GL.VertexSpec (
Vertex(..),
VertexComponent,
Vertex2(..), Vertex3(..), Vertex4(..),
* Auxiliary Vertex Attributes
$ AuxiliaryVertexAttributes
... |
a4cdc26c348773c387884e9dcf6332eac69bfdf9ad5250dd9cec982d211e3ace | cicakhq/potato | views.lisp | (in-package :potato.views)
(declaim #.potato.common::*compile-decl*)
(defmacro ps-view-fix (fields &body body)
`(remove #\Newline (ps-view ,fields ,@body)))
(defun create (id &rest view-defs)
(let ((result (apply #'create-ps-view id view-defs)))
(unless (cdr (assoc :|ok| result))
(error "Error creating... | null | https://raw.githubusercontent.com/cicakhq/potato/88b6c92dbbc80a6c9552435604f7b1ae6f2a4026/src/potato/views.lisp | lisp | This function is a lot more complicated that it needs to be.
Originally we found some weird behaviour where the views were not
created correctly even though the CouchDB calls returns ok. In
order to analyse this, a lot of code was added to check that
everything worked. Later, it was revealed that this was caused b... | (in-package :potato.views)
(declaim #.potato.common::*compile-decl*)
(defmacro ps-view-fix (fields &body body)
`(remove #\Newline (ps-view ,fields ,@body)))
(defun create (id &rest view-defs)
(let ((result (apply #'create-ps-view id view-defs)))
(unless (cdr (assoc :|ok| result))
(error "Error creating... |
9fe348e85e454f3cdc6752b4e96d73850bb7e63429e168f171b7bbfad98daacd | zyrolasting/file-watchers | lists.rkt | #lang racket/base
(require
racket/contract)
(provide
(contract-out
[not-in-list (-> list? procedure?)]
[list-diff (-> list? list? pair?)]))
(define (not-in-list lst)
(λ (v) (not (member v lst))))
(define (list-diff old new)
(cons (filter (not-in-list old) new)
(filter (not-in-list new) old))... | null | https://raw.githubusercontent.com/zyrolasting/file-watchers/c1ac766a345a335438165ab0d13a4d8f6aec6162/lists.rkt | racket | #lang racket/base
(require
racket/contract)
(provide
(contract-out
[not-in-list (-> list? procedure?)]
[list-diff (-> list? list? pair?)]))
(define (not-in-list lst)
(λ (v) (not (member v lst))))
(define (list-diff old new)
(cons (filter (not-in-list old) new)
(filter (not-in-list new) old))... | |
a397b853b563afaade071054a9c4e4c9bbb379b15a66d67bfe62f59602f7c980 | lemmaandrew/CodingBatHaskell | parenBit.hs | {- From
Given a string that contains a single pair of parenthesis, compute recursively a
new string made of only of the parenthesis and their contents, so \"xyz(abc)123\" yields
\"(abc)\".
-}
import Test.Hspec ( hspec, describe, it, shouldBe )
parenBit :: String -> String
parenBit str = undefined
main :: IO ()
m... | null | https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/Recursion-1/parenBit.hs | haskell | From
Given a string that contains a single pair of parenthesis, compute recursively a
new string made of only of the parenthesis and their contents, so \"xyz(abc)123\" yields
\"(abc)\".
| import Test.Hspec ( hspec, describe, it, shouldBe )
parenBit :: String -> String
parenBit str = undefined
main :: IO ()
main = hspec $ describe "Tests:" $ do
it "\"(abc)\"" $
parenBit "xyz(abc)123" `shouldBe` "(abc)"
it "\"(hello)\"" $
parenBit "x(hello)" `shouldBe` "(hello)"
it "\"(xy)\... |
a293a970a8b51efd0c5f00c066ca68fb37375bea0f359bac4e2ce7e6effce6ee | dyzsr/ocaml-selectml | menhirLib.mli | module General : sig
(******************************************************************************)
(* *)
Menhir
(* ... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/boot/menhir/menhirLib.mli | ocaml | ****************************************************************************
special exception on linking, as described in the file LICENSE.
... | module General : sig
Menhir
Copyright . All rights reserved . This file is distributed under
the terms of the GNU Library General Public License version 2 , with a
As of 2017/03/31 , this module is DEPRECATED . It might be remo... |
e2eff1b65913e90ac9fdab85299d4887516caaf35f4f906e31bc5f3674359fa3 | blockapps/merkle-patricia-db | Diff.hs | module Blockchain.Database.MerklePatricia.Diff (dbDiff, DiffOp(..)) where
import Blockchain.Database.MerklePatricia.Internal
import Blockchain.Database.MerklePatricia.NodeData
import Control.Monad
import Control.Monad.Trans.Class
import Control.Monad.Trans.Reader
impo... | null | https://raw.githubusercontent.com/blockapps/merkle-patricia-db/7ea92ea9124e7d89134bbaa661221cd1e3aefc26/src/Blockchain/Database/MerklePatricia/Diff.hs | haskell | Probably the entire MPDB system ought to be in this monad | module Blockchain.Database.MerklePatricia.Diff (dbDiff, DiffOp(..)) where
import Blockchain.Database.MerklePatricia.Internal
import Blockchain.Database.MerklePatricia.NodeData
import Control.Monad
import Control.Monad.Trans.Class
import Control.Monad.Trans.Reader
impo... |
5e49f76748959b161368d5b19fd951ff576f172b21a16a56285357287542e122 | roswell/roswell | list-versions.lisp | (defpackage :roswell.list.versions
(:use :cl :roswell.util))
(in-package :roswell.list.versions)
(defun versions (&rest args)
;; Experimental?
(setf args (cdr args))
(if args
(destructuring-bind (impl version) (parse-version-spec (impl (first args)))
(declare (ignore version))
(format *er... | null | https://raw.githubusercontent.com/roswell/roswell/0107dfb54393aff1a776deb79d58f67f642135cb/lisp/list-versions.lisp | lisp | Experimental? | (defpackage :roswell.list.versions
(:use :cl :roswell.util))
(in-package :roswell.list.versions)
(defun versions (&rest args)
(setf args (cdr args))
(if args
(destructuring-bind (impl version) (parse-version-spec (impl (first args)))
(declare (ignore version))
(format *error-output* "Instal... |
79c2e34429d369382c4db4a1432bbf745353c4fbe71447fba3693269fcd70792 | davisp/couchdb | ibrowse_http_client.erl | %%%-------------------------------------------------------------------
%%% File : ibrowse_http_client.erl
Author : >
%%% Description : The name says it all
%%%
Created : 11 Oct 2003 by >
%%%-------------------------------------------------------------------
-module(ibrowse_http_client).
-behaviour(gen_... | null | https://raw.githubusercontent.com/davisp/couchdb/b0420f9006915149e81607615720f32f21c76725/src/ibrowse/ibrowse_http_client.erl | erlang | -------------------------------------------------------------------
File : ibrowse_http_client.erl
Description : The name says it all
-------------------------------------------------------------------
--------------------------------------------------------------------
Include files
----------------------------... | Author : >
Created : 11 Oct 2003 by >
-module(ibrowse_http_client).
-behaviour(gen_server).
-export([
start_link/1,
start/1,
stop/1,
send_req/7
]).
-ifdef(debug).
-compile(export_all).
-endif.
-export([
init/1,
handle_call/3,
handle... |
eb755f89c4d669c25ad4d464a0a387e2cb625dd09b5da49907c548dbc939e99d | Bogdanp/nemea | config.rkt | #lang racket/base
(require (for-syntax racket/base)
gregor
koyo/config
net/url
racket/port
racket/runtime-path
racket/set
racket/string)
(current-option-name-prefix "NEMEA")
(define-option hostname
#:default "127.0.0.1")
(define-option listen-ip
#:d... | null | https://raw.githubusercontent.com/Bogdanp/nemea/6e6149007fb0c43d8f0fb2271b36f0ccad830703/nemea/config.rkt | racket | #lang racket/base
(require (for-syntax racket/base)
gregor
koyo/config
net/url
racket/port
racket/runtime-path
racket/set
racket/string)
(current-option-name-prefix "NEMEA")
(define-option hostname
#:default "127.0.0.1")
(define-option listen-ip
#:d... | |
399776977c1f9cd7d45070cfd06e9c5900d6925c8d4afb8e5cea768da0b6f015 | fetburner/Coq2SML | term.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/checker/term.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
This defines the strategy to use fo... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This module instantiates th... |
7b9f69447894540b58745c43e0355af18300754aab5bbf5c1b521fac27b1c3db | ucsd-progsys/liquid-fixpoint | UndoANFTests.hs | {-# LANGUAGE OverloadedStrings #-}
module UndoANFTests(tests) where
import Language.Fixpoint.Types (SortedReft(..), Symbol,
isPrefixOfSym, anfPrefix, syms)
import Language.Fixpoint.Solver.EnvironmentReduction (undoANFSimplifyingWith)
import Arbitrary
import qualified Data.HashMap.Stric... | null | https://raw.githubusercontent.com/ucsd-progsys/liquid-fixpoint/ebf1b6ea02ba21b67b5e12b328505a2d5cb6cc13/tests/tasty/UndoANFTests.hs | haskell | # LANGUAGE OverloadedStrings #
adjustOption . min because we don't want to default to the enormous value.
| 5 seconds (in microseconds).
| We perform tests with only trivial lenses (i.e. id)
--------------------------------------------------
-------------------------------------------------- |
module UndoANFTests(tests) where
import Language.Fixpoint.Types (SortedReft(..), Symbol,
isPrefixOfSym, anfPrefix, syms)
import Language.Fixpoint.Solver.EnvironmentReduction (undoANFSimplifyingWith)
import Arbitrary
import qualified Data.HashMap.Strict as M
import Test.Tasty (TestTree,... |
8a5d150004ece1ac2bd7e9aea47687a65bb89d62b206246657f94c1e6f95b132 | input-output-hk/plutus | InterList.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module PlutusCore.Examples.Data.InterList
( interListData
, interNil
, interCons
, foldrInterList
) where
import PlutusCore.Core
import PlutusCore.MkPlc
import PlutusCore.Name
import PlutusCore.Quote
import PlutusCore.StdLib.Da... | null | https://raw.githubusercontent.com/input-output-hk/plutus/1f31e640e8a258185db01fa899da63f9018c0e85/plutus-core/plutus-core/examples/PlutusCore/Examples/Data/InterList.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
so if you change it here, then also change it there.
|
module PlutusCore.Examples.Data.InterList
( interListData
, interNil
, interCons
, foldrInterList
) where
import PlutusCore.Core
import PlutusCore.MkPlc
import PlutusCore.Name
import PlutusCore.Quote
import PlutusCore.StdLib.Data.Function
import PlutusCore.StdLib.Data.Unit
import PlutusCore.StdLi... |
6e9d9865de3b203fa31160caf1f5591872f145f60d56740dae264ade48b21105 | earl-ducaine/cl-garnet | demo-moveline.lisp | -*- Mode : LISP ; Syntax : Common - Lisp ; Package : DEMO - MOVELINE ; Base : 10 -*-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
The Garnet User Interface Development Environment . ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; This code w... | null | https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/demos/demo-moveline.lisp | lisp | Syntax : Common - Lisp ; Package : DEMO - MOVELINE ; Base : 10 -*-
; ;
This code was written as part of the Garnet project at ;;;
; ;
; ;
please contact to be put on the mailing list. ;;;
This file contains demo code for testing if the ends of lines can be
changed with the mouse.
This is intended... |
Designed and implemented by
27 - May-92 Pervin - The latest CMUCL requires that the
09 - Apr-92 Mickish - Changed create - instances of opal : default - line - styles to
13 - Feb-92 Pervin - Merged demo - moveline and color - demo - moveline
(in-package :DEMO-MOVELINE)
(declaim (special MYLINE VP AGG FE... |
7ed911d80b0409b7620602586916ebf5b30acc21427896c723eaf12d1bee15a5 | futurice/haskell-mega-repo | Config.hs | # LANGUAGE DataKinds #
module Futurice.App.Futuroom.Config where
import Futurice.EnvConfig
import Futurice.Integrations
import Futurice.Prelude
import Prelude ()
data Config = Config
{ cfgGoogleConfig :: !(IntegrationsConfig '[ ServGO ])
}
instance Configure Config where
configure = Config
<$> co... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/futuroom-app/src/Futurice/App/Futuroom/Config.hs | haskell | # LANGUAGE DataKinds #
module Futurice.App.Futuroom.Config where
import Futurice.EnvConfig
import Futurice.Integrations
import Futurice.Prelude
import Prelude ()
data Config = Config
{ cfgGoogleConfig :: !(IntegrationsConfig '[ ServGO ])
}
instance Configure Config where
configure = Config
<$> co... | |
3e50848d73e4cb82e52540d1a34ed363b68037b4ab22056ae7073336bfef5912 | janestreet/ppx_here | ppx_here_expander.mli | open Ppxlib
(** Lift a lexing position to a expression *)
val lift_position : loc:Location.t -> Parsetree.expression
(** Lift a lexing position to a string expression *)
val lift_position_as_string : loc:Location.t -> Parsetree.expression
(** Same as setting the directory name with [-dirname], for tests *)
val set_d... | null | https://raw.githubusercontent.com/janestreet/ppx_here/3dc2a41c80950375582241d1c99ca383b4fbda44/expander/ppx_here_expander.mli | ocaml | * Lift a lexing position to a expression
* Lift a lexing position to a string expression
* Same as setting the directory name with [-dirname], for tests
* Prepend the directory name if [-dirname] was passed on the command line and the
filename is relative. | open Ppxlib
val lift_position : loc:Location.t -> Parsetree.expression
val lift_position_as_string : loc:Location.t -> Parsetree.expression
val set_dirname : string option -> unit
val expand_filename : string -> string
|
1ce9c2c93a9bf26e3072157a5b459420c34c05d4968de72fe41d51ce3ce062ac | ryszard/clsql | mysql-loader.lisp | -*- Mode : LISP ; Syntax : ANSI - Common - Lisp ; Base : 10 -*-
;;;; *************************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: mysql-loader.sql
Purpose : MySQL library loader using UFFI
Author :
Created : Feb 2002
;;;;
$ Id$
;;;;
This fi... | null | https://raw.githubusercontent.com/ryszard/clsql/9aafcb72bd7ca1d7e908938b6a5319753b3371d9/db-mysql/mysql-loader.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 -*-
*************************************************************************
FILE IDENTIFICATION
Name: mysql-loader.sql
(), also known as the LLGPL.
************************************************************************* | Purpose : MySQL library loader using UFFI
Author :
Created : Feb 2002
$ Id$
This file , part of CLSQL , is Copyright ( c ) 2002 - 2004 by
CLSQL users are granted the rights to distribute and use this software
as governed by the terms of the Lisp Lesser GNU Public License
(in-package #:mysql)... |
0bc2f7153dfb31274e34d0345e87a22c24bd3f79a17848bf76f67a4d6f3cb21f | AccelerateHS/accelerate | Vec.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE GADTs #
{-# LANGUAGE KindSignatures #-}
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_HADDOCK hide #-}
-- |
Module : Data . Array . Accelera... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate/7c769b761d0b2a91f318096b9dd3fced94616961/src/Data/Array/Accelerate/Representation/Vec.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# LANGUAGE TypeOperators #
# OPTIONS_HADDOCK hide #
|
License : BSD3
Stability : experimental
| Declares the size of a SIMD vector and the type of its elements. This
n single) with its tuple representation (tuple). Conversions between
... | # LANGUAGE GADTs #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
Module : Data . Array . Accelerate . Representation .
Copyright : [ 2008 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extens... |
1e120d4ea78d0decfdd589c2e0616174380461002f7dcf62faff9e172980ed5f | shirok/Gauche | 222.scm | ;;;
SRFI-222 - Compound objects
;;;
Copyright ( c ) 2022 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redistributions of source code must retain the above copyright
;;; ... | null | https://raw.githubusercontent.com/shirok/Gauche/e606bfe5a94b100d5807bca9c2bb95df94f60aa6/lib/srfi/222.scm | scheme |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in b... | SRFI-222 - Compound objects
Copyright ( c ) 2022 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(define-module srfi.2... |
c4d09e07c44d545b4450b1f0da3d7462fd628198544696628b48b06c11f640a9 | lambdaisland/kaocha | filter_test.clj | (ns kaocha.plugin.filter-test
(:require [clojure.test :refer [deftest is]]
[kaocha.plugin.filter :as f]
[kaocha.testable :as testable]))
(defn flat-test-seq [t]
(cons t (mapcat flat-test-seq (:kaocha.test-plan/tests t))))
(defn skipped-tests [testable]
(into {}
(for [{:kaocha.tes... | null | https://raw.githubusercontent.com/lambdaisland/kaocha/8f18babb732b21e7fb2231e44be4d972c7ab22bc/test/unit/kaocha/plugin/filter_test.clj | clojure | These cases need more hammock time to figure out what the "right" behavior should be | (ns kaocha.plugin.filter-test
(:require [clojure.test :refer [deftest is]]
[kaocha.plugin.filter :as f]
[kaocha.testable :as testable]))
(defn flat-test-seq [t]
(cons t (mapcat flat-test-seq (:kaocha.test-plan/tests t))))
(defn skipped-tests [testable]
(into {}
(for [{:kaocha.tes... |
44bfbc6d1915c7180b0faadc4965f279f2ed3eb4019a7da292858daea508fd67 | amnh/poy5 | character.mli | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
(* *)
(* This program is free softwa... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/character.mli | ocaml |
This program is free software; you can redistribute it and/or modify
(at your option) any later version.
This progra... | POY 5.1.1 . A phylogenetic analysis program using Dynamic Homologies .
Copyright ( C ) 2014 , , , Ward Wheeler ,
and the American Museum of Natural History .
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... |
7cd0c523d5239363fa81efa6383505a84828afb031f4ee3343937c0beb16c518 | mirage/ocaml-matrix | send_to_device.ml | open Json_encoding
open Matrix_common
module Query = Empty.Query
module Request = struct
type t = {messages: (string * (string * Ezjsonm.value) list) list option}
[@@deriving accessor]
let encoding =
let to_tuple t = t.messages in
let of_tuple v =
let messages = v in
{messages} in
let wi... | null | https://raw.githubusercontent.com/mirage/ocaml-matrix/2a58d3d41c43404741f2dfdaf1d2d0f3757b2b69/lib/matrix-ctos/send_to_device.ml | ocaml | open Json_encoding
open Matrix_common
module Query = Empty.Query
module Request = struct
type t = {messages: (string * (string * Ezjsonm.value) list) list option}
[@@deriving accessor]
let encoding =
let to_tuple t = t.messages in
let of_tuple v =
let messages = v in
{messages} in
let wi... | |
c56cf92fb517c3d0ee0d0694a0a8ab291b10d662b03cf4bfb03b51ffb7c4555b | philzook58/fib-anyon | Fib.hs | # LANGUAGE GADTs , TypeFamilies ,
StandaloneDeriving , UndecidableInstances ,
ScopedTypeVariables , FlexibleInstances , DataKinds ,
FunctionalDependencies , PolyKinds ,
TypeOperators , RankNTypes , MultiParamTypeClasses ,
TypeApplications , FlexibleContexts , AllowAmbiguousTypes #
StandaloneDeriving, U... | null | https://raw.githubusercontent.com/philzook58/fib-anyon/5c81535201ffdd5a40db18510ce894be9ccccbd7/src/Fib.hs | haskell | data Id
pretty printing would be hella nice
different scalar factors for trivial and non trivial fusion
exchange with trivial means nothing
The inverse of braid
0.618 :+ 0
pure ( auto ( auto a b ) c ) -- no maybe not . The internal one is n't auto
the nontrivial ones have all tau on the leafs and root
internal... | # LANGUAGE GADTs , TypeFamilies ,
StandaloneDeriving , UndecidableInstances ,
ScopedTypeVariables , FlexibleInstances , DataKinds ,
FunctionalDependencies , PolyKinds ,
TypeOperators , RankNTypes , MultiParamTypeClasses ,
TypeApplications , FlexibleContexts , AllowAmbiguousTypes #
StandaloneDeriving, U... |
832ff63fc9847acdf30d54dfe05c2c43c1517653ea88cf2ba93a7df530d4d0d0 | BrianChevalier/matrix-compare | project.clj | (defproject matrix-compare "0.1.0"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.773"]
[reagent "0.10.0"]]
:plugins [[lein... | null | https://raw.githubusercontent.com/BrianChevalier/matrix-compare/c6c1263fba031f7d4a44bf36593d99310b0c553e/project.clj | clojure | (defproject matrix-compare "0.1.0"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.10.1"]
[org.clojure/clojurescript "1.10.773"]
[reagent "0.10.0"]]
:plugins [[lein... | |
d09d4f74b8106251ca8a775136ebe6cc8b2e5db766e514bd0ef0c8d0cfeb48b0 | CryptoKami/cryptokami-core | UtilSpec.hs | # LANGUAGE ExistentialQuantification #
{-# LANGUAGE TypeFamilies #-}
-- | Specification of Pos.Client.Txp.Util
module Test.Pos.Client.Txp.UtilSpec
( spec
) where
import Universum
import qualified Data.HashMap.Strict as HM
import qualified Data.List.NonEmpty as NE
import qualifie... | null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/client/test/Test/Pos/Client/Txp/UtilSpec.hs | haskell | # LANGUAGE TypeFamilies #
| Specification of Pos.Client.Txp.Util
--------------------------------------------------------------------------
Tests
--------------------------------------------------------------------------
for the list below to typecheck.
tx builder should find this utxo to be enough for... | # LANGUAGE ExistentialQuantification #
module Test.Pos.Client.Txp.UtilSpec
( spec
) where
import Universum
import qualified Data.HashMap.Strict as HM
import qualified Data.List.NonEmpty as NE
import qualified Data.Map as M
import qualified Data.Set as S
import Formatting (build, he... |
4caa01990cfa5e9dfb80b43329a37b15ddcebf94100351a3b97fe43f4ba45788 | fulcro-legacy/fulcro-incubator | routing_ws.cljs | (ns fulcro.incubator.routing-ws
(:require-macros [fulcro.incubator.dynamic-routing :refer [defsc-route-target defrouter]])
(:require
[fulcro.incubator.ui-state-machines :as uism :refer [defstatemachine]]
[fulcro-spec.core :refer [assertions component]]
[nubank.workspaces.core :as ws]
[fulcro.client.... | null | https://raw.githubusercontent.com/fulcro-legacy/fulcro-incubator/72885fcc944e16bf98aa42b5d1e518c0ce4574db/src/workspaces/fulcro/incubator/routing_ws.cljs | clojure | so we can see UI state machine debug messages
js network mock doesn't support cancel, but this is how you'd do it: | (ns fulcro.incubator.routing-ws
(:require-macros [fulcro.incubator.dynamic-routing :refer [defsc-route-target defrouter]])
(:require
[fulcro.incubator.ui-state-machines :as uism :refer [defstatemachine]]
[fulcro-spec.core :refer [assertions component]]
[nubank.workspaces.core :as ws]
[fulcro.client.... |
5e87e536ea750f13b2b1d3e75d44b0da1a1217e1d58f1d3ce22f614d3479d83c | oscaro/clj-gcloud-common | coerce_test.clj | (ns clj-gcloud.coerce-test
(:require
[clj-gcloud.coerce :as sut]
[clojure.test :refer [deftest is testing]])
(:import
(com.google.pubsub.v1 Topic)))
(sut/create-clj-coerce Topic [:name])
(deftest coercion-test
(testing "It should map getters to keywords"
(let [^Topic topic (-> (Topic/newBuilder) (.... | null | https://raw.githubusercontent.com/oscaro/clj-gcloud-common/fe1709759e2633cc968652b4c27d78bf6ef0243b/test/clj_gcloud/coerce_test.clj | clojure | (ns clj-gcloud.coerce-test
(:require
[clj-gcloud.coerce :as sut]
[clojure.test :refer [deftest is testing]])
(:import
(com.google.pubsub.v1 Topic)))
(sut/create-clj-coerce Topic [:name])
(deftest coercion-test
(testing "It should map getters to keywords"
(let [^Topic topic (-> (Topic/newBuilder) (.... | |
8f08fecbf267062b4f7c8df3d59705923b91f7b124e59a0d9a670e9df5f36977 | copton/ocram | Ruab.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Ocram.Ruab where
imports { { { 1
import Text.JSON
import Control.Applicative ((<$>))
import Control.Arrow ((***))
import Control.Monad (guard)
import qualified Data.ByteString.Char8 as BS
{ { { 1
encode_debug_info = BS.pack . encodeStrict
{ { { 1
decode_debug_inf... | null | https://raw.githubusercontent.com/copton/ocram/c7166eab0187868a52a61017c6d3687e5a1a6162/ruab/src/Ocram/Ruab.hs | haskell | |Map between P-rows and E-rows
|A location in the P-code
|Map between T-rows and P-rows
|Mapping of Variable names
|A fully qualified name of a variable
|Information about a source file
|Information about a T-thread
^the T-code file
^the P-code
^the E-code file
^mapping between T- and P-rows
^mapping betwee... | # LANGUAGE GeneralizedNewtypeDeriving #
module Ocram.Ruab where
imports { { { 1
import Text.JSON
import Control.Applicative ((<$>))
import Control.Arrow ((***))
import Control.Monad (guard)
import qualified Data.ByteString.Char8 as BS
{ { { 1
encode_debug_info = BS.pack . encodeStrict
{ { { 1
decode_debug_inf... |
5145e3c7dc3a004c9d10bb1e20d72af1e4f81e5e4f4608c6bf55d1e79389bc38 | dinosaure/art | monolith.ml | open Monolith
open PPrint
module Map = Map.Make (struct type t = Art.key let compare (a : Art.key) (b : Art.key) =
String.compare (a :> string) (b :> string) end)
let char_without_d0 () = match Gen.char () with
| '\000' -> Gen.reject ()
| chr -> chr
let key =
easily_constructible
Gen.(fun () -> Art.unsaf... | null | https://raw.githubusercontent.com/dinosaure/art/742474da86def9c64d62ed2dca866584c5c46134/fuzz/monolith.ml | ocaml | open Monolith
open PPrint
module Map = Map.Make (struct type t = Art.key let compare (a : Art.key) (b : Art.key) =
String.compare (a :> string) (b :> string) end)
let char_without_d0 () = match Gen.char () with
| '\000' -> Gen.reject ()
| chr -> chr
let key =
easily_constructible
Gen.(fun () -> Art.unsaf... | |
dab9badbd296895ca377e45d805c885c6206843fca9335579322fb9dacde54b3 | Hans-Halverson/myte | x86_64_calling_convention.ml | open Asm_calling_convention
open Asm_register
let system_v_calling_convention =
object
inherit calling_convention
val general_params = [| `DI; `SI; `D; `C; `R8; `R9 |]
val float_params = [| `XMM0; `XMM1; `XMM2; `XMM3; `XMM4; `XMM5; `XMM6; `XMM7 |]
val callee_saved_registers = RegSet.of_list [`B; `... | null | https://raw.githubusercontent.com/Hans-Halverson/myte/6ed56a9a7840e70414390deacc2155bd73f755ca/src/asm/x86_64/x86_64_calling_convention.ml | ocaml | open Asm_calling_convention
open Asm_register
let system_v_calling_convention =
object
inherit calling_convention
val general_params = [| `DI; `SI; `D; `C; `R8; `R9 |]
val float_params = [| `XMM0; `XMM1; `XMM2; `XMM3; `XMM4; `XMM5; `XMM6; `XMM7 |]
val callee_saved_registers = RegSet.of_list [`B; `... | |
b59e13449d9a238c11f6e3dae4cce6081bfcdf3948ea2617d645c00025d87813 | reactiveml/rml | scene_json.ml | Graph viewer
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 , ... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/examples/graph_viewer/scene_json.ml | ocaml | XXX Escape! | Graph viewer
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 , ... |
af1cc0008f8aae630ef661c5d1947c37adf04d34149f0b6f146a9d7a1a3b095f | mxthevs/Caml_bot | storage_trusted_users.ml | type trusted_user = { username : string }
type external_user = {
id : string;
username : string;
}
let ( let* ) = Lwt.bind
module Async = struct
exception User_not_found
let index () =
let read_all =
[%rapper
get_many
{sql|
SELECT @string{id}, @string{username}
... | null | https://raw.githubusercontent.com/mxthevs/Caml_bot/619ce00ef0b7c07ccb9b41425b5c048c71be0ff5/src/storage/storage_trusted_users.ml | ocaml | type trusted_user = { username : string }
type external_user = {
id : string;
username : string;
}
let ( let* ) = Lwt.bind
module Async = struct
exception User_not_found
let index () =
let read_all =
[%rapper
get_many
{sql|
SELECT @string{id}, @string{username}
... | |
5a867f5a3dba1e38151cfc4c8c89834f072b2013a989fac99b3157298840e6f0 | DSiSc/why3 | typing.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/parser/typing.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 - 2018 -- Inria - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
open Wstdlib
open Ident
open Ptree
open Ty
open Term
open Decl
open Theory
open Dterm
open Ity
open Expr
o... |
915ef47dd1832f17038b9179faee3d258bebe361b9a90694b948d8075e1b95c6 | mgsloan/instance-templates | Lattices.hs | # LANGUAGE TemplateHaskell , ConstraintKinds , ScopedTypeVariables , FlexibleInstances , FlexibleContexts ,
UndecidableInstances #
Not actually using this , just necessary for an AST quote
From lattices library
module Lattices where
import Data.Monoid (Monoid)
import Language.Haskell.InstanceTemplates
i... | null | https://raw.githubusercontent.com/mgsloan/instance-templates/734f3fe838f194b613a270c2e1eb9502b73840a6/tests/lattice/Lattices.hs | haskell | This is just for prettier -ddump-splices
| A algebraic structure with element joins: <>
Associativity: x `join` (y `join` z) == (x `join` y) `join` z
Commutativity: x `join` y == y `join` x
Idempotency: x `join` x == x
Partial-Order: x `leq` y == (x `join` y == y)
| The partial ordering induced by the join-s... | # LANGUAGE TemplateHaskell , ConstraintKinds , ScopedTypeVariables , FlexibleInstances , FlexibleContexts ,
UndecidableInstances #
Not actually using this , just necessary for an AST quote
From lattices library
module Lattices where
import Data.Monoid (Monoid)
import Language.Haskell.InstanceTemplates
... |
65660f8afadb2fb4c2827acb41dd8cc3879d2b07bba6e80d4ad0bcb7d114fa3b | jeromesimeon/Galax | df_analysis_context.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/streaming_xpath/df_analysis_context.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : df_analysis_context.ml , v 1.3 2007/02/01 22:08:54 simeon Exp $
open Xquery_common_ast
open Error
open Df_struct
type ('a, 'b) df_analysis_context = (cvname * ('a, 'b) dfgraph) list
let build_df_analysis_context () =
[]
le... |
821210e3ee65e239f3c3177b40d7669d8afbfe28b56eb18bdcee18ea207b2071 | vyzo/gerbil | optimize-xform__0.scm | (declare (block) (standard-bindings) (extended-bindings))
(begin
(define gxc#&identity-expression
(make-promise
(lambda ()
(let ((_tbl18216_ (make-table 'test: eq?)))
(table-set! _tbl18216_ '%#begin-annotation gxc#xform-identity)
(table-set! _tbl18216_ '%#lambda gxc#xform-identity)
... | null | https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/bootstrap/gerbil/compiler/optimize-xform__0.scm | scheme | <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<... | (declare (block) (standard-bindings) (extended-bindings))
(begin
(define gxc#&identity-expression
(make-promise
(lambda ()
(let ((_tbl18216_ (make-table 'test: eq?)))
(table-set! _tbl18216_ '%#begin-annotation gxc#xform-identity)
(table-set! _tbl18216_ '%#lambda gxc#xform-identity)
... |
e518447463f85777ad0de61b417640b24ae26376761b65d078d909eedbc84359 | unisonweb/unison | PinBoard.hs | # LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
module Unison.Test.Util.PinBoard
( test,
)
where
import qualified Data.ByteString as ByteString
import EasyTest
import GHC.Exts (isTrue#, reallyUnsafePtrEquality#, touch#)
import GHC.IO (IO (IO))
import System.Mem (performGC)
import qualified Unison.Util.PinBoard ... | null | https://raw.githubusercontent.com/unisonweb/unison/477371ba97a019fe36294a76faed52190ef29d75/parser-typechecker/tests/Unison/Test/Util/PinBoard.hs | haskell | keep b0 alive until here
observe that the board doesn't keep its value alive | # LANGUAGE MagicHash #
# LANGUAGE UnboxedTuples #
module Unison.Test.Util.PinBoard
( test,
)
where
import qualified Data.ByteString as ByteString
import EasyTest
import GHC.Exts (isTrue#, reallyUnsafePtrEquality#, touch#)
import GHC.IO (IO (IO))
import System.Mem (performGC)
import qualified Unison.Util.PinBoard ... |
c0f35e671fe0eb2c539edb8aa336fd2c94cba1b22653d7476156f357d2619acc | tonymorris/geo-gpx | Ptseg.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
-- | Complex Type: @ptsegType@ </#type_ptsegType>
module Data.Geo.GPX.Type.Ptseg(
Ptseg
, ptseg
, runPtseg
) where
import Data.Geo.GPX.Type.Pt
import Text.XML.HXT.Arrow.Pickle
import Control.Newtype
newtype Ptseg = Ptseg [Pt]
deriving (Eq, Ord)
ptseg ::
[... | null | https://raw.githubusercontent.com/tonymorris/geo-gpx/526b59ec403293c810c2ba08d2c006dc526e8bf9/src/Data/Geo/GPX/Type/Ptseg.hs | haskell | | Complex Type: @ptsegType@ </#type_ptsegType>
^ The points (pt). | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
module Data.Geo.GPX.Type.Ptseg(
Ptseg
, ptseg
, runPtseg
) where
import Data.Geo.GPX.Type.Pt
import Text.XML.HXT.Arrow.Pickle
import Control.Newtype
newtype Ptseg = Ptseg [Pt]
deriving (Eq, Ord)
ptseg ::
-> Ptseg
ptseg =
Ptseg
runPtseg ::
Ptseg
-> ... |
3dfb05f994778a9c4cede133efc2a0142925e5f0fbff2c1c58c492d1517b8c01 | expipiplus1/update-nix-fetchgit | Main.hs | # OPTIONS_GHC -Wno - orphans #
module Main
( main
) where
import Data.Bool
import Data.Foldable
import qualified Data.Text.IO as T
import Data.Version ( showVersion )
import Options.Applicative
import Options.Generic
import ... | null | https://raw.githubusercontent.com/expipiplus1/update-nix-fetchgit/ee0efa386a747b2524d374585f42fc0bddecfefd/app/Main.hs | haskell | --------------------------------------------------------------
Env
--------------------------------------------------------------
--------------------------------------------------------------
Options
-------------------------------------------------------------- | # OPTIONS_GHC -Wno - orphans #
module Main
( main
) where
import Data.Bool
import Data.Foldable
import qualified Data.Text.IO as T
import Data.Version ( showVersion )
import Options.Applicative
import Options.Generic
import ... |
5a757a819abdde1ed6a27c2c6ecf9fcb9c7fff965b4ca5094f9c4392228f13df | quil-lang/quilc | state-prep-tests.lisp | state-prep-tests.lisp
;;;;
Author :
(in-package #:cl-quil-tests)
(defun wf-to-matrix (wf)
"Convert a sequence WF to a corresponding column vector."
(quil::from-array (copy-seq wf)
(list (length wf) 1)))
(defun check-state-prep (source-wf target-wf matrix)
"Checks whether SOURCE-WF maps to... | null | https://raw.githubusercontent.com/quil-lang/quilc/3f3260aaa65cdde25a4f9c0027959e37ceef9d64/tests/state-prep-tests.lisp | lisp |
check that the correct state was constructed
entangled-entangled
unentangled-entangled
entangled-unentangled
unentangled-unentangled
check wf against new-wf
check new-wf has small components | state-prep-tests.lisp
Author :
(in-package #:cl-quil-tests)
(defun wf-to-matrix (wf)
"Convert a sequence WF to a corresponding column vector."
(quil::from-array (copy-seq wf)
(list (length wf) 1)))
(defun check-state-prep (source-wf target-wf matrix)
"Checks whether SOURCE-WF maps to TARG... |
a9bd335ddfe3a26f535c5791869c519adb23f186858a64d1bcad1668320e8821 | cblp/python5 | dict.hs | main = do
let animals = dict[ "dog" := int(1),
"cat" := 2 ]
-- total <- animals.get("dog") + animals.get("cat")
-- ^ error: Couldn't match type ‘Maybe Integer’ with ‘Integer’
total <- animals.getdefault("dog", 0) + animals.getdefault("cat", 0)
print(total)
| null | https://raw.githubusercontent.com/cblp/python5/897b7bbb7b522fa5653eff10b9ae616a4e01b6ff/examples/dict.hs | haskell | total <- animals.get("dog") + animals.get("cat")
^ error: Couldn't match type ‘Maybe Integer’ with ‘Integer’ | main = do
let animals = dict[ "dog" := int(1),
"cat" := 2 ]
total <- animals.getdefault("dog", 0) + animals.getdefault("cat", 0)
print(total)
|
ba4977983d2ba7b06b26140d1061bc6d536ab7c2b6521bfc9aab8708423b4c06 | emqx/emqx | emqx_limiter_server_sup.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/src/emqx_limiter/src/emqx_limiter_server_sup.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_limiter_server_sup).
-behaviour(supervisor).
-export([start_link/0, start/1, star... |
5b8c0211210abda016f71362e930cef5fdc04ff24fe176f13ce9a1553673c716 | ocamllabs/ocaml-effects | odoc_analyse.ml | (***********************************************************************)
(* *)
(* OCamldoc *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/ocamldoc/odoc_analyse.ml | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 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 .
let print_DEBUG s = print_string s ; prin... |
874d23b1c9b225a552361acc513291952e967f4c36d270394c2028f751da1b6f | rtoy/cmucl | ctak.lisp | (in-package "USER")
CTAK -- A version of the TAKeuchi function that uses the CATCH / THROW facility .
(defun ctak (x y z)
(declare (fixnum x y z))
(catch 'ctak (ctak-aux x y z)))
(defun ctak-aux (x y z)
(declare (fixnum x y z))
(cond ((not (< y x))
(throw 'ctak z))
(t (ctak-aux
(catch 'ctak
... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/benchmarks/gabriel/ctak.lisp | lisp | (in-package "USER")
CTAK -- A version of the TAKeuchi function that uses the CATCH / THROW facility .
(defun ctak (x y z)
(declare (fixnum x y z))
(catch 'ctak (ctak-aux x y z)))
(defun ctak-aux (x y z)
(declare (fixnum x y z))
(cond ((not (< y x))
(throw 'ctak z))
(t (ctak-aux
(catch 'ctak
... | |
2588f014544189a532b38ed09eae7e667ba3f25383e936ee40e06efa3d4a7191 | jkk/formative | bootstrap.cljc | (ns formative.render.bootstrap
(:require [formative.render :refer [render-form render-field
render-problems]]
[formative.util :as util]))
(defn render-bootstrap-row [field]
(let [field-id (util/get-field-id field)
field (assoc field :id field-id)
fi... | null | https://raw.githubusercontent.com/jkk/formative/e1b69161c05438a48d3186bd2eb5126377ffe2e3/src/formative/render/bootstrap.cljc | clojure | (ns formative.render.bootstrap
(:require [formative.render :refer [render-form render-field
render-problems]]
[formative.util :as util]))
(defn render-bootstrap-row [field]
(let [field-id (util/get-field-id field)
field (assoc field :id field-id)
fi... | |
3366216f1e56cf11577fd8a87f4d2d03bda94237009b1de44c753969d5eaf2ce | softwarelanguageslab/maf | R5RS_gambit_cat-4.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 1
; * negated predicates: 0
; * swapped branches: 0
* calls to i d fun : 1
(letrec ((inport #f)
(outport #f)
(catport (lambda (port)
(<change>
()
outport)
(let (... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_cat-4.scm | scheme | Changes:
* negated predicates: 0
* swapped branches: 0 | * removed : 0
* added : 1
* swaps : 1
* calls to i d fun : 1
(letrec ((inport #f)
(outport #f)
(catport (lambda (port)
(<change>
()
outport)
(let ((x (read-char port)))
(if (eof-object?... |
53d11b9b067f2468a15ff8b7ab4006a705809a18ae86d77e63d0cff6980aed0c | 8c6794b6/guile-tjit | eval.scm | ;;; eval.scm --- The R6RS `eval' library
Copyright ( C ) 2010 Free Software Foundation , Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the Licen... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/rnrs/eval.scm | scheme | eval.scm --- The R6RS `eval' library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or... |
Copyright ( C ) 2010 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(library (rnrs eval (6))
(export eval envi... |
6c938e82df6d8cf6cbc847588fcc39ee5261560a25c9af51054d2a22ddaa6444 | zenspider/schemers | exercise.3.30.scm | #lang racket/base
(require "../lib/queue.scm")
(require "../lib/circuits.scm")
(require "../lib/test.rkt")
(require (only-in srfi/1 fold))
Exercise 3.30
* Note Figure 3 - 27 : : shows a " ripple - carry adder "
;; formed by stringing together n full-adders. This is the simplest
form of parallel adder for addi... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_3/exercise.3.30.scm | scheme | formed by stringing together n full-adders. This is the simplest
sum, and C, the carry from the addition. Write a procedure
`ripple-carry-adder' that generates this circuit. The procedure
the ripple-carry adder is the need to wait for the carry signals
to propagate.
: ... | #lang racket/base
(require "../lib/queue.scm")
(require "../lib/circuits.scm")
(require "../lib/test.rkt")
(require (only-in srfi/1 fold))
Exercise 3.30
* Note Figure 3 - 27 : : shows a " ripple - carry adder "
form of parallel adder for adding two n - bit binary numbers . The
inputs A_1 , A_2 , A_3 , ... ... |
779ebbd947bfa3112ab13feae5c7df32145232e8d151249c025181162bec004d | basho/riak_cs | riak_cs_json.erl | %% ---------------------------------------------------------------------
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . Y... | null | https://raw.githubusercontent.com/basho/riak_cs/c0c1012d1c9c691c74c8c5d9f69d388f5047bcd2/src/riak_cs_json.erl | erlang | ---------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permiss... | Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
800986cd9cdad100b1e5975c8c0400e0ca083ecdff28ff186ed7c0f0ad5156fe | GaloisInc/ivory | BoundedInteger.hs | # LANGUAGE ScopedTypeVariables #
module Ivory.Language.BoundedInteger where
import Text.Printf
import Ivory.Language.Proxy
import qualified Ivory.Language.Syntax as I
import Ivory.Language.Type
--------------------------------------------------------------------------------
-- | It is... | null | https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory/src/Ivory/Language/BoundedInteger.hs | haskell | ------------------------------------------------------------------------------
| It is an error if a constant implicitly underflows/overflows. | # LANGUAGE ScopedTypeVariables #
module Ivory.Language.BoundedInteger where
import Text.Printf
import Ivory.Language.Proxy
import qualified Ivory.Language.Syntax as I
import Ivory.Language.Type
boundedFromInteger :: forall a b . (Num a, IvoryType a, Bounded b, Integral b)
... |
b57545b14ef73eabb2f6f1a683e9969bbbd9fa86cc6b91a49a9c2d6cb2e5849d | emaphis/HtDP2e-solutions | ex059.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex059) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/emaphis/HtDP2e-solutions/ecb60b9a7bbf9b8999c0122b6ea152a3301f0a68/1-Fixed-Size-Data/04-Intervals/ex059.rkt | racket | about the language level of this file in a form that our tools can easily process.
Ex 59:
constants
the space between bulbs
- "red"
- "green"
- "yellow"
template
functions
yields the next state given current state cs
(define (tl-next cs) cs) ; stub
renderS the current state cs as an image
(define (tl-ren... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex059) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
HtDP 2e - 4 Enumerations and Intervals
4.7 Finite State Worlds... |
68558c0d9a6d64a99360b8166653c9716bc9fc73c987cfceca8a634debefa082 | bartavelle/stateWriter | Lazy.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
module Control.Monad.Trans.RSS.Lazy (
* The RWS monad
RSS,
rss,
runRSS,
evalRSS,
execRSS,
withRSS,
-- * The RSST monad transformer
RSST,
runRSST,
ev... | null | https://raw.githubusercontent.com/bartavelle/stateWriter/2f7bfc9171ea6b7e1d3f564f08b6f5a74f049b34/Control/Monad/Trans/RSS/Lazy.hs | haskell | * The RSST monad transformer
* Helpers
| A monad containing an environment of type @r@, output of type @w@
and an updatable state of type @s@.
| Unwrap an RSS computation as a function.
(The inverse of 'rws'.)
| Evaluate a computation with the given initial state and environment,
returning the final value and o... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
module Control.Monad.Trans.RSS.Lazy (
* The RWS monad
RSS,
rss,
runRSS,
evalRSS,
execRSS,
withRSS,
RSST,
runRSST,
evalRSST,
execRSST,
withRSST,
... |
6315b9a49e671b9bd63c59924564bace1caba69e735f0965347c628cd140220e | slipstream/SlipStreamServer | connector_template.clj | (ns com.sixsq.slipstream.ssclj.resources.connector-template
(:require
[clojure.tools.logging :as log]
[com.sixsq.slipstream.auth.acl :as a]
[com.sixsq.slipstream.ssclj.resources.common.crud :as crud]
[com.sixsq.slipstream.ssclj.resources.common.schema :as c]
[com.sixsq.slipstream.ssclj.resources.c... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/src/com/sixsq/slipstream/ssclj/resources/connector_template.clj | clojure |
Resource defaults
Mandatory reference attributes. Can go into a separate .edn.
multimethods for validation
CRUD operations
must override the default implementation so that the
data can be pulled from the atom rather than the database
FIXME: At least the paging options should be supported.
actions
| (ns com.sixsq.slipstream.ssclj.resources.connector-template
(:require
[clojure.tools.logging :as log]
[com.sixsq.slipstream.auth.acl :as a]
[com.sixsq.slipstream.ssclj.resources.common.crud :as crud]
[com.sixsq.slipstream.ssclj.resources.common.schema :as c]
[com.sixsq.slipstream.ssclj.resources.c... |
cee2dd0ba0e4a49ebe2b99116fa2d8c40eb2885ef8d87cb979a1839c12d0b81a | thosmos/riverdb | routes.cljs | (ns riverdb.ui.routes
(:import [goog History])
(:require
[edn-query-language.core :as eql]
[goog.events :as gevents]
[clojure.string :as str]
[com.fulcrologic.fulcro.application :as fapp]
[com.fulcrologic.fulcro.routing.dynamic-routing :as dr]
[com.fulcrologic.fulcro.components :as comp :ref... | null | https://raw.githubusercontent.com/thosmos/riverdb/c0a31710e4430113924178bd0a3b9e8304f58009/src/main/riverdb/ui/routes.cljs | clojure | (doto (History.)
(.setEnabled true)))
(gevents/listen page-history "navigate" #(f % (.-token %))))
(.setToken page-history (str/join "/" path)))
(if (seq r-segments)
r-segments
["main"])))
(fn [_ path]
_ (debug "FIND ROUTER TARGET" router state-map) | (ns riverdb.ui.routes
(:import [goog History])
(:require
[edn-query-language.core :as eql]
[goog.events :as gevents]
[clojure.string :as str]
[com.fulcrologic.fulcro.application :as fapp]
[com.fulcrologic.fulcro.routing.dynamic-routing :as dr]
[com.fulcrologic.fulcro.components :as comp :ref... |
a68c20f385ee4d0252eeb250fdbeda6c85a26cdaa43206653df81edb4e97cb22 | Gabriella439/HasCal | HourClock.hs | | This is based on the [ HourClock example]( / tlaplus / Examples / blob / master / specifications / SpecifyingSystems / HourClock / HourClock.tla )
from figure 2.1 on page 20 in Lamport 's \"Specifying Systems\ " book :
> ---------------------- MODULE HourClock ----------------------
> EXTENDS Natur... | null | https://raw.githubusercontent.com/Gabriella439/HasCal/cbc58a99eaca8a1b30440fc0cd68ca1f98af4c2f/tasty/HasCal/Test/HourClock.hs | haskell | -------------------- MODULE HourClock ----------------------
------------------------------------------------------------
-------------------- MODULE HourClock ----------------------
------------------------------------------------------------
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric # | | This is based on the [ HourClock example]( / tlaplus / Examples / blob / master / specifications / SpecifyingSystems / HourClock / HourClock.tla )
from figure 2.1 on page 20 in Lamport 's \"Specifying Systems\ " book :
> EXTENDS Naturals
> VARIABLE hr
> HCini = = hr \in ( 1 .. 12 )
... |
1ea4fe19940e072eec42d87f3f357278f0c46bbc898823e732d98ac2d413ef37 | broadinstitute/wfl | automation_test.clj | (ns wfl.system.automation-test
(:require [clojure.test :refer [deftest is]]
[wfl.tools.fixtures :as fixtures]
[wfl.tools.resources :as resources]
[wfl.service.cromwell :refer [final?]]
[wfl.tools.endpoints :as endpoints]
[wfl.tools.workloads... | null | https://raw.githubusercontent.com/broadinstitute/wfl/d6cedb8a2ab97615b21936b045ebb368589a7083/api/test/wfl/system/automation_test.clj | clojure | (ns wfl.system.automation-test
(:require [clojure.test :refer [deftest is]]
[wfl.tools.fixtures :as fixtures]
[wfl.tools.resources :as resources]
[wfl.service.cromwell :refer [final?]]
[wfl.tools.endpoints :as endpoints]
[wfl.tools.workloads... | |
1645de9bdb522f99c37ae045a2149e0a944d0589c83dffc8720812467ba657d6 | facebook/flow | dependency_sigs.ml |
* 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/261a19c10fbd3f3ae9a02336bbe93c5ae644be3e/src/analysis/env_builder/dependency_sigs.ml | 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... | |
99376ce48d235ce995384df33e761867a3492020ba51d1be0a057786668dbc64 | zenspider/schemers | exercise.3.21.scm | #lang racket/base
(require "../lib/testes.scm")
(require "../lib/myutils.scm")
Exercise 3.21
decides to test the queue
;; implementation described above. He types in the procedures to the
;; Lisp interpreter and proceeds to try them out:
;;
;; (define q1 (make-queue))
;;
;; (insert-queue! q1 'a)
;; ... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_3/exercise.3.21.scm | scheme | implementation described above. He types in the procedures to the
Lisp interpreter and proceeds to try them out:
(define q1 (make-queue))
(insert-queue! q1 'a)
((a) a)
(insert-queue! q1 'b)
((a b) b)
(delete-queue! q1)
((b) b)
(delete-queue! q1)
(() b)
"It... | #lang racket/base
(require "../lib/testes.scm")
(require "../lib/myutils.scm")
Exercise 3.21
decides to test the queue
delete both items , the second ` b ' is still there , so the queue
is n't empty , even though it 's supposed to be . "
suggests that has misunderstood what is happening . " It 's... |
6079ac4fd065401b62ebbbd5384e0ba2965396b0af6442cef3a8016db94ad27b | MLstate/opalang | gen_opa_manpage.ml |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/opa/gen_opa_manpage.ml | ocaml | FIXME: should be moved in tools
Load warnings of opa s3 applications |
Copyright © 2011 , 2012 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be us... |
0051e90a4cae276c283927eec0a5843f5af06af233971381511c8cf1c91750ae | a-sassmannshausen/guile-config | getopt-long.scm | Config --- Configuration specification in GNU
Copyright © 2017 < >
;;;
This file is part of Guile - Config .
;;;
;;; Config is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation ; either version 3 of the Li... | null | https://raw.githubusercontent.com/a-sassmannshausen/guile-config/b05957743ee8ab8d111683697a56e46a82429b6f/config/getopt-long.scm | scheme |
Config is free software; you can redistribute it and/or modify it under
either version 3 of the License , or ( at your option )
any later version.
Config is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR... | Config --- Configuration specification in GNU
Copyright © 2017 < >
This file is part of Guile - Config .
the terms of the GNU General Public License as published by the Free
You should have received a copy of the GNU General Public License
59 Temple Place - Suite 330 Fax : +1 - 617 - 542 - 2... |
b110d833f188512246326c644b03e534f9dd1df511db317431c1d3b36294111a | iagon-tech/proof-of-burn-cardano | ProofOfBurn.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE MagicHash... | null | https://raw.githubusercontent.com/iagon-tech/proof-of-burn-cardano/fc7738f85d64cf134405c16549f43a36473e8a52/src/ProofOfBurn.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE MagicHash #
# LANGUAGE MultiWayIf #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
... | # LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications ... |
0642fd212043f39d317cd8017af14bc153d5bedf77f1f7daac0919018e41bcf1 | dbuenzli/hyperbib | entity_html.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2021 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/hyperbib/b17d1ef8cc3a215d04c31c0e56c2de414911c55c/src/html/entity_html.mli | ocaml | * Entity HTML commonalities.
* [viz (module E) e] is {!At.void} when [e] is public and
{!Hclass.private'} otherwise.
* [person_input uf ~for_list ~input_name ~role p] inputs [p] via a hidden
field named [input_name] and whose name is [s]'s [id]. If [for_list] is
[true] this is for a list of subjects; if [... | ---------------------------------------------------------------------------
Copyright ( c ) 2021 University of Bern . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
3196b87614ccf33d77e69c00a939f99978bd2d885a785d5d560a3c5e17f72ed8 | armon/bloomd_ring | br_wm_ping.erl | -module(br_wm_ping).
-export([init/1, to_html/2]).
-include_lib("webmachine/include/webmachine.hrl").
init([]) ->
{ok, nostate}.
to_html(ReqData, Context) ->
Result = io_lib:format("Result: ~p", [bloomd_ring:ping()]),
{"<html><head><title>bloomd</title></head><body>" ++ Result ++ "</body></html>", ReqDat... | null | https://raw.githubusercontent.com/armon/bloomd_ring/ca51d00e2f0e1b6f12f061403df8421d7207d078/src/br_wm_ping.erl | erlang | -module(br_wm_ping).
-export([init/1, to_html/2]).
-include_lib("webmachine/include/webmachine.hrl").
init([]) ->
{ok, nostate}.
to_html(ReqData, Context) ->
Result = io_lib:format("Result: ~p", [bloomd_ring:ping()]),
{"<html><head><title>bloomd</title></head><body>" ++ Result ++ "</body></html>", ReqDat... | |
17520c0e62f3e484854f71d7008dabb0257090c56939245d65af1f1089945c7d | fiddlerwoaroof/lisp-sandbox | jsonarr_to_table.lisp | (defpackage json-to-table
(:use :cl :alexandria :serapeum :fw.lu))
| null | https://raw.githubusercontent.com/fiddlerwoaroof/lisp-sandbox/38ff817c95af35db042faf760b477675264220d2/jsonarr_to_table.lisp | lisp | (defpackage json-to-table
(:use :cl :alexandria :serapeum :fw.lu))
| |
fce61311f44088b13154f5dca1f8d601d4a1c473126d6de15fbdbf68bbbd795b | maximedenes/native-coq | indschemes.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/toplevel/indschemes.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Build and register the boolean equ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Names
open Term
... |
c821cf3f3315651d56ff064232832026ac25e361a6df652fd3fe8ae9a1165fc4 | mmottl/lacaml | lin_reg.ml | File : lin_reg.ml
Copyright ( C ) 2001 - 2005
email :
WWW :
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the Li... | null | https://raw.githubusercontent.com/mmottl/lacaml/2e01c0747e740e54ab9a23ea59b29ea0d929b50f/examples/lin_reg.ml | ocaml | File : lin_reg.ml
Copyright ( C ) 2001 - 2005
email :
WWW :
This library is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 2.1 of the Li... | |
7bbb147f7a888d6d69937e1018f644c1dcf4506993f44868855166e89abd60d7 | duelinmarkers/clj-record | thing_one.clj | (ns clj-record.test-model.thing-one
(:require clj-record.boot)
(:use clj-record.test-model.config))
(clj-record.core/init-model
:table-name "thing_one"
(:associations
(has-many thing-twos)
(belongs-to person :fk owner_person_id)))
| null | https://raw.githubusercontent.com/duelinmarkers/clj-record/2dd5b9a1fcb8828565acfdf9919330bf4b5dbfaa/test/clj_record/test_model/thing_one.clj | clojure | (ns clj-record.test-model.thing-one
(:require clj-record.boot)
(:use clj-record.test-model.config))
(clj-record.core/init-model
:table-name "thing_one"
(:associations
(has-many thing-twos)
(belongs-to person :fk owner_person_id)))
| |
247d803286b9e74ef31b2fff7e30e9cf19587398558abf5777ff3d4aa7399320 | facebook/infer | Sink.ml |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/d2e59e6df24858729129debcc2813ae3915c4f0a/infer/src/absint/Sink.ml | ocaml |
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | |
ec13b89dc1677183ff254e664110166f0a220670000ad6ce4d9b6d661f8dd030 | lamdu/lamdu | ToVersion13.hs | module Lamdu.Data.Export.JSON.Migration.ToVersion13 (migrate) where
import qualified Control.Lens as Lens
import Control.Lens.Extended ((~~>))
import qualified Data.Aeson as Aeson
import Data.Aeson.Instances ()
import Data.Aeson.Lens (_Array, _Object, _String)
import Data.Binary... | null | https://raw.githubusercontent.com/lamdu/lamdu/e31e36f5cef7b3c5d9123d799b45bb55a1d78efa/src/Lamdu/Data/Export/JSON/Migration/ToVersion13.hs | haskell | module Lamdu.Data.Export.JSON.Migration.ToVersion13 (migrate) where
import qualified Control.Lens as Lens
import Control.Lens.Extended ((~~>))
import qualified Data.Aeson as Aeson
import Data.Aeson.Instances ()
import Data.Aeson.Lens (_Array, _Object, _String)
import Data.Binary... | |
8cee8f49fc333d83978b1103b45e17a1f48f2d2199e71f5e1d9262789cecce90 | janestreet/bonsai | main.ml | open! Core
open Bonsai_web
let widget uri : Vdom.Node.t =
[ init ] is called whenever [ uri ] changes , updating the favicon . The DOM element
produced by the widget is unused .
produced by the widget is unused. *)
Vdom.Node.widget
~id:(Type_equal.Id.create ~name:"favicon" (const [%sexp "favicon"])... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/favicon_svg/main.ml | ocaml | open! Core
open Bonsai_web
let widget uri : Vdom.Node.t =
[ init ] is called whenever [ uri ] changes , updating the favicon . The DOM element
produced by the widget is unused .
produced by the widget is unused. *)
Vdom.Node.widget
~id:(Type_equal.Id.create ~name:"favicon" (const [%sexp "favicon"])... | |
aadc449826d9430c3f49fa591fa9073bb94dc6867ea103e97227e19de3199654 | pentlandedge/s4607 | dwell.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright 2016 Pentland Edge Ltd.
%%
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
%%
%% U... | null | https://raw.githubusercontent.com/pentlandedge/s4607/b3cdae404ac5bd50419f33259dfa62af9d1a8d60/src/dwell.erl | erlang |
use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitati... | Copyright 2016 Pentland Edge Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(dwell).
-export([
decode/1,
encode/1,
new/1,
payload_size/1,
payload_size/2,
to_dict/1,... |
e607a6f417404751d4183a9013cd11ceb0c4964593167942df6aec1d80077b92 | AccelerateHS/accelerate-llvm | Permute.hs | # LANGUAGE GADTs #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_HADDOCK hide #-}
-- |
-- Module : Data.Array.Accelerate.L... | null | https://raw.githubusercontent.com/AccelerateHS/accelerate-llvm/57136bfc67f0da8ea0a0aba0172397a2e92d3378/accelerate-llvm/src/Data/Array/Accelerate/LLVM/CodeGen/Permute.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
# OPTIONS_HADDOCK hide #
|
Module : Data.Array.Accelerate.LLVM.CodeGen.Permute
License : BSD3
Stability : experimental
| A forward permutation might be specialised to use atomic instructions to
perform ... | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
# LANGUAGE TypeApplications #
Copyright : [ 2016 .. 2020 ] The Accelerate Team
Maintainer : < >
Portability : non - portable ( GHC extensions )
module Data.Array.Accelerate.LLVM.CodeGen.Permute (
... |
40fa325098bec4334ac2a15f1e662c98ad3a13078c623f5efdfa413d914afa15 | reagent-project/reagent-cookbook | core.cljs | (ns morris.core
(:require [reagent.dom :as rdom]
[reagent.core :as reagent]))
(defn home-render []
[:div#donut-example ])
(defn home-did-mount []
(.Donut js/Morris (clj->js {:element "donut-example"
:data [{:label "Download Sales" :value 12}
... | null | https://raw.githubusercontent.com/reagent-project/reagent-cookbook/ccda91a74377098d27e2707c306a0187243cb290/recipes/morris/src/cljs/morris/core.cljs | clojure | (ns morris.core
(:require [reagent.dom :as rdom]
[reagent.core :as reagent]))
(defn home-render []
[:div#donut-example ])
(defn home-did-mount []
(.Donut js/Morris (clj->js {:element "donut-example"
:data [{:label "Download Sales" :value 12}
... | |
143ea975f68cc31897060b6024878bcf6d5f436a5f9c94983d1e802e802efcda | ocsigen/ocaml-eliom | divint.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/testsuite/tests/basic/divint.ml | ocaml | ************************************************************************
OCaml
... | , projet Gallium , INRIA Rocquencourt
Copyright 2013 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Printf
Test integer division and modulus , esp . ocamlopt 's optimization
when the divisor i... |
4aeb3e1772b5f41e90e2fd43ee1ac82509ad4da92e22cb6cfdf0cc12411479da | khigia/ocaml-fuzlog | fuzzySetTest.ml | open Fuzlog
let _cmp_float a b =
let d = a -. b in
abs_float d < 0.01
let _cmp_points l1 l2 =
List.fold_left2
(fun acc (xa, ya) (xb, yb) ->
let r1 = _cmp_float xa xb in
let r2 = _cmp_float ya yb in
acc && r1 && r2
)
true
l1
l2
le... | null | https://raw.githubusercontent.com/khigia/ocaml-fuzlog/cf8effd33eb21ef62ed770c03a6f236ba0ee49ef/test/fuzzySetTest.ml | ocaml | let _ = Printf.printf "mu(%f) = %f\n" x y in | open Fuzlog
let _cmp_float a b =
let d = a -. b in
abs_float d < 0.01
let _cmp_points l1 l2 =
List.fold_left2
(fun acc (xa, ya) (xb, yb) ->
let r1 = _cmp_float xa xb in
let r2 = _cmp_float ya yb in
acc && r1 && r2
)
true
l1
l2
le... |
e5a7ef11fb9a6a183cf852c93d14e2982dd48d574f447e84cd757db3b9742124 | skanev/playground | 40-tests.scm | (require rackunit rackunit/text-ui)
(load "../40.scm")
(define sicp-2.40-tests
(test-suite
"Tests for SICP exercise 2.40"
(check-equal? (enumerate-interval 1 5) '(1 2 3 4 5))
(check-equal? (unique-pairs 2) '((1 2)))
(check-equal? (unique-pairs 3) '((1 2) (1 3) (2 3)))
(check-equal? (unique-pair... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/tests/40-tests.scm | scheme | (require rackunit rackunit/text-ui)
(load "../40.scm")
(define sicp-2.40-tests
(test-suite
"Tests for SICP exercise 2.40"
(check-equal? (enumerate-interval 1 5) '(1 2 3 4 5))
(check-equal? (unique-pairs 2) '((1 2)))
(check-equal? (unique-pairs 3) '((1 2) (1 3) (2 3)))
(check-equal? (unique-pair... | |
0b4d674c0a2b22932bec9971e0ea78b9e514029fe5a20adf2b63fee6ae7e1cc4 | tomahawkins/atom | Probes.hs | |
Module : Probes
Description : Example usage of probes in Atom
Copyright : ( c ) 2015
This demonstrates the usage of Atom 's probe functionality . In this case , it
simply uses @printf@ to log a probe 's value . Most POSIX systems should be able
to build and run the generated C code .
Module: Probe... | null | https://raw.githubusercontent.com/tomahawkins/atom/e552e18859c6d249af4b293e9d2197878c0fd4fd/Language/Atom/Example/Probes.hs | haskell | | Generate a code comment about the given probe.
| Use 'action' to call @PROBE_PRINTF@ on a probe given as (name, value).
This will work only on integer-valued probes.
| Top-level rule
Include in the once-per-second clock:
probes that are in use.
this in production - use an interrupt):
Add a probe to the clock: | |
Module : Probes
Description : Example usage of probes in Atom
Copyright : ( c ) 2015
This demonstrates the usage of Atom 's probe functionality . In this case , it
simply uses @printf@ to log a probe 's value . Most POSIX systems should be able
to build and run the generated C code .
Module: Probe... |
99063858c137cd38a672372c490beda75ff48ff4336e3a520fcbddbd58482ef3 | strint/sicpAns | 2023_list_for_each.scm | (define (for-each-i p l)
(if (null? l)
#t
(begin (p (car l))
(for-each-i p (cdr l)))))
| null | https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/2.2.1-1_ListClosure/2023_list_for_each.scm | scheme | (define (for-each-i p l)
(if (null? l)
#t
(begin (p (car l))
(for-each-i p (cdr l)))))
| |
ad711a476c1a10dacf8d1e34ec359d125c6517f4751eb7a2434f8c0909229ab9 | tek/proteome | Quit.hs | module Proteome.Quit where
import Conc (Lock)
import Ribosome (Handler, PersistError, Rpc, RpcError, resumeReport)
import Ribosome.Effect.Persist (Persist)
import Proteome.Data.Env (Env)
import Proteome.Data.PersistBuffers (PersistBuffers)
import Proteome.PersistBuffers (StoreBuffersLock, storeBuffers)
proQuit ::
... | null | https://raw.githubusercontent.com/tek/proteome/274e36e99d801219bdf4e74899c509827e8f7275/packages/proteome/lib/Proteome/Quit.hs | haskell | module Proteome.Quit where
import Conc (Lock)
import Ribosome (Handler, PersistError, Rpc, RpcError, resumeReport)
import Ribosome.Effect.Persist (Persist)
import Proteome.Data.Env (Env)
import Proteome.Data.PersistBuffers (PersistBuffers)
import Proteome.PersistBuffers (StoreBuffersLock, storeBuffers)
proQuit ::
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.